Basic c++ification of varobj
[deliverable/binutils-gdb.git] / gdb / ChangeLog
1 2017-11-22 Simon Marchi <simon.marchi@polymtl.ca>
2
3 * varobj.h (struct varobj): Add constructor and destructor,
4 initialize fields.
5 * varobj.c (struct varobj_root): Initialize fields.
6 (struct varobj_dynamic): Initialize fields.
7 (varobj_create): Use unique_ptr instead of cleanup. Create
8 varobj with new instead of new_root_variable.
9 (delete_variable_1): Free variable with delete instead of
10 free_variable.
11 (create_child_with_value): Create variable with new instead of
12 new_variable.
13 (varobj::varobj): New.
14 (varobj::~varobj): New (body mostly coming from free_variable).
15 (new_variable): Remove.
16 (free_variable): Remove.
17 (do_free_variable_cleanup): Remove.
18 (make_cleanup_free_variable): Remove.
19
20 2017-11-22 Ulrich Weigand <uweigand@de.ibm.com>
21
22 * core-regset.c: Remove file.
23 * Makefile.in (ALLDEPFILES): Remove core-regset.c.
24
25 2017-11-22 Ulrich Weigand <uweigand@de.ibm.com>
26
27 * NEWS: Document use of GNU MPFR.
28 * README: Likewise.
29
30 * Makefile.in (LIBMPFR): Add define.
31 (CLIBS): Add $(LIBMPFR).
32 * configure.ac: Add --with-mpfr configure option.
33 * configure: Regenerate.
34 * config.in: Regenerate.
35
36 * target-float.c [HAVE_LIBMPFR]: Include <mpfr.h>.
37 (class mpfr_float_ops): New type.
38 (mpfr_float_ops::from_target): Two new overloaded functions.
39 (mpfr_float_ops::to_target): Likewise.
40 (mpfr_float_ops::to_string): New function.
41 (mpfr_float_ops::from_string): Likewise.
42 (mpfr_float_ops::to_longest): Likewise.
43 (mpfr_float_ops::from_longest): Likewise.
44 (mpfr_float_ops::from_ulongest): Likewise.
45 (mpfr_float_ops::to_host_double): Likewise.
46 (mpfr_float_ops::from_host_double): Likewise.
47 (mpfr_float_ops::convert): Likewise.
48 (mpfr_float_ops::binop): Likewise.
49 (mpfr_float_ops::compare): Likewise.
50 (get_target_float_ops): Use mpfr_float_ops if available.
51
52 2017-11-22 Ulrich Weigand <uweigand@de.ibm.com>
53
54 * target-float.c: Do not include <math.h>.
55 Include <cmath> and <limits>.
56 (DOUBLEST): Do not define.
57 (class target_float_ops): New type.
58 (class host_float_ops): New templated type.
59 (class decimal_float_ops): New type.
60
61 (floatformat_to_doublest): Rename to ...
62 (host_float_ops<T>::from_target): ... this. Use template type T
63 instead of DOUBLEST. Use C++ math routines. Update recursive calls.
64 (host_float_ops<T>::from_target): New overload using a type argument.
65 (floatformat_from_doublest): Rename to ...
66 (host_float_ops<T>::to_target): ... this. Use template type T
67 instead of DOUBLEST. Use C++ math routines. Update recursive calls.
68 (host_float_ops<T>::to_target): New overload using a type argument.
69 (floatformat_printf_format): New function.
70 (struct printf_length_modifier): New templated type.
71 (floatformat_to_string): Rename to ...
72 (host_float_ops<T>::to_string): ... this. Use type instead of
73 floatformat argument. Use floatformat_printf_format and
74 printf_length_modifier. Remove special handling of invalid numbers,
75 infinities and NaN (moved to target_float_to_string).
76 (struct scanf_length_modifier): New templated type.
77 (floatformat_from_string): Rename to ...
78 (host_float_ops<T>::from_string): ... this. Use type instead of
79 floatformat argument. Use scanf_length_modifier.
80 (floatformat_to_longest): Rename to ...
81 (host_float_ops<T>::to_longest): ... this. Use type instead of
82 floatformat argument. Handle out-of-range values deterministically.
83 (floatformat_from_longest): Rename to ...
84 (host_float_ops<T>::from_longest): ... this. Use type instead of
85 floatformat argument.
86 (floatformat_from_ulongest): Rename to ...
87 (host_float_ops<T>::from_ulongest): ... this. Use type instead of
88 floatformat argument.
89 (floatformat_to_host_double): Rename to ...
90 (host_float_ops<T>::to_host_double): ... this. Use type instead of
91 floatformat argument.
92 (floatformat_from_host_double): Rename to ...
93 (host_float_ops<T>::from_host_double): ... this. Use type instead of
94 floatformat argument.
95 (floatformat_convert): Rename to ...
96 (host_float_ops<T>::convert): ... this. Use type instead of
97 floatformat arguments. Remove handling of no-op conversions.
98 (floatformat_binop): Rename to ...
99 (host_float_ops<T>::binop): ... this. Use type instead of
100 floatformat arguments.
101 (floatformat_compare): Rename to ...
102 (host_float_ops<T>::compare): ... this. Use type instead of
103 floatformat arguments.
104
105 (match_endianness): Use type instead of length/byte_order arguments.
106 (set_decnumber_context): Likewise.
107 (decimal_from_number): Likewise. Update calls.
108 (decimal_to_number): Likewise.
109 (decimal_is_zero): Likewise. Update calls. Move to earlier in file.
110 (decimal_float_ops::to_host_double): New dummy function.
111 (decimal_float_ops::from_host_double): Likewise.
112 (decimal_to_string): Rename to ...
113 (decimal_float_ops::to_string): ... this. Use type instead of
114 length/byte_order arguments. Update calls.
115 (decimal_from_string): Rename to ...
116 (decimal_float_ops::from_string): ... this. Use type instead of
117 length/byte_order arguments. Update calls.
118 (decimal_from_longest): Rename to ...
119 (decimal_float_ops::from_longest): ... this. Use type instead of
120 length/byte_order arguments. Update calls.
121 (decimal_from_ulongest): Rename to ...
122 (decimal_float_ops::from_ulongest): ... this. Use type instead of
123 length/byte_order arguments. Update calls.
124 (decimal_to_longest): Rename to ...
125 (decimal_float_ops::to_longest): ... this. Use type instead of
126 length/byte_order arguments. Update calls.
127 (decimal_binop): Rename to ...
128 (decimal_float_ops::binop): ... this. Use type instead of
129 length/byte_order arguments. Update calls.
130 (decimal_compare): Rename to ...
131 (decimal_float_ops::compare): ... this. Use type instead of
132 length/byte_order arguments. Update calls.
133 (decimal_convert): Rename to ...
134 (decimal_float_ops::convert): ... this. Use type instead of
135 length/byte_order arguments. Update calls.
136
137 (target_float_same_category_p): New function.
138 (target_float_same_format_p): Likewise.
139 (target_float_format_length): Likewise.
140 (enum target_float_ops_kind): New type.
141 (get_target_float_ops_kind): New function.
142 (get_target_float_ops): Three new overloaded functions.
143
144 (target_float_is_zero): Update call.
145 (target_float_to_string): Add special handling of invalid numbers,
146 infinities and NaN (moved from floatformat_to_string). Use
147 target_float_ops callback.
148 (target_float_from_string): Use target_float_ops callback.
149 (target_float_to_longest): Likewise.
150 (target_float_from_longest): Likewise.
151 (target_float_from_ulongest): Likewise.
152 (target_float_to_host_double): Likewise.
153 (target_float_from_host_double): Likewise.
154 (target_float_convert): Add special case for no-op conversions.
155 Use target_float_ops callback.
156 (target_float_binop): Use target_float_ops callback.
157 (target_float_compare): Likewise.
158
159 2017-11-22 Yao Qi <yao.qi@linaro.org>
160
161 * python/py-gdb-readline.c (gdbpy_readline_wrapper): Use strcpy.
162
163 2017-11-22 Yao Qi <yao.qi@linaro.org>
164
165 * cli/cli-decode.c (help_list): Use memcpy instead of strncpy.
166 * cp-namespace.c (cp_lookup_transparent_type_loop): Likewise.
167
168 2017-11-21 Jerome Guitton <guitton@adacore.com>
169
170 * ravenscar-thread.c (ravenscar_wait): Update inferior ptid
171 with event ptid from the lower layer before doing the
172 ravenscar-specific update.
173
174 2017-11-21 Joel Brobecker <brobecker@adacore.com>
175
176 * ravenscar-thread.c (is_ravenscar_task): Also verify that
177 the ptid's TID is nonzero.
178
179 2017-11-21 Joel Brobecker <brobecker@adacore.com>
180
181 * ada-lang.h (ada_get_tcb_types_info): Add declaration.
182 * ada-tasks.c (ada_get_tcb_types_info): Renames get_tcb_types_info.
183 Make non-static. Change return type to char *. Adjust code
184 accordingly. Rewrite the function's documentation.
185 (read_atcb): Adjust call to get_tcb_types_info accordingly.
186 * ravenscar-thread.c (ravenscar_inferior_created): Check that
187 we have enough debugging information in the runtime to support
188 Ada task debugging before we enable the ravenscar-thread layer.
189
190 2017-11-21 Joel Brobecker <brobecker@adacore.com>
191
192 * ada-lang.h (ada_get_task_info_from_ptid): Add declaration.
193 * ada-tasks.c (ada_get_task_info_from_ptid): New function.
194 * ravenscar-thread.c: Add into comment.
195 (base_magic_null_ptid): Delete.
196 (base_ptid): Change documentation.
197 (ravenscar_active_task): Renames ravenscar_running_thread.
198 All callers updated throughout.
199 (is_ravenscar_task, ravenscar_get_thread_base_cpu): New function.
200 (ravenscar_task_is_currently_active): Likewise.
201 (get_base_thread_from_ravenscar_task): Ditto.
202 (ravenscar_update_inferior_ptid): Adjust to handle multiple CPUs.
203 (ravenscar_runtime_initialized): Likewise.
204 (get_running_thread_id): Add new parameter "cpu". Adjust
205 implementation to handle this new parameter.
206 (ravenscar_fetch_registers): Small adjustment to use
207 is_ravenscar_task and ravenscar_task_is_currently_active in
208 order to decide whether to use the target beneath or this
209 module's arch_ops.
210 (ravenscar_store_registers, ravenscar_prepare_to_store): Likewise.
211 (ravenscar_stopped_by_sw_breakpoint): Use
212 get_base_thread_from_ravenscar_task to get the underlying
213 thread, rather than using base_ptid.
214 (ravenscar_stopped_by_hw_breakpoint, ravenscar_stopped_by_watchpoint)
215 (ravenscar_stopped_data_address, ravenscar_core_of_thread):
216 Likewise.
217 (ravenscar_inferior_created): Do not set base_magic_null_ptid.
218
219 2017-11-21 Joel Brobecker <brobecker@adacore.com>
220
221 * ada-lang.h (struct ada_task_info) <base_cpu>: New field.
222 * ada-lang.c (struct atcb_fieldno) <base_cpu>: New field.
223 (get_tcb_types_info): Set fieldnos.base_cpu.
224 (read_atcb): Set task_info->base_cpu.
225 (info_task): Print "Base CPU" info if set by runtime.
226
227 2017-11-21 Joel Brobecker <brobecker@adacore.com>
228
229 * ravenscar-thread.c (ravenscar_stopped_by_sw_breakpoint)
230 (ravenscar_stopped_by_hw_breakpoint, ravenscar_stopped_by_watchpoint)
231 (ravenscar_stopped_data_address, ravenscar_core_of_thread):
232 New functions.
233 (init_ravenscar_thread_ops): Set the to_stopped_by_sw_breakpoint,
234 to_stopped_by_hw_breakpoint, to_stopped_by_watchpoint,
235 to_stopped_data_address and to_core_of_thread fields of
236 ravenscar_ops.
237
238 2017-11-21 Ulrich Weigand <uweigand@de.ibm.com>
239
240 * ppc-tdep.h (enum powerpc_long_double_abi): New data type.
241 (struct gdbarch_tdep): New member long_double_abi.
242 * rs6000-tdep.c (rs6000_gdbarch_init): Initialize long_double_abi
243 member of tdep struct based on Tag_GNU_Power_ABI_FP attribute.
244 * ppc-linux-tdep.c (ppc_linux_init_abi): Install long double data
245 format depending on long_double_abi tdep member.
246 (ppc_floatformat_for_type): Handle __ibm128 type.
247
248 2017-11-20 Simon Marchi <simon.marchi@polymtl.ca>
249
250 * darwin-nat.c (set_enable_mach_exceptions): Constify parameter.
251
252 2017-11-21 Pedro Alves <palves@redhat.com>
253
254 * dwarf2read.c (mapped_index::find_name_components_bounds)
255 <completion mode, upper bound>: Use std::lower_bound instead of
256 std::upper_bound.
257 (test_mapped_index_find_name_component_bounds): Remove incorrect
258 "t1_fund" from expected symbols.
259
260 2017-11-21 Pedro Alves <palves@redhat.com>
261
262 * dwarf2read.c (mapped_index::name_components_casing): New field.
263 (mapped_index) <build_name_components,
264 find_name_components_bounds): Declare new methods.
265 (mapped_index::find_name_components_bounds)
266 (mapped_index::build_name_components): New methods, factored out
267 from dw2_expand_symtabs_matching_symbol.
268 (check_find_bounds_finds)
269 (test_mapped_index_find_name_component_bounds): New.
270 (run_test): Rename to ...
271 (test_dw2_expand_symtabs_matching_symbol): ... this.
272 (run_test): Reimplement.
273
274 2017-11-21 Pedro Alves <palves@redhat.com>
275
276 * cp-name-parser.y (cp_ident_is_alpha, cp_ident_is_alnum): New.
277 (symbol_end): Use cp_ident_is_alnum.
278 (yylex): Use cp_ident_is_alpha and cp_ident_is_alnum.
279 * dwarf2read.c (make_sort_after_prefix_name): New function.
280 (dw2_expand_symtabs_matching_symbol): Use it.
281 (test_symbols): Add more symbols.
282 (run_test): Add tests.
283
284 2017-11-17 Tom Tromey <tom@tromey.com>
285
286 * symtab.h (enum symbol_subclass_kind): New.
287 (struct symbol) <is_cplus_template_function, is_rust_vtable>:
288 Remove.
289 <subclass>: New member.
290 (SYMBOL_IS_CPLUS_TEMPLATE_FUNCTION): Update.
291 * rust-lang.c (rust_get_trait_object_pointer): Update.
292 * dwarf2read.c (read_func_scope): Update.
293 (read_variable): Update.
294
295 2017-11-17 Tom Tromey <tom@tromey.com>
296
297 * dwarf2read.c (read_func_scope): Update.
298 * symtab.h (struct template_symbol): Derive from symbol.
299 <base>: Remove.
300
301 2017-11-17 Tom Tromey <tom@tromey.com>
302
303 * symtab.h (struct symbol) <is_rust_vtable>: New member.
304 (struct rust_vtable_symbol): New.
305 (find_symbol_at_address): Declare.
306 * symtab.c (find_symbol_at_address): New function.
307 * symfile.h (struct quick_symbol_functions)
308 <find_compunit_symtab_by_address>: New member.
309 * symfile-debug.c (debug_qf_find_compunit_symtab_by_address): New
310 function.
311 (debug_sym_quick_functions): Link to
312 debug_qf_find_compunit_symtab_by_address.
313 * rust-lang.c (rust_get_trait_object_pointer): New function.
314 (rust_evaluate_subexp) <case UNOP_IND>: New case. Call
315 rust_get_trait_object_pointer.
316 * psymtab.c (psym_relocate): Clear psymbol_map.
317 (psym_fill_psymbol_map, psym_find_compunit_symtab_by_address): New
318 functions.
319 (psym_functions): Link to psym_find_compunit_symtab_by_address.
320 * objfiles.h (struct objfile) <psymbol_map>: New member.
321 * dwarf2read.c (dwarf2_gdb_index_functions): Update.
322 (process_die) <DW_TAG_variable>: New case. Call read_variable.
323 (rust_containing_type, read_variable): New functions.
324
325 2017-11-17 Simon Marchi <simon.marchi@polymtl.ca>
326
327 * common/gdb_vecs.h (DEF_VEC_I (int)): Remove.
328
329 2017-11-17 Simon Marchi <simon.marchi@polymtl.ca>
330
331 * common/filestuff.c: Include <algorithm>.
332 (open_fds): Change type to std::vector<int>.
333 (do_mark_open_fd): Adjust.
334 (unmark_fd_no_cloexec): Adjust.
335 (do_close): Adjust.
336
337 2017-11-17 Simon Marchi <simon.marchi@polymtl.ca>
338
339 * breakpoint.c (output_thread_groups): Take an std::vector.
340 (print_one_breakpoint_location): Adjust.
341
342 2017-11-17 Joel Brobecker <brobecker@adacore.com>
343
344 * ada-lang.c (resolve_subexp): Add handling of OP_VAR_MSYM_VALUE.
345 (ada_evaluate_subexp_for_cast): New function.
346 (ada_evaluate_subexp) <UNOP_CAST>: Replace code by call to
347 ada_evaluate_subexp_for_cast.
348 (ada_evaluate_subexp) <nosideret>: Replace code by call to
349 eval_skip_value.
350 * eval.c (evaluate_var_value): Make non-static.
351 (evaluate_var_msym_value, eval_skip_value): Likewise.
352 * value.h (evaluate_var_value, evaluate_var_msym_value)
353 (eval_skip_value): Declare.
354
355 2017-11-16 Joel Brobecker <brobecker@adacore.com>
356
357 * ada-lang.c (ada_value_cast): Remove parameter "noside".
358 Update all callers.
359
360 2017-11-16 Pedro Alves <palves@redhat.com>
361
362 * python/py-unwind.c (pyuw_sniffer): Translate
363 PyExc_KeyboardInterrupt to a GDB Quit exception.
364
365 2017-11-16 Pedro Alves <palves@redhat.com>
366
367 * infrun.c (resume_cleanups): Delete.
368 (resume): No longer install a resume_cleanups cleanup nor call
369 QUIT.
370 (proceed): Pass the terminal to the inferior.
371 (keep_going_pass_signal): No longer install a resume_cleanups
372 cleanup.
373
374 2017-11-16 Pedro Alves <palves@redhat.com>
375
376 * inf-loop.c (inferior_event_handler): Don't swallow the exception
377 if the prompt is blocked.
378
379 2017-11-16 Pedro Alves <palves@redhat.com>
380
381 * breakpoint.c (insert_bp_location): Replace bp_err and
382 bp_err_message locals by a gdb_exception local.
383
384 2017-11-16 Pedro Alves <palves@redhat.com>
385
386 * inflow.c (scoped_ignore_sigttou): New class.
387 (child_terminal_ours_1, new_tty): Use it.
388
389 2017-11-16 Ulrich Weigand <uweigand@de.ibm.com>
390
391 * target-float.c (decimal_from_number): Add byte_order argument and
392 call match_endianness. Error if unknown floating-point type.
393 (decimal_to_number): Add byte_order argument and call match_endianness.
394 (decimal_from_longest): Update call. Do not call match_endianness.
395 (decimal_from_ulongest): Likewise.
396 (decimal_binop): Likewise.
397 (decimal_is_zero): Likewise.
398 (decimal_compare): Likewise.
399 (decimal_convert): Likewise.
400
401 2017-11-16 Phil Muldoon <pmuldoon@redhat.com>
402
403 * python/python.c (gdbpy_rbreak): New function.
404 * NEWS: Document Python rbreak feature.
405
406 2017-11-16 Yao Qi <yao.qi@linaro.org>
407
408 * features/tic6x-c62x.xml: Remove.
409 * features/tic6x-c64x.xml: Remove.
410 * features/tic6x-c64xp.xml: Remove.
411
412 2017-11-15 John Baldwin <jhb@FreeBSD.org>
413
414 * symtab.h: Include <array>.
415
416 2017-11-15 John Baldwin <jhb@FreeBSD.org>
417
418 * bsd-kvm.c (bsd_kvm_cmd): Constify 'arg'.
419 (bsd_kvm_proc_cmd): Likewise.
420
421 2017-11-15 Simon Marchi <simon.marchi@ericsson.com>
422
423 * tui/tui-win.c (window_name_completer): Replace VEC with
424 std::vector.
425
426 2017-11-15 Andrew Cagney <cagney@gnu.org>
427
428 * MAINTAINERS: Remove no-longer applicable entries.
429
430 2017-11-15 Andrew Cagney <cagney@gnu.org>
431
432 * MAINTAINERS: Move self to Past Maintainers.
433
434 2017-11-15 Yao Qi <yao.qi@linaro.org>
435
436 * features/Makefile (XMLTOC): Remove nios2-linux.xml.
437 * features/nios2-linux.c: Remove.
438 * nios2-linux-tdep.c (_initialize_nios2_linux_tdep): Don't call
439 initialize_tdesc_nios2_linux.
440
441 2017-11-15 Yao Qi <yao.qi@linaro.org>
442
443 * m68hc11-tdep.c (M68HC11_NUM_REGS): Change it to
444 M68HC11_LAST_HARD_REG + 1.
445
446 2017-11-14 Paul Carroll <pcarroll@codesourcery.com>
447
448 PR gdb/22388
449 * remote.c (remote_write_bytes_aux, remote_read_bytes_1,
450 remote_read_bytes, remote_write_qxfer, remote_xfer_partial):
451 Return TARGET_XFER_EOF if size of returned data is 0.
452
453 2017-11-14 Simon Marchi <simon.marchi@ericsson.com>
454
455 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
456 memory-map-selftests.c.
457 (SUBDIR_UNITTESTS_OBS): Add memory-map-selftests.o.
458 * memory-map.c (memory_map_start_memory): Fix computation of hi
459 address.
460 * unittests/memory-map-selftests.c: New file.
461
462 2017-11-09 Joel Brobecker <brobecker@adacore.com>
463
464 * ada-lang.c: Fix some typos in the general command documenting
465 how Ada expressions are being evaluated and how their result
466 is printed.
467
468 2017-11-09 Tom Tromey <tom@tromey.com>
469
470 * psymtab.c (psymbol_hash): Do not hash string contents.
471 (psymbol_compare): Add comment.
472
473 2017-11-09 Tom Tromey <tom@tromey.com>
474
475 * dictionary.c (dict_hash): Move "TKB" check into the "switch".
476
477 2017-11-08 Joel Brobecker <brobecker@adacore.com>
478
479 * ada-exp.y (write_var_from_sym): Remove parameter
480 "orig_left_context". Update all callers.
481
482 2017-11-08 Simon Marchi <simon.marchi@ericsson.com>
483
484 * tracepoint.h (class collection_list) <stringify>: Return
485 std::vector<std::string>.
486 (encode_actions_rsp): Change parameters to
487 std::vector<std::string> *.
488 * tracepoint.c (collection_list::stringify): Return
489 std::vector<std::string> and adjust accordingly.
490 (encode_actions_rsp): Changee parameters to
491 std::vector<std::string> and adjust accordingly.
492 * remote.c (free_actions_list),
493 free_actions_list_cleanup_wrapper): Remove.
494 (remote_download_tracepoint): Adjust to std::vector.
495
496 2017-11-08 Tom Tromey <tom@tromey.com>
497
498 * dwarf2read.c (symbolp): Remove typedef.
499 (read_func_scope): Use std::vector.
500 (process_structure_scope): Use std::vector.
501
502 2017-11-08 Pedro Alves <palves@redhat.com>
503
504 * ada-lang.c (ada_make_symbol_completion_list): Use
505 completion_skip_symbol.
506 * symtab.c (symbol_is_function_or_method(minimal_symbol*)): New.
507 (symbol_is_function_or_method(symbol*)): New.
508 (add_symtab_completions): Add complete_symbol_mode parameter. Use
509 completion_skip_symbol.
510 (default_collect_symbol_completion_matches_break_on): Use
511 completion_skip_symbol. Pass down mode.
512 (collect_file_symbol_completion_matches): Pass down mode.
513 * symtab.h (symbol_is_function_or_method): New declarations.
514 (completion_skip_symbol): New template function.
515
516 2017-11-08 Pedro Alves <palves@redhat.com>
517
518 * linespec.c (iterate_over_all_matching_symtabs): Add
519 search_domain parameter. Pass it down to expand_symtabs_matching.
520 (decode_objc): Request FUNCTIONS_DOMAIN symbols only.
521 (lookup_prefix_sym): Adjust by passing ALL_DOMAIN as
522 search_domain.
523 (add_all_symbol_names_from_pspace): Add search_domain parameter.
524 Pass it down.
525 (find_method, find_function_symbols): Request FUNCTIONS_DOMAIN
526 symbols.
527 (add_matching_symbols_to_info): Add search_domain parameter. Pass
528 it down.
529
530 2017-11-08 Pedro Alves <palves@redhat.com>
531
532 * ada-lang.c (ada_make_symbol_completion_list): Remove text and
533 text_len locals and don't pass them down.
534 * symtab.c (completion_list_add_name): Remove
535 sym_text/sym_text_len parameters and adjust.
536 (completion_list_add_symbol, completion_list_add_msymbol)
537 (completion_list_objc_symbol, completion_list_add_fields)
538 (add_symtab_completions): Likewise.
539 (default_collect_symbol_completion_matches_break_on)
540 (collect_file_symbol_completion_matches): Remove sym_text_len
541 local and don't pass it down.
542 * symtab.h (completion_list_add_name): Remove
543 sym_text/sym_text_len parameters.
544
545 2017-11-08 Pedro Alves <palves@redhat.com>
546
547 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
548 unittests/lookup_name_info-selftests.c.
549 (SUBDIR_UNITTESTS_OBS): Add lookup_name_info-selftests.o.
550 * cp-support.c: Include "selftest.h".
551 (cp_remove_params_1): Rename from cp_remove_params. Add
552 'require_param' parameter, and handle it.
553 (cp_remove_params): Reimplement.
554 (cp_remove_params_if_any): New.
555 (selftests::quote): New.
556 (selftests::check_remove_params): New.
557 (selftests::test_cp_remove_params): New.
558 (_initialize_cp_support): Install
559 selftests::test_cp_remove_params.
560 * cp-support.h (cp_remove_params_if_any): Declare.
561 * dwarf2read.c :Include "selftest.h".
562 (dw2_expand_symtabs_matching_symbol): Use
563 lookup_name_info::make_ignore_params.
564 (selftests::dw2_expand_symtabs_matching::mock_mapped_index)
565 (selftests::dw2_expand_symtabs_matching::string_or_null)
566 (selftests::dw2_expand_symtabs_matching::check_match)
567 (selftests::dw2_expand_symtabs_matching::test_symbols)
568 (selftests::dw2_expand_symtabs_matching::run_test): New.
569 (_initialize_dwarf2_read): Register
570 selftests::dw2_expand_symtabs_matching::run_test.
571 * psymtab.c (psym_expand_symtabs_matching): Use
572 lookup_name_info::make_ignore_params.
573 * symtab.c (demangle_for_lookup_info::demangle_for_lookup_info):
574 If the lookup name wants to ignore parameters, strip them.
575 (compare_symbol_name): Remove sym_text/sym_text_len parameters and
576 code handling '('.
577 (completion_list_add_name): Don't pass down sym_text/sym_text_len.
578 (default_collect_symbol_completion_matches_break_on): Don't try to
579 strip parameters.
580 * symtab.h (lookup_name_info::lookup_name_info): Add
581 'ignore_parameters' parameter.
582 (lookup_name_info::ignore_parameters)
583 (lookup_name_info::make_ignore_params): New methods.
584 (lookup_name_info::m_ignore_parameters): New field.
585 * unittests/lookup_name_info-selftests.c: New file.
586
587 2017-11-08 Pedro Alves <palves@redhat.com>
588
589 * dwarf2read.c (dw2_expand_marked_cus)
590 (dw2_expand_symtabs_matching_symbol): Remove forward declarations.
591 (dw2_expand_symtabs_matching): Move further below.
592 (dw2_expand_marked_cus): Reindent.
593
594 2017-11-08 Pedro Alves <palves@redhat.com>
595
596 * dwarf2read.c (byte_swap, MAYBE_SWAP): Move higher up in file.
597 (struct name_component): New.
598 (mapped_index::name_components): New field.
599 (mapped_index::symbol_name_at): New method.
600 (dwarf2_read_index): Call mapped_index ctor.
601 (dw2_map_matching_symbols): Add comment about name_components
602 table.
603 (dw2_expand_symtabs_matching): Factor part to...
604 (dw2_expand_symtabs_matching_symbol): ... this new function.
605 Build name components table, and lookup symbols in it before
606 calling the name matcher.
607 (dw2_expand_marked_cus): New, factored out from
608 dw2_expand_symtabs_matching.
609 (dwarf2_per_objfile_free): Call the mapped_index's dtor.
610
611 2017-11-08 Pedro Alves <palves@redhat.com>
612
613 * ada-lang.c (ada_encode): Rename to ..
614 (ada_encode_1): ... this. Add throw_errors parameter and handle
615 it.
616 (ada_encode): Reimplement.
617 (match_name): Delete, folded into full_name.
618 (resolve_subexp): No longer pass the encoded name to
619 ada_lookup_symbol_list.
620 (should_use_wild_match): Delete.
621 (name_match_type_from_name): New.
622 (ada_lookup_simple_minsym): Use lookup_name_info and the
623 language's symbol_name_matcher_ftype.
624 (add_symbols_from_enclosing_procs, ada_add_local_symbols)
625 (ada_add_block_renamings): Adjust to use lookup_name_info.
626 (ada_lookup_name): New.
627 (add_nonlocal_symbols, ada_add_all_symbols)
628 (ada_lookup_symbol_list_worker, ada_lookup_symbol_list)
629 (ada_iterate_over_symbols): Adjust to use lookup_name_info.
630 (ada_name_for_lookup): Delete.
631 (ada_lookup_encoded_symbol): Construct a verbatim name.
632 (wild_match): Reverse sense of return type. Use bool.
633 (full_match): Reverse sense of return type. Inline bits of old
634 match_name here.
635 (ada_add_block_symbols): Adjust to use lookup_name_info.
636 (symbol_completion_match): Delete, folded into...
637 (ada_lookup_name_info::matches): ... .this new method.
638 (symbol_completion_add): Delete.
639 (ada_collect_symbol_completion_matches): Add name_match_type
640 parameter. Adjust to use lookup_name_info and
641 completion_list_add_name.
642 (get_var_value, ada_add_global_exceptions): Adjust to use
643 lookup_name_info.
644 (ada_get_symbol_name_cmp): Delete.
645 (do_wild_match, do_full_match): New functions.
646 (ada_lookup_name_info::ada_lookup_name_info): New method.
647 (ada_symbol_name_matches, ada_get_symbol_name_matcher): New
648 functions.
649 (ada_language_defn): Install ada_get_symbol_name_matcher.
650 * ada-lex.l (processId): If name starts with '<', copy it
651 verbatim.
652 * block.c (block_iter_match_step, block_iter_match_first)
653 (block_iter_match_next, block_lookup_symbol)
654 (block_lookup_symbol_primary, block_find_symbol): Adjust to use
655 lookup_name_info.
656 * block.h (block_iter_match_first, block_iter_match_next)
657 (ALL_BLOCK_SYMBOLS_WITH_NAME): Adjust to use lookup_name_info.
658 * c-lang.c (c_language_defn, cplus_language_defn)
659 (asm_language_defn, minimal_language_defn): Adjust comments to
660 refer to la_get_symbol_name_matcher.
661 * completer.c (complete_files_symbols)
662 (collect_explicit_location_matches, symbol_completer): Pass a
663 symbol_name_match_type down.
664 * completer.h (class completion_match, completion_match_result):
665 New classes.
666 (completion_tracker::reset_completion_match_result): New method.
667 (completion_tracker::m_completion_match_result): New field.
668 * cp-support.c (make_symbol_overload_list_block): Adjust to use
669 lookup_name_info.
670 (cp_fq_symbol_name_matches, cp_get_symbol_name_matcher): New
671 functions.
672 * cp-support.h (cp_get_symbol_name_matcher): New declaration.
673 * d-lang.c: Adjust comments to refer to
674 la_get_symbol_name_matcher.
675 * dictionary.c (dict_vector) <iter_match_first, iter_match_next>:
676 Adjust to use lookup_name_info.
677 (dict_iter_match_first, dict_iter_match_next)
678 (iter_match_first_hashed, iter_match_next_hashed)
679 (iter_match_first_linear, iter_match_next_linear): Adjust to work
680 with a lookup_name_info.
681 * dictionary.h (dict_iter_match_first, dict_iter_match_next):
682 Likewise.
683 * dwarf2read.c (dw2_lookup_symbol): Adjust to use lookup_name_info.
684 (dw2_map_matching_symbols): Adjust to use symbol_name_match_type.
685 (gdb_index_symbol_name_matcher): New class.
686 (dw2_expand_symtabs_matching) Adjust to use lookup_name_info and
687 gdb_index_symbol_name_matcher. Accept a NULL symbol_matcher.
688 * f-lang.c (f_collect_symbol_completion_matches): Adjust to work
689 with a symbol_name_match_type.
690 (f_language_defn): Adjust comments to refer to
691 la_get_symbol_name_matcher.
692 * go-lang.c (go_language_defn): Adjust comments to refer to
693 la_get_symbol_name_matcher.
694 * language.c (default_symbol_name_matcher)
695 (language_get_symbol_name_matcher): New functions.
696 (unknown_language_defn, auto_language_defn): Adjust comments to
697 refer to la_get_symbol_name_matcher.
698 * language.h (symbol_name_cmp_ftype): Delete.
699 (language_defn) <la_collect_symbol_completion_matches>: Add match
700 type parameter.
701 <la_get_symbol_name_cmp>: Delete field.
702 <la_get_symbol_name_matcher>: New field.
703 <la_iterate_over_symbols>: Adjust to use lookup_name_info.
704 (default_symbol_name_matcher, language_get_symbol_name_matcher):
705 Declare.
706 * linespec.c (iterate_over_all_matching_symtabs)
707 (iterate_over_file_blocks): Adjust to use lookup_name_info.
708 (find_methods): Add language parameter, and use lookup_name_info
709 and the language's symbol_name_matcher_ftype.
710 (linespec_complete_function): Adjust.
711 (lookup_prefix_sym): Use lookup_name_info.
712 (add_all_symbol_names_from_pspace): Adjust.
713 (find_superclass_methods): Add language parameter and pass it
714 down.
715 (find_method): Pass symbol language down.
716 (find_linespec_symbols): Don't demangle or Ada encode here.
717 (search_minsyms_for_name): Add lookup_name_info parameter.
718 (add_matching_symbols_to_info): Add name_match_type parameter.
719 Use lookup_name_info.
720 * m2-lang.c (m2_language_defn): Adjust comments to refer to
721 la_get_symbol_name_matcher.
722 * minsyms.c: Include <algorithm>.
723 (add_minsym_to_demangled_hash_table): Remove table parameter and
724 add objfile parameter. Use search_name_hash, and add language to
725 demangled languages vector.
726 (struct found_minimal_symbols): New struct.
727 (lookup_minimal_symbol_mangled, lookup_minimal_symbol_demangled):
728 New functions.
729 (lookup_minimal_symbol): Adjust to use them. Don't canonicalize
730 input names here. Use lookup_name_info instead. Lookup up
731 demangled names once for each language in the demangled names
732 vector.
733 (iterate_over_minimal_symbols): Use lookup_name_info. Lookup up
734 demangled names once for each language in the demangled names
735 vector.
736 (build_minimal_symbol_hash_tables): Adjust.
737 * minsyms.h (iterate_over_minimal_symbols): Adjust to pass down a
738 lookup_name_info.
739 * objc-lang.c (objc_language_defn): Adjust comment to refer to
740 la_get_symbol_name_matcher.
741 * objfiles.h: Include <vector>.
742 (objfile_per_bfd_storage) <demangled_hash_languages>: New field.
743 * opencl-lang.c (opencl_language_defn): Adjust comment to refer to
744 la_get_symbol_name_matcher.
745 * p-lang.c (pascal_language_defn): Adjust comment to refer to
746 la_get_symbol_name_matcher.
747 * psymtab.c (psym_lookup_symbol): Use lookup_name_info.
748 (match_partial_symbol): Use symbol_name_match_type,
749 lookup_name_info and psymbol_name_matches.
750 (lookup_partial_symbol): Use lookup_name_info.
751 (map_block): Use symbol_name_match_type and lookup_name_info.
752 (psym_map_matching_symbols): Use symbol_name_match_type.
753 (psymbol_name_matches): New.
754 (recursively_search_psymtabs): Use lookup_name_info and
755 psymbol_name_matches. Rename 'kind' parameter to 'domain'.
756 (psym_expand_symtabs_matching): Use lookup_name_info. Rename
757 'kind' parameter to 'domain'.
758 * rust-lang.c (rust_language_defn): Adjust comment to refer to
759 la_get_symbol_name_matcher.
760 * symfile-debug.c (debug_qf_map_matching_symbols)
761 (debug_qf_map_matching_symbols): Use symbol_name_match_type.
762 (debug_qf_expand_symtabs_matching): Use lookup_name_info.
763 * symfile.c (expand_symtabs_matching): Use lookup_name_info.
764 * symfile.h (quick_symbol_functions) <map_matching_symbols>:
765 Adjust to use symbol_name_match_type.
766 <expand_symtabs_matching>: Adjust to use lookup_name_info.
767 (expand_symtabs_matching): Adjust to use lookup_name_info.
768 * symmisc.c (maintenance_expand_symtabs): Use
769 lookup_name_info::match_any ().
770 * symtab.c (symbol_matches_search_name): New.
771 (eq_symbol_entry): Adjust to use lookup_name_info and the
772 language's matcher.
773 (demangle_for_lookup_info::demangle_for_lookup_info): New.
774 (lookup_name_info::match_any): New.
775 (iterate_over_symbols, search_symbols): Use lookup_name_info.
776 (compare_symbol_name): Add language, lookup_name_info and
777 completion_match_result parameters, and use them.
778 (completion_list_add_name): Make extern. Add language and
779 lookup_name_info parameters. Use them.
780 (completion_list_add_symbol, completion_list_add_msymbol)
781 (completion_list_objc_symbol): Add lookup_name_info parameters and
782 adjust. Pass down language.
783 (completion_list_add_fields): Add lookup_name_info parameters and
784 adjust. Pass down language.
785 (add_symtab_completions): Add lookup_name_info parameters and
786 adjust.
787 (default_collect_symbol_completion_matches_break_on): Add
788 name_match_type parameter, and use it. Use lookup_name_info.
789 (default_collect_symbol_completion_matches)
790 (collect_symbol_completion_matches): Add name_match_type
791 parameter, and pass it down.
792 (collect_symbol_completion_matches_type): Adjust.
793 (collect_file_symbol_completion_matches): Add name_match_type
794 parameter, and use lookup_name_info.
795 * symtab.h: Include <string> and "common/gdb_optional.h".
796 (enum class symbol_name_match_type): New.
797 (class ada_lookup_name_info): New.
798 (struct demangle_for_lookup_info): New.
799 (class lookup_name_info): New.
800 (symbol_name_matcher_ftype): New.
801 (SYMBOL_MATCHES_SEARCH_NAME): Use symbol_matches_search_name.
802 (symbol_matches_search_name): Declare.
803 (MSYMBOL_MATCHES_SEARCH_NAME): Delete.
804 (default_collect_symbol_completion_matches)
805 (collect_symbol_completion_matches)
806 (collect_file_symbol_completion_matches): Add name_match_type
807 parameter.
808 (iterate_over_symbols): Use lookup_name_info.
809 (completion_list_add_name): Declare.
810 * utils.c (enum class strncmp_iw_mode): Moved to utils.h.
811 (strncmp_iw_with_mode): Now extern.
812 * utils.h (enum class strncmp_iw_mode): Moved from utils.c.
813 (strncmp_iw_with_mode): Declare.
814
815 2017-11-08 Keith Seitz <keiths@redhat.com>
816 Pedro Alves <palves@redhat.com>
817
818 * ada-lang.c (ada_language_defn): Install
819 default_search_name_hash.
820 * buildsym.c (struct buildsym_compunit): <language>: New field.
821 (finish_block_internal): Pass language when creating dictionaries.
822 (start_buildsym_compunit, start_symtab): New language parameters.
823 Use them.
824 (restart_symtab): Pass down compilation unit's language.
825 * buildsym.h (enum language): Forward declare.
826 (start_symtab): New 'language' parameter.
827 * c-lang.c (c_language_defn, cplus_language_defn)
828 (asm_language_defn, minimal_language_defn): Install
829 default_search_name_hash.
830 * coffread.c (coff_start_symtab): Adjust.
831 * d-lang.c (d_language_defn): Install default_search_name_hash.
832 * dbxread.c (struct symloc): Add 'pst_language' field.
833 (PST_LANGUAGE): Define.
834 (start_psymtab, read_ofile_symtab): Use it.
835 (process_one_symbol): New 'language' parameter. Pass it down.
836 * dictionary.c (struct dictionary) <language>: New field.
837 (DICT_LANGUAGE): Define.
838 (dict_create_hashed, dict_create_hashed_expandable)
839 (dict_create_linear, dict_create_linear_expandable): New parameter
840 'language'. Set the dictionary's language.
841 (iter_match_first_hashed): Adjust to rename.
842 (insert_symbol_hashed): Assert we don't see mismatching
843 languages. Adjust to rename.
844 (dict_hash): Rename to ...
845 (default_search_name_hash): ... this and make extern.
846 * dictionary.h (struct language_defn): Forward declare.
847 (dict_create_hashed): New parameter 'language'.
848 * dwarf2read.c (dwarf2_start_symtab): Pass down language.
849 * f-lang.c (f_language_defn): Install default_search_name_hash.
850 * go-lang.c (go_language_defn): Install default_search_name_hash.
851 * jit.c (finalize_symtab): Pass compunit's language to dictionary
852 creation.
853 * language.c (unknown_language_defn, auto_language_defn):
854 * language.h (language_defn::la_search_name_hash): New field.
855 (default_search_name_hash): Declare.
856 * m2-lang.c (m2_language_defn): Install default_search_name_hash.
857 * mdebugread.c (new_block): New parameter 'language'.
858 * mdebugread.c (parse_symbol): Pass symbol language to block
859 allocation.
860 (psymtab_to_symtab_1): Pass down language.
861 (new_symtab): Pass compunit's language to block allocation.
862 * objc-lang.c (objc_language_defn): Install
863 default_search_name_hash.
864 * opencl-lang.c (opencl_language_defn):
865 * p-lang.c (pascal_language_defn): Install
866 default_search_name_hash.
867 * rust-lang.c (rust_language_defn): Install
868 default_search_name_hash.
869 * stabsread.h (enum language): Forward declare.
870 (process_one_symbol): Add 'language' parameter.
871 * symtab.c (search_name_hash): New function.
872 * symtab.h (search_name_hash): Declare.
873 * xcoffread.c (read_xcoff_symtab): Pass language to start_symtab.
874
875 2017-11-08 Pedro Alves <palves@redhat.com>
876
877 * cp-name-parser.y (main): Don't initialize extra_chars.
878
879 2017-11-07 Tom Tromey <tom@tromey.com>
880
881 * event-top.h (command_handler): Constify.
882 * record-full.c (cmd_record_full_start): Update.
883 * thread.c (thread_apply_all_command): Update.
884 * printcmd.c (eval_command): Update.
885 * mi/mi-main.c (mi_execute_cli_command): Update.
886 (mi_execute_async_cli_command): Update.
887 * tui/tui-stack.c (tui_update_command): Update.
888 * cli/cli-interp.c (safe_execute_command): Constify.
889 * record.c (record_start): Update.
890 (record_start, record_stop, cmd_record_start): Update.
891 * record-btrace.c (cmd_record_btrace_bts_start): Update.
892 (cmd_record_btrace_pt_start): Update.
893 (cmd_record_btrace_start): Update.
894 (cmd_record_btrace_start): Update.
895 * reverse.c (exec_reverse_once): Update.
896 * python/python.c (execute_gdb_command): Don't copy the command.
897 * event-top.c (command_line_handler): Update.
898 (command_handler): Constify.
899 * defs.h (deprecated_call_command_hook): Constify.
900 * cli/cli-script.h (execute_user_command): Constify.
901 * cli/cli-script.c (execute_user_command): Constify.
902 (execute_cmd_pre_hook, execute_cmd_post_hook): Constify.
903 (enum command_control_type): Update.
904 * main.c (catch_command_errors): Remove non-const overload.
905 (catch_command_errors_ftype): Remove.
906 * python/py-cmd.c (cmdpy_function): Constify.
907 * guile/scm-cmd.c (cmdscm_function): Constify.
908 * cli/cli-dump.c (call_dump_func): Constify.
909 * cli/cli-decode.c (do_const_cfunc): Constify.
910 (do_sfunc): Constify.
911 (cmd_func): Constify.
912 * gdbcmd.h (execute_command, execute_command_to_string): Constify.
913 * top.h (execute_command): Constify.
914 * top.c (execute_command): Constify.
915 (execute_command_to_string): Constify.
916 (deprecated_call_command_hook): Constify.
917 * command.h (cmd_func): Constify.
918 * cli/cli-decode.h (struct cmd_list_element) <func>: Constify.
919
920 2017-11-07 Tom Tromey <tom@tromey.com>
921
922 * ada-lang.c (catch_ada_exception_command): Constify.
923 (catch_assert_command): Constify.
924 * break-catch-throw.c (catch_catch_command, catch_throw_command)
925 (catch_rethrow_command): Constify.
926 (catch_exception_command_1): Constify.
927 * breakpoint.h (add_catch_command): Constify.
928 * break-catch-syscall.c (catch_syscall_command_1): Constify.
929 (catch_syscall_split_args): Constify.
930 * break-catch-sig.c (catch_signal_command): Constify.
931 (catch_signal_split_args): Constify.
932 * cli/cli-decode.h (struct cmd_list_element) <function>: Use
933 cmd_const_sfunc_ftype.
934 * cli/cli-decode.c (add_setshow_cmd_full): Constify.
935 (add_setshow_enum_cmd, add_setshow_auto_boolean_cmd)
936 (add_setshow_boolean_cmd, add_setshow_filename_cmd)
937 (add_setshow_string_cmd, struct cmd_list_element)
938 (add_setshow_optional_filename_cmd, add_setshow_integer_cmd)
939 (add_setshow_uinteger_cmd, add_setshow_zinteger_cmd)
940 (add_setshow_zuinteger_unlimited_cmd, add_setshow_zuinteger_cmd):
941 Constify.
942 (set_cmd_sfunc): Constify.
943 (empty_sfunc): Constify.
944 * command.h (add_setshow_enum_cmd, add_setshow_auto_boolean_cmd)
945 (add_setshow_boolean_cmd, add_setshow_filename_cmd)
946 (add_setshow_string_cmd, add_setshow_string_noescape_cmd)
947 (add_setshow_optional_filename_cmd, add_setshow_integer_cmd)
948 (add_setshow_uinteger_cmd, add_setshow_zinteger_cmd)
949 (add_setshow_zuinteger_cmd, add_setshow_zuinteger_unlimited_cmd):
950 Constify.
951 (set_cmd_sfunc): Constify.
952 (cmd_sfunc_ftype): Remove.
953 * compile/compile.c (set_compile_args): Constify.
954 * infrun.c (set_disable_randomization): Constify.
955 * infcmd.c (set_args_command, set_cwd_command): Constify.
956 * breakpoint.c (set_condition_evaluation_mode): Constify.
957 (add_catch_command): Constify.
958 (catch_fork_command_1, catch_exec_command_1)
959 (catch_load_command_1, catch_unload_command_1): Constify.
960 (catch_load_or_unload): Constify.
961 * guile/scm-param.c (pascm_set_func): Constify.
962 (add_setshow_generic): Constify.
963 * python/py-param.c (get_set_value): Constify.
964 * top.h (set_verbose): Constify.
965 * tui/tui-win.c (tui_set_var_cmd): Constify.
966 * mi/mi-main.c (set_mi_async_command): Constify.
967 * cli/cli-logging.c (set_logging_overwrite)
968 (set_logging_redirect): Constify.
969 * value.c (set_max_value_size): Constify.
970 * valprint.c (set_input_radix, set_output_radix): Constify.
971 * utils.c (set_width_command, set_height_command): Constify.
972 * typeprint.c (set_print_type_methods, set_print_type_typedefs): Constify.
973 * tracepoint.c (set_disconnected_tracing)
974 (set_circular_trace_buffer, set_trace_buffer_size)
975 (set_trace_user, set_trace_notes, set_trace_stop_notes): Constify.
976 * top.c (set_history_size_command, set_verbose, set_editing)
977 (set_gdb_datadir, set_history_filename): Constify.
978 * target.c (set_targetdebug, maint_set_target_async_command)
979 (maint_set_target_non_stop_command, set_target_permissions)
980 (set_write_memory_permission): Constify.
981 (open_target): Constify.
982 * target-descriptions.c (set_tdesc_filename_cmd): Constify.
983 * target-dcache.c (set_stack_cache, set_code_cache): Constify.
984 * symtab.c (set_symbol_cache_size_handler): Constify.
985 * symfile.c (set_ext_lang_command): Constify.
986 * symfile-debug.c (set_debug_symfile): Constify.
987 * source.c (set_directories_command): Constify.
988 * solib.c (reload_shared_libraries, gdb_sysroot_changed): Constify.
989 * serial.c (set_parity): Constify.
990 * rs6000-tdep.c (powerpc_set_soft_float, powerpc_set_vector_abi): Constify.
991 * remote.c (set_remote_exec_file, set_remotebreak)
992 (set_remote_protocol_Z_packet_cmd, set_range_stepping): Constify.
993 * record.c (set_record_insn_history_size)
994 (set_record_call_history_size): Constify.
995 * record-full.c (set_record_full_insn_max_num): Constify.
996 * proc-api.c (set_procfs_trace_cmd, set_procfs_file_cmd): Constify.
997 * osabi.c (set_osabi): Constify.
998 * mips-tdep.c (set_mips64_transfers_32bit_regs)
999 (reinit_frame_cache_sfunc, mips_abi_update): Constify.
1000 * maint.c (maintenance_set_profile_cmd): Constify.
1001 * linux-thread-db.c (set_libthread_db_search_path): Constify.
1002 * language.c (set_language_command, set_range_command)
1003 (set_case_command): Constify.
1004 * infrun.c (set_non_stop, set_observer_mode)
1005 (set_stop_on_solib_events, set_schedlock_func)
1006 (set_exec_direction_func): Constify.
1007 * infcmd.c (set_inferior_tty_command): Constify.
1008 * disasm.c (set_disassembler_options_sfunc): Constify.
1009 * demangle.c (set_demangling_command): Constify.
1010 * dcache.c (set_dcache_size, set_dcache_line_size): Constify.
1011 * cris-tdep.c (set_cris_version, set_cris_mode)
1012 (set_cris_dwarf2_cfi): Constify.
1013 * corefile.c (set_gnutarget_command): Constify.
1014 * charset.c (set_host_charset_sfunc, set_target_charset_sfunc)
1015 (set_target_wide_charset_sfunc): Constify.
1016 * breakpoint.c (update_dprintf_commands): Constify.
1017 * auto-load.c (set_auto_load_dir, set_auto_load_safe_path): Constify.
1018 * arm-tdep.c (set_fp_model_sfunc, arm_set_abi)
1019 (set_disassembly_style_sfunc): Constify.
1020 * arch-utils.c (set_endian, set_architecture): Constify.
1021 * alpha-tdep.c (reinit_frame_cache_sfunc): Constify.
1022 * agent.c (set_can_use_agent): Constify.
1023
1024 2017-11-07 Tom Tromey <tom@tromey.com>
1025
1026 * go32-nat.c (go32_sysinfo, go32_sldt, go32_sgdt, go32_sidt)
1027 (go32_pde, go32_pte, go32_pte_for_address): Constify.
1028 * gnu-nat.c (_parse_bool_arg, show_thread_default_pause_cmd)
1029 (set_thread_default_pause_cmd, set_thread_default_run_cmd)
1030 (show_thread_default_run_cmd, set_thread_default_detach_sc_cmd)
1031 (parse_int_arg, show_thread_default_detach_sc_cmd)
1032 (set_signals_cmd, show_signals_cmd, set_sig_thread_cmd)
1033 (show_sig_thread_cmd, set_stopped_cmd, show_stopped_cmd)
1034 (set_exceptions_cmd, show_exceptions_cmd, set_task_pause_cmd)
1035 (show_task_pause_cmd, set_task_detach_sc_cmd)
1036 (show_task_detach_sc_cmd, set_task_exc_port_cmd)
1037 (set_noninvasive_cmd, set_thread_pause_cmd)
1038 (show_thread_pause_cmd, set_thread_run_cmd, show_thread_run_cmd)
1039 (set_thread_detach_sc_cmd, show_thread_detach_sc_cmd)
1040 (set_thread_exc_port_cmd, thread_takeover_sc_cmd): Constify.
1041 * windows-nat.c (display_selectors): Constify.
1042 * cli/cli-decode.h (struct cmd_list_element) <function>: Remove
1043 non-const "cfunc".
1044 * cli/cli-decode.c (set_cmd_cfunc): Remove non-const overload.
1045 (cmd_cfunc_eq): Likewise.
1046 (struct cmd_list_element): Likewise.
1047 (do_cfunc): Remove.
1048 (cli_user_command_p): Update.
1049 * command.h (add_cmd): Remove non-const overload.
1050 (cmd_cfunc_ftype): Remove typedef.
1051 (cmd_cfunc_eq): Remove non-const overload.
1052 * value.c (show_values): Constify.
1053 * thread.c (thread_apply_all_command): Constify.
1054 * symfile.c (load_command): Constify.
1055 * source.c (directory_command): Constify.
1056 * maint.c (maintenance_internal_error)
1057 (maintenance_demangler_warning, maintenance_space_display)
1058 (maintenance_print_architecture, maintenance_translate_address)
1059 (maintenance_info_selftests, maintenance_internal_warning):
1060 Constify.
1061 * breakpoint.c (disable_trace_command, enable_trace_command):
1062 Constify.
1063 * auto-load.c (info_auto_load_local_gdbinit, add_auto_load_dir):
1064 Constify.
1065 (add_auto_load_safe_path): Constify.
1066 * guile/scm-auto-load.c (info_auto_load_guile_scripts): Constify.
1067 * top.h (show_commands): Constify.
1068 * linux-thread-db.c (info_auto_load_libthread_db): Constify.
1069 * sparc64-tdep.c (adi_examine_command): Constify.
1070 (adi_assign_command): Constify.
1071
1072 2017-11-07 Tom Tromey <tom@tromey.com>
1073
1074 * frame.h (info_locals_command, info_args_command): Constify.
1075 * auto-load.h (auto_load_info_scripts): Constify.
1076 * inferior.h (registers_info): Constify.
1077 * copying.c: Rebuild.
1078 * copying.awk: Constify generated commands.
1079 * auto-load.c (auto_load_info_scripts)
1080 (info_auto_load_gdb_scripts): Constify.
1081 * cli/cli-decode.c (struct cmd_list_element): Take a
1082 cmd_const_cfunc_ftype.
1083 * command.h (add_info): Take a cmd_const_cfunc_ftype.
1084 * tui/tui-win.c (tui_all_windows_info): Constify.
1085 * python/py-auto-load.c (info_auto_load_python_scripts):
1086 Constify.
1087 * cli/cli-cmds.c (show_command): Remove non-const overload.
1088 * tracepoint.c (info_tvariables_command, info_scope_command):
1089 Constify.
1090 (info_static_tracepoint_markers_command): Constify.
1091 * thread.c (info_threads_command): Constify.
1092 (print_thread_info_1): Constify.
1093 * target.c (info_target_command): Constify.
1094 * symtab.c (info_sources_command, info_functions_command)
1095 (info_types_command): Constify.
1096 (info_variables_command): Remove non-const overload.
1097 * symfile.c (info_ext_lang_command): Constify.
1098 * stack.c (info_frame_command, info_locals_command)
1099 (info_args_command): Constify.
1100 (backtrace_command): Remove non-const overload.
1101 * source.c (info_source_command, info_line_command): Constify.
1102 * solib.c (info_sharedlibrary_command): Constify.
1103 * skip.c (info_skip_command): Constify.
1104 * ser-go32.c (info_serial_command): Constify.
1105 * reverse.c (info_bookmarks_command): Constify.
1106 * printcmd.c (info_symbol_command, info_address_command)
1107 (info_display_command): Constify.
1108 * osdata.c (info_osdata_command): Constify.
1109 * objc-lang.c (info_selectors_command, info_classes_command):
1110 Constify.
1111 * nto-procfs.c (procfs_pidlist, procfs_meminfo): Constify.
1112 * memattr.c (info_mem_command): Constify.
1113 * macrocmd.c (info_macro_command, info_macros_command): Constify.
1114 * linux-fork.c (info_checkpoints_command): Constify.
1115 * infrun.c (info_signals_command): Constify.
1116 * inflow.c (info_terminal_command): Constify.
1117 * inferior.c (info_inferiors_command): Constify.
1118 (print_inferior): Constify.
1119 * infcmd.c (info_program_command, info_all_registers_command)
1120 (info_registers_command, info_vector_command)
1121 (info_float_command): Constify.
1122 (registers_info): Constify.
1123 * gnu-nat.c (info_send_rights_cmd, info_recv_rights_cmd)
1124 (info_port_sets_cmd, info_dead_names_cmd, info_port_rights_cmd):
1125 Constify.
1126 * f-valprint.c (info_common_command): Constify.
1127 * dcache.c (info_dcache_command): Constify.
1128 (dcache_info_1): Constify.
1129 * darwin-nat-info.c (info_mach_tasks_command)
1130 (info_mach_task_command, info_mach_ports_command)
1131 (info_mach_port_command, info_mach_threads_command)
1132 (info_mach_thread_command, info_mach_regions_command)
1133 (info_mach_regions_recurse_command, info_mach_region_command)
1134 (info_mach_exceptions_command): Constify.
1135 (get_task_from_args): Constify.
1136 * cp-support.c (info_vtbl_command): Constify.
1137 * breakpoint.c (info_watchpoints_command)
1138 (info_tracepoints_command): Constify.
1139 (info_breakpoints_command): Remove non-const overload.
1140 * avr-tdep.c (avr_io_reg_read_command): Constify.
1141 * auxv.c (info_auxv_command): Constify.
1142 * ada-tasks.c (info_tasks_command): Constify.
1143 (info_task): Constify.
1144 * ada-lang.c (info_exceptions_command): Constify.
1145
1146 2017-11-07 Tom Tromey <tom@tromey.com>
1147
1148 * solib.h (no_shared_libraries): Constify.
1149 * frame.h (return_command): Constify.
1150 * cli/cli-cmds.h (quit_command): Constify.
1151 * top.h (quit_command, execute_command): Constify.
1152 * target.h (flash_erase_command): Constify.
1153 * inferior.h (set_inferior_args, attach_command): Constify.
1154 * tracepoint.h (start_tracing, stop_tracing): Constify.
1155 * breakpoint.h (break_command, tbreak_command)
1156 (hbreak_command_wrapper, thbreak_command_wrapper)
1157 (rbreak_command_wrapper, watch_command_wrapper)
1158 (awatch_command_wrapper, rwatch_command_wrapper)
1159 (get_tracepoint_by_number): Constify.
1160 * symtab.c (info_variables_command, rbreak_command)
1161 (symtab_symbol_info): Constify.
1162 (info_variables_command): Add non-const overload.
1163 * top.c (dont_repeat_command): Constify.
1164 * breakpoint.c (ignore_command, commands_command)
1165 (condition_command, tbreak_command, hbreak_command)
1166 (thbreak_command, clear_command, break_command)
1167 (info_breakpoints_command, watch_command, rwatch_command)
1168 (awatch_command, trace_command, ftrace_command, strace_command)
1169 (trace_pass_command, break_range_command, dprintf_command)
1170 (agent_printf_command, get_tracepoint_by_number)
1171 (watch_maybe_just_location, trace_pass_command): Constify.
1172 (info_breakpoints_command): Add non-const overload.
1173 * tracefile.c (tsave_command): Constify.
1174 * infcmd.c (attach_command, disconnect_command, signal_command)
1175 (queue_signal_command, stepi_command, nexti_command)
1176 (finish_command, next_command, step_command, until_command)
1177 (advance_command, jump_command, continue_command, run_command)
1178 (start_command, starti_command, interrupt_command)
1179 (run_command_1, set_inferior_args, step_1): Constify.
1180 * inferior.c (add_inferior_command, remove_inferior_command)
1181 (clone_inferior_command): Constify.
1182 * linux-fork.c (checkpoint_command, restart_command): Constify.
1183 * windows-nat.c (signal_event_command): Constify.
1184 * guile/guile.c (guile_repl_command, guile_command): Constify.
1185 * printcmd.c (x_command, display_command, printf_command)
1186 (output_command, set_command, call_command, print_command)
1187 (eval_command): Constify.
1188 (non_const_set_command): Remove.
1189 (_initialize_printcmd): Update.
1190 * source.c (forward_search_command, reverse_search_command):
1191 Constify.
1192 * jit.c (jit_reader_load_command, jit_reader_unload_command):
1193 Constify.
1194 * infrun.c (handle_command): Constify.
1195 * memattr.c (mem_command): Constify.
1196 * stack.c (return_command, up_command, up_silently_command)
1197 (down_command, down_silently_command, frame_command)
1198 (backtrace_command, func_command, backtrace_command_1): Constify.
1199 (backtrace_command): Add non-const overload.
1200 * remote-sim.c (simulator_command): Constify.
1201 * exec.c (set_section_command): Constify.
1202 * tracepoint.c (tdump_command, trace_variable_command)
1203 (tstatus_command, tstop_command, tstart_command)
1204 (end_actions_pseudocommand, while_stepping_pseudocommand)
1205 (collect_pseudocommand, teval_pseudocommand, actions_command)
1206 (start_tracing, stop_tracing): Constify.
1207 * value.c (init_if_undefined_command): Constify.
1208 * tui/tui-stack.c (tui_update_command): Constify.
1209 * tui/tui-win.c (tui_refresh_all_command)
1210 (tui_set_tab_width_command, tui_set_win_height_command)
1211 (tui_set_focus_command, tui_scroll_forward_command)
1212 (tui_scroll_backward_command, tui_scroll_left_command)
1213 (tui_scroll_right_command, parse_scrolling_args, tui_set_focus)
1214 (tui_set_win_height): Constify.
1215 * tui/tui-layout.c (tui_layout_command): Constify.
1216 * procfs.c (proc_trace_syscalls, proc_trace_sysentry_cmd)
1217 (proc_trace_sysexit_cmd, proc_untrace_sysentry_cmd)
1218 (proc_untrace_sysexit_cmd): Constify.
1219 * remote.c (threadlist_test_cmd, threadinfo_test_cmd)
1220 (threadset_test_cmd, threadlist_update_test_cmd)
1221 (threadalive_test): Constify.
1222 * objc-lang.c (print_object_command): Constify.
1223 * command.h (add_com): Constify.
1224 * cli/cli-dump.c (restore_command): Constify.
1225 * cli/cli-cmds.c (pwd_command, echo_command, quit_command)
1226 (help_command, complete_command, shell_command, edit_command)
1227 (list_command, disassemble_command, make_command)
1228 (apropos_command, alias_command): Constify.
1229 * cli/cli-script.c (document_command, define_command)
1230 (while_command, if_command, validate_comname): Constify.
1231 * cli/cli-decode.c (struct cmd_list_element): Change type of
1232 "fun".
1233 * target.c (do_monitor_command, flash_erase_command): Constify.
1234 * regcache.c (reg_flush_command): Constify.
1235 * reverse.c (reverse_step, reverse_next, reverse_stepi)
1236 (reverse_nexti, reverse_continue, reverse_finish)
1237 (save_bookmark_command, goto_bookmark_command)
1238 (exec_reverse_once): Constify.
1239 * python/python.c (python_interactive_command, python_command):
1240 Constify.
1241 * typeprint.c (ptype_command, whatis_command, whatis_exp):
1242 Constify.
1243 * solib.c (sharedlibrary_command, no_shared_libraries): Constify.
1244 * gcore.c (gcore_command): Constify.
1245
1246 2017-11-07 Tom Tromey <tom@tromey.com>
1247
1248 * printcmd.c (x_command): Call set_repeat_arguments.
1249 * cli/cli-cmds.c (list_command): Call set_repeat_arguments.
1250 * top.c (repeat_arguments): New global.
1251 (set_repeat_arguments): New function.
1252 (execute_command): Handle repeat_arguments.
1253 (show_commands): Calls set_repeat_arguments.
1254 * command.h (set_repeat_arguments): Declare.
1255
1256 2017-11-07 Tom Tromey <tom@tromey.com>
1257
1258 * stack.c (backtrace_command): Use std::string.
1259 (backtrace_command_1): Make "count_exp" const.
1260
1261 2017-11-07 Tom Tromey <tom@tromey.com>
1262
1263 * source.c (directory_switch, mod_path, add_path): Constify.
1264 * defs.h (add_path, mod_path, directory_switch): Constify.
1265 * mi/mi-cmd-env.c (env_mod_path): Constify.
1266
1267 2017-11-07 Tom Tromey <tom@tromey.com>
1268
1269 * infcmd.c (strip_bg_char): Return gdb::unique_xmalloc_ptr.
1270 (run_command_1, continue_command, step_1, jump_command)
1271 (signal_command, until_command, advance_command, finish_command)
1272 (attach_command): Update.
1273
1274 2017-11-07 Tom Tromey <tom@tromey.com>
1275
1276 * command.h (set_cmd_cfunc): Don't declare.
1277 * cli/cli-decode.c (set_cmd_cfunc): Now static.
1278
1279 2017-11-07 Tom Tromey <tom@tromey.com>
1280
1281 * stack.c (select_frame_command): Constify.
1282 * cli/cli-decode.c (add_com_suppress_notification): Constify.
1283 * command.h (add_com_suppress_notification): Constify.
1284
1285 2017-11-07 Tom Tromey <tom@tromey.com>
1286
1287 * breakpoint.c (stop_command): Constify.
1288 * cli/cli-decode.c (struct cmd_list_element): Constify.
1289 * command.h (add_abbrev_prefix_cmd): Constify.
1290
1291 2017-11-07 Pedro Alves <palves@redhat.com>
1292
1293 * breakpoint.c (extract_bp_kind): New enum.
1294 (extract_bp_num, extract_bp_or_bp_range): New functions, partially
1295 factored out from ...
1296 (extract_bp_number_and_location): ... here.
1297 * cli/cli-utils.c (get_number_trailer): Handle '-$variable'.
1298
1299 2017-11-07 Pedro Alves <palves@redhat.com>
1300
1301 * breakpoint.c (extract_bp_number_and_location): Change return
1302 type to void. Throw error instead of warning.
1303 (enable_disable_command): Adjust.
1304
1305 2017-11-07 Xavier Roirand <roirand@adacore.com>
1306 Pedro Alves <palves@redhat.com>
1307
1308 * breakpoint.c (map_breakpoint_number_range): New, factored out
1309 from ...
1310 (map_breakpoint_numbers): ... here.
1311 (find_location_by_number): Change parameters from string to
1312 breakpoint number and location.
1313 (extract_bp_number_and_location): New function.
1314 (enable_disable_bp_num_loc)
1315 (enable_disable_breakpoint_location_range)
1316 (enable_disable_command): New functions, factored out ...
1317 (enable_command, disable_command): ... these functions, and
1318 adjusted to support ranges.
1319 * NEWS: Document enable/disable breakpoint location range feature.
1320
1321 2017-11-06 Luis Machado <luis.machado@linaro.org>
1322
1323 * MAINTAINERS (Write After Approval): Update my e-mail address.
1324
1325 2017-11-06 Pedro Alves <palves@redhat.com>
1326
1327 * gnu-nat.c (gnu_terminal_init): Delete.
1328 (gnu_target): Don't install gnu_terminal_init.
1329 * inflow.c (child_terminal_init_with_pgrp): Delete, merged with ...
1330 (child_terminal_init): ... this function.
1331
1332 2017-11-06 Pedro Alves <palves@redhat.com>
1333
1334 * common/common.m4 (GDB_AC_COMMON): No longer check termio.h nor
1335 sgtty.h.
1336 * config.in, configure: Regenerate.
1337
1338 2017-11-06 Pedro Alves <palves@redhat.com>
1339
1340 * event-top.c: Check SIGTSTP instead of STOP_SIGNAL thoughout.
1341 (async_init_signals): Adjust.
1342 (handle_stop_sig): Rename to ...
1343 (handle_sigtstp): ... this.
1344 (async_stop_sig): Rename to ...
1345 (async_sigtstp_handler): ... this, and delete STOP_SIGNAL !=
1346 SIGTSTP path.
1347 * event-top.h: Move signal.h include to the top. Check SIGTSTP
1348 instead of STOP_SIGNAL thoughout.
1349 (handle_stop_sig): Rename to ...
1350 (handle_sigtstp): ... this.
1351 * top.c (command_line_input): Replace STOP_SIGNAL -> SIGTSTP.
1352
1353 2017-11-06 Pedro Alves <palves@redhat.com>
1354
1355 * inflow.c (child_terminal_inferior, child_terminal_ours_1): No
1356 longer set flags twice in row.
1357
1358 2017-11-06 Pedro Alves <palves@redhat.com>
1359
1360 * Makefile.in (SER_HARDWIRE): Update comment.
1361 (HFILES_NO_SRCDIR): Remove gdb_termios.h.
1362 * common/gdb_termios.h: Delete file.
1363 * common/job-control.c: Include termios.h and unistd.h instead of
1364 gdb_termios.h.
1365 (gdb_setpgid): Remove HAVE_TERMIOS || TIOCGPGRP preprocessor
1366 check.
1367 (have_job_control): Check HAVE_TERMIOS_H instead of HAVE_TERMIOS.
1368 Remove sgtty code.
1369 * configure.ac: No longer check for termio.h and sgtty.h.
1370 * configure: Regenerate.
1371 * inflow.c: Include termios.h instead of gdb_termios.h. Replace
1372 PROCESS_GROUP_TYPE checks with HAVE_TERMIOS_H checks throughout.
1373 Replace PROCESS_GROUP_TYPE references with pid_t references
1374 throughout.
1375 (gdb_getpgrp): Delete.
1376 (set_initial_gdb_ttystate): Use tcgetpgrp instead of gdb_getpgrp.
1377 (child_terminal_inferior): Remove comment. Remove sgtty code.
1378 (child_terminal_ours_1): Use tcgetpgrp directly instead of
1379 gdb_getpgrp. Use serial_set_tty_state instead aof
1380 serial_noflush_set_tty_state. Remove sgtty code.
1381 * inflow.h: Include unistd.h instead of gdb_termios.h. Replace
1382 PROCESS_GROUP_TYPE check with HAVE_TERMIOS_H check.
1383 (inferior_process_group): Now returns pid_t.
1384 * ser-base.c (ser_base_noflush_set_tty_state): Delete.
1385 * ser-base.h (ser_base_noflush_set_tty_state): Delete.
1386 * ser-event.c (serial_event_ops): Update.
1387 * ser-go32.c (dos_noflush_set_tty_state): Delete.
1388 (dos_ops): Update.
1389 * ser-mingw.c (hardwire_ops, tty_ops, pipe_ops, tcp_ops): Update.
1390 * ser-pipe.c (pipe_ops): Update.
1391 * ser-tcp.c (tcp_ops): Update.
1392 * ser-unix.c: Include termios.h instead of gdb_termios.h. Remove
1393 HAVE_TERMIOS checks.
1394 [HAVE_TERMIO] (struct hardwire_ttystate): Delete.
1395 [HAVE_SGTTY] (struct hardwire_ttystate): Delete.
1396 (get_tty_state, set_tty_state): Drop termio and sgtty code, and
1397 assume termios.
1398 (hardwire_noflush_set_tty_state): Delete.
1399 (hardwire_print_tty_state, hardwire_drain_output)
1400 (hardwire_flush_output, hardwire_flush_input)
1401 (hardwire_send_break, hardwire_raw, hardwire_setbaudrate)
1402 (hardwire_setstopbits, hardwire_setparity): Drop termio and sgtty
1403 code, and assume termios.
1404 (hardwire_ops): Update.
1405 (_initialize_ser_hardwire): Remove HAVE_TERMIOS check.
1406 * serial.c (serial_noflush_set_tty_state): Delete.
1407 * serial.h (serial_noflush_set_tty_state): Delete.
1408 (serial_ops::noflush_set_tty_state): Delete.
1409
1410 2017-11-06 Ulrich Weigand <uweigand@de.ibm.com>
1411
1412 * Makefile.in (SFILES): Remove doublest.c and dfp.c.
1413 (HFILES_NO_SRCDIR): Remove doublest.h and dfp.h.
1414 (COMMON_OBS): Remove doublest.o and dfp.o.
1415 Do not build target-float.c (instead of doublest.c)
1416 with -Wformat-nonliteral.
1417
1418 * doublest.c: Remove file.
1419 * doublest.h: Remove file.
1420 * dfp.c: Remove file.
1421 * dfp.h: Remove file.
1422
1423 * target-float.c: Do not include "doublest.h" and "dfp.h".
1424 (DOUBLEST): Move here from doublest.h.
1425 (enum float_kind): Likewise.
1426 (FLOATFORMAT_CHAR_BIT): Likewise.
1427 (FLOATFORMAT_LARGEST_BYTES): Likewise.
1428 (floatformat_totalsize_bytes): Move here from doublest.c. Make static.
1429 (floatformat_precision): Likewise.
1430 (floatformat_normalize_byteorder, get_field, put_field): Likewise.
1431 (floatformat_is_negative, floatformat_classify, floatformat_mantissa):
1432 Likewise.
1433 (host_float_format, host_double_format, host_long_double_format):
1434 Likewise.
1435 (floatformat_to_string, floatformat_from_string): Likewise.
1436 (floatformat_to_doublest): Likewise. Also, inline the original
1437 convert_floatformat_to_doublest.
1438 (floatformat_from_doublest): Likewise. Also, inline the original
1439 convert_floatformat_from_doublest.
1440
1441 Include "dpd/decimal128.h", "dpd/decimal64.h", and "dpd/decimal32.h".
1442 (MAX_DECIMAL_STRING): Move here from dfp.c.
1443 (match_endianness): Likewise.
1444 (set_decnumber_context, decimal_check_errors): Likewise.
1445 (decimal_from_number, decimal_to_number): Likewise.
1446 (decimal_to_string, decimal_from_string): Likewise. Make static.
1447 (decimal_from_longest, decimal_from_ulongest): Likewise.
1448 (decimal_to_longest): Likewise.
1449 (decimal_binop, decimal_is_zero, decimal_compare): Likewise.
1450 (decimal_convert): Likewise.
1451
1452 2017-11-06 Ulrich Weigand <uweigand@de.ibm.com>
1453
1454 * doublest.c: Do not include "gdbtypes.h".
1455 (extract_typed_floating): Remove.
1456 (store_typed_floating): Remove.
1457 (convert_typed_floating): Remove.
1458 * doublest.h (struct type): Remove.
1459 (DOUBLEST_PRINT_FORMAT): Remove.
1460 (DOUBLEST_SCAN_FORMAT): Remove.
1461 (extract_typed_floating): Remove.
1462 (store_typed_floating): Remove.
1463 (convert_typed_floating): Remove.
1464
1465 * dfp.c (decimal_from_doublest): Remove.
1466 (decimal_to_doublest): Remove.
1467 * dfp.h: Do not include "doublest.h".
1468 (decimal_from_doublest): Remove.
1469 (decimal_to_doublest): Remove.
1470
1471 * value.c: Do not include "doublest.h" and "dfp.h".
1472 (value_as_double): Remove.
1473 (unpack_double): Remove.
1474 (value_from_double): Remove.
1475 (value_from_decfloat): Remove.
1476 * value.h: Do not include "doublest.h".
1477 (value_as_double): Remove.
1478 (unpack_double): Remove.
1479 (value_from_double): Remove.
1480 (value_from_decfloat): Remove.
1481
1482 2017-11-06 Ulrich Weigand <uweigand@de.ibm.com>
1483
1484 * i386-tdep.c: Include "target-float.h". Do not include "doublest.h".
1485 (i386_extract_return_value): Use target_float_convert.
1486 (i386_store_return_value): Likewise.
1487 * i387-tdep.c (i387_register_to_value): Use target_float_convert.
1488 (i387_value_to_register): Likewise.
1489 * ia64-tdep.c: Include "target-float.h". Do not include "doublest.h".
1490 (ia64_register_to_value): Use target_float_convert.
1491 (ia64_value_to_register): Likewise.
1492 (ia64_extract_return_value): Likewise.
1493 (ia64_store_return_value): Likewise.
1494 (ia64_push_dummy_call): Likewise.
1495 * m68k-tdep.c: Include "target-float.h".
1496 (m68k_register_to_value): Use target_float_convert.
1497 (m68k_value_to_register): Likewise.
1498 (m68k_svr4_extract_return_value): Likewise.
1499 (m68k_svr4_store_return_value): Likewise.
1500 * ppc-sysv-tdep.c: Include "target-float.h".
1501 (ppc_sysv_abi_push_dummy_call): Use target_float_convert.
1502 (do_ppc_sysv_return_value): Likewise.
1503 (ppc64_sysv_abi_push_freg): Likewise.
1504 (ppc64_sysv_abi_return_value_base): Likewise.
1505 * rs6000-aix-tdep.c: Include "target-float.h".
1506 (rs6000_push_dummy_call): Use target_float_convert.
1507 (rs6000_return_value): Likewise.
1508 * rs6000-lynx178-tdep.c: Include "target-float.h".
1509 (rs6000_lynx178_push_dummy_call): Use target_float_convert.
1510 (rs6000_lynx178_return_value): Likewise.
1511 * rs6000-tdep.c: Include "target-float.h". Do not include "doublest.h".
1512 (rs6000_register_to_value): Use target_float_convert.
1513 (rs6000_value_to_register): Likewise.
1514 * arm-tdep.c: Include "target-float.h". Do not include "doublest.h".
1515 (arm_extract_return_value): Use target_float_convert.
1516 (arm_store_return_value): Likewise.
1517 * sh-tdep.c: Include "target-float.h". Do not include "doublest.h".
1518 (sh_register_convert_to_virtual): Use target_float_convert.
1519 (sh_register_convert_to_raw): Likewise.
1520 * sh64-tdep.c: Include "target-float.h".
1521 (sh64_extract_return_value): Use target_float_convert.
1522 (sh64_register_convert_to_virtual): Likewise.
1523 (sh64_register_convert_to_raw): Likewise. Fix argument types.
1524
1525 2017-11-06 Ulrich Weigand <uweigand@de.ibm.com>
1526
1527 * target-float.c (floatformat_to_host_double): New function.
1528 (floatformat_from_host_double): Likewise.
1529 (target_float_to_host_double): Likewise.
1530 (target_float_from_host_double): Likewise.
1531 * target-float.h (target_float_to_host_double): Add prototype.
1532 (target_float_from_host_double): Likewise.
1533
1534 * guile/scm-value.c: Include "target-float.h".
1535 (gdbscm_value_to_real): Use target_float_to_host_double.
1536 Handle integer source values via value_as_long.
1537 * guile/scm-math.c: Include "target-float.h". Do not include
1538 "doublest.h", "dfp.h", and "expression.h".
1539 (vlscm_convert_typed_number): Use target_float_from_host_double.
1540 (vlscm_convert_number): Likewise.
1541
1542 * python/py-value.c (valpy_float): Use target_float_to_host_double.
1543 (convert_value_from_python): Use target_float_from_host_double.
1544
1545 2017-11-06 Ulrich Weigand <uweigand@de.ibm.com>
1546
1547 * ada-lang.c (cast_to_fixed): Reimplement in target arithmetic.
1548 (cast_from_fixed): Likewise.
1549 (ada_scaling_type): New function.
1550 (ada_delta): Return value instead of DOUBLEST. Perform target
1551 arithmetic instead of host arithmetic.
1552 (scaling_factor): Rename to ...
1553 (ada_scaling_factor) ... this. Make non-static. Return value instead
1554 of DOUBLEST. Perform target arithmetic instead of host arithmetic.
1555 (ada_fixed_to_float): Remove.
1556 (ada_float_to_fixed): Remove.
1557 * ada-lang.h (ada_fixed_to_float): Remove.
1558 (ada_float_to_fixed): Remove.
1559 (ada_delta): Return value instead of DOUBLEST.
1560 (ada_scaling_factor): Add prototype.
1561
1562 * ada-typeprint.c: Include "target-float.h".
1563 (print_fixed_point_type): Perform target arithmetic instead of
1564 host arithmetic.
1565 * ada-valprint.c: Include "target-float.h".
1566 (ada_val_print_num): Perform target arithmetic instead of
1567 host arithmetic for fixed-point types.
1568
1569 2017-11-06 Ulrich Weigand <uweigand@de.ibm.com>
1570
1571 * target-float.c: Include <math.h>.
1572 (floatformat_binop): New function.
1573 (floatformat_compare): Likewise.
1574 (target_float_binop): Likewise.
1575 (target_float_compare): Likewise.
1576 * target-float.h: Include "expression.h".
1577 (target_float_binop): Add prototype.
1578 (target_float_compare): Likewise.
1579
1580 * valarith.c: Do not include "doublest.h" and "dfp.h".
1581 Include "common/byte-vector.h".
1582 (value_args_as_decimal): Remove, replace by ...
1583 (value_args_as_target_float): ... this function. Handle both
1584 binary and decimal target floating-point formats.
1585 (scalar_binop): Handle both binary and decimal FP using
1586 value_args_as_target_float and target_float_binop.
1587 (value_equal): Handle both binary and decimal FP using
1588 value_args_as_target_float and target_float_compare.
1589 (value_less): Likewise.
1590 (value_pos): Handle all scalar types as simple copy.
1591 (value_neg): Handle all scalar types via BINOP_SUB from 0.
1592 * dfp.c (decimal_binop): Throw error instead of internal_error
1593 when called with an unsupported operation code.
1594
1595 2017-11-06 Ulrich Weigand <uweigand@de.ibm.com>
1596
1597 * target-float.c (target_float_to_string): New function.
1598 (target_float_from_string): New function.
1599 * target-float.h (target_float_to_string): Add prototype.
1600 (target_float_from_string): Add prototype.
1601
1602 * valprint.c: Include "target-float.h". Do not include
1603 "doublest.h" and "dfp.h".
1604 (print_floating): Use target_float_to_string.
1605 * printcmd.c: Include "target-float.h". Do not include "dfp.h".
1606 (printf_floating): Use target_float_to_string.
1607 * i387-tdep.c: Include "target-float.h". Do not include "doublest.h".
1608 (print_i387_value): Use target_float_to_string.
1609 * mips-tdep.c: Include "target-float.h".
1610 (mips_print_fp_register): Use target_float_to_string.
1611 * sh64-tdep.c: Include "target-float.h".
1612 (sh64_do_fp_register): Use target_float_to_string.
1613
1614 * parse.c: Include "target-float.h". Do not include
1615 "doublest.h" and "dfp.h".
1616 (parse_float): Use target_float_from_string.
1617 * stabsread.c: Include "target-float.h". Do not include "doublest.h".
1618 (define_symbol): Use target_float_from_string.
1619 * gdbarch-selftests.c: Include "target-float.h".
1620 (register_to_value_test): Use target_float_from_string.
1621
1622 2017-11-06 Ulrich Weigand <uweigand@de.ibm.com>
1623
1624 * Makefile.c (SFILES): Add target-float.c.
1625 (HFILES_NO_SRCDIR): Add target-float.h.
1626 (COMMON_OBS): Add target-float.o.
1627 * target-float.h: New file.
1628 * target-float.c: New file.
1629
1630 * doublest.c (floatformat_classify): Fix detection of float_zero.
1631
1632 * gdbtypes.c (is_floating_type): New function.
1633 * gdbtypes.h (is_floating_type): Add prototype.
1634
1635 * value.c: Do not include "floatformat.h".
1636 (unpack_double): Use target_float_is_valid.
1637 (is_floating_value): New function.
1638 * value.h (is_floating_value): Add prototype-
1639
1640 * valarith.c: Include "target-float.h".
1641 (value_logical_not): Use target_float_is_zero.
1642
1643 * python/py-value.c: Include "target-float.h".
1644 (valpy_nonzero): Use target_float_is_zero.
1645
1646 2017-11-04 Tom Tromey <tom@tromey.com>
1647
1648 * h8300-tdep.c (h8300_push_dummy_call): Use std::vector.
1649
1650 2017-11-04 Tom Tromey <tom@tromey.com>
1651
1652 * breakpoint.c (set_momentary_breakpoint): Return
1653 breakpoint_up.
1654 (until_break_command): Update.
1655 (new_until_break_fsm): Change argument types to
1656 breakpoint_up.
1657 (set_momentary_breakpoint_at_pc): Return breakpoint_up.
1658 (do_delete_breakpoint_cleanup, make_cleanup_delete_breakpoint):
1659 Remove.
1660 * infcmd.c (finish_forward): Update.
1661 * breakpoint.h (set_momentary_breakpoint)
1662 (set_momentary_breakpoint_at_pc): Return breakpoint_up.
1663 (make_cleanup_delete_breakpoint): Remove.
1664 (struct breakpoint_deleter): New.
1665 (breakpoint_up): New typedef.
1666 * infrun.c (insert_step_resume_breakpoint_at_sal_1): Update.
1667 (insert_exception_resume_breakpoint): Update.
1668 (insert_exception_resume_from_probe): Update.
1669 (insert_longjmp_resume_breakpoint): Update.
1670 * arm-linux-tdep.c (arm_linux_copy_svc): Update.
1671 * elfread.c (elf_gnu_ifunc_resolver_stop): Update.
1672 * infcall.c (call_function_by_hand_dummy): Update
1673
1674 2017-11-04 Tom Tromey <tom@tromey.com>
1675
1676 * c-typeprint.c (c_type_print_base): Use gdb::unique_xmalloc_ptr.
1677
1678 2017-11-04 Tom Tromey <tom@tromey.com>
1679
1680 * linux-tdep.c (linux_core_info_proc_mappings): Use
1681 gdb::def_vector.
1682 (linux_get_siginfo_data): Return gdb::byte_vector. Remove
1683 "size" argument.
1684 (linux_corefile_thread): Update.
1685 (linux_make_corefile_notes): Remove unused variable.
1686
1687 2017-11-04 Tom Tromey <tom@tromey.com>
1688
1689 * ppc-linux-tdep.c (ppc_linux_get_syscall_number): Use
1690 gdb::byte_vector.
1691
1692 2017-11-04 Tom Tromey <tom@tromey.com>
1693
1694 * objfiles.c (do_free_objfile_cleanup): Remove.
1695 * compile/compile-object-load.c (compile_object_load): Update.
1696 * objfiles.h (make_cleanup_free_objfile): Remove.
1697
1698 2017-11-04 Tom Tromey <tom@tromey.com>
1699
1700 * sparc64-tdep.c (do_examine): Use gdb::def_vector.
1701 (adi_read_versions): Change "tags" to "gdb_byte *".
1702 (adi_print_versions): Likewise.
1703
1704 2017-11-04 Tom Tromey <tom@tromey.com>
1705
1706 * breakpoint.c
1707 (scoped_rbreak_breakpoints::scoped_rbreak_breakpoints): Rename
1708 from start_rbreak_breakpoints.
1709 (scoped_rbreak_breakpoints): Rename from end_rbreak_breakpoints.
1710 * breakpoint.h (class scoped_rbreak_breakpoints): New.
1711 (start_rbreak_breakpoints, end_rbreak_breakpoints): Remove.
1712 * symtab.c (do_end_rbreak_breakpoints): Remove.
1713 (rbreak_command): Use scoped_rbreak_breakpoints, std::string.
1714
1715 2017-11-04 Tom Tromey <tom@tromey.com>
1716
1717 * cp-namespace.c (reset_directive_searched): Remove.
1718 (cp_lookup_symbol_via_imports): Use scoped_restore.
1719 * cp-support.c (reset_directive_searched): Remove.
1720 (make_symbol_overload_list_using): Use scoped_restore.
1721 * d-namespace.c (d_lookup_symbol_imports): Use scoped_restore.
1722 (reset_directive_searched): Remove.
1723
1724 2017-11-04 Tom Tromey <tom@tromey.com>
1725
1726 * symfile.c (find_separate_debug_file_by_debuglink): Use
1727 unique_xmalloc_ptr.
1728
1729 2017-11-04 Tom Tromey <tom@tromey.com>
1730
1731 * compile/compile-loc2c.c (compute_stack_depth_worker): Change
1732 type of "info".
1733 (compute_stack_depth): Likewise.
1734 (do_compile_dwarf_expr_to_c): Use std::vector.
1735
1736 2017-11-04 Tom Tromey <tom@tromey.com>
1737
1738 * compile/compile-object-load.c (link_callbacks_einfo): Use
1739 std::string.
1740
1741 2017-11-04 Tom Tromey <tom@tromey.com>
1742
1743 * dwarf2read.c (process_full_comp_unit, process_full_type_unit):
1744 Use scoped_free_pendings.
1745 * dbxread.c (dbx_symfile_read, dbx_psymtab_to_symtab_1): Use
1746 scoped_free_pendings.
1747 * xcoffread.c (xcoff_psymtab_to_symtab_1): Use scoped_free_pendings.
1748 (xcoff_initial_scan): Likewise.
1749 * buildsym.c (reset_symtab_globals): Update comment.
1750 (scoped_free_pendings): Rename from really_free_pendings.
1751 (prepare_for_building): Update comment.
1752 (buildsym_init): Likewise.
1753 * buildsym.h (class scoped_free_pendings): New class.
1754 (really_free_pendings): Don't declare.
1755
1756 2017-11-03 Ulrich Weigand <uweigand@de.ibm.com>
1757
1758 * doublest.c (convert_doublest_to_floatformat): Fix uninitialized
1759 output when converting a zero value to a special byteorder format.
1760
1761 2017-11-02 Yao Qi <yao.qi@linaro.org>
1762
1763 * frame.c (do_frame_register_read): Remove aspace.
1764 * jit.c (jit_frame_sniffer): Likwise.
1765 * ppc-linux-tdep.c (ppu2spu_sniffer): Likewise.
1766 * regcache.c (regcache::regcache): Pass nullptr.
1767 (regcache_print): Caller updated.
1768 * regcache.h (regcache::regcache): Remove one constructor
1769 parameter aspace.
1770
1771 2017-11-02 Yao Qi <yao.qi@linaro.org>
1772
1773 * regcache.h (regcache) <m_readonly_p>: Change it to const bool.
1774
1775 2017-11-02 Yao Qi <yao.qi@linaro.org>
1776
1777 * breakpoint.c (insert_single_step_breakpoints): Update.
1778 * frame.c (struct frame_info) <aspace>: Add const.
1779 (frame_save_as_regcache): Add const.
1780 (get_frame_address_space): Return const address_space *.
1781 * frame.h (get_frame_address_space): Update declaration.
1782 * infrun.c (struct step_over_info) <aspace>: Add const.
1783 (set_step_over_info): Make aspace const.
1784 (displaced_step_prepare_throw): Change variable const.
1785 (resume): Likewise.
1786 (proceed): Likewise.
1787 (adjust_pc_after_break): Likewise.
1788 (save_waitstatus): Likewise.
1789 (handle_signal_stop): Likewise.
1790 (keep_going_pass_signal): Likewise.
1791 * jit.c (jit_frame_sniffer): Add const.
1792 * mips-tdep.c (mips_single_step_through_delay): Likewise.
1793 * ppc-linux-tdep.c (ppu2spu_sniffer): Likewise.
1794 * record-full.c (record_full_wait_1): Likewise.
1795 * regcache.c (regcache::regcache): Change parameter to const.
1796 * regcache.h (regcache::regcache): Likewise.
1797 (regcache::aspace): Return const address_space *.
1798 (regcache) <m_aspace>: Add const.
1799
1800 2017-11-02 Yao Qi <yao.qi@linaro.org>
1801
1802 * darwin-nat.c (cancel_breakpoint): Use regcache->aspace ().
1803 * frame.c (create_sentinel_frame): Likewise.
1804 * infrun.c (displaced_step_prepare_throw): Likewise.
1805 (resume): Likewise.
1806 (thread_still_needs_step_over_bp): Likewise.
1807 (proceed): Likewise.
1808 (do_target_wait): Likewise.
1809 (adjust_pc_after_break): Likewise.
1810 (handle_syscall_event): Likewise.
1811 (save_waitstatus): Likewise.
1812 (handle_inferior_event_1): Likewise.
1813 (handle_signal_stop): Likewise.
1814 (keep_going_pass_signal): Likewise.
1815 * linux-nat.c (status_callback): Likewise.
1816 (save_stop_reason): Likewise.
1817 (resume_stopped_resumed_lwps): Likewise.
1818 * record-full.c (record_full_exec_insn): Likewise.
1819 (record_full_wait_1): Likewise.
1820 * regcache.c (get_regcache_aspace): Remove.
1821 * regcache.h (get_regcache_aspace): Remove.
1822
1823 2017-11-02 Yao Qi <yao.qi@linaro.org>
1824
1825 * regcache.c (struct regcache_descr) <nr_raw_registers>: Remove.
1826 (init_regcache_descr): Use gdbarch_num_regs.
1827 (regcache::regcache): Likewise.
1828 (regcache::get_register_status): Likewise.
1829 (regcache::assert_raw_regnum): Likewise.
1830 (regcache::cooked_read): Likewise.
1831 (regcache::cooked_read_value): Likewise.
1832 (regcache::cooked_write): Likewise.
1833 (regcache::dump): Likewise.
1834 (regcache::num_raw_registers): New method.
1835 * regcache.h (class regcache) <num_raw_registers>: New.
1836
1837 2017-11-02 Yao Qi <yao.qi@linaro.org>
1838
1839 * regcache.c (regcache::assert_regnum): New method.
1840 (regcache::invalidate): Call assert_regnum.
1841 (regcache::raw_update): Likewise.
1842 (regcache::raw_write): Likewise.
1843 (regcache::raw_read_part): Likewise.
1844 (regcache::raw_write_part): Likewise.
1845 (regcache::raw_supply): Likewise.
1846 (regcache::raw_supply_integer): Likewise.
1847 (regcache::raw_supply_zeroed): Likewise.
1848 (regcache::raw_collect): Likewise.
1849 (regcache::raw_collect_integer): Likewise.
1850 * regcache.h (regcache::assert_regnum): Declare.
1851
1852 2017-11-02 Yao Qi <yao.qi@linaro.org>
1853
1854 * regcache.c (regcache::dump): Remove code.
1855
1856 2017-11-02 Yao Qi <yao.qi@linaro.org>
1857
1858 * regcache.c (struct regcache_descr) <sizeof_raw_register_status>:
1859 Remove.
1860 <sizeof_cooked_register_status>: Remove.
1861 (init_regcache_descr): Update.
1862 (regcache::regcache): Use nr_cooked_registers and nr_raw_registers.
1863 (regcache::save): Likewise.
1864 (regcache::dump): Likewise.
1865
1866 2017-11-01 James Bowman <james.bowman@ftdichip.com>
1867
1868 * ft32-tdep.c (ft32_fetch_instruction): New function.
1869 (ft32_analyze_prologue): Use ft32_fetch_instruction().
1870
1871 2017-10-31 Simon Marchi <simon.marchi@polymtl.ca>
1872
1873 * cli/cli-script.c (execute_control_command): Rename to ...
1874 (execute_control_command_1): ... this.
1875 (execute_control_command): New function.
1876
1877 2017-10-31 Simon Marchi <simon.marchi@ericsson.com>
1878
1879 * tracepoint.c (tfind_command): Remove const_cast.
1880
1881 2017-10-30 Mike Gulick <mgulick@mathworks.com>
1882
1883 * Makefile.in (HFILES_NO_SRCDIR): Remove reference to gdb.h.
1884
1885 2017-10-30 Simon Marchi <simon.marchi@ericsson.com>
1886
1887 * common/common-utils.h (in_inclusive_range): New function.
1888 * arm-tdep.c (arm_record_extension_space): Use
1889 in_inclusive_range.
1890 (thumb_record_ld_st_reg_offset): Use in_inclusive_range.
1891 * cris-tdep.c (cris_spec_reg_applicable): Use
1892 in_inclusive_range.
1893
1894 2017-10-30 Pedro Alves <palves@redhat.com>
1895 Simon Marchi <simon.marchi@ericsson.com>
1896
1897 * remote.c (remote_set_syscall_catchpoint): Build a std::string
1898 instead of a gdb::unique_xmalloc_ptr, using string_appendf.
1899
1900 2017-10-30 Pedro Alves <palves@redhat.com>
1901
1902 * common/common-utils.c (string_appendf, string_vappendf): New
1903 functions.
1904 * common/common-utils.h (string_appendf, string_vappendf): New
1905 declarations.
1906 * unittests/common-utils-selftests.c (string_appendf_func)
1907 (test_appendf_func, string_vappendf_wrapper, string_appendf_tests)
1908 (string_vappendf_tests): New functions.
1909 (_initialize_common_utils_selftests): Register "string_appendf" and
1910 "string_vappendf tests".
1911
1912 2017-10-30 Pedro Alves <palves@redhat.com>
1913
1914 * unittests/common-utils-selftests.c (format_func): New typedef.
1915 (string_printf_tests, string_vprintf_tests): Tests factored out
1916 and merged to ...
1917 (test_format_func): ... this new function.
1918 (string_printf_tests, string_vprintf_tests): Reimplement on top of
1919 test_format_func.
1920
1921 2017-10-29 Simon Marchi <simon.marchi@ericsson.com>
1922
1923 * darwin-nat.c: Remove include of gdb.h.
1924
1925 2017-10-29 Simon Marchi <simon.marchi@ericsson.com>
1926
1927 * xtensa-xtregs.c: Fix formatting issues.
1928
1929 2017-10-29 Simon Marchi <simon.marchi@ericsson.com>
1930
1931 * xtensa-xtregs.c (xtensa_regtable_t) <name>: Constify.
1932
1933 2017-10-28 Maksim Dzabraev <dzabraew@gmail.com>
1934
1935 PR python/21213
1936 * python/py-infthread.c (thpy_get_inferior): Increment reference
1937 of inferior before returning it.
1938
1939 2017-10-27 Simon Marchi <simon.marchi@ericsson.com>
1940
1941 * unittests/common-utils-selftests.c (format): Add
1942 ATTRIBUTE_PRINTF.
1943
1944 2017-10-27 Simon Marchi <simon.marchi@polymtl.ca>
1945
1946 * xml-syscall.c (struct syscall_desc): Add constructor.
1947 <name>: Change type to std::string.
1948 (syscall_desc_up): New typedef.
1949 (syscall_desc_p): Remove typeder.
1950 (DEF_VEC_P(syscall_desc_p)): Remove.
1951 (struct syscall_group_desc): Add constructor.
1952 <name>: Change type to std::string.
1953 <syscalls>: Change type to std::vector.
1954 (syscall_group_desc_up): New typedef.
1955 (syscall_group_desc_p): Remove typedef.
1956 (DEF_VEC_P(syscall_group_desc_p)): Remove.
1957 (struct syscalls_info) <syscalls>: Change type to std::vector of
1958 unique_ptr.
1959 <groups>: Likewise.
1960 <my_gdb_datadir>: Change type to std::string.
1961 (syscalls_info_up): New typedef.
1962 (allocate_syscalls_info): Remove.
1963 (syscalls_info_free_syscalls_desc): Remove.
1964 (syscalls_info_free_syscall_group_desc): Remove.
1965 (free_syscalls_info): Remove.
1966 (make_cleanup_free_syscalls_info): Remove.
1967 (syscall_group_create_syscall_group_desc): Adjust.
1968 (syscall_group_add_syscall): Adjust.
1969 (syscall_create_syscall_desc): Adjust.
1970 (syscall_parse_xml): Adjust, use unique_ptr instead of cleanup.
1971 (init_syscalls_info): Adjust.
1972 (syscall_group_get_group_by_name): Adjust.
1973 (xml_get_syscall_number): Adjust.
1974 (xml_get_syscall_name): Adjust.
1975 (xml_list_of_syscalls): Adjust.
1976 (xml_list_syscalls_by_group): Adjust.
1977 (xml_list_of_groups): Adjust.
1978
1979 2017-10-27 Simon Marchi <simon.marchi@ericsson.com>
1980
1981 * probe.h: Don't include gdb_vecs.h.
1982 (DEF_VEC_P (probe_p)): Remove.
1983 (find_probes_in_objfile): Return an std::vector.
1984 * probe.c (find_probes_in_objfile): Likewise.
1985 * breakpoint.c (breakpoint_objfile_data)
1986 <longjmp_probes>: Change type to std::vector.
1987 <exception_probes>: Likewise.
1988 (free_breakpoint_probes): Don't manually free vectors.
1989 (create_longjmp_master_breakpoint): Adjust.
1990 (create_exception_master_breakpoint): Adjust.
1991 * solib-svr4.c (svr4_create_probe_breakpoints): Change
1992 parameter type, adjust.
1993 (svr4_create_solib_event_breakpoints): Adjust.
1994
1995 2017-10-27 Simon Marchi <simon.marchi@ericsson.com>
1996
1997 * breakpoint.c (breakpoint_objfile_data): Initialize fields.
1998 (get_breakpoint_objfile_data): Allocate breakpoint_objfile_data
1999 with new.
2000 (free_breakpoint_probes): Rename to ...
2001 (free_breakpoint_objfile_data): ... this, and call delete on
2002 bp_objfile_data..
2003
2004 2017-10-27 Simon Marchi <simon.marchi@polymtl.ca>
2005
2006 * auto-load.c: Don't include gdb_vecs.h, include algorithm.
2007 (loaded_script_ptr): Remove typedef.
2008 (DEF_VEC_P (loaded_script_ptr)): Remove.
2009 (struct collect_matching_scripts_data): Add constructor.
2010 <scripts_p>: Change type to (pointer to) std::vector.
2011 (collect_matching_scripts_data): Adjust.
2012 (sort_scripts_by_name): Make suitable for std::sort.
2013 (print_scripts): Don't sort vector, adjust to std::vector.
2014 (auto_load_info_scripts): Sort vectors, adjust to std::vector.
2015
2016 2017-10-27 Simon Marchi <simon.marchi@ericsson.com>
2017
2018 * symfile.c (filename_language): Make struct, not typedef. Add
2019 constructor.
2020 <ext>: Change type to std::string.
2021 (DEF_VEC_O (filename_language)): Remove.
2022 (filename_language_table): Change type to std::vector.
2023 (add_filename_language): Adjust.
2024 (set_ext_lang_command): Adjust.
2025 (info_ext_lang_command): Adjust.
2026 (deduce_language_from_filename): Adjust.
2027 (class scoped_restore_filename_language_table): Remove.
2028 (test_filename_language): Use scoped_restore.
2029 (test_set_ext_lang_command): Use scoped_restore, adjust to
2030 std::vector change.
2031
2032 2017-10-27 Simon Marchi <simon.marchi@ericsson.com>
2033
2034 * symfile.c: Include selftest.h.
2035 (class scoped_restore_filename_language_table): New.
2036 (test_filename_language): New test.
2037 (test_set_ext_lang_command): New test.
2038 (_initialize_symfile): Register tests.
2039
2040 2017-10-27 Keith Seitz <keiths@redhat.com>
2041
2042 * breakpoint.c (print_breakpoint_location): Use the symbol saved
2043 in the bp_location, falling back to find_pc_sect_function when
2044 needed.
2045 (add_location_to_breakpoint): Save sal->symbol.
2046 * breakpoint.h (struct bp_location) <symbol>: New field.
2047 * symtab.c (find_function_start_sal): Save the symbol into the SaL.
2048 * symtab.h (struct symtab_and_line) <symbol>: New field.
2049
2050 2017-10-26 Patrick Frants <osscontribute@gmail.com>
2051
2052 PR gdb/13669
2053 * cp-valprint.c (cp_print_value_fields): Use obstack_blank_fast
2054 to rewind obstack.
2055
2056 2017-10-26 Pedro Alves <palves@redhat.com>
2057
2058 * remote.c (remote_async_terminal_ours_p): Delete.
2059 (remote_open_1, remote_terminal_inferior, remote_terminal_ours):
2060 Remove references to 'remote_async_terminal_ours_p'.
2061
2062 2017-10-26 Yao Qi <yao.qi@linaro.org>
2063
2064 * breakpoint.h (regular_breakpoint_inserted_here_p): Remove.
2065
2066 2017-10-26 Yao Qi <yao.qi@linaro.org>
2067
2068 * break-catch-sig.c (signal_catchpoint_breakpoint_hit): Make
2069 aspace const.
2070 * break-catch-syscall.c (breakpoint_hit_catch_syscall):
2071 Likewise.
2072 * breakpoint.c (bpstat_check_location): Remove cast.
2073 (breakpoint_hit_catch_fork): Make aspce const.
2074 (breakpoint_hit_catch_solib): Likewise.
2075 (breakpoint_hit_catch_exec): Likewise.
2076 (breakpoint_hit_ranged_breakpoint): Likewise.
2077 (breakpoint_hit_watchpoint): Likewise.
2078 (base_breakpoint_breakpoint_hit): Likewise.
2079 (bkpt_breakpoint_hit): Likewise.
2080 (dprintf_breakpoint_hit): Likewise.
2081 (tracepoint_breakpoint_hit): Likewise.
2082 * breakpoint.h (breakpoint_ops) <breakpoint_hit>: Likewise.
2083
2084 2017-10-26 Yao Qi <yao.qi@linaro.org>
2085
2086 * breakpoint.c (breakpoint_location_address_match): Change
2087 "struct address_space *" to "const address_space".
2088 (breakpoint_location_address_range_overlap): Likewise.
2089 (breakpoint_here_p): Likewise.
2090 (breakpoint_in_range_p): Likewise.
2091 (moribund_breakpoint_here_p): Likewise.
2092 (bp_location_inserted_here_p): Likewise.
2093 (software_breakpoint_inserted_here_p): Likewise.
2094 (hardware_breakpoint_inserted_here_p): Likewise.
2095 (hardware_watchpoint_inserted_in_range): Likewise.
2096 (bpstat_check_location): Likewise.
2097 (bpstat_stop_status): Likewise.
2098 (breakpoint_address_match): Likewise.
2099 (breakpoint_address_match_range): Likewise.
2100 (breakpoint_location_address_match): Likewise.
2101 (breakpoint_location_address_range_overlap): Likewise.
2102 (insert_single_step_breakpoint): Likewise.
2103 (breakpoint_has_location_inserted_here): Likewise.
2104 (single_step_breakpoint_inserted_here_p): Likewise.
2105 (pc_at_non_inline_function): Likewise.
2106 * breakpoint.h (bpstat_stop_status): Update declaration.
2107 (breakpoint_here_p): Likewise.
2108 (breakpoint_in_range_p): Likewise.
2109 (moribund_breakpoint_here_p): Likewise.
2110 (breakpoint_inserted_here_p): Likewise.
2111 (software_breakpoint_inserted_here_p): Likewise.
2112 (hardware_breakpoint_inserted_here_p): Likewise.
2113 (breakpoint_has_location_inserted_here): Likewise.
2114 (single_step_breakpoint_inserted_here_p): Likewise.
2115 (hardware_watchpoint_inserted_in_range): Likewise.
2116 (breakpoint_address_match): Likewise.
2117 (insert_single_step_breakpoint): Likewise.
2118 (pc_at_non_inline_function): Likewise.
2119 * gdbthread.h (thread_has_single_step_breakpoint_here): Likewise.
2120 * record.c (record_check_stopped_by_breakpoint): Likewise.
2121 * record.h (record_check_stopped_by_breakpoint): Likewise.
2122 * thread.c (thread_has_single_step_breakpoint_here): Likewise.
2123
2124 2017-10-25 Yao Qi <yao.qi@linaro.org>
2125
2126 * aarch32-linux-nat.c (aarch32_gp_regcache_supply): Use
2127 regcache->arch () instead get_regcache_arch.
2128 * aarch64-fbsd-nat.c (aarch64_fbsd_fetch_inferior_registers):
2129 Likewise.
2130 (aarch64_fbsd_store_inferior_registers): Likewise.
2131 * aarch64-linux-nat.c (fetch_gregs_from_thread): Likewise.
2132 (store_gregs_to_thread): Likewise.
2133 (fetch_fpregs_from_thread): Likewise.
2134 (store_fpregs_to_thread): Likewise.
2135 * aarch64-tdep.c (aarch64_extract_return_value): Likewise.
2136 (aarch64_store_return_value): Likewise.
2137 (aarch64_software_single_step): Likewise.
2138 * aix-thread.c (aix_thread_wait): Likewise.
2139 (supply_reg32): Likewise.
2140 (supply_sprs64): Likewise.
2141 (supply_sprs32): Likewise.
2142 (fill_gprs64): Likewise.
2143 (fill_gprs32): Likewise.
2144 (fill_sprs64): Likewise.
2145 (fill_sprs32): Likewise.
2146 (store_regs_user_thread): Likewise.
2147 (store_regs_kernel_thread): Likewise.
2148 * alpha-bsd-nat.c (alphabsd_fetch_inferior_registers): Likewise.
2149 (alphabsd_store_inferior_registers): Likewise.
2150 * alpha-tdep.c (alpha_extract_return_value): Likewise.
2151 (alpha_store_return_value): Likewise.
2152 (alpha_deal_with_atomic_sequence): Likewise.
2153 (alpha_next_pc): Likewise.
2154 (alpha_software_single_step): Likewise.
2155 * amd64-bsd-nat.c (amd64bsd_fetch_inferior_registers): Likewise.
2156 (amd64bsd_store_inferior_registers): Likewise.
2157 * amd64-linux-nat.c (amd64_linux_fetch_inferior_registers):
2158 Likewise.
2159 (amd64_linux_store_inferior_registers): Likewise.
2160 * amd64-nat.c (amd64_supply_native_gregset): Likewise.
2161 (amd64_collect_native_gregset): Likewise.
2162 * amd64-obsd-tdep.c (amd64obsd_supply_uthread): Likewise.
2163 (amd64obsd_collect_uthread): Likewise.
2164 * amd64-tdep.c (amd64_supply_fpregset): Likewise.
2165 (amd64_collect_fpregset): Likewise.
2166 (amd64_supply_fxsave): Likewise.
2167 (amd64_supply_xsave): Likewise.
2168 (amd64_collect_fxsave): Likewise.
2169 (amd64_collect_xsave): Likewise.
2170 * arc-tdep.c (arc_write_pc): Likewise.
2171 * arch-utils.c (default_skip_permanent_breakpoint): Likewise.
2172 * arm-fbsd-nat.c (arm_fbsd_fetch_inferior_registers): Likewise.
2173 (arm_fbsd_store_inferior_registers): Likewise.
2174 * arm-linux-nat.c (fetch_vfp_regs): Likewise.
2175 (store_vfp_regs): Likewise.
2176 (arm_linux_fetch_inferior_registers): Likewise.
2177 (arm_linux_store_inferior_registers): Likewise.
2178 * arm-linux-tdep.c (arm_linux_supply_gregset): Likewise.
2179 (arm_linux_sigreturn_next_pc): Likewise.
2180 (arm_linux_get_next_pcs_syscall_next_pc): Likewise.
2181 * arm-nbsd-nat.c (arm_supply_gregset): Likewise.
2182 (fetch_register): Likewise.
2183 (store_register): Likewise.
2184 * arm-tdep.c (arm_is_thumb): Likewise.
2185 (displaced_in_arm_mode): Likewise.
2186 (bx_write_pc): Likewise.
2187 (arm_get_next_pcs_addr_bits_remove): Likewise.
2188 (arm_software_single_step): Likewise.
2189 (arm_extract_return_value): Likewise.
2190 (arm_store_return_value): Likewise.
2191 (arm_write_pc): Likewise.
2192 * bfin-tdep.c (bfin_extract_return_value): Likewise.
2193 * bsd-uthread.c (bsd_uthread_fetch_registers): Likewise.
2194 (bsd_uthread_store_registers): Likewise.
2195 * core-regset.c (fetch_core_registers): Likewise.
2196 * corelow.c (get_core_registers): Likewise.
2197 * cris-tdep.c (cris_store_return_value): Likewise.
2198 (cris_extract_return_value): Likewise.
2199 (find_step_target): Likewise.
2200 (find_step_target): Likewise.
2201 (cris_software_single_step): Likewise.
2202 * ctf.c (ctf_fetch_registers): Likewise.
2203 * darwin-nat.c (cancel_breakpoint): Likewise.
2204 * fbsd-tdep.c (fbsd_collect_thread_registers): Likewise.
2205 * frv-tdep.c (frv_extract_return_value): Likewise.
2206 * ft32-tdep.c (ft32_store_return_value): Likewise.
2207 (ft32_extract_return_value): Likewise.
2208 * go32-nat.c (fetch_register): Likewise.
2209 (go32_fetch_registers): Likewise.
2210 (go32_store_registers): Likewise.
2211 (store_register): Likewise.
2212 * h8300-tdep.c (h8300_extract_return_value): Likewise.
2213 (h8300_store_return_value): Likewise.
2214 * hppa-linux-nat.c (fetch_register): Likewise.
2215 (store_register): Likewise.
2216 (hppa_linux_fetch_inferior_registers): Likewise.
2217 (hppa_linux_store_inferior_registers): Likewise.
2218 * i386-darwin-nat.c (i386_darwin_fetch_inferior_registers): Likewise.
2219 (i386_darwin_store_inferior_registers): Likewise.
2220 * i386-gnu-nat.c (gnu_fetch_registers): Likewise.
2221 (gnu_store_registers): Likewise.
2222 * i386-linux-nat.c (fetch_register): Likewise.
2223 (store_register): Likewise.
2224 (supply_gregset): Likewise.
2225 (fill_gregset): Likewise.
2226 (i386_linux_fetch_inferior_registers): Likewise.
2227 (i386_linux_store_inferior_registers): Likewise.
2228 (i386_linux_resume): Likewise.
2229 * i386-linux-tdep.c (i386_linux_get_syscall_number_from_regcache):
2230 Likewise.
2231 * i386-nto-tdep.c (i386nto_supply_gregset): Likewise.
2232 * i386-obsd-nat.c (i386obsd_supply_pcb): Likewise.
2233 * i386-obsd-tdep.c (i386obsd_supply_uthread): Likewise.
2234 (i386obsd_collect_uthread): Likewise.
2235 * i386-tdep.c (i386_mmx_regnum_to_fp_regnum): Likewise.
2236 (i386_supply_gregset): Likewise.
2237 (i386_collect_gregset): Likewise.
2238 (i386_supply_fpregset): Likewise.
2239 (i386_collect_fpregset): Likewise.
2240 (i386_mpx_bd_base): Likewise.
2241 * i386-v4-nat.c (supply_fpregset): Likewise.
2242 (fill_fpregset): Likewise.
2243 * i387-tdep.c (i387_supply_fsave): Likewise.
2244 (i387_collect_fsave): Likewise.
2245 (i387_supply_fxsave): Likewise.
2246 (i387_collect_fxsave): Likewise.
2247 (i387_supply_xsave): Likewise.
2248 (i387_collect_xsave): Likewise.
2249 * ia64-linux-nat.c (ia64_linux_fetch_registers): Likewise.
2250 (ia64_linux_store_registers): Likewise.
2251 * ia64-tdep.c (ia64_access_rse_reg): Likewise.
2252 (ia64_extract_return_value): Likewise.
2253 (ia64_store_return_value): Likewise.
2254 (find_func_descr): Likewise.
2255 * inf-child.c (inf_child_fetch_inferior_registers): Likewise.
2256 * inf-ptrace.c (inf_ptrace_fetch_registers): Likewise.
2257 (inf_ptrace_store_registers): Likewise.
2258 * infrun.c (use_displaced_stepping): Likewise.
2259 (displaced_step_prepare_throw): Likewise.
2260 (resume): Likewise.
2261 (proceed): Likewise.
2262 (do_target_wait): Likewise.
2263 (adjust_pc_after_break): Likewise.
2264 (handle_inferior_event_1): Likewise.
2265 (handle_signal_stop): Likewise.
2266 (save_infcall_suspend_state): Likewise.
2267 (restore_infcall_suspend_state): Likewise.
2268 * iq2000-tdep.c (iq2000_extract_return_value): Likewise.
2269 * jit.c (jit_frame_prev_register): Likewise.
2270 * linux-nat.c (save_stop_reason): Likewise.
2271 (linux_nat_wait_1): Likewise.
2272 (resume_stopped_resumed_lwps): Likewise.
2273 * linux-record.c (record_linux_sockaddr): Likewise.
2274 (record_linux_msghdr): Likewise.
2275 (record_linux_system_call): Likewise.
2276 * linux-tdep.c (linux_collect_thread_registers): Likewise.
2277 * lm32-tdep.c (lm32_extract_return_value): Likewise.
2278 (lm32_store_return_value): Likewise.
2279 * m32c-tdep.c (m32c_read_flg): Likewise.
2280 (m32c_pseudo_register_read): Likewise.
2281 (m32c_pseudo_register_write): Likewise.
2282 * m32r-linux-tdep.c (m32r_linux_supply_gregset): Likewise.
2283 (m32r_linux_collect_gregset): Likewise.
2284 * m32r-tdep.c (m32r_store_return_value): Likewise.
2285 (m32r_extract_return_value): Likewise.
2286 * m68k-bsd-nat.c (m68kbsd_supply_fpregset): Likewise.
2287 (m68kbsd_collect_fpregset): Likewise.
2288 * m68k-bsd-tdep.c (m68kbsd_supply_fpregset): Likewise.
2289 * m68k-linux-nat.c (fetch_register): Likewise.
2290 (old_fetch_inferior_registers): Likewise.
2291 (old_store_inferior_registers): Likewise.
2292 (store_regs): Likewise.
2293 * m68k-tdep.c (m68k_svr4_extract_return_value): Likewise.
2294 (m68k_svr4_store_return_value): Likewise.
2295 * m88k-tdep.c (m88k_store_arguments): Likewise.
2296 * mi/mi-main.c (mi_cmd_data_list_changed_registers): Likewise.
2297 (mi_cmd_data_write_register_values): Likewise.
2298 * mips-fbsd-nat.c (mips_fbsd_fetch_inferior_registers): Likewise.
2299 (mips_fbsd_store_inferior_registers): Likewise.
2300 * mips-fbsd-tdep.c (mips_fbsd_supply_fpregs): Likewise.
2301 (mips_fbsd_supply_gregs): Likewise.
2302 (mips_fbsd_collect_fpregs): Likewise.
2303 (mips_fbsd_collect_gregs): Likewise.
2304 (mips_fbsd_supply_fpregset): Likewise.
2305 (mips_fbsd_collect_fpregset): Likewise.
2306 (mips_fbsd_supply_gregset): Likewise.
2307 (mips_fbsd_collect_gregset): Likewise.
2308 * mips-linux-nat.c (supply_gregset): Likewise.
2309 (fill_gregset): Likewise.
2310 (supply_fpregset): Likewise.
2311 (fill_fpregset): Likewise.
2312 * mips-linux-tdep.c (mips_supply_gregset): Likewise.
2313 (mips_fill_gregset): Likewise.
2314 (mips_supply_fpregset): Likewise.
2315 (mips_fill_fpregset): Likewise.
2316 (mips64_supply_gregset): Likewise.
2317 (micromips_linux_sigframe_validate): Likewise.
2318 * mips-nbsd-nat.c (mipsnbsd_fetch_inferior_registers): Likewise.
2319 (mipsnbsd_fetch_inferior_registers): Likewise.
2320 (mipsnbsd_store_inferior_registers): Likewise.
2321 * mips-nbsd-tdep.c (mipsnbsd_supply_fpregset): Likewise.
2322 (mipsnbsd_supply_gregset): Likewise.
2323 (mipsnbsd_iterate_over_regset_sections): Likewise.
2324 (mipsnbsd_supply_reg): Likewise.
2325 (mipsnbsd_supply_fpreg): Likewise.
2326 * mips-tdep.c (mips_in_frame_stub): Likewise.
2327 (mips_dummy_id): Likewise.
2328 (is_octeon_bbit_op): Likewise.
2329 (micromips_bc1_pc): Likewise.
2330 (extended_mips16_next_pc): Likewise.
2331 (mips16_next_pc): Likewise.
2332 (deal_with_atomic_sequence): Likewise.
2333 * moxie-tdep.c (moxie_process_readu): Likewise.
2334 * nios2-tdep.c (nios2_get_next_pc): Likewise.
2335 * nto-procfs.c (procfs_store_registers): Likewise.
2336 * ppc-fbsd-nat.c (ppcfbsd_fetch_inferior_registers): Likewise.
2337 (ppcfbsd_store_inferior_registers): Likewise.
2338 * ppc-linux-nat.c (fetch_vsx_register): Likewise.
2339 (fetch_altivec_register): Likewise.
2340 (get_spe_registers): Likewise.
2341 (fetch_spe_register): Likewise.
2342 (fetch_altivec_registers): Likewise.
2343 (fetch_all_gp_regs): Likewise.
2344 (fetch_all_fp_regs): Likewise.
2345 (store_vsx_register): Likewise.
2346 (store_altivec_register): Likewise.
2347 (set_spe_registers): Likewise.
2348 (store_spe_register): Likewise.
2349 (store_altivec_registers): Likewise.
2350 (store_all_gp_regs): Likewise.
2351 (store_all_fp_regs): Likewise.
2352 * ppc-linux-tdep.c (ppc_linux_supply_gregset): Likewise.
2353 (ppc_linux_collect_gregset): Likewise.
2354 (ppc_canonicalize_syscall): Likewise.
2355 (ppc_linux_record_signal): Likewise.
2356 (ppu2spu_prev_register): Likewise.
2357 * ppc-nbsd-nat.c (ppcnbsd_supply_pcb): Likewise.
2358 * ppc-obsd-nat.c (ppcobsd_fetch_registers): Likewise.
2359 (ppcobsd_store_registers): Likewise.
2360 * ppc-ravenscar-thread.c (ppc_ravenscar_generic_fetch_registers):
2361 Likewise.
2362 (ppc_ravenscar_generic_store_registers): Likewise.
2363 * procfs.c (procfs_fetch_registers): Likewise.
2364 (procfs_store_registers): Likewise.
2365 * ravenscar-thread.c (ravenscar_fetch_registers): Likewise.
2366 (ravenscar_store_registers): Likewise.
2367 (ravenscar_prepare_to_store): Likewise.
2368 * record-btrace.c (record_btrace_fetch_registers): Likewise.
2369 * record-full.c (record_full_wait_1): Likewise.
2370 (record_full_registers_change): Likewise.
2371 (record_full_store_registers): Likewise.
2372 (record_full_core_fetch_registers): Likewise.
2373 (record_full_save): Likewise.
2374 (record_full_goto_insn): Likewise.
2375 * regcache.c (regcache_register_size): Likewise.
2376 (get_regcache_arch): Remove.
2377 (regcache_read_pc): Likewise.
2378 * regcache.h (get_regcache_arch): Remove.
2379 * remote-sim.c (gdbsim_fetch_register): Likewise.
2380 (gdbsim_store_register): Likewise.
2381 * remote.c (fetch_register_using_p): Likewise.
2382 (send_g_packet): Likewise.
2383 (remote_prepare_to_store): Likewise.
2384 (store_registers_using_G): Likewise.
2385 * reverse.c (save_bookmark_command): Likewise.
2386 (goto_bookmark_command): Likewise.
2387 * rs6000-aix-tdep.c (branch_dest): Likewise.
2388 * rs6000-nat.c (rs6000_ptrace64): Likewise.
2389 (fetch_register): Likewise.
2390 * rs6000-tdep.c (ppc_supply_reg): Likewise.
2391 (ppc_collect_reg): Likewise.
2392 (ppc_collect_gregset): Likewise.
2393 (ppc_collect_fpregset): Likewise.
2394 (ppc_collect_vsxregset): Likewise.
2395 (ppc_collect_vrregset): Likewise.
2396 (ppc_displaced_step_hw_singlestep): Likewise.
2397 (rs6000_pseudo_register_read): Likewise.
2398 (rs6000_pseudo_register_write): Likewise.
2399 * s390-linux-nat.c (supply_gregset): Likewise.
2400 (fill_gregset): Likewise.
2401 (s390_linux_fetch_inferior_registers): Likewise.
2402 * s390-linux-tdep.c (s390_write_pc): Likewise.
2403 (s390_software_single_step): Likewise.
2404 (s390_all_but_pc_registers_record): Likewise.
2405 (s390_linux_syscall_record): Likewise.
2406 * sentinel-frame.c (sentinel_frame_prev_arch): Likewise.
2407 * sh-nbsd-nat.c (shnbsd_fetch_inferior_registers): Likewise.
2408 (shnbsd_store_inferior_registers): Likewise.
2409 * sh-tdep.c (sh_extract_return_value_nofpu): Likewise.
2410 (sh_extract_return_value_fpu): Likewise.
2411 (sh_store_return_value_nofpu): Likewise.
2412 (sh_corefile_supply_regset): Likewise.
2413 (sh_corefile_collect_regset): Likewise.
2414 * sh64-tdep.c (sh64_extract_return_value): Likewise.
2415 (sh64_store_return_value): Likewise.
2416 * sparc-linux-tdep.c (sparc32_linux_collect_core_fpregset): Likewise.
2417 * sparc-nat.c (sparc_fetch_inferior_registers): Likewise.
2418 (sparc_store_inferior_registers): Likewise.
2419 * sparc-ravenscar-thread.c (register_in_thread_descriptor_p): Likewise.
2420 (sparc_ravenscar_prepare_to_store): Likewise.
2421 * sparc-tdep.c (sparc32_store_arguments): Likewise.
2422 (sparc_analyze_control_transfer): Likewise.
2423 (sparc_step_trap): Likewise.
2424 (sparc_software_single_step): Likewise.
2425 (sparc32_gdbarch_init): Likewise.
2426 (sparc_supply_rwindow): Likewise.
2427 (sparc_collect_rwindow): Likewise.
2428 * sparc64-linux-tdep.c (sparc64_linux_collect_core_fpregset): Likewise.
2429 * sparc64-nbsd-nat.c (sparc64nbsd_supply_gregset): Likewise.
2430 (sparc64nbsd_collect_gregset): Likewise.
2431 (sparc64nbsd_supply_fpregset): Likewise.
2432 (sparc64nbsd_collect_fpregset): Likewise.
2433 * sparc64-tdep.c (sparc64_store_arguments): Likewise.
2434 (sparc64_supply_gregset): Likewise.
2435 (sparc64_collect_gregset): Likewise.
2436 (sparc64_supply_fpregset): Likewise.
2437 (sparc64_collect_fpregset): Likewise.
2438 * spu-linux-nat.c (spu_fetch_inferior_registers): Likewise.
2439 * spu-tdep.c (spu_unwind_sp): Likewise.
2440 (spu2ppu_prev_register): Likewise.
2441 (spu_memory_remove_breakpoint): Likewise.
2442 * stack.c (return_command): Likewise.
2443 * tic6x-tdep.c (tic6x_extract_signed_field): Likewise.
2444 * tracefile-tfile.c (tfile_fetch_registers): Likewise.
2445 * tracefile.c (trace_save_ctf): Likewise.
2446 * windows-nat.c (do_windows_fetch_inferior_registers): Likewise.
2447 (do_windows_store_inferior_registers): Likewise.
2448 (windows_resume): Likewise.
2449 * xtensa-linux-nat.c (fill_gregset): Likewise.
2450 (supply_gregset_reg): Likewise.
2451 * xtensa-tdep.c (xtensa_register_write_masked): Likewise.
2452 (xtensa_register_read_masked): Likewise.
2453 (xtensa_supply_gregset): Likewise.
2454 (xtensa_extract_return_value): Likewise.
2455 (xtensa_store_return_value): Likewise.
2456
2457 2017-10-25 Ulrich Weigand <uweigand@de.ibm.com>
2458
2459 * doublest.c (floatformat_from_string): New function.
2460 * doublest.h (floatformat_from_string): Add prototype.
2461
2462 * std-operator.def (OP_DOUBLE, OP_DECFLOAT): Remove, replace by ...
2463 (OP_FLOAT): ... this.
2464 * expression.h: Do not include "doublest.h".
2465 (union exp_element): Replace doubleconst and decfloatconst by
2466 new element floatconst.
2467 * ada-lang.c (resolve_subexp): Handle OP_FLOAT instead of OP_DOUBLE.
2468 (ada_evaluate_subexp): Likewise.
2469 * eval.c (evaluate_subexp_standard): Handle OP_FLOAT instead of
2470 OP_DOUBLE and OP_DECFLOAT.
2471 * expprint.c (print_subexp_standard): Likewise.
2472 (dump_subexp_body_standard): Likewise.
2473 * breakpoint.c (watchpoint_exp_is_const): Likewise.
2474
2475 * parse.c: Include "dfp.h".
2476 (write_exp_elt_dblcst, write_exp_elt_decfloatcst): Remove.
2477 (write_exp_elt_floatcst): New function.
2478 (operator_length_standard): Handle OP_FLOAT instead of OP_DOUBLE
2479 and OP_DECFLOAT.
2480 (operator_check_standard): Likewise.
2481 (parse_float): Do not accept suffix. Take type as input. Return bool.
2482 Return target format buffer instead of host DOUBLEST.
2483 Use floatformat_from_string and decimal_from_string to parse
2484 either binary or decimal floating-point types.
2485 (parse_c_float): Remove.
2486 * parser-defs.h: Do not include "doublest.h".
2487 (write_exp_elt_dblcst, write_exp_elt_decfloatcst): Remove.
2488 (write_exp_elt_floatcst): Add prototype.
2489 (parse_float): Update prototype.
2490 (parse_c_float): Remove.
2491
2492 * c-exp.y: Do not include "dfp.h".
2493 (typed_val_float): Use byte buffer instead of DOUBLEST.
2494 (typed_val_decfloat): Remove.
2495 (DECFLOAT): Remove.
2496 (FLOAT): Use OP_FLOAT and write_exp_elt_floatcst.
2497 (parse_number): Update to new parse_float interface.
2498 Parse suffixes and determine type before calling parse_float.
2499 Handle decimal and binary FP types the same way.
2500
2501 * d-exp.y (typed_val_float): Use byte buffer instead of DOUBLEST.
2502 (FLOAT_LITERAL): Use OP_FLOAT and write_exp_elt_floatcst.
2503 (parse_number): Update to new parse_float interface.
2504 Parse suffixes and determine type before calling parse_float.
2505
2506 * f-exp.y: Replace dval by typed_val_float.
2507 (FLOAT): Use OP_FLOAT and write_exp_elt_floatcst.
2508 (parse_number): Use parse_float instead of atof.
2509
2510 * go-exp.y (typed_val_float): Use byte buffer instead of DOUBLEST.
2511 (parse_go_float): Remove.
2512 (FLOAT): Use OP_FLOAT and write_exp_elt_floatcst.
2513 (parse_number): Call parse_float instead of parse_go_float.
2514 Parse suffixes and determine type before calling parse_float.
2515
2516 * p-exp.y (typed_val_float): Use byte buffer instead of DOUBLEST.
2517 (FLOAT): Use OP_FLOAT and write_exp_elt_floatcst.
2518 (parse_number): Update to new parse_float interface.
2519 Parse suffixes and determine type before calling parse_float.
2520
2521 * m2-exp.y: Replace dval by byte buffer val.
2522 (FLOAT): Use OP_FLOAT and write_exp_elt_floatcst.
2523 (parse_number): Call parse_float instead of atof.
2524
2525 * rust-exp.y (typed_val_float): Use byte buffer instead of DOUBLEST.
2526 (lex_number): Call parse_float instead of strtod.
2527 (ast_dliteral): Use OP_FLOAT instead of OP_DOUBLE.
2528 (convert_ast_to_expression): Handle OP_FLOAT instead of OP_DOUBLE.
2529 Use write_exp_elt_floatcst.
2530 (unit_testing): Remove static variable.
2531 (rust_type): Do not check unit_testing.
2532 (rust_lex_tests): Do not set uint_testing. Set up dummy rust_parser.
2533
2534 * ada-exp.y (type_float, type_double): Remove.
2535 (typed_val_float): Use byte buffer instead of DOUBLEST.
2536 (FLOAT): Use OP_FLOAT and write_exp_elt_floatcst.
2537 * ada-lex.l (processReal): Use parse_float instead of sscanf.
2538
2539 2017-10-25 Alan Hayward <alan.hayward@arm.com>
2540
2541 * aarch64-tdep.h (enum aarch64_regnum): Remove.
2542 * arch/aarch64.h: New file.
2543
2544 2017-10-24 Ulrich Weigand <uweigand@de.ibm.com>
2545
2546 * dfp.h (decimal_from_string): Use const reference for argument.
2547 * dfp.c (decimal_from_string): Likewise.
2548
2549 2017-10-24 Ulrich Weigand <uweigand@de.ibm.com>
2550
2551 * i387-tdep.c (print_i387_value): Use floatformat_to_string.
2552 * sh64-tdep.c (sh64_do_fp_register): Likewise.
2553 * mips-tdep.c (mips_print_fp_register): Likewise.
2554
2555 2017-10-24 Ulrich Weigand <uweigand@de.ibm.com>
2556
2557 * common/format.h (enum argclass): Replace decfloat_arg by
2558 dec32float_arg, dec64float_arg, and dec128float_arg.
2559 * common/format.c (parse_format_string): Update to return
2560 new decimal float argument classes.
2561
2562 * printcmd.c (printf_decfloat): Rename to ...
2563 (printf_floating): ... this. Add argclass argument, and use it
2564 instead of parsing the format string again. Add support for
2565 binary floating-point values, using floatformat_to_string.
2566 Convert value to the target format if it doesn't already match.
2567 (ui_printf): Call printf_floating instead of printf_decfloat,
2568 also for double_arg / long_double_arg. Pass argclass.
2569
2570 * dfp.c (decimal_to_string): Add format string argument.
2571 * dfp.h (decimal_to_string): Likewise.
2572
2573 * doublest.c (floatformat_to_string): Add format string argument.
2574 * doublest.h (floatformat_to_string): Likewise.
2575
2576 2017-10-24 Ulrich Weigand <uweigand@de.ibm.com>
2577
2578 * doublest.c (floatformat_precision): New routine.
2579 (floatformat_to_string): Likewise.
2580 * doublest.c (floatformat_to_string): Add prototype.
2581
2582 * printcmd.c (print_scalar_formatted): Only call print_floating
2583 on floating-point types.
2584 * valprint.c: Do not include "floatformat.h".
2585 (generic_val_print_decfloat): Remove.
2586 (generic_val_print): Call generic_val_print_float for both
2587 TYPE_CODE_FLT and TYPE_CODE_DECFLOAT.
2588 (print_floating): Use floatformat_to_string. Handle decimal float.
2589 (print_decimal_floating): Remove, merge into floatformat_to_string.
2590 * value.h (print_decimal_floating): Remove.
2591
2592 * Makefile.in: Do not build doublest.c with -Wformat-nonliteral.
2593
2594 2017-10-24 Ulrich Weigand <uweigand@de.ibm.com>
2595
2596 * buildsym.c (end_symtab_get_static_block): Use std::stable_sort.
2597
2598 2017-10-21 Simon Marchi <simon.marchi@ericsson.com>
2599
2600 * memattr.h: Don't include vec.h.
2601 (struct mem_attrib): Initialize fields.
2602 <unknown>: New static method.
2603 (struct mem_region): Add constructors, operator<, initialize
2604 fields.
2605 * memattr.c: Include algorithm.
2606 (default_mem_attrib, unknown_mem_attrib): Remove.
2607 (user_mem_region_list): New global.
2608 (target_mem_region_list, mem_region_list): Change type to
2609 std::vector<mem_region>.
2610 (mem_use_target): Now a function.
2611 (target_mem_regions_valid): Change type to bool.
2612 (mem_region_lessthan, mem_region_cmp, mem_region_init): Remove.
2613 (require_user_regions): Adjust.
2614 (require_target_regions): Adjust.
2615 (create_mem_region): Adjust.
2616 (lookup_mem_region): Adjust.
2617 (invalidate_target_mem_regions): Adjust.
2618 (mem_clear): Rename to...
2619 (user_mem_clear): ... this, and adjust.
2620 (mem_command): Adjust.
2621 (info_mem_command): Adjust.
2622 (mem_enable, enable_mem_command, mem_disable,
2623 disable_mem_command): Adjust.
2624 (mem_delete): Adjust.
2625 (delete_mem_command): Adjust.
2626 * memory-map.h (parse_memory_map): Return an std::vector.
2627 * memory-map.c (parse_memory_map): Likewise.
2628 (struct memory_map_parsing_data): Add constructor.
2629 <memory_map>: Point to std::vector.
2630 (memory_map_start_memory): Adjust.
2631 (memory_map_end_memory): Adjust.
2632 (memory_map_end_property): Adjust.
2633 (clear_result): Remove.
2634 * remote.c (remote_memory_map): Return an std::vector.
2635 * target-debug.h (target_debug_print_VEC_mem_region_s__p):
2636 Remove.
2637 (target_debug_print_mem_region_vector): New.
2638 * target-delegates.c: Regenerate.
2639 * target.h (mem_region_vector): New typedef.
2640 (to_memory_map): Return mem_region_vector.
2641 (target_memory_map): Return an std::vector.
2642 * target.c (target_memory_map): Return an std::vector.
2643 (flash_erase_command): Adjust.
2644
2645 2017-10-21 Simon Marchi <simon.marchi@ericsson.com>
2646
2647 * memory-map.c (struct memory_map_parsing_data) <property_name>:
2648 Change type to std::string.
2649 (memory_map_start_property): Adjust.
2650 (memory_map_end_property): Adjust.
2651
2652 2017-10-21 Simon Marchi <simon.marchi@polymtl.ca>
2653
2654 * infrun.h: Include common/byte-vector.h.
2655 (struct displaced_step_closure): New struct.
2656 (struct buf_displaced_step_closure): New struct.
2657 * infrun.c (displaced_step_closure::~displaced_step_closure):
2658 Provide default implementation.
2659 (displaced_step_clear): Deallocate step closure with delete.
2660 * aarch64-tdep.c (displaced_step_closure): Rename to ...
2661 (aarch64_displaced_step_closure): ... this, extend
2662 displaced_step_closure.
2663 (aarch64_displaced_step_data) <dsc>: Change type to
2664 aarch64_displaced_step_closure.
2665 (aarch64_displaced_step_copy_insn): Adjust to type change, use
2666 unique_ptr.
2667 (aarch64_displaced_step_fixup): Add cast for displaced step
2668 closure.
2669 * amd64-tdep.c (displaced_step_closure): Rename to ...
2670 (amd64_displaced_step_closure): ... this, extend
2671 displaced_step_closure.
2672 <insn_buf>: Change type to std::vector<gdb_byte>.
2673 <max_len>: Remove.
2674 (fixup_riprel): Change type of DSC parameter, adjust to type
2675 change of insn_buf.
2676 (fixup_displaced_copy): Change type of DSC parameter.
2677 (amd64_displaced_step_copy_insn): Instantiate
2678 amd64_displaced_step_closure.
2679 (amd64_displaced_step_fixup): Add cast for closure type, adjust
2680 to type change of insn_buf.
2681 * arm-linux-tdep.c (arm_linux_cleanup_svc): Change type of
2682 parameter DSC.
2683 (arm_linux_copy_svc): Likewise.
2684 (cleanup_kernel_helper_return): Likewise.
2685 (arm_catch_kernel_helper_return): Likewise.
2686 (arm_linux_displaced_step_copy_insn): Instantiate
2687 arm_displaced_step_closure.
2688 * arm-tdep.c (arm_pc_is_thumb): Add cast for closure.
2689 (displaced_read_reg): Change type of parameter DSC.
2690 (branch_write_pc): Likewise.
2691 (load_write_pc): Likewise.
2692 (alu_write_pc): Likewise.
2693 (displaced_write_reg): Likewise.
2694 (arm_copy_unmodified): Likewise.
2695 (thumb_copy_unmodified_32bit): Likewise.
2696 (thumb_copy_unmodified_16bit): Likewise.
2697 (cleanup_preload): Likewise.
2698 (install_preload): Likewise.
2699 (arm_copy_preload): Likewise.
2700 (thumb2_copy_preload): Likewise.
2701 (install_preload_reg): Likewise.
2702 (arm_copy_preload_reg): Likewise.
2703 (cleanup_copro_load_store): Likewise.
2704 (install_copro_load_store): Likewise.
2705 (arm_copy_copro_load_store) Likewise.
2706 (thumb2_copy_copro_load_store): Likewise.
2707 (cleanup_branch): Likewise.
2708 (install_b_bl_blx): Likewise.
2709 (arm_copy_b_bl_blx): Likewise.
2710 (thumb2_copy_b_bl_blx): Likewise.
2711 (thumb_copy_b): Likewise.
2712 (install_bx_blx_reg): Likewise.
2713 (arm_copy_bx_blx_reg): Likewise.
2714 (thumb_copy_bx_blx_reg): Likewise.
2715 (cleanup_alu_imm): Likewise.
2716 (arm_copy_alu_imm): Likewise.
2717 (thumb2_copy_alu_imm): Likewise.
2718 (cleanup_alu_reg): Likewise.
2719 (install_alu_reg): Likewise.
2720 (arm_copy_alu_reg): Likewise.
2721 (thumb_copy_alu_reg): Likewise.
2722 (cleanup_alu_shifted_reg): Likewise.
2723 (install_alu_shifted_reg): Likewise.
2724 (arm_copy_alu_shifted_reg): Likewise.
2725 (cleanup_load): Likewise.
2726 (cleanup_store): Likewise.
2727 (arm_copy_extra_ld_st): Likewise.
2728 (install_load_store): Likewise.
2729 (thumb2_copy_load_literal): Likewise.
2730 (thumb2_copy_load_reg_imm): Likewise.
2731 (arm_copy_ldr_str_ldrb_strb): Likewise.
2732 (cleanup_block_load_all): Likewise.
2733 (cleanup_block_store_pc): Likewise.
2734 (cleanup_block_load_pc): Likewise.
2735 (arm_copy_block_xfer): Likewise.
2736 (thumb2_copy_block_xfer): Likewise.
2737 (cleanup_svc): Likewise.
2738 (install_svc): Likewise.
2739 (arm_copy_svc): Likewise.
2740 (thumb_copy_svc): Likewise.
2741 (arm_copy_undef): Likewise.
2742 (thumb_32bit_copy_undef): Likewise.
2743 (arm_copy_unpred): Likewise.
2744 (arm_decode_misc_memhint_neon): Likewise.
2745 (arm_decode_unconditional): Likewise.
2746 (arm_decode_miscellaneous): Likewise.
2747 (arm_decode_dp_misc): Likewise.
2748 (arm_decode_ld_st_word_ubyte): Likewise.
2749 (arm_decode_media): Likewise.
2750 (arm_decode_b_bl_ldmstm): Likewise.
2751 (arm_decode_ext_reg_ld_st): Likewise.
2752 (thumb2_decode_dp_shift_reg): Likewise.
2753 (thumb2_decode_ext_reg_ld_st): Likewise.
2754 (arm_decode_svc_copro): Likewise.
2755 (thumb2_decode_svc_copro): Likewise.
2756 (install_pc_relative): Likewise.
2757 (thumb_copy_pc_relative_16bit): Likewise.
2758 (thumb_decode_pc_relative_16bit): Likewise.
2759 (thumb_copy_pc_relative_32bit): Likewise.
2760 (thumb_copy_16bit_ldr_literal): Likewise.
2761 (thumb_copy_cbnz_cbz): Likewise.
2762 (thumb2_copy_table_branch): Likewise.
2763 (cleanup_pop_pc_16bit_all): Likewise.
2764 (thumb_copy_pop_pc_16bit): Likewise.
2765 (thumb_process_displaced_16bit_insn): Likewise.
2766 (decode_thumb_32bit_ld_mem_hints): Likewise.
2767 (thumb_process_displaced_32bit_insn): Likewise.
2768 (thumb_process_displaced_insn): Likewise.
2769 (arm_process_displaced_insn): Likewise.
2770 (arm_displaced_init_closure): Likewise.
2771 (arm_displaced_step_fixup): Add cast for closure.
2772 * arm-tdep.h: Include infrun.h.
2773 (displaced_step_closure): Rename to ...
2774 (arm_displaced_step_closure): ... this, extend
2775 displaced_step_closure.
2776 <u::svc::copy_svc_os>: Change type of parameter DSC.
2777 <cleanup>: Likewise.
2778 (arm_process_displaced_insn): Likewise.
2779 (arm_displaced_init_closure): Likewise.
2780 (displaced_read_reg): Likewise.
2781 (displaced_write_reg): Likewise.
2782 * i386-linux-tdep.c (i386_linux_displaced_step_copy_insn):
2783 Adjust.
2784 * i386-tdep.h: Include infrun.h.
2785 (i386_displaced_step_closure): New typedef.
2786 * i386-tdep.c (i386_displaced_step_copy_insn): Use
2787 i386_displaced_step_closure.
2788 (i386_displaced_step_fixup): Adjust.
2789 * rs6000-tdep.c (ppc_displaced_step_closure): New typedef.
2790 (ppc_displaced_step_copy_insn): Use ppc_displaced_step_closure
2791 and unique_ptr.
2792 (ppc_displaced_step_fixup): Adjust.
2793 * s390-linux-tdep.c (s390_displaced_step_closure): New typedef.
2794 (s390_displaced_step_copy_insn): Use s390_displaced_step_closure
2795 and unique_ptr.
2796 (s390_displaced_step_fixup): Adjust.
2797
2798 2017-10-21 Simon Marchi <simon.marchi@polymtl.ca>
2799
2800 * interps.h (interp_resume, interp_suspend, interp_set_temp):
2801 Remove declarations.
2802
2803 2017-10-20 Tom Tromey <tom@tromey.com>
2804
2805 * gdb_bfd.c (struct gdb_bfd_data) <included_bfds>: Now a
2806 std::vector.
2807 (gdb_bfd_record_inclusion): Update.
2808 (bfdp): Remove typedef.
2809
2810 2017-10-20 Tom Tromey <tom@tromey.com>
2811
2812 * gdb_bfd.c (gdb_bfd_ref): Use new.
2813 (struct gdb_bfd_data): Add constructor, destructor, and member
2814 initializers.
2815 (gdb_bfd_unref): Use delete.
2816
2817 2017-10-20 Tom Tromey <tom@tromey.com>
2818
2819 * exec.c (exec_file_attach): Use new_bfd_ref.
2820 * symfile-mem.c (symbol_file_add_from_memory): Use new_bfd_ref.
2821 * gdb_bfd.c (gdb_bfd_open, gdb_bfd_fopen, gdb_bfd_openr)
2822 (gdb_bfd_openw, gdb_bfd_openr_iovec, gdb_bfd_fdopenr): Use
2823 new_bfd_ref.
2824 * gdb_bfd.h (new_bfd_ref): New function.
2825
2826 2017-10-20 Pedro Alves <palves@redhat.com>
2827
2828 * main.c (captured_command_loop): Add attribute noinline.
2829
2830 2017-10-19 Simon Marchi <simon.marchi@ericsson.com>
2831
2832 * interps.c (struct interp_factory): Add constructor.
2833 (interp_factory_p): Remove typedef.
2834 (DEF_VEC_P(interp_factory_p)): Remove.
2835 (interpreter_factories): Change type to std::vector.
2836 (interp_factory_register): Adjust.
2837 (interp_lookup): Adjust.
2838 (interpreter_completer): Adjust.
2839
2840 2017-10-19 Tom Tromey <tom@tromey.com>
2841
2842 * break-catch-syscall.c (catch_syscall_completer): Use
2843 std::string, gdb::unique_xmalloc_ptr.
2844
2845 2017-10-19 Tom Tromey <tom@tromey.com>
2846
2847 * infcall.c (call_function_by_hand_dummy): Use std::string.
2848
2849 2017-10-19 Tom Tromey <tom@tromey.com>
2850
2851 * mi/mi-main.c (mi_cmd_execute): Update.
2852 * top.h (prepare_execute_command): Return scoped_value_mark.
2853 * value.h (class scoped_value_mark): Use DISABLE_COPY_AND_ASSIGN.
2854 Add move constructor.
2855 * top.c (prepare_execute_command): Return scoped_value_mark.
2856 (execute_command): Update.
2857
2858 2017-10-19 Pedro Alves <palves@redhat.com>
2859
2860 * xml-support.c (xml_fetch_content_from_file): Check fread's
2861 return.
2862
2863 2017-10-19 Pedro Alves <palves@redhat.com>
2864
2865 * ser-base.c (ser_base_read_error_fd): Delete the file handler if
2866 async.
2867 (handle_error_fd): New function.
2868 (ser_base_async): Add/delete an event loop file handler for
2869 error_fd.
2870
2871 2017-10-19 Pedro Alves <palves@redhat.com>
2872
2873 * xml-support.c (xml_fetch_content_from_file): Don't read in
2874 chunks. Instead use fseek to determine the file's size, and read
2875 it in one go.
2876
2877 2017-11-18 Keith Seitz <keiths@redhat.com>
2878
2879 * c-exp.y (oper): Canonicalize conversion operators of user-defined
2880 types.
2881 Add whitespace to front of type name.
2882
2883 2017-10-18 Keith Seitz <keiths@redhat.com>
2884
2885 * dwarf2read.c (dwarf2_add_typedef): Issue a complaint on unhandled
2886 DW_AT_accessibility.
2887
2888 2017-10-18 Yao Qi <yao.qi@linaro.org>
2889
2890 * features/tic6x-c62x-linux.c: Remove.
2891
2892 2017-10-17 Tom Tromey <tom@tromey.com>
2893
2894 * disasm.c (do_mixed_source_and_assembly_deprecated): Use
2895 gdb::optional, ui_out_emit_list, ui_out_emit_tuple.
2896 (do_mixed_source_and_assembly): Likewise.
2897
2898 2017-10-17 Tom Tromey <tom@tromey.com>
2899
2900 * regcache.c (regcache::xfer_part): Remove assertion.
2901
2902 2017-10-17 Pedro Alves <palves@redhat.com>
2903
2904 * xml-support.c (xml_fetch_content_from_file): Call
2905 unique_ptr::release() instead unique_ptr::get() when passing
2906 through xrealloc.
2907
2908 2017-10-17 Yao Qi <yao.qi@linaro.org>
2909
2910 * regcache.c (regcache::xfer_part): Remove parameters read and
2911 write, add parameter is_raw. All callers are updated.
2912
2913 2017-10-16 Keith Seitz <keiths@redhat.com>
2914
2915 * c-typeprint.c (enum access_specifier): Moved here from
2916 c_type_print_base.
2917 (output_access_specifier): New function.
2918 (c_type_print_base): Consider typedefs when assessing
2919 whether access labels are needed.
2920 Use output_access_specifier as needed.
2921 Output access specifier for typedefs, if needed.
2922 * dwarf2read.c (dwarf2_add_typedef): Record DW_AT_accessibility.
2923 * gdbtypes.h (struct typedef_field) <is_protected, is_private>: New
2924 fields.
2925 (TYPE_TYPEDEF_FIELD_PROTECTED, TYPE_TYPEDEF_FIELD_PRIVATE): New
2926 accessor macros.
2927
2928 2017-10-16 Tom Tromey <tom@tromey.com>
2929
2930 * linux-tdep.c (linux_info_proc, linux_find_memory_regions_full)
2931 (linux_fill_prpsinfo, linux_vsyscall_range_raw): Update.
2932 * target.c (target_fileio_read_stralloc): Update.
2933 * sparc64-tdep.c (adi_is_addr_mapped): Update.
2934 * target.h (target_fileio_read_stralloc): Return
2935 unique_xmalloc_ptr.
2936
2937 2017-10-16 Tom Tromey <tom@tromey.com>
2938
2939 * xml-syscall.c (xml_init_syscalls_info): Update.
2940 * xml-support.c (xinclude_start_include): Update.
2941 (xml_fetch_content_from_file): Return unique_xmalloc_ptr.
2942 * xml-support.h (xml_fetch_another): Return unique_xmalloc_ptr.
2943 (xml_fetch_content_from_file): Likewise.
2944 * osdata.c (get_osdata): Update.
2945 * target.h (target_read_stralloc, target_get_osdata): Return
2946 unique_xmalloc_ptr.
2947 * solib-aix.c (solib_aix_get_library_list): Update.
2948 * solib-target.c (solib_target_current_sos): Update.
2949 * solib-svr4.c (svr4_current_sos_via_xfer_libraries): Update.
2950 * xml-tdesc.c (fetch_available_features_from_target): Update.
2951 (target_fetch_description_xml): Update.
2952 (file_read_description_xml): Update.
2953 * remote.c (remote_get_threads_with_qxfer, remote_memory_map)
2954 (remote_traceframe_info, btrace_read_config, remote_read_btrace)
2955 (remote_pid_to_exec_file): Update.
2956 * target.c (target_read_stralloc): Return unique_xmalloc_ptr.
2957 (target_get_osdata): Likewise.
2958
2959 2017-10-16 Tom Tromey <tom@tromey.com>
2960
2961 * remote.c (remote_register_number_and_offset): Use std::vector.
2962 (remote_set_syscall_catchpoint): Use gdb::unique_xmalloc_ptr.
2963 (putpkt_binary): Use gdb::def_vector.
2964 (compare_sections_command): Use gdb::byte_vector.
2965
2966 2017-10-16 Tom Tromey <tom@tromey.com>
2967
2968 * ppc-linux-nat.c (hwdebug_insert_point): Use
2969 gdb::unique_xmalloc_ptr, XDUP.
2970
2971 2017-10-16 Tom Tromey <tom@tromey.com>
2972
2973 * probe.c (parse_probes): Use std::string.
2974 (info_probes_for_ops, enable_probes_command)
2975 (disable_probes_command): Remove cleanups.
2976
2977 2017-10-16 Tom Tromey <tom@tromey.com>
2978
2979 * buildsym.c (block_compar): Remove.
2980 (end_symtab_get_static_block): Use std::vector.
2981
2982 2017-10-16 Simon Marchi <simon.marchi@ericsson.com>
2983
2984 * memrange.h (struct mem_range): Define operator< and operator==.
2985 (mem_range_s): Remove.
2986 (DEF_VEC_O (mem_range_s)): Remove.
2987 (normalize_mem_ranges): Change parameter type to std::vector.
2988 * memrange.c (compare_mem_ranges): Remove.
2989 (normalize_mem_ranges): Change parameter type to std::vector,
2990 adjust to vector change.
2991 * exec.c (section_table_available_memory): Return vector, remove
2992 parameter.
2993 (section_table_read_available_memory): Adjust to std::vector
2994 change.
2995 * remote.c (remote_read_bytes): Adjust to std::vector
2996 change.
2997 * tracepoint.h (traceframe_available_memory): Change parameter
2998 type to std::vector.
2999 * tracepoint.c (traceframe_available_memory): Change parameter
3000 type to std::vector, adjust.
3001 * gdb/mi/mi-main.c (mi_cmd_trace_frame_collected): Adjust to
3002 std::vector change.
3003 * gdb/Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
3004 unittests/memrange-selftests.c.
3005 (SUBDIR_UNITTESTS_OBS): Add memrange-selftests.o.
3006 * gdb/unittests/memrange-selftests.c: New file.
3007
3008 2017-10-16 Pedro Alves <palves@redhat.com>
3009
3010 * elfread.c (probe_key_free): Rename range-for variable.
3011 * probe.c (parse_probes_in_pspace, find_probes_in_objfile)
3012 (find_probe_by_pc, collect_probes): Rename range-for variable.
3013
3014 2017-10-16 Yao Qi <yao.qi@linaro.org>
3015
3016 * features/Makefile (XMLTOC): Remove tic6x-*.xml.
3017 * features/tic6x-c62x.c: Remove.
3018 * features/tic6x-c64x-linux.c: Remove.
3019 * features/tic6x-c64x.c: Remove.
3020 * features/tic6x-c64xp-linux.c: Remove.
3021 * features/tic6x-c64xp.c: Remove.
3022 * tic6x-linux-tdep.c (_initialize_tic6x_linux_tdep): Don't call
3023 initialize_tdesc_tic6x_*_linux functions.
3024 * tic6x-tdep.c (_initialize_tic6x_tdep): Don't call
3025 initialize_tdesc_tic6x_* functions.
3026
3027 2017-10-16 Yao Qi <yao.qi@linaro.org>
3028
3029 * features/Makefile (WHICH): Remove tic6x-c64xp, tic6x-c64x
3030 tic6x-c62x.
3031 * regformats/tic6x-c62x.dat: Remove.
3032 * regformats/tic6x-c64x.dat: Remove.
3033 * regformats/tic6x-c64xp.dat: Remove.
3034
3035 2017-10-15 Simon Marchi <simon.marchi@ericsson.com>
3036
3037 * tracepoint.c (parse_traceframe_info): Return a unique_ptr
3038 (the !HAVE_LIBEXPAT version).
3039
3040 2017-10-14 Simon Marchi <simon.marchi@ericsson.com>
3041
3042 * nat/linux-osdata.c (struct pid_pgid_entry) <operator<>: Make
3043 const.
3044
3045 2017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
3046
3047 * target.h: Include tracepoint.h.
3048 (enum trace_find_type): Move to tracepoint.h.
3049 (struct target_ops) <to_traceframe_info>: Return a unique ptr.
3050 * tracepoint.h: Don't include target.h
3051 (enum trace_find_type): Move from target.h.
3052 (parse_traceframe_info): Return a unique ptr.
3053 * tracepoint.c (current_traceframe_info): Change type to unique
3054 ptr.
3055 (free_traceframe_info): Remove.
3056 (clear_traceframe_info): Don't manually free
3057 current_traceframe_info.
3058 (free_result): Remove.
3059 (parse_traceframe_info): Return a unique ptr.
3060 (get_traceframe_info): Adjust to unique ptr.
3061 * ctf.c (ctf_traceframe_info): Return a unique ptr.
3062 * remote.c (remote_traceframe_info): Return a unique ptr.
3063 * tracefile-tfile.c (tfile_traceframe_info): Return a unique
3064 ptr.
3065 * target-debug.h (target_debug_print_traceframe_info_up): New
3066 macro.
3067 * target-delegates.c: Regenerate.
3068
3069 2017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
3070
3071 * memrange.h (struct mem_range): Add constructors.
3072 * tracepoint.h (struct traceframe_info) <memory>: Change type to
3073 std::vector<mem_range>.
3074 * tracepoint.c (free_traceframe_info): Don't manually free
3075 vector.
3076 (traceframe_info_start_memory): Adjust to vector change.
3077 (traceframe_available_memory): Likewise.
3078 * tracefile-tfile.c (build_traceframe_info): Likewise.
3079 * ctf.c (ctf_traceframe_info): Likewise.
3080
3081 2017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
3082
3083 * tracepoint.h (struct traceframe_info) <tvars>: Change type to
3084 std::vector<int>.
3085 * tracepoint.c (free_traceframe_info): Deallocate with delete.
3086 (traceframe_info_start_tvar): Adjust to vector change.
3087 (parse_traceframe_info): Allocate with new.
3088 * ctf.c (ctf_traceframe_info): Allocate with new, adjust to
3089 vector change.
3090 * tracefile-tfile.c (build_traceframe_info): Adjust to vector
3091 change.
3092 tfile_traceframe_info): Allocate with new.
3093 * mi/mi-main.c (mi_cmd_trace_frame_collected): Adjust to vector
3094 change.
3095
3096 2017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
3097
3098 * tracepoint.c (traceframe_info): Rename to...
3099 (current_traceframe_info): ...this.
3100 (clear_traceframe_info): Adjust.
3101 (get_traceframe_info): Adjust.
3102
3103 2017-10-14 Simon Marchi <simon.marchi@ericsson.com>
3104
3105 * nat/linux-osdata.c: Include algorithm.
3106 (compare_processes): Remove.
3107 (struct pid_pgid_entry): New struct.
3108 (linux_xfer_osdata_processgroups): Use std::vector instead of
3109 XNEWVEC.
3110
3111 2017-10-14 Simon Marchi <simon.marchi@ericsson.com>
3112
3113 * objfiles.h: Don't include symfile.h.
3114 (struct partial_symbol): Remove forward-declaration.
3115 (struct objfile) <global_psymbols, static_psymbols>: Change type
3116 to std::vector<partial_symbol *>.
3117 * objfiles.c (objfile::objfile): Don't memset those fields.
3118 (objfile::~objfile): Don't free those fields.
3119 * psympriv.h (struct psymbol_allocation_list): Remove
3120 forward-declaration.
3121 (add_psymbol_to_list): Change psymbol_allocation_list parameter
3122 to std::vector.
3123 (start_psymtab_common): Change parameters to std::vector.
3124 * psymtab.c: Include algorithm.
3125 (require_partial_symbols): Call shrink_to_fit.
3126 (find_pc_sect_psymbol): Adjust to vector change.
3127 (match_partial_symbol): Likewise.
3128 (lookup_partial_symbol): Likewise.
3129 (psym_relocate): Likewise.
3130 (dump_psymtab): Likewise.
3131 (recursively_search_psymtabs): Likewise.
3132 (compare_psymbols): Remove.
3133 (sort_pst_symbols): Adjust to vector change.
3134 (start_psymtab_common): Likewise.
3135 (end_psymtab_common): Likewise.
3136 (psymbol_bcache_full): De-constify return value.
3137 (add_psymbol_to_bcache): Likewise.
3138 (extend_psymbol_list): Remove.
3139 (append_psymbol_to_list): Adjust to vector change.
3140 (add_psymbol_to_list): Likewise.
3141 (init_psymbol_list): Likewise.
3142 (maintenance_info_psymtabs): Likewise.
3143 (maintenance_check_psymtabs): Likewise.
3144 * symfile.h (struct psymbol_allocation_list): Remove.
3145 * symfile.c (reread_symbols): Adjust to vector change.
3146 * dbxread.c (start_psymtab): Change type of parameters.
3147 (dbx_symfile_read): Adjust to vector change.
3148 (read_dbx_symtab): Likewise.
3149 (start_psymtab): Change type of parameters.
3150 * dwarf2read.c (dwarf2_build_psymtabs): Adjust to vector change.
3151 (create_partial_symtab): Likewise.
3152 (add_partial_symbol): Likewise.
3153 (write_one_signatured_type): Likewise.
3154 (recursively_write_psymbols): Likewise.
3155 * mdebugread.c (parse_partial_symbols): Likewise.
3156 * xcoffread.c (xcoff_start_psymtab): Change type of parameters.
3157 (scan_xcoff_symtab): Adjust to vector change.
3158 (xcoff_initial_scan): Likewise.
3159
3160 2017-10-13 Simon Marchi <simon.marchi@ericsson.com>
3161
3162 * ada-typeprint.c (print_dynamic_range_bound): Use std::string.
3163
3164 2017-10-13 Yao Qi <yao.qi@linaro.org>
3165
3166 * features/Makefile: Remove tic6x-*-expedite, add tic6x-expedite.
3167 Remove s390x-*-expedite, add s390x-expedite.
3168
3169 2017-10-13 Yao Qi <yao.qi@linaro.org>
3170
3171 * features/s390-gs-linux64.c: Regenerated.
3172 * features/s390x-gs-linux64.c: Regenerated.
3173
3174 2017-10-13 Tom Tromey <tom@tromey.com>
3175
3176 * compile/compile-object-run.c (do_module_cleanup): Use delete.
3177 * solib.c (update_solib_list, reload_shared_libraries_1): Use
3178 delete.
3179 * symfile.c (symbol_file_add_with_addrs): Use new.
3180 (symbol_file_add_separate): Update comment.
3181 (syms_from_objfile_1, remove_symbol_file_command): Use delete.
3182 * jit.c (jit_object_close_impl): Use new.
3183 (jit_unregister_code): Use delete.
3184 * objfiles.c (objfile::objfile): Rename from allocate_objfile.
3185 (~objfile): Rename from free_objfile.
3186 (free_objfile_separate_debug, do_free_objfile_cleanup)
3187 (free_all_objfiles, objfile_purge_solibs): Use delete.
3188 * objfiles.h (struct objfile): Add constructor and destructor.
3189 Use DISABLE_COPY_AND_ASSIGN. Add initializers to data members.
3190 (allocate_objfile, free_objfile): Don't declare.
3191 (struct objstats): Add initializers.
3192
3193 2017-10-12 Simon Marchi <simon.marchi@ericsson.com>
3194
3195 * arch-utils.h (simple_displaced_step_copy_insn): Remove.
3196 * arch-utils.c (simple_displaced_step_copy_insn): Remove.
3197 * gdbarch.sh (displaced_step_copy_insn): Adjust comment.
3198 * gdbarch.h: Regenerate.
3199 * i386-linux-tdep.c (i386_linux_displaced_step_copy_insn):
3200 Adjust comment.
3201 * i386-tdep.c (i386_displaced_step_copy_insn): Adjust comment.
3202 (i386_displaced_step_fixup): Adjust comment.
3203 * rs6000-tdep.c (ppc_displaced_step_copy_insn): Adjust comment.
3204
3205 2017-10-12 Tom Tromey <tom@tromey.com>
3206
3207 * prologue-value.h (pv_area::store_would_trash): Return bool.
3208 (pv_area::find_reg): Likewise.
3209 * prologue-value.c (pv_area::store_would_trash): Return bool.
3210 (pv_area::find_reg): Likewise.
3211
3212 2017-10-12 Tom Tromey <tom@tromey.com>
3213
3214 * s390-linux-tdep.c (s390_store, s390_load)
3215 (s390_check_for_saved, s390_analyze_prologue): Update.
3216 * rx-tdep.c (check_for_saved, rx_analyze_prologue): Update.
3217 * rl78-tdep.c (rl78_analyze_prologue, check_for_saved): Update.
3218 * prologue-value.h (class pv_area): Move from prologue-value.c.
3219 Change names of members. Add constructor, destructor, member
3220 functions.
3221 (make_pv_area, free_pv_area, make_cleanup_free_pv_area)
3222 (pv_area_store, pv_area_fetch, pv_area_store_would_trash)
3223 (pv_area_fetch, pv_area_scan): Don't declare.
3224 * prologue-value.c (struct pv_area::area_entry): Now member of
3225 pv_area.
3226 (struct pv_area): Move to prologue-value.h.
3227 (pv_area::pv_area): Rename from make_pv_area.
3228 (pv_area::~pv_area): Rename from free_pv_area.
3229 (do_free_pv_area_cleanup, make_cleanup_free_pv_area): Remove.
3230 (clear_entries, find_entry, overlaps, store_would_trash, store)
3231 (fetch, find_reg, scan): Now member of pv_area.
3232 Remove "area" argument. Update.
3233 * msp430-tdep.c (check_for_saved, msp430_analyze_prologue):
3234 Update.
3235 * mn10300-tdep.c (push_reg, check_for_saved)
3236 (mn10300_analyze_prologue): Update.
3237 * mep-tdep.c (is_arg_spill, check_for_saved)
3238 (mep_analyze_prologue): Update.
3239 * m32c-tdep.c (m32c_pv_push, m32c_srcdest_fetch)
3240 (m32c_srcdest_store, m32c_pv_enter, m32c_is_arg_spill)
3241 (m32c_is_struct_return, m32c_analyze_prologue): Update.
3242 * arm-tdep.c (thumb_analyze_prologue, arm_analyze_prologue):
3243 Update.
3244 * arc-tdep.c (arc_is_in_prologue, arc_analyze_prologue): Update.
3245 * aarch64-tdep.c (aarch64_analyze_prologue): Update.
3246
3247 2017-10-12 Simon Marchi <simon.marchi@ericsson.com>
3248
3249 * linux-nat.h (linux_nat_set_delete_thread): New declaration.
3250 * linux-nat.c (linux_nat_delete_thread): New variable.
3251 (lwp_free): Invoke linux_nat_delete_thread if set.
3252 (linux_nat_set_delete_thread): New function.
3253 * aarch64-linux-nat.c (_initialize_aarch64_linux_nat): Assign
3254 thread delete callback.
3255 * arm-linux-nat.c (arm_linux_delete_thread): New function.
3256 (_initialize_arm_linux_nat): Assign thread delete callback.
3257 * s390-linux-nat.c (s390_delete_thread): New function.
3258 (_initialize_s390_nat): Assign thread delete callback.
3259 * x86-linux-nat.c (x86_linux_add_target): Likewise.
3260 * nat/aarch64-linux.c (aarch64_linux_delete_thread): New
3261 function.
3262 * nat/aarch64-linux.h (aarch64_linux_delete_thread): New
3263 declaration.
3264 * nat/x86-linux.c (x86_linux_delete_thread): New function.
3265 * nat/x86-linux.h (x86_linux_delete_thread): New declaration.
3266
3267 2017-10-09 Tom Tromey <tom@tromey.com>
3268
3269 * tui/tui-win.c (tui_set_win_height, parse_scrolling_args): Use
3270 std::string.
3271 * tui/tui-layout.c (enum tui_status): Use std::string.
3272
3273 2017-10-11 Tom Tromey <tom@tromey.com>
3274
3275 * gdbthread.h (thread_command): Constify.
3276 * inferior.h (detach_command): Constify.
3277 * top.h (set_history, show_history): Constify.
3278 * arm-tdep.c (set_arm_command, show_arm_command): Constify.
3279 * serial.c (serial_set_cmd, serial_show_cmd): Constify.
3280 * bsd-kvm.c (bsd_kvm_cmd): Constify.
3281 * printcmd.c (set_command): Constify.
3282 (non_const_set_command): New function.
3283 * dcache.c (set_dcache_command, show_dcache_command): Constify.
3284 * breakpoint.c (enable_command, disable_command, delete_command)
3285 (catch_command, tcatch_command, set_breakpoint_cmd)
3286 (show_breakpoint_cmd): Constify.
3287 * macrocmd.c (macro_command): Constify.
3288 * infcmd.c (unset_command, kill_command, detach_command)
3289 (info_proc_cmd): Constify.
3290 * i386-tdep.c (set_mpx_cmd, show_mpx_cmd): Constify.
3291 * auto-load.c (show_auto_load_cmd, set_auto_load_cmd)
3292 (info_auto_load_cmd): Constify.
3293 * target-descriptions.c (set_tdesc_cmd, show_tdesc_cmd)
3294 (unset_tdesc_cmd): Constify.
3295 * ada-lang.c (set_ada_command, show_ada_command)
3296 (maint_set_ada_cmd, maint_show_ada_cmd): Constify.
3297 * guile/guile.c (set_guile_command, show_guile_command)
3298 (info_guile_command): Constify.
3299 * tui/tui-win.c (tui_command, set_tui_cmd, show_tui_cmd):
3300 Constify.
3301 * skip.c (skip_command): Constify.
3302 * compile/compile.c (_initialize_compile): Constify.
3303 * dwarf2read.c (set_dwarf_cmd, show_dwarf_cmd): Constify.
3304 * btrace.c (maint_btrace_cmd, maint_btrace_set_cmd)
3305 (maint_btrace_show_cmd, maint_btrace_pt_set_cmd)
3306 (maint_btrace_pt_show_cmd): Constify.
3307 * remote.c (set_remote_cmd, show_remote_cmd, remote_command):
3308 Constify.
3309 * python/python.c (user_show_python, user_set_python): Constify.
3310 * mips-tdep.c (set_mips_command, show_mips_command)
3311 (set_mipsfpu_command): Constify.
3312 * record-btrace.c (cmd_record_btrace_start)
3313 (cmd_set_record_btrace, cmd_show_record_btrace)
3314 (cmd_set_record_btrace_bts, cmd_show_record_btrace_bts)
3315 (cmd_set_record_btrace_pt, cmd_show_record_btrace_pt): Constify.
3316 * rs6000-tdep.c (set_powerpc_command, show_powerpc_command):
3317 Constify.
3318 * symfile.c (overlay_command): Constify.
3319 * spu-tdep.c (set_spu_command, show_spu_command): Constify.
3320 * cli/cli-logging.c (set_logging_command, show_logging_command):
3321 Constify.
3322 * cli/cli-dump.c (dump_command, append_command)
3323 (srec_dump_command, ihex_dump_command, verilog_dump_command)
3324 (tekhex_dump_command, binary_dump_command)
3325 (binary_append_command): Constify.
3326 * cli/cli-decode.c (struct cmd_list_element): Change type of
3327 "fun".
3328 * cli/cli-cmds.c (info_command, show_command, set_debug)
3329 (show_debug): Constify.
3330 (show_command): Add non-const overload.
3331 * top.c (set_history, show_history): Constify.
3332 * sh-tdep.c (set_sh_command, show_sh_command): Constify.
3333 * command.h (add_prefix_cmd): Accept a cmd_const_cfunc_ftype.
3334 * target.c (target_command): Constify.
3335 * sparc64-tdep.c (info_adi_command): Constify.
3336 * record-full.c (cmd_record_full_start): Constify.
3337 (set_record_full_command): Constify. Fix typo.
3338 (show_record_full_command): Constify.
3339 * thread.c (thread_command, thread_apply_command): Constify.
3340 * memattr.c (dummy_cmd): Constify.
3341 * value.c (function_command): Constify.
3342 * frame.c (set_backtrace_cmd, show_backtrace_cmd): Constify.
3343 * probe.c (info_probes_command): Constify.
3344 * ser-tcp.c (set_tcp_cmd, show_tcp_cmd): Constify.
3345 * gnu-nat.c (set_task_cmd, show_task_cmd, set_thread_cmd)
3346 (show_thread_cmd, set_thread_default_cmd)
3347 (show_thread_default_cmd): Constify.
3348 (check_empty): Constify.
3349 * tracepoint.c (tfind_command): Constify.
3350 * cp-support.c (maint_cplus_command): Constify.
3351 * windows-tdep.c (info_w32_command): Constify.
3352 * record.c (cmd_record_start, set_record_command)
3353 (show_record_command, info_record_command, cmd_record_goto):
3354 Constify.
3355 * ravenscar-thread.c (set_ravenscar_command)
3356 (show_ravenscar_command): Constify.
3357 * utils.c (set_internal_problem_cmd, show_internal_problem_cmd):
3358 Constify.
3359 (add_internal_problem_command): Remove casts.
3360 * arc-tdep.c (maintenance_print_arc_command): Constify.
3361 * valprint.c (set_print, show_print, set_print_raw)
3362 (show_print_raw): Constify.
3363 * maint.c (maintenance_command, maintenance_info_command)
3364 (maintenance_print_command, maintenance_set_cmd)
3365 (maintenance_show_cmd, set_per_command_cmd)
3366 (show_per_command_cmd, maintenance_check_command): Constify.
3367 * language.c (set_check, show_check): Constify.
3368 * typeprint.c (show_print_type, set_print_type): Constify.
3369 * go32-nat.c (go32_info_dos_command): Constify.
3370
3371 2017-10-11 Tom Tromey <tom@tromey.com>
3372
3373 * breakpoint.c (prepare_re_set_context): Remove.
3374 (breakpoint_re_set_one): Update. Don't use cleanups.
3375 (breakpoint_re_set): Use scoped_restore, std::string, and
3376 scoped_restore_current_language.
3377
3378 2017-10-11 Tom Tromey <tom@tromey.com>
3379
3380 * breakpoint.c (commands_command_1): Use std::string.
3381 (cleanup_executing_breakpoints): Remove.
3382 (bpstat_do_actions_1): Use scoped_restore.
3383 (bpstat_check_watchpoint): Use std::string.
3384 (decode_static_tracepoint_spec): Likewise.
3385 (break_range_command): Likewise.
3386 (watch_command_1): Likewise.
3387 (compare_breakpoints): Change argument types.
3388 (clear_command): Use std::vector.
3389 (cleanup_executing_breakpoints): Remove.
3390 (update_global_location_list): Use unique_xmalloc_ptr.
3391 (strace_command): Remove unused declaration.
3392
3393 2017-10-11 John Baldwin <jhb@FreeBSD.org>
3394
3395 * Makefile.in (ALLDEPFILES): Add arm-fbsd-nat.c.
3396 * NEWS: Mention new FreeBSD/arm native configuration.
3397 * configure.host: Add arm*-*-freebsd*.
3398 * configure.nat: Likewise.
3399 * arm-fbsd-nat.c: New file.
3400
3401 2017-10-11 John Baldwin <jhb@FreeBSD.org>
3402
3403 * Makefile.in (ALL_TARGET_OBS): Add arm-fbsd-tdep.o.
3404 (ALLDEPFILES): Add arm-fbsd-tdep.c.
3405 * NEWS: Mention new FreeBSD/arm target.
3406 * configure.tgt: Add arm*-*-freebsd*.
3407 * arm-fbsd-tdep.c: New file.
3408 * arm-fbsd-tdep.h: New file.
3409
3410 2017-10-11 Maciej W. Rozycki <macro@imgtec.com>
3411
3412 * linux-tdep.c (linux_make_corefile_notes): Remove call to
3413 `gdbarch_elfcore_write_linux_prpsinfo'.
3414 * gdbarch.sh (elfcore_write_linux_prpsinfo): Remove architecture
3415 method.
3416 (elf_internal_linux_prpsinfo): Remove declaration.
3417 * gdbarch.h: Regenerate.
3418 * gdbarch.c: Regenerate.
3419
3420 2017-10-11 Maciej W. Rozycki <macro@imgtec.com>
3421
3422 * ppc-linux-tdep.c (ppc_linux_init_abi): Remove call to
3423 `set_gdbarch_elfcore_write_linux_prpsinfo'.
3424
3425 2017-10-11 Pedro Alves <palves@redhat.com>
3426
3427 * breakpoint.c (reattach_breakpoints): Delete.
3428 * breakpoint.h (reattach_breakpoints): Delete.
3429
3430 2017-10-11 Simon Marchi <simon.marchi@ericsson.com>
3431
3432 * symfile.c (registered_sym_fns): Make struct, not typedef.
3433 (DEF_VEC_O (registered_sym_fns)): Remove.
3434 (symtab_fns): Change type to std::vector.
3435 (add_symtab_fns): Adjust.
3436 (find_sym_fns): Adjust.
3437
3438 2017-10-11 Anton Kolesov <Anton.Kolesov@synopsys.com>
3439
3440 * arc-tdep.c (arc_gdbarch_init): Pass proper cpu value to disassembler.
3441 * arc-tdep.h (arc_arch_is_em): New function.
3442 (arc_arch_is_hs): Likewise.
3443
3444 2017-10-11 Egeyar Bagcioglu <egeyar.bagcioglu@oracle.com>
3445
3446 * macrotab.h (macro_lookup_inclusion): Remove unnecessary
3447 parentheses in the declaration.
3448 (macro_lookup_inclusion): Likewise.
3449 (macro_lookup_definition): Likewise.
3450 * p-lang.h (pascal_builtin_types): Likewise.
3451 * tui/tui-data.c (tui_win_list): Likewise.
3452 * tui/tui-data.h (tui_win_list): Likewise.
3453 * utils.h (make_cleanup_free_section_addr_info): Likewise.
3454
3455 2017-10-11 Mark Rages <markrages@gmail.com>
3456
3457 * target-memory.c (block_boundaries): Fix for block address not
3458 aligned on block size.
3459
3460 2017-10-10 Pedro Alves <palves@redhat.com>
3461 Tom Tromey <tom@tromey.com>
3462
3463 * breakpoint.c (struct captured_breakpoint_query_args)
3464 (do_captured_breakpoint_query, gdb_breakpoint_query): Delete.
3465 (print_breakpoint): New.
3466 * breakpoint.h (print_breakpoint): Declare.
3467 * common/common-exceptions.h (enum return_reason): Remove
3468 references to catch_exceptions.
3469 * exceptions.c (catch_exceptions, catch_exceptions_with_msg):
3470 Delete.
3471 * exceptions.h (catch_exceptions_ftype, catch_exceptions)
3472 (catch_exception_ftype, catch_exceptions_with_msg): Delete.
3473 * gdb.h: Delete.
3474 * gdbthread.h (thread_select): Declare.
3475 * mi/mi-cmd-break.c: Don't include gdb.h.
3476 (breakpoint_notify): Use print_breakpoint.
3477 * mi/mi-cmd-catch.c: Don't include gdb.h.
3478 * mi/mi-interp.c: Don't include gdb.h.
3479 (mi_print_breakpoint_for_event): New.
3480 (mi_breakpoint_created, mi_breakpoint_modified): Use
3481 mi_print_breakpoint_for_event.
3482 * mi/mi-main.c: Don't include gdb.h.
3483 (mi_cmd_thread_select): Parse the global thread ID here. Use
3484 thread_select instead of gdb_thread_select.
3485 (mi_cmd_thread_list_ids): Output "thread-ids" tuple here instead
3486 of using gdb_list_thread_ids.
3487 * remote-fileio.c (do_remote_fileio_request): Change type. Reply
3488 FILEIO_ENOSYS here.
3489 (remote_fileio_request): Use TRY/CATCH instead of
3490 catch_exceptions.
3491 * symfile-mem.c (struct symbol_file_add_from_memory_args)
3492 (symbol_file_add_from_memory_wrapper): Delete.
3493 (add_vsyscall_page): Use TRY/CATCH instead of catch_exceptions.
3494 * thread.c: Don't include gdb.h.
3495 (do_captured_list_thread_ids, gdb_list_thread_ids): Delete.
3496 (thread_alive): Use thread_select.
3497 (do_captured_thread_select): Delete, parts salvaged as ...
3498 (thread_select): ... this new function.
3499 (gdb_thread_select): Delete.
3500
3501 2017-10-10 Pedro Alves <palves@redhat.com>
3502 Tom Tromey <tom@tromey.com>
3503
3504 * breakpoint.c (breakpoint_cond_eval): Change return type to bool
3505 and reverse logic.
3506 (WP_DELETED, WP_VALUE_CHANGED, WP_VALUE_NOT_CHANGED, WP_IGNORE):
3507 No longer macros. Instead ...
3508 (enum wp_check_result): They're now values of this new
3509 enumeration.
3510 (watchpoint_check): Change return type to wp_check_result and
3511 parameter type to bpstat.
3512 (bpstat_check_watchpoint): Use TRY/CATCH instead of catch_errors.
3513 (bpstat_check_breakpoint_conditions): Use TRY/CATCH instead of
3514 catch_errors. Reverse logic of watchpoint_check call.
3515 (breakpoint_re_set_one): Now returns void and takes a breakpoint
3516 pointer as parameter.
3517 (breakpoint_re_set): Use TRY/CATCH instead of catch_errors.
3518 * common/common-exceptions.c (throw_exception_sjlj): Update
3519 comments to avoid mentioning catch_errors.
3520 * exceptions.c (catch_errors): Delete.
3521 * exceptions.h: Update comments to avoid mentioning catch_errors.
3522 (catch_errors_ftype, catch_errors): Delete.
3523 * infrun.c (normal_stop): Use TRY/CATCH instead of catch_errors.
3524 (hook_stop_stub): Delete.
3525 (restore_selected_frame): Change return type to void, and
3526 parameter type to const frame_id &.
3527 (restore_infcall_control_state): Use TRY/CATCH instead of
3528 catch_errors.
3529 * main.c (captured_command_loop): Return void and remove
3530 parameter. Remove references to catch_errors.
3531 (captured_main): Use TRY/CATCH instead of catch_errors.
3532 * objc-lang.c (objc_submethod_helper_data)
3533 (find_objc_msgcall_submethod_helper): Delete.
3534 (find_objc_msgcall_submethod): Use TRY/CATCH instead of
3535 catch_errors.
3536 * record-full.c (record_full_message): Return void.
3537 (record_full_message_args, record_full_message_wrapper): Delete.
3538 (record_full_message_wrapper_safe): Return bool and use TRY/CATCH
3539 instead of catch_errors.
3540 * solib-aix.c (solib_aix_open_symbol_file_object): Change
3541 parameter type to int.
3542 * solib-darwin.c (open_symbol_file_object): Ditto.
3543 * solib-dsbt.c (open_symbol_file_object): Ditto.
3544 * solib-frv.c (open_symbol_file_object): Ditto.
3545 * solib-svr4.c (open_symbol_file_object): Ditto.
3546 * solib-target.c (solib_target_open_symbol_file_object): Ditto.
3547 * solib.c (update_solib_list): Use TRY/CATCH instead of
3548 catch_errors.
3549 * solist.h (struct target_so_ops) <open_symbol_file_object>:
3550 Change type.
3551 * symmisc.c (struct print_symbol_args): Remove.
3552 (dump_symtab_1): Use TRY/CATCH instead of catch_errors.
3553 (print_symbol): Change type.
3554 * windows-nat.c (handle_load_dll, handle_unload_dll): Return void
3555 and remove parameters.
3556 (catch_errors): New.
3557 (get_windows_debug_event): Adjust.
3558
3559 2017-10-09 Tom Tromey <tom@tromey.com>
3560
3561 * mi/mi-main.c (free_splay_tree): Remove.
3562 (list_available_thread_groups): Use splay_tree_up.
3563 * common/gdb_splay_tree.h: New file.
3564
3565 2017-10-09 Tom Tromey <tom@tromey.com>
3566
3567 * mi/mi-main.c (do_nothing): Remove.
3568 (list_available_thread_groups): Update.
3569
3570 2017-10-09 Pedro Alves <palves@redhat.com>
3571
3572 * infrun.c (handle_inferior_event_1) <TARGET_WAITKIND_EXECD>: Skip
3573 reading registers when switching context.
3574
3575 2017-10-09 John Baldwin <jhb@FreeBSD.org>
3576
3577 * fbsd-nat.c (fbsd_siginfo_size): Use gdbarch_long_bit.
3578 (fbsd_convert_siginfo): Likewise.
3579 * fbsd-tdep.c (fbsd_core_xfer_siginfo): Likewise.
3580
3581 2017-10-09 Simon Marchi <simon.marchi@polymtl.ca>
3582
3583 * configure.ac (try_guile_versions): Remove guile-2.2.
3584 * configure: Regenerate.
3585
3586 2017-10-09 Tom Tromey <tom@tromey.com>
3587
3588 * Makefile.in (COMPILE.post, POSTCOMPILE): Restore $(basename).
3589 (COMPILE.pre): Use $(CXX).
3590
3591 2017-10-09 Pedro Alves <palves@redhat.com>
3592
3593 * cp-support.c (cp_remove_params): Return a gdb::unique_xmalloc_ptr.
3594 Use bool.
3595 (overload_list_add_symbol): Adjust to use gdb::unique_xmalloc_ptr.
3596 * cp-support.h (cp_remove_params): Now returns a
3597 gdb::unique_xmalloc_ptr.
3598 * dwarf2read.c (find_slot_in_mapped_hash): Now returns bool.
3599 Adjust to cp_remove_params returning a gdb::unique_xmalloc_ptr.
3600 * psymtab.c (psymtab_search_name): Adjust to cp_remove_params
3601 returning a gdb::unique_xmalloc_ptr.
3602 (lookup_partial_symbol): Adjust to use gdb::unique_xmalloc_ptr.
3603 * stack.c (find_frame_funname): Adjust to cp_remove_params
3604 returning a gdb::unique_xmalloc_ptr.
3605
3606 2017-10-08 Tom Tromey <tom@tromey.com>
3607
3608 * dwarf2read.c (dwarf2_get_dwz_file): Use
3609 gdb::unique_xmalloc_ptr.
3610 (find_slot_in_mapped_hash): Likewise.
3611 (dwarf2_physname): Likewise.
3612 (create_dwo_unit_in_dwp_v1): Use std::string.
3613 (create_dwo_unit_in_dwp_v2): Likewise.
3614 (lookup_dwo_cutu): Likewise.
3615 (inherit_abstract_dies): Use std::vector.
3616 (read_array_type): Likewise.
3617 (dwarf_decode_macros): Remove unused declaration.
3618 (unsigned_int_compar): Remove.
3619 (dwarf2_build_psymtabs_hard): Use scoped_restore.
3620 (psymtabs_addrmap_cleanup): Remove.
3621
3622 2017-10-08 Tom Tromey <tom@tromey.com>
3623
3624 * frame-unwind.c (frame_unwind_try_unwinder): Update.
3625 * frame.h (frame_cleanup_after_sniffer): Declare.
3626 (frame_prepare_for_sniffer): Return void.
3627 * frame.c (frame_cleanup_after_sniffer): No longer static. Change
3628 type of argument.
3629 (frame_prepare_for_sniffer): Return void.
3630
3631 2017-10-08 Tom Tromey <tom@tromey.com>
3632
3633 * utils.h (make_cleanup_value_free): Remove.
3634 * utils.c (do_value_free, struct cleanup): Remove.
3635 * dwarf2loc.c (dwarf2_evaluate_loc_desc_full) <DWARF_VALUE_STACK>:
3636 Use gdb_value_up.
3637 * value.h (struct value_deleter): New.
3638 (gdb_value_up): New typedef.
3639
3640 2017-10-08 Tom Tromey <tom@tromey.com>
3641
3642 * symtab.c (free_search_symbols, do_free_search_symbols_cleanup)
3643 (make_cleanup_free_search_symbols): Remove.
3644 (search_symbols): Return std::vector.
3645 (symbol_search::compare_search_syms): Now member of
3646 symbol_search. Change arguments.
3647 (sort_search_symbols_remove_dups): Change arguments. Rewrite.
3648 (symtab_symbol_info, rbreak_command): Update.
3649 * symtab.h (struct symbol_search) <next>: Remove.
3650 Add constructors.
3651 (symbol_search::operator<): New function.
3652 (symbol_search::operator==): New function.
3653 (search_symbols): Remove std::vector.
3654 (free_search_symbols, make_cleanup_free_search_symbols): Remove.
3655 (symbol_search::compare_search_syms): Declare.
3656
3657 2017-10-06 Yao Qi <yao.qi@linaro.org>
3658
3659 * Makefile.in (ALL_64_TARGET_OBS): Replace aarch64-insn.o with
3660 arch/aarch64-insn.o.
3661 Remove one rule.
3662 * configure.tgt: Replace aarch64-insn.o with arch/aarch64-insn.o.
3663
3664 2017-10-06 Yao Qi <yao.qi@linaro.org>
3665
3666 * Makefile.in (ALL_TARGET_OBS): Replace arm.o, arm-get-next-pcs.o,
3667 and arm-linux.o with arch/arm.o, arch/arm-get-next-pcs.o and
3668 arch/arm-linux.o respectively.
3669 * configure.tgt: Likewise.
3670
3671 2017-10-06 Yao Qi <yao.qi@linaro.org>
3672
3673 * Makefile.in (ALL_TARGET_OBS): Rename i386.o to arch/i386.o.
3674 * configure.tgt (i386_tobjs): Replace i386.o with arch/i386.o.
3675
3676 2017-10-06 Pedro Alves <palves@redhat.com>
3677
3678 * windows-nat.c: Include <algorithm>.
3679
3680 2017-10-06 Yao Qi <yao.qi@linaro.org>
3681
3682 * configure.tgt (i386_tobjs): New variable.
3683 (amd64_tobjs): New variable.
3684 Set $cpu_obs and $os_obs.
3685
3686 2017-10-06 Yao Qi <yao.qi@linaro.org>
3687
3688 * Makefile.in (CONFIG_SRC_SUBDIR): New.
3689 (ALL_64_TARGET_OBS): Replace amd64.o with arch/amd64.o.
3690 (clean): Remove object files and dependency files.
3691 (distclean): Remove the directory.
3692 * configure.ac: Invoke AC_CONFIG_COMMANDS.
3693 * configure: Re-generated.
3694 * configure.tgt: Replace amd64.o with arch/amd64.o.
3695
3696 2017-10-05 Jose E. Marchesi <jose.marchesi@oracle.com>
3697
3698 PR build/22188
3699 * arm-tdep.c (arm_decode_misc_memhint_neon): Fix decoding of CPS
3700 and SETEND.
3701
3702 2017-10-05 Pedro Alves <palves@redhat.com>
3703
3704 * linux-nat.c (linux_child_follow_fork): When following the parent
3705 and detaching the child, consult the parent thread's architecture
3706 instead of the child's.
3707
3708 2017-10-05 Ulrich Weigand <uweigand@de.ibm.com>
3709
3710 * ax.h: Do not include "doublest.h".
3711 (union agent_val): Remove.
3712
3713 2017-10-05 Ulrich Weigand <uweigand@de.ibm.com>
3714
3715 * dfp.h (MAX_DECIMAL_STRING): Move to dfp.c.
3716 (decimal_to_string): Return std::string object.
3717 (decimal_from_string): Accept std::string object. Return bool.
3718 (decimal_from_integral, decimal_from_doublest): Remove.
3719 (decimal_from_longest): Add prototype.
3720 (decimal_from_ulongest): Likewise.
3721 (decimal_to_longest): Likewise.
3722 (decimal_from_doublest): Likewise.
3723 * dfp.c: Do not include "gdbtypes.h" or "value.h".
3724 (MAX_DECIMAL_STRING): Move here.
3725 (decimal_to_string): Return std::string object.
3726 (decimal_from_string): Accept std::string object. Return bool.
3727 (decimal_from_integral): Remove, replace by ...
3728 (decimal_from_longest, decimal_from_ulongest): ... these new functions.
3729 (decimal_to_longest): New function.
3730 (decimal_from_floating): Remove, replace by ...
3731 (decimal_from_doublest): ... this new function.
3732 (decimal_to_doublest): Update to new decimal_to_string interface.
3733
3734 * value.c (unpack_long): Use decimal_to_longest.
3735 * valops.c (value_cast): Use decimal_from_doublest instead of
3736 decimal_from_floating. Use decimal_from_[u]longest isntead of
3737 decimal_from_integral.
3738 * valarith.c (value_args_as_decimal): Likewise.
3739 * valprint.c (print_decimal_floating): Update to new
3740 decimal_to_string interface.
3741 * printcmd.c (printf_decfloat): Likewise.
3742 * c-exp.y (parse_number): Update to new decimal_from_string interface.
3743
3744 2017-10-05 Ulrich Weigand <uweigand@de.ibm.com>
3745
3746 * doublest.h: Do not include "floatformat.h". Remove stale comments.
3747 * gdbtypes.c: Include "floatformat.h".
3748 * value.c: Likewise.
3749 * m68k-tdep.c: Likewise.
3750
3751 * findvar.c: Do not include "floatformat.h".
3752 * amd64-darwin-tdep.c: Likewise.
3753 * arm-linux-tdep.c: Likewise.
3754 * i386-darwin-tdep.c: Likewise.
3755 * i387-tdep.c: Likewise.
3756 * m68k-linux-tdep.c: Likewise.
3757 * mep-tdep.c: Likewise.
3758 * mips-tdep.c: Likewise.
3759 * nios2-tdep.c: Likewise.
3760 * s390-linux-tdep.c: Likewise.
3761 * sparc-obsd-tdep.c: Likewise.
3762 * sparc-tdep.c: Likewise.
3763 * sparc64-tdep.c: Likewise.
3764 * spu-tdep.c: Likewise.
3765 * tic6x-tdep.c: Likewise.
3766 * tilegx-tdep.c: Likewise.
3767 * vax-tdep.c: Likewise.
3768 * xstormy16-tdep.c: Likewise.
3769 * xtensa-tdep.c: Likewise.
3770
3771 * top.c: Do not include "doublest.h".
3772 * aarch64-tdep.c: Likewise.
3773 * alpha-tdep.c: Likewise.
3774 * arm-linux-tdep.c: Likewise.
3775 * m68k-linux-tdep.c: Likewise.
3776 * tilegx-tdep.c: Likewise.
3777 * xstormy16-tdep.c: Likewise.
3778
3779 2017-10-05 John Baldwin <jhb@FreeBSD.org>
3780
3781 * mips-fbsd-tdep.c (MIPS_INST_ADDIU_A0_SP_N32): Define.
3782 (mipsn32_fbsd_sigframe): Define.
3783 (mips_fbsd_init_abi): Install mipsn32_fbsd_sigframe unwinder
3784 for FreeBSD/mipsn32.
3785
3786 2017-10-05 John Baldwin <jhb@FreeBSD.org>
3787
3788 * fbsd-tdep.c (fbsd_print_auxv_entry): Handle AT_EHDRFLAGS and
3789 AT_HWCAP.
3790
3791 2017-10-05 Tristan Gingold <tgingold@free.fr>
3792
3793 * MAINTAINERS (Misc): Update my email address.
3794
3795 2017-10-04 Pedro Alves <palves@redhat.com>
3796
3797 * remote.c (get_remote_arch_state): New 'gdbarch' parameter. Use
3798 it instead of target_gdbarch.
3799 (get_remote_state, get_remote_packet_size): Adjust
3800 get_remote_arch_state calls, passing down target_gdbarch
3801 explicitly.
3802 (packet_reg_from_regnum, packet_reg_from_pnum): New parameter
3803 'gdbarch' and use it instead of target_gdbarch.
3804 (get_memory_packet_size): Adjust get_remote_arch_state calls,
3805 passing down target_gdbarch explicitly.
3806 (struct stop_reply) <arch>: New field.
3807 (remote_parse_stop_reply): Use the stopped thread's architecture,
3808 not the current inferior's. Save the architecture in the
3809 stop_reply.
3810 (process_stop_reply): Use the stop reply's architecture.
3811 (process_g_packet, remote_fetch_registers)
3812 (remote_prepare_to_store, store_registers_using_G)
3813 (remote_store_registers): Adjust get_remote_arch_state calls,
3814 using the regcache's architecture.
3815 (remote_get_trace_status): Adjust get_remote_arch_state calls,
3816 passing down target_gdbarch explicitly.
3817 * spu-multiarch.c (spu_thread_architecture): Defer to the target
3818 beneath instead of calling target_gdbarch.
3819 * target.c (default_thread_architecture): Use the specified
3820 inferior's architecture, instead of the current inferior's
3821 architecture (via target_gdbarch).
3822
3823 2017-10-04 Pedro Alves <palves@redhat.com>
3824
3825 * regcache.c (get_thread_arch_regcache): Remove null_ptid special
3826 case.
3827 (regcache_print): Handle !target_has_registers here instead.
3828
3829 2017-10-04 Pedro Alves <palves@redhat.com>
3830
3831 * frame.c (create_test_frame): Delete.
3832 * frame.h (create_test_frame): Delete.
3833 * gdbarch-selftests.c: Include gdbthread.h and target.h.
3834 (class regcache_test): Delete.
3835 (test_target_has_registers, test_target_has_stack)
3836 (test_target_has_memory, test_target_prepare_to_store)
3837 (test_target_store_registers): New functions.
3838 (test_target_ops): New class.
3839 (register_to_value_test): Error out if there's already a
3840 process_stratum (or higher) target pushed. Create a fuller mock
3841 environment, with mock target_ops, inferior, address space, thread
3842 and inferior_ptid.
3843 * progspace.c (struct address_space): Move to ...
3844 * progspace.h (struct address_space): ... here.
3845 * regcache.h (regcache::~regcache, regcache::raw_write)
3846 [GDB_SELF_TEST]: No longer virtual.
3847
3848 2017-10-04 Simon Marchi <simon.marchi@ericsson.com>
3849
3850 * mi/mi-main.c (list_available_thread_groups): Reverse filter logic.
3851
3852 2017-10-04 Pedro Alves <palves@redhat.com>
3853
3854 * guile/scm-breakpoint.c (gdbscm_breakpoint_commands): Move code
3855 out of 'between TRY and CATCH'.
3856
3857 2017-10-04 Pedro Alves <palves@redhat.com>
3858
3859 * cli/cli-cmds.c (complete_command): Add missing END_CATCH.
3860 * common/common-exceptions.h (TRY): Open an outermost scope.
3861 Expand intro comment.
3862 (CATCH): Reindent.
3863 (END_CATCH): Close the outermost scope.
3864 * completer.c (complete_line_internal): Add missing END_CATCH.
3865
3866 2017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
3867
3868 * NEWS (Changes since GDB 8.0): Add entry about new
3869 'set-cwd-on-gdbserver' feature.
3870 (New remote packets): Add entry for QSetWorkingDir.
3871 * common/common-inferior.h (set_inferior_cwd): New prototype.
3872 * infcmd.c (set_inferior_cwd): Remove "static".
3873 (show_cwd_command): Expand text to include remote debugging.
3874 * remote.c: Add PACKET_QSetWorkingDir.
3875 (remote_protocol_features) <QSetWorkingDir>: New entry for
3876 PACKET_QSetWorkingDir.
3877 (extended_remote_set_inferior_cwd): New function.
3878 (extended_remote_create_inferior): Call
3879 "extended_remote_set_inferior_cwd".
3880 (_initialize_remote): Call "add_packet_config_cmd" for
3881 QSetWorkingDir.
3882
3883 2017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
3884
3885 * NEWS (New commands): Mention "set/show cwd".
3886 * cli/cli-cmds.c (_initialize_cli_cmds): Mention "set cwd" on
3887 "cd" command's help text.
3888 * common/common-inferior.h (get_inferior_cwd): New prototype.
3889 * infcmd.c (inferior_cwd_scratch): New global variable.
3890 (set_inferior_cwd): New function.
3891 (get_inferior_cwd): Likewise.
3892 (set_cwd_command): Likewise.
3893 (show_cwd_command): Likewise.
3894 (_initialize_infcmd): Add "set/show cwd" commands.
3895 * inferior.h (class inferior) <cwd>: New field.
3896 * nat/fork-inferior.c: Include "gdb_tilde_expand.h".
3897 (fork_inferior): Change inferior's cwd before its execution.
3898 * windows-nat.c (windows_create_inferior): Pass inferior's cwd
3899 to CreateProcess.
3900
3901 2017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
3902
3903 * Makefile.in (SFILES): Add gdb_tilde_expand.c.
3904 (HFILES_NO_SRCDIR): Add gdb_tilde_expand.h.
3905 (COMMON_OBS): Add gdb_tilde_expand.o.
3906 * common/gdb_tilde_expand.c: New file.
3907 * common/gdb_tilde_expand.h: Likewise.
3908
3909 2017-10-03 Maciej W. Rozycki <macro@imgtec.com>
3910
3911 * gdbarch.sh (objfile): Remove duplicate declaration.
3912 * gdbarch.h: Regenerate.
3913
3914 2017-10-03 Tom Tromey <tom@tromey.com>
3915
3916 * utils.c (internal_vproblem): Use string_vprintf.
3917
3918 2017-10-03 Tom Tromey <tom@tromey.com>
3919
3920 * printcmd.c (info_symbol_command): Use std::string.
3921
3922 2017-10-03 Tom Tromey <tom@tromey.com>
3923
3924 * top.c (gdb_safe_append_history): Use std::string.
3925
3926 2017-10-03 Tom Tromey <tom@tromey.com>
3927
3928 * event-top.c (stdin_event_handler): Update.
3929 * main.c (captured_main_1): Update.
3930 * top.h (make_delete_ui_cleanup): Remove.
3931 (struct ui): Add constructor and destructor.
3932 (new_ui, delete_ui): Remove.
3933 * top.c (make_delete_ui_cleanup): Remove.
3934 (new_ui_command): Use std::unique_ptr.
3935 (delete_ui_cleanup): Remove.
3936 (ui::ui): Rename from new_ui. Update.
3937 (free_ui): Remove.
3938 (ui::~ui): Rename from delete_ui. Update.
3939
3940 2017-10-03 Tom Tromey <tom@tromey.com>
3941
3942 * symfile.c (load_progress): Use gdb::byte_vector.
3943
3944 2017-10-03 Tom Tromey <tom@tromey.com>
3945
3946 * mi/mi-main.c (mi_cmd_trace_frame_collected): Remove unused
3947 declaration.
3948 * printcmd.c (x_command): Remove unused declaration.
3949 * symfile.c (symbol_file_command): Remove unused declaration.
3950
3951 2017-10-03 Tom Tromey <tom@tromey.com>
3952
3953 * utils.c (internal_vproblem): Use std::string.
3954 (defaulted_query): Likewise.
3955
3956 2017-10-03 Tom Tromey <tom@tromey.com>
3957
3958 * guile/scm-ports.c (ioscm_with_output_to_port_worker): Update.
3959 * top.c (execute_command_to_string): Update.
3960 * utils.c (make_cleanup_restore_page_info): Remove.
3961 (do_restore_page_info_cleanup): Remove.
3962 (set_batch_flag_and_restore_page_info):
3963 New.
3964 (make_cleanup_restore_page_info): Remove.
3965 (set_batch_flag_and_make_cleanup_restore_page_info): Remove.
3966 (~set_batch_flag_and_restore_page_info): New
3967 (make_cleanup_restore_uinteger): Remove.
3968 (make_cleanup_restore_integer): Remove.
3969 (struct restore_integer_closure): Remove.
3970 (restore_integer): Remove.
3971 * utils.h (struct set_batch_flag_and_restore_page_info): New
3972 class.
3973 (set_batch_flag_and_make_cleanup_restore_page_info): Remove.
3974 (make_cleanup_restore_page_info): Remove.
3975 (make_cleanup_restore_uinteger) Remove.
3976 (make_cleanup_restore_integer) Remove.
3977
3978 2017-10-03 Tom Tromey <tom@tromey.com>
3979
3980 * record-full.h (record_full_gdb_operation_disable_set): Return
3981 scoped_restore_tmpl<int>.
3982 * infrun.c (adjust_pc_after_break): Update.
3983 (handle_signal_stop): Update.
3984 * record-full.c (record_full_gdb_operation_disable_set): Return
3985 scoped_restore_tmpl<int>.
3986 (record_full_wait_1, record_full_insert_breakpoint)
3987 (record_full_remove_breakpoint, record_full_save)
3988 (record_full_goto_insn): Update.
3989
3990 2017-10-02 Tom Tromey <tom@tromey.com>
3991
3992 PR rust/22236:
3993 * rust-lang.c (rust_val_print_str): New function.
3994 (val_print_struct): Call it.
3995 (rust_subscript): Preserve name of slice type.
3996
3997 2017-10-02 Tom Tromey <tom@tromey.com>
3998
3999 * rust-lang.c (rust_subscript): Handle slices in
4000 EVAL_AVOID_SIDE_EFFECTS case.
4001
4002 2017-10-02 Tom Tromey <tom@tromey.com>
4003
4004 * rust-lang.c (rust_slice_type_p): Recognize &str as a slice type.
4005
4006 2017-10-02 Tom Tromey <tom@tromey.com>
4007
4008 * rust-lang.h (rust_slice_type): Add "extern".
4009
4010 2017-10-02 Tom Tromey <tom@tromey.com>
4011 Pedro Alves <palves@redhat.com>
4012
4013 * ada-lang.h (ada_exc_info::operator<): Make const.
4014 (ada_exc_info::operator==): Make const.
4015 * ada-lang.c (ada_exc_info::operator<, ada_exc_info::operator==):
4016 Make const.
4017
4018 2017-09-29 Tom Tromey <tom@tromey.com>
4019
4020 * target.c (read_whatever_is_readable): Change type of "result".
4021 Update.
4022 (free_memory_read_result_vector): Remove.
4023 (read_memory_robust): Change return type. Update.
4024 * mi/mi-main.c (mi_cmd_data_read_memory_bytes): Update. Use
4025 bin2hex, std::string.
4026 * target.h (memory_read_result_s): Remove typedef.
4027 (free_memory_read_result_vector): Remove.
4028 (read_memory_robust): Return std::vector.
4029
4030 2017-09-29 Tom Tromey <tom@tromey.com>
4031
4032 * mi/mi-main.c (captured_mi_execute_command): Use scope_restore.
4033
4034 2017-09-29 Tom Tromey <tom@tromey.com>
4035
4036 * mi/mi-cmd-info.c (mi_cmd_info_ada_exceptions): Update.
4037 * ada-lang.h (struct ada_exc_info): Remove typedef. Declare
4038 operator< and operator==.
4039 (ada_exceptions_list): Return a std::vector.
4040 * ada-lang.c (ada_exc_info::operator<): Rename from
4041 compare_ada_exception_info.
4042 (ada_exc_info::operator==): New.
4043 (sort_remove_dups_ada_exceptions_list): Change type of
4044 "exceptions".
4045 (ada_add_standard_exceptions, ada_add_exceptions_from_frame)
4046 (ada_add_global_exceptions): Likewise.
4047 (ada_exceptions_list_1): Return a std::vector.
4048 (ada_exceptions_list): Likewise.
4049
4050 2017-09-29 Tom Tromey <tom@tromey.com>
4051
4052 * mi/mi-main.c (struct print_one_inferior_data) <inferiors>: Now a
4053 'std::set *'.
4054 (print_one_inferior): Update.
4055 (free_vector_of_ints): Remove.
4056 (list_available_thread_groups): Change "ids" to std::set.
4057 (mi_cmd_list_thread_groups): Update.
4058 (struct collect_cores_data) <core>: Now a std::set.
4059 (collect_cores): Update.
4060 (unique): Remove.
4061 (print_one_inferior): Update.
4062
4063 2017-09-29 Tom Tromey <tom@tromey.com>
4064
4065 * mi/mi-main.c (mi_execute_cli_command): Use std::string.
4066 (mi_execute_async_cli_command): Likewise.
4067 (mi_cmd_trace_frame_collected): Use field_fmt.
4068
4069 2017-09-29 Tom Tromey <tom@tromey.com>
4070
4071 * mi/mi-main.c (mi_cmd_data_write_memory_bytes): Use
4072 gdb::byte_vector.
4073
4074 2017-09-29 Tom Tromey <tom@tromey.com>
4075
4076 * mi/mi-parse.c (mi_parse): Remove unused declaration.
4077
4078 2017-09-29 Tom Tromey <tom@tromey.com>
4079
4080 * mi/mi-cmd-disas.c (mi_cmd_disassemble): Don't copy "oarg".
4081
4082 2017-09-29 Tom Tromey <tom@tromey.com>
4083
4084 * varobj.h (varobj_gen_name): Return std::string.
4085 * varobj.c (varobj_gen_name): Return std::string.
4086 * mi/mi-cmd-var.c (mi_cmd_var_create): Use std::string.
4087 (mi_cmd_var_delete): Don't copy "name".
4088
4089 2017-09-29 Tom Tromey <tom@tromey.com>
4090
4091 * mi/mi-cmd-break.c (mi_argv_to_format): Return std::string.
4092 (mi_cmd_break_insert_1): Update.
4093
4094 2017-09-29 Tom Tromey <tom@tromey.com>
4095
4096 * target.h (make_scoped_defer_target_commit_resume): Update.
4097 * target.c (make_scoped_defer_target_commit_resume): Rename from
4098 make_cleanup_defer_target_commit_resume. Return a
4099 scoped_restore.
4100 * infrun.c (proceed): Use make_scoped_defer_target_commit_resume.
4101
4102 2017-09-29 Tom Tromey <tom@tromey.com>
4103
4104 * main.c (captured_main_1): Remove unused declaration.
4105 * spu-multiarch.c (parse_spufs_run): Remove unused declaration.
4106
4107 2017-09-29 Tom Tromey <tom@tromey.com>
4108
4109 * symtab.c (search_symbols): Remove unused outer cleanup.
4110 (make_source_files_completion_list): Remove unused declaration.
4111
4112 2017-09-29 Tom Tromey <tom@tromey.com>
4113
4114 * mt-tdep.c (mt_push_dummy_call): Use gdb::byte_vector.
4115
4116 2017-09-29 Tom Tromey <tom@tromey.com>
4117
4118 * xstormy16-tdep.c (xstormy16_push_dummy_call): Use
4119 gdb::byte_vector.
4120
4121 2017-09-29 Tom Tromey <tom@tromey.com>
4122
4123 * complaints.c (vcomplaint): Use std::string.
4124
4125 2017-09-29 Tom Tromey <tom@tromey.com>
4126
4127 * tracepoint.c (trace_variable_command): Use std::string.
4128 (encode_actions_1): Remove unused declarations.
4129 (create_tsv_from_upload): Use std::string.
4130
4131 2017-09-29 Tom Tromey <tom@tromey.com>
4132
4133 * cp-support.c (gdb_demangle): Use std::string.
4134
4135 2017-09-29 Tom Tromey <tom@tromey.com>
4136
4137 * stack.c (parse_frame_specification): Use std::string
4138 (info_frame_command): Use gdb::unique_xmalloc_ptr.
4139
4140 2017-09-29 Tom Tromey <tom@tromey.com>
4141
4142 * tilegx-tdep.c (tilegx_push_dummy_call): Use gdb::byte_vector.
4143
4144 2017-09-29 Tom Tromey <tom@tromey.com>
4145
4146 * utils.c (vfprintf_maybe_filtered): Use std::string.
4147 (vfprintf_unfiltered): Likewise.
4148
4149 2017-09-29 Tom Tromey <tom@tromey.com>
4150
4151 * event-top.c (top_level_prompt): Return std::string.
4152 (display_gdb_prompt): Update.
4153
4154 2017-09-29 Tom Tromey <tom@tromey.com>
4155
4156 * unittests/common-utils-selftests.c (format): New function.
4157 (string_vprintf_tests): New function.
4158 (_initialize_common_utils_selftests): Register new tests.
4159 * common/common-utils.c (string_vprintf): New function.
4160 * common/common-utils.h (string_vprintf): Declare.
4161
4162 2017-09-29 Pedro Alves <palves@redhat.com>
4163
4164 * common/rsp-low.c (unpack_varlen_hex): Constify.
4165 * common/rsp-low.h (unpack_varlen_hex): Constify.
4166 * linux-nat.c (linux_child_static_tracepoint_markers_by_strid):
4167 Constify.
4168 * remote.c (remote_set_permissions, read_ptid)
4169 (remote_current_thread, remote_get_threads_with_qthreadinfo)
4170 (remote_static_tracepoint_marker_at)
4171 (remote_static_tracepoint_markers_by_strid)
4172 (stop_reply_extract_thread, remote_parse_stop_reply): Constify.
4173 * tracepoint.c (parse_trace_status, parse_tracepoint_status)
4174 (parse_tracepoint_definition, parse_tsv_definition)
4175 (parse_static_tracepoint_marker_definition): Constify.
4176 * tracepoint.h (parse_static_tracepoint_marker_definition)
4177 (parse_trace_status, parse_tracepoint_status)
4178 (parse_tracepoint_definition, parse_tsv_definition): Constify.
4179
4180 2017-09-29 Pedro Alves <palves@redhat.com>
4181
4182 * remote.c (target_buf, target_buf_size): Delete.
4183 (remote_get_noisy_reply): Remove buf_p and sizeof_buf parameters.
4184 Use the connection's packet buffer instead.
4185 All callers adjusted.
4186 (_initialize_remote): Remove references to target_buf and
4187 target_buf_size.
4188
4189 2017-09-28 Pedro Alves <palves@redhat.com>
4190
4191 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
4192 unittests/common-utils-selftests.c.
4193 (SUBDIR_UNITTESTS_OBS): Add common-utils-selftests.o.
4194 (COMMON_OBS): Remove utils-selftests.o.
4195 * utils-selftests.c: Move to ...
4196 * unittests/common-utils-selftests.c: ... here and rename self
4197 test to "string_printf".
4198
4199 2017-09-28 Alexander Shaposhnikov <alexander.v.shaposhnikov@gmail.com> (tiny patch)
4200
4201 * dwarf2read.c (open_and_init_dwp_file): Protect against dwp_file
4202 having NULL cus or tus.
4203
4204 2017-09-27 Ulrich Weigand <uweigand@de.ibm.com>
4205
4206 * arm-tdep.c: (convert_from_extended): Remove.
4207 (convert_to_extended): Likewise.
4208 (arm_extract_return_value): Use convert_typed_floating.
4209 (arm_store_return_value): Likewise.
4210
4211 * sh-tdep.h (struct gdbarch_tdep): Add sh_littlebyte_bigword_type.
4212 * sh-tdep.c: Do not include "floatformat.h".
4213 (sh_littlebyte_bigword_type): New function.
4214 (sh_register_convert_to_virtual): Use convert_typed_floating.
4215 (sh_register_convert_to_raw): Likewise.
4216 * sh64-tdep.c: (struct gdbarch_tdep): Add sh_littlebyte_bigword_type.
4217 (sh64_littlebyte_bigword_type): New function.
4218 (sh64_extract_return_value): Use convert_typed_floating.
4219 (sh64_register_convert_to_virtual): Likewise.
4220 (sh64_register_convert_to_raw): Likewise.
4221
4222 2017-09-27 Ulrich Weigand <uweigand@de.ibm.com>
4223
4224 * doublest.h (floatformat_from_type): Move to gdbtypes.h.
4225 * doublest.c (floatformat_from_type): Move to gdbtypes.c.
4226
4227 * gdbtypes.h (union type_specific): Make field floatformat hold
4228 just a single struct floatformat, not an array.
4229 (floatformat_from_type): Move here.
4230 * gdbtypes.c (floatformat_from_type): Move here. Update to
4231 changed TYPE_FLOATFORMAT definition.
4232 (verify_floatformat): Update to changed TYPE_FLOATFORMAT.
4233 (recursive_dump_type): Likewise.
4234 (init_float_type): Install correct floatformat for byte order.
4235 (arch_float_type): Likewise.
4236
4237 2017-09-27 Ulrich Weigand <uweigand@de.ibm.com>
4238
4239 * gdbtypes.c (init_type): Change incoming argument from
4240 length-in-bytes to length-in-bits. Assert length is a
4241 multiple of TARGET_CHAR_BITS.
4242 (arch_type, arch_flags_type): Likewise.
4243 (init_integer_type): Update call to init_type.
4244 (init_character_type): Likewise.
4245 (init_boolean_type): Likewise.
4246 (init_float_type): Likewise.
4247 (init_decfloat_type): Likewise.
4248 (init_complex_type): Likewise.
4249 (init_pointer_type): Likewise.
4250 (objfile_type): Likewise.
4251 (arch_integer_type): Update call to arch_type.
4252 (arch_character_type): Likewise.
4253 (arch_boolean_type): Likewise.
4254 (arch_float_type): Likewise.
4255 (arch_decfloat_type): Likewise.
4256 (arch_complex_type): Likewise.
4257 (arch_pointer_type): Likewise.
4258 (gdbtypes_post_init): Likewise.
4259
4260 * dwarf2read.c (dwarf2_init_float_type): Update call to init_type.
4261 (read_base_type): Likewise.
4262 * mdebugread.c (basic_type): Likewise.
4263 * stabsread.c (dbx_init_float_type): Likewise.
4264 (rs6000_builtin_type): Likewise.
4265 (read_range_type): Likewise. Also, fix call to init_integer_type
4266 with erroneous length argument.
4267
4268 * ada-lang.c (ada_language_arch_info): Update call to arch_type.
4269 * d-lang.c (build_d_types): Likewise.
4270 * f-lang.c (build_fortran_types): Likewise.
4271 * go-lang.c (build_go_types): Likewise.
4272 * opencl-lang.c (build_opencl_types): Likewise.
4273 * jit.c (finalize_symtab): Likewise.
4274 * gnu-v3-abi.c (build_gdb_vtable_type): Likewise.
4275 (build_std_type_info_type): Likewise.
4276 * target-descriptions.c (tdesc_gdb_type): Likewise. Also,
4277 update call to arch_flags_type.
4278
4279 * linux-tdep.c (linux_get_siginfo_type_with_fields): Update call to
4280 arch_type.
4281 * fbsd-tdep.c (fbsd_get_siginfo_type): Likewise.
4282 * windows-tdep.c (windows_get_tlb_type): Likewise.
4283
4284 * avr-tdep.c (avr_gdbarch_init): Update call to arch_type.
4285 * ft32-tdep.c (ft32_gdbarch_init): Likewise.
4286 * m32c-tdep.c (make_types): Likewise.
4287 * rl78-tdep.c (rl78_gdbarch_init): Likewise.
4288 (rl78_psw_type): Update call to arch_flags_type.
4289 * m68k-tdep.c (m68k_ps_type): Update call to arch_flags_type.
4290 * rx-tdep.c (rx_psw_type): Likewise.
4291 (rx_fpsw_type): Likewise.
4292 * sparc-tdep.c (sparc_psr_type): Likewise.
4293 (sparc_fsr_type): Likewise.
4294 * sparc64-tdep.c (sparc64_pstate_type): Likewise.
4295 (sparc64_ccr_type): Likewise.
4296 (sparc64_fsr_type): Likewise.
4297 (sparc64_fprs_type): Likewise.
4298
4299 2017-09-27 Tom Tromey <tom@tromey.com>
4300
4301 * findcmd.c (find_command): Constify.
4302
4303 2017-09-27 Tom Tromey <tom@tromey.com>
4304
4305 * ada-tasks.c (task_command_1, task_command): Constify.
4306
4307 2017-09-27 Tom Tromey <tom@tromey.com>
4308
4309 * symtab.c (maintenance_print_symbol_cache)
4310 (maintenance_flush_symbol_cache)
4311 (maintenance_print_symbol_cache_statistics): Constify.
4312
4313 2017-09-27 Tom Tromey <tom@tromey.com>
4314
4315 * inferior.c (detach_inferior_command, kill_inferior_command)
4316 (inferior_command): Constify.
4317
4318 2017-09-27 Tom Tromey <tom@tromey.com>
4319
4320 * regcache.c (regcache_print, maintenance_print_registers)
4321 (maintenance_print_raw_registers)
4322 (maintenance_print_cooked_registers)
4323 (maintenance_print_register_groups)
4324 (maintenance_print_remote_registers): Constify.
4325
4326 2017-09-27 Tom Tromey <tom@tromey.com>
4327
4328 * printcmd.c (map_display_numbers, undisplay_command)
4329 (enable_disable_display_command, enable_display_command)
4330 (disable_display_command): Constify.
4331
4332 2017-09-27 Tom Tromey <tom@tromey.com>
4333
4334 * breakpoint.h (delete_command): Don't declare.
4335 * breakpoint.c (delete_command, enable_once_command)
4336 (enable_count_command, enable_delete_command, breakpoint_1)
4337 (maintenance_info_breakpoints, stopin_command, stopat_command)
4338 (delete_command, delete_trace_command, save_breakpoints)
4339 (save_breakpoints_command, save_tracepoints_command): Constify.
4340
4341 2017-09-27 Tom Tromey <tom@tromey.com>
4342
4343 * macrocmd.c (macro_expand_command, macro_expand_once_command)
4344 (skip_ws, extract_identifier, macro_define_command)
4345 (macro_undef_command, macro_list_command): Constify.
4346
4347 2017-09-27 Tom Tromey <tom@tromey.com>
4348
4349 * infcmd.c (environment_info, set_environment_command)
4350 (unset_environment_command, path_info, info_proc_cmd_1)
4351 (info_proc_cmd_mappings, info_proc_cmd_stat)
4352 (info_proc_cmd_status, info_proc_cmd_cwd, info_proc_cmd_cmdline)
4353 (info_proc_cmd_exe, info_proc_cmd_all): Constify.
4354
4355 2017-09-27 Tom Tromey <tom@tromey.com>
4356
4357 * i386-tdep.c (i386_mpx_info_bounds, i386_mpx_set_bounds):
4358 Constify.
4359
4360 2017-09-27 Tom Tromey <tom@tromey.com>
4361
4362 * symfile-mem.c (add_symbol_file_from_memory_command): Constify.
4363
4364 2017-09-27 Tom Tromey <tom@tromey.com>
4365
4366 * demangle.c (demangle_command): Constify.
4367
4368 2017-09-27 Tom Tromey <tom@tromey.com>
4369
4370 * progspace.c (maintenance_info_program_spaces_command):
4371 Constify.
4372
4373 2017-09-27 Tom Tromey <tom@tromey.com>
4374
4375 * compile/compile.c (check_raw_argument, compile_file_command)
4376 (compile_code_command, compile_print_command): Constify.
4377
4378 2017-09-27 Tom Tromey <tom@tromey.com>
4379
4380 * reggroups.c (maintenance_print_reggroups): Constify.
4381
4382 2017-09-27 Tom Tromey <tom@tromey.com>
4383
4384 * dwarf2read.c (save_gdb_index_command): Constify.
4385
4386 2017-09-27 Tom Tromey <tom@tromey.com>
4387
4388 * stap-probe.c (info_probes_stap_command): Constify.
4389
4390 2017-09-27 Tom Tromey <tom@tromey.com>
4391
4392 * fork-child.c (unset_exec_wrapper_command): Constify.
4393
4394 2017-09-27 Tom Tromey <tom@tromey.com>
4395
4396 * btrace.c (get_uint, get_context_size, no_chunk)
4397 (maint_btrace_packet_history_cmd)
4398 (maint_btrace_clear_packet_history_cmd, maint_btrace_clear_cmd)
4399 (maint_info_btrace_cmd): Constify.
4400
4401 2017-09-27 Tom Tromey <tom@tromey.com>
4402
4403 * reverse.c (delete_bookmark_command): Constify.
4404
4405 2017-09-27 Tom Tromey <tom@tromey.com>
4406
4407 * remote.c (set_memory_packet_size)
4408 (set_memory_write_packet_size, show_memory_write_packet_size)
4409 (set_memory_read_packet_size, show_memory_read_packet_size)
4410 (compare_sections_command, packet_command, remote_put_command)
4411 (remote_get_command, remote_delete_command): Constify.
4412
4413 2017-09-27 Tom Tromey <tom@tromey.com>
4414
4415 * mips-tdep.c (show_mipsfpu_command, set_mipsfpu_single_command)
4416 (set_mipsfpu_double_command, set_mipsfpu_none_command)
4417 (set_mipsfpu_auto_command): Constify.
4418
4419 2017-09-27 Tom Tromey <tom@tromey.com>
4420
4421 * cli/cli-cmds.h (cd_command): Constify.
4422 * cli/cli-cmds.c (cd_command): Constify.
4423
4424 2017-09-27 Tom Tromey <tom@tromey.com>
4425
4426 * thread.c (thread_name_command, thread_find_command): Constify.
4427
4428 2017-09-27 Tom Tromey <tom@tromey.com>
4429
4430 * probe.c (enable_probes_command, disable_probes_command):
4431 Constify.
4432
4433 2017-09-27 Tom Tromey <tom@tromey.com>
4434
4435 * symfile.c (symbol_file_command): Constify.
4436 * gdbcore.h (deprecated_file_changed_hook): Constify.
4437 * exec.c (deprecated_file_changed_hook, exec_file_command)
4438 (file_command): Constify.
4439 * defs.h (symbol_file_command): Constify.
4440
4441 2017-09-27 Tom Tromey <tom@tromey.com>
4442
4443 * remote-fileio.c (set_system_call_allowed)
4444 (show_system_call_allowed): Constify.
4445
4446 2017-09-27 Tom Tromey <tom@tromey.com>
4447
4448 * tracepoint.c (delete_trace_variable_command)
4449 (tfind_end_command, tfind_start_command, tfind_pc_command)
4450 (tfind_tracepoint_command, tfind_line_command)
4451 (tfind_range_command, tfind_outside_command): Constify.
4452
4453 2017-09-27 Tom Tromey <tom@tromey.com>
4454
4455 * ax-gdb.c (maint_agent_printf_command, agent_command)
4456 (agent_eval_command): Constify.
4457
4458 2017-09-27 Tom Tromey <tom@tromey.com>
4459
4460 * tracepoint.c (info_scope_command): Constify.
4461 * python/python.c (gdbpy_decode_line): Constify.
4462 * python/py-breakpoint.c (bppy_init): Constify.
4463 * mi/mi-cmd-break.c (mi_cmd_break_insert_1): Constify.
4464 * location.h: (new_linespec_location)
4465 (string_to_event_location_basic, string_to_event_location):
4466 Constify.
4467 * location.c (new_linespec_location)
4468 (string_to_event_location_basic, string_to_event_location):
4469 Constify.
4470 * linespec.h (decode_line_with_current_source)
4471 (decode_line_with_last_displayed, linespec_lex_to_end): Constify.
4472 * linespec.c (linespec_lex_to_end)
4473 (decode_line_with_current_source)
4474 (decode_line_with_last_displayed): Constify.
4475 * guile/scm-breakpoint.c (gdbscm_register_breakpoint_x):
4476 Constify.
4477 * cli/cli-cmds.c (edit_command, list_command): Constify.
4478 * breakpoint.h (until_break_command, watch_command_wrapper)
4479 (awatch_command_wrapper, rwatch_command_wrapper)
4480 (init_ada_exception_breakpoint): Constify.
4481 * breakpoint.c (break_command_1, dprintf_command)
4482 (break_range_command, watch_command_wrapper)
4483 (rwatch_command_wrapper, awatch_command_wrapper)
4484 (until_break_command, init_ada_exception_breakpoint)
4485 (strace_marker_create_sals_from_location, trace_command)
4486 (ftrace_command, strace_command, struct tracepoint): Constify.
4487 * ax-gdb.c (agent_command_1): Constify.
4488 * ada-lang.c (ada_exception_sal): Constify.
4489
4490 2017-09-27 Tom Tromey <tom@tromey.com>
4491
4492 * record.c (cmd_record_delete, cmd_record_stop, cmd_record_save)
4493 (cmd_record_goto_begin, cmd_record_goto_end, get_insn_number)
4494 (get_context_size, no_chunk, get_insn_history_modifiers)
4495 (cmd_record_insn_history, get_call_history_modifiers)
4496 (cmd_record_call_history): Constify.
4497
4498 2017-09-27 Tom Tromey <tom@tromey.com>
4499
4500 * source.c (show_substitute_path_command)
4501 (unset_substitute_path_command, set_substitute_path_command):
4502 Constify.
4503
4504 2017-09-27 Tom Tromey <tom@tromey.com>
4505
4506 * typeprint.c (maintenance_print_type): Constify.
4507 * maint.c (maintenance_dump_me, maintenance_demangle)
4508 (maintenance_time_display, maintenance_info_sections)
4509 (maintenance_print_statistics, maintenance_deprecate)
4510 (maintenance_undeprecate): Constify.
4511 (maintenance_do_deprecate): Constify. Use std::string.
4512 (maintenance_selftest): Constify.
4513 * gdbtypes.h (maintenance_print_type): Constify.
4514
4515 2017-09-27 Tom Tromey <tom@tromey.com>
4516
4517 * hppa-tdep.c (unwind_command): Constify.
4518
4519 2017-09-27 Tom Tromey <tom@tromey.com>
4520
4521 * target-descriptions.c (unset_tdesc_filename_cmd)
4522 (maint_print_c_tdesc_cmd, maintenance_check_xml_descriptions):
4523 Constify.
4524
4525 2017-09-27 Tom Tromey <tom@tromey.com>
4526
4527 * dummy-frame.c (maintenance_print_dummy_frames): Constify.
4528
4529 2017-09-27 Tom Tromey <tom@tromey.com>
4530
4531 * tui/tui.c (tui_enable_command, tui_disable_command): Constify.
4532
4533 2017-09-27 Tom Tromey <tom@tromey.com>
4534
4535 * tui/tui-regs.c (tui_reg_command): Constify.
4536
4537 2017-09-27 Tom Tromey <tom@tromey.com>
4538
4539 * skip.c (skip_file_command, skip_function_command)
4540 (skip_enable_command, skip_disable_command, skip_delete_command):
4541 Constify.
4542
4543 2017-09-27 Tom Tromey <tom@tromey.com>
4544
4545 * record-btrace.c (cmd_record_btrace_bts_start)
4546 (cmd_record_btrace_pt_start): Constify.
4547
4548 2017-09-27 Tom Tromey <tom@tromey.com>
4549
4550 * symmisc.c (maintenance_print_symbols)
4551 (maintenance_print_msymbols, maintenance_print_objfiles)
4552 (maintenance_info_symtabs, maintenance_check_symtabs)
4553 (maintenance_expand_symtabs, maintenance_info_line_tables):
4554 Constify.
4555
4556 2017-09-27 Tom Tromey <tom@tromey.com>
4557
4558 * top.c (new_ui_command): Constify.
4559
4560 2017-09-27 Tom Tromey <tom@tromey.com>
4561
4562 * symfile.c (add_symbol_file_command)
4563 (remove_symbol_file_command, list_overlays_command)
4564 (map_overlay_command, unmap_overlay_command)
4565 (overlay_auto_command, overlay_manual_command)
4566 (overlay_off_command, overlay_load_command): Constify.
4567
4568 2017-09-27 Tom Tromey <tom@tromey.com>
4569
4570 * spu-tdep.c (info_spu_event_command, info_spu_signal_command)
4571 (info_spu_mailbox_command, info_spu_dma_command)
4572 (info_spu_proxydma_command): Constify.
4573
4574 2017-09-27 Tom Tromey <tom@tromey.com>
4575
4576 * cli/cli-logging.c (set_logging_on, set_logging_off): Constify.
4577
4578 2017-09-27 Tom Tromey <tom@tromey.com>
4579
4580 * cli/cli-script.c (user_defined_command): Constify.
4581
4582 2017-09-27 Tom Tromey <tom@tromey.com>
4583
4584 * cli/cli-dump.c (dump_memory_command, dump_value_command)
4585 (dump_srec_memory, dump_srec_value, dump_ihex_memory)
4586 (dump_ihex_value, dump_verilog_memory, dump_verilog_value)
4587 (dump_tekhex_memory, dump_tekhex_value, dump_binary_memory)
4588 (dump_binary_value, append_binary_memory, append_binary_value):
4589 Constify.
4590 (struct dump_context) <func>: Constify.
4591 (add_dump_command): Update.
4592
4593 2017-09-27 Tom Tromey <tom@tromey.com>
4594
4595 * cli/cli-cmds.c (show_version, show_configuration)
4596 (source_command, show_user): Constify.
4597
4598 2017-09-27 Tom Tromey <tom@tromey.com>
4599
4600 * target.c (maintenance_print_target_stack): Constify.
4601
4602 2017-09-27 Tom Tromey <tom@tromey.com>
4603
4604 * interps.c (interpreter_exec_cmd): Constify.
4605
4606 2017-09-27 Tom Tromey <tom@tromey.com>
4607
4608 * record-full.c (cmd_record_full_restore): Constify.
4609
4610 2017-09-27 Tom Tromey <tom@tromey.com>
4611
4612 * memattr.c (enable_mem_command, disable_mem_command)
4613 (delete_mem_command): Constify.
4614
4615 2017-09-27 Tom Tromey <tom@tromey.com>
4616
4617 * value.c (show_convenience): Constify.
4618
4619 2017-09-27 Tom Tromey <tom@tromey.com>
4620
4621 * gdbcore.h (core_file_command): Update.
4622 * corefile.c (core_file_command): Constify.
4623
4624 2017-09-27 Tom Tromey <tom@tromey.com>
4625
4626 * user-regs.c (maintenance_print_user_registers): Constify.
4627
4628 2017-09-27 Tom Tromey <tom@tromey.com>
4629
4630 * cp-namespace.c (maintenance_cplus_namespace): Constify.
4631
4632 2017-09-27 Tom Tromey <tom@tromey.com>
4633
4634 * cp-support.c (first_component_command): Constify.
4635
4636 2017-09-27 Tom Tromey <tom@tromey.com>
4637
4638 * psymtab.c (maintenance_print_psymbols)
4639 (maintenance_info_psymtabs, maintenance_check_psymtabs):
4640 Constify.
4641
4642 2017-09-27 Tom Tromey <tom@tromey.com>
4643
4644 * windows-tdep.c (display_tib): Constify.
4645
4646 2017-09-27 Tom Tromey <tom@tromey.com>
4647
4648 * linux-fork.c (delete_checkpoint_command)
4649 (detach_checkpoint_command): Constify.
4650
4651 2017-09-27 Tom Tromey <tom@tromey.com>
4652
4653 * cp-abi.c (set_cp_abi_cmd, show_cp_abi_cmd): Constify.
4654
4655 2017-09-27 Tom Tromey <tom@tromey.com>
4656
4657 * arc-tdep.c (dump_arc_instruction_command): Constify.
4658
4659 2017-09-27 Tom Tromey <tom@tromey.com>
4660
4661 * valprint.c (set_radix, show_radix): Constify.
4662
4663 2017-09-27 Tom Tromey <tom@tromey.com>
4664
4665 * dtrace-probe.c (info_probes_dtrace_command): Constify.
4666
4667 2017-09-27 Tom Tromey <tom@tromey.com>
4668
4669 * command.h (not_just_help_class_command): Update.
4670 * cli/cli-decode.h (not_just_help_class_command): Update.
4671 * cli/cli-decode.c (not_just_help_class_command): Constify.
4672
4673 2017-09-27 Tom Tromey <tom@tromey.com>
4674
4675 * gdb_bfd.c (maintenance_info_bfds): Constify.
4676
4677 2017-09-27 Tom Tromey <tom@tromey.com>
4678
4679 * cli/cli-decode.c (add_cmd, set_cmd_cfunc): New function
4680 overloads.
4681 (do_add_cmd): Rename from add_cmd. Don't call set_cmd_cfunc.
4682 (do_const_cfunc): New function.
4683 (cmd_cfunc_eq): New overload.
4684 (cli_user_command_p): Check do_const_cfunc.
4685 * cli/cli-decode.h (struct cmd_list_element) <function>: New field
4686 const_cfunc.
4687 * command.h (add_cmd): Add const overload and no-function
4688 overload.
4689 (set_cmd_cfunc): Add const overload.
4690 (cmd_const_cfunc_ftype): Declare.
4691 (cmd_cfunc_eq): Add const overload.
4692 * breakpoint.c, cli-cmds.c, cli-dump.c, guile/scm-cmd.c,
4693 python/py-cmd.c, target.c, tracepoint.c: Use no-function add_cmd
4694 overload.
4695
4696 2017-09-27 Tom Tromey <tom@tromey.com>
4697
4698 * macroexp.c (get_next_token_for_substitution): New function.
4699 (substitute_args): Call it. Check for __VA_OPT__.
4700
4701 2017-09-26 Walfred Tedeschi <walfred.tedeschi@intel.com>
4702 Pedro Alves <palves@redhat.com>
4703
4704 * dwarf2read.c (dwarf2_cu): Remove field producer_is_icc and add
4705 producer_is_icc_lt_14.
4706 (producer_is_icc_lt_14): New function.
4707 (check_producer): Add code for checking version of ICC.
4708 (producer_is_icc): Move to producer.c.
4709 (read_structure_type): Restrict ICC workaround to ICC<14.
4710 * producer.c: Include selftest.h.
4711 (producer_is_icc, producer_parsing_tests, _initialize_producer):
4712 New functions.
4713 * producer.h (producer_is_icc): New declaration.
4714
4715 2017-09-26 Walfred Tedeschi <walfred.tedeschi@intel.com>
4716
4717 * Makefile.in (SFILES): Add producer.c.
4718 (COMMON_OBS): Add producer.o
4719 * amd64-tdep.c (producer.h): Add new include.
4720 * dwarf2read.c (producer.h): Add new include.
4721 * producer.c: New file.
4722 * producer.h: New file.
4723 * utils.c (producer_is_gcc, producer_is_gcc_ge_4): Move to
4724 producer.c.
4725 * utils.h (producer_is_gcc, producer_is_gcc_ge_4): Move to
4726 producer.h.
4727
4728 2017-09-26 Matthias Klose <doko@ubuntu.com>
4729
4730 * configure.ac: Search ncursesw before ncurses.
4731 Check ncursesw/ncurses.h before ncurses/ncurses.h.
4732 * gdb_curses.h: Include <ncursesw/ncurses.h>
4733 * config.in, configure: Regenerate.
4734
4735 2017-09-26 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
4736
4737 PR gdb/22185
4738 * configure.host <*-*-solaris2.[01], *-*-solaris2.[2-9]*>: Mark as
4739 obsolete.
4740 Use gdb_host sol2 for i[34567]86-*-solaris2*, x86_64-*-solaris2*.
4741 Remove i386sol2 support.
4742 * configure.nat <i386sol2>: Remove.
4743 <sol2-64>: Fold into ...
4744 <sol2>: ... this.
4745 Move common settings to default section.
4746 Add sol-thread.o.
4747 * configure.tgt <i[34567]86-*-solaris2.1[0-9]*,
4748 x86_64-*-solaris2.1[0-9]*>: Rename to ...
4749 <i[34567]86-*-solaris2*, x86_64-*-solaris2*>: ... this.
4750 <i[34567]86-*-solaris*>: Remove.
4751 <sparc-*-solaris2.[0-6], sparc-*-solaris2.[0-6].*>: Remove.
4752
4753 * configure.ac: Remove wctype in libw check.
4754 (_MSE_INT_H): Don't define on Solaris 7-9.
4755 <solaris*>: Remove libthread_db.so.1 check.
4756 * configure: Regenerate.
4757 * config.in: Regenerate.
4758
4759 * proc-service.c: Remove PROC_SERVICE_IS_OLD handling.
4760 (gdb_ps_prochandle_t, gdb_ps_read_buf_t, gdb_ps_write_buf_t)
4761 (gdb_ps_size_t): Remove.
4762 Use base types in users.
4763 * sol-thread.c: Likewise, also for gdb_ps_addr_t.
4764
4765 * NEWS (Changes since GDB 8.0): Document Solaris 2.0-9 removal.
4766
4767 2017-09-26 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
4768
4769 PR build/22206
4770 * sparc64-tdep.c (adi_tag_fd): Print pid as long.
4771 (adi_is_addr_mapped): Likewise.
4772 (PSR_ICC): Don't redefine.
4773 (PSR_IMPL): Likewise.
4774
4775 2017-09-25 Tom Tromey <tom@tromey.com>
4776
4777 * regcache.c (regcache::dump): Use string_printf.
4778
4779 2017-09-25 Tom Tromey <tom@tromey.com>
4780
4781 * regcache.c (class regcache_invalidator): New.
4782 (struct register_to_invalidate): Remove.
4783 (make_cleanup_regcache_invalidate): Remove.
4784 (regcache::raw_write): Use regcache_invalidator.
4785
4786 2017-09-25 Tom Tromey <tom@tromey.com>
4787
4788 * spu-tdep.c (spu2ppu_sniffer): Update.
4789 * regcache.h (make_cleanup_regcache_xfree): Don't declare.
4790 * regcache.c (do_regcache_xfree, make_cleanup_regcache_xfree):
4791 Remove.
4792 * ppc-linux-tdep.c (ppu2spu_sniffer): Update.
4793 * mi/mi-main.c (mi_cmd_data_list_changed_registers): Update.
4794 * frame.h (frame_save_as_regcache): Return std::unique_ptr.
4795 * frame.c (frame_save_as_regcache): Return std::unique_ptr.
4796 (frame_pop): Update.
4797
4798 2017-09-25 Tom Tromey <tom@tromey.com>
4799
4800 * spu-tdep.c (spu2ppu_dealloc_cache): Use delete.
4801 * regcache.h (regcache_xfree): Don't declare.
4802 * regcache.c (regcache_xfree): Remove.
4803 (do_regcache_xfree): Use delete.
4804 * ppc-linux-tdep.c (ppu2spu_dealloc_cache): Use delete.
4805 * linux-fork.c (free_fork): Use delete.
4806 (fork_save_infrun_state): Likewise.
4807 * jit.c (jit_dealloc_cache): Use delete.
4808 * infrun.c (discard_infcall_suspend_state): Use delete.
4809
4810 2017-09-25 Tom Tromey <tom@tromey.com>
4811
4812 * regcache.h (regcache_xmalloc): Don't declare.
4813 (regcache_raw_set_cached_value): Update comment.
4814 * regcache.c (regcache_xmalloc): Remove.
4815 * ppc-linux-tdep.c (ppu2spu_sniffer): Use new.
4816 * jit.c (jit_frame_sniffer): Use new.
4817 * frame.c (frame_save_as_regcache): Use new.
4818
4819 2017-09-25 Andreas Arnez <arnez@linux.vnet.ibm.com>
4820
4821 * NEWS: Advertise support for guarded-storage registers on IBM z.
4822
4823 2017-09-25 Andreas Arnez <arnez@linux.vnet.ibm.com>
4824
4825 * s390-linux-nat.c (have_regset_gs): New static variable.
4826 (s390_linux_fetch_inferior_registers): Handle guarded-storage
4827 control block and guarded-storage broadcast control regsets.
4828 (s390_read_description): Detect whether the target has
4829 guarded-storage support, return appropriate tdesc.
4830 * s390-linux-tdep.c (features/s390-gs-linux64.c): New include.
4831 (features/s390x-gs-linux64.c): Likewise.
4832 (struct gdbarch_tdep) <have_gs>: New field.
4833 (s390_regmap_gs, s390_regmap_gsbc, s390_gs_regset)
4834 (s390_gsbc_regset): New variables.
4835 (s390_iterate_over_regset_sections): Iterate over s390_gs_regset
4836 and s390_gsbc_regset, if applicable.
4837 (s390_core_read_description): Check whether core file was from a
4838 target with guarded-storage support; include appropriate regsets.
4839 (s390_gdbarch_init): Add registers for guarded-storage support.
4840 (_initialize_s390_tdep): Initialize new target descriptions that
4841 include registers for guarded-storage support.
4842 * s390-linux-tdep.h (HWCAP_S390_GS, S390_GSD_REGNUM)
4843 (S390_GSSM_REGNUM, S390_GSEPLA_REGNUM)
4844 (S390_BC_GSD_REGNUM, S390_BC_GSSM_REGNUM): New defines.
4845 (S390_NUM_REGS): Adjust macro definition.
4846 (s390_gs_regset, s390_gsbc_regset, tdesc_s390_gs_linux64)
4847 (tdesc_s390x_gs_linux64): New declarations.
4848
4849 2017-09-25 Andreas Arnez <arnez@linux.vnet.ibm.com>
4850
4851 * features/s390-gs-linux64.xml: New file.
4852 * features/s390-gs.xml: New file.
4853 * features/s390-gsbc.xml: New file.
4854 * features/s390x-gs-linux64.xml: New file.
4855 * features/Makefile (WHICH): Add s390-gs-linux64 and
4856 s390x-gs-linux64.
4857 (s390-gs-linux64-expedite, s390x-gs-linux64-expedite): New macros.
4858 (XMLTOC): Add s390-gs-linux64.xml and s390x-linux64.xml.
4859 * features/s390-gs-linux64.c: New generated file.
4860 * features/s390x-gs-linux64.c: New file.
4861 * regformats/s390-gs-linux64.dat: New file.
4862 * regformats/s390x-gs-linux64.dat: New file.
4863
4864 2017-09-23 Tom Tromey <tom@tromey.com>
4865
4866 * defs.h (make_cleanup_override_quit_handler): Don't declare.
4867
4868 2017-09-22 Tom Tromey <tom@tromey.com>
4869
4870 * utils.c (class scoped_input_handler) <m_quit_handler>: Change
4871 type to scoped_restore_tmpl.
4872 <scoped_input_handler>: Initialize m_quit_handler directly.
4873
4874 2017-09-22 Sergio Durigan Junior <sergiodj@redhat.com>
4875
4876 * cli/cli-cmds.c (pwd_command): Use "getcwd (NULL, 0)".
4877 (cd_command): Likewise. Free "current_directory" before
4878 assigning to it.
4879 * main.c (captured_main_1): Use "getcwd (NULL, 0)".
4880 * mi/mi-cmd-env.c (mi_cmd_env_pwd): Likewise.
4881 * top.c (gdb_dirbuf): Remove global declaration.
4882 * top.h (gdb_dirbuf): Likewise.
4883
4884 2017-09-22 Sergio Durigan Junior <sergiodj@redhat.com>
4885
4886 * gnulib/aclocal.m4: Regenerate.
4887 * gnulib/config.in: Regenerate.
4888 * gnulib/configure: Regenerate.
4889 * gnulib/import/Makefile.am: Regenerate.
4890 * gnulib/import/Makefile.in: Regenerate.
4891 * gnulib/import/assure.h: New file.
4892 * gnulib/import/at-func.c: Likewise
4893 * gnulib/import/chdir-long.c: New file.
4894 * gnulib/import/chdir-long.h: New file.
4895 * gnulib/import/cloexec.c: New file.
4896 * gnulib/import/cloexec.h: New file.
4897 * gnulib/import/close.c: New file.
4898 * gnulib/import/closedir.c: New file.
4899 * gnulib/import/dirent-private.h: New file.
4900 * gnulib/import/dup-safer.c: New file.
4901 * gnulib/import/dup.c: New file.
4902 * gnulib/import/dup2.c: New file.
4903 * gnulib/import/error.c: New file.
4904 * gnulib/import/error.h: New file.
4905 * gnulib/import/exitfail.c: New file.
4906 * gnulib/import/exitfail.h: New file.
4907 * gnulib/import/fchdir.c: New file.
4908 * gnulib/import/fcntl.c: New file.
4909 * gnulib/import/fcntl.in.h: New file.
4910 * gnulib/import/fd-hook.c: New file.
4911 * gnulib/import/fd-hook.h: New file.
4912 * gnulib/import/fd-safer.c: New file.
4913 * gnulib/import/fdopendir.c: New file.
4914 * gnulib/import/filename.h: New file.
4915 * gnulib/import/filenamecat-lgpl.c: New file.
4916 * gnulib/import/filenamecat.h: New file.
4917 * gnulib/import/fstat.c: New file.
4918 * gnulib/import/fstatat.c: New file.
4919 * gnulib/import/getcwd-lgpl.c: New file.
4920 * gnulib/import/getcwd.c: New file.
4921 * gnulib/import/getdtablesize.c: New file.
4922 * gnulib/import/getlogin_r.c: New file.
4923 * gnulib/import/getprogname.c: New file.
4924 * gnulib/import/getprogname.h: New file.
4925 * gnulib/import/gettext.h: New file.
4926 * gnulib/import/glob-libc.h: New file.
4927 * gnulib/import/glob.c: New file.
4928 * gnulib/import/glob.in.h: New file.
4929 * gnulib/import/intprops.h: New file.
4930 * gnulib/import/m4/chdir-long.m4: New file.
4931 * gnulib/import/m4/close.m4: New file.
4932 * gnulib/import/m4/closedir.m4: New file.
4933 * gnulib/import/m4/d-ino.m4: New file.
4934 * gnulib/import/m4/d-type.m4: New file.
4935 * gnulib/import/m4/dup.m4: New file.
4936 * gnulib/import/m4/dup2.m4: New file.
4937 * gnulib/import/m4/error.m4: New file.
4938 * gnulib/import/m4/fchdir.m4: New file.
4939 * gnulib/import/m4/fcntl.m4: New file.
4940 * gnulib/import/m4/fcntl_h.m4: New file.
4941 * gnulib/import/m4/fdopendir.m4: New file.
4942 * gnulib/import/m4/filenamecat.m4: New file.
4943 * gnulib/import/m4/fstat.m4: New file.
4944 * gnulib/import/m4/fstatat.m4: New file.
4945 * gnulib/import/m4/getcwd-abort-bug.m4: New file.
4946 * gnulib/import/m4/getcwd-path-max.m4: New file.
4947 * gnulib/import/m4/getcwd.m4: New file.
4948 * gnulib/import/m4/getdtablesize.m4: New file.
4949 * gnulib/import/m4/getlogin_r.m4: New file.
4950 * gnulib/import/m4/getprogname.m4: New file.
4951 * gnulib/import/m4/glob.m4: New file.
4952 * gnulib/import/m4/gnulib-cache.m4: Regenerate.
4953 * gnulib/import/m4/gnulib-comp.m4: Regenerate.
4954 * gnulib/import/m4/mempcpy.m4: New file.
4955 * gnulib/import/m4/memrchr.m4: New file.
4956 * gnulib/import/m4/mode_t.m4: New file.
4957 * gnulib/import/m4/msvc-inval.m4: New file.
4958 * gnulib/import/m4/msvc-nothrow.m4: New file.
4959 * gnulib/import/m4/open.m4: New file.
4960 * gnulib/import/m4/openat.m4: New file.
4961 * gnulib/import/m4/opendir.m4: New file.
4962 * gnulib/import/m4/readdir.m4: New file.
4963 * gnulib/import/m4/realloc.m4: New file.
4964 * gnulib/import/m4/rewinddir.m4: New file.
4965 * gnulib/import/m4/save-cwd.m4: New file.
4966 * gnulib/import/m4/strdup.m4: New file.
4967 * gnulib/import/m4/strerror.m4: New file.
4968 * gnulib/import/m4/unistd-safer.m4: New file.
4969 * gnulib/import/mempcpy.c: New file.
4970 * gnulib/import/memrchr.c: New file.
4971 * gnulib/import/msvc-inval.c: New file.
4972 * gnulib/import/msvc-inval.h: New file.
4973 * gnulib/import/msvc-nothrow.c: New file.
4974 * gnulib/import/msvc-nothrow.h: New file.
4975 * gnulib/import/open.c: New file.
4976 * gnulib/import/openat-die.c: New file.
4977 * gnulib/import/openat-priv.h: New file.
4978 * gnulib/import/openat-proc.c: New file.
4979 * gnulib/import/openat.c: New file.
4980 * gnulib/import/openat.h: New file.
4981 * gnulib/import/opendir.c: New file.
4982 * gnulib/import/pipe-safer.c: New file.
4983 * gnulib/import/readdir.c: New file.
4984 * gnulib/import/realloc.c: New file.
4985 * gnulib/import/rewinddir.c: New file.
4986 * gnulib/import/save-cwd.c: New file.
4987 * gnulib/import/save-cwd.h: New file.
4988 * gnulib/import/strdup.c: New file.
4989 * gnulib/import/strerror-override.c: New file.
4990 * gnulib/import/strerror-override.h: New file.
4991 * gnulib/import/strerror.c: New file.
4992 * gnulib/import/unistd--.h: New file.
4993 * gnulib/import/unistd-safer.h: New file.
4994 * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add
4995 "getcwd" and "glob".
4996 * ser-tcp.c: Undefine "close" before redefining it.
4997
4998 2017-09-21 Simon Marchi <simon.marchi@ericsson.com>
4999
5000 * guile/scm-value.c (gdbscm_value_address): Initialize address,
5001 get rid of res_val.
5002
5003 2017-09-22 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
5004
5005 * configure.nat <i386sol2,i386>: Add fork-inferior.o to NATDEPFILES.
5006 <sol2,sparc>: Likewise.
5007 <sol2-64,i386>: Likewise.
5008
5009 * warning.m4 (AM_GDB_WARNINGS): Disable -Wunknown-pragmas,
5010 -Wdeprecated-declarations on *-*-solaris*.
5011 * configure: Regenerate.
5012
5013 * procfs.c: Include "nat/inferior.h".
5014 (procfs_info_proc): Fix typo.
5015
5016 2017-09-21 Kevin Buettner <kevinb@redhat.com>
5017
5018 * remote.c (vector): Include.
5019 (struct private_thread_info): Add field, thread_handle.
5020 (free_private_thread_info): Deallocate storage associated with
5021 thread handle.
5022 (get_private_info_thread): Initialize `thread_handle' field.
5023 (struct thread_item): Add field, thread_handle.
5024 (clear_threads_listing_context): Deallocate storage associated
5025 with thread handle.
5026 (start_thread): Add support for "handle" attribute.
5027 (thread_attributes): Add "handle".
5028 (remote_get_threads_with_qthreadinfo): Initialize thread_handle
5029 field.
5030 (remote_update_thread_list): Update thread_handle.
5031 (remote_thread_handle_to_thread_info): New function.
5032 (init_remote_ops): Initialize to_thread_handle_to_thread_info.
5033
5034 2017-09-21 Kevin Buettner <kevinb@redhat.com>
5035
5036 * python/py-inferior.c (gdbpy_thread_from_thread_handle): New
5037 function.
5038 (inferior_object_methods): Add gdbpy_thread_from_thread_handle.
5039 * python/python-internal.h (thread_object_type): Declare.
5040
5041 2017-09-21 Kevin Buettner <kevinb@redhat.com>
5042
5043 * target.h (struct target_ops): Add to_thread_handle_to_thread_info.
5044 (target_thread_handle_to_thread_info): Declare.
5045 * target.c (target_thread_handle_to_thread_info): New function.
5046 * target-delegates.c: Regenerate.
5047 * gdbthread.h (find_thread_by_handle): Declare.
5048 * thread.c (find_thread_by_handle): New function.
5049 * linux-thread-db.c (thread_db_thread_handle_to_thread_info): New
5050 function.
5051 (init_thread_db_ops): Register thread_db_thread_handle_to_thread_info.
5052
5053 2017-09-21 Simon Marchi <simon.marchi@ericsson.com>
5054
5055 * nat/linux-waitpid.c (linux_debug): Add ATTRIBUTE_PRINTF.
5056
5057 2017-09-21 Simon Marchi <simon.marchi@ericsson.com>
5058
5059 * microblaze-tdep.c (microblaze_debug): Add ATTRIBUTE_PRINTF.
5060
5061 2017-09-21 Yao Qi <yao.qi@linaro.org>
5062
5063 * configure.tgt (aarch64*-*-freebsd*): Add fbsd-tdep.o solib-svr4.o
5064 to gdb_target_obs.
5065
5066 2017-09-20 Tom Tromey <tom@tromey.com>
5067
5068 * breakpoint.c (struct counted_command_line): Remove.
5069 (breakpoint_commands): Update.
5070 (alloc_counted_command_line, incref_counted_command_line)
5071 (decref_counted_command_line, do_cleanup_counted_command_line)
5072 (make_cleanup_decref_counted_command_line): Remove.
5073 (breakpoint_set_commands, commands_command_1, ~bpstats, bpstats)
5074 (bpstat_clear_actions, bpstat_do_actions_1, watchpoint_check)
5075 (bpstat_stop_status, print_one_breakpoint_location, ~breakpoint)
5076 (save_breakpoints): Update.
5077 * breakpoint.h (counted_command_line): Now a typedef to
5078 shared_ptr.
5079 (struct breakpoint) <commands>: Now a counted_command_line.
5080 (struct bpstats) <command>: Likewise.
5081
5082 2017-09-20 Tom Tromey <tom@tromey.com>
5083
5084 * breakpoint.c (struct commands_info, do_map_commands_command):
5085 Remove.
5086 (commands_command_1): Update.
5087 (iterate_over_related_breakpoints): Take a function_view.
5088 (do_delete_breakpoint, do_map_delete_breakpoint): Remove.
5089 (delete_command): Update.
5090 (map_breakpoint_numbers): Take a function_view.
5091 (do_disable_breakpoint, do_map_delete_breakpoint): Remove.
5092 (disable_command): Update.
5093 (do_enable_breakpoint, do_map_enable_breakpoint): Remove.
5094 (enable_command): Update.
5095 (struct disp_data, do_enable_breakpoint_disp)
5096 (do_map_enable_once_breakpoint, do_map_enable_count_breakpoint)
5097 (do_map_enable_delete_breakpoint): Remove.
5098 (enable_once_command, enable_count_command, enable_delete_command)
5099 (delete_trace_variable_command): Update.
5100
5101 2017-09-20 Tom Tromey <tom@tromey.com>
5102
5103 * breakpoint.c (~bpstats): Rename from bpstat_free. Update.
5104 (bpstat_clear): Use delete.
5105 (bpstats): New constructors.
5106 (bpstat_copy, bpstat_stop_status): Use new.
5107 (dprintf_after_condition_true): Update.
5108 * breakpoint.h (bpstats::bpstats): Add constructors.
5109 (bpstats::~bpstats): Add destructor.
5110
5111 2017-09-20 Pedro Alves <palves@redhat.com>
5112
5113 * eval.c (make_params): Delete, refactored as ...
5114 (class fake_method): ... this new type's ctor.
5115 (fake_method::~fake_method): New.
5116 (evaluate_subexp_standard): Use 'fake_method'.
5117
5118 2017-09-20 Tom Tromey <tom@tromey.com>
5119
5120 * windows-nat.c (get_windows_debug_event, windows_wait)
5121 (do_initial_windows_stuff, windows_attach): Update.
5122 * utils.c (vwarning, internal_vproblem): Update.
5123 (ui_unregister_input_event_handler_cleanup)
5124 (prepare_to_handle_input): Remove.
5125 (class scoped_input_handler): New.
5126 (defaulted_query, prompt_for_continue): Update.
5127 * tui/tui-hooks.c (tui_refresh_frame_and_register_information):
5128 Update.
5129 * top.c (undo_terminal_modifications_before_exit): Update.
5130 * target/target.h (target_terminal_init, target_terminal_inferior)
5131 (target_terminal_ours): Don't declare.
5132 (class target_terminal): New.
5133 * target.h (target_terminal_is_inferior, target_terminal_is_ours)
5134 (target_terminal_ours_for_output)
5135 (make_cleanup_restore_target_terminal): Don't declare.
5136 (target_terminal_info): Remove.
5137 * target.c (enum terminal_state, terminal_state): Remove.
5138 (target_terminal::terminal_state): Define.
5139 (target_terminal::init): Rename from target_terminal_init.
5140 (target_terminal::inferior): Rename from
5141 target_terminal_inferior.
5142 (target_terminal::ours): Rename from target_terminal_ours.
5143 (target_terminal::ours_for_output): Rename from
5144 target_terminal_ours_for_output.
5145 (target_terminal::info): New method.
5146 (cleanup_restore_target_terminal)
5147 (make_cleanup_restore_target_terminal): Remove.
5148 * solib.c (handle_solib_event): Update.
5149 * remote.c (remote_serial_quit_handler): Update.
5150 (remote_terminal_inferior, remote_wait_as): Update.
5151 * record-full.c (record_full_wait_1): Update.
5152 * nto-procfs.c (procfs_create_inferior): Update.
5153 * nat/fork-inferior.c (startup_inferior): Update.
5154 * mi/mi-interp.c (mi_new_thread, mi_thread_exit)
5155 (mi_record_changed, mi_inferior_added, mi_inferior_appeared)
5156 (mi_inferior_exit, mi_inferior_removed, mi_traceframe_changed)
5157 (mi_tsv_created, mi_tsv_deleted, mi_tsv_modified)
5158 (mi_breakpoint_created, mi_breakpoint_deleted)
5159 (mi_breakpoint_modified, mi_on_resume, mi_solib_loaded)
5160 (mi_solib_unloaded, mi_command_param_changed, mi_memory_changed)
5161 (mi_user_selected_context_changed, report_initial_inferior):
5162 Update.
5163 * linux-nat.c (linux_nat_attach, linux_nat_terminal_ours)
5164 (linux_nat_terminal_inferior): Update.
5165 * infrun.c (follow_fork_inferior)
5166 (handle_vfork_child_exec_or_exit, do_target_resume)
5167 (check_curr_ui_sync_execution_done, handle_inferior_event_1)
5168 (handle_signal_stop, maybe_remove_breakpoints, normal_stop):
5169 Update.
5170 * inflow.c (child_terminal_init, info_terminal_command): Update.
5171 * infcmd.c (post_create_inferior, continue_1, prepare_one_step)
5172 (attach_command): Update.
5173 * infcall.c (call_thread_fsm_should_stop): Update.
5174 * gnu-nat.c (gnu_attach): Update.
5175 * extension.c (struct active_ext_lang_state)
5176 (restore_active_ext_lang): Update.
5177 * exceptions.c (print_flush): Update.
5178 * event-top.c (async_enable_stdin, default_quit_handler): Update.
5179 (struct quit_handler_cleanup_data, restore_quit_handler)
5180 (restore_quit_handler_dtor, make_cleanup_override_quit_handler):
5181 Remove.
5182 * cp-support.c (gdb_demangle): Update.
5183 * breakpoint.c (update_inserted_breakpoint_locations)
5184 (insert_breakpoint_locations, handle_jit_event)
5185 (disable_breakpoints_in_unloaded_shlib): Update.
5186 * annotate.c (annotate_breakpoints_invalid)
5187 (annotate_frames_invalid): Update.
5188
5189 2017-09-20 Tom Tromey <tom@tromey.com>
5190
5191 * main.c (catch_command_errors): Rename from
5192 catch_command_errors_const.
5193 (captured_main_1): Update.
5194
5195 2017-09-20 Pedro Alves <palves@redhat.com>
5196
5197 * cli/cli-cmds.c (list_command): Use print_sal_location.
5198 (print_sal_location): New function.
5199 (ambiguous_line_spec): Use print_sal_location.
5200 * linespec.c (symbol_to_sal): Record the symbol in the sal.
5201 * symtab.c (find_function_start_sal): Likewise.
5202 * symtab.h (symtab_and_line::symbol): New field.
5203
5204 2017-09-20 Pedro Alves <palves@redhat.com>
5205
5206 * linespec.c (minsym_found): Handle non-text minsyms.
5207 (symbol_to_sal): Record a sal.pc for non-block, non-label symbols.
5208
5209 2017-09-20 Walfred Tedeschi <walfred.tedeschi@intel.com>
5210
5211 * features/Makefile (i386-avx-mpx-avx512-pku.dat): Add missing
5212 backslash.
5213
5214 2017-09-20 Walfred Tedeschi <walfred.tedeschi@intel.com>
5215
5216 * gdb.arch/i386-avx512.c (move_zmm_data_to_reg): Use
5217 vmovups instead vmovaps.
5218 (move_zmm_data_to_memory): Use vmovups instead vmovaps.
5219
5220 2017-09-19 John Baldwin <jhb@FreeBSD.org>
5221
5222 * NEWS (Changes since GDB 8.0): Add starti.
5223 * infcmd.c (enum run_break): New.
5224 (run_command_1): Queue pending event for RUN_STOP_AT_FIRST_INSN
5225 case.
5226 (run_command): Use enum run_how.
5227 (start_command): Likewise.
5228 (starti_command): New function.
5229 (RUN_ARGS_HELP): New macro.
5230 (_initialize_infcmd): Use RUN_ARGS_HELP for run and start
5231 commands. Add starti command.
5232
5233 2017-09-19 Yao Qi <yao.qi@linaro.org>
5234
5235 * Makefile.in (monitor.o): Remove the rule.
5236
5237 2017-09-19 Yao Qi <yao.qi@linaro.org>
5238
5239 * annotate.h (struct annotate_arg_emitter): Use
5240 DISABLE_COPY_AND_ASSIGN.
5241 * common/refcounted-object.h (refcounted_object): Likewise.
5242 * completer.h (struct completion_result): Likewise.
5243 * dwarf2read.c (struct dwarf2_per_objfile): Likewise.
5244 * filename-seen-cache.h (filename_seen_cache): Likewise.
5245 * gdbcore.h (thread_section_name): Likewise.
5246 * gdb_regex.h (compiled_regex): Likewise.
5247 * gdbthread.h (scoped_restore_current_thread): Likewise.
5248 * inferior.h (scoped_restore_current_inferior): Likewise.
5249 * jit.c (jit_reader): Likewise.
5250 * linespec.h (struct linespec_result): Likewise.
5251 * mi/mi-parse.h (struct mi_parse): Likewise.
5252 * nat/fork-inferior.c (execv_argv): Likewise.
5253 * progspace.h (scoped_restore_current_program_space): Likewise.
5254 * python/python-internal.h (class gdbpy_enter): Likewise.
5255 * regcache.h (regcache): Likewise.
5256 * target-descriptions.c (struct tdesc_reg): Likewise.
5257 (struct tdesc_type): Likewise.
5258 (struct tdesc_feature): Likewise.
5259 * ui-out.h (ui_out_emit_type): Likewise.
5260
5261 2017-09-18 Simon Marchi <simon.marchi@ericsson.com>
5262
5263 * dwarf2expr.c (dwarf_expr_context::execute_stack_op): Remove
5264 label abort_expression.
5265
5266 2017-09-16 Simon Marchi <simon.marchi@ericsson.com>
5267
5268 * common/buffer.c (buffer_xml_printf): Adjust.
5269 * common/xml-utils.c (xml_escape_text): Change return type to
5270 std::string, update code accordingly.
5271 * common/xml-utils.h (xml_escape_text): Change return type to
5272 std::string.
5273 * rs6000-aix-tdep.c (rs6000_aix_shared_library_to_xml): Adjust.
5274 * windows-tdep.c (windows_xfer_shared_library): Adjust.
5275 * unittests/xml-utils-selftests.c (test_xml_escape_text):
5276 Adjust.
5277
5278 2017-09-16 Simon Marchi <simon.marchi@ericsson.com>
5279
5280 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add new source file.
5281 (SUBDIR_UNITTESTS_OBS): Add new object file.
5282 * unittests/xml-utils-selftests.c: New file.
5283
5284 2017-09-16 Simon Marchi <simon.marchi@ericsson.com>
5285
5286 * common/selftest.h (selftest): New struct/interface.
5287 (register_test): Add name parameter, add new overload.
5288 (run_tests): Add filter parameter.
5289 (for_each_selftest_ftype): New typedef.
5290 (for_each_selftest): New declaration.
5291 * common/selftest.c (tests): Change type to
5292 map<string, unique_ptr<selftest>>.
5293 (simple_selftest): New struct.
5294 (register_test): New function.
5295 (register_test): Add name parameter and use it.
5296 (run_tests): Add filter parameter and use it. Add prints.
5297 Adjust to vector -> map change.
5298 * aarch64-tdep.c (_initialize_aarch64_tdep): Add names when
5299 registering selftests.
5300 * arm-tdep.c (_initialize_arm_tdep): Likewise.
5301 * disasm-selftests.c (_initialize_disasm_selftests): Likewise.
5302 * dwarf2-frame.c (_initialize_dwarf2_frame): Likewise.
5303 * dwarf2loc.c (_initialize_dwarf2loc): Likewise.
5304 * findvar.c (_initialize_findvar): Likewise.
5305 * gdbarch-selftests.c (_initialize_gdbarch_selftests): Likewise.
5306 * maint.c (maintenance_selftest): Update call to run_tests.
5307 (maintenance_info_selftests): New function.
5308 (_initialize_maint_cmds): Register "maintenance info selftests"
5309 command. Update "maintenance selftest" doc.
5310 * regcache.c (_initialize_regcache): Add names when registering
5311 selftests.
5312 * rust-exp.y (_initialize_rust_exp): Likewise.
5313 * selftest-arch.c (gdbarch_selftest): New struct.
5314 (gdbarch_tests): Remove.
5315 (register_test_foreach_arch): Add name parameter. Call
5316 register_test.
5317 (tests_with_arch): Remove, move most content to
5318 gdbarch_selftest::operator().
5319 (_initialize_selftests_foreach_arch): Remove.
5320 * selftest-arch.h (register_test_foreach_arch): Add name
5321 parameter.
5322 (run_tests_with_arch): New declaration.
5323 * utils-selftests.c (_initialize_utils_selftests): Add names
5324 when registering selftests.
5325 * utils.c (_initialize_utils): Likewise.
5326 * unittests/array-view-selftests.c
5327 (_initialize_array_view_selftests): Likewise.
5328 * unittests/environ-selftests.c (_initialize_environ_selftests):
5329 Likewise.
5330 * unittests/function-view-selftests.c
5331 (_initialize_function_view_selftests): Likewise.
5332 * unittests/offset-type-selftests.c
5333 (_initialize_offset_type_selftests): Likewise.
5334 * unittests/optional-selftests.c
5335 (_initialize_optional_selftests): Likewise.
5336 * unittests/scoped_restore-selftests.c
5337 (_initialize_scoped_restore_selftests): Likewise.
5338 * NEWS: Document "maintenance selftest" and "maint info
5339 selftests".
5340
5341 2017-09-16 Simon Marchi <simon.marchi@ericsson.com>
5342
5343 * mi/mi-main.c (mi_load_progress): Restore current_uiout using a
5344 scoped_restore.
5345
5346 2017-09-16 Simon Marchi <simon.marchi@ericsson.com>
5347
5348 * mi/mi-main.c (mi_load_progress): Make uiout variable
5349 a unique_ptr.
5350
5351 2017-09-15 Pedro Alves <palves@redhat.com>
5352
5353 * compile/compile-c-types.c (convert_enum, convert_int)
5354 (convert_float): Adjust to refer to int_type_v0 and float_type_v0.
5355
5356 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
5357
5358 * dwarf2read.c (copy_string): Remove.
5359 (parse_macro_definition): Replace copy_string with savestring.
5360
5361 2017-09-15 Yao Qi <yao.qi@linaro.org>
5362
5363 * configure.tgt (i[34567]86-*-darwin*): Append amd64.o to
5364 gdb_target_obs.
5365 (i[34567]86-*-solaris2.1[0-9]* | x86_64-*-solaris2.1[0-9]*):
5366 Likewise.
5367 (i[34567]86-*-linux*): Likewise.
5368
5369 2017-09-14 Simon Marchi <simon.marchi@ericsson.com>
5370
5371 * dwarf2expr.h (dwarf_stack_value): Add constructor.
5372 (dwarf_expr_context) <~dwarf_expr_context>: Define as default.
5373 <stack>: Change type to std::vector.
5374 <stack_len, stack_allocated>: Remove.
5375 <grow_stack>: Remove.
5376 * dwarf2expr.c (dwarf_expr_context::dwarf_expr_context): Adjust.
5377 (dwarf_expr_context::~dwarf_expr_context): Remove.
5378 (dwarf_expr_context::grow_stack): Remove.
5379 (dwarf_expr_context::push): Adjust.
5380 (dwarf_expr_context::pop): Adjust.
5381 (dwarf_expr_context::fetch): Adjust.
5382 (dwarf_expr_context::fetch_in_stack_memory): Adjust.
5383 (dwarf_expr_context::stack_empty_p): Adjust.
5384 (dwarf_expr_context::execute_stack_op): Adjust.
5385
5386 2017-09-14 Simon Marchi <simon.marchi@ericsson.com>
5387
5388 * dwarf2expr.h (dwarf_expr_context) <stack_empty_p>: Change
5389 return type to bool.
5390 * dwarf2expr.c (dwarf_expr_context::stack_empty_p): Likewise.
5391
5392 2017-09-14 Simon Marchi <simon.marchi@ericsson.com>
5393
5394 * dwarf2expr.h (dwarf_expr_piece) <v.mem.in_stack_memory>:
5395 Change type to bool.
5396 (dwarf_stack_value) <in_stack_memory>: Likewise.
5397 (dwarf_expr_context) <push_address>: Change parameter type to
5398 bool.
5399 <fetch_in_stack_memory>: Change return type to bool.
5400 <push>: Change parameter type to bool.
5401 * dwarf2expr.c (dwarf_expr_context::push): Change parameter type
5402 to bool.
5403 (dwarf_expr_context::push_address): Likewise.
5404 (dwarf_expr_context::fetch_in_stack_memory): Change return type
5405 to bool.
5406 (dwarf_expr_context::execute_stack_op): Adjust.
5407 * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Adjust.
5408
5409 2017-09-14 Simon Marchi <simon.marchi@ericsson.com>
5410
5411 * dwarf2expr.h (struct dwarf_expr_piece): Move up.
5412 (struct dwarf_expr_context) <n_pieces>: Remove.
5413 <pieces>: Change type to std::vector.
5414 * dwarf2expr.c (dwarf_expr_context::dwarf_expr_context): Adjust.
5415 (dwarf_expr_context::~dwarf_expr_context): Don't manually free
5416 pieces.
5417 (dwarf_expr_context::add_piece): Adjust.
5418 * dwarf2loc.c (struct piece_closure): Initialize fields.
5419 <n_pieces>: Remove.
5420 <pieces>: Change type to std::vector.
5421 (allocate_piece_closure): Adjust, change parameter to
5422 std::vector rvalue and std::move it to piece_closure.
5423 (rw_pieced_value): Adjust.
5424 (check_pieced_synthetic_pointer): Adjust.
5425 (indirect_synthetic_pointer): Adjust.
5426 (coerce_pieced_ref): Adjust.
5427 (free_pieced_value_closure): Adjust. Use delete to free
5428 piece_closure.
5429 (dwarf2_evaluate_loc_desc_full): Adjust. std::move ctx.pieces
5430 to allocate_piece_closure.
5431 (dwarf2_loc_desc_get_symbol_read_needs): Adjust.
5432
5433 2017-09-12 Simon Marchi <simon.marchi@ericsson.com>
5434
5435 * probe.h (probe_ops_cp): Remove typedef.
5436 (DEF_VEC_P (probe_ops_cp)): Remove.
5437 (all_probe_ops): Change type to std::vector.
5438 * probe.c (info_probes_for_ops): Adjust to vector change.
5439 (probe_linespec_to_ops): Likewise.
5440 (all_probe_ops): Change type to std::vector.
5441 (_initialize_probe): Adjust to vector change.
5442 * dtrace-probe.c (_initialize_dtrace_probe): Likewise.
5443 * elfread.c (elf_get_probes): Likewise.
5444 * stap-probe.c (_initialize_stap_probe): Likewise.
5445
5446 2017-09-12 Simon Marchi <simon.marchi@ericsson.com>
5447
5448 * probe.h (struct bound_probe): Define constructors.
5449 * probe.c (bound_probe_s): Remove typedef.
5450 (DEF_VEC_O (bound_probe_s)): Remove VEC.
5451 (collect_probes): Change return type to std::vector, remove
5452 cleanup.
5453 (compare_probes): Return bool, change parameter type. Change
5454 semantic to "less than".
5455 (gen_ui_out_table_header_info): Change parameter to std::vector
5456 and update.
5457 (exists_probe_with_pops): Likewise.
5458 (info_probes_for_ops): Update to std::vector change.
5459 (enable_probes_command): Likewise.
5460 (disable_probes_command): Likewise.
5461
5462 2017-09-12 Simon Marchi <simon.marchi@ericsson.com>
5463
5464 * probe.h (struct probe_ops) <get_probes>: Change parameter from
5465 vec to std::vector.
5466 * probe.c (parse_probes_in_pspace): Update.
5467 (find_probes_in_objfile): Update.
5468 (find_probe_by_pc): Update.
5469 (collect_probes): Update.
5470 (probe_any_get_probes): Update.
5471 * symfile.h (struct sym_probe_fns) <sym_get_probes> Change
5472 return type to reference to std::vector.
5473 * dtrace-probe.c (dtrace_process_dof_probe): Change parameter to
5474 std::vector and update.
5475 (dtrace_process_dof): Likewise.
5476 (dtrace_get_probes): Likewise.
5477 * elfread.c (elf_get_probes): Change return type to std::vector,
5478 store an std::vector in bfd_data.
5479 (probe_key_free): Update to std::vector.
5480 * stap-probe.c (handle_stap_probe): Change parameter to
5481 std::vector and update.
5482 (stap_get_probes): Likewise.
5483 * symfile-debug.c (debug_sym_get_probes): Change return type to
5484 std::vector and update.
5485
5486 2017-09-11 Tom Tromey <tom@tromey.com>
5487
5488 * breakpoint.c (program_breakpoint_here_p): Update.
5489 * target.c (make_scoped_restore_show_memory_breakpoints): Rename
5490 from make_show_memory_breakpoints_cleanup. Return a
5491 scoped_restore_tmpl<int>.
5492 (restore_show_memory_breakpoints): Remove.
5493 * ppc-linux-tdep.c (ppc_linux_memory_remove_breakpoint): Update.
5494 * mem-break.c (memory_validate_breakpoint): Update.
5495 * ia64-tdep.c (ia64_memory_insert_breakpoint): Update.
5496 (ia64_memory_remove_breakpoint): Update.
5497 (ia64_breakpoint_from_pc): Update.
5498 * target.h (make_scoped_restore_show_memory_breakpoints): Rename
5499 from make_show_memory_breakpoints_cleanup.
5500
5501 2017-09-11 Tom Tromey <tom@tromey.com>
5502
5503 * d-namespace.c (d_lookup_symbol): Use std::string.
5504 (find_symbol_in_baseclass): Likewise.
5505
5506 2017-09-11 Tom Tromey <tom@tromey.com>
5507
5508 * ctf.c (ctf_start): Use std::string.
5509
5510 2017-09-11 Tom Tromey <tom@tromey.com>
5511
5512 * ada-lang.c (is_known_support_routine): Update.
5513 (ada_unhandled_exception_name_addr_from_raise): Update.
5514 * guile/scm-frame.c (gdbscm_frame_name): Update.
5515 * python/py-frame.c (frapy_name): Update.
5516 (frapy_function): Update.
5517 * stack.h (find_frame_funname): Update.
5518 * stack.c (find_frame_funname): Return unique_xmalloc_ptr.
5519 (print_frame): Update.
5520
5521 2017-09-11 Tom Tromey <tom@tromey.com>
5522
5523 * findcmd.c (put_bits): Take a gdb::byte_vector.
5524 (parse_find_args): Return gdb::byte_vector. "args" now const.
5525 Remove "pattern_bufp" and "pattern_lenp" parameters. Remove
5526 cleanups.
5527 (find_command): Update.
5528
5529 2017-09-11 Tom Tromey <tom@tromey.com>
5530
5531 * cli/cli-script.c (class scoped_restore_hook_in): New.
5532 (clear_hook_in_cleanup): Remove.
5533 (execute_cmd_pre_hook, execute_cmd_post_hook): Use
5534 scoped_restore_hook_in.
5535
5536 2017-09-11 Tom Tromey <tom@tromey.com>
5537
5538 * cli/cli-script.c (restore_interp): Remove.
5539 (read_command_lines): Use scoped_restore_interp.
5540 * interps.c (scoped_restore_interp::set_temp): Rename from
5541 interp_set_temp.
5542 * interps.h (class scoped_restore_interp): New.
5543 (interp_set_temp): Remove.
5544
5545 2017-09-11 Tom Tromey <tom@tromey.com>
5546
5547 * mi/mi-cmd-catch.c (mi_cmd_catch_assert)
5548 (mi_cmd_catch_exception, mi_catch_load_unload): Update.
5549 * mi/mi-cmd-break.c (setup_breakpoint_reporting): Return a
5550 scoped_restore.
5551 (mi_cmd_break_insert_1): Update.
5552 * mi/mi-cmd-break.h (setup_breakpoint_reporting): Return a
5553 scoped_restore.
5554
5555 2017-09-11 Tom Tromey <tom@tromey.com>
5556
5557 * demangle.c (demangle_command): Update.
5558 * breakpoint.c (disable_command): Update.
5559 (enable_command): Update.
5560 (find_location_by_number): Make "number" const. Use
5561 get_number_trailer.
5562 * cli/cli-utils.c (extract_arg): Return std::string.
5563 * probe.c (parse_probe_linespec): Update. Change types.
5564 (collect_probes): Take string arguments.
5565 (parse_probe_linespec): Likewise.
5566 (info_probes_for_ops): Update.
5567 (enable_probes_command): Update.
5568 (disable_probes_command): Update.
5569 * break-catch-sig.c (catch_signal_split_args): Update.
5570 * mi/mi-parse.c (mi_parse): Update.
5571
5572 2017-09-11 Tom Tromey <tom@tromey.com>
5573
5574 * language.h (language_enum): Make argument const.
5575 * language.c (language_enum): Make argument const.
5576
5577 2017-09-11 Tom Tromey <tom@tromey.com>
5578
5579 * common/common-utils.h (skip_to_space): Remove macro, redeclare
5580 as function.
5581 (skip_to_space): Rename from skip_to_space_const.
5582 * common/common-utils.c (skip_to_space): New function.
5583 (skip_to_space): Rename from skip_to_space_const.
5584 * cli/cli-utils.h (get_number): Rename from get_number_const.
5585 (extract_arg): Rename from extract_arg_const.
5586 * cli/cli-utils.c (get_number): Rename from get_number_const.
5587 (extract_arg): Rename from extract_arg_const.
5588 (number_or_range_parser::get_number): Use ::get_number.
5589 * aarch64-linux-tdep.c, ada-lang.c, arm-linux-tdep.c, ax-gdb.c,
5590 break-catch-throw.c, breakpoint.c, cli/cli-cmds.c, cli/cli-dump.c,
5591 cli/cli-script.c, cli/cli-setshow.c, compile/compile.c,
5592 completer.c, demangle.c, disasm.c, findcmd.c, linespec.c,
5593 linux-tdep.c, linux-thread-db.c, location.c, mi/mi-parse.c,
5594 minsyms.c, nat/linux-procfs.c, printcmd.c, probe.c,
5595 python/py-breakpoint.c, record.c, rust-exp.y, serial.c, stack.c,
5596 stap-probe.c, tid-parse.c, tracepoint.c: Update all callers.
5597
5598 2017-09-11 Tom Tromey <tom@tromey.com>
5599
5600 * python/python.c (do_start_initialization): Use
5601 py-event-types.def to initialize types.
5602 Define all object type structures.
5603 * python/python-internal.h: Don't declare event initialization
5604 functions.
5605 * python/py-threadevent.c (thread_event_object_type): Don't
5606 define.
5607 * python/py-stopevent.c (stop_event_object_type): Don't define.
5608 * python/py-signalevent.c (signal_event_object_type): Don't
5609 declare or define.
5610 * python/py-newobjfileevent.c (new_objfile_event_object_type)
5611 (clear_objfiles_event_object_type): Don't declare or define.
5612 * python/py-infevents.c (inferior_call_pre_event_object_type)
5613 (inferior_call_post_event_object_type)
5614 (register_changed_event_object_type)
5615 (memory_changed_event_object_type): Don't declare or define.
5616 * python/py-inferior.c (new_thread_event_object_type)
5617 (new_inferior_event_object_type)
5618 (inferior_deleted_event_object_type): Don't declare or define.
5619 * python/py-exitedevent.c (exited_event_object_type): Don't
5620 declare or define.
5621 * python/py-evts.c (gdbpy_initialize_py_events): Use
5622 py-all-events.def.
5623 * python/py-events.h (thread_event_object_type): Don't declare.
5624 (events_object): Use py-all-events.def.
5625 * python/py-event.h (GDBPY_NEW_EVENT_TYPE): Remove. Use
5626 py-event-types.def.
5627 * python/py-event-types.def: New file.
5628 * python/py-continueevent.c (create_continue_event_object): Don't
5629 declare or define.
5630 * python/py-bpevent.c (breakpoint_event_object_type): Don't
5631 declare or define.
5632 * python/py-all-events.def: New file.
5633
5634 2017-09-11 Tom Tromey <tom@tromey.com>
5635
5636 * python/py-threadevent.c (create_thread_event_object): Return
5637 gdbpy_ref.
5638 * python/py-stopevent.h (create_stop_event_object)
5639 (create_breakpoint_event_object, create_signal_event_object):
5640 Update.
5641 * python/py-stopevent.c (create_stop_event_object): Return
5642 gdbpy_ref.
5643 (emit_stop_event): Update.
5644 * python/py-signalevent.c (create_signal_event_object): Return
5645 gdbpy_ref.
5646 * python/py-infevents.c (create_inferior_call_event_object):
5647 Update.
5648 * python/py-event.h (create_event_object)
5649 (create_thread_event_object): Update.
5650 * python/py-event.c (create_event_object): Return gdbpy_ref.
5651 * python/py-continueevent.c: Return gdbpy_ref.
5652 * python/py-bpevent.c (create_breakpoint_event_object): Return
5653 gdbpy_ref.
5654
5655 2017-09-11 Tom Tromey <tom@tromey.com>
5656
5657 PR python/15622:
5658 * NEWS: Add entry.
5659 * python/python.c (do_start_initialization): Initialize new event
5660 types.
5661 * python/python-internal.h (gdbpy_initialize_new_inferior_event)
5662 (gdbpy_initialize_inferior_deleted_event)
5663 (gdbpy_initialize_new_thread_event): Declare.
5664 * python/py-threadevent.c (create_thread_event_object): Add option
5665 "thread" parameter.
5666 * python/py-inferior.c (new_thread_event_object_type)
5667 (new_inferior_event_object_type)
5668 (inferior_deleted_event_object_type): Declare.
5669 (python_new_inferior, python_inferior_deleted): New functions.
5670 (add_thread_object): Emit new_thread event.
5671 (gdbpy_initialize_inferior): Attach new functions to corresponding
5672 observers.
5673 (new_thread, new_inferior, inferior_deleted): Define new event
5674 types.
5675 * python/py-evts.c (gdbpy_initialize_py_events): Add new
5676 registries.
5677 * python/py-events.h (events_object) <new_inferior,
5678 inferior_deleted, new_thread>: New fields.
5679 * python/py-event.h (create_thread_event_breakpoint): Add optional
5680 "thread" parameter.
5681
5682 2017-09-10 Andrew Burgess <andrew.burgess@embecosm.com>
5683
5684 * utils.c (abort_with_message): Don't compare gdb_stderr to NULL,
5685 check current_ui instead.
5686 (internal_vproblem): Likewise.
5687
5688 2017-09-09 Simon Marchi <simon.marchi@ericsson.com>
5689
5690 * thread.c (print_thread_info_1): Remove unnecessary calls to
5691 uiout->is_mi_like_p.
5692
5693 2017-09-09 Tom Tromey <tom@tromey.com>
5694
5695 * namespace.h (add_using_directive): Update.
5696 * namespace.c (add_using_directive): Change type of excludes to
5697 std::vector.
5698 * dwarf2read.c (read_import_statement): Use std::vector.
5699 (read_namespace): Update.
5700 * cp-namespace.c (cp_scan_for_anonymous_namespaces): Update.
5701
5702 2017-09-09 Tom Tromey <tom@tromey.com>
5703
5704 * linespec.c (create_sals_line_offset): Use gdb::def_vector.
5705
5706 2017-09-09 Tom Tromey <tom@tromey.com>
5707
5708 * p-valprint.c (pascal_object_print_value): Use gdb::byte_vector.
5709
5710 2017-09-09 Tom Tromey <tom@tromey.com>
5711
5712 * stack.c (func_command): Use gdb::def_vector.
5713
5714 2017-09-09 Tom Tromey <tom@tromey.com>
5715
5716 * mi/mi-cmd-var.c (mi_cmd_var_list_children): Use gdb::optional,
5717 ui_out_emit_list, ui_out_emit_tuple.
5718 (mi_cmd_var_update): Likewise.
5719
5720 2017-09-09 Tom Tromey <tom@tromey.com>
5721
5722 * mi/mi-interp.c (mi_user_selected_context_changed): Use
5723 ui_out_redirect_pop.
5724 * guile/scm-ports.c (ioscm_with_output_to_port_worker): Use
5725 ui_out_redirect_pop.
5726 * utils.c (do_ui_out_redirect_pop)
5727 (make_cleanup_ui_out_redirect_pop): Remove.
5728 * top.c (execute_command_to_string): Use ui_out_redirect_pop.
5729 * utils.h (make_cleanup_ui_out_redirect_pop): Remove.
5730 * ui-out.h (ui_out_redirect_pop): New class.
5731
5732 2017-09-09 Tom Tromey <tom@tromey.com>
5733
5734 * mi/mi-main.c (output_cores): Use ui_out_emit_list.
5735 (list_available_thread_groups, mi_cmd_list_thread_groups)
5736 (mi_cmd_data_list_changed_registers, mi_cmd_data_read_memory)
5737 (mi_cmd_data_read_memory_bytes, mi_cmd_trace_frame_collected):
5738 Likewise.
5739
5740 2017-09-09 Tom Tromey <tom@tromey.com>
5741
5742 * disasm.c (gdb_pretty_print_disassembler::pretty_print_insn): Use
5743 ui_out_emit_tuple.
5744
5745 2017-09-09 Tom Tromey <tom@tromey.com>
5746
5747 * target.c (flash_erase_command): Use ui_out_emit_tuple.
5748 * stack.c (print_frame): Use ui_out_emit_tuple.
5749 * spu-tdep.c (info_spu_event_command): Use ui_out_emit_tuple.
5750 (info_spu_mailbox_command, info_spu_dma_command)
5751 (info_spu_proxydma_command): Likewise.
5752 * mi/mi-main.c (mi_cmd_trace_frame_collected): Use
5753 ui_out_emit_tuple, gdb::byte_vector, bin2hex.
5754 * mi/mi-cmd-file.c (mi_cmd_file_list_shared_libraries): Use
5755 ui_out_emit_tuple.
5756 * breakpoint.c (print_it_watchpoint): Use ui_out_emit_tuple.
5757
5758 2017-09-09 Tom Tromey <tom@tromey.com>
5759
5760 * ui-out.h (make_cleanup_ui_out_table_begin_end): Remove.
5761 (class ui_out_emit_table): Update comment.
5762 * ui-out.c (do_cleanup_table_end)
5763 (make_cleanup_ui_out_table_begin_end): Remove.
5764 * spu-tdep.c (info_spu_mailbox_list): Use ui_out_emit_table.
5765 (info_spu_dma_cmdlist): Likewise.
5766 * probe.c (info_probes_for_ops): Use ui_out_emit_table.
5767 * darwin-nat-info.c (darwin_debug_regions_recurse): Use
5768 ui_out_emit_table.
5769
5770 2017-09-09 Tom Tromey <tom@tromey.com>
5771
5772 * thread.c (print_thread_info_1): Use ui_out_emit_table,
5773 ui_out_emit_list, gdb::optional.
5774
5775 2017-09-09 John Baldwin <jhb@FreeBSD.org>
5776
5777 * aarch64-linux-nat.c: Remove _initialize_aarch64_linux_nat
5778 prototype.
5779 * aarch64-linux-tdep.c: Remove _initialize_aarch64_linux_tdep
5780 prototype.
5781 * aarch64-newlib-tdep.c: Remove _initialize_aarch64_newlib_tdep
5782 prototype.
5783 * aarch64-tdep.c: Remove _initialize_aarch64_tdep prototype.
5784 * ada-exp.y: Remove _initialize_ada_exp prototype.
5785 * ada-lang.c: Remove _initialize_ada_language prototype.
5786 * ada-tasks.c: Remove _initialize_tasks prototype.
5787 * addrmap.c: Remove _initialize_addrmap prototype.
5788 * agent.c: Remove _initialize_agent prototype.
5789 * aix-thread.c: Remove _initialize_aix_thread prototype.
5790 * alpha-bsd-nat.c: Remove _initialize_alphabsd_nat prototype.
5791 * alpha-linux-nat.c: Remove _initialize_alpha_linux_nat prototype.
5792 * alpha-linux-tdep.c: Remove _initialize_alpha_linux_tdep
5793 prototype.
5794 * alpha-nbsd-tdep.c: Remove _initialize_alphanbsd_tdep prototype.
5795 * alpha-obsd-tdep.c: Remove _initialize_alphaobsd_tdep prototype.
5796 * alpha-tdep.c: Remove _initialize_alpha_tdep prototype.
5797 * amd64-darwin-tdep.c: Remove _initialize_amd64_darwin_tdep
5798 prototype.
5799 * amd64-dicos-tdep.c: Remove _initialize_amd64_dicos_tdep
5800 prototype.
5801 * amd64-fbsd-nat.c: Remove _initialize_amd64fbsd_nat prototype.
5802 * amd64-fbsd-tdep.c: Remove _initialize_amd64fbsd_tdep prototype.
5803 * amd64-linux-nat.c: Remove _initialize_amd64_linux_nat prototype.
5804 * amd64-linux-tdep.c: Remove _initialize_amd64_linux_tdep
5805 prototype.
5806 * amd64-nbsd-nat.c: Remove _initialize_amd64nbsd_nat prototype.
5807 * amd64-nbsd-tdep.c: Remove _initialize_amd64nbsd_tdep prototype.
5808 * amd64-obsd-nat.c: Remove _initialize_amd64obsd_nat prototype.
5809 * amd64-obsd-tdep.c: Remove _initialize_amd64obsd_tdep prototype.
5810 * amd64-sol2-tdep.c: Remove _initialize_amd64_sol2_tdep prototype.
5811 * amd64-tdep.c: Remove _initialize_amd64_tdep prototype.
5812 * amd64-windows-nat.c: Remove _initialize_amd64_windows_nat
5813 prototype.
5814 * amd64-windows-tdep.c: Remove _initialize_amd64_windows_tdep
5815 prototype.
5816 * annotate.c: Remove _initialize_annotate prototype.
5817 * arc-newlib-tdep.c: Remove _initialize_arc_newlib_tdep prototype.
5818 * arc-tdep.c: Remove _initialize_arc_tdep prototype.
5819 * arch-utils.c: Remove _initialize_gdbarch_utils prototype.
5820 * arm-linux-nat.c: Remove _initialize_arm_linux_nat prototype.
5821 * arm-linux-tdep.c: Remove _initialize_arm_linux_tdep prototype.
5822 * arm-nbsd-tdep.c: Remove _initialize_arm_netbsd_tdep prototype.
5823 * arm-obsd-tdep.c: Remove _initialize_armobsd_tdep prototype.
5824 * arm-symbian-tdep.c: Remove _initialize_arm_symbian_tdep
5825 prototype.
5826 * arm-tdep.c: Remove _initialize_arm_tdep prototype.
5827 * arm-wince-tdep.c: Remove _initialize_arm_wince_tdep prototype.
5828 * auto-load.c: Remove _initialize_auto_load prototype.
5829 * auxv.c: Remove _initialize_auxv prototype.
5830 * avr-tdep.c: Remove _initialize_avr_tdep prototype.
5831 * ax-gdb.c: Remove _initialize_ax_gdb prototype.
5832 * bfin-linux-tdep.c: Remove _initialize_bfin_linux_tdep prototype.
5833 * bfin-tdep.c: Remove _initialize_bfin_tdep prototype.
5834 * break-catch-sig.c: Remove _initialize_break_catch_sig prototype.
5835 * break-catch-syscall.c: Remove _initialize_break_catch_syscall
5836 prototype.
5837 * break-catch-throw.c: Remove _initialize_break_catch_throw
5838 prototype.
5839 * breakpoint.c: Remove _initialize_breakpoint prototype.
5840 * bsd-uthread.c: Remove _initialize_bsd_uthread prototype.
5841 * btrace.c: Remove _initialize_btrace prototype.
5842 * charset.c: Remove _initialize_charset prototype.
5843 * cli/cli-cmds.c: Remove _initialize_cli_cmds prototype.
5844 * cli/cli-dump.c: Remove _initialize_cli_dump prototype.
5845 * cli/cli-interp.c: Remove _initialize_cli_interp prototype.
5846 * cli/cli-logging.c: Remove _initialize_cli_logging prototype.
5847 * cli/cli-script.c: Remove _initialize_cli_script prototype.
5848 * coff-pe-read.c: Remove _initialize_coff_pe_read prototype.
5849 * coffread.c: Remove _initialize_coffread prototype.
5850 * compile/compile.c: Remove _initialize_compile prototype.
5851 * complaints.c: Remove _initialize_complaints prototype.
5852 * completer.c: Remove _initialize_completer prototype.
5853 * copying.awk: Remove _initialize_copying prototype.
5854 * copying.c: Regenerate.
5855 * core-regset.c: Remove _initialize_core_regset prototype.
5856 * corefile.c: Remove _initialize_core prototype.
5857 * corelow.c: Remove _initialize_corelow prototype.
5858 * cp-abi.c: Remove _initialize_cp_abi prototype.
5859 * cp-namespace.c: Remove _initialize_cp_namespace prototype.
5860 * cp-support.c: Remove _initialize_cp_support prototype.
5861 * cp-valprint.c: Remove _initialize_cp_valprint prototype.
5862 * cris-linux-tdep.c: Remove _initialize_cris_linux_tdep prototype.
5863 * cris-tdep.c: Remove _initialize_cris_tdep prototype.
5864 * ctf.c: Remove _initialize_ctf prototype.
5865 * d-lang.c: Remove _initialize_d_language prototype.
5866 * darwin-nat-info.c: Remove _initialize_darwin_info_commands
5867 prototype.
5868 * darwin-nat.c: Remove _initialize_darwin_inferior prototype.
5869 * dbxread.c: Remove _initialize_dbxread prototype.
5870 * dcache.c: Remove _initialize_dcache prototype.
5871 * demangle.c: Remove _initialize_demangler prototype.
5872 * disasm-selftests.c: Remove _initialize_disasm_selftests
5873 prototype.
5874 * disasm.c: Remove _initialize_disasm prototype.
5875 * dtrace-probe.c: Remove _initialize_dtrace_probe prototype.
5876 * dummy-frame.c: Remove _initialize_dummy_frame prototype.
5877 * dwarf2-frame-tailcall.c: Remove _initialize_tailcall_frame
5878 prototype.
5879 * dwarf2-frame.c: Remove _initialize_dwarf2_frame prototype.
5880 * dwarf2expr.c: Remove _initialize_dwarf2expr prototype.
5881 * dwarf2loc.c: Remove _initialize_dwarf2loc prototype.
5882 * dwarf2read.c: Remove _initialize_dwarf2_read prototype.
5883 * elfread.c: Remove _initialize_elfread prototype.
5884 * exec.c: Remove _initialize_exec prototype.
5885 * extension.c: Remove _initialize_extension prototype.
5886 * f-lang.c: Remove _initialize_f_language prototype.
5887 * f-valprint.c: Remove _initialize_f_valprint prototype.
5888 * fbsd-nat.c: Remove _initialize_fbsd_nat prototype.
5889 * fbsd-tdep.c: Remove _initialize_fbsd_tdep prototype.
5890 * filesystem.c: Remove _initialize_filesystem prototype.
5891 * findcmd.c: Remove _initialize_mem_search prototype.
5892 * fork-child.c: Remove _initialize_fork_child prototype.
5893 * frame-base.c: Remove _initialize_frame_base prototype.
5894 * frame-unwind.c: Remove _initialize_frame_unwind prototype.
5895 * frame.c: Remove _initialize_frame prototype.
5896 * frv-linux-tdep.c: Remove _initialize_frv_linux_tdep prototype.
5897 * frv-tdep.c: Remove _initialize_frv_tdep prototype.
5898 * ft32-tdep.c: Remove _initialize_ft32_tdep prototype.
5899 * gcore.c: Remove _initialize_gcore prototype.
5900 * gdb_bfd.c: Remove _initialize_gdb_bfd prototype.
5901 * gdbarch.c: Regenerate.
5902 * gdbarch.sh: Remove _initialize_gdbarch prototype.
5903 * gdbtypes.c: Remove _initialize_gdbtypes prototype.
5904 * gnu-nat.c: Remove _initialize_gnu_nat prototype.
5905 * gnu-v2-abi.c: Remove _initialize_gnu_v2_abi prototype.
5906 * gnu-v3-abi.c: Remove _initialize_gnu_v3_abi prototype.
5907 * go-lang.c: Remove _initialize_go_language prototype.
5908 * go32-nat.c: Remove _initialize_go32_nat prototype.
5909 * guile/guile.c: Remove _initialize_guile prototype.
5910 * h8300-tdep.c: Remove _initialize_h8300_tdep prototype.
5911 * hppa-linux-nat.c: Remove _initialize_hppa_linux_nat prototype.
5912 * hppa-linux-tdep.c: Remove _initialize_hppa_linux_tdep prototype.
5913 * hppa-nbsd-nat.c: Remove _initialize_hppanbsd_nat prototype.
5914 * hppa-nbsd-tdep.c: Remove _initialize_hppanbsd_tdep prototype.
5915 * hppa-obsd-nat.c: Remove _initialize_hppaobsd_nat prototype.
5916 * hppa-obsd-tdep.c: Remove _initialize_hppaobsd_tdep prototype.
5917 * hppa-tdep.c: Remove _initialize_hppa_tdep prototype.
5918 * i386-bsd-nat.c: Remove _initialize_i386bsd_nat prototype.
5919 * i386-cygwin-tdep.c: Remove _initialize_i386_cygwin_tdep
5920 prototype.
5921 * i386-darwin-tdep.c: Remove _initialize_i386_darwin_tdep
5922 prototype.
5923 * i386-dicos-tdep.c: Remove _initialize_i386_dicos_tdep prototype.
5924 * i386-fbsd-nat.c: Remove _initialize_i386fbsd_nat prototype.
5925 * i386-fbsd-tdep.c: Remove _initialize_i386fbsd_tdep prototype.
5926 * i386-gnu-nat.c: Remove _initialize_i386gnu_nat prototype.
5927 * i386-gnu-tdep.c: Remove _initialize_i386gnu_tdep prototype.
5928 * i386-linux-nat.c: Remove _initialize_i386_linux_nat prototype.
5929 * i386-linux-tdep.c: Remove _initialize_i386_linux_tdep prototype.
5930 * i386-nbsd-nat.c: Remove _initialize_i386nbsd_nat prototype.
5931 * i386-nbsd-tdep.c: Remove _initialize_i386nbsd_tdep prototype.
5932 * i386-nto-tdep.c: Remove _initialize_i386nto_tdep prototype.
5933 * i386-obsd-nat.c: Remove _initialize_i386obsd_nat prototype.
5934 * i386-obsd-tdep.c: Remove _initialize_i386obsd_tdep prototype.
5935 * i386-sol2-nat.c: Remove _initialize_amd64_sol2_nat prototype.
5936 * i386-sol2-tdep.c: Remove _initialize_amd64_sol2_tdep prototype.
5937 * i386-tdep.c: Remove _initialize_i386_tdep prototype.
5938 * i386-windows-nat.c: Remove _initialize_i386_windows_nat
5939 prototype.
5940 * ia64-libunwind-tdep.c: Remove _initialize_libunwind_frame
5941 prototype.
5942 * ia64-linux-nat.c: Remove _initialize_ia64_linux_nat prototype.
5943 * ia64-linux-tdep.c: Remove _initialize_ia64_linux_tdep prototype.
5944 * ia64-tdep.c: Remove _initialize_ia64_tdep prototype.
5945 * ia64-vms-tdep.c: Remove _initialize_ia64_vms_tdep prototype.
5946 * infcall.c: Remove _initialize_infcall prototype.
5947 * infcmd.c: Remove _initialize_infcmd prototype.
5948 * inferior.c: Remove _initialize_inferiors prototype.
5949 * inflow.c: Remove _initialize_inflow prototype.
5950 * infrun.c: Remove _initialize_infrun prototype.
5951 * interps.c: Remove _initialize_interpreter prototype.
5952 * iq2000-tdep.c: Remove _initialize_iq2000_tdep prototype.
5953 * jit.c: Remove _initialize_jit prototype.
5954 * language.c: Remove _initialize_language prototype.
5955 * linux-fork.c: Remove _initialize_linux_fork prototype.
5956 * linux-nat.c: Remove _initialize_linux_nat prototype.
5957 * linux-tdep.c: Remove _initialize_linux_tdep prototype.
5958 * linux-thread-db.c: Remove _initialize_thread_db prototype.
5959 * lm32-tdep.c: Remove _initialize_lm32_tdep prototype.
5960 * m2-lang.c: Remove _initialize_m2_language prototype.
5961 * m32c-tdep.c: Remove _initialize_m32c_tdep prototype.
5962 * m32r-linux-nat.c: Remove _initialize_m32r_linux_nat prototype.
5963 * m32r-linux-tdep.c: Remove _initialize_m32r_linux_tdep prototype.
5964 * m32r-tdep.c: Remove _initialize_m32r_tdep prototype.
5965 * m68hc11-tdep.c: Remove _initialize_m68hc11_tdep prototype.
5966 * m68k-bsd-nat.c: Remove _initialize_m68kbsd_nat prototype.
5967 * m68k-bsd-tdep.c: Remove _initialize_m68kbsd_tdep prototype.
5968 * m68k-linux-nat.c: Remove _initialize_m68k_linux_tdep prototype.
5969 * m68k-linux-tdep.c: Remove _initialize_m68k_linux_tdep prototype.
5970 * m68k-tdep.c: Remove _initialize_m68k_tdep prototype.
5971 * m88k-bsd-nat.c: Remove _initialize_m68kbsd_nat prototype.
5972 * m88k-tdep.c: Remove _initialize_m68kbsd_tdep prototype.
5973 * machoread.c: Remove _initialize_machoread prototype.
5974 * macrocmd.c: Remove _initialize_macrocmd prototype.
5975 * macroscope.c: Remove _initialize_macroscope prototype.
5976 * maint.c: Remove _initialize_maint_cmds prototype.
5977 * mdebugread.c: Remove _initialize_mdebugread prototype.
5978 * memattr.c: Remove _initialize_mem prototype.
5979 * mep-tdep.c: Remove _initialize_mep_tdep prototype.
5980 * mi/mi-cmd-env.c: Remove _initialize_mi_cmd_env prototype.
5981 * mi/mi-cmds.c: Remove _initialize_mi_cmds prototype.
5982 * mi/mi-interp.c: Remove _initialize_mi_interp prototype.
5983 * mi/mi-main.c: Remove _initialize_mi_main prototype.
5984 * microblaze-linux-tdep.c: Remove
5985 _initialize_microblaze_linux_tdep prototype.
5986 * microblaze-tdep.c: Remove _initialize_microblaze_tdep prototype.
5987 * mips-fbsd-nat.c: Remove _initialize_mips_fbsd_nat prototype.
5988 * mips-fbsd-tdep.c: Remove _initialize_mips_fbsd_tdep prototype.
5989 * mips-linux-nat.c: Remove _initialize_mips_linux_nat prototype.
5990 * mips-linux-tdep.c: Remove _initialize_mips_linux_tdep prototype.
5991 * mips-nbsd-nat.c: Remove _initialize_mipsnbsd_nat prototype.
5992 * mips-nbsd-tdep.c: Remove _initialize_mipsnbsd_tdep prototype.
5993 * mips-sde-tdep.c: Remove _initialize_mips_sde_tdep prototype.
5994 * mips-tdep.c: Remove _initialize_mips_tdep prototype.
5995 * mips64-obsd-nat.c: Remove _initialize_mips64obsd_nat prototype.
5996 * mips64-obsd-tdep.c: Remove _initialize_mips64obsd_tdep
5997 prototype.
5998 * mipsread.c: Remove _initialize_mipsread prototype.
5999 * mn10300-linux-tdep.c: Remove _initialize_mn10300_linux_tdep
6000 prototype.
6001 * mn10300-tdep.c: Remove _initialize_mn10300_tdep prototype.
6002 * moxie-tdep.c: Remove _initialize_moxie_tdep prototype.
6003 * msp430-tdep.c: Remove _initialize_msp430_tdep prototype.
6004 * mt-tdep.c: Remove _initialize_mt_tdep prototype.
6005 * nds32-tdep.c: Remove _initialize_nds32_tdep prototype.
6006 * nios2-linux-tdep.c: Remove _initialize_nios2_linux_tdep
6007 prototype.
6008 * nios2-tdep.c: Remove _initialize_nios2_tdep prototype.
6009 * nto-procfs.c: Remove _initialize_procfs prototype.
6010 * nto-tdep.c: Remove _initialize_nto_tdep prototype.
6011 * objc-lang.c: Remove _initialize_objc_language prototype.
6012 * objfiles.c: Remove _initialize_objfiles prototype.
6013 * observer.c: Remove observer_test_first_notification_function,
6014 observer_test_second_notification_function,
6015 observer_test_third_notification_function, and
6016 _initialize_observer prototypes.
6017 * opencl-lang.c: Remove _initialize_opencl_language prototypes.
6018 * osabi.c: Remove _initialize_gdb_osabi prototype.
6019 * osdata.c: Remove _initialize_osdata prototype.
6020 * p-valprint.c: Remove _initialize_pascal_valprint prototype.
6021 * parse.c: Remove _initialize_parse prototype.
6022 * ppc-fbsd-nat.c: Remove _initialize_ppcfbsd_nat prototype.
6023 * ppc-fbsd-tdep.c: Remove _initialize_ppcfbsd_tdep prototype.
6024 * ppc-linux-nat.c: Remove _initialize_ppc_linux_nat prototype.
6025 * ppc-linux-tdep.c: Remove _initialize_ppc_linux_tdep prototype.
6026 * ppc-nbsd-nat.c: Remove _initialize_ppcnbsd_nat prototype.
6027 * ppc-nbsd-tdep.c: Remove _initialize_ppcnbsd_tdep prototype.
6028 * ppc-obsd-nat.c: Remove _initialize_ppcobsd_nat prototype.
6029 * ppc-obsd-tdep.c: Remove _initialize_ppcobsd_tdep prototype.
6030 * printcmd.c: Remove _initialize_printcmd prototype.
6031 * probe.c: Remove _initialize_probe prototype.
6032 * proc-api.c: Remove _initialize_proc_api prototype.
6033 * proc-events.c: Remove _initialize_proc_events prototype.
6034 * proc-service.c: Remove _initialize_proc_service prototype.
6035 * procfs.c: Remove _initialize_procfs prototype.
6036 * psymtab.c: Remove _initialize_psymtab prototype.
6037 * python/python.c: Remove _initialize_python prototype.
6038 * ravenscar-thread.c: Remove _initialize_ravenscar prototype.
6039 * record-btrace.c: Remove _initialize_record_btrace prototype.
6040 * record-full.c: Remove _initialize_record_full prototype.
6041 * record.c: Remove _initialize_record prototype.
6042 * regcache.c: Remove _initialize_regcache prototype.
6043 * reggroups.c: Remove _initialize_reggroup prototype.
6044 * remote-notif.c: Remove _initialize_notif prototype.
6045 * remote-sim.c: Remove _initialize_remote_sim prototype.
6046 * remote.c: Remove _initialize_remote prototype.
6047 * reverse.c: Remove _initialize_reverse prototype.
6048 * rl78-tdep.c: Remove _initialize_rl78_tdep prototype.
6049 * rs6000-aix-tdep.c: Remove _initialize_rs6000_aix_tdep prototype.
6050 * rs6000-lynx178-tdep.c: Remove _initialize_rs6000_lynx178_tdep
6051 prototype.
6052 * rs6000-nat.c: Remove _initialize_rs6000_nat prototype.
6053 * rs6000-tdep.c: Remove _initialize_rs6000_tdep prototype.
6054 * rust-exp.y: Remove _initialize_rust_exp prototype.
6055 * rx-tdep.c: Remove _initialize_rx_tdep prototype.
6056 * s390-linux-nat.c: Remove _initialize_s390_nat prototype.
6057 * s390-linux-tdep.c: Remove _initialize_s390_tdep prototype.
6058 * score-tdep.c: Remove _initialize_score_tdep prototype.
6059 * selftest-arch.c: Remove _initialize_selftests_foreach_arch
6060 prototype.
6061 * ser-go32.c: Remove _initialize_ser_dos prototype.
6062 * ser-mingw.c: Remove _initialize_ser_windows prototype.
6063 * ser-pipe.c: Remove _initialize_ser_pipe prototype.
6064 * ser-tcp.c: Remove _initialize_ser_tcp prototype.
6065 * ser-unix.c: Remove _initialize_ser_hardwire prototype.
6066 * serial.c: Remove _initialize_serial prototype.
6067 * sh-linux-tdep.c: Remove _initialize_sh_linux_tdep prototype.
6068 * sh-nbsd-nat.c: Remove _initialize_shnbsd_nat prototype.
6069 * sh-nbsd-tdep.c: Remove _initialize_shnbsd_tdep prototype.
6070 * sh-tdep.c: Remove _initialize_sh_tdep prototype.
6071 * skip.c: Remove _initialize_step_skip prototype.
6072 * sol-thread.c: Remove _initialize_sol_thread prototype.
6073 * solib-aix.c: Remove _initialize_solib_aix prototype.
6074 * solib-darwin.c: Remove _initialize_darwin_solib prototype.
6075 * solib-dsbt.c: Remove _initialize_dsbt_solib prototype.
6076 * solib-frv.c: Remove _initialize_frv_solib prototype.
6077 * solib-spu.c: Remove _initialize_spu_solib prototype.
6078 * solib-svr4.c: Remove _initialize_svr4_solib prototype.
6079 * solib-target.c: Remove _initialize_solib_target prototype.
6080 * solib.c: Remove _initialize_solib prototype.
6081 * source.c: Remove _initialize_source prototype.
6082 * sparc-linux-nat.c: Remove _initialize_sparc_linux_nat prototype.
6083 * sparc-linux-tdep.c: Remove _initialize_sparc_linux_tdep
6084 prototype.
6085 * sparc-nat.c: Remove _initialize_sparc_nat prototype.
6086 * sparc-nbsd-nat.c: Remove _initialize_sparcnbsd_nat prototype.
6087 * sparc-nbsd-tdep.c: Remove _initialize_sparcnbsd_tdep prototype.
6088 * sparc-obsd-tdep.c: Remove _initialize_sparc32obsd_tdep
6089 prototype.
6090 * sparc-sol2-nat.c: Remove _initialize_sparc_sol2_nat prototype.
6091 * sparc-sol2-tdep.c: Remove _initialize_sparc_sol2_tdep prototype.
6092 * sparc-tdep.c: Remove _initialize_sparc_tdep prototype.
6093 * sparc64-fbsd-nat.c: Remove _initialize_sparc64fbsd_nat
6094 prototype.
6095 * sparc64-fbsd-tdep.c: Remove _initialize_sparc64fbsd_tdep
6096 prototype.
6097 * sparc64-linux-nat.c: Remove _initialize_sparc64_linux_nat
6098 prototype.
6099 * sparc64-linux-tdep.c: Remove _initialize_sparc64_linux_tdep
6100 prototype.
6101 * sparc64-nat.c: Remove _initialize_sparc64_nat prototype.
6102 * sparc64-nbsd-nat.c: Remove _initialize_sparc64nbsd_nat
6103 prototype.
6104 * sparc64-nbsd-tdep.c: Remove _initialize_sparc64nbsd_tdep
6105 prototype.
6106 * sparc64-obsd-nat.c: Remove _initialize_sparc64obsd_nat
6107 prototype.
6108 * sparc64-obsd-tdep.c: Remove _initialize_sparc64obsd_tdep
6109 prototype.
6110 * sparc64-sol2-tdep.c: Remove _initialize_sparc64_sol2_tdep
6111 prototype.
6112 * spu-linux-nat.c: Remove _initialize_spu_nat prototype.
6113 * spu-multiarch.c: Remove _initialize_spu_multiarch prototype.
6114 * spu-tdep.c: Remove _initialize_spu_tdep prototype.
6115 * stabsread.c: Remove _initialize_stabsread prototype.
6116 * stack.c: Remove _initialize_stack prototype.
6117 * stap-probe.c: Remove _initialize_stap_probe prototype.
6118 * std-regs.c: Remove _initialize_frame_reg prototype.
6119 * symfile-debug.c: Remove _initialize_symfile_debug prototype.
6120 * symfile-mem.c: Remove _initialize_symfile_mem prototype.
6121 * symfile.c: Remove _initialize_symfile prototype.
6122 * symmisc.c: Remove _initialize_symmisc prototype.
6123 * symtab.c: Remove _initialize_symtab prototype.
6124 * target-dcache.c: Remove _initialize_target_dcache prototype.
6125 * target-descriptions.c: Remove _initialize_target_descriptions
6126 prototype.
6127 * thread.c: Remove _initialize_thread prototype.
6128 * tic6x-linux-tdep.c: Remove _initialize_tic6x_linux_tdep
6129 prototype.
6130 * tic6x-tdep.c: Remove _initialize_tic6x_tdep prototype.
6131 * tilegx-linux-nat.c: Remove _initialize_tile_linux_nat prototype.
6132 * tilegx-linux-tdep.c: Remove _initialize_tilegx_linux_tdep
6133 prototype.
6134 * tilegx-tdep.c: Remove _initialize_tilegx_tdep prototype.
6135 * tracefile-tfile.c: Remove _initialize_tracefile_tfile prototype.
6136 * tracefile.c: Remove _initialize_tracefile prototype.
6137 * tracepoint.c: Remove _initialize_tracepoint prototype.
6138 * tui/tui-hooks.c: Remove _initialize_tui_hooks prototype.
6139 * tui/tui-interp.c: Remove _initialize_tui_interp prototype.
6140 * tui/tui-layout.c: Remove _initialize_tui_layout prototype.
6141 * tui/tui-regs.c: Remove _initialize_tui_regs prototype.
6142 * tui/tui-stack.c: Remove _initialize_tui_stack prototype.
6143 * tui/tui-win.c: Remove _initialize_tui_win prototype.
6144 * tui/tui.c: Remove _initialize_tui prototype.
6145 * typeprint.c: Remove _initialize_typeprint prototype.
6146 * user-regs.c: Remove _initialize_user_regs prototype.
6147 * utils.c: Remove _initialize_utils prototype.
6148 * v850-tdep.c: Remove _initialize_v850_tdep prototype.
6149 * valarith.c: Remove _initialize_valarith prototype.
6150 * valops.c: Remove _initialize_valops prototype.
6151 * valprint.c: Remove _initialize_valprint prototype.
6152 * value.c: Remove _initialize_values prototype.
6153 * varobj.c: Remove _initialize_varobj prototype.
6154 * vax-bsd-nat.c: Remove _initialize_vaxbsd_nat prototype.
6155 * vax-nbsd-tdep.c: Remove _initialize_vaxnbsd_tdep prototype.
6156 * vax-tdep.c: Remove _initialize_vax_tdep prototype.
6157 * windows-nat.c: Remove _initialize_windows_nat,
6158 _initialize_check_for_gdb_ini, and _initialize_loadable
6159 prototypes.
6160 * windows-tdep.c: Remove _initialize_windows_tdep prototype.
6161 * xcoffread.c: Remove _initialize_xcoffread prototype.
6162 * xml-support.c: Remove _initialize_xml_support prototype.
6163 * xstormy16-tdep.c: Remove _initialize_xstormy16_tdep prototype.
6164 * xtensa-linux-nat.c: Remove _initialize_xtensa_linux_nat
6165 prototype.
6166 * xtensa-linux-tdep.c: Remove _initialize_xtensa_linux_tdep
6167 prototype.
6168 * xtensa-tdep.c: Remove _initialize_xtensa_tdep prototype.
6169
6170 2017-09-08 Keith Seitz <keiths@redhat.com>
6171
6172 * dwarf2read.c (struct field_info) <fnfields>: Remove unused
6173 field.
6174
6175 2017-09-08 Christoph Weinmann <christoph.t.weinmann@intel.com>
6176
6177 * f-valprint.c (f_val_print): Remove check for one byte
6178 sized integers. Remove printing of character type.
6179
6180 2017-09-08 Frank Penczek <frank.penczek@intel.com>
6181 Christoph Weinmann <christoph.t.weinmann@intel.com>
6182 Bernhard Heckel <bernhard.heckel@intel.com>
6183
6184 * f-typeprint.c (f_type_print_base): Use fprintfi_filtered
6185 to maintain proper indentation when printing pointers/refs.
6186
6187 2017-09-07 Joel Brobecker <brobecker@adacore.com>
6188
6189 GDB 8.0.1 released.
6190
6191 2017-09-07 Joel Brobecker <brobecker@adacore.com>
6192
6193 * NEWS (Changes in GDB 7.11): Remove entry for QStartupWithShell.
6194
6195 2017-09-05 Tom Tromey <tom@tromey.com>
6196
6197 * parse.c (funcall_chain): Now a std::vector.
6198 (start_arglist, end_arglist): Simplify.
6199 (free_funcalls): Remove.
6200 (parse_exp_in_context_1): Remove cleanup.
6201
6202 2017-09-05 Tom Tromey <tom@tromey.com>
6203
6204 * go-exp.y (go_parse): Don't create a cleanup.
6205
6206 2017-09-05 Tom Tromey <tom@tromey.com>
6207
6208 * d-exp.y (PrimaryExpression): Use std::string.
6209 (d_parse): Don't create a cleanup.
6210
6211 2017-09-05 Tom Tromey <tom@tromey.com>
6212
6213 * utils.c (do_clear_parser_state): Remove.
6214 (make_cleanup_clear_parser_state): Remove.
6215 * p-exp.y (pascal_parse): Use scoped_restore.
6216 * m2-exp.y (m2_parse): Use scoped_restore.
6217 * f-exp.y (f_parse): Use scoped_restore.
6218 * d-exp.y (d_parse): Use scoped_restore.
6219 * c-exp.y (c_parse): Use scoped_restore.
6220 * ada-exp.y (ada_parse): Use scoped_restore.
6221 * utils.h (make_cleanup_clear_parser_state): Remove.
6222
6223 2017-09-06 Keith Seitz <keiths@redhat.com>
6224
6225 * dwarf2read.c (dw2_linkage_name_attr): New function.
6226 (dw2_linkage_name): New function.
6227 (dwarf2_compute_name, dwarf2_physname, read_call_site_scope)
6228 (guess_full_die_structure_name, dwarf2_name): Use dw2_linkage_name.
6229 (anonymous_struct_prefix, dwarf2_name): Use dw2_linkage_name_attr.
6230
6231 2017-09-06 Kamil Rytarowski <n54@gmx.com>
6232
6233 * config/djgpp/djconfig.sh: Correct shell portability issue.
6234
6235 2017-09-06 Kamil Rytarowski <n54@gmx.com>
6236
6237 * configure.nat: Define HAVE_NATIVE_GCORE_HOST on NetBSD.
6238
6239 2017-09-06 John Baldwin <jhb@FreeBSD.org>
6240
6241 * Makefile.in (ALLDEPFILES): Add mips-fbsd-nat.c.
6242 * NEWS: Mention new FreeBSD/mips native configuration.
6243 * configure.host: Add aarch64*-*-freebsd*.
6244 * configure.nat: Likewise.
6245 * aarch64-fbsd-nat.c: New file.
6246
6247 2017-09-06 John Baldwin <jhb@FreeBSD.org>
6248
6249 * Makefile.in (ALL_64_TARGET_OBS): Add aarch64-fbsd-tdep.o.
6250 (ALLDEPFILES): Add aarch64-fbsd-tdep.c.
6251 * NEWS: Mention new FreeBSD/aarch64 target.
6252 * configure.tgt: Add aarch64*-*-freebsd*.
6253 * aarch64-fbsd-tdep.c: New file.
6254 * aarch64-fbsd-tdep.h: New file.
6255
6256 2017-09-06 Kamil Rytarowski <n54@gmx.com>
6257
6258 * MAINTAINERS (Write After Approval): Add Kamil Rytarowski.
6259
6260 2017-09-06 Jan Kratochvil <jan.kratochvil@redhat.com>
6261
6262 * parse.c (find_minsym_type_and_address): Don't relocate addresses
6263 of TLS symbols.
6264
6265 2017-09-05 Philippe Waroquiers <philippe.waroquiers@skynet.be>
6266
6267 * objfiles.c (get_objfile_bfd_data): Remove useless obstack_init
6268 call.
6269
6270 2017-09-05 Simon Marchi <simon.marchi@ericsson.com>
6271
6272 * infrun.c (follow_exec): Call add_thread after
6273 target_find_description.
6274
6275 2017-09-05 Simon Marchi <simon.marchi@ericsson.com>
6276
6277 * infrun.c (handle_inferior_event_1): When exec'ing, read
6278 stop_pc after follow_exec.
6279
6280 2017-09-05 Simon Marchi <simon.marchi@ericsson.com>
6281
6282 * remote.c (process_g_packet): Update error message.
6283
6284 2017-09-05 Yao Qi <yao.qi@linaro.org>
6285
6286 * configure.tgt (gdb_target_obs): Add i386.o for x86_64-*
6287 targets.
6288
6289 2017-09-05 Pedro Alves <palves@redhat.com>
6290
6291 * eval.c (eval_call, evaluate_funcall): New functions, factored
6292 out from ...
6293 (evaluate_subexp_standard): ... this.
6294
6295 2017-09-05 Yao Qi <yao.qi@linaro.org>
6296
6297 * amd64-tdep.c (amd64_target_description): Create target
6298 descriptions.
6299 (_initialize_amd64_tdep): Don't call functions
6300 initialize_tdesc_amd64_*. Add self tests.
6301 * arch/amd64.c (amd64_create_target_description): Add parameter
6302 is_linux. Call set_tdesc_osabi if is_linux is true.
6303 * arch/amd64.h (amd64_create_target_description): Update the
6304 declaration.
6305 * arch/i386.c (i386_create_target_description): Add parameter
6306 is_linux. Call set_tdesc_osabi if is_linux is true.
6307 * arch/i386.h (i386_create_target_description): Update
6308 declaration.
6309 * configure.tgt: Add i386.o to gdb_target_obs.
6310 * features/Makefile (XMLTOC): Remove i386/*.xml.
6311 * features/i386/amd64-avx-avx512.c: Remove.
6312 * features/i386/amd64-avx-mpx-avx512-pku.c: Remove.
6313 * features/i386/amd64-avx-mpx.c: Remove.
6314 * features/i386/amd64-avx.c: Remove.
6315 * features/i386/amd64-mpx.c: Remove.
6316 * features/i386/amd64.c: Remove.
6317 * features/i386/i386-avx-avx512.c: Remove.
6318 * features/i386/i386-avx-mpx-avx512-pku.c: Remove.
6319 * features/i386/i386-avx-mpx.c: Remove.
6320 * features/i386/i386-avx.c: Remove.
6321 * features/i386/i386-mmx.c: Remove.
6322 * features/i386/i386-mpx.c: Remove.
6323 * features/i386/i386.c: Remove.
6324 * i386-tdep.c: Don't include features/i386/i386*.c., include
6325 target-descriptions.h and arch/i386.h.
6326 (i386_target_description): Create target descriptions.
6327 (i386_gdbarch_init): Don't call initialize_tdesc_i386_*
6328 functions. Do self tests.
6329
6330 2017-09-05 Yao Qi <yao.qi@linaro.org>
6331
6332 * features/Makefile (XMLTOC): Remove i386/amd64XXX-linux.xml.
6333 * features/i386/amd64-avx-avx512-linux.c: Removed.
6334 * features/i386/amd64-avx-linux.c: Removed.
6335 * features/i386/amd64-avx-mpx-avx512-pku-linux.c: Removed.
6336 * features/i386/amd64-avx-mpx-linux.c: Removed.
6337 * features/i386/amd64-linux.c: Removed.
6338 * features/i386/amd64-mpx-linux.c: Removed.
6339 * features/i386/x32-avx-avx512-linux.c: Removed.
6340 * features/i386/x32-avx-linux.c: Removed.
6341 * features/i386/x32-linux.c: Removed.
6342
6343 2017-09-05 Yao Qi <yao.qi@linaro.org>
6344
6345 * amd64-linux-tdep.c: Include arch/amd64.h. Don't include
6346 features/i386/*.c.
6347 (amd64_linux_read_description): Call
6348 amd64_create_target_description.
6349 * arch/amd64.c: New file.
6350 * arch/amd64.h: New file.
6351 * configure.tgt (x86_64-*-linux*): Append amd64.o.
6352 * Makefile.in (ALL_64_TARGET_OBS): Append amd64.o.
6353
6354 2017-09-05 Yao Qi <yao.qi@linaro.org>
6355
6356 * amd64-linux-tdep.c: Don't include amd64-XXX-linux and
6357 x32-XXX-linux.c. Include 64bit-XX.c and x32-XX.c.
6358 (amd64_linux_read_description): Create target descriptions.
6359 (_initialize_amd64_linux_tdep): Don't call initialize_tdesc_XXX
6360 functions. Add unit tests.
6361 * features/Makefile (FEATURE_XMLFILES): Append 64bit-XXX.xml and
6362 x32-core.xml.
6363 * features/i386/64bit-avx.c: Generated.
6364 * features/i386/64bit-avx512.c: Generated.
6365 * features/i386/64bit-core.c: Generated.
6366 * features/i386/64bit-linux.c: Generated.
6367 * features/i386/64bit-mpx.c: Generated.
6368 * features/i386/64bit-pkeys.c: Generated.
6369 * features/i386/64bit-segments.c: Generated.
6370 * features/i386/64bit-sse.c: Generated.
6371 * features/i386/x32-core.c: Generated.
6372 * target-descriptions.c (maint_print_c_tdesc_cmd): Print feature
6373 c files for amd64-linux and x32-linux.
6374
6375 2017-09-05 Yao Qi <yao.qi@linaro.org>
6376
6377 * amd64-linux-tdep.c (amd64_linux_read_description): New
6378 function.
6379 (amd64_linux_core_read_description): Call
6380 amd64_linux_read_description.
6381 (amd64_linux_init_abi): Likewise.
6382 (amd64_x32_linux_init_abi): Likewise.
6383 * amd64-linux-tdep.h (amd64_linux_read_description): Declare.
6384 * x86-linux-nat.c (x86_linux_read_description): Call
6385 amd64_linux_read_description.
6386
6387 2017-09-05 Yao Qi <yao.qi@linaro.org>
6388
6389 * amd64-linux-tdep.c (amd64_linux_core_read_description): Update
6390 comments.
6391
6392 2017-09-05 Yao Qi <yao.qi@linaro.org>
6393
6394 * features/Makefile (XMLTOC): Remove i386/i386-XX-linux.xml.
6395 * features/i386/i386-avx-avx512-linux.c: Remove.
6396 * features/i386/i386-avx-linux.c: Remove.
6397 * features/i386/i386-avx-mpx-avx512-pku-linux.c: Remove.
6398 * features/i386/i386-avx-mpx-linux.c: Remove.
6399 * features/i386/i386-linux.c: Remove.
6400 * features/i386/i386-mmx-linux.c: Remove.
6401 * features/i386/i386-mpx-linux.c: Remove.
6402
6403 2017-09-05 Yao Qi <yao.qi@linaro.org>
6404
6405 * Makefile.in (ALL_TARGET_OBS): Add i386.o.
6406 (SFILES): Add arch/i386.c.
6407 (HFILES_NO_SRCDIR): Add arch/i386.h.
6408 * arch/i386.c: New file.
6409 * arch/i386.h: New file.
6410 * arch/tdesc.h (allocate_target_description): Declare.
6411 (set_tdesc_architecture): Declare.
6412 (set_tdesc_osabi): Declare.
6413 * configure.tgt (i[34567]86-*-linux*): Add i386.o.
6414 * i386-linux-tdep.c: Don't include ../features/i386/32bit-XXX.c.
6415 include arch/i386.h.
6416 (i386_linux_read_description): Remove code and call
6417 i386_create_target_description.
6418 (set_tdesc_architecture): New function.
6419 (set_tdesc_osabi): New function.
6420 * target-descriptions.h (allocate_target_description): Remove.
6421
6422 2017-09-05 Yao Qi <yao.qi@linaro.org>
6423
6424 * arch/tdesc.h (tdesc_create_feature): Add an argument xml.
6425 * target-descriptions.c (tdesc_create_feature): Likewise, and
6426 adjust code.
6427 * features/i386/32bit-avx.c: Re-generated.
6428 * features/i386/32bit-avx512.c: Re-generated.
6429 * features/i386/32bit-core.c: Re-generated.
6430 * features/i386/32bit-linux.c: Re-generated.
6431 * features/i386/32bit-mpx.c: Re-generated.
6432 * features/i386/32bit-pkeys.c: Re-generated.
6433 * features/i386/32bit-sse.c: Re-generated.
6434
6435 2017-09-05 Yao Qi <yao.qi@linaro.org>
6436
6437 * regformats/regdef.h (struct reg): Override operator == and !=.
6438
6439 2017-09-05 Yao Qi <yao.qi@linaro.org>
6440
6441 * arch/tdesc.h: New file.
6442 * regformats/regdat.sh: Generate code using tdesc_create_reg.
6443 * target-descriptions.c: Update comments.
6444 * target-descriptions.h: Include "arch/tdesc.h". Remove the
6445 declarations.
6446 * features/i386/32bit-avx.c: Re-generated.
6447 * features/i386/32bit-avx512.c: Re-generated.
6448 * features/i386/32bit-core.c: Re-generated.
6449 * features/i386/32bit-linux.c: Re-generated.
6450 * features/i386/32bit-mpx.c: Re-generated.
6451 * features/i386/32bit-pkeys.c: Re-generated.
6452 * features/i386/32bit-sse.c: Re-generated.
6453
6454 2017-09-05 Yao Qi <yao.qi@linaro.org>
6455
6456 * regformats/regdat.sh: Update generated code.
6457
6458 2017-09-05 Yao Qi <yao.qi@linaro.org>
6459
6460 * regformats/regdat.sh: Adjust code order.
6461
6462 2017-09-05 Simon Marchi <simon.marchi@ericsson.com>
6463
6464 * expprint.c (dump_subexp_body_standard): Use constant format
6465 string in fprintf_filtered call.
6466
6467 2017-09-04 John Baldwin <jhb@FreeBSD.org>
6468
6469 * configure.nat: Add "x86-nat.o x86-dregs.o" for NetBSD/amd64 and
6470 NetBSD/i386.
6471 * x86-bsd-nat.c [!DBREG_DRX && __NetBSD__]: Define DBREG_DRX.
6472
6473 2017-09-04 John Baldwin <jhb@FreeBSD.org>
6474
6475 * bsd-kvm.o: Make <sys/user.h> conditional on HAVE_SYS_USER_H.
6476
6477 2017-09-04 John Baldwin <jhb@FreeBSD.org>
6478
6479 * bsd-kvm.o: Define _KMEMUSER.
6480 * configure.ac: Define _KMEMUSER when checking for "struct lwp".
6481 * configure: Regenerate.
6482
6483 2017-09-04 John Baldwin <jhb@FreeBSD.org>
6484
6485 * amd64-fbsd-nat.c: Add include of "x86-xstate.h".
6486 * i386-fbsd-nat.c: Likewise.
6487
6488 2017-09-04 John Baldwin <jhb@FreeBSD.org>
6489
6490 * unittests/array-view-selftests.c: Add include of <array>.
6491
6492 2017-09-04 John Baldwin <jhb@FreeBSD.org>
6493
6494 * spu-tdep.c (flush_ea_cache): Add missing argument to
6495 call_function_by_hand.
6496
6497 2017-09-04 Pedro Alves <palves@redhat.com>
6498
6499 * NEWS (Safer support for debugging with no debug info): New.
6500
6501 2017-09-04 Pedro Alves <palves@redhat.com>
6502
6503 * c-exp.y (function_method, function_method_void): Add current
6504 instance flags to TYPE_INSTANCE.
6505 * dwarf2read.c (check_modifier): New.
6506 (compute_delayed_physnames): Assert that only C++ adds delayed
6507 physnames. Mark fn_fields as const/volatile depending on
6508 physname.
6509 * eval.c (make_params): New type_instance_flags parameter. Use
6510 it as the new type's instance flags.
6511 (evaluate_subexp_standard) <TYPE_INSTANCE>: Extract the instance
6512 flags element and pass it to make_params.
6513 * expprint.c (print_subexp_standard) <TYPE_INSTANCE>: Handle
6514 instance flags element.
6515 (dump_subexp_body_standard) <TYPE_INSTANCE>: Likewise.
6516 * gdbtypes.h: Include "enum-flags.h".
6517 (type_instance_flags): New enum-flags type.
6518 (TYPE_CONST, TYPE_VOLATILE, TYPE_RESTRICT, TYPE_ATOMIC)
6519 (TYPE_CODE_SPACE, TYPE_DATA_SPACE): Return boolean.
6520 * parse.c (operator_length_standard) <TYPE_INSTANCE>: Adjust.
6521 (follow_type_instance_flags): New function.
6522 (operator_check_standard) <TYPE_INSTANCE>: Adjust.
6523 * parser-defs.h (follow_type_instance_flags): Declare.
6524 * valops.c (value_struct_elt_for_reference): const/volatile must
6525 match too.
6526
6527 2017-09-04 Pedro Alves <palves@redhat.com>
6528
6529 * cp-namespace.c (cp_search_static_and_baseclasses): Handle
6530 function/method scopes; lookup the nested name as a function local
6531 static variable.
6532
6533 2017-09-04 Pedro Alves <palves@redhat.com>
6534
6535 (%type <voidval>): Add function_method.
6536 * c-exp.y (exp): New production for calls with no arguments.
6537 (function_method, function_method_void_or_typelist): New
6538 productions.
6539 (exp): New production for "method()::static_var".
6540 * eval.c (evaluate_subexp_standard): Handle OP_FUNC_STATIC_VAR.
6541 * expprint.c (print_subexp_standard, dump_subexp_body_standard):
6542 Handle OP_FUNC_STATIC_VAR.
6543 * parse.c (operator_length_standard):
6544 Handle OP_FUNC_STATIC_VAR.
6545
6546 2017-09-04 Pedro Alves <palves@redhat.com>
6547
6548 * eval.c (evaluate_subexp_standard): Remove UNOP_MEMVAL_TLS
6549 handling.
6550 * expprint.c (print_subexp_standard, dump_subexp_body_standard):
6551 Ditto.
6552 * parse.c (operator_length_standard, operator_check_standard):
6553 Ditto.
6554 * std-operator.def (UNOP_MEMVAL_TLS): Delete.
6555
6556 2017-09-04 Pedro Alves <palves@redhat.com>
6557
6558 * ax-gdb.c: Include "typeprint.h".
6559 (gen_expr_for_cast): New function.
6560 (gen_expr) <OP_CAST, OP_CAST_TYPE>: Use it.
6561 <OP_VAR_VALUE, OP_MSYM_VAR_VALUE>: Error out if the variable's
6562 type is unknown.
6563 * dwarf2read.c (new_symbol_full): Fallback to int instead of
6564 nodebug_data_symbol.
6565 * eval.c: Include "typeprint.h".
6566 (evaluate_subexp_standard) <OP_VAR_VALUE, OP_VAR_MSYM_VALUE>:
6567 Error out if symbol has unknown type.
6568 <UNOP_CAST, UNOP_CAST_TYPE>: Common bits factored out to
6569 evaluate_subexp_for_cast.
6570 (evaluate_subexp_for_address, evaluate_subexp_for_sizeof): Handle
6571 OP_VAR_MSYM_VALUE.
6572 (evaluate_subexp_for_cast): New function.
6573 * gdbtypes.c (init_nodebug_var_type): New function.
6574 (objfile_type): Use it to initialize types of variables with no
6575 debug info.
6576 * typeprint.c (error_unknown_type): New.
6577 * typeprint.h (error_unknown_type): New declaration.
6578 * compile/compile-c-types.c (convert_type_basic): Handle
6579 TYPE_CODE_ERROR; warn and fallback to int for variables with
6580 unknown type.
6581
6582 2017-09-04 Pedro Alves <palves@redhat.com>
6583
6584 * eval.c (evaluate_var_value): New function, factored out from ...
6585 (evaluate_subexp_standard): ... here.
6586
6587 2017-09-04 Pedro Alves <palves@redhat.com>
6588
6589 * eval.c (evaluate_subexp_standard) <UNOP_COMPLEMENT, UNOP_ADDR>:
6590 Remove useless assignments to 'op'.
6591
6592 2017-09-04 Pedro Alves <palves@redhat.com>
6593
6594 * eval.c (eval_skip_value): New function.
6595 (evaluate_subexp_standard): Use it.
6596
6597 2017-09-04 Pedro Alves <palves@redhat.com>
6598
6599 * eval.c (evaluate_subexp_standard): <OP_FUNCALL>: Extract
6600 function name from symbol/minsym and pass it to
6601 error_call_unknown_return_type.
6602
6603 2017-09-04 Pedro Alves <palves@redhat.com>
6604
6605 * ada-lang.c (resolve_subexp): Handle OP_VAR_MSYM_VALUE.
6606 * ax-gdb.c (gen_msym_var_ref): New function.
6607 (gen_expr): Handle OP_VAR_MSYM_VALUE.
6608 * eval.c (evaluate_var_msym_value): New function.
6609 * eval.c (evaluate_subexp_standard): Handle OP_VAR_MSYM_VALUE.
6610 <OP_FUNCALL>: Extract function name from symbol/minsym and pass it
6611 to call_function_by_hand.
6612 * expprint.c (print_subexp_standard, dump_subexp_body_standard):
6613 Handle OP_VAR_MSYM_VALUE.
6614 (union exp_element) <msymbol>: New field.
6615 * minsyms.h (struct type): Forward declare.
6616 (find_minsym_type_and_address): Declare.
6617 * parse.c (write_exp_elt_msym): New function.
6618 (write_exp_msymbol): Delete, refactored as ...
6619 (find_minsym_type_and_address): ... this new function.
6620 (write_exp_msymbol): Reimplement using OP_VAR_MSYM_VALUE.
6621 (operator_length_standard, operator_check_standard): Handle
6622 OP_VAR_MSYM_VALUE.
6623 * std-operator.def (OP_VAR_MSYM_VALUE): New.
6624
6625 2017-09-04 Pedro Alves <palves@redhat.com>
6626
6627 * ada-lang.c (ada_evaluate_subexp) <TYPE_CODE_FUNC>: Don't handle
6628 TYPE_GNU_IFUNC specially here. Throw error if return type is
6629 unknown.
6630 * ada-typeprint.c (print_func_type): Handle functions with unknown
6631 return type.
6632 * c-typeprint.c (c_type_print_base): Handle functions and methods
6633 with unknown return type.
6634 * compile/compile-c-symbols.c (convert_symbol_bmsym)
6635 <mst_text_gnu_ifunc>: Use nodebug_text_gnu_ifunc_symbol.
6636 * compile/compile-c-types.c: Include "objfiles.h".
6637 (convert_func): For functions with unknown return type, warn and
6638 default to int.
6639 * compile/compile-object-run.c (compile_object_run): Adjust call
6640 to call_function_by_hand_dummy.
6641 * elfread.c (elf_gnu_ifunc_resolve_addr): Adjust call to
6642 call_function_by_hand.
6643 * eval.c (evaluate_subexp_standard): Adjust calls to
6644 call_function_by_hand. Handle functions and methods with unknown
6645 return type. Pass expect_type to call_function_by_hand.
6646 * f-typeprint.c (f_type_print_base): Handle functions with unknown
6647 return type.
6648 * gcore.c (call_target_sbrk): Adjust call to
6649 call_function_by_hand.
6650 * gdbtypes.c (objfile_type): Leave nodebug text symbol with NULL
6651 return type instead of int. Make nodebug_text_gnu_ifunc_symbol be
6652 an integer address type instead of nodebug.
6653 * guile/scm-value.c (gdbscm_value_call): Adjust call to
6654 call_function_by_hand.
6655 * infcall.c (error_call_unknown_return_type): New function.
6656 (call_function_by_hand): New "default_return_type" parameter.
6657 Pass it down.
6658 (call_function_by_hand_dummy): New "default_return_type"
6659 parameter. Use it instead of defaulting to int. If there's no
6660 default and the return type is unknown, throw an error. If
6661 there's a default return type, and the called function has no
6662 debug info, then assume the function is prototyped.
6663 * infcall.h (call_function_by_hand, call_function_by_hand_dummy):
6664 New "default_return_type" parameter.
6665 (error_call_unknown_return_type): New declaration.
6666 * linux-fork.c (call_lseek): Cast return type of lseek.
6667 (inferior_call_waitpid, checkpoint_command): Adjust calls to
6668 call_function_by_hand.
6669 * linux-tdep.c (linux_infcall_mmap, linux_infcall_munmap): Adjust
6670 calls to call_function_by_hand.
6671 * m2-typeprint.c (m2_procedure): Handle functions with unknown
6672 return type.
6673 * objc-lang.c (lookup_objc_class, lookup_child_selector)
6674 (value_nsstring, print_object_command): Adjust calls to
6675 call_function_by_hand.
6676 * p-typeprint.c (pascal_type_print_varspec_prefix): Handle
6677 functions with unknown return type.
6678 (pascal_type_print_func_varspec_suffix): New function.
6679 (pascal_type_print_varspec_suffix) <TYPE_CODE_FUNC,
6680 TYPE_CODE_METHOD>: Use it.
6681 * python/py-value.c (valpy_call): Adjust call to
6682 call_function_by_hand.
6683 * rust-lang.c (rust_evaluate_funcall): Adjust call to
6684 call_function_by_hand.
6685 * valarith.c (value_x_binop, value_x_unop): Adjust calls to
6686 call_function_by_hand.
6687 * valops.c (value_allocate_space_in_inferior): Adjust call to
6688 call_function_by_hand.
6689 * typeprint.c (type_print_unknown_return_type): New function.
6690 * typeprint.h (type_print_unknown_return_type): New declaration.
6691
6692 2017-09-04 Pedro Alves <palves@redhat.com>
6693
6694 * gdbtypes.c (lookup_function_type_with_arguments): Mark function
6695 types with more than one parameter as prototyped.
6696
6697 2017-09-04 Pedro Alves <palves@redhat.com>
6698
6699 * cli/cli-cmds.c (print_disassembly, disassemble_current_function)
6700 (disassemble_command): Use gdb_disassembly_flags instead of bare
6701 int.
6702 * disasm.c (gdb_pretty_print_disassembler::pretty_print_insn)
6703 (dump_insns, do_mixed_source_and_assembly_deprecated)
6704 (do_mixed_source_and_assembly, do_assembly_only, gdb_disassembly):
6705 Use gdb_disassembly_flags instead of bare int.
6706 * disasm.h (DISASSEMBLY_SOURCE_DEPRECATED, DISASSEMBLY_RAW_INSN)
6707 (DISASSEMBLY_OMIT_FNAME, DISASSEMBLY_FILENAME)
6708 (DISASSEMBLY_OMIT_PC, DISASSEMBLY_SOURCE)
6709 (DISASSEMBLY_SPECULATIVE): No longer macros. Instead they're...
6710 (enum gdb_disassembly_flag): ... values of this new enumeration.
6711 (gdb_disassembly_flags): Define.
6712 (gdb_disassembly)
6713 (gdb_pretty_print_disassembler::pretty_print_insn): Use it.
6714 * mi/mi-cmd-disas.c (mi_cmd_disassemble): Use
6715 gdb_disassembly_flags instead of bare int.
6716 * record-btrace.c (btrace_insn_history)
6717 (record_btrace_insn_history, record_btrace_insn_history_range)
6718 (record_btrace_insn_history_from): Use gdb_disassembly_flags
6719 instead of bare int.
6720 * record.c (get_insn_history_modifiers, cmd_record_insn_history):
6721 Use gdb_disassembly_flags instead of bare int.
6722 * target-debug.h (target_debug_print_gdb_disassembly_flags):
6723 Define.
6724 * target-delegates.c: Regenerate.
6725 * target.c (target_insn_history, target_insn_history_from)
6726 (target_insn_history_range): Use gdb_disassembly_flags instead of
6727 bare int.
6728 * target.h: Include "disasm.h".
6729 (struct target_ops) <to_insn_history, to_insn_history_from,
6730 to_insn_history_range>: Use gdb_disassembly_flags instead of bare
6731 int.
6732 (target_insn_history, target_insn_history_from)
6733 (target_insn_history_range): Use gdb_disassembly_flags instead of
6734 bare int.
6735
6736 2017-09-04 Simon Marchi <simon.marchi@ericsson.com>
6737
6738 * cli/cli-script.c (build_command_line): For if/while commands,
6739 check whether args is empty.
6740
6741 2017-09-04 Simon Marchi <simon.marchi@ericsson.com>
6742
6743 * cli/cli-script.h (enum misc_command_type): Move from defs.h.
6744 (enum command_control_type): Likewise.
6745 (struct command_line): Likewise.
6746 (free_command_lines): Likewise.
6747 (struct command_lines_deleter): Likewise.
6748 (command_line_up): Likewise.
6749 (read_command_lines): Likewise.
6750 (read_command_lines_1): Likewise.
6751 * defs.h (enum misc_command_type): Move to cli/cli-script.h.
6752 (enum command_control_type): Likewise.
6753 (struct command_line): Likewise.
6754 (free_command_lines): Likewise.
6755 (struct command_lines_deleter): Likewise.
6756 (command_line_up): Likewise.
6757 (read_command_lines): Likewise.
6758 (read_command_lines_1): Likewise.
6759 * breakpoint.h: Include cli/cli-script.h.
6760 * extension-priv.h: Likewise.
6761 * gdbcmd.h: Likewise.
6762
6763 2017-09-04 Pedro Alves <palves@redhat.com>
6764
6765 * ada-lang.c (is_known_support_routine): Move sal declaration to
6766 where it is initialized.
6767 * breakpoint.c (create_internal_breakpoint, init_catchpoint)
6768 (parse_breakpoint_sals, decode_static_tracepoint_spec)
6769 (clear_command, update_static_tracepoint): Remove init_sal
6770 references. Move declarations closer to initializations.
6771 * cli/cli-cmds.c (list_command): Move sal declarations closer to
6772 initializations.
6773 * elfread.c (elf_gnu_ifunc_resolver_stop): Remove init_sal
6774 references. Move sal declarations closer to initializations.
6775 * frame.c (find_frame_sal): Return a symtab_and_line via function
6776 return instead of output parameter. Remove init_sal references.
6777 * frame.h (find_frame_sal): Return a symtab_and_line via function
6778 return instead of output parameter.
6779 * guile/scm-frame.c (gdbscm_frame_sal): Adjust.
6780 * guile/scm-symtab.c (stscm_make_sal_smob): Use in-place new
6781 instead of memset.
6782 (gdbscm_find_pc_line): Remove init_sal reference.
6783 * infcall.c (call_function_by_hand_dummy): Remove init_sal
6784 references. Move declarations closer to initializations.
6785 * infcmd.c (set_step_frame): Update. Move declarations closer to
6786 initializations.
6787 (finish_backward): Remove init_sal references. Move declarations
6788 closer to initializations.
6789 * infrun.c (process_event_stop_test, handle_step_into_function)
6790 (insert_hp_step_resume_breakpoint_at_frame)
6791 (insert_step_resume_breakpoint_at_caller): Likewise.
6792 * linespec.c (create_sals_line_offset, decode_digits_ordinary)
6793 (symbol_to_sal): Likewise.
6794 * probe.c (parse_probes_in_pspace): Remove init_sal reference.
6795 * python/py-frame.c (frapy_find_sal): Move sal declaration closer
6796 to its initialization.
6797 * reverse.c (save_bookmark_command): Use new/delete. Remove
6798 init_sal references. Move declarations closer to initializations.
6799 * source.c (get_current_source_symtab_and_line): Remove brace
6800 initialization.
6801 (set_current_source_symtab_and_line): Now takes the sal by const
6802 reference. Remove brace initialization.
6803 (line_info): Remove init_sal reference.
6804 * source.h (set_current_source_symtab_and_line): Now takes a
6805 symtab_and_line via const reference.
6806 * stack.c (set_current_sal_from_frame): Adjust.
6807 (print_frame_info): Adjust.
6808 (get_last_displayed_sal): Return the sal via function return
6809 instead of via output parameter. Simplify.
6810 (frame_info): Adjust.
6811 * stack.h (get_last_displayed_sal): Return the sal via function
6812 return instead of via output parameter.
6813 * symtab.c (init_sal): Delete.
6814 (find_pc_sect_line): Remove init_sal references. Move
6815 declarations closer to initializations.
6816 (find_function_start_sal): Remove init_sal references. Move
6817 declarations closer to initializations.
6818 * symtab.h (struct symtab_and_line): In-class initialize all
6819 fields.
6820 * tracepoint.c (set_traceframe_context)
6821 (print_one_static_tracepoint_marker): Remove init_sal references.
6822 Move declarations closer to initializations.
6823 * tui/tui-disasm.c (tui_show_disassem_and_update_source): Adjust.
6824 * tui/tui-stack.c (tui_show_frame_info): Adjust. Move
6825 declarations closer to initializations.
6826 * tui/tui-winsource.c (tui_update_source_window_as_is): Remove
6827 init_sal references. Adjust.
6828
6829 2017-09-04 Pedro Alves <palves@redhat.com>
6830
6831 * ax-gdb.c (agent_command_1): Use range-for.
6832 * break-catch-throw.c (re_set_exception_catchpoint): Update.
6833 * breakpoint.c: Include "common/array-view.h".
6834 (init_breakpoint_sal, create_breakpoint_sal): Change sals
6835 parameter from struct symtabs_and_lines to
6836 array_view<symtab_and_line>. Adjust. Use range-for. Update.
6837 (breakpoint_sals_to_pc): Change sals parameter from struct
6838 symtabs_and_lines to std::vector reference.
6839 (check_fast_tracepoint_sals): Change sals parameter from struct
6840 symtabs_and_lines to std::array_view. Use range-for.
6841 (decode_static_tracepoint_spec): Return a std::vector instead of
6842 symtabs_and_lines. Update.
6843 (create_breakpoint): Update.
6844 (break_range_command, until_break_command, clear_command): Update.
6845 (base_breakpoint_decode_location, bkpt_decode_location)
6846 (bkpt_probe_create_sals_from_location)
6847 (bkpt_probe_decode_location, tracepoint_decode_location)
6848 (tracepoint_probe_decode_location)
6849 (strace_marker_create_sals_from_location): Return a std::vector
6850 instead of symtabs_and_lines.
6851 (strace_marker_create_breakpoints_sal): Update.
6852 (strace_marker_decode_location): Return a std::vector instead of
6853 symtabs_and_lines. Update.
6854 (update_breakpoint_locations): Change struct symtabs_and_lines
6855 parameters to gdb::array_view. Adjust.
6856 (location_to_sals): Return a std::vector instead of
6857 symtabs_and_lines. Update.
6858 (breakpoint_re_set_default): Use std::vector instead of struct
6859 symtabs_and_lines.
6860 (decode_location_default): Return a std::vector instead of
6861 symtabs_and_lines. Update.
6862 * breakpoint.h: Include "common/array-view.h".
6863 (struct breakpoint_ops) <decode_location>: Now returns a
6864 std::vector instead of returning a symtabs_and_lines via output
6865 parameter.
6866 (update_breakpoint_locations): Change sals parameters to use
6867 gdb::array_view.
6868 * cli/cli-cmds.c (edit_command, list_command): Update to use
6869 std::vector and gdb::array_view.
6870 (ambiguous_line_spec): Adjust to use gdb::array_view and
6871 range-for.
6872 (compare_symtabs): Rename to ...
6873 (cmp_symtabs): ... this. Change parameters to symtab_and_line
6874 const reference and adjust.
6875 (filter_sals): Rewrite using std::vector and standard algorithms.
6876 * elfread.c (elf_gnu_ifunc_resolver_return_stop): Simplify.
6877 (jump_command): Update to use std::vector.
6878 * linespec.c (struct linespec_state) <canonical_names>: Update
6879 comment.
6880 (add_sal_to_sals_basic): Delete.
6881 (add_sal_to_sals, filter_results, convert_results_to_lsals)
6882 (decode_line_2, create_sals_line_offset)
6883 (convert_address_location_to_sals, convert_linespec_to_sals)
6884 (convert_explicit_location_to_sals, parse_linespec)
6885 (event_location_to_sals, decode_line_full, decode_line_1)
6886 (decode_line_with_current_source)
6887 (decode_line_with_last_displayed, decode_objc)
6888 (decode_digits_list_mode, decode_digits_ordinary, minsym_found)
6889 (linespec_result::~linespec_result): Adjust to use std::vector
6890 instead of symtabs_and_lines.
6891 * linespec.h (linespec_sals::sals): Now a std::vector.
6892 (struct linespec_result): Use std::vector, bool, and in-class
6893 initialization.
6894 (decode_line_1, decode_line_with_current_source)
6895 (decode_line_with_last_displayed): Return std::vector.
6896 * macrocmd.c (info_macros_command): Use std::vector.
6897 * mi/mi-main.c (mi_cmd_trace_find): Use std::vector.
6898 * probe.c (parse_probes_in_pspace, parse_probes): Adjust to use
6899 std::vector.
6900 * probe.h (parse_probes): Return a std::vector.
6901 * python/python.c (gdbpy_decode_line): Use std::vector and
6902 gdb::array_view.
6903 * source.c (select_source_symtab, line_info): Use std::vector.
6904 * stack.c (func_command): Use std::vector.
6905 * symtab.h (struct symtabs_and_lines): Delete.
6906 * tracepoint.c (tfind_line_command, scope_info): Use std::vector.
6907
6908 2017-09-04 Pedro Alves <palves@redhat.com>
6909
6910 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
6911 unittests/array-view-selftests.c.
6912 (SUBDIR_UNITTESTS_OBS): Add array-view-selftests.o.
6913 * common/array-view.h: New file.
6914 * unittests/array-view-selftests.c: New file.
6915
6916 2017-09-04 Pedro Alves <palves@redhat.com>
6917
6918 * cli/cli-cmds.c (edit_command): Pass message to
6919 ambiguous_line_spec.
6920 (list_command): Pass message to ambiguous_line_spec. Say
6921 "first"/"last" instead of "start" and "end" to be consistent with
6922 the manual.
6923 (ambiguous_line_spec): Add 'format' and vararg parameters. Use
6924 them to print formatted message.
6925
6926 2017-09-04 Pedro Alves <palves@redhat.com>
6927
6928 * btrace.c (ftrace_add_pt): Pass btrace_insn to
6929 ftrace_update_insns by reference instead of pointer.
6930
6931 2017-09-04 Yao Qi <yao.qi@linaro.org>
6932
6933 * i386-go32-tdep.c: Include x86-xstate.h.
6934 (i386_go32_init_abi): Call i386_target_description.
6935 * i386-tdep.c (i386_target_description): Return tdesc_i386_mmx
6936 if xcr0 is X86_XSTATE_X87_MASK.
6937 * i386-tdep.h (tdesc_i386): Remove the declaration.
6938 (tdesc_i386_mmx): Likewise.
6939
6940 2017-09-04 Yao Qi <yao.qi@linaro.org>
6941
6942 * i386-fbsd-tdep.c (i386fbsd_core_read_xcr0): Return
6943 X86_XSTATE_SSE_MASK instead of 0.
6944
6945 2017-09-04 Yao Qi <yao.qi@linaro.org>
6946
6947 * amd64-fbsd-nat.c (amd64fbsd_read_description): Call
6948 i386_target_description.
6949 * i386-fbsd-nat.c (i386fbsd_read_description): Call
6950 i386_target_description.
6951 * i386-tdep.c (i386_gdbarch_init): Likewise.
6952
6953 2017-09-04 Yao Qi <yao.qi@linaro.org>
6954
6955 * amd64-darwin-tdep.c: Include "x86-xstate.h".
6956 (x86_darwin_init_abi_64): Call amd64_target_description.
6957 * amd64-dicos-tdep.c: Likewise.
6958 * amd64-fbsd-nat.c: Likewise.
6959 * amd64-fbsd-tdep.c: Likewise.
6960 * amd64-nbsd-tdep.c: Likewise.
6961 * amd64-obsd-tdep.c: Likewise.
6962 * amd64-sol2-tdep.c: Likewise.
6963 * amd64-windows-tdep.c: Likewise.
6964 * amd64-tdep.h (tdesc_amd64): Remove the declaration.
6965
6966 2017-09-04 Simon Marchi <simon.marchi@ericsson.com>
6967
6968 * btrace.h (btrace_insn_s, DEF_VEC_O (btrace_insn_s)): Remove.
6969 (btrace_function) <insn>: Change type to use std::vector.
6970 * btrace.c (ftrace_debug, ftrace_call_num_insn,
6971 ftrace_find_call, ftrace_new_gap, ftrace_update_function,
6972 ftrace_update_insns, ftrace_compute_global_level_offset,
6973 btrace_stitch_bts, btrace_clear, btrace_insn_get,
6974 btrace_insn_end, btrace_insn_next, btrace_insn_prev): Adjust to
6975 change to std::vector.
6976 (ftrace_update_insns): Adjust to change to std::vector, change
6977 type of INSN parameter.
6978 (btrace_compute_ftrace_bts): Adjust call to ftrace_update_insns.
6979 * record-btrace.c (btrace_call_history_insn_range,
6980 btrace_compute_src_line_range,
6981 record_btrace_frame_prev_register): Adjust to change to
6982 std::vector.
6983 * python/py-record-btrace.c (recpy_bt_func_instructions): Adjust
6984 to change to std::vector.
6985
6986 2017-09-03 Tom Tromey <tom@tromey.com>
6987
6988 * corefile.c (reopen_exec_file): Use std::string.
6989
6990 2017-09-03 Tom Tromey <tom@tromey.com>
6991
6992 * compile/compile.c (compile_register_name_mangled): Return
6993 std::string.
6994 * compile/compile-loc2c.c (pushf_register_address): Update.
6995 (pushf_register): Update.
6996 * compile/compile-c-types.c (convert_array): Update.
6997 * compile/compile-c-symbols.c (generate_vla_size): Update.
6998 (error_symbol_once): Use a gdb::unique_xmalloc_ptr.
6999 (symbol_substitution_name): Return a gdb::unique_xmalloc_ptr.
7000 (convert_one_symbol): Update.
7001 (generate_c_for_for_one_variable): Update.
7002 * compile/compile-c-support.c (c_get_range_decl_name): Return a
7003 std::string.
7004 (generate_register_struct): Update.
7005 * compile/compile-internal.h (c_get_range_decl_name): Return a
7006 std::string.
7007 (compile_register_name_mangled): Return std::string.
7008
7009 2017-09-03 Tom Tromey <tom@tromey.com>
7010
7011 * utils.c (perror_string): Return a std::string.
7012 (throw_perror_with_name, perror_warning_with_name): Update.
7013
7014 2017-09-03 Tom Tromey <tom@tromey.com>
7015
7016 * demangle.c (demangle_command): Use std::string,
7017 unique_xmalloc_ptr.
7018
7019 2017-09-03 Tom Tromey <tom@tromey.com>
7020
7021 * cli/cli-setshow.c (do_set_command): Use std::string.
7022
7023 2017-09-03 Tom Tromey <tom@tromey.com>
7024
7025 * cli/cli-cmds.c (cd_command): Use gdb::unique_xmalloc_ptr.
7026
7027 2017-09-03 Tom Tromey <tom@tromey.com>
7028
7029 * mi/mi-interp.c (mi_cmd_interpreter_exec): Use std::string.
7030
7031 2017-09-03 Tom Tromey <tom@tromey.com>
7032
7033 * mi/mi-cmd-env.c (env_execute_cli_command): Use
7034 gdb::unique_xmalloc_ptr.
7035
7036 2017-09-03 Tom Tromey <tom@tromey.com>
7037
7038 * thread.c (print_thread_info_1): Use string_printf.
7039 (thread_apply_command, thread_apply_all_command): Use
7040 std::string.
7041
7042 2017-09-03 Tom Tromey <tom@tromey.com>
7043
7044 * valprint.c (val_print_string): Update.
7045 * gdbcore.h (memory_error_message): Return std::string.
7046 * corefile.c (memory_error_message): Return std::string.
7047 (memory_error): Update.
7048 * breakpoint.c (insert_bp_location): Update.
7049
7050 2017-09-03 Simon Marchi <simon.marchi@ericsson.com>
7051
7052 * target/waitstatus.h (target_waitstatus_to_string): Change
7053 return type to std::string.
7054 * target/waitstatus.c (target_waitstatus_to_string): Return
7055 std::string.
7056 * target.h (target_waitstatus_to_string): Remove declaration.
7057 * infrun.c (resume, clear_proceed_status_thread,
7058 print_target_wait_results, do_target_wait, save_waitstatus,
7059 stop_all_threads): Adjust.
7060 * record-btrace.c (record_btrace_wait): Adjust.
7061 * target-debug.h
7062 (target_debug_print_struct_target_waitstatus_p): Adjust.
7063
7064 2017-09-01 Jan Kratochvil <jan.kratochvil@redhat.com>
7065
7066 PR gdb/22046
7067 * nat/linux-procfs.c (parse_proc_status_state): Fix PROC_STATE_STOPPED
7068 detection.
7069
7070 2017-08-31 Sergio Durigan Junior <sergiodj@redhat.com>
7071
7072 * NEWS (Changes since GDB 8.0): Add entry mentioning new support
7073 for setting/unsetting environment variables on the remote target.
7074 (New remote packets): Add entries for QEnvironmentHexEncoded,
7075 QEnvironmentUnset and QEnvironmentReset.
7076 * common/environ.c (gdb_environ::operator=): Extend method to
7077 handle m_user_set_env_list and m_user_unset_env_list.
7078 (gdb_environ::clear): Likewise.
7079 (match_var_in_string): Change type of first parameter from 'char
7080 *' to 'const char *'.
7081 (gdb_environ::set): Extend method to handle
7082 m_user_set_env_list and m_user_unset_env_list.
7083 (gdb_environ::unset): Likewise.
7084 (gdb_environ::clear_user_set_env): New method.
7085 (gdb_environ::user_set_envp): Likewise.
7086 (gdb_environ::user_unset_envp): Likewise.
7087 * common/environ.h (gdb_environ): Handle m_user_set_env_list and
7088 m_user_unset_env_list on move constructor/assignment.
7089 (unset): Add new default parameter 'update_unset_list = true'.
7090 (clear_user_set_env): New method.
7091 (user_set_envp): Likewise.
7092 (user_unset_envp): Likewise.
7093 (m_user_set_env_list): New std::set.
7094 (m_user_unset_env_list): Likewise.
7095 * common/rsp-low.c (hex2str): New function.
7096 (bin2hex): New overload for bin2hex function.
7097 * common/rsp-low.c (hex2str): New prototype.
7098 (str2hex): New overload prototype.
7099 * remote.c: Include "environ.h". Add QEnvironmentHexEncoded,
7100 QEnvironmentUnset and QEnvironmentReset.
7101 (remote_protocol_features): Add QEnvironmentHexEncoded,
7102 QEnvironmentUnset and QEnvironmentReset packets.
7103 (send_environment_packet): New function.
7104 (extended_remote_environment_support): Likewise.
7105 (extended_remote_create_inferior): Call
7106 extended_remote_environment_support.
7107 (_initialize_remote): Add QEnvironmentHexEncoded,
7108 QEnvironmentUnset and QEnvironmentReset packet configs.
7109 * unittests/environ-selftests.c (gdb_selftest_env_var):
7110 New variable.
7111 (test_vector_initialization): New function.
7112 (test_init_from_host_environ): Likewise.
7113 (test_reinit_from_host_environ): Likewise.
7114 (test_set_A_unset_B_unset_A_cannot_find_A_can_find_B):
7115 Likewise.
7116 (test_unset_set_empty_vector): Likewise.
7117 (test_vector_clear): Likewise.
7118 (test_std_move): Likewise.
7119 (test_move_constructor):
7120 (test_self_move): Likewise.
7121 (test_set_unset_reset): Likewise.
7122 (run_tests): Rewrite in terms of the functions above.
7123
7124 2017-08-31 Weimin Pan <weimin.pan@oracle.com>
7125
7126 * sparc64-tdep.c (adi_stat_t): Fix comment formatting.
7127 (adi_available): Use a temp variable of type CORE_ADDR as argument
7128 3 when calling target_auxv_search.
7129 (adi_normalize_address): Use masks and xor operators to calculate
7130 normalized address.
7131 (adi_read_versions, adi_write_versions, adi_print_versions)
7132 (do_examine, do_assign): Use paddress.
7133
7134 2017-08-29 John Baldwin <jhb@FreeBSD.org>
7135
7136 * mips-fbsd-nat.c (getfpregs_supplies): Return true for FIR.
7137 * mips-fbsd-tdep.c (mips_fbsd_supply_fpregs): Split supply of FSR
7138 out of loop and add supply of FIR.
7139 (mips_fbsd_collect_fpregs): Split collect of FSR out of loop and
7140 add collect of FIR.
7141
7142 2017-08-28 Simon Marchi <simon.marchi@ericsson.com>
7143
7144 PR gdb/21827
7145 * cli/cli-script.c (define_command): Don't convert command name
7146 to lower case.
7147
7148 2017-08-25 Joel Brobecker <brobecker@adacore.com>
7149
7150 * ada-lang.c (ada_lookup_struct_elt_type): Remove parameter "dispp".
7151 Update all callers accordingly. Remove all code blocks handling
7152 the case where DISPP is not NULL.
7153
7154 2017-08-24 Jan Kratochvil <jan.kratochvil@redhat.com>
7155
7156 PR symtab/22003
7157 * dwarf2read.c (dwarf2_const_value_attr, dump_die_shallow)
7158 (dwarf2_get_attr_constant_value, dwarf2_fetch_constant_bytes)
7159 (skip_form_bytes, attr_form_is_constant): Handle DW_FORM_implicit_const.
7160
7161 2017-08-24 Jan Kratochvil <jan.kratochvil@redhat.com>
7162
7163 * dwarf2read.c (build_type_psymtabs_reader): New prototype.
7164 (process_psymtab_comp_unit): Accept IS_DEBUG_TYPES.
7165 (read_comp_units_from_section): New parameter abbrev_section, use
7166 read_and_check_comp_unit_head, allocate signatured_type if needed.
7167 (create_all_comp_units): Update read_comp_units_from_section caller.
7168
7169 2017-08-23 Pedro Alves <palves@redhat.com>
7170
7171 PR remote/21852
7172 * remote.c (add_current_inferior_and_thread): Set inferior_ptid
7173 to null_ptid and switch to thread without reading the registers
7174 after adding the inferior.
7175
7176 2017-08-23 Jan Kratochvil <jan.kratochvil@redhat.com>
7177
7178 * NEWS (Changes since GDB 8.0): Add set compile-gcc and show
7179 compile-gcc.
7180 * compile/compile.c (compile_gcc, show_compile_gcc): New.
7181 (compile_to_object): Implement compile_gcc.
7182 (_initialize_compile): Install "set compile-gcc". Initialize
7183 compile_gcc.
7184
7185 2017-08-23 Jan Kratochvil <jan.kratochvil@redhat.com>
7186
7187 * compile/compile.c (compile_to_object): Conditionally call
7188 set_verbose. Conditionally call compile or compile_v0.
7189
7190 2017-08-07 Weimin Pan <weimin.pan@oracle.com>
7191
7192 * sparc64-tdep.h: (adi_normalize_address): New export.
7193 * sparc-nat.h: (open_adi_tag_fd): New export.
7194 * sparc64-linux-nat.c: (open_adi_tag_fd): New function.
7195 * sparc64-linux-tdep.c:
7196 (SEGV_ACCADI, SEGV_ADIDERR, SEGV_ADIPERR) New defines.
7197 (sparc64_linux_handle_segmentation_fault): New function.
7198 (sparc64_linux_init_abi): Register
7199 sparc64_linux_handle_segmentation_fault
7200 * sparc64-tdep.c: Include cli-utils.h,gdbcmd.h,auxv.h.
7201 (sparc64_addr_bits_remove): New function.
7202 (sparc64_init_abi): Register sparc64_addr_bits_remove.
7203 (MAX_PROC_NAME_SIZE): New macro.
7204 (AT_ADI_BLKSZ, AT_ADI_NBITS, AT_ADI_UEONADI) New defines.
7205 (sparc64adilist): New variable.
7206 (adi_proc_list): New variable.
7207 (find_adi_info): New function.
7208 (add_adi_info): New function.
7209 (get_adi_info_proc): New function.
7210 (get_adi_info): New function.
7211 (info_adi_command): New function.
7212 (read_maps_entry): New function.
7213 (adi_available): New function.
7214 (adi_normalize_address): New function.
7215 (adi_align_address): New function.
7216 (adi_convert_byte_count): New function.
7217 (adi_tag_fd): New function.
7218 (adi_is_addr_mapped): New function.
7219 (adi_read_versions): New function.
7220 (adi_write_versions): New function.
7221 (adi_print_versions): New function.
7222 (do_examine): New function.
7223 (do_assign): New function.
7224 (adi_examine_command): New function.
7225 (adi_assign_command): New function.
7226 (_initialize_sparc64_adi_tdep): New function.
7227
7228 2017-08-22 Simon Marchi <simon.marchi@ericsson.com>
7229
7230 * breakpoint.c (breakpoints_info): Rename to ...
7231 (info_breakpoints_command): ... this.
7232 (watchpoints_info): Rename to ...
7233 (info_watchpoints_command): ... this.
7234 (tracepoints_info): Rename to ...
7235 (info_tracepoints_command): ... this.
7236 (_initialize_breakpoint): Adjust.
7237 * dcache.c (dcache_info): Rename to ...
7238 (info_display_command): ... this.
7239 (_initialize_dcache): Adjust.
7240 * frame.h (args_info): Rename to ...
7241 (info_args_command): ... this.
7242 (locals_info): Rename to ...
7243 (info_locals_command): ... this.
7244 * infcmd.c (nofp_registers_info): Rename to ...
7245 (info_registers_command): ... this.
7246 (float_info): Rename to ...
7247 (info_float_command): ... this.
7248 (program_info): Rename to ...
7249 (info_program_command): ... this.
7250 (all_registers_info): Rename to ...
7251 (info_all_registers_command): ... this.
7252 (vector_info): Rename to ...
7253 (info_vector_command): ... this.
7254 (float_info): Rename to ...
7255 (info_float_command): ... this.
7256 (_initialize_infcmd): Adjust.
7257 * inferior.h (term_info): Rename to ...
7258 (info_terminal_command): ... this.
7259 * inflow.c (term_info): Rename to ...
7260 (info_terminal_command): ... this.
7261 (_initialize_inflow): Adjust.
7262 * infrun.c (signals_info): Rename to ...
7263 (info_signals_command): ... this.
7264 (_initialize_infrun): Adjust.
7265 * objc-lang.c (classes_info): Rename to ...
7266 (info_classes_command): ... this.
7267 (selectors_info): Rename to ...
7268 (info_selectors_command): ... this.
7269 (_initialize_objc_language): Adjust.
7270 * printcmd.c (sym_info): Rename to ...
7271 (info_symbol_command): ... this.
7272 (address_info): Rename to ...
7273 (info_address_command): ... this.
7274 (display_info): Rename to ...
7275 (info_display_command): ... this.
7276 (_initialize_printcmd): Adjust.
7277 * reverse.c (bookmarks_info): Rename to ...
7278 (info_breakpoints_command): ... this.
7279 (_initialize_reverse): Adjust.
7280 * ser-go32.c (dos_info): Rename to ...
7281 (info_serial_command): ... this.
7282 (_initialize_ser_dos): Adjust.
7283 * skip.c (skip_info): Rename to ...
7284 (info_skip_command): ... this.
7285 (_initialize_step_skip): Adjust.
7286 * source.c (line_info): Rename to ...
7287 (info_line_command): ... this.
7288 (source_info): Rename to ...
7289 (info_source_command)
7290 * stack.c (frame_info): Rename to ...
7291 (info_frame_command): ... this.
7292 (locals_info): Rename to ...
7293 (info_locals_command): ... this.
7294 (args_info): Rename to ...
7295 (info_args_command): ... this.
7296 (_initialize_stack): Adjust.
7297 * symtab.c (sources_info): Rename to ...
7298 (info_sources_command): ... this.
7299 (variables_info): Rename to ...
7300 (info_variables_command): ... this.
7301 (functions_info): Rename to ...
7302 (info_functions_command): ... this.
7303 (types_info): Rename to ...
7304 (info_types_command): ... this.
7305 (_initialize_symtab): Adjust.
7306 * target.c (target_info): Rename to ...
7307 (info_target_command): ... this.
7308 (initialize_targets): Adjust.
7309 * tracepoint.c (tvariables_info): Rename to ...
7310 (info_tvariables_command): ... this.
7311 (scope_info): Rename to ...
7312 (info_scope_command): ... this.
7313 (trace_dump_actions): Adjust.
7314 (_initialize_tracepoint): Adjust.
7315
7316 2017-08-22 Tom Tromey <tom@tromey.com>
7317
7318 * breakpoint.h (install_breakpoint): Update.
7319 * breakpoint.c (add_solib_catchpoint): Update.
7320 (install_breakpoint): Change argument to a std::unique_ptr.
7321 (create_fork_vfork_event_catchpoint): Use std::unique_ptr.
7322 (create_breakpoint_sal, create_breakpoint): Update.
7323 (watch_command_1, catch_exec_command_1)
7324 (strace_marker_create_breakpoints_sal): Use std::unique_ptr.
7325 (add_to_breakpoint_chain): Change argument to a std::unique_ptr.
7326 Return the breakpoint.
7327 (set_raw_breakpoint_without_location, set_raw_breakpoint)
7328 (new_single_step_breakpoint): Update.
7329 * break-catch-throw.c (handle_gnu_v3_exceptions): Use
7330 std::unique_ptr.
7331 * break-catch-syscall.c (create_syscall_event_catchpoint): Use
7332 std::unique_ptr.
7333 * break-catch-sig.c (create_signal_catchpoint): Use
7334 std::unique_ptr.
7335 * ada-lang.c (create_ada_exception_catchpoint): Use
7336 std::unique_ptr.
7337
7338 2017-08-22 Tom Tromey <tom@tromey.com>
7339
7340 * breakpoint.c (add_solib_catchpoint): Use std::unique_ptr.
7341
7342 2017-08-22 Tom Tromey <tom@tromey.com>
7343
7344 * psymtab.c (psymtab_search_name): Return a unique_xmalloc_ptr.
7345 (lookup_partial_symbol): Update.
7346
7347 2017-08-22 Tom Tromey <tom@tromey.com>
7348
7349 * source.h (rewrite_source_path): Return a unique_xmalloc_ptr.
7350 * source.c (rewrite_source_path): Return a unique_xmalloc_ptr.
7351 (find_and_open_source, symtab_to_fullname): Update.
7352 * psymtab.c (psymtab_to_fullname): Update.
7353
7354 2017-08-22 Tom Tromey <tom@tromey.com>
7355
7356 * exec.c (exec_file_attach): Update.
7357 * linux-thread-db.c (try_thread_db_load): Update.
7358 * guile/scm-safe-call.c (gdbscm_safe_source_script): Update.
7359 * utils.c (gdb_realpath): Change return type.
7360 (gdb_realpath_keepfile): Update.
7361 (gdb_realpath_check_trailer, gdb_realpath_tests): New functions.
7362 (_initialize_utils): Register the new self test.
7363 * source.c (openp): Update.
7364 (find_and_open_source): Update.
7365 * nto-tdep.c (nto_find_and_open_solib): Update.
7366 * main.c (set_gdb_data_directory): Update.
7367 (captured_main_1): Update.
7368 * dwarf2read.c (dwarf2_get_dwz_file): Update
7369 (dw2_map_symbol_filenames): Update.
7370 * auto-load.c (auto_load_safe_path_vec_update): Update.
7371 (filename_is_in_auto_load_safe_path_vec): Change type of
7372 "filename_realp".
7373 (auto_load_objfile_script): Update.
7374 (file_is_auto_load_safe): Update. Use std::string.
7375 * utils.h (gdb_realpath): Return a gdb::unique_xmalloc_ptr.
7376
7377 2017-08-22 Tom Tromey <tom@tromey.com>
7378
7379 * utils.c (gdb_realpath_keepfile): Return a
7380 gdb::unique_xmalloc_ptr.
7381 * exec.c (exec_file_attach): Update.
7382 * utils.h (gdb_realpath_keepfile): Return a
7383 gdb::unique_xmalloc_ptr.
7384
7385 2017-08-22 Tom Tromey <tom@tromey.com>
7386
7387 * compile/compile.c (compile_file_command): Use
7388 gdb::unique_xmalloc_ptr, std::string.
7389 * utils.c (gdb_abspath): Change return type.
7390 * source.c (openp): Update.
7391 * objfiles.c (allocate_objfile): Update.
7392 * main.c (set_gdb_data_directory): Update.
7393 * utils.h (gdb_abspath): Return a gdb::unique_xmalloc_ptr.
7394
7395 2017-08-22 Zhouyi Zhou <zhouzhouyi@gmail.com>
7396
7397 * cli-cmds.c (list_commands): List actual code around more than
7398 one location.
7399
7400 2017-08-21 John Baldwin <jhb@FreeBSD.org>
7401
7402 * fbsd-nat.c (fbsd_add_threads): Use array type for `lwps'.
7403
7404 2017-08-21 Pedro Alves <palves@redhat.com>
7405
7406 PR gdb/19487
7407 * c-exp.y (variable production): Handle function aliases.
7408 * minsyms.c (msymbol_is_text): New function.
7409 * minsyms.h (msymbol_is_text): Declare.
7410 * symtab.c (find_function_alias_target): New function.
7411 * symtab.h (find_function_alias_target): Declare.
7412
7413 2017-08-21 Pedro Alves <palves@redhat.com>
7414
7415 * eval.c (evaluate_subexp_standard) <OP_TYPE>: Don't dig past
7416 typedefs.
7417 * typeprint.c (whatis_exp): If handling "whatis", and expression
7418 is OP_TYPE, strip one typedef level. Otherwise don't strip
7419 typedefs here.
7420 * valops.c (value_cast): Save "to" type before resolving
7421 stubs/typedefs. Use that type as resulting value's type.
7422
7423 2017-08-18 Tom Tromey <tom@tromey.com>
7424 Pedro Alves <palves@redhat.com>
7425
7426 * spu-multiarch.c (parse_spufs_run): Use scoped_restore.
7427 * sol-thread.c (sol_thread_resume, sol_thread_wait)
7428 (sol_thread_xfer_partial, rw_common): Use scoped_restore.
7429 * procfs.c (procfs_do_thread_registers): Use scoped_restore.
7430 * proc-service.c (ps_xfer_memory): Use scoped_restore.
7431 * linux-tdep.c (linux_corefile_thread): Remove a cleanup.
7432 (linux_get_siginfo_data): Add "thread" argument. Use
7433 scoped_restore.
7434 * linux-nat.c (linux_child_follow_fork)
7435 (check_stopped_by_watchpoint): Use scoped_restore.
7436 * infrun.c (displaced_step_prepare_throw, write_memory_ptid)
7437 (THREAD_STOPPED_BY, handle_signal_stop): Use scoped_restore.
7438 (restore_inferior_ptid, save_inferior_ptid): Remove.
7439 * btrace.c (btrace_fetch): Use scoped_restore.
7440 * bsd-uthread.c (bsd_uthread_fetch_registers)
7441 (bsd_uthread_store_registers): Use scoped_restore.
7442 * breakpoint.c (reattach_breakpoints, detach_breakpoints): Use
7443 scoped_restore.
7444 * aix-thread.c (aix_thread_resume, aix_thread_wait)
7445 (aix_thread_xfer_partial): Use scoped_restore.
7446 * inferior.h (save_inferior_ptid): Remove.
7447
7448 2017-08-18 Yao Qi <yao.qi@linaro.org>
7449
7450 PR tdep/21818
7451 * arm-tdep.c (gdb_print_insn_arm): Mark
7452 USER_SPECIFIED_MACHINE_TYPE if exec_bfd isn't NULL.
7453
7454 2017-08-18 Yao Qi <yao.qi@linaro.org>
7455
7456 * NEWS: Mention GDBserver's new option "--selftest".
7457 * Makefile.in (SFILES): Remove selftest.c, add common/selftest.c.
7458 * selftest.c: Move it to common/selftest.c.
7459 * selftest.h: Move it to common/selftest.h.
7460 * selftest-arch.c (reset): New function.
7461 (tests_with_arch): Call reset.
7462
7463 2017-08-18 Yao Qi <yao.qi@linaro.org>
7464
7465 * selftest.c (run_tests): Don't call QUIT. Call debug_printf
7466 instead of exception_fprintf and printf_filtered.
7467
7468 2017-08-18 Yao Qi <yao.qi@linaro.org>
7469
7470 * selftest.c (register_self_test): Rename it to
7471 selftests::register_test.
7472 (run_self_tests): selftest::run_tests.
7473 * selftest.h: Update declarations.
7474 * selftest-arch.c (register_self_test_foreach_arch): Rename it to
7475 selftests::register_test_foreach_arch.
7476 * selftest-arch.h: Update declaration.
7477 * aarch64-tdep.c: Update.
7478 * arm-tdep.c: Likewise.
7479 * disasm-selftests.c: Likewise.
7480 * dwarf2loc.c: Likewise.
7481 * dwarf2-frame.c: Likewise.
7482 * findvar.c: Likewise.
7483 * gdbarch-selftests.c: Likewise.
7484 * maint.c (maintenance_selftest): Likewise.
7485 * regcache.c: Likewise.
7486 * rust-exp.y: Likewise.
7487 * selftest-arch.c: Likewise.
7488 * unittests/environ-selftests.c: Likewise.
7489 * unittests/function-view-selftests.c: Likewise.
7490 * unittests/offset-type-selftests.c: Likewise.
7491 * unittests/optional-selftests.c: Likewise.
7492 * unittests/scoped_restore-selftests.c: Likewise.
7493 * utils-selftests.c: Likewise.
7494
7495 2017-08-17 Pedro Alves <palves@redhat.com>
7496
7497 * cli/cli-cmds.c (source_command): Delete 'old_source_verbose'
7498 local.
7499
7500 2017-08-17 Pedro Alves <palves@redhat.com>
7501
7502 * dwarf2read.c (struct dwarf2_cu) <line_header_die_owner>: New
7503 field.
7504 (reset_die_in_process): Delete, replaced by ...
7505 (process_die_scope): ... this new class. Make it responsible for
7506 freeing cu->line_header too.
7507 (process_die): Use process_die_scope.
7508 (handle_DW_AT_stmt_list): Record the line header's owner CU/DIE in
7509 cu->line_header_die_owner. Don't release the line header if it's
7510 owned by the CU.
7511 (setup_type_unit_groups): Make the CU/DIE own the line header.
7512 Don't release the line header here.
7513
7514 2017-08-17 Alex Lindsay <alexlindsay239@gmail.com> (tiny change)
7515
7516 * elfread.c (elf_read_minimal_symbols): xfree synthsyms.
7517
7518 2017-08-17 Ruslan Kabatsayev <b7.10110111@gmail.com>
7519
7520 * NEWS: Mention new shortcuts for nexti and stepi in TUI
7521 Single-Key mode
7522
7523 2017-08-16 Ruslan Kabatsayev <b7.10110111@gmail.com>
7524
7525 * tui/tui.c (tui_commands): Add "nexti" and "stepi" to the Single-Key
7526 mode command list.
7527
7528 2017-08-15 Stafford Horne <shorne@gmail.com>
7529
7530 * MAINTAINERS (Write After Approval): Add Stafford Horne.
7531
7532 2017-08-15 Stafford Horne <shorne@gmail.com>
7533
7534 * xtensa-tdep.c (xtensa_init_reggroups): Use xstrdup for cpname.
7535
7536 2017-08-15 Sergio Durigan Junior <sergiodj@redhat.com>
7537
7538 PR gdb/21954
7539 * infcmd.c (unset_environment_command): Use the 'clear' method on
7540 the environment instead of resetting it.
7541
7542 2017-08-15 John Baldwin <jhb@FreeBSD.org>
7543
7544 * fbsd-nat.c (fbsd_convert_siginfo): Fix compile on big-endian
7545 platforms.
7546
7547 2017-08-14 Tom Tromey <tom@tromey.com>
7548
7549 * valprint.c (print_octal_chars): Use HOST_CHAR_BIT.
7550 (print_binary_chars): Likewise.
7551 (BITS_IN_BYTES): Remove.
7552
7553 2017-08-14 Tom Tromey <tom@tromey.com>
7554
7555 PR gdb/21675
7556 * valprint.c (LOW_ZERO): Change value to 034.
7557 (print_octal_chars): Add static_asserts for octal constants.
7558 * printcmd.c (print_scalar_formatted): Add 'd' case.
7559
7560 2017-08-11 Tom Tromey <tom@tromey.com>
7561
7562 * symfile.c (add_symbol_file_command): Use std::vector.
7563
7564 2017-08-14 Tom Tromey <tom@tromey.com>
7565
7566 * break-catch-throw.c (handle_gnu_v3_exceptions): Use std::move.
7567 * break-catch-syscall.c (create_syscall_event_catchpoint): Use
7568 std::move.
7569 * break-catch-sig.c (create_signal_catchpoint): Use std::move.
7570
7571 2017-08-11 Pedro Alves <palves@redhat.com>
7572
7573 * infrun.c (process_event_stop_test): Adjust
7574 function_name_is_marked_for_skip call.
7575 * skip.c: Include <list>.
7576 (skiplist_entry): Make it a class with private fields, and
7577 getters/setters.
7578 (skiplist_entry_chain): Delete.
7579 (skiplist_entries): New.
7580 (skiplist_entry_count): Delete.
7581 (highest_skiplist_entry_num): New.
7582 (ALL_SKIPLIST_ENTRIES, ALL_SKIPLIST_ENTRIES_SAFE): Delete.
7583 (add_skiplist_entry): Delete.
7584 (skiplist_entry::skiplist_entry): New.
7585 (skiplist_entry::add_entry): New.
7586 (skip_file_command, skip_function): Adjust.
7587 (compile_skip_regexp): Delete.
7588 (skip_command): Don't compile regexp here. Adjust to use
7589 skiplist_entry::add_entry.
7590 (skip_info): Adjust to use range-for and getters.
7591 (skip_enable_command, skip_disable_command): Adjust to use
7592 range-for and setters.
7593 (skip_delete_command): Adjust to use std::list.
7594 (add_skiplist_entry): Delete.
7595 (skip_file_p): Delete, refactored as ...
7596 (skiplist_entry::do_skip_file_p): ... this new method.
7597 (skip_gfile_p): Delete, refactored as ...
7598 (skiplist_entry::do_gskip_file_p): ... this new method.
7599 (skip_function_p, skip_rfunction_p): Delete, refactored as ...
7600 (skiplist_entry::skip_function_p): ... this new method.
7601 (function_name_is_marked_for_skip): Now returns bool, and takes
7602 the function sal by const reference. Adjust to use range-for and
7603 skiplist_entry methods.
7604 (_initialize_step_skip): Remove references to
7605 skiplist_entry_chain, skiplist_entry_count.
7606 * skip.h (function_name_is_marked_for_skip): Now returns bool, and
7607 takes the function sal by const reference.
7608
7609 2017-08-11 Yao Qi <yao.qi@linaro.org>
7610
7611 * dwarf2-frame.c (clear_pointer_cleanup): Remove.
7612 (dwarf2_frame_cache): Remove reset_cache_cleanup.
7613 (dwarf2_frame_cache):
7614 * frame-unwind.c (frame_unwind_try_unwinder): Catch
7615 RETURN_MASK_ALL and set *this_case to NULL.
7616 * frame-unwind.h: Update comments.
7617
7618 2017-08-11 Yao Qi <yao.qi@linaro.org>
7619
7620 * dwarf2-frame.c (dwarf2_frame_state_alloc_regs): Remove.
7621 (dwarf2_frame_state_copy_regs): Remove.
7622 (dwarf2_frame_state_free_regs): Remove.
7623 (dwarf2_frame_state::~dwarf2_frame_state): Remove.
7624 (dwarf2_restore_rule): Call method .alloc_regs instead of
7625 dwarf2_frame_state_alloc_regs.
7626 (execute_cfa_program): Likewise. Call dwarf2_frame_state_reg_info
7627 constructor. Call std::move.
7628 (dwarf2_fetch_cfa_info): Don't call dwarf2_frame_state_copy_regs.
7629 (dwarf2_frame_cache): Likewise.
7630
7631 [GDB_SELF_TEST]: Include selftest.h and
7632 selftest-arch.h.
7633 [GDB_SELF_TEST] (execute_cfa_program_test): New function.
7634 (_initialize_dwarf2_frame) [GDB_SELF_TEST]: Register
7635 execute_cfa_program_test.
7636
7637 * dwarf2-frame.h (dwarf2_frame_state_reg_info): Add ctor, dtor,
7638 copy ctor, assignment operator, move assignment.
7639 <alloc_regs>: New method.
7640 <swap>: New method.
7641 (struct dwarf2_frame_state): Delete dtor.
7642 (dwarf2_frame_state_alloc_regs): Remove declaration.
7643 * sparc-tdep.c (sparc_execute_dwarf_cfa_vendor_op): Don't call
7644 dwarf2_frame_state_alloc_regs, use .alloc_regs instead.
7645
7646 2017-08-11 Yao Qi <yao.qi@linaro.org>
7647
7648 * dwarf2-frame.c (dwarf2_frame_state_free): Remove.
7649 (dwarf2_frame_state::dwarf2_frame_state): New.
7650 (dwarf2_frame_state::~dwarf2_frame_state): New.
7651 (dwarf2_fetch_cfa_info): Update.
7652 (dwarf2_frame_cache): Remove old_chain. Change 'fs' to an object
7653 rather than a pointer. Update code.
7654 * dwarf2-frame.h (struct dwarf2_frame_state): Declare ctor and
7655 dtor.
7656 <data_align, code_align, retaddr_column>: Change them to const.
7657 <armcc_cfa_offsets_sf, armcc_cfa_offsets_reversed>: Change them
7658 to bool.
7659
7660 2017-08-11 Yao Qi <yao.qi@linaro.org>
7661
7662 * dwarf2-frame.h (struct dwarf2_frame_state_reg) <exp_len>: Remove.
7663 <loc.exp>: New field.
7664 * dwarf2-frame.c (execute_cfa_program): Update.
7665 (dwarf2_frame_prev_register): Update.
7666
7667 2017-08-10 Pedro Alves <palves@redhat.com>
7668
7669 * common/gdb_unique_ptr.h (xfree_deleter<T[]>): Define.
7670
7671 2017-08-09 John Baldwin <jhb@FreeBSD.org>
7672
7673 * fbsd-nat.c (struct fbsd_fork_info): Remove.
7674 (fbsd_pending_children): Use std::list.
7675 (fbsd_remember_child): Likewise.
7676 (fbsd_is_child_pending): Likewise.
7677 (fbsd_pending_vfork_done): Use std::forward_list.
7678 (fbsd_add_vfork_done): Likewise.
7679 (fbsd_is_vfork_done_pending): Likewise.
7680 (fbsd_next_vfork_done): Likewise.
7681
7682 2017-08-09 John Baldwin <jhb@FreeBSD.org>
7683
7684 * fbsd-nat.c [HAVE_KINFO_GETVMMAP] (struct free_deleter): New.
7685 (fbsd_find_memory_regions): Use free_deleter with std::unique_ptr.
7686 [!HAVE_KINFO_GETVMMAP] (fbsd_find_memory_regions): Use std::string
7687 for `mapfilename'.
7688 (fbsd_xfer_partial): Use gdb::byte_vector.
7689 (fbsd_add_threads): Use gdb::unique_xmalloc_ptr.
7690
7691 2017-08-09 John Baldwin <jhb@FreeBSD.org>
7692
7693 * fbsd-nat.c: [!HAVE_KINFO_GETVMMAP]: Include <sys/user.h> and
7694 "filestuff.h".
7695 (fbsd_find_memory_regions): Fix `mapfile' initialization.
7696
7697 2017-08-09 Tom Tromey <tom@tromey.com>
7698
7699 * skip.c (skiplist_entry): New constructor.
7700 (skiplist_entry::enabled, skiplist_entry::function_is_regexp)
7701 (skiplist_entry::file_is_glob): Now bool.
7702 (skiplist_entry::file, skiplist_entry::function): Now
7703 std::string.
7704 (make_skip_entry): Return a unique_ptr. Use new.
7705 (free_skiplist_entry, free_skiplist_entry_cleanup)
7706 (make_free_skiplist_entry_cleanup): Remove.
7707 (skip_command, skip_disable_command, add_skiplist_entry)
7708 (skip_form_bytes, compile_skip_regexp, skip_command, skip_info)
7709 (skip_file_p, skip_gfile_p, skip_function_p, skip_rfunction_p)
7710 (function_name_is_marked_for_skip): Update.
7711 (skip_delete_command): Update. Use delete.
7712
7713 2017-08-09 Jiong Wang <jiong.wang@arm.com>
7714
7715 * aarch64-linux-tdep.c: Include "auxv.h" and "elf/common.h".
7716 (aarch64_linux_core_read_description): New function.
7717 (aarch64_linux_init_abi): Register gdbarch_core_read_description.
7718
7719 2017-08-09 Pedro Alves <palves@redhat.com>
7720
7721 * cp-name-parser.y (cp_comp_to_string): Return a
7722 gdb::unique_xmalloc_ptr<char>.
7723 * cp-support.c (replace_typedefs_qualified_name)
7724 (replace_typedefs): Adjust to use gdb::unique_xmalloc_ptr<char>.
7725 (cp_canonicalize_string_full): Use op= instead of explicit
7726 convertion.
7727 (cp_class_name_from_physname, method_name_from_physname)
7728 (cp_func_name, cp_remove_params): Adjust to use
7729 gdb::unique_xmalloc_ptr<char>.
7730 * cp-support.h (cp_comp_to_string): Return a
7731 gdb::unique_xmalloc_ptr<char>.
7732 * python/py-type.c (typy_lookup_type): Adjust to use
7733 gdb::unique_xmalloc_ptr<char>.
7734
7735 2017-08-09 H.J. Lu <hongjiu.lu@intel.com>
7736
7737 * dwarf2read.c (dwarf2_string_attr): Fix a typo.
7738
7739 2017-08-09 Alex Lindsay <alexlindsay239@gmail.com>
7740 Yao Qi <yao.qi@linaro.org>
7741
7742 * cp-support.c (cp_canonicalize_string_full): Use
7743 gdb::unique_xmalloc_ptr<char>.
7744 (cp_canonicalize_string): Likewise.
7745
7746 2017-08-09 Yao Qi <yao.qi@linaro.org>
7747
7748 * features/Makefile (WHICH): Remove i386/ non-linux stuff.
7749 * regformats/i386/amd64-avx-avx512.dat: Remove.
7750 * regformats/i386/amd64-avx-mpx-avx512-pku.dat: Remove.
7751 * regformats/i386/amd64-avx-mpx.dat:Remove.
7752 * regformats/i386/amd64-avx.dat: Remove.
7753 * regformats/i386/amd64-mpx.dat: Remove.
7754 * regformats/i386/i386-avx-avx512.dat: Remove.
7755 * regformats/i386/i386-avx-mpx-avx512-pku.dat: Remove.
7756 * regformats/i386/i386-avx-mpx.dat: Remove.
7757 * regformats/i386/i386-mmx.dat: Remove.
7758 * regformats/i386/i386-mpx.dat: Remove.
7759
7760 2017-08-09 Yao Qi <yao.qi@linaro.org>
7761
7762 * amd64-tdep.h (tdesc_x32): Remove the declaration.
7763 * amd64-tdep.c: Don't include features/i386/x32*.c.
7764 (_initialize_amd64_tdep): Don't call initialize_tdesc_x32*
7765 functions.
7766 * features/Makefile (WHICH): Remove i386/x32, i386/x32-avx,
7767 and i386/x32-avx-avx512.
7768 (XMLTOC): Remove i386/x32-avx.xml, i386/x32-avx-avx512.xml,
7769 and i386/x32.xml.
7770 * features/i386/x32-avx-avx512.c: Removed.
7771 * features/i386/x32-avx-avx512.xml: Removed.
7772 * features/i386/x32-avx.c: Removed.
7773 * features/i386/x32-avx.xml: Removed.
7774 * features/i386/x32.c: Removed.
7775 * features/i386/x32.xml: Removed.
7776 * regformats/i386/x32-avx-avx512.dat: Removed.
7777 * regformats/i386/x32-avx.dat: Removed.
7778 * regformats/i386/x32.dat: Removed.
7779
7780 2017-08-07 Maciej W. Rozycki <macro@imgtec.com>
7781
7782 PR breakpoints/21886
7783 * mem-break.c (default_memory_insert_breakpoint): Use
7784 `->placed_address' rather than `->reqstd_address' for the
7785 breakpoint location.
7786
7787 2017-08-07 Maciej W. Rozycki <macro@imgtec.com>
7788
7789 * arch-utils.c (default_print_insn): Remove arch/mach/endian
7790 assertions.
7791
7792 2017-08-07 Maciej W. Rozycki <macro@imgtec.com>
7793
7794 * gdbarch.sh (gdbarch_info): Replace the `tdep_info' member with
7795 a union of `tdep_info', `tdesc_data' and `id'.
7796 * aarch64-tdep.c (aarch64_gdbarch_init): Use `info.tdesc_data'
7797 rather than `info.tdep_info'.
7798 * amd64-linux-tdep.c (amd64_linux_init_abi): Likewise.
7799 * i386-linux-tdep.c (i386_linux_init_abi): Likewise.
7800 * i386-tdep.c (i386_gdbarch_init): Likewise.
7801 * mips-linux-tdep.c (mips_linux_init_abi): Likewise.
7802 * mips-tdep.c (mips_gdbarch_init): Likewise.
7803 * nds32-tdep.c (nds32_gdbarch_init): Likewise.
7804 * rs6000-tdep.c (rs6000_gdbarch_init): Likewise.
7805 * ppc-linux-tdep.c (ppu2spu_sniffer): Use `info.id' rather than
7806 `info.tdep_info'.
7807 (ppc_linux_init_abi): Use `info.tdesc_data' rather than
7808 `info.tdep_info'.
7809 * sparc-tdep.c (sparc32_gdbarch_init): Likewise.
7810 * spu-multiarch.c (spu_gdbarch): Use `info.id' rather than
7811 `info.tdep_info'.
7812 * spu-tdep.c (spu_gdbarch_init): Likewise.
7813 * gdbarch.h: Regenerate.
7814
7815 2017-08-07 Leszek Swirski <leszeks@google.com>
7816
7817 PR symtab/20899
7818 * dwarf2read.c (dwarf2_string_attr): Allow DW_FORM_GNU_strp_alt.
7819
7820 2017-08-07 Simon Marchi <simon.marchi@ericsson.com>
7821
7822 * remote-sim.c (gdbsim_load): Remove char **argv local variable.
7823 (gdbsim_open): Rename gdb_argv args object to argv.
7824
7825 2017-08-05 Tom Tromey <tom@tromey.com>
7826
7827 * compile/compile-object-load.c (compile_object_load): Use
7828 gdb::unique_xmalloc_ptr.
7829 * cli/cli-dump.c (scan_filename): Rename from
7830 scan_filename_with_cleanup. Change return type.
7831 (scan_expression): Rename from scan_expression_with_cleanup.
7832 Change return type.
7833 (dump_memory_to_file, dump_value_to_file, restore_command):
7834 Use gdb::unique_xmalloc_ptr. Update.
7835 * cli/cli-cmds.c (find_and_open_script): Use
7836 gdb::unique_xmalloc_ptr.
7837 * tracefile-tfile.c (tfile_open): Use gdb::unique_xmalloc_ptr.
7838 * symmisc.c (maintenance_print_symbols)
7839 (maintenance_print_msymbols): Use gdb::unique_xmalloc_ptr.
7840 * symfile.c (symfile_bfd_open, generic_load)
7841 (add_symbol_file_command, remove_symbol_file_command): Use
7842 gdb::unique_xmalloc_ptr.
7843 * source.c (openp): Use gdb::unique_xmalloc_ptr.
7844 * psymtab.c (maintenance_print_psymbols): Use
7845 gdb::unique_xmalloc_ptr.
7846 * corelow.c (core_open): Use gdb::unique_xmalloc_ptr.
7847 * breakpoint.c (save_breakpoints): Use gdb::unique_xmalloc_ptr.
7848 * solib.c (solib_map_sections): Use gdb::unique_xmalloc_ptr.
7849 (reload_shared_libraries_1): Likewise.
7850
7851 2017-08-05 Tom Tromey <tom@tromey.com>
7852
7853 * rust-exp.y (rust_op_ptr, set_field): Remove typedefs.
7854 (rust_op_vector, rust_set_vector): New typedefs.
7855 (current_parser): New global.
7856 (work_obstack): Change to pointer type. Update all users.
7857 (rust_ast, pstate): Remove globals.
7858 (struct rust_parser): New.
7859 (%union) <params, field_inits>: Change type.
7860 (start, tuple_expr, unit_expr, struct_expr_list, literal)
7861 (field_expr, expr_list, maybe_expr_list, type_list): Update.
7862 (ast_call_ish, ast_path, ast_function_type, ast_tuple_type)
7863 (convert_params_to_types, convert_params_to_expression): Change
7864 type of "params".
7865 (ast_string): Change type of "fields".
7866 (rust_parse): Make a rust_parser. Remove cleanups.
7867 (rust_lex_tests): Make and install an auto_obstack.
7868
7869 2017-08-04 Yao Qi <yao.qi@linaro.org>
7870
7871 * configure.srv (ipa_x32_linux_regobj): New.
7872 * linux-amd64-ipa.c (get_ipa_tdesc): Use X86_TDESC_AVX_AVX512
7873 instead of X86_TDESC_AVX512.
7874 (initialize_low_tracepoint): Call
7875 init_registers_x32_avx_avx512_linux.
7876
7877 2017-08-04 Yao Qi <yao.qi@linaro.org>
7878
7879 * utils.h (gdb_argv): Add namespace std for nullptr_t.
7880
7881 2017-08-03 Ruslan Kabatsayev <b7.10110111@gmail.com>
7882
7883 * MAINTAINERS (Write After Approval): Add Ruslan Kabatsayev.
7884
7885 2017-08-03 Tom Tromey <tom@tromey.com>
7886
7887 * utils.c (make_cleanup_freeargv, do_freeargv, gdb_buildargv):
7888 Remove.
7889 * utils.h (make_cleanup_freeargv, gdb_buildargv): Remove.
7890
7891 2017-08-03 Tom Tromey <tom@tromey.com>
7892
7893 * python/py-param.c (compute_enum_values): Use gdb_argv.
7894
7895 2017-08-03 Tom Tromey <tom@tromey.com>
7896
7897 * utils.h (struct gdb_argv_deleter): New.
7898 (gdb_argv): New class.
7899 * utils.c (gdb_argv::reset): New method.
7900 * tracepoint.c (delete_trace_variable_command): Use gdb_argv.
7901 * tracefile.c (tsave_command): Use gdb_argv.
7902 * top.c (new_ui_command): Use gdb_argv.
7903 * symmisc.c (maintenance_print_symbols)
7904 (maintenance_print_msymbols, maintenance_expand_symtabs): Use gdb_argv.
7905 * symfile.c (symbol_file_command, generic_load)
7906 (remove_symbol_file_command): Use gdb_argv.
7907 * stack.c (backtrace_command): Use gdb_argv.
7908 * source.c (add_path, show_substitute_path_command)
7909 (unset_substitute_path_command, set_substitute_path_command):
7910 Use gdb_argv.
7911 * skip.c (skip_command): Use gdb_argv. Use gdb_buildargv.
7912 * ser-mingw.c (pipe_windows_open): Use gdb_argv.
7913 * remote.c (extended_remote_run, remote_put_command)
7914 (remote_get_command, remote_delete_command): Use gdb_argv.
7915 * remote-sim.c (gdbsim_load, gdbsim_create_inferior)
7916 (gdbsim_open): Use gdb_argv.
7917 * python/py-cmd.c (gdbpy_string_to_argv): Use gdb_argv.
7918 * psymtab.c (maintenance_print_psymbols): Use gdb_argv.
7919 * procfs.c (procfs_info_proc): Use gdb_argv.
7920 * interps.c (interpreter_exec_cmd): Use gdb_argv.
7921 * infrun.c (handle_command): Use gdb_argv.
7922 * inferior.c (add_inferior_command, clone_inferior_command):
7923 Use gdb_argv.
7924 * guile/scm-string.c (gdbscm_string_to_argv): Use gdb_argv.
7925 * exec.c (exec_file_command): Use gdb_argv.
7926 * cli/cli-cmds.c (alias_command): Use gdb_argv.
7927 * compile/compile.c (build_argc_argv): Use gdb_argv.
7928
7929 2017-08-03 Tom Tromey <tom@tromey.com>
7930
7931 * python/python.c (gdbpy_decode_line): Use unique_xmalloc_ptr.
7932
7933 2017-08-03 Tom Tromey <tom@tromey.com>
7934
7935 * python/python.c (compute_python_string): Return std::string.
7936 (gdbpy_eval_from_control_command): Update.
7937 (do_start_initialization): Use std::string.
7938 * python/py-varobj.c (py_varobj_iter_next): Use string_printf, not
7939 xstrprintf.
7940 * python/py-breakpoint.c (local_setattro): Use string_printf, not
7941 xstrprintf.
7942
7943 2017-08-03 Tom Tromey <tom@tromey.com>
7944
7945 * top.h (do_restore_instream_cleanup): Remove.
7946 * top.c (do_restore_instream_cleanup): Remove.
7947 (read_command_file): Use scoped_restore.
7948 * cli/cli-script.c (execute_user_command): Use scoped_restore.
7949
7950 2017-08-03 Tom Tromey <tom@tromey.com>
7951
7952 * cli/cli-script.c (execute_user_command)
7953 (execute_control_command): Use scoped_restore.
7954
7955 2017-08-03 Tom Tromey <tom@tromey.com>
7956
7957 * cli/cli-script.c (do_restore_user_call_depth): Remove.
7958 (execute_user_command): Remove user_call_depth; use
7959 user_args_stack's size instead.
7960
7961 2017-08-03 Tom Tromey <tom@tromey.com>
7962
7963 * top.h (in_user_command): Remove.
7964 * top.c (in_user_command): Remove.
7965 * cli/cli-script.c (do_restore_user_call_depth)
7966 (execute_user_command): Update.
7967
7968 2017-08-03 Tom Tromey <tom@tromey.com>
7969
7970 * valops.c (search_struct_method): Use gdb::byte_vector.
7971 * valarith.c (value_concat): Use std::vector.
7972 * target.c (memory_xfer_partial): Use gdb::byte_vector.
7973 (simple_search_memory): Likewise.
7974 * printcmd.c (find_string_backward): Use gdb::byte_vector.
7975 * mi/mi-main.c (mi_cmd_data_write_memory): Use gdb::byte_vector.
7976 * gcore.c (gcore_copy_callback): Use gdb::byte_vector.
7977 * elfread.c (elf_rel_plt_read): Use std::string.
7978 * cp-valprint.c (cp_print_value): Use gdb::byte_vector.
7979 * cli/cli-dump.c (restore_section_callback): Use
7980 gdb::byte_vector.
7981
7982 2017-08-03 Tom Tromey <tom@tromey.com>
7983
7984 * jit.c (jit_reader_load_command): Use unique_xmalloc_ptr.
7985
7986 2017-08-03 Tom Tromey <tom@tromey.com>
7987
7988 * tui/tui-regs.c (tui_restore_gdbout): Remove.
7989 (tui_register_format): Use scoped_restore.
7990
7991 2017-08-03 Tom Tromey <tom@tromey.com>
7992
7993 * reverse.c (exec_direction_default): Remove.
7994 (exec_reverse_once): Use scoped_restore.
7995 * remote.c (restore_remote_timeout): Remove.
7996 (remote_flash_erase, remote_flash_write, remote_flash_done)
7997 (readchar, remote_serial_write): Use scoped_restore.
7998 * cli/cli-script.c (struct source_cleanup_lines_args)
7999 (source_cleanup_lines): Remove.
8000 (script_from_file): Use scoped_restore.
8001 * cli/cli-cmds.c (source_verbose_cleanup): Remove.
8002 (source_command): Use scoped_restore.
8003
8004 2017-08-03 Tom Tromey <tom@tromey.com>
8005
8006 * utils.h (make_cleanup_free_so): Remove.
8007 * utils.c (do_free_so, make_cleanup_free_so): Remove.
8008 * solist.h (struct so_deleter): New.
8009 (so_list_up): New typedef.
8010 * solib-svr4.c (svr4_read_so_list): Use so_list_up.
8011
8012 2017-08-03 Tom Tromey <tom@tromey.com>
8013
8014 * utils.h (make_cleanup_restore_current_language): Remove.
8015 * utils.c (do_restore_current_language)
8016 (make_cleanup_restore_current_language): Remove.
8017 * parse.c (parse_exp_in_context_1)
8018 (parse_expression_with_language): Use
8019 scoped_restore_current_language.
8020 * mi/mi-main.c (mi_cmd_execute): Use
8021 scoped_restore_current_language.
8022 * language.h (scoped_restore_current_language): New class.
8023
8024 2017-08-03 Tom Tromey <tom@tromey.com>
8025
8026 * compile/compile.c (cleanup_unlink_file): Remove.
8027 (compile_to_object): Use gdb::unlinker.
8028 (eval_compile_command): Likewise.
8029
8030 2017-08-03 Tom Tromey <tom@tromey.com>
8031
8032 * utils.h (make_cleanup_fclose): Remove.
8033 * utils.c (do_fclose_cleanup, make_cleanup_fclose): Remove.
8034
8035 2017-08-03 Tom Tromey <tom@tromey.com>
8036
8037 * top.c (open_terminal_stream): Return gdb_file_up.
8038 (new_ui_command): Update.
8039
8040 2017-08-03 Tom Tromey <tom@tromey.com>
8041
8042 * source.c (print_source_lines_base, forward_search_command)
8043 (reverse_search_command): Use gdb_file_up.
8044
8045 2017-08-03 Tom Tromey <tom@tromey.com>
8046
8047 * fbsd-nat.c (fbsd_find_memory_regions): Update.
8048
8049 2017-08-03 Tom Tromey <tom@tromey.com>
8050
8051 * cli/cli-cmds.c (find_and_open_script): Change return type.
8052 Remove "streamp" and "full_path" parameters.
8053 (source_script_with_search): Update.
8054 * auto-load.c (source_script_file): Update.
8055 * cli/cli-cmds.h (find_and_open_script): Change type.
8056 (open_script): New struct.
8057
8058 2017-08-03 Tom Tromey <tom@tromey.com>
8059
8060 * xml-support.c (xml_fetch_content_from_file): Update.
8061 * ui-file.c (stdio_file::open): Update.
8062 * tracefile-tfile.c (tfile_start): Update.
8063 * remote.c (remote_file_put, remote_file_get): Update.
8064 * nat/linux-procfs.c (linux_proc_get_int)
8065 (linux_proc_pid_get_state, linux_proc_tid_get_name): Update.
8066 * nat/linux-osdata.c (linux_common_core_of_thread): Update.
8067 (command_from_pid, commandline_from_pid, linux_xfer_osdata_cpus)
8068 (print_sockets, linux_xfer_osdata_shm, linux_xfer_osdata_sem)
8069 (linux_xfer_osdata_msg, linux_xfer_osdata_modules): Update.
8070 * nat/linux-btrace.c (linux_determine_kernel_start): Update.
8071 * linux-nat.c (linux_proc_pending_signals): Update.
8072 * dwarf2read.c (write_psymtabs_to_index): Use gdb_file_up.
8073 (file_closer): Remove.
8074 * compile/compile.c (compile_to_object): Update.
8075 * common/filestuff.h (struct gdb_file_deleter): New.
8076 (gdb_file_up): New typedef.
8077 (gdb_fopen_cloexec): Change return type.
8078 * common/filestuff.c (gdb_fopen_cloexec): Return gdb_file_up.
8079 * cli/cli-dump.c (fopen_with_cleanup): Remove.
8080 (dump_binary_file, restore_binary_file): Update.
8081 * auto-load.c (auto_load_objfile_script_1): Update.
8082
8083 2017-08-03 Tom Tromey <tom@tromey.com>
8084
8085 * tracepoint.c (tvariables_info_1): Use ui_out_emit_table.
8086 (info_static_tracepoint_markers_command): Likewise.
8087 * solib.c (info_sharedlibrary_command): Use ui_out_emit_table.
8088 * skip.c (skip_info): Use ui_out_emit_table.
8089 * progspace.c (print_program_space): Use ui_out_emit_table.
8090 * osdata.c (info_osdata): Use ui_out_emit_table.
8091 * mi/mi-cmd-info.c (mi_cmd_info_ada_exceptions): Use
8092 ui_out_emit_table.
8093 * linux-thread-db.c (info_auto_load_libthread_db): Use
8094 ui_out_emit_table.
8095 * inferior.c (print_inferior): Use ui_out_emit_table.
8096 * gdb_bfd.c (maintenance_info_bfds): Use ui_out_emit_table.
8097 * breakpoint.c (breakpoint_1): Use ui_out_emit_table.
8098 * auto-load.c (auto_load_info_scripts): Use ui_out_emit_table.
8099 * ada-tasks.c (print_ada_task_info): Use ui_out_emit_table.
8100 * ui-out.h (class ui_out_emit_table): New.
8101
8102 2017-08-02 Maciej W. Rozycki <macro@imgtec.com>
8103
8104 * mips-tdep.c (mips_fpu_type_str): New function.
8105 (mips_dump_tdep): Call it.
8106
8107 2017-08-01 Maciej W. Rozycki <macro@imgtec.com>
8108
8109 * mips-tdep.c (mips_gdbarch_init): Use MIPS_FPU_TYPE to access
8110 `->mips_fpu_type'.
8111
8112 2017-07-31 Xavier Roirand <roirand@adacore.com>
8113
8114 * solib-darwin.c (DYLD_VERSION_MAX): Increase value.
8115
8116 2017-07-27 Xavier Roirand <roirand@adacore.com>
8117
8118 * MAINTAINERS (Write After Approval): Add Xavier Roirand.
8119
8120 2017-07-26 Yao Qi <yao.qi@linaro.org>
8121
8122 * cli/cli-cmds.c (maintenancechecklist): New variable.
8123 * gdbcmd.h (maintenancechecklist): Declare it.
8124 * i386-linux-tdep.c (_initialize_i386_linux_tdep) [GDB_SELF_TEST]:
8125 Call i386_linux_read_description with different masks.
8126 * maint.c (maintenance_check_command): New function.
8127 (_initialize_maint_cmds): Call add_prefix_cmd.
8128 * target-descriptions.c (tdesc_reg): override operator != and ==.
8129 (tdesc_type): Likewise.
8130 (tdesc_feature): Likewise.
8131 (target_desc): Likewise.
8132 [GDB_SELF_TEST] (selftests::record_xml_tdesc): New function.
8133 (maintenance_check_xml_descriptions): New function.
8134 (_initialize_target_descriptions) Add command "xml-descriptions".
8135 * target-descriptions.h (selftests::record_xml_tdesc): Declare.
8136
8137 2017-07-26 Yao Qi <yao.qi@linaro.org>
8138
8139 * i386-linux-tdep.c: Don't include features/i386/i386-*linux.c.
8140 Include features/i386/32bit-*.c.
8141 (i386_linux_read_description): Generate target description if it
8142 doesn't exist.
8143 (_initialize_i386_linux_tdep): Don't call _initialize_tdesc_i386
8144 functions.
8145 * features/i386/32bit-linux.c: Re-generated.
8146 * features/i386/32bit-sse.c: Likewise.
8147 * target-descriptions.c (print_c_feature::visit): Print code to
8148 set register number if needed.
8149 (print_c_feature) <m_next_regnum>: New field.
8150
8151 2017-07-26 Yao Qi <yao.qi@linaro.org>
8152
8153 * features/Makefile (CFILES): Rename with TDESC_CFILES.
8154 (FEATURE_XMLFILES): New.
8155 (FEATURE_CFILES): New.
8156 New rules.
8157 (clean-cfiles): Remove generated c files.
8158 * features/i386/32bit-avx.c: Generated.
8159 * features/i386/32bit-avx512.c: Generated.
8160 * features/i386/32bit-core.c: Generated.
8161 * features/i386/32bit-linux.c: Generated.
8162 * features/i386/32bit-mpx.c: Generated.
8163 * features/i386/32bit-pkeys.c: Generated.
8164 * features/i386/32bit-sse.c: Generated.
8165 * target-descriptions.c: Include algorithm.
8166 (tdesc_element_visitor): Add method visit_end.
8167 (print_c_tdesc): Implement visit_end.
8168 (print_c_tdesc:: m_filename_after_features): Move it to
8169 protected.
8170 (print_c_feature): New class.
8171 (maint_print_c_tdesc_cmd): Use print_c_feature if XML file
8172 name starts with "i386/32bit-".
8173
8174 2017-07-26 Yao Qi <yao.qi@linaro.org>
8175
8176 * target-descriptions.c (tdesc_element_visitor): New class.
8177 (tdesc_element): New class.
8178 (tdesc_reg): Inherit from tdesc_element.
8179 (tdesc_reg::accept): New function.
8180 (tdesc_type): Inherit from tdesc_element.
8181 (tdesc_type::accept): New function.
8182 (tdesc_feature): Inherit from tdesc_element.
8183 (tdesc_feature::accept): New function.
8184 (target_desc): Inherit from tdesc_element.
8185 (target_desc::target_desc): New.
8186 (target_desc::~target_desc): New.
8187 (target_desc::accept): New.
8188 (allocate_target_description): Use new.
8189 (free_target_description): Use delete.
8190 (print_c_tdesc): New class.
8191 (maint_print_c_tdesc_cmd): Adjust.
8192
8193 * features/aarch64.c: Re-generated.
8194 * features/arc-arcompact.c: Re-generated.
8195 * features/arc-v2.c: Re-generated.
8196 * features/arm/arm-with-iwmmxt.c: Re-generated.
8197 * features/arm/arm-with-m.c: Re-generated.
8198 * features/arm/arm-with-m-fpa-layout.c: Re-generated.
8199 * features/arm/arm-with-m-vfp-d16.c: Re-generated.
8200 * features/arm/arm-with-neon.c: Re-generated.
8201 * features/arm/arm-with-vfpv2.c: Re-generated.
8202 * features/arm/arm-with-vfpv3.c: Re-generated.
8203 * features/i386/amd64-avx-avx512.c: Re-generated.
8204 * features/i386/amd64-avx-avx512-linux.c: Re-generated.
8205 * features/i386/amd64-avx.c: Re-generated.
8206 * features/i386/amd64-avx-linux.c: Re-generated.
8207 * features/i386/amd64-avx-mpx-avx512-pku.c: Re-generated.
8208 * features/i386/amd64-avx-mpx-avx512-pku-linux.c: Re-generated.
8209 * features/i386/amd64-avx-mpx.c: Re-generated.
8210 * features/i386/amd64-avx-mpx-linux.c: Re-generated.
8211 * features/i386/amd64.c: Re-generated.
8212 * features/i386/amd64-linux.c: Re-generated.
8213 * features/i386/amd64-mpx.c: Re-generated.
8214 * features/i386/amd64-mpx-linux.c: Re-generated.
8215 * features/i386/i386-avx-avx512.c: Re-generated.
8216 * features/i386/i386-avx-avx512-linux.c: Re-generated.
8217 * features/i386/i386-avx.c: Re-generated.
8218 * features/i386/i386-avx-linux.c: Re-generated.
8219 * features/i386/i386-avx-mpx-avx512-pku.c: Re-generated.
8220 * features/i386/i386-avx-mpx-avx512-pku-linux.c: Re-generated.
8221 * features/i386/i386-avx-mpx.c: Re-generated.
8222 * features/i386/i386-avx-mpx-linux.c: Re-generated.
8223 * features/i386/i386.c: Re-generated.
8224 * features/i386/i386-linux.c: Re-generated.
8225 * features/i386/i386-mmx.c: Re-generated.
8226 * features/i386/i386-mmx-linux.c: Re-generated.
8227 * features/i386/i386-mpx.c: Re-generated.
8228 * features/i386/i386-mpx-linux.c: Re-generated.
8229 * features/i386/x32-avx-avx512.c: Re-generated.
8230 * features/i386/x32-avx-avx512-linux.c: Re-generated.
8231 * features/i386/x32-avx.c: Re-generated.
8232 * features/i386/x32-avx-linux.c: Re-generated.
8233 * features/i386/x32.c: Re-generated.
8234 * features/i386/x32-linux.c: Re-generated.
8235 * features/microblaze.c: Re-generated.
8236 * features/microblaze-with-stack-protect.c: Re-generated.
8237 * features/mips64-dsp-linux.c: Re-generated.
8238 * features/mips64-linux.c: Re-generated.
8239 * features/mips-dsp-linux.c: Re-generated.
8240 * features/mips-linux.c: Re-generated.
8241 * features/nds32.c: Re-generated.
8242 * features/nios2.c: Re-generated.
8243 * features/nios2-linux.c: Re-generated.
8244 * features/rs6000/powerpc-32.c: Re-generated.
8245 * features/rs6000/powerpc-32l.c: Re-generated.
8246 * features/rs6000/powerpc-403.c: Re-generated.
8247 * features/rs6000/powerpc-403gc.c : Re-generated.
8248 * features/rs6000/powerpc-405.c: Re-generated.
8249 * features/rs6000/powerpc-505.c: Re-generated.
8250 * features/rs6000/powerpc-601.c: Re-generated.
8251 * features/rs6000/powerpc-602.c: Re-generated.
8252 * features/rs6000/powerpc-603.c: Re-generated.
8253 * features/rs6000/powerpc-604.c: Re-generated.
8254 * features/rs6000/powerpc-64.c: Re-generated.
8255 * features/rs6000/powerpc-64l.c: Re-generated.
8256 * features/rs6000/powerpc-7400.c: Re-generated.
8257 * features/rs6000/powerpc-750.c: Re-generated.
8258 * features/rs6000/powerpc-860.c: Re-generated.
8259 * features/rs6000/powerpc-altivec32.c: Re-generated.
8260 * features/rs6000/powerpc-altivec32l.c: Re-generated.
8261 * features/rs6000/powerpc-altivec64.c: Re-generated.
8262 * features/rs6000/powerpc-altivec64l.c: Re-generated.
8263 * features/rs6000/powerpc-cell32l.c: Re-generated.
8264 * features/rs6000/powerpc-cell64l.c: Re-generated.
8265 * features/rs6000/powerpc-e500.c: Re-generated.
8266 * features/rs6000/powerpc-e500l.c: Re-generated.
8267 * features/rs6000/powerpc-isa205-32l.c: Re-generated.
8268 * features/rs6000/powerpc-isa205-64l.c: Re-generated.
8269 * features/rs6000/powerpc-isa205-altivec32l.c: Re-generated.
8270 * features/rs6000/powerpc-isa205-altivec64l.c: Re-generated.
8271 * features/rs6000/powerpc-isa205-vsx32l.c: Re-generated.
8272 * features/rs6000/powerpc-isa205-vsx64l.c: Re-generated.
8273 * features/rs6000/powerpc-vsx32.c: Re-generated.
8274 * features/rs6000/powerpc-vsx32l.c: Re-generated.
8275 * features/rs6000/powerpc-vsx64.c: Re-generated.
8276 * features/rs6000/powerpc-vsx64l.c: Re-generated.
8277 * features/rs6000/rs6000.c: Re-generated.
8278 * features/s390-linux32.c: Re-generated.
8279 * features/s390-linux32v1.c: Re-generated.
8280 * features/s390-linux32v2.c: Re-generated.
8281 * features/s390-linux64.c: Re-generated.
8282 * features/s390-linux64v1.c: Re-generated.
8283 * features/s390-linux64v2.c: Re-generated.
8284 * features/s390-te-linux64.c: Re-generated.
8285 * features/s390-tevx-linux64.c: Re-generated.
8286 * features/s390-vx-linux64.c: Re-generated.
8287 * features/s390x-linux64.c: Re-generated.
8288 * features/s390x-linux64v1.c: Re-generated.
8289 * features/s390x-linux64v2.c: Re-generated.
8290 * features/s390x-te-linux64.c: Re-generated.
8291 * features/s390x-tevx-linux64.c: Re-generated.
8292 * features/s390x-vx-linux64.c: Re-generated.
8293 * features/sparc/sparc32-solaris.c: Re-generated.
8294 * features/sparc/sparc64-solaris.c: Re-generated.
8295 * features/tic6x-c62x.c: Re-generated.
8296 * features/tic6x-c62x-linux.c: Re-generated.
8297 * features/tic6x-c64x.c: Re-generated.
8298 * features/tic6x-c64x-linux.c: Re-generated.
8299 * features/tic6x-c64xp.c: Re-generated.
8300 * features/tic6x-c64xp-linux.c: Re-generated.
8301
8302 2017-07-26 Yao Qi <yao.qi@linaro.org>
8303
8304 * i386-linux-tdep.c (i386_linux_read_description): New function.
8305 (i386_linux_core_read_description): Call
8306 i386_linux_read_description.
8307 * i386-linux-tdep.h (i386_linux_read_description): Declare.
8308 (tdesc_i386_linux, tdesc_i386_mmx_linux): Remove declarations.
8309 (tdesc_i386_avx_linux, tdesc_i386_mpx_linux): Likewise
8310 (tdesc_i386_avx_mpx_linux, tdesc_i386_avx_avx512_linux): Likewise.
8311 (tdesc_i386_avx_mpx_avx512_pku_linux): Likewise.
8312 * x86-linux-nat.c (x86_linux_read_description): Call
8313 i386_linux_read_description.
8314
8315 2017-07-26 Yao Qi <yao.qi@linaro.org>
8316
8317 * NEWS: Mention it.
8318 * features/Makefile (%.c: %.xml): Pass the xml file name to
8319 command "maint print c-tdesc".
8320 * target-descriptions.c (maint_print_c_tdesc_cmd): Get file
8321 name from 'arg'.
8322
8323 2017-07-26 Yao Qi <yao.qi@linaro.org>
8324
8325 * target-descriptions.c (target_desc): Add ctor and dtor. Do
8326 in-class initialization.
8327 (tdesc_create_feature): Call new instead of XCNEW.
8328 (free_target_description): Ue delete.
8329
8330 2017-07-25 John Baldwin <jhb@FreeBSD.org>
8331
8332 * configure.nat: Add "-lkvm" for NetBSD/sparc64 and fix typo.
8333
8334 2017-07-25 Yao Qi <yao.qi@linaro.org>
8335
8336 * amd64-tdep.c (amd64_init_abi): Make argument default_tdesc
8337 constant.
8338 (amd64_x32_init_abi): Likewise.
8339 * amd64-tdep.h (amd64_init_abi): Update declaration.
8340 (amd64_x32_init_abi): Likewise.
8341
8342 2017-07-25 Yao Qi <yao.qi@linaro.org>
8343
8344 PR tdep/21717
8345 * arm-linux-nat.c (arm_linux_fetch_inferior_registers): Update
8346 condition for FPSCR.
8347 (arm_linux_store_inferior_registers): Likewise.
8348
8349 2017-07-22 Tom Tromey <tom@tromey.com>
8350
8351 * break-catch-syscall.c (struct catch_syscall_inferior_data)
8352 <syscalls_counts>: Now a std::vector.
8353 (get_catch_syscall_inferior_data): Use "new".
8354 (catch_syscall_inferior_data_cleanup): Use "delete".
8355 (insert_catch_syscall, remove_catch_syscall)
8356 (clear_syscall_counts): Update.
8357
8358 2017-07-22 Tom Tromey <tom@tromey.com>
8359
8360 * break-catch-syscall.c (syscall_catchpoint)
8361 <syscalls_to_be_caught>: Now a std::vector<int>
8362 (~syscall_catchpoint): Remove.
8363 (insert_catch_syscall, remove_catch_syscall)
8364 (breakpoint_hit_catch_syscall, print_one_catch_syscall)
8365 (print_mention_catch_syscall, print_recreate_catch_syscall):
8366 Update.
8367 (create_syscall_event_catchpoint): Change type of "filter"
8368 parameter.
8369 (catch_syscall_split_args): Return a std::vector.
8370 (catch_syscall_command_1, catching_syscall_number_1): Update.
8371
8372 2017-07-22 Tom Tromey <tom@tromey.com>
8373
8374 * break-catch-throw.c (struct exception_catchpoint)
8375 <exception_rx>: Now a std::string.
8376 (~exception_catchpoint): Remove.
8377 (print_one_detail_exception_catchpoint): Update.
8378 (handle_gnu_v3_exceptions): Change type of except_rx.
8379 (extract_exception_regexp): Return a std::string.
8380 (catch_exception_command_1): Update.
8381
8382 2017-07-22 Tom Tromey <tom@tromey.com>
8383
8384 * break-catch-sig.c (gdb_signal_type): Remove typedef.
8385 (struct signal_catchpoint) <signals_to_be_caught>: Now a
8386 std::vector.
8387 <catch_all>: Now a bool.
8388 (~signal_catchpoint): Remove.
8389 (signal_catchpoint_insert_location)
8390 (signal_catchpoint_remove_location)
8391 (signal_catchpoint_breakpoint_hit, signal_catchpoint_print_one)
8392 (signal_catchpoint_print_mention)
8393 (signal_catchpoint_print_recreate)
8394 (signal_catchpoint_explains_signal): Update.
8395 (create_signal_catchpoint): Change type of "filter" and
8396 "catch_all".
8397 (catch_signal_split_args): Return a std::vector. Change type of
8398 "catch_all".
8399 (catch_signal_command): Update.
8400
8401 2017-07-20 Pedro Alves <palves@redhat.com>
8402
8403 * ada-lang.c (ada_language_defn): Make extern.
8404 (_initialize_ada_language): Remove add_language call.
8405 * c-lang.c (c_language_defn, cplus_language_defn)
8406 (asm_language_defn, minimal_language_defn): Make extern.
8407 (_initialize_c_language): Delete.
8408 * completer.c (compare_cstrings): Delete, moved to utils.h.
8409 * d-lang.c (d_language_defn): Make extern.
8410 (_initialize_d_language): Remove add_language calls.
8411 * defs.h (enum language): Add comment.
8412 * f-lang.c (f_language_defn): Make extern.
8413 (_initialize_f_language): Remove add_language call.
8414 * go-lang.c (go_language_defn): Make extern.
8415 (_initialize_go_language): Remove add_language call.
8416 * language.c: Include <algorithm>.
8417 (languages): Redefine as const array.
8418 (languages_size, languages_allocsize, DEFAULT_ALLOCSIZE): Delete.
8419 (set_language_command): Handle "local". Use for-range loop.
8420 (set_language): Remove loop.
8421 (language_enum): Rewrite.
8422 (language_def, language_str): Remove loops.
8423 (add_language): Delete.
8424 (add_set_language_command): New, based on add_languages.
8425 (skip_language_trampoline): Adjust.
8426 (local_language_defn): Delete.
8427 (language_gdbarch_post_init): Adjust.
8428 (_initialize_language): Remove add_language calls. Call
8429 add_set_language_command.
8430 * language.h (add_language): Delete.
8431 (auto_language_defn)
8432 (unknown_language_defn, minimal_language_defn, ada_language_defn)
8433 (asm_language_defn, c_language_defn, cplus_language_defn)
8434 (d_language_defn, f_language_defn, go_language_defn)
8435 (m2_language_defn, objc_language_defn, opencl_language_defn)
8436 (pascal_language_defn, rust_language_defn): Declare.
8437 * m2-lang.c (m2_language_defn): Make extern.
8438 (_initialize_m2_language): Remove add_language call.
8439 * objc-lang.c (objc_language_defn): Make extern.
8440 (_initialize_objc_language): Remove add_language call.
8441 * opencl-lang.c (opencl_language_defn): Make extern.
8442 (_initialize_opencl_language): Remove add_language call.
8443 * p-lang.c (pascal_language_defn): Make extern.
8444 (_initialize_pascal_language): Delete.
8445 * rust-lang.c (rust_language_defn): Make extern.
8446 (_initialize_rust_language): Delete.
8447 * utils.h (compare_cstrings): New static inline function.
8448
8449 2017-07-20 Pedro Alves <palves@redhat.com>
8450
8451 * ada-lang.c (ada_to_fixed_type_1): Adjust.
8452 (get_var_value): Constify parameters.
8453 (get_int_var_value): Change prototype.
8454 (to_fixed_range_type): Adjust.
8455 * ada-lang.h (get_int_var_value): Change prototype.
8456
8457 2017-07-20 Pedro Alves <palves@redhat.com>
8458
8459 * dwarf2read.c (dw2_lookup_symbol): Use
8460 SYMBOL_MATCHES_SEARCH_NAME.
8461 * psymtab.c (psym_lookup_symbol): Use SYMBOL_MATCHES_SEARCH_NAME.
8462
8463 2017-07-20 Pedro Alves <palves@redhat.com>
8464
8465 * block.c (block_iter_name_step, block_iter_name_first)
8466 (block_iter_name_next): Delete.
8467 (block_lookup_symbol_primary): Adjust to use
8468 dict_iter_match_first/dict_iter_match_next.
8469 * block.h (block_iter_name_first, block_iter_name_next): Delete
8470 declarations.
8471 (ALL_BLOCK_SYMBOLS_WITH_NAME): Adjust to use
8472 dict_iter_match_first/dict_iter_match_next.
8473
8474 2017-07-20 Pedro Alves <palves@redhat.com>
8475
8476 * cp-support.c (cp_find_first_component_aux): Add missing case for
8477 end of string.
8478
8479 2017-07-18 David Blaikie <dblaikie@gmail.com>
8480
8481 * dwarf2read.c (create_cus_hash_table): Re-add lost initialization
8482 of dwo_cu's dwo_file.
8483
8484 2017-07-18 Yao Qi <yao.qi@linaro.org>
8485
8486 * remote.c (store_registers_using_G): Remove one line comment.
8487
8488 2017-07-18 Yao Qi <yao.qi@linaro.org>
8489
8490 * regcache.c (regcache_cpy): Simplify it.
8491 (regcache::cpy_no_passthrough): Remove it.
8492 * regcache.h (cpy_no_passthrough): Remove it.
8493 (regcache_dup, regcache_cpy): Update comments.
8494
8495 2017-07-18 Pedro Alves <palves@redhat.com>
8496
8497 * remote-sim.c (sim_command_completer): Adjust to work with a
8498 completion_tracker instead of a VEC.
8499
8500 2017-07-17 Pedro Alves <palves@redhat.com>
8501
8502 * completer.c (complete_source_filenames): New function.
8503 (complete_address_and_linespec_locations): New function.
8504 (location_completer): Use complete_address_and_linespec_locations.
8505 (completion_tracker::build_completion_result): Honor the tracker's
8506 request to suppress append.
8507 * completer.h (completion_tracker::suppress_append_ws)
8508 (completion_tracker::set_suppress_append_ws): New methods.
8509 (completion_tracker::m_suppress_append_ws): New field.
8510 (complete_source_filenames): New declaration.
8511 * linespec.c (linespec_complete_what): New.
8512 (struct ls_parser) <complete_what, completion_word,
8513 completion_quote_char, completion_quote_end, completion_tracker>:
8514 New fields.
8515 (string_find_incomplete_keyword_at_end): New.
8516 (linespec_lexer_lex_string): Record quote char. If in completion
8517 mode, don't throw.
8518 (linespec_lexer_consume_token): Advance the completion word point.
8519 (linespec_lexer_peek_token): Save/restore completion info.
8520 (save_stream_and_consume_token): New.
8521 (set_completion_after_number): New.
8522 (linespec_parse_basic): Set what to complete next depending on
8523 token. Handle function and label completions specially.
8524 (parse_linespec): Disable objc shortcut in completion mode. Set
8525 what to complete next depending on token type. Skip keyword if in
8526 completion mode.
8527 (complete_linespec_component, linespec_complete): New.
8528 * linespec.h (linespec_complete): Declare.
8529
8530 2017-07-17 Pedro Alves <palves@redhat.com>
8531
8532 * linespec.c (linespec_lexer_lex_string, find_toplevel_char):
8533 Handle 'operator<' / 'operator<<'.
8534
8535 2017-07-17 Pedro Alves <palves@redhat.com>
8536
8537 * completer.c (collect_explicit_location_matches): Handle
8538 MATCH_LABEL.
8539 (convert_explicit_location_to_linespec): New, factored out from
8540 ...
8541 (convert_explicit_location_to_sals): ... this.
8542 (complete_label): New.
8543 (linespec_complete_label, find_label_symbols_in_block): New.
8544 (find_label_symbols): Add completion_mode parameter and adjust to
8545 call find_label_symbols_in_block.
8546 * linespec.h (linespec_complete_label): Declare.
8547
8548 2017-07-17 Pedro Alves <palves@redhat.com>
8549
8550 * ada-lang.c (ada_collect_symbol_completion_matches): Add
8551 complete_symbol_mode parameter.
8552 * cli/cli-cmds.c (complete_command): Get the completion result out
8553 of the handle_brkchars tracker if used a custom word point.
8554 * completer.c: Include "linespec.h".
8555 (enum explicit_location_match_type) <MATCH_LINE>: New enumerator.
8556 (advance_to_expression_complete_word_point): New.
8557 (completion_tracker::completes_to_completion_word): New.
8558 (complete_files_symbols): Pass down
8559 complete_symbol_mode::EXPRESSION.
8560 (explicit_options, probe_options): New.
8561 (collect_explicit_location_matches): Complete on the
8562 explictit_loc->foo instead of word. Use
8563 linespec_complete_function. Handle MATCH_LINE. Handle offering
8564 keyword and options completions.
8565 (backup_text_ptr): Delete.
8566 (skip_keyword): New.
8567 (complete_explicit_location): Remove 'word' parameter. Add
8568 language, quoted_arg_start and quoted_arg_end parameters.
8569 Rewrite, parsing left to right.
8570 (location_completer): Rewrite.
8571 (location_completer_handle_brkchars): New function.
8572 (symbol_completer): Pass down complete_symbol_mode::EXPRESSION.
8573 (enum complete_line_internal_reason): Adjust comments.
8574 (completion_tracker::discard_completions): New.
8575 (completer_handle_brkchars_func_for_completer): Handle
8576 location_completer.
8577 (gdb_custom_word_point_brkchars)
8578 (gdb_org_rl_basic_quote_characters): New.
8579 (gdb_completion_word_break_characters_throw)
8580 (completion_find_completion_word): Handle trackers that use a
8581 custom word point.
8582 (completion_tracker::advance_custom_word_point_by): New.
8583 (completion_tracker::build_completion_result): Don't rely on
8584 readline appending the quote char.
8585 (gdb_rl_attempted_completion_function_throw): Handle trackers that
8586 use a custom word point.
8587 (gdb_rl_attempted_completion_function): Restore
8588 rl_basic_quote_characters.
8589 * completer.h (class completion_tracker): Extend intro comment.
8590 (completion_tracker::set_quote_char)
8591 (completion_tracker::quote_char)
8592 (completion_tracker::set_use_custom_word_point)
8593 (completion_tracker::use_custom_word_point)
8594 (completion_tracker::custom_word_point)
8595 (completion_tracker::set_custom_word_point)
8596 (completion_tracker::advance_custom_word_point_by)
8597 (completion_tracker::completes_to_completion_word)
8598 (completion_tracker::discard_completions): New methods.
8599 (completion_tracker::m_quote_char)
8600 (completion_tracker::m_use_custom_word_point)
8601 (completion_tracker::m_custom_word_point): New fields.
8602 (advance_to_expression_complete_word_point): Declare.
8603 * f-lang.c (f_collect_symbol_completion_matches): Add
8604 complete_symbol_mode parameter.
8605 * language.h (struct language_defn)
8606 <la_collect_symbol_completion_matches>: Add complete_symbol_mode
8607 parameter.
8608 * linespec.c (linespec_keywords): Add NULL terminator. Make extern.
8609 (linespec_complete_function): New function.
8610 (linespec_lexer_lex_keyword): Adjust.
8611 * linespec.h (linespec_keywords, linespec_complete_function): New
8612 declarations.
8613 * location.c (find_end_quote): New function.
8614 (explicit_location_lex_one): Add explicit_completion_info
8615 parameter. Save quoting info. Don't throw if being called for
8616 completion. Don't handle Ada operators here.
8617 (is_cp_operator, skip_op_false_positives, first_of)
8618 (explicit_location_lex_one_function): New function.
8619 (string_to_explicit_location): Replace 'dont_throw' parameter with
8620 an explicit_completion_info pointer parameter. Handle it. Don't
8621 use explicit_location_lex_one to lex function names. Use
8622 explicit_location_lex_one_function instead.
8623 * location.h (struct explicit_completion_info): New.
8624 (string_to_explicit_location): Replace 'dont_throw' parameter with
8625 an explicit_completion_info pointer parameter.
8626 * symtab.c (default_collect_symbol_completion_matches_break_on):
8627 Add complete_symbol_mode parameter. Handle LINESPEC mode.
8628 (default_collect_symbol_completion_matches)
8629 (collect_symbol_completion_matches): Add complete_symbol_mode
8630 parameter.
8631 (collect_symbol_completion_matches_type): Pass down
8632 complete_symbol_mode::EXPRESSION.
8633 (collect_file_symbol_completion_matches): Add complete_symbol_mode
8634 parameter. Handle LINESPEC mode.
8635 * symtab.h (complete_symbol_mode): New.
8636 (default_collect_symbol_completion_matches_break_on)
8637 (default_collect_symbol_completion_matches)
8638 (collect_symbol_completion_matches)
8639 (collect_file_symbol_completion_matches): Add complete_symbol_mode
8640 parameter.
8641
8642 2017-07-17 Pedro Alves <palves@redhat.com>
8643
8644 * utils.c (enum class strncmp_iw_mode): New.
8645 (strcmp_iw): Rename to ...
8646 (strncmp_iw_with_mode): ... this. Add string2_len and mode
8647 parameters. Handle them.
8648 (strncmp_iw): New.
8649 (strcmp_iw): Reimplement as wrapper around strncmp_iw_with_mode.
8650 * utils.h (strncmp_iw): Declare.
8651 (strcmp_iw): Move describing comments here.
8652
8653 2017-07-17 Pedro Alves <palves@redhat.com>
8654
8655 * c-exp.y (operator_stoken): Use CP_OPERATOR_LEN and
8656 CP_OPERATOR_STR.
8657 * c-typeprint.c (is_type_conversion_operator): Use
8658 CP_OPERATOR_STR.
8659 * cp-support.c (LENGTH_OF_OPERATOR): Delete.
8660 (cp_find_first_component_aux): Use CP_OPERATOR_STR and
8661 CP_OPERATOR_LEN.
8662 * cp-support.h (CP_OPERATOR_STR, CP_OPERATOR_LEN): New.
8663 * gnu-v2-abi.c (gnuv2_is_operator_name): Use CP_OPERATOR_STR.
8664 * gnu-v3-abi.c (gnuv3_is_operator_name): Use CP_OPERATOR_STR.
8665 * linespec.c (linespec_lexer_lex_string): Use CP_OPERATOR_LEN and
8666 CP_OPERATOR_STR.
8667 * location.c: Include "cp-support.h".
8668 (explicit_location_lex_one): Use CP_OPERATOR_LEN and
8669 CP_OPERATOR_STR.
8670 * symtab.c (operator_chars): Use CP_OPERATOR_STR and
8671 CP_OPERATOR_LEN.
8672
8673 2017-07-17 Pedro Alves <palves@redhat.com>
8674
8675 * cli/cli-cmds.c (complete_command): Use a completion tracker
8676 along with completion_find_completion_word for handle_brkchars
8677 phase.
8678 * completer.c (RL_QF_SINGLE_QUOTE, RL_QF_DOUBLE_QUOTE)
8679 (RL_QF_BACKSLASH, RL_QF_OTHER_QUOTE): New.
8680 (struct gdb_rl_completion_word_info): New.
8681 (gdb_rl_find_completion_word): New.
8682 (completion_find_completion_word): New.
8683 * completer.h (completion_find_completion_word): Declare.
8684
8685 2017-07-17 Pedro Alves <palves@redhat.com>
8686
8687 * ada-lang.c (symbol_completion_match): Adjust comments.
8688 (symbol_completion_add): Replace vector parameter with
8689 completion_tracker parameter. Use it.
8690 (ada_make_symbol_completion_list): Rename to...
8691 (ada_collect_symbol_completion_matches): ... this. Add
8692 completion_tracker parameter and use it.
8693 (ada_language_defn): Adjust.
8694 * break-catch-syscall.c (catch_syscall_completer): Adjust
8695 prototype and work with completion_tracker instead of VEC.
8696 * breakpoint.c (condition_completer): Adjust prototype and work
8697 with completion_tracker instead of VEC.
8698 * c-lang.c (c_language_defn, cplus_language_defn)
8699 (asm_language_defn, minimal_language_defn): Adjust to renames.
8700 * cli/cli-cmds.c (complete_command): Rework using
8701 completion_tracker. Catch exceptions when completing.
8702 * cli/cli-decode.c (integer_unlimited_completer)
8703 (complete_on_cmdlist, complete_on_enum): Adjust prototype and work
8704 with completion_tracker instead of VEC.
8705 * command.h (struct completion_tracker): Forward declare.
8706 (completer_ftype, completer_handle_brkchars_ftype): Change
8707 types.
8708 (complete_on_cmdlist, complete_on_enum): Adjust.
8709 * completer.c: Include <algorithm>.
8710 (struct gdb_completer_state): New.
8711 (current_completion): New global.
8712 (readline_line_completion_function): Delete.
8713 (noop_completer, filename_completer)
8714 (filename_completer_handle_brkchars, complete_files_symbols)
8715 (linespec_location_completer): Adjust to work with a
8716 completion_tracker instead of a VEC.
8717 (string_or_empty): New.
8718 (collect_explicit_location_matches): Adjust to work with a
8719 completion_tracker instead of a VEC.
8720 (explicit_location_completer): Rename to ...
8721 (complete_explicit_location): ... this and adjust to work with a
8722 completion_tracker instead of a VEC.
8723 (location_completer): Adjust to work with a completion_tracker
8724 instead of a VEC.
8725 (add_struct_fields): Adjust to work with a completion_list instead
8726 of VEC.
8727 (expression_completer): Rename to ...
8728 (complete_expression): ... this and adjust to work with a
8729 completion_tracker instead of a VEC. Use complete_files_symbols.
8730 (expression_completer): Reimplement on top of complete_expression.
8731 (symbol_completer): Adjust to work with a completion_tracker
8732 instead of a VEC.
8733 (enum complete_line_internal_reason): Add describing comments.
8734 (complete_line_internal_normal_command): Adjust to work with a
8735 completion_tracker instead of a VEC.
8736 (complete_line_internal): Rename to ...
8737 (complete_line_internal_1): ... this and adjust to work with a
8738 completion_tracker instead of a VEC. Assert TEXT is NULL in the
8739 handle_brkchars phase.
8740 (new_completion_tracker): Delete.
8741 (complete_line_internal): Reimplement as TRY/CATCH wrapper around
8742 complete_line_internal_1.
8743 (free_completion_tracker): Delete.
8744 (INITIAL_COMPLETION_HTAB_SIZE): New.
8745 (completion_tracker::completion_tracker)
8746 (completion_tracker::~completion_tracker): New.
8747 (maybe_add_completion): Delete.
8748 (completion_tracker::maybe_add_completion)
8749 (completion_tracker::add_completion)
8750 (completion_tracker::add_completions): New.
8751 (throw_max_completions_reached_error): Delete.
8752 (complete_line): Adjust to work with a completion_tracker instead
8753 of a VEC. Don't create a completion_tracker_t or check for max
8754 completions here.
8755 (command_completer, command_completer_handle_brkchars)
8756 (signal_completer, reg_or_group_completer_1)
8757 (reg_or_group_completer, default_completer_handle_brkchars):
8758 Adjust to work with a completion_tracker.
8759 (gdb_completion_word_break_characters_throw): New.
8760 (gdb_completion_word_break_characters): Reimplement.
8761 (line_completion_function): Delete.
8762 (completion_tracker::recompute_lowest_common_denominator)
8763 (expand_preserving_ws)
8764 (completion_tracker::build_completion_result)
8765 (completion_result::completion_result)
8766 (completion_result::completion_result)
8767 (completion_result::~completion_result)
8768 (completion_result::completion_result)
8769 (completion_result::release_match_list, compare_cstrings)
8770 (completion_result::sort_match_list)
8771 (completion_result::reset_match_list)
8772 (gdb_rl_attempted_completion_function_throw)
8773 (gdb_rl_attempted_completion_function): New.
8774 * completer.h (completion_list, struct completion_result)
8775 (class completion_tracker): New.
8776 (complete_line): Add completion_tracker parameter.
8777 (readline_line_completion_function): Delete.
8778 (gdb_rl_attempted_completion_function): New.
8779 (noop_completer, filename_completer, expression_completer)
8780 (location_completer, symbol_completer, command_completer)
8781 (signal_completer, reg_or_group_completer): Update prototypes.
8782 (completion_tracker_t, new_completion_tracker)
8783 (make_cleanup_free_completion_tracker): Delete.
8784 (enum maybe_add_completion_enum): Delete.
8785 (maybe_add_completion): Delete.
8786 (throw_max_completions_reached_error): Delete.
8787 * corefile.c (complete_set_gnutarget): Adjust to work with a
8788 completion_tracker instead of a VEC.
8789 * cp-abi.c (cp_abi_completer): Adjust to work with a
8790 completion_tracker instead of a VEC.
8791 * d-lang.c (d_language_defn): Adjust.
8792 * disasm.c (disassembler_options_completer): Adjust to work with a
8793 completion_tracker instead of a VEC.
8794 * f-lang.c (f_make_symbol_completion_list): Rename to ...
8795 (f_collect_symbol_completion_matches): ... this. Adjust to work
8796 with a completion_tracker instead of a VEC.
8797 (f_language_defn): Adjust.
8798 * go-lang.c (go_language_defn): Adjust.
8799 * guile/scm-cmd.c (cmdscm_add_completion, cmdscm_completer):
8800 Adjust to work with a completion_tracker instead of a VEC.
8801 * infrun.c (handle_completer): Likewise.
8802 * interps.c (interpreter_completer): Likewise.
8803 * interps.h (interpreter_completer): Likewise.
8804 * language.c (unknown_language_defn, auto_language_defn)
8805 (local_language_defn): Adjust.
8806 * language.h (language_defn::la_make_symbol_completion_list):
8807 Rename to ...
8808 (language_defn::la_collect_symbol_completion_matches): ... this
8809 and adjust to work with a completion_tracker instead of a VEC.
8810 * m2-lang.c (m2_language_defn): Adjust.
8811 * objc-lang.c (objc_language_defn): Adjust.
8812 * opencl-lang.c (opencl_language_defn): Adjust.
8813 * p-lang.c (pascal_language_defn): Adjust.
8814 * python/py-cmd.c (cmdpy_completer_helper): Handle NULL word.
8815 (cmdpy_completer_handle_brkchars, cmdpy_completer): Adjust to work
8816 with a completion_tracker.
8817 * rust-lang.c (rust_language_defn): Adjust.
8818 * symtab.c (free_completion_list, do_free_completion_list)
8819 (return_val, completion_tracker): Delete.
8820 (completion_list_add_name, completion_list_add_symbol)
8821 (completion_list_add_msymbol, completion_list_objc_symbol)
8822 (completion_list_add_fields, add_symtab_completions): Add
8823 completion_tracker parameter and use it.
8824 (default_make_symbol_completion_list_break_on_1): Rename to...
8825 (default_collect_symbol_completion_matches_break_on): ... this.
8826 Add completion_tracker parameter and use it instead of allocating
8827 a completion tracker here.
8828 (default_make_symbol_completion_list_break_on): Delete old
8829 implementation.
8830 (default_make_symbol_completion_list): Delete.
8831 (default_collect_symbol_completion_matches): New.
8832 (make_symbol_completion_list): Delete.
8833 (collect_symbol_completion_matches): New.
8834 (make_symbol_completion_type): Rename to ...
8835 (collect_symbol_completion_matches_type): ... this. Add
8836 completion_tracker parameter and use it instead of VEC.
8837 (make_file_symbol_completion_list_1): Rename to...
8838 (collect_file_symbol_completion_matches): ... this. Add
8839 completion_tracker parameter and use it instead of VEC.
8840 (make_file_symbol_completion_list): Delete.
8841 (add_filename_to_list): Use completion_list instead of a VEC.
8842 (add_partial_filename_data::list): Now a completion_list.
8843 (make_source_files_completion_list): Work with a completion_list
8844 instead of a VEC.
8845 * symtab.h: Include "completer.h".
8846 (default_make_symbol_completion_list_break_on)
8847 (default_make_symbol_completion_list, make_symbol_completion_list)
8848 (make_symbol_completion_type, make_file_symbol_completion_list)
8849 (make_source_files_completion_list): Delete.
8850 (default_collect_symbol_completion_matches_break_on)
8851 (default_collect_symbol_completion_matches)
8852 (collect_symbol_completion_matches)
8853 (collect_symbol_completion_matches_type)
8854 (collect_file_symbol_completion_matches)
8855 (make_source_files_completion_list): New.
8856 * top.c (init_main): Don't install a rl_completion_entry_function
8857 hook. Install a rl_attempted_completion_function hook instead.
8858 * tui/tui-layout.c (layout_completer): Adjust to work with a
8859 completion_tracker.
8860 * tui/tui-regs.c (tui_reggroup_completer):
8861 * tui/tui-win.c (window_name_completer, focus_completer)
8862 (winheight_completer): Adjust to work with a completion_tracker.
8863 * value.c: Include "completer.h".
8864 (complete_internalvar): Adjust to work with a completion_tracker.
8865 * value.h (complete_internalvar): Likewise.
8866
8867 2017-07-17 Pedro Alves <palves@redhat.com>
8868
8869 * cli/cli-decode.c (set_cmd_completer_handle_brkchars): Adjust to
8870 renames.
8871 * cli/cli-decode.h (struct cmd_list_element) <completer>: Move
8872 comments to completer_ftype's declaration.
8873 <completer_handle_brkchars>: Change type to
8874 completer_handle_brkchars_ftype.
8875 * command.h (completer_ftype): Add describing comment and give
8876 names to parameters.
8877 (completer_ftype_void): Rename to ...
8878 (completer_handle_brkchars_ftype) ... this. Add describing comment.
8879 (set_cmd_completer_handle_brkchars): Adjust.
8880 * completer.c (filename_completer_handle_brkchars): New function.
8881 (complete_line_internal_normal_command): New function, factored
8882 out from ...
8883 (complete_line_internal): ... here.
8884 (command_completer_handle_brkchars)
8885 (default_completer_handle_brkchars)
8886 (completer_handle_brkchars_func_for_completer): New functions.
8887 * completer.h (set_gdb_completion_word_break_characters): Delete
8888 declaration.
8889 (completer_handle_brkchars_func_for_completer): New declaration.
8890 * python/py-cmd.c (cmdpy_completer_handle_brkchars): Adjust to use
8891 completer_handle_brkchars_func_for_completer.
8892
8893 2017-07-17 Pedro Alves <palves@redhat.com>
8894
8895 * completer.c (symbol_completer): New function, based on
8896 make_symbol_completion_list_fn.
8897 * completer.h (symbol_completer): New declaration.
8898 * guile/scm-cmd.c (cmdscm_completers): Adjust.
8899 * python/py-cmd.c (completers): Adjust.
8900 * symtab.c (make_symbol_completion_list_fn): Delete.
8901 * symtab.h (make_symbol_completion_list_fn): Delete.
8902 * cli/cli-decode.c (add_cmd): Adjust.
8903
8904 2017-07-17 Pedro Alves <palves@redhat.com>
8905
8906 * Makefile.in (COMMON_OBS): Add filename-seen-cache.o.
8907 * dwarf2read.c: Include "filename-seen-cache.h".
8908 * dwarf2read.c (dwarf2_per_objfile) <filenames_cache>: New field.
8909 (dw2_map_symbol_filenames): Build and use a filenames_seen_cache.
8910 * filename-seen-cache.c: New file.
8911 * filename-seen-cache.h: New file.
8912 * symtab.c: Include "filename-seen-cache.h".
8913 (struct filename_seen_cache, INITIAL_FILENAME_SEEN_CACHE_SIZE)
8914 (create_filename_seen_cache, clear_filename_seen_cache)
8915 (delete_filename_seen_cache, filename_seen): Delete, parts moved
8916 to filename-seen-cache.h/filename-seen-cache.c.
8917 (output_source_filename, sources_info)
8918 (maybe_add_partial_symtab_filename)
8919 (make_source_files_completion_list): Adjust to use
8920 filename_seen_cache.
8921
8922 2017-07-17 Pedro Alves <palves@redhat.com>
8923
8924 * dwarf2read.c (dwarf2_per_objfile): In-class initialize all
8925 fields.
8926 (dwarf2_per_objfile::dwarf2_per_objfile(objfile*, const
8927 dwarf2_debug_sections*)): New.
8928 (dwarf2_per_objfile::dwarf2_per_objfile(const
8929 dwarf2_per_objfile&)): Declare as deleted.
8930 (dwarf2_per_objfile::operator=): Declare as deleted.
8931 (dwarf2_per_objfile::dwarf2_per_objfile)
8932 (dwarf2_per_objfile::~dwarf2_per_objfile)
8933 (dwarf2_per_objfile::free_cached_comp_units): New.
8934 (dwarf2_has_info): dwarf2_per_objfile initialization code moved to
8935 ctor. Call dwarf2_per_objfile's ctor manually.
8936 (dwarf2_locate_sections): Deleted/refactored as ...
8937 (dwarf2_per_objfile::locate_sections): ... this new method.
8938 (free_cached_comp_units): Defer to
8939 dwarf2_per_objfile::free_cached_comp_units.
8940 (dwarf2_free_objfile): Call dwarf2_per_objfile's dtor manually.
8941
8942 2017-07-14 Tom Tromey <tom@tromey.com>
8943
8944 PR rust/21764:
8945 * rust-exp.y (convert_ast_to_expression): Add "want_type"
8946 parameter.
8947 <UNOP_SIZEOF>: Split into separate case.
8948 <UNOP_VAR_VALUE>: Handle want_type. Add error case.
8949
8950 2017-07-14 Tom Tromey <tom@tromey.com>
8951
8952 PR rust/21763:
8953 * symtab.c (symbol_matches_domain): Add language_rust to special
8954 case.
8955 * rust-exp.y (convert_ast_to_expression) <OP_VAR_VALUE>: Don't
8956 treat LOC_TYPEDEF symbols as variables.
8957
8958 2017-07-14 Pedro Alves <palves@redhat.com>
8959
8960 * symtab.c (make_file_symbol_completion_list_1): Iterate over
8961 symtabs matching all symtabs with SRCFILE as file name instead of
8962 only considering the first hit, with lookup_symtab.
8963
8964 2017-07-14 Simon Marchi <simon.marchi@ericsson.com>
8965
8966 * ax-gdb.c (gen_aggregate_elt_ref): Remove operand_name and
8967 operator_name parameters.
8968 (gen_expr): Update function call.
8969
8970 2017-07-14 Simon Marchi <simon.marchi@ericsson.com>
8971
8972 * dwarf2loc.h (dwarf2_compile_expr_to_ax): Remove gdbarch
8973 parameter.
8974 * symtab.h (struct symbol_computed_ops::tracepoint_var_ref):
8975 Likewise.
8976 * dwarf2loc.c (dwarf2_compile_expr_to_ax): Remove gdbarch
8977 parameter, use agent_expr::gdbarch instead, update function
8978 calls.
8979 (locexpr_tracepoint_var_ref): Likewise.
8980 (loclist_tracepoint_var_ref): Likewise.
8981 * ax-gdb.c (gen_trace_static_fields): Likewise.
8982 (gen_traced_pop): Likewise.
8983 (gen_frame_args_address): Likewise.
8984 (gen_frame_locals_address): Likewise.
8985 (gen_var_ref): Likewise.
8986 (gen_struct_ref_recursive): Likewise.
8987 (gen_static_field): Likewise.
8988 (gen_maybe_namespace_elt): Likewise.
8989 (gen_expr): Likewise.
8990 (gen_trace_for_var): Likewise.
8991 (gen_trace_for_expr): Likewise.
8992 (gen_trace_for_return_address): Likewise.
8993
8994 2017-07-14 Simon Marchi <simon.marchi@ericsson.com>
8995
8996 * ax-gdb.c (gen_deref, gen_address_of): Remove unused ax
8997 parameter.
8998 (gen_struct_ref, gen_expr, gen_expr_binop_rest): Update call.
8999
9000 2017-07-14 Simon Marchi <simon.marchi@ericsson.com>
9001
9002 * ax-gdb.c (gen_usual_unary): Remove exp parameter, get gdbarch
9003 from ax, update calls.
9004 (gen_usual_arithmetic): Likewise.
9005 (gen_integral_promotions): Likewise.
9006 (gen_bitfield_ref): Likewise.
9007 (gen_primitive_field): Likewise.
9008 (gen_struct_ref_recursive): Likewise.
9009 (gen_struct_ref): Likewise.
9010 (gen_maybe_namespace_elt): Likewise.
9011 (gen_struct_elt_for_reference): Likewise.
9012 (gen_namespace_elt): Likewise.
9013 (gen_aggregate_elt_ref): Likewise.
9014 (gen_expr): Get gdbarch from ax, update calls.
9015 (gen_expr_binop_rest): Likewise.
9016
9017 2017-07-13 Pedro Alves <palves@redhat.com>
9018
9019 * amd64-darwin-tdep.c (x86_darwin_init_abi_64): Pass tdesc_amd64
9020 as default tdesc.
9021 * amd64-dicos-tdep.c (amd64_dicos_init_abi):
9022 * amd64-fbsd-tdep.c (amd64fbsd_init_abi):
9023 * amd64-linux-tdep.c (amd64_linux_init_abi): Pass
9024 tdesc_amd64_linux as default tdesc. Get final tdesc from the
9025 tdep.
9026 (amd64_x32_linux_init_abi): Pass tdesc_x32_linux as default tdesc.
9027 Get final tdesc from the tdep.
9028 * amd64-nbsd-tdep.c (amd64nbsd_init_abi): Pass tdesc_amd64 as
9029 default tdesc.
9030 * amd64-obsd-tdep.c (amd64obsd_init_abi): Likewise.
9031 * amd64-sol2-tdep.c (amd64_sol2_init_abi): Likewise.
9032 * amd64-tdep.c (amd64_init_abi): Add 'default_tdesc' parameter.
9033 Use it as default tdesc.
9034 (amd64_x32_init_abi): Add 'default_tdesc' parameter, and pass it
9035 down to amd_init_abi. No longer handle fallback tdesc here.
9036 * amd64-tdep.h (tdesc_x32): Declare.
9037 (amd64_init_abi, amd64_x32_init_abi): Add 'default_tdesc'
9038 parameter.
9039 * amd64-windows-tdep.c (amd64_windows_init_abi): Pass tdesc_amd64
9040 as default tdesc.
9041
9042 2017-07-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
9043
9044 * s390-linux-tdep.c (s390_process_record): Add support for
9045 instructions new in arch12.
9046
9047 2017-07-11 John Baldwin <jhb@FreeBSD.org>
9048
9049 * amd64-bsd-nat.c (amd64bsd_fetch_inferior_registers): Use
9050 PT_GETFSBASE and PT_GETGSBASE.
9051 (amd64bsd_store_inferior_registers): Use PT_SETFSBASE and
9052 PT_SETGSBASE.
9053
9054 2017-07-11 John Baldwin <jhb@FreeBSD.org>
9055
9056 * features/Makefile (amd64.dat, amd64-avx.dat, amd64-mpx.dat)
9057 (amd64-avx-mpx.dat, amd64-avx-avx512.dat)
9058 (amd64-avx-mpx-avx512-pku.dat): Add i386/64bit-segments.xml in
9059 those rules.
9060 * features/i386/amd64-avx-avx512.xml: Add 64bit-segments.xml.
9061 * features/i386/amd64-avx-mpx-avx512-pku.xml: Add 64bit-segments.xml.
9062 * features/i386/amd64-avx-mpx.xml: Add 64bit-segments.xml.
9063 * features/i386/amd64-avx.xml: Add 64bit-segments.xml.
9064 * features/i386/amd64-mpx.xml: Add 64bit-segments.xml.
9065 * features/i386/amd64.xml: Add 64bit-segments.xml.
9066 * features/i386/amd64-avx-avx512.c: Regenerated.
9067 * features/i386/amd64-avx-mpx-avx512-pku.c: Regenerated.
9068 * features/i386/amd64-avx-mpx.c: Regenerated.
9069 * features/i386/amd64-avx.c: Regenerated.
9070 * features/i386/amd64-mpx.c: Regenerated.
9071 * features/i386/amd64.c: Regenerated.
9072 * regformats/i386/amd64-avx-avx512.dat: Regenerated.
9073 * regformats/i386/amd64-avx-mpx-avx512-pku.dat: Regenerated.
9074 * regformats/i386/amd64-avx-mpx.dat: Regenerated.
9075 * regformats/i386/amd64-avx.dat: Regenerated.
9076 * regformats/i386/amd64-mpx.dat: Regenerated.
9077 * regformats/i386/amd64.dat: Regenerated.
9078
9079 2017-07-10 Yao Qi <yao.qi@linaro.org>
9080
9081 * features/i386/amd64-avx-avx512-linux.c: Re-generated.
9082 * features/i386/amd64-avx-mpx-avx512-pku-linux.c: Re-generated.
9083
9084 2017-07-10 Anton Kolesov <Anton.Kolesov@synopsys.com>
9085
9086 * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add setenv and
9087 unsetenv.
9088 * gnulib/aclocal.m4: Regenerate.
9089 * gnulib/config.in: Regenerate.
9090 * gnulib/configure: Regenerate.
9091 * gnulib/import/Makefile.am: Regenerate.
9092 * gnulib/import/Makefile.in: Regenerate.
9093 * gnulib/import/m4/gnulib-cache.m4: Regenerate.
9094 * gnulib/import/m4/gnulib-comp.m4: Regenerate.
9095 * gnulib/import/m4/environ.m4: New file.
9096 * gnulib/import/m4/setenv.m4: New file.
9097 * gnulib/import/setenv.c: New file.
9098 * gnulib/import/unsetenv.c: New file.
9099
9100 2017-07-09 Simon Marchi <simon.marchi@ericsson.com>
9101
9102 * compile/compile-loc2c.c (do_compile_dwarf_expr_to_c): Read
9103 address when op is DW_OP_addr.
9104
9105 2017-07-09 Tom Tromey <tom@tromey.com>
9106
9107 * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Reverse size
9108 check and apply to outer type.
9109
9110 2017-07-07 John Baldwin <jhb@FreeBSD.org>
9111
9112 * fbsd-tdep.c (LWPINFO_OFFSET, LWPINFO_PL_FLAGS)
9113 (LWPINFO64_PL_SIGINFO, LWPINFO32_PL_SIGINFO, PL_FLAG_SI)
9114 (SIZE64_SIGINFO_T, SIZE32_SIGINFO_T, fbsd_core_xfer_siginfo): New.
9115 (fbsd_init_abi): Install gdbarch "core_xfer_siginfo" method.
9116
9117 2017-07-07 John Baldwin <jhb@FreeBSD.org>
9118
9119 * fbsd-tdep.c (fbsd_core_thread_name): Use thread_section_name.
9120
9121 2017-07-07 John Baldwin <jhb@FreeBSD.org>
9122
9123 * corelow.c (get_core_siginfo): Remove.
9124 (core_xfer_partial): Use the gdbarch "core_xfer_siginfo" method
9125 instead of get_core_siginfo.
9126 * gdbarch.sh (core_xfer_siginfo): New gdbarch callback.
9127 * gdbarch.h: Re-generate.
9128 * gdbarch.c: Re-generate.
9129 * linux-tdep.c (linux_core_xfer_siginfo): New.
9130 (linux_init_abi): Install gdbarch "core_xfer_siginfo" method.
9131
9132 2017-07-07 John Baldwin <jhb@FreeBSD.org>
9133
9134 * corelow.c (thread_section_name): Move to ...
9135 * gdbcore.h (thread_section_name): ... here.
9136
9137 2017-07-07 John Baldwin <jhb@FreeBSD.org>
9138
9139 * fbsd-nat.c [PT_LWPINFO && __LP64__] (union sigval32)
9140 (struct siginfo32): New.
9141 [PT_LWPINFO] (fbsd_siginfo_size, fbsd_convert_siginfo): New.
9142 (fbsd_xfer_partial) [PT_LWPINFO]: Handle TARGET_OBJECT_SIGNAL_INFO
9143 via ptrace(PT_LWPINFO).
9144
9145 2017-07-07 John Baldwin <jhb@FreeBSD.org>
9146
9147 * fbsd-tdep.c (fbsd_gdbarch_data_handle, struct fbsd_gdbarch_data)
9148 (init_fbsd_gdbarch_data, get_fbsd_gdbarch_data)
9149 (fbsd_get_siginfo_type): New.
9150 (fbsd_init_abi): Install gdbarch "get_siginfo_type" method.
9151 (_initialize_fbsd_tdep): New.
9152
9153 2017-07-06 David Blaikie <dblaikie@gmail.com>
9154
9155 * dwarf2read.c (struct dwo_file): Use a htab of dwo_unit* (rather than
9156 a singular dwo_unit*) to support multiple CUs in the same way that
9157 multiple TUs are supported.
9158 (create_cus_hash_table): Replace create_dwo_cu with a function for
9159 parsing multiple CUs from a DWO file.
9160 (open_and_init_dwo_file): Use create_cus_hash_table rather than
9161 create_dwo_cu.
9162 (lookup_dwo_cutu): Lookup CU in the hash table in the dwo_file with
9163 htab_find, rather than comparing the signature to a singleton CU in
9164 the dwo_file.
9165
9166 2017-07-06 Pedro Alves <palves@redhat.com>
9167
9168 * python/py-unwind.c (pyuw_dealloc_cache): Fix for loop condition.
9169
9170 2017-07-04 Pedro Alves <palves@redhat.com>
9171
9172 * gdbtypes.c (recursive_dump_type): Don't reference TYPE_STATIC.
9173 * gdbtypes.h (TYPE_STATIC): Delete.
9174 (struct fn_field) <is_public, is_abstract, is_static, is_final,
9175 is_synchronized, is_native>: Delete.
9176 <dummy>: Bump.
9177 (TYPE_FN_FIELD_PUBLIC, TYPE_FN_FIELD_STATIC, TYPE_FN_FIELD_FINAL)
9178 (TYPE_FN_FIELD_SYNCHRONIZED, TYPE_FN_FIELD_NATIVE)
9179 (TYPE_FN_FIELD_ABSTRACT): Delete.
9180
9181 2017-07-03 Simon Marchi <simon.marchi@ericsson.com>
9182
9183 * buffer.h (buffer_finish): Fix spelling mistakes.
9184
9185 2017-07-01 Eli Zaretskii <eliz@gnu.org>
9186
9187 * .dir-locals.el: Automatically switch to C-style comments in
9188 versions of Emacs that support the feature.
9189
9190 2017-06-30 Sergio Durigan Junior <sergiodj@redhat.com>
9191 Pedro Alves <palves@redhat.com>
9192
9193 PR cli/21688
9194 * cli/cli-script.c (command_name_equals_not_inline): Remove function.
9195 (process_next_line): New variable 'inline_cmd'.
9196 Adjust 'if' clauses for "python", "compile" and "guile" to use
9197 'command_name_equals' and check for '!inline_cmd'.
9198
9199 2017-06-30 Sergio Durigan Junior <sergiodj@redhat.com>
9200
9201 PR cli/21688
9202 * cli/cli-script.c (command_name_equals_not_inline): New function.
9203 (process_next_line): Adjust 'if' clauses for "python", "compile"
9204 and "guile" to use command_name_equals_not_inline.
9205
9206 2017-06-29 Pedro Alves <palves@redhat.com>
9207
9208 * completer.c (expression_completer): Call
9209 linespec_location_completer instead of location_completer.
9210
9211 2017-06-29 Pedro Alves <palves@redhat.com>
9212
9213 * completer.c (expression_completer): Remove code that recomputes
9214 'text' from 'word'.
9215
9216 2017-06-29 Yao Qi <yao.qi@linaro.org>
9217
9218 * regformats/regdat.sh: Generate code with
9219 "ifndef IN_PROCESS_AGENT".
9220
9221 2017-06-28 Pedro Alves <palves@redhat.com>
9222
9223 * command.h: Include "common/scoped_restore.h".
9224
9225 2017-06-28 Yao Qi <yao.qi@linaro.org>
9226
9227 * mi/mi-cmd-break.c (mi_argv_to_format): Use obstack_grow_str
9228 instead of obstack_grow.
9229
9230 2017-06-28 Doug Gilmore <Doug.Gilmore@imgtec.com>
9231
9232 PR gdb/21337
9233 * symfile.c (reread_symbols): Call objfiles_changed just before
9234 read_symbols.
9235
9236 2017-06-27 Pedro Alves <palves@redhat.com>
9237
9238 * symtab.c (COMPLETION_LIST_ADD_SYMBOL)
9239 (MCOMPLETION_LIST_ADD_SYMBOL): Delete macros, replace with ...
9240 (completion_list_add_symbol, completion_list_add_msymbol):
9241 ... these new functions.
9242 (add_symtab_completions)
9243 (default_make_symbol_completion_list_break_on_1): Adjust.
9244
9245 2017-06-27 Pedro Alves <palves@redhat.com>
9246
9247 * objfiles.c (get_objfile_bfd_data): Call bfd_alloc instead of
9248 bfd_zalloc. Call objfile_per_bfd_storage's ctor.
9249 (free_objfile_per_bfd_storage): Call objfile_per_bfd_storage's
9250 dtor.
9251 * objfiles.h (objfile_per_bfd_storage): Add ctor. Make
9252 'storage_obstack' field an auto_obstack. In-class initialize all
9253 non-bitfield fields. Make minsyms_read bool.
9254 * symfile.c (read_symbols): Adjust.
9255
9256 2017-06-27 Alan Hayward <alan.hayward@arm.com>
9257
9258 * remote-sim.c (gdbsim_fetch_register): Use byte_vector.
9259 (gdbsim_store_register): Likewise.
9260
9261 2017-06-27 Pedro Alves <palves@redhat.com>
9262
9263 * c-exp.y (name_obstack): Now an auto_obstack.
9264 (yylex): Use auto_obstack::clear.
9265 (c_parse): Use auto_obstack::clear instead of reinitializing and
9266 freeing the obstack.
9267 * c-lang.c (evaluate_subexp_c): Use auto_obstack.
9268 * d-exp.y (name_obstack): Now an auto_obstack.
9269 (yylex): Use auto_obstack::clear.
9270 (d_parse): Use auto_obstack::clear instead of reinitializing and
9271 freeing the obstack.
9272 * dwarf2loc.c (fetch_const_value_from_synthetic_pointer): Use
9273 auto_obstack.
9274 * dwarf2read.c (create_addrmap_from_index)
9275 (dwarf2_build_psymtabs_hard)
9276 (update_enumeration_type_from_children): Likewise.
9277 * gdb_obstack.h (auto_obstack): New type.
9278 * go-exp.y (name_obstack): Now an auto_obstack.
9279 (build_packaged_name): Use auto_obstack::clear.
9280 (go_parse): Use auto_obstack::clear instead of reinitializing and
9281 freeing the obstack.
9282 * linux-tdep.c (linux_make_mappings_corefile_notes): Use
9283 auto_obstack.
9284 * printcmd.c (printf_wide_c_string, ui_printf): Use auto_obstack.
9285 * rust-exp.y (work_obstack): Now an auto_obstack.
9286 (rust_parse, rust_lex_tests): Use auto_obstack::clear instead of
9287 reinitializing and freeing the obstack.
9288 * utils.c (do_obstack_free, make_cleanup_obstack_free): Delete.
9289 (host_char_to_target): Use auto_obstack.
9290 * utils.h (make_cleanup_obstack_free): Delete declaration.
9291 * valprint.c (generic_emit_char, generic_printstr): Use
9292 auto_obstack.
9293
9294 2017-06-27 Simon Marchi <simon.marchi@ericsson.com>
9295
9296 * darwin-nat.c (darwin_check_new_threads): Don't handle dummy
9297 thread.
9298 (darwin_init_thread_list): Don't update dummy thread.
9299 (darwin_create_inferior, darwin_attach): Don't add a dummy thread.
9300
9301 2017-06-26 Simon Marchi <simon.marchi@ericsson.com>
9302
9303 * record-full.c (netorder16): Remove.
9304
9305 2017-06-26 Simon Marchi <simon.marchi@ericsson.com>
9306
9307 * common/diagnostics.h: Define macros for GCC.
9308 (DIAGNOSTIC_IGNORE_UNUSED_FUNCTION): New macro.
9309 * common/vec.h: Include diagnostics.h.
9310 (DIAGNOSTIC_IGNORE_UNUSED_VEC_FUNCTION): New macro.
9311 (DEF_VEC_I, DEF_VEC_P, DEF_VEC_O): Ignore -Wunused-function
9312 warning.
9313
9314 2017-06-26 Simon Marchi <simon.marchi@ericsson.com>
9315
9316 * common/diagnostics.h (DIAGNOSTIC_IGNORE_DEPRECATED_REGISTER):
9317 New macro.
9318 * ada-lex.l: Ignore deprecated register warnings.
9319
9320 2017-06-25 Simon Marchi <simon.marchi@ericsson.com>
9321
9322 * main.c (get_init_files): Replace "SYSTEM_GDBINIT +
9323 datadir_len" with "&SYSTEM_GDBINIT[datadir_len]".
9324
9325 2017-06-25 Simon Marchi <simon.marchi@ericsson.com>
9326
9327 * dtrace-probe.c (dtrace_process_dof_probe): Put semi-colon on
9328 its own line.
9329
9330 2017-06-25 Simon Marchi <simon.marchi@ericsson.com>
9331
9332 * nat/x86-dregs.c (x86_show_dr): Print registers one per line.
9333
9334 2017-06-23 Alan Hayward <alan.hayward@arm.com>
9335
9336 * xtensa-tdep.c (XTENSA_MAX_REGISTER_SIZE): Add.
9337 (xtensa_register_write_masked): Use XTENSA_MAX_REGISTER_SIZE.
9338 (xtensa_register_read_masked): Likewise.
9339
9340 2017-06-22 Sergio Durigan Junior <sergiodj@redhat.com>
9341
9342 * common/environ.c (gdb_environ::unset): Update comment.
9343
9344 2017-06-22 Alan Hayward <alan.hayward@arm.com>
9345
9346 * python/py-unwind.c (pyuw_sniffer): Allocate space for
9347 registers.
9348
9349 2017-06-22 Alan Hayward <alan.hayward@arm.com>
9350
9351 * record-full.c (record_full_exec_insn): Use byte_vector.
9352
9353 2017-06-22 Yao Qi <yao.qi@linaro.org>
9354
9355 * regformats/i386/amd64-avx-mpx-avx512-pku-linux.dat: Regenerated.
9356 * regformats/i386/amd64-avx-mpx-avx512-pku.dat: Regenerated.
9357
9358 2017-06-22 Alan Hayward <alan.hayward@arm.com>
9359
9360 * remote.c (cached_reg): Move from here...
9361 * regcache.h (cached_reg): ...to here.
9362 * python/py-unwind.c (struct reg_info): Remove.
9363 (cached_frame_info): Use cached_reg_t.
9364 (pyuw_prev_register): Likewise.
9365 (pyuw_sniffer): Use cached_reg_t and allocate registers.
9366 (pyuw_dealloc_cache): Free all registers.
9367
9368 2017-06-22 Pedro Alves <palves@redhat.com>
9369 Simon Marchi <simon.marchi@ericsson.com>
9370
9371 * unittests/environ-selftests.c (run_tests): Ignore -Wself-move
9372 warning.
9373 * common/diagnostics.h: New file.
9374
9375 2017-06-22 Pedro Alves <palves@redhat.com>
9376
9377 * common/agent.h: Add include guards.
9378
9379 2017-06-21 Simon Marchi <simon.marchi@ericsson.com>
9380
9381 * target.h (struct target_ops) <to_xfer_partial>: Update doc to
9382 talk about addressable units instead of bytes.
9383
9384 2017-06-20 Sergio Durigan Junior <sergiodj@redhat.com>
9385
9386 * common/environ.c (gdb_environ::unset): Use '::iterator' instead
9387 of '::const_iterator'.
9388
9389 2017-06-20 Sergio Durigan Junior <sergiodj@redhat.com>
9390
9391 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
9392 'unittests/environ-selftests.c'.
9393 (SUBDIR_UNITTESTS_OBS): Add 'environ-selftests.o'.
9394 * charset.c (find_charset_names): Declare object 'iconv_env'.
9395 Update code to use 'iconv_env' object. Remove call to
9396 'free_environ'.
9397 * common/environ.c: Include <utility>.
9398 (make_environ): Delete function.
9399 (free_environ): Delete function.
9400 (gdb_environ::clear): New function.
9401 (gdb_environ::operator=): New function.
9402 (gdb_environ::get): Likewise.
9403 (environ_vector): Delete function.
9404 (set_in_environ): Delete function.
9405 (gdb_environ::set): New function.
9406 (unset_in_environ): Delete function.
9407 (gdb_environ::unset): New function.
9408 (gdb_environ::envp): Likewise.
9409 * common/environ.h: Include <vector>.
9410 (struct gdb_environ): Delete; transform into...
9411 (class gdb_environ): ... this class.
9412 (free_environ): Delete prototype.
9413 (init_environ, get_in_environ, set_in_environ, unset_in_environ,
9414 environ_vector): Likewise.
9415 * infcmd.c (run_command_1): Update code to call
9416 'envp' from 'gdb_environ' class.
9417 (environment_info): Update code to call methods from 'gdb_environ'
9418 class.
9419 (unset_environment_command): Likewise.
9420 (path_info): Likewise.
9421 (path_command): Likewise.
9422 * inferior.c (inferior::~inferior): Delete call to 'free_environ'.
9423 (inferior::inferior): Initialize 'environment' using the host's
9424 information.
9425 * inferior.h: Remove forward declaration of 'struct gdb_environ'.
9426 Include "environ.h".
9427 (class inferior) <environment>: Change type from 'struct
9428 gdb_environ' to 'gdb_environ'.
9429 * mi/mi-cmd-env.c (mi_cmd_env_path): Update code to call
9430 methods from 'gdb_environ' class.
9431 * solib.c (solib_find_1): Likewise
9432 * unittests/environ-selftests.c: New file.
9433
9434 2017-06-20 Yao Qi <yao.qi@linaro.org>
9435
9436 * features/i386/i386-linux.xml: Exchange the order of including
9437 32bit-linux.xml and 32bit-sse.xml.
9438 * features/i386/i386-linux.c: Regenerated.
9439
9440 2017-06-20 Yao Qi <yao.qi@linaro.org>
9441
9442 * target-descriptions.c (tdesc_reg): Add ctor, dtor.
9443 Delete copy ctor and assignment operator.
9444 (tdesc_type): Likewise.
9445 (tdesc_feature): Likewise.
9446 (tdesc_free_reg): Remove.
9447 (tdesc_create_reg): Use new.
9448 (tdesc_free_type): Remove.
9449 (tdesc_create_vector): Use new.
9450 (tdesc_create_union): Likewise.
9451 (tdesc_create_flags): Likewise.
9452 (tdesc_create_enum): Likewise.
9453 (tdesc_free_feature): Delete.
9454 (free_target_description): Use delete.
9455
9456 2017-06-19 John Baldwin <jhb@FreeBSD.org>
9457
9458 * mips-tdep.c (print_gp_register_row): Don't error for unavailable
9459 registers.
9460
9461 2017-06-19 Pedro Alves <palves@redhat.com>
9462
9463 * dwarf2read.c (write_psymtabs_to_index): Construct file_closer
9464 after gdb::unlinker.
9465
9466 2017-06-19 Sergio Durigan Junior <sergiodj@redhat.com>
9467
9468 * mi/mi-cm-env.c (_initialize_mi_cmd_env): Use getenv instead of
9469 gdb_environ to access an environment variable.
9470
9471 2017-06-18 Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
9472
9473 * nat/linux-ptrace.c (linux_fork_to_function): Add cast to
9474 gdb_byte*.
9475
9476 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
9477
9478 * nat/fork-inferior.h (trace_start_error): Add ATTRIBUTE_PRINTF.
9479
9480 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
9481
9482 * configure: Re-generate.
9483 * warning.m4 (build_warnings): Add -Wno-mismatched-tags.
9484
9485 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
9486
9487 * configure: Re-generate.
9488 * warning.m4: Pass -Werror to compiler when checking for
9489 supported warning flags.
9490
9491 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
9492
9493 * Makefile.in (COMPILE.pre): Add "-x c++".
9494
9495 2017-06-16 Alan Hayward <alan.hayward@arm.com>
9496 Pedro Alves <palves@redhat.com>
9497 Yao Qi <yao.qi@linaro.org>
9498
9499 * defs.h (RequireLongest): New.
9500 (extract_integer): Declare function template.
9501 (extract_signed_integer): Remove the declaration, but define it
9502 static inline.
9503 (extract_unsigned_integer): Likewise.
9504 (store_integer): Declare function template.
9505 (store_signed_integer): Remove the declaration, but define it
9506 static inline.
9507 (store_unsigned_integer): Likewise.
9508 * findvar.c (extract_integer): New function template.
9509 (extract_signed_integer): Remove.
9510 (extract_unsigned_integer): Remove.
9511 (extract_integer<LONGEST>, extract_integer<ULONGEST>): Explicit
9512 instantiations.
9513 (store_integer): New function template.
9514 (store_signed_integer): Remove.
9515 (store_unsigned_integer): Remove.
9516 (store_integer): Explicit instantiations.
9517 * regcache.c (regcache_raw_read_signed): Update.
9518 (regcache::raw_read): New function.
9519 (regcache::raw_read_signed): Remove.
9520 (regcache::raw_read_unsigned): Remove.
9521 (regcache_raw_read_unsigned): Update.
9522 (regcache_raw_write_unsigned): Update.
9523 (regcache::raw_write_signed): Remove.
9524 (regcache::raw_write): New function.
9525 (regcache_cooked_read_signed): Update.
9526 (regcache::raw_write_unsigned): Remove.
9527 (regcache::cooked_read_signed): Remove.
9528 (regcache_cooked_read_unsigned): Update.
9529 (regcache::cooked_read_unsigned): Remove.
9530 (regcache_cooked_write_signed): Update.
9531 (regcache_cooked_write_unsigned): Update.
9532 * regcache.h (regcache) <raw_read_signed>: Remove.
9533 <raw_write_signed, raw_read_unsigned, raw_write_unsigned>: Remove.
9534 <raw_read, raw_write>: New.
9535 <cooked_read_signed, cooked_write_signed>: Remove.
9536 <cooked_write_unsigned, cooked_read_unsigned>: Remove.
9537 <cooked_read, cooked_write>: New.
9538 * sh64-tdep.c (sh64_pseudo_register_read): Update.
9539 (sh64_pseudo_register_write): Update.
9540
9541 2017-06-16 Anton Kolesov <anton.kolesov@synopsys.com>
9542
9543 * arc-tdep.c (arc_disassembler_options): New variable.
9544 (arc_gdbarch_init): Set and use it. Use arc_delayed_print_insn instead
9545 of default_print_insn.
9546 (arc_delayed_print_insn): Set info->section when needed,
9547 use default_print_insn to retrieve a disassembler.
9548
9549 2017-06-14 Sergio Durigan Junior <sergiodj@redhat.com>
9550
9551 PR gdb/21574
9552 * infcmd.c (_initialize_infcmd): Expand "help run" documentation
9553 to mention $SHELL and startup-with-shell.
9554
9555 2017-06-14 Max Filippov <jcmvbkbc@gmail.com>
9556
9557 * MAINTAINERS: Move Maxim Grigoriev to the Past Maintainers.
9558
9559 2017-06-14 Yao Qi <yao.qi@linaro.org>
9560
9561 * aarch64-tdep.c (aarch64_gdb_print_insn): Call
9562 default_print_insn instead of print_insn_aarch64.
9563 * arm-tdep.c (gdb_print_insn_arm): Call
9564 default_print_insn instead of print_insn_big_arm
9565 and print_insn_little_arm.
9566 * i386-tdep.c (i386_print_insn): Call default_print_insn
9567 instead of print_insn_i386.
9568 * ia64-tdep.c (ia64_print_insn): Call
9569 default_print_insn instead of print_insn_ia64.
9570 * mips-tdep.c (gdb_print_insn_mips): Call
9571 default_print_insn instead of print_insn_big_mips
9572 and print_insn_little_mips.
9573 * spu-tdep.c (gdb_print_insn_spu): Call default_print_insn
9574 instead of print_insn_spu.
9575
9576 2017-06-14 Pedro Alves <palves@redhat.com>
9577
9578 * ada-lang.c: Include "common/byte-vector.h".
9579 (ada_value_primitive_packed_val): Use gdb::byte_vector.
9580 * charset.c (wchar_iterator::iterate): Resize the vector instead
9581 of reserving it.
9582 * common/byte-vector.h: Include "common/def-vector.h".
9583 (wchar_iterator::m_out): Now a gdb::def_vector<gdb_wchar_t>.
9584 * cli/cli-dump.c: Include "common/byte-vector.h".
9585 (dump_memory_to_file, restore_binary_file): Use gdb::byte_vector.
9586 * common/byte-vector.h: New file.
9587 * common/def-vector.h: New file.
9588 * common/default-init-alloc.h: New file.
9589 * dwarf2loc.c: Include "common/byte-vector.h".
9590 (rw_pieced_value): Use gdb::byte_vector, and resize the vector
9591 instead of reserving it.
9592 * dwarf2read.c: Include "common/byte-vector.h".
9593 (data_buf::m_vec): Now a gdb::byte_vector.
9594 * gdb_regex.c: Include "common/def-vector.h".
9595 (compiled_regex::compiled_regex): Use gdb::def_vector<char>.
9596 * mi/mi-main.c: Include "common/byte-vector.h".
9597 (mi_cmd_data_read_memory): Use gdb::byte_vector.
9598 * printcmd.c: Include "common/byte-vector.h".
9599 (print_scalar_formatted): Use gdb::byte_vector.
9600 * valprint.c: Include "common/byte-vector.h".
9601 (maybe_negate_by_bytes, print_decimal_chars): Use
9602 gdb::byte_vector.
9603
9604 2017-06-13 Simon Marchi <simon.marchi@ericsson.com>
9605
9606 * darwin-nat.c: Include "nat/fork-inferior.h".
9607
9608 2017-06-13 Simon Marchi <simon.marchi@ericsson.com>
9609
9610 * configure.nat: Factor out Darwin bits that are not
9611 architecture-specific. Add fork-inferior.o.
9612
9613 2017-06-13 Simon Marchi <simon.marchi@ericsson.com>
9614
9615 * configure.nat: Factor out AIX bits that are not
9616 architecture-specific. Add fork-inferior.o.
9617
9618 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
9619
9620 * dwarf2loc.c (rw_pieced_value): New. Merge logic from...
9621 (read_pieced_value, write_pieced_value): ...here. Reduce to
9622 wrappers that just call rw_pieced_value.
9623
9624 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
9625
9626 * dwarf2loc.c (write_pieced_value): When writing the data for a
9627 memory piece, use write_memory_with_notification instead of
9628 write_memory.
9629
9630 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
9631
9632 * valops.c (read_value_memory): Change embedded_offset to
9633 represent a bit offset instead of a byte offset.
9634 * value.h (read_value_memory): Adjust comment.
9635
9636 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
9637
9638 * dwarf2loc.c (read_pieced_value): Remove unnecessary variables
9639 dest_offset_bits and source_offset_bits.
9640 (write_pieced_value): Likewise.
9641
9642 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
9643
9644 * dwarf2loc.c (read_pieced_value): Respect the piece offset, as
9645 given by DW_OP_bit_piece.
9646 (write_pieced_value): Likewise.
9647
9648 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
9649
9650 * dwarf2loc.c (read_pieced_value): Move the buffer allocation and
9651 some other preparations to the places where sufficient information
9652 is available.
9653 (write_pieced_value): Likewise.
9654
9655 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
9656
9657 * dwarf2loc.c (bits_to_bytes): New function.
9658 (read_pieced_value): Fix offset calculations for register pieces
9659 on big-endian targets.
9660 (write_pieced_value): Likewise.
9661
9662 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
9663
9664 * dwarf2loc.c (read_pieced_value): Remove buffer_size variable.
9665 (write_pieced_value): Likewise.
9666
9667 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
9668
9669 * dwarf2loc.c (write_pieced_value): When writing to a bit-field,
9670 transfer the source value's least significant bits, instead of its
9671 lowest-addressed ones. Rename type_len to max_offset.
9672 (read_pieced_value): Mirror above changes to write_pieced_value as
9673 applicable.
9674
9675 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
9676
9677 * dwarf2loc.c (write_pieced_value): In DWARF_VALUE_MEMORY,
9678 truncate full bytes from dest_offset_bits before using it as an
9679 offset into the buffer.
9680
9681 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
9682
9683 * dwarf2loc.c (write_pieced_value): Include transfer size in
9684 byte-wise check.
9685
9686 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
9687
9688 * dwarf2loc.c (write_pieced_value): Fix copy/paste error in the
9689 calculation of this_size.
9690
9691 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
9692
9693 * dwarf2loc.c (read_pieced_value): Respect parent value's offset
9694 when targeting a bit-field.
9695 (write_pieced_value): Likewise.
9696
9697 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
9698
9699 * dwarf2loc.c (struct piece_closure) <addr_size>: Remove field.
9700 (allocate_piece_closure): Drop addr_size parameter.
9701 (dwarf2_evaluate_loc_desc_full): Adjust call to
9702 allocate_piece_closure.
9703
9704 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
9705
9706 PR gdb/21226
9707 * dwarf2loc.c (read_pieced_value): Anchor stack value pieces at
9708 the LSB end, independent of endianness.
9709
9710 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
9711
9712 * dwarf2loc.c (write_pieced_value): Fix order of calculations for
9713 size capping.
9714
9715 2017-06-13 Yao Qi <yao.qi@linaro.org>
9716
9717 * mips-linux-nat.c: Move include features/mips*-linux.c to
9718 mips-linux-tdep.c.
9719 (_initialize_mips_linux_nat): Move initialize_tdesc_mips* calls
9720 to mips-linux-tdep.c.
9721 * mips-linux-tdep.c: Include features/mips*-linux.c
9722 (_initialize_mips_linux_tdep): Call initialize_tdesc_mips*
9723 functions.
9724 * mips-linux-tdep.h (tdesc_mips_linux): Declare.
9725 (tdesc_mips_dsp_linux, tdesc_mips64_linux): Declare.
9726 (tdesc_mips64_dsp_linux): Declare.
9727
9728 2017-06-12 Tom Tromey <tom@tromey.com>
9729
9730 * valprint.h (val_print_type_code_int): Remove.
9731 * valprint.c (generic_val_print_int): Always call
9732 val_print_scalar_formatted.
9733 (val_print_type_code_int): Remove.
9734 * printcmd.c (print_scalar_formatted): Handle options->format==0.
9735 * f-valprint.c (f_val_print): Use val_print_scalar_formatted.
9736 * c-valprint.c (c_val_print_int): Use val_print_scalar_formatted.
9737 * ada-valprint.c (ada_val_print_num): Use
9738 val_print_scalar_formatted.
9739
9740 2017-06-12 Tom Tromey <tom@tromey.com>
9741
9742 * printcmd.c (print_scalar_formatted): Unify the two switches.
9743 Don't convert scalars to LONGEST.
9744
9745 2017-06-12 Tom Tromey <tom@tromey.com>
9746
9747 PR exp/16225:
9748 * valprint.h (print_decimal_chars): Update.
9749 * valprint.c (maybe_negate_by_bytes): New function.
9750 (print_decimal_chars): Add "is_signed" argument.
9751 * printcmd.c (print_scalar_formatted): Update.
9752
9753 2017-06-12 Tom Tromey <tom@tromey.com>
9754
9755 PR exp/16225:
9756 * valprint.h (print_binary_chars, print_hex_chars): Update.
9757 * valprint.c (val_print_type_code_int): Update.
9758 (print_binary_chars): Add "zero_pad" argument.
9759 (emit_octal_digit): New function.
9760 (print_octal_chars): Don't zero-pad.
9761 (print_decimal_chars): Likewise.
9762 (print_hex_chars): Add "zero_pad" argument.
9763 * sh64-tdep.c (sh64_do_fp_register): Update.
9764 * regcache.c (regcache::dump): Update.
9765 * printcmd.c (print_scalar_formatted): Update.
9766 * infcmd.c (default_print_one_register_info): Update.
9767
9768 2017-06-12 Pedro Alves <palves@redhat.com>
9769 Alan Hayward <alan.hayward@arm.com>
9770
9771 * mips-tdep.c (MAX_MIPS_ABI_REGSIZE): New.
9772 (mips_eabi_push_dummy_call): Rename local 'regsize' to
9773 'abi_regsize'. Rename local array 'valbuf' to 'ref_valbuf', and
9774 use MAX_MIPS_ABI_REGSIZE instead of MAX_REGISTER_SIZE to size it.
9775 Assert that abi_regsize bytes fit in 'ref_valbuf'.
9776
9777 2017-06-12 Pedro Alves <palves@redhat.com>
9778
9779 * dwarf2read.c (mapped_symtab::data): Now a vector of
9780 symtab_index_entry instead of vector of
9781 std::unique_ptr<symtab_index_entry>. All users adjusted to check
9782 whether an element's name is NULL instead of checking whether the
9783 element itself is NULL.
9784 (find_slot): Change return type. Adjust.
9785 (hash_expand, , add_index_entry, uniquify_cu_indices)
9786 (write_hash_table): Adjust.
9787
9788 2017-06-12 Pedro Alves <palves@redhat.com>
9789
9790 * dwarf2read.c (recursively_count_psymbols): New function.
9791 (write_psymtabs_to_index): Call it to compute number of psyms and
9792 pass estimate size of psyms_seen to unordered_set's ctor.
9793
9794 2017-06-12 Pedro Alves <palves@redhat.com>
9795
9796 * dwarf2read.c (write_hash_table): Check if key already exists
9797 before emplacing.
9798
9799 2017-06-12 Pedro Alves <palves@redhat.com>
9800
9801 * dwarf2read.c (data_buf::append_space): Rename to...
9802 (data_buf::grow): ... this, and make private. Adjust all callers.
9803 (data_buf::append_uint): New method.
9804 (add_address_entry, write_one_signatured_type)
9805 (write_psymtabs_to_index): Use it.
9806
9807 2017-06-12 Pedro Alves <palves@redhat.com>
9808
9809 * dwarf2read.c (file_write(FILE *, const void *, size_t)): Delete.
9810 (file_write (FILE *, const std::vector<Elem>&)): Delete.
9811 (data_buf::file_write): Call ::fwrite directly.
9812
9813 2017-06-12 Pedro Alves <palves@redhat.com>
9814
9815 * dwarf2read.c (uniquify_cu_indices): Use std::unique and
9816 std::vector::erase.
9817
9818 2017-06-12 Jan Kratochvil <jan.kratochvil@redhat.com>
9819
9820 Code cleanup: C++ify .gdb_index producer.
9821 * dwarf2read.c: Include <unordered_set> and <unordered_map>.
9822 (MAYBE_SWAP) [WORDS_BIGENDIAN]: Cast to offset_type.
9823 (struct strtab_entry, hash_strtab_entry, eq_strtab_entry)
9824 (create_strtab, add_string): Remove.
9825 (file_write, data_buf): New.
9826 (struct symtab_index_entry): Use std::vector for cu_indices.
9827 (struct mapped_symtab): Use std::vector for data.
9828 (hash_symtab_entry, eq_symtab_entry, delete_symtab_entry)
9829 (create_symbol_hash_table, create_mapped_symtab, cleanup_mapped_symtab):
9830 Remove.
9831 (find_slot): Change return type. Update it to the new data structures.
9832 (hash_expand, add_index_entry): Update it to the new data structures.
9833 (offset_type_compare): Remove.
9834 (uniquify_cu_indices): Update it to the new data structures.
9835 (c_str_view, c_str_view_hasher, vector_hasher): New.
9836 (add_indices_to_cpool): Remove.
9837 (write_hash_table): Update it to the new data structures.
9838 (struct psymtab_cu_index_map, hash_psymtab_cu_index)
9839 (eq_psymtab_cu_index): Remove.
9840 (psym_index_map): New typedef.
9841 (struct addrmap_index_data): Change addr_obstack pointer to data_buf
9842 reference and std::unordered_map for cu_index_htab.
9843 (add_address_entry, add_address_entry_worker, write_address_map)
9844 (write_psymbols): Update it to the new data structures.
9845 (write_obstack): Remove.
9846 (struct signatured_type_index_data): Change types_list to a data_buf
9847 reference and psyms_seen to a std::unordered_set reference.
9848 (write_one_signatured_type, recursively_write_psymbols)
9849 (write_psymtabs_to_index): Update it to the new data structures.
9850
9851 2017-06-11 Simon Marchi <simon.marchi@ericsson.com>
9852
9853 * NEWS (Changes since GDB 8.0): Announce {set,show} debug
9854 separate-debug-file commands.
9855 * symfile.h (separate_debug_file_debug): New global.
9856 * symfile.c (separate_debug_file_debug): New global.
9857 (separate_debug_file_exists, find_separate_debug_file): Add
9858 debug output.
9859 (_initialize_symfile): Add "set debug separate-debug-file"
9860 command.
9861 * build-id.c (build_id_to_debug_bfd,
9862 find_separate_debug_file_by_buildid): Add debug output.
9863
9864 2017-06-10 Simon Marchi <simon.marchi@polymtl.ca>
9865
9866 * gdbarch.sh (displaced_step_free_closure): Remove.
9867 * gdbarch.h, gdbarch.c: Re-generate.
9868 * aarch64-linux-tdep.c (aarch64_linux_init_abi): Don't set
9869 displaced_step_free_closure.
9870 * amd64-linux-tdep.c (amd64_linux_init_abi_common): Likewise.
9871 * arm-linux-tdep.c (arm_linux_init_abi): Likewise.
9872 * i386-linux-tdep.c (i386_linux_init_abi): Likewise.
9873 * rs6000-aix-tdep.c (rs6000_aix_init_osabi): Likewise.
9874 * rs6000-tdep.c (rs6000_gdbarch_init): Likewise.
9875 * s390-linux-tdep.c (s390_gdbarch_init): Likewise.
9876 * arch-utils.h (simple_displaced_step_free_closure): Remove.
9877 * arch-utils.c (simple_displaced_step_free_closure): Remove.
9878 * infrun.c (displaced_step_clear): Call xfree instead of
9879 gdbarch_displaced_step_free_closure.
9880
9881 2017-06-08 Sergio Durigan Junior <sergiodj@redhat.com>
9882
9883 * common/common-utils.c (stringify_argv): Check for "arg[0] !=
9884 NULL".
9885
9886 2017-06-08 Alan Hayward <alan.hayward@arm.com>
9887
9888 * mn10300-tdep.c (MN10300_MAX_REGISTER_SIZE): Add.
9889 (mn10300_extract_return_value): Use MN10300_MAX_REGISTER_SIZE.
9890 (mn10300_push_dummy_call): Likewise.
9891
9892 2017-06-08 Alan Hayward <alan.hayward@arm.com>
9893
9894 * mi/mi-main.c (register_changed_p): Use value_contents_eq.
9895
9896 2017-06-08 Alan Hayward <alan.hayward@arm.com>
9897
9898 * mi/mi-main.c (register_changed_p): Use cooked_read_value.
9899
9900 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
9901
9902 * NEWS (Changes since GDB 8.0): Announce that GDBserver is now
9903 able to start inferiors using a shell.
9904 (New remote packets): Announce new packet "QStartupWithShell".
9905 * remote.c: Add PACKET_QStartupWithShell.
9906 (extended_remote_create_inferior): Handle new
9907 PACKET_QStartupWithShell.
9908 (remote_protocol_features) <QStartupWithShell>: New entry for
9909 PACKET_QStartupWithShell.
9910 (_initialize_remote): Call "add_packet_config_cmd" for
9911 QStartupShell.
9912
9913 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
9914 Pedro Alves <palves@redhat.com>
9915
9916 * Makefile.in (HFILES_NO_SRCDIR): Add "common/common-inferior.h"
9917 and "nat/fork-inferior.h".
9918 * common/common-inferior.h: New file, with contents from
9919 "gdb/inferior.h".
9920 * commom/common-utils.c: Include "common-utils.h".
9921 (stringify_argv): New function.
9922 * common/common-utils.h (stringify_argv): New prototype.
9923 * configure.nat: Add "fork-inferior.o" as a dependency for
9924 "*linux*", "fbsd*" and "nbsd*" hosts.
9925 * corefile.c (get_exec_file): Update comment.
9926 * darwin-nat.c (darwin_ptrace_him): Call "gdb_startup_inferior"
9927 instead of "startup_inferior".
9928 (darwin_create_inferior): Call "add_thread_silent" after
9929 "fork_inferior".
9930 * fork-child.c: Cleanup unnecessary includes.
9931 (SHELL_FILE): Move to "common/common-fork-child.c".
9932 (environ): Likewise.
9933 (exec_wrapper): Initialize.
9934 (get_exec_wrapper): New function.
9935 (breakup_args): Move to "common/common-fork-child.c"; rename to
9936 "breakup_args_for_exec".
9937 (escape_bang_in_quoted_argument): Move to
9938 "common/common-fork-child.c".
9939 (saved_ui): New variable.
9940 (prefork_hook): New function.
9941 (postfork_hook): Likewise.
9942 (postfork_child_hook): Likewise.
9943 (gdb_startup_inferior): Likewise.
9944 (fork_inferior): Move to "common/common-fork-child.c". Update
9945 function to support gdbserver.
9946 (startup_inferior): Likewise.
9947 * gdbcore.h (get_exec_file): Remove declaration.
9948 * gnu-nat.c (gnu_create_inferior): Call "gdb_startup_inferior"
9949 instead of "startup_inferior". Call "add_thread_silent" after
9950 "fork_inferior".
9951 * inf-ptrace.c: Include "nat/fork-inferior.h" and "utils.h".
9952 (inf_ptrace_create_inferior): Call "gdb_startup_inferior"
9953 instead of "startup_inferior". Call "add_thread_silent" after
9954 "fork_inferior".
9955 * inferior.h: Include "common-inferior.h".
9956 (trace_start_error): Move to "common/common-utils.h".
9957 (trace_start_error_with_name): Likewise.
9958 (fork_inferior): Move prototype to "nat/fork-inferior.h".
9959 (startup_inferior): Likewise.
9960 (gdb_startup_inferior): New prototype.
9961 * nat/fork-inferior.c: New file, with contents from "fork-child.c".
9962 * nat/fork-inferior.h: New file.
9963 * procfs.c (procfs_init_inferior): Call "gdb_startup_inferior"
9964 instead of "startup_inferior". Call "add_thread_silent" after
9965 "fork_inferior".
9966 * target.h (target_terminal_init): Move prototype to
9967 "target/target.h".
9968 (target_terminal_inferior): Likewise.
9969 (target_terminal_ours): Likewise.
9970 * target/target.h (target_terminal_init): New prototype, moved
9971 from "target.h".
9972 (target_terminal_inferior): Likewise.
9973 (target_terminal_ours): Likewise.
9974 * utils.c (gdb_flush_out_err): New function.
9975
9976 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
9977
9978 * Makefile.in (HFILES_NO_SRCDIR): Add "common/common-gdbthread.h".
9979 * common/common-gdbthread.h: New file, with parts from
9980 "gdb/gdbthread.h".
9981 * gdbthread.h: Include "common-gdbthread.h".
9982 (switch_to_thread): Moved to "common/common-gdbthread.h".
9983
9984 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
9985
9986 * Makefile.in (SFILES): Add "common/job-control.c".
9987 (HFILES_NO_SRCDIR): Add "common/job-control.h".
9988 (COMMON_OBS): Add "job-control.o".
9989 * common/job-control.c: New file, with contents from
9990 "gdb/inflow.c".
9991 * common/job-control.h: New file, with contents from "terminal.h".
9992 * fork-child.c: Include "job-control.h".
9993 * inflow.c: Include "job-control.h".
9994 (gdb_setpgid): Move to "common/common-inflow.c".
9995 (_initialize_inflow): Move setting of "job_control" to
9996 "handle_job_control".
9997 * terminal.h (job_control): Moved to "common/common-terminal.h".
9998 (gdb_setpgid): Likewise.
9999 * top.c: Include "job_control.h".
10000 * utils.c: Likewise.
10001 (job_control): Moved to "job-control.c".
10002
10003 2017-06-07 Pedro Alves <palves@redhat.com>
10004
10005 * Makefile.in (SFILES): Add gdb_regex.c.
10006 (COMMON_OBS): Add gdb_regex.o.
10007 * ada-lang.c (ada_add_standard_exceptions)
10008 (ada_add_exceptions_from_frame, name_matches_regex)
10009 (ada_add_global_exceptions, ada_exceptions_list_1): Change regex
10010 parameter type to compiled_regex. Adjust.
10011 (ada_exceptions_list): Use compiled_regex.
10012 * break-catch-throw.c (exception_catchpoint::pattern): Now a
10013 std::unique_ptr<compiled_regex>.
10014 (exception_catchpoint::~exception_catchpoint): Remove regfree
10015 call.
10016 (check_status_exception_catchpoint): Adjust to use compiled_regex.
10017 (handle_gnu_v3_exceptions): Adjust to use compiled_regex.
10018 * breakpoint.c (solib_catchpoint::compiled): Now a
10019 std::unique_ptr<compiled_regex>.
10020 (solib_catchpoint::~solib_catchpoint): Remove regfree call.
10021 (check_status_catch_solib): Adjust to use compiled_regex.
10022 (add_solib_catchpoint): Adjust to use compiled_regex.
10023 * cli/cli-cmds.c (apropos_command): Use compiled_regex.
10024 * cli/cli-decode.c (apropos_cmd): Change regex parameter to
10025 compiled_regex reference. Adjust to use it.
10026 * cli/cli-decode.h: Remove struct re_pattern_buffer forward
10027 declaration. Include "gdb_regex.h".
10028 (apropos_cmd): Change regex parameter to compiled_regex reference.
10029 * gdb_regex.c: New file.
10030 * gdb_regex.h (make_regfree_cleanup, get_regcomp_error): Delete
10031 declarations.
10032 (class compiled_regex): New.
10033 * linux-tdep.c: Include "common/gdb_optional.h".
10034 (struct mapping_regexes): New, factored out from
10035 mapping_is_anonymous_p, and adjusted to use compiled_regex.
10036 (mapping_is_anonymous_p): Use mapping_regexes wrapped in a
10037 gdb::optional and remove cleanups. Adjust to compiled_regex.
10038 * probe.c: Include "common/gdb_optional.h".
10039 (collect_probes): Use compiled_regex and gdb::optional and remove
10040 cleanups.
10041 * skip.c: Include "common/gdb_optional.h".
10042 (skiplist_entry::compiled_function_regexp): Now a
10043 gdb::optional<compiled_regex>.
10044 (skiplist_entry::compiled_function_regexp_is_valid): Delete field.
10045 (free_skiplist_entry): Remove regfree call.
10046 (compile_skip_regexp, skip_rfunction_p): Adjust to use
10047 compiled_regex and gdb::optional.
10048 * symtab.c: Include "common/gdb_optional.h".
10049 (search_symbols): Use compiled_regex and gdb::optional.
10050 * utils.c (do_regfree_cleanup, make_regfree_cleanup)
10051 (get_regcomp_error, compile_rx_or_error): Delete. Some bits moved
10052 to gdb_regex.c.
10053
10054 2017-06-07 Alan Hayward <alan.hayward@arm.com>
10055
10056 * regcache.c (regcache::save): Avoid buffer use.
10057 (regcache::dump): Likewise.
10058
10059 2017-06-07 Alan Hayward <alan.hayward@arm.com>
10060
10061 * sh-tdep.c (sh_pseudo_register_read): Remove
10062 MAX_REGISTER_SIZE.
10063 (sh_pseudo_register_write): Likewise.
10064 * sh64-tdep.c (sh64_pseudo_register_read): Likewise.
10065 (sh64_pseudo_register_write): Likewise
10066
10067 2017-06-07 Alan Hayward <alan.hayward@arm.com>
10068
10069 * aarch64-tdep.c (aarch64_store_return_value): Use
10070 V_REGISTER_SIZE.
10071 (aarch64_pseudo_read_value): Likewise.
10072 (aarch64_pseudo_write): Likewise.
10073
10074 2017-06-06 Yao Qi <yao.qi@linaro.org>
10075
10076 * regformats/regdef.h (set_register_cache): Remove the
10077 declaration.
10078
10079 2017-06-06 Alan Hayward <alan.hayward@arm.com>
10080
10081 * frame.c (frame_unwind_register_signed): Use
10082 frame_unwind_register_value.
10083
10084 2017-06-06 Pedro Alves <palves@redhat.com>
10085
10086 PR breakpoints/21553
10087 * breakpoint.c (create_breakpoints_sal_default)
10088 (init_breakpoint_sal, create_breakpoint_sal): Use
10089 gdb::unique_xmalloc_ptr for string parameters.
10090 (create_breakpoint): Constify 'extra_string' and 'cond_string'
10091 parameters. Replace cleanups with gdb::unique_xmalloc_ptr.
10092 (base_breakpoint_create_breakpoints_sal)
10093 (bkpt_create_breakpoints_sal, tracepoint_create_breakpoints_sal)
10094 (strace_marker_create_breakpoints_sal)
10095 (create_breakpoints_sal_default): Use gdb::unique_xmalloc_ptr for
10096 string parameters.
10097 * breakpoint.h (breakpoint_ops::create_breakpoints_sal): Use
10098 gdb::unique_xmalloc_ptr for string parameters.
10099 (create_breakpoint): Constify 'extra_string' and 'cond_string'
10100 parameters.
10101
10102 2017-06-06 Alan Hayward <alan.hayward@arm.com>
10103
10104 * alpha-tdep.c (alpha_register_to_value): Use
10105 get_frame_register_value.
10106 (alpha_value_to_register): Use ALPHA_REGISTER_SIZE.
10107
10108 2017-06-06 Alan Hayward <alan.hayward@arm.com>
10109
10110 * ia64-tdep.c (IA64_MAX_FP_REGISTER_SIZE) Add.
10111 (ia64_register_to_value): Use IA64_MAX_FP_REGISTER_SIZE.
10112 (ia64_value_to_register): Likewise.
10113 (ia64_extract_return_value): Likewise.
10114 (ia64_store_return_value): Likewise.
10115 (ia64_push_dummy_call): Likewise.
10116
10117 2017-06-04 Joel Brobecker <brobecker@adacore.com>
10118
10119 GDB 8.0 released.
10120
10121 2017-06-03 Simon Marchi <simon.marchi@ericsson.com>
10122
10123 * x86-linux-nat.c (struct arch_lwp_info): Remove.
10124
10125 2017-06-03 Simon Marchi <simon.marchi@polymtl.ca>
10126
10127 * linux-nat.c (linux_nat_post_attach_wait): Remove FIRST
10128 parameter.
10129 (linux_nat_attach): Adjust call to linux_nat_post_attach_wait.
10130
10131 2017-06-02 Simon Marchi <simon.marchi@ericsson.com>
10132
10133 * event-loop.c (poll_timers): Unallocate timer using delete
10134 instead of xfree.
10135
10136 2017-06-02 Simon Marchi <simon.marchi@polymtl.ca>
10137
10138 * breakpoint.h (struct breakpoint_ops) <dtor>: Remove.
10139 (struct breakpoint) <~breakpoint>: New.
10140 (struct watchpoint): Inherit from breakpoint.
10141 <~watchpoint>: New.
10142 <base>: Remove.
10143 (struct tracepoint): Inherit from breakpoint.
10144 <base>: Remove.
10145 * breakpoint.c (longjmp_breakpoint_ops): Remove.
10146 (struct longjmp_breakpoint): Inherit from breakpoint.
10147 <~longjmp_breakpoint>: New.
10148 <base>: Remove.
10149 (new_breakpoint_from_type): Remove casts.
10150 (watchpoint_in_thread_scope): Remove reference to base field.
10151 (watchpoint_del_at_next_stop): Likewise.
10152 (update_watchpoint): Likewise.
10153 (watchpoint_check): Likewise.
10154 (bpstat_check_watchpoint): Likewise.
10155 (set_longjmp_breakpoint): Likewise.
10156 (struct fork_catchpoint): Inherit from breakpoint.
10157 <base>: Remove.
10158 (struct solib_catchpoint): Inherit from breakpoint.
10159 <~solib_catchpoint>: New.
10160 <base>: Remove.
10161 (dtor_catch_solib): Change to ...
10162 (solib_catchpoint::~solib_catchpoint): ... this.
10163 (breakpoint_hit_catch_solib): Remove reference to base field.
10164 (add_solib_catchpoint): Likewise.
10165 (create_fork_vfork_event_catchpoint): Likewise.
10166 (struct exec_catchpoint): Inherit from breakpoint.
10167 <~exec_catchpoint>: New.
10168 <base>: Remove.
10169 (dtor_catch_exec): Change to ...
10170 (exec_catchpoint::~exec_catchpoint): ... this.
10171 (dtor_watchpoint): Change to ...
10172 (watchpoint::~watchpoint): ... this.
10173 (watch_command_1): Remove reference to base field.
10174 (catch_exec_command_1): Likewise.
10175 (base_breakpoint_dtor): Change to ...
10176 (breakpoint::~breakpoint): ... this.
10177 (base_breakpoint_ops): Remove dtor field value.
10178 (longjmp_bkpt_dtor): Change to ...
10179 (longjmp_breakpoint::~longjmp_breakpoint): ... this.
10180 (strace_marker_create_breakpoints_sal): Remove reference to base
10181 field.
10182 (delete_breakpoint): Don't manually call breakpoint destructor.
10183 (create_tracepoint_from_upload): Remove reference to base field.
10184 (trace_pass_set_count): Likewise.
10185 (initialize_breakpoint_ops): Don't initialize
10186 momentary_breakpoint_ops, don't set dtors.
10187 * ada-lang.c (struct ada_catchpoint): Inherit from breakpoint.
10188 <~ada_catchpoint>: New.
10189 <base>: Remove.
10190 (create_excep_cond_exprs): Remove reference to base field.
10191 (dtor_exception): Change to ...
10192 (ada_catchpoint::~ada_catchpoint): ... this.
10193 (dtor_catch_exception): Remove.
10194 (dtor_catch_exception_unhandled): Remove.
10195 (dtor_catch_assert): Remove.
10196 (create_ada_exception_catchpoint): Remove reference to base
10197 field.
10198 (initialize_ada_catchpoint_ops): Don't set dtors.
10199 * break-catch-sig.c (struct signal_catchpoint): Inherit from
10200 breakpoint.
10201 <~signal_catchpoint>: New.
10202 <base>: Remove.
10203 (signal_catchpoint_dtor): Change to ...
10204 (signal_catchpoint::~signal_catchpoint): ... this.
10205 (create_signal_catchpoint): Remove reference to base field.
10206 (initialize_signal_catchpoint_ops): Don't set dtor.
10207 * break-catch-syscall.c (struct syscall_catchpoint): Inherit
10208 from breakpoint.
10209 <~syscall_catchpoint>: New.
10210 <base>: Remove.
10211 (dtor_catch_syscall): Change to ...
10212 (syscall_catchpoint::~syscall_catchpoint): ... this.
10213 (create_syscall_event_catchpoint): Remove reference to base
10214 field.
10215 (initialize_syscall_catchpoint_ops): Don't set dtor.
10216 * break-catch-throw.c (struct exception_catchpoint): Inherit
10217 from breakpoint.
10218 <~exception_catchpoint>: New.
10219 <base>: Remove.
10220 (dtor_exception_catchpoint): Change to ...
10221 (exception_catchpoint::~exception_catchpoint): ... this.
10222 (handle_gnu_v3_exceptions): Remove reference to base field.
10223 (initialize_throw_catchpoint_ops): Don't set dtor.
10224 * ctf.c (ctf_get_traceframe_address): Remove reference to base
10225 field.
10226 * remote.c (remote_get_tracepoint_status): Likewise.
10227 * tracefile-tfile.c (tfile_get_traceframe_address): Likewise.
10228 * tracefile.c (tracefile_fetch_registers): Likewise.
10229 * tracepoint.c (actions_command): Likewise.
10230 (validate_actionline): Likewise.
10231 (tfind_1): Likewise.
10232 (get_traceframe_location): Likewise.
10233 (find_matching_tracepoint_location): Likewise.
10234 (parse_tracepoint_status): Likewise.
10235 * mi/mi-cmd-break.c (mi_cmd_break_passcount): Likewise.
10236
10237 2017-06-02 Simon Marchi <simon.marchi@polymtl.ca>
10238
10239 * breakpoint.c (struct longjmp_breakpoint): New struct.
10240 (is_tracepoint_type): Change return type to bool.
10241 (is_longjmp_type): New function.
10242 (new_breakpoint_from_type): Handle longjmp kinds of breakpoints.
10243 (set_raw_breakpoint_without_location): Use
10244 new_breakpoint_from_type.
10245 (set_raw_breakpoint): Likewise.
10246
10247 2017-06-02 Simon Marchi <simon.marchi@polymtl.ca>
10248
10249 * breakpoint.c (new_breakpoint_from_type): New function.
10250 (create_breakpoint_sal): Use new_breakpoint_from_type and
10251 unique_ptr.
10252 (create_breakpoint): Likewise.
10253
10254 2017-05-31 Simon Marchi <simon.marchi@ericsson.com>
10255
10256 * memattr.c (mem_info_command): Rename to ...
10257 (info_mem_command): ... this.
10258 (mem_enable_command): Rename to ...
10259 (enable_mem_command): ... this.
10260 (mem_disable_command): Rename to ...
10261 (disable_mem_command): ... this.
10262 (mem_delete_command): Rename to ...
10263 (delete_mem_command): ... this.
10264 (_initialize_mem): Adjust function names.
10265
10266 2017-05-31 Markus Metzger <markus.t.metzger@intel.com>
10267
10268 * btrace.c (handle_pt_insn_events): New.
10269 (ftrace_add_pt): Call handle_pt_insn_events. Rename ERRCODE into
10270 STATUS. Split into this and ...
10271 (handle_pt_insn_event_flags): ... this.
10272
10273 2017-05-31 Markus Metzger <markus.t.metzger@intel.com>
10274
10275 * configure.ac: Check for pt_insn_event, struct pt_insn.enabled,
10276 and struct pt_insn.resynced.
10277 * configure: Regenerated.
10278 * config.in: Regenerated.
10279
10280 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
10281
10282 * btrace.c (ftrace_find_call_by_number): New function.
10283 (ftrace_new_function): Store objects, not pointers.
10284 (ftrace_find_call_by_number, ftrace_new_return, ftrace_new_switch,
10285 ftrace_new_gap, ftrace_update_function,
10286 ftrace_compute_global_level_offset, btrace_stich_bts, btrace_clear,
10287 btrace_insn_get, btrace_insn_get_error, btrace_insn_end,
10288 btrace_insn_next, btrace_insn_prev, ptrace_find_insn_by_number,
10289 btrace_ends_with_single_insn, btrace_call_get): Account for
10290 btrace_thread_info::functions now storing objects.
10291 * btrace.h (struct btrace_thread_info): Add constructor.
10292 (struct btrace_thread_info) <functions>: Make std::vector.
10293 (struct btrace_thread_info) <prev, next, up, insn, errcode, flags):
10294 Initialize with default values.
10295 * record-btrace.c (record_btrace_frame_sniffer): Account for
10296 btrace_thread_info::functions now storing objects.
10297
10298 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
10299
10300 * btrace.c: Remove typedef bfun_s.
10301 (ftrace_new_gap): Directly add gaps to the list of gaps.
10302 (btrace_bridge_gaps, btrace_compute_ftrace_bts, pt_btrace_insn_flags,
10303 ftrace_add_pt, btrace_compute_ftrace_pt, btrace_compute_ftrace_1,
10304 btrace_finalize_ftrace, btrace_compute_ftrace): Use std::vector
10305 instead of gdb VEC.
10306
10307 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
10308
10309 * btrace.c (ftrace_fixup_caller, ftrace_new_return, ftrace_connect_bfun,
10310 ftrace_bridge_gap): Replace references to btrace_thread_info::segment
10311 with btrace_thread_info::next_segment and
10312 btrace_thread_info::prev_segment.
10313 * btrace.h: Remove struct btrace_func_link.
10314 (struct btrace_function): Replace pair of function segment pointers
10315 with pair of indices.
10316 * python/py-record-btrace.c (btpy_call_prev_sibling,
10317 btpy_call_next_sibling): Replace references to
10318 btrace_thread_info::segment with btrace_thread_info::next_segment and
10319 btrace_thread_info::prev_segment.
10320 * record-btrace.c (record_btrace_frame_this_id): Use
10321 btrace_find_call_by_number.
10322
10323 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
10324
10325 * btrace.c (ftrace_new_function, ftrace_fixup_level,
10326 ftrace_connect_bfun, ftrace_bridge_gap, btrace_bridge_gaps,
10327 btrace_insn_next, btrace_insn_prev): Remove references to
10328 btrace_thread_info::flow.
10329 * btrace.h (struct btrace_function): Remove FLOW.
10330
10331 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
10332
10333 * btrace.c (ftrace_find_call_by_number): New function.
10334 (ftrace_update_caller, ftrace_new_call, ftrace_new_tailcall,
10335 ftrace_get_caller, ftrace_find_call, ftrace_new_return,
10336 ftrace_match_backtrace, ftrace_connect_bfun, ftrace_connect_backtrace,
10337 ftrace_bridge_gap, btrace_bridge_gaps): Use btrace_function::up as an
10338 index.
10339 * btrace.h (struct btrace_function): Turn UP into an index.
10340 * python/py-record-btrace.c (btpy_call_up): Use btrace_function::up
10341 as an index.
10342 * record-btrace.c (record_btrace_frame_unwind_stop_reason,
10343 record_btrace_frame_prev_register, record_btrace_frame_sniffer,
10344 record_btrace_tailcall_frame_sniffe): Use btrace_find_call_by_number.
10345
10346 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
10347
10348 * btrace.c (ftrace_new_function, ftrace_new_call, ftrace_new_tailcall,
10349 ftrace_new_return, ftrace_new_switch, ftrace_new_gap,
10350 ftrace_update_function, ftrace_compute_global_level_offset,
10351 btrace_compute_ftrace_bts, ftrace_add_pt, btrace_compute_ftrace_pt,
10352 btrace_stitch_bts, btrace_fetch, btrace_clear, btrace_insn_number,
10353 btrace_insn_end, btrace_is_empty): Remove references to
10354 btrace_thread_info::begin and btrace_thread_info::end.
10355 * btrace.h (struct btrace_thread_info): Remove BEGIN and END.
10356 (struct btrace_thread_info) <functions>: Adjust comment.
10357 * record-btrace.c (record_btrace_start_replaying): Remove reference to
10358 btrace_thread_info::begin.
10359
10360 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
10361
10362 * btrace.c (ftrace_new_function, ftrace_new_call, ftrace_new_tailcall,
10363 ftrace_new_return, ftrace_new_switch, ftrace_new_gap,
10364 ftrace_update_function): Remove arguments that implicitly were always
10365 BTINFO->END.
10366 (btrace_compute_ftrace_bts, ftrace_add_pt, btrace_compute_ftrace_pt):
10367 Don't pass BTINFO->END.
10368
10369 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
10370
10371 * btrace.c: (btrace_insn_get, btrace_insn_get_error, btrace_insn_number,
10372 btrace_insn_begin, btrace_insn_end, btrace_insn_next, btrace_insn_prev,
10373 btrace_find_insn_by_number): Replace function segment pointer with
10374 index.
10375 (btrace_insn_cmp): Simplify.
10376 * btrace.h: (struct btrace_insn_iterator) Rename index to
10377 insn_index. Replace function segment pointer with index into function
10378 segment vector.
10379 * record-btrace.c (record_btrace_call_history): Replace function
10380 segment pointer use with index.
10381 (record_btrace_frame_sniffer): Retrieve function call segment through
10382 vector.
10383 (record_btrace_set_replay): Remove defunc't safety check.
10384
10385 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
10386
10387 * btrace.c (btrace_ends_with_single_insn): New function.
10388 (btrace_call_get, btrace_call_number, btrace_call_begin,
10389 btrace_call_end, btrace_call_next, btrace_call_prev,
10390 btrace_find_call_by_number): Use index into call segment vector
10391 instead of pointer.
10392 (btrace_call_cmp): Simplify.
10393 * btrace.h (struct btrace_call_iterator): Replace function call segment
10394 pointer with index into vector.
10395 * record-btrace.c (record_btrace_call_history): Use index instead of
10396 pointer.
10397
10398 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
10399
10400 * btrace.c (btrace_insn_begin, btrace_insn_end,
10401 btrace_find_insn_by_number): Add btinfo to iterator.
10402 * btrace.h (struct btrace_insn_iterator): Add btinfo.
10403
10404 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
10405
10406 * btrace.c (ftrace_new_function): Add btrace_thread_info to arguments
10407 and save pointers directly.
10408 (ftrace_new_call, ftrace_new_tailcall, ftrace_new_return,
10409 ftrace_new_switch, ftrace_new_gap, ftrace_update_function,
10410 ftrace_add_pt): Add btrace_thread_info to arguments. Adjust for
10411 changed signature of functions.
10412 (btrace_compute_ftrace_pt): Adjust for changed signature of functions.
10413 (btrace_fetch): Remove code that adds btrace_function pointers to
10414 vector of btrace_functions.
10415 (btrace_clear): Simplify freeing vector of btrace_functions.
10416
10417 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
10418
10419 * btrace.c (btrace_fetch, btrace_clear, btrace_find_insn_by_number):
10420 Replace VEC_* with std::vector functions.
10421 * btrace.h: Add include: vector. Remove typedef for DEF_VEC_P.
10422 (struct btrace_thread_info)<functions>: Change type to std::vector.
10423
10424 2017-05-30 Simon Marchi <simon.marchi@ericsson.com>
10425
10426 * NEWS (Changes in GDB 8.0): Remove extra empty line. Move
10427 "Removed targets and native configurations" up. Merge duplicate
10428 "New commands" sub-sections. Add "New options" sub-sections.
10429
10430 2017-05-26 Alan Hayward <alan.hayward@arm.com>
10431
10432 * defs.h (copy_integer_to_size): New declaration.
10433 * findvar.c (copy_integer_to_size): New function.
10434 (do_cint_test): New selftest function.
10435 (copy_integer_to_size_test): Likewise.
10436 (_initialize_findvar): Likewise.
10437 * mips-fbsd-tdep.c (mips_fbsd_supply_reg): Use raw_supply_integer.
10438 (mips_fbsd_collect_reg): Use raw_collect_integer.
10439 * mips-linux-tdep.c (supply_32bit_reg): Use raw_supply_integer.
10440 (mips64_fill_gregset): Use raw_collect_integer
10441 (mips64_fill_fpregset): Use raw_supply_integer.
10442 * regcache.c (regcache::raw_supply_integer): New function.
10443 (regcache::raw_collect_integer): Likewise.
10444 * regcache.h: (regcache::raw_supply_integer): New declaration.
10445 (regcache::raw_collect_integer): Likewise.
10446
10447 2017-05-24 Yao Qi <yao.qi@linaro.org>
10448
10449 * Makefile.in (SFILES): Add gdbarch-selftests.c.
10450 (COMMON_OBS): Add gdbarch-selftests.o.
10451 * frame.c [GDB_SELF_TESTS] (create_new_frame): New function.
10452 * frame.h [GDB_SELF_TESTS] (create_new_frame): Declare.
10453 * gdbarch-selftests.c: New file.
10454 * regcache.h (regcache) <~regcache>: Mark it virtual if
10455 GDB_SELF_TEST.
10456 <raw_write>: Likewise.
10457
10458 2017-05-24 Yao Qi <yao.qi@linaro.org>
10459
10460 * regcache.c (current_regcache): Change it to
10461 regcache::current_regcache.
10462 (regcache_observer_target_changed): Update.
10463 (regcache_thread_ptid_changed): Make it a regcache static
10464 method.
10465 (regcache_thread_ptid_changed): Update.
10466 (class regcache_access): New.
10467 (current_regcache_test): Update.
10468 (_initialize_regcache): Update.
10469 * regcache.h: Include forward_list.
10470 (regcache): Declare regcache_thread_ptid_changed and declare
10471 registers_changed_ptid as friend.
10472
10473 2017-05-24 Yao Qi <yao.qi@linaro.org>
10474
10475 * i387-tdep.c (i387_register_to_value): Use register_size
10476 instead of TYPE_LENGTH.
10477 * m68k-tdep.c (m68k_register_to_value): Likewise.
10478
10479 2017-05-24 Yao Qi <yao.qi@linaro.org>
10480
10481 * i387-tdep.c (i387_convert_register_p): Return false if type
10482 code isn't TYPE_CODE_FLT.
10483
10484 2017-05-24 Yao Qi <yao.qi@linaro.org>
10485
10486 * alpha-tdep.c (alpha_convert_register_p): Return true if type
10487 length is 4.
10488 (alpha_register_to_value): Remove type length check.
10489 (alpha_value_to_register): Likewise.
10490
10491 2017-05-24 Yao Qi <yao.qi@linaro.org>
10492
10493 * ia64-tdep.c (ia64_convert_register_p): Check type's code is
10494 TYPE_CODE_FLT.
10495
10496 2017-05-24 Yao Qi <yao.qi@linaro.org>
10497
10498 * m68k-tdep.c (m68k_convert_register_p): Check type's code is
10499 TYPE_CODE_FLT or not.
10500
10501 2017-05-24 Yao Qi <yao.qi@linaro.org>
10502
10503 * alpha-tdep.c (alpha_gdbarch_init): Use XCNEW instead of XNEW.
10504 * avr-tdep.c (avr_gdbarch_init): Likewise.
10505 * bfin-tdep.c (bfin_gdbarch_init): Likewise.
10506 * cris-tdep.c (cris_gdbarch_init): Likewise.
10507 * ft32-tdep.c (ft32_gdbarch_init): Likewise.
10508 * lm32-tdep.c (lm32_gdbarch_init): Likewise.
10509 * m32r-tdep.c (m32r_gdbarch_init): Likewise.
10510 * m68hc11-tdep.c (m68hc11_gdbarch_init): Likewise.
10511 * mep-tdep.c (mep_gdbarch_init): Likewise.
10512 * microblaze-tdep.c (microblaze_gdbarch_init): Likewise.
10513 * mips-tdep.c (mips_gdbarch_init): Likewise.
10514 * mn10300-tdep.c (mn10300_gdbarch_init): Likewise.
10515 * moxie-tdep.c (moxie_gdbarch_init): Likewise.
10516 * msp430-tdep.c (msp430_gdbarch_init): Likewise.
10517 * sh64-tdep.c (sh64_gdbarch_init): Likewise.
10518 * v850-tdep.c (v850_gdbarch_init): Likewise.
10519
10520 2017-05-24 Yao Qi <yao.qi@linaro.org>
10521
10522 * selftest-arch.c (tests_with_arch): Call registers_changed
10523 and reinit_frame_cache.
10524 * selftest.c (run_self_tests): Likewise.
10525
10526 2017-05-24 Yao Qi <yao.qi@linaro.org>
10527
10528 * rs6000-tdep.c (gdb_print_insn_powerpc): Remove.
10529 (rs6000_gdbarch_init): Don't call set_gdbarch_print_insn.
10530
10531 2017-05-24 Yao Qi <yao.qi@linaro.org>
10532
10533 * rl78-tdep.c (rl78_gdbarch_init): Don't call
10534 set_gdbarch_print_insn.
10535
10536 2017-05-24 Yao Qi <yao.qi@linaro.org>
10537
10538 * h8300-tdep.c (h8300_gdbarch_init): Don't call
10539 set_gdbarch_print_insn.
10540
10541 2017-05-24 Yao Qi <yao.qi@linaro.org>
10542
10543 * alpha-tdep.c (alpha_gdbarch_init): Don't call
10544 set_gdbarch_print_insn.
10545 * arc-tdep.c (arc_gdbarch_init): Likewise.
10546 * arch-utils.c: include dis-asm.h.
10547 (default_print_insn): New function.
10548 * arch-utils.h (default_print_insn): Declare.
10549 * avr-tdep.c (avr_gdbarch_init): Don't call set_gdbarch_print_insn.
10550 * bfin-tdep.c (bfin_gdbarch_init): Likewise.
10551 * cris-tdep.c (cris_delayed_get_disassembler): Remove.
10552 (cris_gdbarch_init): Don't call set_gdbarch_print_insn.
10553 * frv-tdep.c (frv_gdbarch_init): Likewise.
10554 * ft32-tdep.c (ft32_gdbarch_init): Likewise.
10555 * gdbarch.sh (print_insn): Use default_print_insn.
10556 * gdbarch.c: Regenerated.
10557 * hppa-tdep.c (hppa_gdbarch_init): Likewise.
10558 * iq2000-tdep.c (iq2000_gdbarch_init): Likewise.
10559 * lm32-tdep.c (lm32_gdbarch_init): Likewise.
10560 * m32c-tdep.c (m32c_gdbarch_init): Likewise.
10561 * m32r-tdep.c (m32r_gdbarch_init): Likewise.
10562 * m68hc11-tdep.c (gdb_print_insn_m68hc11): Remove.
10563 (m68hc11_gdbarch_init): Don't call set_gdbarch_print_insn.
10564 * m68k-tdep.c (m68k_gdbarch_init): Likewise.
10565 * m88k-tdep.c (m88k_gdbarch_init): Likewise.
10566 * microblaze-tdep.c (microblaze_gdbarch_init): Likewise.
10567 * mn10300-tdep.c (mn10300_gdbarch_init): Likewise.
10568 * moxie-tdep.c (moxie_gdbarch_init): Likewise.
10569 * msp430-tdep.c (msp430_gdbarch_init): Likewise.
10570 * mt-tdep.c (mt_gdbarch_init): Likewise.
10571 * nds32-tdep.c (nds32_gdbarch_init): Likewise.
10572 * nios2-tdep.c (nios2_print_insn): Remove.
10573 (nios2_gdbarch_init): Don't call set_gdbarch_print_insn.
10574 * rx-tdep.c (rx_gdbarch_init): Likewise.
10575 * s390-linux-tdep.c (s390_gdbarch_init): Likewise.
10576 * score-tdep.c (score_print_insn): Remove.
10577 (score_gdbarch_init): Don't call set_gdbarch_print_insn.
10578 * sh-tdep.c (sh_gdbarch_init): Likewise.
10579 * sh64-tdep.c (sh64_gdbarch_init): Likewise.
10580 * sparc-tdep.c (sparc32_gdbarch_init): Likewise.
10581 * tic6x-tdep.c (tic6x_print_insn): Remove.
10582 (tic6x_gdbarch_init): Don't call set_gdbarch_print_insn.
10583 * tilegx-tdep.c (tilegx_gdbarch_init): Likewise.
10584 * v850-tdep.c (v850_gdbarch_init): Likewise.
10585 * vax-tdep.c (vax_gdbarch_init): Likewise.
10586 * xstormy16-tdep.c (xstormy16_gdbarch_init): Likewise.
10587 * xtensa-tdep.c (xtensa_gdbarch_init): Likewise.
10588
10589 2017-05-23 John Baldwin <jhb@FreeBSD.org>
10590
10591 * mips-fbsd-tdep.c (MIPS_PC_REGNUM): Remove.
10592 (MIPS_FP0_REGNUM): Remove.
10593 (MIPS_FSR_REGNUM): Remove.
10594 (mips_fbsd_supply_fpregs): Use mips_regnum.
10595 (mips_fbsd_supply_gregs): Likewise.
10596 (mips_fbsd_collect_fpregs): Likewise.
10597 (mips_fbsd_collect_gregs): Likewise.
10598
10599 2017-05-23 John Baldwin <jhb@FreeBSD.org>
10600
10601 * mips-fbsd-nat.c (getregs_supplies): Fix upper bound comparison.
10602 (getpfpregs_supplies): New function.
10603 (mips_fbsd_fetch_inferior_registers): Remove early exit and use
10604 getfpregs_supplies.
10605 (mips_fbsd_store_inferior_registers): Likewise.
10606
10607 2017-05-22 Pedro Alves <palves@redhat.com>
10608
10609 * MAINTAINERS (Host/Native): Add John Baldwin as FreeBSD
10610 maintainer.
10611
10612 2017-05-22 Alan Hayward <alan.hayward@arm.com>
10613
10614 * ppc-linux-nat.c (fetch_register): Use PPC_MAX_REGISTER_SIZE.
10615 (store_register): Likewise.
10616 * ppc-sysv-tdep.c (ppc_sysv_abi_push_dummy_call): Likewise.
10617 (get_decimal_float_return_value): Likewise.
10618 (do_ppc_sysv_return_value): Likewise.
10619 (ppc64_sysv_abi_push_integer): Likewise.
10620 (ppc64_sysv_abi_push_freg): Likewise.
10621 (ppc64_sysv_abi_return_value_base): Likewise.
10622 (ppc64_sysv_abi_return_value): Likewise.
10623 * rs6000-aix-tdep.c (rs6000_push_dummy_call): Likewise.
10624 * rs6000-lynx178-tdep.c (rs6000_lynx178_push_dummy_call): Likewise.
10625 * rs6000-nat.c: Likewise.
10626 * rs6000-tdep.c (rs6000_register_to_value): Likewise.
10627 (rs6000_value_to_register): Likewise.
10628 * ppc-tdep.h (PPC_MAX_REGISTER_SIZE): Add.
10629
10630 2017-05-21 Tom Tromey <tom@tromey.com>
10631
10632 PR rust/21466:
10633 * rust-lang.c (rust_print_type) <TYPE_CODE_ARRAY>: Print unsized
10634 arrays as "[T]", not "[T; ]".
10635
10636 2017-05-19 Tom Tromey <tom@tromey.com>
10637
10638 PR rust/21484:
10639 * rust-lang.c (exp_descriptor_rust): New function.
10640 (rust_language_defn): Use it.
10641 * p-lang.c (pascal_language_defn): Update.
10642 * opencl-lang.c (opencl_language_defn): Update.
10643 * objc-lang.c (objc_language_defn): Update.
10644 * m2-lang.c (m2_language_defn): Update.
10645 * language.h (struct language_defn)
10646 <la_watch_location_expression>: New member.
10647 * language.c (unknown_language_defn, auto_language_defn)
10648 (local_language_defn): Update.
10649 * go-lang.c (go_language_defn): Update.
10650 * f-lang.c (f_language_defn): Update.
10651 * d-lang.c (d_language_defn): Update.
10652 * c-lang.h (c_watch_location_expression): Declare.
10653 * c-lang.c (c_watch_location_expression): New function.
10654 (c_language_defn, cplus_language_defn, asm_language_defn)
10655 (minimal_language_defn): Use it.
10656 * breakpoint.c (watch_command_1): Call
10657 la_watch_location_expression.
10658 * ada-lang.c (ada_language_defn): Update.
10659
10660 2017-05-19 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
10661
10662 PR tui/21482
10663 * gdb_curses.h (NOMACROS): Define.
10664 (NCURSES_NOMACROS): Define.
10665
10666 2017-05-19 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
10667
10668 PR tui/21482
10669 * tui/tui-windata.c (tui_erase_data_content): Cast last mvwaddstr
10670 arg to char *.
10671 * tui/tui-wingeneral.c (box_win): Likewise.
10672 * tui/tui-winsource.c (tui_erase_source_content): Likewise.
10673 (tui_show_source_line): Likewise.
10674 (tui_show_exec_info_content): Likewise.
10675
10676 2017-05-19 Vladimir Mezentsev <vladimir.mezentsev@oracle.com>
10677
10678 * sparc-tdep.c (sparc_structure_return_p)
10679 (sparc_arg_on_registers_p): New functions.
10680 (sparc32_store_arguments): Use them.
10681 * sparc64-tdep.c (sparc64_16_byte_align_p)
10682 (sparc64_store_floating_fields, sparc64_extract_floating_fields):
10683 Handle TYPE_CODE_ARRAY.
10684
10685 2017-05-17 Yao Qi <yao.qi@linaro.org>
10686
10687 * cli/cli-decode.c (add_alias_cmd): New function.
10688 * command.h (add_alias_cmd): Declare.
10689 * infcmd.c (_initialize_infcmd): Don't call add_com_alias,
10690 instead call add_alias_cmd.
10691
10692 2017-05-17 Pedro Alves <palves@redhat.com>
10693
10694 * Makefile.in (nat_extra_makefile_frag): Rename to ...
10695 (nat_makefile_frag): ... this. All references updated.
10696 * configure.ac: Likewise.
10697 * configure.nat: Likewise. Enhance comments.
10698 * configure: Regenerate.
10699
10700 2017-05-15 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
10701
10702 * procfs.c (procfs_create_inferior): Change prototype to match
10703 definition.
10704
10705 2017-05-13 Eli Zaretskii <eliz@gnu.org>
10706
10707 * tui/tui.c (tui_enable): Cast "unknown" to 'char *' to avoid a
10708 C++ compiler warning.
10709
10710 2017-05-12 Tom Tromey <tom@tromey.com>
10711
10712 PR rust/21483:
10713 * rust-lang.c (rust_evaluate_subexp) <STRUCTOP_STRUCT>: Don't
10714 recurse, just call value_struct_elt directly.
10715
10716 2017-05-12 Tom Tromey <tom@tromey.com>
10717
10718 * rust-lang.c (rust_dump_subexp_body) <STRUCTOP_ANONYMOUS,
10719 OP_RUST_ARRAY>: Fix.
10720
10721 2017-05-12 Tom Tromey <tom@tromey.com>
10722
10723 * rust-lang.c (rust_print_subexp): Replace "return" with "break".
10724
10725 2017-05-09 Yao Qi <yao.qi@linaro.org>
10726
10727 * regcache.c: Include <forward_list>.
10728 (struct regcache_list): Remove.
10729 (current_regcache): Update.
10730 (get_thread_arch_aspace_regcache): Update for std::forward_list.
10731 (regcache_thread_ptid_changed): Likewise.
10732 (registers_changed_ptid): Likewise.
10733 (current_regcache_size): Likewise.
10734
10735 2017-05-09 Yao Qi <yao.qi@linaro.org>
10736
10737 * regcache.c [GDB_SELF_TEST]: Include selftest.h.
10738 (current_regcache_size): New function.
10739 (current_regcache_test): New function.
10740 (_initialize_regcache) [GDB_SELF_TEST]: Register the unit test.
10741
10742 2017-05-08 Alan Hayward <alan.hayward@arm.com>
10743
10744 * mips-tdep.c (mips_o32_return_value): Remove unused buffer.
10745 (print_gp_register_row): Use get_frame_register_value.
10746
10747 2017-05-08 Alan Hayward <alan.hayward@arm.com>
10748
10749 * mips-linux-tdep.c (mips_supply_gregset): Use raw_supply_zeroed.
10750 (mips_supply_fpregset): Likewise.
10751 (mips64_supply_gregset): Likewise.
10752
10753 2017-05-08 Alan Hayward <alan.hayward@arm.com>
10754
10755 * mn10300-linux-tdep.c (am33_supply_gregset_method): Use
10756 regcache->raw_supply_zeroed.
10757
10758 2017-05-06 Sergio Durigan Junior <sergiodj@redhat.com>
10759
10760 * configure.nat: Rearrange 'case' statements to match
10761 host before cpu.
10762
10763 2017-05-06 Sergio Durigan Junior <sergiodj@redhat.com>
10764
10765 * Makefile.in: Remove "@host_makefile_frag@". Add variables
10766 NAT_FILE, NATDEPFILES, NAT_CDEPS, LOADLIBES, MH_CFLAGS, XM_CLIBS,
10767 NAT_GENERATED_FILES, HAVE_NATIVE_GCORE_HOST. Add
10768 "@nat_extra_makefile_frag@".
10769 (Makefile): Remove dependency on "@frags@".
10770 ($(GNULIB_BUILDDIR)/Makefile): Likewise.
10771 (data-directory/Makefile): Likewise.
10772 * config/aarch64/linux.mh: Deleted; moved contents to
10773 "gdb/configure.nat".
10774 * config/alpha/alpha-linux.mh: Likewise.
10775 * config/alpha/nbsd.mh: Likewise.
10776 * config/arm/linux.mh: Likewise.
10777 * config/arm/nbsdelf.mh: Likewise.
10778 * config/i386/cygwin.mh: Likewise.
10779 * config/i386/cygwin64.mh: Likewise.
10780 * config/i386/darwin.mh: Likewise.
10781 * config/i386/fbsd.mh: Likewise.
10782 * config/i386/fbsd64.mh: Likewise.
10783 * config/i386/go32.mh: Likewise.
10784 * config/i386/i386gnu.mh: Likewise.
10785 * config/i386/i386sol2.mh: Likewise.
10786 * config/i386/linux.mh: Likewise.
10787 * config/i386/linux64.mh: Likewise.
10788 * config/i386/mingw.mh: Likewise.
10789 * config/i386/mingw64.mh: Likewise.
10790 * config/i386/nbsd64.mh: Likewise.
10791 * config/i386/nbsdelf.mh: Likewise.
10792 * config/i386/nto.mh: Likewise.
10793 * config/i386/obsd.mh: Likewise.
10794 * config/i386/obsd64.mh: Likewise.
10795 * config/i386/sol2-64.mh: Likewise.
10796 * config/ia64/linux.mh: Likewise.
10797 * config/m32r/linux.mh: Likewise.
10798 * config/m68k/linux.mh: Likewise.
10799 * config/m68k/nbsdelf.mh: Likewise.
10800 * config/m68k/obsd.mh: Likewise.
10801 * config/m88k/obsd.mh: Likewise.
10802 * config/mips/fbsd.mh: Likewise.
10803 * config/mips/linux.mh: Likewise.
10804 * config/mips/nbsd.mh: Likewise.
10805 * config/mips/obsd64.mh: Likewise.
10806 * config/pa/linux.mh: Likewise.
10807 * config/pa/nbsd.mh: Likewise.
10808 * config/pa/obsd.mh: Likewise.
10809 * config/powerpc/aix.mh: Likewise.
10810 * config/powerpc/fbsd.mh: Likewise.
10811 * config/powerpc/linux.mh: Likewise.
10812 * config/powerpc/nbsd.mh: Likewise.
10813 * config/powerpc/obsd.mh: Likewise.
10814 * config/powerpc/ppc64-linux.mh: Likewise.
10815 * config/powerpc/spu-linux.mh: Likewise.
10816 * config/s390/linux.mh: Likewise.
10817 * config/sh/nbsd.mh: Likewise.
10818 * config/sparc/fbsd.mh: Likewise.
10819 * config/sparc/linux.mh: Likewise.
10820 * config/sparc/linux64.mh: Likewise.
10821 * config/sparc/nbsd64.mh: Likewise.
10822 * config/sparc/nbsdelf.mh: Likewise.
10823 * config/sparc/obsd64.mh: Likewise.
10824 * config/sparc/sol2.mh: Likewise.
10825 * config/tilegx/linux.mh: Likewise.
10826 * config/vax/nbsdelf.mh: Likewise.
10827 * config/vax/obsd.mh: Likewise.
10828 * config/xtensa/linux.mh: Likewise.
10829 * config/i386/i386gnu.mn: New file, with excerpts from
10830 "config/i386/i386gnu.mh".
10831 * configure: Regenerate.
10832 * configure.ac: Rewrite code to use "gdb/configure.nat" instead of
10833 *.mh files under "gdb/config".
10834 * configure.nat: New file, with contents from the
10835 "gdb/config/*/*.mh" files.
10836
10837 2017-05-05 Tim Wiederhake <tim.wiederhake@intel.com>
10838
10839 * btrace.c (btrace_clear): Free insn vector.
10840
10841 2017-05-05 Pedro Alves <palves@redhat.com>
10842
10843 * warning.m4 (build_warnings): Add -Wno-error=maybe-uninitialized.
10844 * configure: Regenerate.
10845
10846 2017-05-04 Pedro Alves <palves@redhat.com>
10847
10848 * Makefile.in (SFILES): Add progspace-and-thread.c.
10849 (HFILES_NO_SRCDIR): Add progspace-and-thread.h.
10850 (COMMON_OBS): Add progspace-and-thread.o.
10851 * breakpoint.c: Include "progspace-and-thread.h".
10852 (update_inserted_breakpoint_locations)
10853 (insert_breakpoint_locations, create_longjmp_master_breakpoint):
10854 Use scoped_restore_current_pspace_and_thread.
10855 (create_std_terminate_master_breakpoint): Use
10856 scoped_restore_current_program_space.
10857 (remove_breakpoint): Use scoped_restore_current_pspace_and_thread.
10858 (print_breakpoint_location): Use
10859 scoped_restore_current_program_space.
10860 (bp_loc_is_permanent): Use
10861 scoped_restore_current_pspace_and_thread.
10862 (resolve_sal_pc): Use scoped_restore_current_pspace_and_thread.
10863 (download_tracepoint_locations): Use
10864 scoped_restore_current_pspace_and_thread.
10865 (breakpoint_re_set): Use scoped_restore_current_pspace_and_thread.
10866 * exec.c (exec_close_1): Use scoped_restore_current_program_space.
10867 (enum step_over_calls_kind): Moved from inferior.h.
10868 (class scoped_restore_current_thread): New class.
10869 * gdbthread.h (make_cleanup_restore_current_thread): Delete
10870 declaration.
10871 (scoped_restore_current_thread): New class.
10872 * infcmd.c: Include "common/gdb_optional.h".
10873 (continue_1, proceed_after_attach): Use
10874 scoped_restore_current_thread.
10875 (notice_new_inferior): Use scoped_restore_current_thread.
10876 * inferior.c: Include "progspace-and-thread.h".
10877 (restore_inferior, save_current_inferior): Delete.
10878 (add_inferior_command, clone_inferior_command): Use
10879 scoped_restore_current_pspace_and_thread.
10880 * inferior.h (scoped_restore_current_inferior): New class.
10881 * infrun.c: Include "progspace-and-thread.h" and
10882 "common/gdb_optional.h".
10883 (follow_fork_inferior): Use
10884 scoped_restore_current_pspace_and_thread.
10885 (scoped_restore_exited_inferior): New class.
10886 (handle_vfork_child_exec_or_exit): Use
10887 scoped_restore_exited_inferior,
10888 scoped_restore_current_pspace_and_thread,
10889 scoped_restore_current_thread and scoped_restore.
10890 (fetch_inferior_event): Use scoped_restore_current_thread.
10891 * linespec.c (decode_line_full, decode_line_1): Use
10892 scoped_restore_current_program_space.
10893 * mi/mi-main.c: Include "progspace-and-thread.h".
10894 (exec_continue): Use scoped_restore_current_thread.
10895 (mi_cmd_exec_run): Use scoped_restore_current_pspace_and_thread.
10896 (mi_cmd_trace_frame_collected): Use scoped_restore_current_thread.
10897 * proc-service.c (ps_pglobal_lookup): Use
10898 scoped_restore_current_program_space.
10899 * progspace-and-thread.c: New file.
10900 * progspace-and-thread.h: New file.
10901 * progspace.c (release_program_space, clone_program_space): Use
10902 scoped_restore_current_program_space.
10903 (restore_program_space, save_current_program_space)
10904 (save_current_space_and_thread): Delete.
10905 (switch_to_program_space_and_thread): Moved to
10906 progspace-and-thread.c.
10907 * progspace.h (save_current_program_space)
10908 (save_current_space_and_thread): Delete declarations.
10909 (scoped_restore_current_program_space): New class.
10910 * remote.c (remote_btrace_maybe_reopen): Use
10911 scoped_restore_current_thread.
10912 * symtab.c: Include "progspace-and-thread.h".
10913 (skip_prologue_sal): Use scoped_restore_current_pspace_and_thread.
10914 * thread.c (print_thread_info_1): Use
10915 scoped_restore_current_thread.
10916 (struct current_thread_cleanup): Delete.
10917 (do_restore_current_thread_cleanup)
10918 (restore_current_thread_cleanup_dtor): Rename/convert both to ...
10919 (scoped_restore_current_thread::~scoped_restore_current_thread):
10920 ... this new dtor.
10921 (make_cleanup_restore_current_thread): Rename/convert to ...
10922 (scoped_restore_current_thread::scoped_restore_current_thread):
10923 ... this new ctor.
10924 (thread_apply_all_command): Use scoped_restore_current_thread.
10925 (thread_apply_command): Use scoped_restore_current_thread.
10926 * tracepoint.c (tdump_command): Use scoped_restore_current_thread.
10927 * varobj.c (value_of_root_1): Use scoped_restore_current_thread.
10928
10929 2017-05-04 Pedro Alves <palves@redhat.com>
10930
10931 * thread.c (make_cleanup_restore_current_thread): Move
10932 find_thread_ptid call before the is_stopped call. Assert that the
10933 thread is found. Replace is_stopped call by checking the thread's
10934 state directly. Remove unnecessary NULL-thread check.
10935
10936 2017-05-04 Pedro Alves <palves@redhat.com>
10937
10938 * corelow.c (thread_section_name): New class.
10939 (get_core_register_section, get_core_siginfo): Use it.
10940
10941 2017-05-04 Andreas Arnez <arnez@linux.vnet.ibm.com>
10942
10943 * corelow.c (sniff_core_bfd): Remove extra semicolon.
10944 (get_core_register_section): Remove xfree of NULL pointer.
10945
10946 2017-05-03 Alan Hayward <alan.hayward@arm.com>
10947
10948 * frv-linux-tdep.c (frv_linux_supply_gregset): Use raw_supply_zeroed.
10949 * regcache.c (regcache::raw_supply_zeroed): New function.
10950 * regcache.h (regcache::raw_supply_zeroed): New declaration.
10951
10952 2017-05-03 Simon Marchi <simon.marchi@ericsson.com>
10953
10954 * gdbarch.sh: Remove commented out definition of
10955 TARGET_CHAR_BIT.
10956 * gdbarch.h: Re-generate.
10957
10958 2017-05-03 Sergio Durigan Junior <sergiodj@redhat.com>
10959
10960 * configure: Regenerate.
10961
10962 2017-05-02 Simon Marchi <simon.marchi@ericsson.com>
10963
10964 * solib-target.c (solib_target_relocate_section_addresses):
10965 Remove num_section_bases, num_bases, segment_bases variables.
10966
10967 2017-05-02 Simon Marchi <simon.marchi@polymtl.ca>
10968
10969 * common/gdb_vecs.h (DEF_VEC_I (CORE_ADDR)): Remove.
10970
10971 2017-05-02 Simon Marchi <simon.marchi@polymtl.ca>
10972
10973 * solib-target.c: Include <vector>
10974 (struct lm_info_target) <~lm_info_target>: Remove.
10975 <segment_bases, section_bases>: Change type to
10976 std::vector<CORE_ADDR>.
10977 (library_list_start_segment, library_list_start_section,
10978 library_list_end_library,
10979 solib_target_relocate_section_addresses): Adjust.
10980
10981 2017-05-02 Simon Marchi <simon.marchi@polymtl.ca>
10982
10983 * gdbarch.sh (software_single_step): Change return type to
10984 std::vector<CORE_ADDR>.
10985 * gdbarch.c, gdbarch.h: Re-generate.
10986 * arch/arm-get-next-pcs.c (thumb_deal_with_atomic_sequence_raw):
10987 Adjust.
10988 (arm_deal_with_atomic_sequence_raw): Adjust.
10989 (thumb_get_next_pcs_raw): Adjust.
10990 (arm_get_next_pcs_raw): Adjust.
10991 (arm_get_next_pcs): Adjust.
10992 * arch/arm-get-next-pcs.h (arm_get_next_pcs): Adjust.
10993 * aarch64-tdep.c (aarch64_software_single_step): Adjust.
10994 * alpha-tdep.c (alpha_deal_with_atomic_sequence): Adjust.
10995 (alpha_software_single_step): Adjust.
10996 * alpha-tdep.h (alpha_software_single_step): Adjust.
10997 * arm-linux-tdep.c (arm_linux_software_single_step): Adjust.
10998 * arm-tdep.c (arm_software_single_step): Adjust.
10999 (arm_breakpoint_kind_from_current_state): Adjust.
11000 * arm-tdep.h (arm_software_single_step): Adjust.
11001 * breakpoint.c (insert_single_step_breakpoint): Adjust.
11002 * cris-tdep.c (cris_software_single_step): Adjust.
11003 * mips-tdep.c (mips_deal_with_atomic_sequence): Adjust.
11004 (micromips_deal_with_atomic_sequence): Adjust.
11005 (deal_with_atomic_sequence): Adjust.
11006 (mips_software_single_step): Adjust.
11007 * mips-tdep.h (mips_software_single_step): Adjust.
11008 * moxie-tdep.c (moxie_software_single_step): Adjust.
11009 * nios2-tdep.c (nios2_software_single_step): Adjust.
11010 * ppc-tdep.h (ppc_deal_with_atomic_sequence): Adjust.
11011 * rs6000-aix-tdep.c (rs6000_software_single_step): Adjust.
11012 * rs6000-tdep.c (ppc_deal_with_atomic_sequence): Adjust.
11013 * s390-linux-tdep.c (s390_software_single_step): Adjust.
11014 * sparc-tdep.c (sparc_software_single_step): Adjust.
11015 * spu-tdep.c (spu_software_single_step): Adjust.
11016 * tic6x-tdep.c (tic6x_software_single_step): Adjust.
11017
11018 2017-05-02 Simon Marchi <simon.marchi@polymtl.ca>
11019
11020 * gdbarch.sh: Use semi-colon as field separator instead of colon.
11021 * gdbarch.h: Re-generate.
11022
11023 2017-05-01 Tim Wiederhake <tim.wiederhake@intel.com>
11024
11025 * Makefile.in (SUBDIR_PYTHON_OBS): Add py-instruction.o.
11026 (SUBDIR_PYTHON_SRCS): Add py-instruction.c.
11027 * python/py-instruction.c, python/py-instruction.h: New file.
11028 * python/py-record.c: Add py-instruction.h include.
11029 (gdbpy_initialize_record): Make gdb.Instruction a super class of
11030 gdb.RecordInstruction.
11031 * python/python-internal.h: Add gdbpy_initialize_instruction
11032 declaration.
11033 * python/python.c (do_start_initialization): Add
11034 gdbpy_initialize_instruction.
11035
11036 2017-05-01 Tim Wiederhake <tim.wiederhake@intel.com>
11037
11038 * python/py-record-btrace.c (BTPY_REQUIRE_VALID_CALL, btpy_call_type):
11039 Remove.
11040 (btrace_func_from_recpy_func): New function.
11041 (btpy_call_new, btpy_number, btpy_hash, btpy_richcompare): Remove.
11042 (btpy_call_level, btpy_call_symbol, btpy_call_instructions,
11043 btpy_call_up, btpy_call_prev_sibling, btpy_call_next_sibling): Rename to ...
11044 (recpy_bt_func_level, recpy_bt_func_symbol, recpy_bt_func_instructions,
11045 recpy_bt_func_up, recpy_bt_func_prev, recpy_bt_func_next): This.
11046 Also, use new helper functions.
11047 (btpy_list_item): Use new helper functions.
11048 (recpy_bt_function_call_history): Use new type name.
11049 (btpy_call_getset): Remove.
11050 (gdbpy_initialize_btrace): Remove code to initialize
11051 gdb.BtraceFunctionCall.
11052 * python/py-record-btrace.h (recpy_bt_func_number, recpy_btb_func_level,
11053 recpy_btb_func_symbol, recpy_bt_func_instructions, recpy_bt_func_up,
11054 recpy_bt_func_prev, recpy_bt_func_next): New export.
11055 * python/py-record.c (recpy_func_type): New static object.
11056 (recpy_func_new, recpy_func_level, recpy_func_symbol,
11057 recpy_func_instructions, recpy_func_up, recpy_func_prev,
11058 recpy_func_next): New function.
11059 (recpy_element_hash, recpy_element_richcompare): Updated comment.
11060 (recpy_func_getset): New static object.
11061 (gdbpy_initialize_record): Add code to initialize gdb.RecordInstruction.
11062 * python/py-record.h (recpy_func_type, recpy_func_new): New export.
11063
11064 2017-05-01 Tim Wiederhake <tim.wiederhake@intel.com>
11065
11066 * python/py-record-btrace.c (BTPY_REQUIRE_VALID_INSN): Remove.
11067 (btpy_object, btpy_insn_type, btpy_new): Remove.
11068 (btpy_list_object): Use gdb.RecordInstruction type instead of
11069 gdb.BtraceInstruction type.
11070 (btrace_insn_from_recpy_insn): New function.
11071 (btpy_insn_or_gap_new): Adjust comment. Use recpy_insn_new instead of
11072 btpy_new.
11073 (btpy_call_new, btpy_list_item): Do not use btpy_new anymore.
11074 (btpy_number, btpy_hash, btpy_call_level, btpy_call_symbol,
11075 btpy_call_instructions, btpy_call_up, btpy_call_prev_sibling,
11076 btpy_call_next_sibling, btpy_richcompare): Use recpy_element_object
11077 instead of btpy_object.
11078 (btpy_insn_sal, btpy_insn_pc, btpy_insn_size, btpy_insn_is_speculative,
11079 btpy_insn_data, btpy_insn_decode): Rename to ...
11080 (recpy_bt_insn_sal, recpy_bt_insn_pc, recpy_bt_insn_size,
11081 recpy_bt_insn_is_speculative, recpy_bt_insn_data,
11082 recpy_bt_insn_decode): This. Also, use new helper functions.
11083 (btpy_list_position, recpy_bt_goto): Use recpy_element_object and
11084 recpy_insn_type.
11085 (btpy_insn_getset): Remove.
11086 (gdbpy_initialize_btrace): Remove code to initialize
11087 gdb.BtraceInstruction. Use recpy_element_object.
11088 * python/py-record-btrace.h (recpy_bt_insn_number, recpy_bt_insn_sal,
11089 recpy_bt_insn_pc, recpy_bt_insn_data, recpy_bt_insn_decoded,
11090 recpy_bt_insn_size, recpy_bt_insn_is_speculative): New export.
11091 * python/py-record.c (recpy_insn_type): New static object.
11092 (recpy_insn_new, recpy_insn_sal, recpy_insn_pc, recpy_insn_data,
11093 recpy_insn_decoded, recpy_insn_size, recpy_insn_is_speculative,
11094 recpy_element_number, recpy_element_hash, recpy_element_richcompare):
11095 New function.
11096 (recpy_insn_getset): New static object.
11097 (gdbpy_initialize_record): Initialize gdb.RecordInstruction.
11098 * python/py-record.h (recpy_element_object): New typedef.
11099 (recpy_insn_type, recpy_insn_new): New export.
11100
11101 2017-05-01 Tim Wiederhake <tim.wiederhake@intel.com>
11102
11103 * py-record-btrace.c (btpy_insn_new): Removed.
11104 (btpy_insn_or_gap_new): New function.
11105 (btpy_insn_error): Removed.
11106 (btpy_insn_sal, btpy_insn_pc, btpy_insn_size, btpy_insn_is_speculative,
11107 btpy_insn_data, btpy_insn_decode): Remove code path for gaps.
11108 (recpy_bt_replay_position, recpy_bt_begin, recpy_bt_end): Call
11109 btpy_insn_or_gap_new instead of btpy_insn_new.
11110 (btpy_insn_getset): Remove btpy_insn_error.
11111 * py-record.c (recpy_gap_type): New static object.
11112 (recpy_gap_object): New typedef.
11113 (recpy_gap_new, recpy_gap_number, recpy_gap_reason_code,
11114 recpy_gap_reason_string): New function.
11115 (recpy_gap_getset): New static object.
11116 (gdbpy_initialize_record): Initialize gdb.RecordGap type.
11117 * py-record.h (recpy_gap_new): New export.
11118
11119 2017-05-01 Tim Wiederhake <tim.wiederhake@intel.com>
11120
11121 * python/py-record.c (recpy_ptid): Remove.
11122 (recpy_record_getset): Remove recpy_ptid.
11123
11124 2017-05-01 Tim Wiederhake <tim.wiederhake@intel.com>
11125
11126 * btrace.c (btrace_fetch): Set inferior_ptid.
11127 * python/py-record-btrace.c: Add "py-record.h" include.
11128 (recpy_bt_format, recpy_bt_replay_position, recpy_bt_begin,
11129 recpy_bt_end, recpy_bt_instruction_history,
11130 recpy_bt_function_call_history, recpy_bt_goto): Use ptid stored
11131 in gdb.Record object instead of current ptid.
11132 * python/py-record.c: Include new "py-record.h" file.
11133 (recpy_record_object): Moved to py-record.h.
11134 * python/py-record.h: New file.
11135
11136 2017-05-01 Tim Wiederhake <tim.wiederhake@intel.com>
11137
11138 * python/py-record-btrace.c (BTPY_REQUIRE_VALID_INSN,
11139 BTPY_REQUIRE_VALID_CALL, recpy_bt_function_call_history): Fix
11140 indentation.
11141
11142 2017-05-01 Joel Brobecker <brobecker@adacore.com>
11143
11144 * MAINTAINERS: Move Daniel Jacobowitz and Mark Kettenis to
11145 the past maintainers section.
11146
11147 2017-04-28 Yao Qi <yao.qi@linaro.org>
11148
11149 * infcmd.c (get_return_value): Use regcache ctor, and remove
11150 cleanup.
11151
11152 2017-04-28 Yao Qi <yao.qi@linaro.org>
11153 Pedro Alves <palves@redhat.com>
11154
11155 * regcache.c (regcache::regcache): New tag dispatch ctor.
11156 (do_cooked_read): Moved above.
11157 (regcache_dup): Use the tag dispatch ctor..
11158 * regcache.h (regcache): Declare ctor, delete copy ctor and
11159 assignment operator, remove friend regcache_dup.
11160
11161 2017-04-28 Yao Qi <yao.qi@linaro.org>
11162
11163 * regcache.c (regcache_dup): Assert !src->m_readonly_p and
11164 call method save instead of regcache_cpy.
11165 * regcache.h (struct regcache): Make regcache_dup a friend.
11166
11167 2017-04-28 Yao Qi <yao.qi@linaro.org>
11168
11169 * regcache.c (struct regcache): Move to regcache.h
11170 (regcache::arch): New method.
11171 (regcache_get_ptid): Update.
11172 (get_regcache_arch): Call arch method.
11173 (get_regcache_aspace): Call method aspace.
11174 (register_buffer): Change it to method.
11175 (regcache_save): Change it to regcache::save.
11176 (regcache_restore): Likewise.
11177 (regcache_cpy_no_passthrough): Remove the declaration.
11178 (regcache_cpy): Call methods restore and cpy_no_passthrough.
11179 (regcache_cpy_no_passthrough): Change it to method
11180 cpy_no_passthrough.
11181 (regcache_register_status): Change it to method
11182 get_register_status.
11183 (regcache_invalidate): Change it to method invalidate.
11184 (regcache_thread_ptid_changed): Use methods ptid and set_ptid.
11185 (regcache_raw_update): Change it to method raw_update.
11186 (regcache_raw_read): Likewise.
11187 (regcache_raw_read_signed): Likewise.
11188 (regcache_raw_read_unsigned): Likewise.
11189 (regcache_raw_write_signed): Likewise.
11190 (regcache_raw_write_unsigned): Likewise.
11191 (regcache_cooked_read): Likewise.
11192 (regcache_cooked_read_value): Likewise.
11193 (regcache_cooked_read_signed): Likewise.
11194 (regcache_cooked_read_unsigned): Likewise.
11195 (regcache_cooked_write_signed): Likewise.
11196 (regcache_cooked_write_unsigned): Likewise.
11197 (regcache_raw_set_cached_value): Likewise.
11198 (regcache_raw_write): Likewise.
11199 (regcache_cooked_write): Likewise.
11200 (regcache_xfer_part): Likewise.
11201 (regcache_raw_read_part): Likewise.
11202 (regcache_raw_write_part): Likewise.
11203 (regcache_cooked_read_part): Likewise.
11204 (regcache_cooked_write_part): Likewise.
11205 (regcache_raw_supply): Likewise.
11206 (regcache_raw_collect): Likewise.
11207 (regcache_transfer_regset): Likewise.
11208 (regcache_supply_regset): Likewise.
11209 (regcache_collect_regset): Likewise.
11210 (regcache_debug_print_register): Likewise.
11211 (enum regcache_dump_what): Move it to regcache.h.
11212 (regcache_dump): Change it to method dump.
11213 * regcache.h (enum regcache_dump_what): New.
11214 (class regcache): New.
11215 * target.c (target_fetch_registers): Call method
11216 debug_print_register.
11217 (target_store_registers): Likewise.
11218
11219 2017-04-28 Simon Marchi <simon.marchi@ericsson.com>
11220
11221 * windows-nat.c (struct lm_info_windows): Initialize field.
11222 (windows_make_so): Allocate lm_info_windows with new.
11223 (windows_free_so): Free lm_info_windows with delete.
11224
11225 2017-04-28 Simon Marchi <simon.marchi@ericsson.com>
11226
11227 * solib-darwin.c (struct lm_info_darwin): Initialize field.
11228 (darwin_current_sos): Allocate lm_info_darwin with new, remove
11229 cleanup.
11230 (darwin_free_so): Free lm_info_darwin with delete.
11231
11232 2017-04-28 Simon Marchi <simon.marchi@ericsson.com>
11233
11234 * solib-svr4.h (struct lm_info_svr4): Initialize fields.
11235 <l_addr_p>: Change type to bool.
11236 * solib-svr4.c (lm_info_read): Allocate lm_info_svr4 with new.
11237 (svr4_free_so): Free lm_info_svr4 with delete.
11238 (svr4_copy_library_list): Replace memcpy with call to copy
11239 constructor.
11240 (library_list_start_library, svr4_default_sos): Allocate
11241 lm_info_svr4 with new.
11242
11243 2017-04-28 Simon Marchi <simon.marchi@ericsson.com>
11244
11245 * solib-target.c (struct lm_info_target): Add destructor,
11246 initialize fields.
11247 <name>: Change type to std::string.
11248 (library_list_start_library): Allocate lm_info_target with new.
11249 (solib_target_free_library_list): Free lm_info_target with
11250 delete.
11251 (solib_target_current_sos): Adapt to std::string.
11252 (solib_target_free_so): Free lm_info_target with delete.
11253
11254 2017-04-28 Simon Marchi <simon.marchi@ericsson.com>
11255
11256 * solib-frv.c (struct lm_info_frv): Add destructor, initialize
11257 fields.
11258 (frv_current_sos): Allocate lm_info_frv with new.
11259 (frv_relocate_main_executable): Free lm_info_frv with delete,
11260 allocate with new.
11261 (frv_clear_solib, frv_free_so): Free lm_info_frv with delete.
11262
11263 2017-04-28 Simon Marchi <simon.marchi@ericsson.com>
11264
11265 * solib-frv.c (struct lm_info_frv): Fix indentation.
11266
11267 2017-04-28 Simon Marchi <simon.marchi@ericsson.com>
11268
11269 * solib-dsbt.c (struct lm_info_dsbt): Add destructor, initialize
11270 map field.
11271 (dsbt_current_sos): Allocate lm_info_dsbt with new.
11272 (dsbt_relocate_main_executable): Free lm_info_dsbt with delete
11273 and allocate with new.
11274 (dsbt_clear_solib, dsbt_free_so): Free lm_info_dsbt with delete.
11275
11276 2017-04-28 Simon Marchi <simon.marchi@ericsson.com>
11277
11278 * solib-aix.c (struct lm_info_aix): Initialize fields in-class.
11279 <filename, member_name>: Change type to std::string.
11280 (solib_aix_new_lm_info, solib_aix_xfree_lm_info): Remove.
11281 (library_list_start_library): Allocate lm_info_aix with new.
11282 (solib_aix_free_library_list, solib_aix_free_so): Free with delete.
11283 (solib_aix_current_sos): Adapt to std::string, copy lm_info_aix
11284 with copy constructor.
11285
11286 2017-04-28 Simon Marchi <simon.marchi@ericsson.com>
11287
11288 * solist.h (struct lm_info): Remove.
11289 (struct lm_info_base): New class.
11290 (struct so_list) <lm_info>: Change type to lm_info_base *.
11291 * nto-tdep.c (struct lm_info): Remove.
11292 (lm_addr): Adjust.
11293 * solib-aix.c (struct lm_info): Rename to ...
11294 (struct lm_info_aix): ... this. Extend lm_info_base.
11295 (lm_info_p): Rename to ...
11296 (lm_info_aix_p): ... this, and adjust.
11297 (solib_aix_new_lm_info, solib_aix_xfree_lm_info,
11298 solib_aix_parse_libraries, library_list_start_library,
11299 solib_aix_free_library_list, solib_aix_parse_libraries,
11300 solib_aix_get_library_list,
11301 solib_aix_relocate_section_addresses, solib_aix_free_so,
11302 solib_aix_get_section_offsets,
11303 solib_aix_solib_create_inferior_hook, solib_aix_current_sos):
11304 Adjust.
11305 (struct solib_aix_inferior_data) <library_list>: Adjust.
11306 * solib-darwin.c (struct lm_info): Rename to ...
11307 (struct lm_info_darwin): ... this. Extend lm_info_base.
11308 (darwin_current_sos, darwin_relocate_section_addresses): Adjust.
11309 * solib-dsbt.c (struct lm_info): Rename to ...
11310 (struct lm_info_dsbt): ... this. Extend lm_info_base.
11311 (struct dsbt_info) <main_executable_lm_info): Adjust.
11312 (dsbt_current_sos, dsbt_relocate_main_executable, dsbt_free_so,
11313 dsbt_relocate_section_addresses): Adjust.
11314 * solib-frv.c (struct lm_info): Rename to ...
11315 (struct lm_info_frv): ... this. Extend lm_info_base.
11316 (main_executable_lm_info): Adjust.
11317 (frv_current_sos, frv_relocate_main_executable, frv_free_so,
11318 frv_relocate_section_addresses, frv_fdpic_find_global_pointer,
11319 find_canonical_descriptor_in_load_object,
11320 frv_fdpic_find_canonical_descriptor): Adjust.
11321 * solib-svr4.c (struct lm_info): Move to solib-svr4.h, renamed
11322 to lm_info_svr4.
11323 (lm_info_read, lm_addr_check, svr4_keep_data_in_core,
11324 svr4_clear_so, svr4_copy_library_list,
11325 library_list_start_library, svr4_default_sos, svr4_read_so_list,
11326 svr4_current_sos, svr4_fetch_objfile_link_map,
11327 solist_update_incremental): Adjust.
11328 * solib-svr4.h (struct lm_info_svr4): Move here from
11329 solib-svr4.c.
11330 * solib-target.c (struct lm_info): Rename to ...
11331 (struct lm_info_target): ... this. Extend lm_info_base.
11332 (lm_info_p): Rename to ...
11333 (lm_info_target_p): ... this.
11334 (solib_target_parse_libraries, library_list_start_segment,
11335 library_list_start_section, library_list_start_library,
11336 library_list_end_library, solib_target_free_library_list,
11337 solib_target_current_sos, solib_target_free_so,
11338 solib_target_relocate_section_addresses): Adjust.
11339 * windows-nat.c (struct lm_info): Rename to ...
11340 (struct lm_info_windows): ... this. Extend lm_info_base.
11341 (windows_make_so, handle_load_dll, handle_unload_dll,
11342 windows_xfer_shared_libraries): Adjust.
11343
11344 2017-04-28 Simon Marchi <simon.marchi@ericsson.com>
11345
11346 * solib-darwin.c (struct darwin_so_list): Remove.
11347 (darwin_current_sos): Allocate an so_list object instead of a
11348 darwin_so_list, separately allocate an lm_info object.
11349 (darwin_free_so): Free lm_info.
11350
11351 2017-04-28 John Baldwin <jhb@FreeBSD.org>
11352
11353 * mips-tdep.c (print_gp_register_row): Replace printf_filtered
11354 with fprintf_filtered.
11355
11356 2017-04-28 Yao Qi <yao.qi@linaro.org>
11357
11358 * regcache.c (regcache::regcache): New function.
11359 (regcache::~regcache): New function.
11360 (regcache_xmalloc_1): Remove.
11361 (regcache_xmalloc): Call new regcache.
11362 (regcache_xfree): Call delete regcache.
11363 (get_thread_arch_aspace_regcache): Call new regcache.
11364
11365 2017-04-28 Yao Qi <yao.qi@linaro.org>
11366
11367 * mips-linux-nat.c (mips_linux_new_thread): Use ptid method
11368 lwp instead of ptid_get_lwp.
11369
11370 2017-04-28 Yao Qi <yao.qi@linaro.org>
11371
11372 * mips-linux-nat.c (mips_linux_new_thread): Get lwpid from
11373 lwp_info instead of getting from inferior_ptid.
11374
11375 2017-04-27 Keith Seitz <keiths@redhat.com>
11376
11377 * gdbtypes.c (LVALUE_REFERENCE_TO_RVALUE_BINDING_BADNESS)
11378 DIFFERENT_REFERENCE_TYPE_BADNESS): Remove.
11379 (CV_CONVERSION_BADNESS): Define.
11380 (rank_one_type): Remove overly restrictive rvalue reference
11381 rank checks.
11382 Add cv-qualifier checks and subranks for type equality.
11383 * gdbtypes.h (REFERENCE_CONVERSION_RVALUE,
11384 REFERENCE_CONVERSION_CONST_LVALUE, CV_CONVERSION_BADNESS,
11385 CV_CONVERSION_CONST, CV_CONVERSION_VOLATILE): Declare.
11386
11387 2017-04-27 Simon Marchi <simon.marchi@ericsson.com>
11388
11389 * python/py-inferior.c (inferior_to_inferior_object): Increment reference
11390 count when creating the object.
11391
11392 2017-04-27 Sangamesh Mallayya <sangamesh.swamy@in.ibm.com>
11393 Ulrich Weigand <uweigand@de.ibm.com>
11394
11395 * xcoffread.c (read_xcoff_symtab): Read correct function auxiliary
11396 entry if xlc -qfuncsect or gcc -ffunction-sections compiler option
11397 is used in AIX.
11398 (read_xcoff_symtab): Handle C_WEAKEXT storage class.
11399 (process_xcoff_symbol): Likewise.
11400 (scan_xcoff_symtab): Likewise.
11401
11402 2017-04-26 Alan Hayward <alan.hayward@arm.com>
11403
11404 * ia64-tdep.c (examine_prologue): Use get_frame_register_unsigned.
11405 (ia64_sigtramp_frame_prev_register): Use read_memory_unsigned_integer.
11406 (ia64_access_reg): Use get_frame_register_unsigned.
11407 (ia64_access_rse_reg): Likewise.
11408 (ia64_libunwind_frame_prev_register): Likewise.
11409
11410 2017-04-26 Jiong Wang <jiong.wang@arm.com>
11411
11412 * gdbarch.sh: New gdbarch method execute_dwarf_cfa_vendor_op.
11413 * gdbarch.c: Regenerated.
11414 * gdbarch.h: Regenerated.
11415 * dwarf2-frame.c (dwarf2_frame_state_alloc_regs): Made the
11416 visibility external.
11417 (execute_cfa_program): Call execute_dwarf_cfa_vendor_op for CFI
11418 between DW_CFA_lo_user and DW_CFA_high_user inclusive.
11419 (enum cfa_how_kind): Move to ...
11420 (struct dwarf2_frame_state_reg_info): Likewise.
11421 (struct dwarf2_frame_state): Likewise.
11422 * dwarf2-frame.h: ... here.
11423 (dwarf2_frame_state_alloc_regs): New declaration.
11424 * sparc-tdep.c (sparc_execute_dwarf_cfa_vendor_op): New function.
11425 (sparc32_gdbarch_init): Register execute_dwarf_cfa_vendor_op hook.
11426
11427 2017-04-26 Alan Hayward <alan.hayward@arm.com>
11428
11429 * xtensa-tdep.c (xtensa_pseudo_register_read): Use
11430 regcache_raw_read_unsigned.
11431 (xtensa_pseudo_register_write): Likewise.
11432
11433 2017-04-26 Alan Hayward <alan.hayward@arm.com>
11434
11435 * nds32-tdep.c (nds32_pseudo_register_read): Abort on errors.
11436 (nds32_pseudo_register_write): Likewise.
11437
11438 2017-04-25 Yao Qi <yao.qi@linaro.org>
11439
11440 * regcache.c (struct regcache) <readonly_p>: Change its type
11441 to bool.
11442 (regcache_xmalloc_1): Update parameter type and callers update.
11443
11444 2017-04-25 Yao Qi <yao.qi@linaro.org>
11445
11446 * aarch64-tdep.c (aarch64_gdbarch_init): Don't call
11447 set_gdbarch_wchar_bit.
11448 * arm-tdep.c (arm_gdbarch_init): Likewise.
11449
11450 2017-04-25 Pedro Alves <palves@redhat.com>
11451
11452 * common/poison.h [!HAVE_IS_TRIVIALLY_COPYABLE] (IsRelocatable)
11453 (BothAreRelocatable, memcopy, memmove): Don't define.
11454 * common/traits.h (__has_feature, HAVE_IS_TRIVIALLY_COPYABLE): New
11455 macros.
11456
11457 2017-04-25 Pedro Alves <palves@redhat.com>
11458
11459 * common/common-defs.h: Include "common/poison.h".
11460 * common/function-view.h: (Not, Or, Requires): Move to traits.h
11461 and adjust.
11462 * common/poison.h: New file.
11463 * common/traits.h: Include <type_traits>.
11464 (Not, Or, Requires): New, moved from common/function-view.h.
11465
11466 2017-04-25 Pedro Alves <palves@redhat.com>
11467
11468 * breakpoint.h (struct breakpoint): In-class initialize all
11469 fields. Make boolean fields "bool".
11470 * breakpoint.c (init_raw_breakpoint_without_location): Remove
11471 memset call and initializations no longer necessary.
11472
11473 2017-04-25 Pedro Alves <palves@redhat.com>
11474
11475 * btrace.c (pt_btrace_insn_flags): Change parameter type to
11476 reference.
11477 (pt_btrace_insn): New function.
11478 (ftrace_add_pt): Remove memset call and use pt_btrace_insn.
11479
11480 2017-04-25 Pedro Alves <palves@redhat.com>
11481
11482 * ada-lang.c (ada_catchpoint_location): Now a "class". Remove
11483 "base" field and inherit from "bp_location" instead. Add
11484 non-default ctor.
11485 (allocate_location_exception): Use new non-default ctor.
11486 * breakpoint.c (get_first_locp_gte_addr): Remove memset call.
11487 (init_bp_location): Convert to ...
11488 (bp_location::bp_location): ... this new ctor, and remove memset
11489 call.
11490 (base_breakpoint_allocate_location): Use the new non-default ctor.
11491 * breakpoint.h (bp_location): Now a class. Declare default and
11492 non-default ctors. In-class initialize all members.
11493 (init_bp_location): Remove declaration.
11494
11495 2017-04-25 Pedro Alves <palves@redhat.com>
11496
11497 * common/enum-flags.h (enum_flags): Don't implement copy ctor and
11498 assignment operator.
11499
11500 2017-04-24 Yao Qi <yao.qi@linaro.org>
11501
11502 * doublest.c (convert_doublest_to_floatformat): Call
11503 floatformat_totalsize_bytes.
11504
11505 2017-04-22 Tom Tromey <tom@tromey.com>
11506
11507 * mi/mi-cmd-file.c (mi_cmd_file_list_shared_libraries): Use
11508 ui_out_emit_list.
11509 * stack.c (print_frame): Use ui_out_emit_list.
11510 * mi/mi-symbol-cmds.c (mi_cmd_symbol_list_lines): Use
11511 ui_out_emit_list.
11512 * mi/mi-main.c (print_one_inferior)
11513 (mi_cmd_data_list_register_names)
11514 (mi_cmd_data_list_register_values, mi_cmd_list_features)
11515 (mi_cmd_list_target_features, mi_cmd_trace_frame_collected): Use
11516 ui_out_emit_list.
11517 * mi/mi-interp.c (mi_on_normal_stop_1): Use ui_out_emit_list.
11518 (mi_output_solib_attribs): Use ui_out_emit_list,
11519 ui_out_emit_tuple.
11520 * mi/mi-cmd-var.c (varobj_update_one): Use ui_out_emit_list.
11521 * mi/mi-cmd-stack.c (mi_cmd_stack_list_frames)
11522 (mi_cmd_stack_list_args, list_args_or_locals): Use
11523 ui_out_emit_list.
11524 * disasm.c (do_assembly_only): Use ui_out_emit_list.
11525 * breakpoint.c (print_solib_event, output_thread_groups): Use
11526 ui_out_emit_list.
11527
11528 2017-04-22 Tom Tromey <tom@tromey.com>
11529
11530 * mi/mi-main.c (print_variable_or_computed): Use ui_out_emit_tuple.
11531 * mi/mi-cmd-var.c (varobj_update_one): Use ui_out_emit_tuple.
11532 * mi/mi-cmd-stack.c (list_arg_or_local): Use ui_out_emit_tuple.
11533
11534 2017-04-22 Tom Tromey <tom@tromey.com>
11535
11536 * tracepoint.c (tvariables_info_1)
11537 (print_one_static_tracepoint_marker): Use ui_out_emit_tuple.
11538
11539 2017-04-22 Tom Tromey <tom@tromey.com>
11540
11541 * stack.c (print_frame_arg): Use ui_out_emit_tuple,
11542 annotate_arg_emitter.
11543 * breakpoint.c (print_mention_watchpoint)
11544 (print_mention_masked_watchpoint): Use ui_out_emit_tuple.
11545 * annotate.h (struct annotate_arg_emitter): New.
11546
11547 2017-04-22 Tom Tromey <tom@tromey.com>
11548
11549 * record-btrace.c (record_btrace_insn_history)
11550 (record_btrace_insn_history_range, record_btrace_call_history)
11551 (record_btrace_call_history_range): Use ui_out_emit_tuple.
11552 * thread.c (do_captured_list_thread_ids, print_thread_info_1): Use
11553 ui_out_emit_tuple.
11554 * stack.c (print_frame_info): Use ui_out_emit_tuple.
11555 * solib.c (info_sharedlibrary_command): Use ui_out_emit_tuple.
11556 * skip.c (skip_info): Use ui_out_emit_tuple.
11557 * remote.c (show_remote_cmd): Use ui_out_emit_tuple.
11558 * progspace.c (print_program_space): Use ui_out_emit_tuple.
11559 * probe.c (info_probes_for_ops): Use ui_out_emit_tuple.
11560 * osdata.c (info_osdata): Use ui_out_emit_tuple.
11561 * mi/mi-symbol-cmds.c (mi_cmd_symbol_list_lines): Use
11562 ui_out_emit_tuple.
11563 * mi/mi-main.c (print_one_inferior, list_available_thread_groups)
11564 (output_register, mi_cmd_data_read_memory)
11565 (mi_cmd_data_read_memory_bytes, mi_load_progress)
11566 (mi_cmd_trace_frame_collected): Use ui_out_emit_tuple.
11567 * mi/mi-cmd-var.c (mi_cmd_var_list_children, varobj_update_one):
11568 Use ui_out_emit_tuple.
11569 * mi/mi-cmd-stack.c (mi_cmd_stack_list_args): Use
11570 ui_out_emit_tuple.
11571 * mi/mi-cmd-info.c (mi_cmd_info_ada_exceptions)
11572 (mi_cmd_info_gdb_mi_command): Use ui_out_emit_tuple.
11573 * linux-thread-db.c (info_auto_load_libthread_db): Use
11574 ui_out_emit_tuple.
11575 * inferior.c (print_inferior): Use ui_out_emit_tuple.
11576 * gdb_bfd.c (print_one_bfd): Use ui_out_emit_tuple.
11577 * disasm.c (do_mixed_source_and_assembly_deprecated)
11578 (do_mixed_source_and_assembly): Use ui_out_emit_tuple.
11579 * cp-abi.c (list_cp_abis): Use ui_out_emit_tuple.
11580 * cli/cli-setshow.c (cmd_show_list): Use ui_out_emit_tuple.
11581 * breakpoint.c (print_one_breakpoint_location)
11582 (print_one_breakpoint): Use ui_out_emit_tuple.
11583 * auto-load.c (print_script, info_auto_load_cmd): Use
11584 ui_out_emit_tuple.
11585 * ada-tasks.c (print_ada_task_info): Use ui_out_emit_tuple.
11586
11587 2017-04-21 Simon Marchi <simon.marchi@ericsson.com>
11588
11589 * thread.c (print_thread_info_1): Remove dead code.
11590
11591 2017-04-21 Jan Kratochvil <jan.kratochvil@redhat.com>
11592
11593 * aarch64-tdep.c (selftests::aarch64_process_record_test): Make it #if
11594 GDB_SELF_TEST.
11595 * arm-tdep.c (selftests::arm_record_test): Likewise.
11596
11597 2017-04-21 Yao Qi <yao.qi@linaro.org>
11598
11599 * regcache.c (regcache_restore): Remove argument 2. Replace
11600 argument 3 with regcache. Get register status from
11601 src->register_status and get register contents from
11602 register_buffer (src, regnum).
11603 (regcache_cpy): Update.
11604
11605 2017-04-19 Pedro Alves <palves@redhat.com>
11606
11607 * gdbthread.h (thread): Add missing closing parenthesis in
11608 comment.
11609
11610 2017-04-19 Pedro Alves <palves@redhat.com>
11611
11612 * common/refcounted-object.h: New file.
11613 * gdbthread.h: Include "common/refcounted-object.h".
11614 (thread_info): Inherit from refcounted_object and add comments.
11615 (thread_info::incref, thread_info::decref)
11616 (thread_info::m_refcount): Delete.
11617 (thread_info::deletable): Use the refcounted_object::refcount()
11618 method.
11619 * inferior.c (current_inferior_): Add comment.
11620 (set_current_inferior): Increment/decrement refcounts.
11621 (prune_inferiors, remove_inferior_command): Skip inferiors marked
11622 not-deletable instead of comparing with the current inferior.
11623 (initialize_inferiors): Increment the initial inferior's refcount.
11624 * inferior.h (struct inferior): Forward declare.
11625 Include "common/refcounted-object.h".
11626 (current_inferior, set_current_inferior): Move declaration to
11627 before struct inferior's definition, and fix comment.
11628 (inferior): Inherit from refcounted_object. Add comments.
11629 * thread.c (switch_to_thread_no_regs): Reference the thread's
11630 inferior pointer directly instead of doing a ptid lookup.
11631 (switch_to_no_thread): New function.
11632 (switch_to_thread(thread_info *)): New function, factored out
11633 from ...
11634 (switch_to_thread(ptid_t)): ... this.
11635 (restore_current_thread): Delete.
11636 (current_thread_cleanup): Remove 'inf_id' and 'was_removable'
11637 fields, and add 'inf' field.
11638 (do_restore_current_thread_cleanup): Check whether old->inf is
11639 alive instead of looking up an inferior by ptid. Use
11640 switch_to_thread and switch_to_no_thread.
11641 (restore_current_thread_cleanup_dtor): Use old->inf directly
11642 instead of lookup up an inferior by id. Decref the inferior.
11643 Don't restore 'removable'.
11644 (make_cleanup_restore_current_thread): Same the inferior pointer
11645 in old, instead of the inferior number. Incref the inferior.
11646 Don't save/clear 'removable'.
11647
11648 2017-04-19 Pedro Alves <palves@redhat.com>
11649
11650 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
11651 unittests/scoped_restore-selftests.c.
11652 (SUBDIR_UNITTESTS_OBS): Add scoped_restore-selftests.o.
11653 * common/scoped_restore.h (scoped_restore_base): Make "class".
11654 (scoped_restore_base::release): New public method.
11655 (scoped_restore_base::scoped_restore_base): New protected ctor.
11656 (scoped_restore_base::m_saved_var): New protected field.
11657 (scoped_restore_tmpl::scoped_restore_tmpl(T*)): Initialize the
11658 scoped_restore_base base class instead of m_saved_var directly.
11659 (scoped_restore_tmpl::scoped_restore_tmpl(T*, T2)): Likewise.
11660 (scoped_restore_tmpl::scoped_restore_tmpl(const
11661 scoped_restore_tmpl<T>&)): Likewise.
11662 (scoped_restore_tmpl::~scoped_restore_tmpl): Use the saved_var
11663 method.
11664 (scoped_restore_tmpl::saved_var): New method.
11665 (scoped_restore_tmpl::m_saved_var): Delete.
11666 * inferior.h (inferior::detaching): Now a bool.
11667 * infrun.c (prepare_for_detach): Use a scoped_restore instead of a
11668 cleanup.
11669 * unittests/scoped_restore-selftests.c: New file.
11670
11671 2017-04-19 Pedro Alves <palves@redhat.com>
11672
11673 * Makefile.in (SUBDIR_UNITTESTS_SRCS, SUBDIR_UNITTESTS_OBS):
11674 Re-sort in alphabetic order.
11675
11676 2017-04-18 Pedro Alves <palves@redhat.com>
11677
11678 * xml-support.c (obstack_xml_printf): Delete.
11679 * xml-support.h (obstack_xml_printf): Delete.
11680
11681 2017-04-18 Pedro Alves <palves@redhat.com>
11682
11683 * xml-support.c (gdb_xml_parser) <use_dtd, dtd_name, parse,
11684 vdebug, verror, body_text, start_element, end_element, name,
11685 user_data, set_is_xinclude, set_error, expat_parser>: New methods.
11686 <name, user_data, expat_parser, scopes, error, last_line, dtd_name,
11687 is_xinclude>: Make private and add m_ prefix.
11688 (gdb_xml_parser::body_text): New method, based on ...
11689 (gdb_xml_body_text): ... this. Adjust.
11690 (gdb_xml_parser::vdebug): New method, based on ...
11691 (gdb_xml_debug): ... this. Adjust.
11692 (gdb_xml_parser::verror): New method, based on ...
11693 (gdb_xml_error): ... this. Adjust.
11694 (gdb_xml_parser::start_element): New method, based on ...
11695 (gdb_xml_start_element): ... this. Adjust.
11696 (gdb_xml_start_element_wrapper): Defer to
11697 gdb_xml_parser::start_element and gdb_xml_parser::set_error.
11698 (gdb_xml_parser::end_element): New method, based on ...
11699 (gdb_xml_end_element_wrapper): ... this. Adjust.
11700 (gdb_xml_parser::~gdb_xml_parser): Adjust.
11701 (gdb_xml_parser::gdb_xml_parser): Adjust to field renames.
11702 (gdb_xml_parser::use_dtd): New method, based on ...
11703 (gdb_xml_use_dtd): ... this. Adjust.
11704 (gdb_xml_parser::parse): New method, based on ...
11705 (gdb_xml_parse): ... this. Adjust.
11706 (gdb_xml_parse_quick): Adjust to call the parser's parse method.
11707 (xinclude_start_include): Adjust to call the parser's name method.
11708 (xml_xinclude_default, xml_xinclude_start_doctype)
11709 (xml_xinclude_end_doctype): Adjust to call the parser's user_data
11710 method.
11711 (xml_process_xincludes): Adjust to call parser methods.
11712 * xml-support.h (gdb_xml_use_dtd, gdb_xml_parse): Delete
11713 declarations.
11714
11715 2017-04-18 Pedro Alves <palves@redhat.com>
11716
11717 * tracefile-tfile.c (tfile_write_tdesc): Adjust to use
11718 gdb::optional<std::string>.
11719 * xml-support.c: Include <string>.
11720 (scope_level::scope_level(scope_level &&))
11721 (scope_level::~scope_level): Delete.
11722 (scope_level::body): Now a std::string.
11723 (gdb_xml_body_text, gdb_xml_end_element): Adjust.
11724 (xinclude_parsing_data::xinclude_parsing_data): Add 'output'
11725 parameter.
11726 (xinclude_parsing_data::~xinclude_parsing_data): Delete.
11727 (xinclude_parsing_data::output): Now a std::string reference.
11728 (xinclude_start_include): Adjust.
11729 (xml_xinclude_default): Adjust.
11730 (xml_process_xincludes): Add 'output' parameter, and return bool.
11731 * xml-support.h (xml_process_xincludes): Add 'output' parameter,
11732 and return bool.
11733 * xml-tdesc.c: Include <unordered_map> and <string>.
11734 (tdesc_xml_cache): Delete.
11735 (tdesc_xml_cache_s): Delete.
11736 (xml_cache): Now an std::unordered_map.
11737 (tdesc_parse_xml): Adjust to use std::string and unordered_map.
11738 (target_fetch_description_xml): Change return type to
11739 gdb::optional<std::string>, and adjust.
11740 * xml-tdesc.h: Include "common/gdb_optional.h" and <string>.
11741 (target_fetch_description_xml): Change return type to
11742 gdb::optional<std::string>.
11743
11744 2017-04-18 Pedro Alves <palves@redhat.com>
11745
11746 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
11747 unittests/optional-selftests.c.
11748 (SUBDIR_UNITTESTS_OBS): Add optional-selftests.o.
11749 * unittests/optional-selftests.c: New file.
11750 * unittests/optional/assignment/1.cc: New file.
11751 * unittests/optional/assignment/2.cc: New file.
11752 * unittests/optional/assignment/3.cc: New file.
11753 * unittests/optional/assignment/4.cc: New file.
11754 * unittests/optional/assignment/5.cc: New file.
11755 * unittests/optional/assignment/6.cc: New file.
11756 * unittests/optional/assignment/7.cc: New file.
11757 * unittests/optional/cons/copy.cc: New file.
11758 * unittests/optional/cons/default.cc: New file.
11759 * unittests/optional/cons/move.cc: New file.
11760 * unittests/optional/cons/value.cc: New file.
11761 * unittests/optional/in_place.cc: New file.
11762 * unittests/optional/observers/1.cc: New file.
11763 * unittests/optional/observers/2.cc: New file.
11764
11765 2017-04-18 Pedro Alves <palves@redhat.com>
11766
11767 * common/gdb_optional.h: Include common/traits.h.
11768 (in_place_t): New type.
11769 (in_place): New constexpr variable.
11770 (optional::optional): Remove member initialization of
11771 m_instantiated.
11772 (optional::optional(in_place_t...)): New constructor.
11773 (optional::~optional): Use reset.
11774 (optional::optional(const optional&)): New.
11775 (optional::optional(const optional&&)): New.
11776 (optional::optional(T &)): New.
11777 (optional::optional(T &&)): New.
11778 (operator::operator=(const optional &)): New.
11779 (operator::operator=(optional &&)): New.
11780 (operator::operator= (const T &))
11781 (operator::operator= (T &&))
11782 (operator::emplace (Args &&... args)): Return a T&. Use reset.
11783 (operator::reset): New.
11784 (operator::m_instantiated):: Add in-class initializer.
11785 * common/traits.h: Include <type_traits>.
11786 (struct And): New types.
11787
11788 2017-04-18 Pedro Alves <palves@redhat.com>
11789
11790 * xml-support.c: Include <vector>.
11791 (scope_level::scope_level(const gdb_xml_element *))
11792 (scope_level::scope_level(scope_level&&)): New.
11793 (scope_level::~scope_level): New.
11794 (scope_level_s): Delete.
11795 (gdb_xml_parser::scopes): Now a std::vector.
11796 (gdb_xml_body_text, gdb_xml_start_element, gdb_xml_end_element):
11797 Use std::vector.
11798 (gdb_xml_parser::~gdb_xml_parser): Remove now unnecessary
11799 scope cleanup code.
11800 (gdb_xml_parser::gdb_xml_parser): Remove explicit initialization
11801 of the scopes member. Use std::vector::emplace_back.
11802
11803 2017-04-18 Pedro Alves <palves@redhat.com>
11804
11805 * xml-support.c (gdb_xml_parser): Add ctor/dtor. Make is_xinclude
11806 a bool.
11807 (gdb_xml_end_element): Change type of first parameter.
11808 (gdb_xml_cleanup): Rename to ...
11809 (gdb_xml_parser::~gdb_xml_parser): ... this.
11810 (gdb_xml_create_parser_and_cleanup): Delete with ...
11811 (gdb_xml_parser::gdb_xml_parser): ... creation parts factored out
11812 to this new ctor.
11813 (gdb_xml_parse_quick): Create a local gdb_xml_parser instead of
11814 using gdb_xml_create_parser_and_cleanup.
11815 (xinclude_parsing_data): Add ctor/dtor.
11816 (xml_xinclude_cleanup): Delete.
11817 (xml_process_xincludes): Create a local xinclude_parsing_data
11818 instead of heap-allocating one. Create a local gdb_xml_parser
11819 instead of heap-allocating one with
11820 gdb_xml_create_parser_and_cleanup.
11821
11822 2017-04-18 John Baldwin <jhb@FreeBSD.org>
11823
11824 PR threads/20743
11825 * fbsd-nat.c (resume_one_thread_cb): Remove.
11826 (resume_all_threads_cb): Remove.
11827 (fbsd_resume): Use ALL_NON_EXITED_THREADS instead of
11828 iterate_over_threads.
11829
11830 2017-04-17 Joel Brobecker <brobecker@adacore.com>
11831
11832 * NEWS: Create a new section for the next release branch.
11833 Rename the section of the current branch, now that it has
11834 been cut.
11835
11836 2017-04-17 Joel Brobecker <brobecker@adacore.com>
11837
11838 GDB 8.0 branch created (725bf5cf125783c2a7ca4ab63d3768e220bab2db):
11839 * version.in: Bump version to 8.0.50.DATE-git.
11840
11841 2017-04-13 Sergio Durigan Junior <sergiodj@redhat.com>
11842
11843 PR gdb/21385
11844 * windows-nat.c (windows_create_inferior): Declare 'allargs'
11845 independently of the host, and fix build breakage on Cygwin.
11846
11847 2017-04-13 Pedro Alves <palves@redhat.com>
11848
11849 * inferior.c (free_inferior): Convert to ...
11850 (inferior::~inferior): ... this dtor.
11851 (inferior::inferior): New ctor, factored out from ...
11852 (add_inferior_silent): ... here. Allocate the inferior with a new
11853 expression.
11854 (delete_inferior): Call delete instead of free_inferior.
11855 * inferior.h (gdb_environ, continuation): Forward declare.
11856 (inferior): Now a class. Add in-class initialization to all
11857 members. Make boolean fields bool, except 'detaching'.
11858 (inferior::inferior): New explicit ctor.
11859 (inferior::~inferior): New.
11860
11861 2017-04-13 Pedro Alves <palves@redhat.com>
11862
11863 * inferior.c (init_inferior_list): Delete.
11864 * inferior.h (init_inferior_list): Delete.
11865
11866 2017-04-13 Pedro Alves <palves@redhat.com>
11867
11868 PR threads/13217
11869 * gdb.threads/threadapply.exp (thr_apply_detach): New procedure.
11870 (top level): Call it twice, with different thread sets.
11871
11872 2017-04-13 Pedro Alves <palves@redhat.com>
11873
11874 * thread.c: Include <algorithm>.
11875 (thread_array_cleanup): Delete.
11876 (scoped_inc_dec_ref): New class.
11877 (live_threads_count): New function.
11878 (set_thread_refcount): Delete.
11879 (tp_array_compar_ascending): Now a bool.
11880 (tp_array_compar): Convert to a std::sort comparison function.
11881 (thread_apply_all_command): Use std::vector and scoped_inc_dec_ref
11882 and live_threads_count.
11883
11884 2017-04-13 Pedro Alves <palves@redhat.com>
11885
11886 * infrun.c (follow_fork_inferior): Also switch the current
11887 inferior.
11888
11889 2017-04-13 Pedro Alves <palves@redhat.com>
11890
11891 * breakpoint.c (watch_command_1): Save watchpoint-frame info
11892 before calling create_internal_breakpoint.
11893
11894 2017-04-13 Pedro Alves <palves@redhat.com>
11895
11896 * fork-child.c (execv_argv): New class.
11897 (breakup_args): Refactored as ...
11898 (execv_argv::init_for_no_shell): .. this method of execv_argv.
11899 Copy arguments to storage and replace separators with NULL
11900 terminators in place.
11901 (escape_bang_in_quoted_argument): Adjust to return bool.
11902 (execv_argv::execv_argv): New ctor.
11903 (execv_argv::init_for_shell): New method, factored out from
11904 fork_inferior. Don't strdup strings into the vector.
11905 (fork_inferior): Eliminate "shell" local and use execv_argv. Use
11906 Remove free_vector_argv call.
11907
11908 2017-04-13 Yao Qi <yao.qi@linaro.org>
11909
11910 * rx-tdep.c (rx_fpsw_type): Check tdep->rx_fpsw_type instead of
11911 tdep->rx_psw_type.
11912
11913 2017-04-13 Yao Qi <yao.qi@linaro.org>
11914
11915 * rl78-tdep.c (rl78_gdbarch_init): Use XCNEW instead of XNEW.
11916 * rx-tdep.c (rx_gdbarch_init): Likewise.
11917
11918 2017-04-13 Pedro Alves <palves@redhat.com>
11919
11920 * breakpoint.h (struct breakpoint): Reindent.
11921
11922 2017-04-13 Pedro Alves <palves@redhat.com>
11923
11924 * breakpoint.c (bp_location): Rename to ...
11925 (bp_locations): ... this. All references updated.
11926 (bp_location_count): Rename to ...
11927 (bp_locations_count): ... this. All references updated.
11928 (bp_location_placed_address_before_address_max): Rename to ...
11929 (bp_locations_placed_address_before_address_max): ... this. All
11930 references updated.
11931 (bp_location_shadow_len_after_address_max): Rename to ...
11932 (bp_locations_shadow_len_after_address_max): ... this. All
11933 references updated.
11934 (bp_location_compare_addrs): Rename to ...
11935 (bp_locations_compare_addrs): ... this. All references updated.
11936 (bp_location_compare):Rename to ...
11937 (bp_locations_compare): ... this. All references updated.
11938 (bp_location_target_extensions_update): Rename to ...
11939 (bp_locations_target_extensions_update): ... this. All references
11940 updated.
11941
11942 2017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
11943
11944 * Makefile.in (HFILES_NO_SRCDIR): Add "common/gdb_termios.h".
11945 * common/common.m4: Check headers 'termios.h', 'termio.h' and
11946 'sgtty.h'.
11947 * common/gdb_termios.h: New file, with parts of "terminal.h".
11948 * inflow.c: Include "gdb_termios.h".
11949 * ser-unix.c: Include "gdb_termios.h".
11950 * terminal.h: Move terminal-related defines to
11951 "common/gdb_termios.h".
11952
11953 2017-04-12 Tom Tromey <tom@tromey.com>
11954
11955 * probe.c (parse_probes): Update.
11956 * location.h (delete_event_location): Don't declare.
11957 (event_location_deleter::operator()): Update.
11958 * location.c (event_location_deleter::operator()): Rename from
11959 delete_event_location.
11960 * linespec.h (linespec_result) <location>: Change type to
11961 event_location_up.
11962 * linespec.c (canonicalize_linespec, event_location_to_sals)
11963 (decode_objc): Update.
11964 (linespec_result): Don't call delete_event_location.
11965 * breakpoint.c (create_breakpoints_sal)
11966 (bkpt_probe_create_sals_from_location)
11967 (strace_marker_create_sals_from_location): Update.
11968
11969 2017-04-12 Tom Tromey <tom@tromey.com>
11970
11971 * linespec.h (struct linespec_result): Add constructor and
11972 destructor.
11973 (init_linespec_result, destroy_linespec_result)
11974 (make_cleanup_destroy_linespec_result): Don't declare.
11975 * linespec.c (init_linespec_result): Remove.
11976 (linespec_result::~linespec_result): Rename from
11977 destroy_linespec_result. Update.
11978 (cleanup_linespec_result, make_cleanup_destroy_linespec_result):
11979 Remove.
11980 * breakpoint.c (create_breakpoint, break_range_command)
11981 (decode_location_default): Update.
11982 * ax-gdb.c (agent_command_1): Update.
11983
11984 2017-04-12 Tom Tromey <tom@tromey.com>
11985
11986 * remote.c (remote_download_tracepoint): Update.
11987 * python/py-breakpoint.c (bppy_get_location): Update.
11988 * guile/scm-breakpoint.c (bpscm_print_breakpoint_smob)
11989 (gdbscm_breakpoint_location): Update.
11990 * elfread.c (elf_gnu_ifunc_resolver_return_stop): Update.
11991 * breakpoint.h (struct breakpoint) <location, location_range_end>:
11992 Change type to event_location_up.
11993 * breakpoint.c (create_overlay_event_breakpoint)
11994 (create_longjmp_master_breakpoint)
11995 (create_std_terminate_master_breakpoint)
11996 (create_exception_master_breakpoint)
11997 (breakpoint_event_location_empty_p, print_breakpoint_location)
11998 (print_one_breakpoint_location, create_thread_event_breakpoint)
11999 (init_breakpoint_sal, create_breakpoint)
12000 (print_recreate_ranged_breakpoint, break_range_command)
12001 (init_ada_exception_breakpoint, say_where): Update.
12002 (base_breakpoint_dtor): Don't call delete_event_location.
12003 (bkpt_print_recreate, tracepoint_print_recreate)
12004 (dprintf_print_recreate, update_static_tracepoint)
12005 (breakpoint_re_set_default): Update.
12006
12007 2017-04-12 Tom Tromey <tom@tromey.com>
12008
12009 * compile/compile-loc2c.c (compute_stack_depth_worker): Change
12010 type of "to_do". Update.
12011 (compute_stack_depth): Use std::vector.
12012
12013 2017-04-12 Tom Tromey <tom@tromey.com>
12014
12015 * printcmd.c (find_instruction_backward): Use std::vector.
12016
12017 2017-04-12 Tom Tromey <tom@tromey.com>
12018
12019 * symfile.c (objfilep): Remove typedef.
12020 (reread_symbols): Use a std::vector.
12021
12022 2017-04-12 Tom Tromey <tom@tromey.com>
12023
12024 * mi/mi-main.c (exec_direction_forward): Remove.
12025 (exec_reverse_continue, mi_execute_command): Use scoped_restore.
12026 * guile/scm-ports.c (ioscm_with_output_to_port_worker): Use
12027 scoped_restore.
12028 * guile/guile.c (guile_repl_command, guile_command)
12029 (gdbscm_execute_gdb_command): Use scoped_restore.
12030 * go-exp.y (go_parse): Use scoped_restore.
12031 * d-exp.y (d_parse): Use scoped_restore.
12032 * cli/cli-decode.c (cmd_func): Use scoped_restore.
12033 * c-exp.y (c_parse): Use scoped_restore.
12034
12035 2017-04-12 Tom Tromey <tom@tromey.com>
12036
12037 * mi/mi-parse.h (struct mi_parse): Add constructor, destructor.
12038 (mi_parse): Update return type.
12039 (mi_parse_free): Remove.
12040 * mi/mi-parse.c (mi_parse::mi_parse): New constructor.
12041 (mi_parse::~mi_parse): Rename from mi_parse_free.
12042 (mi_parse_cleanup): Remove.
12043 (mi_parse): Return a unique_ptr. Use new.
12044 * mi/mi-main.c (mi_execute_command): Update.
12045
12046 2017-04-12 Tom Tromey <tom@tromey.com>
12047
12048 * location.c (explicit_location_lex_one): Return a
12049 unique_xmalloc_ptr.
12050 (string_to_explicit_location): Update. Remove cleanups.
12051
12052 2017-04-12 Tom Tromey <tom@tromey.com>
12053
12054 * gnu-v3-abi.c (value_and_voffset_p): Remove typedef.
12055 (compare_value_and_voffset): Change type. Update.
12056 (compute_vtable_size): Change type of "offset_vec".
12057 (gnuv3_print_vtable): Use std::vector. Remove cleanups.
12058 (gnuv3_get_typeid): Remove extraneous declaration.
12059
12060 2017-04-12 Tom Tromey <tom@tromey.com>
12061
12062 * charset.h (wchar_iterator): Fix comment.
12063
12064 2017-04-12 Tom Tromey <tom@tromey.com>
12065
12066 * charset.c (iconv_wrapper): New class.
12067 (cleanup_iconv): Remove.
12068 (convert_between_encodings): Use it.
12069
12070 2017-04-12 Tom Tromey <tom@tromey.com>
12071
12072 * symfile.h (increment_reading_symtab): Update type.
12073 * symfile.c (decrement_reading_symtab): Remove.
12074 (increment_reading_symtab): Return a scoped_restore_tmpl<int>.
12075 * psymtab.c (psymtab_to_symtab): Update.
12076 * dwarf2read.c (dw2_instantiate_symtab): Update.
12077
12078 2017-04-12 Tom Tromey <tom@tromey.com>
12079
12080 * jit.c (struct jit_reader): Declare separately. Add constructor
12081 and destructor. Change type of "handle".
12082 (loaded_jit_reader): Define separately.
12083 (jit_reader_load): Update. New "new".
12084 (jit_reader_unload_command): Use "delete".
12085 * gdb-dlfcn.h (struct dlclose_deleter): New.
12086 (gdb_dlhandle_up): New typedef.
12087 (gdb_dlopen, gdb_dlsym): Update types.
12088 (gdb_dlclose): Remove.
12089 * gdb-dlfcn.c (gdb_dlopen): Return a gdb_dlhandle_up.
12090 (gdb_dlsym): Change type of "handle".
12091 (make_cleanup_dlclose): Remove.
12092 (dlclose_deleter::operator()): Rename from gdb_dlclose.
12093 * compile/compile-c-support.c (load_libcc): Update.
12094
12095 2017-04-12 Tom Tromey <tom@tromey.com>
12096
12097 * symtab.h (find_pcs_for_symtab_line): Change return type.
12098 * symtab.c (find_pcs_for_symtab_line): Change return type.
12099 * python/py-linetable.c (build_line_table_tuple_from_pcs): Change
12100 type of "vec". Update.
12101 (ltpy_get_pcs_for_line): Update.
12102 * linespec.c (decode_digits_ordinary): Update.
12103
12104 2017-04-12 Tom Tromey <tom@tromey.com>
12105
12106 * tracepoint.c (actions_command): Update.
12107 * python/python.c (python_command, python_interactive_command):
12108 Update.
12109 * mi/mi-cmd-break.c (mi_cmd_break_commands): Update.
12110 * guile/guile.c (guile_command): Update.
12111 * defs.h (read_command_lines, read_command_lines_1): Return
12112 command_line_up.
12113 (command_lines_deleter): New struct.
12114 (command_line_up): New typedef.
12115 * compile/compile.c (compile_code_command)
12116 (compile_print_command): Update.
12117 * cli/cli-script.h (get_command_line, copy_command_lines): Return
12118 command_line_up.
12119 (make_cleanup_free_command_lines): Remove.
12120 * cli/cli-script.c (get_command_line, read_command_lines_1)
12121 (copy_command_lines): Return command_line_up.
12122 (while_command, if_command, read_command_lines, define_command)
12123 (document_command): Update.
12124 (do_free_command_lines_cleanup, make_cleanup_free_command_lines):
12125 Remove.
12126 * breakpoint.h (breakpoint_set_commands): Change type of
12127 "commands".
12128 * breakpoint.c (breakpoint_set_commands): Change type of
12129 "commands". Update.
12130 (do_map_commands_command, update_dprintf_command_list)
12131 (create_tracepoint_from_upload): Update.
12132
12133 2017-04-12 Tom Tromey <tom@tromey.com>
12134
12135 * tracepoint.c (scope_info): Update.
12136 * spu-tdep.c (spu_catch_start): Update.
12137 * python/python.c (gdbpy_decode_line): Update.
12138 * python/py-finishbreakpoint.c (bpfinishpy_init): Update.
12139 * python/py-breakpoint.c (bppy_init): Update.
12140 * probe.c (parse_probes): Update.
12141 * mi/mi-cmd-break.c (mi_cmd_break_insert_1): Update.
12142 * location.h (event_location_deleter): New struct.
12143 (event_location_up): New typedef.
12144 (new_linespec_location, new_address_location, new_probe_location)
12145 (new_explicit_location, copy_event_location)
12146 (string_to_event_location, string_to_event_location_basic)
12147 (string_to_explicit_location): Update return type.
12148 (make_cleanup_delete_event_location): Remove.
12149 * location.c (new_linespec_location, new_address_location)
12150 (new_probe_location, new_explicit_location, copy_event_location):
12151 Return event_location_up.
12152 (delete_event_location_cleanup)
12153 (make_cleanup_delete_event_location): Remove.
12154 (string_to_explicit_location, string_to_event_location_basic)
12155 (string_to_event_location): Return event_location_up.
12156 * linespec.c (canonicalize_linespec, event_location_to_sals)
12157 (decode_line_with_current_source)
12158 (decode_line_with_last_displayed, decode_objc): Update.
12159 * guile/scm-breakpoint.c (gdbscm_register_breakpoint_x): Update.
12160 * completer.c (location_completer): Update.
12161 * cli/cli-cmds.c (edit_command, list_command): Update.
12162 * breakpoint.c (create_overlay_event_breakpoint)
12163 (create_longjmp_master_breakpoint)
12164 (create_std_terminate_master_breakpoint)
12165 (create_exception_master_breakpoint)
12166 (create_thread_event_breakpoint): Update.
12167 (init_breakpoint_sal): Update. Remove some dead code.
12168 (create_breakpoint_sal): Change type of "location". Update.
12169 (create_breakpoints_sal, create_breakpoint, break_command_1)
12170 (dprintf_command, break_range_command, until_break_command)
12171 (init_ada_exception_breakpoint)
12172 (strace_marker_create_sals_from_location)
12173 (update_static_tracepoint, trace_command, ftrace_command)
12174 (strace_command, create_tracepoint_from_upload): Update.
12175 * break-catch-throw.c (re_set_exception_catchpoint): Update.
12176 * ax-gdb.c (agent_command_1): Update.
12177
12178 2017-04-12 Pedro Alves <palves@redhat.com>
12179
12180 * Makefile.in (ALL_TARGET_OBS): Add i386-go32-tdep.o.
12181 * configure.tgt: Handle i[34567]86-*-go32* and
12182 i[34567]86-*-msdosdjgpp*.
12183 * i386-tdep.c (i386_svr4_reg_to_regnum):
12184 Make extern.
12185 (i386_go32_init_abi, i386_coff_osabi_sniffer): Moved to
12186 i386-go32-tdep.c.
12187 (_initialize_i386_tdep): DJGPP bits moved to i386-go32-tdep.c.
12188 * i386-go32-tdep.c: New file.
12189 * i386-tdep.h (tdesc_i386_mmx, i386_svr4_reg_to_regnum): New
12190 declarations.
12191
12192 2017-04-12 Simon Marchi <simon.marchi@ericsson.com>
12193
12194 * aix-thread.c (pd_status2str): Change return type to const char *.
12195
12196 2017-04-12 Pedro Alves <palves@redhat.com>
12197
12198 * i386-tdep.c (i386_elf_init_abi, i386_go32_init_abi): Remove
12199 calls to set_gdbarch_gnu_triplet_regexp.
12200
12201 2017-04-12 Pedro Alves <palves@redhat.com>
12202
12203 PR gdb/21323
12204 * c-lang.c (cplus_primitive_types) <cplus_primitive_type_wchar_t>:
12205 New enum value.
12206 (cplus_language_arch_info): Register cplus_primitive_type_wchar_t.
12207 * gdbtypes.h (struct builtin_type) <builtin_wchar>: New field.
12208 * gdbtypes.c (gdbtypes_post_init): Create the "wchar_t" type.
12209 * gdbarch.sh (wchar_bit, wchar_signed): New per-arch values.
12210 * gdbarch.h, gdbarch.c: Regenerate.
12211 * aarch64-tdep.c (aarch64_gdbarch_init): Override
12212 gdbarch_wchar_bit and gdbarch_wchar_signed.
12213 * alpha-tdep.c (alpha_gdbarch_init): Likewise.
12214 * arm-tdep.c (arm_gdbarch_init): Likewise.
12215 * avr-tdep.c (avr_gdbarch_init): Likewise.
12216 * h8300-tdep.c (h8300_gdbarch_init): Likewise.
12217 * i386-nto-tdep.c (i386nto_init_abi): Likewise.
12218 * i386-tdep.c (i386_go32_init_abi): Likewise.
12219 * m32r-tdep.c (m32r_gdbarch_init): Likewise.
12220 * moxie-tdep.c (moxie_gdbarch_init): Likewise.
12221 * nds32-tdep.c (nds32_gdbarch_init): Likewise.
12222 * rs6000-aix-tdep.c (rs6000_aix_init_osabi): Likewise.
12223 * sh-tdep.c (sh_gdbarch_init): Likewise.
12224 * sparc-tdep.c (sparc32_gdbarch_init): Likewise.
12225 * sparc64-tdep.c (sparc64_init_abi): Likewise.
12226 * windows-tdep.c (windows_init_abi): Likewise.
12227 * xstormy16-tdep.c (xstormy16_gdbarch_init): Likewise.
12228
12229 2017-04-12 Pedro Alves <palves@redhat.com>
12230
12231 PR c++/21323
12232 * c-lang.c (cplus_primitive_types) <cplus_primitive_type_char16_t,
12233 cplus_primitive_type_char32_t>: New enum values.
12234 (cplus_language_arch_info): Register cplus_primitive_type_char16_t
12235 and cplus_primitive_type_char32_t.
12236 * dwarf2read.c (read_base_type) <DW_ATE_UTF>: If bit size is 16 or
12237 32, use the archtecture's built-in type for char16_t and char32_t,
12238 respectively. Otherwise, fallback to init_integer_type as before,
12239 but make the type unsigned, and issue a complaint.
12240 * gdbtypes.c (gdbtypes_post_init): Make char16_t and char32_t unsigned.
12241
12242 2017-04-12 Alan Hayward <alan.hayward@arm.com>
12243
12244 * m32r-tdep.c (M32R_ARG_REGISTER_SIZE): Added.
12245 (m32r_push_dummy_call): Use M32R_ARG_REGISTER_SIZE.
12246
12247 2017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
12248
12249 * windows-nat.c (windows_create_inferior): Declare 'toexec' as
12250 'const char *'.
12251
12252 2017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
12253
12254 * common/common-utils.c (free_vector_argv): New function.
12255 * common/common-utils.h: Include <vector>.
12256 (free_vector_argv): New prototype.
12257 * darwin-nat.c (darwin_create_inferior): Rewrite function
12258 prototype in order to constify "exec_file" and accept a
12259 "std::string" for "allargs".
12260 * fork-child.c: Include <vector>.
12261 (breakup_args): Rewrite function, using C++.
12262 (fork_inferior): Rewrite function header, constify "exec_file_arg"
12263 and accept "std::string" for "allargs". Update the code to
12264 calculate "argv" based on "allargs". Update calls to "exec_fun"
12265 and "execvp".
12266 * gnu-nat.c (gnu_create_inferior): Rewrite function prototype in
12267 order to constify "exec_file" and accept a "std::string" for
12268 "allargs".
12269 * go32-nat.c (go32_create_inferior): Likewise.
12270 * inf-ptrace.c (inf_ptrace_create_inferior): Likewise.
12271 * infcmd.c (run_command_1): Constify "exec_file". Use
12272 "std::string" for inferior arguments.
12273 * inferior.h (fork_inferior): Update prototype.
12274 * linux-nat.c (linux_nat_create_inferior): Rewrite function
12275 prototype in order to constify "exec_file" and accept a
12276 "std::string" for "allargs".
12277 * nto-procfs.c (procfs_create_inferior): Likewise.
12278 * procfs.c (procfs_create_inferior): Likewise.
12279 * remote-sim.c (gdbsim_create_inferior): Likewise.
12280 * remote.c (extended_remote_run): Update code to accept
12281 "std::string" as argument.
12282 (extended_remote_create_inferior): Rewrite function prototype in
12283 order to constify "exec_file" and accept a "std::string" for
12284 "allargs".
12285 * rs6000-nat.c (super_create_inferior): Likewise.
12286 (rs6000_create_inferior): Likewise.
12287 * target.h (struct target_ops) <to_create_inferior>: Likewise.
12288 * windows-nat.c (windows_create_inferior): Likewise.
12289
12290 2017-04-11 Pedro Alves <palves@redhat.com>
12291
12292 * thread.c: Fix whitespace throughout.
12293
12294 2017-04-11 Philipp Rudo <prudo@linux.vnet.ibm.com>
12295
12296 * linux-nat.c (linux_nat_detach): Remove delete_lwp call.
12297
12298 2017-04-11 Alan Hayward <alan.hayward@arm.com>
12299
12300 * arm-tdep.c (arm_store_return_value): Use FP_REGISTER_SIZE
12301
12302 2017-04-10 Sergio Durigan Junior <sergiodj@redhat.com>
12303
12304 PR gdb/21364
12305 * osdata.c (info_osdata): Check if 'type' is an empty string
12306 instead of NULL.
12307
12308 2017-04-10 Pedro Alves <palves@redhat.com>
12309
12310 * thread.c (add_thread_silent, delete_thread_1, find_thread_ptid)
12311 (ptid_to_global_thread_id, in_thread_list)
12312 (do_captured_list_thread_ids, set_resumed, set_running)
12313 (set_executing, set_stop_requested, finish_thread_state)
12314 (validate_registers_access, can_access_registers_ptid)
12315 (print_thread_info_1, switch_to_thread)
12316 (do_restore_current_thread_cleanup)
12317 (make_cleanup_restore_current_thread, thread_command)
12318 (thread_name_command): Use operator== instead of ptid_equal.
12319
12320 2017-04-10 Pedro Alves <palves@redhat.com>
12321
12322 * thread.c (struct current_thread_cleanup) <next>: Delete field.
12323 (current_thread_cleanup_chain): Delete.
12324 (restore_current_thread_cleanup_dtor)
12325 (make_cleanup_restore_current_thread): Remove references to
12326 current_thread_cleanup_chain.
12327
12328 2017-04-10 Alan Hayward <alan.hayward@arm.com>
12329
12330 * msp430-tdep.c (msp430_pseudo_register_read): Never return
12331 REG_UNKNOWN.
12332
12333 2017-04-10 Yao Qi <yao.qi@linaro.org>
12334
12335 PR gdb/19942
12336 * gdbthread.h (thread_info::deletable): New method.
12337 (thread_info::incref): New method.
12338 (thread_info::decref): New method.
12339 (thread_info::refcount): Move it to private.
12340 * infrun.c (save_stop_context): Call inc_refcount.
12341 (release_stop_context_cleanup): Likewise.
12342 * thread.c (set_thread_exited): New function.
12343 (init_thread_list): Delete "tp" only it is deletable, otherwise
12344 call set_thread_exited.
12345 (delete_thread_1): Call set_thread_exited.
12346 (current_thread_cleanup) <inferior_pid>: Remove.
12347 <thread>: New field.
12348 (restore_current_thread_ptid_changed): Removed.
12349 (do_restore_current_thread_cleanup): Adjust.
12350 (restore_current_thread_cleanup_dtor): Don't call
12351 find_thread_ptid.
12352 (set_thread_refcount): Use dec_refcount.
12353 (make_cleanup_restore_current_thread): Adjust.
12354 (thread_apply_all_command): Call inc_refcount.
12355 (_initialize_thread): Don't call
12356 observer_attach_thread_ptid_changed.
12357
12358 2017-04-10 Yao Qi <yao.qi@linaro.org>
12359
12360 * thread.c (delete_thread_1): Hoist code on marking thread as
12361 exited.
12362
12363 2017-04-09 Simon Marchi <simon.marchi@polymtl.ca>
12364
12365 * windows-nat.c (windows_detach): Initialize ptid with
12366 minus_one_ptid.
12367
12368 2017-04-07 Simon Marchi <simon.marchi@ericsson.com>
12369
12370 * unittests/ptid-selftests.c: Fix erroneous assert messages.
12371
12372 2017-04-07 Alan Hayward <alan.hayward@arm.com>
12373
12374 * bfin-tdep.c (BFIN_MAX_REGISTER_SIZE): Add.
12375 (bfin_pseudo_register_read): Use BFIN_MAX_REGISTER_SIZE.
12376 (bfin_pseudo_register_write): Likewise
12377
12378 2017-04-06 Simon Marchi <simon.marchi@ericsson.com>
12379
12380 * common/ptid.h (struct ptid): Change to...
12381 (class ptid_t): ... this.
12382 <ptid_t>: New constructors.
12383 <pid, lwp_p, lwp, tid_p, tid, is_pid, operator==, operator!=,
12384 matches>: New methods.
12385 <make_null, make_minus_one>: New static methods.
12386 <pid>: Rename to...
12387 <m_pid>: ...this.
12388 <lwp>: Rename to...
12389 <m_lwp>: ...this.
12390 <tid>: Rename to...
12391 <m_tid>: ...this.
12392 (ptid_build, ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal,
12393 ptid_is_pid, ptid_lwp_p, ptid_tid_p, ptid_match): Take ptid arguments
12394 as references, move comment to class ptid_t.
12395 * common/ptid.c (null_ptid, minus_one_ptid): Initialize with
12396 ptid_t static methods.
12397 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_tid,
12398 ptid_equal, ptid_is_pid, ptid_lwp_p, ptid_tid_p, ptid_match):
12399 Take ptid arguments as references, implement using ptid_t methods.
12400 * unittests/ptid-selftests.c: New file.
12401 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
12402 unittests/ptid-selftests.c.
12403 (SUBDIR_UNITTESTS_OBS): Add unittests/ptid-selftests.o.
12404
12405 2017-04-06 Thomas Preud'homme <thomas.preudhomme@arm.com>
12406
12407 * python/python.c (python_run_simple_file): Cast mode literal to
12408 non-const char pointer as expected by PyFile_FromString.
12409
12410 2017-04-05 Simon Marchi <simon.marchi@ericsson.com>
12411
12412 * common/ptid.c (ptid_lwp_p, ptid_tid_p): Remove comparison with
12413 minus_one_ptid and null_ptid.
12414
12415 2017-04-05 Pedro Alves <palves@redhat.com>
12416
12417 * warning.m4 (build_warnings): Remove -Wno-write-strings.
12418 * configure: Regenerate.
12419
12420 2017-04-05 Pedro Alves <palves@redhat.com>
12421
12422 * ada-exp.y (yyerror): Constify.
12423 * ada-lang.c (bound_name, get_selections)
12424 (ada_variant_discrim_type)
12425 (ada_variant_discrim_name, ada_value_struct_elt)
12426 (ada_lookup_struct_elt_type, is_unchecked_variant)
12427 (ada_which_variant_applies, standard_exc, ada_get_next_arg)
12428 (catch_ada_exception_command_split)
12429 (catch_ada_assert_command_split, catch_assert_command)
12430 (ada_op_name): Constify.
12431 * ada-lang.h (ada_yyerror, get_selections)
12432 (ada_variant_discrim_name, ada_value_struct_elt): Constify.
12433 * arc-tdep.c (arc_print_frame_cache): Constify.
12434 * arm-tdep.c (arm_skip_stub): Constify.
12435 * ax-gdb.c (gen_binop, gen_struct_ref_recursive, gen_struct_ref)
12436 (gen_aggregate_elt_ref): Constify.
12437 * bcache.c (print_bcache_statistics): Constify.
12438 * bcache.h (print_bcache_statistics): Constify.
12439 * break-catch-throw.c (catch_exception_command_1):
12440 * breakpoint.c (struct ep_type_description::description):
12441 Constify.
12442 (add_solib_catchpoint): Constify.
12443 (catch_fork_command_1): Add cast.
12444 (add_catch_command): Constify.
12445 * breakpoint.h (add_catch_command, add_solib_catchpoint):
12446 Constify.
12447 * bsd-uthread.c (bsd_uthread_state): Constify.
12448 * buildsym.c (patch_subfile_names): Constify.
12449 * buildsym.h (next_symbol_text_func, patch_subfile_names):
12450 Constify.
12451 * c-exp.y (yyerror): Constify.
12452 (token::oper): Constify.
12453 * c-lang.h (c_yyerror, cp_print_class_member): Constify.
12454 * c-varobj.c (cplus_describe_child): Constify.
12455 * charset.c (find_charset_names): Add cast.
12456 (find_charset_names): Constify array and add const_cast.
12457 * cli/cli-cmds.c (complete_command, cd_command): Constify.
12458 (edit_command): Constify.
12459 * cli/cli-decode.c (lookup_cmd): Constify.
12460 * cli/cli-dump.c (dump_memory_command, dump_value_command):
12461 Constify.
12462 (struct dump_context): Constify.
12463 (add_dump_command, restore_command): Constify.
12464 * cli/cli-script.c (get_command_line): Constify.
12465 * cli/cli-script.h (get_command_line): Constify.
12466 * cli/cli-utils.c (check_for_argument): Constify.
12467 * cli/cli-utils.h (check_for_argument): Constify.
12468 * coff-pe-read.c (struct read_pe_section_data): Constify.
12469 * command.h (lookup_cmd): Constify.
12470 * common/print-utils.c (decimal2str): Constify.
12471 * completer.c (gdb_print_filename): Constify.
12472 * corefile.c (set_gnutarget): Constify.
12473 * cp-name-parser.y (yyerror): Constify.
12474 * cp-valprint.c (cp_print_class_member): Constify.
12475 * cris-tdep.c (cris_register_name, crisv32_register_name):
12476 Constify.
12477 * d-exp.y (yyerror): Constify.
12478 (struct token::oper): Constify.
12479 * d-lang.h (d_yyerror): Constify.
12480 * dbxread.c (struct header_file_location::name): Constify.
12481 (add_old_header_file, add_new_header_file, last_function_name)
12482 (dbx_next_symbol_text, add_bincl_to_list)
12483 (find_corresponding_bincl_psymtab, set_namestring)
12484 (find_stab_function_addr, read_dbx_symtab, start_psymtab)
12485 (dbx_end_psymtab, read_ofile_symtab, process_one_symbol):
12486 * defs.h (command_line_input, print_address_symbolic)
12487 (deprecated_readline_begin_hook): Constify.
12488 * dwarf2read.c (anonymous_struct_prefix, dwarf_bool_name):
12489 Constify.
12490 * event-top.c (handle_line_of_input): Constify and add cast.
12491 * exceptions.c (catch_errors): Constify.
12492 * exceptions.h (catch_errors): Constify.
12493 * expprint.c (print_subexp_standard, op_string, op_name)
12494 (op_name_standard, dump_raw_expression, dump_raw_expression):
12495 * expression.h (op_name, op_string, dump_raw_expression):
12496 Constify.
12497 * f-exp.y (yyerror): Constify.
12498 (struct token::oper): Constify.
12499 (struct f77_boolean_val::name): Constify.
12500 * f-lang.c (f_word_break_characters): Constify.
12501 * f-lang.h (f_yyerror): Constify.
12502 * fork-child.c (fork_inferior): Add cast.
12503 * frv-tdep.c (struct gdbarch_tdep::register_names): Constify.
12504 (new_variant): Constify.
12505 * gdbarch.sh (pstring_ptr, pstring_list): Constify.
12506 * gdbarch.c: Regenerate.
12507 * gdbcore.h (set_gnutarget): Constify.
12508 * go-exp.y (yyerror): Constify.
12509 (token::oper): Constify.
12510 * go-lang.h (go_yyerror): Constify.
12511 * go32-nat.c (go32_sysinfo): Constify.
12512 * guile/scm-breakpoint.c (gdbscm_breakpoint_expression): Constify.
12513 * guile/scm-cmd.c (cmdscm_function): Constify.
12514 * guile/scm-param.c (pascm_param_value): Constify.
12515 * h8300-tdep.c (h8300_register_name, h8300s_register_name)
12516 (h8300sx_register_name): Constify.
12517 * hppa-tdep.c (hppa32_register_name, hppa64_register_name):
12518 Constify.
12519 * ia64-tdep.c (ia64_register_names): Constify.
12520 * infcmd.c (construct_inferior_arguments): Constify.
12521 (path_command, attach_post_wait): Constify.
12522 * language.c (show_range_command, show_case_command)
12523 (unk_lang_error): Constify.
12524 * language.h (language_defn::la_error)
12525 (language_defn::la_name_of_this): Constify.
12526 * linespec.c (decode_line_2): Constify.
12527 * linux-thread-db.c (thread_db_err_str): Constify.
12528 * lm32-tdep.c (lm32_register_name): Constify.
12529 * m2-exp.y (yyerror): Constify.
12530 * m2-lang.h (m2_yyerror): Constify.
12531 * m32r-tdep.c (m32r_register_names): Constify and make static.
12532 * m68hc11-tdep.c (m68hc11_register_names): Constify.
12533 * m88k-tdep.c (m88k_register_name): Constify.
12534 * macroexp.c (appendmem): Constify.
12535 * mdebugread.c (fdr_name, add_data_symbol, parse_type)
12536 (upgrade_type, parse_external, parse_partial_symbols)
12537 (mdebug_next_symbol_text, cross_ref, mylookup_symbol, new_psymtab)
12538 (new_symbol): Constify.
12539 * memattr.c (mem_info_command): Constify.
12540 * mep-tdep.c (register_name_from_keyword): Constify.
12541 * mi/mi-cmd-env.c (mi_cmd_env_path, _initialize_mi_cmd_env):
12542 Constify.
12543 * mi/mi-cmd-stack.c (list_args_or_locals): Constify.
12544 * mi/mi-cmd-var.c (mi_cmd_var_show_attributes): Constify.
12545 * mi/mi-main.c (captured_mi_execute_command): Constify and add
12546 cast.
12547 (mi_execute_async_cli_command): Constify.
12548 * mips-tdep.c (mips_register_name): Constify.
12549 * mn10300-tdep.c (register_name, mn10300_generic_register_name)
12550 (am33_register_name, am33_2_register_name)
12551 * moxie-tdep.c (moxie_register_names): Constify.
12552 * nat/linux-osdata.c (osdata_type): Constify fields.
12553 * nto-tdep.c (nto_parse_redirection): Constify.
12554 * objc-lang.c (lookup_struct_typedef, lookup_objc_class)
12555 (lookup_child_selector): Constify.
12556 (objc_methcall::name): Constify.
12557 * objc-lang.h (lookup_objc_class, lookup_child_selector)
12558 (lookup_struct_typedef): Constify.
12559 * objfiles.c (pc_in_section): Constify.
12560 * objfiles.h (pc_in_section): Constify.
12561 * p-exp.y (struct token::oper): Constify.
12562 (yyerror): Constify.
12563 * p-lang.h (pascal_yyerror): Constify.
12564 * parser-defs.h (op_name_standard): Constify.
12565 (op_print::string): Constify.
12566 (exp_descriptor::op_name): Constify.
12567 * printcmd.c (print_address_symbolic): Constify.
12568 * psymtab.c (print_partial_symbols): Constify.
12569 * python/py-breakpoint.c (stop_func): Constify.
12570 (bppy_get_expression): Constify.
12571 * python/py-cmd.c (cmdpy_completer::name): Constify.
12572 (cmdpy_function): Constify.
12573 * python/py-event.c (evpy_add_attribute)
12574 (gdbpy_initialize_event_generic): Constify.
12575 * python/py-event.h (evpy_add_attribute)
12576 (gdbpy_initialize_event_generic): Constify.
12577 * python/py-evts.c (add_new_registry): Constify.
12578 * python/py-finishbreakpoint.c (outofscope_func): Constify.
12579 * python/py-framefilter.c (get_py_iter_from_func): Constify.
12580 * python/py-inferior.c (get_buffer): Add cast.
12581 * python/py-param.c (parm_constant::name): Constify.
12582 * python/py-unwind.c (fprint_frame_id): Constify.
12583 * python/python.c (gdbpy_parameter_value): Constify.
12584 * remote-fileio.c (remote_fio_func_map): Make 'name' const.
12585 * remote.c (memory_packet_config::name): Constify.
12586 (show_packet_config_cmd, remote_write_bytes)
12587 (remote_buffer_add_string):
12588 * reverse.c (exec_reverse_once): Constify.
12589 * rs6000-tdep.c (variant::name, variant::description): Constify.
12590 * rust-exp.y (rustyyerror): Constify.
12591 * rust-lang.c (rust_op_name): Constify.
12592 * rust-lang.h (rustyyerror): Constify.
12593 * serial.h (serial_ops::name): Constify.
12594 * sh-tdep.c (sh_sh_register_name, sh_sh3_register_name)
12595 (sh_sh3e_register_name, sh_sh2e_register_name)
12596 (sh_sh2a_register_name, sh_sh2a_nofpu_register_name)
12597 (sh_sh_dsp_register_name, sh_sh3_dsp_register_name)
12598 (sh_sh4_register_name, sh_sh4_nofpu_register_name)
12599 (sh_sh4al_dsp_register_name): Constify.
12600 * sh64-tdep.c (sh64_register_name): Constify.
12601 * solib-darwin.c (lookup_symbol_from_bfd): Constify.
12602 * spu-tdep.c (spu_register_name, info_spu_dma_cmdlist): Constify.
12603 * stabsread.c (patch_block_stabs, read_type_number)
12604 (ref_map::stabs, ref_add, process_reference)
12605 (symbol_reference_defined, define_symbol, define_symbol)
12606 (error_type, read_type, read_member_functions, read_cpp_abbrev)
12607 (read_one_struct_field, read_struct_fields, read_baseclasses)
12608 (read_tilde_fields, read_struct_type, read_array_type)
12609 (read_enum_type, read_sun_builtin_type, read_sun_floating_type)
12610 (read_huge_number, read_range_type, read_args, common_block_start)
12611 (find_name_end): Constify.
12612 * stabsread.h (common_block_start, define_symbol)
12613 (process_one_symbol, symbol_reference_defined, ref_add):
12614 * symfile.c (get_section_index, add_symbol_file_command):
12615 * symfile.h (get_section_index): Constify.
12616 * target-descriptions.c (tdesc_type::name): Constify.
12617 (tdesc_free_type): Add cast.
12618 * target.c (find_default_run_target):
12619 (add_deprecated_target_alias, find_default_run_target)
12620 (target_announce_detach): Constify.
12621 (do_option): Constify.
12622 * target.h (add_deprecated_target_alias): Constify.
12623 * thread.c (print_thread_info_1): Constify.
12624 * top.c (deprecated_readline_begin_hook, command_line_input):
12625 Constify.
12626 (init_main): Add casts.
12627 * top.h (handle_line_of_input): Constify.
12628 * tracefile-tfile.c (tfile_write_uploaded_tsv): Constify.
12629 * tracepoint.c (tvariables_info_1, trace_status_mi): Constify.
12630 (tfind_command): Rename to ...
12631 (tfind_command_1): ... this and constify.
12632 (tfind_command): New function.
12633 (tfind_end_command, tfind_start_command): Adjust.
12634 (encode_source_string): Constify.
12635 * tracepoint.h (encode_source_string): Constify.
12636 * tui/tui-data.c (tui_partial_win_by_name): Constify.
12637 * tui/tui-data.h (tui_partial_win_by_name): Constify.
12638 * tui/tui-source.c (tui_set_source_content_nil): Constify.
12639 * tui/tui-source.h (tui_set_source_content_nil): Constify.
12640 * tui/tui-win.c (parse_scrolling_args): Constify.
12641 * tui/tui-windata.c (tui_erase_data_content): Constify.
12642 * tui/tui-windata.h (tui_erase_data_content): Constify.
12643 * tui/tui-winsource.c (tui_erase_source_content): Constify.
12644 * tui/tui.c (tui_enable): Add cast.
12645 * utils.c (defaulted_query): Constify.
12646 (init_page_info): Add cast.
12647 (puts_debug, subset_compare): Constify.
12648 * utils.h (subset_compare): Constify.
12649 * varobj.c (varobj_format_string): Constify.
12650 * varobj.h (varobj_format_string): Constify.
12651 * vax-tdep.c (vax_register_name): Constify.
12652 * windows-nat.c (windows_detach): Constify.
12653 * xcoffread.c (process_linenos, xcoff_next_symbol_text): Constify.
12654 * xml-support.c (gdb_xml_end_element): Constify.
12655 * xml-tdesc.c (tdesc_start_reg): Constify.
12656 * xstormy16-tdep.c (xstormy16_register_name): Constify.
12657 * xtensa-tdep.c (xtensa_find_register_by_name): Constify.
12658 * xtensa-tdep.h (xtensa_register_t::name): Constify.
12659
12660 2017-04-05 Pedro Alves <palves@redhat.com>
12661
12662 * proc-api.c (struct trans): Constify.
12663 (procfs_note): Constify.
12664 * proc-events.c (struct trans, syscall_table):
12665 * proc-flags.c (struct trans): Constify.
12666 * proc-utils.h (procfs_note): Constify.
12667 * proc-why.c (struct trans): Constify.
12668 * procfs.c (dead_procinfo, find_syscall, proc_warn, proc_error)
12669 (procfs_detach): Constify.
12670 * sol-thread.c (struct string_map): Constify.
12671 (td_err_string, td_state_string): Constify.
12672
12673 2017-04-05 Pedro Alves <palves@redhat.com>
12674
12675 * proc-api.c (procfs_filename): Don't initialize
12676 procfs_filename.
12677 (prepare_to_trace): Assume procfs_filename is non-NULL.
12678 (_initialize_proc_api): Give procfs_filename a default value here.
12679
12680 2017-04-05 Pedro Alves <palves@redhat.com>
12681
12682 * break-catch-throw.c (handle_gnu_v3_exceptions): Constify
12683 'cond_string' parameter.
12684 (extract_exception_regexp): Constify 'string' parameter.
12685 (catch_exception_command_1): Constify.
12686 * breakpoint.c (init_catchpoint)
12687 (create_fork_vfork_event_catchpoint): Constify 'cond_string'
12688 parameter.
12689 (ep_parse_optional_if_clause, catch_fork_command_1)
12690 (catch_exec_command_1): Constify.
12691 * breakpoint.h (init_catchpoint): Constify 'cond_string'
12692 parameter.
12693 (ep_parse_optional_if_clause): Constify.
12694 * cli/cli-utils.c (remove_trailing_whitespace)
12695 (check_for_argument): Constify.
12696 * cli/cli-utils.h (remove_trailing_whitespace): Constify and add
12697 non-const overload.
12698 (check_for_argument): Likewise.
12699
12700 2017-04-05 Pedro Alves <palves@redhat.com>
12701
12702 * event-top.c (command_line_handler): Add cast to execute_command
12703 call.
12704 * record-btrace.c (cmd_record_btrace_bts_start)
12705 (cmd_record_btrace_pt_start, cmd_record_btrace_start)
12706 (cmd_record_btrace_start): Add cast to execute_command call.
12707 * record-full.c (record_full_goto_insn):
12708 * record.c (record_start, record_stop): Add cast to
12709 execute_command_to_string calls.
12710 (cmd_record_start): Add cast to execute_command calls.
12711
12712 2017-04-05 Pedro Alves <palves@redhat.com>
12713
12714 * python/python-internal.h (gdb_PyArg_ParseTupleAndKeywords): New
12715 static inline function.
12716 * python/py-arch.c (archpy_disassemble): Constify 'keywords'
12717 array and use gdb_PyArg_ParseTupleAndKeywords.
12718 * python/py-cmd.c (cmdpy_init): Likewise.
12719 * python/py-finishbreakpoint.c (bpfinishpy_init): Likewise.
12720 * python/py-inferior.c (infpy_read_memory, infpy_write_memory)
12721 (infpy_search_memory): Likewise.
12722 * python/py-objfile.c (objfpy_add_separate_debug_file)
12723 (gdbpy_lookup_objfile): Likewise.
12724 * python/py-symbol.c (gdbpy_lookup_symbol)
12725 (gdbpy_lookup_global_symbol): Likewise.
12726 * python/py-type.c (gdbpy_lookup_type): Likewise.
12727 * python/py-value.c (valpy_lazy_string, valpy_string): Likewise.
12728 * python/python.c (execute_gdb_command, gdbpy_write, gdbpy_flush):
12729 Likewise.
12730
12731 2017-04-05 Pedro Alves <palves@redhat.com>
12732
12733 * python/python-internal.h (gdb_PyGetSetDef): New type.
12734 * python/py-block.c (block_object_getset)
12735 (breakpoint_object_getset): Now a gdb_PyGetSetDef array.
12736 * python/py-event.c (event_object_getset)
12737 (finish_breakpoint_object_getset): Likewise.
12738 * python/py-inferior.c (inferior_object_getset): Likewise.
12739 * python/py-infthread.c (thread_object_getset): Likewise.
12740 * python/py-lazy-string.c (lazy_string_object_getset): Likewise.
12741 * python/py-linetable.c (linetable_entry_object_getset): Likewise.
12742 * python/py-objfile.c (objfile_getset): Likewise.
12743 * python/py-progspace.c (pspace_getset): Likewise.
12744 * python/py-record-btrace.c (btpy_insn_getset, btpy_call_getset):
12745 Likewise.
12746 * python/py-record.c (recpy_record_getset): Likewise.
12747 * python/py-symbol.c (symbol_object_getset): Likewise.
12748 * python/py-symtab.c (symtab_object_getset, sal_object_getset):
12749 Likewise.
12750 * python/py-type.c (type_object_getset, field_object_getset):
12751 Likewise.
12752 * python/py-value.c (value_object_getset): Likewise.
12753
12754 2017-04-05 Pedro Alves <palves@redhat.com>
12755
12756 * python/python-internal.h (gdb_PyObject_CallMethod)
12757 (gdb_PyErr_NewException, gdb_PySys_GetObject, gdb_PySys_SetPath):
12758 New functions.
12759 (GDB_PYSYS_SETPATH_CHAR, PyObject_CallMethod, PyErr_NewException)
12760 (PySys_GetObject, PySys_SetPath): New macros.
12761
12762 2017-04-05 Pedro Alves <palves@redhat.com>
12763
12764 * mi/mi-cmd-info.c (mi_cmd_info_os): Call info_osdata instead of
12765 info_osdata_command.
12766 * osdata.c (info_osdata_command): Rename to ...
12767 (info_osdata): ... this. Constify 'type' parameter, and remove
12768 the 'from_tty' parameter. Accept NULL TYPE.
12769 (info_osdata_command): New function.
12770 * osdata.h (info_osdata_command): Remove declaration.
12771 (info_osdata): New declaration.
12772
12773 2017-04-05 Pedro Alves <palves@redhat.com>
12774
12775 * mi/mi-cmd-break.c (mi_cmd_break_insert_1, mi_cmd_break_insert)
12776 (mi_cmd_dprintf_insert, mi_cmd_break_passcount)
12777 (mi_cmd_break_watch, mi_cmd_break_commands): Constify 'command'
12778 parameter.
12779 * mi/mi-cmd-catch.c (mi_cmd_catch_assert, mi_cmd_catch_exception)
12780 (mi_cmd_catch_load, mi_cmd_catch_unload): Constify cmd' parameter.
12781 * mi/mi-cmd-disas.c (mi_cmd_disassemble): Constify 'command'
12782 parameter.
12783 * mi/mi-cmd-env.c (mi_cmd_env_pwd, mi_cmd_env_cd, mi_cmd_env_path)
12784 (mi_cmd_env_dir, mi_cmd_inferior_tty_set, _cmd_inferior_tty_show)
12785 * mi/mi-cmd-file.c (mi_cmd_file_list_exec_source_file)
12786 (mi_cmd_file_list_exec_source_files)
12787 (mi_cmd_file_list_shared_libraries): Constify 'command' parameter.
12788 * mi/mi-cmd-info.c (mi_cmd_info_ada_exceptions)
12789 (mi_cmd_info_gdb_mi_command, mi_cmd_info_os): Constify 'command'
12790 parameter.
12791 * mi/mi-cmd-stack.c (mi_cmd_enable_frame_filters)
12792 (mi_cmd_stack_list_frames, mi_cmd_stack_info_depth)
12793 (mi_cmd_stack_list_locals, mi_cmd_stack_list_args)
12794 (mi_cmd_stack_list_variables, mi_cmd_stack_select_frame)
12795 (mi_cmd_stack_info_frame): Constify 'command' parameter.
12796 * mi/mi-cmd-target.c (mi_cmd_target_file_get)
12797 (mi_cmd_target_file_put, mi_cmd_target_file_delete): Constify
12798 'command' parameter.
12799 * mi/mi-cmd-var.c (mi_cmd_var_create, mi_cmd_var_delete)
12800 (mi_cmd_var_set_format, mi_cmd_var_set_visualizer)
12801 (mi_cmd_var_set_frozen, mi_cmd_var_show_format)
12802 (mi_cmd_var_info_num_children, mi_cmd_var_list_children)
12803 (mi_cmd_var_info_type, mi_cmd_var_info_path_expression)
12804 (mi_cmd_var_info_expression, mi_cmd_var_show_attributes)
12805 (mi_cmd_var_evaluate_expression, mi_cmd_var_assign)
12806 (mi_cmd_var_update, mi_cmd_enable_pretty_printing)
12807 (mi_cmd_var_set_update_range): Constify 'command' parameter.
12808 * mi/mi-cmds.h (mi_cmd_argv_ftype): Constify 'command' parameter.
12809 * mi/mi-interp.c (mi_cmd_interpreter_exec): Constify 'command'
12810 parameter.
12811 * mi/mi-main.c (mi_cmd_gdb_exit, mi_cmd_exec_next)
12812 (mi_cmd_exec_next_instruction, mi_cmd_exec_step)
12813 (mi_cmd_exec_step_instruction, mi_cmd_exec_finish)
12814 (mi_cmd_exec_return ,mi_cmd_exec_jump, mi_cmd_exec_continue)
12815 (mi_cmd_exec_interrupt, mi_cmd_exec_run, mi_cmd_target_detach)
12816 (mi_cmd_target_flash_erase, mi_cmd_thread_select)
12817 (mi_cmd_thread_list_ids, mi_cmd_thread_info)
12818 (mi_cmd_list_thread_groups, mi_cmd_data_list_register_names)
12819 (mi_cmd_data_list_changed_registers)
12820 (mi_cmd_data_write_register_values)
12821 (mi_cmd_data_evaluate_expression, mi_cmd_data_read_memory)
12822 (mi_cmd_data_read_memory_bytes, mi_cmd_data_write_memory)
12823 (mi_cmd_data_write_memory_bytes, mi_cmd_enable_timings)
12824 (mi_cmd_list_features, mi_cmd_list_target_features)
12825 (mi_cmd_add_inferior, mi_cmd_remove_inferior)
12826 (mi_cmd_trace_define_variable, mi_cmd_trace_list_variables)
12827 (mi_cmd_trace_find, mi_cmd_trace_save, mi_cmd_trace_start)
12828 (mi_cmd_trace_status, mi_cmd_trace_stop, mi_cmd_ada_task_info)
12829 (mi_cmd_trace_frame_collected): Constify 'command'
12830 parameter.
12831 * mi/mi-symbol-cmds.c (mi_cmd_symbol_list_lines): Constify
12832 'command' parameter.
12833
12834 2017-04-05 Pedro Alves <palves@redhat.com>
12835
12836 * ada-lang.c (ada_completer_word_break_characters): Now a const
12837 array.
12838 (ada_get_gdb_completer_word_break_characters): Constify.
12839 * completer.c (gdb_completer_command_word_break_characters)
12840 (gdb_completer_file_name_break_characters)
12841 (gdb_completer_quote_characters): Now const arrays.
12842 (get_gdb_completer_quote_characters): Constify.
12843 (set_rl_completer_word_break_characters): New function.
12844 (set_gdb_completion_word_break_characters)
12845 (complete_line_internal): Use it.
12846 * completer.h (get_gdb_completer_quote_characters): Constify.
12847 (set_rl_completer_word_break_characters): Declare.
12848 * f-lang.c (f_word_break_characters): Constify.
12849 * language.c (default_word_break_characters): Constify.
12850 * language.h (language_defn::la_word_break_characters): Constify.
12851 (default_word_break_characters): Constify.
12852 * top.c (init_main): Use set_rl_completer_word_break_characters.
12853
12854 2017-04-05 Pedro Alves <palves@redhat.com>
12855
12856 * aix-thread.c (aix_thread_pid_to_str)
12857 (aix_thread_extra_thread_info): Constify.
12858 * bsd-kvm.c (bsd_kvm_pid_to_str): Constify.
12859 * bsd-uthread.c (bsd_uthread_extra_thread_info)
12860 (bsd_uthread_pid_to_str): Constify.
12861 * corelow.c (core_pid_to_str): Constify.
12862 * darwin-nat.c (darwin_pid_to_str): Constify.
12863 * fbsd-nat.c (fbsd_pid_to_str): Constify.
12864 * fbsd-tdep.c (fbsd_core_pid_to_str, gdbarch_core_pid_to_str):
12865 Constify.
12866 * gnu-nat.c (gnu_pid_to_str): Constify.
12867 * go32-nat.c (go32_pid_to_str): Constify.
12868 * i386-cygwin-tdep.c (i386_windows_core_pid_to_str): Constify.
12869 * inf-ptrace.c (inf_ptrace_pid_to_str): Constify.
12870 * inferior.c (inferior_pid_to_str): Constify.
12871 * linux-nat.c (linux_nat_pid_to_str): Constify.
12872 * linux-tdep.c (linux_core_pid_to_str): Constify.
12873 * linux-thread-db.c (thread_db_pid_to_str)
12874 (thread_db_extra_thread_info): Constify.
12875 * nto-tdep.c (nto_extra_thread_info): Constify.
12876 * nto-tdep.h (nto_extra_thread_info): Constify.
12877 * obsd-nat.c (obsd_pid_to_str): Constify.
12878 * procfs.c (procfs_pid_to_str): Constify.
12879 * ravenscar-thread.c (ravenscar_extra_thread_info)
12880 (ravenscar_pid_to_str): Constify.
12881 * remote-sim.c (gdbsim_pid_to_str): Constify.
12882 * remote.c (remote_threads_extra_info, remote_pid_to_str):
12883 Constify.
12884 * sol-thread.c (solaris_pid_to_str): Constify.
12885 * sol2-tdep.c (sol2_core_pid_to_str): Constify.
12886 * sol2-tdep.h (sol2_core_pid_to_str): Constify.
12887 * target.c (default_pid_to_str, target_pid_to_str)
12888 (normal_pid_to_str, default_pid_to_str): Constify.
12889 * target.h (target_ops::to_pid_to_str)
12890 (target_ops::to_extra_thread_info): Constify.
12891 (target_pid_to_str, normal_pid_to_str): Constify.
12892 * windows-nat.c (windows_pid_to_str): Constify.
12893 * gdbarch.sh (core_pid_to_str): Constify.
12894 * target-delegates.c: Regenerate.
12895 * gdbarch.h, gdbarch.c: Regenerate.
12896
12897 2017-04-05 Pedro Alves <palves@redhat.com>
12898
12899 * main.c (captured_main_1): Use gdb::unique_xmalloc_ptr to manage
12900 the memory of the temporary warning_pre_print override.
12901 * utils.c (warning_pre_print): Constify.
12902 * utils.h (warning_pre_print): Constify.
12903
12904 2017-04-05 Pedro Alves <palves@redhat.com>
12905
12906 * cli/cli-cmds.c (shell_escape): Constify 'arg' parameter.
12907 (shell_command): New function.
12908 (make_command): Use std::string.
12909 (init_cli_cmds): Register shell_command instead of shell_escape.
12910
12911 2017-04-05 Pedro Alves <palves@redhat.com>
12912
12913 * breakpoint.c (dprintf_function, dprintf_channel): Don't initialize.
12914 * tracepoint.c (default_collect): Don't initialize.
12915
12916 2017-04-05 Pedro Alves <palves@redhat.com>
12917
12918 * macroexp.c (macro_buffer::shared): Now a bool.
12919 (init_buffer): Update.
12920 (init_shared_buffer): Constify 'addr' parameter.
12921 (substitute_args, expand, macro_expand, macro_expand_next): Remove
12922 casts.
12923
12924 2017-04-05 Pedro Alves <palves@redhat.com>
12925
12926 * arm-tdep.c (show_disassembly_style_sfunc): Constify local.
12927 * disasm.c (set_disassembler_options): Constify local.
12928 * i386-tdep.c (i386_print_insn): Remove cast and FIXME comment.
12929
12930 2017-04-05 Sergio Durigan Junior <sergiodj@redhat.com>
12931
12932 PR gdb/21352
12933 * tracefile.c (tsave_command): Fix argument parsing for '-r'
12934 option.
12935
12936 2017-04-05 Yao Qi <yao.qi@linaro.org>
12937
12938 * frame.c (frame_unwind_register_unsigned): Call
12939 frame_unwind_register_value.
12940
12941 2017-04-05 Yao Qi <yao.qi@linaro.org>
12942
12943 * gdb.threads/thread-specific-bp.exp (check_thread_specific_breakpoint):
12944 Use gdb_test_multiple, and don't match anchor.
12945
12946 2017-04-05 Pedro Alves <palves@redhat.com>
12947
12948 * MAINTAINERS (Global Maintainers): Add Simon Marchi.
12949 (Write After Approval): Remove Simon Marchi.
12950
12951 2017-04-05 Pedro Alves <palves@redhat.com>
12952
12953 * common/gdb_optional.h (optional::optional): Make constexpr and
12954 initialize m_dummy.
12955
12956 2017-04-04 John Baldwin <jhb@FreeBSD.org>
12957
12958 * amd64-fbsd-tdep.c: Remove "bsd-uthread.h" include.
12959 (amd64fbsd_jmp_buf_reg_offset): Remove.
12960 (amd64fbsd_supply_uthread): Remove function.
12961 (amd64fbsd_collect_uthread): Remove function.
12962 (amd64fbsd_init_abi): Don't set bsd-uthread callbacks.
12963 * configure.tgt (i[34567]86-*-freebsd*): Remove bsd-uthread.o.
12964 (x86_64-*-freebsd*): Remove bsd-uthread.o.
12965 (fbsd-nat.c): Update comment.
12966 * i386-fbsd-tdep.c: Remove "bsd-uthread.h" include.
12967 (i386fbsd_jmp_buf_reg_offset): Remove.
12968 (i386fbsd_supply_uthread): Remove function.
12969 (i386fbsd_collect_uthread): Remove function.
12970 (i386fbsd_init_abi): Don't set bsd-uthread callbacks.
12971
12972 2017-04-04 John Baldwin <jhb@FreeBSD.org>
12973
12974 * Makefile.in (ALL_64_TARGET_OBS): Remove alpha-fbsd-tdep.o.
12975 (ALLDEPFILES): Remove alpha-fbsd-tdep.c
12976 * NEWS: Mention that support for FreeBSD/alpha was removed.
12977 * alpha-fbsd-tdep.c: Delete file.
12978 * config/alpha/fbsd.mh: Delete file.
12979 * configure.host: Delete alpha*-*-freebsd* and
12980 alpha*-*-kfreebsd*-gnu.
12981 * configure.tgt: Delete alpha*-*-freebsd* and
12982 alpha*-*-kfreebsd*-gnu.
12983
12984 2017-04-04 John Baldwin <jhb@FreeBSD.org>
12985
12986 * amd64-bsd-nat.c (amd64bsd_fetch_inferior_registers,
12987 amd64bsd_store_inferior_registers): Use ptid from regcache.
12988
12989 2017-04-04 Pedro Alves <palves@redhat.com>
12990
12991 * dwarf2read.c (lnp_state_machine): Now a class. Initialize all
12992 data fields, make them private and add "m_" prefixes.
12993 (lnp_state_machine::lnp_state_machine): New ctor.
12994 (record_line, check_line_address, handle_set_discriminator)
12995 (handle_set_address, handle_advance_pc, handle_special_opcode)
12996 (handle_advance_line, handle_set_file, handle_negate_stmt)
12997 (handle_const_add_pc, handle_fixed_advance_pc, handle_copy)
12998 (end_sequence, advance_line): New methods.
12999 (m_gdbarch, m_record_lines_p): New fields.
13000 (lnp_reader_state): Delete.
13001 (dwarf_record_line): Rename to ...
13002 (lnp_state_machine::record_line): ... adjust.
13003 (init_lnp_state_machine): Delete.
13004 (lnp_state_machine::lnp_state_machine): New.
13005 (check_line_address): Rename to ...
13006 (lnp_state_machine::check_line_address): This.
13007 (dwarf_decode_lines_1): Remove reference to "reader_state".
13008 Adjust lnp_state_machine having a non-default ctor. Use bool.
13009 State machine internal state manipulation moved to
13010 lnp_state_machine methods.
13011
13012 2017-04-04 Pedro Alves <palves@redhat.com>
13013
13014 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
13015 unittests/offset-type-selftests.c.
13016 (SUBDIR_UNITTESTS_OBS): Add offset-type-selftests.o.
13017 * common/offset-type.h: New file.
13018 * common/preprocessor.h: New file.
13019 * common/traits.h: New file.
13020 * common/valid-expr.h: New file.
13021 * dwarf2expr.c: Include "common/underlying.h". Adjust to use
13022 sect_offset and cu_offset strong typedefs throughout.
13023 * dwarf2expr.h: Adjust to use sect_offset and cu_offset strong
13024 typedefs throughout.
13025 * dwarf2loc.c: Include "common/underlying.h". Adjust to use
13026 sect_offset and cu_offset strong typedefs throughout.
13027 * dwarf2read.c: Adjust to use sect_offset and cu_offset strong
13028 typedefs throughout.
13029 * gdbtypes.h: Include "common/offset-type.h".
13030 (cu_offset): Now an offset type (strong typedef) instead of a
13031 struct.
13032 (sect_offset): Likewise.
13033 (union call_site_parameter_u): Rename "param_offset" field to
13034 "param_cu_off".
13035 * unittests/offset-type-selftests.c: New file.
13036
13037 2017-04-04 Pedro Alves <palves@redhat.com>
13038
13039 * common/underlying.h: New file.
13040 * dwarf2read.c: Include "common/gdb_optional.h" and
13041 "common/underlying.h".
13042 (dir_index, file_name_index): New types.
13043 (file_entry): Use them.
13044 (file_entry::include): Use to_underlying.
13045 (line_header::add_file_name): Use dir_index.
13046 (read_formatted_entries): Use gdb::optional. Read form before
13047 writting to file_entry.
13048 (dwarf_decode_line_header): Use dir_index.
13049 (lnp_state_machine::current_file): Use to_underlying.
13050 (lnp_state_machine::file): Change type to file_name_index.
13051 (dwarf_record_line): Use to_underlying.
13052 (init_lnp_state_machine): Use file_name_index.
13053 (dwarf_decode_lines_1): Use dir_index and file_name_index.
13054
13055 2017-04-04 Pedro Alves <palves@redhat.com>
13056
13057 * common/gdb_optional.h (gdb::optiona): Add operator->, operator*,
13058 operator bool, has_value and get methods.
13059
13060 2017-04-04 Pedro Alves <palves@redhat.com>
13061
13062 * dwarf2read.c (struct file_entry): Add ctors, and initialize all
13063 fields.
13064 (line_header): Initialize all data fields. Change type of
13065 standard_opcode_lengths to std::unique_ptr<unsigned char[]>.
13066 Change type of include_dirs to std::vector<const char *>. Remove
13067 num_include_dirs, include_dirs_size. Change type of file_names to
13068 std::vector<file_entry>. Remove num_file_names, file_names_size.
13069 (line_header::line_header): New.
13070 (line_header::add_include_dir, line_header::add_file_name): New
13071 methods.
13072 (line_header::include_dir_at): Remove NULL check.
13073 (line_header::file_name_at): Add const overload.
13074 (line_header_up): New unique_ptr typedef.
13075 (dw2_get_file_names_reader): Use line_header_up. Adjust to use
13076 std::vector. Remove free_line_header call.
13077 (dwarf2_build_include_psymtabs): Use line_header_up. Remove
13078 free_line_header call.
13079 (free_cu_line_header): Delete.
13080 (handle_DW_AT_stmt_list, handle_DW_AT_stmt_list)
13081 (setup_type_unit_groups): Use line_header_up instead of cleanups.
13082 Adjust to use std::vector.
13083 (free_line_header): Delete.
13084 (free_line_header_voidp): Use delete.
13085 (add_include_dir): Replace with ...
13086 (line_header::add_include_dir): ... this method. Use std::vector.
13087 (add_file_name): Replace with ...
13088 (line_header::add_file_name): ... this method. Use std::vector.
13089 (add_include_dir_stub): Delete.
13090 (read_formatted_entries): Remove memset.
13091 (dwarf_decode_line_header): Return a line_header_up instead of a
13092 raw pointer. Remove cleanup handling. Pass lambdas to
13093 read_formatted_entries. Adjust to use line_header methods.
13094 (dwarf_decode_lines_1): Adjust to use line_header methods.
13095 (dwarf_decode_lines, file_file_name, file_full_name): Adjust to
13096 use std::vector.
13097
13098 2017-04-04 Simon Marchi <simon.marchi@polymtl.ca>
13099
13100 * remote.c (set_general_thread, set_continue_thread): Use ptid_t
13101 instead of struct ptid.
13102
13103 2017-05-04 Alan Hayward <alan.hayward@arm.com>
13104
13105 * frame.c (get_frame_register_bytes): Unwind using value.
13106 (put_frame_register_bytes): Likewise.
13107
13108 2017-03-30 Iain Buclaw <ibuclaw@gdcproject.org>
13109
13110 * d-exp.y (type_aggregate_p): Treat TYPE_CODE_MODULE as being
13111 aggregate-like.
13112
13113 2017-03-29 Jan Kratochvil <jan.kratochvil@redhat.com>
13114
13115 * auto-load.c (auto_load_section_scripts): Check SEC_HAS_CONTENTS.
13116
13117 2017-03-29 Yao Qi <yao.qi@linaro.org>
13118
13119 * gdbthread.h (struct thread_info): Declare constructor and
13120 destructor. Add some in-class member initializers.
13121 * thread.c (free_thread): Remove.
13122 (init_thread_list): Call delete instead of free_thread.
13123 (new_thread): Call thread_info constructor.
13124 (thread_info::thread_info): New function.
13125 (thread_info::~thread_info): New function.
13126 (delete_thread_1): Call delete instead of free_thread.
13127 (make_cleanup_restore_current_thread): Move tp and frame to
13128 inner block.
13129
13130 2017-03-28 Anton Kolesov <anton.kolesov@synopsys.com>
13131
13132 * arc-tdep.c (arc_frame_cache): Add support for prologue analysis.
13133 (arc_skip_prologue): Likewise.
13134 (arc_make_frame_cache): Likewise.
13135 (arc_pv_get_operand): New function.
13136 (arc_is_in_prologue): Likewise.
13137 (arc_analyze_prologue): Likewise.
13138 (arc_print_frame_cache): Likewise.
13139 (MAX_PROLOGUE_LENGTH): New constant.
13140
13141 2017-03-28 Anton Kolesov <anton.kolesov@synopsys.com>
13142
13143 * configure.tgt: Add arc-insn.o.
13144 * arc-tdep.c (arc_delayed_print_insn): Make non-static.
13145 (dump_arc_instruction_command): New function.
13146 (arc_fprintf_disasm): Likewise.
13147 (arc_disassemble_info): Likewise.
13148 (arc_insn_get_operand_value): Likewise.
13149 (arc_insn_get_operand_value_signed): Likewise.
13150 (arc_insn_get_memory_base_reg): Likewise.
13151 (arc_insn_get_memory_offset): Likewise.
13152 (arc_insn_get_branch_target): Likewise.
13153 (arc_insn_dump): Likewise.
13154 (arc_insn_get_linear_next_pc): Likewise.
13155 * arc-tdep.h (arc_delayed_print_insn): Add function declaration.
13156 (arc_disassemble_info): Likewise.
13157 (arc_insn_get_branch_target): Likewise.
13158 (arc_insn_get_linear_next_pc): Likewise.
13159 * NEWS: Mention new "maint print arc arc-instruction".
13160
13161 2017-03-28 Anton Kolesov <anton.kolesov@synopsys.com>
13162
13163 * arc-tdep (maintenance_print_arc_list): New variable.
13164 (maintenance_print_arc_command): New function.
13165
13166 2017-03-28 Anton Kolesov <anton.kolesov@synopsys.com>
13167
13168 * arc-tdep.c (core_v2_register_names, core_arcompact_register_names)
13169 Add "limm" and "reserved".
13170 (arc_cannot_fetch_register, arc_cannot_store_register): Add
13171 ARC_RESERVED_REGNUM and ARC_LIMM_REGNUM.
13172 * arc-tdep.h (arc_regnum): Likewise.
13173
13174 2017-03-27 Max Filippov <jcmvbkbc@gmail.com>
13175
13176 * xtensa-linux-nat.c (fill_gregset): Call regcache_raw_collect
13177 for THREADPTR register.
13178 (supply_gregset_reg): Call regcache_raw_supply for THREADPTR
13179 register.
13180 * xtensa-tdep.c (XTENSA_DBREGN_UREG): New definition.
13181 (xtensa_derive_tdep): Initialize tdep->threadptr_regnum.
13182 * xtensa-tdep.h (gdbarch_tdep::threadptr_regnum): New field.
13183
13184 2017-03-27 Max Filippov <jcmvbkbc@gmail.com>
13185
13186 * xtensa-tdep.c (xtensa_pseudo_register_read): Treat all
13187 registers above gdbarch_num_regs (gdbarch) as privileged in
13188 call0 ABI.
13189
13190 2017-03-27 Max Filippov <jcmvbkbc@gmail.com>
13191
13192 * xtensa-linux-nat.c (fill_gregset): Call regcache_raw_collect
13193 for a single specified register or for all registers in
13194 a0_base..a0_base + C0_NREGS range.
13195 (supply_gregset_reg): Call regcache_raw_supply for a single
13196 specified register or for all registers in a0_base..a0_base +
13197 C0_NREGS range.
13198
13199 2017-03-27 Max Filippov <jcmvbkbc@gmail.com>
13200
13201 * arch/xtensa.h (C0_NREGS): Add definition.
13202 * xtensa-tdep.c (C0_NREGS): Remove definition.
13203
13204 2017-03-27 Max Filippov <jcmvbkbc@gmail.com>
13205
13206 * xtensa-tdep.c (xtensa_scan_prologue, call0_analyze_prologue):
13207 Drop xtensa_default_isa initialization.
13208 (xtensa_gdbarch_init): Initialize xtensa_default_isa.
13209
13210 2017-03-27 Pedro Alves <palves@redhat.com>
13211
13212 * dwarf2read.c (file_entry) <dir_index>: Add comment.
13213 (file_entry::include_dir): New method.
13214 (line_header::include_dir_at, line_header::file_name_at): New
13215 methods.
13216 (setup_type_unit_groups, setup_type_unit_groups)
13217 (psymtab_include_file_name): Simplify using the new methods.
13218 (lnp_state_machine) <the_line_header>: New field.
13219 <file>: Add comment.
13220 (lnp_state_machine::current_file): New method.
13221 (dwarf_record_line): Simplify using the new methods.
13222 (init_lnp_state_machine): Initialize the "the_line_header" field.
13223 (dwarf_decode_lines_1, dwarf_decode_lines, file_file_name):
13224 Simplify using the new methods.
13225
13226 2017-03-27 Pedro Alves <palves@redhat.com>
13227
13228 * cp-name-parser.y (make_empty): Delete.
13229 (demangler_special, nested_name, ptr_operator, array_indicator)
13230 (direct_declarator, declarator_1): Use fill_comp instead of
13231 make_empty.
13232
13233 2017-03-27 Pedro Alves <palves@redhat.com>
13234
13235 * xml-support.h (gdb_xml_debug): Pass a "first-to-check" argument
13236 to ATTRIBUTE_PRINTF.
13237 * solib-target.c (library_list_start_list): Print "string" not
13238 "version".
13239 * xml-tdesc.c (tdesc_start_field): Pass "field_name" to
13240 gdb_xml_error call.
13241
13242 2017-03-27 Pedro Alves <palves@redhat.com>
13243
13244 * dwarf2read.c (struct file_and_directory): New.
13245 (dwarf2_get_dwz_file): Adjust to use std::string.
13246 (dw2_get_file_names_reader): Adjust to use file_and_directory.
13247 (find_file_and_directory): Adjust to return a file_and_directory
13248 object.
13249 (read_file_scope): Adjust to use file_and_directory. Remove
13250 make_cleanup/do_cleanups calls.
13251 (open_and_init_dwp_file): Adjust to use std::string. Remove
13252 make_cleanup/do_cleanups calls.
13253 * python/python.c (do_start_initialization): Adjust to ldirname
13254 returning a std::string.
13255 * utils.c (ldirname): Now returns a std::string.
13256 * utils.h (ldirname): Change return type to std::string.
13257 * xml-syscall.c (xml_init_syscalls_info): Adjust to ldirname
13258 returning a std::string.
13259 * xml-tdesc.c (file_read_description_xml): Likewise.
13260
13261 2017-03-24 Alan Hayward <alan.hayward@arm.com>
13262
13263 * regcache.c (regcache_debug_print_register): New function.
13264 * regcache.h (regcache_debug_print_register): New declaration.
13265 * target.c (debug_print_register): Remove.
13266 (target_fetch_registers): Call regcache_debug_print_register.
13267 (target_store_registers): Likewise.
13268
13269 2017-03-24 Pádraig Brady <pbrady@fb.com>
13270
13271 * dwarf2read.c (setup_type_unit_groups): Ensure dir_index doesn't
13272 reference beyond the 'lh->include_dirs' array before accessing to
13273 it.
13274 (psymtab_include_file_name): Likewise.
13275 (dwarf_decode_lines_1): Likewise.
13276 (dwarf_decode_lines): Likewise.
13277 (file_file_name): Likewise.
13278
13279 2017-03-23 Simon Marchi <simon.marchi@ericsson.com>
13280
13281 * fbsd-tdep.c (fbsd_corefile_thread): Don't set/restore
13282 inferior_ptid.
13283 * proc-service.c (ps_lgetregs, ps_lsetregs, ps_lgetfpregs,
13284 ps_lsetfpregs): Likewise.
13285 * regcache.c (regcache_raw_update, regcache_raw_write): Likewise.
13286 * sol-thread.c (ps_lgetregs, ps_lsetregs, ps_lgetfpregs,
13287 ps_lsetfpregs): Likewise.
13288 * target.c (target_fetch_registers, target_store_registers):
13289 Remove asserts.
13290
13291 2017-03-23 Alan Hayward <alan.hayward@arm.com>
13292
13293 * sol-thread.c (sol_thread_store_registers): Remove regcache calls.
13294
13295 2017-03-23 Yao Qi <yao.qi@linaro.org>
13296
13297 * aarch64-tdep.c (aarch64_process_record_test): Declare.
13298 (_initialize_aarch64_tdep): Register it.
13299 (aarch64_record_load_store): Handle PRFM instruction.
13300 (aarch64_process_record_test): New function.
13301
13302 2017-03-23 Yao Qi <yao.qi@linaro.org>
13303
13304 * aarch64-tdep.c (aarch64_record_load_store): Fix code
13305 indentation.
13306
13307 2017-03-23 Yao Qi <yao.qi@linaro.org>
13308
13309 * aarch64-tdep.c: Remove AARCH64_RECORD_FAILURE.
13310
13311 2017-03-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
13312
13313 python/python.c (do_start_initialization): Fix memory leak.
13314
13315 2017-03-22 Simon Marchi <simon.marchi@polymtl.ca>
13316
13317 * inf-ptrace.c (inf_ptrace_xfer_partial): Get pid from ptid
13318 using get_ptrace_pid.
13319 * linux-nat.c (linux_nat_xfer_partial): Don't set/restore
13320 inferior_ptid.
13321 (linux_proc_xfer_partial, linux_proc_xfer_spu): Use lwp of
13322 inferior_ptid instead of pid.
13323
13324 2017-03-22 Yao Qi <yao.qi@linaro.org>
13325
13326 * aarch64-tdep.c: Wrap locally used classes in anonymous
13327 namespace.
13328 * arm-tdep.c: Likewise.
13329 * linespec.c: Likewise.
13330 * ui-out.c: Likewise.
13331
13332 2017-03-22 Jonah Graham <jonah@kichwacoders.com>
13333
13334 PR gdb/19637
13335 * python/lib/gdb/printer/bound_registers.py: Import sys.
13336
13337 2017-03-21 Simon Marchi <simon.marchi@ericsson.com>
13338
13339 * windows-nat.c (do_windows_fetch_inferior_registers): Add
13340 windows_thread_info parameter and use it instead of
13341 current_thread.
13342 (windows_fetch_inferior_registers): Don't set current_thread,
13343 pass the thread to do_windows_fetch_inferior_registers. Use
13344 ptid from regcache instead of inferior_ptid.
13345 (do_windows_store_inferior_registers): Add windows_thread_info
13346 parameter and use it instead of current_thread.
13347 (windows_store_inferior_registers): Don't set current_thread,
13348 pass the thread to do_windows_store_inferior_registers. Use
13349 ptid from regcache instead of inferior_ptid.
13350
13351 2017-03-21 Simon Marchi <simon.marchi@ericsson.com>
13352
13353 * ser-mingw.c (ser_windows_raw): Remove reference to
13354 struct serial::current_timeout.
13355
13356 2017-03-21 Ivo Raisr <ivo.raisr@oracle.com>
13357
13358 PR tdep/20928
13359 * gdb/sparc-tdep.h (gdbarch_tdep) <sparc64_ccr_type>: New field.
13360 * gdb/sparc64-tdep.c (sparc64_ccr_type): New function.
13361 (sparc64_fsr_type): Fix %fsr decoding.
13362
13363 2017-03-21 Tim Wiederhake <tim.wiederhake@intel.com>
13364
13365 * python/py-record-btrace.c (btpy_insn_data): Change return type
13366 for Python 2.
13367
13368 2017-03-20 Simon Marchi <simon.marchi@polymtl.ca>
13369
13370 * spu-linux-nat.c (spu_fetch_inferior_registers,
13371 spu_store_inferior_registers): Use ptid from regcache, set and
13372 restore inferior_ptid.
13373 * spu-multiarch.c (spu_fetch_registers, spu_store_registers):
13374 Likewise.
13375
13376 2017-03-20 Simon Marchi <simon.marchi@polymtl.ca>
13377
13378 * i386-linux-nat.c (fetch_register, store_register,
13379 i386_linux_fetch_inferior_registers,
13380 i386_linux_store_inferior_registers): Use ptid from regcache.
13381 * ia64-linux-nat.c (ia64_linux_fetch_register,
13382 ia64_linux_store_register): Likewise.
13383 * inf-ptrace.c (inf_ptrace_fetch_register,
13384 inf_ptrace_store_register): Likewise.
13385 * m32r-linux-nat.c (m32r_linux_fetch_inferior_registers,
13386 m32r_linux_store_inferior_registers): Likewise.
13387 * m68k-bsd-nat.c (m68kbsd_fetch_inferior_registers,
13388 m68kbsd_store_inferior_registers): Likewise.
13389 * m68k-linux-nat.c (fetch_register, store_register,
13390 m68k_linux_fetch_inferior_registers,
13391 m68k_linux_store_inferior_registers): Likewise.
13392 * m88k-bsd-nat.c (m88kbsd_fetch_inferior_registers,
13393 m88kbsd_store_inferior_registers): Likewise.
13394 * mips-fbsd-nat.c (mips_fbsd_fetch_inferior_registers,
13395 mips_fbsd_store_inferior_registers): Likewise.
13396 * mips-linux-nat.c (mips64_linux_regsets_fetch_registers,
13397 mips64_linux_regsets_store_registers): Likewise.
13398 * mips-nbsd-nat.c (mipsnbsd_fetch_inferior_registers,
13399 mipsnbsd_store_inferior_registers): Likewise.
13400 * mips-obsd-nat.c (mips64obsd_fetch_inferior_registers,
13401 mips64obsd_store_inferior_registers): Likewise.
13402 * nto-procfs.c (procfs_fetch_registers, procfs_store_registers):
13403 Likewise.
13404 * ppc-fbsd-nat.c (ppcfbsd_fetch_inferior_registers,
13405 ppcfbsd_store_inferior_registers): Likewise.
13406 * ppc-linux-nat.c (ppc_linux_fetch_inferior_registers,
13407 ppc_linux_store_inferior_registers): Likewise.
13408 * ppc-nbsd-nat.c (ppcnbsd_fetch_inferior_registers,
13409 ppcnbsd_store_inferior_registers): Likewise.
13410 * ppc-obsd-nat.c (ppcobsd_fetch_registers,
13411 ppcobsd_store_registers): Likewise.
13412 * procfs.c (procfs_fetch_registers, procfs_store_registers):
13413 Likewise.
13414 * ravenscar-thread.c (ravenscar_fetch_registers,
13415 ravenscar_store_registers, ravenscar_prepare_to_store):
13416 Likewise.
13417 * record-btrace.c (record_btrace_fetch_registers,
13418 record_btrace_store_registers, record_btrace_prepare_to_store):
13419 Likewise.
13420 * remote-sim.c (gdbsim_fetch_register, gdbsim_store_register):
13421 Lookup inferior using ptid from regcache, instead of
13422 current_inferior.
13423 * remote.c (remote_fetch_registers, remote_store_registers): Use
13424 ptid from regcache.
13425 * rs6000-nat.c (fetch_register, store_register): Likewise.
13426 * s390-linux-nat.c (s390_linux_fetch_inferior_registers,
13427 s390_linux_store_inferior_registers): Likewise.
13428 * sh-nbsd-nat.c (shnbsd_fetch_inferior_registers,
13429 shnbsd_store_inferior_registers): Likewise.
13430 * sol-thread.c (sol_thread_fetch_registers,
13431 sol_thread_store_registers): Likewise.
13432 * sparc-nat.c (sparc_fetch_inferior_registers,
13433 sparc_store_inferior_registers): Likewise.
13434 * tilegx-linux-nat.c (fetch_inferior_registers,
13435 store_inferior_registers): Likewise.
13436 * vax-bsd-nat.c (vaxbsd_fetch_inferior_registers,
13437 vaxbsd_store_inferior_registers): Likewise.
13438 * xtensa-linux-nat.c (fetch_gregs, store_gregs, fetch_xtregs,
13439 store_xtregs): Likewise.
13440
13441 2017-03-20 Artemiy Volkov <artemiyv@acm.org>
13442
13443 PR gdb/14441
13444 * NEWS: Mention support for rvalue references in GDB and python.
13445 * doc/gdb.texinfo (C Plus Plus Expressions): Mention that GDB
13446 supports both lvalue and rvalue references.
13447
13448 2017-03-20 Artemiy Volkov <artemiyv@acm.org>
13449
13450 PR gdb/14441
13451 * gdbtypes.c (rank_one_type): Implement overloading
13452 resolution rules regarding rvalue references.
13453
13454 2017-03-20 Artemiy Volkov <artemiyv@acm.org>
13455
13456 PR gdb/14441
13457 * aarch64-tdep.c (aarch64_type_align)
13458 (aarch64_extract_return_value, aarch64_store_return_value): Change
13459 lvalue reference type checks to general reference type checks.
13460 * amd64-tdep.c (amd64_classify): Likewise.
13461 * amd64-windows-tdep.c (amd64_windows_passed_by_integer_register):
13462 Likewise.
13463 * arm-tdep.c (arm_type_align, arm_extract_return_value)
13464 (arm_store_return_value): Likewise.
13465 * ax-gdb.c (gen_fetch, gen_cast): Likewise.
13466 * c-typeprint.c (c_print_type): Likewise.
13467 * c-varobj.c (adjust_value_for_child_access, c_value_of_variable)
13468 (cplus_number_of_children, cplus_describe_child): Likewise.
13469 * compile/compile-c-symbols.c (generate_vla_size): Likewise.
13470 * completer.c (expression_completer): Likewise.
13471 * cp-support.c (make_symbol_overload_list_adl_namespace):
13472 Likewise.
13473 * darwin-nat-info.c (info_mach_region_command): Likewise.
13474 * dwarf2loc.c (entry_data_value_coerce_ref)
13475 (value_of_dwarf_reg_entry): Likewise.
13476 * eval.c (ptrmath_type_p, evaluate_subexp_standard)
13477 (evaluate_subexp_for_address, evaluate_subexp_for_sizeof):
13478 Likewise.
13479 * findvar.c (extract_typed_address, store_typed_address):
13480 Likewise.
13481 * gdbtypes.c (rank_one_type): Likewise.
13482 * hppa-tdep.c (hppa64_integral_or_pointer_p): Likewise.
13483 * infcall.c (value_arg_coerce): Likewise.
13484 * language.c (pointer_type): Likewise.
13485 * m32c-tdep.c (m32c_reg_arg_type, m32c_m16c_address_to_pointer):
13486 Likewise.
13487 * m88k-tdep.c (m88k_integral_or_pointer_p): Likewise.
13488 * mn10300-tdep.c (mn10300_type_align): Likewise.
13489 * msp430-tdep.c (msp430_push_dummy_call): Likewise.
13490 * ppc-sysv-tdep.c (do_ppc_sysv_return_value)
13491 (ppc64_sysv_abi_push_param, ppc64_sysv_abi_return_value):
13492 Likewise.
13493 * printcmd.c (print_formatted, x_command): Likewise.
13494 * python/py-type.c (typy_get_composite, typy_template_argument):
13495 Likewise.
13496 * python/py-value.c (valpy_referenced_value)
13497 (valpy_get_dynamic_type, value_has_field): Likewise.
13498 * s390-linux-tdep.c (s390_function_arg_integer): Likewise.
13499 * sparc-tdep.c (sparc_integral_or_pointer_p): Likewise.
13500 * sparc64-tdep.c (sparc64_integral_or_pointer_p): Likewise.
13501 * spu-tdep.c (spu_scalar_value_p): Likewise.
13502 * symtab.c (lookup_symbol_aux): Likewise.
13503 * typeprint.c (whatis_exp, print_type_scalar): Likewise.
13504 * valarith.c (binop_types_user_defined_p, unop_user_defined_p):
13505 Likewise.
13506 * valops.c (value_cast_pointers, value_cast)
13507 (value_reinterpret_cast, value_dynamic_cast, value_addr, typecmp)
13508 (value_struct_elt, value_struct_elt_bitpos)
13509 (value_find_oload_method_list, find_overload_match)
13510 (value_rtti_indirect_type): Likewise.
13511 * valprint.c (val_print_scalar_type_p, generic_val_print):
13512 Likewise.
13513 * value.c (value_actual_type, value_as_address, unpack_long)
13514 (pack_long, pack_unsigned_long, coerce_ref_if_computed)
13515 (coerce_ref): Likewise.
13516 * varobj.c (varobj_get_value_type): Likewise.
13517
13518 2017-03-20 Artemiy Volkov <artemiyv@acm.org>
13519
13520 PR gdb/14441
13521 * doc/python.texi (Types in Python): Add TYPE_CODE_RVALUE_REF to
13522 table of constants.
13523 * python/lib/gdb/command/explore.py: Support exploring values
13524 of rvalue reference types.
13525 * python/lib/gdb/types.py: Implement get_basic_type() for
13526 rvalue reference types.
13527 * python/py-type.c (pyty_codes) <TYPE_CODE_RVALUE_REF>: New
13528 constant.
13529 * python/py-value.c (valpy_getitem): Add an rvalue reference
13530 check.
13531 (valpy_reference_value): Add new parameter "refcode".
13532 (valpy_lvalue_reference_value, valpy_rvalue_reference_value):
13533 New wrappers for valpy_reference_value().
13534 * python/py-xmethods.c (gdbpy_get_xmethod_result_type)
13535 (gdbpy_invoke_xmethod): Likewise.
13536
13537 2017-03-20 Artemiy Volkov <artemiyv@acm.org>
13538
13539 PR gdb/14441
13540 * dwarf2read.c (process_die, read_type_die_1): Handle the
13541 DW_TAG_rvalue_reference_type DIE.
13542 (read_tag_reference_type): Add new parameter "refcode".
13543
13544 2017-03-20 Artemiy Volkov <artemiyv@acm.org>
13545
13546 PR gdb/14441
13547 * c-typeprint.c (c_print_type, c_type_print_varspec_prefix)
13548 (c_type_print_modifier, c_type_print_varspec_suffix)
13549 (c_type_print_base): Support printing rvalue reference types.
13550 * c-valprint.c (c_val_print, c_value_print): Support printing
13551 rvalue reference values.
13552
13553 2017-03-20 Artemiy Volkov <artemiyv@acm.org>
13554
13555 PR gdb/14441
13556 * cp-name-parser.y (ptr_operator): Handle the '&&' token in
13557 typename.
13558 * cp-support.c (replace_typedefs): Handle
13559 DEMANGLE_COMPONENT_RVALUE_REFERENCE.
13560 * python/py-type.c (typy_lookup_type): Likewise.
13561
13562 2017-03-20 Artemiy Volkov <artemiyv@acm.org>
13563
13564 PR gdb/14441
13565 * c-exp.y (ptr_operator): Handle the '&&' token in the typename.
13566 * parse.c (insert_type): Change assert statement.
13567 (follow_types): Handle rvalue reference types.
13568 * parser-defs.h (enum type_pieces) <tp_rvalue_reference>: New
13569 constant.
13570
13571 2017-03-20 Artemiy Volkov <artemiyv@acm.org>
13572
13573 PR gdb/14441
13574 * ada-lang.c (ada_evaluate_subexp): Adhere to the new
13575 value_ref() interface.
13576 * c-valprint.c (c_value_print): Likewise.
13577 * infcall.c (value_arg_coerce): Likewise.
13578 * python/py-value.c (valpy_reference_value): Likewise.
13579 * valops.c (value_cast, value_reinterpret_cast)
13580 (value_dynamic_cast, typecmp): Likewise.
13581 (value_ref): Parameterize by kind of return value reference type.
13582 * value.h (value_ref): Add new parameter "refcode".
13583
13584 2017-03-20 Artemiy Volkov <artemiyv@acm.org>
13585
13586 PR gdb/14441
13587 * dwarf2read.c (read_tag_reference_type): Use
13588 lookup_lvalue_reference_type() instead of lookup_reference_type().
13589 * eval.c (evaluate_subexp_standard): Likewise.
13590 * f-exp.y: Likewise.
13591 * gdbtypes.c (make_reference_type, lookup_reference_type):
13592 Generalize with rvalue reference types.
13593 (lookup_lvalue_reference_type, lookup_rvalue_reference_type): New
13594 convenience wrappers for lookup_reference_type().
13595 * gdbtypes.h (make_reference_type, lookup_reference_type): Add a
13596 reference kind parameter.
13597 (lookup_lvalue_reference_type, lookup_rvalue_reference_type): Add
13598 wrappers for lookup_reference_type().
13599 * guile/scm-type.c (gdbscm_type_reference): Use
13600 lookup_lvalue_reference_type() instead of lookup_reference_type().
13601 * guile/scm-value.c (gdbscm_value_dynamic_type): Likewise.
13602 * parse.c (follow_types): Likewise.
13603 * python/py-type.c (typy_reference, typy_lookup_type): Likewise.
13604 * python/py-value.c (valpy_get_dynamic_type, valpy_getitem):
13605 Likewise.
13606 * python/py-xmethods.c (gdbpy_get_xmethod_result_type)
13607 (gdbpy_invoke_xmethod): Likewise.
13608 * stabsread.c: Provide extra argument to make_reference_type()
13609 call.
13610 * valops.c (value_ref, value_rtti_indirect_type): Use
13611 lookup_lvalue_reference_type() instead of lookup_reference_type().
13612
13613 2017-03-20 Artemiy Volkov <artemiyv@acm.org>
13614
13615 PR gdb/14441
13616 * gdbtypes.h (enum type_code) <TYPE_CODE_RVALUE_REF>: New constant.
13617 (TYPE_IS_REFERENCE): New macro.
13618 (struct type): Add rvalue_reference_type field.
13619 (TYPE_RVALUE_REFERENCE_TYPE): New macro.
13620
13621 2017-03-20 Marc-Andre Laperle <marc-andre.laperle@ericsson.com>
13622
13623 * NEWS: Add an entry about new '-file-list-shared-libraries' command.
13624 * mi/mi-cmd-file.c (mi_cmd_file_list_shared_libraries):
13625 New function definition.
13626 * mi/mi-cmds.c (mi_cmds): Add -file-list-shared-libraries command.
13627 * mi/mi-cmds.h (mi_cmd_file_list_shared_libraries):
13628 New function declaration.
13629 * mi/mi-interp.c (mi_output_solib_attribs): New Function.
13630 * mi/mi-interp.h: New file.
13631 * solib.c (info_sharedlibrary_command): Replace for loop with
13632 ALL_SO_LIBS macro
13633 * solib.h (update_solib_list): New function declaration.
13634 (so_list_head): Move macro.
13635 * solist.h (ALL_SO_LIBS): New macro.
13636
13637 2017-03-20 Marc-Andre Laperle <marc-andre.laperle@ericsson.com>
13638
13639 * infcmd.c (post_create_inferior): Remove unused argument in
13640 call to solib_add.
13641 * remote.c (remote_start_remote): Likewise.
13642 * solib-frv.c (frv_fetch_objfile_link_map): Likewise.
13643 * solib-svr4.c: (svr4_fetch_objfile_link_map): Likewise.
13644 (enable_break): Likewise.
13645 * solib.c (update_solib_list): Remove unused target argument
13646 and its documentation.
13647 (solib_add): Remove unused target argument. Remove unused
13648 argument in call to update_solib_list.
13649 (info_sharedlibrary_command): Remove unused argument in call
13650 to update_solib_list.
13651 (sharedlibrary_command): Remove unused argument in call to
13652 solib_add.
13653 (handle_solib_event): Likewise.
13654 (reload_shared_libraries): Likewise.
13655 * solib.h (solib_add): Remove unused target argument.
13656
13657 2017-03-20 Andreas Arnez <arnez@linux.vnet.ibm.com>
13658
13659 * s390-linux-tdep.c (is_rsi, is_rie): Remove functions.
13660 (s390_displaced_step_fixup): Cover relative branches with the
13661 default fixup handling. This fixes lack of support for some
13662 relative branch instructions.
13663
13664 2017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
13665
13666 * i386-gnu-nat.c (gnu_fetch_registers, gnu_store_registers): Use
13667 ptid from regcache.
13668
13669 2017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
13670
13671 * i386-darwin-nat.c (i386_darwin_fetch_inferior_registers,
13672 i386_darwin_store_inferior_registers): Use ptid from regcache.
13673
13674 2017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
13675
13676 * i386-bsd-nat.c (i386bsd_fetch_inferior_registers,
13677 i386bsd_store_inferior_registers): Use ptid from regcache.
13678
13679 2017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
13680
13681 * hppa-obsd-nat.c (hppaobsd_fetch_registers,
13682 hppaobsd_store_registers): Use ptid from regcache.
13683
13684 2017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
13685
13686 * hppa-nbsd-nat.c (hppanbsd_fetch_registers,
13687 hppanbsd_store_registers): Use ptid from regcache.
13688
13689 2017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
13690
13691 * hppa-linux-nat.c (fetch_register, store_register): Use ptid
13692 from regcache. Use get_ptrace_pid.
13693
13694 2017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
13695
13696 * corelow.c (get_core_register_section): Use ptid from regcache,
13697 update doc.
13698
13699 2017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
13700
13701 * bsd-uthread.c (bsd_uthread_fetch_registers,
13702 bsd_uthread_store_registers): Use ptid from regcache, set and
13703 restore inferior_ptid.
13704
13705 2017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
13706
13707 * arm-nbsd-nat.c (fetch_register, fetch_regs, fetch_fp_register,
13708 fetch_fp_regs, store_register, store_regs, store_fp_register,
13709 store_fp_regs): Use ptid from regcache.
13710
13711 2017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
13712
13713 * arm-linux-nat.c (fetch_fpregs, store_fpregs, fetch_regs,
13714 store_regs, fetch_wmmx_regs, store_wmmx_regs, fetch_vfp_regs,
13715 store_vfp_regs): Use ptid from regcache.
13716
13717 2017-03-17 Pedro Alves <palves@redhat.com>
13718
13719 PR remote/21188
13720 * ser-base.c (ser_base_wait_for): Add comment.
13721 (do_ser_base_readchar): Improve comment based on the ser-unix.c's
13722 version.
13723 * ser-unix.c (hardwire_raw): Remove reference to
13724 scb->current_timeout.
13725 (wait_for, do_hardwire_readchar, hardwire_readchar): Delete.
13726 (hardwire_ops): Install ser_base_readchar instead of
13727 hardwire_readchar.
13728 * serial.h (struct serial) <current_timeout, timeout_remaining>:
13729 Remove fields.
13730
13731 2017-03-17 Jonah Graham <jonah@kichwacoders.com>
13732
13733 PR gdb/19637
13734 * python/lib/gdb/printer/bound_registers.py: Add support for
13735 Python 3.
13736
13737 2017-03-16 Andreas Arnez <arnez@linux.vnet.ibm.com>
13738
13739 * dwarf2loc.c (indirect_synthetic_pointer): Get data type of
13740 pointed-to DIE and pass it to dwarf2_evaluate_loc_desc_full.
13741 (dwarf2_evaluate_loc_desc_full): New parameter subobj_type; rename
13742 byte_offset to subobj_byte_offset. Fix the handling of
13743 DWARF_VALUE_STACK on big-endian targets when coming via an
13744 implicit pointer.
13745 (dwarf2_evaluate_loc_desc): Adjust call to
13746 dwarf2_evaluate_loc_desc_full.
13747 * dwarf2loc.h (dwarf2_fetch_die_type_sect_off): New declaration.
13748 * dwarf2read.c (dwarf2_fetch_die_type_sect_off): New function.
13749
13750 2017-03-16 Yao Qi <yao.qi@linaro.org>
13751
13752 * arm-tdep.c (thumb_record_misc): Decode CBNZ, CBZ, REV16,
13753 and REVSH instructions.
13754
13755 2017-03-16 Yao Qi <yao.qi@linaro.org>
13756
13757 * arm-tdep.c [GDB_SELF_TEST]: include "selftests.h".
13758 (arm_record_test): Declare.
13759 (_initialize_arm_tdep) [GDB_SELF_TEST]: call register_self_test.
13760 (thumb_record_ld_st_reg_offset): Rewrite the opcode matching to
13761 align with the manual.
13762 (thumb_record_misc): Adjust the code order to align with the
13763 manual.
13764 (thumb2_record_decode_insn_handler): Fix instruction matching.
13765 (instruction_reader_thumb): New class.
13766 (arm_record_test): New function.
13767
13768 2017-03-16 Yao Qi <yao.qi@linaro.org>
13769
13770 * arm-tdep.c (abstract_memory_reader): New class.
13771 (instruction_reader): New class.
13772 (extract_arm_insn): Add argument 'reader'. Callers updated.
13773 (decode_insn): Likewise.
13774
13775 2017-03-16 Doug Evans <dje@google.com>
13776
13777 * guile/scm-lazy-string.c (lazy_string_smob): Clarify use of LENGTH
13778 member. Change type of TYPE member to SCM. All uses updated.
13779 (lsscm_make_lazy_string_smob): Add assert.
13780 (lsscm_make_lazy_string): Flag bad length values.
13781 (lsscm_elt_type): New function.
13782 (gdbscm_lazy_string_to_value): Rewrite to use
13783 lsscm_safe_lazy_string_to_value.
13784 (lsscm_safe_lazy_string_to_value): Fix handling of TYPE_CODE_PTR.
13785 * guile/scm-value.c (gdbscm_value_to_lazy_string): Flag bad length
13786 values. Fix TYPE_CODE_PTR. Handle TYPE_CODE_ARRAY. Handle typedefs
13787 in incoming type.
13788 * guile/guile-internal.h (tyscm_scm_to_type): Declare.
13789 * guile/scm-type.c (tyscm_scm_to_type): New function.
13790
13791 2017-03-15 Doug Evans <dje@google.com>
13792
13793 PR python/17728, python/18439, python/18779
13794 * python/py-lazy-string.c (lazy_string_object): Clarify use of LENGTH
13795 member. Change type of TYPE member to PyObject *. All uses updated.
13796 (stpy_convert_to_value): Fix handling of TYPE_CODE_PTR.
13797 (gdbpy_create_lazy_string_object): Flag bad length values.
13798 Handle TYPE_CODE_ARRAY with possibly different user-provided length.
13799 Handle typedefs in incoming type.
13800 (stpy_lazy_string_elt_type): New function.
13801 (gdbpy_extract_lazy_string): Call it.
13802 * python/py-value.c (valpy_lazy_string): Flag bad length values.
13803 Fix handling of TYPE_CODE_PTR. Handle TYPE_CODE_ARRAY. Handle
13804 typedefs in incoming type.
13805
13806 2017-03-16 Doug Evans <dje@google.com>
13807
13808 * guile/guile-internal.h (tyscm_scm_to_type): Declare.
13809 * guile/scm-type.c (tyscm_scm_to_type): New function.
13810
13811 2017-03-16 Jiong Wang <jiong.wang@arm.com>
13812
13813 * inf-ptrace.c (inf_ptrace_peek_poke): Change the type to
13814 "ULONGEST" for "skip".
13815
13816 2017-03-14 Andreas Arnez <arnez@linux.vnet.ibm.com>
13817
13818 PR gdb/21220
13819 * inf-ptrace.c (inf_ptrace_xfer_partial): In "case
13820 TARGET_OBJECT_MEMORY", extract the logic for ptrace peek/poke...
13821 (inf_ptrace_peek_poke): ...here. New function. Now also loop
13822 over ptrace peek/poke until end of buffer or error.
13823
13824 2017-03-14 Simon Marchi <simon.marchi@ericsson.com>
13825
13826 * parse.c (length_of_subexp): Make static.
13827 * parser-defs.h (length_of_subexp): Remove.
13828
13829 2017-03-14 Andreas Arnez <arnez@linux.vnet.ibm.com>
13830
13831 * linux-nat.c (linux_proc_xfer_partial): Handle write operations
13832 as well.
13833
13834 2017-03-14 Pedro Alves <palves@redhat.com>
13835
13836 * cp-name-parser.y (cp_demangled_name_to_comp): Update comment.
13837 (main): Use std::unique_ptr. Remove calls to
13838 cp_demangled_name_parse_free.
13839
13840 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
13841
13842 * alpha-bsd-nat.c (alphabsd_fetch_inferior_registers,
13843 alphabsd_store_inferior_registers): Use regcache->ptid instead
13844 of inferior_ptid.
13845
13846 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
13847
13848 * aix-thread.c (aix_thread_fetch_registers,
13849 aix_thread_store_registers): Use regcache->ptid instead of
13850 inferior_ptid.
13851
13852 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
13853
13854 * aarch64-linux-nat.c (fetch_gregs_from_thread,
13855 store_gregs_to_thread, fetch_fpregs_from_thread,
13856 store_fpregs_to_thread): Use regcache->ptid instead of
13857 inferior_ptid.
13858
13859 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
13860
13861 * amd64-linux-nat.c (amd64_linux_fetch_inferior_registers,
13862 amd64_linux_fetch_inferior_registers): Use regcache->ptid
13863 instead of inferior_ptid.
13864
13865 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
13866
13867 * target.c (target_fetch_registers, target_store_registers): Add
13868 assert.
13869
13870 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
13871
13872 * regcache.h (regcache_get_ptid): New function.
13873 * regcache.c (regcache_get_ptid): New function.
13874
13875 2017-03-13 Mark Wielaard <mark@klomp.org>
13876
13877 * cp-name-parser.y (make_empty): Initialize d_printing to zero.
13878
13879 2017-03-10 Keith Seitz <keiths@redhat.com>
13880
13881 PR c++/8218
13882 * c-typeprint.c (cp_type_print_method_args): Skip artificial arguments.
13883
13884 2017-03-08 Pedro Alves <palves@redhat.com>
13885
13886 PR gdb/18360
13887 * infrun.c (start_step_over, do_target_resume, resume)
13888 (restart_threads): Assert we're not resuming a thread that is
13889 meant to be stopped.
13890 (infrun_thread_stop_requested_callback): Delete.
13891 (infrun_thread_stop_requested): If the thread is internally
13892 stopped, queue a pending stop event and clear the thread's
13893 inline-frame state.
13894 (handle_stop_requested): New function.
13895 (handle_syscall_event, handle_inferior_event_1): Use
13896 handle_stop_requested.
13897 (handle_stop_requested): New function.
13898 (handle_signal_stop): Set the thread's stop_signal here instead of
13899 at caller.
13900 (finish_step_over): Clear step over info unconditionally.
13901 (handle_signal_stop): If the user had interrupted the event
13902 thread, consider the stop a random signal.
13903 (handle_signal_stop) <signal arrived while stepping over
13904 breakpoint>: Don't restart threads here.
13905 (stop_waiting): Don't clear step-over info here.
13906
13907 2017-03-08 Pedro Alves <palves@redhat.com>
13908
13909 PR 21206
13910 * common/gdb_unlinker.h (unlinker::unlinker): Attribute nonnull
13911 goes to argument 2, not 1.
13912
13913 2017-03-08 Pedro Alves <palves@redhat.com>
13914
13915 PR cli/21218
13916 * top.c (gdb_readline_wrapper): Avoid passing NULL to
13917 display_gdb_prompt.
13918 (command_line_input): Add comment.
13919
13920 2017-03-08 Pedro Alves <palves@redhat.com>
13921
13922 PR tui/21216
13923 * tui/tui-file.c (tui_file::write): New.
13924 * tui/tui-file.h (tui_file): Override "write".
13925 * tui/tui-io.c (do_tui_putc, update_start_line): New functions,
13926 factored out from ...
13927 (tui_puts): ... here.
13928 (tui_putc): Use them.
13929 (tui_write): New function.
13930 * tui/tui-io.h (tui_write): Declare.
13931
13932 2017-03-07 Sergio Durigan Junior <sergiodj@redhat.com>
13933
13934 * Makefile.in (SFILES): Replace "environ.c" with
13935 "common/environ.c".
13936 (HFILES_NO_SRCDIR): Likewise, for "environ.h".
13937 * environ.c: Include "common-defs.h" instead of "defs.h. Moved
13938 to...
13939 * common/environ.c: ... here.
13940 * environ.h: Moved to...
13941 * common/environ.h: ... here.
13942
13943 2017-03-07 Peter Bergner <bergner@vnet.ibm.com>
13944
13945 * gdbarch.sh (pstring_ptr): New static function.
13946 (gdbarch_disassembler_options): Use it.
13947 (gdbarch_verify_disassembler_options): Print valid_disassembler_options,
13948 not valid_disassembler_option->name.
13949 * gdbarch.c: Regenerate.
13950
13951 2017-03-07 Peter Bergner <bergner@vnet.ibm.com>
13952
13953 * config/powerpc/ppc64-linux.mh (MH_CFLAGS): Delete.
13954
13955 2017-03-07 Pedro Alves <palves@redhat.com>
13956
13957 * tui/tui-regs.c (tui_restore_gdbout): Don't delete gdb_stdout.
13958
13959 2017-03-07 Walfred Tedeschi <walfred.tedeschi@intel.com>
13960
13961 * i387-tdep.h (i387_reset_bnd_regs): Add function definition.
13962 * i387-tdep.c (i387_reset_bnd_regs): Add function implementation.
13963 * i386-tdep.c (i386_push_dummy_call): Call i387_reset_bnd_regs.
13964 * amd64-tdep.c (amd64_push_dummy_call): Call i387_reset_bnd_regs.
13965
13966 2017-03-06 Simon Marchi <simon.marchi@ericsson.com>
13967
13968 * xtensa-linux-nat.c (fetch_gregs): Remove const.
13969
13970 2017-03-03 Simon Marchi <simon.marchi@ericsson.com>
13971
13972 * remote.c (remote_add_target_side_commands): Use range-based
13973 for loop.
13974
13975 2017-03-03 Yao Qi <yao.qi@linaro.org>
13976
13977 PR gdb/21165
13978 * ada-valprint.c (ada_val_print_ref): Call value_fetch_lazy if
13979 value is lazy.
13980 * valprint.c (common_val_print): Likewise.
13981
13982 2017-02-28 Peter Bergner <bergner@vnet.ibm.com>
13983
13984 * NEWS: Mention new set/show disassembler-options commands.
13985 * doc/gdb.texinfo: Document new set/show disassembler-options commands.
13986 * disasm.c: Include "arch-utils.h", "gdbcmd.h" and "safe-ctype.h".
13987 (prospective_options): New static variable.
13988 (gdb_disassembler::gdb_disassembler): Initialize
13989 m_di.disassembler_options.
13990 (gdb_buffered_insn_length_init_dis): Initilize di->disassembler_options.
13991 (get_disassembler_options): New function.
13992 (set_disassembler_options): Likewise.
13993 (set_disassembler_options_sfunc): Likewise.
13994 (show_disassembler_options_sfunc): Likewise.
13995 (disassembler_options_completer): Likewise.
13996 (_initialize_disasm): Likewise.
13997 * disasm.h (get_disassembler_options): New prototype.
13998 (set_disassembler_options): Likewise.
13999 * gdbarch.sh (gdbarch_disassembler_options): New variable.
14000 (gdbarch_verify_disassembler_options): Likewise.
14001 * gdbarch.c: Regenerate.
14002 * gdbarch.h: Likewise.
14003 * arm-tdep.c (num_disassembly_options): Delete.
14004 (set_disassembly_style): Likewise.
14005 (arm_disassembler_options): New static variable.
14006 (set_disassembly_style_sfunc): Convert short style name into long
14007 option name. Call set_disassembler_options.
14008 (show_disassembly_style_sfunc): New function.
14009 (arm_gdbarch_init): Call set_gdbarch_disassembler_options and
14010 set_gdbarch_verify_disassembler_options.
14011 (_initialize_arm_tdep): Delete regnames variable and update callers.
14012 (arm_disassembler_options): Initialize.
14013 (disasm_options): New variable.
14014 (num_disassembly_options): Rename from this...
14015 (num_disassembly_styles): ...to this. Compute by scanning through
14016 disasm_options.
14017 (valid_disassembly_styles): Initialize using disasm_options.
14018 Remove calls to parse_arm_disassembler_option, get_arm_regnames and
14019 set_arm_regname_option.
14020 Pass show_disassembly_style_sfunc to the "disassembler" setshow command.
14021 * rs6000-tdep.c (powerpc_disassembler_options): New static variable.
14022 (rs6000_gdbarch_init): Call set_gdbarch_disassembler_options and
14023 set_gdbarch_verify_disassembler_options.
14024 * s390-tdep.c (s390_disassembler_options): New static variable.
14025 (s390_gdbarch_init):all set_gdbarch_disassembler_options and
14026 set_gdbarch_verify_disassembler_options.
14027
14028 2017-02-27 Simon Marchi <simon.marchi@ericsson.com>
14029
14030 * remote.c (remote_add_target_side_condition): Remove "struct"
14031 keyword from range-based for loop.
14032
14033 2017-02-27 Simon Marchi <simon.marchi@ericsson.com>
14034
14035 * remote.c (remote_add_target_side_condition): Use range-based
14036 for loop. Update comment.
14037
14038 2017-02-27 Yao Qi <yao.qi@linaro.org>
14039
14040 * f-typeprint.c (f_print_type): Check "varstring" is empty first.
14041
14042 2017-02-26 Alan Hayward <alan.hayward@arm.com>
14043
14044 * regcache.c (regcache_raw_update): New function.
14045 (regcache_raw_read): Move code to regcache_raw_update.
14046 * regcache.h (regcache_raw_update): New declaration.
14047 * remote.c (remote_prepare_to_store): Call regcache_raw_update.
14048
14049 2017-02-26 Jan Kratochvil <jan.kratochvil@redhat.com>
14050
14051 * dwarf2read.c (create_debug_type_hash_table): Initialize
14052 header.signature and header.type_offset_in_tu.
14053
14054 2017-02-24 Pedro Alves <palves@redhat.com>
14055
14056 * symtab.c (make_file_symbol_completion_list_1): Use
14057 add_symtab_completions.
14058
14059 2017-02-24 Alan Hayward <alan.hayward@arm.com>
14060
14061 * stack.c (frame_info): Use frame_unwind_register_value to avoid buf.
14062
14063 2017-02-24 Alan Hayward <alan.hayward@arm.com>
14064
14065 * i386-tdep.c (i386_pseudo_register_read_into_value): Use
14066 I386_MAX_REGISTER_SIZE.
14067 (i386_pseudo_register_write): Likewise.
14068 (i386_process_record): Likewise.
14069 * i387-tdep.c (i387_supply_xsave): Likewise.
14070 * m68k-linux-nat.c (fetch_register): Use M68K_MAX_REGISTER_SIZE.
14071 (store_register): Likewise.
14072
14073 2017-02-23 Pedro Alves <palves@redhat.com>
14074
14075 * ada-lang.c: Include "common/function-view.h".
14076 (ada_iterate_over_symbols): Adjust to use function_view as
14077 callback type.
14078 (struct add_partial_datum, ada_complete_symbol_matcher): Delete.
14079 (ada_make_symbol_completion_list): Use a lambda.
14080 (ada_exc_search_name_matches): Delete.
14081 (name_matches_regex): New.
14082 (ada_add_global_exceptions): Use a lambda and name_matches_regex.
14083 * compile/compile-c-support.c: Include "common/function-view.h".
14084 (print_one_macro): Change prototype to accept a ui_file pointer.
14085 (write_macro_definitions): Use a lambda.
14086 * dwarf2read.c: Include "common/function-view.h".
14087 (dw2_map_expand_apply, dw2_map_symtabs_matching_filename)
14088 (dw2_expand_symtabs_matching): Adjust to use function_view as
14089 callback type.
14090 * language.h: Include "common/function-view.h".
14091 (struct language_defn) <la_iterate_over_symbols>: Adjust to use
14092 function_view as callback type.
14093 (LA_ITERATE_OVER_SYMBOLS): Remove DATA parameter.
14094 * linespec.c: Include "common/function-view.h".
14095 (collect_info::add_symbol): New method.
14096 (struct symbol_and_data_callback, iterate_inline_only, struct
14097 symbol_matcher_data, iterate_name_matcher): Delete.
14098 (iterate_over_all_matching_symtabs): Adjust to use function_view
14099 as callback type and lambdas.
14100 (iterate_over_file_blocks): Adjust to use function_view as
14101 callback type.
14102 (decode_compound_collector): Now a class with private fields.
14103 (decode_compound_collector::release_symbols): New method.
14104 (collect_one_symbol): Rename to...
14105 (decode_compound_collector::operator()): ... this and adjust.
14106 (lookup_prefix_sym): decode_compound_collector construction bits
14107 move to decode_compound_collector ctor. Pass the
14108 decode_compound_collector object directly as callback. Remove
14109 cleanups and use decode_compound_collector::release_symbols
14110 instead.
14111 (symtab_collector): Now a class with private fields.
14112 (symtab_collector::release_symtabs): New method.
14113 (add_symtabs_to_list): Rename to...
14114 (symtab_collector::operator()): ... this and adjust.
14115 (collect_symtabs_from_filename): symtab_collector construction
14116 bits move to symtab_collector ctor. Pass the symtab_collector
14117 object directly as callback. Remove cleanups and use
14118 symtab_collector::release_symtabs instead.
14119 (collect_symbols): Delete.
14120 (add_matching_symbols_to_info): Use lambdas.
14121 * macrocmd.c (print_macro_callback): Delete.
14122 (info_macro_command): Use a lambda.
14123 (info_macros_command): Pass print_macro_definition as callable
14124 directly.
14125 (print_one_macro): Remove 'ignore' parameter.
14126 (macro_list_command): Adjust.
14127 * macrotab.c (macro_for_each_data::fn): Now a function_view.
14128 (macro_for_each_data::user_data): Delete field.
14129 (foreach_macro): Adjust to call the function_view.
14130 (macro_for_each): Adjust to use function_view as callback type.
14131 (foreach_macro_in_scope): Adjust to call the function_view.
14132 (macro_for_each_in_scope): Adjust to use function_view as callback
14133 type.
14134 * macrotab.h: Include "common/function-view.h".
14135 (macro_callback_fn): Declare a prototype instead of a pointer.
14136 Remove "user_data" parameter.
14137 (macro_for_each, macro_for_each_in_scope): Adjust to use
14138 function_view as callback type.
14139 * psymtab.c (partial_map_expand_apply)
14140 (psym_map_symtabs_matching_filename, recursively_search_psymtabs):
14141 Adjust to use function_view as callback type and to return bool.
14142 (psym_expand_symtabs_matching): Adjust to use function_view as
14143 callback types.
14144 * symfile-debug.c (debug_qf_map_symtabs_matching_filename): Adjust
14145 to use function_view as callback type and to return bool.
14146 (debug_qf_expand_symtabs_matching): Adjust to use function_view as
14147 callback types.
14148 * symfile.c (expand_symtabs_matching): Adjust to use function_view
14149 as callback types.
14150 * symfile.h: Include "common/function-view.h".
14151 (expand_symtabs_file_matcher_ftype)
14152 (expand_symtabs_symbol_matcher_ftype)
14153 (expand_symtabs_exp_notify_ftype): Remove "data" parameter and
14154 return bool.
14155 (quick_symbol_functions::map_symtabs_matching_filename)
14156 (quick_symbol_functions::expand_symtabs_matching): Adjust to use
14157 function_view as callback type and return bool.
14158 (expand_symtabs_matching): Adjust to use function_view as callback
14159 type.
14160 (maintenance_expand_name_matcher)
14161 (maintenance_expand_file_matcher): Delete.
14162 (maintenance_expand_symtabs): Use lambdas.
14163 * symtab.c (iterate_over_some_symtabs): Adjust to use
14164 function_view as callback types and return bool.
14165 (iterate_over_symtabs): Likewise. Use unique_xmalloc_ptr instead
14166 of a cleanup.
14167 (lookup_symtab_callback): Delete.
14168 (lookup_symtab): Use a lambda.
14169 (iterate_over_symbols): Adjust to use function_view as callback
14170 type.
14171 (struct search_symbols_data, search_symbols_file_matches)
14172 (search_symbols_name_matches): Delete.
14173 (search_symbols): Use a pair of lambdas.
14174 (struct add_name_data, add_macro_name, symbol_completion_matcher)
14175 (symtab_expansion_callback): Delete.
14176 (default_make_symbol_completion_list_break_on_1): Use lambdas.
14177 * symtab.h: Include "common/function-view.h".
14178 (iterate_over_some_symtabs): Adjust to use function_view as
14179 callback type and return bool.
14180 (iterate_over_symtabs): Adjust to use function_view as callback
14181 type.
14182 (symbol_found_callback_ftype): Remove 'data' parameter and return
14183 bool.
14184 (iterate_over_symbols): Adjust to use function_view as callback
14185 type.
14186
14187 2017-02-23 Pedro Alves <palves@redhat.com>
14188
14189 * Makefile.in (SUBDIR_UNITTESTS_SRCS, SUBDIR_UNITTESTS_OBS): New.
14190 (%.o) <unittests/%.c>: New pattern.
14191 * configure.ac ($development): Add $(SUBDIR_UNITTESTS_OBS) to
14192 CONFIG_OBS, and $(SUBDIR_UNITTESTS_SRCS) to CONFIG_SRCS.
14193 * common/function-view.h: New file.
14194 * unittests/function-view-selftests.c: New file.
14195 * configure: Regenerate.
14196
14197 2017-02-23 Simon Marchi <simon.marchi@ericsson.com>
14198
14199 * bsd-uthread.c (bsd_uthread_thread_alive): Use ptid instead of
14200 inferior_ptid.
14201 * go32-nat.c (go32_thread_alive): Likewise.
14202
14203 2017-02-23 Yao Qi <yao.qi@linaro.org>
14204
14205 * varobj-iter.h (varobj_iter_delete): Call xfree instead of
14206 delete.
14207
14208 2017-02-23 Yao Qi <yao.qi@linaro.org>
14209
14210 * varobj.c (varobj_clear_saved_item): Use delete instead of
14211 xfree.
14212 (update_dynamic_varobj_children): Likewise.
14213
14214 2017-02-21 Jan Kratochvil <jan.kratochvil@redhat.com>
14215
14216 * dwarf2read.c (dwarf2_record_block_ranges): Add forgotten BASEADDR.
14217
14218 2017-02-21 Simon Marchi <simon.marchi@ericsson.com>
14219
14220 * common/enum-flags.h (enum_flags::enum_flags): Initialize
14221 m_enum_value to 0 in default constructor.
14222
14223 2017-02-21 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
14224
14225 * rs6000-tdep.c (LOAD_AND_RESERVE_MASK): Rename from LWARX_MASK.
14226 (STORE_CONDITIONAL_MASK): Rename from STWCX_MASK.
14227 (LBARX_INSTRUCTION, LHARX_INSTRUCTION, LQARX_INSTRUCTION,
14228 STBCX_INSTRUCTION, STHCX_INSTRUCTION, STQCX_INSTRUCTION): New defines.
14229 (IS_LOAD_AND_RESERVE_INSN, IS_STORE_CONDITIONAL_INSN): New macros.
14230 (ppc_displaced_step_copy_insn): Use IS_LOAD_AND_RESERVE_INSN.
14231 (ppc_deal_with_atomic_sequence): Use IS_LOAD_AND_RESERVE_INSN and
14232 IS_STORE_CONDITIONAL_INSN.
14233
14234 2017-02-21 Jan Kratochvil <jan.kratochvil@redhat.com>
14235
14236 * dwarf2_rnglists_process: Initialize range_beginning and range_end.
14237
14238 2017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
14239
14240 * NEWS (Changes since GDB 7.12): Add DWARF-5.
14241
14242 2017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
14243
14244 * dwarf2read.c (skip_one_die, read_attribute_value)
14245 (dwarf2_const_value_attr, dump_die_shallow)
14246 (dwarf2_get_attr_constant_value, dwarf2_fetch_constant_bytes)
14247 (skip_form_bytes, attr_form_is_constant): Handle DW_FORM_data16.
14248
14249 2017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
14250
14251 * dwarf2read.c (read_file_scope): Rename DW_MACRO_GNU_*.
14252 (dwarf_parse_macro_header): Accept DWARF version 5.
14253 (dwarf_decode_macro_bytes, dwarf_decode_macros): Rename DW_MACRO_GNU_*.
14254
14255 2017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
14256
14257 * block.c (call_site_for_pc): Rename DW_OP_GNU_*, DW_TAG_GNU_* and
14258 DW_AT_GNU_*.
14259 * common/common-exceptions.h (enum errors): Likewise.
14260 * dwarf2-frame.c (class dwarf_expr_executor): Likewise.
14261 * dwarf2expr.c (dwarf_block_to_dwarf_reg)
14262 (dwarf_expr_context::execute_stack_op): Likewise.
14263 * dwarf2expr.h (struct dwarf_expr_context, struct dwarf_expr_piece):
14264 Likewise.
14265 * dwarf2loc.c (dwarf_evaluate_loc_desc::get_base_type)
14266 (dwarf_evaluate_loc_desc::push_dwarf_reg_entry_value)
14267 (show_entry_values_debug, call_site_to_target_addr)
14268 (func_addr_to_tail_call_list, func_verify_no_selftailcall)
14269 (dwarf_expr_reg_to_entry_parameter, dwarf_entry_parameter_to_value)
14270 (entry_data_value_free_closure, value_of_dwarf_reg_entry)
14271 (value_of_dwarf_block_entry, indirect_pieced_value)
14272 (symbol_needs_eval_context::push_dwarf_reg_entry_value):
14273 (disassemble_dwarf_expression): Likewise.
14274 * dwarf2read.c (process_die, inherit_abstract_dies)
14275 (read_call_site_scope): Likewise.
14276 * gdbtypes.h (struct func_type, struct call_site_parameter)
14277 (struct call_site): Likewise.
14278 * stack.c (read_frame_arg): Likewise.
14279 * std-operator.def (OP_VAR_ENTRY_VALUE): Likewise.
14280
14281 2017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
14282
14283 * defs.h (read_unsigned_leb128): New declaration.
14284 * dwarf2loc.c (decode_debug_loclists_addresses): New function.
14285 (decode_debug_loc_dwo_addresses): Update DEBUG_LOC_* to DW_LLE_*.
14286 (dwarf2_find_location_expression): Call also
14287 decode_debug_loclists_addresses. Handle DWARF-5 ULEB128 length.
14288 * dwarf2loc.h (dwarf2_version): New declaration.
14289 * dwarf2read.c (struct dwarf2_per_objfile): Add loclists, line_str,
14290 rnglists.
14291 (dwarf2_elf_names): Add .debug_loclists, .debug_line_str,
14292 .debug_rnglists.
14293 (struct dwop_section_names): Add loclists_dwo.
14294 (dwop_section_names): Add .debug_loclists.dwo.
14295 (struct comp_unit_head): Add unit_type, signature, type_offset_in_tu.
14296 (struct dwarf2_per_cu_data): Add dwarf_version.
14297 (struct dwo_sections): Add loclists.
14298 (struct attr_abbrev): Add implicit_const.
14299 (read_indirect_line_string): New declaration.
14300 (read_unsigned_leb128): Delete declaration.
14301 (rcuh_kind): New definition.
14302 (read_and_check_comp_unit_head): Change parameter
14303 is_debug_types_section to section_kind.
14304 (dwarf2_locate_sections): Handle loclists, line_str and rnglists.
14305 (read_comp_unit_head): Change parameter abfd to section, add parameter
14306 section_kind. Handle DWARF-5.
14307 (error_check_comp_unit_head): Accept also DWARF version 5.
14308 (read_and_check_comp_unit_head): Change parameter
14309 is_debug_types_section to section_kind.
14310 (read_and_check_type_unit_head): Delete function.
14311 (read_abbrev_offset): Handle DWARF-5.
14312 (create_debug_type_hash_table): Add parameter section_kind. Process
14313 only DW_UT_type. Use signature and type_offset_in_tu from struct
14314 comp_unit_head.
14315 (create_debug_types_hash_table): Update create_debug_type_hash_table
14316 caller.
14317 (create_all_type_units): Call create_debug_type_hash_table.
14318 (read_cutu_die_from_dwo, init_cutu_and_read_dies): Change
14319 read_and_check_type_unit_head caller to read_and_check_comp_unit_head
14320 caller.
14321 (skip_one_die): Handle DW_FORM_implicit_const.
14322 (dwarf2_rnglists_process): New function.
14323 (dwarf2_ranges_process): Call dwarf2_rnglists_process for DWARF-5.
14324 (abbrev_table_read_table): Handle DW_FORM_implicit_const.
14325 (read_attribute_value): Handle DW_FORM_implicit_const,
14326 DW_FORM_line_strp.
14327 (read_attribute): Handle DW_FORM_implicit_const.
14328 (read_indirect_string_at_offset_from): New function from
14329 read_indirect_string_at_offset.
14330 (read_indirect_string_at_offset): Call
14331 read_indirect_string_at_offset_from.
14332 (read_indirect_line_string_at_offset): New function.
14333 (read_indirect_string): New function comment.
14334 (read_indirect_line_string): New function.
14335 (read_unsigned_leb128): Make it global.
14336 (dwarf2_string_attr): Handle DWARF-5.
14337 (add_include_dir_stub, read_formatted_entries): New functions.
14338 (dwarf_decode_line_header, dump_die_shallow, cu_debug_loc_section):
14339 Handle DWARF-5.
14340 (per_cu_header_read_in): Update read_comp_unit_head caller.
14341 (dwarf2_version): New function.
14342 * symfile.h (struct dwarf2_debug_sections): Add loclists, line_str and
14343 rnglists.
14344 * xcoffread.c (dwarf2_xcoff_names): Update struct dwarf2_debug_sections
14345 fields.
14346
14347 2017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
14348
14349 * dwarf2read.c (abbrev_table_read_table): Read the data only once.
14350
14351 2017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
14352
14353 * dwarf2read.c (dwarf2_ranges_process): New function from
14354 dwarf2_ranges_read.
14355 (dwarf2_ranges_read, dwarf2_record_block_ranges): Use
14356 dwarf2_ranges_process.
14357
14358 2017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
14359
14360 * dwarf2read.c (create_debug_type_hash_table): New function from
14361 create_debug_types_hash_table.
14362 (create_debug_types_hash_table): Call create_debug_type_hash_table.
14363 (create_all_type_units, open_and_init_dwo_file): Update
14364 create_debug_types_hash_table callers.
14365
14366 2017-02-20 Sergio Durigan Junior <sergiodj@redhat.com>
14367
14368 PR gdb/16188
14369 * fork-child.c (trace_start_error): Fix thinko. va_end should
14370 refer to 'ap', not 'args'.
14371
14372 2017-02-20 Sergio Durigan Junior <sergiodj@redhat.com>
14373 Pedro Alves <palves@redhat.com>
14374
14375 PR gdb/16188
14376 * darwin-nat.c (darwin_ptrace_me): Check if calls to system
14377 calls succeeded.
14378 * fork-child.c (trace_start_error): New function.
14379 (trace_start_error_with_name): Likewise.
14380 * gnu-nat.c (gnu_ptrace_me): Check if call to PTRACE succeeded.
14381 * inf-ptrace.c (inf_ptrace_me): Likewise.
14382 * inferior.h (trace_start_error): New prototype.
14383 (trace_start_error_with_name): Likewise.
14384
14385 2017-02-15 Sergio Durigan Junior <sergiodj@redhat.com>
14386
14387 PR gdb/21164
14388 * psymtab.c (maintenance_print_psymbols): Verify if 'argv' is not
14389 NULL before using it.
14390 * symmisc.c (maintenance_print_symbols): Likewise.
14391 (maintenance_print_msymbols): Likewise.
14392
14393 2017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
14394
14395 * NEWS: Add record Python bindings entry.
14396
14397 2017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
14398
14399 * Makefile.in (SUBDIR_PYTHON_OBS): Add py-record-btrace.o,
14400 py-record-full.o.
14401 (SUBDIR_PYTHON_SRCS): Add py-record-btrace.c, py-record-full.c.
14402 * python/py-record-btrace.c, python/py-record-btrace.h,
14403 python/py-record-full.c, python/py-record-full.h: New file.
14404 * python/py-record.c: Add include for py-record-btrace.h and
14405 py-record-full.h.
14406 (recpy_method, recpy_format, recpy_goto, recpy_replay_position,
14407 recpy_instruction_history, recpy_function_call_history, recpy_begin,
14408 recpy_end): Use functions from py-record-btrace.c and py-record-full.c.
14409 * python/python-internal.h (PyInt_FromSsize_t, PyInt_AsSsize_t):
14410 New definition.
14411 (gdbpy_initialize_btrace): New export.
14412 * python/python.c (_initialize_python): Add gdbpy_initialize_btrace.
14413
14414 2017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
14415
14416 * Makefile.in (SUBDIR_PYTHON_OBS): Add python/py-record.o.
14417 (SUBDIR_PYTHON_SRCS): Add python/py-record.c.
14418 * python/py-record.c: New file.
14419 * python/python-internal.h (gdbpy_start_recording,
14420 gdbpy_current_recording, gdpy_stop_recording,
14421 gdbpy_initialize_record): New export.
14422 * python/python.c (_initialize_python): Add gdbpy_initialize_record.
14423 (python_GdbMethods): Add gdbpy_start_recording,
14424 gdbpy_current_recording and gdbpy_stop_recording.
14425
14426 2017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
14427
14428 * record-btrace.c (record_btrace_record_method): New function.
14429 (init_record_btrace_ops): Initialize to_record_method.
14430 * record-full.c (record_full_record_method): New function.
14431 (init_record_full_ops, init_record_full_core_ops): Add
14432 record_full_record_method.
14433 * record.h (enum record_method): New enum.
14434 * target-debug.h (target_debug_print_enum_record_method: New define.
14435 * target-delegates.c: Regenerate.
14436 * target.c (target_record_method): New function.
14437 * target.h: Include record.h.
14438 (struct target_ops) <to_record_method>: New field.
14439 (target_record_method): New export.
14440
14441 2017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
14442
14443 * record.h (record_start, record_stop): New export.
14444 * record.c (record_start, record_stop): New function.
14445
14446 2017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
14447
14448 * btrace.c (btrace_fetch): Copy function call segments pointer
14449 into a vector.
14450 (btrace_clear): Clear the vector.
14451 (btrace_find_insn_by_number): Use binary search to find the correct
14452 function call segment.
14453 * btrace.h (brace_fun_p): New typedef.
14454 (struct btrace_thread_info) <functions>: New field.
14455
14456 2017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
14457
14458 * record-btrace.c (btrace_ui_out_decode_error): Move most of it ...
14459 * btrace.c (btrace_decode_error): ... here. New function.
14460 * btrace.h (btrace_decode_error): New export.
14461
14462 2017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
14463
14464 * btrace.c (ftrace_call_num_insn, btrace_insn_get_error): New function.
14465 (ftrace_new_function, btrace_insn_number, btrace_insn_cmp,
14466 btrace_find_insn_by_number): Remove special case for gaps.
14467 * btrace.h (btrace_insn_get_error): New export.
14468 (btrace_insn_number, btrace_find_insn_by_number): Adjust comment.
14469 * record-btrace.c (btrace_insn_history): Print number for gaps.
14470 (record_btrace_info, record_btrace_goto): Handle gaps.
14471
14472 2017-02-14 Tom Tromey <tom@tromey.com>
14473
14474 PR python/13598:
14475 * python/python.c (gdbpy_before_prompt_hook): Emit before_prompt
14476 event.
14477 * python/py-evts.c (gdbpy_initialize_py_events): Add
14478 before_prompt registry.
14479 * python/py-events.h (events_object) <before_prompt>: New field.
14480
14481 2017-02-14 Markus Metzger <markus.t.metzger@intel.com>
14482
14483 * btrace.c (ftrace_new_switch): Preserve up link and flags.
14484
14485 2017-02-13 Luis Machado <lgustavo@codesourcery.com>
14486
14487 * symfile (_initialize_symfile): Add usage text to the load command's
14488 help text.
14489
14490 2017-02-10 Simon Marchi <simon.marchi@ericsson.com>
14491
14492 * utils.c (defaulted_query): Don't query on secondary UIs.
14493
14494 2017-02-10 Tom Tromey <tom@tromey.com>
14495
14496 * rust-lang.c (rust_get_disr_info): Remove unused variable.
14497
14498 2017-02-10 Tom Tromey <tom@tromey.com>
14499
14500 * python/py-value.c (valpy_richcompare_throw): Remove unnecessary
14501 "cleanup" local.
14502 * python/py-type.c (typy_legacy_template_argument): Remove
14503 unnecessary "cleanup" local.
14504
14505 2017-02-10 Tom Tromey <tom@tromey.com>
14506
14507 * python/python.c (do_start_initialization): New function, from
14508 _initialize_python.
14509 (_initialize_python): Call do_start_initialization.
14510 * python/py-linetable.c (ltpy_iternext): Use explicit returns, not
14511 goto.
14512
14513 2017-02-10 Tom Tromey <tom@tromey.com>
14514
14515 * python/py-prettyprint.c (pretty_print_one_value): Use
14516 gdbpy_ref.
14517
14518 2017-02-10 Tom Tromey <tom@tromey.com>
14519
14520 * python/py-cmd.c (cmdpy_destroyer): Use gdbpy_ref.
14521 * python/py-breakpoint.c (gdbpy_breakpoint_deleted): Use
14522 gdbpy_ref.
14523 * python/py-type.c (field_new): Use gdbpy_ref.
14524 * python/py-symtab.c (symtab_and_line_to_sal_object): Use
14525 gdbpy_ref.
14526 * python/py-progspace.c (pspy_new): Use gdbpy_ref.
14527 (py_free_pspace): Likewise.
14528 (pspace_to_pspace_object): Likewise.
14529 * python/py-objfile.c (objfpy_new): Use gdbpy_ref.
14530 (py_free_objfile): Likewise.
14531 (objfile_to_objfile_object): Likewise.
14532 * python/py-inferior.c (delete_thread_object): Use
14533 gdbpy_ref.
14534 (infpy_read_memory): Likewise.
14535 (py_free_inferior): Likewise.
14536 * python/py-evtregistry.c (create_eventregistry_object): Use
14537 gdbpy_ref.
14538 * python/py-event.c (create_event_object): Use gdbpy_ref.
14539
14540 2017-02-10 Tom Tromey <tom@tromey.com>
14541
14542 * python/py-ref.h (gdbpy_ref_policy): Now a template.
14543 (gdbpy_ref): Now a template; allow subclasses of PyObject to be
14544 used.
14545 * python/py-arch.c, python/py-bpevent.c, python/py-breakpoint.c,
14546 python/py-cmd.c, python/py-continueevent.c, python/py-event.c,
14547 python/py-exitedevent.c, python/py-finishbreakpoint.c,
14548 python/py-framefilter.c, python/py-function.c,
14549 python/py-inferior.c, python/py-infevents.c,
14550 python/py-linetable.c, python/py-newobjfileevent.c,
14551 python/py-param.c, python/py-prettyprint.c, python/py-ref.h,
14552 python/py-signalevent.c, python/py-stopevent.c,
14553 python/py-symbol.c, python/py-threadevent.c, python/py-type.c,
14554 python/py-unwind.c, python/py-utils.c, python/py-value.c,
14555 python/py-varobj.c, python/py-xmethods.c, python/python.c,
14556 varobj.c: Change gdbpy_ref to gdbpy_ref<>.
14557
14558 2017-02-10 Tom Tromey <tom@tromey.com>
14559
14560 * ui-out.h (ui_out_emit_type): New class.
14561 (ui_out_emit_tuple, ui_out_emit_list): New typedefs.
14562 * python/py-framefilter.c (py_print_single_arg): Use gdb::optional
14563 and ui_out_emit_tuple.
14564 (enumerate_locals): Likewise.
14565 (py_mi_print_variables, py_print_locals, py_print_args): Use
14566 ui_out_emit_list.
14567 (py_print_frame): Use gdb::optional, ui_out_emit_tuple,
14568 ui_out_emit_list.
14569 * common/gdb_optional.h: New file.
14570
14571 2017-02-10 Martin Galvan <martingalvan@sourceware.org>
14572
14573 * MAINTAINERS (Write After Approval): Update my e-mail address.
14574
14575 2017-02-10 Martin Galvan <martingalvan@sourceware.org>
14576
14577 PR gdb/21122
14578 * breakpoint.c (_initialize_breakpoint): Update the help description
14579 of the 'commands' command to indicate that it takes a list argument.
14580
14581 2017-02-09 Simon Marchi <simon.marchi@ericsson.com>
14582
14583 * interps.c (current_interp_set_logging): Remove "return".
14584
14585 2017-02-09 Gary Benson <gbenson@redhat.com>
14586
14587 * symtab.c (add_symtab_completions): Prevent NULL pointer
14588 dereference.
14589
14590 2017-02-08 Pedro Alves <palves@redhat.com>
14591
14592 * interps.c (interp::interp): Remove reference to quiet_p.
14593 (interp_set): Make static. Remove dead "Switching to" output
14594 code.
14595 (interp_quiet_p, interp_set_quiet): Delete.
14596 (interpreter_exec_cmd): Don't set the interpreter quiet.
14597 * interps.h (interp_quiet_p): Make static.
14598 (class interp) <quiet_p>: Remove field
14599
14600 2017-02-08 Jerome Guitton <guitton@adacore.com>
14601
14602 * cli/cli-decode.c (find_command_name_length): Make it extern.
14603 * cli/cli-decode.h (find_command_name_length): Declare.
14604 * cli/cli-script.c (command_name_equals, line_first_arg):
14605 New functions.
14606 (process_next_line): Use cli-decode to parse command names.
14607 (build_command_line): Make args a constant pointer.
14608
14609 2017-02-08 Jerome Guitton <guitton@adacore.com>
14610
14611 * cli-decode.c (lookup_cmd_1, lookup_cmd_composition):
14612 Remove case-insensitive search.
14613
14614 2017-02-07 Jose E. Marchesi <jose.marchesi@oracle.com>
14615
14616 * sparc-tdep.c (sparc32_gdbarch_init): Do not place a + operator
14617 at the end of the line. Avoids an ARI warning.
14618
14619 2017-02-06 Luis Machado <lgustavo@codesourcery.com>
14620
14621 * NEWS: Mention support for record/replay of Intel 64 rdrand and
14622 rdseed instructions.
14623 i386-tdep.c (i386_process_record): Handle Intel 64 rdrand and rseed.
14624
14625 2017-02-06 Ivo Raisr <ivo.raisr@oracle.com>
14626
14627 PR tdep/20936
14628 Provide and use sparc32 and sparc64 target description XML files.
14629 * features/sparc/sparc32-cp0.xml, features/sparc/sparc32-cpu.xml,
14630 features/sparc/sparc32-fpu.xml: New files for sparc 32-bit.
14631 * features/sparc/sparc64-cp0.xml, features/sparc/sparc64-cpu.xml,
14632 features/sparc/sparc64-fpu.xml: New files for sparc 64-bit.
14633 * features/sparc/sparc32-solaris.xml: New file.
14634 * features/sparc/sparc64-solaris.xml: New file.
14635 * features/sparc/sparc32-solaris.c: Generated.
14636 * features/sparc/sparc64-solaris.c: Generated.
14637 * sparc-tdep.h: Account for differences in target descriptions.
14638 * sparc-tdep.c (sparc32_register_name): Use target provided registers.
14639 (sparc32_register_type): Use target provided registers.
14640 (validate_tdesc_registers): New function.
14641 (sparc32_gdbarch_init): Use tdesc_has_registers.
14642 Set pseudoregister functions.
14643 * sparc64-tdep.c (sparc64_register_name): Use target provided registers.
14644 (sparc64_register_type): Use target provided registers.
14645 (sparc64_init_abi): Set pseudoregister functions.
14646
14647 2017-02-03 Tom Tromey <tom@tromey.com>
14648
14649 PR rust/21097:
14650 * rust-lang.c (rust_print_type) <TYPE_CODE_UNION>: Handle enums
14651 with a single member.
14652
14653 2017-02-03 Pedro Alves <palves@redhat.com>
14654
14655 * cli/cli-interp.c (cli_interp_base::cli_interp_base)
14656 (cli_interp_base::~cli_interp_base): New.
14657 (cli_interp): New struct.
14658 (as_cli_interp): Cast the interp itself to cli_interp.
14659 (cli_interpreter_pre_command_loop): Rename to ...
14660 (cli_interp_base::pre_command_loop): ... this. Remove 'self'
14661 parameter.
14662 (cli_interpreter_init): Rename to ...
14663 (cli_interp::init): ... this. Remove 'self' parameter. Use
14664 boolean. Make extern.
14665 (cli_interpreter_resume): Rename to ...
14666 (cli_interp::resume): ... this. Remove 'data' parameter. Make
14667 extern.
14668 (cli_interpreter_suspend): Rename to ...
14669 (cli_interp::suspend): ... this. Remove 'data' parameter. Make
14670 extern.
14671 (cli_interpreter_exec): Rename to ...
14672 (cli_interp::exec): ... this. Remove 'data' parameter. Make
14673 extern.
14674 (cli_interpreter_supports_command_editing): Rename to ...
14675 (cli_interp_base::supports_command_editing): ... this. Remove
14676 'interp' parameter. Make extern.
14677 (cli_ui_out): Rename to ...
14678 (cli_interp::interp_ui_out): ... this. Remove 'interp' parameter.
14679 Make extern.
14680 (cli_set_logging): Rename to ...
14681 (cli_interp_base::set_logging): ... this. Remove 'interp'
14682 parameter. Make extern.
14683 (cli_interp_procs): Delete.
14684 (cli_interp_factory): Adjust to use "new".
14685 * cli/cli-interp.h: Include "interps.h".
14686 (struct cli_interp_base): New struct.
14687 * interps.c (struct interp): Delete. Fields moved to interps.h.
14688 (interp_new): Delete.
14689 (interp::interp, interp::~interp): New.
14690 (interp_set): Use bool, and return void. Assume the interpreter
14691 has suspend, init and resume methods, and that the all return
14692 void.
14693 (set_top_level_interpreter): interp_set returns void.
14694 (interp_ui_out): Adapt.
14695 (current_interp_set_logging): Adapt.
14696 (interp_data): Delete.
14697 (interp_pre_command_loop, interp_supports_command_editing): Adapt.
14698 (interp_exec): Adapt.
14699 (top_level_interpreter_data): Delete.
14700 * interps.h (interp_init_ftype, interp_resume_ftype)
14701 (interp_suspend_ftype, interp_exec_ftype)
14702 (interp_pre_command_loop_ftype, interp_ui_out_ftype): Delete.
14703 (class interp): New.
14704 (interp_new): Delete.
14705 (interp_set): Now returns void. Use bool.
14706 (interp_data, top_level_interpreter_data): Delete.
14707 * mi/mi-common.h: Include interps.h.
14708 (class mi_interp): Inherit from interp. Define a ctor. Declare
14709 init, resume, suspect, exec, interp_ui_out, set_logging and
14710 pre_command_loop methods.
14711 * mi/mi-interp.c (as_mi_interp): Cast the interp itself.
14712 (mi_interpreter_init): Rename to ...
14713 (mi_interp::init): ... this. Remove the 'interp' parameter, use
14714 bool, return void and make extern. Adjust.
14715 (mi_interpreter_resume): ... Rename to ...
14716 (mi_interp::resume): ... this. Remove the 'data' parameter,
14717 return void and make extern. Adjust.
14718 (mi_interpreter_suspend): ... Rename to ...
14719 (mi_interp::suspend): ... this. Remove the 'data' parameter,
14720 return void and make extern. Adjust.
14721 (mi_interpreter_exec): ... Rename to ...
14722 (mi_interp::exec): ... this. Remove the 'data' parameter and make
14723 extern. Adjust.
14724 (mi_interpreter_pre_command_loop): ... Rename to ...
14725 (mi_interp::pre_command_loop): ... this. Remove the 'self'
14726 parameter and make extern.
14727 (mi_on_normal_stop_1): Adjust.
14728 (mi_ui_out): Rename to ...
14729 (mi_interp::interp_ui_out): ... this. Remove the 'interp'
14730 parameter and make extern. Adjust.
14731 (mi_set_logging): Rename to ...
14732 (mi_interp::set_logging): ... this. Remove the 'interp'
14733 parameter and make extern. Adjust.
14734 (mi_interp_procs): Delete.
14735 (mi_interp_factory): Adjust to use 'new'.
14736 * mi/mi-main.c (mi_cmd_gdb_exit, captured_mi_execute_command)
14737 (mi_print_exception, mi_execute_command, mi_load_progress):
14738 Adjust.
14739 * tui/tui-interp.c (tui_interp): New class.
14740 (as_tui_interp): Return a tui_interp pointer.
14741 (tui_on_normal_stop, tui_on_signal_received)
14742 (tui_on_end_stepping_range, tui_on_signal_exited, tui_on_exited)
14743 (tui_on_no_history, tui_on_user_selected_context_changed): Adjust
14744 to use interp::interp_ui_out.
14745 (tui_init): Rename to ...
14746 (tui_interp::init): ... this. Remove the 'self' parameter, use
14747 bool, return void and make extern. Adjust.
14748 (tui_resume): Rename to ...
14749 (tui_interp::resume): ... this. Remove the 'data' parameter,
14750 return void and make extern. Adjust.
14751 (tui_suspend): Rename to ...
14752 (tui_interp::suspend): ... this. Remove the 'data' parameter,
14753 return void and make extern. Adjust.
14754 (tui_ui_out): Rename to ...
14755 (tui_interp::interp_ui_out): ... this. Remove the 'self'
14756 parameter, and make extern. Adjust.
14757 (tui_exec): Rename to ...
14758 (tui_interp::exec): ... this. Remove the 'data' parameter and
14759 make extern.
14760 (tui_interp_procs): Delete.
14761 (tui_interp_factory): Use "new".
14762
14763 2017-02-02 Tom Tromey <tom@tromey.com>
14764
14765 * rust-exp.y (ends_raw_string, space_then_number)
14766 (rust_identifier_start_p): Return bool.
14767 * rust-lang.c (rust_tuple_type_p, rust_underscore_fields)
14768 (rust_tuple_struct_type_p, rust_tuple_variant_type_p)
14769 (rust_slice_type_p, rust_range_type_p, rust_u8_type_p)
14770 (rust_chartype_p): Return bool.
14771 (val_print_struct, rust_print_struct_def, rust_print_type):
14772 Update.
14773 * rust-lang.h (rust_tuple_type_p, rust_tuple_struct_type_p):
14774 Return bool.
14775
14776 2017-02-02 Tom Tromey <tom@tromey.com>
14777
14778 * rust-lang.c: Reindent.
14779
14780 2017-02-02 Tom Tromey <tom@tromey.com>
14781
14782 * rust-lang.h (rust_crate_for_block): Update.
14783 * rust-lang.c (rust_crate_for_block): Return std::string.
14784 (rust_get_disr_info): Use std:;string, not
14785 gdb::unique_xmalloc_ptr.
14786 * rust-exp.y (crate_name): Update.
14787
14788 2017-02-02 Pedro Alves <palves@redhat.com>
14789
14790 * disasm-selftests.c (print_one_insn_test): Move the "verbose"
14791 field out of gdb_disassembler_test and make it static.
14792
14793 2017-02-02 Pedro Alves <palves@redhat.com>
14794
14795 * mi/mi-common.h (struct mi_interp): Delete the mi2_interp,
14796 mi1_interp and mi_interp fields.
14797
14798 2017-02-02 Pedro Alves <palves@redhat.com>
14799
14800 * cli/cli-interp.c (struct saved_output_files, saved_output):
14801 Moved from cli/cli-logging.c.
14802 (cli_set_logging): New function.
14803 (cli_interp_procs): Install cli_set_logging.
14804 * cli/cli-interp.h (make_logging_output, cli_set_logging):
14805 Declare.
14806 * cli/cli-logging.c (struct saved_output_files, saved_output):
14807 Moved to cli/cli-interp.c.
14808 (pop_output_files): Don't save outputs here.
14809 (make_logging_output): New function.
14810 (handle_redirections): Don't build tee nor save previous outputs
14811 here.
14812 * interps.c (current_interp_set_logging): Change prototype.
14813 Assume there's always a set_logging_proc method installed.
14814 * interps.h (interp_set_logging_ftype): Change prototype.
14815 (current_interp_set_logging): Change prototype and adjust comment.
14816 * mi/mi-interp.c (mi_set_logging): Change protototype. Adjust to
14817 use make_logging_output.
14818 * tui/tui-interp.c (tui_interp_procs): Install cli_set_logging.
14819 2017-02-02 Pedro Alves <palves@redhat.com>
14820
14821 * cli/cli-logging.c (maybe_warn_already_logging): New factored out
14822 from ...
14823 (set_logging_overwrite): ... here.
14824 (logging_no_redirect_file): Delete.
14825 (set_logging_redirect): Don't handle redirection on the fly.
14826 Instead warn that "logging off" / "logging on" is necessary.
14827 (pop_output_files): Delete references to logging_no_redirect_file.
14828 (show_logging_command): Always speak in terms of what will happen
14829 once logging is reenabled.
14830
14831 2017-02-02 Pedro Alves <palves@redhat.com>
14832
14833 * disasm.h (gdb_pretty_print_disassembler): Tweak intro comment.
14834
14835 2017-02-02 Pedro Alves <palves@redhat.com>
14836
14837 * disasm.c (gdb_pretty_print_insn): Rename to ...
14838 (gdb_pretty_print_disassembler::pretty_print_insn): ... this.
14839 Remove gdbarch parameter. Adapt to clear the object's buffers
14840 instead of allocating new buffers, and to print using the object's
14841 gdb_disassembler instead of calling gdb_print_insn.
14842 (dump_insns): Use gdb_pretty_print_disassembler.
14843 * disasm.h (gdb_pretty_print_insn): Delete declaration.
14844 (gdb_pretty_print_disassembler): New class.
14845 * record-btrace.c (btrace_insn_history): Use
14846 gdb_pretty_print_disassembler.
14847
14848 2017-02-02 Pedro Alves <palves@redhat.com>
14849
14850 * ada-lang.c (type_as_string): Use string_file.
14851 * ada-valprint.c (ada_print_floating): Use string_file.
14852 * ada-varobj.c (ada_varobj_scalar_image)
14853 (ada_varobj_get_value_image): Use string_file.
14854 * aix-thread.c (aix_thread_extra_thread_info): Use string_file.
14855 * arm-tdep.c (_initialize_arm_tdep): Use string_printf.
14856 * breakpoint.c (update_inserted_breakpoint_locations)
14857 (insert_breakpoint_locations, reattach_breakpoints)
14858 (print_breakpoint_location, print_one_detail_ranged_breakpoint)
14859 (print_it_watchpoint): Use string_file.
14860 (save_breakpoints): Use stdio_file.
14861 * c-exp.y (oper): Use string_file.
14862 * cli/cli-logging.c (set_logging_redirect): Use ui_file_up and
14863 tee_file.
14864 (pop_output_files): Use delete.
14865 (handle_redirections): Use stdio_file and tee_file.
14866 * cli/cli-setshow.c (do_show_command): Use string_file.
14867 * compile/compile-c-support.c (c_compute_program): Use
14868 string_file.
14869 * compile/compile-c-symbols.c (generate_vla_size): Take a
14870 'string_file &' instead of a 'ui_file *'.
14871 (generate_c_for_for_one_variable): Take a 'string_file &' instead
14872 of a 'ui_file *'. Use string_file.
14873 (generate_c_for_variable_locations): Take a 'string_file &'
14874 instead of a 'ui_file *'.
14875 * compile/compile-internal.h (generate_c_for_for_one_variable):
14876 Take a 'string_file &' instead of a 'ui_file *'.
14877 * compile/compile-loc2c.c (push, pushf, unary, binary)
14878 (print_label, pushf_register_address, pushf_register)
14879 (do_compile_dwarf_expr_to_c): Take a 'string_file &' instead of a
14880 'ui_file *'. Adjust.
14881 * compile/compile.c (compile_to_object): Use string_file.
14882 * compile/compile.h (compile_dwarf_expr_to_c)
14883 (compile_dwarf_bounds_to_c): Take a 'string_file &' instead of a
14884 'ui_file *'.
14885 * cp-support.c (inspect_type): Use string_file and obstack_copy0.
14886 (replace_typedefs_qualified_name): Use string_file and
14887 obstack_copy0.
14888 * disasm.c (gdb_pretty_print_insn): Use string_file.
14889 (gdb_disassembly): Adjust reference the null_stream global.
14890 (do_ui_file_delete): Delete.
14891 (gdb_insn_length): Use null_stream.
14892 * dummy-frame.c (maintenance_print_dummy_frames): Use stdio_file.
14893 * dwarf2loc.c (dwarf2_compile_property_to_c)
14894 (locexpr_generate_c_location, loclist_generate_c_location): Take a
14895 'string_file &' instead of a 'ui_file *'.
14896 * dwarf2loc.h (dwarf2_compile_property_to_c): Likewise.
14897 * dwarf2read.c (do_ui_file_peek_last): Delete.
14898 (dwarf2_compute_name): Use string_file.
14899 * event-top.c (gdb_setup_readline): Use stdio_file.
14900 * gdbarch.sh (verify_gdbarch): Use string_file.
14901 * gdbtypes.c (safe_parse_type): Use null_stream.
14902 * guile/scm-breakpoint.c (gdbscm_breakpoint_commands): Use
14903 string_file.
14904 * guile/scm-disasm.c (gdbscm_print_insn_from_port): Take a
14905 'string_file *' instead of a 'ui_file *'.
14906 (gdbscm_arch_disassemble): Use string_file.
14907 * guile/scm-frame.c (frscm_print_frame_smob): Use string_file.
14908 * guile/scm-ports.c (class ioscm_file_port): Now a class that
14909 inherits from ui_file.
14910 (ioscm_file_port_delete, ioscm_file_port_rewind)
14911 (ioscm_file_port_put): Delete.
14912 (ioscm_file_port_write): Rename to ...
14913 (ioscm_file_port::write): ... this. Remove file_port_magic
14914 checks.
14915 (ioscm_file_port_new): Delete.
14916 (ioscm_with_output_to_port_worker): Use ioscm_file_port and
14917 ui_file_up.
14918 * guile/scm-type.c (tyscm_type_name): Use string_file.
14919 * guile/scm-value.c (vlscm_print_value_smob, gdbscm_value_print):
14920 Use string_file.
14921 * infcmd.c (print_return_value_1): Use string_file.
14922 * infrun.c (print_target_wait_results): Use string_file.
14923 * language.c (add_language): Use string_file.
14924 * location.c (explicit_to_string_internal): Use string_file.
14925 * main.c (captured_main_1): Use null_file.
14926 * maint.c (maintenance_print_architecture): Use stdio_file.
14927 * mi/mi-cmd-stack.c (list_arg_or_local): Use string_file.
14928 * mi/mi-common.h (struct mi_interp) <out, err, log, targ,
14929 event_channel>: Change type to mi_console_file pointer.
14930 * mi/mi-console.c (mi_console_file_fputs, mi_console_file_flush)
14931 (mi_console_file_delete): Delete.
14932 (struct mi_console_file): Delete.
14933 (mi_console_file_magic): Delete.
14934 (mi_console_file_new): Delete.
14935 (mi_console_file::mi_console_file): New.
14936 (mi_console_file_delete): Delete.
14937 (mi_console_file_fputs): Delete.
14938 (mi_console_file::write): New.
14939 (mi_console_raw_packet): Delete.
14940 (mi_console_file::flush): New.
14941 (mi_console_file_flush): Delete.
14942 (mi_console_set_raw): Rename to ...
14943 (mi_console_file::set_raw): ... this.
14944 * mi/mi-console.h (class mi_console_file): New class.
14945 (mi_console_file_new, mi_console_set_raw): Delete.
14946 * mi/mi-interp.c (mi_interpreter_init): Use mi_console_file.
14947 (mi_set_logging): Use delete and tee_file. Adjust.
14948 * mi/mi-main.c (output_register): Use string_file.
14949 (mi_cmd_data_evaluate_expression): Use string_file.
14950 (mi_cmd_data_read_memory): Use string_file.
14951 (mi_cmd_execute, print_variable_or_computed): Use string_file.
14952 * mi/mi-out.c (mi_ui_out::main_stream): New.
14953 (mi_ui_out::rewind): Use main_stream and
14954 string_file.
14955 (mi_ui_out::put): Use main_stream and string_file.
14956 (mi_ui_out::mi_ui_out): Remove 'stream' parameter.
14957 Allocate a 'string_file' instead.
14958 (mi_out_new): Don't allocate a mem_fileopen stream here.
14959 * mi/mi-out.h (mi_ui_out::mi_ui_out): Remove 'stream' parameter.
14960 (mi_ui_out::main_stream): Declare method.
14961 * printcmd.c (eval_command): Use string_file.
14962 * psymtab.c (maintenance_print_psymbols): Use stdio_file.
14963 * python/py-arch.c (archpy_disassemble): Use string_file.
14964 * python/py-breakpoint.c (bppy_get_commands): Use string_file.
14965 * python/py-frame.c (frapy_str): Use string_file.
14966 * python/py-framefilter.c (py_print_type, py_print_single_arg):
14967 Use string_file.
14968 * python/py-type.c (typy_str): Use string_file.
14969 * python/py-unwind.c (unwind_infopy_str): Use string_file.
14970 * python/py-value.c (valpy_str): Use string_file.
14971 * record-btrace.c (btrace_insn_history): Use string_file.
14972 * regcache.c (regcache_print): Use stdio_file.
14973 * reggroups.c (maintenance_print_reggroups): Use stdio_file.
14974 * remote.c (escape_buffer): Use string_file.
14975 * rust-lang.c (rust_get_disr_info): Use string_file.
14976 * serial.c (serial_open_ops_1): Use stdio_file.
14977 (do_serial_close): Use delete.
14978 * stack.c (print_frame_arg): Use string_file.
14979 (print_frame_args): Remove local mem_fileopen stream, not used.
14980 (print_frame): Use string_file.
14981 * symmisc.c (maintenance_print_symbols): Use stdio_file.
14982 * symtab.h (struct symbol_computed_ops) <generate_c_location>:
14983 Take a 'string_file *' instead of a 'ui_file *'.
14984 * top.c (new_ui): Use stdio_file and stderr_file.
14985 (free_ui): Use delete.
14986 (execute_command_to_string): Use string_file.
14987 (quit_confirm): Use string_file.
14988 * tracepoint.c (collection_list::append_exp): Use string_file.
14989 * tui/tui-disasm.c (tui_disassemble): Use string_file.
14990 * tui/tui-file.c: Don't include "ui-file.h".
14991 (enum streamtype, struct tui_stream): Delete.
14992 (tui_file_new, tui_file_delete, tui_fileopen, tui_sfileopen)
14993 (tui_file_isatty, tui_file_rewind, tui_file_put): Delete.
14994 (tui_file::tui_file): New method.
14995 (tui_file_fputs): Delete.
14996 (tui_file_get_strbuf): Delete.
14997 (tui_file::puts): New method.
14998 (tui_file_adjust_strbuf): Delete.
14999 (tui_file_flush): Delete.
15000 (tui_file::flush): New method.
15001 * tui/tui-file.h: Tweak intro comment.
15002 Include ui-file.h.
15003 (tui_fileopen, tui_sfileopen, tui_file_get_strbuf)
15004 (tui_file_adjust_strbuf): Delete declarations.
15005 (class tui_file): New class.
15006 * tui/tui-io.c (tui_initialize_io): Use tui_file.
15007 * tui/tui-regs.c (tui_restore_gdbout): Use delete.
15008 (tui_register_format): Use string_stream.
15009 * tui/tui-stack.c (tui_make_status_line): Use string_file.
15010 (tui_get_function_from_frame): Use string_file.
15011 * typeprint.c (type_to_string): Use string_file.
15012 * ui-file.c (struct ui_file, ui_file_magic, ui_file_new): Delete.
15013 (null_stream): New global.
15014 (ui_file_delete): Delete.
15015 (ui_file::ui_file): New.
15016 (null_file_isatty): Delete.
15017 (ui_file::~ui_file): New.
15018 (null_file_rewind): Delete.
15019 (ui_file::printf): New.
15020 (null_file_put): Delete.
15021 (null_file_flush): Delete.
15022 (ui_file::putstr): New.
15023 (null_file_write): Delete.
15024 (ui_file::putstrn): New.
15025 (null_file_read): Delete.
15026 (ui_file::putc): New.
15027 (null_file_fputs): Delete.
15028 (null_file_write_async_safe): Delete.
15029 (ui_file::vprintf): New.
15030 (null_file_delete): Delete.
15031 (null_file::write): New.
15032 (null_file_fseek): Delete.
15033 (null_file::puts): New.
15034 (ui_file_data): Delete.
15035 (null_file::write_async_safe): New.
15036 (gdb_flush, ui_file_isatty): Adjust.
15037 (ui_file_put, ui_file_rewind): Delete.
15038 (ui_file_write): Adjust.
15039 (ui_file_write_for_put): Delete.
15040 (ui_file_write_async_safe, ui_file_read): Adjust.
15041 (ui_file_fseek): Delete.
15042 (fputs_unfiltered): Adjust.
15043 (set_ui_file_flush, set_ui_file_isatty, set_ui_file_rewind)
15044 (set_ui_file_put, set_ui_file_write, set_ui_file_write_async_safe)
15045 (set_ui_file_read, set_ui_file_fputs, set_ui_file_fseek)
15046 (set_ui_file_data): Delete.
15047 (string_file::~string_file, string_file::write)
15048 (struct accumulated_ui_file, do_ui_file_xstrdup, ui_file_xstrdup)
15049 (do_ui_file_as_string, ui_file_as_string): Delete.
15050 (do_ui_file_obsavestring, ui_file_obsavestring): Delete.
15051 (struct mem_file): Delete.
15052 (mem_file_new): Delete.
15053 (stdio_file::stdio_file): New.
15054 (mem_file_delete): Delete.
15055 (stdio_file::stdio_file): New.
15056 (mem_fileopen): Delete.
15057 (stdio_file::~stdio_file): New.
15058 (mem_file_rewind): Delete.
15059 (stdio_file::set_stream): New.
15060 (mem_file_put): Delete.
15061 (stdio_file::open): New.
15062 (mem_file_write): Delete.
15063 (stdio_file_magic, struct stdio_file): Delete.
15064 (stdio_file_new, stdio_file_delete, stdio_file_flush): Delete.
15065 (stdio_file::flush): New.
15066 (stdio_file_read): Rename to ...
15067 (stdio_file::read): ... this. Adjust.
15068 (stdio_file_write): Rename to ...
15069 (stdio_file::write): ... this. Adjust.
15070 (stdio_file_write_async_safe): Rename to ...
15071 (stdio_file::write_async_safe) ... this. Adjust.
15072 (stdio_file_fputs): Rename to ...
15073 (stdio_file::puts) ... this. Adjust.
15074 (stdio_file_isatty): Delete.
15075 (stdio_file_fseek): Delete.
15076 (stdio_file::isatty): New.
15077 (stderr_file_write): Rename to ...
15078 (stderr_file::write) ... this. Adjust.
15079 (stderr_file_fputs): Rename to ...
15080 (stderr_file::puts) ... this. Adjust.
15081 (stderr_fileopen, stdio_fileopen, gdb_fopen): Delete.
15082 (stderr_file::stderr_file): New.
15083 (tee_file_magic): Delete.
15084 (struct tee_file): Delete.
15085 (tee_file::tee_file): New.
15086 (tee_file_new): Delete.
15087 (tee_file::~tee_file): New.
15088 (tee_file_delete): Delete.
15089 (tee_file_flush): Rename to ...
15090 (tee_file::flush): ... this. Adjust.
15091 (tee_file_write): Rename to ...
15092 (tee_file::write): ... this. Adjust.
15093 (tee_file::write_async_safe): New.
15094 (tee_file_fputs): Rename to ...
15095 (tee_file::puts): ... this. Adjust.
15096 (tee_file_isatty): Rename to ...
15097 (tee_file::isatty): ... this. Adjust.
15098 * ui-file.h (struct obstack, struct ui_file): Don't
15099 forward-declare.
15100 (ui_file_new, ui_file_flush_ftype, set_ui_file_flush)
15101 (ui_file_write_ftype)
15102 (set_ui_file_write, ui_file_fputs_ftype, set_ui_file_fputs)
15103 (ui_file_write_async_safe_ftype, set_ui_file_write_async_safe)
15104 (ui_file_read_ftype, set_ui_file_read, ui_file_isatty_ftype)
15105 (set_ui_file_isatty, ui_file_rewind_ftype, set_ui_file_rewind)
15106 (ui_file_put_method_ftype, ui_file_put_ftype, set_ui_file_put)
15107 (ui_file_delete_ftype, set_ui_file_data, ui_file_fseek_ftype)
15108 (set_ui_file_fseek): Delete.
15109 (ui_file_data, ui_file_delete, ui_file_rewind)
15110 (struct ui_file): New.
15111 (ui_file_up): New.
15112 (class null_file): New.
15113 (null_stream): Declare.
15114 (ui_file_write_for_put, ui_file_put): Delete.
15115 (ui_file_xstrdup, ui_file_as_string, ui_file_obsavestring):
15116 Delete.
15117 (ui_file_fseek, mem_fileopen, stdio_fileopen, stderr_fileopen)
15118 (gdb_fopen, tee_file_new): Delete.
15119 (struct string_file): New.
15120 (struct stdio_file): New.
15121 (stdio_file_up): New.
15122 (struct stderr_file): New.
15123 (class tee_file): New.
15124 * ui-out.c (ui_out::field_stream): Take a 'string_file &' instead
15125 of a 'ui_file *'. Adjust.
15126 * ui-out.h (class ui_out) <field_stream>: Likewise.
15127 * utils.c (do_ui_file_delete, make_cleanup_ui_file_delete)
15128 (null_stream): Delete.
15129 (error_stream): Take a 'string_file &' instead of a 'ui_file *'.
15130 Adjust.
15131 * utils.h (struct ui_file): Delete forward declaration..
15132 (make_cleanup_ui_file_delete, null_stream): Delete declarations.
15133 (error_stream): Take a 'string_file &' instead of a
15134 'ui_file *'.
15135 * varobj.c (varobj_value_get_print_value): Use string_file.
15136 * xtensa-tdep.c (xtensa_verify_config): Use string_file.
15137 * gdbarch.c: Regenerate.
15138
15139 2017-02-02 Pedro Alves <palves@redhat.com>
15140
15141 * disasm.c (gdb_disassembler::pretty_print_insn): Rename to...
15142 (gdb_pretty_print_insn): ... this. Now a free function. Add back
15143 a 'gdbarch' parameter. Allocate a mem_fileopen stream here.
15144 Adjust to call gdb_print_insn instead of
15145 gdb_disassembler::print_insn.
15146 (dump_insns, do_mixed_source_and_assembly_deprecated)
15147 (do_mixed_source_and_assembly, do_assembly_only): Add back a
15148 'gdbarch' parameter. Remove gdb_disassembler parameter.
15149 (gdb_disassembly): Don't allocate a gdb_disassembler here.
15150 * disasm.h (gdb_disassembler::pretty_print_insn): Delete
15151 declaration.
15152 (gdb_pretty_print_insn): Re-add declaration.
15153 * record-btrace.c (btrace_insn_history): Don't allocate a
15154 gdb_disassembler here. Adjust to call gdb_pretty_print_insn.
15155
15156 2017-02-01 Simon Marchi <simon.marchi@polymtl.ca>
15157
15158 * disasm.h (gdb_disassembly): Remove file_string parameter.
15159 * disasm.c (gdb_disassembly): Likewise.
15160 * cli/cli-cmds.c (print_disassembly): Adapt.
15161 * mi/mi-cmd-disas.c (mi_cmd_disassemble): Likewise.
15162 * stack.c (do_gdb_disassembly): Likewise.
15163
15164 2017-02-01 Andreas Arnez <arnez@linux.vnet.ibm.com>
15165
15166 * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): For
15167 DWARF_VALUE_LITERAL, no longer ignore the offset on big-endian
15168 targets. And if the implicit value is longer than needed, extract
15169 the first bytes instead of the "least significant" ones.
15170
15171 2017-02-01 Markus Metzger <markus.t.metzger@intel.com>
15172
15173 * btrace.c (btrace_enable): Do not call btrace_add_pc for
15174 BTRACE_FORMAT_PT or if can_access_registers_ptid returns false.
15175 (btrace_fetch): Assert can_access_registers_ptid.
15176 * record-btrace.c (require_btrace_thread, record_btrace_info): Call
15177 validate_registers_access.
15178
15179 2017-02-01 Markus Metzger <markus.t.metzger@intel.com>
15180
15181 * gdbthread.h (can_access_registers_ptid): New.
15182 * thread.c (can_access_registers_ptid): New.
15183
15184 2017-02-01 Pedro Alves <palves@redhat.com>
15185
15186 * i386-tdep.c (i386_fast_tracepoint_valid_at): Use gdb_insn_length.
15187
15188 2017-01-31 Pedro Alves <palves@redhat.com>
15189
15190 * mi/mi-interp.c (mi_breakpoint_created, mi_breakpoint_modified):
15191 Fix typos.
15192
15193 2017-01-31 Pedro Alves <palves@redhat.com>
15194
15195 * stack.c (print_frame_args): Remove local mem_fileopen stream,
15196 not used.
15197
15198 2017-01-31 Pedro Alves <palves@redhat.com>
15199
15200 * varobj.c (varobj_value_get_print_value): Remove xstrdup call.
15201
15202 2017-01-31 Pedro Alves <palves@redhat.com>
15203
15204 * common/scoped_restore.h
15205 (scoped_restore_tmpl::scoped_restore_tmpl): Template on T2, and
15206 change the value's parameter type to T2.
15207 (make_scoped_restore): Likewise.
15208
15209 2017-01-27 Walfred Tedeschi <walfred.tedeschi@intel.com>
15210 Richard Henderson <rth@redhat.com>
15211
15212 * amd64-linux-nat.c (PTRACE_ARCH_PRCTL): New define.
15213 (amd64_linux_fetch_inferior_registers): Add case to fetch FS_BASE
15214 GS_BASE for older kernels.
15215 (amd64_linux_store_inferior_registers): Add case to store FS_BASE
15216 GS_BASE for older kernels.
15217 * amd64-linux-tdep.c (amd64_linux_gregset_reg_offset): Add FS_BASE
15218 and GS_BASE to the offset table.
15219 (amd64_linux_register_reggroup_p): Add FS_BASE and GS_BASE to the
15220 system register group.
15221 * amd64-nat.c (amd64_native_gregset_reg_offset): Implements case
15222 for older kernels.
15223 * amd64-tdep.c (amd64_init_abi): Add segment registers for the
15224 amd64 ABI.
15225 * amd64-tdep.h (amd64_regnum): Add AMD64_FSBASE_REGNUM and
15226 AMD64_GSBASE_REGNUM.
15227 (AMD64_NUM_REGS): Set to AMD64_GSBASE_REGNUM + 1.
15228 * features/Makefile (amd64-linux.dat, amd64-avx-linux.dat)
15229 (amd64-mpx-linux.dat, amd64-avx512-linux.dat, x32-linux.dat)
15230 (x32-avx-linux.dat, x32-avx512-linux.dat): Add
15231 i386/64bit-segments.xml in those rules.
15232 * features/i386/64bit-segments.xml: New file.
15233 * features/i386/amd64-avx-mpx-linux.xml: Add 64bit-segments.xml.
15234 * features/i386/amd64-avx-linux.xml: Add 64bit-segments.xml.
15235 * features/i386/amd64-avx512-linux.xml: Add 64bit-segments.xml.
15236 * features/i386/amd64-mpx-linux.xml: Add 64bit-segments.xml.
15237 * features/i386/x32-avx512-linux.xml: Add 64bit-segments.xml.
15238 * features/i386/x32-avx-linux.xml: Add 64bit-segments.xml.
15239 * features/i386/amd64-linux.xml: Add 64bit-segments.xml.
15240 * features/i386/amd64-avx-linux.c: Regenerated.
15241 * features/i386/amd64-avx-mpx-linux.c: Regenerated.
15242 * features/i386/amd64-avx-mpx.c: Regenerated.
15243 * features/i386/amd64-avx512-linux.c: Regenerated.
15244 * features/i386/amd64-linux.c: Regenerated.
15245 * features/i386/amd64-mpx-linux.c: Regenerated.
15246 * features/i386/i386-avx-mpx-linux.c: Regenerated.
15247 * features/i386/i386-avx-mpx.c: Regenerated.
15248 * features/i386/x32-avx-linux.c: Regenerated.
15249 * features/i386/x32-avx512-linux.c: Regenerated.
15250 * regformats/i386/amd64-avx-linux.dat: Regenerated.
15251 * regformats/i386/amd64-avx-mpx-linux.dat: Regenerated.
15252 * regformats/i386/amd64-avx512-linux.dat: Regenerated.
15253 * regformats/i386/amd64-linux.dat: Regenerated.
15254 * regformats/i386/amd64-mpx-linux.dat: Regenerated.
15255 * regformats/i386/x32-avx-linux.dat: Regenerated.
15256 * regformats/i386/x32-avx512-linux.dat: Regenerated.
15257 * regformats/i386/x32-linux.dat: Regenerated.
15258
15259 2017-01-27 Walfred Tedeschi <walfred.tedeschi@intel.com>
15260
15261 * amd64-linux-tdep.h (AMD64_LINUX_ORIG_RAX_REGNUM):
15262 Set to AMD64_NUM_REGS.
15263
15264 2017-01-27 Walfred Tedeschi <walfred.tedeschi@intel.com>
15265
15266 * amd64-nat.c (amd64_native_gregset_reg_offset): Simplify logic
15267 that checks validity of a register number.
15268
15269 2017-01-27 Kees Cook <keescook@google.com>
15270
15271 * gdb/arm-linux-nat.c (arm_linux_fetch_inferior_registers): Call
15272 fetch_fpregs if target has fpa registers.
15273 (arm_linux_store_inferior_registers): Call store_fpregs if target
15274 has fpa registers.
15275
15276 2017-01-26 Andreas Arnez <arnez@linux.vnet.ibm.com>
15277
15278 * cris-tdep.c (cris_gdbarch_init): Remove check for
15279 info.byte_order and force it to BFD_ENDIAN_LITTLE.
15280
15281 2017-01-26 Antoine Tremblay <antoine.tremblay@ericsson.com>
15282
15283 * corelow.c (get_core_register_section): Check for regset
15284 existence before checking for REGSET_VARIABLE_SIZE.
15285
15286 2017-01-26 Yao Qi <yao.qi@linaro.org>
15287 Pedro Alves <palves@redhat.com>
15288
15289 PR gdb/20939
15290 * disasm.c (gdb_disassembler::dis_asm_memory_error): Don't
15291 call memory_error, save memaddr instead.
15292 (gdb_disassembler::print_insn): If gdbarch_print_insn returns
15293 negative, cal memory_error.
15294 * disasm.h (gdb_disassembler) <m_err_memaddr>: New field.
15295
15296 2017-01-26 Yao Qi <yao.qi@linaro.org>
15297
15298 * disasm-selftests.c (memory_error_test): New function.
15299 (_initialize_disasm_selftests): Register memory_error_test.
15300
15301 2017-01-26 Yao Qi <yao.qi@linaro.org>
15302
15303 * Makefile.in (SFILES): Add disasm-selftests.c and
15304 selftest-arch.c.
15305 (COMMON_OBS): Add disasm-selftests.o and selftest-arch.o.
15306 * disasm-selftests.c: New file.
15307 * selftest-arch.c: New file.
15308 * selftest-arch.h: New file.
15309
15310 2017-01-26 Yao Qi <yao.qi@linaro.org>
15311
15312 * mep-tdep.c (mep_gdb_print_insn): Set info->arch
15313 to bfd_arch_mep. Don't return 0 if section is not
15314 found. Call print_insn_mep.
15315
15316 2017-01-26 Pedro Alves <palves@redhat.com>
15317 Yao Qi <yao.qi@linaro.org>
15318
15319 * arm-tdep.c: Include "disasm.h".
15320 (gdb_print_insn_arm): Update code to get gdbarch.
15321 * disasm.c (dis_asm_read_memory): Change it to
15322 gdb_disassembler::dis_asm_read_memory.
15323 (dis_asm_memory_error): Likewise.
15324 (dis_asm_print_address): Likewise.
15325 (gdb_pretty_print_insn): Change it to
15326 gdb_disassembler::pretty_print_insn.
15327 (dump_insns): Add one argument gdb_disassemlber. All
15328 callers updated.
15329 (do_mixed_source_and_assembly_deprecated): Likewise.
15330 (do_mixed_source_and_assembly): Likewise.
15331 (do_assembly_only): Likewise.
15332 (gdb_disassembler::gdb_disassembler): New.
15333 (gdb_disassembler::print_insn): New.
15334 * disasm.h (class gdb_disassembler): New.
15335 (gdb_pretty_print_insn): Remove declaration.
15336 (gdb_disassemble_info): Likewise.
15337 * guile/scm-disasm.c (class gdbscm_disassembler): New.
15338 (gdbscm_disasm_read_memory_worker): Update.
15339 (gdbscm_disasm_read_memory): Update.
15340 (gdbscm_disasm_memory_error): Remove.
15341 (gdbscm_disasm_print_address): Remove.
15342 (gdbscm_disassembler::gdbscm_disassembler): New.
15343 (gdbscm_print_insn_from_port): Update.
15344 * mips-tdep.c: Include disasm.h.
15345 (gdb_print_insn_mips): Update code to get gdbarch.
15346 * record-btrace.c (btrace_insn_history): Update.
15347 * spu-tdep.c: Include disasm.h.
15348 (struct spu_dis_asm_data): Remove.
15349 (struct spu_dis_asm_info): New.
15350 (spu_dis_asm_print_address): Use spu_dis_asm_info to get
15351 SPU id.
15352 (gdb_print_insn_spu): Cast disassemble_info to
15353 spu_dis_asm_info.
15354
15355 2017-01-26 Yao Qi <yao.qi@linaro.org>
15356
15357 * disasm.c (do_ui_file_delete): Delete.
15358 (gdb_insn_length): Move code creating stream to ...
15359 * utils.c (null_stream): ... here. New function.
15360 * utils.h (null_stream): Declare.
15361
15362 2017-01-23 Simon Marchi <simon.marchi@polymtl.ca>
15363
15364 * python/py-inferior.c (find_thread_object): Return directly
15365 from the loop. Remove "found" variable.
15366
15367 2017-01-21 Joel Brobecker <brobecker@adacore.com>
15368
15369 GDB 7.12.1 released.
15370
15371 2017-01-20 Simon Marchi <simon.marchi@ericsson.com>
15372
15373 * python/py-function.c (fnpy_call): Reorder declarations to have
15374 the gdbpy_enter object declared first.
15375 * python/py-xmethods.c (gdbpy_get_xmethod_arg_types): Likewise.
15376
15377 2017-01-20 Simon Marchi <simon.marchi@ericsson.com>
15378
15379 PR python/21068
15380 * python/python-internal.h (PyMem_RawMalloc): Define for
15381 Python < 3.4.
15382 * python/py-gdb-readline.c (gdbpy_readline_wrapper): Use
15383 PyMem_RawMalloc instead of PyMem_Malloc.
15384
15385 2017-01-20 Mike Wrighton <mike_wrighton@codesourcery.com>
15386 Luis Machado <lgustavo@codesourcery.com>
15387
15388 * NEWS (New commands): Mention flash-erase.
15389 (New MI commands): Mention target-flash-erase.
15390 * mi/mi-cmds.c (mi_cmd_target_flash_erase): Add target-flash-erase MI
15391 command.
15392 * mi/mi-cmds.h (mi_cmd_target_flash_erase): New declaration.
15393 * mi/mi-main.c (mi_cmd_target_flash_erase): New function.
15394 * target.c (flash_erase_command): New function.
15395 (initialize_targets): Add new flash-erase command.
15396 * target.h (flash_erase_command): New declaration.
15397
15398 2017-01-20 Joel Brobecker <brobecker@adacore.com>
15399
15400 * nat/linux-ptrace.c: Only include <sys/procfs.h> if
15401 HAVE_SYS_PROCFS_H is defined.
15402
15403 2017-01-18 Alan Hayward <alan.hayward@arm.com>
15404
15405 * remote.c (struct cached_reg): Change data into a pointer.
15406 * (stop_reply_dtr): Free data pointers before deleting vector.
15407 (process_stop_reply): Likewise.
15408 (remote_parse_stop_reply): Allocate space for data
15409
15410 2017-01-18 Alan Hayward <alan.hayward@arm.com>
15411
15412 * amd64-tdep.c (amd64_pseudo_register_read_value): remove
15413 MAX_REGISTER_SIZE.
15414 (amd64_pseudo_register_read_value): Likewise.
15415 * remote.c (fetch_register_using_p): Remove MAX_REGISTER_SIZE.
15416 (store_register_using_P): Likewise.
15417 * regcache.c (regcache_xfer_part): Likewise.
15418
15419 2017-01-16 Ivo Raisr <ivo.raisr@oracle.com>
15420
15421 Split real and pseudo registers.
15422 * sparc-tdep.h (SPARC_CORE_REGISTERS): New macro.
15423 (sparc32_pseudo_regnum): New enum.
15424 * sparc64-tdep.h (sparc64_pseudo_regnum): New enum.
15425 * sparc-tdep.c (SPARC32_FPU_REGISTERS): New macro.
15426 (SPARC32_CP0_REGISTERS): New macro.
15427 (sparc32_pseudo_register_name): New function.
15428 (sparc32_register_name): Use sparc32_pseudo_register_name.
15429 (sparc32_pseudo_register_type): New function.
15430 (sparc32_register_type): Use sparc32_pseudo_register_type.
15431 (sparc32_pseudo_register_read, sparc32_pseudo_register_write): Handle
15432 pseudo register numbers.
15433 * sparc64-tdep.c SPARC64_FPU_REGISTERS): New macro.
15434 (SPARC64_CP0_REGISTERS): New macro.
15435 (sparc64_pseudo_register_name): New function.
15436 (sparc64_register_name): Use sparc64_pseudo_register_name.
15437 (sparc64_pseudo_register_type): New function.
15438 (sparc64_register_type): Use sparc64_pseudo_register_type.
15439 (sparc64_pseudo_register_read, sparc64_pseudo_register_write): Handle
15440 pseudo register numbers.
15441 (sparc64_store_floating_fields, sparc64_extract_floating_fields,
15442 sparc64_store_arguments): Handle pseudo register numbers.
15443
15444 2017-01-13 Yao Qi <yao.qi@linaro.org>
15445
15446 * remote.c (REMOTE_DEBUG_MAX_CHAR): New macro.
15447 (putpkt_binary): Print only REMOTE_DEBUG_MAX_CHAR chars in debug
15448 output.
15449 (getpkt_or_notif_sane_1): Likewise.
15450
15451 2017-01-13 Yao Qi <yao.qi@linaro.org>
15452
15453 * Makefile.in (checker-headers): Use CXX and CXX_DIALET instead
15454 of CC. Pass "-x c++-header" instead of "-x c".
15455
15456 2017-01-12 Simon Marchi <simon.marchi@ericsson.com>
15457
15458 * remote.c (remote_can_async_p): Update comment.
15459
15460 2017-01-12 Simon Marchi <simon.marchi@ericsson.com>
15461
15462 * linux-nat.c (linux_nat_can_async_p): Update comment.
15463
15464 2017-01-12 Simon Marchi <simon.marchi@ericsson.com>
15465
15466 * serial.c (serial_open): Forget about "pc" and "lpt" serial interface.
15467
15468 2017-01-11 Simon Marchi <simon.marchi@ericsson.com>
15469
15470 * cli/cli-decode.c (lookup_cmd_1): Fix typo in comment.
15471
15472 2017-01-10 Tom Tromey <tom@tromey.com>
15473
15474 * python/py-type.c (typy_legacy_template_argument): Update.
15475 * cp-support.h (struct demangle_parse_info) (demangle_parse_info,
15476 ~demangle_parse_info): Declare new members.
15477 (cp_demangled_name_to_comp): Return unique_ptr.
15478 (cp_demangled_name_parse_free)
15479 (make_cleanup_cp_demangled_name_parse_free)
15480 (cp_new_demangle_parse_info): Remove.
15481 * cp-support.c (do_demangled_name_parse_free_cleanup)
15482 (make_cleanup_cp_demangled_name_parse_free): Remove.
15483 (inspect_type, cp_canonicalize_string_full)
15484 (cp_canonicalize_string): Update.
15485 (mangled_name_to_comp): Change return type.
15486 (cp_class_name_from_physname, method_name_from_physname)
15487 (cp_func_name, cp_remove_params): Update.
15488 * cp-name-parser.y (demangle_parse_info): New constructor, from
15489 cp_new_demangle_parse_info.
15490 (~demangle_parse_info): New destructor, from
15491 cp_demangled_name_parse_free.
15492 (cp_merge_demangle_parse_infos): Update.
15493 (cp_demangled_name_to_comp): Change return type.
15494
15495 2017-01-10 Tom Tromey <tom@tromey.com>
15496
15497 * top.c (prevent_dont_repeat): Change return type.
15498 * python/python.c (execute_gdb_command): Use std::string.
15499 Update.
15500 * guile/guile.c (gdbscm_execute_gdb_command): Update.
15501 * command.h (prevent_dont_repeat): Change return type.
15502 * breakpoint.c (bpstat_do_actions_1): Update.
15503
15504 2017-01-10 Tom Tromey <tom@tromey.com>
15505
15506 * value.h (scoped_value_mark::~scoped_value_mark): Call
15507 free_to_mark.
15508 (scoped_value_mark::free_to_mark): New method.
15509 * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Use
15510 scoped_value_mark.
15511
15512 2017-01-10 Tom Tromey <tom@tromey.com>
15513
15514 * python/py-value.c (valpy_dereference, valpy_referenced_value)
15515 (valpy_reference_value, valpy_const_value, valpy_get_address)
15516 (valpy_get_dynamic_type, valpy_lazy_string, valpy_do_cast)
15517 (valpy_getitem, valpy_call, valpy_binop_throw, valpy_negative)
15518 (valpy_absolute, valpy_richcompare_throw): Use scoped_value_mark.
15519 * dwarf2loc.c (dwarf2_loc_desc_get_symbol_read_needs): Use
15520 scoped_value_mark.
15521 * dwarf2-frame.c (execute_stack_op): Use scoped_value_mark.
15522 * value.h (scoped_value_mark): New class.
15523
15524 2017-01-10 Tom Tromey <tom@tromey.com>
15525
15526 * dwarf2read.c (dwarf2_build_psymtabs): Use psymtab_discarder.
15527 * psympriv.h (make_cleanup_discard_psymtabs): Don't declare.
15528 * psymtab.c (discard_psymtabs_upto): Remove.
15529 (make_cleanup_discard_psymtabs): Remove.
15530 (struct psymtab_state): Remove.
15531
15532 2017-01-10 Tom Tromey <tom@tromey.com>
15533
15534 * record-full.c (record_full_save_cleanups): Remove.
15535 (record_full_save): Use gdb::unlinker.
15536 * gcore.c (do_bfd_delete_cleanup): Remove.
15537 (gcore_command): Use gdb::unlinker, unique_xmalloc_ptr. Remove
15538 cleanups.
15539 * dwarf2read.c (unlink_if_set): Remove.
15540 (write_psymtabs_to_index): Use gdb::unlinker.
15541 * common/gdb_unlinker.h: New file.
15542
15543 2017-01-10 Tom Tromey <tom@tromey.com>
15544
15545 * windows-tdep.c (windows_xfer_shared_library): Update.
15546 * windows-nat.c (windows_make_so): Update.
15547 * utils.h (make_cleanup_bfd_unref): Remove.
15548 * utils.c (do_bfd_close_cleanup, make_cleanup_bfd_unref): Remove.
15549 * symfile.h (symfile_bfd_open)
15550 (find_separate_debug_file_in_section): Return gdb_bfd_ref_ptr.
15551 * symfile.c (read_symbols, symbol_file_add)
15552 (separate_debug_file_exists): Update.
15553 (symfile_bfd_open): Return gdb_bfd_ref_ptr.
15554 (generic_load, reread_symbols): Update.
15555 * symfile-mem.c (symbol_file_add_from_memory): Update.
15556 * spu-linux-nat.c (spu_bfd_open): Return gdb_bfd_ref_ptr.
15557 (spu_symbol_file_add_from_memory): Update.
15558 * solist.h (struct target_so_ops) <bfd_open>: Return
15559 gdb_bfd_ref_ptr.
15560 (solib_bfd_fopen, solib_bfd_open): Return gdb_bfd_ref_ptr.
15561 * solib.c (solib_bfd_fopen, solib_bfd_open): Return
15562 gdb_bfd_ref_ptr.
15563 (solib_map_sections, reload_shared_libraries_1): Update.
15564 * solib-svr4.c (enable_break): Update.
15565 * solib-spu.c (spu_bfd_fopen): Return gdb_bfd_ref_ptr.
15566 * solib-frv.c (enable_break2): Update.
15567 * solib-dsbt.c (enable_break): Update.
15568 * solib-darwin.c (gdb_bfd_mach_o_fat_extract): Return
15569 gdb_bfd_ref_ptr.
15570 (darwin_solib_get_all_image_info_addr_at_init): Update.
15571 (darwin_bfd_open): Return gdb_bfd_ref_ptr.
15572 * solib-aix.c (solib_aix_bfd_open): Return gdb_bfd_ref_ptr.
15573 * record-full.c (record_full_save): Update.
15574 * python/py-objfile.c (objfpy_add_separate_debug_file): Update.
15575 * procfs.c (insert_dbx_link_bpt_in_file): Update.
15576 * minidebug.c (find_separate_debug_file_in_section): Return
15577 gdb_bfd_ref_ptr.
15578 * machoread.c (macho_add_oso_symfile): Change abfd to
15579 gdb_bfd_ref_ptr.
15580 (macho_symfile_read_all_oso): Update.
15581 (macho_check_dsym): Return gdb_bfd_ref_ptr.
15582 (macho_symfile_read): Update.
15583 * jit.c (bfd_open_from_target_memory): Return gdb_bfd_ref_ptr.
15584 (jit_bfd_try_read_symtab): Update.
15585 * gdb_bfd.h (gdb_bfd_open, gdb_bfd_fopen, gdb_bfd_openr)
15586 (gdb_bfd_openw, gdb_bfd_openr_iovec)
15587 (gdb_bfd_openr_next_archived_file, gdb_bfd_fdopenr): Return
15588 gdb_bfd_ref_ptr.
15589 (gdb_bfd_ref_policy): New struct.
15590 (gdb_bfd_ref_ptr): New typedef.
15591 * gdb_bfd.c (gdb_bfd_open, gdb_bfd_fopen, gdb_bfd_openr)
15592 (gdb_bfd_openw, gdb_bfd_openr_iovec)
15593 (gdb_bfd_openr_next_archived_file, gdb_bfd_fdopenr): Return
15594 gdb_bfd_ref_ptr.
15595 * gcore.h (create_gcore_bfd): Return gdb_bfd_ref_ptr.
15596 * gcore.c (create_gcore_bfd): Return gdb_bfd_ref_ptr.
15597 (gcore_command): Update.
15598 * exec.c (exec_file_attach): Update.
15599 * elfread.c (elf_symfile_read): Update.
15600 * dwarf2read.c (dwarf2_get_dwz_file): Update.
15601 (try_open_dwop_file, open_dwo_file): Return gdb_bfd_ref_ptr.
15602 (open_and_init_dwo_file): Update.
15603 (open_dwp_file): Return gdb_bfd_ref_ptr.
15604 (open_and_init_dwp_file): Update.
15605 * corelow.c (core_open): Update.
15606 * compile/compile-object-load.c (compile_object_load): Update.
15607 * common/gdb_ref_ptr.h (ref_ptr::operator->): New operator.
15608 * coffread.c (coff_symfile_read): Update.
15609 * cli/cli-dump.c (bfd_openr_or_error, bfd_openw_or_error): Return
15610 gdb_bfd_ref_ptr. Rename.
15611 (dump_bfd_file, restore_command): Update.
15612 * build-id.h (build_id_to_debug_bfd): Return gdb_bfd_ref_ptr.
15613 * build-id.c (build_id_to_debug_bfd): Return gdb_bfd_ref_ptr.
15614 (find_separate_debug_file_by_buildid): Update.
15615
15616 2017-01-10 Tom Tromey <tom@tromey.com>
15617
15618 * common/gdb_ref_ptr.h: New file.
15619 * python/py-ref.h (struct gdbpy_ref_policy): New.
15620 (gdbpy_ref): Now a typedef.
15621
15622 2017-01-10 Tom Tromey <tom@tromey.com>
15623
15624 * utils.h (make_cleanup_htab_delete): Don't declare.
15625 * utils.c (do_htab_delete_cleanup, make_cleanup_htab_delete):
15626 Remove.
15627 * linespec.c (decode_compound_collector): Add constructor,
15628 destructor.
15629 (lookup_prefix_sym): Remove cleanup.
15630 (symtab_collector): Add constructor, destructor.
15631 (collect_symtabs_from_filename): Remove cleanup.
15632 * disasm.c (do_mixed_source_and_assembly): Use htab_up.
15633 * compile/compile-c-symbols.c (generate_c_for_variable_locations):
15634 Use htab_up.
15635 * gnu-v3-abi.c (gnuv3_print_vtable): Use htab_up.
15636 * dwarf2read.c (dw2_expand_symtabs_matching)
15637 (dw2_map_symbol_filenames, dwarf_decode_macros)
15638 (write_psymtabs_to_index): Use htab_up.
15639 * dwarf2loc.c (func_verify_no_selftailcall)
15640 (call_site_find_chain_1, func_verify_no_selftailcall)
15641 (chain_candidate, call_site_find_chain_1): Use std::unordered_set,
15642 std::vector, gdb::unique_xmalloc_ptr.
15643 (call_sitep): Remove typedef.
15644 (dwarf2_locexpr_baton_eval): Remove unused variable.
15645
15646 2017-01-10 Tom Tromey <tom@tromey.com>
15647
15648 * python/python-internal.h (make_cleanup_py_decref)
15649 (make_cleanup_py_xdecref): Don't declare.
15650 * python/py-utils.c (py_decref, make_cleanup_py_decref)
15651 (py_xdecref, make_cleanup_py_xdecref): Remove.
15652
15653 2017-01-10 Tom Tromey <tom@tromey.com>
15654
15655 * python/py-framefilter.c (py_mi_print_variables): Use gdbpy_ref.
15656 (py_print_locals, enumerate_locals, py_print_args): Use gdbpy_ref.
15657
15658 2017-01-10 Tom Tromey <tom@tromey.com>
15659
15660 * python/py-framefilter.c (enumerate_args): Use gdbpy_ref.
15661
15662 2017-01-10 Tom Tromey <tom@tromey.com>
15663
15664 * python/py-utils.c (unicode_to_encoded_string)
15665 (python_string_to_target_string)
15666 (python_string_to_target_python_string)
15667 (python_string_to_host_string, gdbpy_obj_to_string)
15668 (get_addr_from_python): Use gdbpy_ref.
15669
15670 2017-01-10 Tom Tromey <tom@tromey.com>
15671
15672 * python/py-unwind.c (pyuw_object_attribute_to_pointer): Use
15673 gdbpy_ref.
15674
15675 2017-01-10 Tom Tromey <tom@tromey.com>
15676
15677 * python/python.c (eval_python_command, gdbpy_decode_line)
15678 (gdbpy_run_events, gdbpy_start_type_printers)
15679 (gdbpy_apply_type_printers): Use gdbpy_ref.
15680
15681 2017-01-10 Tom Tromey <tom@tromey.com>
15682
15683 * python/py-param.c (get_doc_string, compute_enum_values): Use
15684 gdbpy_ref.
15685
15686 2017-01-10 Tom Tromey <tom@tromey.com>
15687
15688 * python/py-inferior.c (find_thread_object, build_inferior_list):
15689 Use gdbpy_ref.
15690
15691 2017-01-10 Tom Tromey <tom@tromey.com>
15692
15693 * python/py-framefilter.c (py_print_frame): Use gdbpy_ref.
15694
15695 2017-01-10 Tom Tromey <tom@tromey.com>
15696
15697 * python/py-finishbreakpoint.c (bpfinishpy_out_of_scope): Use
15698 gdbpy_ref.
15699
15700 2017-01-10 Tom Tromey <tom@tromey.com>
15701
15702 * python/py-cmd.c (cmdpy_completer_helper): Use gdbpy_ref. Remove
15703 extra incref.
15704 (cmdpy_completer_handle_brkchars, cmdpy_completer, cmdpy_init):
15705 Use gdbpy_ref.
15706
15707 2017-01-10 Tom Tromey <tom@tromey.com>
15708
15709 * python/py-breakpoint.c (gdbpy_breakpoint_cond_says_stop): Use
15710 gdbpy_ref.
15711
15712 2017-01-10 Tom Tromey <tom@tromey.com>
15713
15714 * python/py-arch.c (archpy_disassemble): Use gdbpy_ref. Don't
15715 decref results of PyArg_ParseTupleAndKeywords.
15716
15717 2017-01-10 Tom Tromey <tom@tromey.com>
15718
15719 * python/python.c (python_run_simple_file): Use
15720 unique_xmalloc_ptr, gdbpy_ref.
15721
15722 2017-01-10 Tom Tromey <tom@tromey.com>
15723
15724 * python/py-prettyprint.c (print_stack_unless_memory_error)
15725 (print_string_repr, print_children): Use gdbpy_ref.
15726 (dummy_python_frame): New class.
15727 (dummy_python_frame::dummy_python_frame): Rename from
15728 push_dummy_python_frame.
15729 (py_restore_tstate): Remove.
15730
15731 2017-01-10 Tom Tromey <tom@tromey.com>
15732
15733 * python/py-framefilter.c (py_print_frame): Use gdbpy_ref.
15734
15735 2017-01-10 Tom Tromey <tom@tromey.com>
15736
15737 * python/python.c (ensure_python_env, restore_python_env):
15738 Remove.
15739 * python/python-internal.h (ensure_python_env): Don't declare.
15740 * varobj.h (varobj_ensure_python_env): Don't declare.
15741 * varobj.c (varobj_ensure_python_env): Remove.
15742
15743 2017-01-10 Tom Tromey <tom@tromey.com>
15744
15745 * varobj.c (varobj_value_get_print_value): Use
15746 gdbpy_enter_varobj.
15747
15748 2017-01-10 Tom Tromey <tom@tromey.com>
15749
15750 * python/py-prettyprint.c (print_string_repr, print_children):
15751 Update.
15752 * python/py-lazy-string.c (gdbpy_extract_lazy_string): Change type
15753 of "encoding".
15754 * varobj.c (varobj_value_get_print_value): Update.
15755 * python/python-internal.h (gdbpy_extract_lazy_string): Update.
15756
15757 2017-01-10 Tom Tromey <tom@tromey.com>
15758
15759 * varobj.c (varobj_get_display_hint)
15760 (dynamic_varobj_has_child_method, install_new_value_visualizer)
15761 (varobj_set_visualizer, free_variable): Use
15762 gdbpy_enter_varobj.
15763
15764 2017-01-10 Tom Tromey <tom@tromey.com>
15765
15766 * python/python.c (python_command): Use gdbpy_enter, gdbpy_ref.
15767 (do_finish_initialization): New function. Use gdbpy_ref.
15768 (gdbpy_finish_initialization): Use gdbpy_enter. Call
15769 do_finish_initialization.
15770
15771 2017-01-10 Tom Tromey <tom@tromey.com>
15772
15773 * python/py-param.c (get_set_value, get_show_value): Use
15774 gdbpy_enter, gdbpy_ref.
15775
15776 2017-01-10 Tom Tromey <tom@tromey.com>
15777
15778 * python/py-function.c (fnpy_call): Use gdbpy_enter, gdbpy_ref.
15779
15780 2017-01-10 Tom Tromey <tom@tromey.com>
15781
15782 * python/py-cmd.c (cmdpy_function): Use gdbpy_enter, gdbpy_ref.
15783
15784 2017-01-10 Tom Tromey <tom@tromey.com>
15785
15786 * python/py-varobj.c (py_varobj_iter_dtor, py_varobj_iter_next):
15787 Use gdbpy_enter_varobj.
15788
15789 2017-01-10 Tom Tromey <tom@tromey.com>
15790
15791 * varobj.c (gdbpy_enter_varobj): New constructor.
15792 * python/python-internal.h (gdbpy_enter_varobj): New class.
15793 * python/py-varobj.c (py_varobj_get_iterator): Use
15794 gdbpy_enter_varobj.
15795
15796 2017-01-10 Tom Tromey <tom@tromey.com>
15797
15798 * python/py-xmethods.c (gdbpy_get_xmethod_result_type): Use
15799 gdbpy_enter, gdbpy_ref, unique_xmalloc_ptr.
15800 (gdbpy_invoke_xmethod): Use gdbpy_ref, gdbpy_enter.
15801 (gdbpy_get_xmethod_arg_types): Use gdbpy_ref,
15802 unique_xmalloc_ptr.
15803 (gdbpy_get_xmethod_arg_types): Use gdbpy_ref, gdbpy_enter.
15804
15805 2017-01-10 Tom Tromey <tom@tromey.com>
15806
15807 * python/py-xmethods.c (invoke_match_method): Use
15808 gdbpy_ref.
15809
15810 2017-01-10 Tom Tromey <tom@tromey.com>
15811
15812 * python/py-xmethods.c (gdbpy_get_matching_xmethod_workers): use
15813 gdbpy_enter, gdbpy_ref.
15814
15815 2017-01-10 Tom Tromey <tom@tromey.com>
15816
15817 * python/python.c (python_interactive_command): Use gdbpy_enter.
15818
15819 2017-01-10 Tom Tromey <tom@tromey.com>
15820
15821 * python/python.c (gdbpy_before_prompt_hook): Use gdbpy_enter,
15822 gdbpy_ref.
15823
15824 2017-01-10 Tom Tromey <tom@tromey.com>
15825
15826 * python/py-prettyprint.c (gdbpy_apply_val_pretty_printer): Use
15827 gdbpy_enter, gdbpy_ref, unique_xmalloc_ptr.
15828
15829 2017-01-10 Tom Tromey <tom@tromey.com>
15830
15831 * utils.h (htab_deleter): New struct.
15832 (htab_up): New typedef.
15833 * python/py-framefilter.c (gdbpy_apply_frame_filter): Use
15834 gdbpy_enter, gdbpy_ref, htab_up.
15835
15836 2017-01-10 Tom Tromey <tom@tromey.com>
15837
15838 * python/py-unwind.c (pending_frame_invalidate): Remove.
15839 (pyuw_sniffer): Use gdbpy_enter and gdbpy_ref.
15840
15841 2017-01-10 Tom Tromey <tom@tromey.com>
15842
15843 * python/py-xmethods.c (gdbpy_free_xmethod_worker_data)
15844 (gdbpy_clone_xmethod_worker_data): Use gdbpy_enter.
15845
15846 2017-01-10 Tom Tromey <tom@tromey.com>
15847
15848 * python/py-type.c (save_objfile_types): Use gdbpy_enter.
15849
15850 2017-01-10 Tom Tromey <tom@tromey.com>
15851
15852 * python/python.c (gdbpy_eval_from_control_command)
15853 (gdbpy_source_script, gdbpy_run_events)
15854 (gdbpy_source_objfile_script, gdbpy_execute_objfile_script)
15855 (gdbpy_free_type_printers, gdbpy_finish_initialization): Use
15856 gdbpy_enter.
15857
15858 2017-01-10 Tom Tromey <tom@tromey.com>
15859
15860 * python/py-progspace.c (py_free_pspace): Use gdbpy_enter.
15861
15862 2017-01-10 Tom Tromey <tom@tromey.com>
15863
15864 * python/py-objfile.c (py_free_objfile): Use gdbpy_enter.
15865
15866 2017-01-10 Tom Tromey <tom@tromey.com>
15867
15868 * python/py-inferior.c (python_on_normal_stop, python_on_resume)
15869 (python_on_inferior_call_pre, python_on_inferior_call_post)
15870 (python_on_memory_change, python_on_register_change)
15871 (python_inferior_exit, python_new_objfile, add_thread_object)
15872 (delete_thread_object, py_free_inferior): Use gdbpy_enter.
15873
15874 2017-01-10 Tom Tromey <tom@tromey.com>
15875
15876 * python/py-finishbreakpoint.c (bpfinishpy_handle_stop)
15877 (bpfinishpy_handle_exit): Use gdbpy_enter.
15878
15879 2017-01-10 Tom Tromey <tom@tromey.com>
15880
15881 * python/py-cmd.c (cmdpy_destroyer)
15882 (cmdpy_completer_handle_brkchars, cmdpy_completer): Use
15883 gdbpy_enter.
15884
15885 2017-01-10 Tom Tromey <tom@tromey.com>
15886
15887 * python/py-breakpoint.c (gdbpy_breakpoint_cond_says_stop): Use
15888 gdbpy_enter.
15889 (gdbpy_breakpoint_has_cond): Likewise.
15890
15891 2017-01-10 Tom Tromey <tom@tromey.com>
15892
15893 * python/python.c (gdbpy_enter): New constructor.
15894 (~gdbpy_enter): New destructor.
15895 (restore_python_env, ensure_python_env): Rewrite.
15896 * python/python-internal.h (gdbpy_enter): New class.
15897
15898 2017-01-10 Tom Tromey <tom@tromey.com>
15899
15900 * python/py-symbol.c (gdbpy_lookup_symbol): Use gdbpy_ref.
15901
15902 2017-01-10 Tom Tromey <tom@tromey.com>
15903
15904 * python/py-value.c (value_has_field, get_field_flag)
15905 (get_field_type, valpy_getitem, convert_value_from_python): Use
15906 gdbpy_ref.
15907
15908 2017-01-10 Tom Tromey <tom@tromey.com>
15909
15910 * python/python.c (gdbpy_progspaces, gdbpy_objfiles): Use
15911 gdbpy_ref.
15912
15913 2017-01-10 Tom Tromey <tom@tromey.com>
15914
15915 * python/py-prettyprint.c (search_pp_list)
15916 (find_pretty_printer_from_objfiles)
15917 (find_pretty_printer_from_progspace)
15918 (find_pretty_printer_from_gdb, find_pretty_printer)
15919 (gdbpy_get_display_hint, gdbpy_get_varobj_pretty_printer): Use
15920 gdbpy_ref.
15921
15922 2017-01-10 Tom Tromey <tom@tromey.com>
15923
15924 * python/py-param.c (call_doc_function): Use gdbpy_ref.
15925
15926 2017-01-10 Tom Tromey <tom@tromey.com>
15927
15928 * python/py-linetable.c (build_line_table_tuple_from_pcs)
15929 (ltpy_get_all_source_lines): Use gdbpy_ref.
15930
15931 2017-01-10 Tom Tromey <tom@tromey.com>
15932
15933 * python/py-framefilter.c (extract_sym, extract_value)
15934 (get_py_iter_from_func, bootstrap_python_frame_filters): Use
15935 gdbpy_ref.
15936
15937 2017-01-10 Tom Tromey <tom@tromey.com>
15938
15939 * python/py-breakpoint.c (gdbpy_breakpoints): Use gdbpy_ref.
15940
15941 2017-01-10 Tom Tromey <tom@tromey.com>
15942
15943 * python/py-inferior.c (gdbpy_inferiors): Use gdbpy_ref.
15944
15945 2017-01-10 Tom Tromey <tom@tromey.com>
15946
15947 * python/py-function.c (convert_values_to_python, fnpy_init): Use
15948 gdbpy_ref.
15949
15950 2017-01-10 Tom Tromey <tom@tromey.com>
15951
15952 * python/py-cmd.c (gdbpy_string_to_argv): Use gdbpy_ref.
15953
15954 2017-01-10 Tom Tromey <tom@tromey.com>
15955
15956 * python/py-type.c (convert_field, make_fielditem, typy_fields)
15957 (typy_range): Use gdbpy_ref.
15958
15959 2017-01-10 Tom Tromey <tom@tromey.com>
15960
15961 * python/py-threadevent.c (create_thread_event_object): Use
15962 gdbpy_ref.
15963 * python/py-stopevent.c (create_stop_event_object): Simplify.
15964 (emit_stop_event): Use gdbpy_ref.
15965 * python/py-signalevent.c (create_signal_event_object): Use
15966 gdbpy_ref.
15967 * python/py-newobjfileevent.c (create_new_objfile_event_object)
15968 (emit_new_objfile_event, create_clear_objfiles_event_object)
15969 (emit_clear_objfiles_event): Use gdbpy_ref.
15970 * python/py-infevents.c (create_inferior_call_event_object)
15971 (create_register_changed_event_object)
15972 (create_memory_changed_event_object, emit_inferior_call_event)
15973 (emit_memory_changed_event, emit_register_changed_event): Use
15974 gdbpy_ref.
15975 * python/py-exitedevent.c (create_exited_event_object)
15976 (emit_exited_event): Use gdbpy_ref.
15977 * python/py-event.h (evpy_emit_event): Remove
15978 CPYCHECKER_STEALS_REFERENCE_TO_ARG annotation.
15979 * python/py-event.c (evpy_emit_event): Use gdbpy_ref.
15980 * python/py-continueevent.c (emit_continue_event): Use
15981 gdbpy_ref.
15982 * python/py-breakpoint.c (gdbpy_breakpoint_created)
15983 (gdbpy_breakpoint_deleted, gdbpy_breakpoint_modified): Use
15984 gdbpy_ref.
15985 * python/py-bpevent.c (create_breakpoint_event_object): Use
15986 gdbpy_ref.
15987
15988 2017-01-10 Tom Tromey <tom@tromey.com>
15989
15990 * python/py-ref.h: New file.
15991
15992 2017-01-10 Simon Marchi <simon.marchi@ericsson.com>
15993
15994 * cli-out.c (cli_ui_out::do_redirect): Change return type to
15995 void.
15996 * cli-out.h (cli_ui_out::do_redirect): Likewise.
15997 * mi/mi-out.c (mi_ui_out::do_redirect): Likewise.
15998 * mi/mi-out.h (mi_ui_out::do_redirect): Likewise.
15999 * ui-out.c (ui_out::redirect): Likewise.
16000 * ui-out.h (ui_out::redirect, ui_out::do_redirect): Likewise.
16001 * cli/cli-logging.c (set_logging_redirect): Update call site of
16002 ui_out::redirect.
16003 (handle_redirections): Likewise.
16004 * scm-ports.c (ioscm_with_output_to_port_worker): Likewise.
16005 * top.c (execute_command_to_string): Likewise.
16006 * utils.c (do_ui_out_redirect_pop): Likewise.
16007
16008 2017-01-10 Simon Marchi <simon.marchi@ericsson.com>
16009
16010 * stack.c (_initialize_stack): Update "frame" command help message.
16011
16012 2017-01-08 Iain Buclaw <ibuclaw@gdcproject.org>
16013
16014 * d-exp.y (CastExpression): Emit UNOP_CAST_TYPE.
16015
16016 2017-01-06 Yao Qi <yao.qi@linaro.org>
16017
16018 * x86-linux-nat.h: Include gdb_proc_service.h.
16019
16020 2017-01-06 Yao Qi <yao.qi@linaro.org>
16021
16022 * ser-base.h: Include serial.h.
16023
16024 2017-01-06 Yao Qi <yao.qi@linaro.org>
16025
16026 * ppc-linux-tdep.h: Include ppc-tdep.h.
16027
16028 2017-01-06 Yao Qi <yao.qi@linaro.org>
16029
16030 * nat/amd64-linux-siginfo.h: Include signal.h.
16031
16032 2017-01-06 Yao Qi <yao.qi@linaro.org>
16033
16034 * nat/aarch64-linux-hw-point.h: Include break-common.h.
16035
16036 2017-01-06 Yao Qi <yao.qi@linaro.org>
16037
16038 * mi/mi-parse.h: Include mi-cmds.h.
16039
16040 2017-01-06 Yao Qi <yao.qi@linaro.org>
16041
16042 * inf-loop.c: Don't include "target.h".
16043 * inf-loop.h: Include it here.
16044
16045 2017-01-06 Yao Qi <yao.qi@linaro.org>
16046
16047 * dfp.h: Include "dboulest.h" and "expression.h".
16048
16049 2017-01-06 Yao Qi <yao.qi@linaro.org>
16050
16051 * ax-gdb.h: Include "ax.h".
16052
16053 2017-01-06 Yao Qi <yao.qi@linaro.org>
16054
16055 * Makefile.in (HFILES_NO_SRCDIR): Replace gdb_ptrace.h
16056 with nat/gdb_ptrace.h.
16057
16058 2017-01-05 Yao Qi <yao.qi@linaro.org>
16059
16060 * mips-fbsd-tdep.c (mips_fbsd_sigframe_init): Move && to
16061 new line.
16062 (mips64_fbsd_sigframe_init): Likewise.
16063
16064 2017-01-04 John Baldwin <jhb@FreeBSD.org>
16065
16066 * mips-fbsd-tdep.c (_initialize_mips_fbsd_tdep): Use
16067 GDB_OSABI_FREEBSD instead of GDB_OSABI_FREEBSD_ELF.
16068
16069 2017-01-04 John Baldwin <jhb@FreeBSD.org>
16070
16071 * Makefile.in (ALLDEPFILES): Add mips-fbsd-nat.c.
16072 * NEWS: Mention new FreeBSD/mips native configuration.
16073 * config/mips/fbsd.mh: New file.
16074 * configure.host: Add mips*-*-freebsd*.
16075 * mips-fbsd-nat.c: New file.
16076
16077 2017-01-04 John Baldwin <jhb@FreeBSD.org>
16078
16079 * Makefile.in (ALL_TARGET_OBS): Add mips-fbsd-tdep.o.
16080 (ALLDEPFILES): Add mips-fbsd-tdep.c.
16081 * NEWS: Mention new FreeBSD/mips target.
16082 * configure.tgt: Add mips*-*-freebsd*.
16083 * mips-fbsd-tdep.c: New file.
16084 * mips-fbsd-tdep.h: New file.
16085
16086 2017-01-04 Yao Qi <yao.qi@linaro.org>
16087
16088 * dwarf2loc.c (write_pieced_value): Don't use VALUE_FRAME_ID (to),
16089 use c->frame_id when the piece location is DWARF_VALUE_REGISTER.
16090
16091 2017-01-01 Joel Brobecker <brobecker@adacore.com>
16092
16093 Update copyright year range in all GDB files.
16094
16095 2017-01-01 Joel Brobecker <brobecker@adacore.com>
16096
16097 * config/djgpp/fnchange.lst: Add entry for gdb/ChangeLog-2016.
16098
16099 For older changes see ChangeLog-2016.
16100 \f
16101 Local Variables:
16102 mode: change-log
16103 left-margin: 8
16104 fill-column: 74
16105 version-control: never
16106 coding: utf-8
16107 End:
This page took 0.387698 seconds and 4 git commands to generate.