Handle dereferencing Rust trait objects
[deliverable/binutils-gdb.git] / gdb / ChangeLog
1 2017-11-17 Tom Tromey <tom@tromey.com>
2
3 * symtab.h (struct symbol) <is_rust_vtable>: New member.
4 (struct rust_vtable_symbol): New.
5 (find_symbol_at_address): Declare.
6 * symtab.c (find_symbol_at_address): New function.
7 * symfile.h (struct quick_symbol_functions)
8 <find_compunit_symtab_by_address>: New member.
9 * symfile-debug.c (debug_qf_find_compunit_symtab_by_address): New
10 function.
11 (debug_sym_quick_functions): Link to
12 debug_qf_find_compunit_symtab_by_address.
13 * rust-lang.c (rust_get_trait_object_pointer): New function.
14 (rust_evaluate_subexp) <case UNOP_IND>: New case. Call
15 rust_get_trait_object_pointer.
16 * psymtab.c (psym_relocate): Clear psymbol_map.
17 (psym_fill_psymbol_map, psym_find_compunit_symtab_by_address): New
18 functions.
19 (psym_functions): Link to psym_find_compunit_symtab_by_address.
20 * objfiles.h (struct objfile) <psymbol_map>: New member.
21 * dwarf2read.c (dwarf2_gdb_index_functions): Update.
22 (process_die) <DW_TAG_variable>: New case. Call read_variable.
23 (rust_containing_type, read_variable): New functions.
24
25 2017-11-17 Simon Marchi <simon.marchi@polymtl.ca>
26
27 * common/gdb_vecs.h (DEF_VEC_I (int)): Remove.
28
29 2017-11-17 Simon Marchi <simon.marchi@polymtl.ca>
30
31 * common/filestuff.c: Include <algorithm>.
32 (open_fds): Change type to std::vector<int>.
33 (do_mark_open_fd): Adjust.
34 (unmark_fd_no_cloexec): Adjust.
35 (do_close): Adjust.
36
37 2017-11-17 Simon Marchi <simon.marchi@polymtl.ca>
38
39 * breakpoint.c (output_thread_groups): Take an std::vector.
40 (print_one_breakpoint_location): Adjust.
41
42 2017-11-17 Joel Brobecker <brobecker@adacore.com>
43
44 * ada-lang.c (resolve_subexp): Add handling of OP_VAR_MSYM_VALUE.
45 (ada_evaluate_subexp_for_cast): New function.
46 (ada_evaluate_subexp) <UNOP_CAST>: Replace code by call to
47 ada_evaluate_subexp_for_cast.
48 (ada_evaluate_subexp) <nosideret>: Replace code by call to
49 eval_skip_value.
50 * eval.c (evaluate_var_value): Make non-static.
51 (evaluate_var_msym_value, eval_skip_value): Likewise.
52 * value.h (evaluate_var_value, evaluate_var_msym_value)
53 (eval_skip_value): Declare.
54
55 2017-11-16 Joel Brobecker <brobecker@adacore.com>
56
57 * ada-lang.c (ada_value_cast): Remove parameter "noside".
58 Update all callers.
59
60 2017-11-16 Pedro Alves <palves@redhat.com>
61
62 * python/py-unwind.c (pyuw_sniffer): Translate
63 PyExc_KeyboardInterrupt to a GDB Quit exception.
64
65 2017-11-16 Pedro Alves <palves@redhat.com>
66
67 * infrun.c (resume_cleanups): Delete.
68 (resume): No longer install a resume_cleanups cleanup nor call
69 QUIT.
70 (proceed): Pass the terminal to the inferior.
71 (keep_going_pass_signal): No longer install a resume_cleanups
72 cleanup.
73
74 2017-11-16 Pedro Alves <palves@redhat.com>
75
76 * inf-loop.c (inferior_event_handler): Don't swallow the exception
77 if the prompt is blocked.
78
79 2017-11-16 Pedro Alves <palves@redhat.com>
80
81 * breakpoint.c (insert_bp_location): Replace bp_err and
82 bp_err_message locals by a gdb_exception local.
83
84 2017-11-16 Pedro Alves <palves@redhat.com>
85
86 * inflow.c (scoped_ignore_sigttou): New class.
87 (child_terminal_ours_1, new_tty): Use it.
88
89 2017-11-16 Ulrich Weigand <uweigand@de.ibm.com>
90
91 * target-float.c (decimal_from_number): Add byte_order argument and
92 call match_endianness. Error if unknown floating-point type.
93 (decimal_to_number): Add byte_order argument and call match_endianness.
94 (decimal_from_longest): Update call. Do not call match_endianness.
95 (decimal_from_ulongest): Likewise.
96 (decimal_binop): Likewise.
97 (decimal_is_zero): Likewise.
98 (decimal_compare): Likewise.
99 (decimal_convert): Likewise.
100
101 2017-11-16 Phil Muldoon <pmuldoon@redhat.com>
102
103 * python/python.c (gdbpy_rbreak): New function.
104 * NEWS: Document Python rbreak feature.
105
106 2017-11-16 Yao Qi <yao.qi@linaro.org>
107
108 * features/tic6x-c62x.xml: Remove.
109 * features/tic6x-c64x.xml: Remove.
110 * features/tic6x-c64xp.xml: Remove.
111
112 2017-11-15 John Baldwin <jhb@FreeBSD.org>
113
114 * symtab.h: Include <array>.
115
116 2017-11-15 John Baldwin <jhb@FreeBSD.org>
117
118 * bsd-kvm.c (bsd_kvm_cmd): Constify 'arg'.
119 (bsd_kvm_proc_cmd): Likewise.
120
121 2017-11-15 Simon Marchi <simon.marchi@ericsson.com>
122
123 * tui/tui-win.c (window_name_completer): Replace VEC with
124 std::vector.
125
126 2017-11-15 Andrew Cagney <cagney@gnu.org>
127
128 * MAINTAINERS: Remove no-longer applicable entries.
129
130 2017-11-15 Andrew Cagney <cagney@gnu.org>
131
132 * MAINTAINERS: Move self to Past Maintainers.
133
134 2017-11-15 Yao Qi <yao.qi@linaro.org>
135
136 * features/Makefile (XMLTOC): Remove nios2-linux.xml.
137 * features/nios2-linux.c: Remove.
138 * nios2-linux-tdep.c (_initialize_nios2_linux_tdep): Don't call
139 initialize_tdesc_nios2_linux.
140
141 2017-11-15 Yao Qi <yao.qi@linaro.org>
142
143 * m68hc11-tdep.c (M68HC11_NUM_REGS): Change it to
144 M68HC11_LAST_HARD_REG + 1.
145
146 2017-11-14 Paul Carroll <pcarroll@codesourcery.com>
147
148 PR gdb/22388
149 * remote.c (remote_write_bytes_aux, remote_read_bytes_1,
150 remote_read_bytes, remote_write_qxfer, remote_xfer_partial):
151 Return TARGET_XFER_EOF if size of returned data is 0.
152
153 2017-11-14 Simon Marchi <simon.marchi@ericsson.com>
154
155 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
156 memory-map-selftests.c.
157 (SUBDIR_UNITTESTS_OBS): Add memory-map-selftests.o.
158 * memory-map.c (memory_map_start_memory): Fix computation of hi
159 address.
160 * unittests/memory-map-selftests.c: New file.
161
162 2017-11-09 Joel Brobecker <brobecker@adacore.com>
163
164 * ada-lang.c: Fix some typos in the general command documenting
165 how Ada expressions are being evaluated and how their result
166 is printed.
167
168 2017-11-09 Tom Tromey <tom@tromey.com>
169
170 * psymtab.c (psymbol_hash): Do not hash string contents.
171 (psymbol_compare): Add comment.
172
173 2017-11-09 Tom Tromey <tom@tromey.com>
174
175 * dictionary.c (dict_hash): Move "TKB" check into the "switch".
176
177 2017-11-08 Joel Brobecker <brobecker@adacore.com>
178
179 * ada-exp.y (write_var_from_sym): Remove parameter
180 "orig_left_context". Update all callers.
181
182 2017-11-08 Simon Marchi <simon.marchi@ericsson.com>
183
184 * tracepoint.h (class collection_list) <stringify>: Return
185 std::vector<std::string>.
186 (encode_actions_rsp): Change parameters to
187 std::vector<std::string> *.
188 * tracepoint.c (collection_list::stringify): Return
189 std::vector<std::string> and adjust accordingly.
190 (encode_actions_rsp): Changee parameters to
191 std::vector<std::string> and adjust accordingly.
192 * remote.c (free_actions_list),
193 free_actions_list_cleanup_wrapper): Remove.
194 (remote_download_tracepoint): Adjust to std::vector.
195
196 2017-11-08 Tom Tromey <tom@tromey.com>
197
198 * dwarf2read.c (symbolp): Remove typedef.
199 (read_func_scope): Use std::vector.
200 (process_structure_scope): Use std::vector.
201
202 2017-11-08 Pedro Alves <palves@redhat.com>
203
204 * ada-lang.c (ada_make_symbol_completion_list): Use
205 completion_skip_symbol.
206 * symtab.c (symbol_is_function_or_method(minimal_symbol*)): New.
207 (symbol_is_function_or_method(symbol*)): New.
208 (add_symtab_completions): Add complete_symbol_mode parameter. Use
209 completion_skip_symbol.
210 (default_collect_symbol_completion_matches_break_on): Use
211 completion_skip_symbol. Pass down mode.
212 (collect_file_symbol_completion_matches): Pass down mode.
213 * symtab.h (symbol_is_function_or_method): New declarations.
214 (completion_skip_symbol): New template function.
215
216 2017-11-08 Pedro Alves <palves@redhat.com>
217
218 * linespec.c (iterate_over_all_matching_symtabs): Add
219 search_domain parameter. Pass it down to expand_symtabs_matching.
220 (decode_objc): Request FUNCTIONS_DOMAIN symbols only.
221 (lookup_prefix_sym): Adjust by passing ALL_DOMAIN as
222 search_domain.
223 (add_all_symbol_names_from_pspace): Add search_domain parameter.
224 Pass it down.
225 (find_method, find_function_symbols): Request FUNCTIONS_DOMAIN
226 symbols.
227 (add_matching_symbols_to_info): Add search_domain parameter. Pass
228 it down.
229
230 2017-11-08 Pedro Alves <palves@redhat.com>
231
232 * ada-lang.c (ada_make_symbol_completion_list): Remove text and
233 text_len locals and don't pass them down.
234 * symtab.c (completion_list_add_name): Remove
235 sym_text/sym_text_len parameters and adjust.
236 (completion_list_add_symbol, completion_list_add_msymbol)
237 (completion_list_objc_symbol, completion_list_add_fields)
238 (add_symtab_completions): Likewise.
239 (default_collect_symbol_completion_matches_break_on)
240 (collect_file_symbol_completion_matches): Remove sym_text_len
241 local and don't pass it down.
242 * symtab.h (completion_list_add_name): Remove
243 sym_text/sym_text_len parameters.
244
245 2017-11-08 Pedro Alves <palves@redhat.com>
246
247 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
248 unittests/lookup_name_info-selftests.c.
249 (SUBDIR_UNITTESTS_OBS): Add lookup_name_info-selftests.o.
250 * cp-support.c: Include "selftest.h".
251 (cp_remove_params_1): Rename from cp_remove_params. Add
252 'require_param' parameter, and handle it.
253 (cp_remove_params): Reimplement.
254 (cp_remove_params_if_any): New.
255 (selftests::quote): New.
256 (selftests::check_remove_params): New.
257 (selftests::test_cp_remove_params): New.
258 (_initialize_cp_support): Install
259 selftests::test_cp_remove_params.
260 * cp-support.h (cp_remove_params_if_any): Declare.
261 * dwarf2read.c :Include "selftest.h".
262 (dw2_expand_symtabs_matching_symbol): Use
263 lookup_name_info::make_ignore_params.
264 (selftests::dw2_expand_symtabs_matching::mock_mapped_index)
265 (selftests::dw2_expand_symtabs_matching::string_or_null)
266 (selftests::dw2_expand_symtabs_matching::check_match)
267 (selftests::dw2_expand_symtabs_matching::test_symbols)
268 (selftests::dw2_expand_symtabs_matching::run_test): New.
269 (_initialize_dwarf2_read): Register
270 selftests::dw2_expand_symtabs_matching::run_test.
271 * psymtab.c (psym_expand_symtabs_matching): Use
272 lookup_name_info::make_ignore_params.
273 * symtab.c (demangle_for_lookup_info::demangle_for_lookup_info):
274 If the lookup name wants to ignore parameters, strip them.
275 (compare_symbol_name): Remove sym_text/sym_text_len parameters and
276 code handling '('.
277 (completion_list_add_name): Don't pass down sym_text/sym_text_len.
278 (default_collect_symbol_completion_matches_break_on): Don't try to
279 strip parameters.
280 * symtab.h (lookup_name_info::lookup_name_info): Add
281 'ignore_parameters' parameter.
282 (lookup_name_info::ignore_parameters)
283 (lookup_name_info::make_ignore_params): New methods.
284 (lookup_name_info::m_ignore_parameters): New field.
285 * unittests/lookup_name_info-selftests.c: New file.
286
287 2017-11-08 Pedro Alves <palves@redhat.com>
288
289 * dwarf2read.c (dw2_expand_marked_cus)
290 (dw2_expand_symtabs_matching_symbol): Remove forward declarations.
291 (dw2_expand_symtabs_matching): Move further below.
292 (dw2_expand_marked_cus): Reindent.
293
294 2017-11-08 Pedro Alves <palves@redhat.com>
295
296 * dwarf2read.c (byte_swap, MAYBE_SWAP): Move higher up in file.
297 (struct name_component): New.
298 (mapped_index::name_components): New field.
299 (mapped_index::symbol_name_at): New method.
300 (dwarf2_read_index): Call mapped_index ctor.
301 (dw2_map_matching_symbols): Add comment about name_components
302 table.
303 (dw2_expand_symtabs_matching): Factor part to...
304 (dw2_expand_symtabs_matching_symbol): ... this new function.
305 Build name components table, and lookup symbols in it before
306 calling the name matcher.
307 (dw2_expand_marked_cus): New, factored out from
308 dw2_expand_symtabs_matching.
309 (dwarf2_per_objfile_free): Call the mapped_index's dtor.
310
311 2017-11-08 Pedro Alves <palves@redhat.com>
312
313 * ada-lang.c (ada_encode): Rename to ..
314 (ada_encode_1): ... this. Add throw_errors parameter and handle
315 it.
316 (ada_encode): Reimplement.
317 (match_name): Delete, folded into full_name.
318 (resolve_subexp): No longer pass the encoded name to
319 ada_lookup_symbol_list.
320 (should_use_wild_match): Delete.
321 (name_match_type_from_name): New.
322 (ada_lookup_simple_minsym): Use lookup_name_info and the
323 language's symbol_name_matcher_ftype.
324 (add_symbols_from_enclosing_procs, ada_add_local_symbols)
325 (ada_add_block_renamings): Adjust to use lookup_name_info.
326 (ada_lookup_name): New.
327 (add_nonlocal_symbols, ada_add_all_symbols)
328 (ada_lookup_symbol_list_worker, ada_lookup_symbol_list)
329 (ada_iterate_over_symbols): Adjust to use lookup_name_info.
330 (ada_name_for_lookup): Delete.
331 (ada_lookup_encoded_symbol): Construct a verbatim name.
332 (wild_match): Reverse sense of return type. Use bool.
333 (full_match): Reverse sense of return type. Inline bits of old
334 match_name here.
335 (ada_add_block_symbols): Adjust to use lookup_name_info.
336 (symbol_completion_match): Delete, folded into...
337 (ada_lookup_name_info::matches): ... .this new method.
338 (symbol_completion_add): Delete.
339 (ada_collect_symbol_completion_matches): Add name_match_type
340 parameter. Adjust to use lookup_name_info and
341 completion_list_add_name.
342 (get_var_value, ada_add_global_exceptions): Adjust to use
343 lookup_name_info.
344 (ada_get_symbol_name_cmp): Delete.
345 (do_wild_match, do_full_match): New functions.
346 (ada_lookup_name_info::ada_lookup_name_info): New method.
347 (ada_symbol_name_matches, ada_get_symbol_name_matcher): New
348 functions.
349 (ada_language_defn): Install ada_get_symbol_name_matcher.
350 * ada-lex.l (processId): If name starts with '<', copy it
351 verbatim.
352 * block.c (block_iter_match_step, block_iter_match_first)
353 (block_iter_match_next, block_lookup_symbol)
354 (block_lookup_symbol_primary, block_find_symbol): Adjust to use
355 lookup_name_info.
356 * block.h (block_iter_match_first, block_iter_match_next)
357 (ALL_BLOCK_SYMBOLS_WITH_NAME): Adjust to use lookup_name_info.
358 * c-lang.c (c_language_defn, cplus_language_defn)
359 (asm_language_defn, minimal_language_defn): Adjust comments to
360 refer to la_get_symbol_name_matcher.
361 * completer.c (complete_files_symbols)
362 (collect_explicit_location_matches, symbol_completer): Pass a
363 symbol_name_match_type down.
364 * completer.h (class completion_match, completion_match_result):
365 New classes.
366 (completion_tracker::reset_completion_match_result): New method.
367 (completion_tracker::m_completion_match_result): New field.
368 * cp-support.c (make_symbol_overload_list_block): Adjust to use
369 lookup_name_info.
370 (cp_fq_symbol_name_matches, cp_get_symbol_name_matcher): New
371 functions.
372 * cp-support.h (cp_get_symbol_name_matcher): New declaration.
373 * d-lang.c: Adjust comments to refer to
374 la_get_symbol_name_matcher.
375 * dictionary.c (dict_vector) <iter_match_first, iter_match_next>:
376 Adjust to use lookup_name_info.
377 (dict_iter_match_first, dict_iter_match_next)
378 (iter_match_first_hashed, iter_match_next_hashed)
379 (iter_match_first_linear, iter_match_next_linear): Adjust to work
380 with a lookup_name_info.
381 * dictionary.h (dict_iter_match_first, dict_iter_match_next):
382 Likewise.
383 * dwarf2read.c (dw2_lookup_symbol): Adjust to use lookup_name_info.
384 (dw2_map_matching_symbols): Adjust to use symbol_name_match_type.
385 (gdb_index_symbol_name_matcher): New class.
386 (dw2_expand_symtabs_matching) Adjust to use lookup_name_info and
387 gdb_index_symbol_name_matcher. Accept a NULL symbol_matcher.
388 * f-lang.c (f_collect_symbol_completion_matches): Adjust to work
389 with a symbol_name_match_type.
390 (f_language_defn): Adjust comments to refer to
391 la_get_symbol_name_matcher.
392 * go-lang.c (go_language_defn): Adjust comments to refer to
393 la_get_symbol_name_matcher.
394 * language.c (default_symbol_name_matcher)
395 (language_get_symbol_name_matcher): New functions.
396 (unknown_language_defn, auto_language_defn): Adjust comments to
397 refer to la_get_symbol_name_matcher.
398 * language.h (symbol_name_cmp_ftype): Delete.
399 (language_defn) <la_collect_symbol_completion_matches>: Add match
400 type parameter.
401 <la_get_symbol_name_cmp>: Delete field.
402 <la_get_symbol_name_matcher>: New field.
403 <la_iterate_over_symbols>: Adjust to use lookup_name_info.
404 (default_symbol_name_matcher, language_get_symbol_name_matcher):
405 Declare.
406 * linespec.c (iterate_over_all_matching_symtabs)
407 (iterate_over_file_blocks): Adjust to use lookup_name_info.
408 (find_methods): Add language parameter, and use lookup_name_info
409 and the language's symbol_name_matcher_ftype.
410 (linespec_complete_function): Adjust.
411 (lookup_prefix_sym): Use lookup_name_info.
412 (add_all_symbol_names_from_pspace): Adjust.
413 (find_superclass_methods): Add language parameter and pass it
414 down.
415 (find_method): Pass symbol language down.
416 (find_linespec_symbols): Don't demangle or Ada encode here.
417 (search_minsyms_for_name): Add lookup_name_info parameter.
418 (add_matching_symbols_to_info): Add name_match_type parameter.
419 Use lookup_name_info.
420 * m2-lang.c (m2_language_defn): Adjust comments to refer to
421 la_get_symbol_name_matcher.
422 * minsyms.c: Include <algorithm>.
423 (add_minsym_to_demangled_hash_table): Remove table parameter and
424 add objfile parameter. Use search_name_hash, and add language to
425 demangled languages vector.
426 (struct found_minimal_symbols): New struct.
427 (lookup_minimal_symbol_mangled, lookup_minimal_symbol_demangled):
428 New functions.
429 (lookup_minimal_symbol): Adjust to use them. Don't canonicalize
430 input names here. Use lookup_name_info instead. Lookup up
431 demangled names once for each language in the demangled names
432 vector.
433 (iterate_over_minimal_symbols): Use lookup_name_info. Lookup up
434 demangled names once for each language in the demangled names
435 vector.
436 (build_minimal_symbol_hash_tables): Adjust.
437 * minsyms.h (iterate_over_minimal_symbols): Adjust to pass down a
438 lookup_name_info.
439 * objc-lang.c (objc_language_defn): Adjust comment to refer to
440 la_get_symbol_name_matcher.
441 * objfiles.h: Include <vector>.
442 (objfile_per_bfd_storage) <demangled_hash_languages>: New field.
443 * opencl-lang.c (opencl_language_defn): Adjust comment to refer to
444 la_get_symbol_name_matcher.
445 * p-lang.c (pascal_language_defn): Adjust comment to refer to
446 la_get_symbol_name_matcher.
447 * psymtab.c (psym_lookup_symbol): Use lookup_name_info.
448 (match_partial_symbol): Use symbol_name_match_type,
449 lookup_name_info and psymbol_name_matches.
450 (lookup_partial_symbol): Use lookup_name_info.
451 (map_block): Use symbol_name_match_type and lookup_name_info.
452 (psym_map_matching_symbols): Use symbol_name_match_type.
453 (psymbol_name_matches): New.
454 (recursively_search_psymtabs): Use lookup_name_info and
455 psymbol_name_matches. Rename 'kind' parameter to 'domain'.
456 (psym_expand_symtabs_matching): Use lookup_name_info. Rename
457 'kind' parameter to 'domain'.
458 * rust-lang.c (rust_language_defn): Adjust comment to refer to
459 la_get_symbol_name_matcher.
460 * symfile-debug.c (debug_qf_map_matching_symbols)
461 (debug_qf_map_matching_symbols): Use symbol_name_match_type.
462 (debug_qf_expand_symtabs_matching): Use lookup_name_info.
463 * symfile.c (expand_symtabs_matching): Use lookup_name_info.
464 * symfile.h (quick_symbol_functions) <map_matching_symbols>:
465 Adjust to use symbol_name_match_type.
466 <expand_symtabs_matching>: Adjust to use lookup_name_info.
467 (expand_symtabs_matching): Adjust to use lookup_name_info.
468 * symmisc.c (maintenance_expand_symtabs): Use
469 lookup_name_info::match_any ().
470 * symtab.c (symbol_matches_search_name): New.
471 (eq_symbol_entry): Adjust to use lookup_name_info and the
472 language's matcher.
473 (demangle_for_lookup_info::demangle_for_lookup_info): New.
474 (lookup_name_info::match_any): New.
475 (iterate_over_symbols, search_symbols): Use lookup_name_info.
476 (compare_symbol_name): Add language, lookup_name_info and
477 completion_match_result parameters, and use them.
478 (completion_list_add_name): Make extern. Add language and
479 lookup_name_info parameters. Use them.
480 (completion_list_add_symbol, completion_list_add_msymbol)
481 (completion_list_objc_symbol): Add lookup_name_info parameters and
482 adjust. Pass down language.
483 (completion_list_add_fields): Add lookup_name_info parameters and
484 adjust. Pass down language.
485 (add_symtab_completions): Add lookup_name_info parameters and
486 adjust.
487 (default_collect_symbol_completion_matches_break_on): Add
488 name_match_type parameter, and use it. Use lookup_name_info.
489 (default_collect_symbol_completion_matches)
490 (collect_symbol_completion_matches): Add name_match_type
491 parameter, and pass it down.
492 (collect_symbol_completion_matches_type): Adjust.
493 (collect_file_symbol_completion_matches): Add name_match_type
494 parameter, and use lookup_name_info.
495 * symtab.h: Include <string> and "common/gdb_optional.h".
496 (enum class symbol_name_match_type): New.
497 (class ada_lookup_name_info): New.
498 (struct demangle_for_lookup_info): New.
499 (class lookup_name_info): New.
500 (symbol_name_matcher_ftype): New.
501 (SYMBOL_MATCHES_SEARCH_NAME): Use symbol_matches_search_name.
502 (symbol_matches_search_name): Declare.
503 (MSYMBOL_MATCHES_SEARCH_NAME): Delete.
504 (default_collect_symbol_completion_matches)
505 (collect_symbol_completion_matches)
506 (collect_file_symbol_completion_matches): Add name_match_type
507 parameter.
508 (iterate_over_symbols): Use lookup_name_info.
509 (completion_list_add_name): Declare.
510 * utils.c (enum class strncmp_iw_mode): Moved to utils.h.
511 (strncmp_iw_with_mode): Now extern.
512 * utils.h (enum class strncmp_iw_mode): Moved from utils.c.
513 (strncmp_iw_with_mode): Declare.
514
515 2017-11-08 Keith Seitz <keiths@redhat.com>
516 Pedro Alves <palves@redhat.com>
517
518 * ada-lang.c (ada_language_defn): Install
519 default_search_name_hash.
520 * buildsym.c (struct buildsym_compunit): <language>: New field.
521 (finish_block_internal): Pass language when creating dictionaries.
522 (start_buildsym_compunit, start_symtab): New language parameters.
523 Use them.
524 (restart_symtab): Pass down compilation unit's language.
525 * buildsym.h (enum language): Forward declare.
526 (start_symtab): New 'language' parameter.
527 * c-lang.c (c_language_defn, cplus_language_defn)
528 (asm_language_defn, minimal_language_defn): Install
529 default_search_name_hash.
530 * coffread.c (coff_start_symtab): Adjust.
531 * d-lang.c (d_language_defn): Install default_search_name_hash.
532 * dbxread.c (struct symloc): Add 'pst_language' field.
533 (PST_LANGUAGE): Define.
534 (start_psymtab, read_ofile_symtab): Use it.
535 (process_one_symbol): New 'language' parameter. Pass it down.
536 * dictionary.c (struct dictionary) <language>: New field.
537 (DICT_LANGUAGE): Define.
538 (dict_create_hashed, dict_create_hashed_expandable)
539 (dict_create_linear, dict_create_linear_expandable): New parameter
540 'language'. Set the dictionary's language.
541 (iter_match_first_hashed): Adjust to rename.
542 (insert_symbol_hashed): Assert we don't see mismatching
543 languages. Adjust to rename.
544 (dict_hash): Rename to ...
545 (default_search_name_hash): ... this and make extern.
546 * dictionary.h (struct language_defn): Forward declare.
547 (dict_create_hashed): New parameter 'language'.
548 * dwarf2read.c (dwarf2_start_symtab): Pass down language.
549 * f-lang.c (f_language_defn): Install default_search_name_hash.
550 * go-lang.c (go_language_defn): Install default_search_name_hash.
551 * jit.c (finalize_symtab): Pass compunit's language to dictionary
552 creation.
553 * language.c (unknown_language_defn, auto_language_defn):
554 * language.h (language_defn::la_search_name_hash): New field.
555 (default_search_name_hash): Declare.
556 * m2-lang.c (m2_language_defn): Install default_search_name_hash.
557 * mdebugread.c (new_block): New parameter 'language'.
558 * mdebugread.c (parse_symbol): Pass symbol language to block
559 allocation.
560 (psymtab_to_symtab_1): Pass down language.
561 (new_symtab): Pass compunit's language to block allocation.
562 * objc-lang.c (objc_language_defn): Install
563 default_search_name_hash.
564 * opencl-lang.c (opencl_language_defn):
565 * p-lang.c (pascal_language_defn): Install
566 default_search_name_hash.
567 * rust-lang.c (rust_language_defn): Install
568 default_search_name_hash.
569 * stabsread.h (enum language): Forward declare.
570 (process_one_symbol): Add 'language' parameter.
571 * symtab.c (search_name_hash): New function.
572 * symtab.h (search_name_hash): Declare.
573 * xcoffread.c (read_xcoff_symtab): Pass language to start_symtab.
574
575 2017-11-08 Pedro Alves <palves@redhat.com>
576
577 * cp-name-parser.y (main): Don't initialize extra_chars.
578
579 2017-11-07 Tom Tromey <tom@tromey.com>
580
581 * event-top.h (command_handler): Constify.
582 * record-full.c (cmd_record_full_start): Update.
583 * thread.c (thread_apply_all_command): Update.
584 * printcmd.c (eval_command): Update.
585 * mi/mi-main.c (mi_execute_cli_command): Update.
586 (mi_execute_async_cli_command): Update.
587 * tui/tui-stack.c (tui_update_command): Update.
588 * cli/cli-interp.c (safe_execute_command): Constify.
589 * record.c (record_start): Update.
590 (record_start, record_stop, cmd_record_start): Update.
591 * record-btrace.c (cmd_record_btrace_bts_start): Update.
592 (cmd_record_btrace_pt_start): Update.
593 (cmd_record_btrace_start): Update.
594 (cmd_record_btrace_start): Update.
595 * reverse.c (exec_reverse_once): Update.
596 * python/python.c (execute_gdb_command): Don't copy the command.
597 * event-top.c (command_line_handler): Update.
598 (command_handler): Constify.
599 * defs.h (deprecated_call_command_hook): Constify.
600 * cli/cli-script.h (execute_user_command): Constify.
601 * cli/cli-script.c (execute_user_command): Constify.
602 (execute_cmd_pre_hook, execute_cmd_post_hook): Constify.
603 (enum command_control_type): Update.
604 * main.c (catch_command_errors): Remove non-const overload.
605 (catch_command_errors_ftype): Remove.
606 * python/py-cmd.c (cmdpy_function): Constify.
607 * guile/scm-cmd.c (cmdscm_function): Constify.
608 * cli/cli-dump.c (call_dump_func): Constify.
609 * cli/cli-decode.c (do_const_cfunc): Constify.
610 (do_sfunc): Constify.
611 (cmd_func): Constify.
612 * gdbcmd.h (execute_command, execute_command_to_string): Constify.
613 * top.h (execute_command): Constify.
614 * top.c (execute_command): Constify.
615 (execute_command_to_string): Constify.
616 (deprecated_call_command_hook): Constify.
617 * command.h (cmd_func): Constify.
618 * cli/cli-decode.h (struct cmd_list_element) <func>: Constify.
619
620 2017-11-07 Tom Tromey <tom@tromey.com>
621
622 * ada-lang.c (catch_ada_exception_command): Constify.
623 (catch_assert_command): Constify.
624 * break-catch-throw.c (catch_catch_command, catch_throw_command)
625 (catch_rethrow_command): Constify.
626 (catch_exception_command_1): Constify.
627 * breakpoint.h (add_catch_command): Constify.
628 * break-catch-syscall.c (catch_syscall_command_1): Constify.
629 (catch_syscall_split_args): Constify.
630 * break-catch-sig.c (catch_signal_command): Constify.
631 (catch_signal_split_args): Constify.
632 * cli/cli-decode.h (struct cmd_list_element) <function>: Use
633 cmd_const_sfunc_ftype.
634 * cli/cli-decode.c (add_setshow_cmd_full): Constify.
635 (add_setshow_enum_cmd, add_setshow_auto_boolean_cmd)
636 (add_setshow_boolean_cmd, add_setshow_filename_cmd)
637 (add_setshow_string_cmd, struct cmd_list_element)
638 (add_setshow_optional_filename_cmd, add_setshow_integer_cmd)
639 (add_setshow_uinteger_cmd, add_setshow_zinteger_cmd)
640 (add_setshow_zuinteger_unlimited_cmd, add_setshow_zuinteger_cmd):
641 Constify.
642 (set_cmd_sfunc): Constify.
643 (empty_sfunc): Constify.
644 * command.h (add_setshow_enum_cmd, add_setshow_auto_boolean_cmd)
645 (add_setshow_boolean_cmd, add_setshow_filename_cmd)
646 (add_setshow_string_cmd, add_setshow_string_noescape_cmd)
647 (add_setshow_optional_filename_cmd, add_setshow_integer_cmd)
648 (add_setshow_uinteger_cmd, add_setshow_zinteger_cmd)
649 (add_setshow_zuinteger_cmd, add_setshow_zuinteger_unlimited_cmd):
650 Constify.
651 (set_cmd_sfunc): Constify.
652 (cmd_sfunc_ftype): Remove.
653 * compile/compile.c (set_compile_args): Constify.
654 * infrun.c (set_disable_randomization): Constify.
655 * infcmd.c (set_args_command, set_cwd_command): Constify.
656 * breakpoint.c (set_condition_evaluation_mode): Constify.
657 (add_catch_command): Constify.
658 (catch_fork_command_1, catch_exec_command_1)
659 (catch_load_command_1, catch_unload_command_1): Constify.
660 (catch_load_or_unload): Constify.
661 * guile/scm-param.c (pascm_set_func): Constify.
662 (add_setshow_generic): Constify.
663 * python/py-param.c (get_set_value): Constify.
664 * top.h (set_verbose): Constify.
665 * tui/tui-win.c (tui_set_var_cmd): Constify.
666 * mi/mi-main.c (set_mi_async_command): Constify.
667 * cli/cli-logging.c (set_logging_overwrite)
668 (set_logging_redirect): Constify.
669 * value.c (set_max_value_size): Constify.
670 * valprint.c (set_input_radix, set_output_radix): Constify.
671 * utils.c (set_width_command, set_height_command): Constify.
672 * typeprint.c (set_print_type_methods, set_print_type_typedefs): Constify.
673 * tracepoint.c (set_disconnected_tracing)
674 (set_circular_trace_buffer, set_trace_buffer_size)
675 (set_trace_user, set_trace_notes, set_trace_stop_notes): Constify.
676 * top.c (set_history_size_command, set_verbose, set_editing)
677 (set_gdb_datadir, set_history_filename): Constify.
678 * target.c (set_targetdebug, maint_set_target_async_command)
679 (maint_set_target_non_stop_command, set_target_permissions)
680 (set_write_memory_permission): Constify.
681 (open_target): Constify.
682 * target-descriptions.c (set_tdesc_filename_cmd): Constify.
683 * target-dcache.c (set_stack_cache, set_code_cache): Constify.
684 * symtab.c (set_symbol_cache_size_handler): Constify.
685 * symfile.c (set_ext_lang_command): Constify.
686 * symfile-debug.c (set_debug_symfile): Constify.
687 * source.c (set_directories_command): Constify.
688 * solib.c (reload_shared_libraries, gdb_sysroot_changed): Constify.
689 * serial.c (set_parity): Constify.
690 * rs6000-tdep.c (powerpc_set_soft_float, powerpc_set_vector_abi): Constify.
691 * remote.c (set_remote_exec_file, set_remotebreak)
692 (set_remote_protocol_Z_packet_cmd, set_range_stepping): Constify.
693 * record.c (set_record_insn_history_size)
694 (set_record_call_history_size): Constify.
695 * record-full.c (set_record_full_insn_max_num): Constify.
696 * proc-api.c (set_procfs_trace_cmd, set_procfs_file_cmd): Constify.
697 * osabi.c (set_osabi): Constify.
698 * mips-tdep.c (set_mips64_transfers_32bit_regs)
699 (reinit_frame_cache_sfunc, mips_abi_update): Constify.
700 * maint.c (maintenance_set_profile_cmd): Constify.
701 * linux-thread-db.c (set_libthread_db_search_path): Constify.
702 * language.c (set_language_command, set_range_command)
703 (set_case_command): Constify.
704 * infrun.c (set_non_stop, set_observer_mode)
705 (set_stop_on_solib_events, set_schedlock_func)
706 (set_exec_direction_func): Constify.
707 * infcmd.c (set_inferior_tty_command): Constify.
708 * disasm.c (set_disassembler_options_sfunc): Constify.
709 * demangle.c (set_demangling_command): Constify.
710 * dcache.c (set_dcache_size, set_dcache_line_size): Constify.
711 * cris-tdep.c (set_cris_version, set_cris_mode)
712 (set_cris_dwarf2_cfi): Constify.
713 * corefile.c (set_gnutarget_command): Constify.
714 * charset.c (set_host_charset_sfunc, set_target_charset_sfunc)
715 (set_target_wide_charset_sfunc): Constify.
716 * breakpoint.c (update_dprintf_commands): Constify.
717 * auto-load.c (set_auto_load_dir, set_auto_load_safe_path): Constify.
718 * arm-tdep.c (set_fp_model_sfunc, arm_set_abi)
719 (set_disassembly_style_sfunc): Constify.
720 * arch-utils.c (set_endian, set_architecture): Constify.
721 * alpha-tdep.c (reinit_frame_cache_sfunc): Constify.
722 * agent.c (set_can_use_agent): Constify.
723
724 2017-11-07 Tom Tromey <tom@tromey.com>
725
726 * go32-nat.c (go32_sysinfo, go32_sldt, go32_sgdt, go32_sidt)
727 (go32_pde, go32_pte, go32_pte_for_address): Constify.
728 * gnu-nat.c (_parse_bool_arg, show_thread_default_pause_cmd)
729 (set_thread_default_pause_cmd, set_thread_default_run_cmd)
730 (show_thread_default_run_cmd, set_thread_default_detach_sc_cmd)
731 (parse_int_arg, show_thread_default_detach_sc_cmd)
732 (set_signals_cmd, show_signals_cmd, set_sig_thread_cmd)
733 (show_sig_thread_cmd, set_stopped_cmd, show_stopped_cmd)
734 (set_exceptions_cmd, show_exceptions_cmd, set_task_pause_cmd)
735 (show_task_pause_cmd, set_task_detach_sc_cmd)
736 (show_task_detach_sc_cmd, set_task_exc_port_cmd)
737 (set_noninvasive_cmd, set_thread_pause_cmd)
738 (show_thread_pause_cmd, set_thread_run_cmd, show_thread_run_cmd)
739 (set_thread_detach_sc_cmd, show_thread_detach_sc_cmd)
740 (set_thread_exc_port_cmd, thread_takeover_sc_cmd): Constify.
741 * windows-nat.c (display_selectors): Constify.
742 * cli/cli-decode.h (struct cmd_list_element) <function>: Remove
743 non-const "cfunc".
744 * cli/cli-decode.c (set_cmd_cfunc): Remove non-const overload.
745 (cmd_cfunc_eq): Likewise.
746 (struct cmd_list_element): Likewise.
747 (do_cfunc): Remove.
748 (cli_user_command_p): Update.
749 * command.h (add_cmd): Remove non-const overload.
750 (cmd_cfunc_ftype): Remove typedef.
751 (cmd_cfunc_eq): Remove non-const overload.
752 * value.c (show_values): Constify.
753 * thread.c (thread_apply_all_command): Constify.
754 * symfile.c (load_command): Constify.
755 * source.c (directory_command): Constify.
756 * maint.c (maintenance_internal_error)
757 (maintenance_demangler_warning, maintenance_space_display)
758 (maintenance_print_architecture, maintenance_translate_address)
759 (maintenance_info_selftests, maintenance_internal_warning):
760 Constify.
761 * breakpoint.c (disable_trace_command, enable_trace_command):
762 Constify.
763 * auto-load.c (info_auto_load_local_gdbinit, add_auto_load_dir):
764 Constify.
765 (add_auto_load_safe_path): Constify.
766 * guile/scm-auto-load.c (info_auto_load_guile_scripts): Constify.
767 * top.h (show_commands): Constify.
768 * linux-thread-db.c (info_auto_load_libthread_db): Constify.
769 * sparc64-tdep.c (adi_examine_command): Constify.
770 (adi_assign_command): Constify.
771
772 2017-11-07 Tom Tromey <tom@tromey.com>
773
774 * frame.h (info_locals_command, info_args_command): Constify.
775 * auto-load.h (auto_load_info_scripts): Constify.
776 * inferior.h (registers_info): Constify.
777 * copying.c: Rebuild.
778 * copying.awk: Constify generated commands.
779 * auto-load.c (auto_load_info_scripts)
780 (info_auto_load_gdb_scripts): Constify.
781 * cli/cli-decode.c (struct cmd_list_element): Take a
782 cmd_const_cfunc_ftype.
783 * command.h (add_info): Take a cmd_const_cfunc_ftype.
784 * tui/tui-win.c (tui_all_windows_info): Constify.
785 * python/py-auto-load.c (info_auto_load_python_scripts):
786 Constify.
787 * cli/cli-cmds.c (show_command): Remove non-const overload.
788 * tracepoint.c (info_tvariables_command, info_scope_command):
789 Constify.
790 (info_static_tracepoint_markers_command): Constify.
791 * thread.c (info_threads_command): Constify.
792 (print_thread_info_1): Constify.
793 * target.c (info_target_command): Constify.
794 * symtab.c (info_sources_command, info_functions_command)
795 (info_types_command): Constify.
796 (info_variables_command): Remove non-const overload.
797 * symfile.c (info_ext_lang_command): Constify.
798 * stack.c (info_frame_command, info_locals_command)
799 (info_args_command): Constify.
800 (backtrace_command): Remove non-const overload.
801 * source.c (info_source_command, info_line_command): Constify.
802 * solib.c (info_sharedlibrary_command): Constify.
803 * skip.c (info_skip_command): Constify.
804 * ser-go32.c (info_serial_command): Constify.
805 * reverse.c (info_bookmarks_command): Constify.
806 * printcmd.c (info_symbol_command, info_address_command)
807 (info_display_command): Constify.
808 * osdata.c (info_osdata_command): Constify.
809 * objc-lang.c (info_selectors_command, info_classes_command):
810 Constify.
811 * nto-procfs.c (procfs_pidlist, procfs_meminfo): Constify.
812 * memattr.c (info_mem_command): Constify.
813 * macrocmd.c (info_macro_command, info_macros_command): Constify.
814 * linux-fork.c (info_checkpoints_command): Constify.
815 * infrun.c (info_signals_command): Constify.
816 * inflow.c (info_terminal_command): Constify.
817 * inferior.c (info_inferiors_command): Constify.
818 (print_inferior): Constify.
819 * infcmd.c (info_program_command, info_all_registers_command)
820 (info_registers_command, info_vector_command)
821 (info_float_command): Constify.
822 (registers_info): Constify.
823 * gnu-nat.c (info_send_rights_cmd, info_recv_rights_cmd)
824 (info_port_sets_cmd, info_dead_names_cmd, info_port_rights_cmd):
825 Constify.
826 * f-valprint.c (info_common_command): Constify.
827 * dcache.c (info_dcache_command): Constify.
828 (dcache_info_1): Constify.
829 * darwin-nat-info.c (info_mach_tasks_command)
830 (info_mach_task_command, info_mach_ports_command)
831 (info_mach_port_command, info_mach_threads_command)
832 (info_mach_thread_command, info_mach_regions_command)
833 (info_mach_regions_recurse_command, info_mach_region_command)
834 (info_mach_exceptions_command): Constify.
835 (get_task_from_args): Constify.
836 * cp-support.c (info_vtbl_command): Constify.
837 * breakpoint.c (info_watchpoints_command)
838 (info_tracepoints_command): Constify.
839 (info_breakpoints_command): Remove non-const overload.
840 * avr-tdep.c (avr_io_reg_read_command): Constify.
841 * auxv.c (info_auxv_command): Constify.
842 * ada-tasks.c (info_tasks_command): Constify.
843 (info_task): Constify.
844 * ada-lang.c (info_exceptions_command): Constify.
845
846 2017-11-07 Tom Tromey <tom@tromey.com>
847
848 * solib.h (no_shared_libraries): Constify.
849 * frame.h (return_command): Constify.
850 * cli/cli-cmds.h (quit_command): Constify.
851 * top.h (quit_command, execute_command): Constify.
852 * target.h (flash_erase_command): Constify.
853 * inferior.h (set_inferior_args, attach_command): Constify.
854 * tracepoint.h (start_tracing, stop_tracing): Constify.
855 * breakpoint.h (break_command, tbreak_command)
856 (hbreak_command_wrapper, thbreak_command_wrapper)
857 (rbreak_command_wrapper, watch_command_wrapper)
858 (awatch_command_wrapper, rwatch_command_wrapper)
859 (get_tracepoint_by_number): Constify.
860 * symtab.c (info_variables_command, rbreak_command)
861 (symtab_symbol_info): Constify.
862 (info_variables_command): Add non-const overload.
863 * top.c (dont_repeat_command): Constify.
864 * breakpoint.c (ignore_command, commands_command)
865 (condition_command, tbreak_command, hbreak_command)
866 (thbreak_command, clear_command, break_command)
867 (info_breakpoints_command, watch_command, rwatch_command)
868 (awatch_command, trace_command, ftrace_command, strace_command)
869 (trace_pass_command, break_range_command, dprintf_command)
870 (agent_printf_command, get_tracepoint_by_number)
871 (watch_maybe_just_location, trace_pass_command): Constify.
872 (info_breakpoints_command): Add non-const overload.
873 * tracefile.c (tsave_command): Constify.
874 * infcmd.c (attach_command, disconnect_command, signal_command)
875 (queue_signal_command, stepi_command, nexti_command)
876 (finish_command, next_command, step_command, until_command)
877 (advance_command, jump_command, continue_command, run_command)
878 (start_command, starti_command, interrupt_command)
879 (run_command_1, set_inferior_args, step_1): Constify.
880 * inferior.c (add_inferior_command, remove_inferior_command)
881 (clone_inferior_command): Constify.
882 * linux-fork.c (checkpoint_command, restart_command): Constify.
883 * windows-nat.c (signal_event_command): Constify.
884 * guile/guile.c (guile_repl_command, guile_command): Constify.
885 * printcmd.c (x_command, display_command, printf_command)
886 (output_command, set_command, call_command, print_command)
887 (eval_command): Constify.
888 (non_const_set_command): Remove.
889 (_initialize_printcmd): Update.
890 * source.c (forward_search_command, reverse_search_command):
891 Constify.
892 * jit.c (jit_reader_load_command, jit_reader_unload_command):
893 Constify.
894 * infrun.c (handle_command): Constify.
895 * memattr.c (mem_command): Constify.
896 * stack.c (return_command, up_command, up_silently_command)
897 (down_command, down_silently_command, frame_command)
898 (backtrace_command, func_command, backtrace_command_1): Constify.
899 (backtrace_command): Add non-const overload.
900 * remote-sim.c (simulator_command): Constify.
901 * exec.c (set_section_command): Constify.
902 * tracepoint.c (tdump_command, trace_variable_command)
903 (tstatus_command, tstop_command, tstart_command)
904 (end_actions_pseudocommand, while_stepping_pseudocommand)
905 (collect_pseudocommand, teval_pseudocommand, actions_command)
906 (start_tracing, stop_tracing): Constify.
907 * value.c (init_if_undefined_command): Constify.
908 * tui/tui-stack.c (tui_update_command): Constify.
909 * tui/tui-win.c (tui_refresh_all_command)
910 (tui_set_tab_width_command, tui_set_win_height_command)
911 (tui_set_focus_command, tui_scroll_forward_command)
912 (tui_scroll_backward_command, tui_scroll_left_command)
913 (tui_scroll_right_command, parse_scrolling_args, tui_set_focus)
914 (tui_set_win_height): Constify.
915 * tui/tui-layout.c (tui_layout_command): Constify.
916 * procfs.c (proc_trace_syscalls, proc_trace_sysentry_cmd)
917 (proc_trace_sysexit_cmd, proc_untrace_sysentry_cmd)
918 (proc_untrace_sysexit_cmd): Constify.
919 * remote.c (threadlist_test_cmd, threadinfo_test_cmd)
920 (threadset_test_cmd, threadlist_update_test_cmd)
921 (threadalive_test): Constify.
922 * objc-lang.c (print_object_command): Constify.
923 * command.h (add_com): Constify.
924 * cli/cli-dump.c (restore_command): Constify.
925 * cli/cli-cmds.c (pwd_command, echo_command, quit_command)
926 (help_command, complete_command, shell_command, edit_command)
927 (list_command, disassemble_command, make_command)
928 (apropos_command, alias_command): Constify.
929 * cli/cli-script.c (document_command, define_command)
930 (while_command, if_command, validate_comname): Constify.
931 * cli/cli-decode.c (struct cmd_list_element): Change type of
932 "fun".
933 * target.c (do_monitor_command, flash_erase_command): Constify.
934 * regcache.c (reg_flush_command): Constify.
935 * reverse.c (reverse_step, reverse_next, reverse_stepi)
936 (reverse_nexti, reverse_continue, reverse_finish)
937 (save_bookmark_command, goto_bookmark_command)
938 (exec_reverse_once): Constify.
939 * python/python.c (python_interactive_command, python_command):
940 Constify.
941 * typeprint.c (ptype_command, whatis_command, whatis_exp):
942 Constify.
943 * solib.c (sharedlibrary_command, no_shared_libraries): Constify.
944 * gcore.c (gcore_command): Constify.
945
946 2017-11-07 Tom Tromey <tom@tromey.com>
947
948 * printcmd.c (x_command): Call set_repeat_arguments.
949 * cli/cli-cmds.c (list_command): Call set_repeat_arguments.
950 * top.c (repeat_arguments): New global.
951 (set_repeat_arguments): New function.
952 (execute_command): Handle repeat_arguments.
953 (show_commands): Calls set_repeat_arguments.
954 * command.h (set_repeat_arguments): Declare.
955
956 2017-11-07 Tom Tromey <tom@tromey.com>
957
958 * stack.c (backtrace_command): Use std::string.
959 (backtrace_command_1): Make "count_exp" const.
960
961 2017-11-07 Tom Tromey <tom@tromey.com>
962
963 * source.c (directory_switch, mod_path, add_path): Constify.
964 * defs.h (add_path, mod_path, directory_switch): Constify.
965 * mi/mi-cmd-env.c (env_mod_path): Constify.
966
967 2017-11-07 Tom Tromey <tom@tromey.com>
968
969 * infcmd.c (strip_bg_char): Return gdb::unique_xmalloc_ptr.
970 (run_command_1, continue_command, step_1, jump_command)
971 (signal_command, until_command, advance_command, finish_command)
972 (attach_command): Update.
973
974 2017-11-07 Tom Tromey <tom@tromey.com>
975
976 * command.h (set_cmd_cfunc): Don't declare.
977 * cli/cli-decode.c (set_cmd_cfunc): Now static.
978
979 2017-11-07 Tom Tromey <tom@tromey.com>
980
981 * stack.c (select_frame_command): Constify.
982 * cli/cli-decode.c (add_com_suppress_notification): Constify.
983 * command.h (add_com_suppress_notification): Constify.
984
985 2017-11-07 Tom Tromey <tom@tromey.com>
986
987 * breakpoint.c (stop_command): Constify.
988 * cli/cli-decode.c (struct cmd_list_element): Constify.
989 * command.h (add_abbrev_prefix_cmd): Constify.
990
991 2017-11-07 Pedro Alves <palves@redhat.com>
992
993 * breakpoint.c (extract_bp_kind): New enum.
994 (extract_bp_num, extract_bp_or_bp_range): New functions, partially
995 factored out from ...
996 (extract_bp_number_and_location): ... here.
997 * cli/cli-utils.c (get_number_trailer): Handle '-$variable'.
998
999 2017-11-07 Pedro Alves <palves@redhat.com>
1000
1001 * breakpoint.c (extract_bp_number_and_location): Change return
1002 type to void. Throw error instead of warning.
1003 (enable_disable_command): Adjust.
1004
1005 2017-11-07 Xavier Roirand <roirand@adacore.com>
1006 Pedro Alves <palves@redhat.com>
1007
1008 * breakpoint.c (map_breakpoint_number_range): New, factored out
1009 from ...
1010 (map_breakpoint_numbers): ... here.
1011 (find_location_by_number): Change parameters from string to
1012 breakpoint number and location.
1013 (extract_bp_number_and_location): New function.
1014 (enable_disable_bp_num_loc)
1015 (enable_disable_breakpoint_location_range)
1016 (enable_disable_command): New functions, factored out ...
1017 (enable_command, disable_command): ... these functions, and
1018 adjusted to support ranges.
1019 * NEWS: Document enable/disable breakpoint location range feature.
1020
1021 2017-11-06 Luis Machado <luis.machado@linaro.org>
1022
1023 * MAINTAINERS (Write After Approval): Update my e-mail address.
1024
1025 2017-11-06 Pedro Alves <palves@redhat.com>
1026
1027 * gnu-nat.c (gnu_terminal_init): Delete.
1028 (gnu_target): Don't install gnu_terminal_init.
1029 * inflow.c (child_terminal_init_with_pgrp): Delete, merged with ...
1030 (child_terminal_init): ... this function.
1031
1032 2017-11-06 Pedro Alves <palves@redhat.com>
1033
1034 * common/common.m4 (GDB_AC_COMMON): No longer check termio.h nor
1035 sgtty.h.
1036 * config.in, configure: Regenerate.
1037
1038 2017-11-06 Pedro Alves <palves@redhat.com>
1039
1040 * event-top.c: Check SIGTSTP instead of STOP_SIGNAL thoughout.
1041 (async_init_signals): Adjust.
1042 (handle_stop_sig): Rename to ...
1043 (handle_sigtstp): ... this.
1044 (async_stop_sig): Rename to ...
1045 (async_sigtstp_handler): ... this, and delete STOP_SIGNAL !=
1046 SIGTSTP path.
1047 * event-top.h: Move signal.h include to the top. Check SIGTSTP
1048 instead of STOP_SIGNAL thoughout.
1049 (handle_stop_sig): Rename to ...
1050 (handle_sigtstp): ... this.
1051 * top.c (command_line_input): Replace STOP_SIGNAL -> SIGTSTP.
1052
1053 2017-11-06 Pedro Alves <palves@redhat.com>
1054
1055 * inflow.c (child_terminal_inferior, child_terminal_ours_1): No
1056 longer set flags twice in row.
1057
1058 2017-11-06 Pedro Alves <palves@redhat.com>
1059
1060 * Makefile.in (SER_HARDWIRE): Update comment.
1061 (HFILES_NO_SRCDIR): Remove gdb_termios.h.
1062 * common/gdb_termios.h: Delete file.
1063 * common/job-control.c: Include termios.h and unistd.h instead of
1064 gdb_termios.h.
1065 (gdb_setpgid): Remove HAVE_TERMIOS || TIOCGPGRP preprocessor
1066 check.
1067 (have_job_control): Check HAVE_TERMIOS_H instead of HAVE_TERMIOS.
1068 Remove sgtty code.
1069 * configure.ac: No longer check for termio.h and sgtty.h.
1070 * configure: Regenerate.
1071 * inflow.c: Include termios.h instead of gdb_termios.h. Replace
1072 PROCESS_GROUP_TYPE checks with HAVE_TERMIOS_H checks throughout.
1073 Replace PROCESS_GROUP_TYPE references with pid_t references
1074 throughout.
1075 (gdb_getpgrp): Delete.
1076 (set_initial_gdb_ttystate): Use tcgetpgrp instead of gdb_getpgrp.
1077 (child_terminal_inferior): Remove comment. Remove sgtty code.
1078 (child_terminal_ours_1): Use tcgetpgrp directly instead of
1079 gdb_getpgrp. Use serial_set_tty_state instead aof
1080 serial_noflush_set_tty_state. Remove sgtty code.
1081 * inflow.h: Include unistd.h instead of gdb_termios.h. Replace
1082 PROCESS_GROUP_TYPE check with HAVE_TERMIOS_H check.
1083 (inferior_process_group): Now returns pid_t.
1084 * ser-base.c (ser_base_noflush_set_tty_state): Delete.
1085 * ser-base.h (ser_base_noflush_set_tty_state): Delete.
1086 * ser-event.c (serial_event_ops): Update.
1087 * ser-go32.c (dos_noflush_set_tty_state): Delete.
1088 (dos_ops): Update.
1089 * ser-mingw.c (hardwire_ops, tty_ops, pipe_ops, tcp_ops): Update.
1090 * ser-pipe.c (pipe_ops): Update.
1091 * ser-tcp.c (tcp_ops): Update.
1092 * ser-unix.c: Include termios.h instead of gdb_termios.h. Remove
1093 HAVE_TERMIOS checks.
1094 [HAVE_TERMIO] (struct hardwire_ttystate): Delete.
1095 [HAVE_SGTTY] (struct hardwire_ttystate): Delete.
1096 (get_tty_state, set_tty_state): Drop termio and sgtty code, and
1097 assume termios.
1098 (hardwire_noflush_set_tty_state): Delete.
1099 (hardwire_print_tty_state, hardwire_drain_output)
1100 (hardwire_flush_output, hardwire_flush_input)
1101 (hardwire_send_break, hardwire_raw, hardwire_setbaudrate)
1102 (hardwire_setstopbits, hardwire_setparity): Drop termio and sgtty
1103 code, and assume termios.
1104 (hardwire_ops): Update.
1105 (_initialize_ser_hardwire): Remove HAVE_TERMIOS check.
1106 * serial.c (serial_noflush_set_tty_state): Delete.
1107 * serial.h (serial_noflush_set_tty_state): Delete.
1108 (serial_ops::noflush_set_tty_state): Delete.
1109
1110 2017-11-06 Ulrich Weigand <uweigand@de.ibm.com>
1111
1112 * Makefile.in (SFILES): Remove doublest.c and dfp.c.
1113 (HFILES_NO_SRCDIR): Remove doublest.h and dfp.h.
1114 (COMMON_OBS): Remove doublest.o and dfp.o.
1115 Do not build target-float.c (instead of doublest.c)
1116 with -Wformat-nonliteral.
1117
1118 * doublest.c: Remove file.
1119 * doublest.h: Remove file.
1120 * dfp.c: Remove file.
1121 * dfp.h: Remove file.
1122
1123 * target-float.c: Do not include "doublest.h" and "dfp.h".
1124 (DOUBLEST): Move here from doublest.h.
1125 (enum float_kind): Likewise.
1126 (FLOATFORMAT_CHAR_BIT): Likewise.
1127 (FLOATFORMAT_LARGEST_BYTES): Likewise.
1128 (floatformat_totalsize_bytes): Move here from doublest.c. Make static.
1129 (floatformat_precision): Likewise.
1130 (floatformat_normalize_byteorder, get_field, put_field): Likewise.
1131 (floatformat_is_negative, floatformat_classify, floatformat_mantissa):
1132 Likewise.
1133 (host_float_format, host_double_format, host_long_double_format):
1134 Likewise.
1135 (floatformat_to_string, floatformat_from_string): Likewise.
1136 (floatformat_to_doublest): Likewise. Also, inline the original
1137 convert_floatformat_to_doublest.
1138 (floatformat_from_doublest): Likewise. Also, inline the original
1139 convert_floatformat_from_doublest.
1140
1141 Include "dpd/decimal128.h", "dpd/decimal64.h", and "dpd/decimal32.h".
1142 (MAX_DECIMAL_STRING): Move here from dfp.c.
1143 (match_endianness): Likewise.
1144 (set_decnumber_context, decimal_check_errors): Likewise.
1145 (decimal_from_number, decimal_to_number): Likewise.
1146 (decimal_to_string, decimal_from_string): Likewise. Make static.
1147 (decimal_from_longest, decimal_from_ulongest): Likewise.
1148 (decimal_to_longest): Likewise.
1149 (decimal_binop, decimal_is_zero, decimal_compare): Likewise.
1150 (decimal_convert): Likewise.
1151
1152 2017-11-06 Ulrich Weigand <uweigand@de.ibm.com>
1153
1154 * doublest.c: Do not include "gdbtypes.h".
1155 (extract_typed_floating): Remove.
1156 (store_typed_floating): Remove.
1157 (convert_typed_floating): Remove.
1158 * doublest.h (struct type): Remove.
1159 (DOUBLEST_PRINT_FORMAT): Remove.
1160 (DOUBLEST_SCAN_FORMAT): Remove.
1161 (extract_typed_floating): Remove.
1162 (store_typed_floating): Remove.
1163 (convert_typed_floating): Remove.
1164
1165 * dfp.c (decimal_from_doublest): Remove.
1166 (decimal_to_doublest): Remove.
1167 * dfp.h: Do not include "doublest.h".
1168 (decimal_from_doublest): Remove.
1169 (decimal_to_doublest): Remove.
1170
1171 * value.c: Do not include "doublest.h" and "dfp.h".
1172 (value_as_double): Remove.
1173 (unpack_double): Remove.
1174 (value_from_double): Remove.
1175 (value_from_decfloat): Remove.
1176 * value.h: Do not include "doublest.h".
1177 (value_as_double): Remove.
1178 (unpack_double): Remove.
1179 (value_from_double): Remove.
1180 (value_from_decfloat): Remove.
1181
1182 2017-11-06 Ulrich Weigand <uweigand@de.ibm.com>
1183
1184 * i386-tdep.c: Include "target-float.h". Do not include "doublest.h".
1185 (i386_extract_return_value): Use target_float_convert.
1186 (i386_store_return_value): Likewise.
1187 * i387-tdep.c (i387_register_to_value): Use target_float_convert.
1188 (i387_value_to_register): Likewise.
1189 * ia64-tdep.c: Include "target-float.h". Do not include "doublest.h".
1190 (ia64_register_to_value): Use target_float_convert.
1191 (ia64_value_to_register): Likewise.
1192 (ia64_extract_return_value): Likewise.
1193 (ia64_store_return_value): Likewise.
1194 (ia64_push_dummy_call): Likewise.
1195 * m68k-tdep.c: Include "target-float.h".
1196 (m68k_register_to_value): Use target_float_convert.
1197 (m68k_value_to_register): Likewise.
1198 (m68k_svr4_extract_return_value): Likewise.
1199 (m68k_svr4_store_return_value): Likewise.
1200 * ppc-sysv-tdep.c: Include "target-float.h".
1201 (ppc_sysv_abi_push_dummy_call): Use target_float_convert.
1202 (do_ppc_sysv_return_value): Likewise.
1203 (ppc64_sysv_abi_push_freg): Likewise.
1204 (ppc64_sysv_abi_return_value_base): Likewise.
1205 * rs6000-aix-tdep.c: Include "target-float.h".
1206 (rs6000_push_dummy_call): Use target_float_convert.
1207 (rs6000_return_value): Likewise.
1208 * rs6000-lynx178-tdep.c: Include "target-float.h".
1209 (rs6000_lynx178_push_dummy_call): Use target_float_convert.
1210 (rs6000_lynx178_return_value): Likewise.
1211 * rs6000-tdep.c: Include "target-float.h". Do not include "doublest.h".
1212 (rs6000_register_to_value): Use target_float_convert.
1213 (rs6000_value_to_register): Likewise.
1214 * arm-tdep.c: Include "target-float.h". Do not include "doublest.h".
1215 (arm_extract_return_value): Use target_float_convert.
1216 (arm_store_return_value): Likewise.
1217 * sh-tdep.c: Include "target-float.h". Do not include "doublest.h".
1218 (sh_register_convert_to_virtual): Use target_float_convert.
1219 (sh_register_convert_to_raw): Likewise.
1220 * sh64-tdep.c: Include "target-float.h".
1221 (sh64_extract_return_value): Use target_float_convert.
1222 (sh64_register_convert_to_virtual): Likewise.
1223 (sh64_register_convert_to_raw): Likewise. Fix argument types.
1224
1225 2017-11-06 Ulrich Weigand <uweigand@de.ibm.com>
1226
1227 * target-float.c (floatformat_to_host_double): New function.
1228 (floatformat_from_host_double): Likewise.
1229 (target_float_to_host_double): Likewise.
1230 (target_float_from_host_double): Likewise.
1231 * target-float.h (target_float_to_host_double): Add prototype.
1232 (target_float_from_host_double): Likewise.
1233
1234 * guile/scm-value.c: Include "target-float.h".
1235 (gdbscm_value_to_real): Use target_float_to_host_double.
1236 Handle integer source values via value_as_long.
1237 * guile/scm-math.c: Include "target-float.h". Do not include
1238 "doublest.h", "dfp.h", and "expression.h".
1239 (vlscm_convert_typed_number): Use target_float_from_host_double.
1240 (vlscm_convert_number): Likewise.
1241
1242 * python/py-value.c (valpy_float): Use target_float_to_host_double.
1243 (convert_value_from_python): Use target_float_from_host_double.
1244
1245 2017-11-06 Ulrich Weigand <uweigand@de.ibm.com>
1246
1247 * ada-lang.c (cast_to_fixed): Reimplement in target arithmetic.
1248 (cast_from_fixed): Likewise.
1249 (ada_scaling_type): New function.
1250 (ada_delta): Return value instead of DOUBLEST. Perform target
1251 arithmetic instead of host arithmetic.
1252 (scaling_factor): Rename to ...
1253 (ada_scaling_factor) ... this. Make non-static. Return value instead
1254 of DOUBLEST. Perform target arithmetic instead of host arithmetic.
1255 (ada_fixed_to_float): Remove.
1256 (ada_float_to_fixed): Remove.
1257 * ada-lang.h (ada_fixed_to_float): Remove.
1258 (ada_float_to_fixed): Remove.
1259 (ada_delta): Return value instead of DOUBLEST.
1260 (ada_scaling_factor): Add prototype.
1261
1262 * ada-typeprint.c: Include "target-float.h".
1263 (print_fixed_point_type): Perform target arithmetic instead of
1264 host arithmetic.
1265 * ada-valprint.c: Include "target-float.h".
1266 (ada_val_print_num): Perform target arithmetic instead of
1267 host arithmetic for fixed-point types.
1268
1269 2017-11-06 Ulrich Weigand <uweigand@de.ibm.com>
1270
1271 * target-float.c: Include <math.h>.
1272 (floatformat_binop): New function.
1273 (floatformat_compare): Likewise.
1274 (target_float_binop): Likewise.
1275 (target_float_compare): Likewise.
1276 * target-float.h: Include "expression.h".
1277 (target_float_binop): Add prototype.
1278 (target_float_compare): Likewise.
1279
1280 * valarith.c: Do not include "doublest.h" and "dfp.h".
1281 Include "common/byte-vector.h".
1282 (value_args_as_decimal): Remove, replace by ...
1283 (value_args_as_target_float): ... this function. Handle both
1284 binary and decimal target floating-point formats.
1285 (scalar_binop): Handle both binary and decimal FP using
1286 value_args_as_target_float and target_float_binop.
1287 (value_equal): Handle both binary and decimal FP using
1288 value_args_as_target_float and target_float_compare.
1289 (value_less): Likewise.
1290 (value_pos): Handle all scalar types as simple copy.
1291 (value_neg): Handle all scalar types via BINOP_SUB from 0.
1292 * dfp.c (decimal_binop): Throw error instead of internal_error
1293 when called with an unsupported operation code.
1294
1295 2017-11-06 Ulrich Weigand <uweigand@de.ibm.com>
1296
1297 * target-float.c (target_float_to_string): New function.
1298 (target_float_from_string): New function.
1299 * target-float.h (target_float_to_string): Add prototype.
1300 (target_float_from_string): Add prototype.
1301
1302 * valprint.c: Include "target-float.h". Do not include
1303 "doublest.h" and "dfp.h".
1304 (print_floating): Use target_float_to_string.
1305 * printcmd.c: Include "target-float.h". Do not include "dfp.h".
1306 (printf_floating): Use target_float_to_string.
1307 * i387-tdep.c: Include "target-float.h". Do not include "doublest.h".
1308 (print_i387_value): Use target_float_to_string.
1309 * mips-tdep.c: Include "target-float.h".
1310 (mips_print_fp_register): Use target_float_to_string.
1311 * sh64-tdep.c: Include "target-float.h".
1312 (sh64_do_fp_register): Use target_float_to_string.
1313
1314 * parse.c: Include "target-float.h". Do not include
1315 "doublest.h" and "dfp.h".
1316 (parse_float): Use target_float_from_string.
1317 * stabsread.c: Include "target-float.h". Do not include "doublest.h".
1318 (define_symbol): Use target_float_from_string.
1319 * gdbarch-selftests.c: Include "target-float.h".
1320 (register_to_value_test): Use target_float_from_string.
1321
1322 2017-11-06 Ulrich Weigand <uweigand@de.ibm.com>
1323
1324 * Makefile.c (SFILES): Add target-float.c.
1325 (HFILES_NO_SRCDIR): Add target-float.h.
1326 (COMMON_OBS): Add target-float.o.
1327 * target-float.h: New file.
1328 * target-float.c: New file.
1329
1330 * doublest.c (floatformat_classify): Fix detection of float_zero.
1331
1332 * gdbtypes.c (is_floating_type): New function.
1333 * gdbtypes.h (is_floating_type): Add prototype.
1334
1335 * value.c: Do not include "floatformat.h".
1336 (unpack_double): Use target_float_is_valid.
1337 (is_floating_value): New function.
1338 * value.h (is_floating_value): Add prototype-
1339
1340 * valarith.c: Include "target-float.h".
1341 (value_logical_not): Use target_float_is_zero.
1342
1343 * python/py-value.c: Include "target-float.h".
1344 (valpy_nonzero): Use target_float_is_zero.
1345
1346 2017-11-04 Tom Tromey <tom@tromey.com>
1347
1348 * h8300-tdep.c (h8300_push_dummy_call): Use std::vector.
1349
1350 2017-11-04 Tom Tromey <tom@tromey.com>
1351
1352 * breakpoint.c (set_momentary_breakpoint): Return
1353 breakpoint_up.
1354 (until_break_command): Update.
1355 (new_until_break_fsm): Change argument types to
1356 breakpoint_up.
1357 (set_momentary_breakpoint_at_pc): Return breakpoint_up.
1358 (do_delete_breakpoint_cleanup, make_cleanup_delete_breakpoint):
1359 Remove.
1360 * infcmd.c (finish_forward): Update.
1361 * breakpoint.h (set_momentary_breakpoint)
1362 (set_momentary_breakpoint_at_pc): Return breakpoint_up.
1363 (make_cleanup_delete_breakpoint): Remove.
1364 (struct breakpoint_deleter): New.
1365 (breakpoint_up): New typedef.
1366 * infrun.c (insert_step_resume_breakpoint_at_sal_1): Update.
1367 (insert_exception_resume_breakpoint): Update.
1368 (insert_exception_resume_from_probe): Update.
1369 (insert_longjmp_resume_breakpoint): Update.
1370 * arm-linux-tdep.c (arm_linux_copy_svc): Update.
1371 * elfread.c (elf_gnu_ifunc_resolver_stop): Update.
1372 * infcall.c (call_function_by_hand_dummy): Update
1373
1374 2017-11-04 Tom Tromey <tom@tromey.com>
1375
1376 * c-typeprint.c (c_type_print_base): Use gdb::unique_xmalloc_ptr.
1377
1378 2017-11-04 Tom Tromey <tom@tromey.com>
1379
1380 * linux-tdep.c (linux_core_info_proc_mappings): Use
1381 gdb::def_vector.
1382 (linux_get_siginfo_data): Return gdb::byte_vector. Remove
1383 "size" argument.
1384 (linux_corefile_thread): Update.
1385 (linux_make_corefile_notes): Remove unused variable.
1386
1387 2017-11-04 Tom Tromey <tom@tromey.com>
1388
1389 * ppc-linux-tdep.c (ppc_linux_get_syscall_number): Use
1390 gdb::byte_vector.
1391
1392 2017-11-04 Tom Tromey <tom@tromey.com>
1393
1394 * objfiles.c (do_free_objfile_cleanup): Remove.
1395 * compile/compile-object-load.c (compile_object_load): Update.
1396 * objfiles.h (make_cleanup_free_objfile): Remove.
1397
1398 2017-11-04 Tom Tromey <tom@tromey.com>
1399
1400 * sparc64-tdep.c (do_examine): Use gdb::def_vector.
1401 (adi_read_versions): Change "tags" to "gdb_byte *".
1402 (adi_print_versions): Likewise.
1403
1404 2017-11-04 Tom Tromey <tom@tromey.com>
1405
1406 * breakpoint.c
1407 (scoped_rbreak_breakpoints::scoped_rbreak_breakpoints): Rename
1408 from start_rbreak_breakpoints.
1409 (scoped_rbreak_breakpoints): Rename from end_rbreak_breakpoints.
1410 * breakpoint.h (class scoped_rbreak_breakpoints): New.
1411 (start_rbreak_breakpoints, end_rbreak_breakpoints): Remove.
1412 * symtab.c (do_end_rbreak_breakpoints): Remove.
1413 (rbreak_command): Use scoped_rbreak_breakpoints, std::string.
1414
1415 2017-11-04 Tom Tromey <tom@tromey.com>
1416
1417 * cp-namespace.c (reset_directive_searched): Remove.
1418 (cp_lookup_symbol_via_imports): Use scoped_restore.
1419 * cp-support.c (reset_directive_searched): Remove.
1420 (make_symbol_overload_list_using): Use scoped_restore.
1421 * d-namespace.c (d_lookup_symbol_imports): Use scoped_restore.
1422 (reset_directive_searched): Remove.
1423
1424 2017-11-04 Tom Tromey <tom@tromey.com>
1425
1426 * symfile.c (find_separate_debug_file_by_debuglink): Use
1427 unique_xmalloc_ptr.
1428
1429 2017-11-04 Tom Tromey <tom@tromey.com>
1430
1431 * compile/compile-loc2c.c (compute_stack_depth_worker): Change
1432 type of "info".
1433 (compute_stack_depth): Likewise.
1434 (do_compile_dwarf_expr_to_c): Use std::vector.
1435
1436 2017-11-04 Tom Tromey <tom@tromey.com>
1437
1438 * compile/compile-object-load.c (link_callbacks_einfo): Use
1439 std::string.
1440
1441 2017-11-04 Tom Tromey <tom@tromey.com>
1442
1443 * dwarf2read.c (process_full_comp_unit, process_full_type_unit):
1444 Use scoped_free_pendings.
1445 * dbxread.c (dbx_symfile_read, dbx_psymtab_to_symtab_1): Use
1446 scoped_free_pendings.
1447 * xcoffread.c (xcoff_psymtab_to_symtab_1): Use scoped_free_pendings.
1448 (xcoff_initial_scan): Likewise.
1449 * buildsym.c (reset_symtab_globals): Update comment.
1450 (scoped_free_pendings): Rename from really_free_pendings.
1451 (prepare_for_building): Update comment.
1452 (buildsym_init): Likewise.
1453 * buildsym.h (class scoped_free_pendings): New class.
1454 (really_free_pendings): Don't declare.
1455
1456 2017-11-03 Ulrich Weigand <uweigand@de.ibm.com>
1457
1458 * doublest.c (convert_doublest_to_floatformat): Fix uninitialized
1459 output when converting a zero value to a special byteorder format.
1460
1461 2017-11-02 Yao Qi <yao.qi@linaro.org>
1462
1463 * frame.c (do_frame_register_read): Remove aspace.
1464 * jit.c (jit_frame_sniffer): Likwise.
1465 * ppc-linux-tdep.c (ppu2spu_sniffer): Likewise.
1466 * regcache.c (regcache::regcache): Pass nullptr.
1467 (regcache_print): Caller updated.
1468 * regcache.h (regcache::regcache): Remove one constructor
1469 parameter aspace.
1470
1471 2017-11-02 Yao Qi <yao.qi@linaro.org>
1472
1473 * regcache.h (regcache) <m_readonly_p>: Change it to const bool.
1474
1475 2017-11-02 Yao Qi <yao.qi@linaro.org>
1476
1477 * breakpoint.c (insert_single_step_breakpoints): Update.
1478 * frame.c (struct frame_info) <aspace>: Add const.
1479 (frame_save_as_regcache): Add const.
1480 (get_frame_address_space): Return const address_space *.
1481 * frame.h (get_frame_address_space): Update declaration.
1482 * infrun.c (struct step_over_info) <aspace>: Add const.
1483 (set_step_over_info): Make aspace const.
1484 (displaced_step_prepare_throw): Change variable const.
1485 (resume): Likewise.
1486 (proceed): Likewise.
1487 (adjust_pc_after_break): Likewise.
1488 (save_waitstatus): Likewise.
1489 (handle_signal_stop): Likewise.
1490 (keep_going_pass_signal): Likewise.
1491 * jit.c (jit_frame_sniffer): Add const.
1492 * mips-tdep.c (mips_single_step_through_delay): Likewise.
1493 * ppc-linux-tdep.c (ppu2spu_sniffer): Likewise.
1494 * record-full.c (record_full_wait_1): Likewise.
1495 * regcache.c (regcache::regcache): Change parameter to const.
1496 * regcache.h (regcache::regcache): Likewise.
1497 (regcache::aspace): Return const address_space *.
1498 (regcache) <m_aspace>: Add const.
1499
1500 2017-11-02 Yao Qi <yao.qi@linaro.org>
1501
1502 * darwin-nat.c (cancel_breakpoint): Use regcache->aspace ().
1503 * frame.c (create_sentinel_frame): Likewise.
1504 * infrun.c (displaced_step_prepare_throw): Likewise.
1505 (resume): Likewise.
1506 (thread_still_needs_step_over_bp): Likewise.
1507 (proceed): Likewise.
1508 (do_target_wait): Likewise.
1509 (adjust_pc_after_break): Likewise.
1510 (handle_syscall_event): Likewise.
1511 (save_waitstatus): Likewise.
1512 (handle_inferior_event_1): Likewise.
1513 (handle_signal_stop): Likewise.
1514 (keep_going_pass_signal): Likewise.
1515 * linux-nat.c (status_callback): Likewise.
1516 (save_stop_reason): Likewise.
1517 (resume_stopped_resumed_lwps): Likewise.
1518 * record-full.c (record_full_exec_insn): Likewise.
1519 (record_full_wait_1): Likewise.
1520 * regcache.c (get_regcache_aspace): Remove.
1521 * regcache.h (get_regcache_aspace): Remove.
1522
1523 2017-11-02 Yao Qi <yao.qi@linaro.org>
1524
1525 * regcache.c (struct regcache_descr) <nr_raw_registers>: Remove.
1526 (init_regcache_descr): Use gdbarch_num_regs.
1527 (regcache::regcache): Likewise.
1528 (regcache::get_register_status): Likewise.
1529 (regcache::assert_raw_regnum): Likewise.
1530 (regcache::cooked_read): Likewise.
1531 (regcache::cooked_read_value): Likewise.
1532 (regcache::cooked_write): Likewise.
1533 (regcache::dump): Likewise.
1534 (regcache::num_raw_registers): New method.
1535 * regcache.h (class regcache) <num_raw_registers>: New.
1536
1537 2017-11-02 Yao Qi <yao.qi@linaro.org>
1538
1539 * regcache.c (regcache::assert_regnum): New method.
1540 (regcache::invalidate): Call assert_regnum.
1541 (regcache::raw_update): Likewise.
1542 (regcache::raw_write): Likewise.
1543 (regcache::raw_read_part): Likewise.
1544 (regcache::raw_write_part): Likewise.
1545 (regcache::raw_supply): Likewise.
1546 (regcache::raw_supply_integer): Likewise.
1547 (regcache::raw_supply_zeroed): Likewise.
1548 (regcache::raw_collect): Likewise.
1549 (regcache::raw_collect_integer): Likewise.
1550 * regcache.h (regcache::assert_regnum): Declare.
1551
1552 2017-11-02 Yao Qi <yao.qi@linaro.org>
1553
1554 * regcache.c (regcache::dump): Remove code.
1555
1556 2017-11-02 Yao Qi <yao.qi@linaro.org>
1557
1558 * regcache.c (struct regcache_descr) <sizeof_raw_register_status>:
1559 Remove.
1560 <sizeof_cooked_register_status>: Remove.
1561 (init_regcache_descr): Update.
1562 (regcache::regcache): Use nr_cooked_registers and nr_raw_registers.
1563 (regcache::save): Likewise.
1564 (regcache::dump): Likewise.
1565
1566 2017-11-01 James Bowman <james.bowman@ftdichip.com>
1567
1568 * ft32-tdep.c (ft32_fetch_instruction): New function.
1569 (ft32_analyze_prologue): Use ft32_fetch_instruction().
1570
1571 2017-10-31 Simon Marchi <simon.marchi@polymtl.ca>
1572
1573 * cli/cli-script.c (execute_control_command): Rename to ...
1574 (execute_control_command_1): ... this.
1575 (execute_control_command): New function.
1576
1577 2017-10-31 Simon Marchi <simon.marchi@ericsson.com>
1578
1579 * tracepoint.c (tfind_command): Remove const_cast.
1580
1581 2017-10-30 Mike Gulick <mgulick@mathworks.com>
1582
1583 * Makefile.in (HFILES_NO_SRCDIR): Remove reference to gdb.h.
1584
1585 2017-10-30 Simon Marchi <simon.marchi@ericsson.com>
1586
1587 * common/common-utils.h (in_inclusive_range): New function.
1588 * arm-tdep.c (arm_record_extension_space): Use
1589 in_inclusive_range.
1590 (thumb_record_ld_st_reg_offset): Use in_inclusive_range.
1591 * cris-tdep.c (cris_spec_reg_applicable): Use
1592 in_inclusive_range.
1593
1594 2017-10-30 Pedro Alves <palves@redhat.com>
1595 Simon Marchi <simon.marchi@ericsson.com>
1596
1597 * remote.c (remote_set_syscall_catchpoint): Build a std::string
1598 instead of a gdb::unique_xmalloc_ptr, using string_appendf.
1599
1600 2017-10-30 Pedro Alves <palves@redhat.com>
1601
1602 * common/common-utils.c (string_appendf, string_vappendf): New
1603 functions.
1604 * common/common-utils.h (string_appendf, string_vappendf): New
1605 declarations.
1606 * unittests/common-utils-selftests.c (string_appendf_func)
1607 (test_appendf_func, string_vappendf_wrapper, string_appendf_tests)
1608 (string_vappendf_tests): New functions.
1609 (_initialize_common_utils_selftests): Register "string_appendf" and
1610 "string_vappendf tests".
1611
1612 2017-10-30 Pedro Alves <palves@redhat.com>
1613
1614 * unittests/common-utils-selftests.c (format_func): New typedef.
1615 (string_printf_tests, string_vprintf_tests): Tests factored out
1616 and merged to ...
1617 (test_format_func): ... this new function.
1618 (string_printf_tests, string_vprintf_tests): Reimplement on top of
1619 test_format_func.
1620
1621 2017-10-29 Simon Marchi <simon.marchi@ericsson.com>
1622
1623 * darwin-nat.c: Remove include of gdb.h.
1624
1625 2017-10-29 Simon Marchi <simon.marchi@ericsson.com>
1626
1627 * xtensa-xtregs.c: Fix formatting issues.
1628
1629 2017-10-29 Simon Marchi <simon.marchi@ericsson.com>
1630
1631 * xtensa-xtregs.c (xtensa_regtable_t) <name>: Constify.
1632
1633 2017-10-28 Maksim Dzabraev <dzabraew@gmail.com>
1634
1635 PR python/21213
1636 * python/py-infthread.c (thpy_get_inferior): Increment reference
1637 of inferior before returning it.
1638
1639 2017-10-27 Simon Marchi <simon.marchi@ericsson.com>
1640
1641 * unittests/common-utils-selftests.c (format): Add
1642 ATTRIBUTE_PRINTF.
1643
1644 2017-10-27 Simon Marchi <simon.marchi@polymtl.ca>
1645
1646 * xml-syscall.c (struct syscall_desc): Add constructor.
1647 <name>: Change type to std::string.
1648 (syscall_desc_up): New typedef.
1649 (syscall_desc_p): Remove typeder.
1650 (DEF_VEC_P(syscall_desc_p)): Remove.
1651 (struct syscall_group_desc): Add constructor.
1652 <name>: Change type to std::string.
1653 <syscalls>: Change type to std::vector.
1654 (syscall_group_desc_up): New typedef.
1655 (syscall_group_desc_p): Remove typedef.
1656 (DEF_VEC_P(syscall_group_desc_p)): Remove.
1657 (struct syscalls_info) <syscalls>: Change type to std::vector of
1658 unique_ptr.
1659 <groups>: Likewise.
1660 <my_gdb_datadir>: Change type to std::string.
1661 (syscalls_info_up): New typedef.
1662 (allocate_syscalls_info): Remove.
1663 (syscalls_info_free_syscalls_desc): Remove.
1664 (syscalls_info_free_syscall_group_desc): Remove.
1665 (free_syscalls_info): Remove.
1666 (make_cleanup_free_syscalls_info): Remove.
1667 (syscall_group_create_syscall_group_desc): Adjust.
1668 (syscall_group_add_syscall): Adjust.
1669 (syscall_create_syscall_desc): Adjust.
1670 (syscall_parse_xml): Adjust, use unique_ptr instead of cleanup.
1671 (init_syscalls_info): Adjust.
1672 (syscall_group_get_group_by_name): Adjust.
1673 (xml_get_syscall_number): Adjust.
1674 (xml_get_syscall_name): Adjust.
1675 (xml_list_of_syscalls): Adjust.
1676 (xml_list_syscalls_by_group): Adjust.
1677 (xml_list_of_groups): Adjust.
1678
1679 2017-10-27 Simon Marchi <simon.marchi@ericsson.com>
1680
1681 * probe.h: Don't include gdb_vecs.h.
1682 (DEF_VEC_P (probe_p)): Remove.
1683 (find_probes_in_objfile): Return an std::vector.
1684 * probe.c (find_probes_in_objfile): Likewise.
1685 * breakpoint.c (breakpoint_objfile_data)
1686 <longjmp_probes>: Change type to std::vector.
1687 <exception_probes>: Likewise.
1688 (free_breakpoint_probes): Don't manually free vectors.
1689 (create_longjmp_master_breakpoint): Adjust.
1690 (create_exception_master_breakpoint): Adjust.
1691 * solib-svr4.c (svr4_create_probe_breakpoints): Change
1692 parameter type, adjust.
1693 (svr4_create_solib_event_breakpoints): Adjust.
1694
1695 2017-10-27 Simon Marchi <simon.marchi@ericsson.com>
1696
1697 * breakpoint.c (breakpoint_objfile_data): Initialize fields.
1698 (get_breakpoint_objfile_data): Allocate breakpoint_objfile_data
1699 with new.
1700 (free_breakpoint_probes): Rename to ...
1701 (free_breakpoint_objfile_data): ... this, and call delete on
1702 bp_objfile_data..
1703
1704 2017-10-27 Simon Marchi <simon.marchi@polymtl.ca>
1705
1706 * auto-load.c: Don't include gdb_vecs.h, include algorithm.
1707 (loaded_script_ptr): Remove typedef.
1708 (DEF_VEC_P (loaded_script_ptr)): Remove.
1709 (struct collect_matching_scripts_data): Add constructor.
1710 <scripts_p>: Change type to (pointer to) std::vector.
1711 (collect_matching_scripts_data): Adjust.
1712 (sort_scripts_by_name): Make suitable for std::sort.
1713 (print_scripts): Don't sort vector, adjust to std::vector.
1714 (auto_load_info_scripts): Sort vectors, adjust to std::vector.
1715
1716 2017-10-27 Simon Marchi <simon.marchi@ericsson.com>
1717
1718 * symfile.c (filename_language): Make struct, not typedef. Add
1719 constructor.
1720 <ext>: Change type to std::string.
1721 (DEF_VEC_O (filename_language)): Remove.
1722 (filename_language_table): Change type to std::vector.
1723 (add_filename_language): Adjust.
1724 (set_ext_lang_command): Adjust.
1725 (info_ext_lang_command): Adjust.
1726 (deduce_language_from_filename): Adjust.
1727 (class scoped_restore_filename_language_table): Remove.
1728 (test_filename_language): Use scoped_restore.
1729 (test_set_ext_lang_command): Use scoped_restore, adjust to
1730 std::vector change.
1731
1732 2017-10-27 Simon Marchi <simon.marchi@ericsson.com>
1733
1734 * symfile.c: Include selftest.h.
1735 (class scoped_restore_filename_language_table): New.
1736 (test_filename_language): New test.
1737 (test_set_ext_lang_command): New test.
1738 (_initialize_symfile): Register tests.
1739
1740 2017-10-27 Keith Seitz <keiths@redhat.com>
1741
1742 * breakpoint.c (print_breakpoint_location): Use the symbol saved
1743 in the bp_location, falling back to find_pc_sect_function when
1744 needed.
1745 (add_location_to_breakpoint): Save sal->symbol.
1746 * breakpoint.h (struct bp_location) <symbol>: New field.
1747 * symtab.c (find_function_start_sal): Save the symbol into the SaL.
1748 * symtab.h (struct symtab_and_line) <symbol>: New field.
1749
1750 2017-10-26 Patrick Frants <osscontribute@gmail.com>
1751
1752 PR gdb/13669
1753 * cp-valprint.c (cp_print_value_fields): Use obstack_blank_fast
1754 to rewind obstack.
1755
1756 2017-10-26 Pedro Alves <palves@redhat.com>
1757
1758 * remote.c (remote_async_terminal_ours_p): Delete.
1759 (remote_open_1, remote_terminal_inferior, remote_terminal_ours):
1760 Remove references to 'remote_async_terminal_ours_p'.
1761
1762 2017-10-26 Yao Qi <yao.qi@linaro.org>
1763
1764 * breakpoint.h (regular_breakpoint_inserted_here_p): Remove.
1765
1766 2017-10-26 Yao Qi <yao.qi@linaro.org>
1767
1768 * break-catch-sig.c (signal_catchpoint_breakpoint_hit): Make
1769 aspace const.
1770 * break-catch-syscall.c (breakpoint_hit_catch_syscall):
1771 Likewise.
1772 * breakpoint.c (bpstat_check_location): Remove cast.
1773 (breakpoint_hit_catch_fork): Make aspce const.
1774 (breakpoint_hit_catch_solib): Likewise.
1775 (breakpoint_hit_catch_exec): Likewise.
1776 (breakpoint_hit_ranged_breakpoint): Likewise.
1777 (breakpoint_hit_watchpoint): Likewise.
1778 (base_breakpoint_breakpoint_hit): Likewise.
1779 (bkpt_breakpoint_hit): Likewise.
1780 (dprintf_breakpoint_hit): Likewise.
1781 (tracepoint_breakpoint_hit): Likewise.
1782 * breakpoint.h (breakpoint_ops) <breakpoint_hit>: Likewise.
1783
1784 2017-10-26 Yao Qi <yao.qi@linaro.org>
1785
1786 * breakpoint.c (breakpoint_location_address_match): Change
1787 "struct address_space *" to "const address_space".
1788 (breakpoint_location_address_range_overlap): Likewise.
1789 (breakpoint_here_p): Likewise.
1790 (breakpoint_in_range_p): Likewise.
1791 (moribund_breakpoint_here_p): Likewise.
1792 (bp_location_inserted_here_p): Likewise.
1793 (software_breakpoint_inserted_here_p): Likewise.
1794 (hardware_breakpoint_inserted_here_p): Likewise.
1795 (hardware_watchpoint_inserted_in_range): Likewise.
1796 (bpstat_check_location): Likewise.
1797 (bpstat_stop_status): Likewise.
1798 (breakpoint_address_match): Likewise.
1799 (breakpoint_address_match_range): Likewise.
1800 (breakpoint_location_address_match): Likewise.
1801 (breakpoint_location_address_range_overlap): Likewise.
1802 (insert_single_step_breakpoint): Likewise.
1803 (breakpoint_has_location_inserted_here): Likewise.
1804 (single_step_breakpoint_inserted_here_p): Likewise.
1805 (pc_at_non_inline_function): Likewise.
1806 * breakpoint.h (bpstat_stop_status): Update declaration.
1807 (breakpoint_here_p): Likewise.
1808 (breakpoint_in_range_p): Likewise.
1809 (moribund_breakpoint_here_p): Likewise.
1810 (breakpoint_inserted_here_p): Likewise.
1811 (software_breakpoint_inserted_here_p): Likewise.
1812 (hardware_breakpoint_inserted_here_p): Likewise.
1813 (breakpoint_has_location_inserted_here): Likewise.
1814 (single_step_breakpoint_inserted_here_p): Likewise.
1815 (hardware_watchpoint_inserted_in_range): Likewise.
1816 (breakpoint_address_match): Likewise.
1817 (insert_single_step_breakpoint): Likewise.
1818 (pc_at_non_inline_function): Likewise.
1819 * gdbthread.h (thread_has_single_step_breakpoint_here): Likewise.
1820 * record.c (record_check_stopped_by_breakpoint): Likewise.
1821 * record.h (record_check_stopped_by_breakpoint): Likewise.
1822 * thread.c (thread_has_single_step_breakpoint_here): Likewise.
1823
1824 2017-10-25 Yao Qi <yao.qi@linaro.org>
1825
1826 * aarch32-linux-nat.c (aarch32_gp_regcache_supply): Use
1827 regcache->arch () instead get_regcache_arch.
1828 * aarch64-fbsd-nat.c (aarch64_fbsd_fetch_inferior_registers):
1829 Likewise.
1830 (aarch64_fbsd_store_inferior_registers): Likewise.
1831 * aarch64-linux-nat.c (fetch_gregs_from_thread): Likewise.
1832 (store_gregs_to_thread): Likewise.
1833 (fetch_fpregs_from_thread): Likewise.
1834 (store_fpregs_to_thread): Likewise.
1835 * aarch64-tdep.c (aarch64_extract_return_value): Likewise.
1836 (aarch64_store_return_value): Likewise.
1837 (aarch64_software_single_step): Likewise.
1838 * aix-thread.c (aix_thread_wait): Likewise.
1839 (supply_reg32): Likewise.
1840 (supply_sprs64): Likewise.
1841 (supply_sprs32): Likewise.
1842 (fill_gprs64): Likewise.
1843 (fill_gprs32): Likewise.
1844 (fill_sprs64): Likewise.
1845 (fill_sprs32): Likewise.
1846 (store_regs_user_thread): Likewise.
1847 (store_regs_kernel_thread): Likewise.
1848 * alpha-bsd-nat.c (alphabsd_fetch_inferior_registers): Likewise.
1849 (alphabsd_store_inferior_registers): Likewise.
1850 * alpha-tdep.c (alpha_extract_return_value): Likewise.
1851 (alpha_store_return_value): Likewise.
1852 (alpha_deal_with_atomic_sequence): Likewise.
1853 (alpha_next_pc): Likewise.
1854 (alpha_software_single_step): Likewise.
1855 * amd64-bsd-nat.c (amd64bsd_fetch_inferior_registers): Likewise.
1856 (amd64bsd_store_inferior_registers): Likewise.
1857 * amd64-linux-nat.c (amd64_linux_fetch_inferior_registers):
1858 Likewise.
1859 (amd64_linux_store_inferior_registers): Likewise.
1860 * amd64-nat.c (amd64_supply_native_gregset): Likewise.
1861 (amd64_collect_native_gregset): Likewise.
1862 * amd64-obsd-tdep.c (amd64obsd_supply_uthread): Likewise.
1863 (amd64obsd_collect_uthread): Likewise.
1864 * amd64-tdep.c (amd64_supply_fpregset): Likewise.
1865 (amd64_collect_fpregset): Likewise.
1866 (amd64_supply_fxsave): Likewise.
1867 (amd64_supply_xsave): Likewise.
1868 (amd64_collect_fxsave): Likewise.
1869 (amd64_collect_xsave): Likewise.
1870 * arc-tdep.c (arc_write_pc): Likewise.
1871 * arch-utils.c (default_skip_permanent_breakpoint): Likewise.
1872 * arm-fbsd-nat.c (arm_fbsd_fetch_inferior_registers): Likewise.
1873 (arm_fbsd_store_inferior_registers): Likewise.
1874 * arm-linux-nat.c (fetch_vfp_regs): Likewise.
1875 (store_vfp_regs): Likewise.
1876 (arm_linux_fetch_inferior_registers): Likewise.
1877 (arm_linux_store_inferior_registers): Likewise.
1878 * arm-linux-tdep.c (arm_linux_supply_gregset): Likewise.
1879 (arm_linux_sigreturn_next_pc): Likewise.
1880 (arm_linux_get_next_pcs_syscall_next_pc): Likewise.
1881 * arm-nbsd-nat.c (arm_supply_gregset): Likewise.
1882 (fetch_register): Likewise.
1883 (store_register): Likewise.
1884 * arm-tdep.c (arm_is_thumb): Likewise.
1885 (displaced_in_arm_mode): Likewise.
1886 (bx_write_pc): Likewise.
1887 (arm_get_next_pcs_addr_bits_remove): Likewise.
1888 (arm_software_single_step): Likewise.
1889 (arm_extract_return_value): Likewise.
1890 (arm_store_return_value): Likewise.
1891 (arm_write_pc): Likewise.
1892 * bfin-tdep.c (bfin_extract_return_value): Likewise.
1893 * bsd-uthread.c (bsd_uthread_fetch_registers): Likewise.
1894 (bsd_uthread_store_registers): Likewise.
1895 * core-regset.c (fetch_core_registers): Likewise.
1896 * corelow.c (get_core_registers): Likewise.
1897 * cris-tdep.c (cris_store_return_value): Likewise.
1898 (cris_extract_return_value): Likewise.
1899 (find_step_target): Likewise.
1900 (find_step_target): Likewise.
1901 (cris_software_single_step): Likewise.
1902 * ctf.c (ctf_fetch_registers): Likewise.
1903 * darwin-nat.c (cancel_breakpoint): Likewise.
1904 * fbsd-tdep.c (fbsd_collect_thread_registers): Likewise.
1905 * frv-tdep.c (frv_extract_return_value): Likewise.
1906 * ft32-tdep.c (ft32_store_return_value): Likewise.
1907 (ft32_extract_return_value): Likewise.
1908 * go32-nat.c (fetch_register): Likewise.
1909 (go32_fetch_registers): Likewise.
1910 (go32_store_registers): Likewise.
1911 (store_register): Likewise.
1912 * h8300-tdep.c (h8300_extract_return_value): Likewise.
1913 (h8300_store_return_value): Likewise.
1914 * hppa-linux-nat.c (fetch_register): Likewise.
1915 (store_register): Likewise.
1916 (hppa_linux_fetch_inferior_registers): Likewise.
1917 (hppa_linux_store_inferior_registers): Likewise.
1918 * i386-darwin-nat.c (i386_darwin_fetch_inferior_registers): Likewise.
1919 (i386_darwin_store_inferior_registers): Likewise.
1920 * i386-gnu-nat.c (gnu_fetch_registers): Likewise.
1921 (gnu_store_registers): Likewise.
1922 * i386-linux-nat.c (fetch_register): Likewise.
1923 (store_register): Likewise.
1924 (supply_gregset): Likewise.
1925 (fill_gregset): Likewise.
1926 (i386_linux_fetch_inferior_registers): Likewise.
1927 (i386_linux_store_inferior_registers): Likewise.
1928 (i386_linux_resume): Likewise.
1929 * i386-linux-tdep.c (i386_linux_get_syscall_number_from_regcache):
1930 Likewise.
1931 * i386-nto-tdep.c (i386nto_supply_gregset): Likewise.
1932 * i386-obsd-nat.c (i386obsd_supply_pcb): Likewise.
1933 * i386-obsd-tdep.c (i386obsd_supply_uthread): Likewise.
1934 (i386obsd_collect_uthread): Likewise.
1935 * i386-tdep.c (i386_mmx_regnum_to_fp_regnum): Likewise.
1936 (i386_supply_gregset): Likewise.
1937 (i386_collect_gregset): Likewise.
1938 (i386_supply_fpregset): Likewise.
1939 (i386_collect_fpregset): Likewise.
1940 (i386_mpx_bd_base): Likewise.
1941 * i386-v4-nat.c (supply_fpregset): Likewise.
1942 (fill_fpregset): Likewise.
1943 * i387-tdep.c (i387_supply_fsave): Likewise.
1944 (i387_collect_fsave): Likewise.
1945 (i387_supply_fxsave): Likewise.
1946 (i387_collect_fxsave): Likewise.
1947 (i387_supply_xsave): Likewise.
1948 (i387_collect_xsave): Likewise.
1949 * ia64-linux-nat.c (ia64_linux_fetch_registers): Likewise.
1950 (ia64_linux_store_registers): Likewise.
1951 * ia64-tdep.c (ia64_access_rse_reg): Likewise.
1952 (ia64_extract_return_value): Likewise.
1953 (ia64_store_return_value): Likewise.
1954 (find_func_descr): Likewise.
1955 * inf-child.c (inf_child_fetch_inferior_registers): Likewise.
1956 * inf-ptrace.c (inf_ptrace_fetch_registers): Likewise.
1957 (inf_ptrace_store_registers): Likewise.
1958 * infrun.c (use_displaced_stepping): Likewise.
1959 (displaced_step_prepare_throw): Likewise.
1960 (resume): Likewise.
1961 (proceed): Likewise.
1962 (do_target_wait): Likewise.
1963 (adjust_pc_after_break): Likewise.
1964 (handle_inferior_event_1): Likewise.
1965 (handle_signal_stop): Likewise.
1966 (save_infcall_suspend_state): Likewise.
1967 (restore_infcall_suspend_state): Likewise.
1968 * iq2000-tdep.c (iq2000_extract_return_value): Likewise.
1969 * jit.c (jit_frame_prev_register): Likewise.
1970 * linux-nat.c (save_stop_reason): Likewise.
1971 (linux_nat_wait_1): Likewise.
1972 (resume_stopped_resumed_lwps): Likewise.
1973 * linux-record.c (record_linux_sockaddr): Likewise.
1974 (record_linux_msghdr): Likewise.
1975 (record_linux_system_call): Likewise.
1976 * linux-tdep.c (linux_collect_thread_registers): Likewise.
1977 * lm32-tdep.c (lm32_extract_return_value): Likewise.
1978 (lm32_store_return_value): Likewise.
1979 * m32c-tdep.c (m32c_read_flg): Likewise.
1980 (m32c_pseudo_register_read): Likewise.
1981 (m32c_pseudo_register_write): Likewise.
1982 * m32r-linux-tdep.c (m32r_linux_supply_gregset): Likewise.
1983 (m32r_linux_collect_gregset): Likewise.
1984 * m32r-tdep.c (m32r_store_return_value): Likewise.
1985 (m32r_extract_return_value): Likewise.
1986 * m68k-bsd-nat.c (m68kbsd_supply_fpregset): Likewise.
1987 (m68kbsd_collect_fpregset): Likewise.
1988 * m68k-bsd-tdep.c (m68kbsd_supply_fpregset): Likewise.
1989 * m68k-linux-nat.c (fetch_register): Likewise.
1990 (old_fetch_inferior_registers): Likewise.
1991 (old_store_inferior_registers): Likewise.
1992 (store_regs): Likewise.
1993 * m68k-tdep.c (m68k_svr4_extract_return_value): Likewise.
1994 (m68k_svr4_store_return_value): Likewise.
1995 * m88k-tdep.c (m88k_store_arguments): Likewise.
1996 * mi/mi-main.c (mi_cmd_data_list_changed_registers): Likewise.
1997 (mi_cmd_data_write_register_values): Likewise.
1998 * mips-fbsd-nat.c (mips_fbsd_fetch_inferior_registers): Likewise.
1999 (mips_fbsd_store_inferior_registers): Likewise.
2000 * mips-fbsd-tdep.c (mips_fbsd_supply_fpregs): Likewise.
2001 (mips_fbsd_supply_gregs): Likewise.
2002 (mips_fbsd_collect_fpregs): Likewise.
2003 (mips_fbsd_collect_gregs): Likewise.
2004 (mips_fbsd_supply_fpregset): Likewise.
2005 (mips_fbsd_collect_fpregset): Likewise.
2006 (mips_fbsd_supply_gregset): Likewise.
2007 (mips_fbsd_collect_gregset): Likewise.
2008 * mips-linux-nat.c (supply_gregset): Likewise.
2009 (fill_gregset): Likewise.
2010 (supply_fpregset): Likewise.
2011 (fill_fpregset): Likewise.
2012 * mips-linux-tdep.c (mips_supply_gregset): Likewise.
2013 (mips_fill_gregset): Likewise.
2014 (mips_supply_fpregset): Likewise.
2015 (mips_fill_fpregset): Likewise.
2016 (mips64_supply_gregset): Likewise.
2017 (micromips_linux_sigframe_validate): Likewise.
2018 * mips-nbsd-nat.c (mipsnbsd_fetch_inferior_registers): Likewise.
2019 (mipsnbsd_fetch_inferior_registers): Likewise.
2020 (mipsnbsd_store_inferior_registers): Likewise.
2021 * mips-nbsd-tdep.c (mipsnbsd_supply_fpregset): Likewise.
2022 (mipsnbsd_supply_gregset): Likewise.
2023 (mipsnbsd_iterate_over_regset_sections): Likewise.
2024 (mipsnbsd_supply_reg): Likewise.
2025 (mipsnbsd_supply_fpreg): Likewise.
2026 * mips-tdep.c (mips_in_frame_stub): Likewise.
2027 (mips_dummy_id): Likewise.
2028 (is_octeon_bbit_op): Likewise.
2029 (micromips_bc1_pc): Likewise.
2030 (extended_mips16_next_pc): Likewise.
2031 (mips16_next_pc): Likewise.
2032 (deal_with_atomic_sequence): Likewise.
2033 * moxie-tdep.c (moxie_process_readu): Likewise.
2034 * nios2-tdep.c (nios2_get_next_pc): Likewise.
2035 * nto-procfs.c (procfs_store_registers): Likewise.
2036 * ppc-fbsd-nat.c (ppcfbsd_fetch_inferior_registers): Likewise.
2037 (ppcfbsd_store_inferior_registers): Likewise.
2038 * ppc-linux-nat.c (fetch_vsx_register): Likewise.
2039 (fetch_altivec_register): Likewise.
2040 (get_spe_registers): Likewise.
2041 (fetch_spe_register): Likewise.
2042 (fetch_altivec_registers): Likewise.
2043 (fetch_all_gp_regs): Likewise.
2044 (fetch_all_fp_regs): Likewise.
2045 (store_vsx_register): Likewise.
2046 (store_altivec_register): Likewise.
2047 (set_spe_registers): Likewise.
2048 (store_spe_register): Likewise.
2049 (store_altivec_registers): Likewise.
2050 (store_all_gp_regs): Likewise.
2051 (store_all_fp_regs): Likewise.
2052 * ppc-linux-tdep.c (ppc_linux_supply_gregset): Likewise.
2053 (ppc_linux_collect_gregset): Likewise.
2054 (ppc_canonicalize_syscall): Likewise.
2055 (ppc_linux_record_signal): Likewise.
2056 (ppu2spu_prev_register): Likewise.
2057 * ppc-nbsd-nat.c (ppcnbsd_supply_pcb): Likewise.
2058 * ppc-obsd-nat.c (ppcobsd_fetch_registers): Likewise.
2059 (ppcobsd_store_registers): Likewise.
2060 * ppc-ravenscar-thread.c (ppc_ravenscar_generic_fetch_registers):
2061 Likewise.
2062 (ppc_ravenscar_generic_store_registers): Likewise.
2063 * procfs.c (procfs_fetch_registers): Likewise.
2064 (procfs_store_registers): Likewise.
2065 * ravenscar-thread.c (ravenscar_fetch_registers): Likewise.
2066 (ravenscar_store_registers): Likewise.
2067 (ravenscar_prepare_to_store): Likewise.
2068 * record-btrace.c (record_btrace_fetch_registers): Likewise.
2069 * record-full.c (record_full_wait_1): Likewise.
2070 (record_full_registers_change): Likewise.
2071 (record_full_store_registers): Likewise.
2072 (record_full_core_fetch_registers): Likewise.
2073 (record_full_save): Likewise.
2074 (record_full_goto_insn): Likewise.
2075 * regcache.c (regcache_register_size): Likewise.
2076 (get_regcache_arch): Remove.
2077 (regcache_read_pc): Likewise.
2078 * regcache.h (get_regcache_arch): Remove.
2079 * remote-sim.c (gdbsim_fetch_register): Likewise.
2080 (gdbsim_store_register): Likewise.
2081 * remote.c (fetch_register_using_p): Likewise.
2082 (send_g_packet): Likewise.
2083 (remote_prepare_to_store): Likewise.
2084 (store_registers_using_G): Likewise.
2085 * reverse.c (save_bookmark_command): Likewise.
2086 (goto_bookmark_command): Likewise.
2087 * rs6000-aix-tdep.c (branch_dest): Likewise.
2088 * rs6000-nat.c (rs6000_ptrace64): Likewise.
2089 (fetch_register): Likewise.
2090 * rs6000-tdep.c (ppc_supply_reg): Likewise.
2091 (ppc_collect_reg): Likewise.
2092 (ppc_collect_gregset): Likewise.
2093 (ppc_collect_fpregset): Likewise.
2094 (ppc_collect_vsxregset): Likewise.
2095 (ppc_collect_vrregset): Likewise.
2096 (ppc_displaced_step_hw_singlestep): Likewise.
2097 (rs6000_pseudo_register_read): Likewise.
2098 (rs6000_pseudo_register_write): Likewise.
2099 * s390-linux-nat.c (supply_gregset): Likewise.
2100 (fill_gregset): Likewise.
2101 (s390_linux_fetch_inferior_registers): Likewise.
2102 * s390-linux-tdep.c (s390_write_pc): Likewise.
2103 (s390_software_single_step): Likewise.
2104 (s390_all_but_pc_registers_record): Likewise.
2105 (s390_linux_syscall_record): Likewise.
2106 * sentinel-frame.c (sentinel_frame_prev_arch): Likewise.
2107 * sh-nbsd-nat.c (shnbsd_fetch_inferior_registers): Likewise.
2108 (shnbsd_store_inferior_registers): Likewise.
2109 * sh-tdep.c (sh_extract_return_value_nofpu): Likewise.
2110 (sh_extract_return_value_fpu): Likewise.
2111 (sh_store_return_value_nofpu): Likewise.
2112 (sh_corefile_supply_regset): Likewise.
2113 (sh_corefile_collect_regset): Likewise.
2114 * sh64-tdep.c (sh64_extract_return_value): Likewise.
2115 (sh64_store_return_value): Likewise.
2116 * sparc-linux-tdep.c (sparc32_linux_collect_core_fpregset): Likewise.
2117 * sparc-nat.c (sparc_fetch_inferior_registers): Likewise.
2118 (sparc_store_inferior_registers): Likewise.
2119 * sparc-ravenscar-thread.c (register_in_thread_descriptor_p): Likewise.
2120 (sparc_ravenscar_prepare_to_store): Likewise.
2121 * sparc-tdep.c (sparc32_store_arguments): Likewise.
2122 (sparc_analyze_control_transfer): Likewise.
2123 (sparc_step_trap): Likewise.
2124 (sparc_software_single_step): Likewise.
2125 (sparc32_gdbarch_init): Likewise.
2126 (sparc_supply_rwindow): Likewise.
2127 (sparc_collect_rwindow): Likewise.
2128 * sparc64-linux-tdep.c (sparc64_linux_collect_core_fpregset): Likewise.
2129 * sparc64-nbsd-nat.c (sparc64nbsd_supply_gregset): Likewise.
2130 (sparc64nbsd_collect_gregset): Likewise.
2131 (sparc64nbsd_supply_fpregset): Likewise.
2132 (sparc64nbsd_collect_fpregset): Likewise.
2133 * sparc64-tdep.c (sparc64_store_arguments): Likewise.
2134 (sparc64_supply_gregset): Likewise.
2135 (sparc64_collect_gregset): Likewise.
2136 (sparc64_supply_fpregset): Likewise.
2137 (sparc64_collect_fpregset): Likewise.
2138 * spu-linux-nat.c (spu_fetch_inferior_registers): Likewise.
2139 * spu-tdep.c (spu_unwind_sp): Likewise.
2140 (spu2ppu_prev_register): Likewise.
2141 (spu_memory_remove_breakpoint): Likewise.
2142 * stack.c (return_command): Likewise.
2143 * tic6x-tdep.c (tic6x_extract_signed_field): Likewise.
2144 * tracefile-tfile.c (tfile_fetch_registers): Likewise.
2145 * tracefile.c (trace_save_ctf): Likewise.
2146 * windows-nat.c (do_windows_fetch_inferior_registers): Likewise.
2147 (do_windows_store_inferior_registers): Likewise.
2148 (windows_resume): Likewise.
2149 * xtensa-linux-nat.c (fill_gregset): Likewise.
2150 (supply_gregset_reg): Likewise.
2151 * xtensa-tdep.c (xtensa_register_write_masked): Likewise.
2152 (xtensa_register_read_masked): Likewise.
2153 (xtensa_supply_gregset): Likewise.
2154 (xtensa_extract_return_value): Likewise.
2155 (xtensa_store_return_value): Likewise.
2156
2157 2017-10-25 Ulrich Weigand <uweigand@de.ibm.com>
2158
2159 * doublest.c (floatformat_from_string): New function.
2160 * doublest.h (floatformat_from_string): Add prototype.
2161
2162 * std-operator.def (OP_DOUBLE, OP_DECFLOAT): Remove, replace by ...
2163 (OP_FLOAT): ... this.
2164 * expression.h: Do not include "doublest.h".
2165 (union exp_element): Replace doubleconst and decfloatconst by
2166 new element floatconst.
2167 * ada-lang.c (resolve_subexp): Handle OP_FLOAT instead of OP_DOUBLE.
2168 (ada_evaluate_subexp): Likewise.
2169 * eval.c (evaluate_subexp_standard): Handle OP_FLOAT instead of
2170 OP_DOUBLE and OP_DECFLOAT.
2171 * expprint.c (print_subexp_standard): Likewise.
2172 (dump_subexp_body_standard): Likewise.
2173 * breakpoint.c (watchpoint_exp_is_const): Likewise.
2174
2175 * parse.c: Include "dfp.h".
2176 (write_exp_elt_dblcst, write_exp_elt_decfloatcst): Remove.
2177 (write_exp_elt_floatcst): New function.
2178 (operator_length_standard): Handle OP_FLOAT instead of OP_DOUBLE
2179 and OP_DECFLOAT.
2180 (operator_check_standard): Likewise.
2181 (parse_float): Do not accept suffix. Take type as input. Return bool.
2182 Return target format buffer instead of host DOUBLEST.
2183 Use floatformat_from_string and decimal_from_string to parse
2184 either binary or decimal floating-point types.
2185 (parse_c_float): Remove.
2186 * parser-defs.h: Do not include "doublest.h".
2187 (write_exp_elt_dblcst, write_exp_elt_decfloatcst): Remove.
2188 (write_exp_elt_floatcst): Add prototype.
2189 (parse_float): Update prototype.
2190 (parse_c_float): Remove.
2191
2192 * c-exp.y: Do not include "dfp.h".
2193 (typed_val_float): Use byte buffer instead of DOUBLEST.
2194 (typed_val_decfloat): Remove.
2195 (DECFLOAT): Remove.
2196 (FLOAT): Use OP_FLOAT and write_exp_elt_floatcst.
2197 (parse_number): Update to new parse_float interface.
2198 Parse suffixes and determine type before calling parse_float.
2199 Handle decimal and binary FP types the same way.
2200
2201 * d-exp.y (typed_val_float): Use byte buffer instead of DOUBLEST.
2202 (FLOAT_LITERAL): Use OP_FLOAT and write_exp_elt_floatcst.
2203 (parse_number): Update to new parse_float interface.
2204 Parse suffixes and determine type before calling parse_float.
2205
2206 * f-exp.y: Replace dval by typed_val_float.
2207 (FLOAT): Use OP_FLOAT and write_exp_elt_floatcst.
2208 (parse_number): Use parse_float instead of atof.
2209
2210 * go-exp.y (typed_val_float): Use byte buffer instead of DOUBLEST.
2211 (parse_go_float): Remove.
2212 (FLOAT): Use OP_FLOAT and write_exp_elt_floatcst.
2213 (parse_number): Call parse_float instead of parse_go_float.
2214 Parse suffixes and determine type before calling parse_float.
2215
2216 * p-exp.y (typed_val_float): Use byte buffer instead of DOUBLEST.
2217 (FLOAT): Use OP_FLOAT and write_exp_elt_floatcst.
2218 (parse_number): Update to new parse_float interface.
2219 Parse suffixes and determine type before calling parse_float.
2220
2221 * m2-exp.y: Replace dval by byte buffer val.
2222 (FLOAT): Use OP_FLOAT and write_exp_elt_floatcst.
2223 (parse_number): Call parse_float instead of atof.
2224
2225 * rust-exp.y (typed_val_float): Use byte buffer instead of DOUBLEST.
2226 (lex_number): Call parse_float instead of strtod.
2227 (ast_dliteral): Use OP_FLOAT instead of OP_DOUBLE.
2228 (convert_ast_to_expression): Handle OP_FLOAT instead of OP_DOUBLE.
2229 Use write_exp_elt_floatcst.
2230 (unit_testing): Remove static variable.
2231 (rust_type): Do not check unit_testing.
2232 (rust_lex_tests): Do not set uint_testing. Set up dummy rust_parser.
2233
2234 * ada-exp.y (type_float, type_double): Remove.
2235 (typed_val_float): Use byte buffer instead of DOUBLEST.
2236 (FLOAT): Use OP_FLOAT and write_exp_elt_floatcst.
2237 * ada-lex.l (processReal): Use parse_float instead of sscanf.
2238
2239 2017-10-25 Alan Hayward <alan.hayward@arm.com>
2240
2241 * aarch64-tdep.h (enum aarch64_regnum): Remove.
2242 * arch/aarch64.h: New file.
2243
2244 2017-10-24 Ulrich Weigand <uweigand@de.ibm.com>
2245
2246 * dfp.h (decimal_from_string): Use const reference for argument.
2247 * dfp.c (decimal_from_string): Likewise.
2248
2249 2017-10-24 Ulrich Weigand <uweigand@de.ibm.com>
2250
2251 * i387-tdep.c (print_i387_value): Use floatformat_to_string.
2252 * sh64-tdep.c (sh64_do_fp_register): Likewise.
2253 * mips-tdep.c (mips_print_fp_register): Likewise.
2254
2255 2017-10-24 Ulrich Weigand <uweigand@de.ibm.com>
2256
2257 * common/format.h (enum argclass): Replace decfloat_arg by
2258 dec32float_arg, dec64float_arg, and dec128float_arg.
2259 * common/format.c (parse_format_string): Update to return
2260 new decimal float argument classes.
2261
2262 * printcmd.c (printf_decfloat): Rename to ...
2263 (printf_floating): ... this. Add argclass argument, and use it
2264 instead of parsing the format string again. Add support for
2265 binary floating-point values, using floatformat_to_string.
2266 Convert value to the target format if it doesn't already match.
2267 (ui_printf): Call printf_floating instead of printf_decfloat,
2268 also for double_arg / long_double_arg. Pass argclass.
2269
2270 * dfp.c (decimal_to_string): Add format string argument.
2271 * dfp.h (decimal_to_string): Likewise.
2272
2273 * doublest.c (floatformat_to_string): Add format string argument.
2274 * doublest.h (floatformat_to_string): Likewise.
2275
2276 2017-10-24 Ulrich Weigand <uweigand@de.ibm.com>
2277
2278 * doublest.c (floatformat_precision): New routine.
2279 (floatformat_to_string): Likewise.
2280 * doublest.c (floatformat_to_string): Add prototype.
2281
2282 * printcmd.c (print_scalar_formatted): Only call print_floating
2283 on floating-point types.
2284 * valprint.c: Do not include "floatformat.h".
2285 (generic_val_print_decfloat): Remove.
2286 (generic_val_print): Call generic_val_print_float for both
2287 TYPE_CODE_FLT and TYPE_CODE_DECFLOAT.
2288 (print_floating): Use floatformat_to_string. Handle decimal float.
2289 (print_decimal_floating): Remove, merge into floatformat_to_string.
2290 * value.h (print_decimal_floating): Remove.
2291
2292 * Makefile.in: Do not build doublest.c with -Wformat-nonliteral.
2293
2294 2017-10-24 Ulrich Weigand <uweigand@de.ibm.com>
2295
2296 * buildsym.c (end_symtab_get_static_block): Use std::stable_sort.
2297
2298 2017-10-21 Simon Marchi <simon.marchi@ericsson.com>
2299
2300 * memattr.h: Don't include vec.h.
2301 (struct mem_attrib): Initialize fields.
2302 <unknown>: New static method.
2303 (struct mem_region): Add constructors, operator<, initialize
2304 fields.
2305 * memattr.c: Include algorithm.
2306 (default_mem_attrib, unknown_mem_attrib): Remove.
2307 (user_mem_region_list): New global.
2308 (target_mem_region_list, mem_region_list): Change type to
2309 std::vector<mem_region>.
2310 (mem_use_target): Now a function.
2311 (target_mem_regions_valid): Change type to bool.
2312 (mem_region_lessthan, mem_region_cmp, mem_region_init): Remove.
2313 (require_user_regions): Adjust.
2314 (require_target_regions): Adjust.
2315 (create_mem_region): Adjust.
2316 (lookup_mem_region): Adjust.
2317 (invalidate_target_mem_regions): Adjust.
2318 (mem_clear): Rename to...
2319 (user_mem_clear): ... this, and adjust.
2320 (mem_command): Adjust.
2321 (info_mem_command): Adjust.
2322 (mem_enable, enable_mem_command, mem_disable,
2323 disable_mem_command): Adjust.
2324 (mem_delete): Adjust.
2325 (delete_mem_command): Adjust.
2326 * memory-map.h (parse_memory_map): Return an std::vector.
2327 * memory-map.c (parse_memory_map): Likewise.
2328 (struct memory_map_parsing_data): Add constructor.
2329 <memory_map>: Point to std::vector.
2330 (memory_map_start_memory): Adjust.
2331 (memory_map_end_memory): Adjust.
2332 (memory_map_end_property): Adjust.
2333 (clear_result): Remove.
2334 * remote.c (remote_memory_map): Return an std::vector.
2335 * target-debug.h (target_debug_print_VEC_mem_region_s__p):
2336 Remove.
2337 (target_debug_print_mem_region_vector): New.
2338 * target-delegates.c: Regenerate.
2339 * target.h (mem_region_vector): New typedef.
2340 (to_memory_map): Return mem_region_vector.
2341 (target_memory_map): Return an std::vector.
2342 * target.c (target_memory_map): Return an std::vector.
2343 (flash_erase_command): Adjust.
2344
2345 2017-10-21 Simon Marchi <simon.marchi@ericsson.com>
2346
2347 * memory-map.c (struct memory_map_parsing_data) <property_name>:
2348 Change type to std::string.
2349 (memory_map_start_property): Adjust.
2350 (memory_map_end_property): Adjust.
2351
2352 2017-10-21 Simon Marchi <simon.marchi@polymtl.ca>
2353
2354 * infrun.h: Include common/byte-vector.h.
2355 (struct displaced_step_closure): New struct.
2356 (struct buf_displaced_step_closure): New struct.
2357 * infrun.c (displaced_step_closure::~displaced_step_closure):
2358 Provide default implementation.
2359 (displaced_step_clear): Deallocate step closure with delete.
2360 * aarch64-tdep.c (displaced_step_closure): Rename to ...
2361 (aarch64_displaced_step_closure): ... this, extend
2362 displaced_step_closure.
2363 (aarch64_displaced_step_data) <dsc>: Change type to
2364 aarch64_displaced_step_closure.
2365 (aarch64_displaced_step_copy_insn): Adjust to type change, use
2366 unique_ptr.
2367 (aarch64_displaced_step_fixup): Add cast for displaced step
2368 closure.
2369 * amd64-tdep.c (displaced_step_closure): Rename to ...
2370 (amd64_displaced_step_closure): ... this, extend
2371 displaced_step_closure.
2372 <insn_buf>: Change type to std::vector<gdb_byte>.
2373 <max_len>: Remove.
2374 (fixup_riprel): Change type of DSC parameter, adjust to type
2375 change of insn_buf.
2376 (fixup_displaced_copy): Change type of DSC parameter.
2377 (amd64_displaced_step_copy_insn): Instantiate
2378 amd64_displaced_step_closure.
2379 (amd64_displaced_step_fixup): Add cast for closure type, adjust
2380 to type change of insn_buf.
2381 * arm-linux-tdep.c (arm_linux_cleanup_svc): Change type of
2382 parameter DSC.
2383 (arm_linux_copy_svc): Likewise.
2384 (cleanup_kernel_helper_return): Likewise.
2385 (arm_catch_kernel_helper_return): Likewise.
2386 (arm_linux_displaced_step_copy_insn): Instantiate
2387 arm_displaced_step_closure.
2388 * arm-tdep.c (arm_pc_is_thumb): Add cast for closure.
2389 (displaced_read_reg): Change type of parameter DSC.
2390 (branch_write_pc): Likewise.
2391 (load_write_pc): Likewise.
2392 (alu_write_pc): Likewise.
2393 (displaced_write_reg): Likewise.
2394 (arm_copy_unmodified): Likewise.
2395 (thumb_copy_unmodified_32bit): Likewise.
2396 (thumb_copy_unmodified_16bit): Likewise.
2397 (cleanup_preload): Likewise.
2398 (install_preload): Likewise.
2399 (arm_copy_preload): Likewise.
2400 (thumb2_copy_preload): Likewise.
2401 (install_preload_reg): Likewise.
2402 (arm_copy_preload_reg): Likewise.
2403 (cleanup_copro_load_store): Likewise.
2404 (install_copro_load_store): Likewise.
2405 (arm_copy_copro_load_store) Likewise.
2406 (thumb2_copy_copro_load_store): Likewise.
2407 (cleanup_branch): Likewise.
2408 (install_b_bl_blx): Likewise.
2409 (arm_copy_b_bl_blx): Likewise.
2410 (thumb2_copy_b_bl_blx): Likewise.
2411 (thumb_copy_b): Likewise.
2412 (install_bx_blx_reg): Likewise.
2413 (arm_copy_bx_blx_reg): Likewise.
2414 (thumb_copy_bx_blx_reg): Likewise.
2415 (cleanup_alu_imm): Likewise.
2416 (arm_copy_alu_imm): Likewise.
2417 (thumb2_copy_alu_imm): Likewise.
2418 (cleanup_alu_reg): Likewise.
2419 (install_alu_reg): Likewise.
2420 (arm_copy_alu_reg): Likewise.
2421 (thumb_copy_alu_reg): Likewise.
2422 (cleanup_alu_shifted_reg): Likewise.
2423 (install_alu_shifted_reg): Likewise.
2424 (arm_copy_alu_shifted_reg): Likewise.
2425 (cleanup_load): Likewise.
2426 (cleanup_store): Likewise.
2427 (arm_copy_extra_ld_st): Likewise.
2428 (install_load_store): Likewise.
2429 (thumb2_copy_load_literal): Likewise.
2430 (thumb2_copy_load_reg_imm): Likewise.
2431 (arm_copy_ldr_str_ldrb_strb): Likewise.
2432 (cleanup_block_load_all): Likewise.
2433 (cleanup_block_store_pc): Likewise.
2434 (cleanup_block_load_pc): Likewise.
2435 (arm_copy_block_xfer): Likewise.
2436 (thumb2_copy_block_xfer): Likewise.
2437 (cleanup_svc): Likewise.
2438 (install_svc): Likewise.
2439 (arm_copy_svc): Likewise.
2440 (thumb_copy_svc): Likewise.
2441 (arm_copy_undef): Likewise.
2442 (thumb_32bit_copy_undef): Likewise.
2443 (arm_copy_unpred): Likewise.
2444 (arm_decode_misc_memhint_neon): Likewise.
2445 (arm_decode_unconditional): Likewise.
2446 (arm_decode_miscellaneous): Likewise.
2447 (arm_decode_dp_misc): Likewise.
2448 (arm_decode_ld_st_word_ubyte): Likewise.
2449 (arm_decode_media): Likewise.
2450 (arm_decode_b_bl_ldmstm): Likewise.
2451 (arm_decode_ext_reg_ld_st): Likewise.
2452 (thumb2_decode_dp_shift_reg): Likewise.
2453 (thumb2_decode_ext_reg_ld_st): Likewise.
2454 (arm_decode_svc_copro): Likewise.
2455 (thumb2_decode_svc_copro): Likewise.
2456 (install_pc_relative): Likewise.
2457 (thumb_copy_pc_relative_16bit): Likewise.
2458 (thumb_decode_pc_relative_16bit): Likewise.
2459 (thumb_copy_pc_relative_32bit): Likewise.
2460 (thumb_copy_16bit_ldr_literal): Likewise.
2461 (thumb_copy_cbnz_cbz): Likewise.
2462 (thumb2_copy_table_branch): Likewise.
2463 (cleanup_pop_pc_16bit_all): Likewise.
2464 (thumb_copy_pop_pc_16bit): Likewise.
2465 (thumb_process_displaced_16bit_insn): Likewise.
2466 (decode_thumb_32bit_ld_mem_hints): Likewise.
2467 (thumb_process_displaced_32bit_insn): Likewise.
2468 (thumb_process_displaced_insn): Likewise.
2469 (arm_process_displaced_insn): Likewise.
2470 (arm_displaced_init_closure): Likewise.
2471 (arm_displaced_step_fixup): Add cast for closure.
2472 * arm-tdep.h: Include infrun.h.
2473 (displaced_step_closure): Rename to ...
2474 (arm_displaced_step_closure): ... this, extend
2475 displaced_step_closure.
2476 <u::svc::copy_svc_os>: Change type of parameter DSC.
2477 <cleanup>: Likewise.
2478 (arm_process_displaced_insn): Likewise.
2479 (arm_displaced_init_closure): Likewise.
2480 (displaced_read_reg): Likewise.
2481 (displaced_write_reg): Likewise.
2482 * i386-linux-tdep.c (i386_linux_displaced_step_copy_insn):
2483 Adjust.
2484 * i386-tdep.h: Include infrun.h.
2485 (i386_displaced_step_closure): New typedef.
2486 * i386-tdep.c (i386_displaced_step_copy_insn): Use
2487 i386_displaced_step_closure.
2488 (i386_displaced_step_fixup): Adjust.
2489 * rs6000-tdep.c (ppc_displaced_step_closure): New typedef.
2490 (ppc_displaced_step_copy_insn): Use ppc_displaced_step_closure
2491 and unique_ptr.
2492 (ppc_displaced_step_fixup): Adjust.
2493 * s390-linux-tdep.c (s390_displaced_step_closure): New typedef.
2494 (s390_displaced_step_copy_insn): Use s390_displaced_step_closure
2495 and unique_ptr.
2496 (s390_displaced_step_fixup): Adjust.
2497
2498 2017-10-21 Simon Marchi <simon.marchi@polymtl.ca>
2499
2500 * interps.h (interp_resume, interp_suspend, interp_set_temp):
2501 Remove declarations.
2502
2503 2017-10-20 Tom Tromey <tom@tromey.com>
2504
2505 * gdb_bfd.c (struct gdb_bfd_data) <included_bfds>: Now a
2506 std::vector.
2507 (gdb_bfd_record_inclusion): Update.
2508 (bfdp): Remove typedef.
2509
2510 2017-10-20 Tom Tromey <tom@tromey.com>
2511
2512 * gdb_bfd.c (gdb_bfd_ref): Use new.
2513 (struct gdb_bfd_data): Add constructor, destructor, and member
2514 initializers.
2515 (gdb_bfd_unref): Use delete.
2516
2517 2017-10-20 Tom Tromey <tom@tromey.com>
2518
2519 * exec.c (exec_file_attach): Use new_bfd_ref.
2520 * symfile-mem.c (symbol_file_add_from_memory): Use new_bfd_ref.
2521 * gdb_bfd.c (gdb_bfd_open, gdb_bfd_fopen, gdb_bfd_openr)
2522 (gdb_bfd_openw, gdb_bfd_openr_iovec, gdb_bfd_fdopenr): Use
2523 new_bfd_ref.
2524 * gdb_bfd.h (new_bfd_ref): New function.
2525
2526 2017-10-20 Pedro Alves <palves@redhat.com>
2527
2528 * main.c (captured_command_loop): Add attribute noinline.
2529
2530 2017-10-19 Simon Marchi <simon.marchi@ericsson.com>
2531
2532 * interps.c (struct interp_factory): Add constructor.
2533 (interp_factory_p): Remove typedef.
2534 (DEF_VEC_P(interp_factory_p)): Remove.
2535 (interpreter_factories): Change type to std::vector.
2536 (interp_factory_register): Adjust.
2537 (interp_lookup): Adjust.
2538 (interpreter_completer): Adjust.
2539
2540 2017-10-19 Tom Tromey <tom@tromey.com>
2541
2542 * break-catch-syscall.c (catch_syscall_completer): Use
2543 std::string, gdb::unique_xmalloc_ptr.
2544
2545 2017-10-19 Tom Tromey <tom@tromey.com>
2546
2547 * infcall.c (call_function_by_hand_dummy): Use std::string.
2548
2549 2017-10-19 Tom Tromey <tom@tromey.com>
2550
2551 * mi/mi-main.c (mi_cmd_execute): Update.
2552 * top.h (prepare_execute_command): Return scoped_value_mark.
2553 * value.h (class scoped_value_mark): Use DISABLE_COPY_AND_ASSIGN.
2554 Add move constructor.
2555 * top.c (prepare_execute_command): Return scoped_value_mark.
2556 (execute_command): Update.
2557
2558 2017-10-19 Pedro Alves <palves@redhat.com>
2559
2560 * xml-support.c (xml_fetch_content_from_file): Check fread's
2561 return.
2562
2563 2017-10-19 Pedro Alves <palves@redhat.com>
2564
2565 * ser-base.c (ser_base_read_error_fd): Delete the file handler if
2566 async.
2567 (handle_error_fd): New function.
2568 (ser_base_async): Add/delete an event loop file handler for
2569 error_fd.
2570
2571 2017-10-19 Pedro Alves <palves@redhat.com>
2572
2573 * xml-support.c (xml_fetch_content_from_file): Don't read in
2574 chunks. Instead use fseek to determine the file's size, and read
2575 it in one go.
2576
2577 2017-11-18 Keith Seitz <keiths@redhat.com>
2578
2579 * c-exp.y (oper): Canonicalize conversion operators of user-defined
2580 types.
2581 Add whitespace to front of type name.
2582
2583 2017-10-18 Keith Seitz <keiths@redhat.com>
2584
2585 * dwarf2read.c (dwarf2_add_typedef): Issue a complaint on unhandled
2586 DW_AT_accessibility.
2587
2588 2017-10-18 Yao Qi <yao.qi@linaro.org>
2589
2590 * features/tic6x-c62x-linux.c: Remove.
2591
2592 2017-10-17 Tom Tromey <tom@tromey.com>
2593
2594 * disasm.c (do_mixed_source_and_assembly_deprecated): Use
2595 gdb::optional, ui_out_emit_list, ui_out_emit_tuple.
2596 (do_mixed_source_and_assembly): Likewise.
2597
2598 2017-10-17 Tom Tromey <tom@tromey.com>
2599
2600 * regcache.c (regcache::xfer_part): Remove assertion.
2601
2602 2017-10-17 Pedro Alves <palves@redhat.com>
2603
2604 * xml-support.c (xml_fetch_content_from_file): Call
2605 unique_ptr::release() instead unique_ptr::get() when passing
2606 through xrealloc.
2607
2608 2017-10-17 Yao Qi <yao.qi@linaro.org>
2609
2610 * regcache.c (regcache::xfer_part): Remove parameters read and
2611 write, add parameter is_raw. All callers are updated.
2612
2613 2017-10-16 Keith Seitz <keiths@redhat.com>
2614
2615 * c-typeprint.c (enum access_specifier): Moved here from
2616 c_type_print_base.
2617 (output_access_specifier): New function.
2618 (c_type_print_base): Consider typedefs when assessing
2619 whether access labels are needed.
2620 Use output_access_specifier as needed.
2621 Output access specifier for typedefs, if needed.
2622 * dwarf2read.c (dwarf2_add_typedef): Record DW_AT_accessibility.
2623 * gdbtypes.h (struct typedef_field) <is_protected, is_private>: New
2624 fields.
2625 (TYPE_TYPEDEF_FIELD_PROTECTED, TYPE_TYPEDEF_FIELD_PRIVATE): New
2626 accessor macros.
2627
2628 2017-10-16 Tom Tromey <tom@tromey.com>
2629
2630 * linux-tdep.c (linux_info_proc, linux_find_memory_regions_full)
2631 (linux_fill_prpsinfo, linux_vsyscall_range_raw): Update.
2632 * target.c (target_fileio_read_stralloc): Update.
2633 * sparc64-tdep.c (adi_is_addr_mapped): Update.
2634 * target.h (target_fileio_read_stralloc): Return
2635 unique_xmalloc_ptr.
2636
2637 2017-10-16 Tom Tromey <tom@tromey.com>
2638
2639 * xml-syscall.c (xml_init_syscalls_info): Update.
2640 * xml-support.c (xinclude_start_include): Update.
2641 (xml_fetch_content_from_file): Return unique_xmalloc_ptr.
2642 * xml-support.h (xml_fetch_another): Return unique_xmalloc_ptr.
2643 (xml_fetch_content_from_file): Likewise.
2644 * osdata.c (get_osdata): Update.
2645 * target.h (target_read_stralloc, target_get_osdata): Return
2646 unique_xmalloc_ptr.
2647 * solib-aix.c (solib_aix_get_library_list): Update.
2648 * solib-target.c (solib_target_current_sos): Update.
2649 * solib-svr4.c (svr4_current_sos_via_xfer_libraries): Update.
2650 * xml-tdesc.c (fetch_available_features_from_target): Update.
2651 (target_fetch_description_xml): Update.
2652 (file_read_description_xml): Update.
2653 * remote.c (remote_get_threads_with_qxfer, remote_memory_map)
2654 (remote_traceframe_info, btrace_read_config, remote_read_btrace)
2655 (remote_pid_to_exec_file): Update.
2656 * target.c (target_read_stralloc): Return unique_xmalloc_ptr.
2657 (target_get_osdata): Likewise.
2658
2659 2017-10-16 Tom Tromey <tom@tromey.com>
2660
2661 * remote.c (remote_register_number_and_offset): Use std::vector.
2662 (remote_set_syscall_catchpoint): Use gdb::unique_xmalloc_ptr.
2663 (putpkt_binary): Use gdb::def_vector.
2664 (compare_sections_command): Use gdb::byte_vector.
2665
2666 2017-10-16 Tom Tromey <tom@tromey.com>
2667
2668 * ppc-linux-nat.c (hwdebug_insert_point): Use
2669 gdb::unique_xmalloc_ptr, XDUP.
2670
2671 2017-10-16 Tom Tromey <tom@tromey.com>
2672
2673 * probe.c (parse_probes): Use std::string.
2674 (info_probes_for_ops, enable_probes_command)
2675 (disable_probes_command): Remove cleanups.
2676
2677 2017-10-16 Tom Tromey <tom@tromey.com>
2678
2679 * buildsym.c (block_compar): Remove.
2680 (end_symtab_get_static_block): Use std::vector.
2681
2682 2017-10-16 Simon Marchi <simon.marchi@ericsson.com>
2683
2684 * memrange.h (struct mem_range): Define operator< and operator==.
2685 (mem_range_s): Remove.
2686 (DEF_VEC_O (mem_range_s)): Remove.
2687 (normalize_mem_ranges): Change parameter type to std::vector.
2688 * memrange.c (compare_mem_ranges): Remove.
2689 (normalize_mem_ranges): Change parameter type to std::vector,
2690 adjust to vector change.
2691 * exec.c (section_table_available_memory): Return vector, remove
2692 parameter.
2693 (section_table_read_available_memory): Adjust to std::vector
2694 change.
2695 * remote.c (remote_read_bytes): Adjust to std::vector
2696 change.
2697 * tracepoint.h (traceframe_available_memory): Change parameter
2698 type to std::vector.
2699 * tracepoint.c (traceframe_available_memory): Change parameter
2700 type to std::vector, adjust.
2701 * gdb/mi/mi-main.c (mi_cmd_trace_frame_collected): Adjust to
2702 std::vector change.
2703 * gdb/Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
2704 unittests/memrange-selftests.c.
2705 (SUBDIR_UNITTESTS_OBS): Add memrange-selftests.o.
2706 * gdb/unittests/memrange-selftests.c: New file.
2707
2708 2017-10-16 Pedro Alves <palves@redhat.com>
2709
2710 * elfread.c (probe_key_free): Rename range-for variable.
2711 * probe.c (parse_probes_in_pspace, find_probes_in_objfile)
2712 (find_probe_by_pc, collect_probes): Rename range-for variable.
2713
2714 2017-10-16 Yao Qi <yao.qi@linaro.org>
2715
2716 * features/Makefile (XMLTOC): Remove tic6x-*.xml.
2717 * features/tic6x-c62x.c: Remove.
2718 * features/tic6x-c64x-linux.c: Remove.
2719 * features/tic6x-c64x.c: Remove.
2720 * features/tic6x-c64xp-linux.c: Remove.
2721 * features/tic6x-c64xp.c: Remove.
2722 * tic6x-linux-tdep.c (_initialize_tic6x_linux_tdep): Don't call
2723 initialize_tdesc_tic6x_*_linux functions.
2724 * tic6x-tdep.c (_initialize_tic6x_tdep): Don't call
2725 initialize_tdesc_tic6x_* functions.
2726
2727 2017-10-16 Yao Qi <yao.qi@linaro.org>
2728
2729 * features/Makefile (WHICH): Remove tic6x-c64xp, tic6x-c64x
2730 tic6x-c62x.
2731 * regformats/tic6x-c62x.dat: Remove.
2732 * regformats/tic6x-c64x.dat: Remove.
2733 * regformats/tic6x-c64xp.dat: Remove.
2734
2735 2017-10-15 Simon Marchi <simon.marchi@ericsson.com>
2736
2737 * tracepoint.c (parse_traceframe_info): Return a unique_ptr
2738 (the !HAVE_LIBEXPAT version).
2739
2740 2017-10-14 Simon Marchi <simon.marchi@ericsson.com>
2741
2742 * nat/linux-osdata.c (struct pid_pgid_entry) <operator<>: Make
2743 const.
2744
2745 2017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
2746
2747 * target.h: Include tracepoint.h.
2748 (enum trace_find_type): Move to tracepoint.h.
2749 (struct target_ops) <to_traceframe_info>: Return a unique ptr.
2750 * tracepoint.h: Don't include target.h
2751 (enum trace_find_type): Move from target.h.
2752 (parse_traceframe_info): Return a unique ptr.
2753 * tracepoint.c (current_traceframe_info): Change type to unique
2754 ptr.
2755 (free_traceframe_info): Remove.
2756 (clear_traceframe_info): Don't manually free
2757 current_traceframe_info.
2758 (free_result): Remove.
2759 (parse_traceframe_info): Return a unique ptr.
2760 (get_traceframe_info): Adjust to unique ptr.
2761 * ctf.c (ctf_traceframe_info): Return a unique ptr.
2762 * remote.c (remote_traceframe_info): Return a unique ptr.
2763 * tracefile-tfile.c (tfile_traceframe_info): Return a unique
2764 ptr.
2765 * target-debug.h (target_debug_print_traceframe_info_up): New
2766 macro.
2767 * target-delegates.c: Regenerate.
2768
2769 2017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
2770
2771 * memrange.h (struct mem_range): Add constructors.
2772 * tracepoint.h (struct traceframe_info) <memory>: Change type to
2773 std::vector<mem_range>.
2774 * tracepoint.c (free_traceframe_info): Don't manually free
2775 vector.
2776 (traceframe_info_start_memory): Adjust to vector change.
2777 (traceframe_available_memory): Likewise.
2778 * tracefile-tfile.c (build_traceframe_info): Likewise.
2779 * ctf.c (ctf_traceframe_info): Likewise.
2780
2781 2017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
2782
2783 * tracepoint.h (struct traceframe_info) <tvars>: Change type to
2784 std::vector<int>.
2785 * tracepoint.c (free_traceframe_info): Deallocate with delete.
2786 (traceframe_info_start_tvar): Adjust to vector change.
2787 (parse_traceframe_info): Allocate with new.
2788 * ctf.c (ctf_traceframe_info): Allocate with new, adjust to
2789 vector change.
2790 * tracefile-tfile.c (build_traceframe_info): Adjust to vector
2791 change.
2792 tfile_traceframe_info): Allocate with new.
2793 * mi/mi-main.c (mi_cmd_trace_frame_collected): Adjust to vector
2794 change.
2795
2796 2017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
2797
2798 * tracepoint.c (traceframe_info): Rename to...
2799 (current_traceframe_info): ...this.
2800 (clear_traceframe_info): Adjust.
2801 (get_traceframe_info): Adjust.
2802
2803 2017-10-14 Simon Marchi <simon.marchi@ericsson.com>
2804
2805 * nat/linux-osdata.c: Include algorithm.
2806 (compare_processes): Remove.
2807 (struct pid_pgid_entry): New struct.
2808 (linux_xfer_osdata_processgroups): Use std::vector instead of
2809 XNEWVEC.
2810
2811 2017-10-14 Simon Marchi <simon.marchi@ericsson.com>
2812
2813 * objfiles.h: Don't include symfile.h.
2814 (struct partial_symbol): Remove forward-declaration.
2815 (struct objfile) <global_psymbols, static_psymbols>: Change type
2816 to std::vector<partial_symbol *>.
2817 * objfiles.c (objfile::objfile): Don't memset those fields.
2818 (objfile::~objfile): Don't free those fields.
2819 * psympriv.h (struct psymbol_allocation_list): Remove
2820 forward-declaration.
2821 (add_psymbol_to_list): Change psymbol_allocation_list parameter
2822 to std::vector.
2823 (start_psymtab_common): Change parameters to std::vector.
2824 * psymtab.c: Include algorithm.
2825 (require_partial_symbols): Call shrink_to_fit.
2826 (find_pc_sect_psymbol): Adjust to vector change.
2827 (match_partial_symbol): Likewise.
2828 (lookup_partial_symbol): Likewise.
2829 (psym_relocate): Likewise.
2830 (dump_psymtab): Likewise.
2831 (recursively_search_psymtabs): Likewise.
2832 (compare_psymbols): Remove.
2833 (sort_pst_symbols): Adjust to vector change.
2834 (start_psymtab_common): Likewise.
2835 (end_psymtab_common): Likewise.
2836 (psymbol_bcache_full): De-constify return value.
2837 (add_psymbol_to_bcache): Likewise.
2838 (extend_psymbol_list): Remove.
2839 (append_psymbol_to_list): Adjust to vector change.
2840 (add_psymbol_to_list): Likewise.
2841 (init_psymbol_list): Likewise.
2842 (maintenance_info_psymtabs): Likewise.
2843 (maintenance_check_psymtabs): Likewise.
2844 * symfile.h (struct psymbol_allocation_list): Remove.
2845 * symfile.c (reread_symbols): Adjust to vector change.
2846 * dbxread.c (start_psymtab): Change type of parameters.
2847 (dbx_symfile_read): Adjust to vector change.
2848 (read_dbx_symtab): Likewise.
2849 (start_psymtab): Change type of parameters.
2850 * dwarf2read.c (dwarf2_build_psymtabs): Adjust to vector change.
2851 (create_partial_symtab): Likewise.
2852 (add_partial_symbol): Likewise.
2853 (write_one_signatured_type): Likewise.
2854 (recursively_write_psymbols): Likewise.
2855 * mdebugread.c (parse_partial_symbols): Likewise.
2856 * xcoffread.c (xcoff_start_psymtab): Change type of parameters.
2857 (scan_xcoff_symtab): Adjust to vector change.
2858 (xcoff_initial_scan): Likewise.
2859
2860 2017-10-13 Simon Marchi <simon.marchi@ericsson.com>
2861
2862 * ada-typeprint.c (print_dynamic_range_bound): Use std::string.
2863
2864 2017-10-13 Yao Qi <yao.qi@linaro.org>
2865
2866 * features/Makefile: Remove tic6x-*-expedite, add tic6x-expedite.
2867 Remove s390x-*-expedite, add s390x-expedite.
2868
2869 2017-10-13 Yao Qi <yao.qi@linaro.org>
2870
2871 * features/s390-gs-linux64.c: Regenerated.
2872 * features/s390x-gs-linux64.c: Regenerated.
2873
2874 2017-10-13 Tom Tromey <tom@tromey.com>
2875
2876 * compile/compile-object-run.c (do_module_cleanup): Use delete.
2877 * solib.c (update_solib_list, reload_shared_libraries_1): Use
2878 delete.
2879 * symfile.c (symbol_file_add_with_addrs): Use new.
2880 (symbol_file_add_separate): Update comment.
2881 (syms_from_objfile_1, remove_symbol_file_command): Use delete.
2882 * jit.c (jit_object_close_impl): Use new.
2883 (jit_unregister_code): Use delete.
2884 * objfiles.c (objfile::objfile): Rename from allocate_objfile.
2885 (~objfile): Rename from free_objfile.
2886 (free_objfile_separate_debug, do_free_objfile_cleanup)
2887 (free_all_objfiles, objfile_purge_solibs): Use delete.
2888 * objfiles.h (struct objfile): Add constructor and destructor.
2889 Use DISABLE_COPY_AND_ASSIGN. Add initializers to data members.
2890 (allocate_objfile, free_objfile): Don't declare.
2891 (struct objstats): Add initializers.
2892
2893 2017-10-12 Simon Marchi <simon.marchi@ericsson.com>
2894
2895 * arch-utils.h (simple_displaced_step_copy_insn): Remove.
2896 * arch-utils.c (simple_displaced_step_copy_insn): Remove.
2897 * gdbarch.sh (displaced_step_copy_insn): Adjust comment.
2898 * gdbarch.h: Regenerate.
2899 * i386-linux-tdep.c (i386_linux_displaced_step_copy_insn):
2900 Adjust comment.
2901 * i386-tdep.c (i386_displaced_step_copy_insn): Adjust comment.
2902 (i386_displaced_step_fixup): Adjust comment.
2903 * rs6000-tdep.c (ppc_displaced_step_copy_insn): Adjust comment.
2904
2905 2017-10-12 Tom Tromey <tom@tromey.com>
2906
2907 * prologue-value.h (pv_area::store_would_trash): Return bool.
2908 (pv_area::find_reg): Likewise.
2909 * prologue-value.c (pv_area::store_would_trash): Return bool.
2910 (pv_area::find_reg): Likewise.
2911
2912 2017-10-12 Tom Tromey <tom@tromey.com>
2913
2914 * s390-linux-tdep.c (s390_store, s390_load)
2915 (s390_check_for_saved, s390_analyze_prologue): Update.
2916 * rx-tdep.c (check_for_saved, rx_analyze_prologue): Update.
2917 * rl78-tdep.c (rl78_analyze_prologue, check_for_saved): Update.
2918 * prologue-value.h (class pv_area): Move from prologue-value.c.
2919 Change names of members. Add constructor, destructor, member
2920 functions.
2921 (make_pv_area, free_pv_area, make_cleanup_free_pv_area)
2922 (pv_area_store, pv_area_fetch, pv_area_store_would_trash)
2923 (pv_area_fetch, pv_area_scan): Don't declare.
2924 * prologue-value.c (struct pv_area::area_entry): Now member of
2925 pv_area.
2926 (struct pv_area): Move to prologue-value.h.
2927 (pv_area::pv_area): Rename from make_pv_area.
2928 (pv_area::~pv_area): Rename from free_pv_area.
2929 (do_free_pv_area_cleanup, make_cleanup_free_pv_area): Remove.
2930 (clear_entries, find_entry, overlaps, store_would_trash, store)
2931 (fetch, find_reg, scan): Now member of pv_area.
2932 Remove "area" argument. Update.
2933 * msp430-tdep.c (check_for_saved, msp430_analyze_prologue):
2934 Update.
2935 * mn10300-tdep.c (push_reg, check_for_saved)
2936 (mn10300_analyze_prologue): Update.
2937 * mep-tdep.c (is_arg_spill, check_for_saved)
2938 (mep_analyze_prologue): Update.
2939 * m32c-tdep.c (m32c_pv_push, m32c_srcdest_fetch)
2940 (m32c_srcdest_store, m32c_pv_enter, m32c_is_arg_spill)
2941 (m32c_is_struct_return, m32c_analyze_prologue): Update.
2942 * arm-tdep.c (thumb_analyze_prologue, arm_analyze_prologue):
2943 Update.
2944 * arc-tdep.c (arc_is_in_prologue, arc_analyze_prologue): Update.
2945 * aarch64-tdep.c (aarch64_analyze_prologue): Update.
2946
2947 2017-10-12 Simon Marchi <simon.marchi@ericsson.com>
2948
2949 * linux-nat.h (linux_nat_set_delete_thread): New declaration.
2950 * linux-nat.c (linux_nat_delete_thread): New variable.
2951 (lwp_free): Invoke linux_nat_delete_thread if set.
2952 (linux_nat_set_delete_thread): New function.
2953 * aarch64-linux-nat.c (_initialize_aarch64_linux_nat): Assign
2954 thread delete callback.
2955 * arm-linux-nat.c (arm_linux_delete_thread): New function.
2956 (_initialize_arm_linux_nat): Assign thread delete callback.
2957 * s390-linux-nat.c (s390_delete_thread): New function.
2958 (_initialize_s390_nat): Assign thread delete callback.
2959 * x86-linux-nat.c (x86_linux_add_target): Likewise.
2960 * nat/aarch64-linux.c (aarch64_linux_delete_thread): New
2961 function.
2962 * nat/aarch64-linux.h (aarch64_linux_delete_thread): New
2963 declaration.
2964 * nat/x86-linux.c (x86_linux_delete_thread): New function.
2965 * nat/x86-linux.h (x86_linux_delete_thread): New declaration.
2966
2967 2017-10-09 Tom Tromey <tom@tromey.com>
2968
2969 * tui/tui-win.c (tui_set_win_height, parse_scrolling_args): Use
2970 std::string.
2971 * tui/tui-layout.c (enum tui_status): Use std::string.
2972
2973 2017-10-11 Tom Tromey <tom@tromey.com>
2974
2975 * gdbthread.h (thread_command): Constify.
2976 * inferior.h (detach_command): Constify.
2977 * top.h (set_history, show_history): Constify.
2978 * arm-tdep.c (set_arm_command, show_arm_command): Constify.
2979 * serial.c (serial_set_cmd, serial_show_cmd): Constify.
2980 * bsd-kvm.c (bsd_kvm_cmd): Constify.
2981 * printcmd.c (set_command): Constify.
2982 (non_const_set_command): New function.
2983 * dcache.c (set_dcache_command, show_dcache_command): Constify.
2984 * breakpoint.c (enable_command, disable_command, delete_command)
2985 (catch_command, tcatch_command, set_breakpoint_cmd)
2986 (show_breakpoint_cmd): Constify.
2987 * macrocmd.c (macro_command): Constify.
2988 * infcmd.c (unset_command, kill_command, detach_command)
2989 (info_proc_cmd): Constify.
2990 * i386-tdep.c (set_mpx_cmd, show_mpx_cmd): Constify.
2991 * auto-load.c (show_auto_load_cmd, set_auto_load_cmd)
2992 (info_auto_load_cmd): Constify.
2993 * target-descriptions.c (set_tdesc_cmd, show_tdesc_cmd)
2994 (unset_tdesc_cmd): Constify.
2995 * ada-lang.c (set_ada_command, show_ada_command)
2996 (maint_set_ada_cmd, maint_show_ada_cmd): Constify.
2997 * guile/guile.c (set_guile_command, show_guile_command)
2998 (info_guile_command): Constify.
2999 * tui/tui-win.c (tui_command, set_tui_cmd, show_tui_cmd):
3000 Constify.
3001 * skip.c (skip_command): Constify.
3002 * compile/compile.c (_initialize_compile): Constify.
3003 * dwarf2read.c (set_dwarf_cmd, show_dwarf_cmd): Constify.
3004 * btrace.c (maint_btrace_cmd, maint_btrace_set_cmd)
3005 (maint_btrace_show_cmd, maint_btrace_pt_set_cmd)
3006 (maint_btrace_pt_show_cmd): Constify.
3007 * remote.c (set_remote_cmd, show_remote_cmd, remote_command):
3008 Constify.
3009 * python/python.c (user_show_python, user_set_python): Constify.
3010 * mips-tdep.c (set_mips_command, show_mips_command)
3011 (set_mipsfpu_command): Constify.
3012 * record-btrace.c (cmd_record_btrace_start)
3013 (cmd_set_record_btrace, cmd_show_record_btrace)
3014 (cmd_set_record_btrace_bts, cmd_show_record_btrace_bts)
3015 (cmd_set_record_btrace_pt, cmd_show_record_btrace_pt): Constify.
3016 * rs6000-tdep.c (set_powerpc_command, show_powerpc_command):
3017 Constify.
3018 * symfile.c (overlay_command): Constify.
3019 * spu-tdep.c (set_spu_command, show_spu_command): Constify.
3020 * cli/cli-logging.c (set_logging_command, show_logging_command):
3021 Constify.
3022 * cli/cli-dump.c (dump_command, append_command)
3023 (srec_dump_command, ihex_dump_command, verilog_dump_command)
3024 (tekhex_dump_command, binary_dump_command)
3025 (binary_append_command): Constify.
3026 * cli/cli-decode.c (struct cmd_list_element): Change type of
3027 "fun".
3028 * cli/cli-cmds.c (info_command, show_command, set_debug)
3029 (show_debug): Constify.
3030 (show_command): Add non-const overload.
3031 * top.c (set_history, show_history): Constify.
3032 * sh-tdep.c (set_sh_command, show_sh_command): Constify.
3033 * command.h (add_prefix_cmd): Accept a cmd_const_cfunc_ftype.
3034 * target.c (target_command): Constify.
3035 * sparc64-tdep.c (info_adi_command): Constify.
3036 * record-full.c (cmd_record_full_start): Constify.
3037 (set_record_full_command): Constify. Fix typo.
3038 (show_record_full_command): Constify.
3039 * thread.c (thread_command, thread_apply_command): Constify.
3040 * memattr.c (dummy_cmd): Constify.
3041 * value.c (function_command): Constify.
3042 * frame.c (set_backtrace_cmd, show_backtrace_cmd): Constify.
3043 * probe.c (info_probes_command): Constify.
3044 * ser-tcp.c (set_tcp_cmd, show_tcp_cmd): Constify.
3045 * gnu-nat.c (set_task_cmd, show_task_cmd, set_thread_cmd)
3046 (show_thread_cmd, set_thread_default_cmd)
3047 (show_thread_default_cmd): Constify.
3048 (check_empty): Constify.
3049 * tracepoint.c (tfind_command): Constify.
3050 * cp-support.c (maint_cplus_command): Constify.
3051 * windows-tdep.c (info_w32_command): Constify.
3052 * record.c (cmd_record_start, set_record_command)
3053 (show_record_command, info_record_command, cmd_record_goto):
3054 Constify.
3055 * ravenscar-thread.c (set_ravenscar_command)
3056 (show_ravenscar_command): Constify.
3057 * utils.c (set_internal_problem_cmd, show_internal_problem_cmd):
3058 Constify.
3059 (add_internal_problem_command): Remove casts.
3060 * arc-tdep.c (maintenance_print_arc_command): Constify.
3061 * valprint.c (set_print, show_print, set_print_raw)
3062 (show_print_raw): Constify.
3063 * maint.c (maintenance_command, maintenance_info_command)
3064 (maintenance_print_command, maintenance_set_cmd)
3065 (maintenance_show_cmd, set_per_command_cmd)
3066 (show_per_command_cmd, maintenance_check_command): Constify.
3067 * language.c (set_check, show_check): Constify.
3068 * typeprint.c (show_print_type, set_print_type): Constify.
3069 * go32-nat.c (go32_info_dos_command): Constify.
3070
3071 2017-10-11 Tom Tromey <tom@tromey.com>
3072
3073 * breakpoint.c (prepare_re_set_context): Remove.
3074 (breakpoint_re_set_one): Update. Don't use cleanups.
3075 (breakpoint_re_set): Use scoped_restore, std::string, and
3076 scoped_restore_current_language.
3077
3078 2017-10-11 Tom Tromey <tom@tromey.com>
3079
3080 * breakpoint.c (commands_command_1): Use std::string.
3081 (cleanup_executing_breakpoints): Remove.
3082 (bpstat_do_actions_1): Use scoped_restore.
3083 (bpstat_check_watchpoint): Use std::string.
3084 (decode_static_tracepoint_spec): Likewise.
3085 (break_range_command): Likewise.
3086 (watch_command_1): Likewise.
3087 (compare_breakpoints): Change argument types.
3088 (clear_command): Use std::vector.
3089 (cleanup_executing_breakpoints): Remove.
3090 (update_global_location_list): Use unique_xmalloc_ptr.
3091 (strace_command): Remove unused declaration.
3092
3093 2017-10-11 John Baldwin <jhb@FreeBSD.org>
3094
3095 * Makefile.in (ALLDEPFILES): Add arm-fbsd-nat.c.
3096 * NEWS: Mention new FreeBSD/arm native configuration.
3097 * configure.host: Add arm*-*-freebsd*.
3098 * configure.nat: Likewise.
3099 * arm-fbsd-nat.c: New file.
3100
3101 2017-10-11 John Baldwin <jhb@FreeBSD.org>
3102
3103 * Makefile.in (ALL_TARGET_OBS): Add arm-fbsd-tdep.o.
3104 (ALLDEPFILES): Add arm-fbsd-tdep.c.
3105 * NEWS: Mention new FreeBSD/arm target.
3106 * configure.tgt: Add arm*-*-freebsd*.
3107 * arm-fbsd-tdep.c: New file.
3108 * arm-fbsd-tdep.h: New file.
3109
3110 2017-10-11 Maciej W. Rozycki <macro@imgtec.com>
3111
3112 * linux-tdep.c (linux_make_corefile_notes): Remove call to
3113 `gdbarch_elfcore_write_linux_prpsinfo'.
3114 * gdbarch.sh (elfcore_write_linux_prpsinfo): Remove architecture
3115 method.
3116 (elf_internal_linux_prpsinfo): Remove declaration.
3117 * gdbarch.h: Regenerate.
3118 * gdbarch.c: Regenerate.
3119
3120 2017-10-11 Maciej W. Rozycki <macro@imgtec.com>
3121
3122 * ppc-linux-tdep.c (ppc_linux_init_abi): Remove call to
3123 `set_gdbarch_elfcore_write_linux_prpsinfo'.
3124
3125 2017-10-11 Pedro Alves <palves@redhat.com>
3126
3127 * breakpoint.c (reattach_breakpoints): Delete.
3128 * breakpoint.h (reattach_breakpoints): Delete.
3129
3130 2017-10-11 Simon Marchi <simon.marchi@ericsson.com>
3131
3132 * symfile.c (registered_sym_fns): Make struct, not typedef.
3133 (DEF_VEC_O (registered_sym_fns)): Remove.
3134 (symtab_fns): Change type to std::vector.
3135 (add_symtab_fns): Adjust.
3136 (find_sym_fns): Adjust.
3137
3138 2017-10-11 Anton Kolesov <Anton.Kolesov@synopsys.com>
3139
3140 * arc-tdep.c (arc_gdbarch_init): Pass proper cpu value to disassembler.
3141 * arc-tdep.h (arc_arch_is_em): New function.
3142 (arc_arch_is_hs): Likewise.
3143
3144 2017-10-11 Egeyar Bagcioglu <egeyar.bagcioglu@oracle.com>
3145
3146 * macrotab.h (macro_lookup_inclusion): Remove unnecessary
3147 parentheses in the declaration.
3148 (macro_lookup_inclusion): Likewise.
3149 (macro_lookup_definition): Likewise.
3150 * p-lang.h (pascal_builtin_types): Likewise.
3151 * tui/tui-data.c (tui_win_list): Likewise.
3152 * tui/tui-data.h (tui_win_list): Likewise.
3153 * utils.h (make_cleanup_free_section_addr_info): Likewise.
3154
3155 2017-10-11 Mark Rages <markrages@gmail.com>
3156
3157 * target-memory.c (block_boundaries): Fix for block address not
3158 aligned on block size.
3159
3160 2017-10-10 Pedro Alves <palves@redhat.com>
3161 Tom Tromey <tom@tromey.com>
3162
3163 * breakpoint.c (struct captured_breakpoint_query_args)
3164 (do_captured_breakpoint_query, gdb_breakpoint_query): Delete.
3165 (print_breakpoint): New.
3166 * breakpoint.h (print_breakpoint): Declare.
3167 * common/common-exceptions.h (enum return_reason): Remove
3168 references to catch_exceptions.
3169 * exceptions.c (catch_exceptions, catch_exceptions_with_msg):
3170 Delete.
3171 * exceptions.h (catch_exceptions_ftype, catch_exceptions)
3172 (catch_exception_ftype, catch_exceptions_with_msg): Delete.
3173 * gdb.h: Delete.
3174 * gdbthread.h (thread_select): Declare.
3175 * mi/mi-cmd-break.c: Don't include gdb.h.
3176 (breakpoint_notify): Use print_breakpoint.
3177 * mi/mi-cmd-catch.c: Don't include gdb.h.
3178 * mi/mi-interp.c: Don't include gdb.h.
3179 (mi_print_breakpoint_for_event): New.
3180 (mi_breakpoint_created, mi_breakpoint_modified): Use
3181 mi_print_breakpoint_for_event.
3182 * mi/mi-main.c: Don't include gdb.h.
3183 (mi_cmd_thread_select): Parse the global thread ID here. Use
3184 thread_select instead of gdb_thread_select.
3185 (mi_cmd_thread_list_ids): Output "thread-ids" tuple here instead
3186 of using gdb_list_thread_ids.
3187 * remote-fileio.c (do_remote_fileio_request): Change type. Reply
3188 FILEIO_ENOSYS here.
3189 (remote_fileio_request): Use TRY/CATCH instead of
3190 catch_exceptions.
3191 * symfile-mem.c (struct symbol_file_add_from_memory_args)
3192 (symbol_file_add_from_memory_wrapper): Delete.
3193 (add_vsyscall_page): Use TRY/CATCH instead of catch_exceptions.
3194 * thread.c: Don't include gdb.h.
3195 (do_captured_list_thread_ids, gdb_list_thread_ids): Delete.
3196 (thread_alive): Use thread_select.
3197 (do_captured_thread_select): Delete, parts salvaged as ...
3198 (thread_select): ... this new function.
3199 (gdb_thread_select): Delete.
3200
3201 2017-10-10 Pedro Alves <palves@redhat.com>
3202 Tom Tromey <tom@tromey.com>
3203
3204 * breakpoint.c (breakpoint_cond_eval): Change return type to bool
3205 and reverse logic.
3206 (WP_DELETED, WP_VALUE_CHANGED, WP_VALUE_NOT_CHANGED, WP_IGNORE):
3207 No longer macros. Instead ...
3208 (enum wp_check_result): They're now values of this new
3209 enumeration.
3210 (watchpoint_check): Change return type to wp_check_result and
3211 parameter type to bpstat.
3212 (bpstat_check_watchpoint): Use TRY/CATCH instead of catch_errors.
3213 (bpstat_check_breakpoint_conditions): Use TRY/CATCH instead of
3214 catch_errors. Reverse logic of watchpoint_check call.
3215 (breakpoint_re_set_one): Now returns void and takes a breakpoint
3216 pointer as parameter.
3217 (breakpoint_re_set): Use TRY/CATCH instead of catch_errors.
3218 * common/common-exceptions.c (throw_exception_sjlj): Update
3219 comments to avoid mentioning catch_errors.
3220 * exceptions.c (catch_errors): Delete.
3221 * exceptions.h: Update comments to avoid mentioning catch_errors.
3222 (catch_errors_ftype, catch_errors): Delete.
3223 * infrun.c (normal_stop): Use TRY/CATCH instead of catch_errors.
3224 (hook_stop_stub): Delete.
3225 (restore_selected_frame): Change return type to void, and
3226 parameter type to const frame_id &.
3227 (restore_infcall_control_state): Use TRY/CATCH instead of
3228 catch_errors.
3229 * main.c (captured_command_loop): Return void and remove
3230 parameter. Remove references to catch_errors.
3231 (captured_main): Use TRY/CATCH instead of catch_errors.
3232 * objc-lang.c (objc_submethod_helper_data)
3233 (find_objc_msgcall_submethod_helper): Delete.
3234 (find_objc_msgcall_submethod): Use TRY/CATCH instead of
3235 catch_errors.
3236 * record-full.c (record_full_message): Return void.
3237 (record_full_message_args, record_full_message_wrapper): Delete.
3238 (record_full_message_wrapper_safe): Return bool and use TRY/CATCH
3239 instead of catch_errors.
3240 * solib-aix.c (solib_aix_open_symbol_file_object): Change
3241 parameter type to int.
3242 * solib-darwin.c (open_symbol_file_object): Ditto.
3243 * solib-dsbt.c (open_symbol_file_object): Ditto.
3244 * solib-frv.c (open_symbol_file_object): Ditto.
3245 * solib-svr4.c (open_symbol_file_object): Ditto.
3246 * solib-target.c (solib_target_open_symbol_file_object): Ditto.
3247 * solib.c (update_solib_list): Use TRY/CATCH instead of
3248 catch_errors.
3249 * solist.h (struct target_so_ops) <open_symbol_file_object>:
3250 Change type.
3251 * symmisc.c (struct print_symbol_args): Remove.
3252 (dump_symtab_1): Use TRY/CATCH instead of catch_errors.
3253 (print_symbol): Change type.
3254 * windows-nat.c (handle_load_dll, handle_unload_dll): Return void
3255 and remove parameters.
3256 (catch_errors): New.
3257 (get_windows_debug_event): Adjust.
3258
3259 2017-10-09 Tom Tromey <tom@tromey.com>
3260
3261 * mi/mi-main.c (free_splay_tree): Remove.
3262 (list_available_thread_groups): Use splay_tree_up.
3263 * common/gdb_splay_tree.h: New file.
3264
3265 2017-10-09 Tom Tromey <tom@tromey.com>
3266
3267 * mi/mi-main.c (do_nothing): Remove.
3268 (list_available_thread_groups): Update.
3269
3270 2017-10-09 Pedro Alves <palves@redhat.com>
3271
3272 * infrun.c (handle_inferior_event_1) <TARGET_WAITKIND_EXECD>: Skip
3273 reading registers when switching context.
3274
3275 2017-10-09 John Baldwin <jhb@FreeBSD.org>
3276
3277 * fbsd-nat.c (fbsd_siginfo_size): Use gdbarch_long_bit.
3278 (fbsd_convert_siginfo): Likewise.
3279 * fbsd-tdep.c (fbsd_core_xfer_siginfo): Likewise.
3280
3281 2017-10-09 Simon Marchi <simon.marchi@polymtl.ca>
3282
3283 * configure.ac (try_guile_versions): Remove guile-2.2.
3284 * configure: Regenerate.
3285
3286 2017-10-09 Tom Tromey <tom@tromey.com>
3287
3288 * Makefile.in (COMPILE.post, POSTCOMPILE): Restore $(basename).
3289 (COMPILE.pre): Use $(CXX).
3290
3291 2017-10-09 Pedro Alves <palves@redhat.com>
3292
3293 * cp-support.c (cp_remove_params): Return a gdb::unique_xmalloc_ptr.
3294 Use bool.
3295 (overload_list_add_symbol): Adjust to use gdb::unique_xmalloc_ptr.
3296 * cp-support.h (cp_remove_params): Now returns a
3297 gdb::unique_xmalloc_ptr.
3298 * dwarf2read.c (find_slot_in_mapped_hash): Now returns bool.
3299 Adjust to cp_remove_params returning a gdb::unique_xmalloc_ptr.
3300 * psymtab.c (psymtab_search_name): Adjust to cp_remove_params
3301 returning a gdb::unique_xmalloc_ptr.
3302 (lookup_partial_symbol): Adjust to use gdb::unique_xmalloc_ptr.
3303 * stack.c (find_frame_funname): Adjust to cp_remove_params
3304 returning a gdb::unique_xmalloc_ptr.
3305
3306 2017-10-08 Tom Tromey <tom@tromey.com>
3307
3308 * dwarf2read.c (dwarf2_get_dwz_file): Use
3309 gdb::unique_xmalloc_ptr.
3310 (find_slot_in_mapped_hash): Likewise.
3311 (dwarf2_physname): Likewise.
3312 (create_dwo_unit_in_dwp_v1): Use std::string.
3313 (create_dwo_unit_in_dwp_v2): Likewise.
3314 (lookup_dwo_cutu): Likewise.
3315 (inherit_abstract_dies): Use std::vector.
3316 (read_array_type): Likewise.
3317 (dwarf_decode_macros): Remove unused declaration.
3318 (unsigned_int_compar): Remove.
3319 (dwarf2_build_psymtabs_hard): Use scoped_restore.
3320 (psymtabs_addrmap_cleanup): Remove.
3321
3322 2017-10-08 Tom Tromey <tom@tromey.com>
3323
3324 * frame-unwind.c (frame_unwind_try_unwinder): Update.
3325 * frame.h (frame_cleanup_after_sniffer): Declare.
3326 (frame_prepare_for_sniffer): Return void.
3327 * frame.c (frame_cleanup_after_sniffer): No longer static. Change
3328 type of argument.
3329 (frame_prepare_for_sniffer): Return void.
3330
3331 2017-10-08 Tom Tromey <tom@tromey.com>
3332
3333 * utils.h (make_cleanup_value_free): Remove.
3334 * utils.c (do_value_free, struct cleanup): Remove.
3335 * dwarf2loc.c (dwarf2_evaluate_loc_desc_full) <DWARF_VALUE_STACK>:
3336 Use gdb_value_up.
3337 * value.h (struct value_deleter): New.
3338 (gdb_value_up): New typedef.
3339
3340 2017-10-08 Tom Tromey <tom@tromey.com>
3341
3342 * symtab.c (free_search_symbols, do_free_search_symbols_cleanup)
3343 (make_cleanup_free_search_symbols): Remove.
3344 (search_symbols): Return std::vector.
3345 (symbol_search::compare_search_syms): Now member of
3346 symbol_search. Change arguments.
3347 (sort_search_symbols_remove_dups): Change arguments. Rewrite.
3348 (symtab_symbol_info, rbreak_command): Update.
3349 * symtab.h (struct symbol_search) <next>: Remove.
3350 Add constructors.
3351 (symbol_search::operator<): New function.
3352 (symbol_search::operator==): New function.
3353 (search_symbols): Remove std::vector.
3354 (free_search_symbols, make_cleanup_free_search_symbols): Remove.
3355 (symbol_search::compare_search_syms): Declare.
3356
3357 2017-10-06 Yao Qi <yao.qi@linaro.org>
3358
3359 * Makefile.in (ALL_64_TARGET_OBS): Replace aarch64-insn.o with
3360 arch/aarch64-insn.o.
3361 Remove one rule.
3362 * configure.tgt: Replace aarch64-insn.o with arch/aarch64-insn.o.
3363
3364 2017-10-06 Yao Qi <yao.qi@linaro.org>
3365
3366 * Makefile.in (ALL_TARGET_OBS): Replace arm.o, arm-get-next-pcs.o,
3367 and arm-linux.o with arch/arm.o, arch/arm-get-next-pcs.o and
3368 arch/arm-linux.o respectively.
3369 * configure.tgt: Likewise.
3370
3371 2017-10-06 Yao Qi <yao.qi@linaro.org>
3372
3373 * Makefile.in (ALL_TARGET_OBS): Rename i386.o to arch/i386.o.
3374 * configure.tgt (i386_tobjs): Replace i386.o with arch/i386.o.
3375
3376 2017-10-06 Pedro Alves <palves@redhat.com>
3377
3378 * windows-nat.c: Include <algorithm>.
3379
3380 2017-10-06 Yao Qi <yao.qi@linaro.org>
3381
3382 * configure.tgt (i386_tobjs): New variable.
3383 (amd64_tobjs): New variable.
3384 Set $cpu_obs and $os_obs.
3385
3386 2017-10-06 Yao Qi <yao.qi@linaro.org>
3387
3388 * Makefile.in (CONFIG_SRC_SUBDIR): New.
3389 (ALL_64_TARGET_OBS): Replace amd64.o with arch/amd64.o.
3390 (clean): Remove object files and dependency files.
3391 (distclean): Remove the directory.
3392 * configure.ac: Invoke AC_CONFIG_COMMANDS.
3393 * configure: Re-generated.
3394 * configure.tgt: Replace amd64.o with arch/amd64.o.
3395
3396 2017-10-05 Jose E. Marchesi <jose.marchesi@oracle.com>
3397
3398 PR build/22188
3399 * arm-tdep.c (arm_decode_misc_memhint_neon): Fix decoding of CPS
3400 and SETEND.
3401
3402 2017-10-05 Pedro Alves <palves@redhat.com>
3403
3404 * linux-nat.c (linux_child_follow_fork): When following the parent
3405 and detaching the child, consult the parent thread's architecture
3406 instead of the child's.
3407
3408 2017-10-05 Ulrich Weigand <uweigand@de.ibm.com>
3409
3410 * ax.h: Do not include "doublest.h".
3411 (union agent_val): Remove.
3412
3413 2017-10-05 Ulrich Weigand <uweigand@de.ibm.com>
3414
3415 * dfp.h (MAX_DECIMAL_STRING): Move to dfp.c.
3416 (decimal_to_string): Return std::string object.
3417 (decimal_from_string): Accept std::string object. Return bool.
3418 (decimal_from_integral, decimal_from_doublest): Remove.
3419 (decimal_from_longest): Add prototype.
3420 (decimal_from_ulongest): Likewise.
3421 (decimal_to_longest): Likewise.
3422 (decimal_from_doublest): Likewise.
3423 * dfp.c: Do not include "gdbtypes.h" or "value.h".
3424 (MAX_DECIMAL_STRING): Move here.
3425 (decimal_to_string): Return std::string object.
3426 (decimal_from_string): Accept std::string object. Return bool.
3427 (decimal_from_integral): Remove, replace by ...
3428 (decimal_from_longest, decimal_from_ulongest): ... these new functions.
3429 (decimal_to_longest): New function.
3430 (decimal_from_floating): Remove, replace by ...
3431 (decimal_from_doublest): ... this new function.
3432 (decimal_to_doublest): Update to new decimal_to_string interface.
3433
3434 * value.c (unpack_long): Use decimal_to_longest.
3435 * valops.c (value_cast): Use decimal_from_doublest instead of
3436 decimal_from_floating. Use decimal_from_[u]longest isntead of
3437 decimal_from_integral.
3438 * valarith.c (value_args_as_decimal): Likewise.
3439 * valprint.c (print_decimal_floating): Update to new
3440 decimal_to_string interface.
3441 * printcmd.c (printf_decfloat): Likewise.
3442 * c-exp.y (parse_number): Update to new decimal_from_string interface.
3443
3444 2017-10-05 Ulrich Weigand <uweigand@de.ibm.com>
3445
3446 * doublest.h: Do not include "floatformat.h". Remove stale comments.
3447 * gdbtypes.c: Include "floatformat.h".
3448 * value.c: Likewise.
3449 * m68k-tdep.c: Likewise.
3450
3451 * findvar.c: Do not include "floatformat.h".
3452 * amd64-darwin-tdep.c: Likewise.
3453 * arm-linux-tdep.c: Likewise.
3454 * i386-darwin-tdep.c: Likewise.
3455 * i387-tdep.c: Likewise.
3456 * m68k-linux-tdep.c: Likewise.
3457 * mep-tdep.c: Likewise.
3458 * mips-tdep.c: Likewise.
3459 * nios2-tdep.c: Likewise.
3460 * s390-linux-tdep.c: Likewise.
3461 * sparc-obsd-tdep.c: Likewise.
3462 * sparc-tdep.c: Likewise.
3463 * sparc64-tdep.c: Likewise.
3464 * spu-tdep.c: Likewise.
3465 * tic6x-tdep.c: Likewise.
3466 * tilegx-tdep.c: Likewise.
3467 * vax-tdep.c: Likewise.
3468 * xstormy16-tdep.c: Likewise.
3469 * xtensa-tdep.c: Likewise.
3470
3471 * top.c: Do not include "doublest.h".
3472 * aarch64-tdep.c: Likewise.
3473 * alpha-tdep.c: Likewise.
3474 * arm-linux-tdep.c: Likewise.
3475 * m68k-linux-tdep.c: Likewise.
3476 * tilegx-tdep.c: Likewise.
3477 * xstormy16-tdep.c: Likewise.
3478
3479 2017-10-05 John Baldwin <jhb@FreeBSD.org>
3480
3481 * mips-fbsd-tdep.c (MIPS_INST_ADDIU_A0_SP_N32): Define.
3482 (mipsn32_fbsd_sigframe): Define.
3483 (mips_fbsd_init_abi): Install mipsn32_fbsd_sigframe unwinder
3484 for FreeBSD/mipsn32.
3485
3486 2017-10-05 John Baldwin <jhb@FreeBSD.org>
3487
3488 * fbsd-tdep.c (fbsd_print_auxv_entry): Handle AT_EHDRFLAGS and
3489 AT_HWCAP.
3490
3491 2017-10-05 Tristan Gingold <tgingold@free.fr>
3492
3493 * MAINTAINERS (Misc): Update my email address.
3494
3495 2017-10-04 Pedro Alves <palves@redhat.com>
3496
3497 * remote.c (get_remote_arch_state): New 'gdbarch' parameter. Use
3498 it instead of target_gdbarch.
3499 (get_remote_state, get_remote_packet_size): Adjust
3500 get_remote_arch_state calls, passing down target_gdbarch
3501 explicitly.
3502 (packet_reg_from_regnum, packet_reg_from_pnum): New parameter
3503 'gdbarch' and use it instead of target_gdbarch.
3504 (get_memory_packet_size): Adjust get_remote_arch_state calls,
3505 passing down target_gdbarch explicitly.
3506 (struct stop_reply) <arch>: New field.
3507 (remote_parse_stop_reply): Use the stopped thread's architecture,
3508 not the current inferior's. Save the architecture in the
3509 stop_reply.
3510 (process_stop_reply): Use the stop reply's architecture.
3511 (process_g_packet, remote_fetch_registers)
3512 (remote_prepare_to_store, store_registers_using_G)
3513 (remote_store_registers): Adjust get_remote_arch_state calls,
3514 using the regcache's architecture.
3515 (remote_get_trace_status): Adjust get_remote_arch_state calls,
3516 passing down target_gdbarch explicitly.
3517 * spu-multiarch.c (spu_thread_architecture): Defer to the target
3518 beneath instead of calling target_gdbarch.
3519 * target.c (default_thread_architecture): Use the specified
3520 inferior's architecture, instead of the current inferior's
3521 architecture (via target_gdbarch).
3522
3523 2017-10-04 Pedro Alves <palves@redhat.com>
3524
3525 * regcache.c (get_thread_arch_regcache): Remove null_ptid special
3526 case.
3527 (regcache_print): Handle !target_has_registers here instead.
3528
3529 2017-10-04 Pedro Alves <palves@redhat.com>
3530
3531 * frame.c (create_test_frame): Delete.
3532 * frame.h (create_test_frame): Delete.
3533 * gdbarch-selftests.c: Include gdbthread.h and target.h.
3534 (class regcache_test): Delete.
3535 (test_target_has_registers, test_target_has_stack)
3536 (test_target_has_memory, test_target_prepare_to_store)
3537 (test_target_store_registers): New functions.
3538 (test_target_ops): New class.
3539 (register_to_value_test): Error out if there's already a
3540 process_stratum (or higher) target pushed. Create a fuller mock
3541 environment, with mock target_ops, inferior, address space, thread
3542 and inferior_ptid.
3543 * progspace.c (struct address_space): Move to ...
3544 * progspace.h (struct address_space): ... here.
3545 * regcache.h (regcache::~regcache, regcache::raw_write)
3546 [GDB_SELF_TEST]: No longer virtual.
3547
3548 2017-10-04 Simon Marchi <simon.marchi@ericsson.com>
3549
3550 * mi/mi-main.c (list_available_thread_groups): Reverse filter logic.
3551
3552 2017-10-04 Pedro Alves <palves@redhat.com>
3553
3554 * guile/scm-breakpoint.c (gdbscm_breakpoint_commands): Move code
3555 out of 'between TRY and CATCH'.
3556
3557 2017-10-04 Pedro Alves <palves@redhat.com>
3558
3559 * cli/cli-cmds.c (complete_command): Add missing END_CATCH.
3560 * common/common-exceptions.h (TRY): Open an outermost scope.
3561 Expand intro comment.
3562 (CATCH): Reindent.
3563 (END_CATCH): Close the outermost scope.
3564 * completer.c (complete_line_internal): Add missing END_CATCH.
3565
3566 2017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
3567
3568 * NEWS (Changes since GDB 8.0): Add entry about new
3569 'set-cwd-on-gdbserver' feature.
3570 (New remote packets): Add entry for QSetWorkingDir.
3571 * common/common-inferior.h (set_inferior_cwd): New prototype.
3572 * infcmd.c (set_inferior_cwd): Remove "static".
3573 (show_cwd_command): Expand text to include remote debugging.
3574 * remote.c: Add PACKET_QSetWorkingDir.
3575 (remote_protocol_features) <QSetWorkingDir>: New entry for
3576 PACKET_QSetWorkingDir.
3577 (extended_remote_set_inferior_cwd): New function.
3578 (extended_remote_create_inferior): Call
3579 "extended_remote_set_inferior_cwd".
3580 (_initialize_remote): Call "add_packet_config_cmd" for
3581 QSetWorkingDir.
3582
3583 2017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
3584
3585 * NEWS (New commands): Mention "set/show cwd".
3586 * cli/cli-cmds.c (_initialize_cli_cmds): Mention "set cwd" on
3587 "cd" command's help text.
3588 * common/common-inferior.h (get_inferior_cwd): New prototype.
3589 * infcmd.c (inferior_cwd_scratch): New global variable.
3590 (set_inferior_cwd): New function.
3591 (get_inferior_cwd): Likewise.
3592 (set_cwd_command): Likewise.
3593 (show_cwd_command): Likewise.
3594 (_initialize_infcmd): Add "set/show cwd" commands.
3595 * inferior.h (class inferior) <cwd>: New field.
3596 * nat/fork-inferior.c: Include "gdb_tilde_expand.h".
3597 (fork_inferior): Change inferior's cwd before its execution.
3598 * windows-nat.c (windows_create_inferior): Pass inferior's cwd
3599 to CreateProcess.
3600
3601 2017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
3602
3603 * Makefile.in (SFILES): Add gdb_tilde_expand.c.
3604 (HFILES_NO_SRCDIR): Add gdb_tilde_expand.h.
3605 (COMMON_OBS): Add gdb_tilde_expand.o.
3606 * common/gdb_tilde_expand.c: New file.
3607 * common/gdb_tilde_expand.h: Likewise.
3608
3609 2017-10-03 Maciej W. Rozycki <macro@imgtec.com>
3610
3611 * gdbarch.sh (objfile): Remove duplicate declaration.
3612 * gdbarch.h: Regenerate.
3613
3614 2017-10-03 Tom Tromey <tom@tromey.com>
3615
3616 * utils.c (internal_vproblem): Use string_vprintf.
3617
3618 2017-10-03 Tom Tromey <tom@tromey.com>
3619
3620 * printcmd.c (info_symbol_command): Use std::string.
3621
3622 2017-10-03 Tom Tromey <tom@tromey.com>
3623
3624 * top.c (gdb_safe_append_history): Use std::string.
3625
3626 2017-10-03 Tom Tromey <tom@tromey.com>
3627
3628 * event-top.c (stdin_event_handler): Update.
3629 * main.c (captured_main_1): Update.
3630 * top.h (make_delete_ui_cleanup): Remove.
3631 (struct ui): Add constructor and destructor.
3632 (new_ui, delete_ui): Remove.
3633 * top.c (make_delete_ui_cleanup): Remove.
3634 (new_ui_command): Use std::unique_ptr.
3635 (delete_ui_cleanup): Remove.
3636 (ui::ui): Rename from new_ui. Update.
3637 (free_ui): Remove.
3638 (ui::~ui): Rename from delete_ui. Update.
3639
3640 2017-10-03 Tom Tromey <tom@tromey.com>
3641
3642 * symfile.c (load_progress): Use gdb::byte_vector.
3643
3644 2017-10-03 Tom Tromey <tom@tromey.com>
3645
3646 * mi/mi-main.c (mi_cmd_trace_frame_collected): Remove unused
3647 declaration.
3648 * printcmd.c (x_command): Remove unused declaration.
3649 * symfile.c (symbol_file_command): Remove unused declaration.
3650
3651 2017-10-03 Tom Tromey <tom@tromey.com>
3652
3653 * utils.c (internal_vproblem): Use std::string.
3654 (defaulted_query): Likewise.
3655
3656 2017-10-03 Tom Tromey <tom@tromey.com>
3657
3658 * guile/scm-ports.c (ioscm_with_output_to_port_worker): Update.
3659 * top.c (execute_command_to_string): Update.
3660 * utils.c (make_cleanup_restore_page_info): Remove.
3661 (do_restore_page_info_cleanup): Remove.
3662 (set_batch_flag_and_restore_page_info):
3663 New.
3664 (make_cleanup_restore_page_info): Remove.
3665 (set_batch_flag_and_make_cleanup_restore_page_info): Remove.
3666 (~set_batch_flag_and_restore_page_info): New
3667 (make_cleanup_restore_uinteger): Remove.
3668 (make_cleanup_restore_integer): Remove.
3669 (struct restore_integer_closure): Remove.
3670 (restore_integer): Remove.
3671 * utils.h (struct set_batch_flag_and_restore_page_info): New
3672 class.
3673 (set_batch_flag_and_make_cleanup_restore_page_info): Remove.
3674 (make_cleanup_restore_page_info): Remove.
3675 (make_cleanup_restore_uinteger) Remove.
3676 (make_cleanup_restore_integer) Remove.
3677
3678 2017-10-03 Tom Tromey <tom@tromey.com>
3679
3680 * record-full.h (record_full_gdb_operation_disable_set): Return
3681 scoped_restore_tmpl<int>.
3682 * infrun.c (adjust_pc_after_break): Update.
3683 (handle_signal_stop): Update.
3684 * record-full.c (record_full_gdb_operation_disable_set): Return
3685 scoped_restore_tmpl<int>.
3686 (record_full_wait_1, record_full_insert_breakpoint)
3687 (record_full_remove_breakpoint, record_full_save)
3688 (record_full_goto_insn): Update.
3689
3690 2017-10-02 Tom Tromey <tom@tromey.com>
3691
3692 PR rust/22236:
3693 * rust-lang.c (rust_val_print_str): New function.
3694 (val_print_struct): Call it.
3695 (rust_subscript): Preserve name of slice type.
3696
3697 2017-10-02 Tom Tromey <tom@tromey.com>
3698
3699 * rust-lang.c (rust_subscript): Handle slices in
3700 EVAL_AVOID_SIDE_EFFECTS case.
3701
3702 2017-10-02 Tom Tromey <tom@tromey.com>
3703
3704 * rust-lang.c (rust_slice_type_p): Recognize &str as a slice type.
3705
3706 2017-10-02 Tom Tromey <tom@tromey.com>
3707
3708 * rust-lang.h (rust_slice_type): Add "extern".
3709
3710 2017-10-02 Tom Tromey <tom@tromey.com>
3711 Pedro Alves <palves@redhat.com>
3712
3713 * ada-lang.h (ada_exc_info::operator<): Make const.
3714 (ada_exc_info::operator==): Make const.
3715 * ada-lang.c (ada_exc_info::operator<, ada_exc_info::operator==):
3716 Make const.
3717
3718 2017-09-29 Tom Tromey <tom@tromey.com>
3719
3720 * target.c (read_whatever_is_readable): Change type of "result".
3721 Update.
3722 (free_memory_read_result_vector): Remove.
3723 (read_memory_robust): Change return type. Update.
3724 * mi/mi-main.c (mi_cmd_data_read_memory_bytes): Update. Use
3725 bin2hex, std::string.
3726 * target.h (memory_read_result_s): Remove typedef.
3727 (free_memory_read_result_vector): Remove.
3728 (read_memory_robust): Return std::vector.
3729
3730 2017-09-29 Tom Tromey <tom@tromey.com>
3731
3732 * mi/mi-main.c (captured_mi_execute_command): Use scope_restore.
3733
3734 2017-09-29 Tom Tromey <tom@tromey.com>
3735
3736 * mi/mi-cmd-info.c (mi_cmd_info_ada_exceptions): Update.
3737 * ada-lang.h (struct ada_exc_info): Remove typedef. Declare
3738 operator< and operator==.
3739 (ada_exceptions_list): Return a std::vector.
3740 * ada-lang.c (ada_exc_info::operator<): Rename from
3741 compare_ada_exception_info.
3742 (ada_exc_info::operator==): New.
3743 (sort_remove_dups_ada_exceptions_list): Change type of
3744 "exceptions".
3745 (ada_add_standard_exceptions, ada_add_exceptions_from_frame)
3746 (ada_add_global_exceptions): Likewise.
3747 (ada_exceptions_list_1): Return a std::vector.
3748 (ada_exceptions_list): Likewise.
3749
3750 2017-09-29 Tom Tromey <tom@tromey.com>
3751
3752 * mi/mi-main.c (struct print_one_inferior_data) <inferiors>: Now a
3753 'std::set *'.
3754 (print_one_inferior): Update.
3755 (free_vector_of_ints): Remove.
3756 (list_available_thread_groups): Change "ids" to std::set.
3757 (mi_cmd_list_thread_groups): Update.
3758 (struct collect_cores_data) <core>: Now a std::set.
3759 (collect_cores): Update.
3760 (unique): Remove.
3761 (print_one_inferior): Update.
3762
3763 2017-09-29 Tom Tromey <tom@tromey.com>
3764
3765 * mi/mi-main.c (mi_execute_cli_command): Use std::string.
3766 (mi_execute_async_cli_command): Likewise.
3767 (mi_cmd_trace_frame_collected): Use field_fmt.
3768
3769 2017-09-29 Tom Tromey <tom@tromey.com>
3770
3771 * mi/mi-main.c (mi_cmd_data_write_memory_bytes): Use
3772 gdb::byte_vector.
3773
3774 2017-09-29 Tom Tromey <tom@tromey.com>
3775
3776 * mi/mi-parse.c (mi_parse): Remove unused declaration.
3777
3778 2017-09-29 Tom Tromey <tom@tromey.com>
3779
3780 * mi/mi-cmd-disas.c (mi_cmd_disassemble): Don't copy "oarg".
3781
3782 2017-09-29 Tom Tromey <tom@tromey.com>
3783
3784 * varobj.h (varobj_gen_name): Return std::string.
3785 * varobj.c (varobj_gen_name): Return std::string.
3786 * mi/mi-cmd-var.c (mi_cmd_var_create): Use std::string.
3787 (mi_cmd_var_delete): Don't copy "name".
3788
3789 2017-09-29 Tom Tromey <tom@tromey.com>
3790
3791 * mi/mi-cmd-break.c (mi_argv_to_format): Return std::string.
3792 (mi_cmd_break_insert_1): Update.
3793
3794 2017-09-29 Tom Tromey <tom@tromey.com>
3795
3796 * target.h (make_scoped_defer_target_commit_resume): Update.
3797 * target.c (make_scoped_defer_target_commit_resume): Rename from
3798 make_cleanup_defer_target_commit_resume. Return a
3799 scoped_restore.
3800 * infrun.c (proceed): Use make_scoped_defer_target_commit_resume.
3801
3802 2017-09-29 Tom Tromey <tom@tromey.com>
3803
3804 * main.c (captured_main_1): Remove unused declaration.
3805 * spu-multiarch.c (parse_spufs_run): Remove unused declaration.
3806
3807 2017-09-29 Tom Tromey <tom@tromey.com>
3808
3809 * symtab.c (search_symbols): Remove unused outer cleanup.
3810 (make_source_files_completion_list): Remove unused declaration.
3811
3812 2017-09-29 Tom Tromey <tom@tromey.com>
3813
3814 * mt-tdep.c (mt_push_dummy_call): Use gdb::byte_vector.
3815
3816 2017-09-29 Tom Tromey <tom@tromey.com>
3817
3818 * xstormy16-tdep.c (xstormy16_push_dummy_call): Use
3819 gdb::byte_vector.
3820
3821 2017-09-29 Tom Tromey <tom@tromey.com>
3822
3823 * complaints.c (vcomplaint): Use std::string.
3824
3825 2017-09-29 Tom Tromey <tom@tromey.com>
3826
3827 * tracepoint.c (trace_variable_command): Use std::string.
3828 (encode_actions_1): Remove unused declarations.
3829 (create_tsv_from_upload): Use std::string.
3830
3831 2017-09-29 Tom Tromey <tom@tromey.com>
3832
3833 * cp-support.c (gdb_demangle): Use std::string.
3834
3835 2017-09-29 Tom Tromey <tom@tromey.com>
3836
3837 * stack.c (parse_frame_specification): Use std::string
3838 (info_frame_command): Use gdb::unique_xmalloc_ptr.
3839
3840 2017-09-29 Tom Tromey <tom@tromey.com>
3841
3842 * tilegx-tdep.c (tilegx_push_dummy_call): Use gdb::byte_vector.
3843
3844 2017-09-29 Tom Tromey <tom@tromey.com>
3845
3846 * utils.c (vfprintf_maybe_filtered): Use std::string.
3847 (vfprintf_unfiltered): Likewise.
3848
3849 2017-09-29 Tom Tromey <tom@tromey.com>
3850
3851 * event-top.c (top_level_prompt): Return std::string.
3852 (display_gdb_prompt): Update.
3853
3854 2017-09-29 Tom Tromey <tom@tromey.com>
3855
3856 * unittests/common-utils-selftests.c (format): New function.
3857 (string_vprintf_tests): New function.
3858 (_initialize_common_utils_selftests): Register new tests.
3859 * common/common-utils.c (string_vprintf): New function.
3860 * common/common-utils.h (string_vprintf): Declare.
3861
3862 2017-09-29 Pedro Alves <palves@redhat.com>
3863
3864 * common/rsp-low.c (unpack_varlen_hex): Constify.
3865 * common/rsp-low.h (unpack_varlen_hex): Constify.
3866 * linux-nat.c (linux_child_static_tracepoint_markers_by_strid):
3867 Constify.
3868 * remote.c (remote_set_permissions, read_ptid)
3869 (remote_current_thread, remote_get_threads_with_qthreadinfo)
3870 (remote_static_tracepoint_marker_at)
3871 (remote_static_tracepoint_markers_by_strid)
3872 (stop_reply_extract_thread, remote_parse_stop_reply): Constify.
3873 * tracepoint.c (parse_trace_status, parse_tracepoint_status)
3874 (parse_tracepoint_definition, parse_tsv_definition)
3875 (parse_static_tracepoint_marker_definition): Constify.
3876 * tracepoint.h (parse_static_tracepoint_marker_definition)
3877 (parse_trace_status, parse_tracepoint_status)
3878 (parse_tracepoint_definition, parse_tsv_definition): Constify.
3879
3880 2017-09-29 Pedro Alves <palves@redhat.com>
3881
3882 * remote.c (target_buf, target_buf_size): Delete.
3883 (remote_get_noisy_reply): Remove buf_p and sizeof_buf parameters.
3884 Use the connection's packet buffer instead.
3885 All callers adjusted.
3886 (_initialize_remote): Remove references to target_buf and
3887 target_buf_size.
3888
3889 2017-09-28 Pedro Alves <palves@redhat.com>
3890
3891 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
3892 unittests/common-utils-selftests.c.
3893 (SUBDIR_UNITTESTS_OBS): Add common-utils-selftests.o.
3894 (COMMON_OBS): Remove utils-selftests.o.
3895 * utils-selftests.c: Move to ...
3896 * unittests/common-utils-selftests.c: ... here and rename self
3897 test to "string_printf".
3898
3899 2017-09-28 Alexander Shaposhnikov <alexander.v.shaposhnikov@gmail.com> (tiny patch)
3900
3901 * dwarf2read.c (open_and_init_dwp_file): Protect against dwp_file
3902 having NULL cus or tus.
3903
3904 2017-09-27 Ulrich Weigand <uweigand@de.ibm.com>
3905
3906 * arm-tdep.c: (convert_from_extended): Remove.
3907 (convert_to_extended): Likewise.
3908 (arm_extract_return_value): Use convert_typed_floating.
3909 (arm_store_return_value): Likewise.
3910
3911 * sh-tdep.h (struct gdbarch_tdep): Add sh_littlebyte_bigword_type.
3912 * sh-tdep.c: Do not include "floatformat.h".
3913 (sh_littlebyte_bigword_type): New function.
3914 (sh_register_convert_to_virtual): Use convert_typed_floating.
3915 (sh_register_convert_to_raw): Likewise.
3916 * sh64-tdep.c: (struct gdbarch_tdep): Add sh_littlebyte_bigword_type.
3917 (sh64_littlebyte_bigword_type): New function.
3918 (sh64_extract_return_value): Use convert_typed_floating.
3919 (sh64_register_convert_to_virtual): Likewise.
3920 (sh64_register_convert_to_raw): Likewise.
3921
3922 2017-09-27 Ulrich Weigand <uweigand@de.ibm.com>
3923
3924 * doublest.h (floatformat_from_type): Move to gdbtypes.h.
3925 * doublest.c (floatformat_from_type): Move to gdbtypes.c.
3926
3927 * gdbtypes.h (union type_specific): Make field floatformat hold
3928 just a single struct floatformat, not an array.
3929 (floatformat_from_type): Move here.
3930 * gdbtypes.c (floatformat_from_type): Move here. Update to
3931 changed TYPE_FLOATFORMAT definition.
3932 (verify_floatformat): Update to changed TYPE_FLOATFORMAT.
3933 (recursive_dump_type): Likewise.
3934 (init_float_type): Install correct floatformat for byte order.
3935 (arch_float_type): Likewise.
3936
3937 2017-09-27 Ulrich Weigand <uweigand@de.ibm.com>
3938
3939 * gdbtypes.c (init_type): Change incoming argument from
3940 length-in-bytes to length-in-bits. Assert length is a
3941 multiple of TARGET_CHAR_BITS.
3942 (arch_type, arch_flags_type): Likewise.
3943 (init_integer_type): Update call to init_type.
3944 (init_character_type): Likewise.
3945 (init_boolean_type): Likewise.
3946 (init_float_type): Likewise.
3947 (init_decfloat_type): Likewise.
3948 (init_complex_type): Likewise.
3949 (init_pointer_type): Likewise.
3950 (objfile_type): Likewise.
3951 (arch_integer_type): Update call to arch_type.
3952 (arch_character_type): Likewise.
3953 (arch_boolean_type): Likewise.
3954 (arch_float_type): Likewise.
3955 (arch_decfloat_type): Likewise.
3956 (arch_complex_type): Likewise.
3957 (arch_pointer_type): Likewise.
3958 (gdbtypes_post_init): Likewise.
3959
3960 * dwarf2read.c (dwarf2_init_float_type): Update call to init_type.
3961 (read_base_type): Likewise.
3962 * mdebugread.c (basic_type): Likewise.
3963 * stabsread.c (dbx_init_float_type): Likewise.
3964 (rs6000_builtin_type): Likewise.
3965 (read_range_type): Likewise. Also, fix call to init_integer_type
3966 with erroneous length argument.
3967
3968 * ada-lang.c (ada_language_arch_info): Update call to arch_type.
3969 * d-lang.c (build_d_types): Likewise.
3970 * f-lang.c (build_fortran_types): Likewise.
3971 * go-lang.c (build_go_types): Likewise.
3972 * opencl-lang.c (build_opencl_types): Likewise.
3973 * jit.c (finalize_symtab): Likewise.
3974 * gnu-v3-abi.c (build_gdb_vtable_type): Likewise.
3975 (build_std_type_info_type): Likewise.
3976 * target-descriptions.c (tdesc_gdb_type): Likewise. Also,
3977 update call to arch_flags_type.
3978
3979 * linux-tdep.c (linux_get_siginfo_type_with_fields): Update call to
3980 arch_type.
3981 * fbsd-tdep.c (fbsd_get_siginfo_type): Likewise.
3982 * windows-tdep.c (windows_get_tlb_type): Likewise.
3983
3984 * avr-tdep.c (avr_gdbarch_init): Update call to arch_type.
3985 * ft32-tdep.c (ft32_gdbarch_init): Likewise.
3986 * m32c-tdep.c (make_types): Likewise.
3987 * rl78-tdep.c (rl78_gdbarch_init): Likewise.
3988 (rl78_psw_type): Update call to arch_flags_type.
3989 * m68k-tdep.c (m68k_ps_type): Update call to arch_flags_type.
3990 * rx-tdep.c (rx_psw_type): Likewise.
3991 (rx_fpsw_type): Likewise.
3992 * sparc-tdep.c (sparc_psr_type): Likewise.
3993 (sparc_fsr_type): Likewise.
3994 * sparc64-tdep.c (sparc64_pstate_type): Likewise.
3995 (sparc64_ccr_type): Likewise.
3996 (sparc64_fsr_type): Likewise.
3997 (sparc64_fprs_type): Likewise.
3998
3999 2017-09-27 Tom Tromey <tom@tromey.com>
4000
4001 * findcmd.c (find_command): Constify.
4002
4003 2017-09-27 Tom Tromey <tom@tromey.com>
4004
4005 * ada-tasks.c (task_command_1, task_command): Constify.
4006
4007 2017-09-27 Tom Tromey <tom@tromey.com>
4008
4009 * symtab.c (maintenance_print_symbol_cache)
4010 (maintenance_flush_symbol_cache)
4011 (maintenance_print_symbol_cache_statistics): Constify.
4012
4013 2017-09-27 Tom Tromey <tom@tromey.com>
4014
4015 * inferior.c (detach_inferior_command, kill_inferior_command)
4016 (inferior_command): Constify.
4017
4018 2017-09-27 Tom Tromey <tom@tromey.com>
4019
4020 * regcache.c (regcache_print, maintenance_print_registers)
4021 (maintenance_print_raw_registers)
4022 (maintenance_print_cooked_registers)
4023 (maintenance_print_register_groups)
4024 (maintenance_print_remote_registers): Constify.
4025
4026 2017-09-27 Tom Tromey <tom@tromey.com>
4027
4028 * printcmd.c (map_display_numbers, undisplay_command)
4029 (enable_disable_display_command, enable_display_command)
4030 (disable_display_command): Constify.
4031
4032 2017-09-27 Tom Tromey <tom@tromey.com>
4033
4034 * breakpoint.h (delete_command): Don't declare.
4035 * breakpoint.c (delete_command, enable_once_command)
4036 (enable_count_command, enable_delete_command, breakpoint_1)
4037 (maintenance_info_breakpoints, stopin_command, stopat_command)
4038 (delete_command, delete_trace_command, save_breakpoints)
4039 (save_breakpoints_command, save_tracepoints_command): Constify.
4040
4041 2017-09-27 Tom Tromey <tom@tromey.com>
4042
4043 * macrocmd.c (macro_expand_command, macro_expand_once_command)
4044 (skip_ws, extract_identifier, macro_define_command)
4045 (macro_undef_command, macro_list_command): Constify.
4046
4047 2017-09-27 Tom Tromey <tom@tromey.com>
4048
4049 * infcmd.c (environment_info, set_environment_command)
4050 (unset_environment_command, path_info, info_proc_cmd_1)
4051 (info_proc_cmd_mappings, info_proc_cmd_stat)
4052 (info_proc_cmd_status, info_proc_cmd_cwd, info_proc_cmd_cmdline)
4053 (info_proc_cmd_exe, info_proc_cmd_all): Constify.
4054
4055 2017-09-27 Tom Tromey <tom@tromey.com>
4056
4057 * i386-tdep.c (i386_mpx_info_bounds, i386_mpx_set_bounds):
4058 Constify.
4059
4060 2017-09-27 Tom Tromey <tom@tromey.com>
4061
4062 * symfile-mem.c (add_symbol_file_from_memory_command): Constify.
4063
4064 2017-09-27 Tom Tromey <tom@tromey.com>
4065
4066 * demangle.c (demangle_command): Constify.
4067
4068 2017-09-27 Tom Tromey <tom@tromey.com>
4069
4070 * progspace.c (maintenance_info_program_spaces_command):
4071 Constify.
4072
4073 2017-09-27 Tom Tromey <tom@tromey.com>
4074
4075 * compile/compile.c (check_raw_argument, compile_file_command)
4076 (compile_code_command, compile_print_command): Constify.
4077
4078 2017-09-27 Tom Tromey <tom@tromey.com>
4079
4080 * reggroups.c (maintenance_print_reggroups): Constify.
4081
4082 2017-09-27 Tom Tromey <tom@tromey.com>
4083
4084 * dwarf2read.c (save_gdb_index_command): Constify.
4085
4086 2017-09-27 Tom Tromey <tom@tromey.com>
4087
4088 * stap-probe.c (info_probes_stap_command): Constify.
4089
4090 2017-09-27 Tom Tromey <tom@tromey.com>
4091
4092 * fork-child.c (unset_exec_wrapper_command): Constify.
4093
4094 2017-09-27 Tom Tromey <tom@tromey.com>
4095
4096 * btrace.c (get_uint, get_context_size, no_chunk)
4097 (maint_btrace_packet_history_cmd)
4098 (maint_btrace_clear_packet_history_cmd, maint_btrace_clear_cmd)
4099 (maint_info_btrace_cmd): Constify.
4100
4101 2017-09-27 Tom Tromey <tom@tromey.com>
4102
4103 * reverse.c (delete_bookmark_command): Constify.
4104
4105 2017-09-27 Tom Tromey <tom@tromey.com>
4106
4107 * remote.c (set_memory_packet_size)
4108 (set_memory_write_packet_size, show_memory_write_packet_size)
4109 (set_memory_read_packet_size, show_memory_read_packet_size)
4110 (compare_sections_command, packet_command, remote_put_command)
4111 (remote_get_command, remote_delete_command): Constify.
4112
4113 2017-09-27 Tom Tromey <tom@tromey.com>
4114
4115 * mips-tdep.c (show_mipsfpu_command, set_mipsfpu_single_command)
4116 (set_mipsfpu_double_command, set_mipsfpu_none_command)
4117 (set_mipsfpu_auto_command): Constify.
4118
4119 2017-09-27 Tom Tromey <tom@tromey.com>
4120
4121 * cli/cli-cmds.h (cd_command): Constify.
4122 * cli/cli-cmds.c (cd_command): Constify.
4123
4124 2017-09-27 Tom Tromey <tom@tromey.com>
4125
4126 * thread.c (thread_name_command, thread_find_command): Constify.
4127
4128 2017-09-27 Tom Tromey <tom@tromey.com>
4129
4130 * probe.c (enable_probes_command, disable_probes_command):
4131 Constify.
4132
4133 2017-09-27 Tom Tromey <tom@tromey.com>
4134
4135 * symfile.c (symbol_file_command): Constify.
4136 * gdbcore.h (deprecated_file_changed_hook): Constify.
4137 * exec.c (deprecated_file_changed_hook, exec_file_command)
4138 (file_command): Constify.
4139 * defs.h (symbol_file_command): Constify.
4140
4141 2017-09-27 Tom Tromey <tom@tromey.com>
4142
4143 * remote-fileio.c (set_system_call_allowed)
4144 (show_system_call_allowed): Constify.
4145
4146 2017-09-27 Tom Tromey <tom@tromey.com>
4147
4148 * tracepoint.c (delete_trace_variable_command)
4149 (tfind_end_command, tfind_start_command, tfind_pc_command)
4150 (tfind_tracepoint_command, tfind_line_command)
4151 (tfind_range_command, tfind_outside_command): Constify.
4152
4153 2017-09-27 Tom Tromey <tom@tromey.com>
4154
4155 * ax-gdb.c (maint_agent_printf_command, agent_command)
4156 (agent_eval_command): Constify.
4157
4158 2017-09-27 Tom Tromey <tom@tromey.com>
4159
4160 * tracepoint.c (info_scope_command): Constify.
4161 * python/python.c (gdbpy_decode_line): Constify.
4162 * python/py-breakpoint.c (bppy_init): Constify.
4163 * mi/mi-cmd-break.c (mi_cmd_break_insert_1): Constify.
4164 * location.h: (new_linespec_location)
4165 (string_to_event_location_basic, string_to_event_location):
4166 Constify.
4167 * location.c (new_linespec_location)
4168 (string_to_event_location_basic, string_to_event_location):
4169 Constify.
4170 * linespec.h (decode_line_with_current_source)
4171 (decode_line_with_last_displayed, linespec_lex_to_end): Constify.
4172 * linespec.c (linespec_lex_to_end)
4173 (decode_line_with_current_source)
4174 (decode_line_with_last_displayed): Constify.
4175 * guile/scm-breakpoint.c (gdbscm_register_breakpoint_x):
4176 Constify.
4177 * cli/cli-cmds.c (edit_command, list_command): Constify.
4178 * breakpoint.h (until_break_command, watch_command_wrapper)
4179 (awatch_command_wrapper, rwatch_command_wrapper)
4180 (init_ada_exception_breakpoint): Constify.
4181 * breakpoint.c (break_command_1, dprintf_command)
4182 (break_range_command, watch_command_wrapper)
4183 (rwatch_command_wrapper, awatch_command_wrapper)
4184 (until_break_command, init_ada_exception_breakpoint)
4185 (strace_marker_create_sals_from_location, trace_command)
4186 (ftrace_command, strace_command, struct tracepoint): Constify.
4187 * ax-gdb.c (agent_command_1): Constify.
4188 * ada-lang.c (ada_exception_sal): Constify.
4189
4190 2017-09-27 Tom Tromey <tom@tromey.com>
4191
4192 * record.c (cmd_record_delete, cmd_record_stop, cmd_record_save)
4193 (cmd_record_goto_begin, cmd_record_goto_end, get_insn_number)
4194 (get_context_size, no_chunk, get_insn_history_modifiers)
4195 (cmd_record_insn_history, get_call_history_modifiers)
4196 (cmd_record_call_history): Constify.
4197
4198 2017-09-27 Tom Tromey <tom@tromey.com>
4199
4200 * source.c (show_substitute_path_command)
4201 (unset_substitute_path_command, set_substitute_path_command):
4202 Constify.
4203
4204 2017-09-27 Tom Tromey <tom@tromey.com>
4205
4206 * typeprint.c (maintenance_print_type): Constify.
4207 * maint.c (maintenance_dump_me, maintenance_demangle)
4208 (maintenance_time_display, maintenance_info_sections)
4209 (maintenance_print_statistics, maintenance_deprecate)
4210 (maintenance_undeprecate): Constify.
4211 (maintenance_do_deprecate): Constify. Use std::string.
4212 (maintenance_selftest): Constify.
4213 * gdbtypes.h (maintenance_print_type): Constify.
4214
4215 2017-09-27 Tom Tromey <tom@tromey.com>
4216
4217 * hppa-tdep.c (unwind_command): Constify.
4218
4219 2017-09-27 Tom Tromey <tom@tromey.com>
4220
4221 * target-descriptions.c (unset_tdesc_filename_cmd)
4222 (maint_print_c_tdesc_cmd, maintenance_check_xml_descriptions):
4223 Constify.
4224
4225 2017-09-27 Tom Tromey <tom@tromey.com>
4226
4227 * dummy-frame.c (maintenance_print_dummy_frames): Constify.
4228
4229 2017-09-27 Tom Tromey <tom@tromey.com>
4230
4231 * tui/tui.c (tui_enable_command, tui_disable_command): Constify.
4232
4233 2017-09-27 Tom Tromey <tom@tromey.com>
4234
4235 * tui/tui-regs.c (tui_reg_command): Constify.
4236
4237 2017-09-27 Tom Tromey <tom@tromey.com>
4238
4239 * skip.c (skip_file_command, skip_function_command)
4240 (skip_enable_command, skip_disable_command, skip_delete_command):
4241 Constify.
4242
4243 2017-09-27 Tom Tromey <tom@tromey.com>
4244
4245 * record-btrace.c (cmd_record_btrace_bts_start)
4246 (cmd_record_btrace_pt_start): Constify.
4247
4248 2017-09-27 Tom Tromey <tom@tromey.com>
4249
4250 * symmisc.c (maintenance_print_symbols)
4251 (maintenance_print_msymbols, maintenance_print_objfiles)
4252 (maintenance_info_symtabs, maintenance_check_symtabs)
4253 (maintenance_expand_symtabs, maintenance_info_line_tables):
4254 Constify.
4255
4256 2017-09-27 Tom Tromey <tom@tromey.com>
4257
4258 * top.c (new_ui_command): Constify.
4259
4260 2017-09-27 Tom Tromey <tom@tromey.com>
4261
4262 * symfile.c (add_symbol_file_command)
4263 (remove_symbol_file_command, list_overlays_command)
4264 (map_overlay_command, unmap_overlay_command)
4265 (overlay_auto_command, overlay_manual_command)
4266 (overlay_off_command, overlay_load_command): Constify.
4267
4268 2017-09-27 Tom Tromey <tom@tromey.com>
4269
4270 * spu-tdep.c (info_spu_event_command, info_spu_signal_command)
4271 (info_spu_mailbox_command, info_spu_dma_command)
4272 (info_spu_proxydma_command): Constify.
4273
4274 2017-09-27 Tom Tromey <tom@tromey.com>
4275
4276 * cli/cli-logging.c (set_logging_on, set_logging_off): Constify.
4277
4278 2017-09-27 Tom Tromey <tom@tromey.com>
4279
4280 * cli/cli-script.c (user_defined_command): Constify.
4281
4282 2017-09-27 Tom Tromey <tom@tromey.com>
4283
4284 * cli/cli-dump.c (dump_memory_command, dump_value_command)
4285 (dump_srec_memory, dump_srec_value, dump_ihex_memory)
4286 (dump_ihex_value, dump_verilog_memory, dump_verilog_value)
4287 (dump_tekhex_memory, dump_tekhex_value, dump_binary_memory)
4288 (dump_binary_value, append_binary_memory, append_binary_value):
4289 Constify.
4290 (struct dump_context) <func>: Constify.
4291 (add_dump_command): Update.
4292
4293 2017-09-27 Tom Tromey <tom@tromey.com>
4294
4295 * cli/cli-cmds.c (show_version, show_configuration)
4296 (source_command, show_user): Constify.
4297
4298 2017-09-27 Tom Tromey <tom@tromey.com>
4299
4300 * target.c (maintenance_print_target_stack): Constify.
4301
4302 2017-09-27 Tom Tromey <tom@tromey.com>
4303
4304 * interps.c (interpreter_exec_cmd): Constify.
4305
4306 2017-09-27 Tom Tromey <tom@tromey.com>
4307
4308 * record-full.c (cmd_record_full_restore): Constify.
4309
4310 2017-09-27 Tom Tromey <tom@tromey.com>
4311
4312 * memattr.c (enable_mem_command, disable_mem_command)
4313 (delete_mem_command): Constify.
4314
4315 2017-09-27 Tom Tromey <tom@tromey.com>
4316
4317 * value.c (show_convenience): Constify.
4318
4319 2017-09-27 Tom Tromey <tom@tromey.com>
4320
4321 * gdbcore.h (core_file_command): Update.
4322 * corefile.c (core_file_command): Constify.
4323
4324 2017-09-27 Tom Tromey <tom@tromey.com>
4325
4326 * user-regs.c (maintenance_print_user_registers): Constify.
4327
4328 2017-09-27 Tom Tromey <tom@tromey.com>
4329
4330 * cp-namespace.c (maintenance_cplus_namespace): Constify.
4331
4332 2017-09-27 Tom Tromey <tom@tromey.com>
4333
4334 * cp-support.c (first_component_command): Constify.
4335
4336 2017-09-27 Tom Tromey <tom@tromey.com>
4337
4338 * psymtab.c (maintenance_print_psymbols)
4339 (maintenance_info_psymtabs, maintenance_check_psymtabs):
4340 Constify.
4341
4342 2017-09-27 Tom Tromey <tom@tromey.com>
4343
4344 * windows-tdep.c (display_tib): Constify.
4345
4346 2017-09-27 Tom Tromey <tom@tromey.com>
4347
4348 * linux-fork.c (delete_checkpoint_command)
4349 (detach_checkpoint_command): Constify.
4350
4351 2017-09-27 Tom Tromey <tom@tromey.com>
4352
4353 * cp-abi.c (set_cp_abi_cmd, show_cp_abi_cmd): Constify.
4354
4355 2017-09-27 Tom Tromey <tom@tromey.com>
4356
4357 * arc-tdep.c (dump_arc_instruction_command): Constify.
4358
4359 2017-09-27 Tom Tromey <tom@tromey.com>
4360
4361 * valprint.c (set_radix, show_radix): Constify.
4362
4363 2017-09-27 Tom Tromey <tom@tromey.com>
4364
4365 * dtrace-probe.c (info_probes_dtrace_command): Constify.
4366
4367 2017-09-27 Tom Tromey <tom@tromey.com>
4368
4369 * command.h (not_just_help_class_command): Update.
4370 * cli/cli-decode.h (not_just_help_class_command): Update.
4371 * cli/cli-decode.c (not_just_help_class_command): Constify.
4372
4373 2017-09-27 Tom Tromey <tom@tromey.com>
4374
4375 * gdb_bfd.c (maintenance_info_bfds): Constify.
4376
4377 2017-09-27 Tom Tromey <tom@tromey.com>
4378
4379 * cli/cli-decode.c (add_cmd, set_cmd_cfunc): New function
4380 overloads.
4381 (do_add_cmd): Rename from add_cmd. Don't call set_cmd_cfunc.
4382 (do_const_cfunc): New function.
4383 (cmd_cfunc_eq): New overload.
4384 (cli_user_command_p): Check do_const_cfunc.
4385 * cli/cli-decode.h (struct cmd_list_element) <function>: New field
4386 const_cfunc.
4387 * command.h (add_cmd): Add const overload and no-function
4388 overload.
4389 (set_cmd_cfunc): Add const overload.
4390 (cmd_const_cfunc_ftype): Declare.
4391 (cmd_cfunc_eq): Add const overload.
4392 * breakpoint.c, cli-cmds.c, cli-dump.c, guile/scm-cmd.c,
4393 python/py-cmd.c, target.c, tracepoint.c: Use no-function add_cmd
4394 overload.
4395
4396 2017-09-27 Tom Tromey <tom@tromey.com>
4397
4398 * macroexp.c (get_next_token_for_substitution): New function.
4399 (substitute_args): Call it. Check for __VA_OPT__.
4400
4401 2017-09-26 Walfred Tedeschi <walfred.tedeschi@intel.com>
4402 Pedro Alves <palves@redhat.com>
4403
4404 * dwarf2read.c (dwarf2_cu): Remove field producer_is_icc and add
4405 producer_is_icc_lt_14.
4406 (producer_is_icc_lt_14): New function.
4407 (check_producer): Add code for checking version of ICC.
4408 (producer_is_icc): Move to producer.c.
4409 (read_structure_type): Restrict ICC workaround to ICC<14.
4410 * producer.c: Include selftest.h.
4411 (producer_is_icc, producer_parsing_tests, _initialize_producer):
4412 New functions.
4413 * producer.h (producer_is_icc): New declaration.
4414
4415 2017-09-26 Walfred Tedeschi <walfred.tedeschi@intel.com>
4416
4417 * Makefile.in (SFILES): Add producer.c.
4418 (COMMON_OBS): Add producer.o
4419 * amd64-tdep.c (producer.h): Add new include.
4420 * dwarf2read.c (producer.h): Add new include.
4421 * producer.c: New file.
4422 * producer.h: New file.
4423 * utils.c (producer_is_gcc, producer_is_gcc_ge_4): Move to
4424 producer.c.
4425 * utils.h (producer_is_gcc, producer_is_gcc_ge_4): Move to
4426 producer.h.
4427
4428 2017-09-26 Matthias Klose <doko@ubuntu.com>
4429
4430 * configure.ac: Search ncursesw before ncurses.
4431 Check ncursesw/ncurses.h before ncurses/ncurses.h.
4432 * gdb_curses.h: Include <ncursesw/ncurses.h>
4433 * config.in, configure: Regenerate.
4434
4435 2017-09-26 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
4436
4437 PR gdb/22185
4438 * configure.host <*-*-solaris2.[01], *-*-solaris2.[2-9]*>: Mark as
4439 obsolete.
4440 Use gdb_host sol2 for i[34567]86-*-solaris2*, x86_64-*-solaris2*.
4441 Remove i386sol2 support.
4442 * configure.nat <i386sol2>: Remove.
4443 <sol2-64>: Fold into ...
4444 <sol2>: ... this.
4445 Move common settings to default section.
4446 Add sol-thread.o.
4447 * configure.tgt <i[34567]86-*-solaris2.1[0-9]*,
4448 x86_64-*-solaris2.1[0-9]*>: Rename to ...
4449 <i[34567]86-*-solaris2*, x86_64-*-solaris2*>: ... this.
4450 <i[34567]86-*-solaris*>: Remove.
4451 <sparc-*-solaris2.[0-6], sparc-*-solaris2.[0-6].*>: Remove.
4452
4453 * configure.ac: Remove wctype in libw check.
4454 (_MSE_INT_H): Don't define on Solaris 7-9.
4455 <solaris*>: Remove libthread_db.so.1 check.
4456 * configure: Regenerate.
4457 * config.in: Regenerate.
4458
4459 * proc-service.c: Remove PROC_SERVICE_IS_OLD handling.
4460 (gdb_ps_prochandle_t, gdb_ps_read_buf_t, gdb_ps_write_buf_t)
4461 (gdb_ps_size_t): Remove.
4462 Use base types in users.
4463 * sol-thread.c: Likewise, also for gdb_ps_addr_t.
4464
4465 * NEWS (Changes since GDB 8.0): Document Solaris 2.0-9 removal.
4466
4467 2017-09-26 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
4468
4469 PR build/22206
4470 * sparc64-tdep.c (adi_tag_fd): Print pid as long.
4471 (adi_is_addr_mapped): Likewise.
4472 (PSR_ICC): Don't redefine.
4473 (PSR_IMPL): Likewise.
4474
4475 2017-09-25 Tom Tromey <tom@tromey.com>
4476
4477 * regcache.c (regcache::dump): Use string_printf.
4478
4479 2017-09-25 Tom Tromey <tom@tromey.com>
4480
4481 * regcache.c (class regcache_invalidator): New.
4482 (struct register_to_invalidate): Remove.
4483 (make_cleanup_regcache_invalidate): Remove.
4484 (regcache::raw_write): Use regcache_invalidator.
4485
4486 2017-09-25 Tom Tromey <tom@tromey.com>
4487
4488 * spu-tdep.c (spu2ppu_sniffer): Update.
4489 * regcache.h (make_cleanup_regcache_xfree): Don't declare.
4490 * regcache.c (do_regcache_xfree, make_cleanup_regcache_xfree):
4491 Remove.
4492 * ppc-linux-tdep.c (ppu2spu_sniffer): Update.
4493 * mi/mi-main.c (mi_cmd_data_list_changed_registers): Update.
4494 * frame.h (frame_save_as_regcache): Return std::unique_ptr.
4495 * frame.c (frame_save_as_regcache): Return std::unique_ptr.
4496 (frame_pop): Update.
4497
4498 2017-09-25 Tom Tromey <tom@tromey.com>
4499
4500 * spu-tdep.c (spu2ppu_dealloc_cache): Use delete.
4501 * regcache.h (regcache_xfree): Don't declare.
4502 * regcache.c (regcache_xfree): Remove.
4503 (do_regcache_xfree): Use delete.
4504 * ppc-linux-tdep.c (ppu2spu_dealloc_cache): Use delete.
4505 * linux-fork.c (free_fork): Use delete.
4506 (fork_save_infrun_state): Likewise.
4507 * jit.c (jit_dealloc_cache): Use delete.
4508 * infrun.c (discard_infcall_suspend_state): Use delete.
4509
4510 2017-09-25 Tom Tromey <tom@tromey.com>
4511
4512 * regcache.h (regcache_xmalloc): Don't declare.
4513 (regcache_raw_set_cached_value): Update comment.
4514 * regcache.c (regcache_xmalloc): Remove.
4515 * ppc-linux-tdep.c (ppu2spu_sniffer): Use new.
4516 * jit.c (jit_frame_sniffer): Use new.
4517 * frame.c (frame_save_as_regcache): Use new.
4518
4519 2017-09-25 Andreas Arnez <arnez@linux.vnet.ibm.com>
4520
4521 * NEWS: Advertise support for guarded-storage registers on IBM z.
4522
4523 2017-09-25 Andreas Arnez <arnez@linux.vnet.ibm.com>
4524
4525 * s390-linux-nat.c (have_regset_gs): New static variable.
4526 (s390_linux_fetch_inferior_registers): Handle guarded-storage
4527 control block and guarded-storage broadcast control regsets.
4528 (s390_read_description): Detect whether the target has
4529 guarded-storage support, return appropriate tdesc.
4530 * s390-linux-tdep.c (features/s390-gs-linux64.c): New include.
4531 (features/s390x-gs-linux64.c): Likewise.
4532 (struct gdbarch_tdep) <have_gs>: New field.
4533 (s390_regmap_gs, s390_regmap_gsbc, s390_gs_regset)
4534 (s390_gsbc_regset): New variables.
4535 (s390_iterate_over_regset_sections): Iterate over s390_gs_regset
4536 and s390_gsbc_regset, if applicable.
4537 (s390_core_read_description): Check whether core file was from a
4538 target with guarded-storage support; include appropriate regsets.
4539 (s390_gdbarch_init): Add registers for guarded-storage support.
4540 (_initialize_s390_tdep): Initialize new target descriptions that
4541 include registers for guarded-storage support.
4542 * s390-linux-tdep.h (HWCAP_S390_GS, S390_GSD_REGNUM)
4543 (S390_GSSM_REGNUM, S390_GSEPLA_REGNUM)
4544 (S390_BC_GSD_REGNUM, S390_BC_GSSM_REGNUM): New defines.
4545 (S390_NUM_REGS): Adjust macro definition.
4546 (s390_gs_regset, s390_gsbc_regset, tdesc_s390_gs_linux64)
4547 (tdesc_s390x_gs_linux64): New declarations.
4548
4549 2017-09-25 Andreas Arnez <arnez@linux.vnet.ibm.com>
4550
4551 * features/s390-gs-linux64.xml: New file.
4552 * features/s390-gs.xml: New file.
4553 * features/s390-gsbc.xml: New file.
4554 * features/s390x-gs-linux64.xml: New file.
4555 * features/Makefile (WHICH): Add s390-gs-linux64 and
4556 s390x-gs-linux64.
4557 (s390-gs-linux64-expedite, s390x-gs-linux64-expedite): New macros.
4558 (XMLTOC): Add s390-gs-linux64.xml and s390x-linux64.xml.
4559 * features/s390-gs-linux64.c: New generated file.
4560 * features/s390x-gs-linux64.c: New file.
4561 * regformats/s390-gs-linux64.dat: New file.
4562 * regformats/s390x-gs-linux64.dat: New file.
4563
4564 2017-09-23 Tom Tromey <tom@tromey.com>
4565
4566 * defs.h (make_cleanup_override_quit_handler): Don't declare.
4567
4568 2017-09-22 Tom Tromey <tom@tromey.com>
4569
4570 * utils.c (class scoped_input_handler) <m_quit_handler>: Change
4571 type to scoped_restore_tmpl.
4572 <scoped_input_handler>: Initialize m_quit_handler directly.
4573
4574 2017-09-22 Sergio Durigan Junior <sergiodj@redhat.com>
4575
4576 * cli/cli-cmds.c (pwd_command): Use "getcwd (NULL, 0)".
4577 (cd_command): Likewise. Free "current_directory" before
4578 assigning to it.
4579 * main.c (captured_main_1): Use "getcwd (NULL, 0)".
4580 * mi/mi-cmd-env.c (mi_cmd_env_pwd): Likewise.
4581 * top.c (gdb_dirbuf): Remove global declaration.
4582 * top.h (gdb_dirbuf): Likewise.
4583
4584 2017-09-22 Sergio Durigan Junior <sergiodj@redhat.com>
4585
4586 * gnulib/aclocal.m4: Regenerate.
4587 * gnulib/config.in: Regenerate.
4588 * gnulib/configure: Regenerate.
4589 * gnulib/import/Makefile.am: Regenerate.
4590 * gnulib/import/Makefile.in: Regenerate.
4591 * gnulib/import/assure.h: New file.
4592 * gnulib/import/at-func.c: Likewise
4593 * gnulib/import/chdir-long.c: New file.
4594 * gnulib/import/chdir-long.h: New file.
4595 * gnulib/import/cloexec.c: New file.
4596 * gnulib/import/cloexec.h: New file.
4597 * gnulib/import/close.c: New file.
4598 * gnulib/import/closedir.c: New file.
4599 * gnulib/import/dirent-private.h: New file.
4600 * gnulib/import/dup-safer.c: New file.
4601 * gnulib/import/dup.c: New file.
4602 * gnulib/import/dup2.c: New file.
4603 * gnulib/import/error.c: New file.
4604 * gnulib/import/error.h: New file.
4605 * gnulib/import/exitfail.c: New file.
4606 * gnulib/import/exitfail.h: New file.
4607 * gnulib/import/fchdir.c: New file.
4608 * gnulib/import/fcntl.c: New file.
4609 * gnulib/import/fcntl.in.h: New file.
4610 * gnulib/import/fd-hook.c: New file.
4611 * gnulib/import/fd-hook.h: New file.
4612 * gnulib/import/fd-safer.c: New file.
4613 * gnulib/import/fdopendir.c: New file.
4614 * gnulib/import/filename.h: New file.
4615 * gnulib/import/filenamecat-lgpl.c: New file.
4616 * gnulib/import/filenamecat.h: New file.
4617 * gnulib/import/fstat.c: New file.
4618 * gnulib/import/fstatat.c: New file.
4619 * gnulib/import/getcwd-lgpl.c: New file.
4620 * gnulib/import/getcwd.c: New file.
4621 * gnulib/import/getdtablesize.c: New file.
4622 * gnulib/import/getlogin_r.c: New file.
4623 * gnulib/import/getprogname.c: New file.
4624 * gnulib/import/getprogname.h: New file.
4625 * gnulib/import/gettext.h: New file.
4626 * gnulib/import/glob-libc.h: New file.
4627 * gnulib/import/glob.c: New file.
4628 * gnulib/import/glob.in.h: New file.
4629 * gnulib/import/intprops.h: New file.
4630 * gnulib/import/m4/chdir-long.m4: New file.
4631 * gnulib/import/m4/close.m4: New file.
4632 * gnulib/import/m4/closedir.m4: New file.
4633 * gnulib/import/m4/d-ino.m4: New file.
4634 * gnulib/import/m4/d-type.m4: New file.
4635 * gnulib/import/m4/dup.m4: New file.
4636 * gnulib/import/m4/dup2.m4: New file.
4637 * gnulib/import/m4/error.m4: New file.
4638 * gnulib/import/m4/fchdir.m4: New file.
4639 * gnulib/import/m4/fcntl.m4: New file.
4640 * gnulib/import/m4/fcntl_h.m4: New file.
4641 * gnulib/import/m4/fdopendir.m4: New file.
4642 * gnulib/import/m4/filenamecat.m4: New file.
4643 * gnulib/import/m4/fstat.m4: New file.
4644 * gnulib/import/m4/fstatat.m4: New file.
4645 * gnulib/import/m4/getcwd-abort-bug.m4: New file.
4646 * gnulib/import/m4/getcwd-path-max.m4: New file.
4647 * gnulib/import/m4/getcwd.m4: New file.
4648 * gnulib/import/m4/getdtablesize.m4: New file.
4649 * gnulib/import/m4/getlogin_r.m4: New file.
4650 * gnulib/import/m4/getprogname.m4: New file.
4651 * gnulib/import/m4/glob.m4: New file.
4652 * gnulib/import/m4/gnulib-cache.m4: Regenerate.
4653 * gnulib/import/m4/gnulib-comp.m4: Regenerate.
4654 * gnulib/import/m4/mempcpy.m4: New file.
4655 * gnulib/import/m4/memrchr.m4: New file.
4656 * gnulib/import/m4/mode_t.m4: New file.
4657 * gnulib/import/m4/msvc-inval.m4: New file.
4658 * gnulib/import/m4/msvc-nothrow.m4: New file.
4659 * gnulib/import/m4/open.m4: New file.
4660 * gnulib/import/m4/openat.m4: New file.
4661 * gnulib/import/m4/opendir.m4: New file.
4662 * gnulib/import/m4/readdir.m4: New file.
4663 * gnulib/import/m4/realloc.m4: New file.
4664 * gnulib/import/m4/rewinddir.m4: New file.
4665 * gnulib/import/m4/save-cwd.m4: New file.
4666 * gnulib/import/m4/strdup.m4: New file.
4667 * gnulib/import/m4/strerror.m4: New file.
4668 * gnulib/import/m4/unistd-safer.m4: New file.
4669 * gnulib/import/mempcpy.c: New file.
4670 * gnulib/import/memrchr.c: New file.
4671 * gnulib/import/msvc-inval.c: New file.
4672 * gnulib/import/msvc-inval.h: New file.
4673 * gnulib/import/msvc-nothrow.c: New file.
4674 * gnulib/import/msvc-nothrow.h: New file.
4675 * gnulib/import/open.c: New file.
4676 * gnulib/import/openat-die.c: New file.
4677 * gnulib/import/openat-priv.h: New file.
4678 * gnulib/import/openat-proc.c: New file.
4679 * gnulib/import/openat.c: New file.
4680 * gnulib/import/openat.h: New file.
4681 * gnulib/import/opendir.c: New file.
4682 * gnulib/import/pipe-safer.c: New file.
4683 * gnulib/import/readdir.c: New file.
4684 * gnulib/import/realloc.c: New file.
4685 * gnulib/import/rewinddir.c: New file.
4686 * gnulib/import/save-cwd.c: New file.
4687 * gnulib/import/save-cwd.h: New file.
4688 * gnulib/import/strdup.c: New file.
4689 * gnulib/import/strerror-override.c: New file.
4690 * gnulib/import/strerror-override.h: New file.
4691 * gnulib/import/strerror.c: New file.
4692 * gnulib/import/unistd--.h: New file.
4693 * gnulib/import/unistd-safer.h: New file.
4694 * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add
4695 "getcwd" and "glob".
4696 * ser-tcp.c: Undefine "close" before redefining it.
4697
4698 2017-09-21 Simon Marchi <simon.marchi@ericsson.com>
4699
4700 * guile/scm-value.c (gdbscm_value_address): Initialize address,
4701 get rid of res_val.
4702
4703 2017-09-22 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
4704
4705 * configure.nat <i386sol2,i386>: Add fork-inferior.o to NATDEPFILES.
4706 <sol2,sparc>: Likewise.
4707 <sol2-64,i386>: Likewise.
4708
4709 * warning.m4 (AM_GDB_WARNINGS): Disable -Wunknown-pragmas,
4710 -Wdeprecated-declarations on *-*-solaris*.
4711 * configure: Regenerate.
4712
4713 * procfs.c: Include "nat/inferior.h".
4714 (procfs_info_proc): Fix typo.
4715
4716 2017-09-21 Kevin Buettner <kevinb@redhat.com>
4717
4718 * remote.c (vector): Include.
4719 (struct private_thread_info): Add field, thread_handle.
4720 (free_private_thread_info): Deallocate storage associated with
4721 thread handle.
4722 (get_private_info_thread): Initialize `thread_handle' field.
4723 (struct thread_item): Add field, thread_handle.
4724 (clear_threads_listing_context): Deallocate storage associated
4725 with thread handle.
4726 (start_thread): Add support for "handle" attribute.
4727 (thread_attributes): Add "handle".
4728 (remote_get_threads_with_qthreadinfo): Initialize thread_handle
4729 field.
4730 (remote_update_thread_list): Update thread_handle.
4731 (remote_thread_handle_to_thread_info): New function.
4732 (init_remote_ops): Initialize to_thread_handle_to_thread_info.
4733
4734 2017-09-21 Kevin Buettner <kevinb@redhat.com>
4735
4736 * python/py-inferior.c (gdbpy_thread_from_thread_handle): New
4737 function.
4738 (inferior_object_methods): Add gdbpy_thread_from_thread_handle.
4739 * python/python-internal.h (thread_object_type): Declare.
4740
4741 2017-09-21 Kevin Buettner <kevinb@redhat.com>
4742
4743 * target.h (struct target_ops): Add to_thread_handle_to_thread_info.
4744 (target_thread_handle_to_thread_info): Declare.
4745 * target.c (target_thread_handle_to_thread_info): New function.
4746 * target-delegates.c: Regenerate.
4747 * gdbthread.h (find_thread_by_handle): Declare.
4748 * thread.c (find_thread_by_handle): New function.
4749 * linux-thread-db.c (thread_db_thread_handle_to_thread_info): New
4750 function.
4751 (init_thread_db_ops): Register thread_db_thread_handle_to_thread_info.
4752
4753 2017-09-21 Simon Marchi <simon.marchi@ericsson.com>
4754
4755 * nat/linux-waitpid.c (linux_debug): Add ATTRIBUTE_PRINTF.
4756
4757 2017-09-21 Simon Marchi <simon.marchi@ericsson.com>
4758
4759 * microblaze-tdep.c (microblaze_debug): Add ATTRIBUTE_PRINTF.
4760
4761 2017-09-21 Yao Qi <yao.qi@linaro.org>
4762
4763 * configure.tgt (aarch64*-*-freebsd*): Add fbsd-tdep.o solib-svr4.o
4764 to gdb_target_obs.
4765
4766 2017-09-20 Tom Tromey <tom@tromey.com>
4767
4768 * breakpoint.c (struct counted_command_line): Remove.
4769 (breakpoint_commands): Update.
4770 (alloc_counted_command_line, incref_counted_command_line)
4771 (decref_counted_command_line, do_cleanup_counted_command_line)
4772 (make_cleanup_decref_counted_command_line): Remove.
4773 (breakpoint_set_commands, commands_command_1, ~bpstats, bpstats)
4774 (bpstat_clear_actions, bpstat_do_actions_1, watchpoint_check)
4775 (bpstat_stop_status, print_one_breakpoint_location, ~breakpoint)
4776 (save_breakpoints): Update.
4777 * breakpoint.h (counted_command_line): Now a typedef to
4778 shared_ptr.
4779 (struct breakpoint) <commands>: Now a counted_command_line.
4780 (struct bpstats) <command>: Likewise.
4781
4782 2017-09-20 Tom Tromey <tom@tromey.com>
4783
4784 * breakpoint.c (struct commands_info, do_map_commands_command):
4785 Remove.
4786 (commands_command_1): Update.
4787 (iterate_over_related_breakpoints): Take a function_view.
4788 (do_delete_breakpoint, do_map_delete_breakpoint): Remove.
4789 (delete_command): Update.
4790 (map_breakpoint_numbers): Take a function_view.
4791 (do_disable_breakpoint, do_map_delete_breakpoint): Remove.
4792 (disable_command): Update.
4793 (do_enable_breakpoint, do_map_enable_breakpoint): Remove.
4794 (enable_command): Update.
4795 (struct disp_data, do_enable_breakpoint_disp)
4796 (do_map_enable_once_breakpoint, do_map_enable_count_breakpoint)
4797 (do_map_enable_delete_breakpoint): Remove.
4798 (enable_once_command, enable_count_command, enable_delete_command)
4799 (delete_trace_variable_command): Update.
4800
4801 2017-09-20 Tom Tromey <tom@tromey.com>
4802
4803 * breakpoint.c (~bpstats): Rename from bpstat_free. Update.
4804 (bpstat_clear): Use delete.
4805 (bpstats): New constructors.
4806 (bpstat_copy, bpstat_stop_status): Use new.
4807 (dprintf_after_condition_true): Update.
4808 * breakpoint.h (bpstats::bpstats): Add constructors.
4809 (bpstats::~bpstats): Add destructor.
4810
4811 2017-09-20 Pedro Alves <palves@redhat.com>
4812
4813 * eval.c (make_params): Delete, refactored as ...
4814 (class fake_method): ... this new type's ctor.
4815 (fake_method::~fake_method): New.
4816 (evaluate_subexp_standard): Use 'fake_method'.
4817
4818 2017-09-20 Tom Tromey <tom@tromey.com>
4819
4820 * windows-nat.c (get_windows_debug_event, windows_wait)
4821 (do_initial_windows_stuff, windows_attach): Update.
4822 * utils.c (vwarning, internal_vproblem): Update.
4823 (ui_unregister_input_event_handler_cleanup)
4824 (prepare_to_handle_input): Remove.
4825 (class scoped_input_handler): New.
4826 (defaulted_query, prompt_for_continue): Update.
4827 * tui/tui-hooks.c (tui_refresh_frame_and_register_information):
4828 Update.
4829 * top.c (undo_terminal_modifications_before_exit): Update.
4830 * target/target.h (target_terminal_init, target_terminal_inferior)
4831 (target_terminal_ours): Don't declare.
4832 (class target_terminal): New.
4833 * target.h (target_terminal_is_inferior, target_terminal_is_ours)
4834 (target_terminal_ours_for_output)
4835 (make_cleanup_restore_target_terminal): Don't declare.
4836 (target_terminal_info): Remove.
4837 * target.c (enum terminal_state, terminal_state): Remove.
4838 (target_terminal::terminal_state): Define.
4839 (target_terminal::init): Rename from target_terminal_init.
4840 (target_terminal::inferior): Rename from
4841 target_terminal_inferior.
4842 (target_terminal::ours): Rename from target_terminal_ours.
4843 (target_terminal::ours_for_output): Rename from
4844 target_terminal_ours_for_output.
4845 (target_terminal::info): New method.
4846 (cleanup_restore_target_terminal)
4847 (make_cleanup_restore_target_terminal): Remove.
4848 * solib.c (handle_solib_event): Update.
4849 * remote.c (remote_serial_quit_handler): Update.
4850 (remote_terminal_inferior, remote_wait_as): Update.
4851 * record-full.c (record_full_wait_1): Update.
4852 * nto-procfs.c (procfs_create_inferior): Update.
4853 * nat/fork-inferior.c (startup_inferior): Update.
4854 * mi/mi-interp.c (mi_new_thread, mi_thread_exit)
4855 (mi_record_changed, mi_inferior_added, mi_inferior_appeared)
4856 (mi_inferior_exit, mi_inferior_removed, mi_traceframe_changed)
4857 (mi_tsv_created, mi_tsv_deleted, mi_tsv_modified)
4858 (mi_breakpoint_created, mi_breakpoint_deleted)
4859 (mi_breakpoint_modified, mi_on_resume, mi_solib_loaded)
4860 (mi_solib_unloaded, mi_command_param_changed, mi_memory_changed)
4861 (mi_user_selected_context_changed, report_initial_inferior):
4862 Update.
4863 * linux-nat.c (linux_nat_attach, linux_nat_terminal_ours)
4864 (linux_nat_terminal_inferior): Update.
4865 * infrun.c (follow_fork_inferior)
4866 (handle_vfork_child_exec_or_exit, do_target_resume)
4867 (check_curr_ui_sync_execution_done, handle_inferior_event_1)
4868 (handle_signal_stop, maybe_remove_breakpoints, normal_stop):
4869 Update.
4870 * inflow.c (child_terminal_init, info_terminal_command): Update.
4871 * infcmd.c (post_create_inferior, continue_1, prepare_one_step)
4872 (attach_command): Update.
4873 * infcall.c (call_thread_fsm_should_stop): Update.
4874 * gnu-nat.c (gnu_attach): Update.
4875 * extension.c (struct active_ext_lang_state)
4876 (restore_active_ext_lang): Update.
4877 * exceptions.c (print_flush): Update.
4878 * event-top.c (async_enable_stdin, default_quit_handler): Update.
4879 (struct quit_handler_cleanup_data, restore_quit_handler)
4880 (restore_quit_handler_dtor, make_cleanup_override_quit_handler):
4881 Remove.
4882 * cp-support.c (gdb_demangle): Update.
4883 * breakpoint.c (update_inserted_breakpoint_locations)
4884 (insert_breakpoint_locations, handle_jit_event)
4885 (disable_breakpoints_in_unloaded_shlib): Update.
4886 * annotate.c (annotate_breakpoints_invalid)
4887 (annotate_frames_invalid): Update.
4888
4889 2017-09-20 Tom Tromey <tom@tromey.com>
4890
4891 * main.c (catch_command_errors): Rename from
4892 catch_command_errors_const.
4893 (captured_main_1): Update.
4894
4895 2017-09-20 Pedro Alves <palves@redhat.com>
4896
4897 * cli/cli-cmds.c (list_command): Use print_sal_location.
4898 (print_sal_location): New function.
4899 (ambiguous_line_spec): Use print_sal_location.
4900 * linespec.c (symbol_to_sal): Record the symbol in the sal.
4901 * symtab.c (find_function_start_sal): Likewise.
4902 * symtab.h (symtab_and_line::symbol): New field.
4903
4904 2017-09-20 Pedro Alves <palves@redhat.com>
4905
4906 * linespec.c (minsym_found): Handle non-text minsyms.
4907 (symbol_to_sal): Record a sal.pc for non-block, non-label symbols.
4908
4909 2017-09-20 Walfred Tedeschi <walfred.tedeschi@intel.com>
4910
4911 * features/Makefile (i386-avx-mpx-avx512-pku.dat): Add missing
4912 backslash.
4913
4914 2017-09-20 Walfred Tedeschi <walfred.tedeschi@intel.com>
4915
4916 * gdb.arch/i386-avx512.c (move_zmm_data_to_reg): Use
4917 vmovups instead vmovaps.
4918 (move_zmm_data_to_memory): Use vmovups instead vmovaps.
4919
4920 2017-09-19 John Baldwin <jhb@FreeBSD.org>
4921
4922 * NEWS (Changes since GDB 8.0): Add starti.
4923 * infcmd.c (enum run_break): New.
4924 (run_command_1): Queue pending event for RUN_STOP_AT_FIRST_INSN
4925 case.
4926 (run_command): Use enum run_how.
4927 (start_command): Likewise.
4928 (starti_command): New function.
4929 (RUN_ARGS_HELP): New macro.
4930 (_initialize_infcmd): Use RUN_ARGS_HELP for run and start
4931 commands. Add starti command.
4932
4933 2017-09-19 Yao Qi <yao.qi@linaro.org>
4934
4935 * Makefile.in (monitor.o): Remove the rule.
4936
4937 2017-09-19 Yao Qi <yao.qi@linaro.org>
4938
4939 * annotate.h (struct annotate_arg_emitter): Use
4940 DISABLE_COPY_AND_ASSIGN.
4941 * common/refcounted-object.h (refcounted_object): Likewise.
4942 * completer.h (struct completion_result): Likewise.
4943 * dwarf2read.c (struct dwarf2_per_objfile): Likewise.
4944 * filename-seen-cache.h (filename_seen_cache): Likewise.
4945 * gdbcore.h (thread_section_name): Likewise.
4946 * gdb_regex.h (compiled_regex): Likewise.
4947 * gdbthread.h (scoped_restore_current_thread): Likewise.
4948 * inferior.h (scoped_restore_current_inferior): Likewise.
4949 * jit.c (jit_reader): Likewise.
4950 * linespec.h (struct linespec_result): Likewise.
4951 * mi/mi-parse.h (struct mi_parse): Likewise.
4952 * nat/fork-inferior.c (execv_argv): Likewise.
4953 * progspace.h (scoped_restore_current_program_space): Likewise.
4954 * python/python-internal.h (class gdbpy_enter): Likewise.
4955 * regcache.h (regcache): Likewise.
4956 * target-descriptions.c (struct tdesc_reg): Likewise.
4957 (struct tdesc_type): Likewise.
4958 (struct tdesc_feature): Likewise.
4959 * ui-out.h (ui_out_emit_type): Likewise.
4960
4961 2017-09-18 Simon Marchi <simon.marchi@ericsson.com>
4962
4963 * dwarf2expr.c (dwarf_expr_context::execute_stack_op): Remove
4964 label abort_expression.
4965
4966 2017-09-16 Simon Marchi <simon.marchi@ericsson.com>
4967
4968 * common/buffer.c (buffer_xml_printf): Adjust.
4969 * common/xml-utils.c (xml_escape_text): Change return type to
4970 std::string, update code accordingly.
4971 * common/xml-utils.h (xml_escape_text): Change return type to
4972 std::string.
4973 * rs6000-aix-tdep.c (rs6000_aix_shared_library_to_xml): Adjust.
4974 * windows-tdep.c (windows_xfer_shared_library): Adjust.
4975 * unittests/xml-utils-selftests.c (test_xml_escape_text):
4976 Adjust.
4977
4978 2017-09-16 Simon Marchi <simon.marchi@ericsson.com>
4979
4980 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add new source file.
4981 (SUBDIR_UNITTESTS_OBS): Add new object file.
4982 * unittests/xml-utils-selftests.c: New file.
4983
4984 2017-09-16 Simon Marchi <simon.marchi@ericsson.com>
4985
4986 * common/selftest.h (selftest): New struct/interface.
4987 (register_test): Add name parameter, add new overload.
4988 (run_tests): Add filter parameter.
4989 (for_each_selftest_ftype): New typedef.
4990 (for_each_selftest): New declaration.
4991 * common/selftest.c (tests): Change type to
4992 map<string, unique_ptr<selftest>>.
4993 (simple_selftest): New struct.
4994 (register_test): New function.
4995 (register_test): Add name parameter and use it.
4996 (run_tests): Add filter parameter and use it. Add prints.
4997 Adjust to vector -> map change.
4998 * aarch64-tdep.c (_initialize_aarch64_tdep): Add names when
4999 registering selftests.
5000 * arm-tdep.c (_initialize_arm_tdep): Likewise.
5001 * disasm-selftests.c (_initialize_disasm_selftests): Likewise.
5002 * dwarf2-frame.c (_initialize_dwarf2_frame): Likewise.
5003 * dwarf2loc.c (_initialize_dwarf2loc): Likewise.
5004 * findvar.c (_initialize_findvar): Likewise.
5005 * gdbarch-selftests.c (_initialize_gdbarch_selftests): Likewise.
5006 * maint.c (maintenance_selftest): Update call to run_tests.
5007 (maintenance_info_selftests): New function.
5008 (_initialize_maint_cmds): Register "maintenance info selftests"
5009 command. Update "maintenance selftest" doc.
5010 * regcache.c (_initialize_regcache): Add names when registering
5011 selftests.
5012 * rust-exp.y (_initialize_rust_exp): Likewise.
5013 * selftest-arch.c (gdbarch_selftest): New struct.
5014 (gdbarch_tests): Remove.
5015 (register_test_foreach_arch): Add name parameter. Call
5016 register_test.
5017 (tests_with_arch): Remove, move most content to
5018 gdbarch_selftest::operator().
5019 (_initialize_selftests_foreach_arch): Remove.
5020 * selftest-arch.h (register_test_foreach_arch): Add name
5021 parameter.
5022 (run_tests_with_arch): New declaration.
5023 * utils-selftests.c (_initialize_utils_selftests): Add names
5024 when registering selftests.
5025 * utils.c (_initialize_utils): Likewise.
5026 * unittests/array-view-selftests.c
5027 (_initialize_array_view_selftests): Likewise.
5028 * unittests/environ-selftests.c (_initialize_environ_selftests):
5029 Likewise.
5030 * unittests/function-view-selftests.c
5031 (_initialize_function_view_selftests): Likewise.
5032 * unittests/offset-type-selftests.c
5033 (_initialize_offset_type_selftests): Likewise.
5034 * unittests/optional-selftests.c
5035 (_initialize_optional_selftests): Likewise.
5036 * unittests/scoped_restore-selftests.c
5037 (_initialize_scoped_restore_selftests): Likewise.
5038 * NEWS: Document "maintenance selftest" and "maint info
5039 selftests".
5040
5041 2017-09-16 Simon Marchi <simon.marchi@ericsson.com>
5042
5043 * mi/mi-main.c (mi_load_progress): Restore current_uiout using a
5044 scoped_restore.
5045
5046 2017-09-16 Simon Marchi <simon.marchi@ericsson.com>
5047
5048 * mi/mi-main.c (mi_load_progress): Make uiout variable
5049 a unique_ptr.
5050
5051 2017-09-15 Pedro Alves <palves@redhat.com>
5052
5053 * compile/compile-c-types.c (convert_enum, convert_int)
5054 (convert_float): Adjust to refer to int_type_v0 and float_type_v0.
5055
5056 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
5057
5058 * dwarf2read.c (copy_string): Remove.
5059 (parse_macro_definition): Replace copy_string with savestring.
5060
5061 2017-09-15 Yao Qi <yao.qi@linaro.org>
5062
5063 * configure.tgt (i[34567]86-*-darwin*): Append amd64.o to
5064 gdb_target_obs.
5065 (i[34567]86-*-solaris2.1[0-9]* | x86_64-*-solaris2.1[0-9]*):
5066 Likewise.
5067 (i[34567]86-*-linux*): Likewise.
5068
5069 2017-09-14 Simon Marchi <simon.marchi@ericsson.com>
5070
5071 * dwarf2expr.h (dwarf_stack_value): Add constructor.
5072 (dwarf_expr_context) <~dwarf_expr_context>: Define as default.
5073 <stack>: Change type to std::vector.
5074 <stack_len, stack_allocated>: Remove.
5075 <grow_stack>: Remove.
5076 * dwarf2expr.c (dwarf_expr_context::dwarf_expr_context): Adjust.
5077 (dwarf_expr_context::~dwarf_expr_context): Remove.
5078 (dwarf_expr_context::grow_stack): Remove.
5079 (dwarf_expr_context::push): Adjust.
5080 (dwarf_expr_context::pop): Adjust.
5081 (dwarf_expr_context::fetch): Adjust.
5082 (dwarf_expr_context::fetch_in_stack_memory): Adjust.
5083 (dwarf_expr_context::stack_empty_p): Adjust.
5084 (dwarf_expr_context::execute_stack_op): Adjust.
5085
5086 2017-09-14 Simon Marchi <simon.marchi@ericsson.com>
5087
5088 * dwarf2expr.h (dwarf_expr_context) <stack_empty_p>: Change
5089 return type to bool.
5090 * dwarf2expr.c (dwarf_expr_context::stack_empty_p): Likewise.
5091
5092 2017-09-14 Simon Marchi <simon.marchi@ericsson.com>
5093
5094 * dwarf2expr.h (dwarf_expr_piece) <v.mem.in_stack_memory>:
5095 Change type to bool.
5096 (dwarf_stack_value) <in_stack_memory>: Likewise.
5097 (dwarf_expr_context) <push_address>: Change parameter type to
5098 bool.
5099 <fetch_in_stack_memory>: Change return type to bool.
5100 <push>: Change parameter type to bool.
5101 * dwarf2expr.c (dwarf_expr_context::push): Change parameter type
5102 to bool.
5103 (dwarf_expr_context::push_address): Likewise.
5104 (dwarf_expr_context::fetch_in_stack_memory): Change return type
5105 to bool.
5106 (dwarf_expr_context::execute_stack_op): Adjust.
5107 * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Adjust.
5108
5109 2017-09-14 Simon Marchi <simon.marchi@ericsson.com>
5110
5111 * dwarf2expr.h (struct dwarf_expr_piece): Move up.
5112 (struct dwarf_expr_context) <n_pieces>: Remove.
5113 <pieces>: Change type to std::vector.
5114 * dwarf2expr.c (dwarf_expr_context::dwarf_expr_context): Adjust.
5115 (dwarf_expr_context::~dwarf_expr_context): Don't manually free
5116 pieces.
5117 (dwarf_expr_context::add_piece): Adjust.
5118 * dwarf2loc.c (struct piece_closure): Initialize fields.
5119 <n_pieces>: Remove.
5120 <pieces>: Change type to std::vector.
5121 (allocate_piece_closure): Adjust, change parameter to
5122 std::vector rvalue and std::move it to piece_closure.
5123 (rw_pieced_value): Adjust.
5124 (check_pieced_synthetic_pointer): Adjust.
5125 (indirect_synthetic_pointer): Adjust.
5126 (coerce_pieced_ref): Adjust.
5127 (free_pieced_value_closure): Adjust. Use delete to free
5128 piece_closure.
5129 (dwarf2_evaluate_loc_desc_full): Adjust. std::move ctx.pieces
5130 to allocate_piece_closure.
5131 (dwarf2_loc_desc_get_symbol_read_needs): Adjust.
5132
5133 2017-09-12 Simon Marchi <simon.marchi@ericsson.com>
5134
5135 * probe.h (probe_ops_cp): Remove typedef.
5136 (DEF_VEC_P (probe_ops_cp)): Remove.
5137 (all_probe_ops): Change type to std::vector.
5138 * probe.c (info_probes_for_ops): Adjust to vector change.
5139 (probe_linespec_to_ops): Likewise.
5140 (all_probe_ops): Change type to std::vector.
5141 (_initialize_probe): Adjust to vector change.
5142 * dtrace-probe.c (_initialize_dtrace_probe): Likewise.
5143 * elfread.c (elf_get_probes): Likewise.
5144 * stap-probe.c (_initialize_stap_probe): Likewise.
5145
5146 2017-09-12 Simon Marchi <simon.marchi@ericsson.com>
5147
5148 * probe.h (struct bound_probe): Define constructors.
5149 * probe.c (bound_probe_s): Remove typedef.
5150 (DEF_VEC_O (bound_probe_s)): Remove VEC.
5151 (collect_probes): Change return type to std::vector, remove
5152 cleanup.
5153 (compare_probes): Return bool, change parameter type. Change
5154 semantic to "less than".
5155 (gen_ui_out_table_header_info): Change parameter to std::vector
5156 and update.
5157 (exists_probe_with_pops): Likewise.
5158 (info_probes_for_ops): Update to std::vector change.
5159 (enable_probes_command): Likewise.
5160 (disable_probes_command): Likewise.
5161
5162 2017-09-12 Simon Marchi <simon.marchi@ericsson.com>
5163
5164 * probe.h (struct probe_ops) <get_probes>: Change parameter from
5165 vec to std::vector.
5166 * probe.c (parse_probes_in_pspace): Update.
5167 (find_probes_in_objfile): Update.
5168 (find_probe_by_pc): Update.
5169 (collect_probes): Update.
5170 (probe_any_get_probes): Update.
5171 * symfile.h (struct sym_probe_fns) <sym_get_probes> Change
5172 return type to reference to std::vector.
5173 * dtrace-probe.c (dtrace_process_dof_probe): Change parameter to
5174 std::vector and update.
5175 (dtrace_process_dof): Likewise.
5176 (dtrace_get_probes): Likewise.
5177 * elfread.c (elf_get_probes): Change return type to std::vector,
5178 store an std::vector in bfd_data.
5179 (probe_key_free): Update to std::vector.
5180 * stap-probe.c (handle_stap_probe): Change parameter to
5181 std::vector and update.
5182 (stap_get_probes): Likewise.
5183 * symfile-debug.c (debug_sym_get_probes): Change return type to
5184 std::vector and update.
5185
5186 2017-09-11 Tom Tromey <tom@tromey.com>
5187
5188 * breakpoint.c (program_breakpoint_here_p): Update.
5189 * target.c (make_scoped_restore_show_memory_breakpoints): Rename
5190 from make_show_memory_breakpoints_cleanup. Return a
5191 scoped_restore_tmpl<int>.
5192 (restore_show_memory_breakpoints): Remove.
5193 * ppc-linux-tdep.c (ppc_linux_memory_remove_breakpoint): Update.
5194 * mem-break.c (memory_validate_breakpoint): Update.
5195 * ia64-tdep.c (ia64_memory_insert_breakpoint): Update.
5196 (ia64_memory_remove_breakpoint): Update.
5197 (ia64_breakpoint_from_pc): Update.
5198 * target.h (make_scoped_restore_show_memory_breakpoints): Rename
5199 from make_show_memory_breakpoints_cleanup.
5200
5201 2017-09-11 Tom Tromey <tom@tromey.com>
5202
5203 * d-namespace.c (d_lookup_symbol): Use std::string.
5204 (find_symbol_in_baseclass): Likewise.
5205
5206 2017-09-11 Tom Tromey <tom@tromey.com>
5207
5208 * ctf.c (ctf_start): Use std::string.
5209
5210 2017-09-11 Tom Tromey <tom@tromey.com>
5211
5212 * ada-lang.c (is_known_support_routine): Update.
5213 (ada_unhandled_exception_name_addr_from_raise): Update.
5214 * guile/scm-frame.c (gdbscm_frame_name): Update.
5215 * python/py-frame.c (frapy_name): Update.
5216 (frapy_function): Update.
5217 * stack.h (find_frame_funname): Update.
5218 * stack.c (find_frame_funname): Return unique_xmalloc_ptr.
5219 (print_frame): Update.
5220
5221 2017-09-11 Tom Tromey <tom@tromey.com>
5222
5223 * findcmd.c (put_bits): Take a gdb::byte_vector.
5224 (parse_find_args): Return gdb::byte_vector. "args" now const.
5225 Remove "pattern_bufp" and "pattern_lenp" parameters. Remove
5226 cleanups.
5227 (find_command): Update.
5228
5229 2017-09-11 Tom Tromey <tom@tromey.com>
5230
5231 * cli/cli-script.c (class scoped_restore_hook_in): New.
5232 (clear_hook_in_cleanup): Remove.
5233 (execute_cmd_pre_hook, execute_cmd_post_hook): Use
5234 scoped_restore_hook_in.
5235
5236 2017-09-11 Tom Tromey <tom@tromey.com>
5237
5238 * cli/cli-script.c (restore_interp): Remove.
5239 (read_command_lines): Use scoped_restore_interp.
5240 * interps.c (scoped_restore_interp::set_temp): Rename from
5241 interp_set_temp.
5242 * interps.h (class scoped_restore_interp): New.
5243 (interp_set_temp): Remove.
5244
5245 2017-09-11 Tom Tromey <tom@tromey.com>
5246
5247 * mi/mi-cmd-catch.c (mi_cmd_catch_assert)
5248 (mi_cmd_catch_exception, mi_catch_load_unload): Update.
5249 * mi/mi-cmd-break.c (setup_breakpoint_reporting): Return a
5250 scoped_restore.
5251 (mi_cmd_break_insert_1): Update.
5252 * mi/mi-cmd-break.h (setup_breakpoint_reporting): Return a
5253 scoped_restore.
5254
5255 2017-09-11 Tom Tromey <tom@tromey.com>
5256
5257 * demangle.c (demangle_command): Update.
5258 * breakpoint.c (disable_command): Update.
5259 (enable_command): Update.
5260 (find_location_by_number): Make "number" const. Use
5261 get_number_trailer.
5262 * cli/cli-utils.c (extract_arg): Return std::string.
5263 * probe.c (parse_probe_linespec): Update. Change types.
5264 (collect_probes): Take string arguments.
5265 (parse_probe_linespec): Likewise.
5266 (info_probes_for_ops): Update.
5267 (enable_probes_command): Update.
5268 (disable_probes_command): Update.
5269 * break-catch-sig.c (catch_signal_split_args): Update.
5270 * mi/mi-parse.c (mi_parse): Update.
5271
5272 2017-09-11 Tom Tromey <tom@tromey.com>
5273
5274 * language.h (language_enum): Make argument const.
5275 * language.c (language_enum): Make argument const.
5276
5277 2017-09-11 Tom Tromey <tom@tromey.com>
5278
5279 * common/common-utils.h (skip_to_space): Remove macro, redeclare
5280 as function.
5281 (skip_to_space): Rename from skip_to_space_const.
5282 * common/common-utils.c (skip_to_space): New function.
5283 (skip_to_space): Rename from skip_to_space_const.
5284 * cli/cli-utils.h (get_number): Rename from get_number_const.
5285 (extract_arg): Rename from extract_arg_const.
5286 * cli/cli-utils.c (get_number): Rename from get_number_const.
5287 (extract_arg): Rename from extract_arg_const.
5288 (number_or_range_parser::get_number): Use ::get_number.
5289 * aarch64-linux-tdep.c, ada-lang.c, arm-linux-tdep.c, ax-gdb.c,
5290 break-catch-throw.c, breakpoint.c, cli/cli-cmds.c, cli/cli-dump.c,
5291 cli/cli-script.c, cli/cli-setshow.c, compile/compile.c,
5292 completer.c, demangle.c, disasm.c, findcmd.c, linespec.c,
5293 linux-tdep.c, linux-thread-db.c, location.c, mi/mi-parse.c,
5294 minsyms.c, nat/linux-procfs.c, printcmd.c, probe.c,
5295 python/py-breakpoint.c, record.c, rust-exp.y, serial.c, stack.c,
5296 stap-probe.c, tid-parse.c, tracepoint.c: Update all callers.
5297
5298 2017-09-11 Tom Tromey <tom@tromey.com>
5299
5300 * python/python.c (do_start_initialization): Use
5301 py-event-types.def to initialize types.
5302 Define all object type structures.
5303 * python/python-internal.h: Don't declare event initialization
5304 functions.
5305 * python/py-threadevent.c (thread_event_object_type): Don't
5306 define.
5307 * python/py-stopevent.c (stop_event_object_type): Don't define.
5308 * python/py-signalevent.c (signal_event_object_type): Don't
5309 declare or define.
5310 * python/py-newobjfileevent.c (new_objfile_event_object_type)
5311 (clear_objfiles_event_object_type): Don't declare or define.
5312 * python/py-infevents.c (inferior_call_pre_event_object_type)
5313 (inferior_call_post_event_object_type)
5314 (register_changed_event_object_type)
5315 (memory_changed_event_object_type): Don't declare or define.
5316 * python/py-inferior.c (new_thread_event_object_type)
5317 (new_inferior_event_object_type)
5318 (inferior_deleted_event_object_type): Don't declare or define.
5319 * python/py-exitedevent.c (exited_event_object_type): Don't
5320 declare or define.
5321 * python/py-evts.c (gdbpy_initialize_py_events): Use
5322 py-all-events.def.
5323 * python/py-events.h (thread_event_object_type): Don't declare.
5324 (events_object): Use py-all-events.def.
5325 * python/py-event.h (GDBPY_NEW_EVENT_TYPE): Remove. Use
5326 py-event-types.def.
5327 * python/py-event-types.def: New file.
5328 * python/py-continueevent.c (create_continue_event_object): Don't
5329 declare or define.
5330 * python/py-bpevent.c (breakpoint_event_object_type): Don't
5331 declare or define.
5332 * python/py-all-events.def: New file.
5333
5334 2017-09-11 Tom Tromey <tom@tromey.com>
5335
5336 * python/py-threadevent.c (create_thread_event_object): Return
5337 gdbpy_ref.
5338 * python/py-stopevent.h (create_stop_event_object)
5339 (create_breakpoint_event_object, create_signal_event_object):
5340 Update.
5341 * python/py-stopevent.c (create_stop_event_object): Return
5342 gdbpy_ref.
5343 (emit_stop_event): Update.
5344 * python/py-signalevent.c (create_signal_event_object): Return
5345 gdbpy_ref.
5346 * python/py-infevents.c (create_inferior_call_event_object):
5347 Update.
5348 * python/py-event.h (create_event_object)
5349 (create_thread_event_object): Update.
5350 * python/py-event.c (create_event_object): Return gdbpy_ref.
5351 * python/py-continueevent.c: Return gdbpy_ref.
5352 * python/py-bpevent.c (create_breakpoint_event_object): Return
5353 gdbpy_ref.
5354
5355 2017-09-11 Tom Tromey <tom@tromey.com>
5356
5357 PR python/15622:
5358 * NEWS: Add entry.
5359 * python/python.c (do_start_initialization): Initialize new event
5360 types.
5361 * python/python-internal.h (gdbpy_initialize_new_inferior_event)
5362 (gdbpy_initialize_inferior_deleted_event)
5363 (gdbpy_initialize_new_thread_event): Declare.
5364 * python/py-threadevent.c (create_thread_event_object): Add option
5365 "thread" parameter.
5366 * python/py-inferior.c (new_thread_event_object_type)
5367 (new_inferior_event_object_type)
5368 (inferior_deleted_event_object_type): Declare.
5369 (python_new_inferior, python_inferior_deleted): New functions.
5370 (add_thread_object): Emit new_thread event.
5371 (gdbpy_initialize_inferior): Attach new functions to corresponding
5372 observers.
5373 (new_thread, new_inferior, inferior_deleted): Define new event
5374 types.
5375 * python/py-evts.c (gdbpy_initialize_py_events): Add new
5376 registries.
5377 * python/py-events.h (events_object) <new_inferior,
5378 inferior_deleted, new_thread>: New fields.
5379 * python/py-event.h (create_thread_event_breakpoint): Add optional
5380 "thread" parameter.
5381
5382 2017-09-10 Andrew Burgess <andrew.burgess@embecosm.com>
5383
5384 * utils.c (abort_with_message): Don't compare gdb_stderr to NULL,
5385 check current_ui instead.
5386 (internal_vproblem): Likewise.
5387
5388 2017-09-09 Simon Marchi <simon.marchi@ericsson.com>
5389
5390 * thread.c (print_thread_info_1): Remove unnecessary calls to
5391 uiout->is_mi_like_p.
5392
5393 2017-09-09 Tom Tromey <tom@tromey.com>
5394
5395 * namespace.h (add_using_directive): Update.
5396 * namespace.c (add_using_directive): Change type of excludes to
5397 std::vector.
5398 * dwarf2read.c (read_import_statement): Use std::vector.
5399 (read_namespace): Update.
5400 * cp-namespace.c (cp_scan_for_anonymous_namespaces): Update.
5401
5402 2017-09-09 Tom Tromey <tom@tromey.com>
5403
5404 * linespec.c (create_sals_line_offset): Use gdb::def_vector.
5405
5406 2017-09-09 Tom Tromey <tom@tromey.com>
5407
5408 * p-valprint.c (pascal_object_print_value): Use gdb::byte_vector.
5409
5410 2017-09-09 Tom Tromey <tom@tromey.com>
5411
5412 * stack.c (func_command): Use gdb::def_vector.
5413
5414 2017-09-09 Tom Tromey <tom@tromey.com>
5415
5416 * mi/mi-cmd-var.c (mi_cmd_var_list_children): Use gdb::optional,
5417 ui_out_emit_list, ui_out_emit_tuple.
5418 (mi_cmd_var_update): Likewise.
5419
5420 2017-09-09 Tom Tromey <tom@tromey.com>
5421
5422 * mi/mi-interp.c (mi_user_selected_context_changed): Use
5423 ui_out_redirect_pop.
5424 * guile/scm-ports.c (ioscm_with_output_to_port_worker): Use
5425 ui_out_redirect_pop.
5426 * utils.c (do_ui_out_redirect_pop)
5427 (make_cleanup_ui_out_redirect_pop): Remove.
5428 * top.c (execute_command_to_string): Use ui_out_redirect_pop.
5429 * utils.h (make_cleanup_ui_out_redirect_pop): Remove.
5430 * ui-out.h (ui_out_redirect_pop): New class.
5431
5432 2017-09-09 Tom Tromey <tom@tromey.com>
5433
5434 * mi/mi-main.c (output_cores): Use ui_out_emit_list.
5435 (list_available_thread_groups, mi_cmd_list_thread_groups)
5436 (mi_cmd_data_list_changed_registers, mi_cmd_data_read_memory)
5437 (mi_cmd_data_read_memory_bytes, mi_cmd_trace_frame_collected):
5438 Likewise.
5439
5440 2017-09-09 Tom Tromey <tom@tromey.com>
5441
5442 * disasm.c (gdb_pretty_print_disassembler::pretty_print_insn): Use
5443 ui_out_emit_tuple.
5444
5445 2017-09-09 Tom Tromey <tom@tromey.com>
5446
5447 * target.c (flash_erase_command): Use ui_out_emit_tuple.
5448 * stack.c (print_frame): Use ui_out_emit_tuple.
5449 * spu-tdep.c (info_spu_event_command): Use ui_out_emit_tuple.
5450 (info_spu_mailbox_command, info_spu_dma_command)
5451 (info_spu_proxydma_command): Likewise.
5452 * mi/mi-main.c (mi_cmd_trace_frame_collected): Use
5453 ui_out_emit_tuple, gdb::byte_vector, bin2hex.
5454 * mi/mi-cmd-file.c (mi_cmd_file_list_shared_libraries): Use
5455 ui_out_emit_tuple.
5456 * breakpoint.c (print_it_watchpoint): Use ui_out_emit_tuple.
5457
5458 2017-09-09 Tom Tromey <tom@tromey.com>
5459
5460 * ui-out.h (make_cleanup_ui_out_table_begin_end): Remove.
5461 (class ui_out_emit_table): Update comment.
5462 * ui-out.c (do_cleanup_table_end)
5463 (make_cleanup_ui_out_table_begin_end): Remove.
5464 * spu-tdep.c (info_spu_mailbox_list): Use ui_out_emit_table.
5465 (info_spu_dma_cmdlist): Likewise.
5466 * probe.c (info_probes_for_ops): Use ui_out_emit_table.
5467 * darwin-nat-info.c (darwin_debug_regions_recurse): Use
5468 ui_out_emit_table.
5469
5470 2017-09-09 Tom Tromey <tom@tromey.com>
5471
5472 * thread.c (print_thread_info_1): Use ui_out_emit_table,
5473 ui_out_emit_list, gdb::optional.
5474
5475 2017-09-09 John Baldwin <jhb@FreeBSD.org>
5476
5477 * aarch64-linux-nat.c: Remove _initialize_aarch64_linux_nat
5478 prototype.
5479 * aarch64-linux-tdep.c: Remove _initialize_aarch64_linux_tdep
5480 prototype.
5481 * aarch64-newlib-tdep.c: Remove _initialize_aarch64_newlib_tdep
5482 prototype.
5483 * aarch64-tdep.c: Remove _initialize_aarch64_tdep prototype.
5484 * ada-exp.y: Remove _initialize_ada_exp prototype.
5485 * ada-lang.c: Remove _initialize_ada_language prototype.
5486 * ada-tasks.c: Remove _initialize_tasks prototype.
5487 * addrmap.c: Remove _initialize_addrmap prototype.
5488 * agent.c: Remove _initialize_agent prototype.
5489 * aix-thread.c: Remove _initialize_aix_thread prototype.
5490 * alpha-bsd-nat.c: Remove _initialize_alphabsd_nat prototype.
5491 * alpha-linux-nat.c: Remove _initialize_alpha_linux_nat prototype.
5492 * alpha-linux-tdep.c: Remove _initialize_alpha_linux_tdep
5493 prototype.
5494 * alpha-nbsd-tdep.c: Remove _initialize_alphanbsd_tdep prototype.
5495 * alpha-obsd-tdep.c: Remove _initialize_alphaobsd_tdep prototype.
5496 * alpha-tdep.c: Remove _initialize_alpha_tdep prototype.
5497 * amd64-darwin-tdep.c: Remove _initialize_amd64_darwin_tdep
5498 prototype.
5499 * amd64-dicos-tdep.c: Remove _initialize_amd64_dicos_tdep
5500 prototype.
5501 * amd64-fbsd-nat.c: Remove _initialize_amd64fbsd_nat prototype.
5502 * amd64-fbsd-tdep.c: Remove _initialize_amd64fbsd_tdep prototype.
5503 * amd64-linux-nat.c: Remove _initialize_amd64_linux_nat prototype.
5504 * amd64-linux-tdep.c: Remove _initialize_amd64_linux_tdep
5505 prototype.
5506 * amd64-nbsd-nat.c: Remove _initialize_amd64nbsd_nat prototype.
5507 * amd64-nbsd-tdep.c: Remove _initialize_amd64nbsd_tdep prototype.
5508 * amd64-obsd-nat.c: Remove _initialize_amd64obsd_nat prototype.
5509 * amd64-obsd-tdep.c: Remove _initialize_amd64obsd_tdep prototype.
5510 * amd64-sol2-tdep.c: Remove _initialize_amd64_sol2_tdep prototype.
5511 * amd64-tdep.c: Remove _initialize_amd64_tdep prototype.
5512 * amd64-windows-nat.c: Remove _initialize_amd64_windows_nat
5513 prototype.
5514 * amd64-windows-tdep.c: Remove _initialize_amd64_windows_tdep
5515 prototype.
5516 * annotate.c: Remove _initialize_annotate prototype.
5517 * arc-newlib-tdep.c: Remove _initialize_arc_newlib_tdep prototype.
5518 * arc-tdep.c: Remove _initialize_arc_tdep prototype.
5519 * arch-utils.c: Remove _initialize_gdbarch_utils prototype.
5520 * arm-linux-nat.c: Remove _initialize_arm_linux_nat prototype.
5521 * arm-linux-tdep.c: Remove _initialize_arm_linux_tdep prototype.
5522 * arm-nbsd-tdep.c: Remove _initialize_arm_netbsd_tdep prototype.
5523 * arm-obsd-tdep.c: Remove _initialize_armobsd_tdep prototype.
5524 * arm-symbian-tdep.c: Remove _initialize_arm_symbian_tdep
5525 prototype.
5526 * arm-tdep.c: Remove _initialize_arm_tdep prototype.
5527 * arm-wince-tdep.c: Remove _initialize_arm_wince_tdep prototype.
5528 * auto-load.c: Remove _initialize_auto_load prototype.
5529 * auxv.c: Remove _initialize_auxv prototype.
5530 * avr-tdep.c: Remove _initialize_avr_tdep prototype.
5531 * ax-gdb.c: Remove _initialize_ax_gdb prototype.
5532 * bfin-linux-tdep.c: Remove _initialize_bfin_linux_tdep prototype.
5533 * bfin-tdep.c: Remove _initialize_bfin_tdep prototype.
5534 * break-catch-sig.c: Remove _initialize_break_catch_sig prototype.
5535 * break-catch-syscall.c: Remove _initialize_break_catch_syscall
5536 prototype.
5537 * break-catch-throw.c: Remove _initialize_break_catch_throw
5538 prototype.
5539 * breakpoint.c: Remove _initialize_breakpoint prototype.
5540 * bsd-uthread.c: Remove _initialize_bsd_uthread prototype.
5541 * btrace.c: Remove _initialize_btrace prototype.
5542 * charset.c: Remove _initialize_charset prototype.
5543 * cli/cli-cmds.c: Remove _initialize_cli_cmds prototype.
5544 * cli/cli-dump.c: Remove _initialize_cli_dump prototype.
5545 * cli/cli-interp.c: Remove _initialize_cli_interp prototype.
5546 * cli/cli-logging.c: Remove _initialize_cli_logging prototype.
5547 * cli/cli-script.c: Remove _initialize_cli_script prototype.
5548 * coff-pe-read.c: Remove _initialize_coff_pe_read prototype.
5549 * coffread.c: Remove _initialize_coffread prototype.
5550 * compile/compile.c: Remove _initialize_compile prototype.
5551 * complaints.c: Remove _initialize_complaints prototype.
5552 * completer.c: Remove _initialize_completer prototype.
5553 * copying.awk: Remove _initialize_copying prototype.
5554 * copying.c: Regenerate.
5555 * core-regset.c: Remove _initialize_core_regset prototype.
5556 * corefile.c: Remove _initialize_core prototype.
5557 * corelow.c: Remove _initialize_corelow prototype.
5558 * cp-abi.c: Remove _initialize_cp_abi prototype.
5559 * cp-namespace.c: Remove _initialize_cp_namespace prototype.
5560 * cp-support.c: Remove _initialize_cp_support prototype.
5561 * cp-valprint.c: Remove _initialize_cp_valprint prototype.
5562 * cris-linux-tdep.c: Remove _initialize_cris_linux_tdep prototype.
5563 * cris-tdep.c: Remove _initialize_cris_tdep prototype.
5564 * ctf.c: Remove _initialize_ctf prototype.
5565 * d-lang.c: Remove _initialize_d_language prototype.
5566 * darwin-nat-info.c: Remove _initialize_darwin_info_commands
5567 prototype.
5568 * darwin-nat.c: Remove _initialize_darwin_inferior prototype.
5569 * dbxread.c: Remove _initialize_dbxread prototype.
5570 * dcache.c: Remove _initialize_dcache prototype.
5571 * demangle.c: Remove _initialize_demangler prototype.
5572 * disasm-selftests.c: Remove _initialize_disasm_selftests
5573 prototype.
5574 * disasm.c: Remove _initialize_disasm prototype.
5575 * dtrace-probe.c: Remove _initialize_dtrace_probe prototype.
5576 * dummy-frame.c: Remove _initialize_dummy_frame prototype.
5577 * dwarf2-frame-tailcall.c: Remove _initialize_tailcall_frame
5578 prototype.
5579 * dwarf2-frame.c: Remove _initialize_dwarf2_frame prototype.
5580 * dwarf2expr.c: Remove _initialize_dwarf2expr prototype.
5581 * dwarf2loc.c: Remove _initialize_dwarf2loc prototype.
5582 * dwarf2read.c: Remove _initialize_dwarf2_read prototype.
5583 * elfread.c: Remove _initialize_elfread prototype.
5584 * exec.c: Remove _initialize_exec prototype.
5585 * extension.c: Remove _initialize_extension prototype.
5586 * f-lang.c: Remove _initialize_f_language prototype.
5587 * f-valprint.c: Remove _initialize_f_valprint prototype.
5588 * fbsd-nat.c: Remove _initialize_fbsd_nat prototype.
5589 * fbsd-tdep.c: Remove _initialize_fbsd_tdep prototype.
5590 * filesystem.c: Remove _initialize_filesystem prototype.
5591 * findcmd.c: Remove _initialize_mem_search prototype.
5592 * fork-child.c: Remove _initialize_fork_child prototype.
5593 * frame-base.c: Remove _initialize_frame_base prototype.
5594 * frame-unwind.c: Remove _initialize_frame_unwind prototype.
5595 * frame.c: Remove _initialize_frame prototype.
5596 * frv-linux-tdep.c: Remove _initialize_frv_linux_tdep prototype.
5597 * frv-tdep.c: Remove _initialize_frv_tdep prototype.
5598 * ft32-tdep.c: Remove _initialize_ft32_tdep prototype.
5599 * gcore.c: Remove _initialize_gcore prototype.
5600 * gdb_bfd.c: Remove _initialize_gdb_bfd prototype.
5601 * gdbarch.c: Regenerate.
5602 * gdbarch.sh: Remove _initialize_gdbarch prototype.
5603 * gdbtypes.c: Remove _initialize_gdbtypes prototype.
5604 * gnu-nat.c: Remove _initialize_gnu_nat prototype.
5605 * gnu-v2-abi.c: Remove _initialize_gnu_v2_abi prototype.
5606 * gnu-v3-abi.c: Remove _initialize_gnu_v3_abi prototype.
5607 * go-lang.c: Remove _initialize_go_language prototype.
5608 * go32-nat.c: Remove _initialize_go32_nat prototype.
5609 * guile/guile.c: Remove _initialize_guile prototype.
5610 * h8300-tdep.c: Remove _initialize_h8300_tdep prototype.
5611 * hppa-linux-nat.c: Remove _initialize_hppa_linux_nat prototype.
5612 * hppa-linux-tdep.c: Remove _initialize_hppa_linux_tdep prototype.
5613 * hppa-nbsd-nat.c: Remove _initialize_hppanbsd_nat prototype.
5614 * hppa-nbsd-tdep.c: Remove _initialize_hppanbsd_tdep prototype.
5615 * hppa-obsd-nat.c: Remove _initialize_hppaobsd_nat prototype.
5616 * hppa-obsd-tdep.c: Remove _initialize_hppaobsd_tdep prototype.
5617 * hppa-tdep.c: Remove _initialize_hppa_tdep prototype.
5618 * i386-bsd-nat.c: Remove _initialize_i386bsd_nat prototype.
5619 * i386-cygwin-tdep.c: Remove _initialize_i386_cygwin_tdep
5620 prototype.
5621 * i386-darwin-tdep.c: Remove _initialize_i386_darwin_tdep
5622 prototype.
5623 * i386-dicos-tdep.c: Remove _initialize_i386_dicos_tdep prototype.
5624 * i386-fbsd-nat.c: Remove _initialize_i386fbsd_nat prototype.
5625 * i386-fbsd-tdep.c: Remove _initialize_i386fbsd_tdep prototype.
5626 * i386-gnu-nat.c: Remove _initialize_i386gnu_nat prototype.
5627 * i386-gnu-tdep.c: Remove _initialize_i386gnu_tdep prototype.
5628 * i386-linux-nat.c: Remove _initialize_i386_linux_nat prototype.
5629 * i386-linux-tdep.c: Remove _initialize_i386_linux_tdep prototype.
5630 * i386-nbsd-nat.c: Remove _initialize_i386nbsd_nat prototype.
5631 * i386-nbsd-tdep.c: Remove _initialize_i386nbsd_tdep prototype.
5632 * i386-nto-tdep.c: Remove _initialize_i386nto_tdep prototype.
5633 * i386-obsd-nat.c: Remove _initialize_i386obsd_nat prototype.
5634 * i386-obsd-tdep.c: Remove _initialize_i386obsd_tdep prototype.
5635 * i386-sol2-nat.c: Remove _initialize_amd64_sol2_nat prototype.
5636 * i386-sol2-tdep.c: Remove _initialize_amd64_sol2_tdep prototype.
5637 * i386-tdep.c: Remove _initialize_i386_tdep prototype.
5638 * i386-windows-nat.c: Remove _initialize_i386_windows_nat
5639 prototype.
5640 * ia64-libunwind-tdep.c: Remove _initialize_libunwind_frame
5641 prototype.
5642 * ia64-linux-nat.c: Remove _initialize_ia64_linux_nat prototype.
5643 * ia64-linux-tdep.c: Remove _initialize_ia64_linux_tdep prototype.
5644 * ia64-tdep.c: Remove _initialize_ia64_tdep prototype.
5645 * ia64-vms-tdep.c: Remove _initialize_ia64_vms_tdep prototype.
5646 * infcall.c: Remove _initialize_infcall prototype.
5647 * infcmd.c: Remove _initialize_infcmd prototype.
5648 * inferior.c: Remove _initialize_inferiors prototype.
5649 * inflow.c: Remove _initialize_inflow prototype.
5650 * infrun.c: Remove _initialize_infrun prototype.
5651 * interps.c: Remove _initialize_interpreter prototype.
5652 * iq2000-tdep.c: Remove _initialize_iq2000_tdep prototype.
5653 * jit.c: Remove _initialize_jit prototype.
5654 * language.c: Remove _initialize_language prototype.
5655 * linux-fork.c: Remove _initialize_linux_fork prototype.
5656 * linux-nat.c: Remove _initialize_linux_nat prototype.
5657 * linux-tdep.c: Remove _initialize_linux_tdep prototype.
5658 * linux-thread-db.c: Remove _initialize_thread_db prototype.
5659 * lm32-tdep.c: Remove _initialize_lm32_tdep prototype.
5660 * m2-lang.c: Remove _initialize_m2_language prototype.
5661 * m32c-tdep.c: Remove _initialize_m32c_tdep prototype.
5662 * m32r-linux-nat.c: Remove _initialize_m32r_linux_nat prototype.
5663 * m32r-linux-tdep.c: Remove _initialize_m32r_linux_tdep prototype.
5664 * m32r-tdep.c: Remove _initialize_m32r_tdep prototype.
5665 * m68hc11-tdep.c: Remove _initialize_m68hc11_tdep prototype.
5666 * m68k-bsd-nat.c: Remove _initialize_m68kbsd_nat prototype.
5667 * m68k-bsd-tdep.c: Remove _initialize_m68kbsd_tdep prototype.
5668 * m68k-linux-nat.c: Remove _initialize_m68k_linux_tdep prototype.
5669 * m68k-linux-tdep.c: Remove _initialize_m68k_linux_tdep prototype.
5670 * m68k-tdep.c: Remove _initialize_m68k_tdep prototype.
5671 * m88k-bsd-nat.c: Remove _initialize_m68kbsd_nat prototype.
5672 * m88k-tdep.c: Remove _initialize_m68kbsd_tdep prototype.
5673 * machoread.c: Remove _initialize_machoread prototype.
5674 * macrocmd.c: Remove _initialize_macrocmd prototype.
5675 * macroscope.c: Remove _initialize_macroscope prototype.
5676 * maint.c: Remove _initialize_maint_cmds prototype.
5677 * mdebugread.c: Remove _initialize_mdebugread prototype.
5678 * memattr.c: Remove _initialize_mem prototype.
5679 * mep-tdep.c: Remove _initialize_mep_tdep prototype.
5680 * mi/mi-cmd-env.c: Remove _initialize_mi_cmd_env prototype.
5681 * mi/mi-cmds.c: Remove _initialize_mi_cmds prototype.
5682 * mi/mi-interp.c: Remove _initialize_mi_interp prototype.
5683 * mi/mi-main.c: Remove _initialize_mi_main prototype.
5684 * microblaze-linux-tdep.c: Remove
5685 _initialize_microblaze_linux_tdep prototype.
5686 * microblaze-tdep.c: Remove _initialize_microblaze_tdep prototype.
5687 * mips-fbsd-nat.c: Remove _initialize_mips_fbsd_nat prototype.
5688 * mips-fbsd-tdep.c: Remove _initialize_mips_fbsd_tdep prototype.
5689 * mips-linux-nat.c: Remove _initialize_mips_linux_nat prototype.
5690 * mips-linux-tdep.c: Remove _initialize_mips_linux_tdep prototype.
5691 * mips-nbsd-nat.c: Remove _initialize_mipsnbsd_nat prototype.
5692 * mips-nbsd-tdep.c: Remove _initialize_mipsnbsd_tdep prototype.
5693 * mips-sde-tdep.c: Remove _initialize_mips_sde_tdep prototype.
5694 * mips-tdep.c: Remove _initialize_mips_tdep prototype.
5695 * mips64-obsd-nat.c: Remove _initialize_mips64obsd_nat prototype.
5696 * mips64-obsd-tdep.c: Remove _initialize_mips64obsd_tdep
5697 prototype.
5698 * mipsread.c: Remove _initialize_mipsread prototype.
5699 * mn10300-linux-tdep.c: Remove _initialize_mn10300_linux_tdep
5700 prototype.
5701 * mn10300-tdep.c: Remove _initialize_mn10300_tdep prototype.
5702 * moxie-tdep.c: Remove _initialize_moxie_tdep prototype.
5703 * msp430-tdep.c: Remove _initialize_msp430_tdep prototype.
5704 * mt-tdep.c: Remove _initialize_mt_tdep prototype.
5705 * nds32-tdep.c: Remove _initialize_nds32_tdep prototype.
5706 * nios2-linux-tdep.c: Remove _initialize_nios2_linux_tdep
5707 prototype.
5708 * nios2-tdep.c: Remove _initialize_nios2_tdep prototype.
5709 * nto-procfs.c: Remove _initialize_procfs prototype.
5710 * nto-tdep.c: Remove _initialize_nto_tdep prototype.
5711 * objc-lang.c: Remove _initialize_objc_language prototype.
5712 * objfiles.c: Remove _initialize_objfiles prototype.
5713 * observer.c: Remove observer_test_first_notification_function,
5714 observer_test_second_notification_function,
5715 observer_test_third_notification_function, and
5716 _initialize_observer prototypes.
5717 * opencl-lang.c: Remove _initialize_opencl_language prototypes.
5718 * osabi.c: Remove _initialize_gdb_osabi prototype.
5719 * osdata.c: Remove _initialize_osdata prototype.
5720 * p-valprint.c: Remove _initialize_pascal_valprint prototype.
5721 * parse.c: Remove _initialize_parse prototype.
5722 * ppc-fbsd-nat.c: Remove _initialize_ppcfbsd_nat prototype.
5723 * ppc-fbsd-tdep.c: Remove _initialize_ppcfbsd_tdep prototype.
5724 * ppc-linux-nat.c: Remove _initialize_ppc_linux_nat prototype.
5725 * ppc-linux-tdep.c: Remove _initialize_ppc_linux_tdep prototype.
5726 * ppc-nbsd-nat.c: Remove _initialize_ppcnbsd_nat prototype.
5727 * ppc-nbsd-tdep.c: Remove _initialize_ppcnbsd_tdep prototype.
5728 * ppc-obsd-nat.c: Remove _initialize_ppcobsd_nat prototype.
5729 * ppc-obsd-tdep.c: Remove _initialize_ppcobsd_tdep prototype.
5730 * printcmd.c: Remove _initialize_printcmd prototype.
5731 * probe.c: Remove _initialize_probe prototype.
5732 * proc-api.c: Remove _initialize_proc_api prototype.
5733 * proc-events.c: Remove _initialize_proc_events prototype.
5734 * proc-service.c: Remove _initialize_proc_service prototype.
5735 * procfs.c: Remove _initialize_procfs prototype.
5736 * psymtab.c: Remove _initialize_psymtab prototype.
5737 * python/python.c: Remove _initialize_python prototype.
5738 * ravenscar-thread.c: Remove _initialize_ravenscar prototype.
5739 * record-btrace.c: Remove _initialize_record_btrace prototype.
5740 * record-full.c: Remove _initialize_record_full prototype.
5741 * record.c: Remove _initialize_record prototype.
5742 * regcache.c: Remove _initialize_regcache prototype.
5743 * reggroups.c: Remove _initialize_reggroup prototype.
5744 * remote-notif.c: Remove _initialize_notif prototype.
5745 * remote-sim.c: Remove _initialize_remote_sim prototype.
5746 * remote.c: Remove _initialize_remote prototype.
5747 * reverse.c: Remove _initialize_reverse prototype.
5748 * rl78-tdep.c: Remove _initialize_rl78_tdep prototype.
5749 * rs6000-aix-tdep.c: Remove _initialize_rs6000_aix_tdep prototype.
5750 * rs6000-lynx178-tdep.c: Remove _initialize_rs6000_lynx178_tdep
5751 prototype.
5752 * rs6000-nat.c: Remove _initialize_rs6000_nat prototype.
5753 * rs6000-tdep.c: Remove _initialize_rs6000_tdep prototype.
5754 * rust-exp.y: Remove _initialize_rust_exp prototype.
5755 * rx-tdep.c: Remove _initialize_rx_tdep prototype.
5756 * s390-linux-nat.c: Remove _initialize_s390_nat prototype.
5757 * s390-linux-tdep.c: Remove _initialize_s390_tdep prototype.
5758 * score-tdep.c: Remove _initialize_score_tdep prototype.
5759 * selftest-arch.c: Remove _initialize_selftests_foreach_arch
5760 prototype.
5761 * ser-go32.c: Remove _initialize_ser_dos prototype.
5762 * ser-mingw.c: Remove _initialize_ser_windows prototype.
5763 * ser-pipe.c: Remove _initialize_ser_pipe prototype.
5764 * ser-tcp.c: Remove _initialize_ser_tcp prototype.
5765 * ser-unix.c: Remove _initialize_ser_hardwire prototype.
5766 * serial.c: Remove _initialize_serial prototype.
5767 * sh-linux-tdep.c: Remove _initialize_sh_linux_tdep prototype.
5768 * sh-nbsd-nat.c: Remove _initialize_shnbsd_nat prototype.
5769 * sh-nbsd-tdep.c: Remove _initialize_shnbsd_tdep prototype.
5770 * sh-tdep.c: Remove _initialize_sh_tdep prototype.
5771 * skip.c: Remove _initialize_step_skip prototype.
5772 * sol-thread.c: Remove _initialize_sol_thread prototype.
5773 * solib-aix.c: Remove _initialize_solib_aix prototype.
5774 * solib-darwin.c: Remove _initialize_darwin_solib prototype.
5775 * solib-dsbt.c: Remove _initialize_dsbt_solib prototype.
5776 * solib-frv.c: Remove _initialize_frv_solib prototype.
5777 * solib-spu.c: Remove _initialize_spu_solib prototype.
5778 * solib-svr4.c: Remove _initialize_svr4_solib prototype.
5779 * solib-target.c: Remove _initialize_solib_target prototype.
5780 * solib.c: Remove _initialize_solib prototype.
5781 * source.c: Remove _initialize_source prototype.
5782 * sparc-linux-nat.c: Remove _initialize_sparc_linux_nat prototype.
5783 * sparc-linux-tdep.c: Remove _initialize_sparc_linux_tdep
5784 prototype.
5785 * sparc-nat.c: Remove _initialize_sparc_nat prototype.
5786 * sparc-nbsd-nat.c: Remove _initialize_sparcnbsd_nat prototype.
5787 * sparc-nbsd-tdep.c: Remove _initialize_sparcnbsd_tdep prototype.
5788 * sparc-obsd-tdep.c: Remove _initialize_sparc32obsd_tdep
5789 prototype.
5790 * sparc-sol2-nat.c: Remove _initialize_sparc_sol2_nat prototype.
5791 * sparc-sol2-tdep.c: Remove _initialize_sparc_sol2_tdep prototype.
5792 * sparc-tdep.c: Remove _initialize_sparc_tdep prototype.
5793 * sparc64-fbsd-nat.c: Remove _initialize_sparc64fbsd_nat
5794 prototype.
5795 * sparc64-fbsd-tdep.c: Remove _initialize_sparc64fbsd_tdep
5796 prototype.
5797 * sparc64-linux-nat.c: Remove _initialize_sparc64_linux_nat
5798 prototype.
5799 * sparc64-linux-tdep.c: Remove _initialize_sparc64_linux_tdep
5800 prototype.
5801 * sparc64-nat.c: Remove _initialize_sparc64_nat prototype.
5802 * sparc64-nbsd-nat.c: Remove _initialize_sparc64nbsd_nat
5803 prototype.
5804 * sparc64-nbsd-tdep.c: Remove _initialize_sparc64nbsd_tdep
5805 prototype.
5806 * sparc64-obsd-nat.c: Remove _initialize_sparc64obsd_nat
5807 prototype.
5808 * sparc64-obsd-tdep.c: Remove _initialize_sparc64obsd_tdep
5809 prototype.
5810 * sparc64-sol2-tdep.c: Remove _initialize_sparc64_sol2_tdep
5811 prototype.
5812 * spu-linux-nat.c: Remove _initialize_spu_nat prototype.
5813 * spu-multiarch.c: Remove _initialize_spu_multiarch prototype.
5814 * spu-tdep.c: Remove _initialize_spu_tdep prototype.
5815 * stabsread.c: Remove _initialize_stabsread prototype.
5816 * stack.c: Remove _initialize_stack prototype.
5817 * stap-probe.c: Remove _initialize_stap_probe prototype.
5818 * std-regs.c: Remove _initialize_frame_reg prototype.
5819 * symfile-debug.c: Remove _initialize_symfile_debug prototype.
5820 * symfile-mem.c: Remove _initialize_symfile_mem prototype.
5821 * symfile.c: Remove _initialize_symfile prototype.
5822 * symmisc.c: Remove _initialize_symmisc prototype.
5823 * symtab.c: Remove _initialize_symtab prototype.
5824 * target-dcache.c: Remove _initialize_target_dcache prototype.
5825 * target-descriptions.c: Remove _initialize_target_descriptions
5826 prototype.
5827 * thread.c: Remove _initialize_thread prototype.
5828 * tic6x-linux-tdep.c: Remove _initialize_tic6x_linux_tdep
5829 prototype.
5830 * tic6x-tdep.c: Remove _initialize_tic6x_tdep prototype.
5831 * tilegx-linux-nat.c: Remove _initialize_tile_linux_nat prototype.
5832 * tilegx-linux-tdep.c: Remove _initialize_tilegx_linux_tdep
5833 prototype.
5834 * tilegx-tdep.c: Remove _initialize_tilegx_tdep prototype.
5835 * tracefile-tfile.c: Remove _initialize_tracefile_tfile prototype.
5836 * tracefile.c: Remove _initialize_tracefile prototype.
5837 * tracepoint.c: Remove _initialize_tracepoint prototype.
5838 * tui/tui-hooks.c: Remove _initialize_tui_hooks prototype.
5839 * tui/tui-interp.c: Remove _initialize_tui_interp prototype.
5840 * tui/tui-layout.c: Remove _initialize_tui_layout prototype.
5841 * tui/tui-regs.c: Remove _initialize_tui_regs prototype.
5842 * tui/tui-stack.c: Remove _initialize_tui_stack prototype.
5843 * tui/tui-win.c: Remove _initialize_tui_win prototype.
5844 * tui/tui.c: Remove _initialize_tui prototype.
5845 * typeprint.c: Remove _initialize_typeprint prototype.
5846 * user-regs.c: Remove _initialize_user_regs prototype.
5847 * utils.c: Remove _initialize_utils prototype.
5848 * v850-tdep.c: Remove _initialize_v850_tdep prototype.
5849 * valarith.c: Remove _initialize_valarith prototype.
5850 * valops.c: Remove _initialize_valops prototype.
5851 * valprint.c: Remove _initialize_valprint prototype.
5852 * value.c: Remove _initialize_values prototype.
5853 * varobj.c: Remove _initialize_varobj prototype.
5854 * vax-bsd-nat.c: Remove _initialize_vaxbsd_nat prototype.
5855 * vax-nbsd-tdep.c: Remove _initialize_vaxnbsd_tdep prototype.
5856 * vax-tdep.c: Remove _initialize_vax_tdep prototype.
5857 * windows-nat.c: Remove _initialize_windows_nat,
5858 _initialize_check_for_gdb_ini, and _initialize_loadable
5859 prototypes.
5860 * windows-tdep.c: Remove _initialize_windows_tdep prototype.
5861 * xcoffread.c: Remove _initialize_xcoffread prototype.
5862 * xml-support.c: Remove _initialize_xml_support prototype.
5863 * xstormy16-tdep.c: Remove _initialize_xstormy16_tdep prototype.
5864 * xtensa-linux-nat.c: Remove _initialize_xtensa_linux_nat
5865 prototype.
5866 * xtensa-linux-tdep.c: Remove _initialize_xtensa_linux_tdep
5867 prototype.
5868 * xtensa-tdep.c: Remove _initialize_xtensa_tdep prototype.
5869
5870 2017-09-08 Keith Seitz <keiths@redhat.com>
5871
5872 * dwarf2read.c (struct field_info) <fnfields>: Remove unused
5873 field.
5874
5875 2017-09-08 Christoph Weinmann <christoph.t.weinmann@intel.com>
5876
5877 * f-valprint.c (f_val_print): Remove check for one byte
5878 sized integers. Remove printing of character type.
5879
5880 2017-09-08 Frank Penczek <frank.penczek@intel.com>
5881 Christoph Weinmann <christoph.t.weinmann@intel.com>
5882 Bernhard Heckel <bernhard.heckel@intel.com>
5883
5884 * f-typeprint.c (f_type_print_base): Use fprintfi_filtered
5885 to maintain proper indentation when printing pointers/refs.
5886
5887 2017-09-07 Joel Brobecker <brobecker@adacore.com>
5888
5889 GDB 8.0.1 released.
5890
5891 2017-09-07 Joel Brobecker <brobecker@adacore.com>
5892
5893 * NEWS (Changes in GDB 7.11): Remove entry for QStartupWithShell.
5894
5895 2017-09-05 Tom Tromey <tom@tromey.com>
5896
5897 * parse.c (funcall_chain): Now a std::vector.
5898 (start_arglist, end_arglist): Simplify.
5899 (free_funcalls): Remove.
5900 (parse_exp_in_context_1): Remove cleanup.
5901
5902 2017-09-05 Tom Tromey <tom@tromey.com>
5903
5904 * go-exp.y (go_parse): Don't create a cleanup.
5905
5906 2017-09-05 Tom Tromey <tom@tromey.com>
5907
5908 * d-exp.y (PrimaryExpression): Use std::string.
5909 (d_parse): Don't create a cleanup.
5910
5911 2017-09-05 Tom Tromey <tom@tromey.com>
5912
5913 * utils.c (do_clear_parser_state): Remove.
5914 (make_cleanup_clear_parser_state): Remove.
5915 * p-exp.y (pascal_parse): Use scoped_restore.
5916 * m2-exp.y (m2_parse): Use scoped_restore.
5917 * f-exp.y (f_parse): Use scoped_restore.
5918 * d-exp.y (d_parse): Use scoped_restore.
5919 * c-exp.y (c_parse): Use scoped_restore.
5920 * ada-exp.y (ada_parse): Use scoped_restore.
5921 * utils.h (make_cleanup_clear_parser_state): Remove.
5922
5923 2017-09-06 Keith Seitz <keiths@redhat.com>
5924
5925 * dwarf2read.c (dw2_linkage_name_attr): New function.
5926 (dw2_linkage_name): New function.
5927 (dwarf2_compute_name, dwarf2_physname, read_call_site_scope)
5928 (guess_full_die_structure_name, dwarf2_name): Use dw2_linkage_name.
5929 (anonymous_struct_prefix, dwarf2_name): Use dw2_linkage_name_attr.
5930
5931 2017-09-06 Kamil Rytarowski <n54@gmx.com>
5932
5933 * config/djgpp/djconfig.sh: Correct shell portability issue.
5934
5935 2017-09-06 Kamil Rytarowski <n54@gmx.com>
5936
5937 * configure.nat: Define HAVE_NATIVE_GCORE_HOST on NetBSD.
5938
5939 2017-09-06 John Baldwin <jhb@FreeBSD.org>
5940
5941 * Makefile.in (ALLDEPFILES): Add mips-fbsd-nat.c.
5942 * NEWS: Mention new FreeBSD/mips native configuration.
5943 * configure.host: Add aarch64*-*-freebsd*.
5944 * configure.nat: Likewise.
5945 * aarch64-fbsd-nat.c: New file.
5946
5947 2017-09-06 John Baldwin <jhb@FreeBSD.org>
5948
5949 * Makefile.in (ALL_64_TARGET_OBS): Add aarch64-fbsd-tdep.o.
5950 (ALLDEPFILES): Add aarch64-fbsd-tdep.c.
5951 * NEWS: Mention new FreeBSD/aarch64 target.
5952 * configure.tgt: Add aarch64*-*-freebsd*.
5953 * aarch64-fbsd-tdep.c: New file.
5954 * aarch64-fbsd-tdep.h: New file.
5955
5956 2017-09-06 Kamil Rytarowski <n54@gmx.com>
5957
5958 * MAINTAINERS (Write After Approval): Add Kamil Rytarowski.
5959
5960 2017-09-06 Jan Kratochvil <jan.kratochvil@redhat.com>
5961
5962 * parse.c (find_minsym_type_and_address): Don't relocate addresses
5963 of TLS symbols.
5964
5965 2017-09-05 Philippe Waroquiers <philippe.waroquiers@skynet.be>
5966
5967 * objfiles.c (get_objfile_bfd_data): Remove useless obstack_init
5968 call.
5969
5970 2017-09-05 Simon Marchi <simon.marchi@ericsson.com>
5971
5972 * infrun.c (follow_exec): Call add_thread after
5973 target_find_description.
5974
5975 2017-09-05 Simon Marchi <simon.marchi@ericsson.com>
5976
5977 * infrun.c (handle_inferior_event_1): When exec'ing, read
5978 stop_pc after follow_exec.
5979
5980 2017-09-05 Simon Marchi <simon.marchi@ericsson.com>
5981
5982 * remote.c (process_g_packet): Update error message.
5983
5984 2017-09-05 Yao Qi <yao.qi@linaro.org>
5985
5986 * configure.tgt (gdb_target_obs): Add i386.o for x86_64-*
5987 targets.
5988
5989 2017-09-05 Pedro Alves <palves@redhat.com>
5990
5991 * eval.c (eval_call, evaluate_funcall): New functions, factored
5992 out from ...
5993 (evaluate_subexp_standard): ... this.
5994
5995 2017-09-05 Yao Qi <yao.qi@linaro.org>
5996
5997 * amd64-tdep.c (amd64_target_description): Create target
5998 descriptions.
5999 (_initialize_amd64_tdep): Don't call functions
6000 initialize_tdesc_amd64_*. Add self tests.
6001 * arch/amd64.c (amd64_create_target_description): Add parameter
6002 is_linux. Call set_tdesc_osabi if is_linux is true.
6003 * arch/amd64.h (amd64_create_target_description): Update the
6004 declaration.
6005 * arch/i386.c (i386_create_target_description): Add parameter
6006 is_linux. Call set_tdesc_osabi if is_linux is true.
6007 * arch/i386.h (i386_create_target_description): Update
6008 declaration.
6009 * configure.tgt: Add i386.o to gdb_target_obs.
6010 * features/Makefile (XMLTOC): Remove i386/*.xml.
6011 * features/i386/amd64-avx-avx512.c: Remove.
6012 * features/i386/amd64-avx-mpx-avx512-pku.c: Remove.
6013 * features/i386/amd64-avx-mpx.c: Remove.
6014 * features/i386/amd64-avx.c: Remove.
6015 * features/i386/amd64-mpx.c: Remove.
6016 * features/i386/amd64.c: Remove.
6017 * features/i386/i386-avx-avx512.c: Remove.
6018 * features/i386/i386-avx-mpx-avx512-pku.c: Remove.
6019 * features/i386/i386-avx-mpx.c: Remove.
6020 * features/i386/i386-avx.c: Remove.
6021 * features/i386/i386-mmx.c: Remove.
6022 * features/i386/i386-mpx.c: Remove.
6023 * features/i386/i386.c: Remove.
6024 * i386-tdep.c: Don't include features/i386/i386*.c., include
6025 target-descriptions.h and arch/i386.h.
6026 (i386_target_description): Create target descriptions.
6027 (i386_gdbarch_init): Don't call initialize_tdesc_i386_*
6028 functions. Do self tests.
6029
6030 2017-09-05 Yao Qi <yao.qi@linaro.org>
6031
6032 * features/Makefile (XMLTOC): Remove i386/amd64XXX-linux.xml.
6033 * features/i386/amd64-avx-avx512-linux.c: Removed.
6034 * features/i386/amd64-avx-linux.c: Removed.
6035 * features/i386/amd64-avx-mpx-avx512-pku-linux.c: Removed.
6036 * features/i386/amd64-avx-mpx-linux.c: Removed.
6037 * features/i386/amd64-linux.c: Removed.
6038 * features/i386/amd64-mpx-linux.c: Removed.
6039 * features/i386/x32-avx-avx512-linux.c: Removed.
6040 * features/i386/x32-avx-linux.c: Removed.
6041 * features/i386/x32-linux.c: Removed.
6042
6043 2017-09-05 Yao Qi <yao.qi@linaro.org>
6044
6045 * amd64-linux-tdep.c: Include arch/amd64.h. Don't include
6046 features/i386/*.c.
6047 (amd64_linux_read_description): Call
6048 amd64_create_target_description.
6049 * arch/amd64.c: New file.
6050 * arch/amd64.h: New file.
6051 * configure.tgt (x86_64-*-linux*): Append amd64.o.
6052 * Makefile.in (ALL_64_TARGET_OBS): Append amd64.o.
6053
6054 2017-09-05 Yao Qi <yao.qi@linaro.org>
6055
6056 * amd64-linux-tdep.c: Don't include amd64-XXX-linux and
6057 x32-XXX-linux.c. Include 64bit-XX.c and x32-XX.c.
6058 (amd64_linux_read_description): Create target descriptions.
6059 (_initialize_amd64_linux_tdep): Don't call initialize_tdesc_XXX
6060 functions. Add unit tests.
6061 * features/Makefile (FEATURE_XMLFILES): Append 64bit-XXX.xml and
6062 x32-core.xml.
6063 * features/i386/64bit-avx.c: Generated.
6064 * features/i386/64bit-avx512.c: Generated.
6065 * features/i386/64bit-core.c: Generated.
6066 * features/i386/64bit-linux.c: Generated.
6067 * features/i386/64bit-mpx.c: Generated.
6068 * features/i386/64bit-pkeys.c: Generated.
6069 * features/i386/64bit-segments.c: Generated.
6070 * features/i386/64bit-sse.c: Generated.
6071 * features/i386/x32-core.c: Generated.
6072 * target-descriptions.c (maint_print_c_tdesc_cmd): Print feature
6073 c files for amd64-linux and x32-linux.
6074
6075 2017-09-05 Yao Qi <yao.qi@linaro.org>
6076
6077 * amd64-linux-tdep.c (amd64_linux_read_description): New
6078 function.
6079 (amd64_linux_core_read_description): Call
6080 amd64_linux_read_description.
6081 (amd64_linux_init_abi): Likewise.
6082 (amd64_x32_linux_init_abi): Likewise.
6083 * amd64-linux-tdep.h (amd64_linux_read_description): Declare.
6084 * x86-linux-nat.c (x86_linux_read_description): Call
6085 amd64_linux_read_description.
6086
6087 2017-09-05 Yao Qi <yao.qi@linaro.org>
6088
6089 * amd64-linux-tdep.c (amd64_linux_core_read_description): Update
6090 comments.
6091
6092 2017-09-05 Yao Qi <yao.qi@linaro.org>
6093
6094 * features/Makefile (XMLTOC): Remove i386/i386-XX-linux.xml.
6095 * features/i386/i386-avx-avx512-linux.c: Remove.
6096 * features/i386/i386-avx-linux.c: Remove.
6097 * features/i386/i386-avx-mpx-avx512-pku-linux.c: Remove.
6098 * features/i386/i386-avx-mpx-linux.c: Remove.
6099 * features/i386/i386-linux.c: Remove.
6100 * features/i386/i386-mmx-linux.c: Remove.
6101 * features/i386/i386-mpx-linux.c: Remove.
6102
6103 2017-09-05 Yao Qi <yao.qi@linaro.org>
6104
6105 * Makefile.in (ALL_TARGET_OBS): Add i386.o.
6106 (SFILES): Add arch/i386.c.
6107 (HFILES_NO_SRCDIR): Add arch/i386.h.
6108 * arch/i386.c: New file.
6109 * arch/i386.h: New file.
6110 * arch/tdesc.h (allocate_target_description): Declare.
6111 (set_tdesc_architecture): Declare.
6112 (set_tdesc_osabi): Declare.
6113 * configure.tgt (i[34567]86-*-linux*): Add i386.o.
6114 * i386-linux-tdep.c: Don't include ../features/i386/32bit-XXX.c.
6115 include arch/i386.h.
6116 (i386_linux_read_description): Remove code and call
6117 i386_create_target_description.
6118 (set_tdesc_architecture): New function.
6119 (set_tdesc_osabi): New function.
6120 * target-descriptions.h (allocate_target_description): Remove.
6121
6122 2017-09-05 Yao Qi <yao.qi@linaro.org>
6123
6124 * arch/tdesc.h (tdesc_create_feature): Add an argument xml.
6125 * target-descriptions.c (tdesc_create_feature): Likewise, and
6126 adjust code.
6127 * features/i386/32bit-avx.c: Re-generated.
6128 * features/i386/32bit-avx512.c: Re-generated.
6129 * features/i386/32bit-core.c: Re-generated.
6130 * features/i386/32bit-linux.c: Re-generated.
6131 * features/i386/32bit-mpx.c: Re-generated.
6132 * features/i386/32bit-pkeys.c: Re-generated.
6133 * features/i386/32bit-sse.c: Re-generated.
6134
6135 2017-09-05 Yao Qi <yao.qi@linaro.org>
6136
6137 * regformats/regdef.h (struct reg): Override operator == and !=.
6138
6139 2017-09-05 Yao Qi <yao.qi@linaro.org>
6140
6141 * arch/tdesc.h: New file.
6142 * regformats/regdat.sh: Generate code using tdesc_create_reg.
6143 * target-descriptions.c: Update comments.
6144 * target-descriptions.h: Include "arch/tdesc.h". Remove the
6145 declarations.
6146 * features/i386/32bit-avx.c: Re-generated.
6147 * features/i386/32bit-avx512.c: Re-generated.
6148 * features/i386/32bit-core.c: Re-generated.
6149 * features/i386/32bit-linux.c: Re-generated.
6150 * features/i386/32bit-mpx.c: Re-generated.
6151 * features/i386/32bit-pkeys.c: Re-generated.
6152 * features/i386/32bit-sse.c: Re-generated.
6153
6154 2017-09-05 Yao Qi <yao.qi@linaro.org>
6155
6156 * regformats/regdat.sh: Update generated code.
6157
6158 2017-09-05 Yao Qi <yao.qi@linaro.org>
6159
6160 * regformats/regdat.sh: Adjust code order.
6161
6162 2017-09-05 Simon Marchi <simon.marchi@ericsson.com>
6163
6164 * expprint.c (dump_subexp_body_standard): Use constant format
6165 string in fprintf_filtered call.
6166
6167 2017-09-04 John Baldwin <jhb@FreeBSD.org>
6168
6169 * configure.nat: Add "x86-nat.o x86-dregs.o" for NetBSD/amd64 and
6170 NetBSD/i386.
6171 * x86-bsd-nat.c [!DBREG_DRX && __NetBSD__]: Define DBREG_DRX.
6172
6173 2017-09-04 John Baldwin <jhb@FreeBSD.org>
6174
6175 * bsd-kvm.o: Make <sys/user.h> conditional on HAVE_SYS_USER_H.
6176
6177 2017-09-04 John Baldwin <jhb@FreeBSD.org>
6178
6179 * bsd-kvm.o: Define _KMEMUSER.
6180 * configure.ac: Define _KMEMUSER when checking for "struct lwp".
6181 * configure: Regenerate.
6182
6183 2017-09-04 John Baldwin <jhb@FreeBSD.org>
6184
6185 * amd64-fbsd-nat.c: Add include of "x86-xstate.h".
6186 * i386-fbsd-nat.c: Likewise.
6187
6188 2017-09-04 John Baldwin <jhb@FreeBSD.org>
6189
6190 * unittests/array-view-selftests.c: Add include of <array>.
6191
6192 2017-09-04 John Baldwin <jhb@FreeBSD.org>
6193
6194 * spu-tdep.c (flush_ea_cache): Add missing argument to
6195 call_function_by_hand.
6196
6197 2017-09-04 Pedro Alves <palves@redhat.com>
6198
6199 * NEWS (Safer support for debugging with no debug info): New.
6200
6201 2017-09-04 Pedro Alves <palves@redhat.com>
6202
6203 * c-exp.y (function_method, function_method_void): Add current
6204 instance flags to TYPE_INSTANCE.
6205 * dwarf2read.c (check_modifier): New.
6206 (compute_delayed_physnames): Assert that only C++ adds delayed
6207 physnames. Mark fn_fields as const/volatile depending on
6208 physname.
6209 * eval.c (make_params): New type_instance_flags parameter. Use
6210 it as the new type's instance flags.
6211 (evaluate_subexp_standard) <TYPE_INSTANCE>: Extract the instance
6212 flags element and pass it to make_params.
6213 * expprint.c (print_subexp_standard) <TYPE_INSTANCE>: Handle
6214 instance flags element.
6215 (dump_subexp_body_standard) <TYPE_INSTANCE>: Likewise.
6216 * gdbtypes.h: Include "enum-flags.h".
6217 (type_instance_flags): New enum-flags type.
6218 (TYPE_CONST, TYPE_VOLATILE, TYPE_RESTRICT, TYPE_ATOMIC)
6219 (TYPE_CODE_SPACE, TYPE_DATA_SPACE): Return boolean.
6220 * parse.c (operator_length_standard) <TYPE_INSTANCE>: Adjust.
6221 (follow_type_instance_flags): New function.
6222 (operator_check_standard) <TYPE_INSTANCE>: Adjust.
6223 * parser-defs.h (follow_type_instance_flags): Declare.
6224 * valops.c (value_struct_elt_for_reference): const/volatile must
6225 match too.
6226
6227 2017-09-04 Pedro Alves <palves@redhat.com>
6228
6229 * cp-namespace.c (cp_search_static_and_baseclasses): Handle
6230 function/method scopes; lookup the nested name as a function local
6231 static variable.
6232
6233 2017-09-04 Pedro Alves <palves@redhat.com>
6234
6235 (%type <voidval>): Add function_method.
6236 * c-exp.y (exp): New production for calls with no arguments.
6237 (function_method, function_method_void_or_typelist): New
6238 productions.
6239 (exp): New production for "method()::static_var".
6240 * eval.c (evaluate_subexp_standard): Handle OP_FUNC_STATIC_VAR.
6241 * expprint.c (print_subexp_standard, dump_subexp_body_standard):
6242 Handle OP_FUNC_STATIC_VAR.
6243 * parse.c (operator_length_standard):
6244 Handle OP_FUNC_STATIC_VAR.
6245
6246 2017-09-04 Pedro Alves <palves@redhat.com>
6247
6248 * eval.c (evaluate_subexp_standard): Remove UNOP_MEMVAL_TLS
6249 handling.
6250 * expprint.c (print_subexp_standard, dump_subexp_body_standard):
6251 Ditto.
6252 * parse.c (operator_length_standard, operator_check_standard):
6253 Ditto.
6254 * std-operator.def (UNOP_MEMVAL_TLS): Delete.
6255
6256 2017-09-04 Pedro Alves <palves@redhat.com>
6257
6258 * ax-gdb.c: Include "typeprint.h".
6259 (gen_expr_for_cast): New function.
6260 (gen_expr) <OP_CAST, OP_CAST_TYPE>: Use it.
6261 <OP_VAR_VALUE, OP_MSYM_VAR_VALUE>: Error out if the variable's
6262 type is unknown.
6263 * dwarf2read.c (new_symbol_full): Fallback to int instead of
6264 nodebug_data_symbol.
6265 * eval.c: Include "typeprint.h".
6266 (evaluate_subexp_standard) <OP_VAR_VALUE, OP_VAR_MSYM_VALUE>:
6267 Error out if symbol has unknown type.
6268 <UNOP_CAST, UNOP_CAST_TYPE>: Common bits factored out to
6269 evaluate_subexp_for_cast.
6270 (evaluate_subexp_for_address, evaluate_subexp_for_sizeof): Handle
6271 OP_VAR_MSYM_VALUE.
6272 (evaluate_subexp_for_cast): New function.
6273 * gdbtypes.c (init_nodebug_var_type): New function.
6274 (objfile_type): Use it to initialize types of variables with no
6275 debug info.
6276 * typeprint.c (error_unknown_type): New.
6277 * typeprint.h (error_unknown_type): New declaration.
6278 * compile/compile-c-types.c (convert_type_basic): Handle
6279 TYPE_CODE_ERROR; warn and fallback to int for variables with
6280 unknown type.
6281
6282 2017-09-04 Pedro Alves <palves@redhat.com>
6283
6284 * eval.c (evaluate_var_value): New function, factored out from ...
6285 (evaluate_subexp_standard): ... here.
6286
6287 2017-09-04 Pedro Alves <palves@redhat.com>
6288
6289 * eval.c (evaluate_subexp_standard) <UNOP_COMPLEMENT, UNOP_ADDR>:
6290 Remove useless assignments to 'op'.
6291
6292 2017-09-04 Pedro Alves <palves@redhat.com>
6293
6294 * eval.c (eval_skip_value): New function.
6295 (evaluate_subexp_standard): Use it.
6296
6297 2017-09-04 Pedro Alves <palves@redhat.com>
6298
6299 * eval.c (evaluate_subexp_standard): <OP_FUNCALL>: Extract
6300 function name from symbol/minsym and pass it to
6301 error_call_unknown_return_type.
6302
6303 2017-09-04 Pedro Alves <palves@redhat.com>
6304
6305 * ada-lang.c (resolve_subexp): Handle OP_VAR_MSYM_VALUE.
6306 * ax-gdb.c (gen_msym_var_ref): New function.
6307 (gen_expr): Handle OP_VAR_MSYM_VALUE.
6308 * eval.c (evaluate_var_msym_value): New function.
6309 * eval.c (evaluate_subexp_standard): Handle OP_VAR_MSYM_VALUE.
6310 <OP_FUNCALL>: Extract function name from symbol/minsym and pass it
6311 to call_function_by_hand.
6312 * expprint.c (print_subexp_standard, dump_subexp_body_standard):
6313 Handle OP_VAR_MSYM_VALUE.
6314 (union exp_element) <msymbol>: New field.
6315 * minsyms.h (struct type): Forward declare.
6316 (find_minsym_type_and_address): Declare.
6317 * parse.c (write_exp_elt_msym): New function.
6318 (write_exp_msymbol): Delete, refactored as ...
6319 (find_minsym_type_and_address): ... this new function.
6320 (write_exp_msymbol): Reimplement using OP_VAR_MSYM_VALUE.
6321 (operator_length_standard, operator_check_standard): Handle
6322 OP_VAR_MSYM_VALUE.
6323 * std-operator.def (OP_VAR_MSYM_VALUE): New.
6324
6325 2017-09-04 Pedro Alves <palves@redhat.com>
6326
6327 * ada-lang.c (ada_evaluate_subexp) <TYPE_CODE_FUNC>: Don't handle
6328 TYPE_GNU_IFUNC specially here. Throw error if return type is
6329 unknown.
6330 * ada-typeprint.c (print_func_type): Handle functions with unknown
6331 return type.
6332 * c-typeprint.c (c_type_print_base): Handle functions and methods
6333 with unknown return type.
6334 * compile/compile-c-symbols.c (convert_symbol_bmsym)
6335 <mst_text_gnu_ifunc>: Use nodebug_text_gnu_ifunc_symbol.
6336 * compile/compile-c-types.c: Include "objfiles.h".
6337 (convert_func): For functions with unknown return type, warn and
6338 default to int.
6339 * compile/compile-object-run.c (compile_object_run): Adjust call
6340 to call_function_by_hand_dummy.
6341 * elfread.c (elf_gnu_ifunc_resolve_addr): Adjust call to
6342 call_function_by_hand.
6343 * eval.c (evaluate_subexp_standard): Adjust calls to
6344 call_function_by_hand. Handle functions and methods with unknown
6345 return type. Pass expect_type to call_function_by_hand.
6346 * f-typeprint.c (f_type_print_base): Handle functions with unknown
6347 return type.
6348 * gcore.c (call_target_sbrk): Adjust call to
6349 call_function_by_hand.
6350 * gdbtypes.c (objfile_type): Leave nodebug text symbol with NULL
6351 return type instead of int. Make nodebug_text_gnu_ifunc_symbol be
6352 an integer address type instead of nodebug.
6353 * guile/scm-value.c (gdbscm_value_call): Adjust call to
6354 call_function_by_hand.
6355 * infcall.c (error_call_unknown_return_type): New function.
6356 (call_function_by_hand): New "default_return_type" parameter.
6357 Pass it down.
6358 (call_function_by_hand_dummy): New "default_return_type"
6359 parameter. Use it instead of defaulting to int. If there's no
6360 default and the return type is unknown, throw an error. If
6361 there's a default return type, and the called function has no
6362 debug info, then assume the function is prototyped.
6363 * infcall.h (call_function_by_hand, call_function_by_hand_dummy):
6364 New "default_return_type" parameter.
6365 (error_call_unknown_return_type): New declaration.
6366 * linux-fork.c (call_lseek): Cast return type of lseek.
6367 (inferior_call_waitpid, checkpoint_command): Adjust calls to
6368 call_function_by_hand.
6369 * linux-tdep.c (linux_infcall_mmap, linux_infcall_munmap): Adjust
6370 calls to call_function_by_hand.
6371 * m2-typeprint.c (m2_procedure): Handle functions with unknown
6372 return type.
6373 * objc-lang.c (lookup_objc_class, lookup_child_selector)
6374 (value_nsstring, print_object_command): Adjust calls to
6375 call_function_by_hand.
6376 * p-typeprint.c (pascal_type_print_varspec_prefix): Handle
6377 functions with unknown return type.
6378 (pascal_type_print_func_varspec_suffix): New function.
6379 (pascal_type_print_varspec_suffix) <TYPE_CODE_FUNC,
6380 TYPE_CODE_METHOD>: Use it.
6381 * python/py-value.c (valpy_call): Adjust call to
6382 call_function_by_hand.
6383 * rust-lang.c (rust_evaluate_funcall): Adjust call to
6384 call_function_by_hand.
6385 * valarith.c (value_x_binop, value_x_unop): Adjust calls to
6386 call_function_by_hand.
6387 * valops.c (value_allocate_space_in_inferior): Adjust call to
6388 call_function_by_hand.
6389 * typeprint.c (type_print_unknown_return_type): New function.
6390 * typeprint.h (type_print_unknown_return_type): New declaration.
6391
6392 2017-09-04 Pedro Alves <palves@redhat.com>
6393
6394 * gdbtypes.c (lookup_function_type_with_arguments): Mark function
6395 types with more than one parameter as prototyped.
6396
6397 2017-09-04 Pedro Alves <palves@redhat.com>
6398
6399 * cli/cli-cmds.c (print_disassembly, disassemble_current_function)
6400 (disassemble_command): Use gdb_disassembly_flags instead of bare
6401 int.
6402 * disasm.c (gdb_pretty_print_disassembler::pretty_print_insn)
6403 (dump_insns, do_mixed_source_and_assembly_deprecated)
6404 (do_mixed_source_and_assembly, do_assembly_only, gdb_disassembly):
6405 Use gdb_disassembly_flags instead of bare int.
6406 * disasm.h (DISASSEMBLY_SOURCE_DEPRECATED, DISASSEMBLY_RAW_INSN)
6407 (DISASSEMBLY_OMIT_FNAME, DISASSEMBLY_FILENAME)
6408 (DISASSEMBLY_OMIT_PC, DISASSEMBLY_SOURCE)
6409 (DISASSEMBLY_SPECULATIVE): No longer macros. Instead they're...
6410 (enum gdb_disassembly_flag): ... values of this new enumeration.
6411 (gdb_disassembly_flags): Define.
6412 (gdb_disassembly)
6413 (gdb_pretty_print_disassembler::pretty_print_insn): Use it.
6414 * mi/mi-cmd-disas.c (mi_cmd_disassemble): Use
6415 gdb_disassembly_flags instead of bare int.
6416 * record-btrace.c (btrace_insn_history)
6417 (record_btrace_insn_history, record_btrace_insn_history_range)
6418 (record_btrace_insn_history_from): Use gdb_disassembly_flags
6419 instead of bare int.
6420 * record.c (get_insn_history_modifiers, cmd_record_insn_history):
6421 Use gdb_disassembly_flags instead of bare int.
6422 * target-debug.h (target_debug_print_gdb_disassembly_flags):
6423 Define.
6424 * target-delegates.c: Regenerate.
6425 * target.c (target_insn_history, target_insn_history_from)
6426 (target_insn_history_range): Use gdb_disassembly_flags instead of
6427 bare int.
6428 * target.h: Include "disasm.h".
6429 (struct target_ops) <to_insn_history, to_insn_history_from,
6430 to_insn_history_range>: Use gdb_disassembly_flags instead of bare
6431 int.
6432 (target_insn_history, target_insn_history_from)
6433 (target_insn_history_range): Use gdb_disassembly_flags instead of
6434 bare int.
6435
6436 2017-09-04 Simon Marchi <simon.marchi@ericsson.com>
6437
6438 * cli/cli-script.c (build_command_line): For if/while commands,
6439 check whether args is empty.
6440
6441 2017-09-04 Simon Marchi <simon.marchi@ericsson.com>
6442
6443 * cli/cli-script.h (enum misc_command_type): Move from defs.h.
6444 (enum command_control_type): Likewise.
6445 (struct command_line): Likewise.
6446 (free_command_lines): Likewise.
6447 (struct command_lines_deleter): Likewise.
6448 (command_line_up): Likewise.
6449 (read_command_lines): Likewise.
6450 (read_command_lines_1): Likewise.
6451 * defs.h (enum misc_command_type): Move to cli/cli-script.h.
6452 (enum command_control_type): Likewise.
6453 (struct command_line): Likewise.
6454 (free_command_lines): Likewise.
6455 (struct command_lines_deleter): Likewise.
6456 (command_line_up): Likewise.
6457 (read_command_lines): Likewise.
6458 (read_command_lines_1): Likewise.
6459 * breakpoint.h: Include cli/cli-script.h.
6460 * extension-priv.h: Likewise.
6461 * gdbcmd.h: Likewise.
6462
6463 2017-09-04 Pedro Alves <palves@redhat.com>
6464
6465 * ada-lang.c (is_known_support_routine): Move sal declaration to
6466 where it is initialized.
6467 * breakpoint.c (create_internal_breakpoint, init_catchpoint)
6468 (parse_breakpoint_sals, decode_static_tracepoint_spec)
6469 (clear_command, update_static_tracepoint): Remove init_sal
6470 references. Move declarations closer to initializations.
6471 * cli/cli-cmds.c (list_command): Move sal declarations closer to
6472 initializations.
6473 * elfread.c (elf_gnu_ifunc_resolver_stop): Remove init_sal
6474 references. Move sal declarations closer to initializations.
6475 * frame.c (find_frame_sal): Return a symtab_and_line via function
6476 return instead of output parameter. Remove init_sal references.
6477 * frame.h (find_frame_sal): Return a symtab_and_line via function
6478 return instead of output parameter.
6479 * guile/scm-frame.c (gdbscm_frame_sal): Adjust.
6480 * guile/scm-symtab.c (stscm_make_sal_smob): Use in-place new
6481 instead of memset.
6482 (gdbscm_find_pc_line): Remove init_sal reference.
6483 * infcall.c (call_function_by_hand_dummy): Remove init_sal
6484 references. Move declarations closer to initializations.
6485 * infcmd.c (set_step_frame): Update. Move declarations closer to
6486 initializations.
6487 (finish_backward): Remove init_sal references. Move declarations
6488 closer to initializations.
6489 * infrun.c (process_event_stop_test, handle_step_into_function)
6490 (insert_hp_step_resume_breakpoint_at_frame)
6491 (insert_step_resume_breakpoint_at_caller): Likewise.
6492 * linespec.c (create_sals_line_offset, decode_digits_ordinary)
6493 (symbol_to_sal): Likewise.
6494 * probe.c (parse_probes_in_pspace): Remove init_sal reference.
6495 * python/py-frame.c (frapy_find_sal): Move sal declaration closer
6496 to its initialization.
6497 * reverse.c (save_bookmark_command): Use new/delete. Remove
6498 init_sal references. Move declarations closer to initializations.
6499 * source.c (get_current_source_symtab_and_line): Remove brace
6500 initialization.
6501 (set_current_source_symtab_and_line): Now takes the sal by const
6502 reference. Remove brace initialization.
6503 (line_info): Remove init_sal reference.
6504 * source.h (set_current_source_symtab_and_line): Now takes a
6505 symtab_and_line via const reference.
6506 * stack.c (set_current_sal_from_frame): Adjust.
6507 (print_frame_info): Adjust.
6508 (get_last_displayed_sal): Return the sal via function return
6509 instead of via output parameter. Simplify.
6510 (frame_info): Adjust.
6511 * stack.h (get_last_displayed_sal): Return the sal via function
6512 return instead of via output parameter.
6513 * symtab.c (init_sal): Delete.
6514 (find_pc_sect_line): Remove init_sal references. Move
6515 declarations closer to initializations.
6516 (find_function_start_sal): Remove init_sal references. Move
6517 declarations closer to initializations.
6518 * symtab.h (struct symtab_and_line): In-class initialize all
6519 fields.
6520 * tracepoint.c (set_traceframe_context)
6521 (print_one_static_tracepoint_marker): Remove init_sal references.
6522 Move declarations closer to initializations.
6523 * tui/tui-disasm.c (tui_show_disassem_and_update_source): Adjust.
6524 * tui/tui-stack.c (tui_show_frame_info): Adjust. Move
6525 declarations closer to initializations.
6526 * tui/tui-winsource.c (tui_update_source_window_as_is): Remove
6527 init_sal references. Adjust.
6528
6529 2017-09-04 Pedro Alves <palves@redhat.com>
6530
6531 * ax-gdb.c (agent_command_1): Use range-for.
6532 * break-catch-throw.c (re_set_exception_catchpoint): Update.
6533 * breakpoint.c: Include "common/array-view.h".
6534 (init_breakpoint_sal, create_breakpoint_sal): Change sals
6535 parameter from struct symtabs_and_lines to
6536 array_view<symtab_and_line>. Adjust. Use range-for. Update.
6537 (breakpoint_sals_to_pc): Change sals parameter from struct
6538 symtabs_and_lines to std::vector reference.
6539 (check_fast_tracepoint_sals): Change sals parameter from struct
6540 symtabs_and_lines to std::array_view. Use range-for.
6541 (decode_static_tracepoint_spec): Return a std::vector instead of
6542 symtabs_and_lines. Update.
6543 (create_breakpoint): Update.
6544 (break_range_command, until_break_command, clear_command): Update.
6545 (base_breakpoint_decode_location, bkpt_decode_location)
6546 (bkpt_probe_create_sals_from_location)
6547 (bkpt_probe_decode_location, tracepoint_decode_location)
6548 (tracepoint_probe_decode_location)
6549 (strace_marker_create_sals_from_location): Return a std::vector
6550 instead of symtabs_and_lines.
6551 (strace_marker_create_breakpoints_sal): Update.
6552 (strace_marker_decode_location): Return a std::vector instead of
6553 symtabs_and_lines. Update.
6554 (update_breakpoint_locations): Change struct symtabs_and_lines
6555 parameters to gdb::array_view. Adjust.
6556 (location_to_sals): Return a std::vector instead of
6557 symtabs_and_lines. Update.
6558 (breakpoint_re_set_default): Use std::vector instead of struct
6559 symtabs_and_lines.
6560 (decode_location_default): Return a std::vector instead of
6561 symtabs_and_lines. Update.
6562 * breakpoint.h: Include "common/array-view.h".
6563 (struct breakpoint_ops) <decode_location>: Now returns a
6564 std::vector instead of returning a symtabs_and_lines via output
6565 parameter.
6566 (update_breakpoint_locations): Change sals parameters to use
6567 gdb::array_view.
6568 * cli/cli-cmds.c (edit_command, list_command): Update to use
6569 std::vector and gdb::array_view.
6570 (ambiguous_line_spec): Adjust to use gdb::array_view and
6571 range-for.
6572 (compare_symtabs): Rename to ...
6573 (cmp_symtabs): ... this. Change parameters to symtab_and_line
6574 const reference and adjust.
6575 (filter_sals): Rewrite using std::vector and standard algorithms.
6576 * elfread.c (elf_gnu_ifunc_resolver_return_stop): Simplify.
6577 (jump_command): Update to use std::vector.
6578 * linespec.c (struct linespec_state) <canonical_names>: Update
6579 comment.
6580 (add_sal_to_sals_basic): Delete.
6581 (add_sal_to_sals, filter_results, convert_results_to_lsals)
6582 (decode_line_2, create_sals_line_offset)
6583 (convert_address_location_to_sals, convert_linespec_to_sals)
6584 (convert_explicit_location_to_sals, parse_linespec)
6585 (event_location_to_sals, decode_line_full, decode_line_1)
6586 (decode_line_with_current_source)
6587 (decode_line_with_last_displayed, decode_objc)
6588 (decode_digits_list_mode, decode_digits_ordinary, minsym_found)
6589 (linespec_result::~linespec_result): Adjust to use std::vector
6590 instead of symtabs_and_lines.
6591 * linespec.h (linespec_sals::sals): Now a std::vector.
6592 (struct linespec_result): Use std::vector, bool, and in-class
6593 initialization.
6594 (decode_line_1, decode_line_with_current_source)
6595 (decode_line_with_last_displayed): Return std::vector.
6596 * macrocmd.c (info_macros_command): Use std::vector.
6597 * mi/mi-main.c (mi_cmd_trace_find): Use std::vector.
6598 * probe.c (parse_probes_in_pspace, parse_probes): Adjust to use
6599 std::vector.
6600 * probe.h (parse_probes): Return a std::vector.
6601 * python/python.c (gdbpy_decode_line): Use std::vector and
6602 gdb::array_view.
6603 * source.c (select_source_symtab, line_info): Use std::vector.
6604 * stack.c (func_command): Use std::vector.
6605 * symtab.h (struct symtabs_and_lines): Delete.
6606 * tracepoint.c (tfind_line_command, scope_info): Use std::vector.
6607
6608 2017-09-04 Pedro Alves <palves@redhat.com>
6609
6610 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
6611 unittests/array-view-selftests.c.
6612 (SUBDIR_UNITTESTS_OBS): Add array-view-selftests.o.
6613 * common/array-view.h: New file.
6614 * unittests/array-view-selftests.c: New file.
6615
6616 2017-09-04 Pedro Alves <palves@redhat.com>
6617
6618 * cli/cli-cmds.c (edit_command): Pass message to
6619 ambiguous_line_spec.
6620 (list_command): Pass message to ambiguous_line_spec. Say
6621 "first"/"last" instead of "start" and "end" to be consistent with
6622 the manual.
6623 (ambiguous_line_spec): Add 'format' and vararg parameters. Use
6624 them to print formatted message.
6625
6626 2017-09-04 Pedro Alves <palves@redhat.com>
6627
6628 * btrace.c (ftrace_add_pt): Pass btrace_insn to
6629 ftrace_update_insns by reference instead of pointer.
6630
6631 2017-09-04 Yao Qi <yao.qi@linaro.org>
6632
6633 * i386-go32-tdep.c: Include x86-xstate.h.
6634 (i386_go32_init_abi): Call i386_target_description.
6635 * i386-tdep.c (i386_target_description): Return tdesc_i386_mmx
6636 if xcr0 is X86_XSTATE_X87_MASK.
6637 * i386-tdep.h (tdesc_i386): Remove the declaration.
6638 (tdesc_i386_mmx): Likewise.
6639
6640 2017-09-04 Yao Qi <yao.qi@linaro.org>
6641
6642 * i386-fbsd-tdep.c (i386fbsd_core_read_xcr0): Return
6643 X86_XSTATE_SSE_MASK instead of 0.
6644
6645 2017-09-04 Yao Qi <yao.qi@linaro.org>
6646
6647 * amd64-fbsd-nat.c (amd64fbsd_read_description): Call
6648 i386_target_description.
6649 * i386-fbsd-nat.c (i386fbsd_read_description): Call
6650 i386_target_description.
6651 * i386-tdep.c (i386_gdbarch_init): Likewise.
6652
6653 2017-09-04 Yao Qi <yao.qi@linaro.org>
6654
6655 * amd64-darwin-tdep.c: Include "x86-xstate.h".
6656 (x86_darwin_init_abi_64): Call amd64_target_description.
6657 * amd64-dicos-tdep.c: Likewise.
6658 * amd64-fbsd-nat.c: Likewise.
6659 * amd64-fbsd-tdep.c: Likewise.
6660 * amd64-nbsd-tdep.c: Likewise.
6661 * amd64-obsd-tdep.c: Likewise.
6662 * amd64-sol2-tdep.c: Likewise.
6663 * amd64-windows-tdep.c: Likewise.
6664 * amd64-tdep.h (tdesc_amd64): Remove the declaration.
6665
6666 2017-09-04 Simon Marchi <simon.marchi@ericsson.com>
6667
6668 * btrace.h (btrace_insn_s, DEF_VEC_O (btrace_insn_s)): Remove.
6669 (btrace_function) <insn>: Change type to use std::vector.
6670 * btrace.c (ftrace_debug, ftrace_call_num_insn,
6671 ftrace_find_call, ftrace_new_gap, ftrace_update_function,
6672 ftrace_update_insns, ftrace_compute_global_level_offset,
6673 btrace_stitch_bts, btrace_clear, btrace_insn_get,
6674 btrace_insn_end, btrace_insn_next, btrace_insn_prev): Adjust to
6675 change to std::vector.
6676 (ftrace_update_insns): Adjust to change to std::vector, change
6677 type of INSN parameter.
6678 (btrace_compute_ftrace_bts): Adjust call to ftrace_update_insns.
6679 * record-btrace.c (btrace_call_history_insn_range,
6680 btrace_compute_src_line_range,
6681 record_btrace_frame_prev_register): Adjust to change to
6682 std::vector.
6683 * python/py-record-btrace.c (recpy_bt_func_instructions): Adjust
6684 to change to std::vector.
6685
6686 2017-09-03 Tom Tromey <tom@tromey.com>
6687
6688 * corefile.c (reopen_exec_file): Use std::string.
6689
6690 2017-09-03 Tom Tromey <tom@tromey.com>
6691
6692 * compile/compile.c (compile_register_name_mangled): Return
6693 std::string.
6694 * compile/compile-loc2c.c (pushf_register_address): Update.
6695 (pushf_register): Update.
6696 * compile/compile-c-types.c (convert_array): Update.
6697 * compile/compile-c-symbols.c (generate_vla_size): Update.
6698 (error_symbol_once): Use a gdb::unique_xmalloc_ptr.
6699 (symbol_substitution_name): Return a gdb::unique_xmalloc_ptr.
6700 (convert_one_symbol): Update.
6701 (generate_c_for_for_one_variable): Update.
6702 * compile/compile-c-support.c (c_get_range_decl_name): Return a
6703 std::string.
6704 (generate_register_struct): Update.
6705 * compile/compile-internal.h (c_get_range_decl_name): Return a
6706 std::string.
6707 (compile_register_name_mangled): Return std::string.
6708
6709 2017-09-03 Tom Tromey <tom@tromey.com>
6710
6711 * utils.c (perror_string): Return a std::string.
6712 (throw_perror_with_name, perror_warning_with_name): Update.
6713
6714 2017-09-03 Tom Tromey <tom@tromey.com>
6715
6716 * demangle.c (demangle_command): Use std::string,
6717 unique_xmalloc_ptr.
6718
6719 2017-09-03 Tom Tromey <tom@tromey.com>
6720
6721 * cli/cli-setshow.c (do_set_command): Use std::string.
6722
6723 2017-09-03 Tom Tromey <tom@tromey.com>
6724
6725 * cli/cli-cmds.c (cd_command): Use gdb::unique_xmalloc_ptr.
6726
6727 2017-09-03 Tom Tromey <tom@tromey.com>
6728
6729 * mi/mi-interp.c (mi_cmd_interpreter_exec): Use std::string.
6730
6731 2017-09-03 Tom Tromey <tom@tromey.com>
6732
6733 * mi/mi-cmd-env.c (env_execute_cli_command): Use
6734 gdb::unique_xmalloc_ptr.
6735
6736 2017-09-03 Tom Tromey <tom@tromey.com>
6737
6738 * thread.c (print_thread_info_1): Use string_printf.
6739 (thread_apply_command, thread_apply_all_command): Use
6740 std::string.
6741
6742 2017-09-03 Tom Tromey <tom@tromey.com>
6743
6744 * valprint.c (val_print_string): Update.
6745 * gdbcore.h (memory_error_message): Return std::string.
6746 * corefile.c (memory_error_message): Return std::string.
6747 (memory_error): Update.
6748 * breakpoint.c (insert_bp_location): Update.
6749
6750 2017-09-03 Simon Marchi <simon.marchi@ericsson.com>
6751
6752 * target/waitstatus.h (target_waitstatus_to_string): Change
6753 return type to std::string.
6754 * target/waitstatus.c (target_waitstatus_to_string): Return
6755 std::string.
6756 * target.h (target_waitstatus_to_string): Remove declaration.
6757 * infrun.c (resume, clear_proceed_status_thread,
6758 print_target_wait_results, do_target_wait, save_waitstatus,
6759 stop_all_threads): Adjust.
6760 * record-btrace.c (record_btrace_wait): Adjust.
6761 * target-debug.h
6762 (target_debug_print_struct_target_waitstatus_p): Adjust.
6763
6764 2017-09-01 Jan Kratochvil <jan.kratochvil@redhat.com>
6765
6766 PR gdb/22046
6767 * nat/linux-procfs.c (parse_proc_status_state): Fix PROC_STATE_STOPPED
6768 detection.
6769
6770 2017-08-31 Sergio Durigan Junior <sergiodj@redhat.com>
6771
6772 * NEWS (Changes since GDB 8.0): Add entry mentioning new support
6773 for setting/unsetting environment variables on the remote target.
6774 (New remote packets): Add entries for QEnvironmentHexEncoded,
6775 QEnvironmentUnset and QEnvironmentReset.
6776 * common/environ.c (gdb_environ::operator=): Extend method to
6777 handle m_user_set_env_list and m_user_unset_env_list.
6778 (gdb_environ::clear): Likewise.
6779 (match_var_in_string): Change type of first parameter from 'char
6780 *' to 'const char *'.
6781 (gdb_environ::set): Extend method to handle
6782 m_user_set_env_list and m_user_unset_env_list.
6783 (gdb_environ::unset): Likewise.
6784 (gdb_environ::clear_user_set_env): New method.
6785 (gdb_environ::user_set_envp): Likewise.
6786 (gdb_environ::user_unset_envp): Likewise.
6787 * common/environ.h (gdb_environ): Handle m_user_set_env_list and
6788 m_user_unset_env_list on move constructor/assignment.
6789 (unset): Add new default parameter 'update_unset_list = true'.
6790 (clear_user_set_env): New method.
6791 (user_set_envp): Likewise.
6792 (user_unset_envp): Likewise.
6793 (m_user_set_env_list): New std::set.
6794 (m_user_unset_env_list): Likewise.
6795 * common/rsp-low.c (hex2str): New function.
6796 (bin2hex): New overload for bin2hex function.
6797 * common/rsp-low.c (hex2str): New prototype.
6798 (str2hex): New overload prototype.
6799 * remote.c: Include "environ.h". Add QEnvironmentHexEncoded,
6800 QEnvironmentUnset and QEnvironmentReset.
6801 (remote_protocol_features): Add QEnvironmentHexEncoded,
6802 QEnvironmentUnset and QEnvironmentReset packets.
6803 (send_environment_packet): New function.
6804 (extended_remote_environment_support): Likewise.
6805 (extended_remote_create_inferior): Call
6806 extended_remote_environment_support.
6807 (_initialize_remote): Add QEnvironmentHexEncoded,
6808 QEnvironmentUnset and QEnvironmentReset packet configs.
6809 * unittests/environ-selftests.c (gdb_selftest_env_var):
6810 New variable.
6811 (test_vector_initialization): New function.
6812 (test_init_from_host_environ): Likewise.
6813 (test_reinit_from_host_environ): Likewise.
6814 (test_set_A_unset_B_unset_A_cannot_find_A_can_find_B):
6815 Likewise.
6816 (test_unset_set_empty_vector): Likewise.
6817 (test_vector_clear): Likewise.
6818 (test_std_move): Likewise.
6819 (test_move_constructor):
6820 (test_self_move): Likewise.
6821 (test_set_unset_reset): Likewise.
6822 (run_tests): Rewrite in terms of the functions above.
6823
6824 2017-08-31 Weimin Pan <weimin.pan@oracle.com>
6825
6826 * sparc64-tdep.c (adi_stat_t): Fix comment formatting.
6827 (adi_available): Use a temp variable of type CORE_ADDR as argument
6828 3 when calling target_auxv_search.
6829 (adi_normalize_address): Use masks and xor operators to calculate
6830 normalized address.
6831 (adi_read_versions, adi_write_versions, adi_print_versions)
6832 (do_examine, do_assign): Use paddress.
6833
6834 2017-08-29 John Baldwin <jhb@FreeBSD.org>
6835
6836 * mips-fbsd-nat.c (getfpregs_supplies): Return true for FIR.
6837 * mips-fbsd-tdep.c (mips_fbsd_supply_fpregs): Split supply of FSR
6838 out of loop and add supply of FIR.
6839 (mips_fbsd_collect_fpregs): Split collect of FSR out of loop and
6840 add collect of FIR.
6841
6842 2017-08-28 Simon Marchi <simon.marchi@ericsson.com>
6843
6844 PR gdb/21827
6845 * cli/cli-script.c (define_command): Don't convert command name
6846 to lower case.
6847
6848 2017-08-25 Joel Brobecker <brobecker@adacore.com>
6849
6850 * ada-lang.c (ada_lookup_struct_elt_type): Remove parameter "dispp".
6851 Update all callers accordingly. Remove all code blocks handling
6852 the case where DISPP is not NULL.
6853
6854 2017-08-24 Jan Kratochvil <jan.kratochvil@redhat.com>
6855
6856 PR symtab/22003
6857 * dwarf2read.c (dwarf2_const_value_attr, dump_die_shallow)
6858 (dwarf2_get_attr_constant_value, dwarf2_fetch_constant_bytes)
6859 (skip_form_bytes, attr_form_is_constant): Handle DW_FORM_implicit_const.
6860
6861 2017-08-24 Jan Kratochvil <jan.kratochvil@redhat.com>
6862
6863 * dwarf2read.c (build_type_psymtabs_reader): New prototype.
6864 (process_psymtab_comp_unit): Accept IS_DEBUG_TYPES.
6865 (read_comp_units_from_section): New parameter abbrev_section, use
6866 read_and_check_comp_unit_head, allocate signatured_type if needed.
6867 (create_all_comp_units): Update read_comp_units_from_section caller.
6868
6869 2017-08-23 Pedro Alves <palves@redhat.com>
6870
6871 PR remote/21852
6872 * remote.c (add_current_inferior_and_thread): Set inferior_ptid
6873 to null_ptid and switch to thread without reading the registers
6874 after adding the inferior.
6875
6876 2017-08-23 Jan Kratochvil <jan.kratochvil@redhat.com>
6877
6878 * NEWS (Changes since GDB 8.0): Add set compile-gcc and show
6879 compile-gcc.
6880 * compile/compile.c (compile_gcc, show_compile_gcc): New.
6881 (compile_to_object): Implement compile_gcc.
6882 (_initialize_compile): Install "set compile-gcc". Initialize
6883 compile_gcc.
6884
6885 2017-08-23 Jan Kratochvil <jan.kratochvil@redhat.com>
6886
6887 * compile/compile.c (compile_to_object): Conditionally call
6888 set_verbose. Conditionally call compile or compile_v0.
6889
6890 2017-08-07 Weimin Pan <weimin.pan@oracle.com>
6891
6892 * sparc64-tdep.h: (adi_normalize_address): New export.
6893 * sparc-nat.h: (open_adi_tag_fd): New export.
6894 * sparc64-linux-nat.c: (open_adi_tag_fd): New function.
6895 * sparc64-linux-tdep.c:
6896 (SEGV_ACCADI, SEGV_ADIDERR, SEGV_ADIPERR) New defines.
6897 (sparc64_linux_handle_segmentation_fault): New function.
6898 (sparc64_linux_init_abi): Register
6899 sparc64_linux_handle_segmentation_fault
6900 * sparc64-tdep.c: Include cli-utils.h,gdbcmd.h,auxv.h.
6901 (sparc64_addr_bits_remove): New function.
6902 (sparc64_init_abi): Register sparc64_addr_bits_remove.
6903 (MAX_PROC_NAME_SIZE): New macro.
6904 (AT_ADI_BLKSZ, AT_ADI_NBITS, AT_ADI_UEONADI) New defines.
6905 (sparc64adilist): New variable.
6906 (adi_proc_list): New variable.
6907 (find_adi_info): New function.
6908 (add_adi_info): New function.
6909 (get_adi_info_proc): New function.
6910 (get_adi_info): New function.
6911 (info_adi_command): New function.
6912 (read_maps_entry): New function.
6913 (adi_available): New function.
6914 (adi_normalize_address): New function.
6915 (adi_align_address): New function.
6916 (adi_convert_byte_count): New function.
6917 (adi_tag_fd): New function.
6918 (adi_is_addr_mapped): New function.
6919 (adi_read_versions): New function.
6920 (adi_write_versions): New function.
6921 (adi_print_versions): New function.
6922 (do_examine): New function.
6923 (do_assign): New function.
6924 (adi_examine_command): New function.
6925 (adi_assign_command): New function.
6926 (_initialize_sparc64_adi_tdep): New function.
6927
6928 2017-08-22 Simon Marchi <simon.marchi@ericsson.com>
6929
6930 * breakpoint.c (breakpoints_info): Rename to ...
6931 (info_breakpoints_command): ... this.
6932 (watchpoints_info): Rename to ...
6933 (info_watchpoints_command): ... this.
6934 (tracepoints_info): Rename to ...
6935 (info_tracepoints_command): ... this.
6936 (_initialize_breakpoint): Adjust.
6937 * dcache.c (dcache_info): Rename to ...
6938 (info_display_command): ... this.
6939 (_initialize_dcache): Adjust.
6940 * frame.h (args_info): Rename to ...
6941 (info_args_command): ... this.
6942 (locals_info): Rename to ...
6943 (info_locals_command): ... this.
6944 * infcmd.c (nofp_registers_info): Rename to ...
6945 (info_registers_command): ... this.
6946 (float_info): Rename to ...
6947 (info_float_command): ... this.
6948 (program_info): Rename to ...
6949 (info_program_command): ... this.
6950 (all_registers_info): Rename to ...
6951 (info_all_registers_command): ... this.
6952 (vector_info): Rename to ...
6953 (info_vector_command): ... this.
6954 (float_info): Rename to ...
6955 (info_float_command): ... this.
6956 (_initialize_infcmd): Adjust.
6957 * inferior.h (term_info): Rename to ...
6958 (info_terminal_command): ... this.
6959 * inflow.c (term_info): Rename to ...
6960 (info_terminal_command): ... this.
6961 (_initialize_inflow): Adjust.
6962 * infrun.c (signals_info): Rename to ...
6963 (info_signals_command): ... this.
6964 (_initialize_infrun): Adjust.
6965 * objc-lang.c (classes_info): Rename to ...
6966 (info_classes_command): ... this.
6967 (selectors_info): Rename to ...
6968 (info_selectors_command): ... this.
6969 (_initialize_objc_language): Adjust.
6970 * printcmd.c (sym_info): Rename to ...
6971 (info_symbol_command): ... this.
6972 (address_info): Rename to ...
6973 (info_address_command): ... this.
6974 (display_info): Rename to ...
6975 (info_display_command): ... this.
6976 (_initialize_printcmd): Adjust.
6977 * reverse.c (bookmarks_info): Rename to ...
6978 (info_breakpoints_command): ... this.
6979 (_initialize_reverse): Adjust.
6980 * ser-go32.c (dos_info): Rename to ...
6981 (info_serial_command): ... this.
6982 (_initialize_ser_dos): Adjust.
6983 * skip.c (skip_info): Rename to ...
6984 (info_skip_command): ... this.
6985 (_initialize_step_skip): Adjust.
6986 * source.c (line_info): Rename to ...
6987 (info_line_command): ... this.
6988 (source_info): Rename to ...
6989 (info_source_command)
6990 * stack.c (frame_info): Rename to ...
6991 (info_frame_command): ... this.
6992 (locals_info): Rename to ...
6993 (info_locals_command): ... this.
6994 (args_info): Rename to ...
6995 (info_args_command): ... this.
6996 (_initialize_stack): Adjust.
6997 * symtab.c (sources_info): Rename to ...
6998 (info_sources_command): ... this.
6999 (variables_info): Rename to ...
7000 (info_variables_command): ... this.
7001 (functions_info): Rename to ...
7002 (info_functions_command): ... this.
7003 (types_info): Rename to ...
7004 (info_types_command): ... this.
7005 (_initialize_symtab): Adjust.
7006 * target.c (target_info): Rename to ...
7007 (info_target_command): ... this.
7008 (initialize_targets): Adjust.
7009 * tracepoint.c (tvariables_info): Rename to ...
7010 (info_tvariables_command): ... this.
7011 (scope_info): Rename to ...
7012 (info_scope_command): ... this.
7013 (trace_dump_actions): Adjust.
7014 (_initialize_tracepoint): Adjust.
7015
7016 2017-08-22 Tom Tromey <tom@tromey.com>
7017
7018 * breakpoint.h (install_breakpoint): Update.
7019 * breakpoint.c (add_solib_catchpoint): Update.
7020 (install_breakpoint): Change argument to a std::unique_ptr.
7021 (create_fork_vfork_event_catchpoint): Use std::unique_ptr.
7022 (create_breakpoint_sal, create_breakpoint): Update.
7023 (watch_command_1, catch_exec_command_1)
7024 (strace_marker_create_breakpoints_sal): Use std::unique_ptr.
7025 (add_to_breakpoint_chain): Change argument to a std::unique_ptr.
7026 Return the breakpoint.
7027 (set_raw_breakpoint_without_location, set_raw_breakpoint)
7028 (new_single_step_breakpoint): Update.
7029 * break-catch-throw.c (handle_gnu_v3_exceptions): Use
7030 std::unique_ptr.
7031 * break-catch-syscall.c (create_syscall_event_catchpoint): Use
7032 std::unique_ptr.
7033 * break-catch-sig.c (create_signal_catchpoint): Use
7034 std::unique_ptr.
7035 * ada-lang.c (create_ada_exception_catchpoint): Use
7036 std::unique_ptr.
7037
7038 2017-08-22 Tom Tromey <tom@tromey.com>
7039
7040 * breakpoint.c (add_solib_catchpoint): Use std::unique_ptr.
7041
7042 2017-08-22 Tom Tromey <tom@tromey.com>
7043
7044 * psymtab.c (psymtab_search_name): Return a unique_xmalloc_ptr.
7045 (lookup_partial_symbol): Update.
7046
7047 2017-08-22 Tom Tromey <tom@tromey.com>
7048
7049 * source.h (rewrite_source_path): Return a unique_xmalloc_ptr.
7050 * source.c (rewrite_source_path): Return a unique_xmalloc_ptr.
7051 (find_and_open_source, symtab_to_fullname): Update.
7052 * psymtab.c (psymtab_to_fullname): Update.
7053
7054 2017-08-22 Tom Tromey <tom@tromey.com>
7055
7056 * exec.c (exec_file_attach): Update.
7057 * linux-thread-db.c (try_thread_db_load): Update.
7058 * guile/scm-safe-call.c (gdbscm_safe_source_script): Update.
7059 * utils.c (gdb_realpath): Change return type.
7060 (gdb_realpath_keepfile): Update.
7061 (gdb_realpath_check_trailer, gdb_realpath_tests): New functions.
7062 (_initialize_utils): Register the new self test.
7063 * source.c (openp): Update.
7064 (find_and_open_source): Update.
7065 * nto-tdep.c (nto_find_and_open_solib): Update.
7066 * main.c (set_gdb_data_directory): Update.
7067 (captured_main_1): Update.
7068 * dwarf2read.c (dwarf2_get_dwz_file): Update
7069 (dw2_map_symbol_filenames): Update.
7070 * auto-load.c (auto_load_safe_path_vec_update): Update.
7071 (filename_is_in_auto_load_safe_path_vec): Change type of
7072 "filename_realp".
7073 (auto_load_objfile_script): Update.
7074 (file_is_auto_load_safe): Update. Use std::string.
7075 * utils.h (gdb_realpath): Return a gdb::unique_xmalloc_ptr.
7076
7077 2017-08-22 Tom Tromey <tom@tromey.com>
7078
7079 * utils.c (gdb_realpath_keepfile): Return a
7080 gdb::unique_xmalloc_ptr.
7081 * exec.c (exec_file_attach): Update.
7082 * utils.h (gdb_realpath_keepfile): Return a
7083 gdb::unique_xmalloc_ptr.
7084
7085 2017-08-22 Tom Tromey <tom@tromey.com>
7086
7087 * compile/compile.c (compile_file_command): Use
7088 gdb::unique_xmalloc_ptr, std::string.
7089 * utils.c (gdb_abspath): Change return type.
7090 * source.c (openp): Update.
7091 * objfiles.c (allocate_objfile): Update.
7092 * main.c (set_gdb_data_directory): Update.
7093 * utils.h (gdb_abspath): Return a gdb::unique_xmalloc_ptr.
7094
7095 2017-08-22 Zhouyi Zhou <zhouzhouyi@gmail.com>
7096
7097 * cli-cmds.c (list_commands): List actual code around more than
7098 one location.
7099
7100 2017-08-21 John Baldwin <jhb@FreeBSD.org>
7101
7102 * fbsd-nat.c (fbsd_add_threads): Use array type for `lwps'.
7103
7104 2017-08-21 Pedro Alves <palves@redhat.com>
7105
7106 PR gdb/19487
7107 * c-exp.y (variable production): Handle function aliases.
7108 * minsyms.c (msymbol_is_text): New function.
7109 * minsyms.h (msymbol_is_text): Declare.
7110 * symtab.c (find_function_alias_target): New function.
7111 * symtab.h (find_function_alias_target): Declare.
7112
7113 2017-08-21 Pedro Alves <palves@redhat.com>
7114
7115 * eval.c (evaluate_subexp_standard) <OP_TYPE>: Don't dig past
7116 typedefs.
7117 * typeprint.c (whatis_exp): If handling "whatis", and expression
7118 is OP_TYPE, strip one typedef level. Otherwise don't strip
7119 typedefs here.
7120 * valops.c (value_cast): Save "to" type before resolving
7121 stubs/typedefs. Use that type as resulting value's type.
7122
7123 2017-08-18 Tom Tromey <tom@tromey.com>
7124 Pedro Alves <palves@redhat.com>
7125
7126 * spu-multiarch.c (parse_spufs_run): Use scoped_restore.
7127 * sol-thread.c (sol_thread_resume, sol_thread_wait)
7128 (sol_thread_xfer_partial, rw_common): Use scoped_restore.
7129 * procfs.c (procfs_do_thread_registers): Use scoped_restore.
7130 * proc-service.c (ps_xfer_memory): Use scoped_restore.
7131 * linux-tdep.c (linux_corefile_thread): Remove a cleanup.
7132 (linux_get_siginfo_data): Add "thread" argument. Use
7133 scoped_restore.
7134 * linux-nat.c (linux_child_follow_fork)
7135 (check_stopped_by_watchpoint): Use scoped_restore.
7136 * infrun.c (displaced_step_prepare_throw, write_memory_ptid)
7137 (THREAD_STOPPED_BY, handle_signal_stop): Use scoped_restore.
7138 (restore_inferior_ptid, save_inferior_ptid): Remove.
7139 * btrace.c (btrace_fetch): Use scoped_restore.
7140 * bsd-uthread.c (bsd_uthread_fetch_registers)
7141 (bsd_uthread_store_registers): Use scoped_restore.
7142 * breakpoint.c (reattach_breakpoints, detach_breakpoints): Use
7143 scoped_restore.
7144 * aix-thread.c (aix_thread_resume, aix_thread_wait)
7145 (aix_thread_xfer_partial): Use scoped_restore.
7146 * inferior.h (save_inferior_ptid): Remove.
7147
7148 2017-08-18 Yao Qi <yao.qi@linaro.org>
7149
7150 PR tdep/21818
7151 * arm-tdep.c (gdb_print_insn_arm): Mark
7152 USER_SPECIFIED_MACHINE_TYPE if exec_bfd isn't NULL.
7153
7154 2017-08-18 Yao Qi <yao.qi@linaro.org>
7155
7156 * NEWS: Mention GDBserver's new option "--selftest".
7157 * Makefile.in (SFILES): Remove selftest.c, add common/selftest.c.
7158 * selftest.c: Move it to common/selftest.c.
7159 * selftest.h: Move it to common/selftest.h.
7160 * selftest-arch.c (reset): New function.
7161 (tests_with_arch): Call reset.
7162
7163 2017-08-18 Yao Qi <yao.qi@linaro.org>
7164
7165 * selftest.c (run_tests): Don't call QUIT. Call debug_printf
7166 instead of exception_fprintf and printf_filtered.
7167
7168 2017-08-18 Yao Qi <yao.qi@linaro.org>
7169
7170 * selftest.c (register_self_test): Rename it to
7171 selftests::register_test.
7172 (run_self_tests): selftest::run_tests.
7173 * selftest.h: Update declarations.
7174 * selftest-arch.c (register_self_test_foreach_arch): Rename it to
7175 selftests::register_test_foreach_arch.
7176 * selftest-arch.h: Update declaration.
7177 * aarch64-tdep.c: Update.
7178 * arm-tdep.c: Likewise.
7179 * disasm-selftests.c: Likewise.
7180 * dwarf2loc.c: Likewise.
7181 * dwarf2-frame.c: Likewise.
7182 * findvar.c: Likewise.
7183 * gdbarch-selftests.c: Likewise.
7184 * maint.c (maintenance_selftest): Likewise.
7185 * regcache.c: Likewise.
7186 * rust-exp.y: Likewise.
7187 * selftest-arch.c: Likewise.
7188 * unittests/environ-selftests.c: Likewise.
7189 * unittests/function-view-selftests.c: Likewise.
7190 * unittests/offset-type-selftests.c: Likewise.
7191 * unittests/optional-selftests.c: Likewise.
7192 * unittests/scoped_restore-selftests.c: Likewise.
7193 * utils-selftests.c: Likewise.
7194
7195 2017-08-17 Pedro Alves <palves@redhat.com>
7196
7197 * cli/cli-cmds.c (source_command): Delete 'old_source_verbose'
7198 local.
7199
7200 2017-08-17 Pedro Alves <palves@redhat.com>
7201
7202 * dwarf2read.c (struct dwarf2_cu) <line_header_die_owner>: New
7203 field.
7204 (reset_die_in_process): Delete, replaced by ...
7205 (process_die_scope): ... this new class. Make it responsible for
7206 freeing cu->line_header too.
7207 (process_die): Use process_die_scope.
7208 (handle_DW_AT_stmt_list): Record the line header's owner CU/DIE in
7209 cu->line_header_die_owner. Don't release the line header if it's
7210 owned by the CU.
7211 (setup_type_unit_groups): Make the CU/DIE own the line header.
7212 Don't release the line header here.
7213
7214 2017-08-17 Alex Lindsay <alexlindsay239@gmail.com> (tiny change)
7215
7216 * elfread.c (elf_read_minimal_symbols): xfree synthsyms.
7217
7218 2017-08-17 Ruslan Kabatsayev <b7.10110111@gmail.com>
7219
7220 * NEWS: Mention new shortcuts for nexti and stepi in TUI
7221 Single-Key mode
7222
7223 2017-08-16 Ruslan Kabatsayev <b7.10110111@gmail.com>
7224
7225 * tui/tui.c (tui_commands): Add "nexti" and "stepi" to the Single-Key
7226 mode command list.
7227
7228 2017-08-15 Stafford Horne <shorne@gmail.com>
7229
7230 * MAINTAINERS (Write After Approval): Add Stafford Horne.
7231
7232 2017-08-15 Stafford Horne <shorne@gmail.com>
7233
7234 * xtensa-tdep.c (xtensa_init_reggroups): Use xstrdup for cpname.
7235
7236 2017-08-15 Sergio Durigan Junior <sergiodj@redhat.com>
7237
7238 PR gdb/21954
7239 * infcmd.c (unset_environment_command): Use the 'clear' method on
7240 the environment instead of resetting it.
7241
7242 2017-08-15 John Baldwin <jhb@FreeBSD.org>
7243
7244 * fbsd-nat.c (fbsd_convert_siginfo): Fix compile on big-endian
7245 platforms.
7246
7247 2017-08-14 Tom Tromey <tom@tromey.com>
7248
7249 * valprint.c (print_octal_chars): Use HOST_CHAR_BIT.
7250 (print_binary_chars): Likewise.
7251 (BITS_IN_BYTES): Remove.
7252
7253 2017-08-14 Tom Tromey <tom@tromey.com>
7254
7255 PR gdb/21675
7256 * valprint.c (LOW_ZERO): Change value to 034.
7257 (print_octal_chars): Add static_asserts for octal constants.
7258 * printcmd.c (print_scalar_formatted): Add 'd' case.
7259
7260 2017-08-11 Tom Tromey <tom@tromey.com>
7261
7262 * symfile.c (add_symbol_file_command): Use std::vector.
7263
7264 2017-08-14 Tom Tromey <tom@tromey.com>
7265
7266 * break-catch-throw.c (handle_gnu_v3_exceptions): Use std::move.
7267 * break-catch-syscall.c (create_syscall_event_catchpoint): Use
7268 std::move.
7269 * break-catch-sig.c (create_signal_catchpoint): Use std::move.
7270
7271 2017-08-11 Pedro Alves <palves@redhat.com>
7272
7273 * infrun.c (process_event_stop_test): Adjust
7274 function_name_is_marked_for_skip call.
7275 * skip.c: Include <list>.
7276 (skiplist_entry): Make it a class with private fields, and
7277 getters/setters.
7278 (skiplist_entry_chain): Delete.
7279 (skiplist_entries): New.
7280 (skiplist_entry_count): Delete.
7281 (highest_skiplist_entry_num): New.
7282 (ALL_SKIPLIST_ENTRIES, ALL_SKIPLIST_ENTRIES_SAFE): Delete.
7283 (add_skiplist_entry): Delete.
7284 (skiplist_entry::skiplist_entry): New.
7285 (skiplist_entry::add_entry): New.
7286 (skip_file_command, skip_function): Adjust.
7287 (compile_skip_regexp): Delete.
7288 (skip_command): Don't compile regexp here. Adjust to use
7289 skiplist_entry::add_entry.
7290 (skip_info): Adjust to use range-for and getters.
7291 (skip_enable_command, skip_disable_command): Adjust to use
7292 range-for and setters.
7293 (skip_delete_command): Adjust to use std::list.
7294 (add_skiplist_entry): Delete.
7295 (skip_file_p): Delete, refactored as ...
7296 (skiplist_entry::do_skip_file_p): ... this new method.
7297 (skip_gfile_p): Delete, refactored as ...
7298 (skiplist_entry::do_gskip_file_p): ... this new method.
7299 (skip_function_p, skip_rfunction_p): Delete, refactored as ...
7300 (skiplist_entry::skip_function_p): ... this new method.
7301 (function_name_is_marked_for_skip): Now returns bool, and takes
7302 the function sal by const reference. Adjust to use range-for and
7303 skiplist_entry methods.
7304 (_initialize_step_skip): Remove references to
7305 skiplist_entry_chain, skiplist_entry_count.
7306 * skip.h (function_name_is_marked_for_skip): Now returns bool, and
7307 takes the function sal by const reference.
7308
7309 2017-08-11 Yao Qi <yao.qi@linaro.org>
7310
7311 * dwarf2-frame.c (clear_pointer_cleanup): Remove.
7312 (dwarf2_frame_cache): Remove reset_cache_cleanup.
7313 (dwarf2_frame_cache):
7314 * frame-unwind.c (frame_unwind_try_unwinder): Catch
7315 RETURN_MASK_ALL and set *this_case to NULL.
7316 * frame-unwind.h: Update comments.
7317
7318 2017-08-11 Yao Qi <yao.qi@linaro.org>
7319
7320 * dwarf2-frame.c (dwarf2_frame_state_alloc_regs): Remove.
7321 (dwarf2_frame_state_copy_regs): Remove.
7322 (dwarf2_frame_state_free_regs): Remove.
7323 (dwarf2_frame_state::~dwarf2_frame_state): Remove.
7324 (dwarf2_restore_rule): Call method .alloc_regs instead of
7325 dwarf2_frame_state_alloc_regs.
7326 (execute_cfa_program): Likewise. Call dwarf2_frame_state_reg_info
7327 constructor. Call std::move.
7328 (dwarf2_fetch_cfa_info): Don't call dwarf2_frame_state_copy_regs.
7329 (dwarf2_frame_cache): Likewise.
7330
7331 [GDB_SELF_TEST]: Include selftest.h and
7332 selftest-arch.h.
7333 [GDB_SELF_TEST] (execute_cfa_program_test): New function.
7334 (_initialize_dwarf2_frame) [GDB_SELF_TEST]: Register
7335 execute_cfa_program_test.
7336
7337 * dwarf2-frame.h (dwarf2_frame_state_reg_info): Add ctor, dtor,
7338 copy ctor, assignment operator, move assignment.
7339 <alloc_regs>: New method.
7340 <swap>: New method.
7341 (struct dwarf2_frame_state): Delete dtor.
7342 (dwarf2_frame_state_alloc_regs): Remove declaration.
7343 * sparc-tdep.c (sparc_execute_dwarf_cfa_vendor_op): Don't call
7344 dwarf2_frame_state_alloc_regs, use .alloc_regs instead.
7345
7346 2017-08-11 Yao Qi <yao.qi@linaro.org>
7347
7348 * dwarf2-frame.c (dwarf2_frame_state_free): Remove.
7349 (dwarf2_frame_state::dwarf2_frame_state): New.
7350 (dwarf2_frame_state::~dwarf2_frame_state): New.
7351 (dwarf2_fetch_cfa_info): Update.
7352 (dwarf2_frame_cache): Remove old_chain. Change 'fs' to an object
7353 rather than a pointer. Update code.
7354 * dwarf2-frame.h (struct dwarf2_frame_state): Declare ctor and
7355 dtor.
7356 <data_align, code_align, retaddr_column>: Change them to const.
7357 <armcc_cfa_offsets_sf, armcc_cfa_offsets_reversed>: Change them
7358 to bool.
7359
7360 2017-08-11 Yao Qi <yao.qi@linaro.org>
7361
7362 * dwarf2-frame.h (struct dwarf2_frame_state_reg) <exp_len>: Remove.
7363 <loc.exp>: New field.
7364 * dwarf2-frame.c (execute_cfa_program): Update.
7365 (dwarf2_frame_prev_register): Update.
7366
7367 2017-08-10 Pedro Alves <palves@redhat.com>
7368
7369 * common/gdb_unique_ptr.h (xfree_deleter<T[]>): Define.
7370
7371 2017-08-09 John Baldwin <jhb@FreeBSD.org>
7372
7373 * fbsd-nat.c (struct fbsd_fork_info): Remove.
7374 (fbsd_pending_children): Use std::list.
7375 (fbsd_remember_child): Likewise.
7376 (fbsd_is_child_pending): Likewise.
7377 (fbsd_pending_vfork_done): Use std::forward_list.
7378 (fbsd_add_vfork_done): Likewise.
7379 (fbsd_is_vfork_done_pending): Likewise.
7380 (fbsd_next_vfork_done): Likewise.
7381
7382 2017-08-09 John Baldwin <jhb@FreeBSD.org>
7383
7384 * fbsd-nat.c [HAVE_KINFO_GETVMMAP] (struct free_deleter): New.
7385 (fbsd_find_memory_regions): Use free_deleter with std::unique_ptr.
7386 [!HAVE_KINFO_GETVMMAP] (fbsd_find_memory_regions): Use std::string
7387 for `mapfilename'.
7388 (fbsd_xfer_partial): Use gdb::byte_vector.
7389 (fbsd_add_threads): Use gdb::unique_xmalloc_ptr.
7390
7391 2017-08-09 John Baldwin <jhb@FreeBSD.org>
7392
7393 * fbsd-nat.c: [!HAVE_KINFO_GETVMMAP]: Include <sys/user.h> and
7394 "filestuff.h".
7395 (fbsd_find_memory_regions): Fix `mapfile' initialization.
7396
7397 2017-08-09 Tom Tromey <tom@tromey.com>
7398
7399 * skip.c (skiplist_entry): New constructor.
7400 (skiplist_entry::enabled, skiplist_entry::function_is_regexp)
7401 (skiplist_entry::file_is_glob): Now bool.
7402 (skiplist_entry::file, skiplist_entry::function): Now
7403 std::string.
7404 (make_skip_entry): Return a unique_ptr. Use new.
7405 (free_skiplist_entry, free_skiplist_entry_cleanup)
7406 (make_free_skiplist_entry_cleanup): Remove.
7407 (skip_command, skip_disable_command, add_skiplist_entry)
7408 (skip_form_bytes, compile_skip_regexp, skip_command, skip_info)
7409 (skip_file_p, skip_gfile_p, skip_function_p, skip_rfunction_p)
7410 (function_name_is_marked_for_skip): Update.
7411 (skip_delete_command): Update. Use delete.
7412
7413 2017-08-09 Jiong Wang <jiong.wang@arm.com>
7414
7415 * aarch64-linux-tdep.c: Include "auxv.h" and "elf/common.h".
7416 (aarch64_linux_core_read_description): New function.
7417 (aarch64_linux_init_abi): Register gdbarch_core_read_description.
7418
7419 2017-08-09 Pedro Alves <palves@redhat.com>
7420
7421 * cp-name-parser.y (cp_comp_to_string): Return a
7422 gdb::unique_xmalloc_ptr<char>.
7423 * cp-support.c (replace_typedefs_qualified_name)
7424 (replace_typedefs): Adjust to use gdb::unique_xmalloc_ptr<char>.
7425 (cp_canonicalize_string_full): Use op= instead of explicit
7426 convertion.
7427 (cp_class_name_from_physname, method_name_from_physname)
7428 (cp_func_name, cp_remove_params): Adjust to use
7429 gdb::unique_xmalloc_ptr<char>.
7430 * cp-support.h (cp_comp_to_string): Return a
7431 gdb::unique_xmalloc_ptr<char>.
7432 * python/py-type.c (typy_lookup_type): Adjust to use
7433 gdb::unique_xmalloc_ptr<char>.
7434
7435 2017-08-09 H.J. Lu <hongjiu.lu@intel.com>
7436
7437 * dwarf2read.c (dwarf2_string_attr): Fix a typo.
7438
7439 2017-08-09 Alex Lindsay <alexlindsay239@gmail.com>
7440 Yao Qi <yao.qi@linaro.org>
7441
7442 * cp-support.c (cp_canonicalize_string_full): Use
7443 gdb::unique_xmalloc_ptr<char>.
7444 (cp_canonicalize_string): Likewise.
7445
7446 2017-08-09 Yao Qi <yao.qi@linaro.org>
7447
7448 * features/Makefile (WHICH): Remove i386/ non-linux stuff.
7449 * regformats/i386/amd64-avx-avx512.dat: Remove.
7450 * regformats/i386/amd64-avx-mpx-avx512-pku.dat: Remove.
7451 * regformats/i386/amd64-avx-mpx.dat:Remove.
7452 * regformats/i386/amd64-avx.dat: Remove.
7453 * regformats/i386/amd64-mpx.dat: Remove.
7454 * regformats/i386/i386-avx-avx512.dat: Remove.
7455 * regformats/i386/i386-avx-mpx-avx512-pku.dat: Remove.
7456 * regformats/i386/i386-avx-mpx.dat: Remove.
7457 * regformats/i386/i386-mmx.dat: Remove.
7458 * regformats/i386/i386-mpx.dat: Remove.
7459
7460 2017-08-09 Yao Qi <yao.qi@linaro.org>
7461
7462 * amd64-tdep.h (tdesc_x32): Remove the declaration.
7463 * amd64-tdep.c: Don't include features/i386/x32*.c.
7464 (_initialize_amd64_tdep): Don't call initialize_tdesc_x32*
7465 functions.
7466 * features/Makefile (WHICH): Remove i386/x32, i386/x32-avx,
7467 and i386/x32-avx-avx512.
7468 (XMLTOC): Remove i386/x32-avx.xml, i386/x32-avx-avx512.xml,
7469 and i386/x32.xml.
7470 * features/i386/x32-avx-avx512.c: Removed.
7471 * features/i386/x32-avx-avx512.xml: Removed.
7472 * features/i386/x32-avx.c: Removed.
7473 * features/i386/x32-avx.xml: Removed.
7474 * features/i386/x32.c: Removed.
7475 * features/i386/x32.xml: Removed.
7476 * regformats/i386/x32-avx-avx512.dat: Removed.
7477 * regformats/i386/x32-avx.dat: Removed.
7478 * regformats/i386/x32.dat: Removed.
7479
7480 2017-08-07 Maciej W. Rozycki <macro@imgtec.com>
7481
7482 PR breakpoints/21886
7483 * mem-break.c (default_memory_insert_breakpoint): Use
7484 `->placed_address' rather than `->reqstd_address' for the
7485 breakpoint location.
7486
7487 2017-08-07 Maciej W. Rozycki <macro@imgtec.com>
7488
7489 * arch-utils.c (default_print_insn): Remove arch/mach/endian
7490 assertions.
7491
7492 2017-08-07 Maciej W. Rozycki <macro@imgtec.com>
7493
7494 * gdbarch.sh (gdbarch_info): Replace the `tdep_info' member with
7495 a union of `tdep_info', `tdesc_data' and `id'.
7496 * aarch64-tdep.c (aarch64_gdbarch_init): Use `info.tdesc_data'
7497 rather than `info.tdep_info'.
7498 * amd64-linux-tdep.c (amd64_linux_init_abi): Likewise.
7499 * i386-linux-tdep.c (i386_linux_init_abi): Likewise.
7500 * i386-tdep.c (i386_gdbarch_init): Likewise.
7501 * mips-linux-tdep.c (mips_linux_init_abi): Likewise.
7502 * mips-tdep.c (mips_gdbarch_init): Likewise.
7503 * nds32-tdep.c (nds32_gdbarch_init): Likewise.
7504 * rs6000-tdep.c (rs6000_gdbarch_init): Likewise.
7505 * ppc-linux-tdep.c (ppu2spu_sniffer): Use `info.id' rather than
7506 `info.tdep_info'.
7507 (ppc_linux_init_abi): Use `info.tdesc_data' rather than
7508 `info.tdep_info'.
7509 * sparc-tdep.c (sparc32_gdbarch_init): Likewise.
7510 * spu-multiarch.c (spu_gdbarch): Use `info.id' rather than
7511 `info.tdep_info'.
7512 * spu-tdep.c (spu_gdbarch_init): Likewise.
7513 * gdbarch.h: Regenerate.
7514
7515 2017-08-07 Leszek Swirski <leszeks@google.com>
7516
7517 PR symtab/20899
7518 * dwarf2read.c (dwarf2_string_attr): Allow DW_FORM_GNU_strp_alt.
7519
7520 2017-08-07 Simon Marchi <simon.marchi@ericsson.com>
7521
7522 * remote-sim.c (gdbsim_load): Remove char **argv local variable.
7523 (gdbsim_open): Rename gdb_argv args object to argv.
7524
7525 2017-08-05 Tom Tromey <tom@tromey.com>
7526
7527 * compile/compile-object-load.c (compile_object_load): Use
7528 gdb::unique_xmalloc_ptr.
7529 * cli/cli-dump.c (scan_filename): Rename from
7530 scan_filename_with_cleanup. Change return type.
7531 (scan_expression): Rename from scan_expression_with_cleanup.
7532 Change return type.
7533 (dump_memory_to_file, dump_value_to_file, restore_command):
7534 Use gdb::unique_xmalloc_ptr. Update.
7535 * cli/cli-cmds.c (find_and_open_script): Use
7536 gdb::unique_xmalloc_ptr.
7537 * tracefile-tfile.c (tfile_open): Use gdb::unique_xmalloc_ptr.
7538 * symmisc.c (maintenance_print_symbols)
7539 (maintenance_print_msymbols): Use gdb::unique_xmalloc_ptr.
7540 * symfile.c (symfile_bfd_open, generic_load)
7541 (add_symbol_file_command, remove_symbol_file_command): Use
7542 gdb::unique_xmalloc_ptr.
7543 * source.c (openp): Use gdb::unique_xmalloc_ptr.
7544 * psymtab.c (maintenance_print_psymbols): Use
7545 gdb::unique_xmalloc_ptr.
7546 * corelow.c (core_open): Use gdb::unique_xmalloc_ptr.
7547 * breakpoint.c (save_breakpoints): Use gdb::unique_xmalloc_ptr.
7548 * solib.c (solib_map_sections): Use gdb::unique_xmalloc_ptr.
7549 (reload_shared_libraries_1): Likewise.
7550
7551 2017-08-05 Tom Tromey <tom@tromey.com>
7552
7553 * rust-exp.y (rust_op_ptr, set_field): Remove typedefs.
7554 (rust_op_vector, rust_set_vector): New typedefs.
7555 (current_parser): New global.
7556 (work_obstack): Change to pointer type. Update all users.
7557 (rust_ast, pstate): Remove globals.
7558 (struct rust_parser): New.
7559 (%union) <params, field_inits>: Change type.
7560 (start, tuple_expr, unit_expr, struct_expr_list, literal)
7561 (field_expr, expr_list, maybe_expr_list, type_list): Update.
7562 (ast_call_ish, ast_path, ast_function_type, ast_tuple_type)
7563 (convert_params_to_types, convert_params_to_expression): Change
7564 type of "params".
7565 (ast_string): Change type of "fields".
7566 (rust_parse): Make a rust_parser. Remove cleanups.
7567 (rust_lex_tests): Make and install an auto_obstack.
7568
7569 2017-08-04 Yao Qi <yao.qi@linaro.org>
7570
7571 * configure.srv (ipa_x32_linux_regobj): New.
7572 * linux-amd64-ipa.c (get_ipa_tdesc): Use X86_TDESC_AVX_AVX512
7573 instead of X86_TDESC_AVX512.
7574 (initialize_low_tracepoint): Call
7575 init_registers_x32_avx_avx512_linux.
7576
7577 2017-08-04 Yao Qi <yao.qi@linaro.org>
7578
7579 * utils.h (gdb_argv): Add namespace std for nullptr_t.
7580
7581 2017-08-03 Ruslan Kabatsayev <b7.10110111@gmail.com>
7582
7583 * MAINTAINERS (Write After Approval): Add Ruslan Kabatsayev.
7584
7585 2017-08-03 Tom Tromey <tom@tromey.com>
7586
7587 * utils.c (make_cleanup_freeargv, do_freeargv, gdb_buildargv):
7588 Remove.
7589 * utils.h (make_cleanup_freeargv, gdb_buildargv): Remove.
7590
7591 2017-08-03 Tom Tromey <tom@tromey.com>
7592
7593 * python/py-param.c (compute_enum_values): Use gdb_argv.
7594
7595 2017-08-03 Tom Tromey <tom@tromey.com>
7596
7597 * utils.h (struct gdb_argv_deleter): New.
7598 (gdb_argv): New class.
7599 * utils.c (gdb_argv::reset): New method.
7600 * tracepoint.c (delete_trace_variable_command): Use gdb_argv.
7601 * tracefile.c (tsave_command): Use gdb_argv.
7602 * top.c (new_ui_command): Use gdb_argv.
7603 * symmisc.c (maintenance_print_symbols)
7604 (maintenance_print_msymbols, maintenance_expand_symtabs): Use gdb_argv.
7605 * symfile.c (symbol_file_command, generic_load)
7606 (remove_symbol_file_command): Use gdb_argv.
7607 * stack.c (backtrace_command): Use gdb_argv.
7608 * source.c (add_path, show_substitute_path_command)
7609 (unset_substitute_path_command, set_substitute_path_command):
7610 Use gdb_argv.
7611 * skip.c (skip_command): Use gdb_argv. Use gdb_buildargv.
7612 * ser-mingw.c (pipe_windows_open): Use gdb_argv.
7613 * remote.c (extended_remote_run, remote_put_command)
7614 (remote_get_command, remote_delete_command): Use gdb_argv.
7615 * remote-sim.c (gdbsim_load, gdbsim_create_inferior)
7616 (gdbsim_open): Use gdb_argv.
7617 * python/py-cmd.c (gdbpy_string_to_argv): Use gdb_argv.
7618 * psymtab.c (maintenance_print_psymbols): Use gdb_argv.
7619 * procfs.c (procfs_info_proc): Use gdb_argv.
7620 * interps.c (interpreter_exec_cmd): Use gdb_argv.
7621 * infrun.c (handle_command): Use gdb_argv.
7622 * inferior.c (add_inferior_command, clone_inferior_command):
7623 Use gdb_argv.
7624 * guile/scm-string.c (gdbscm_string_to_argv): Use gdb_argv.
7625 * exec.c (exec_file_command): Use gdb_argv.
7626 * cli/cli-cmds.c (alias_command): Use gdb_argv.
7627 * compile/compile.c (build_argc_argv): Use gdb_argv.
7628
7629 2017-08-03 Tom Tromey <tom@tromey.com>
7630
7631 * python/python.c (gdbpy_decode_line): Use unique_xmalloc_ptr.
7632
7633 2017-08-03 Tom Tromey <tom@tromey.com>
7634
7635 * python/python.c (compute_python_string): Return std::string.
7636 (gdbpy_eval_from_control_command): Update.
7637 (do_start_initialization): Use std::string.
7638 * python/py-varobj.c (py_varobj_iter_next): Use string_printf, not
7639 xstrprintf.
7640 * python/py-breakpoint.c (local_setattro): Use string_printf, not
7641 xstrprintf.
7642
7643 2017-08-03 Tom Tromey <tom@tromey.com>
7644
7645 * top.h (do_restore_instream_cleanup): Remove.
7646 * top.c (do_restore_instream_cleanup): Remove.
7647 (read_command_file): Use scoped_restore.
7648 * cli/cli-script.c (execute_user_command): Use scoped_restore.
7649
7650 2017-08-03 Tom Tromey <tom@tromey.com>
7651
7652 * cli/cli-script.c (execute_user_command)
7653 (execute_control_command): Use scoped_restore.
7654
7655 2017-08-03 Tom Tromey <tom@tromey.com>
7656
7657 * cli/cli-script.c (do_restore_user_call_depth): Remove.
7658 (execute_user_command): Remove user_call_depth; use
7659 user_args_stack's size instead.
7660
7661 2017-08-03 Tom Tromey <tom@tromey.com>
7662
7663 * top.h (in_user_command): Remove.
7664 * top.c (in_user_command): Remove.
7665 * cli/cli-script.c (do_restore_user_call_depth)
7666 (execute_user_command): Update.
7667
7668 2017-08-03 Tom Tromey <tom@tromey.com>
7669
7670 * valops.c (search_struct_method): Use gdb::byte_vector.
7671 * valarith.c (value_concat): Use std::vector.
7672 * target.c (memory_xfer_partial): Use gdb::byte_vector.
7673 (simple_search_memory): Likewise.
7674 * printcmd.c (find_string_backward): Use gdb::byte_vector.
7675 * mi/mi-main.c (mi_cmd_data_write_memory): Use gdb::byte_vector.
7676 * gcore.c (gcore_copy_callback): Use gdb::byte_vector.
7677 * elfread.c (elf_rel_plt_read): Use std::string.
7678 * cp-valprint.c (cp_print_value): Use gdb::byte_vector.
7679 * cli/cli-dump.c (restore_section_callback): Use
7680 gdb::byte_vector.
7681
7682 2017-08-03 Tom Tromey <tom@tromey.com>
7683
7684 * jit.c (jit_reader_load_command): Use unique_xmalloc_ptr.
7685
7686 2017-08-03 Tom Tromey <tom@tromey.com>
7687
7688 * tui/tui-regs.c (tui_restore_gdbout): Remove.
7689 (tui_register_format): Use scoped_restore.
7690
7691 2017-08-03 Tom Tromey <tom@tromey.com>
7692
7693 * reverse.c (exec_direction_default): Remove.
7694 (exec_reverse_once): Use scoped_restore.
7695 * remote.c (restore_remote_timeout): Remove.
7696 (remote_flash_erase, remote_flash_write, remote_flash_done)
7697 (readchar, remote_serial_write): Use scoped_restore.
7698 * cli/cli-script.c (struct source_cleanup_lines_args)
7699 (source_cleanup_lines): Remove.
7700 (script_from_file): Use scoped_restore.
7701 * cli/cli-cmds.c (source_verbose_cleanup): Remove.
7702 (source_command): Use scoped_restore.
7703
7704 2017-08-03 Tom Tromey <tom@tromey.com>
7705
7706 * utils.h (make_cleanup_free_so): Remove.
7707 * utils.c (do_free_so, make_cleanup_free_so): Remove.
7708 * solist.h (struct so_deleter): New.
7709 (so_list_up): New typedef.
7710 * solib-svr4.c (svr4_read_so_list): Use so_list_up.
7711
7712 2017-08-03 Tom Tromey <tom@tromey.com>
7713
7714 * utils.h (make_cleanup_restore_current_language): Remove.
7715 * utils.c (do_restore_current_language)
7716 (make_cleanup_restore_current_language): Remove.
7717 * parse.c (parse_exp_in_context_1)
7718 (parse_expression_with_language): Use
7719 scoped_restore_current_language.
7720 * mi/mi-main.c (mi_cmd_execute): Use
7721 scoped_restore_current_language.
7722 * language.h (scoped_restore_current_language): New class.
7723
7724 2017-08-03 Tom Tromey <tom@tromey.com>
7725
7726 * compile/compile.c (cleanup_unlink_file): Remove.
7727 (compile_to_object): Use gdb::unlinker.
7728 (eval_compile_command): Likewise.
7729
7730 2017-08-03 Tom Tromey <tom@tromey.com>
7731
7732 * utils.h (make_cleanup_fclose): Remove.
7733 * utils.c (do_fclose_cleanup, make_cleanup_fclose): Remove.
7734
7735 2017-08-03 Tom Tromey <tom@tromey.com>
7736
7737 * top.c (open_terminal_stream): Return gdb_file_up.
7738 (new_ui_command): Update.
7739
7740 2017-08-03 Tom Tromey <tom@tromey.com>
7741
7742 * source.c (print_source_lines_base, forward_search_command)
7743 (reverse_search_command): Use gdb_file_up.
7744
7745 2017-08-03 Tom Tromey <tom@tromey.com>
7746
7747 * fbsd-nat.c (fbsd_find_memory_regions): Update.
7748
7749 2017-08-03 Tom Tromey <tom@tromey.com>
7750
7751 * cli/cli-cmds.c (find_and_open_script): Change return type.
7752 Remove "streamp" and "full_path" parameters.
7753 (source_script_with_search): Update.
7754 * auto-load.c (source_script_file): Update.
7755 * cli/cli-cmds.h (find_and_open_script): Change type.
7756 (open_script): New struct.
7757
7758 2017-08-03 Tom Tromey <tom@tromey.com>
7759
7760 * xml-support.c (xml_fetch_content_from_file): Update.
7761 * ui-file.c (stdio_file::open): Update.
7762 * tracefile-tfile.c (tfile_start): Update.
7763 * remote.c (remote_file_put, remote_file_get): Update.
7764 * nat/linux-procfs.c (linux_proc_get_int)
7765 (linux_proc_pid_get_state, linux_proc_tid_get_name): Update.
7766 * nat/linux-osdata.c (linux_common_core_of_thread): Update.
7767 (command_from_pid, commandline_from_pid, linux_xfer_osdata_cpus)
7768 (print_sockets, linux_xfer_osdata_shm, linux_xfer_osdata_sem)
7769 (linux_xfer_osdata_msg, linux_xfer_osdata_modules): Update.
7770 * nat/linux-btrace.c (linux_determine_kernel_start): Update.
7771 * linux-nat.c (linux_proc_pending_signals): Update.
7772 * dwarf2read.c (write_psymtabs_to_index): Use gdb_file_up.
7773 (file_closer): Remove.
7774 * compile/compile.c (compile_to_object): Update.
7775 * common/filestuff.h (struct gdb_file_deleter): New.
7776 (gdb_file_up): New typedef.
7777 (gdb_fopen_cloexec): Change return type.
7778 * common/filestuff.c (gdb_fopen_cloexec): Return gdb_file_up.
7779 * cli/cli-dump.c (fopen_with_cleanup): Remove.
7780 (dump_binary_file, restore_binary_file): Update.
7781 * auto-load.c (auto_load_objfile_script_1): Update.
7782
7783 2017-08-03 Tom Tromey <tom@tromey.com>
7784
7785 * tracepoint.c (tvariables_info_1): Use ui_out_emit_table.
7786 (info_static_tracepoint_markers_command): Likewise.
7787 * solib.c (info_sharedlibrary_command): Use ui_out_emit_table.
7788 * skip.c (skip_info): Use ui_out_emit_table.
7789 * progspace.c (print_program_space): Use ui_out_emit_table.
7790 * osdata.c (info_osdata): Use ui_out_emit_table.
7791 * mi/mi-cmd-info.c (mi_cmd_info_ada_exceptions): Use
7792 ui_out_emit_table.
7793 * linux-thread-db.c (info_auto_load_libthread_db): Use
7794 ui_out_emit_table.
7795 * inferior.c (print_inferior): Use ui_out_emit_table.
7796 * gdb_bfd.c (maintenance_info_bfds): Use ui_out_emit_table.
7797 * breakpoint.c (breakpoint_1): Use ui_out_emit_table.
7798 * auto-load.c (auto_load_info_scripts): Use ui_out_emit_table.
7799 * ada-tasks.c (print_ada_task_info): Use ui_out_emit_table.
7800 * ui-out.h (class ui_out_emit_table): New.
7801
7802 2017-08-02 Maciej W. Rozycki <macro@imgtec.com>
7803
7804 * mips-tdep.c (mips_fpu_type_str): New function.
7805 (mips_dump_tdep): Call it.
7806
7807 2017-08-01 Maciej W. Rozycki <macro@imgtec.com>
7808
7809 * mips-tdep.c (mips_gdbarch_init): Use MIPS_FPU_TYPE to access
7810 `->mips_fpu_type'.
7811
7812 2017-07-31 Xavier Roirand <roirand@adacore.com>
7813
7814 * solib-darwin.c (DYLD_VERSION_MAX): Increase value.
7815
7816 2017-07-27 Xavier Roirand <roirand@adacore.com>
7817
7818 * MAINTAINERS (Write After Approval): Add Xavier Roirand.
7819
7820 2017-07-26 Yao Qi <yao.qi@linaro.org>
7821
7822 * cli/cli-cmds.c (maintenancechecklist): New variable.
7823 * gdbcmd.h (maintenancechecklist): Declare it.
7824 * i386-linux-tdep.c (_initialize_i386_linux_tdep) [GDB_SELF_TEST]:
7825 Call i386_linux_read_description with different masks.
7826 * maint.c (maintenance_check_command): New function.
7827 (_initialize_maint_cmds): Call add_prefix_cmd.
7828 * target-descriptions.c (tdesc_reg): override operator != and ==.
7829 (tdesc_type): Likewise.
7830 (tdesc_feature): Likewise.
7831 (target_desc): Likewise.
7832 [GDB_SELF_TEST] (selftests::record_xml_tdesc): New function.
7833 (maintenance_check_xml_descriptions): New function.
7834 (_initialize_target_descriptions) Add command "xml-descriptions".
7835 * target-descriptions.h (selftests::record_xml_tdesc): Declare.
7836
7837 2017-07-26 Yao Qi <yao.qi@linaro.org>
7838
7839 * i386-linux-tdep.c: Don't include features/i386/i386-*linux.c.
7840 Include features/i386/32bit-*.c.
7841 (i386_linux_read_description): Generate target description if it
7842 doesn't exist.
7843 (_initialize_i386_linux_tdep): Don't call _initialize_tdesc_i386
7844 functions.
7845 * features/i386/32bit-linux.c: Re-generated.
7846 * features/i386/32bit-sse.c: Likewise.
7847 * target-descriptions.c (print_c_feature::visit): Print code to
7848 set register number if needed.
7849 (print_c_feature) <m_next_regnum>: New field.
7850
7851 2017-07-26 Yao Qi <yao.qi@linaro.org>
7852
7853 * features/Makefile (CFILES): Rename with TDESC_CFILES.
7854 (FEATURE_XMLFILES): New.
7855 (FEATURE_CFILES): New.
7856 New rules.
7857 (clean-cfiles): Remove generated c files.
7858 * features/i386/32bit-avx.c: Generated.
7859 * features/i386/32bit-avx512.c: Generated.
7860 * features/i386/32bit-core.c: Generated.
7861 * features/i386/32bit-linux.c: Generated.
7862 * features/i386/32bit-mpx.c: Generated.
7863 * features/i386/32bit-pkeys.c: Generated.
7864 * features/i386/32bit-sse.c: Generated.
7865 * target-descriptions.c: Include algorithm.
7866 (tdesc_element_visitor): Add method visit_end.
7867 (print_c_tdesc): Implement visit_end.
7868 (print_c_tdesc:: m_filename_after_features): Move it to
7869 protected.
7870 (print_c_feature): New class.
7871 (maint_print_c_tdesc_cmd): Use print_c_feature if XML file
7872 name starts with "i386/32bit-".
7873
7874 2017-07-26 Yao Qi <yao.qi@linaro.org>
7875
7876 * target-descriptions.c (tdesc_element_visitor): New class.
7877 (tdesc_element): New class.
7878 (tdesc_reg): Inherit from tdesc_element.
7879 (tdesc_reg::accept): New function.
7880 (tdesc_type): Inherit from tdesc_element.
7881 (tdesc_type::accept): New function.
7882 (tdesc_feature): Inherit from tdesc_element.
7883 (tdesc_feature::accept): New function.
7884 (target_desc): Inherit from tdesc_element.
7885 (target_desc::target_desc): New.
7886 (target_desc::~target_desc): New.
7887 (target_desc::accept): New.
7888 (allocate_target_description): Use new.
7889 (free_target_description): Use delete.
7890 (print_c_tdesc): New class.
7891 (maint_print_c_tdesc_cmd): Adjust.
7892
7893 * features/aarch64.c: Re-generated.
7894 * features/arc-arcompact.c: Re-generated.
7895 * features/arc-v2.c: Re-generated.
7896 * features/arm/arm-with-iwmmxt.c: Re-generated.
7897 * features/arm/arm-with-m.c: Re-generated.
7898 * features/arm/arm-with-m-fpa-layout.c: Re-generated.
7899 * features/arm/arm-with-m-vfp-d16.c: Re-generated.
7900 * features/arm/arm-with-neon.c: Re-generated.
7901 * features/arm/arm-with-vfpv2.c: Re-generated.
7902 * features/arm/arm-with-vfpv3.c: Re-generated.
7903 * features/i386/amd64-avx-avx512.c: Re-generated.
7904 * features/i386/amd64-avx-avx512-linux.c: Re-generated.
7905 * features/i386/amd64-avx.c: Re-generated.
7906 * features/i386/amd64-avx-linux.c: Re-generated.
7907 * features/i386/amd64-avx-mpx-avx512-pku.c: Re-generated.
7908 * features/i386/amd64-avx-mpx-avx512-pku-linux.c: Re-generated.
7909 * features/i386/amd64-avx-mpx.c: Re-generated.
7910 * features/i386/amd64-avx-mpx-linux.c: Re-generated.
7911 * features/i386/amd64.c: Re-generated.
7912 * features/i386/amd64-linux.c: Re-generated.
7913 * features/i386/amd64-mpx.c: Re-generated.
7914 * features/i386/amd64-mpx-linux.c: Re-generated.
7915 * features/i386/i386-avx-avx512.c: Re-generated.
7916 * features/i386/i386-avx-avx512-linux.c: Re-generated.
7917 * features/i386/i386-avx.c: Re-generated.
7918 * features/i386/i386-avx-linux.c: Re-generated.
7919 * features/i386/i386-avx-mpx-avx512-pku.c: Re-generated.
7920 * features/i386/i386-avx-mpx-avx512-pku-linux.c: Re-generated.
7921 * features/i386/i386-avx-mpx.c: Re-generated.
7922 * features/i386/i386-avx-mpx-linux.c: Re-generated.
7923 * features/i386/i386.c: Re-generated.
7924 * features/i386/i386-linux.c: Re-generated.
7925 * features/i386/i386-mmx.c: Re-generated.
7926 * features/i386/i386-mmx-linux.c: Re-generated.
7927 * features/i386/i386-mpx.c: Re-generated.
7928 * features/i386/i386-mpx-linux.c: Re-generated.
7929 * features/i386/x32-avx-avx512.c: Re-generated.
7930 * features/i386/x32-avx-avx512-linux.c: Re-generated.
7931 * features/i386/x32-avx.c: Re-generated.
7932 * features/i386/x32-avx-linux.c: Re-generated.
7933 * features/i386/x32.c: Re-generated.
7934 * features/i386/x32-linux.c: Re-generated.
7935 * features/microblaze.c: Re-generated.
7936 * features/microblaze-with-stack-protect.c: Re-generated.
7937 * features/mips64-dsp-linux.c: Re-generated.
7938 * features/mips64-linux.c: Re-generated.
7939 * features/mips-dsp-linux.c: Re-generated.
7940 * features/mips-linux.c: Re-generated.
7941 * features/nds32.c: Re-generated.
7942 * features/nios2.c: Re-generated.
7943 * features/nios2-linux.c: Re-generated.
7944 * features/rs6000/powerpc-32.c: Re-generated.
7945 * features/rs6000/powerpc-32l.c: Re-generated.
7946 * features/rs6000/powerpc-403.c: Re-generated.
7947 * features/rs6000/powerpc-403gc.c : Re-generated.
7948 * features/rs6000/powerpc-405.c: Re-generated.
7949 * features/rs6000/powerpc-505.c: Re-generated.
7950 * features/rs6000/powerpc-601.c: Re-generated.
7951 * features/rs6000/powerpc-602.c: Re-generated.
7952 * features/rs6000/powerpc-603.c: Re-generated.
7953 * features/rs6000/powerpc-604.c: Re-generated.
7954 * features/rs6000/powerpc-64.c: Re-generated.
7955 * features/rs6000/powerpc-64l.c: Re-generated.
7956 * features/rs6000/powerpc-7400.c: Re-generated.
7957 * features/rs6000/powerpc-750.c: Re-generated.
7958 * features/rs6000/powerpc-860.c: Re-generated.
7959 * features/rs6000/powerpc-altivec32.c: Re-generated.
7960 * features/rs6000/powerpc-altivec32l.c: Re-generated.
7961 * features/rs6000/powerpc-altivec64.c: Re-generated.
7962 * features/rs6000/powerpc-altivec64l.c: Re-generated.
7963 * features/rs6000/powerpc-cell32l.c: Re-generated.
7964 * features/rs6000/powerpc-cell64l.c: Re-generated.
7965 * features/rs6000/powerpc-e500.c: Re-generated.
7966 * features/rs6000/powerpc-e500l.c: Re-generated.
7967 * features/rs6000/powerpc-isa205-32l.c: Re-generated.
7968 * features/rs6000/powerpc-isa205-64l.c: Re-generated.
7969 * features/rs6000/powerpc-isa205-altivec32l.c: Re-generated.
7970 * features/rs6000/powerpc-isa205-altivec64l.c: Re-generated.
7971 * features/rs6000/powerpc-isa205-vsx32l.c: Re-generated.
7972 * features/rs6000/powerpc-isa205-vsx64l.c: Re-generated.
7973 * features/rs6000/powerpc-vsx32.c: Re-generated.
7974 * features/rs6000/powerpc-vsx32l.c: Re-generated.
7975 * features/rs6000/powerpc-vsx64.c: Re-generated.
7976 * features/rs6000/powerpc-vsx64l.c: Re-generated.
7977 * features/rs6000/rs6000.c: Re-generated.
7978 * features/s390-linux32.c: Re-generated.
7979 * features/s390-linux32v1.c: Re-generated.
7980 * features/s390-linux32v2.c: Re-generated.
7981 * features/s390-linux64.c: Re-generated.
7982 * features/s390-linux64v1.c: Re-generated.
7983 * features/s390-linux64v2.c: Re-generated.
7984 * features/s390-te-linux64.c: Re-generated.
7985 * features/s390-tevx-linux64.c: Re-generated.
7986 * features/s390-vx-linux64.c: Re-generated.
7987 * features/s390x-linux64.c: Re-generated.
7988 * features/s390x-linux64v1.c: Re-generated.
7989 * features/s390x-linux64v2.c: Re-generated.
7990 * features/s390x-te-linux64.c: Re-generated.
7991 * features/s390x-tevx-linux64.c: Re-generated.
7992 * features/s390x-vx-linux64.c: Re-generated.
7993 * features/sparc/sparc32-solaris.c: Re-generated.
7994 * features/sparc/sparc64-solaris.c: Re-generated.
7995 * features/tic6x-c62x.c: Re-generated.
7996 * features/tic6x-c62x-linux.c: Re-generated.
7997 * features/tic6x-c64x.c: Re-generated.
7998 * features/tic6x-c64x-linux.c: Re-generated.
7999 * features/tic6x-c64xp.c: Re-generated.
8000 * features/tic6x-c64xp-linux.c: Re-generated.
8001
8002 2017-07-26 Yao Qi <yao.qi@linaro.org>
8003
8004 * i386-linux-tdep.c (i386_linux_read_description): New function.
8005 (i386_linux_core_read_description): Call
8006 i386_linux_read_description.
8007 * i386-linux-tdep.h (i386_linux_read_description): Declare.
8008 (tdesc_i386_linux, tdesc_i386_mmx_linux): Remove declarations.
8009 (tdesc_i386_avx_linux, tdesc_i386_mpx_linux): Likewise
8010 (tdesc_i386_avx_mpx_linux, tdesc_i386_avx_avx512_linux): Likewise.
8011 (tdesc_i386_avx_mpx_avx512_pku_linux): Likewise.
8012 * x86-linux-nat.c (x86_linux_read_description): Call
8013 i386_linux_read_description.
8014
8015 2017-07-26 Yao Qi <yao.qi@linaro.org>
8016
8017 * NEWS: Mention it.
8018 * features/Makefile (%.c: %.xml): Pass the xml file name to
8019 command "maint print c-tdesc".
8020 * target-descriptions.c (maint_print_c_tdesc_cmd): Get file
8021 name from 'arg'.
8022
8023 2017-07-26 Yao Qi <yao.qi@linaro.org>
8024
8025 * target-descriptions.c (target_desc): Add ctor and dtor. Do
8026 in-class initialization.
8027 (tdesc_create_feature): Call new instead of XCNEW.
8028 (free_target_description): Ue delete.
8029
8030 2017-07-25 John Baldwin <jhb@FreeBSD.org>
8031
8032 * configure.nat: Add "-lkvm" for NetBSD/sparc64 and fix typo.
8033
8034 2017-07-25 Yao Qi <yao.qi@linaro.org>
8035
8036 * amd64-tdep.c (amd64_init_abi): Make argument default_tdesc
8037 constant.
8038 (amd64_x32_init_abi): Likewise.
8039 * amd64-tdep.h (amd64_init_abi): Update declaration.
8040 (amd64_x32_init_abi): Likewise.
8041
8042 2017-07-25 Yao Qi <yao.qi@linaro.org>
8043
8044 PR tdep/21717
8045 * arm-linux-nat.c (arm_linux_fetch_inferior_registers): Update
8046 condition for FPSCR.
8047 (arm_linux_store_inferior_registers): Likewise.
8048
8049 2017-07-22 Tom Tromey <tom@tromey.com>
8050
8051 * break-catch-syscall.c (struct catch_syscall_inferior_data)
8052 <syscalls_counts>: Now a std::vector.
8053 (get_catch_syscall_inferior_data): Use "new".
8054 (catch_syscall_inferior_data_cleanup): Use "delete".
8055 (insert_catch_syscall, remove_catch_syscall)
8056 (clear_syscall_counts): Update.
8057
8058 2017-07-22 Tom Tromey <tom@tromey.com>
8059
8060 * break-catch-syscall.c (syscall_catchpoint)
8061 <syscalls_to_be_caught>: Now a std::vector<int>
8062 (~syscall_catchpoint): Remove.
8063 (insert_catch_syscall, remove_catch_syscall)
8064 (breakpoint_hit_catch_syscall, print_one_catch_syscall)
8065 (print_mention_catch_syscall, print_recreate_catch_syscall):
8066 Update.
8067 (create_syscall_event_catchpoint): Change type of "filter"
8068 parameter.
8069 (catch_syscall_split_args): Return a std::vector.
8070 (catch_syscall_command_1, catching_syscall_number_1): Update.
8071
8072 2017-07-22 Tom Tromey <tom@tromey.com>
8073
8074 * break-catch-throw.c (struct exception_catchpoint)
8075 <exception_rx>: Now a std::string.
8076 (~exception_catchpoint): Remove.
8077 (print_one_detail_exception_catchpoint): Update.
8078 (handle_gnu_v3_exceptions): Change type of except_rx.
8079 (extract_exception_regexp): Return a std::string.
8080 (catch_exception_command_1): Update.
8081
8082 2017-07-22 Tom Tromey <tom@tromey.com>
8083
8084 * break-catch-sig.c (gdb_signal_type): Remove typedef.
8085 (struct signal_catchpoint) <signals_to_be_caught>: Now a
8086 std::vector.
8087 <catch_all>: Now a bool.
8088 (~signal_catchpoint): Remove.
8089 (signal_catchpoint_insert_location)
8090 (signal_catchpoint_remove_location)
8091 (signal_catchpoint_breakpoint_hit, signal_catchpoint_print_one)
8092 (signal_catchpoint_print_mention)
8093 (signal_catchpoint_print_recreate)
8094 (signal_catchpoint_explains_signal): Update.
8095 (create_signal_catchpoint): Change type of "filter" and
8096 "catch_all".
8097 (catch_signal_split_args): Return a std::vector. Change type of
8098 "catch_all".
8099 (catch_signal_command): Update.
8100
8101 2017-07-20 Pedro Alves <palves@redhat.com>
8102
8103 * ada-lang.c (ada_language_defn): Make extern.
8104 (_initialize_ada_language): Remove add_language call.
8105 * c-lang.c (c_language_defn, cplus_language_defn)
8106 (asm_language_defn, minimal_language_defn): Make extern.
8107 (_initialize_c_language): Delete.
8108 * completer.c (compare_cstrings): Delete, moved to utils.h.
8109 * d-lang.c (d_language_defn): Make extern.
8110 (_initialize_d_language): Remove add_language calls.
8111 * defs.h (enum language): Add comment.
8112 * f-lang.c (f_language_defn): Make extern.
8113 (_initialize_f_language): Remove add_language call.
8114 * go-lang.c (go_language_defn): Make extern.
8115 (_initialize_go_language): Remove add_language call.
8116 * language.c: Include <algorithm>.
8117 (languages): Redefine as const array.
8118 (languages_size, languages_allocsize, DEFAULT_ALLOCSIZE): Delete.
8119 (set_language_command): Handle "local". Use for-range loop.
8120 (set_language): Remove loop.
8121 (language_enum): Rewrite.
8122 (language_def, language_str): Remove loops.
8123 (add_language): Delete.
8124 (add_set_language_command): New, based on add_languages.
8125 (skip_language_trampoline): Adjust.
8126 (local_language_defn): Delete.
8127 (language_gdbarch_post_init): Adjust.
8128 (_initialize_language): Remove add_language calls. Call
8129 add_set_language_command.
8130 * language.h (add_language): Delete.
8131 (auto_language_defn)
8132 (unknown_language_defn, minimal_language_defn, ada_language_defn)
8133 (asm_language_defn, c_language_defn, cplus_language_defn)
8134 (d_language_defn, f_language_defn, go_language_defn)
8135 (m2_language_defn, objc_language_defn, opencl_language_defn)
8136 (pascal_language_defn, rust_language_defn): Declare.
8137 * m2-lang.c (m2_language_defn): Make extern.
8138 (_initialize_m2_language): Remove add_language call.
8139 * objc-lang.c (objc_language_defn): Make extern.
8140 (_initialize_objc_language): Remove add_language call.
8141 * opencl-lang.c (opencl_language_defn): Make extern.
8142 (_initialize_opencl_language): Remove add_language call.
8143 * p-lang.c (pascal_language_defn): Make extern.
8144 (_initialize_pascal_language): Delete.
8145 * rust-lang.c (rust_language_defn): Make extern.
8146 (_initialize_rust_language): Delete.
8147 * utils.h (compare_cstrings): New static inline function.
8148
8149 2017-07-20 Pedro Alves <palves@redhat.com>
8150
8151 * ada-lang.c (ada_to_fixed_type_1): Adjust.
8152 (get_var_value): Constify parameters.
8153 (get_int_var_value): Change prototype.
8154 (to_fixed_range_type): Adjust.
8155 * ada-lang.h (get_int_var_value): Change prototype.
8156
8157 2017-07-20 Pedro Alves <palves@redhat.com>
8158
8159 * dwarf2read.c (dw2_lookup_symbol): Use
8160 SYMBOL_MATCHES_SEARCH_NAME.
8161 * psymtab.c (psym_lookup_symbol): Use SYMBOL_MATCHES_SEARCH_NAME.
8162
8163 2017-07-20 Pedro Alves <palves@redhat.com>
8164
8165 * block.c (block_iter_name_step, block_iter_name_first)
8166 (block_iter_name_next): Delete.
8167 (block_lookup_symbol_primary): Adjust to use
8168 dict_iter_match_first/dict_iter_match_next.
8169 * block.h (block_iter_name_first, block_iter_name_next): Delete
8170 declarations.
8171 (ALL_BLOCK_SYMBOLS_WITH_NAME): Adjust to use
8172 dict_iter_match_first/dict_iter_match_next.
8173
8174 2017-07-20 Pedro Alves <palves@redhat.com>
8175
8176 * cp-support.c (cp_find_first_component_aux): Add missing case for
8177 end of string.
8178
8179 2017-07-18 David Blaikie <dblaikie@gmail.com>
8180
8181 * dwarf2read.c (create_cus_hash_table): Re-add lost initialization
8182 of dwo_cu's dwo_file.
8183
8184 2017-07-18 Yao Qi <yao.qi@linaro.org>
8185
8186 * remote.c (store_registers_using_G): Remove one line comment.
8187
8188 2017-07-18 Yao Qi <yao.qi@linaro.org>
8189
8190 * regcache.c (regcache_cpy): Simplify it.
8191 (regcache::cpy_no_passthrough): Remove it.
8192 * regcache.h (cpy_no_passthrough): Remove it.
8193 (regcache_dup, regcache_cpy): Update comments.
8194
8195 2017-07-18 Pedro Alves <palves@redhat.com>
8196
8197 * remote-sim.c (sim_command_completer): Adjust to work with a
8198 completion_tracker instead of a VEC.
8199
8200 2017-07-17 Pedro Alves <palves@redhat.com>
8201
8202 * completer.c (complete_source_filenames): New function.
8203 (complete_address_and_linespec_locations): New function.
8204 (location_completer): Use complete_address_and_linespec_locations.
8205 (completion_tracker::build_completion_result): Honor the tracker's
8206 request to suppress append.
8207 * completer.h (completion_tracker::suppress_append_ws)
8208 (completion_tracker::set_suppress_append_ws): New methods.
8209 (completion_tracker::m_suppress_append_ws): New field.
8210 (complete_source_filenames): New declaration.
8211 * linespec.c (linespec_complete_what): New.
8212 (struct ls_parser) <complete_what, completion_word,
8213 completion_quote_char, completion_quote_end, completion_tracker>:
8214 New fields.
8215 (string_find_incomplete_keyword_at_end): New.
8216 (linespec_lexer_lex_string): Record quote char. If in completion
8217 mode, don't throw.
8218 (linespec_lexer_consume_token): Advance the completion word point.
8219 (linespec_lexer_peek_token): Save/restore completion info.
8220 (save_stream_and_consume_token): New.
8221 (set_completion_after_number): New.
8222 (linespec_parse_basic): Set what to complete next depending on
8223 token. Handle function and label completions specially.
8224 (parse_linespec): Disable objc shortcut in completion mode. Set
8225 what to complete next depending on token type. Skip keyword if in
8226 completion mode.
8227 (complete_linespec_component, linespec_complete): New.
8228 * linespec.h (linespec_complete): Declare.
8229
8230 2017-07-17 Pedro Alves <palves@redhat.com>
8231
8232 * linespec.c (linespec_lexer_lex_string, find_toplevel_char):
8233 Handle 'operator<' / 'operator<<'.
8234
8235 2017-07-17 Pedro Alves <palves@redhat.com>
8236
8237 * completer.c (collect_explicit_location_matches): Handle
8238 MATCH_LABEL.
8239 (convert_explicit_location_to_linespec): New, factored out from
8240 ...
8241 (convert_explicit_location_to_sals): ... this.
8242 (complete_label): New.
8243 (linespec_complete_label, find_label_symbols_in_block): New.
8244 (find_label_symbols): Add completion_mode parameter and adjust to
8245 call find_label_symbols_in_block.
8246 * linespec.h (linespec_complete_label): Declare.
8247
8248 2017-07-17 Pedro Alves <palves@redhat.com>
8249
8250 * ada-lang.c (ada_collect_symbol_completion_matches): Add
8251 complete_symbol_mode parameter.
8252 * cli/cli-cmds.c (complete_command): Get the completion result out
8253 of the handle_brkchars tracker if used a custom word point.
8254 * completer.c: Include "linespec.h".
8255 (enum explicit_location_match_type) <MATCH_LINE>: New enumerator.
8256 (advance_to_expression_complete_word_point): New.
8257 (completion_tracker::completes_to_completion_word): New.
8258 (complete_files_symbols): Pass down
8259 complete_symbol_mode::EXPRESSION.
8260 (explicit_options, probe_options): New.
8261 (collect_explicit_location_matches): Complete on the
8262 explictit_loc->foo instead of word. Use
8263 linespec_complete_function. Handle MATCH_LINE. Handle offering
8264 keyword and options completions.
8265 (backup_text_ptr): Delete.
8266 (skip_keyword): New.
8267 (complete_explicit_location): Remove 'word' parameter. Add
8268 language, quoted_arg_start and quoted_arg_end parameters.
8269 Rewrite, parsing left to right.
8270 (location_completer): Rewrite.
8271 (location_completer_handle_brkchars): New function.
8272 (symbol_completer): Pass down complete_symbol_mode::EXPRESSION.
8273 (enum complete_line_internal_reason): Adjust comments.
8274 (completion_tracker::discard_completions): New.
8275 (completer_handle_brkchars_func_for_completer): Handle
8276 location_completer.
8277 (gdb_custom_word_point_brkchars)
8278 (gdb_org_rl_basic_quote_characters): New.
8279 (gdb_completion_word_break_characters_throw)
8280 (completion_find_completion_word): Handle trackers that use a
8281 custom word point.
8282 (completion_tracker::advance_custom_word_point_by): New.
8283 (completion_tracker::build_completion_result): Don't rely on
8284 readline appending the quote char.
8285 (gdb_rl_attempted_completion_function_throw): Handle trackers that
8286 use a custom word point.
8287 (gdb_rl_attempted_completion_function): Restore
8288 rl_basic_quote_characters.
8289 * completer.h (class completion_tracker): Extend intro comment.
8290 (completion_tracker::set_quote_char)
8291 (completion_tracker::quote_char)
8292 (completion_tracker::set_use_custom_word_point)
8293 (completion_tracker::use_custom_word_point)
8294 (completion_tracker::custom_word_point)
8295 (completion_tracker::set_custom_word_point)
8296 (completion_tracker::advance_custom_word_point_by)
8297 (completion_tracker::completes_to_completion_word)
8298 (completion_tracker::discard_completions): New methods.
8299 (completion_tracker::m_quote_char)
8300 (completion_tracker::m_use_custom_word_point)
8301 (completion_tracker::m_custom_word_point): New fields.
8302 (advance_to_expression_complete_word_point): Declare.
8303 * f-lang.c (f_collect_symbol_completion_matches): Add
8304 complete_symbol_mode parameter.
8305 * language.h (struct language_defn)
8306 <la_collect_symbol_completion_matches>: Add complete_symbol_mode
8307 parameter.
8308 * linespec.c (linespec_keywords): Add NULL terminator. Make extern.
8309 (linespec_complete_function): New function.
8310 (linespec_lexer_lex_keyword): Adjust.
8311 * linespec.h (linespec_keywords, linespec_complete_function): New
8312 declarations.
8313 * location.c (find_end_quote): New function.
8314 (explicit_location_lex_one): Add explicit_completion_info
8315 parameter. Save quoting info. Don't throw if being called for
8316 completion. Don't handle Ada operators here.
8317 (is_cp_operator, skip_op_false_positives, first_of)
8318 (explicit_location_lex_one_function): New function.
8319 (string_to_explicit_location): Replace 'dont_throw' parameter with
8320 an explicit_completion_info pointer parameter. Handle it. Don't
8321 use explicit_location_lex_one to lex function names. Use
8322 explicit_location_lex_one_function instead.
8323 * location.h (struct explicit_completion_info): New.
8324 (string_to_explicit_location): Replace 'dont_throw' parameter with
8325 an explicit_completion_info pointer parameter.
8326 * symtab.c (default_collect_symbol_completion_matches_break_on):
8327 Add complete_symbol_mode parameter. Handle LINESPEC mode.
8328 (default_collect_symbol_completion_matches)
8329 (collect_symbol_completion_matches): Add complete_symbol_mode
8330 parameter.
8331 (collect_symbol_completion_matches_type): Pass down
8332 complete_symbol_mode::EXPRESSION.
8333 (collect_file_symbol_completion_matches): Add complete_symbol_mode
8334 parameter. Handle LINESPEC mode.
8335 * symtab.h (complete_symbol_mode): New.
8336 (default_collect_symbol_completion_matches_break_on)
8337 (default_collect_symbol_completion_matches)
8338 (collect_symbol_completion_matches)
8339 (collect_file_symbol_completion_matches): Add complete_symbol_mode
8340 parameter.
8341
8342 2017-07-17 Pedro Alves <palves@redhat.com>
8343
8344 * utils.c (enum class strncmp_iw_mode): New.
8345 (strcmp_iw): Rename to ...
8346 (strncmp_iw_with_mode): ... this. Add string2_len and mode
8347 parameters. Handle them.
8348 (strncmp_iw): New.
8349 (strcmp_iw): Reimplement as wrapper around strncmp_iw_with_mode.
8350 * utils.h (strncmp_iw): Declare.
8351 (strcmp_iw): Move describing comments here.
8352
8353 2017-07-17 Pedro Alves <palves@redhat.com>
8354
8355 * c-exp.y (operator_stoken): Use CP_OPERATOR_LEN and
8356 CP_OPERATOR_STR.
8357 * c-typeprint.c (is_type_conversion_operator): Use
8358 CP_OPERATOR_STR.
8359 * cp-support.c (LENGTH_OF_OPERATOR): Delete.
8360 (cp_find_first_component_aux): Use CP_OPERATOR_STR and
8361 CP_OPERATOR_LEN.
8362 * cp-support.h (CP_OPERATOR_STR, CP_OPERATOR_LEN): New.
8363 * gnu-v2-abi.c (gnuv2_is_operator_name): Use CP_OPERATOR_STR.
8364 * gnu-v3-abi.c (gnuv3_is_operator_name): Use CP_OPERATOR_STR.
8365 * linespec.c (linespec_lexer_lex_string): Use CP_OPERATOR_LEN and
8366 CP_OPERATOR_STR.
8367 * location.c: Include "cp-support.h".
8368 (explicit_location_lex_one): Use CP_OPERATOR_LEN and
8369 CP_OPERATOR_STR.
8370 * symtab.c (operator_chars): Use CP_OPERATOR_STR and
8371 CP_OPERATOR_LEN.
8372
8373 2017-07-17 Pedro Alves <palves@redhat.com>
8374
8375 * cli/cli-cmds.c (complete_command): Use a completion tracker
8376 along with completion_find_completion_word for handle_brkchars
8377 phase.
8378 * completer.c (RL_QF_SINGLE_QUOTE, RL_QF_DOUBLE_QUOTE)
8379 (RL_QF_BACKSLASH, RL_QF_OTHER_QUOTE): New.
8380 (struct gdb_rl_completion_word_info): New.
8381 (gdb_rl_find_completion_word): New.
8382 (completion_find_completion_word): New.
8383 * completer.h (completion_find_completion_word): Declare.
8384
8385 2017-07-17 Pedro Alves <palves@redhat.com>
8386
8387 * ada-lang.c (symbol_completion_match): Adjust comments.
8388 (symbol_completion_add): Replace vector parameter with
8389 completion_tracker parameter. Use it.
8390 (ada_make_symbol_completion_list): Rename to...
8391 (ada_collect_symbol_completion_matches): ... this. Add
8392 completion_tracker parameter and use it.
8393 (ada_language_defn): Adjust.
8394 * break-catch-syscall.c (catch_syscall_completer): Adjust
8395 prototype and work with completion_tracker instead of VEC.
8396 * breakpoint.c (condition_completer): Adjust prototype and work
8397 with completion_tracker instead of VEC.
8398 * c-lang.c (c_language_defn, cplus_language_defn)
8399 (asm_language_defn, minimal_language_defn): Adjust to renames.
8400 * cli/cli-cmds.c (complete_command): Rework using
8401 completion_tracker. Catch exceptions when completing.
8402 * cli/cli-decode.c (integer_unlimited_completer)
8403 (complete_on_cmdlist, complete_on_enum): Adjust prototype and work
8404 with completion_tracker instead of VEC.
8405 * command.h (struct completion_tracker): Forward declare.
8406 (completer_ftype, completer_handle_brkchars_ftype): Change
8407 types.
8408 (complete_on_cmdlist, complete_on_enum): Adjust.
8409 * completer.c: Include <algorithm>.
8410 (struct gdb_completer_state): New.
8411 (current_completion): New global.
8412 (readline_line_completion_function): Delete.
8413 (noop_completer, filename_completer)
8414 (filename_completer_handle_brkchars, complete_files_symbols)
8415 (linespec_location_completer): Adjust to work with a
8416 completion_tracker instead of a VEC.
8417 (string_or_empty): New.
8418 (collect_explicit_location_matches): Adjust to work with a
8419 completion_tracker instead of a VEC.
8420 (explicit_location_completer): Rename to ...
8421 (complete_explicit_location): ... this and adjust to work with a
8422 completion_tracker instead of a VEC.
8423 (location_completer): Adjust to work with a completion_tracker
8424 instead of a VEC.
8425 (add_struct_fields): Adjust to work with a completion_list instead
8426 of VEC.
8427 (expression_completer): Rename to ...
8428 (complete_expression): ... this and adjust to work with a
8429 completion_tracker instead of a VEC. Use complete_files_symbols.
8430 (expression_completer): Reimplement on top of complete_expression.
8431 (symbol_completer): Adjust to work with a completion_tracker
8432 instead of a VEC.
8433 (enum complete_line_internal_reason): Add describing comments.
8434 (complete_line_internal_normal_command): Adjust to work with a
8435 completion_tracker instead of a VEC.
8436 (complete_line_internal): Rename to ...
8437 (complete_line_internal_1): ... this and adjust to work with a
8438 completion_tracker instead of a VEC. Assert TEXT is NULL in the
8439 handle_brkchars phase.
8440 (new_completion_tracker): Delete.
8441 (complete_line_internal): Reimplement as TRY/CATCH wrapper around
8442 complete_line_internal_1.
8443 (free_completion_tracker): Delete.
8444 (INITIAL_COMPLETION_HTAB_SIZE): New.
8445 (completion_tracker::completion_tracker)
8446 (completion_tracker::~completion_tracker): New.
8447 (maybe_add_completion): Delete.
8448 (completion_tracker::maybe_add_completion)
8449 (completion_tracker::add_completion)
8450 (completion_tracker::add_completions): New.
8451 (throw_max_completions_reached_error): Delete.
8452 (complete_line): Adjust to work with a completion_tracker instead
8453 of a VEC. Don't create a completion_tracker_t or check for max
8454 completions here.
8455 (command_completer, command_completer_handle_brkchars)
8456 (signal_completer, reg_or_group_completer_1)
8457 (reg_or_group_completer, default_completer_handle_brkchars):
8458 Adjust to work with a completion_tracker.
8459 (gdb_completion_word_break_characters_throw): New.
8460 (gdb_completion_word_break_characters): Reimplement.
8461 (line_completion_function): Delete.
8462 (completion_tracker::recompute_lowest_common_denominator)
8463 (expand_preserving_ws)
8464 (completion_tracker::build_completion_result)
8465 (completion_result::completion_result)
8466 (completion_result::completion_result)
8467 (completion_result::~completion_result)
8468 (completion_result::completion_result)
8469 (completion_result::release_match_list, compare_cstrings)
8470 (completion_result::sort_match_list)
8471 (completion_result::reset_match_list)
8472 (gdb_rl_attempted_completion_function_throw)
8473 (gdb_rl_attempted_completion_function): New.
8474 * completer.h (completion_list, struct completion_result)
8475 (class completion_tracker): New.
8476 (complete_line): Add completion_tracker parameter.
8477 (readline_line_completion_function): Delete.
8478 (gdb_rl_attempted_completion_function): New.
8479 (noop_completer, filename_completer, expression_completer)
8480 (location_completer, symbol_completer, command_completer)
8481 (signal_completer, reg_or_group_completer): Update prototypes.
8482 (completion_tracker_t, new_completion_tracker)
8483 (make_cleanup_free_completion_tracker): Delete.
8484 (enum maybe_add_completion_enum): Delete.
8485 (maybe_add_completion): Delete.
8486 (throw_max_completions_reached_error): Delete.
8487 * corefile.c (complete_set_gnutarget): Adjust to work with a
8488 completion_tracker instead of a VEC.
8489 * cp-abi.c (cp_abi_completer): Adjust to work with a
8490 completion_tracker instead of a VEC.
8491 * d-lang.c (d_language_defn): Adjust.
8492 * disasm.c (disassembler_options_completer): Adjust to work with a
8493 completion_tracker instead of a VEC.
8494 * f-lang.c (f_make_symbol_completion_list): Rename to ...
8495 (f_collect_symbol_completion_matches): ... this. Adjust to work
8496 with a completion_tracker instead of a VEC.
8497 (f_language_defn): Adjust.
8498 * go-lang.c (go_language_defn): Adjust.
8499 * guile/scm-cmd.c (cmdscm_add_completion, cmdscm_completer):
8500 Adjust to work with a completion_tracker instead of a VEC.
8501 * infrun.c (handle_completer): Likewise.
8502 * interps.c (interpreter_completer): Likewise.
8503 * interps.h (interpreter_completer): Likewise.
8504 * language.c (unknown_language_defn, auto_language_defn)
8505 (local_language_defn): Adjust.
8506 * language.h (language_defn::la_make_symbol_completion_list):
8507 Rename to ...
8508 (language_defn::la_collect_symbol_completion_matches): ... this
8509 and adjust to work with a completion_tracker instead of a VEC.
8510 * m2-lang.c (m2_language_defn): Adjust.
8511 * objc-lang.c (objc_language_defn): Adjust.
8512 * opencl-lang.c (opencl_language_defn): Adjust.
8513 * p-lang.c (pascal_language_defn): Adjust.
8514 * python/py-cmd.c (cmdpy_completer_helper): Handle NULL word.
8515 (cmdpy_completer_handle_brkchars, cmdpy_completer): Adjust to work
8516 with a completion_tracker.
8517 * rust-lang.c (rust_language_defn): Adjust.
8518 * symtab.c (free_completion_list, do_free_completion_list)
8519 (return_val, completion_tracker): Delete.
8520 (completion_list_add_name, completion_list_add_symbol)
8521 (completion_list_add_msymbol, completion_list_objc_symbol)
8522 (completion_list_add_fields, add_symtab_completions): Add
8523 completion_tracker parameter and use it.
8524 (default_make_symbol_completion_list_break_on_1): Rename to...
8525 (default_collect_symbol_completion_matches_break_on): ... this.
8526 Add completion_tracker parameter and use it instead of allocating
8527 a completion tracker here.
8528 (default_make_symbol_completion_list_break_on): Delete old
8529 implementation.
8530 (default_make_symbol_completion_list): Delete.
8531 (default_collect_symbol_completion_matches): New.
8532 (make_symbol_completion_list): Delete.
8533 (collect_symbol_completion_matches): New.
8534 (make_symbol_completion_type): Rename to ...
8535 (collect_symbol_completion_matches_type): ... this. Add
8536 completion_tracker parameter and use it instead of VEC.
8537 (make_file_symbol_completion_list_1): Rename to...
8538 (collect_file_symbol_completion_matches): ... this. Add
8539 completion_tracker parameter and use it instead of VEC.
8540 (make_file_symbol_completion_list): Delete.
8541 (add_filename_to_list): Use completion_list instead of a VEC.
8542 (add_partial_filename_data::list): Now a completion_list.
8543 (make_source_files_completion_list): Work with a completion_list
8544 instead of a VEC.
8545 * symtab.h: Include "completer.h".
8546 (default_make_symbol_completion_list_break_on)
8547 (default_make_symbol_completion_list, make_symbol_completion_list)
8548 (make_symbol_completion_type, make_file_symbol_completion_list)
8549 (make_source_files_completion_list): Delete.
8550 (default_collect_symbol_completion_matches_break_on)
8551 (default_collect_symbol_completion_matches)
8552 (collect_symbol_completion_matches)
8553 (collect_symbol_completion_matches_type)
8554 (collect_file_symbol_completion_matches)
8555 (make_source_files_completion_list): New.
8556 * top.c (init_main): Don't install a rl_completion_entry_function
8557 hook. Install a rl_attempted_completion_function hook instead.
8558 * tui/tui-layout.c (layout_completer): Adjust to work with a
8559 completion_tracker.
8560 * tui/tui-regs.c (tui_reggroup_completer):
8561 * tui/tui-win.c (window_name_completer, focus_completer)
8562 (winheight_completer): Adjust to work with a completion_tracker.
8563 * value.c: Include "completer.h".
8564 (complete_internalvar): Adjust to work with a completion_tracker.
8565 * value.h (complete_internalvar): Likewise.
8566
8567 2017-07-17 Pedro Alves <palves@redhat.com>
8568
8569 * cli/cli-decode.c (set_cmd_completer_handle_brkchars): Adjust to
8570 renames.
8571 * cli/cli-decode.h (struct cmd_list_element) <completer>: Move
8572 comments to completer_ftype's declaration.
8573 <completer_handle_brkchars>: Change type to
8574 completer_handle_brkchars_ftype.
8575 * command.h (completer_ftype): Add describing comment and give
8576 names to parameters.
8577 (completer_ftype_void): Rename to ...
8578 (completer_handle_brkchars_ftype) ... this. Add describing comment.
8579 (set_cmd_completer_handle_brkchars): Adjust.
8580 * completer.c (filename_completer_handle_brkchars): New function.
8581 (complete_line_internal_normal_command): New function, factored
8582 out from ...
8583 (complete_line_internal): ... here.
8584 (command_completer_handle_brkchars)
8585 (default_completer_handle_brkchars)
8586 (completer_handle_brkchars_func_for_completer): New functions.
8587 * completer.h (set_gdb_completion_word_break_characters): Delete
8588 declaration.
8589 (completer_handle_brkchars_func_for_completer): New declaration.
8590 * python/py-cmd.c (cmdpy_completer_handle_brkchars): Adjust to use
8591 completer_handle_brkchars_func_for_completer.
8592
8593 2017-07-17 Pedro Alves <palves@redhat.com>
8594
8595 * completer.c (symbol_completer): New function, based on
8596 make_symbol_completion_list_fn.
8597 * completer.h (symbol_completer): New declaration.
8598 * guile/scm-cmd.c (cmdscm_completers): Adjust.
8599 * python/py-cmd.c (completers): Adjust.
8600 * symtab.c (make_symbol_completion_list_fn): Delete.
8601 * symtab.h (make_symbol_completion_list_fn): Delete.
8602 * cli/cli-decode.c (add_cmd): Adjust.
8603
8604 2017-07-17 Pedro Alves <palves@redhat.com>
8605
8606 * Makefile.in (COMMON_OBS): Add filename-seen-cache.o.
8607 * dwarf2read.c: Include "filename-seen-cache.h".
8608 * dwarf2read.c (dwarf2_per_objfile) <filenames_cache>: New field.
8609 (dw2_map_symbol_filenames): Build and use a filenames_seen_cache.
8610 * filename-seen-cache.c: New file.
8611 * filename-seen-cache.h: New file.
8612 * symtab.c: Include "filename-seen-cache.h".
8613 (struct filename_seen_cache, INITIAL_FILENAME_SEEN_CACHE_SIZE)
8614 (create_filename_seen_cache, clear_filename_seen_cache)
8615 (delete_filename_seen_cache, filename_seen): Delete, parts moved
8616 to filename-seen-cache.h/filename-seen-cache.c.
8617 (output_source_filename, sources_info)
8618 (maybe_add_partial_symtab_filename)
8619 (make_source_files_completion_list): Adjust to use
8620 filename_seen_cache.
8621
8622 2017-07-17 Pedro Alves <palves@redhat.com>
8623
8624 * dwarf2read.c (dwarf2_per_objfile): In-class initialize all
8625 fields.
8626 (dwarf2_per_objfile::dwarf2_per_objfile(objfile*, const
8627 dwarf2_debug_sections*)): New.
8628 (dwarf2_per_objfile::dwarf2_per_objfile(const
8629 dwarf2_per_objfile&)): Declare as deleted.
8630 (dwarf2_per_objfile::operator=): Declare as deleted.
8631 (dwarf2_per_objfile::dwarf2_per_objfile)
8632 (dwarf2_per_objfile::~dwarf2_per_objfile)
8633 (dwarf2_per_objfile::free_cached_comp_units): New.
8634 (dwarf2_has_info): dwarf2_per_objfile initialization code moved to
8635 ctor. Call dwarf2_per_objfile's ctor manually.
8636 (dwarf2_locate_sections): Deleted/refactored as ...
8637 (dwarf2_per_objfile::locate_sections): ... this new method.
8638 (free_cached_comp_units): Defer to
8639 dwarf2_per_objfile::free_cached_comp_units.
8640 (dwarf2_free_objfile): Call dwarf2_per_objfile's dtor manually.
8641
8642 2017-07-14 Tom Tromey <tom@tromey.com>
8643
8644 PR rust/21764:
8645 * rust-exp.y (convert_ast_to_expression): Add "want_type"
8646 parameter.
8647 <UNOP_SIZEOF>: Split into separate case.
8648 <UNOP_VAR_VALUE>: Handle want_type. Add error case.
8649
8650 2017-07-14 Tom Tromey <tom@tromey.com>
8651
8652 PR rust/21763:
8653 * symtab.c (symbol_matches_domain): Add language_rust to special
8654 case.
8655 * rust-exp.y (convert_ast_to_expression) <OP_VAR_VALUE>: Don't
8656 treat LOC_TYPEDEF symbols as variables.
8657
8658 2017-07-14 Pedro Alves <palves@redhat.com>
8659
8660 * symtab.c (make_file_symbol_completion_list_1): Iterate over
8661 symtabs matching all symtabs with SRCFILE as file name instead of
8662 only considering the first hit, with lookup_symtab.
8663
8664 2017-07-14 Simon Marchi <simon.marchi@ericsson.com>
8665
8666 * ax-gdb.c (gen_aggregate_elt_ref): Remove operand_name and
8667 operator_name parameters.
8668 (gen_expr): Update function call.
8669
8670 2017-07-14 Simon Marchi <simon.marchi@ericsson.com>
8671
8672 * dwarf2loc.h (dwarf2_compile_expr_to_ax): Remove gdbarch
8673 parameter.
8674 * symtab.h (struct symbol_computed_ops::tracepoint_var_ref):
8675 Likewise.
8676 * dwarf2loc.c (dwarf2_compile_expr_to_ax): Remove gdbarch
8677 parameter, use agent_expr::gdbarch instead, update function
8678 calls.
8679 (locexpr_tracepoint_var_ref): Likewise.
8680 (loclist_tracepoint_var_ref): Likewise.
8681 * ax-gdb.c (gen_trace_static_fields): Likewise.
8682 (gen_traced_pop): Likewise.
8683 (gen_frame_args_address): Likewise.
8684 (gen_frame_locals_address): Likewise.
8685 (gen_var_ref): Likewise.
8686 (gen_struct_ref_recursive): Likewise.
8687 (gen_static_field): Likewise.
8688 (gen_maybe_namespace_elt): Likewise.
8689 (gen_expr): Likewise.
8690 (gen_trace_for_var): Likewise.
8691 (gen_trace_for_expr): Likewise.
8692 (gen_trace_for_return_address): Likewise.
8693
8694 2017-07-14 Simon Marchi <simon.marchi@ericsson.com>
8695
8696 * ax-gdb.c (gen_deref, gen_address_of): Remove unused ax
8697 parameter.
8698 (gen_struct_ref, gen_expr, gen_expr_binop_rest): Update call.
8699
8700 2017-07-14 Simon Marchi <simon.marchi@ericsson.com>
8701
8702 * ax-gdb.c (gen_usual_unary): Remove exp parameter, get gdbarch
8703 from ax, update calls.
8704 (gen_usual_arithmetic): Likewise.
8705 (gen_integral_promotions): Likewise.
8706 (gen_bitfield_ref): Likewise.
8707 (gen_primitive_field): Likewise.
8708 (gen_struct_ref_recursive): Likewise.
8709 (gen_struct_ref): Likewise.
8710 (gen_maybe_namespace_elt): Likewise.
8711 (gen_struct_elt_for_reference): Likewise.
8712 (gen_namespace_elt): Likewise.
8713 (gen_aggregate_elt_ref): Likewise.
8714 (gen_expr): Get gdbarch from ax, update calls.
8715 (gen_expr_binop_rest): Likewise.
8716
8717 2017-07-13 Pedro Alves <palves@redhat.com>
8718
8719 * amd64-darwin-tdep.c (x86_darwin_init_abi_64): Pass tdesc_amd64
8720 as default tdesc.
8721 * amd64-dicos-tdep.c (amd64_dicos_init_abi):
8722 * amd64-fbsd-tdep.c (amd64fbsd_init_abi):
8723 * amd64-linux-tdep.c (amd64_linux_init_abi): Pass
8724 tdesc_amd64_linux as default tdesc. Get final tdesc from the
8725 tdep.
8726 (amd64_x32_linux_init_abi): Pass tdesc_x32_linux as default tdesc.
8727 Get final tdesc from the tdep.
8728 * amd64-nbsd-tdep.c (amd64nbsd_init_abi): Pass tdesc_amd64 as
8729 default tdesc.
8730 * amd64-obsd-tdep.c (amd64obsd_init_abi): Likewise.
8731 * amd64-sol2-tdep.c (amd64_sol2_init_abi): Likewise.
8732 * amd64-tdep.c (amd64_init_abi): Add 'default_tdesc' parameter.
8733 Use it as default tdesc.
8734 (amd64_x32_init_abi): Add 'default_tdesc' parameter, and pass it
8735 down to amd_init_abi. No longer handle fallback tdesc here.
8736 * amd64-tdep.h (tdesc_x32): Declare.
8737 (amd64_init_abi, amd64_x32_init_abi): Add 'default_tdesc'
8738 parameter.
8739 * amd64-windows-tdep.c (amd64_windows_init_abi): Pass tdesc_amd64
8740 as default tdesc.
8741
8742 2017-07-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
8743
8744 * s390-linux-tdep.c (s390_process_record): Add support for
8745 instructions new in arch12.
8746
8747 2017-07-11 John Baldwin <jhb@FreeBSD.org>
8748
8749 * amd64-bsd-nat.c (amd64bsd_fetch_inferior_registers): Use
8750 PT_GETFSBASE and PT_GETGSBASE.
8751 (amd64bsd_store_inferior_registers): Use PT_SETFSBASE and
8752 PT_SETGSBASE.
8753
8754 2017-07-11 John Baldwin <jhb@FreeBSD.org>
8755
8756 * features/Makefile (amd64.dat, amd64-avx.dat, amd64-mpx.dat)
8757 (amd64-avx-mpx.dat, amd64-avx-avx512.dat)
8758 (amd64-avx-mpx-avx512-pku.dat): Add i386/64bit-segments.xml in
8759 those rules.
8760 * features/i386/amd64-avx-avx512.xml: Add 64bit-segments.xml.
8761 * features/i386/amd64-avx-mpx-avx512-pku.xml: Add 64bit-segments.xml.
8762 * features/i386/amd64-avx-mpx.xml: Add 64bit-segments.xml.
8763 * features/i386/amd64-avx.xml: Add 64bit-segments.xml.
8764 * features/i386/amd64-mpx.xml: Add 64bit-segments.xml.
8765 * features/i386/amd64.xml: Add 64bit-segments.xml.
8766 * features/i386/amd64-avx-avx512.c: Regenerated.
8767 * features/i386/amd64-avx-mpx-avx512-pku.c: Regenerated.
8768 * features/i386/amd64-avx-mpx.c: Regenerated.
8769 * features/i386/amd64-avx.c: Regenerated.
8770 * features/i386/amd64-mpx.c: Regenerated.
8771 * features/i386/amd64.c: Regenerated.
8772 * regformats/i386/amd64-avx-avx512.dat: Regenerated.
8773 * regformats/i386/amd64-avx-mpx-avx512-pku.dat: Regenerated.
8774 * regformats/i386/amd64-avx-mpx.dat: Regenerated.
8775 * regformats/i386/amd64-avx.dat: Regenerated.
8776 * regformats/i386/amd64-mpx.dat: Regenerated.
8777 * regformats/i386/amd64.dat: Regenerated.
8778
8779 2017-07-10 Yao Qi <yao.qi@linaro.org>
8780
8781 * features/i386/amd64-avx-avx512-linux.c: Re-generated.
8782 * features/i386/amd64-avx-mpx-avx512-pku-linux.c: Re-generated.
8783
8784 2017-07-10 Anton Kolesov <Anton.Kolesov@synopsys.com>
8785
8786 * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add setenv and
8787 unsetenv.
8788 * gnulib/aclocal.m4: Regenerate.
8789 * gnulib/config.in: Regenerate.
8790 * gnulib/configure: Regenerate.
8791 * gnulib/import/Makefile.am: Regenerate.
8792 * gnulib/import/Makefile.in: Regenerate.
8793 * gnulib/import/m4/gnulib-cache.m4: Regenerate.
8794 * gnulib/import/m4/gnulib-comp.m4: Regenerate.
8795 * gnulib/import/m4/environ.m4: New file.
8796 * gnulib/import/m4/setenv.m4: New file.
8797 * gnulib/import/setenv.c: New file.
8798 * gnulib/import/unsetenv.c: New file.
8799
8800 2017-07-09 Simon Marchi <simon.marchi@ericsson.com>
8801
8802 * compile/compile-loc2c.c (do_compile_dwarf_expr_to_c): Read
8803 address when op is DW_OP_addr.
8804
8805 2017-07-09 Tom Tromey <tom@tromey.com>
8806
8807 * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Reverse size
8808 check and apply to outer type.
8809
8810 2017-07-07 John Baldwin <jhb@FreeBSD.org>
8811
8812 * fbsd-tdep.c (LWPINFO_OFFSET, LWPINFO_PL_FLAGS)
8813 (LWPINFO64_PL_SIGINFO, LWPINFO32_PL_SIGINFO, PL_FLAG_SI)
8814 (SIZE64_SIGINFO_T, SIZE32_SIGINFO_T, fbsd_core_xfer_siginfo): New.
8815 (fbsd_init_abi): Install gdbarch "core_xfer_siginfo" method.
8816
8817 2017-07-07 John Baldwin <jhb@FreeBSD.org>
8818
8819 * fbsd-tdep.c (fbsd_core_thread_name): Use thread_section_name.
8820
8821 2017-07-07 John Baldwin <jhb@FreeBSD.org>
8822
8823 * corelow.c (get_core_siginfo): Remove.
8824 (core_xfer_partial): Use the gdbarch "core_xfer_siginfo" method
8825 instead of get_core_siginfo.
8826 * gdbarch.sh (core_xfer_siginfo): New gdbarch callback.
8827 * gdbarch.h: Re-generate.
8828 * gdbarch.c: Re-generate.
8829 * linux-tdep.c (linux_core_xfer_siginfo): New.
8830 (linux_init_abi): Install gdbarch "core_xfer_siginfo" method.
8831
8832 2017-07-07 John Baldwin <jhb@FreeBSD.org>
8833
8834 * corelow.c (thread_section_name): Move to ...
8835 * gdbcore.h (thread_section_name): ... here.
8836
8837 2017-07-07 John Baldwin <jhb@FreeBSD.org>
8838
8839 * fbsd-nat.c [PT_LWPINFO && __LP64__] (union sigval32)
8840 (struct siginfo32): New.
8841 [PT_LWPINFO] (fbsd_siginfo_size, fbsd_convert_siginfo): New.
8842 (fbsd_xfer_partial) [PT_LWPINFO]: Handle TARGET_OBJECT_SIGNAL_INFO
8843 via ptrace(PT_LWPINFO).
8844
8845 2017-07-07 John Baldwin <jhb@FreeBSD.org>
8846
8847 * fbsd-tdep.c (fbsd_gdbarch_data_handle, struct fbsd_gdbarch_data)
8848 (init_fbsd_gdbarch_data, get_fbsd_gdbarch_data)
8849 (fbsd_get_siginfo_type): New.
8850 (fbsd_init_abi): Install gdbarch "get_siginfo_type" method.
8851 (_initialize_fbsd_tdep): New.
8852
8853 2017-07-06 David Blaikie <dblaikie@gmail.com>
8854
8855 * dwarf2read.c (struct dwo_file): Use a htab of dwo_unit* (rather than
8856 a singular dwo_unit*) to support multiple CUs in the same way that
8857 multiple TUs are supported.
8858 (create_cus_hash_table): Replace create_dwo_cu with a function for
8859 parsing multiple CUs from a DWO file.
8860 (open_and_init_dwo_file): Use create_cus_hash_table rather than
8861 create_dwo_cu.
8862 (lookup_dwo_cutu): Lookup CU in the hash table in the dwo_file with
8863 htab_find, rather than comparing the signature to a singleton CU in
8864 the dwo_file.
8865
8866 2017-07-06 Pedro Alves <palves@redhat.com>
8867
8868 * python/py-unwind.c (pyuw_dealloc_cache): Fix for loop condition.
8869
8870 2017-07-04 Pedro Alves <palves@redhat.com>
8871
8872 * gdbtypes.c (recursive_dump_type): Don't reference TYPE_STATIC.
8873 * gdbtypes.h (TYPE_STATIC): Delete.
8874 (struct fn_field) <is_public, is_abstract, is_static, is_final,
8875 is_synchronized, is_native>: Delete.
8876 <dummy>: Bump.
8877 (TYPE_FN_FIELD_PUBLIC, TYPE_FN_FIELD_STATIC, TYPE_FN_FIELD_FINAL)
8878 (TYPE_FN_FIELD_SYNCHRONIZED, TYPE_FN_FIELD_NATIVE)
8879 (TYPE_FN_FIELD_ABSTRACT): Delete.
8880
8881 2017-07-03 Simon Marchi <simon.marchi@ericsson.com>
8882
8883 * buffer.h (buffer_finish): Fix spelling mistakes.
8884
8885 2017-07-01 Eli Zaretskii <eliz@gnu.org>
8886
8887 * .dir-locals.el: Automatically switch to C-style comments in
8888 versions of Emacs that support the feature.
8889
8890 2017-06-30 Sergio Durigan Junior <sergiodj@redhat.com>
8891 Pedro Alves <palves@redhat.com>
8892
8893 PR cli/21688
8894 * cli/cli-script.c (command_name_equals_not_inline): Remove function.
8895 (process_next_line): New variable 'inline_cmd'.
8896 Adjust 'if' clauses for "python", "compile" and "guile" to use
8897 'command_name_equals' and check for '!inline_cmd'.
8898
8899 2017-06-30 Sergio Durigan Junior <sergiodj@redhat.com>
8900
8901 PR cli/21688
8902 * cli/cli-script.c (command_name_equals_not_inline): New function.
8903 (process_next_line): Adjust 'if' clauses for "python", "compile"
8904 and "guile" to use command_name_equals_not_inline.
8905
8906 2017-06-29 Pedro Alves <palves@redhat.com>
8907
8908 * completer.c (expression_completer): Call
8909 linespec_location_completer instead of location_completer.
8910
8911 2017-06-29 Pedro Alves <palves@redhat.com>
8912
8913 * completer.c (expression_completer): Remove code that recomputes
8914 'text' from 'word'.
8915
8916 2017-06-29 Yao Qi <yao.qi@linaro.org>
8917
8918 * regformats/regdat.sh: Generate code with
8919 "ifndef IN_PROCESS_AGENT".
8920
8921 2017-06-28 Pedro Alves <palves@redhat.com>
8922
8923 * command.h: Include "common/scoped_restore.h".
8924
8925 2017-06-28 Yao Qi <yao.qi@linaro.org>
8926
8927 * mi/mi-cmd-break.c (mi_argv_to_format): Use obstack_grow_str
8928 instead of obstack_grow.
8929
8930 2017-06-28 Doug Gilmore <Doug.Gilmore@imgtec.com>
8931
8932 PR gdb/21337
8933 * symfile.c (reread_symbols): Call objfiles_changed just before
8934 read_symbols.
8935
8936 2017-06-27 Pedro Alves <palves@redhat.com>
8937
8938 * symtab.c (COMPLETION_LIST_ADD_SYMBOL)
8939 (MCOMPLETION_LIST_ADD_SYMBOL): Delete macros, replace with ...
8940 (completion_list_add_symbol, completion_list_add_msymbol):
8941 ... these new functions.
8942 (add_symtab_completions)
8943 (default_make_symbol_completion_list_break_on_1): Adjust.
8944
8945 2017-06-27 Pedro Alves <palves@redhat.com>
8946
8947 * objfiles.c (get_objfile_bfd_data): Call bfd_alloc instead of
8948 bfd_zalloc. Call objfile_per_bfd_storage's ctor.
8949 (free_objfile_per_bfd_storage): Call objfile_per_bfd_storage's
8950 dtor.
8951 * objfiles.h (objfile_per_bfd_storage): Add ctor. Make
8952 'storage_obstack' field an auto_obstack. In-class initialize all
8953 non-bitfield fields. Make minsyms_read bool.
8954 * symfile.c (read_symbols): Adjust.
8955
8956 2017-06-27 Alan Hayward <alan.hayward@arm.com>
8957
8958 * remote-sim.c (gdbsim_fetch_register): Use byte_vector.
8959 (gdbsim_store_register): Likewise.
8960
8961 2017-06-27 Pedro Alves <palves@redhat.com>
8962
8963 * c-exp.y (name_obstack): Now an auto_obstack.
8964 (yylex): Use auto_obstack::clear.
8965 (c_parse): Use auto_obstack::clear instead of reinitializing and
8966 freeing the obstack.
8967 * c-lang.c (evaluate_subexp_c): Use auto_obstack.
8968 * d-exp.y (name_obstack): Now an auto_obstack.
8969 (yylex): Use auto_obstack::clear.
8970 (d_parse): Use auto_obstack::clear instead of reinitializing and
8971 freeing the obstack.
8972 * dwarf2loc.c (fetch_const_value_from_synthetic_pointer): Use
8973 auto_obstack.
8974 * dwarf2read.c (create_addrmap_from_index)
8975 (dwarf2_build_psymtabs_hard)
8976 (update_enumeration_type_from_children): Likewise.
8977 * gdb_obstack.h (auto_obstack): New type.
8978 * go-exp.y (name_obstack): Now an auto_obstack.
8979 (build_packaged_name): Use auto_obstack::clear.
8980 (go_parse): Use auto_obstack::clear instead of reinitializing and
8981 freeing the obstack.
8982 * linux-tdep.c (linux_make_mappings_corefile_notes): Use
8983 auto_obstack.
8984 * printcmd.c (printf_wide_c_string, ui_printf): Use auto_obstack.
8985 * rust-exp.y (work_obstack): Now an auto_obstack.
8986 (rust_parse, rust_lex_tests): Use auto_obstack::clear instead of
8987 reinitializing and freeing the obstack.
8988 * utils.c (do_obstack_free, make_cleanup_obstack_free): Delete.
8989 (host_char_to_target): Use auto_obstack.
8990 * utils.h (make_cleanup_obstack_free): Delete declaration.
8991 * valprint.c (generic_emit_char, generic_printstr): Use
8992 auto_obstack.
8993
8994 2017-06-27 Simon Marchi <simon.marchi@ericsson.com>
8995
8996 * darwin-nat.c (darwin_check_new_threads): Don't handle dummy
8997 thread.
8998 (darwin_init_thread_list): Don't update dummy thread.
8999 (darwin_create_inferior, darwin_attach): Don't add a dummy thread.
9000
9001 2017-06-26 Simon Marchi <simon.marchi@ericsson.com>
9002
9003 * record-full.c (netorder16): Remove.
9004
9005 2017-06-26 Simon Marchi <simon.marchi@ericsson.com>
9006
9007 * common/diagnostics.h: Define macros for GCC.
9008 (DIAGNOSTIC_IGNORE_UNUSED_FUNCTION): New macro.
9009 * common/vec.h: Include diagnostics.h.
9010 (DIAGNOSTIC_IGNORE_UNUSED_VEC_FUNCTION): New macro.
9011 (DEF_VEC_I, DEF_VEC_P, DEF_VEC_O): Ignore -Wunused-function
9012 warning.
9013
9014 2017-06-26 Simon Marchi <simon.marchi@ericsson.com>
9015
9016 * common/diagnostics.h (DIAGNOSTIC_IGNORE_DEPRECATED_REGISTER):
9017 New macro.
9018 * ada-lex.l: Ignore deprecated register warnings.
9019
9020 2017-06-25 Simon Marchi <simon.marchi@ericsson.com>
9021
9022 * main.c (get_init_files): Replace "SYSTEM_GDBINIT +
9023 datadir_len" with "&SYSTEM_GDBINIT[datadir_len]".
9024
9025 2017-06-25 Simon Marchi <simon.marchi@ericsson.com>
9026
9027 * dtrace-probe.c (dtrace_process_dof_probe): Put semi-colon on
9028 its own line.
9029
9030 2017-06-25 Simon Marchi <simon.marchi@ericsson.com>
9031
9032 * nat/x86-dregs.c (x86_show_dr): Print registers one per line.
9033
9034 2017-06-23 Alan Hayward <alan.hayward@arm.com>
9035
9036 * xtensa-tdep.c (XTENSA_MAX_REGISTER_SIZE): Add.
9037 (xtensa_register_write_masked): Use XTENSA_MAX_REGISTER_SIZE.
9038 (xtensa_register_read_masked): Likewise.
9039
9040 2017-06-22 Sergio Durigan Junior <sergiodj@redhat.com>
9041
9042 * common/environ.c (gdb_environ::unset): Update comment.
9043
9044 2017-06-22 Alan Hayward <alan.hayward@arm.com>
9045
9046 * python/py-unwind.c (pyuw_sniffer): Allocate space for
9047 registers.
9048
9049 2017-06-22 Alan Hayward <alan.hayward@arm.com>
9050
9051 * record-full.c (record_full_exec_insn): Use byte_vector.
9052
9053 2017-06-22 Yao Qi <yao.qi@linaro.org>
9054
9055 * regformats/i386/amd64-avx-mpx-avx512-pku-linux.dat: Regenerated.
9056 * regformats/i386/amd64-avx-mpx-avx512-pku.dat: Regenerated.
9057
9058 2017-06-22 Alan Hayward <alan.hayward@arm.com>
9059
9060 * remote.c (cached_reg): Move from here...
9061 * regcache.h (cached_reg): ...to here.
9062 * python/py-unwind.c (struct reg_info): Remove.
9063 (cached_frame_info): Use cached_reg_t.
9064 (pyuw_prev_register): Likewise.
9065 (pyuw_sniffer): Use cached_reg_t and allocate registers.
9066 (pyuw_dealloc_cache): Free all registers.
9067
9068 2017-06-22 Pedro Alves <palves@redhat.com>
9069 Simon Marchi <simon.marchi@ericsson.com>
9070
9071 * unittests/environ-selftests.c (run_tests): Ignore -Wself-move
9072 warning.
9073 * common/diagnostics.h: New file.
9074
9075 2017-06-22 Pedro Alves <palves@redhat.com>
9076
9077 * common/agent.h: Add include guards.
9078
9079 2017-06-21 Simon Marchi <simon.marchi@ericsson.com>
9080
9081 * target.h (struct target_ops) <to_xfer_partial>: Update doc to
9082 talk about addressable units instead of bytes.
9083
9084 2017-06-20 Sergio Durigan Junior <sergiodj@redhat.com>
9085
9086 * common/environ.c (gdb_environ::unset): Use '::iterator' instead
9087 of '::const_iterator'.
9088
9089 2017-06-20 Sergio Durigan Junior <sergiodj@redhat.com>
9090
9091 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
9092 'unittests/environ-selftests.c'.
9093 (SUBDIR_UNITTESTS_OBS): Add 'environ-selftests.o'.
9094 * charset.c (find_charset_names): Declare object 'iconv_env'.
9095 Update code to use 'iconv_env' object. Remove call to
9096 'free_environ'.
9097 * common/environ.c: Include <utility>.
9098 (make_environ): Delete function.
9099 (free_environ): Delete function.
9100 (gdb_environ::clear): New function.
9101 (gdb_environ::operator=): New function.
9102 (gdb_environ::get): Likewise.
9103 (environ_vector): Delete function.
9104 (set_in_environ): Delete function.
9105 (gdb_environ::set): New function.
9106 (unset_in_environ): Delete function.
9107 (gdb_environ::unset): New function.
9108 (gdb_environ::envp): Likewise.
9109 * common/environ.h: Include <vector>.
9110 (struct gdb_environ): Delete; transform into...
9111 (class gdb_environ): ... this class.
9112 (free_environ): Delete prototype.
9113 (init_environ, get_in_environ, set_in_environ, unset_in_environ,
9114 environ_vector): Likewise.
9115 * infcmd.c (run_command_1): Update code to call
9116 'envp' from 'gdb_environ' class.
9117 (environment_info): Update code to call methods from 'gdb_environ'
9118 class.
9119 (unset_environment_command): Likewise.
9120 (path_info): Likewise.
9121 (path_command): Likewise.
9122 * inferior.c (inferior::~inferior): Delete call to 'free_environ'.
9123 (inferior::inferior): Initialize 'environment' using the host's
9124 information.
9125 * inferior.h: Remove forward declaration of 'struct gdb_environ'.
9126 Include "environ.h".
9127 (class inferior) <environment>: Change type from 'struct
9128 gdb_environ' to 'gdb_environ'.
9129 * mi/mi-cmd-env.c (mi_cmd_env_path): Update code to call
9130 methods from 'gdb_environ' class.
9131 * solib.c (solib_find_1): Likewise
9132 * unittests/environ-selftests.c: New file.
9133
9134 2017-06-20 Yao Qi <yao.qi@linaro.org>
9135
9136 * features/i386/i386-linux.xml: Exchange the order of including
9137 32bit-linux.xml and 32bit-sse.xml.
9138 * features/i386/i386-linux.c: Regenerated.
9139
9140 2017-06-20 Yao Qi <yao.qi@linaro.org>
9141
9142 * target-descriptions.c (tdesc_reg): Add ctor, dtor.
9143 Delete copy ctor and assignment operator.
9144 (tdesc_type): Likewise.
9145 (tdesc_feature): Likewise.
9146 (tdesc_free_reg): Remove.
9147 (tdesc_create_reg): Use new.
9148 (tdesc_free_type): Remove.
9149 (tdesc_create_vector): Use new.
9150 (tdesc_create_union): Likewise.
9151 (tdesc_create_flags): Likewise.
9152 (tdesc_create_enum): Likewise.
9153 (tdesc_free_feature): Delete.
9154 (free_target_description): Use delete.
9155
9156 2017-06-19 John Baldwin <jhb@FreeBSD.org>
9157
9158 * mips-tdep.c (print_gp_register_row): Don't error for unavailable
9159 registers.
9160
9161 2017-06-19 Pedro Alves <palves@redhat.com>
9162
9163 * dwarf2read.c (write_psymtabs_to_index): Construct file_closer
9164 after gdb::unlinker.
9165
9166 2017-06-19 Sergio Durigan Junior <sergiodj@redhat.com>
9167
9168 * mi/mi-cm-env.c (_initialize_mi_cmd_env): Use getenv instead of
9169 gdb_environ to access an environment variable.
9170
9171 2017-06-18 Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
9172
9173 * nat/linux-ptrace.c (linux_fork_to_function): Add cast to
9174 gdb_byte*.
9175
9176 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
9177
9178 * nat/fork-inferior.h (trace_start_error): Add ATTRIBUTE_PRINTF.
9179
9180 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
9181
9182 * configure: Re-generate.
9183 * warning.m4 (build_warnings): Add -Wno-mismatched-tags.
9184
9185 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
9186
9187 * configure: Re-generate.
9188 * warning.m4: Pass -Werror to compiler when checking for
9189 supported warning flags.
9190
9191 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
9192
9193 * Makefile.in (COMPILE.pre): Add "-x c++".
9194
9195 2017-06-16 Alan Hayward <alan.hayward@arm.com>
9196 Pedro Alves <palves@redhat.com>
9197 Yao Qi <yao.qi@linaro.org>
9198
9199 * defs.h (RequireLongest): New.
9200 (extract_integer): Declare function template.
9201 (extract_signed_integer): Remove the declaration, but define it
9202 static inline.
9203 (extract_unsigned_integer): Likewise.
9204 (store_integer): Declare function template.
9205 (store_signed_integer): Remove the declaration, but define it
9206 static inline.
9207 (store_unsigned_integer): Likewise.
9208 * findvar.c (extract_integer): New function template.
9209 (extract_signed_integer): Remove.
9210 (extract_unsigned_integer): Remove.
9211 (extract_integer<LONGEST>, extract_integer<ULONGEST>): Explicit
9212 instantiations.
9213 (store_integer): New function template.
9214 (store_signed_integer): Remove.
9215 (store_unsigned_integer): Remove.
9216 (store_integer): Explicit instantiations.
9217 * regcache.c (regcache_raw_read_signed): Update.
9218 (regcache::raw_read): New function.
9219 (regcache::raw_read_signed): Remove.
9220 (regcache::raw_read_unsigned): Remove.
9221 (regcache_raw_read_unsigned): Update.
9222 (regcache_raw_write_unsigned): Update.
9223 (regcache::raw_write_signed): Remove.
9224 (regcache::raw_write): New function.
9225 (regcache_cooked_read_signed): Update.
9226 (regcache::raw_write_unsigned): Remove.
9227 (regcache::cooked_read_signed): Remove.
9228 (regcache_cooked_read_unsigned): Update.
9229 (regcache::cooked_read_unsigned): Remove.
9230 (regcache_cooked_write_signed): Update.
9231 (regcache_cooked_write_unsigned): Update.
9232 * regcache.h (regcache) <raw_read_signed>: Remove.
9233 <raw_write_signed, raw_read_unsigned, raw_write_unsigned>: Remove.
9234 <raw_read, raw_write>: New.
9235 <cooked_read_signed, cooked_write_signed>: Remove.
9236 <cooked_write_unsigned, cooked_read_unsigned>: Remove.
9237 <cooked_read, cooked_write>: New.
9238 * sh64-tdep.c (sh64_pseudo_register_read): Update.
9239 (sh64_pseudo_register_write): Update.
9240
9241 2017-06-16 Anton Kolesov <anton.kolesov@synopsys.com>
9242
9243 * arc-tdep.c (arc_disassembler_options): New variable.
9244 (arc_gdbarch_init): Set and use it. Use arc_delayed_print_insn instead
9245 of default_print_insn.
9246 (arc_delayed_print_insn): Set info->section when needed,
9247 use default_print_insn to retrieve a disassembler.
9248
9249 2017-06-14 Sergio Durigan Junior <sergiodj@redhat.com>
9250
9251 PR gdb/21574
9252 * infcmd.c (_initialize_infcmd): Expand "help run" documentation
9253 to mention $SHELL and startup-with-shell.
9254
9255 2017-06-14 Max Filippov <jcmvbkbc@gmail.com>
9256
9257 * MAINTAINERS: Move Maxim Grigoriev to the Past Maintainers.
9258
9259 2017-06-14 Yao Qi <yao.qi@linaro.org>
9260
9261 * aarch64-tdep.c (aarch64_gdb_print_insn): Call
9262 default_print_insn instead of print_insn_aarch64.
9263 * arm-tdep.c (gdb_print_insn_arm): Call
9264 default_print_insn instead of print_insn_big_arm
9265 and print_insn_little_arm.
9266 * i386-tdep.c (i386_print_insn): Call default_print_insn
9267 instead of print_insn_i386.
9268 * ia64-tdep.c (ia64_print_insn): Call
9269 default_print_insn instead of print_insn_ia64.
9270 * mips-tdep.c (gdb_print_insn_mips): Call
9271 default_print_insn instead of print_insn_big_mips
9272 and print_insn_little_mips.
9273 * spu-tdep.c (gdb_print_insn_spu): Call default_print_insn
9274 instead of print_insn_spu.
9275
9276 2017-06-14 Pedro Alves <palves@redhat.com>
9277
9278 * ada-lang.c: Include "common/byte-vector.h".
9279 (ada_value_primitive_packed_val): Use gdb::byte_vector.
9280 * charset.c (wchar_iterator::iterate): Resize the vector instead
9281 of reserving it.
9282 * common/byte-vector.h: Include "common/def-vector.h".
9283 (wchar_iterator::m_out): Now a gdb::def_vector<gdb_wchar_t>.
9284 * cli/cli-dump.c: Include "common/byte-vector.h".
9285 (dump_memory_to_file, restore_binary_file): Use gdb::byte_vector.
9286 * common/byte-vector.h: New file.
9287 * common/def-vector.h: New file.
9288 * common/default-init-alloc.h: New file.
9289 * dwarf2loc.c: Include "common/byte-vector.h".
9290 (rw_pieced_value): Use gdb::byte_vector, and resize the vector
9291 instead of reserving it.
9292 * dwarf2read.c: Include "common/byte-vector.h".
9293 (data_buf::m_vec): Now a gdb::byte_vector.
9294 * gdb_regex.c: Include "common/def-vector.h".
9295 (compiled_regex::compiled_regex): Use gdb::def_vector<char>.
9296 * mi/mi-main.c: Include "common/byte-vector.h".
9297 (mi_cmd_data_read_memory): Use gdb::byte_vector.
9298 * printcmd.c: Include "common/byte-vector.h".
9299 (print_scalar_formatted): Use gdb::byte_vector.
9300 * valprint.c: Include "common/byte-vector.h".
9301 (maybe_negate_by_bytes, print_decimal_chars): Use
9302 gdb::byte_vector.
9303
9304 2017-06-13 Simon Marchi <simon.marchi@ericsson.com>
9305
9306 * darwin-nat.c: Include "nat/fork-inferior.h".
9307
9308 2017-06-13 Simon Marchi <simon.marchi@ericsson.com>
9309
9310 * configure.nat: Factor out Darwin bits that are not
9311 architecture-specific. Add fork-inferior.o.
9312
9313 2017-06-13 Simon Marchi <simon.marchi@ericsson.com>
9314
9315 * configure.nat: Factor out AIX bits that are not
9316 architecture-specific. Add fork-inferior.o.
9317
9318 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
9319
9320 * dwarf2loc.c (rw_pieced_value): New. Merge logic from...
9321 (read_pieced_value, write_pieced_value): ...here. Reduce to
9322 wrappers that just call rw_pieced_value.
9323
9324 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
9325
9326 * dwarf2loc.c (write_pieced_value): When writing the data for a
9327 memory piece, use write_memory_with_notification instead of
9328 write_memory.
9329
9330 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
9331
9332 * valops.c (read_value_memory): Change embedded_offset to
9333 represent a bit offset instead of a byte offset.
9334 * value.h (read_value_memory): Adjust comment.
9335
9336 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
9337
9338 * dwarf2loc.c (read_pieced_value): Remove unnecessary variables
9339 dest_offset_bits and source_offset_bits.
9340 (write_pieced_value): Likewise.
9341
9342 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
9343
9344 * dwarf2loc.c (read_pieced_value): Respect the piece offset, as
9345 given by DW_OP_bit_piece.
9346 (write_pieced_value): Likewise.
9347
9348 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
9349
9350 * dwarf2loc.c (read_pieced_value): Move the buffer allocation and
9351 some other preparations to the places where sufficient information
9352 is available.
9353 (write_pieced_value): Likewise.
9354
9355 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
9356
9357 * dwarf2loc.c (bits_to_bytes): New function.
9358 (read_pieced_value): Fix offset calculations for register pieces
9359 on big-endian targets.
9360 (write_pieced_value): Likewise.
9361
9362 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
9363
9364 * dwarf2loc.c (read_pieced_value): Remove buffer_size variable.
9365 (write_pieced_value): Likewise.
9366
9367 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
9368
9369 * dwarf2loc.c (write_pieced_value): When writing to a bit-field,
9370 transfer the source value's least significant bits, instead of its
9371 lowest-addressed ones. Rename type_len to max_offset.
9372 (read_pieced_value): Mirror above changes to write_pieced_value as
9373 applicable.
9374
9375 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
9376
9377 * dwarf2loc.c (write_pieced_value): In DWARF_VALUE_MEMORY,
9378 truncate full bytes from dest_offset_bits before using it as an
9379 offset into the buffer.
9380
9381 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
9382
9383 * dwarf2loc.c (write_pieced_value): Include transfer size in
9384 byte-wise check.
9385
9386 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
9387
9388 * dwarf2loc.c (write_pieced_value): Fix copy/paste error in the
9389 calculation of this_size.
9390
9391 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
9392
9393 * dwarf2loc.c (read_pieced_value): Respect parent value's offset
9394 when targeting a bit-field.
9395 (write_pieced_value): Likewise.
9396
9397 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
9398
9399 * dwarf2loc.c (struct piece_closure) <addr_size>: Remove field.
9400 (allocate_piece_closure): Drop addr_size parameter.
9401 (dwarf2_evaluate_loc_desc_full): Adjust call to
9402 allocate_piece_closure.
9403
9404 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
9405
9406 PR gdb/21226
9407 * dwarf2loc.c (read_pieced_value): Anchor stack value pieces at
9408 the LSB end, independent of endianness.
9409
9410 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
9411
9412 * dwarf2loc.c (write_pieced_value): Fix order of calculations for
9413 size capping.
9414
9415 2017-06-13 Yao Qi <yao.qi@linaro.org>
9416
9417 * mips-linux-nat.c: Move include features/mips*-linux.c to
9418 mips-linux-tdep.c.
9419 (_initialize_mips_linux_nat): Move initialize_tdesc_mips* calls
9420 to mips-linux-tdep.c.
9421 * mips-linux-tdep.c: Include features/mips*-linux.c
9422 (_initialize_mips_linux_tdep): Call initialize_tdesc_mips*
9423 functions.
9424 * mips-linux-tdep.h (tdesc_mips_linux): Declare.
9425 (tdesc_mips_dsp_linux, tdesc_mips64_linux): Declare.
9426 (tdesc_mips64_dsp_linux): Declare.
9427
9428 2017-06-12 Tom Tromey <tom@tromey.com>
9429
9430 * valprint.h (val_print_type_code_int): Remove.
9431 * valprint.c (generic_val_print_int): Always call
9432 val_print_scalar_formatted.
9433 (val_print_type_code_int): Remove.
9434 * printcmd.c (print_scalar_formatted): Handle options->format==0.
9435 * f-valprint.c (f_val_print): Use val_print_scalar_formatted.
9436 * c-valprint.c (c_val_print_int): Use val_print_scalar_formatted.
9437 * ada-valprint.c (ada_val_print_num): Use
9438 val_print_scalar_formatted.
9439
9440 2017-06-12 Tom Tromey <tom@tromey.com>
9441
9442 * printcmd.c (print_scalar_formatted): Unify the two switches.
9443 Don't convert scalars to LONGEST.
9444
9445 2017-06-12 Tom Tromey <tom@tromey.com>
9446
9447 PR exp/16225:
9448 * valprint.h (print_decimal_chars): Update.
9449 * valprint.c (maybe_negate_by_bytes): New function.
9450 (print_decimal_chars): Add "is_signed" argument.
9451 * printcmd.c (print_scalar_formatted): Update.
9452
9453 2017-06-12 Tom Tromey <tom@tromey.com>
9454
9455 PR exp/16225:
9456 * valprint.h (print_binary_chars, print_hex_chars): Update.
9457 * valprint.c (val_print_type_code_int): Update.
9458 (print_binary_chars): Add "zero_pad" argument.
9459 (emit_octal_digit): New function.
9460 (print_octal_chars): Don't zero-pad.
9461 (print_decimal_chars): Likewise.
9462 (print_hex_chars): Add "zero_pad" argument.
9463 * sh64-tdep.c (sh64_do_fp_register): Update.
9464 * regcache.c (regcache::dump): Update.
9465 * printcmd.c (print_scalar_formatted): Update.
9466 * infcmd.c (default_print_one_register_info): Update.
9467
9468 2017-06-12 Pedro Alves <palves@redhat.com>
9469 Alan Hayward <alan.hayward@arm.com>
9470
9471 * mips-tdep.c (MAX_MIPS_ABI_REGSIZE): New.
9472 (mips_eabi_push_dummy_call): Rename local 'regsize' to
9473 'abi_regsize'. Rename local array 'valbuf' to 'ref_valbuf', and
9474 use MAX_MIPS_ABI_REGSIZE instead of MAX_REGISTER_SIZE to size it.
9475 Assert that abi_regsize bytes fit in 'ref_valbuf'.
9476
9477 2017-06-12 Pedro Alves <palves@redhat.com>
9478
9479 * dwarf2read.c (mapped_symtab::data): Now a vector of
9480 symtab_index_entry instead of vector of
9481 std::unique_ptr<symtab_index_entry>. All users adjusted to check
9482 whether an element's name is NULL instead of checking whether the
9483 element itself is NULL.
9484 (find_slot): Change return type. Adjust.
9485 (hash_expand, , add_index_entry, uniquify_cu_indices)
9486 (write_hash_table): Adjust.
9487
9488 2017-06-12 Pedro Alves <palves@redhat.com>
9489
9490 * dwarf2read.c (recursively_count_psymbols): New function.
9491 (write_psymtabs_to_index): Call it to compute number of psyms and
9492 pass estimate size of psyms_seen to unordered_set's ctor.
9493
9494 2017-06-12 Pedro Alves <palves@redhat.com>
9495
9496 * dwarf2read.c (write_hash_table): Check if key already exists
9497 before emplacing.
9498
9499 2017-06-12 Pedro Alves <palves@redhat.com>
9500
9501 * dwarf2read.c (data_buf::append_space): Rename to...
9502 (data_buf::grow): ... this, and make private. Adjust all callers.
9503 (data_buf::append_uint): New method.
9504 (add_address_entry, write_one_signatured_type)
9505 (write_psymtabs_to_index): Use it.
9506
9507 2017-06-12 Pedro Alves <palves@redhat.com>
9508
9509 * dwarf2read.c (file_write(FILE *, const void *, size_t)): Delete.
9510 (file_write (FILE *, const std::vector<Elem>&)): Delete.
9511 (data_buf::file_write): Call ::fwrite directly.
9512
9513 2017-06-12 Pedro Alves <palves@redhat.com>
9514
9515 * dwarf2read.c (uniquify_cu_indices): Use std::unique and
9516 std::vector::erase.
9517
9518 2017-06-12 Jan Kratochvil <jan.kratochvil@redhat.com>
9519
9520 Code cleanup: C++ify .gdb_index producer.
9521 * dwarf2read.c: Include <unordered_set> and <unordered_map>.
9522 (MAYBE_SWAP) [WORDS_BIGENDIAN]: Cast to offset_type.
9523 (struct strtab_entry, hash_strtab_entry, eq_strtab_entry)
9524 (create_strtab, add_string): Remove.
9525 (file_write, data_buf): New.
9526 (struct symtab_index_entry): Use std::vector for cu_indices.
9527 (struct mapped_symtab): Use std::vector for data.
9528 (hash_symtab_entry, eq_symtab_entry, delete_symtab_entry)
9529 (create_symbol_hash_table, create_mapped_symtab, cleanup_mapped_symtab):
9530 Remove.
9531 (find_slot): Change return type. Update it to the new data structures.
9532 (hash_expand, add_index_entry): Update it to the new data structures.
9533 (offset_type_compare): Remove.
9534 (uniquify_cu_indices): Update it to the new data structures.
9535 (c_str_view, c_str_view_hasher, vector_hasher): New.
9536 (add_indices_to_cpool): Remove.
9537 (write_hash_table): Update it to the new data structures.
9538 (struct psymtab_cu_index_map, hash_psymtab_cu_index)
9539 (eq_psymtab_cu_index): Remove.
9540 (psym_index_map): New typedef.
9541 (struct addrmap_index_data): Change addr_obstack pointer to data_buf
9542 reference and std::unordered_map for cu_index_htab.
9543 (add_address_entry, add_address_entry_worker, write_address_map)
9544 (write_psymbols): Update it to the new data structures.
9545 (write_obstack): Remove.
9546 (struct signatured_type_index_data): Change types_list to a data_buf
9547 reference and psyms_seen to a std::unordered_set reference.
9548 (write_one_signatured_type, recursively_write_psymbols)
9549 (write_psymtabs_to_index): Update it to the new data structures.
9550
9551 2017-06-11 Simon Marchi <simon.marchi@ericsson.com>
9552
9553 * NEWS (Changes since GDB 8.0): Announce {set,show} debug
9554 separate-debug-file commands.
9555 * symfile.h (separate_debug_file_debug): New global.
9556 * symfile.c (separate_debug_file_debug): New global.
9557 (separate_debug_file_exists, find_separate_debug_file): Add
9558 debug output.
9559 (_initialize_symfile): Add "set debug separate-debug-file"
9560 command.
9561 * build-id.c (build_id_to_debug_bfd,
9562 find_separate_debug_file_by_buildid): Add debug output.
9563
9564 2017-06-10 Simon Marchi <simon.marchi@polymtl.ca>
9565
9566 * gdbarch.sh (displaced_step_free_closure): Remove.
9567 * gdbarch.h, gdbarch.c: Re-generate.
9568 * aarch64-linux-tdep.c (aarch64_linux_init_abi): Don't set
9569 displaced_step_free_closure.
9570 * amd64-linux-tdep.c (amd64_linux_init_abi_common): Likewise.
9571 * arm-linux-tdep.c (arm_linux_init_abi): Likewise.
9572 * i386-linux-tdep.c (i386_linux_init_abi): Likewise.
9573 * rs6000-aix-tdep.c (rs6000_aix_init_osabi): Likewise.
9574 * rs6000-tdep.c (rs6000_gdbarch_init): Likewise.
9575 * s390-linux-tdep.c (s390_gdbarch_init): Likewise.
9576 * arch-utils.h (simple_displaced_step_free_closure): Remove.
9577 * arch-utils.c (simple_displaced_step_free_closure): Remove.
9578 * infrun.c (displaced_step_clear): Call xfree instead of
9579 gdbarch_displaced_step_free_closure.
9580
9581 2017-06-08 Sergio Durigan Junior <sergiodj@redhat.com>
9582
9583 * common/common-utils.c (stringify_argv): Check for "arg[0] !=
9584 NULL".
9585
9586 2017-06-08 Alan Hayward <alan.hayward@arm.com>
9587
9588 * mn10300-tdep.c (MN10300_MAX_REGISTER_SIZE): Add.
9589 (mn10300_extract_return_value): Use MN10300_MAX_REGISTER_SIZE.
9590 (mn10300_push_dummy_call): Likewise.
9591
9592 2017-06-08 Alan Hayward <alan.hayward@arm.com>
9593
9594 * mi/mi-main.c (register_changed_p): Use value_contents_eq.
9595
9596 2017-06-08 Alan Hayward <alan.hayward@arm.com>
9597
9598 * mi/mi-main.c (register_changed_p): Use cooked_read_value.
9599
9600 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
9601
9602 * NEWS (Changes since GDB 8.0): Announce that GDBserver is now
9603 able to start inferiors using a shell.
9604 (New remote packets): Announce new packet "QStartupWithShell".
9605 * remote.c: Add PACKET_QStartupWithShell.
9606 (extended_remote_create_inferior): Handle new
9607 PACKET_QStartupWithShell.
9608 (remote_protocol_features) <QStartupWithShell>: New entry for
9609 PACKET_QStartupWithShell.
9610 (_initialize_remote): Call "add_packet_config_cmd" for
9611 QStartupShell.
9612
9613 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
9614 Pedro Alves <palves@redhat.com>
9615
9616 * Makefile.in (HFILES_NO_SRCDIR): Add "common/common-inferior.h"
9617 and "nat/fork-inferior.h".
9618 * common/common-inferior.h: New file, with contents from
9619 "gdb/inferior.h".
9620 * commom/common-utils.c: Include "common-utils.h".
9621 (stringify_argv): New function.
9622 * common/common-utils.h (stringify_argv): New prototype.
9623 * configure.nat: Add "fork-inferior.o" as a dependency for
9624 "*linux*", "fbsd*" and "nbsd*" hosts.
9625 * corefile.c (get_exec_file): Update comment.
9626 * darwin-nat.c (darwin_ptrace_him): Call "gdb_startup_inferior"
9627 instead of "startup_inferior".
9628 (darwin_create_inferior): Call "add_thread_silent" after
9629 "fork_inferior".
9630 * fork-child.c: Cleanup unnecessary includes.
9631 (SHELL_FILE): Move to "common/common-fork-child.c".
9632 (environ): Likewise.
9633 (exec_wrapper): Initialize.
9634 (get_exec_wrapper): New function.
9635 (breakup_args): Move to "common/common-fork-child.c"; rename to
9636 "breakup_args_for_exec".
9637 (escape_bang_in_quoted_argument): Move to
9638 "common/common-fork-child.c".
9639 (saved_ui): New variable.
9640 (prefork_hook): New function.
9641 (postfork_hook): Likewise.
9642 (postfork_child_hook): Likewise.
9643 (gdb_startup_inferior): Likewise.
9644 (fork_inferior): Move to "common/common-fork-child.c". Update
9645 function to support gdbserver.
9646 (startup_inferior): Likewise.
9647 * gdbcore.h (get_exec_file): Remove declaration.
9648 * gnu-nat.c (gnu_create_inferior): Call "gdb_startup_inferior"
9649 instead of "startup_inferior". Call "add_thread_silent" after
9650 "fork_inferior".
9651 * inf-ptrace.c: Include "nat/fork-inferior.h" and "utils.h".
9652 (inf_ptrace_create_inferior): Call "gdb_startup_inferior"
9653 instead of "startup_inferior". Call "add_thread_silent" after
9654 "fork_inferior".
9655 * inferior.h: Include "common-inferior.h".
9656 (trace_start_error): Move to "common/common-utils.h".
9657 (trace_start_error_with_name): Likewise.
9658 (fork_inferior): Move prototype to "nat/fork-inferior.h".
9659 (startup_inferior): Likewise.
9660 (gdb_startup_inferior): New prototype.
9661 * nat/fork-inferior.c: New file, with contents from "fork-child.c".
9662 * nat/fork-inferior.h: New file.
9663 * procfs.c (procfs_init_inferior): Call "gdb_startup_inferior"
9664 instead of "startup_inferior". Call "add_thread_silent" after
9665 "fork_inferior".
9666 * target.h (target_terminal_init): Move prototype to
9667 "target/target.h".
9668 (target_terminal_inferior): Likewise.
9669 (target_terminal_ours): Likewise.
9670 * target/target.h (target_terminal_init): New prototype, moved
9671 from "target.h".
9672 (target_terminal_inferior): Likewise.
9673 (target_terminal_ours): Likewise.
9674 * utils.c (gdb_flush_out_err): New function.
9675
9676 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
9677
9678 * Makefile.in (HFILES_NO_SRCDIR): Add "common/common-gdbthread.h".
9679 * common/common-gdbthread.h: New file, with parts from
9680 "gdb/gdbthread.h".
9681 * gdbthread.h: Include "common-gdbthread.h".
9682 (switch_to_thread): Moved to "common/common-gdbthread.h".
9683
9684 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
9685
9686 * Makefile.in (SFILES): Add "common/job-control.c".
9687 (HFILES_NO_SRCDIR): Add "common/job-control.h".
9688 (COMMON_OBS): Add "job-control.o".
9689 * common/job-control.c: New file, with contents from
9690 "gdb/inflow.c".
9691 * common/job-control.h: New file, with contents from "terminal.h".
9692 * fork-child.c: Include "job-control.h".
9693 * inflow.c: Include "job-control.h".
9694 (gdb_setpgid): Move to "common/common-inflow.c".
9695 (_initialize_inflow): Move setting of "job_control" to
9696 "handle_job_control".
9697 * terminal.h (job_control): Moved to "common/common-terminal.h".
9698 (gdb_setpgid): Likewise.
9699 * top.c: Include "job_control.h".
9700 * utils.c: Likewise.
9701 (job_control): Moved to "job-control.c".
9702
9703 2017-06-07 Pedro Alves <palves@redhat.com>
9704
9705 * Makefile.in (SFILES): Add gdb_regex.c.
9706 (COMMON_OBS): Add gdb_regex.o.
9707 * ada-lang.c (ada_add_standard_exceptions)
9708 (ada_add_exceptions_from_frame, name_matches_regex)
9709 (ada_add_global_exceptions, ada_exceptions_list_1): Change regex
9710 parameter type to compiled_regex. Adjust.
9711 (ada_exceptions_list): Use compiled_regex.
9712 * break-catch-throw.c (exception_catchpoint::pattern): Now a
9713 std::unique_ptr<compiled_regex>.
9714 (exception_catchpoint::~exception_catchpoint): Remove regfree
9715 call.
9716 (check_status_exception_catchpoint): Adjust to use compiled_regex.
9717 (handle_gnu_v3_exceptions): Adjust to use compiled_regex.
9718 * breakpoint.c (solib_catchpoint::compiled): Now a
9719 std::unique_ptr<compiled_regex>.
9720 (solib_catchpoint::~solib_catchpoint): Remove regfree call.
9721 (check_status_catch_solib): Adjust to use compiled_regex.
9722 (add_solib_catchpoint): Adjust to use compiled_regex.
9723 * cli/cli-cmds.c (apropos_command): Use compiled_regex.
9724 * cli/cli-decode.c (apropos_cmd): Change regex parameter to
9725 compiled_regex reference. Adjust to use it.
9726 * cli/cli-decode.h: Remove struct re_pattern_buffer forward
9727 declaration. Include "gdb_regex.h".
9728 (apropos_cmd): Change regex parameter to compiled_regex reference.
9729 * gdb_regex.c: New file.
9730 * gdb_regex.h (make_regfree_cleanup, get_regcomp_error): Delete
9731 declarations.
9732 (class compiled_regex): New.
9733 * linux-tdep.c: Include "common/gdb_optional.h".
9734 (struct mapping_regexes): New, factored out from
9735 mapping_is_anonymous_p, and adjusted to use compiled_regex.
9736 (mapping_is_anonymous_p): Use mapping_regexes wrapped in a
9737 gdb::optional and remove cleanups. Adjust to compiled_regex.
9738 * probe.c: Include "common/gdb_optional.h".
9739 (collect_probes): Use compiled_regex and gdb::optional and remove
9740 cleanups.
9741 * skip.c: Include "common/gdb_optional.h".
9742 (skiplist_entry::compiled_function_regexp): Now a
9743 gdb::optional<compiled_regex>.
9744 (skiplist_entry::compiled_function_regexp_is_valid): Delete field.
9745 (free_skiplist_entry): Remove regfree call.
9746 (compile_skip_regexp, skip_rfunction_p): Adjust to use
9747 compiled_regex and gdb::optional.
9748 * symtab.c: Include "common/gdb_optional.h".
9749 (search_symbols): Use compiled_regex and gdb::optional.
9750 * utils.c (do_regfree_cleanup, make_regfree_cleanup)
9751 (get_regcomp_error, compile_rx_or_error): Delete. Some bits moved
9752 to gdb_regex.c.
9753
9754 2017-06-07 Alan Hayward <alan.hayward@arm.com>
9755
9756 * regcache.c (regcache::save): Avoid buffer use.
9757 (regcache::dump): Likewise.
9758
9759 2017-06-07 Alan Hayward <alan.hayward@arm.com>
9760
9761 * sh-tdep.c (sh_pseudo_register_read): Remove
9762 MAX_REGISTER_SIZE.
9763 (sh_pseudo_register_write): Likewise.
9764 * sh64-tdep.c (sh64_pseudo_register_read): Likewise.
9765 (sh64_pseudo_register_write): Likewise
9766
9767 2017-06-07 Alan Hayward <alan.hayward@arm.com>
9768
9769 * aarch64-tdep.c (aarch64_store_return_value): Use
9770 V_REGISTER_SIZE.
9771 (aarch64_pseudo_read_value): Likewise.
9772 (aarch64_pseudo_write): Likewise.
9773
9774 2017-06-06 Yao Qi <yao.qi@linaro.org>
9775
9776 * regformats/regdef.h (set_register_cache): Remove the
9777 declaration.
9778
9779 2017-06-06 Alan Hayward <alan.hayward@arm.com>
9780
9781 * frame.c (frame_unwind_register_signed): Use
9782 frame_unwind_register_value.
9783
9784 2017-06-06 Pedro Alves <palves@redhat.com>
9785
9786 PR breakpoints/21553
9787 * breakpoint.c (create_breakpoints_sal_default)
9788 (init_breakpoint_sal, create_breakpoint_sal): Use
9789 gdb::unique_xmalloc_ptr for string parameters.
9790 (create_breakpoint): Constify 'extra_string' and 'cond_string'
9791 parameters. Replace cleanups with gdb::unique_xmalloc_ptr.
9792 (base_breakpoint_create_breakpoints_sal)
9793 (bkpt_create_breakpoints_sal, tracepoint_create_breakpoints_sal)
9794 (strace_marker_create_breakpoints_sal)
9795 (create_breakpoints_sal_default): Use gdb::unique_xmalloc_ptr for
9796 string parameters.
9797 * breakpoint.h (breakpoint_ops::create_breakpoints_sal): Use
9798 gdb::unique_xmalloc_ptr for string parameters.
9799 (create_breakpoint): Constify 'extra_string' and 'cond_string'
9800 parameters.
9801
9802 2017-06-06 Alan Hayward <alan.hayward@arm.com>
9803
9804 * alpha-tdep.c (alpha_register_to_value): Use
9805 get_frame_register_value.
9806 (alpha_value_to_register): Use ALPHA_REGISTER_SIZE.
9807
9808 2017-06-06 Alan Hayward <alan.hayward@arm.com>
9809
9810 * ia64-tdep.c (IA64_MAX_FP_REGISTER_SIZE) Add.
9811 (ia64_register_to_value): Use IA64_MAX_FP_REGISTER_SIZE.
9812 (ia64_value_to_register): Likewise.
9813 (ia64_extract_return_value): Likewise.
9814 (ia64_store_return_value): Likewise.
9815 (ia64_push_dummy_call): Likewise.
9816
9817 2017-06-04 Joel Brobecker <brobecker@adacore.com>
9818
9819 GDB 8.0 released.
9820
9821 2017-06-03 Simon Marchi <simon.marchi@ericsson.com>
9822
9823 * x86-linux-nat.c (struct arch_lwp_info): Remove.
9824
9825 2017-06-03 Simon Marchi <simon.marchi@polymtl.ca>
9826
9827 * linux-nat.c (linux_nat_post_attach_wait): Remove FIRST
9828 parameter.
9829 (linux_nat_attach): Adjust call to linux_nat_post_attach_wait.
9830
9831 2017-06-02 Simon Marchi <simon.marchi@ericsson.com>
9832
9833 * event-loop.c (poll_timers): Unallocate timer using delete
9834 instead of xfree.
9835
9836 2017-06-02 Simon Marchi <simon.marchi@polymtl.ca>
9837
9838 * breakpoint.h (struct breakpoint_ops) <dtor>: Remove.
9839 (struct breakpoint) <~breakpoint>: New.
9840 (struct watchpoint): Inherit from breakpoint.
9841 <~watchpoint>: New.
9842 <base>: Remove.
9843 (struct tracepoint): Inherit from breakpoint.
9844 <base>: Remove.
9845 * breakpoint.c (longjmp_breakpoint_ops): Remove.
9846 (struct longjmp_breakpoint): Inherit from breakpoint.
9847 <~longjmp_breakpoint>: New.
9848 <base>: Remove.
9849 (new_breakpoint_from_type): Remove casts.
9850 (watchpoint_in_thread_scope): Remove reference to base field.
9851 (watchpoint_del_at_next_stop): Likewise.
9852 (update_watchpoint): Likewise.
9853 (watchpoint_check): Likewise.
9854 (bpstat_check_watchpoint): Likewise.
9855 (set_longjmp_breakpoint): Likewise.
9856 (struct fork_catchpoint): Inherit from breakpoint.
9857 <base>: Remove.
9858 (struct solib_catchpoint): Inherit from breakpoint.
9859 <~solib_catchpoint>: New.
9860 <base>: Remove.
9861 (dtor_catch_solib): Change to ...
9862 (solib_catchpoint::~solib_catchpoint): ... this.
9863 (breakpoint_hit_catch_solib): Remove reference to base field.
9864 (add_solib_catchpoint): Likewise.
9865 (create_fork_vfork_event_catchpoint): Likewise.
9866 (struct exec_catchpoint): Inherit from breakpoint.
9867 <~exec_catchpoint>: New.
9868 <base>: Remove.
9869 (dtor_catch_exec): Change to ...
9870 (exec_catchpoint::~exec_catchpoint): ... this.
9871 (dtor_watchpoint): Change to ...
9872 (watchpoint::~watchpoint): ... this.
9873 (watch_command_1): Remove reference to base field.
9874 (catch_exec_command_1): Likewise.
9875 (base_breakpoint_dtor): Change to ...
9876 (breakpoint::~breakpoint): ... this.
9877 (base_breakpoint_ops): Remove dtor field value.
9878 (longjmp_bkpt_dtor): Change to ...
9879 (longjmp_breakpoint::~longjmp_breakpoint): ... this.
9880 (strace_marker_create_breakpoints_sal): Remove reference to base
9881 field.
9882 (delete_breakpoint): Don't manually call breakpoint destructor.
9883 (create_tracepoint_from_upload): Remove reference to base field.
9884 (trace_pass_set_count): Likewise.
9885 (initialize_breakpoint_ops): Don't initialize
9886 momentary_breakpoint_ops, don't set dtors.
9887 * ada-lang.c (struct ada_catchpoint): Inherit from breakpoint.
9888 <~ada_catchpoint>: New.
9889 <base>: Remove.
9890 (create_excep_cond_exprs): Remove reference to base field.
9891 (dtor_exception): Change to ...
9892 (ada_catchpoint::~ada_catchpoint): ... this.
9893 (dtor_catch_exception): Remove.
9894 (dtor_catch_exception_unhandled): Remove.
9895 (dtor_catch_assert): Remove.
9896 (create_ada_exception_catchpoint): Remove reference to base
9897 field.
9898 (initialize_ada_catchpoint_ops): Don't set dtors.
9899 * break-catch-sig.c (struct signal_catchpoint): Inherit from
9900 breakpoint.
9901 <~signal_catchpoint>: New.
9902 <base>: Remove.
9903 (signal_catchpoint_dtor): Change to ...
9904 (signal_catchpoint::~signal_catchpoint): ... this.
9905 (create_signal_catchpoint): Remove reference to base field.
9906 (initialize_signal_catchpoint_ops): Don't set dtor.
9907 * break-catch-syscall.c (struct syscall_catchpoint): Inherit
9908 from breakpoint.
9909 <~syscall_catchpoint>: New.
9910 <base>: Remove.
9911 (dtor_catch_syscall): Change to ...
9912 (syscall_catchpoint::~syscall_catchpoint): ... this.
9913 (create_syscall_event_catchpoint): Remove reference to base
9914 field.
9915 (initialize_syscall_catchpoint_ops): Don't set dtor.
9916 * break-catch-throw.c (struct exception_catchpoint): Inherit
9917 from breakpoint.
9918 <~exception_catchpoint>: New.
9919 <base>: Remove.
9920 (dtor_exception_catchpoint): Change to ...
9921 (exception_catchpoint::~exception_catchpoint): ... this.
9922 (handle_gnu_v3_exceptions): Remove reference to base field.
9923 (initialize_throw_catchpoint_ops): Don't set dtor.
9924 * ctf.c (ctf_get_traceframe_address): Remove reference to base
9925 field.
9926 * remote.c (remote_get_tracepoint_status): Likewise.
9927 * tracefile-tfile.c (tfile_get_traceframe_address): Likewise.
9928 * tracefile.c (tracefile_fetch_registers): Likewise.
9929 * tracepoint.c (actions_command): Likewise.
9930 (validate_actionline): Likewise.
9931 (tfind_1): Likewise.
9932 (get_traceframe_location): Likewise.
9933 (find_matching_tracepoint_location): Likewise.
9934 (parse_tracepoint_status): Likewise.
9935 * mi/mi-cmd-break.c (mi_cmd_break_passcount): Likewise.
9936
9937 2017-06-02 Simon Marchi <simon.marchi@polymtl.ca>
9938
9939 * breakpoint.c (struct longjmp_breakpoint): New struct.
9940 (is_tracepoint_type): Change return type to bool.
9941 (is_longjmp_type): New function.
9942 (new_breakpoint_from_type): Handle longjmp kinds of breakpoints.
9943 (set_raw_breakpoint_without_location): Use
9944 new_breakpoint_from_type.
9945 (set_raw_breakpoint): Likewise.
9946
9947 2017-06-02 Simon Marchi <simon.marchi@polymtl.ca>
9948
9949 * breakpoint.c (new_breakpoint_from_type): New function.
9950 (create_breakpoint_sal): Use new_breakpoint_from_type and
9951 unique_ptr.
9952 (create_breakpoint): Likewise.
9953
9954 2017-05-31 Simon Marchi <simon.marchi@ericsson.com>
9955
9956 * memattr.c (mem_info_command): Rename to ...
9957 (info_mem_command): ... this.
9958 (mem_enable_command): Rename to ...
9959 (enable_mem_command): ... this.
9960 (mem_disable_command): Rename to ...
9961 (disable_mem_command): ... this.
9962 (mem_delete_command): Rename to ...
9963 (delete_mem_command): ... this.
9964 (_initialize_mem): Adjust function names.
9965
9966 2017-05-31 Markus Metzger <markus.t.metzger@intel.com>
9967
9968 * btrace.c (handle_pt_insn_events): New.
9969 (ftrace_add_pt): Call handle_pt_insn_events. Rename ERRCODE into
9970 STATUS. Split into this and ...
9971 (handle_pt_insn_event_flags): ... this.
9972
9973 2017-05-31 Markus Metzger <markus.t.metzger@intel.com>
9974
9975 * configure.ac: Check for pt_insn_event, struct pt_insn.enabled,
9976 and struct pt_insn.resynced.
9977 * configure: Regenerated.
9978 * config.in: Regenerated.
9979
9980 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
9981
9982 * btrace.c (ftrace_find_call_by_number): New function.
9983 (ftrace_new_function): Store objects, not pointers.
9984 (ftrace_find_call_by_number, ftrace_new_return, ftrace_new_switch,
9985 ftrace_new_gap, ftrace_update_function,
9986 ftrace_compute_global_level_offset, btrace_stich_bts, btrace_clear,
9987 btrace_insn_get, btrace_insn_get_error, btrace_insn_end,
9988 btrace_insn_next, btrace_insn_prev, ptrace_find_insn_by_number,
9989 btrace_ends_with_single_insn, btrace_call_get): Account for
9990 btrace_thread_info::functions now storing objects.
9991 * btrace.h (struct btrace_thread_info): Add constructor.
9992 (struct btrace_thread_info) <functions>: Make std::vector.
9993 (struct btrace_thread_info) <prev, next, up, insn, errcode, flags):
9994 Initialize with default values.
9995 * record-btrace.c (record_btrace_frame_sniffer): Account for
9996 btrace_thread_info::functions now storing objects.
9997
9998 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
9999
10000 * btrace.c: Remove typedef bfun_s.
10001 (ftrace_new_gap): Directly add gaps to the list of gaps.
10002 (btrace_bridge_gaps, btrace_compute_ftrace_bts, pt_btrace_insn_flags,
10003 ftrace_add_pt, btrace_compute_ftrace_pt, btrace_compute_ftrace_1,
10004 btrace_finalize_ftrace, btrace_compute_ftrace): Use std::vector
10005 instead of gdb VEC.
10006
10007 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
10008
10009 * btrace.c (ftrace_fixup_caller, ftrace_new_return, ftrace_connect_bfun,
10010 ftrace_bridge_gap): Replace references to btrace_thread_info::segment
10011 with btrace_thread_info::next_segment and
10012 btrace_thread_info::prev_segment.
10013 * btrace.h: Remove struct btrace_func_link.
10014 (struct btrace_function): Replace pair of function segment pointers
10015 with pair of indices.
10016 * python/py-record-btrace.c (btpy_call_prev_sibling,
10017 btpy_call_next_sibling): Replace references to
10018 btrace_thread_info::segment with btrace_thread_info::next_segment and
10019 btrace_thread_info::prev_segment.
10020 * record-btrace.c (record_btrace_frame_this_id): Use
10021 btrace_find_call_by_number.
10022
10023 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
10024
10025 * btrace.c (ftrace_new_function, ftrace_fixup_level,
10026 ftrace_connect_bfun, ftrace_bridge_gap, btrace_bridge_gaps,
10027 btrace_insn_next, btrace_insn_prev): Remove references to
10028 btrace_thread_info::flow.
10029 * btrace.h (struct btrace_function): Remove FLOW.
10030
10031 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
10032
10033 * btrace.c (ftrace_find_call_by_number): New function.
10034 (ftrace_update_caller, ftrace_new_call, ftrace_new_tailcall,
10035 ftrace_get_caller, ftrace_find_call, ftrace_new_return,
10036 ftrace_match_backtrace, ftrace_connect_bfun, ftrace_connect_backtrace,
10037 ftrace_bridge_gap, btrace_bridge_gaps): Use btrace_function::up as an
10038 index.
10039 * btrace.h (struct btrace_function): Turn UP into an index.
10040 * python/py-record-btrace.c (btpy_call_up): Use btrace_function::up
10041 as an index.
10042 * record-btrace.c (record_btrace_frame_unwind_stop_reason,
10043 record_btrace_frame_prev_register, record_btrace_frame_sniffer,
10044 record_btrace_tailcall_frame_sniffe): Use btrace_find_call_by_number.
10045
10046 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
10047
10048 * btrace.c (ftrace_new_function, ftrace_new_call, ftrace_new_tailcall,
10049 ftrace_new_return, ftrace_new_switch, ftrace_new_gap,
10050 ftrace_update_function, ftrace_compute_global_level_offset,
10051 btrace_compute_ftrace_bts, ftrace_add_pt, btrace_compute_ftrace_pt,
10052 btrace_stitch_bts, btrace_fetch, btrace_clear, btrace_insn_number,
10053 btrace_insn_end, btrace_is_empty): Remove references to
10054 btrace_thread_info::begin and btrace_thread_info::end.
10055 * btrace.h (struct btrace_thread_info): Remove BEGIN and END.
10056 (struct btrace_thread_info) <functions>: Adjust comment.
10057 * record-btrace.c (record_btrace_start_replaying): Remove reference to
10058 btrace_thread_info::begin.
10059
10060 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
10061
10062 * btrace.c (ftrace_new_function, ftrace_new_call, ftrace_new_tailcall,
10063 ftrace_new_return, ftrace_new_switch, ftrace_new_gap,
10064 ftrace_update_function): Remove arguments that implicitly were always
10065 BTINFO->END.
10066 (btrace_compute_ftrace_bts, ftrace_add_pt, btrace_compute_ftrace_pt):
10067 Don't pass BTINFO->END.
10068
10069 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
10070
10071 * btrace.c: (btrace_insn_get, btrace_insn_get_error, btrace_insn_number,
10072 btrace_insn_begin, btrace_insn_end, btrace_insn_next, btrace_insn_prev,
10073 btrace_find_insn_by_number): Replace function segment pointer with
10074 index.
10075 (btrace_insn_cmp): Simplify.
10076 * btrace.h: (struct btrace_insn_iterator) Rename index to
10077 insn_index. Replace function segment pointer with index into function
10078 segment vector.
10079 * record-btrace.c (record_btrace_call_history): Replace function
10080 segment pointer use with index.
10081 (record_btrace_frame_sniffer): Retrieve function call segment through
10082 vector.
10083 (record_btrace_set_replay): Remove defunc't safety check.
10084
10085 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
10086
10087 * btrace.c (btrace_ends_with_single_insn): New function.
10088 (btrace_call_get, btrace_call_number, btrace_call_begin,
10089 btrace_call_end, btrace_call_next, btrace_call_prev,
10090 btrace_find_call_by_number): Use index into call segment vector
10091 instead of pointer.
10092 (btrace_call_cmp): Simplify.
10093 * btrace.h (struct btrace_call_iterator): Replace function call segment
10094 pointer with index into vector.
10095 * record-btrace.c (record_btrace_call_history): Use index instead of
10096 pointer.
10097
10098 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
10099
10100 * btrace.c (btrace_insn_begin, btrace_insn_end,
10101 btrace_find_insn_by_number): Add btinfo to iterator.
10102 * btrace.h (struct btrace_insn_iterator): Add btinfo.
10103
10104 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
10105
10106 * btrace.c (ftrace_new_function): Add btrace_thread_info to arguments
10107 and save pointers directly.
10108 (ftrace_new_call, ftrace_new_tailcall, ftrace_new_return,
10109 ftrace_new_switch, ftrace_new_gap, ftrace_update_function,
10110 ftrace_add_pt): Add btrace_thread_info to arguments. Adjust for
10111 changed signature of functions.
10112 (btrace_compute_ftrace_pt): Adjust for changed signature of functions.
10113 (btrace_fetch): Remove code that adds btrace_function pointers to
10114 vector of btrace_functions.
10115 (btrace_clear): Simplify freeing vector of btrace_functions.
10116
10117 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
10118
10119 * btrace.c (btrace_fetch, btrace_clear, btrace_find_insn_by_number):
10120 Replace VEC_* with std::vector functions.
10121 * btrace.h: Add include: vector. Remove typedef for DEF_VEC_P.
10122 (struct btrace_thread_info)<functions>: Change type to std::vector.
10123
10124 2017-05-30 Simon Marchi <simon.marchi@ericsson.com>
10125
10126 * NEWS (Changes in GDB 8.0): Remove extra empty line. Move
10127 "Removed targets and native configurations" up. Merge duplicate
10128 "New commands" sub-sections. Add "New options" sub-sections.
10129
10130 2017-05-26 Alan Hayward <alan.hayward@arm.com>
10131
10132 * defs.h (copy_integer_to_size): New declaration.
10133 * findvar.c (copy_integer_to_size): New function.
10134 (do_cint_test): New selftest function.
10135 (copy_integer_to_size_test): Likewise.
10136 (_initialize_findvar): Likewise.
10137 * mips-fbsd-tdep.c (mips_fbsd_supply_reg): Use raw_supply_integer.
10138 (mips_fbsd_collect_reg): Use raw_collect_integer.
10139 * mips-linux-tdep.c (supply_32bit_reg): Use raw_supply_integer.
10140 (mips64_fill_gregset): Use raw_collect_integer
10141 (mips64_fill_fpregset): Use raw_supply_integer.
10142 * regcache.c (regcache::raw_supply_integer): New function.
10143 (regcache::raw_collect_integer): Likewise.
10144 * regcache.h: (regcache::raw_supply_integer): New declaration.
10145 (regcache::raw_collect_integer): Likewise.
10146
10147 2017-05-24 Yao Qi <yao.qi@linaro.org>
10148
10149 * Makefile.in (SFILES): Add gdbarch-selftests.c.
10150 (COMMON_OBS): Add gdbarch-selftests.o.
10151 * frame.c [GDB_SELF_TESTS] (create_new_frame): New function.
10152 * frame.h [GDB_SELF_TESTS] (create_new_frame): Declare.
10153 * gdbarch-selftests.c: New file.
10154 * regcache.h (regcache) <~regcache>: Mark it virtual if
10155 GDB_SELF_TEST.
10156 <raw_write>: Likewise.
10157
10158 2017-05-24 Yao Qi <yao.qi@linaro.org>
10159
10160 * regcache.c (current_regcache): Change it to
10161 regcache::current_regcache.
10162 (regcache_observer_target_changed): Update.
10163 (regcache_thread_ptid_changed): Make it a regcache static
10164 method.
10165 (regcache_thread_ptid_changed): Update.
10166 (class regcache_access): New.
10167 (current_regcache_test): Update.
10168 (_initialize_regcache): Update.
10169 * regcache.h: Include forward_list.
10170 (regcache): Declare regcache_thread_ptid_changed and declare
10171 registers_changed_ptid as friend.
10172
10173 2017-05-24 Yao Qi <yao.qi@linaro.org>
10174
10175 * i387-tdep.c (i387_register_to_value): Use register_size
10176 instead of TYPE_LENGTH.
10177 * m68k-tdep.c (m68k_register_to_value): Likewise.
10178
10179 2017-05-24 Yao Qi <yao.qi@linaro.org>
10180
10181 * i387-tdep.c (i387_convert_register_p): Return false if type
10182 code isn't TYPE_CODE_FLT.
10183
10184 2017-05-24 Yao Qi <yao.qi@linaro.org>
10185
10186 * alpha-tdep.c (alpha_convert_register_p): Return true if type
10187 length is 4.
10188 (alpha_register_to_value): Remove type length check.
10189 (alpha_value_to_register): Likewise.
10190
10191 2017-05-24 Yao Qi <yao.qi@linaro.org>
10192
10193 * ia64-tdep.c (ia64_convert_register_p): Check type's code is
10194 TYPE_CODE_FLT.
10195
10196 2017-05-24 Yao Qi <yao.qi@linaro.org>
10197
10198 * m68k-tdep.c (m68k_convert_register_p): Check type's code is
10199 TYPE_CODE_FLT or not.
10200
10201 2017-05-24 Yao Qi <yao.qi@linaro.org>
10202
10203 * alpha-tdep.c (alpha_gdbarch_init): Use XCNEW instead of XNEW.
10204 * avr-tdep.c (avr_gdbarch_init): Likewise.
10205 * bfin-tdep.c (bfin_gdbarch_init): Likewise.
10206 * cris-tdep.c (cris_gdbarch_init): Likewise.
10207 * ft32-tdep.c (ft32_gdbarch_init): Likewise.
10208 * lm32-tdep.c (lm32_gdbarch_init): Likewise.
10209 * m32r-tdep.c (m32r_gdbarch_init): Likewise.
10210 * m68hc11-tdep.c (m68hc11_gdbarch_init): Likewise.
10211 * mep-tdep.c (mep_gdbarch_init): Likewise.
10212 * microblaze-tdep.c (microblaze_gdbarch_init): Likewise.
10213 * mips-tdep.c (mips_gdbarch_init): Likewise.
10214 * mn10300-tdep.c (mn10300_gdbarch_init): Likewise.
10215 * moxie-tdep.c (moxie_gdbarch_init): Likewise.
10216 * msp430-tdep.c (msp430_gdbarch_init): Likewise.
10217 * sh64-tdep.c (sh64_gdbarch_init): Likewise.
10218 * v850-tdep.c (v850_gdbarch_init): Likewise.
10219
10220 2017-05-24 Yao Qi <yao.qi@linaro.org>
10221
10222 * selftest-arch.c (tests_with_arch): Call registers_changed
10223 and reinit_frame_cache.
10224 * selftest.c (run_self_tests): Likewise.
10225
10226 2017-05-24 Yao Qi <yao.qi@linaro.org>
10227
10228 * rs6000-tdep.c (gdb_print_insn_powerpc): Remove.
10229 (rs6000_gdbarch_init): Don't call set_gdbarch_print_insn.
10230
10231 2017-05-24 Yao Qi <yao.qi@linaro.org>
10232
10233 * rl78-tdep.c (rl78_gdbarch_init): Don't call
10234 set_gdbarch_print_insn.
10235
10236 2017-05-24 Yao Qi <yao.qi@linaro.org>
10237
10238 * h8300-tdep.c (h8300_gdbarch_init): Don't call
10239 set_gdbarch_print_insn.
10240
10241 2017-05-24 Yao Qi <yao.qi@linaro.org>
10242
10243 * alpha-tdep.c (alpha_gdbarch_init): Don't call
10244 set_gdbarch_print_insn.
10245 * arc-tdep.c (arc_gdbarch_init): Likewise.
10246 * arch-utils.c: include dis-asm.h.
10247 (default_print_insn): New function.
10248 * arch-utils.h (default_print_insn): Declare.
10249 * avr-tdep.c (avr_gdbarch_init): Don't call set_gdbarch_print_insn.
10250 * bfin-tdep.c (bfin_gdbarch_init): Likewise.
10251 * cris-tdep.c (cris_delayed_get_disassembler): Remove.
10252 (cris_gdbarch_init): Don't call set_gdbarch_print_insn.
10253 * frv-tdep.c (frv_gdbarch_init): Likewise.
10254 * ft32-tdep.c (ft32_gdbarch_init): Likewise.
10255 * gdbarch.sh (print_insn): Use default_print_insn.
10256 * gdbarch.c: Regenerated.
10257 * hppa-tdep.c (hppa_gdbarch_init): Likewise.
10258 * iq2000-tdep.c (iq2000_gdbarch_init): Likewise.
10259 * lm32-tdep.c (lm32_gdbarch_init): Likewise.
10260 * m32c-tdep.c (m32c_gdbarch_init): Likewise.
10261 * m32r-tdep.c (m32r_gdbarch_init): Likewise.
10262 * m68hc11-tdep.c (gdb_print_insn_m68hc11): Remove.
10263 (m68hc11_gdbarch_init): Don't call set_gdbarch_print_insn.
10264 * m68k-tdep.c (m68k_gdbarch_init): Likewise.
10265 * m88k-tdep.c (m88k_gdbarch_init): Likewise.
10266 * microblaze-tdep.c (microblaze_gdbarch_init): Likewise.
10267 * mn10300-tdep.c (mn10300_gdbarch_init): Likewise.
10268 * moxie-tdep.c (moxie_gdbarch_init): Likewise.
10269 * msp430-tdep.c (msp430_gdbarch_init): Likewise.
10270 * mt-tdep.c (mt_gdbarch_init): Likewise.
10271 * nds32-tdep.c (nds32_gdbarch_init): Likewise.
10272 * nios2-tdep.c (nios2_print_insn): Remove.
10273 (nios2_gdbarch_init): Don't call set_gdbarch_print_insn.
10274 * rx-tdep.c (rx_gdbarch_init): Likewise.
10275 * s390-linux-tdep.c (s390_gdbarch_init): Likewise.
10276 * score-tdep.c (score_print_insn): Remove.
10277 (score_gdbarch_init): Don't call set_gdbarch_print_insn.
10278 * sh-tdep.c (sh_gdbarch_init): Likewise.
10279 * sh64-tdep.c (sh64_gdbarch_init): Likewise.
10280 * sparc-tdep.c (sparc32_gdbarch_init): Likewise.
10281 * tic6x-tdep.c (tic6x_print_insn): Remove.
10282 (tic6x_gdbarch_init): Don't call set_gdbarch_print_insn.
10283 * tilegx-tdep.c (tilegx_gdbarch_init): Likewise.
10284 * v850-tdep.c (v850_gdbarch_init): Likewise.
10285 * vax-tdep.c (vax_gdbarch_init): Likewise.
10286 * xstormy16-tdep.c (xstormy16_gdbarch_init): Likewise.
10287 * xtensa-tdep.c (xtensa_gdbarch_init): Likewise.
10288
10289 2017-05-23 John Baldwin <jhb@FreeBSD.org>
10290
10291 * mips-fbsd-tdep.c (MIPS_PC_REGNUM): Remove.
10292 (MIPS_FP0_REGNUM): Remove.
10293 (MIPS_FSR_REGNUM): Remove.
10294 (mips_fbsd_supply_fpregs): Use mips_regnum.
10295 (mips_fbsd_supply_gregs): Likewise.
10296 (mips_fbsd_collect_fpregs): Likewise.
10297 (mips_fbsd_collect_gregs): Likewise.
10298
10299 2017-05-23 John Baldwin <jhb@FreeBSD.org>
10300
10301 * mips-fbsd-nat.c (getregs_supplies): Fix upper bound comparison.
10302 (getpfpregs_supplies): New function.
10303 (mips_fbsd_fetch_inferior_registers): Remove early exit and use
10304 getfpregs_supplies.
10305 (mips_fbsd_store_inferior_registers): Likewise.
10306
10307 2017-05-22 Pedro Alves <palves@redhat.com>
10308
10309 * MAINTAINERS (Host/Native): Add John Baldwin as FreeBSD
10310 maintainer.
10311
10312 2017-05-22 Alan Hayward <alan.hayward@arm.com>
10313
10314 * ppc-linux-nat.c (fetch_register): Use PPC_MAX_REGISTER_SIZE.
10315 (store_register): Likewise.
10316 * ppc-sysv-tdep.c (ppc_sysv_abi_push_dummy_call): Likewise.
10317 (get_decimal_float_return_value): Likewise.
10318 (do_ppc_sysv_return_value): Likewise.
10319 (ppc64_sysv_abi_push_integer): Likewise.
10320 (ppc64_sysv_abi_push_freg): Likewise.
10321 (ppc64_sysv_abi_return_value_base): Likewise.
10322 (ppc64_sysv_abi_return_value): Likewise.
10323 * rs6000-aix-tdep.c (rs6000_push_dummy_call): Likewise.
10324 * rs6000-lynx178-tdep.c (rs6000_lynx178_push_dummy_call): Likewise.
10325 * rs6000-nat.c: Likewise.
10326 * rs6000-tdep.c (rs6000_register_to_value): Likewise.
10327 (rs6000_value_to_register): Likewise.
10328 * ppc-tdep.h (PPC_MAX_REGISTER_SIZE): Add.
10329
10330 2017-05-21 Tom Tromey <tom@tromey.com>
10331
10332 PR rust/21466:
10333 * rust-lang.c (rust_print_type) <TYPE_CODE_ARRAY>: Print unsized
10334 arrays as "[T]", not "[T; ]".
10335
10336 2017-05-19 Tom Tromey <tom@tromey.com>
10337
10338 PR rust/21484:
10339 * rust-lang.c (exp_descriptor_rust): New function.
10340 (rust_language_defn): Use it.
10341 * p-lang.c (pascal_language_defn): Update.
10342 * opencl-lang.c (opencl_language_defn): Update.
10343 * objc-lang.c (objc_language_defn): Update.
10344 * m2-lang.c (m2_language_defn): Update.
10345 * language.h (struct language_defn)
10346 <la_watch_location_expression>: New member.
10347 * language.c (unknown_language_defn, auto_language_defn)
10348 (local_language_defn): Update.
10349 * go-lang.c (go_language_defn): Update.
10350 * f-lang.c (f_language_defn): Update.
10351 * d-lang.c (d_language_defn): Update.
10352 * c-lang.h (c_watch_location_expression): Declare.
10353 * c-lang.c (c_watch_location_expression): New function.
10354 (c_language_defn, cplus_language_defn, asm_language_defn)
10355 (minimal_language_defn): Use it.
10356 * breakpoint.c (watch_command_1): Call
10357 la_watch_location_expression.
10358 * ada-lang.c (ada_language_defn): Update.
10359
10360 2017-05-19 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
10361
10362 PR tui/21482
10363 * gdb_curses.h (NOMACROS): Define.
10364 (NCURSES_NOMACROS): Define.
10365
10366 2017-05-19 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
10367
10368 PR tui/21482
10369 * tui/tui-windata.c (tui_erase_data_content): Cast last mvwaddstr
10370 arg to char *.
10371 * tui/tui-wingeneral.c (box_win): Likewise.
10372 * tui/tui-winsource.c (tui_erase_source_content): Likewise.
10373 (tui_show_source_line): Likewise.
10374 (tui_show_exec_info_content): Likewise.
10375
10376 2017-05-19 Vladimir Mezentsev <vladimir.mezentsev@oracle.com>
10377
10378 * sparc-tdep.c (sparc_structure_return_p)
10379 (sparc_arg_on_registers_p): New functions.
10380 (sparc32_store_arguments): Use them.
10381 * sparc64-tdep.c (sparc64_16_byte_align_p)
10382 (sparc64_store_floating_fields, sparc64_extract_floating_fields):
10383 Handle TYPE_CODE_ARRAY.
10384
10385 2017-05-17 Yao Qi <yao.qi@linaro.org>
10386
10387 * cli/cli-decode.c (add_alias_cmd): New function.
10388 * command.h (add_alias_cmd): Declare.
10389 * infcmd.c (_initialize_infcmd): Don't call add_com_alias,
10390 instead call add_alias_cmd.
10391
10392 2017-05-17 Pedro Alves <palves@redhat.com>
10393
10394 * Makefile.in (nat_extra_makefile_frag): Rename to ...
10395 (nat_makefile_frag): ... this. All references updated.
10396 * configure.ac: Likewise.
10397 * configure.nat: Likewise. Enhance comments.
10398 * configure: Regenerate.
10399
10400 2017-05-15 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
10401
10402 * procfs.c (procfs_create_inferior): Change prototype to match
10403 definition.
10404
10405 2017-05-13 Eli Zaretskii <eliz@gnu.org>
10406
10407 * tui/tui.c (tui_enable): Cast "unknown" to 'char *' to avoid a
10408 C++ compiler warning.
10409
10410 2017-05-12 Tom Tromey <tom@tromey.com>
10411
10412 PR rust/21483:
10413 * rust-lang.c (rust_evaluate_subexp) <STRUCTOP_STRUCT>: Don't
10414 recurse, just call value_struct_elt directly.
10415
10416 2017-05-12 Tom Tromey <tom@tromey.com>
10417
10418 * rust-lang.c (rust_dump_subexp_body) <STRUCTOP_ANONYMOUS,
10419 OP_RUST_ARRAY>: Fix.
10420
10421 2017-05-12 Tom Tromey <tom@tromey.com>
10422
10423 * rust-lang.c (rust_print_subexp): Replace "return" with "break".
10424
10425 2017-05-09 Yao Qi <yao.qi@linaro.org>
10426
10427 * regcache.c: Include <forward_list>.
10428 (struct regcache_list): Remove.
10429 (current_regcache): Update.
10430 (get_thread_arch_aspace_regcache): Update for std::forward_list.
10431 (regcache_thread_ptid_changed): Likewise.
10432 (registers_changed_ptid): Likewise.
10433 (current_regcache_size): Likewise.
10434
10435 2017-05-09 Yao Qi <yao.qi@linaro.org>
10436
10437 * regcache.c [GDB_SELF_TEST]: Include selftest.h.
10438 (current_regcache_size): New function.
10439 (current_regcache_test): New function.
10440 (_initialize_regcache) [GDB_SELF_TEST]: Register the unit test.
10441
10442 2017-05-08 Alan Hayward <alan.hayward@arm.com>
10443
10444 * mips-tdep.c (mips_o32_return_value): Remove unused buffer.
10445 (print_gp_register_row): Use get_frame_register_value.
10446
10447 2017-05-08 Alan Hayward <alan.hayward@arm.com>
10448
10449 * mips-linux-tdep.c (mips_supply_gregset): Use raw_supply_zeroed.
10450 (mips_supply_fpregset): Likewise.
10451 (mips64_supply_gregset): Likewise.
10452
10453 2017-05-08 Alan Hayward <alan.hayward@arm.com>
10454
10455 * mn10300-linux-tdep.c (am33_supply_gregset_method): Use
10456 regcache->raw_supply_zeroed.
10457
10458 2017-05-06 Sergio Durigan Junior <sergiodj@redhat.com>
10459
10460 * configure.nat: Rearrange 'case' statements to match
10461 host before cpu.
10462
10463 2017-05-06 Sergio Durigan Junior <sergiodj@redhat.com>
10464
10465 * Makefile.in: Remove "@host_makefile_frag@". Add variables
10466 NAT_FILE, NATDEPFILES, NAT_CDEPS, LOADLIBES, MH_CFLAGS, XM_CLIBS,
10467 NAT_GENERATED_FILES, HAVE_NATIVE_GCORE_HOST. Add
10468 "@nat_extra_makefile_frag@".
10469 (Makefile): Remove dependency on "@frags@".
10470 ($(GNULIB_BUILDDIR)/Makefile): Likewise.
10471 (data-directory/Makefile): Likewise.
10472 * config/aarch64/linux.mh: Deleted; moved contents to
10473 "gdb/configure.nat".
10474 * config/alpha/alpha-linux.mh: Likewise.
10475 * config/alpha/nbsd.mh: Likewise.
10476 * config/arm/linux.mh: Likewise.
10477 * config/arm/nbsdelf.mh: Likewise.
10478 * config/i386/cygwin.mh: Likewise.
10479 * config/i386/cygwin64.mh: Likewise.
10480 * config/i386/darwin.mh: Likewise.
10481 * config/i386/fbsd.mh: Likewise.
10482 * config/i386/fbsd64.mh: Likewise.
10483 * config/i386/go32.mh: Likewise.
10484 * config/i386/i386gnu.mh: Likewise.
10485 * config/i386/i386sol2.mh: Likewise.
10486 * config/i386/linux.mh: Likewise.
10487 * config/i386/linux64.mh: Likewise.
10488 * config/i386/mingw.mh: Likewise.
10489 * config/i386/mingw64.mh: Likewise.
10490 * config/i386/nbsd64.mh: Likewise.
10491 * config/i386/nbsdelf.mh: Likewise.
10492 * config/i386/nto.mh: Likewise.
10493 * config/i386/obsd.mh: Likewise.
10494 * config/i386/obsd64.mh: Likewise.
10495 * config/i386/sol2-64.mh: Likewise.
10496 * config/ia64/linux.mh: Likewise.
10497 * config/m32r/linux.mh: Likewise.
10498 * config/m68k/linux.mh: Likewise.
10499 * config/m68k/nbsdelf.mh: Likewise.
10500 * config/m68k/obsd.mh: Likewise.
10501 * config/m88k/obsd.mh: Likewise.
10502 * config/mips/fbsd.mh: Likewise.
10503 * config/mips/linux.mh: Likewise.
10504 * config/mips/nbsd.mh: Likewise.
10505 * config/mips/obsd64.mh: Likewise.
10506 * config/pa/linux.mh: Likewise.
10507 * config/pa/nbsd.mh: Likewise.
10508 * config/pa/obsd.mh: Likewise.
10509 * config/powerpc/aix.mh: Likewise.
10510 * config/powerpc/fbsd.mh: Likewise.
10511 * config/powerpc/linux.mh: Likewise.
10512 * config/powerpc/nbsd.mh: Likewise.
10513 * config/powerpc/obsd.mh: Likewise.
10514 * config/powerpc/ppc64-linux.mh: Likewise.
10515 * config/powerpc/spu-linux.mh: Likewise.
10516 * config/s390/linux.mh: Likewise.
10517 * config/sh/nbsd.mh: Likewise.
10518 * config/sparc/fbsd.mh: Likewise.
10519 * config/sparc/linux.mh: Likewise.
10520 * config/sparc/linux64.mh: Likewise.
10521 * config/sparc/nbsd64.mh: Likewise.
10522 * config/sparc/nbsdelf.mh: Likewise.
10523 * config/sparc/obsd64.mh: Likewise.
10524 * config/sparc/sol2.mh: Likewise.
10525 * config/tilegx/linux.mh: Likewise.
10526 * config/vax/nbsdelf.mh: Likewise.
10527 * config/vax/obsd.mh: Likewise.
10528 * config/xtensa/linux.mh: Likewise.
10529 * config/i386/i386gnu.mn: New file, with excerpts from
10530 "config/i386/i386gnu.mh".
10531 * configure: Regenerate.
10532 * configure.ac: Rewrite code to use "gdb/configure.nat" instead of
10533 *.mh files under "gdb/config".
10534 * configure.nat: New file, with contents from the
10535 "gdb/config/*/*.mh" files.
10536
10537 2017-05-05 Tim Wiederhake <tim.wiederhake@intel.com>
10538
10539 * btrace.c (btrace_clear): Free insn vector.
10540
10541 2017-05-05 Pedro Alves <palves@redhat.com>
10542
10543 * warning.m4 (build_warnings): Add -Wno-error=maybe-uninitialized.
10544 * configure: Regenerate.
10545
10546 2017-05-04 Pedro Alves <palves@redhat.com>
10547
10548 * Makefile.in (SFILES): Add progspace-and-thread.c.
10549 (HFILES_NO_SRCDIR): Add progspace-and-thread.h.
10550 (COMMON_OBS): Add progspace-and-thread.o.
10551 * breakpoint.c: Include "progspace-and-thread.h".
10552 (update_inserted_breakpoint_locations)
10553 (insert_breakpoint_locations, create_longjmp_master_breakpoint):
10554 Use scoped_restore_current_pspace_and_thread.
10555 (create_std_terminate_master_breakpoint): Use
10556 scoped_restore_current_program_space.
10557 (remove_breakpoint): Use scoped_restore_current_pspace_and_thread.
10558 (print_breakpoint_location): Use
10559 scoped_restore_current_program_space.
10560 (bp_loc_is_permanent): Use
10561 scoped_restore_current_pspace_and_thread.
10562 (resolve_sal_pc): Use scoped_restore_current_pspace_and_thread.
10563 (download_tracepoint_locations): Use
10564 scoped_restore_current_pspace_and_thread.
10565 (breakpoint_re_set): Use scoped_restore_current_pspace_and_thread.
10566 * exec.c (exec_close_1): Use scoped_restore_current_program_space.
10567 (enum step_over_calls_kind): Moved from inferior.h.
10568 (class scoped_restore_current_thread): New class.
10569 * gdbthread.h (make_cleanup_restore_current_thread): Delete
10570 declaration.
10571 (scoped_restore_current_thread): New class.
10572 * infcmd.c: Include "common/gdb_optional.h".
10573 (continue_1, proceed_after_attach): Use
10574 scoped_restore_current_thread.
10575 (notice_new_inferior): Use scoped_restore_current_thread.
10576 * inferior.c: Include "progspace-and-thread.h".
10577 (restore_inferior, save_current_inferior): Delete.
10578 (add_inferior_command, clone_inferior_command): Use
10579 scoped_restore_current_pspace_and_thread.
10580 * inferior.h (scoped_restore_current_inferior): New class.
10581 * infrun.c: Include "progspace-and-thread.h" and
10582 "common/gdb_optional.h".
10583 (follow_fork_inferior): Use
10584 scoped_restore_current_pspace_and_thread.
10585 (scoped_restore_exited_inferior): New class.
10586 (handle_vfork_child_exec_or_exit): Use
10587 scoped_restore_exited_inferior,
10588 scoped_restore_current_pspace_and_thread,
10589 scoped_restore_current_thread and scoped_restore.
10590 (fetch_inferior_event): Use scoped_restore_current_thread.
10591 * linespec.c (decode_line_full, decode_line_1): Use
10592 scoped_restore_current_program_space.
10593 * mi/mi-main.c: Include "progspace-and-thread.h".
10594 (exec_continue): Use scoped_restore_current_thread.
10595 (mi_cmd_exec_run): Use scoped_restore_current_pspace_and_thread.
10596 (mi_cmd_trace_frame_collected): Use scoped_restore_current_thread.
10597 * proc-service.c (ps_pglobal_lookup): Use
10598 scoped_restore_current_program_space.
10599 * progspace-and-thread.c: New file.
10600 * progspace-and-thread.h: New file.
10601 * progspace.c (release_program_space, clone_program_space): Use
10602 scoped_restore_current_program_space.
10603 (restore_program_space, save_current_program_space)
10604 (save_current_space_and_thread): Delete.
10605 (switch_to_program_space_and_thread): Moved to
10606 progspace-and-thread.c.
10607 * progspace.h (save_current_program_space)
10608 (save_current_space_and_thread): Delete declarations.
10609 (scoped_restore_current_program_space): New class.
10610 * remote.c (remote_btrace_maybe_reopen): Use
10611 scoped_restore_current_thread.
10612 * symtab.c: Include "progspace-and-thread.h".
10613 (skip_prologue_sal): Use scoped_restore_current_pspace_and_thread.
10614 * thread.c (print_thread_info_1): Use
10615 scoped_restore_current_thread.
10616 (struct current_thread_cleanup): Delete.
10617 (do_restore_current_thread_cleanup)
10618 (restore_current_thread_cleanup_dtor): Rename/convert both to ...
10619 (scoped_restore_current_thread::~scoped_restore_current_thread):
10620 ... this new dtor.
10621 (make_cleanup_restore_current_thread): Rename/convert to ...
10622 (scoped_restore_current_thread::scoped_restore_current_thread):
10623 ... this new ctor.
10624 (thread_apply_all_command): Use scoped_restore_current_thread.
10625 (thread_apply_command): Use scoped_restore_current_thread.
10626 * tracepoint.c (tdump_command): Use scoped_restore_current_thread.
10627 * varobj.c (value_of_root_1): Use scoped_restore_current_thread.
10628
10629 2017-05-04 Pedro Alves <palves@redhat.com>
10630
10631 * thread.c (make_cleanup_restore_current_thread): Move
10632 find_thread_ptid call before the is_stopped call. Assert that the
10633 thread is found. Replace is_stopped call by checking the thread's
10634 state directly. Remove unnecessary NULL-thread check.
10635
10636 2017-05-04 Pedro Alves <palves@redhat.com>
10637
10638 * corelow.c (thread_section_name): New class.
10639 (get_core_register_section, get_core_siginfo): Use it.
10640
10641 2017-05-04 Andreas Arnez <arnez@linux.vnet.ibm.com>
10642
10643 * corelow.c (sniff_core_bfd): Remove extra semicolon.
10644 (get_core_register_section): Remove xfree of NULL pointer.
10645
10646 2017-05-03 Alan Hayward <alan.hayward@arm.com>
10647
10648 * frv-linux-tdep.c (frv_linux_supply_gregset): Use raw_supply_zeroed.
10649 * regcache.c (regcache::raw_supply_zeroed): New function.
10650 * regcache.h (regcache::raw_supply_zeroed): New declaration.
10651
10652 2017-05-03 Simon Marchi <simon.marchi@ericsson.com>
10653
10654 * gdbarch.sh: Remove commented out definition of
10655 TARGET_CHAR_BIT.
10656 * gdbarch.h: Re-generate.
10657
10658 2017-05-03 Sergio Durigan Junior <sergiodj@redhat.com>
10659
10660 * configure: Regenerate.
10661
10662 2017-05-02 Simon Marchi <simon.marchi@ericsson.com>
10663
10664 * solib-target.c (solib_target_relocate_section_addresses):
10665 Remove num_section_bases, num_bases, segment_bases variables.
10666
10667 2017-05-02 Simon Marchi <simon.marchi@polymtl.ca>
10668
10669 * common/gdb_vecs.h (DEF_VEC_I (CORE_ADDR)): Remove.
10670
10671 2017-05-02 Simon Marchi <simon.marchi@polymtl.ca>
10672
10673 * solib-target.c: Include <vector>
10674 (struct lm_info_target) <~lm_info_target>: Remove.
10675 <segment_bases, section_bases>: Change type to
10676 std::vector<CORE_ADDR>.
10677 (library_list_start_segment, library_list_start_section,
10678 library_list_end_library,
10679 solib_target_relocate_section_addresses): Adjust.
10680
10681 2017-05-02 Simon Marchi <simon.marchi@polymtl.ca>
10682
10683 * gdbarch.sh (software_single_step): Change return type to
10684 std::vector<CORE_ADDR>.
10685 * gdbarch.c, gdbarch.h: Re-generate.
10686 * arch/arm-get-next-pcs.c (thumb_deal_with_atomic_sequence_raw):
10687 Adjust.
10688 (arm_deal_with_atomic_sequence_raw): Adjust.
10689 (thumb_get_next_pcs_raw): Adjust.
10690 (arm_get_next_pcs_raw): Adjust.
10691 (arm_get_next_pcs): Adjust.
10692 * arch/arm-get-next-pcs.h (arm_get_next_pcs): Adjust.
10693 * aarch64-tdep.c (aarch64_software_single_step): Adjust.
10694 * alpha-tdep.c (alpha_deal_with_atomic_sequence): Adjust.
10695 (alpha_software_single_step): Adjust.
10696 * alpha-tdep.h (alpha_software_single_step): Adjust.
10697 * arm-linux-tdep.c (arm_linux_software_single_step): Adjust.
10698 * arm-tdep.c (arm_software_single_step): Adjust.
10699 (arm_breakpoint_kind_from_current_state): Adjust.
10700 * arm-tdep.h (arm_software_single_step): Adjust.
10701 * breakpoint.c (insert_single_step_breakpoint): Adjust.
10702 * cris-tdep.c (cris_software_single_step): Adjust.
10703 * mips-tdep.c (mips_deal_with_atomic_sequence): Adjust.
10704 (micromips_deal_with_atomic_sequence): Adjust.
10705 (deal_with_atomic_sequence): Adjust.
10706 (mips_software_single_step): Adjust.
10707 * mips-tdep.h (mips_software_single_step): Adjust.
10708 * moxie-tdep.c (moxie_software_single_step): Adjust.
10709 * nios2-tdep.c (nios2_software_single_step): Adjust.
10710 * ppc-tdep.h (ppc_deal_with_atomic_sequence): Adjust.
10711 * rs6000-aix-tdep.c (rs6000_software_single_step): Adjust.
10712 * rs6000-tdep.c (ppc_deal_with_atomic_sequence): Adjust.
10713 * s390-linux-tdep.c (s390_software_single_step): Adjust.
10714 * sparc-tdep.c (sparc_software_single_step): Adjust.
10715 * spu-tdep.c (spu_software_single_step): Adjust.
10716 * tic6x-tdep.c (tic6x_software_single_step): Adjust.
10717
10718 2017-05-02 Simon Marchi <simon.marchi@polymtl.ca>
10719
10720 * gdbarch.sh: Use semi-colon as field separator instead of colon.
10721 * gdbarch.h: Re-generate.
10722
10723 2017-05-01 Tim Wiederhake <tim.wiederhake@intel.com>
10724
10725 * Makefile.in (SUBDIR_PYTHON_OBS): Add py-instruction.o.
10726 (SUBDIR_PYTHON_SRCS): Add py-instruction.c.
10727 * python/py-instruction.c, python/py-instruction.h: New file.
10728 * python/py-record.c: Add py-instruction.h include.
10729 (gdbpy_initialize_record): Make gdb.Instruction a super class of
10730 gdb.RecordInstruction.
10731 * python/python-internal.h: Add gdbpy_initialize_instruction
10732 declaration.
10733 * python/python.c (do_start_initialization): Add
10734 gdbpy_initialize_instruction.
10735
10736 2017-05-01 Tim Wiederhake <tim.wiederhake@intel.com>
10737
10738 * python/py-record-btrace.c (BTPY_REQUIRE_VALID_CALL, btpy_call_type):
10739 Remove.
10740 (btrace_func_from_recpy_func): New function.
10741 (btpy_call_new, btpy_number, btpy_hash, btpy_richcompare): Remove.
10742 (btpy_call_level, btpy_call_symbol, btpy_call_instructions,
10743 btpy_call_up, btpy_call_prev_sibling, btpy_call_next_sibling): Rename to ...
10744 (recpy_bt_func_level, recpy_bt_func_symbol, recpy_bt_func_instructions,
10745 recpy_bt_func_up, recpy_bt_func_prev, recpy_bt_func_next): This.
10746 Also, use new helper functions.
10747 (btpy_list_item): Use new helper functions.
10748 (recpy_bt_function_call_history): Use new type name.
10749 (btpy_call_getset): Remove.
10750 (gdbpy_initialize_btrace): Remove code to initialize
10751 gdb.BtraceFunctionCall.
10752 * python/py-record-btrace.h (recpy_bt_func_number, recpy_btb_func_level,
10753 recpy_btb_func_symbol, recpy_bt_func_instructions, recpy_bt_func_up,
10754 recpy_bt_func_prev, recpy_bt_func_next): New export.
10755 * python/py-record.c (recpy_func_type): New static object.
10756 (recpy_func_new, recpy_func_level, recpy_func_symbol,
10757 recpy_func_instructions, recpy_func_up, recpy_func_prev,
10758 recpy_func_next): New function.
10759 (recpy_element_hash, recpy_element_richcompare): Updated comment.
10760 (recpy_func_getset): New static object.
10761 (gdbpy_initialize_record): Add code to initialize gdb.RecordInstruction.
10762 * python/py-record.h (recpy_func_type, recpy_func_new): New export.
10763
10764 2017-05-01 Tim Wiederhake <tim.wiederhake@intel.com>
10765
10766 * python/py-record-btrace.c (BTPY_REQUIRE_VALID_INSN): Remove.
10767 (btpy_object, btpy_insn_type, btpy_new): Remove.
10768 (btpy_list_object): Use gdb.RecordInstruction type instead of
10769 gdb.BtraceInstruction type.
10770 (btrace_insn_from_recpy_insn): New function.
10771 (btpy_insn_or_gap_new): Adjust comment. Use recpy_insn_new instead of
10772 btpy_new.
10773 (btpy_call_new, btpy_list_item): Do not use btpy_new anymore.
10774 (btpy_number, btpy_hash, btpy_call_level, btpy_call_symbol,
10775 btpy_call_instructions, btpy_call_up, btpy_call_prev_sibling,
10776 btpy_call_next_sibling, btpy_richcompare): Use recpy_element_object
10777 instead of btpy_object.
10778 (btpy_insn_sal, btpy_insn_pc, btpy_insn_size, btpy_insn_is_speculative,
10779 btpy_insn_data, btpy_insn_decode): Rename to ...
10780 (recpy_bt_insn_sal, recpy_bt_insn_pc, recpy_bt_insn_size,
10781 recpy_bt_insn_is_speculative, recpy_bt_insn_data,
10782 recpy_bt_insn_decode): This. Also, use new helper functions.
10783 (btpy_list_position, recpy_bt_goto): Use recpy_element_object and
10784 recpy_insn_type.
10785 (btpy_insn_getset): Remove.
10786 (gdbpy_initialize_btrace): Remove code to initialize
10787 gdb.BtraceInstruction. Use recpy_element_object.
10788 * python/py-record-btrace.h (recpy_bt_insn_number, recpy_bt_insn_sal,
10789 recpy_bt_insn_pc, recpy_bt_insn_data, recpy_bt_insn_decoded,
10790 recpy_bt_insn_size, recpy_bt_insn_is_speculative): New export.
10791 * python/py-record.c (recpy_insn_type): New static object.
10792 (recpy_insn_new, recpy_insn_sal, recpy_insn_pc, recpy_insn_data,
10793 recpy_insn_decoded, recpy_insn_size, recpy_insn_is_speculative,
10794 recpy_element_number, recpy_element_hash, recpy_element_richcompare):
10795 New function.
10796 (recpy_insn_getset): New static object.
10797 (gdbpy_initialize_record): Initialize gdb.RecordInstruction.
10798 * python/py-record.h (recpy_element_object): New typedef.
10799 (recpy_insn_type, recpy_insn_new): New export.
10800
10801 2017-05-01 Tim Wiederhake <tim.wiederhake@intel.com>
10802
10803 * py-record-btrace.c (btpy_insn_new): Removed.
10804 (btpy_insn_or_gap_new): New function.
10805 (btpy_insn_error): Removed.
10806 (btpy_insn_sal, btpy_insn_pc, btpy_insn_size, btpy_insn_is_speculative,
10807 btpy_insn_data, btpy_insn_decode): Remove code path for gaps.
10808 (recpy_bt_replay_position, recpy_bt_begin, recpy_bt_end): Call
10809 btpy_insn_or_gap_new instead of btpy_insn_new.
10810 (btpy_insn_getset): Remove btpy_insn_error.
10811 * py-record.c (recpy_gap_type): New static object.
10812 (recpy_gap_object): New typedef.
10813 (recpy_gap_new, recpy_gap_number, recpy_gap_reason_code,
10814 recpy_gap_reason_string): New function.
10815 (recpy_gap_getset): New static object.
10816 (gdbpy_initialize_record): Initialize gdb.RecordGap type.
10817 * py-record.h (recpy_gap_new): New export.
10818
10819 2017-05-01 Tim Wiederhake <tim.wiederhake@intel.com>
10820
10821 * python/py-record.c (recpy_ptid): Remove.
10822 (recpy_record_getset): Remove recpy_ptid.
10823
10824 2017-05-01 Tim Wiederhake <tim.wiederhake@intel.com>
10825
10826 * btrace.c (btrace_fetch): Set inferior_ptid.
10827 * python/py-record-btrace.c: Add "py-record.h" include.
10828 (recpy_bt_format, recpy_bt_replay_position, recpy_bt_begin,
10829 recpy_bt_end, recpy_bt_instruction_history,
10830 recpy_bt_function_call_history, recpy_bt_goto): Use ptid stored
10831 in gdb.Record object instead of current ptid.
10832 * python/py-record.c: Include new "py-record.h" file.
10833 (recpy_record_object): Moved to py-record.h.
10834 * python/py-record.h: New file.
10835
10836 2017-05-01 Tim Wiederhake <tim.wiederhake@intel.com>
10837
10838 * python/py-record-btrace.c (BTPY_REQUIRE_VALID_INSN,
10839 BTPY_REQUIRE_VALID_CALL, recpy_bt_function_call_history): Fix
10840 indentation.
10841
10842 2017-05-01 Joel Brobecker <brobecker@adacore.com>
10843
10844 * MAINTAINERS: Move Daniel Jacobowitz and Mark Kettenis to
10845 the past maintainers section.
10846
10847 2017-04-28 Yao Qi <yao.qi@linaro.org>
10848
10849 * infcmd.c (get_return_value): Use regcache ctor, and remove
10850 cleanup.
10851
10852 2017-04-28 Yao Qi <yao.qi@linaro.org>
10853 Pedro Alves <palves@redhat.com>
10854
10855 * regcache.c (regcache::regcache): New tag dispatch ctor.
10856 (do_cooked_read): Moved above.
10857 (regcache_dup): Use the tag dispatch ctor..
10858 * regcache.h (regcache): Declare ctor, delete copy ctor and
10859 assignment operator, remove friend regcache_dup.
10860
10861 2017-04-28 Yao Qi <yao.qi@linaro.org>
10862
10863 * regcache.c (regcache_dup): Assert !src->m_readonly_p and
10864 call method save instead of regcache_cpy.
10865 * regcache.h (struct regcache): Make regcache_dup a friend.
10866
10867 2017-04-28 Yao Qi <yao.qi@linaro.org>
10868
10869 * regcache.c (struct regcache): Move to regcache.h
10870 (regcache::arch): New method.
10871 (regcache_get_ptid): Update.
10872 (get_regcache_arch): Call arch method.
10873 (get_regcache_aspace): Call method aspace.
10874 (register_buffer): Change it to method.
10875 (regcache_save): Change it to regcache::save.
10876 (regcache_restore): Likewise.
10877 (regcache_cpy_no_passthrough): Remove the declaration.
10878 (regcache_cpy): Call methods restore and cpy_no_passthrough.
10879 (regcache_cpy_no_passthrough): Change it to method
10880 cpy_no_passthrough.
10881 (regcache_register_status): Change it to method
10882 get_register_status.
10883 (regcache_invalidate): Change it to method invalidate.
10884 (regcache_thread_ptid_changed): Use methods ptid and set_ptid.
10885 (regcache_raw_update): Change it to method raw_update.
10886 (regcache_raw_read): Likewise.
10887 (regcache_raw_read_signed): Likewise.
10888 (regcache_raw_read_unsigned): Likewise.
10889 (regcache_raw_write_signed): Likewise.
10890 (regcache_raw_write_unsigned): Likewise.
10891 (regcache_cooked_read): Likewise.
10892 (regcache_cooked_read_value): Likewise.
10893 (regcache_cooked_read_signed): Likewise.
10894 (regcache_cooked_read_unsigned): Likewise.
10895 (regcache_cooked_write_signed): Likewise.
10896 (regcache_cooked_write_unsigned): Likewise.
10897 (regcache_raw_set_cached_value): Likewise.
10898 (regcache_raw_write): Likewise.
10899 (regcache_cooked_write): Likewise.
10900 (regcache_xfer_part): Likewise.
10901 (regcache_raw_read_part): Likewise.
10902 (regcache_raw_write_part): Likewise.
10903 (regcache_cooked_read_part): Likewise.
10904 (regcache_cooked_write_part): Likewise.
10905 (regcache_raw_supply): Likewise.
10906 (regcache_raw_collect): Likewise.
10907 (regcache_transfer_regset): Likewise.
10908 (regcache_supply_regset): Likewise.
10909 (regcache_collect_regset): Likewise.
10910 (regcache_debug_print_register): Likewise.
10911 (enum regcache_dump_what): Move it to regcache.h.
10912 (regcache_dump): Change it to method dump.
10913 * regcache.h (enum regcache_dump_what): New.
10914 (class regcache): New.
10915 * target.c (target_fetch_registers): Call method
10916 debug_print_register.
10917 (target_store_registers): Likewise.
10918
10919 2017-04-28 Simon Marchi <simon.marchi@ericsson.com>
10920
10921 * windows-nat.c (struct lm_info_windows): Initialize field.
10922 (windows_make_so): Allocate lm_info_windows with new.
10923 (windows_free_so): Free lm_info_windows with delete.
10924
10925 2017-04-28 Simon Marchi <simon.marchi@ericsson.com>
10926
10927 * solib-darwin.c (struct lm_info_darwin): Initialize field.
10928 (darwin_current_sos): Allocate lm_info_darwin with new, remove
10929 cleanup.
10930 (darwin_free_so): Free lm_info_darwin with delete.
10931
10932 2017-04-28 Simon Marchi <simon.marchi@ericsson.com>
10933
10934 * solib-svr4.h (struct lm_info_svr4): Initialize fields.
10935 <l_addr_p>: Change type to bool.
10936 * solib-svr4.c (lm_info_read): Allocate lm_info_svr4 with new.
10937 (svr4_free_so): Free lm_info_svr4 with delete.
10938 (svr4_copy_library_list): Replace memcpy with call to copy
10939 constructor.
10940 (library_list_start_library, svr4_default_sos): Allocate
10941 lm_info_svr4 with new.
10942
10943 2017-04-28 Simon Marchi <simon.marchi@ericsson.com>
10944
10945 * solib-target.c (struct lm_info_target): Add destructor,
10946 initialize fields.
10947 <name>: Change type to std::string.
10948 (library_list_start_library): Allocate lm_info_target with new.
10949 (solib_target_free_library_list): Free lm_info_target with
10950 delete.
10951 (solib_target_current_sos): Adapt to std::string.
10952 (solib_target_free_so): Free lm_info_target with delete.
10953
10954 2017-04-28 Simon Marchi <simon.marchi@ericsson.com>
10955
10956 * solib-frv.c (struct lm_info_frv): Add destructor, initialize
10957 fields.
10958 (frv_current_sos): Allocate lm_info_frv with new.
10959 (frv_relocate_main_executable): Free lm_info_frv with delete,
10960 allocate with new.
10961 (frv_clear_solib, frv_free_so): Free lm_info_frv with delete.
10962
10963 2017-04-28 Simon Marchi <simon.marchi@ericsson.com>
10964
10965 * solib-frv.c (struct lm_info_frv): Fix indentation.
10966
10967 2017-04-28 Simon Marchi <simon.marchi@ericsson.com>
10968
10969 * solib-dsbt.c (struct lm_info_dsbt): Add destructor, initialize
10970 map field.
10971 (dsbt_current_sos): Allocate lm_info_dsbt with new.
10972 (dsbt_relocate_main_executable): Free lm_info_dsbt with delete
10973 and allocate with new.
10974 (dsbt_clear_solib, dsbt_free_so): Free lm_info_dsbt with delete.
10975
10976 2017-04-28 Simon Marchi <simon.marchi@ericsson.com>
10977
10978 * solib-aix.c (struct lm_info_aix): Initialize fields in-class.
10979 <filename, member_name>: Change type to std::string.
10980 (solib_aix_new_lm_info, solib_aix_xfree_lm_info): Remove.
10981 (library_list_start_library): Allocate lm_info_aix with new.
10982 (solib_aix_free_library_list, solib_aix_free_so): Free with delete.
10983 (solib_aix_current_sos): Adapt to std::string, copy lm_info_aix
10984 with copy constructor.
10985
10986 2017-04-28 Simon Marchi <simon.marchi@ericsson.com>
10987
10988 * solist.h (struct lm_info): Remove.
10989 (struct lm_info_base): New class.
10990 (struct so_list) <lm_info>: Change type to lm_info_base *.
10991 * nto-tdep.c (struct lm_info): Remove.
10992 (lm_addr): Adjust.
10993 * solib-aix.c (struct lm_info): Rename to ...
10994 (struct lm_info_aix): ... this. Extend lm_info_base.
10995 (lm_info_p): Rename to ...
10996 (lm_info_aix_p): ... this, and adjust.
10997 (solib_aix_new_lm_info, solib_aix_xfree_lm_info,
10998 solib_aix_parse_libraries, library_list_start_library,
10999 solib_aix_free_library_list, solib_aix_parse_libraries,
11000 solib_aix_get_library_list,
11001 solib_aix_relocate_section_addresses, solib_aix_free_so,
11002 solib_aix_get_section_offsets,
11003 solib_aix_solib_create_inferior_hook, solib_aix_current_sos):
11004 Adjust.
11005 (struct solib_aix_inferior_data) <library_list>: Adjust.
11006 * solib-darwin.c (struct lm_info): Rename to ...
11007 (struct lm_info_darwin): ... this. Extend lm_info_base.
11008 (darwin_current_sos, darwin_relocate_section_addresses): Adjust.
11009 * solib-dsbt.c (struct lm_info): Rename to ...
11010 (struct lm_info_dsbt): ... this. Extend lm_info_base.
11011 (struct dsbt_info) <main_executable_lm_info): Adjust.
11012 (dsbt_current_sos, dsbt_relocate_main_executable, dsbt_free_so,
11013 dsbt_relocate_section_addresses): Adjust.
11014 * solib-frv.c (struct lm_info): Rename to ...
11015 (struct lm_info_frv): ... this. Extend lm_info_base.
11016 (main_executable_lm_info): Adjust.
11017 (frv_current_sos, frv_relocate_main_executable, frv_free_so,
11018 frv_relocate_section_addresses, frv_fdpic_find_global_pointer,
11019 find_canonical_descriptor_in_load_object,
11020 frv_fdpic_find_canonical_descriptor): Adjust.
11021 * solib-svr4.c (struct lm_info): Move to solib-svr4.h, renamed
11022 to lm_info_svr4.
11023 (lm_info_read, lm_addr_check, svr4_keep_data_in_core,
11024 svr4_clear_so, svr4_copy_library_list,
11025 library_list_start_library, svr4_default_sos, svr4_read_so_list,
11026 svr4_current_sos, svr4_fetch_objfile_link_map,
11027 solist_update_incremental): Adjust.
11028 * solib-svr4.h (struct lm_info_svr4): Move here from
11029 solib-svr4.c.
11030 * solib-target.c (struct lm_info): Rename to ...
11031 (struct lm_info_target): ... this. Extend lm_info_base.
11032 (lm_info_p): Rename to ...
11033 (lm_info_target_p): ... this.
11034 (solib_target_parse_libraries, library_list_start_segment,
11035 library_list_start_section, library_list_start_library,
11036 library_list_end_library, solib_target_free_library_list,
11037 solib_target_current_sos, solib_target_free_so,
11038 solib_target_relocate_section_addresses): Adjust.
11039 * windows-nat.c (struct lm_info): Rename to ...
11040 (struct lm_info_windows): ... this. Extend lm_info_base.
11041 (windows_make_so, handle_load_dll, handle_unload_dll,
11042 windows_xfer_shared_libraries): Adjust.
11043
11044 2017-04-28 Simon Marchi <simon.marchi@ericsson.com>
11045
11046 * solib-darwin.c (struct darwin_so_list): Remove.
11047 (darwin_current_sos): Allocate an so_list object instead of a
11048 darwin_so_list, separately allocate an lm_info object.
11049 (darwin_free_so): Free lm_info.
11050
11051 2017-04-28 John Baldwin <jhb@FreeBSD.org>
11052
11053 * mips-tdep.c (print_gp_register_row): Replace printf_filtered
11054 with fprintf_filtered.
11055
11056 2017-04-28 Yao Qi <yao.qi@linaro.org>
11057
11058 * regcache.c (regcache::regcache): New function.
11059 (regcache::~regcache): New function.
11060 (regcache_xmalloc_1): Remove.
11061 (regcache_xmalloc): Call new regcache.
11062 (regcache_xfree): Call delete regcache.
11063 (get_thread_arch_aspace_regcache): Call new regcache.
11064
11065 2017-04-28 Yao Qi <yao.qi@linaro.org>
11066
11067 * mips-linux-nat.c (mips_linux_new_thread): Use ptid method
11068 lwp instead of ptid_get_lwp.
11069
11070 2017-04-28 Yao Qi <yao.qi@linaro.org>
11071
11072 * mips-linux-nat.c (mips_linux_new_thread): Get lwpid from
11073 lwp_info instead of getting from inferior_ptid.
11074
11075 2017-04-27 Keith Seitz <keiths@redhat.com>
11076
11077 * gdbtypes.c (LVALUE_REFERENCE_TO_RVALUE_BINDING_BADNESS)
11078 DIFFERENT_REFERENCE_TYPE_BADNESS): Remove.
11079 (CV_CONVERSION_BADNESS): Define.
11080 (rank_one_type): Remove overly restrictive rvalue reference
11081 rank checks.
11082 Add cv-qualifier checks and subranks for type equality.
11083 * gdbtypes.h (REFERENCE_CONVERSION_RVALUE,
11084 REFERENCE_CONVERSION_CONST_LVALUE, CV_CONVERSION_BADNESS,
11085 CV_CONVERSION_CONST, CV_CONVERSION_VOLATILE): Declare.
11086
11087 2017-04-27 Simon Marchi <simon.marchi@ericsson.com>
11088
11089 * python/py-inferior.c (inferior_to_inferior_object): Increment reference
11090 count when creating the object.
11091
11092 2017-04-27 Sangamesh Mallayya <sangamesh.swamy@in.ibm.com>
11093 Ulrich Weigand <uweigand@de.ibm.com>
11094
11095 * xcoffread.c (read_xcoff_symtab): Read correct function auxiliary
11096 entry if xlc -qfuncsect or gcc -ffunction-sections compiler option
11097 is used in AIX.
11098 (read_xcoff_symtab): Handle C_WEAKEXT storage class.
11099 (process_xcoff_symbol): Likewise.
11100 (scan_xcoff_symtab): Likewise.
11101
11102 2017-04-26 Alan Hayward <alan.hayward@arm.com>
11103
11104 * ia64-tdep.c (examine_prologue): Use get_frame_register_unsigned.
11105 (ia64_sigtramp_frame_prev_register): Use read_memory_unsigned_integer.
11106 (ia64_access_reg): Use get_frame_register_unsigned.
11107 (ia64_access_rse_reg): Likewise.
11108 (ia64_libunwind_frame_prev_register): Likewise.
11109
11110 2017-04-26 Jiong Wang <jiong.wang@arm.com>
11111
11112 * gdbarch.sh: New gdbarch method execute_dwarf_cfa_vendor_op.
11113 * gdbarch.c: Regenerated.
11114 * gdbarch.h: Regenerated.
11115 * dwarf2-frame.c (dwarf2_frame_state_alloc_regs): Made the
11116 visibility external.
11117 (execute_cfa_program): Call execute_dwarf_cfa_vendor_op for CFI
11118 between DW_CFA_lo_user and DW_CFA_high_user inclusive.
11119 (enum cfa_how_kind): Move to ...
11120 (struct dwarf2_frame_state_reg_info): Likewise.
11121 (struct dwarf2_frame_state): Likewise.
11122 * dwarf2-frame.h: ... here.
11123 (dwarf2_frame_state_alloc_regs): New declaration.
11124 * sparc-tdep.c (sparc_execute_dwarf_cfa_vendor_op): New function.
11125 (sparc32_gdbarch_init): Register execute_dwarf_cfa_vendor_op hook.
11126
11127 2017-04-26 Alan Hayward <alan.hayward@arm.com>
11128
11129 * xtensa-tdep.c (xtensa_pseudo_register_read): Use
11130 regcache_raw_read_unsigned.
11131 (xtensa_pseudo_register_write): Likewise.
11132
11133 2017-04-26 Alan Hayward <alan.hayward@arm.com>
11134
11135 * nds32-tdep.c (nds32_pseudo_register_read): Abort on errors.
11136 (nds32_pseudo_register_write): Likewise.
11137
11138 2017-04-25 Yao Qi <yao.qi@linaro.org>
11139
11140 * regcache.c (struct regcache) <readonly_p>: Change its type
11141 to bool.
11142 (regcache_xmalloc_1): Update parameter type and callers update.
11143
11144 2017-04-25 Yao Qi <yao.qi@linaro.org>
11145
11146 * aarch64-tdep.c (aarch64_gdbarch_init): Don't call
11147 set_gdbarch_wchar_bit.
11148 * arm-tdep.c (arm_gdbarch_init): Likewise.
11149
11150 2017-04-25 Pedro Alves <palves@redhat.com>
11151
11152 * common/poison.h [!HAVE_IS_TRIVIALLY_COPYABLE] (IsRelocatable)
11153 (BothAreRelocatable, memcopy, memmove): Don't define.
11154 * common/traits.h (__has_feature, HAVE_IS_TRIVIALLY_COPYABLE): New
11155 macros.
11156
11157 2017-04-25 Pedro Alves <palves@redhat.com>
11158
11159 * common/common-defs.h: Include "common/poison.h".
11160 * common/function-view.h: (Not, Or, Requires): Move to traits.h
11161 and adjust.
11162 * common/poison.h: New file.
11163 * common/traits.h: Include <type_traits>.
11164 (Not, Or, Requires): New, moved from common/function-view.h.
11165
11166 2017-04-25 Pedro Alves <palves@redhat.com>
11167
11168 * breakpoint.h (struct breakpoint): In-class initialize all
11169 fields. Make boolean fields "bool".
11170 * breakpoint.c (init_raw_breakpoint_without_location): Remove
11171 memset call and initializations no longer necessary.
11172
11173 2017-04-25 Pedro Alves <palves@redhat.com>
11174
11175 * btrace.c (pt_btrace_insn_flags): Change parameter type to
11176 reference.
11177 (pt_btrace_insn): New function.
11178 (ftrace_add_pt): Remove memset call and use pt_btrace_insn.
11179
11180 2017-04-25 Pedro Alves <palves@redhat.com>
11181
11182 * ada-lang.c (ada_catchpoint_location): Now a "class". Remove
11183 "base" field and inherit from "bp_location" instead. Add
11184 non-default ctor.
11185 (allocate_location_exception): Use new non-default ctor.
11186 * breakpoint.c (get_first_locp_gte_addr): Remove memset call.
11187 (init_bp_location): Convert to ...
11188 (bp_location::bp_location): ... this new ctor, and remove memset
11189 call.
11190 (base_breakpoint_allocate_location): Use the new non-default ctor.
11191 * breakpoint.h (bp_location): Now a class. Declare default and
11192 non-default ctors. In-class initialize all members.
11193 (init_bp_location): Remove declaration.
11194
11195 2017-04-25 Pedro Alves <palves@redhat.com>
11196
11197 * common/enum-flags.h (enum_flags): Don't implement copy ctor and
11198 assignment operator.
11199
11200 2017-04-24 Yao Qi <yao.qi@linaro.org>
11201
11202 * doublest.c (convert_doublest_to_floatformat): Call
11203 floatformat_totalsize_bytes.
11204
11205 2017-04-22 Tom Tromey <tom@tromey.com>
11206
11207 * mi/mi-cmd-file.c (mi_cmd_file_list_shared_libraries): Use
11208 ui_out_emit_list.
11209 * stack.c (print_frame): Use ui_out_emit_list.
11210 * mi/mi-symbol-cmds.c (mi_cmd_symbol_list_lines): Use
11211 ui_out_emit_list.
11212 * mi/mi-main.c (print_one_inferior)
11213 (mi_cmd_data_list_register_names)
11214 (mi_cmd_data_list_register_values, mi_cmd_list_features)
11215 (mi_cmd_list_target_features, mi_cmd_trace_frame_collected): Use
11216 ui_out_emit_list.
11217 * mi/mi-interp.c (mi_on_normal_stop_1): Use ui_out_emit_list.
11218 (mi_output_solib_attribs): Use ui_out_emit_list,
11219 ui_out_emit_tuple.
11220 * mi/mi-cmd-var.c (varobj_update_one): Use ui_out_emit_list.
11221 * mi/mi-cmd-stack.c (mi_cmd_stack_list_frames)
11222 (mi_cmd_stack_list_args, list_args_or_locals): Use
11223 ui_out_emit_list.
11224 * disasm.c (do_assembly_only): Use ui_out_emit_list.
11225 * breakpoint.c (print_solib_event, output_thread_groups): Use
11226 ui_out_emit_list.
11227
11228 2017-04-22 Tom Tromey <tom@tromey.com>
11229
11230 * mi/mi-main.c (print_variable_or_computed): Use ui_out_emit_tuple.
11231 * mi/mi-cmd-var.c (varobj_update_one): Use ui_out_emit_tuple.
11232 * mi/mi-cmd-stack.c (list_arg_or_local): Use ui_out_emit_tuple.
11233
11234 2017-04-22 Tom Tromey <tom@tromey.com>
11235
11236 * tracepoint.c (tvariables_info_1)
11237 (print_one_static_tracepoint_marker): Use ui_out_emit_tuple.
11238
11239 2017-04-22 Tom Tromey <tom@tromey.com>
11240
11241 * stack.c (print_frame_arg): Use ui_out_emit_tuple,
11242 annotate_arg_emitter.
11243 * breakpoint.c (print_mention_watchpoint)
11244 (print_mention_masked_watchpoint): Use ui_out_emit_tuple.
11245 * annotate.h (struct annotate_arg_emitter): New.
11246
11247 2017-04-22 Tom Tromey <tom@tromey.com>
11248
11249 * record-btrace.c (record_btrace_insn_history)
11250 (record_btrace_insn_history_range, record_btrace_call_history)
11251 (record_btrace_call_history_range): Use ui_out_emit_tuple.
11252 * thread.c (do_captured_list_thread_ids, print_thread_info_1): Use
11253 ui_out_emit_tuple.
11254 * stack.c (print_frame_info): Use ui_out_emit_tuple.
11255 * solib.c (info_sharedlibrary_command): Use ui_out_emit_tuple.
11256 * skip.c (skip_info): Use ui_out_emit_tuple.
11257 * remote.c (show_remote_cmd): Use ui_out_emit_tuple.
11258 * progspace.c (print_program_space): Use ui_out_emit_tuple.
11259 * probe.c (info_probes_for_ops): Use ui_out_emit_tuple.
11260 * osdata.c (info_osdata): Use ui_out_emit_tuple.
11261 * mi/mi-symbol-cmds.c (mi_cmd_symbol_list_lines): Use
11262 ui_out_emit_tuple.
11263 * mi/mi-main.c (print_one_inferior, list_available_thread_groups)
11264 (output_register, mi_cmd_data_read_memory)
11265 (mi_cmd_data_read_memory_bytes, mi_load_progress)
11266 (mi_cmd_trace_frame_collected): Use ui_out_emit_tuple.
11267 * mi/mi-cmd-var.c (mi_cmd_var_list_children, varobj_update_one):
11268 Use ui_out_emit_tuple.
11269 * mi/mi-cmd-stack.c (mi_cmd_stack_list_args): Use
11270 ui_out_emit_tuple.
11271 * mi/mi-cmd-info.c (mi_cmd_info_ada_exceptions)
11272 (mi_cmd_info_gdb_mi_command): Use ui_out_emit_tuple.
11273 * linux-thread-db.c (info_auto_load_libthread_db): Use
11274 ui_out_emit_tuple.
11275 * inferior.c (print_inferior): Use ui_out_emit_tuple.
11276 * gdb_bfd.c (print_one_bfd): Use ui_out_emit_tuple.
11277 * disasm.c (do_mixed_source_and_assembly_deprecated)
11278 (do_mixed_source_and_assembly): Use ui_out_emit_tuple.
11279 * cp-abi.c (list_cp_abis): Use ui_out_emit_tuple.
11280 * cli/cli-setshow.c (cmd_show_list): Use ui_out_emit_tuple.
11281 * breakpoint.c (print_one_breakpoint_location)
11282 (print_one_breakpoint): Use ui_out_emit_tuple.
11283 * auto-load.c (print_script, info_auto_load_cmd): Use
11284 ui_out_emit_tuple.
11285 * ada-tasks.c (print_ada_task_info): Use ui_out_emit_tuple.
11286
11287 2017-04-21 Simon Marchi <simon.marchi@ericsson.com>
11288
11289 * thread.c (print_thread_info_1): Remove dead code.
11290
11291 2017-04-21 Jan Kratochvil <jan.kratochvil@redhat.com>
11292
11293 * aarch64-tdep.c (selftests::aarch64_process_record_test): Make it #if
11294 GDB_SELF_TEST.
11295 * arm-tdep.c (selftests::arm_record_test): Likewise.
11296
11297 2017-04-21 Yao Qi <yao.qi@linaro.org>
11298
11299 * regcache.c (regcache_restore): Remove argument 2. Replace
11300 argument 3 with regcache. Get register status from
11301 src->register_status and get register contents from
11302 register_buffer (src, regnum).
11303 (regcache_cpy): Update.
11304
11305 2017-04-19 Pedro Alves <palves@redhat.com>
11306
11307 * gdbthread.h (thread): Add missing closing parenthesis in
11308 comment.
11309
11310 2017-04-19 Pedro Alves <palves@redhat.com>
11311
11312 * common/refcounted-object.h: New file.
11313 * gdbthread.h: Include "common/refcounted-object.h".
11314 (thread_info): Inherit from refcounted_object and add comments.
11315 (thread_info::incref, thread_info::decref)
11316 (thread_info::m_refcount): Delete.
11317 (thread_info::deletable): Use the refcounted_object::refcount()
11318 method.
11319 * inferior.c (current_inferior_): Add comment.
11320 (set_current_inferior): Increment/decrement refcounts.
11321 (prune_inferiors, remove_inferior_command): Skip inferiors marked
11322 not-deletable instead of comparing with the current inferior.
11323 (initialize_inferiors): Increment the initial inferior's refcount.
11324 * inferior.h (struct inferior): Forward declare.
11325 Include "common/refcounted-object.h".
11326 (current_inferior, set_current_inferior): Move declaration to
11327 before struct inferior's definition, and fix comment.
11328 (inferior): Inherit from refcounted_object. Add comments.
11329 * thread.c (switch_to_thread_no_regs): Reference the thread's
11330 inferior pointer directly instead of doing a ptid lookup.
11331 (switch_to_no_thread): New function.
11332 (switch_to_thread(thread_info *)): New function, factored out
11333 from ...
11334 (switch_to_thread(ptid_t)): ... this.
11335 (restore_current_thread): Delete.
11336 (current_thread_cleanup): Remove 'inf_id' and 'was_removable'
11337 fields, and add 'inf' field.
11338 (do_restore_current_thread_cleanup): Check whether old->inf is
11339 alive instead of looking up an inferior by ptid. Use
11340 switch_to_thread and switch_to_no_thread.
11341 (restore_current_thread_cleanup_dtor): Use old->inf directly
11342 instead of lookup up an inferior by id. Decref the inferior.
11343 Don't restore 'removable'.
11344 (make_cleanup_restore_current_thread): Same the inferior pointer
11345 in old, instead of the inferior number. Incref the inferior.
11346 Don't save/clear 'removable'.
11347
11348 2017-04-19 Pedro Alves <palves@redhat.com>
11349
11350 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
11351 unittests/scoped_restore-selftests.c.
11352 (SUBDIR_UNITTESTS_OBS): Add scoped_restore-selftests.o.
11353 * common/scoped_restore.h (scoped_restore_base): Make "class".
11354 (scoped_restore_base::release): New public method.
11355 (scoped_restore_base::scoped_restore_base): New protected ctor.
11356 (scoped_restore_base::m_saved_var): New protected field.
11357 (scoped_restore_tmpl::scoped_restore_tmpl(T*)): Initialize the
11358 scoped_restore_base base class instead of m_saved_var directly.
11359 (scoped_restore_tmpl::scoped_restore_tmpl(T*, T2)): Likewise.
11360 (scoped_restore_tmpl::scoped_restore_tmpl(const
11361 scoped_restore_tmpl<T>&)): Likewise.
11362 (scoped_restore_tmpl::~scoped_restore_tmpl): Use the saved_var
11363 method.
11364 (scoped_restore_tmpl::saved_var): New method.
11365 (scoped_restore_tmpl::m_saved_var): Delete.
11366 * inferior.h (inferior::detaching): Now a bool.
11367 * infrun.c (prepare_for_detach): Use a scoped_restore instead of a
11368 cleanup.
11369 * unittests/scoped_restore-selftests.c: New file.
11370
11371 2017-04-19 Pedro Alves <palves@redhat.com>
11372
11373 * Makefile.in (SUBDIR_UNITTESTS_SRCS, SUBDIR_UNITTESTS_OBS):
11374 Re-sort in alphabetic order.
11375
11376 2017-04-18 Pedro Alves <palves@redhat.com>
11377
11378 * xml-support.c (obstack_xml_printf): Delete.
11379 * xml-support.h (obstack_xml_printf): Delete.
11380
11381 2017-04-18 Pedro Alves <palves@redhat.com>
11382
11383 * xml-support.c (gdb_xml_parser) <use_dtd, dtd_name, parse,
11384 vdebug, verror, body_text, start_element, end_element, name,
11385 user_data, set_is_xinclude, set_error, expat_parser>: New methods.
11386 <name, user_data, expat_parser, scopes, error, last_line, dtd_name,
11387 is_xinclude>: Make private and add m_ prefix.
11388 (gdb_xml_parser::body_text): New method, based on ...
11389 (gdb_xml_body_text): ... this. Adjust.
11390 (gdb_xml_parser::vdebug): New method, based on ...
11391 (gdb_xml_debug): ... this. Adjust.
11392 (gdb_xml_parser::verror): New method, based on ...
11393 (gdb_xml_error): ... this. Adjust.
11394 (gdb_xml_parser::start_element): New method, based on ...
11395 (gdb_xml_start_element): ... this. Adjust.
11396 (gdb_xml_start_element_wrapper): Defer to
11397 gdb_xml_parser::start_element and gdb_xml_parser::set_error.
11398 (gdb_xml_parser::end_element): New method, based on ...
11399 (gdb_xml_end_element_wrapper): ... this. Adjust.
11400 (gdb_xml_parser::~gdb_xml_parser): Adjust.
11401 (gdb_xml_parser::gdb_xml_parser): Adjust to field renames.
11402 (gdb_xml_parser::use_dtd): New method, based on ...
11403 (gdb_xml_use_dtd): ... this. Adjust.
11404 (gdb_xml_parser::parse): New method, based on ...
11405 (gdb_xml_parse): ... this. Adjust.
11406 (gdb_xml_parse_quick): Adjust to call the parser's parse method.
11407 (xinclude_start_include): Adjust to call the parser's name method.
11408 (xml_xinclude_default, xml_xinclude_start_doctype)
11409 (xml_xinclude_end_doctype): Adjust to call the parser's user_data
11410 method.
11411 (xml_process_xincludes): Adjust to call parser methods.
11412 * xml-support.h (gdb_xml_use_dtd, gdb_xml_parse): Delete
11413 declarations.
11414
11415 2017-04-18 Pedro Alves <palves@redhat.com>
11416
11417 * tracefile-tfile.c (tfile_write_tdesc): Adjust to use
11418 gdb::optional<std::string>.
11419 * xml-support.c: Include <string>.
11420 (scope_level::scope_level(scope_level &&))
11421 (scope_level::~scope_level): Delete.
11422 (scope_level::body): Now a std::string.
11423 (gdb_xml_body_text, gdb_xml_end_element): Adjust.
11424 (xinclude_parsing_data::xinclude_parsing_data): Add 'output'
11425 parameter.
11426 (xinclude_parsing_data::~xinclude_parsing_data): Delete.
11427 (xinclude_parsing_data::output): Now a std::string reference.
11428 (xinclude_start_include): Adjust.
11429 (xml_xinclude_default): Adjust.
11430 (xml_process_xincludes): Add 'output' parameter, and return bool.
11431 * xml-support.h (xml_process_xincludes): Add 'output' parameter,
11432 and return bool.
11433 * xml-tdesc.c: Include <unordered_map> and <string>.
11434 (tdesc_xml_cache): Delete.
11435 (tdesc_xml_cache_s): Delete.
11436 (xml_cache): Now an std::unordered_map.
11437 (tdesc_parse_xml): Adjust to use std::string and unordered_map.
11438 (target_fetch_description_xml): Change return type to
11439 gdb::optional<std::string>, and adjust.
11440 * xml-tdesc.h: Include "common/gdb_optional.h" and <string>.
11441 (target_fetch_description_xml): Change return type to
11442 gdb::optional<std::string>.
11443
11444 2017-04-18 Pedro Alves <palves@redhat.com>
11445
11446 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
11447 unittests/optional-selftests.c.
11448 (SUBDIR_UNITTESTS_OBS): Add optional-selftests.o.
11449 * unittests/optional-selftests.c: New file.
11450 * unittests/optional/assignment/1.cc: New file.
11451 * unittests/optional/assignment/2.cc: New file.
11452 * unittests/optional/assignment/3.cc: New file.
11453 * unittests/optional/assignment/4.cc: New file.
11454 * unittests/optional/assignment/5.cc: New file.
11455 * unittests/optional/assignment/6.cc: New file.
11456 * unittests/optional/assignment/7.cc: New file.
11457 * unittests/optional/cons/copy.cc: New file.
11458 * unittests/optional/cons/default.cc: New file.
11459 * unittests/optional/cons/move.cc: New file.
11460 * unittests/optional/cons/value.cc: New file.
11461 * unittests/optional/in_place.cc: New file.
11462 * unittests/optional/observers/1.cc: New file.
11463 * unittests/optional/observers/2.cc: New file.
11464
11465 2017-04-18 Pedro Alves <palves@redhat.com>
11466
11467 * common/gdb_optional.h: Include common/traits.h.
11468 (in_place_t): New type.
11469 (in_place): New constexpr variable.
11470 (optional::optional): Remove member initialization of
11471 m_instantiated.
11472 (optional::optional(in_place_t...)): New constructor.
11473 (optional::~optional): Use reset.
11474 (optional::optional(const optional&)): New.
11475 (optional::optional(const optional&&)): New.
11476 (optional::optional(T &)): New.
11477 (optional::optional(T &&)): New.
11478 (operator::operator=(const optional &)): New.
11479 (operator::operator=(optional &&)): New.
11480 (operator::operator= (const T &))
11481 (operator::operator= (T &&))
11482 (operator::emplace (Args &&... args)): Return a T&. Use reset.
11483 (operator::reset): New.
11484 (operator::m_instantiated):: Add in-class initializer.
11485 * common/traits.h: Include <type_traits>.
11486 (struct And): New types.
11487
11488 2017-04-18 Pedro Alves <palves@redhat.com>
11489
11490 * xml-support.c: Include <vector>.
11491 (scope_level::scope_level(const gdb_xml_element *))
11492 (scope_level::scope_level(scope_level&&)): New.
11493 (scope_level::~scope_level): New.
11494 (scope_level_s): Delete.
11495 (gdb_xml_parser::scopes): Now a std::vector.
11496 (gdb_xml_body_text, gdb_xml_start_element, gdb_xml_end_element):
11497 Use std::vector.
11498 (gdb_xml_parser::~gdb_xml_parser): Remove now unnecessary
11499 scope cleanup code.
11500 (gdb_xml_parser::gdb_xml_parser): Remove explicit initialization
11501 of the scopes member. Use std::vector::emplace_back.
11502
11503 2017-04-18 Pedro Alves <palves@redhat.com>
11504
11505 * xml-support.c (gdb_xml_parser): Add ctor/dtor. Make is_xinclude
11506 a bool.
11507 (gdb_xml_end_element): Change type of first parameter.
11508 (gdb_xml_cleanup): Rename to ...
11509 (gdb_xml_parser::~gdb_xml_parser): ... this.
11510 (gdb_xml_create_parser_and_cleanup): Delete with ...
11511 (gdb_xml_parser::gdb_xml_parser): ... creation parts factored out
11512 to this new ctor.
11513 (gdb_xml_parse_quick): Create a local gdb_xml_parser instead of
11514 using gdb_xml_create_parser_and_cleanup.
11515 (xinclude_parsing_data): Add ctor/dtor.
11516 (xml_xinclude_cleanup): Delete.
11517 (xml_process_xincludes): Create a local xinclude_parsing_data
11518 instead of heap-allocating one. Create a local gdb_xml_parser
11519 instead of heap-allocating one with
11520 gdb_xml_create_parser_and_cleanup.
11521
11522 2017-04-18 John Baldwin <jhb@FreeBSD.org>
11523
11524 PR threads/20743
11525 * fbsd-nat.c (resume_one_thread_cb): Remove.
11526 (resume_all_threads_cb): Remove.
11527 (fbsd_resume): Use ALL_NON_EXITED_THREADS instead of
11528 iterate_over_threads.
11529
11530 2017-04-17 Joel Brobecker <brobecker@adacore.com>
11531
11532 * NEWS: Create a new section for the next release branch.
11533 Rename the section of the current branch, now that it has
11534 been cut.
11535
11536 2017-04-17 Joel Brobecker <brobecker@adacore.com>
11537
11538 GDB 8.0 branch created (725bf5cf125783c2a7ca4ab63d3768e220bab2db):
11539 * version.in: Bump version to 8.0.50.DATE-git.
11540
11541 2017-04-13 Sergio Durigan Junior <sergiodj@redhat.com>
11542
11543 PR gdb/21385
11544 * windows-nat.c (windows_create_inferior): Declare 'allargs'
11545 independently of the host, and fix build breakage on Cygwin.
11546
11547 2017-04-13 Pedro Alves <palves@redhat.com>
11548
11549 * inferior.c (free_inferior): Convert to ...
11550 (inferior::~inferior): ... this dtor.
11551 (inferior::inferior): New ctor, factored out from ...
11552 (add_inferior_silent): ... here. Allocate the inferior with a new
11553 expression.
11554 (delete_inferior): Call delete instead of free_inferior.
11555 * inferior.h (gdb_environ, continuation): Forward declare.
11556 (inferior): Now a class. Add in-class initialization to all
11557 members. Make boolean fields bool, except 'detaching'.
11558 (inferior::inferior): New explicit ctor.
11559 (inferior::~inferior): New.
11560
11561 2017-04-13 Pedro Alves <palves@redhat.com>
11562
11563 * inferior.c (init_inferior_list): Delete.
11564 * inferior.h (init_inferior_list): Delete.
11565
11566 2017-04-13 Pedro Alves <palves@redhat.com>
11567
11568 PR threads/13217
11569 * gdb.threads/threadapply.exp (thr_apply_detach): New procedure.
11570 (top level): Call it twice, with different thread sets.
11571
11572 2017-04-13 Pedro Alves <palves@redhat.com>
11573
11574 * thread.c: Include <algorithm>.
11575 (thread_array_cleanup): Delete.
11576 (scoped_inc_dec_ref): New class.
11577 (live_threads_count): New function.
11578 (set_thread_refcount): Delete.
11579 (tp_array_compar_ascending): Now a bool.
11580 (tp_array_compar): Convert to a std::sort comparison function.
11581 (thread_apply_all_command): Use std::vector and scoped_inc_dec_ref
11582 and live_threads_count.
11583
11584 2017-04-13 Pedro Alves <palves@redhat.com>
11585
11586 * infrun.c (follow_fork_inferior): Also switch the current
11587 inferior.
11588
11589 2017-04-13 Pedro Alves <palves@redhat.com>
11590
11591 * breakpoint.c (watch_command_1): Save watchpoint-frame info
11592 before calling create_internal_breakpoint.
11593
11594 2017-04-13 Pedro Alves <palves@redhat.com>
11595
11596 * fork-child.c (execv_argv): New class.
11597 (breakup_args): Refactored as ...
11598 (execv_argv::init_for_no_shell): .. this method of execv_argv.
11599 Copy arguments to storage and replace separators with NULL
11600 terminators in place.
11601 (escape_bang_in_quoted_argument): Adjust to return bool.
11602 (execv_argv::execv_argv): New ctor.
11603 (execv_argv::init_for_shell): New method, factored out from
11604 fork_inferior. Don't strdup strings into the vector.
11605 (fork_inferior): Eliminate "shell" local and use execv_argv. Use
11606 Remove free_vector_argv call.
11607
11608 2017-04-13 Yao Qi <yao.qi@linaro.org>
11609
11610 * rx-tdep.c (rx_fpsw_type): Check tdep->rx_fpsw_type instead of
11611 tdep->rx_psw_type.
11612
11613 2017-04-13 Yao Qi <yao.qi@linaro.org>
11614
11615 * rl78-tdep.c (rl78_gdbarch_init): Use XCNEW instead of XNEW.
11616 * rx-tdep.c (rx_gdbarch_init): Likewise.
11617
11618 2017-04-13 Pedro Alves <palves@redhat.com>
11619
11620 * breakpoint.h (struct breakpoint): Reindent.
11621
11622 2017-04-13 Pedro Alves <palves@redhat.com>
11623
11624 * breakpoint.c (bp_location): Rename to ...
11625 (bp_locations): ... this. All references updated.
11626 (bp_location_count): Rename to ...
11627 (bp_locations_count): ... this. All references updated.
11628 (bp_location_placed_address_before_address_max): Rename to ...
11629 (bp_locations_placed_address_before_address_max): ... this. All
11630 references updated.
11631 (bp_location_shadow_len_after_address_max): Rename to ...
11632 (bp_locations_shadow_len_after_address_max): ... this. All
11633 references updated.
11634 (bp_location_compare_addrs): Rename to ...
11635 (bp_locations_compare_addrs): ... this. All references updated.
11636 (bp_location_compare):Rename to ...
11637 (bp_locations_compare): ... this. All references updated.
11638 (bp_location_target_extensions_update): Rename to ...
11639 (bp_locations_target_extensions_update): ... this. All references
11640 updated.
11641
11642 2017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
11643
11644 * Makefile.in (HFILES_NO_SRCDIR): Add "common/gdb_termios.h".
11645 * common/common.m4: Check headers 'termios.h', 'termio.h' and
11646 'sgtty.h'.
11647 * common/gdb_termios.h: New file, with parts of "terminal.h".
11648 * inflow.c: Include "gdb_termios.h".
11649 * ser-unix.c: Include "gdb_termios.h".
11650 * terminal.h: Move terminal-related defines to
11651 "common/gdb_termios.h".
11652
11653 2017-04-12 Tom Tromey <tom@tromey.com>
11654
11655 * probe.c (parse_probes): Update.
11656 * location.h (delete_event_location): Don't declare.
11657 (event_location_deleter::operator()): Update.
11658 * location.c (event_location_deleter::operator()): Rename from
11659 delete_event_location.
11660 * linespec.h (linespec_result) <location>: Change type to
11661 event_location_up.
11662 * linespec.c (canonicalize_linespec, event_location_to_sals)
11663 (decode_objc): Update.
11664 (linespec_result): Don't call delete_event_location.
11665 * breakpoint.c (create_breakpoints_sal)
11666 (bkpt_probe_create_sals_from_location)
11667 (strace_marker_create_sals_from_location): Update.
11668
11669 2017-04-12 Tom Tromey <tom@tromey.com>
11670
11671 * linespec.h (struct linespec_result): Add constructor and
11672 destructor.
11673 (init_linespec_result, destroy_linespec_result)
11674 (make_cleanup_destroy_linespec_result): Don't declare.
11675 * linespec.c (init_linespec_result): Remove.
11676 (linespec_result::~linespec_result): Rename from
11677 destroy_linespec_result. Update.
11678 (cleanup_linespec_result, make_cleanup_destroy_linespec_result):
11679 Remove.
11680 * breakpoint.c (create_breakpoint, break_range_command)
11681 (decode_location_default): Update.
11682 * ax-gdb.c (agent_command_1): Update.
11683
11684 2017-04-12 Tom Tromey <tom@tromey.com>
11685
11686 * remote.c (remote_download_tracepoint): Update.
11687 * python/py-breakpoint.c (bppy_get_location): Update.
11688 * guile/scm-breakpoint.c (bpscm_print_breakpoint_smob)
11689 (gdbscm_breakpoint_location): Update.
11690 * elfread.c (elf_gnu_ifunc_resolver_return_stop): Update.
11691 * breakpoint.h (struct breakpoint) <location, location_range_end>:
11692 Change type to event_location_up.
11693 * breakpoint.c (create_overlay_event_breakpoint)
11694 (create_longjmp_master_breakpoint)
11695 (create_std_terminate_master_breakpoint)
11696 (create_exception_master_breakpoint)
11697 (breakpoint_event_location_empty_p, print_breakpoint_location)
11698 (print_one_breakpoint_location, create_thread_event_breakpoint)
11699 (init_breakpoint_sal, create_breakpoint)
11700 (print_recreate_ranged_breakpoint, break_range_command)
11701 (init_ada_exception_breakpoint, say_where): Update.
11702 (base_breakpoint_dtor): Don't call delete_event_location.
11703 (bkpt_print_recreate, tracepoint_print_recreate)
11704 (dprintf_print_recreate, update_static_tracepoint)
11705 (breakpoint_re_set_default): Update.
11706
11707 2017-04-12 Tom Tromey <tom@tromey.com>
11708
11709 * compile/compile-loc2c.c (compute_stack_depth_worker): Change
11710 type of "to_do". Update.
11711 (compute_stack_depth): Use std::vector.
11712
11713 2017-04-12 Tom Tromey <tom@tromey.com>
11714
11715 * printcmd.c (find_instruction_backward): Use std::vector.
11716
11717 2017-04-12 Tom Tromey <tom@tromey.com>
11718
11719 * symfile.c (objfilep): Remove typedef.
11720 (reread_symbols): Use a std::vector.
11721
11722 2017-04-12 Tom Tromey <tom@tromey.com>
11723
11724 * mi/mi-main.c (exec_direction_forward): Remove.
11725 (exec_reverse_continue, mi_execute_command): Use scoped_restore.
11726 * guile/scm-ports.c (ioscm_with_output_to_port_worker): Use
11727 scoped_restore.
11728 * guile/guile.c (guile_repl_command, guile_command)
11729 (gdbscm_execute_gdb_command): Use scoped_restore.
11730 * go-exp.y (go_parse): Use scoped_restore.
11731 * d-exp.y (d_parse): Use scoped_restore.
11732 * cli/cli-decode.c (cmd_func): Use scoped_restore.
11733 * c-exp.y (c_parse): Use scoped_restore.
11734
11735 2017-04-12 Tom Tromey <tom@tromey.com>
11736
11737 * mi/mi-parse.h (struct mi_parse): Add constructor, destructor.
11738 (mi_parse): Update return type.
11739 (mi_parse_free): Remove.
11740 * mi/mi-parse.c (mi_parse::mi_parse): New constructor.
11741 (mi_parse::~mi_parse): Rename from mi_parse_free.
11742 (mi_parse_cleanup): Remove.
11743 (mi_parse): Return a unique_ptr. Use new.
11744 * mi/mi-main.c (mi_execute_command): Update.
11745
11746 2017-04-12 Tom Tromey <tom@tromey.com>
11747
11748 * location.c (explicit_location_lex_one): Return a
11749 unique_xmalloc_ptr.
11750 (string_to_explicit_location): Update. Remove cleanups.
11751
11752 2017-04-12 Tom Tromey <tom@tromey.com>
11753
11754 * gnu-v3-abi.c (value_and_voffset_p): Remove typedef.
11755 (compare_value_and_voffset): Change type. Update.
11756 (compute_vtable_size): Change type of "offset_vec".
11757 (gnuv3_print_vtable): Use std::vector. Remove cleanups.
11758 (gnuv3_get_typeid): Remove extraneous declaration.
11759
11760 2017-04-12 Tom Tromey <tom@tromey.com>
11761
11762 * charset.h (wchar_iterator): Fix comment.
11763
11764 2017-04-12 Tom Tromey <tom@tromey.com>
11765
11766 * charset.c (iconv_wrapper): New class.
11767 (cleanup_iconv): Remove.
11768 (convert_between_encodings): Use it.
11769
11770 2017-04-12 Tom Tromey <tom@tromey.com>
11771
11772 * symfile.h (increment_reading_symtab): Update type.
11773 * symfile.c (decrement_reading_symtab): Remove.
11774 (increment_reading_symtab): Return a scoped_restore_tmpl<int>.
11775 * psymtab.c (psymtab_to_symtab): Update.
11776 * dwarf2read.c (dw2_instantiate_symtab): Update.
11777
11778 2017-04-12 Tom Tromey <tom@tromey.com>
11779
11780 * jit.c (struct jit_reader): Declare separately. Add constructor
11781 and destructor. Change type of "handle".
11782 (loaded_jit_reader): Define separately.
11783 (jit_reader_load): Update. New "new".
11784 (jit_reader_unload_command): Use "delete".
11785 * gdb-dlfcn.h (struct dlclose_deleter): New.
11786 (gdb_dlhandle_up): New typedef.
11787 (gdb_dlopen, gdb_dlsym): Update types.
11788 (gdb_dlclose): Remove.
11789 * gdb-dlfcn.c (gdb_dlopen): Return a gdb_dlhandle_up.
11790 (gdb_dlsym): Change type of "handle".
11791 (make_cleanup_dlclose): Remove.
11792 (dlclose_deleter::operator()): Rename from gdb_dlclose.
11793 * compile/compile-c-support.c (load_libcc): Update.
11794
11795 2017-04-12 Tom Tromey <tom@tromey.com>
11796
11797 * symtab.h (find_pcs_for_symtab_line): Change return type.
11798 * symtab.c (find_pcs_for_symtab_line): Change return type.
11799 * python/py-linetable.c (build_line_table_tuple_from_pcs): Change
11800 type of "vec". Update.
11801 (ltpy_get_pcs_for_line): Update.
11802 * linespec.c (decode_digits_ordinary): Update.
11803
11804 2017-04-12 Tom Tromey <tom@tromey.com>
11805
11806 * tracepoint.c (actions_command): Update.
11807 * python/python.c (python_command, python_interactive_command):
11808 Update.
11809 * mi/mi-cmd-break.c (mi_cmd_break_commands): Update.
11810 * guile/guile.c (guile_command): Update.
11811 * defs.h (read_command_lines, read_command_lines_1): Return
11812 command_line_up.
11813 (command_lines_deleter): New struct.
11814 (command_line_up): New typedef.
11815 * compile/compile.c (compile_code_command)
11816 (compile_print_command): Update.
11817 * cli/cli-script.h (get_command_line, copy_command_lines): Return
11818 command_line_up.
11819 (make_cleanup_free_command_lines): Remove.
11820 * cli/cli-script.c (get_command_line, read_command_lines_1)
11821 (copy_command_lines): Return command_line_up.
11822 (while_command, if_command, read_command_lines, define_command)
11823 (document_command): Update.
11824 (do_free_command_lines_cleanup, make_cleanup_free_command_lines):
11825 Remove.
11826 * breakpoint.h (breakpoint_set_commands): Change type of
11827 "commands".
11828 * breakpoint.c (breakpoint_set_commands): Change type of
11829 "commands". Update.
11830 (do_map_commands_command, update_dprintf_command_list)
11831 (create_tracepoint_from_upload): Update.
11832
11833 2017-04-12 Tom Tromey <tom@tromey.com>
11834
11835 * tracepoint.c (scope_info): Update.
11836 * spu-tdep.c (spu_catch_start): Update.
11837 * python/python.c (gdbpy_decode_line): Update.
11838 * python/py-finishbreakpoint.c (bpfinishpy_init): Update.
11839 * python/py-breakpoint.c (bppy_init): Update.
11840 * probe.c (parse_probes): Update.
11841 * mi/mi-cmd-break.c (mi_cmd_break_insert_1): Update.
11842 * location.h (event_location_deleter): New struct.
11843 (event_location_up): New typedef.
11844 (new_linespec_location, new_address_location, new_probe_location)
11845 (new_explicit_location, copy_event_location)
11846 (string_to_event_location, string_to_event_location_basic)
11847 (string_to_explicit_location): Update return type.
11848 (make_cleanup_delete_event_location): Remove.
11849 * location.c (new_linespec_location, new_address_location)
11850 (new_probe_location, new_explicit_location, copy_event_location):
11851 Return event_location_up.
11852 (delete_event_location_cleanup)
11853 (make_cleanup_delete_event_location): Remove.
11854 (string_to_explicit_location, string_to_event_location_basic)
11855 (string_to_event_location): Return event_location_up.
11856 * linespec.c (canonicalize_linespec, event_location_to_sals)
11857 (decode_line_with_current_source)
11858 (decode_line_with_last_displayed, decode_objc): Update.
11859 * guile/scm-breakpoint.c (gdbscm_register_breakpoint_x): Update.
11860 * completer.c (location_completer): Update.
11861 * cli/cli-cmds.c (edit_command, list_command): Update.
11862 * breakpoint.c (create_overlay_event_breakpoint)
11863 (create_longjmp_master_breakpoint)
11864 (create_std_terminate_master_breakpoint)
11865 (create_exception_master_breakpoint)
11866 (create_thread_event_breakpoint): Update.
11867 (init_breakpoint_sal): Update. Remove some dead code.
11868 (create_breakpoint_sal): Change type of "location". Update.
11869 (create_breakpoints_sal, create_breakpoint, break_command_1)
11870 (dprintf_command, break_range_command, until_break_command)
11871 (init_ada_exception_breakpoint)
11872 (strace_marker_create_sals_from_location)
11873 (update_static_tracepoint, trace_command, ftrace_command)
11874 (strace_command, create_tracepoint_from_upload): Update.
11875 * break-catch-throw.c (re_set_exception_catchpoint): Update.
11876 * ax-gdb.c (agent_command_1): Update.
11877
11878 2017-04-12 Pedro Alves <palves@redhat.com>
11879
11880 * Makefile.in (ALL_TARGET_OBS): Add i386-go32-tdep.o.
11881 * configure.tgt: Handle i[34567]86-*-go32* and
11882 i[34567]86-*-msdosdjgpp*.
11883 * i386-tdep.c (i386_svr4_reg_to_regnum):
11884 Make extern.
11885 (i386_go32_init_abi, i386_coff_osabi_sniffer): Moved to
11886 i386-go32-tdep.c.
11887 (_initialize_i386_tdep): DJGPP bits moved to i386-go32-tdep.c.
11888 * i386-go32-tdep.c: New file.
11889 * i386-tdep.h (tdesc_i386_mmx, i386_svr4_reg_to_regnum): New
11890 declarations.
11891
11892 2017-04-12 Simon Marchi <simon.marchi@ericsson.com>
11893
11894 * aix-thread.c (pd_status2str): Change return type to const char *.
11895
11896 2017-04-12 Pedro Alves <palves@redhat.com>
11897
11898 * i386-tdep.c (i386_elf_init_abi, i386_go32_init_abi): Remove
11899 calls to set_gdbarch_gnu_triplet_regexp.
11900
11901 2017-04-12 Pedro Alves <palves@redhat.com>
11902
11903 PR gdb/21323
11904 * c-lang.c (cplus_primitive_types) <cplus_primitive_type_wchar_t>:
11905 New enum value.
11906 (cplus_language_arch_info): Register cplus_primitive_type_wchar_t.
11907 * gdbtypes.h (struct builtin_type) <builtin_wchar>: New field.
11908 * gdbtypes.c (gdbtypes_post_init): Create the "wchar_t" type.
11909 * gdbarch.sh (wchar_bit, wchar_signed): New per-arch values.
11910 * gdbarch.h, gdbarch.c: Regenerate.
11911 * aarch64-tdep.c (aarch64_gdbarch_init): Override
11912 gdbarch_wchar_bit and gdbarch_wchar_signed.
11913 * alpha-tdep.c (alpha_gdbarch_init): Likewise.
11914 * arm-tdep.c (arm_gdbarch_init): Likewise.
11915 * avr-tdep.c (avr_gdbarch_init): Likewise.
11916 * h8300-tdep.c (h8300_gdbarch_init): Likewise.
11917 * i386-nto-tdep.c (i386nto_init_abi): Likewise.
11918 * i386-tdep.c (i386_go32_init_abi): Likewise.
11919 * m32r-tdep.c (m32r_gdbarch_init): Likewise.
11920 * moxie-tdep.c (moxie_gdbarch_init): Likewise.
11921 * nds32-tdep.c (nds32_gdbarch_init): Likewise.
11922 * rs6000-aix-tdep.c (rs6000_aix_init_osabi): Likewise.
11923 * sh-tdep.c (sh_gdbarch_init): Likewise.
11924 * sparc-tdep.c (sparc32_gdbarch_init): Likewise.
11925 * sparc64-tdep.c (sparc64_init_abi): Likewise.
11926 * windows-tdep.c (windows_init_abi): Likewise.
11927 * xstormy16-tdep.c (xstormy16_gdbarch_init): Likewise.
11928
11929 2017-04-12 Pedro Alves <palves@redhat.com>
11930
11931 PR c++/21323
11932 * c-lang.c (cplus_primitive_types) <cplus_primitive_type_char16_t,
11933 cplus_primitive_type_char32_t>: New enum values.
11934 (cplus_language_arch_info): Register cplus_primitive_type_char16_t
11935 and cplus_primitive_type_char32_t.
11936 * dwarf2read.c (read_base_type) <DW_ATE_UTF>: If bit size is 16 or
11937 32, use the archtecture's built-in type for char16_t and char32_t,
11938 respectively. Otherwise, fallback to init_integer_type as before,
11939 but make the type unsigned, and issue a complaint.
11940 * gdbtypes.c (gdbtypes_post_init): Make char16_t and char32_t unsigned.
11941
11942 2017-04-12 Alan Hayward <alan.hayward@arm.com>
11943
11944 * m32r-tdep.c (M32R_ARG_REGISTER_SIZE): Added.
11945 (m32r_push_dummy_call): Use M32R_ARG_REGISTER_SIZE.
11946
11947 2017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
11948
11949 * windows-nat.c (windows_create_inferior): Declare 'toexec' as
11950 'const char *'.
11951
11952 2017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
11953
11954 * common/common-utils.c (free_vector_argv): New function.
11955 * common/common-utils.h: Include <vector>.
11956 (free_vector_argv): New prototype.
11957 * darwin-nat.c (darwin_create_inferior): Rewrite function
11958 prototype in order to constify "exec_file" and accept a
11959 "std::string" for "allargs".
11960 * fork-child.c: Include <vector>.
11961 (breakup_args): Rewrite function, using C++.
11962 (fork_inferior): Rewrite function header, constify "exec_file_arg"
11963 and accept "std::string" for "allargs". Update the code to
11964 calculate "argv" based on "allargs". Update calls to "exec_fun"
11965 and "execvp".
11966 * gnu-nat.c (gnu_create_inferior): Rewrite function prototype in
11967 order to constify "exec_file" and accept a "std::string" for
11968 "allargs".
11969 * go32-nat.c (go32_create_inferior): Likewise.
11970 * inf-ptrace.c (inf_ptrace_create_inferior): Likewise.
11971 * infcmd.c (run_command_1): Constify "exec_file". Use
11972 "std::string" for inferior arguments.
11973 * inferior.h (fork_inferior): Update prototype.
11974 * linux-nat.c (linux_nat_create_inferior): Rewrite function
11975 prototype in order to constify "exec_file" and accept a
11976 "std::string" for "allargs".
11977 * nto-procfs.c (procfs_create_inferior): Likewise.
11978 * procfs.c (procfs_create_inferior): Likewise.
11979 * remote-sim.c (gdbsim_create_inferior): Likewise.
11980 * remote.c (extended_remote_run): Update code to accept
11981 "std::string" as argument.
11982 (extended_remote_create_inferior): Rewrite function prototype in
11983 order to constify "exec_file" and accept a "std::string" for
11984 "allargs".
11985 * rs6000-nat.c (super_create_inferior): Likewise.
11986 (rs6000_create_inferior): Likewise.
11987 * target.h (struct target_ops) <to_create_inferior>: Likewise.
11988 * windows-nat.c (windows_create_inferior): Likewise.
11989
11990 2017-04-11 Pedro Alves <palves@redhat.com>
11991
11992 * thread.c: Fix whitespace throughout.
11993
11994 2017-04-11 Philipp Rudo <prudo@linux.vnet.ibm.com>
11995
11996 * linux-nat.c (linux_nat_detach): Remove delete_lwp call.
11997
11998 2017-04-11 Alan Hayward <alan.hayward@arm.com>
11999
12000 * arm-tdep.c (arm_store_return_value): Use FP_REGISTER_SIZE
12001
12002 2017-04-10 Sergio Durigan Junior <sergiodj@redhat.com>
12003
12004 PR gdb/21364
12005 * osdata.c (info_osdata): Check if 'type' is an empty string
12006 instead of NULL.
12007
12008 2017-04-10 Pedro Alves <palves@redhat.com>
12009
12010 * thread.c (add_thread_silent, delete_thread_1, find_thread_ptid)
12011 (ptid_to_global_thread_id, in_thread_list)
12012 (do_captured_list_thread_ids, set_resumed, set_running)
12013 (set_executing, set_stop_requested, finish_thread_state)
12014 (validate_registers_access, can_access_registers_ptid)
12015 (print_thread_info_1, switch_to_thread)
12016 (do_restore_current_thread_cleanup)
12017 (make_cleanup_restore_current_thread, thread_command)
12018 (thread_name_command): Use operator== instead of ptid_equal.
12019
12020 2017-04-10 Pedro Alves <palves@redhat.com>
12021
12022 * thread.c (struct current_thread_cleanup) <next>: Delete field.
12023 (current_thread_cleanup_chain): Delete.
12024 (restore_current_thread_cleanup_dtor)
12025 (make_cleanup_restore_current_thread): Remove references to
12026 current_thread_cleanup_chain.
12027
12028 2017-04-10 Alan Hayward <alan.hayward@arm.com>
12029
12030 * msp430-tdep.c (msp430_pseudo_register_read): Never return
12031 REG_UNKNOWN.
12032
12033 2017-04-10 Yao Qi <yao.qi@linaro.org>
12034
12035 PR gdb/19942
12036 * gdbthread.h (thread_info::deletable): New method.
12037 (thread_info::incref): New method.
12038 (thread_info::decref): New method.
12039 (thread_info::refcount): Move it to private.
12040 * infrun.c (save_stop_context): Call inc_refcount.
12041 (release_stop_context_cleanup): Likewise.
12042 * thread.c (set_thread_exited): New function.
12043 (init_thread_list): Delete "tp" only it is deletable, otherwise
12044 call set_thread_exited.
12045 (delete_thread_1): Call set_thread_exited.
12046 (current_thread_cleanup) <inferior_pid>: Remove.
12047 <thread>: New field.
12048 (restore_current_thread_ptid_changed): Removed.
12049 (do_restore_current_thread_cleanup): Adjust.
12050 (restore_current_thread_cleanup_dtor): Don't call
12051 find_thread_ptid.
12052 (set_thread_refcount): Use dec_refcount.
12053 (make_cleanup_restore_current_thread): Adjust.
12054 (thread_apply_all_command): Call inc_refcount.
12055 (_initialize_thread): Don't call
12056 observer_attach_thread_ptid_changed.
12057
12058 2017-04-10 Yao Qi <yao.qi@linaro.org>
12059
12060 * thread.c (delete_thread_1): Hoist code on marking thread as
12061 exited.
12062
12063 2017-04-09 Simon Marchi <simon.marchi@polymtl.ca>
12064
12065 * windows-nat.c (windows_detach): Initialize ptid with
12066 minus_one_ptid.
12067
12068 2017-04-07 Simon Marchi <simon.marchi@ericsson.com>
12069
12070 * unittests/ptid-selftests.c: Fix erroneous assert messages.
12071
12072 2017-04-07 Alan Hayward <alan.hayward@arm.com>
12073
12074 * bfin-tdep.c (BFIN_MAX_REGISTER_SIZE): Add.
12075 (bfin_pseudo_register_read): Use BFIN_MAX_REGISTER_SIZE.
12076 (bfin_pseudo_register_write): Likewise
12077
12078 2017-04-06 Simon Marchi <simon.marchi@ericsson.com>
12079
12080 * common/ptid.h (struct ptid): Change to...
12081 (class ptid_t): ... this.
12082 <ptid_t>: New constructors.
12083 <pid, lwp_p, lwp, tid_p, tid, is_pid, operator==, operator!=,
12084 matches>: New methods.
12085 <make_null, make_minus_one>: New static methods.
12086 <pid>: Rename to...
12087 <m_pid>: ...this.
12088 <lwp>: Rename to...
12089 <m_lwp>: ...this.
12090 <tid>: Rename to...
12091 <m_tid>: ...this.
12092 (ptid_build, ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal,
12093 ptid_is_pid, ptid_lwp_p, ptid_tid_p, ptid_match): Take ptid arguments
12094 as references, move comment to class ptid_t.
12095 * common/ptid.c (null_ptid, minus_one_ptid): Initialize with
12096 ptid_t static methods.
12097 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_tid,
12098 ptid_equal, ptid_is_pid, ptid_lwp_p, ptid_tid_p, ptid_match):
12099 Take ptid arguments as references, implement using ptid_t methods.
12100 * unittests/ptid-selftests.c: New file.
12101 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
12102 unittests/ptid-selftests.c.
12103 (SUBDIR_UNITTESTS_OBS): Add unittests/ptid-selftests.o.
12104
12105 2017-04-06 Thomas Preud'homme <thomas.preudhomme@arm.com>
12106
12107 * python/python.c (python_run_simple_file): Cast mode literal to
12108 non-const char pointer as expected by PyFile_FromString.
12109
12110 2017-04-05 Simon Marchi <simon.marchi@ericsson.com>
12111
12112 * common/ptid.c (ptid_lwp_p, ptid_tid_p): Remove comparison with
12113 minus_one_ptid and null_ptid.
12114
12115 2017-04-05 Pedro Alves <palves@redhat.com>
12116
12117 * warning.m4 (build_warnings): Remove -Wno-write-strings.
12118 * configure: Regenerate.
12119
12120 2017-04-05 Pedro Alves <palves@redhat.com>
12121
12122 * ada-exp.y (yyerror): Constify.
12123 * ada-lang.c (bound_name, get_selections)
12124 (ada_variant_discrim_type)
12125 (ada_variant_discrim_name, ada_value_struct_elt)
12126 (ada_lookup_struct_elt_type, is_unchecked_variant)
12127 (ada_which_variant_applies, standard_exc, ada_get_next_arg)
12128 (catch_ada_exception_command_split)
12129 (catch_ada_assert_command_split, catch_assert_command)
12130 (ada_op_name): Constify.
12131 * ada-lang.h (ada_yyerror, get_selections)
12132 (ada_variant_discrim_name, ada_value_struct_elt): Constify.
12133 * arc-tdep.c (arc_print_frame_cache): Constify.
12134 * arm-tdep.c (arm_skip_stub): Constify.
12135 * ax-gdb.c (gen_binop, gen_struct_ref_recursive, gen_struct_ref)
12136 (gen_aggregate_elt_ref): Constify.
12137 * bcache.c (print_bcache_statistics): Constify.
12138 * bcache.h (print_bcache_statistics): Constify.
12139 * break-catch-throw.c (catch_exception_command_1):
12140 * breakpoint.c (struct ep_type_description::description):
12141 Constify.
12142 (add_solib_catchpoint): Constify.
12143 (catch_fork_command_1): Add cast.
12144 (add_catch_command): Constify.
12145 * breakpoint.h (add_catch_command, add_solib_catchpoint):
12146 Constify.
12147 * bsd-uthread.c (bsd_uthread_state): Constify.
12148 * buildsym.c (patch_subfile_names): Constify.
12149 * buildsym.h (next_symbol_text_func, patch_subfile_names):
12150 Constify.
12151 * c-exp.y (yyerror): Constify.
12152 (token::oper): Constify.
12153 * c-lang.h (c_yyerror, cp_print_class_member): Constify.
12154 * c-varobj.c (cplus_describe_child): Constify.
12155 * charset.c (find_charset_names): Add cast.
12156 (find_charset_names): Constify array and add const_cast.
12157 * cli/cli-cmds.c (complete_command, cd_command): Constify.
12158 (edit_command): Constify.
12159 * cli/cli-decode.c (lookup_cmd): Constify.
12160 * cli/cli-dump.c (dump_memory_command, dump_value_command):
12161 Constify.
12162 (struct dump_context): Constify.
12163 (add_dump_command, restore_command): Constify.
12164 * cli/cli-script.c (get_command_line): Constify.
12165 * cli/cli-script.h (get_command_line): Constify.
12166 * cli/cli-utils.c (check_for_argument): Constify.
12167 * cli/cli-utils.h (check_for_argument): Constify.
12168 * coff-pe-read.c (struct read_pe_section_data): Constify.
12169 * command.h (lookup_cmd): Constify.
12170 * common/print-utils.c (decimal2str): Constify.
12171 * completer.c (gdb_print_filename): Constify.
12172 * corefile.c (set_gnutarget): Constify.
12173 * cp-name-parser.y (yyerror): Constify.
12174 * cp-valprint.c (cp_print_class_member): Constify.
12175 * cris-tdep.c (cris_register_name, crisv32_register_name):
12176 Constify.
12177 * d-exp.y (yyerror): Constify.
12178 (struct token::oper): Constify.
12179 * d-lang.h (d_yyerror): Constify.
12180 * dbxread.c (struct header_file_location::name): Constify.
12181 (add_old_header_file, add_new_header_file, last_function_name)
12182 (dbx_next_symbol_text, add_bincl_to_list)
12183 (find_corresponding_bincl_psymtab, set_namestring)
12184 (find_stab_function_addr, read_dbx_symtab, start_psymtab)
12185 (dbx_end_psymtab, read_ofile_symtab, process_one_symbol):
12186 * defs.h (command_line_input, print_address_symbolic)
12187 (deprecated_readline_begin_hook): Constify.
12188 * dwarf2read.c (anonymous_struct_prefix, dwarf_bool_name):
12189 Constify.
12190 * event-top.c (handle_line_of_input): Constify and add cast.
12191 * exceptions.c (catch_errors): Constify.
12192 * exceptions.h (catch_errors): Constify.
12193 * expprint.c (print_subexp_standard, op_string, op_name)
12194 (op_name_standard, dump_raw_expression, dump_raw_expression):
12195 * expression.h (op_name, op_string, dump_raw_expression):
12196 Constify.
12197 * f-exp.y (yyerror): Constify.
12198 (struct token::oper): Constify.
12199 (struct f77_boolean_val::name): Constify.
12200 * f-lang.c (f_word_break_characters): Constify.
12201 * f-lang.h (f_yyerror): Constify.
12202 * fork-child.c (fork_inferior): Add cast.
12203 * frv-tdep.c (struct gdbarch_tdep::register_names): Constify.
12204 (new_variant): Constify.
12205 * gdbarch.sh (pstring_ptr, pstring_list): Constify.
12206 * gdbarch.c: Regenerate.
12207 * gdbcore.h (set_gnutarget): Constify.
12208 * go-exp.y (yyerror): Constify.
12209 (token::oper): Constify.
12210 * go-lang.h (go_yyerror): Constify.
12211 * go32-nat.c (go32_sysinfo): Constify.
12212 * guile/scm-breakpoint.c (gdbscm_breakpoint_expression): Constify.
12213 * guile/scm-cmd.c (cmdscm_function): Constify.
12214 * guile/scm-param.c (pascm_param_value): Constify.
12215 * h8300-tdep.c (h8300_register_name, h8300s_register_name)
12216 (h8300sx_register_name): Constify.
12217 * hppa-tdep.c (hppa32_register_name, hppa64_register_name):
12218 Constify.
12219 * ia64-tdep.c (ia64_register_names): Constify.
12220 * infcmd.c (construct_inferior_arguments): Constify.
12221 (path_command, attach_post_wait): Constify.
12222 * language.c (show_range_command, show_case_command)
12223 (unk_lang_error): Constify.
12224 * language.h (language_defn::la_error)
12225 (language_defn::la_name_of_this): Constify.
12226 * linespec.c (decode_line_2): Constify.
12227 * linux-thread-db.c (thread_db_err_str): Constify.
12228 * lm32-tdep.c (lm32_register_name): Constify.
12229 * m2-exp.y (yyerror): Constify.
12230 * m2-lang.h (m2_yyerror): Constify.
12231 * m32r-tdep.c (m32r_register_names): Constify and make static.
12232 * m68hc11-tdep.c (m68hc11_register_names): Constify.
12233 * m88k-tdep.c (m88k_register_name): Constify.
12234 * macroexp.c (appendmem): Constify.
12235 * mdebugread.c (fdr_name, add_data_symbol, parse_type)
12236 (upgrade_type, parse_external, parse_partial_symbols)
12237 (mdebug_next_symbol_text, cross_ref, mylookup_symbol, new_psymtab)
12238 (new_symbol): Constify.
12239 * memattr.c (mem_info_command): Constify.
12240 * mep-tdep.c (register_name_from_keyword): Constify.
12241 * mi/mi-cmd-env.c (mi_cmd_env_path, _initialize_mi_cmd_env):
12242 Constify.
12243 * mi/mi-cmd-stack.c (list_args_or_locals): Constify.
12244 * mi/mi-cmd-var.c (mi_cmd_var_show_attributes): Constify.
12245 * mi/mi-main.c (captured_mi_execute_command): Constify and add
12246 cast.
12247 (mi_execute_async_cli_command): Constify.
12248 * mips-tdep.c (mips_register_name): Constify.
12249 * mn10300-tdep.c (register_name, mn10300_generic_register_name)
12250 (am33_register_name, am33_2_register_name)
12251 * moxie-tdep.c (moxie_register_names): Constify.
12252 * nat/linux-osdata.c (osdata_type): Constify fields.
12253 * nto-tdep.c (nto_parse_redirection): Constify.
12254 * objc-lang.c (lookup_struct_typedef, lookup_objc_class)
12255 (lookup_child_selector): Constify.
12256 (objc_methcall::name): Constify.
12257 * objc-lang.h (lookup_objc_class, lookup_child_selector)
12258 (lookup_struct_typedef): Constify.
12259 * objfiles.c (pc_in_section): Constify.
12260 * objfiles.h (pc_in_section): Constify.
12261 * p-exp.y (struct token::oper): Constify.
12262 (yyerror): Constify.
12263 * p-lang.h (pascal_yyerror): Constify.
12264 * parser-defs.h (op_name_standard): Constify.
12265 (op_print::string): Constify.
12266 (exp_descriptor::op_name): Constify.
12267 * printcmd.c (print_address_symbolic): Constify.
12268 * psymtab.c (print_partial_symbols): Constify.
12269 * python/py-breakpoint.c (stop_func): Constify.
12270 (bppy_get_expression): Constify.
12271 * python/py-cmd.c (cmdpy_completer::name): Constify.
12272 (cmdpy_function): Constify.
12273 * python/py-event.c (evpy_add_attribute)
12274 (gdbpy_initialize_event_generic): Constify.
12275 * python/py-event.h (evpy_add_attribute)
12276 (gdbpy_initialize_event_generic): Constify.
12277 * python/py-evts.c (add_new_registry): Constify.
12278 * python/py-finishbreakpoint.c (outofscope_func): Constify.
12279 * python/py-framefilter.c (get_py_iter_from_func): Constify.
12280 * python/py-inferior.c (get_buffer): Add cast.
12281 * python/py-param.c (parm_constant::name): Constify.
12282 * python/py-unwind.c (fprint_frame_id): Constify.
12283 * python/python.c (gdbpy_parameter_value): Constify.
12284 * remote-fileio.c (remote_fio_func_map): Make 'name' const.
12285 * remote.c (memory_packet_config::name): Constify.
12286 (show_packet_config_cmd, remote_write_bytes)
12287 (remote_buffer_add_string):
12288 * reverse.c (exec_reverse_once): Constify.
12289 * rs6000-tdep.c (variant::name, variant::description): Constify.
12290 * rust-exp.y (rustyyerror): Constify.
12291 * rust-lang.c (rust_op_name): Constify.
12292 * rust-lang.h (rustyyerror): Constify.
12293 * serial.h (serial_ops::name): Constify.
12294 * sh-tdep.c (sh_sh_register_name, sh_sh3_register_name)
12295 (sh_sh3e_register_name, sh_sh2e_register_name)
12296 (sh_sh2a_register_name, sh_sh2a_nofpu_register_name)
12297 (sh_sh_dsp_register_name, sh_sh3_dsp_register_name)
12298 (sh_sh4_register_name, sh_sh4_nofpu_register_name)
12299 (sh_sh4al_dsp_register_name): Constify.
12300 * sh64-tdep.c (sh64_register_name): Constify.
12301 * solib-darwin.c (lookup_symbol_from_bfd): Constify.
12302 * spu-tdep.c (spu_register_name, info_spu_dma_cmdlist): Constify.
12303 * stabsread.c (patch_block_stabs, read_type_number)
12304 (ref_map::stabs, ref_add, process_reference)
12305 (symbol_reference_defined, define_symbol, define_symbol)
12306 (error_type, read_type, read_member_functions, read_cpp_abbrev)
12307 (read_one_struct_field, read_struct_fields, read_baseclasses)
12308 (read_tilde_fields, read_struct_type, read_array_type)
12309 (read_enum_type, read_sun_builtin_type, read_sun_floating_type)
12310 (read_huge_number, read_range_type, read_args, common_block_start)
12311 (find_name_end): Constify.
12312 * stabsread.h (common_block_start, define_symbol)
12313 (process_one_symbol, symbol_reference_defined, ref_add):
12314 * symfile.c (get_section_index, add_symbol_file_command):
12315 * symfile.h (get_section_index): Constify.
12316 * target-descriptions.c (tdesc_type::name): Constify.
12317 (tdesc_free_type): Add cast.
12318 * target.c (find_default_run_target):
12319 (add_deprecated_target_alias, find_default_run_target)
12320 (target_announce_detach): Constify.
12321 (do_option): Constify.
12322 * target.h (add_deprecated_target_alias): Constify.
12323 * thread.c (print_thread_info_1): Constify.
12324 * top.c (deprecated_readline_begin_hook, command_line_input):
12325 Constify.
12326 (init_main): Add casts.
12327 * top.h (handle_line_of_input): Constify.
12328 * tracefile-tfile.c (tfile_write_uploaded_tsv): Constify.
12329 * tracepoint.c (tvariables_info_1, trace_status_mi): Constify.
12330 (tfind_command): Rename to ...
12331 (tfind_command_1): ... this and constify.
12332 (tfind_command): New function.
12333 (tfind_end_command, tfind_start_command): Adjust.
12334 (encode_source_string): Constify.
12335 * tracepoint.h (encode_source_string): Constify.
12336 * tui/tui-data.c (tui_partial_win_by_name): Constify.
12337 * tui/tui-data.h (tui_partial_win_by_name): Constify.
12338 * tui/tui-source.c (tui_set_source_content_nil): Constify.
12339 * tui/tui-source.h (tui_set_source_content_nil): Constify.
12340 * tui/tui-win.c (parse_scrolling_args): Constify.
12341 * tui/tui-windata.c (tui_erase_data_content): Constify.
12342 * tui/tui-windata.h (tui_erase_data_content): Constify.
12343 * tui/tui-winsource.c (tui_erase_source_content): Constify.
12344 * tui/tui.c (tui_enable): Add cast.
12345 * utils.c (defaulted_query): Constify.
12346 (init_page_info): Add cast.
12347 (puts_debug, subset_compare): Constify.
12348 * utils.h (subset_compare): Constify.
12349 * varobj.c (varobj_format_string): Constify.
12350 * varobj.h (varobj_format_string): Constify.
12351 * vax-tdep.c (vax_register_name): Constify.
12352 * windows-nat.c (windows_detach): Constify.
12353 * xcoffread.c (process_linenos, xcoff_next_symbol_text): Constify.
12354 * xml-support.c (gdb_xml_end_element): Constify.
12355 * xml-tdesc.c (tdesc_start_reg): Constify.
12356 * xstormy16-tdep.c (xstormy16_register_name): Constify.
12357 * xtensa-tdep.c (xtensa_find_register_by_name): Constify.
12358 * xtensa-tdep.h (xtensa_register_t::name): Constify.
12359
12360 2017-04-05 Pedro Alves <palves@redhat.com>
12361
12362 * proc-api.c (struct trans): Constify.
12363 (procfs_note): Constify.
12364 * proc-events.c (struct trans, syscall_table):
12365 * proc-flags.c (struct trans): Constify.
12366 * proc-utils.h (procfs_note): Constify.
12367 * proc-why.c (struct trans): Constify.
12368 * procfs.c (dead_procinfo, find_syscall, proc_warn, proc_error)
12369 (procfs_detach): Constify.
12370 * sol-thread.c (struct string_map): Constify.
12371 (td_err_string, td_state_string): Constify.
12372
12373 2017-04-05 Pedro Alves <palves@redhat.com>
12374
12375 * proc-api.c (procfs_filename): Don't initialize
12376 procfs_filename.
12377 (prepare_to_trace): Assume procfs_filename is non-NULL.
12378 (_initialize_proc_api): Give procfs_filename a default value here.
12379
12380 2017-04-05 Pedro Alves <palves@redhat.com>
12381
12382 * break-catch-throw.c (handle_gnu_v3_exceptions): Constify
12383 'cond_string' parameter.
12384 (extract_exception_regexp): Constify 'string' parameter.
12385 (catch_exception_command_1): Constify.
12386 * breakpoint.c (init_catchpoint)
12387 (create_fork_vfork_event_catchpoint): Constify 'cond_string'
12388 parameter.
12389 (ep_parse_optional_if_clause, catch_fork_command_1)
12390 (catch_exec_command_1): Constify.
12391 * breakpoint.h (init_catchpoint): Constify 'cond_string'
12392 parameter.
12393 (ep_parse_optional_if_clause): Constify.
12394 * cli/cli-utils.c (remove_trailing_whitespace)
12395 (check_for_argument): Constify.
12396 * cli/cli-utils.h (remove_trailing_whitespace): Constify and add
12397 non-const overload.
12398 (check_for_argument): Likewise.
12399
12400 2017-04-05 Pedro Alves <palves@redhat.com>
12401
12402 * event-top.c (command_line_handler): Add cast to execute_command
12403 call.
12404 * record-btrace.c (cmd_record_btrace_bts_start)
12405 (cmd_record_btrace_pt_start, cmd_record_btrace_start)
12406 (cmd_record_btrace_start): Add cast to execute_command call.
12407 * record-full.c (record_full_goto_insn):
12408 * record.c (record_start, record_stop): Add cast to
12409 execute_command_to_string calls.
12410 (cmd_record_start): Add cast to execute_command calls.
12411
12412 2017-04-05 Pedro Alves <palves@redhat.com>
12413
12414 * python/python-internal.h (gdb_PyArg_ParseTupleAndKeywords): New
12415 static inline function.
12416 * python/py-arch.c (archpy_disassemble): Constify 'keywords'
12417 array and use gdb_PyArg_ParseTupleAndKeywords.
12418 * python/py-cmd.c (cmdpy_init): Likewise.
12419 * python/py-finishbreakpoint.c (bpfinishpy_init): Likewise.
12420 * python/py-inferior.c (infpy_read_memory, infpy_write_memory)
12421 (infpy_search_memory): Likewise.
12422 * python/py-objfile.c (objfpy_add_separate_debug_file)
12423 (gdbpy_lookup_objfile): Likewise.
12424 * python/py-symbol.c (gdbpy_lookup_symbol)
12425 (gdbpy_lookup_global_symbol): Likewise.
12426 * python/py-type.c (gdbpy_lookup_type): Likewise.
12427 * python/py-value.c (valpy_lazy_string, valpy_string): Likewise.
12428 * python/python.c (execute_gdb_command, gdbpy_write, gdbpy_flush):
12429 Likewise.
12430
12431 2017-04-05 Pedro Alves <palves@redhat.com>
12432
12433 * python/python-internal.h (gdb_PyGetSetDef): New type.
12434 * python/py-block.c (block_object_getset)
12435 (breakpoint_object_getset): Now a gdb_PyGetSetDef array.
12436 * python/py-event.c (event_object_getset)
12437 (finish_breakpoint_object_getset): Likewise.
12438 * python/py-inferior.c (inferior_object_getset): Likewise.
12439 * python/py-infthread.c (thread_object_getset): Likewise.
12440 * python/py-lazy-string.c (lazy_string_object_getset): Likewise.
12441 * python/py-linetable.c (linetable_entry_object_getset): Likewise.
12442 * python/py-objfile.c (objfile_getset): Likewise.
12443 * python/py-progspace.c (pspace_getset): Likewise.
12444 * python/py-record-btrace.c (btpy_insn_getset, btpy_call_getset):
12445 Likewise.
12446 * python/py-record.c (recpy_record_getset): Likewise.
12447 * python/py-symbol.c (symbol_object_getset): Likewise.
12448 * python/py-symtab.c (symtab_object_getset, sal_object_getset):
12449 Likewise.
12450 * python/py-type.c (type_object_getset, field_object_getset):
12451 Likewise.
12452 * python/py-value.c (value_object_getset): Likewise.
12453
12454 2017-04-05 Pedro Alves <palves@redhat.com>
12455
12456 * python/python-internal.h (gdb_PyObject_CallMethod)
12457 (gdb_PyErr_NewException, gdb_PySys_GetObject, gdb_PySys_SetPath):
12458 New functions.
12459 (GDB_PYSYS_SETPATH_CHAR, PyObject_CallMethod, PyErr_NewException)
12460 (PySys_GetObject, PySys_SetPath): New macros.
12461
12462 2017-04-05 Pedro Alves <palves@redhat.com>
12463
12464 * mi/mi-cmd-info.c (mi_cmd_info_os): Call info_osdata instead of
12465 info_osdata_command.
12466 * osdata.c (info_osdata_command): Rename to ...
12467 (info_osdata): ... this. Constify 'type' parameter, and remove
12468 the 'from_tty' parameter. Accept NULL TYPE.
12469 (info_osdata_command): New function.
12470 * osdata.h (info_osdata_command): Remove declaration.
12471 (info_osdata): New declaration.
12472
12473 2017-04-05 Pedro Alves <palves@redhat.com>
12474
12475 * mi/mi-cmd-break.c (mi_cmd_break_insert_1, mi_cmd_break_insert)
12476 (mi_cmd_dprintf_insert, mi_cmd_break_passcount)
12477 (mi_cmd_break_watch, mi_cmd_break_commands): Constify 'command'
12478 parameter.
12479 * mi/mi-cmd-catch.c (mi_cmd_catch_assert, mi_cmd_catch_exception)
12480 (mi_cmd_catch_load, mi_cmd_catch_unload): Constify cmd' parameter.
12481 * mi/mi-cmd-disas.c (mi_cmd_disassemble): Constify 'command'
12482 parameter.
12483 * mi/mi-cmd-env.c (mi_cmd_env_pwd, mi_cmd_env_cd, mi_cmd_env_path)
12484 (mi_cmd_env_dir, mi_cmd_inferior_tty_set, _cmd_inferior_tty_show)
12485 * mi/mi-cmd-file.c (mi_cmd_file_list_exec_source_file)
12486 (mi_cmd_file_list_exec_source_files)
12487 (mi_cmd_file_list_shared_libraries): Constify 'command' parameter.
12488 * mi/mi-cmd-info.c (mi_cmd_info_ada_exceptions)
12489 (mi_cmd_info_gdb_mi_command, mi_cmd_info_os): Constify 'command'
12490 parameter.
12491 * mi/mi-cmd-stack.c (mi_cmd_enable_frame_filters)
12492 (mi_cmd_stack_list_frames, mi_cmd_stack_info_depth)
12493 (mi_cmd_stack_list_locals, mi_cmd_stack_list_args)
12494 (mi_cmd_stack_list_variables, mi_cmd_stack_select_frame)
12495 (mi_cmd_stack_info_frame): Constify 'command' parameter.
12496 * mi/mi-cmd-target.c (mi_cmd_target_file_get)
12497 (mi_cmd_target_file_put, mi_cmd_target_file_delete): Constify
12498 'command' parameter.
12499 * mi/mi-cmd-var.c (mi_cmd_var_create, mi_cmd_var_delete)
12500 (mi_cmd_var_set_format, mi_cmd_var_set_visualizer)
12501 (mi_cmd_var_set_frozen, mi_cmd_var_show_format)
12502 (mi_cmd_var_info_num_children, mi_cmd_var_list_children)
12503 (mi_cmd_var_info_type, mi_cmd_var_info_path_expression)
12504 (mi_cmd_var_info_expression, mi_cmd_var_show_attributes)
12505 (mi_cmd_var_evaluate_expression, mi_cmd_var_assign)
12506 (mi_cmd_var_update, mi_cmd_enable_pretty_printing)
12507 (mi_cmd_var_set_update_range): Constify 'command' parameter.
12508 * mi/mi-cmds.h (mi_cmd_argv_ftype): Constify 'command' parameter.
12509 * mi/mi-interp.c (mi_cmd_interpreter_exec): Constify 'command'
12510 parameter.
12511 * mi/mi-main.c (mi_cmd_gdb_exit, mi_cmd_exec_next)
12512 (mi_cmd_exec_next_instruction, mi_cmd_exec_step)
12513 (mi_cmd_exec_step_instruction, mi_cmd_exec_finish)
12514 (mi_cmd_exec_return ,mi_cmd_exec_jump, mi_cmd_exec_continue)
12515 (mi_cmd_exec_interrupt, mi_cmd_exec_run, mi_cmd_target_detach)
12516 (mi_cmd_target_flash_erase, mi_cmd_thread_select)
12517 (mi_cmd_thread_list_ids, mi_cmd_thread_info)
12518 (mi_cmd_list_thread_groups, mi_cmd_data_list_register_names)
12519 (mi_cmd_data_list_changed_registers)
12520 (mi_cmd_data_write_register_values)
12521 (mi_cmd_data_evaluate_expression, mi_cmd_data_read_memory)
12522 (mi_cmd_data_read_memory_bytes, mi_cmd_data_write_memory)
12523 (mi_cmd_data_write_memory_bytes, mi_cmd_enable_timings)
12524 (mi_cmd_list_features, mi_cmd_list_target_features)
12525 (mi_cmd_add_inferior, mi_cmd_remove_inferior)
12526 (mi_cmd_trace_define_variable, mi_cmd_trace_list_variables)
12527 (mi_cmd_trace_find, mi_cmd_trace_save, mi_cmd_trace_start)
12528 (mi_cmd_trace_status, mi_cmd_trace_stop, mi_cmd_ada_task_info)
12529 (mi_cmd_trace_frame_collected): Constify 'command'
12530 parameter.
12531 * mi/mi-symbol-cmds.c (mi_cmd_symbol_list_lines): Constify
12532 'command' parameter.
12533
12534 2017-04-05 Pedro Alves <palves@redhat.com>
12535
12536 * ada-lang.c (ada_completer_word_break_characters): Now a const
12537 array.
12538 (ada_get_gdb_completer_word_break_characters): Constify.
12539 * completer.c (gdb_completer_command_word_break_characters)
12540 (gdb_completer_file_name_break_characters)
12541 (gdb_completer_quote_characters): Now const arrays.
12542 (get_gdb_completer_quote_characters): Constify.
12543 (set_rl_completer_word_break_characters): New function.
12544 (set_gdb_completion_word_break_characters)
12545 (complete_line_internal): Use it.
12546 * completer.h (get_gdb_completer_quote_characters): Constify.
12547 (set_rl_completer_word_break_characters): Declare.
12548 * f-lang.c (f_word_break_characters): Constify.
12549 * language.c (default_word_break_characters): Constify.
12550 * language.h (language_defn::la_word_break_characters): Constify.
12551 (default_word_break_characters): Constify.
12552 * top.c (init_main): Use set_rl_completer_word_break_characters.
12553
12554 2017-04-05 Pedro Alves <palves@redhat.com>
12555
12556 * aix-thread.c (aix_thread_pid_to_str)
12557 (aix_thread_extra_thread_info): Constify.
12558 * bsd-kvm.c (bsd_kvm_pid_to_str): Constify.
12559 * bsd-uthread.c (bsd_uthread_extra_thread_info)
12560 (bsd_uthread_pid_to_str): Constify.
12561 * corelow.c (core_pid_to_str): Constify.
12562 * darwin-nat.c (darwin_pid_to_str): Constify.
12563 * fbsd-nat.c (fbsd_pid_to_str): Constify.
12564 * fbsd-tdep.c (fbsd_core_pid_to_str, gdbarch_core_pid_to_str):
12565 Constify.
12566 * gnu-nat.c (gnu_pid_to_str): Constify.
12567 * go32-nat.c (go32_pid_to_str): Constify.
12568 * i386-cygwin-tdep.c (i386_windows_core_pid_to_str): Constify.
12569 * inf-ptrace.c (inf_ptrace_pid_to_str): Constify.
12570 * inferior.c (inferior_pid_to_str): Constify.
12571 * linux-nat.c (linux_nat_pid_to_str): Constify.
12572 * linux-tdep.c (linux_core_pid_to_str): Constify.
12573 * linux-thread-db.c (thread_db_pid_to_str)
12574 (thread_db_extra_thread_info): Constify.
12575 * nto-tdep.c (nto_extra_thread_info): Constify.
12576 * nto-tdep.h (nto_extra_thread_info): Constify.
12577 * obsd-nat.c (obsd_pid_to_str): Constify.
12578 * procfs.c (procfs_pid_to_str): Constify.
12579 * ravenscar-thread.c (ravenscar_extra_thread_info)
12580 (ravenscar_pid_to_str): Constify.
12581 * remote-sim.c (gdbsim_pid_to_str): Constify.
12582 * remote.c (remote_threads_extra_info, remote_pid_to_str):
12583 Constify.
12584 * sol-thread.c (solaris_pid_to_str): Constify.
12585 * sol2-tdep.c (sol2_core_pid_to_str): Constify.
12586 * sol2-tdep.h (sol2_core_pid_to_str): Constify.
12587 * target.c (default_pid_to_str, target_pid_to_str)
12588 (normal_pid_to_str, default_pid_to_str): Constify.
12589 * target.h (target_ops::to_pid_to_str)
12590 (target_ops::to_extra_thread_info): Constify.
12591 (target_pid_to_str, normal_pid_to_str): Constify.
12592 * windows-nat.c (windows_pid_to_str): Constify.
12593 * gdbarch.sh (core_pid_to_str): Constify.
12594 * target-delegates.c: Regenerate.
12595 * gdbarch.h, gdbarch.c: Regenerate.
12596
12597 2017-04-05 Pedro Alves <palves@redhat.com>
12598
12599 * main.c (captured_main_1): Use gdb::unique_xmalloc_ptr to manage
12600 the memory of the temporary warning_pre_print override.
12601 * utils.c (warning_pre_print): Constify.
12602 * utils.h (warning_pre_print): Constify.
12603
12604 2017-04-05 Pedro Alves <palves@redhat.com>
12605
12606 * cli/cli-cmds.c (shell_escape): Constify 'arg' parameter.
12607 (shell_command): New function.
12608 (make_command): Use std::string.
12609 (init_cli_cmds): Register shell_command instead of shell_escape.
12610
12611 2017-04-05 Pedro Alves <palves@redhat.com>
12612
12613 * breakpoint.c (dprintf_function, dprintf_channel): Don't initialize.
12614 * tracepoint.c (default_collect): Don't initialize.
12615
12616 2017-04-05 Pedro Alves <palves@redhat.com>
12617
12618 * macroexp.c (macro_buffer::shared): Now a bool.
12619 (init_buffer): Update.
12620 (init_shared_buffer): Constify 'addr' parameter.
12621 (substitute_args, expand, macro_expand, macro_expand_next): Remove
12622 casts.
12623
12624 2017-04-05 Pedro Alves <palves@redhat.com>
12625
12626 * arm-tdep.c (show_disassembly_style_sfunc): Constify local.
12627 * disasm.c (set_disassembler_options): Constify local.
12628 * i386-tdep.c (i386_print_insn): Remove cast and FIXME comment.
12629
12630 2017-04-05 Sergio Durigan Junior <sergiodj@redhat.com>
12631
12632 PR gdb/21352
12633 * tracefile.c (tsave_command): Fix argument parsing for '-r'
12634 option.
12635
12636 2017-04-05 Yao Qi <yao.qi@linaro.org>
12637
12638 * frame.c (frame_unwind_register_unsigned): Call
12639 frame_unwind_register_value.
12640
12641 2017-04-05 Yao Qi <yao.qi@linaro.org>
12642
12643 * gdb.threads/thread-specific-bp.exp (check_thread_specific_breakpoint):
12644 Use gdb_test_multiple, and don't match anchor.
12645
12646 2017-04-05 Pedro Alves <palves@redhat.com>
12647
12648 * MAINTAINERS (Global Maintainers): Add Simon Marchi.
12649 (Write After Approval): Remove Simon Marchi.
12650
12651 2017-04-05 Pedro Alves <palves@redhat.com>
12652
12653 * common/gdb_optional.h (optional::optional): Make constexpr and
12654 initialize m_dummy.
12655
12656 2017-04-04 John Baldwin <jhb@FreeBSD.org>
12657
12658 * amd64-fbsd-tdep.c: Remove "bsd-uthread.h" include.
12659 (amd64fbsd_jmp_buf_reg_offset): Remove.
12660 (amd64fbsd_supply_uthread): Remove function.
12661 (amd64fbsd_collect_uthread): Remove function.
12662 (amd64fbsd_init_abi): Don't set bsd-uthread callbacks.
12663 * configure.tgt (i[34567]86-*-freebsd*): Remove bsd-uthread.o.
12664 (x86_64-*-freebsd*): Remove bsd-uthread.o.
12665 (fbsd-nat.c): Update comment.
12666 * i386-fbsd-tdep.c: Remove "bsd-uthread.h" include.
12667 (i386fbsd_jmp_buf_reg_offset): Remove.
12668 (i386fbsd_supply_uthread): Remove function.
12669 (i386fbsd_collect_uthread): Remove function.
12670 (i386fbsd_init_abi): Don't set bsd-uthread callbacks.
12671
12672 2017-04-04 John Baldwin <jhb@FreeBSD.org>
12673
12674 * Makefile.in (ALL_64_TARGET_OBS): Remove alpha-fbsd-tdep.o.
12675 (ALLDEPFILES): Remove alpha-fbsd-tdep.c
12676 * NEWS: Mention that support for FreeBSD/alpha was removed.
12677 * alpha-fbsd-tdep.c: Delete file.
12678 * config/alpha/fbsd.mh: Delete file.
12679 * configure.host: Delete alpha*-*-freebsd* and
12680 alpha*-*-kfreebsd*-gnu.
12681 * configure.tgt: Delete alpha*-*-freebsd* and
12682 alpha*-*-kfreebsd*-gnu.
12683
12684 2017-04-04 John Baldwin <jhb@FreeBSD.org>
12685
12686 * amd64-bsd-nat.c (amd64bsd_fetch_inferior_registers,
12687 amd64bsd_store_inferior_registers): Use ptid from regcache.
12688
12689 2017-04-04 Pedro Alves <palves@redhat.com>
12690
12691 * dwarf2read.c (lnp_state_machine): Now a class. Initialize all
12692 data fields, make them private and add "m_" prefixes.
12693 (lnp_state_machine::lnp_state_machine): New ctor.
12694 (record_line, check_line_address, handle_set_discriminator)
12695 (handle_set_address, handle_advance_pc, handle_special_opcode)
12696 (handle_advance_line, handle_set_file, handle_negate_stmt)
12697 (handle_const_add_pc, handle_fixed_advance_pc, handle_copy)
12698 (end_sequence, advance_line): New methods.
12699 (m_gdbarch, m_record_lines_p): New fields.
12700 (lnp_reader_state): Delete.
12701 (dwarf_record_line): Rename to ...
12702 (lnp_state_machine::record_line): ... adjust.
12703 (init_lnp_state_machine): Delete.
12704 (lnp_state_machine::lnp_state_machine): New.
12705 (check_line_address): Rename to ...
12706 (lnp_state_machine::check_line_address): This.
12707 (dwarf_decode_lines_1): Remove reference to "reader_state".
12708 Adjust lnp_state_machine having a non-default ctor. Use bool.
12709 State machine internal state manipulation moved to
12710 lnp_state_machine methods.
12711
12712 2017-04-04 Pedro Alves <palves@redhat.com>
12713
12714 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
12715 unittests/offset-type-selftests.c.
12716 (SUBDIR_UNITTESTS_OBS): Add offset-type-selftests.o.
12717 * common/offset-type.h: New file.
12718 * common/preprocessor.h: New file.
12719 * common/traits.h: New file.
12720 * common/valid-expr.h: New file.
12721 * dwarf2expr.c: Include "common/underlying.h". Adjust to use
12722 sect_offset and cu_offset strong typedefs throughout.
12723 * dwarf2expr.h: Adjust to use sect_offset and cu_offset strong
12724 typedefs throughout.
12725 * dwarf2loc.c: Include "common/underlying.h". Adjust to use
12726 sect_offset and cu_offset strong typedefs throughout.
12727 * dwarf2read.c: Adjust to use sect_offset and cu_offset strong
12728 typedefs throughout.
12729 * gdbtypes.h: Include "common/offset-type.h".
12730 (cu_offset): Now an offset type (strong typedef) instead of a
12731 struct.
12732 (sect_offset): Likewise.
12733 (union call_site_parameter_u): Rename "param_offset" field to
12734 "param_cu_off".
12735 * unittests/offset-type-selftests.c: New file.
12736
12737 2017-04-04 Pedro Alves <palves@redhat.com>
12738
12739 * common/underlying.h: New file.
12740 * dwarf2read.c: Include "common/gdb_optional.h" and
12741 "common/underlying.h".
12742 (dir_index, file_name_index): New types.
12743 (file_entry): Use them.
12744 (file_entry::include): Use to_underlying.
12745 (line_header::add_file_name): Use dir_index.
12746 (read_formatted_entries): Use gdb::optional. Read form before
12747 writting to file_entry.
12748 (dwarf_decode_line_header): Use dir_index.
12749 (lnp_state_machine::current_file): Use to_underlying.
12750 (lnp_state_machine::file): Change type to file_name_index.
12751 (dwarf_record_line): Use to_underlying.
12752 (init_lnp_state_machine): Use file_name_index.
12753 (dwarf_decode_lines_1): Use dir_index and file_name_index.
12754
12755 2017-04-04 Pedro Alves <palves@redhat.com>
12756
12757 * common/gdb_optional.h (gdb::optiona): Add operator->, operator*,
12758 operator bool, has_value and get methods.
12759
12760 2017-04-04 Pedro Alves <palves@redhat.com>
12761
12762 * dwarf2read.c (struct file_entry): Add ctors, and initialize all
12763 fields.
12764 (line_header): Initialize all data fields. Change type of
12765 standard_opcode_lengths to std::unique_ptr<unsigned char[]>.
12766 Change type of include_dirs to std::vector<const char *>. Remove
12767 num_include_dirs, include_dirs_size. Change type of file_names to
12768 std::vector<file_entry>. Remove num_file_names, file_names_size.
12769 (line_header::line_header): New.
12770 (line_header::add_include_dir, line_header::add_file_name): New
12771 methods.
12772 (line_header::include_dir_at): Remove NULL check.
12773 (line_header::file_name_at): Add const overload.
12774 (line_header_up): New unique_ptr typedef.
12775 (dw2_get_file_names_reader): Use line_header_up. Adjust to use
12776 std::vector. Remove free_line_header call.
12777 (dwarf2_build_include_psymtabs): Use line_header_up. Remove
12778 free_line_header call.
12779 (free_cu_line_header): Delete.
12780 (handle_DW_AT_stmt_list, handle_DW_AT_stmt_list)
12781 (setup_type_unit_groups): Use line_header_up instead of cleanups.
12782 Adjust to use std::vector.
12783 (free_line_header): Delete.
12784 (free_line_header_voidp): Use delete.
12785 (add_include_dir): Replace with ...
12786 (line_header::add_include_dir): ... this method. Use std::vector.
12787 (add_file_name): Replace with ...
12788 (line_header::add_file_name): ... this method. Use std::vector.
12789 (add_include_dir_stub): Delete.
12790 (read_formatted_entries): Remove memset.
12791 (dwarf_decode_line_header): Return a line_header_up instead of a
12792 raw pointer. Remove cleanup handling. Pass lambdas to
12793 read_formatted_entries. Adjust to use line_header methods.
12794 (dwarf_decode_lines_1): Adjust to use line_header methods.
12795 (dwarf_decode_lines, file_file_name, file_full_name): Adjust to
12796 use std::vector.
12797
12798 2017-04-04 Simon Marchi <simon.marchi@polymtl.ca>
12799
12800 * remote.c (set_general_thread, set_continue_thread): Use ptid_t
12801 instead of struct ptid.
12802
12803 2017-05-04 Alan Hayward <alan.hayward@arm.com>
12804
12805 * frame.c (get_frame_register_bytes): Unwind using value.
12806 (put_frame_register_bytes): Likewise.
12807
12808 2017-03-30 Iain Buclaw <ibuclaw@gdcproject.org>
12809
12810 * d-exp.y (type_aggregate_p): Treat TYPE_CODE_MODULE as being
12811 aggregate-like.
12812
12813 2017-03-29 Jan Kratochvil <jan.kratochvil@redhat.com>
12814
12815 * auto-load.c (auto_load_section_scripts): Check SEC_HAS_CONTENTS.
12816
12817 2017-03-29 Yao Qi <yao.qi@linaro.org>
12818
12819 * gdbthread.h (struct thread_info): Declare constructor and
12820 destructor. Add some in-class member initializers.
12821 * thread.c (free_thread): Remove.
12822 (init_thread_list): Call delete instead of free_thread.
12823 (new_thread): Call thread_info constructor.
12824 (thread_info::thread_info): New function.
12825 (thread_info::~thread_info): New function.
12826 (delete_thread_1): Call delete instead of free_thread.
12827 (make_cleanup_restore_current_thread): Move tp and frame to
12828 inner block.
12829
12830 2017-03-28 Anton Kolesov <anton.kolesov@synopsys.com>
12831
12832 * arc-tdep.c (arc_frame_cache): Add support for prologue analysis.
12833 (arc_skip_prologue): Likewise.
12834 (arc_make_frame_cache): Likewise.
12835 (arc_pv_get_operand): New function.
12836 (arc_is_in_prologue): Likewise.
12837 (arc_analyze_prologue): Likewise.
12838 (arc_print_frame_cache): Likewise.
12839 (MAX_PROLOGUE_LENGTH): New constant.
12840
12841 2017-03-28 Anton Kolesov <anton.kolesov@synopsys.com>
12842
12843 * configure.tgt: Add arc-insn.o.
12844 * arc-tdep.c (arc_delayed_print_insn): Make non-static.
12845 (dump_arc_instruction_command): New function.
12846 (arc_fprintf_disasm): Likewise.
12847 (arc_disassemble_info): Likewise.
12848 (arc_insn_get_operand_value): Likewise.
12849 (arc_insn_get_operand_value_signed): Likewise.
12850 (arc_insn_get_memory_base_reg): Likewise.
12851 (arc_insn_get_memory_offset): Likewise.
12852 (arc_insn_get_branch_target): Likewise.
12853 (arc_insn_dump): Likewise.
12854 (arc_insn_get_linear_next_pc): Likewise.
12855 * arc-tdep.h (arc_delayed_print_insn): Add function declaration.
12856 (arc_disassemble_info): Likewise.
12857 (arc_insn_get_branch_target): Likewise.
12858 (arc_insn_get_linear_next_pc): Likewise.
12859 * NEWS: Mention new "maint print arc arc-instruction".
12860
12861 2017-03-28 Anton Kolesov <anton.kolesov@synopsys.com>
12862
12863 * arc-tdep (maintenance_print_arc_list): New variable.
12864 (maintenance_print_arc_command): New function.
12865
12866 2017-03-28 Anton Kolesov <anton.kolesov@synopsys.com>
12867
12868 * arc-tdep.c (core_v2_register_names, core_arcompact_register_names)
12869 Add "limm" and "reserved".
12870 (arc_cannot_fetch_register, arc_cannot_store_register): Add
12871 ARC_RESERVED_REGNUM and ARC_LIMM_REGNUM.
12872 * arc-tdep.h (arc_regnum): Likewise.
12873
12874 2017-03-27 Max Filippov <jcmvbkbc@gmail.com>
12875
12876 * xtensa-linux-nat.c (fill_gregset): Call regcache_raw_collect
12877 for THREADPTR register.
12878 (supply_gregset_reg): Call regcache_raw_supply for THREADPTR
12879 register.
12880 * xtensa-tdep.c (XTENSA_DBREGN_UREG): New definition.
12881 (xtensa_derive_tdep): Initialize tdep->threadptr_regnum.
12882 * xtensa-tdep.h (gdbarch_tdep::threadptr_regnum): New field.
12883
12884 2017-03-27 Max Filippov <jcmvbkbc@gmail.com>
12885
12886 * xtensa-tdep.c (xtensa_pseudo_register_read): Treat all
12887 registers above gdbarch_num_regs (gdbarch) as privileged in
12888 call0 ABI.
12889
12890 2017-03-27 Max Filippov <jcmvbkbc@gmail.com>
12891
12892 * xtensa-linux-nat.c (fill_gregset): Call regcache_raw_collect
12893 for a single specified register or for all registers in
12894 a0_base..a0_base + C0_NREGS range.
12895 (supply_gregset_reg): Call regcache_raw_supply for a single
12896 specified register or for all registers in a0_base..a0_base +
12897 C0_NREGS range.
12898
12899 2017-03-27 Max Filippov <jcmvbkbc@gmail.com>
12900
12901 * arch/xtensa.h (C0_NREGS): Add definition.
12902 * xtensa-tdep.c (C0_NREGS): Remove definition.
12903
12904 2017-03-27 Max Filippov <jcmvbkbc@gmail.com>
12905
12906 * xtensa-tdep.c (xtensa_scan_prologue, call0_analyze_prologue):
12907 Drop xtensa_default_isa initialization.
12908 (xtensa_gdbarch_init): Initialize xtensa_default_isa.
12909
12910 2017-03-27 Pedro Alves <palves@redhat.com>
12911
12912 * dwarf2read.c (file_entry) <dir_index>: Add comment.
12913 (file_entry::include_dir): New method.
12914 (line_header::include_dir_at, line_header::file_name_at): New
12915 methods.
12916 (setup_type_unit_groups, setup_type_unit_groups)
12917 (psymtab_include_file_name): Simplify using the new methods.
12918 (lnp_state_machine) <the_line_header>: New field.
12919 <file>: Add comment.
12920 (lnp_state_machine::current_file): New method.
12921 (dwarf_record_line): Simplify using the new methods.
12922 (init_lnp_state_machine): Initialize the "the_line_header" field.
12923 (dwarf_decode_lines_1, dwarf_decode_lines, file_file_name):
12924 Simplify using the new methods.
12925
12926 2017-03-27 Pedro Alves <palves@redhat.com>
12927
12928 * cp-name-parser.y (make_empty): Delete.
12929 (demangler_special, nested_name, ptr_operator, array_indicator)
12930 (direct_declarator, declarator_1): Use fill_comp instead of
12931 make_empty.
12932
12933 2017-03-27 Pedro Alves <palves@redhat.com>
12934
12935 * xml-support.h (gdb_xml_debug): Pass a "first-to-check" argument
12936 to ATTRIBUTE_PRINTF.
12937 * solib-target.c (library_list_start_list): Print "string" not
12938 "version".
12939 * xml-tdesc.c (tdesc_start_field): Pass "field_name" to
12940 gdb_xml_error call.
12941
12942 2017-03-27 Pedro Alves <palves@redhat.com>
12943
12944 * dwarf2read.c (struct file_and_directory): New.
12945 (dwarf2_get_dwz_file): Adjust to use std::string.
12946 (dw2_get_file_names_reader): Adjust to use file_and_directory.
12947 (find_file_and_directory): Adjust to return a file_and_directory
12948 object.
12949 (read_file_scope): Adjust to use file_and_directory. Remove
12950 make_cleanup/do_cleanups calls.
12951 (open_and_init_dwp_file): Adjust to use std::string. Remove
12952 make_cleanup/do_cleanups calls.
12953 * python/python.c (do_start_initialization): Adjust to ldirname
12954 returning a std::string.
12955 * utils.c (ldirname): Now returns a std::string.
12956 * utils.h (ldirname): Change return type to std::string.
12957 * xml-syscall.c (xml_init_syscalls_info): Adjust to ldirname
12958 returning a std::string.
12959 * xml-tdesc.c (file_read_description_xml): Likewise.
12960
12961 2017-03-24 Alan Hayward <alan.hayward@arm.com>
12962
12963 * regcache.c (regcache_debug_print_register): New function.
12964 * regcache.h (regcache_debug_print_register): New declaration.
12965 * target.c (debug_print_register): Remove.
12966 (target_fetch_registers): Call regcache_debug_print_register.
12967 (target_store_registers): Likewise.
12968
12969 2017-03-24 Pádraig Brady <pbrady@fb.com>
12970
12971 * dwarf2read.c (setup_type_unit_groups): Ensure dir_index doesn't
12972 reference beyond the 'lh->include_dirs' array before accessing to
12973 it.
12974 (psymtab_include_file_name): Likewise.
12975 (dwarf_decode_lines_1): Likewise.
12976 (dwarf_decode_lines): Likewise.
12977 (file_file_name): Likewise.
12978
12979 2017-03-23 Simon Marchi <simon.marchi@ericsson.com>
12980
12981 * fbsd-tdep.c (fbsd_corefile_thread): Don't set/restore
12982 inferior_ptid.
12983 * proc-service.c (ps_lgetregs, ps_lsetregs, ps_lgetfpregs,
12984 ps_lsetfpregs): Likewise.
12985 * regcache.c (regcache_raw_update, regcache_raw_write): Likewise.
12986 * sol-thread.c (ps_lgetregs, ps_lsetregs, ps_lgetfpregs,
12987 ps_lsetfpregs): Likewise.
12988 * target.c (target_fetch_registers, target_store_registers):
12989 Remove asserts.
12990
12991 2017-03-23 Alan Hayward <alan.hayward@arm.com>
12992
12993 * sol-thread.c (sol_thread_store_registers): Remove regcache calls.
12994
12995 2017-03-23 Yao Qi <yao.qi@linaro.org>
12996
12997 * aarch64-tdep.c (aarch64_process_record_test): Declare.
12998 (_initialize_aarch64_tdep): Register it.
12999 (aarch64_record_load_store): Handle PRFM instruction.
13000 (aarch64_process_record_test): New function.
13001
13002 2017-03-23 Yao Qi <yao.qi@linaro.org>
13003
13004 * aarch64-tdep.c (aarch64_record_load_store): Fix code
13005 indentation.
13006
13007 2017-03-23 Yao Qi <yao.qi@linaro.org>
13008
13009 * aarch64-tdep.c: Remove AARCH64_RECORD_FAILURE.
13010
13011 2017-03-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
13012
13013 python/python.c (do_start_initialization): Fix memory leak.
13014
13015 2017-03-22 Simon Marchi <simon.marchi@polymtl.ca>
13016
13017 * inf-ptrace.c (inf_ptrace_xfer_partial): Get pid from ptid
13018 using get_ptrace_pid.
13019 * linux-nat.c (linux_nat_xfer_partial): Don't set/restore
13020 inferior_ptid.
13021 (linux_proc_xfer_partial, linux_proc_xfer_spu): Use lwp of
13022 inferior_ptid instead of pid.
13023
13024 2017-03-22 Yao Qi <yao.qi@linaro.org>
13025
13026 * aarch64-tdep.c: Wrap locally used classes in anonymous
13027 namespace.
13028 * arm-tdep.c: Likewise.
13029 * linespec.c: Likewise.
13030 * ui-out.c: Likewise.
13031
13032 2017-03-22 Jonah Graham <jonah@kichwacoders.com>
13033
13034 PR gdb/19637
13035 * python/lib/gdb/printer/bound_registers.py: Import sys.
13036
13037 2017-03-21 Simon Marchi <simon.marchi@ericsson.com>
13038
13039 * windows-nat.c (do_windows_fetch_inferior_registers): Add
13040 windows_thread_info parameter and use it instead of
13041 current_thread.
13042 (windows_fetch_inferior_registers): Don't set current_thread,
13043 pass the thread to do_windows_fetch_inferior_registers. Use
13044 ptid from regcache instead of inferior_ptid.
13045 (do_windows_store_inferior_registers): Add windows_thread_info
13046 parameter and use it instead of current_thread.
13047 (windows_store_inferior_registers): Don't set current_thread,
13048 pass the thread to do_windows_store_inferior_registers. Use
13049 ptid from regcache instead of inferior_ptid.
13050
13051 2017-03-21 Simon Marchi <simon.marchi@ericsson.com>
13052
13053 * ser-mingw.c (ser_windows_raw): Remove reference to
13054 struct serial::current_timeout.
13055
13056 2017-03-21 Ivo Raisr <ivo.raisr@oracle.com>
13057
13058 PR tdep/20928
13059 * gdb/sparc-tdep.h (gdbarch_tdep) <sparc64_ccr_type>: New field.
13060 * gdb/sparc64-tdep.c (sparc64_ccr_type): New function.
13061 (sparc64_fsr_type): Fix %fsr decoding.
13062
13063 2017-03-21 Tim Wiederhake <tim.wiederhake@intel.com>
13064
13065 * python/py-record-btrace.c (btpy_insn_data): Change return type
13066 for Python 2.
13067
13068 2017-03-20 Simon Marchi <simon.marchi@polymtl.ca>
13069
13070 * spu-linux-nat.c (spu_fetch_inferior_registers,
13071 spu_store_inferior_registers): Use ptid from regcache, set and
13072 restore inferior_ptid.
13073 * spu-multiarch.c (spu_fetch_registers, spu_store_registers):
13074 Likewise.
13075
13076 2017-03-20 Simon Marchi <simon.marchi@polymtl.ca>
13077
13078 * i386-linux-nat.c (fetch_register, store_register,
13079 i386_linux_fetch_inferior_registers,
13080 i386_linux_store_inferior_registers): Use ptid from regcache.
13081 * ia64-linux-nat.c (ia64_linux_fetch_register,
13082 ia64_linux_store_register): Likewise.
13083 * inf-ptrace.c (inf_ptrace_fetch_register,
13084 inf_ptrace_store_register): Likewise.
13085 * m32r-linux-nat.c (m32r_linux_fetch_inferior_registers,
13086 m32r_linux_store_inferior_registers): Likewise.
13087 * m68k-bsd-nat.c (m68kbsd_fetch_inferior_registers,
13088 m68kbsd_store_inferior_registers): Likewise.
13089 * m68k-linux-nat.c (fetch_register, store_register,
13090 m68k_linux_fetch_inferior_registers,
13091 m68k_linux_store_inferior_registers): Likewise.
13092 * m88k-bsd-nat.c (m88kbsd_fetch_inferior_registers,
13093 m88kbsd_store_inferior_registers): Likewise.
13094 * mips-fbsd-nat.c (mips_fbsd_fetch_inferior_registers,
13095 mips_fbsd_store_inferior_registers): Likewise.
13096 * mips-linux-nat.c (mips64_linux_regsets_fetch_registers,
13097 mips64_linux_regsets_store_registers): Likewise.
13098 * mips-nbsd-nat.c (mipsnbsd_fetch_inferior_registers,
13099 mipsnbsd_store_inferior_registers): Likewise.
13100 * mips-obsd-nat.c (mips64obsd_fetch_inferior_registers,
13101 mips64obsd_store_inferior_registers): Likewise.
13102 * nto-procfs.c (procfs_fetch_registers, procfs_store_registers):
13103 Likewise.
13104 * ppc-fbsd-nat.c (ppcfbsd_fetch_inferior_registers,
13105 ppcfbsd_store_inferior_registers): Likewise.
13106 * ppc-linux-nat.c (ppc_linux_fetch_inferior_registers,
13107 ppc_linux_store_inferior_registers): Likewise.
13108 * ppc-nbsd-nat.c (ppcnbsd_fetch_inferior_registers,
13109 ppcnbsd_store_inferior_registers): Likewise.
13110 * ppc-obsd-nat.c (ppcobsd_fetch_registers,
13111 ppcobsd_store_registers): Likewise.
13112 * procfs.c (procfs_fetch_registers, procfs_store_registers):
13113 Likewise.
13114 * ravenscar-thread.c (ravenscar_fetch_registers,
13115 ravenscar_store_registers, ravenscar_prepare_to_store):
13116 Likewise.
13117 * record-btrace.c (record_btrace_fetch_registers,
13118 record_btrace_store_registers, record_btrace_prepare_to_store):
13119 Likewise.
13120 * remote-sim.c (gdbsim_fetch_register, gdbsim_store_register):
13121 Lookup inferior using ptid from regcache, instead of
13122 current_inferior.
13123 * remote.c (remote_fetch_registers, remote_store_registers): Use
13124 ptid from regcache.
13125 * rs6000-nat.c (fetch_register, store_register): Likewise.
13126 * s390-linux-nat.c (s390_linux_fetch_inferior_registers,
13127 s390_linux_store_inferior_registers): Likewise.
13128 * sh-nbsd-nat.c (shnbsd_fetch_inferior_registers,
13129 shnbsd_store_inferior_registers): Likewise.
13130 * sol-thread.c (sol_thread_fetch_registers,
13131 sol_thread_store_registers): Likewise.
13132 * sparc-nat.c (sparc_fetch_inferior_registers,
13133 sparc_store_inferior_registers): Likewise.
13134 * tilegx-linux-nat.c (fetch_inferior_registers,
13135 store_inferior_registers): Likewise.
13136 * vax-bsd-nat.c (vaxbsd_fetch_inferior_registers,
13137 vaxbsd_store_inferior_registers): Likewise.
13138 * xtensa-linux-nat.c (fetch_gregs, store_gregs, fetch_xtregs,
13139 store_xtregs): Likewise.
13140
13141 2017-03-20 Artemiy Volkov <artemiyv@acm.org>
13142
13143 PR gdb/14441
13144 * NEWS: Mention support for rvalue references in GDB and python.
13145 * doc/gdb.texinfo (C Plus Plus Expressions): Mention that GDB
13146 supports both lvalue and rvalue references.
13147
13148 2017-03-20 Artemiy Volkov <artemiyv@acm.org>
13149
13150 PR gdb/14441
13151 * gdbtypes.c (rank_one_type): Implement overloading
13152 resolution rules regarding rvalue references.
13153
13154 2017-03-20 Artemiy Volkov <artemiyv@acm.org>
13155
13156 PR gdb/14441
13157 * aarch64-tdep.c (aarch64_type_align)
13158 (aarch64_extract_return_value, aarch64_store_return_value): Change
13159 lvalue reference type checks to general reference type checks.
13160 * amd64-tdep.c (amd64_classify): Likewise.
13161 * amd64-windows-tdep.c (amd64_windows_passed_by_integer_register):
13162 Likewise.
13163 * arm-tdep.c (arm_type_align, arm_extract_return_value)
13164 (arm_store_return_value): Likewise.
13165 * ax-gdb.c (gen_fetch, gen_cast): Likewise.
13166 * c-typeprint.c (c_print_type): Likewise.
13167 * c-varobj.c (adjust_value_for_child_access, c_value_of_variable)
13168 (cplus_number_of_children, cplus_describe_child): Likewise.
13169 * compile/compile-c-symbols.c (generate_vla_size): Likewise.
13170 * completer.c (expression_completer): Likewise.
13171 * cp-support.c (make_symbol_overload_list_adl_namespace):
13172 Likewise.
13173 * darwin-nat-info.c (info_mach_region_command): Likewise.
13174 * dwarf2loc.c (entry_data_value_coerce_ref)
13175 (value_of_dwarf_reg_entry): Likewise.
13176 * eval.c (ptrmath_type_p, evaluate_subexp_standard)
13177 (evaluate_subexp_for_address, evaluate_subexp_for_sizeof):
13178 Likewise.
13179 * findvar.c (extract_typed_address, store_typed_address):
13180 Likewise.
13181 * gdbtypes.c (rank_one_type): Likewise.
13182 * hppa-tdep.c (hppa64_integral_or_pointer_p): Likewise.
13183 * infcall.c (value_arg_coerce): Likewise.
13184 * language.c (pointer_type): Likewise.
13185 * m32c-tdep.c (m32c_reg_arg_type, m32c_m16c_address_to_pointer):
13186 Likewise.
13187 * m88k-tdep.c (m88k_integral_or_pointer_p): Likewise.
13188 * mn10300-tdep.c (mn10300_type_align): Likewise.
13189 * msp430-tdep.c (msp430_push_dummy_call): Likewise.
13190 * ppc-sysv-tdep.c (do_ppc_sysv_return_value)
13191 (ppc64_sysv_abi_push_param, ppc64_sysv_abi_return_value):
13192 Likewise.
13193 * printcmd.c (print_formatted, x_command): Likewise.
13194 * python/py-type.c (typy_get_composite, typy_template_argument):
13195 Likewise.
13196 * python/py-value.c (valpy_referenced_value)
13197 (valpy_get_dynamic_type, value_has_field): Likewise.
13198 * s390-linux-tdep.c (s390_function_arg_integer): Likewise.
13199 * sparc-tdep.c (sparc_integral_or_pointer_p): Likewise.
13200 * sparc64-tdep.c (sparc64_integral_or_pointer_p): Likewise.
13201 * spu-tdep.c (spu_scalar_value_p): Likewise.
13202 * symtab.c (lookup_symbol_aux): Likewise.
13203 * typeprint.c (whatis_exp, print_type_scalar): Likewise.
13204 * valarith.c (binop_types_user_defined_p, unop_user_defined_p):
13205 Likewise.
13206 * valops.c (value_cast_pointers, value_cast)
13207 (value_reinterpret_cast, value_dynamic_cast, value_addr, typecmp)
13208 (value_struct_elt, value_struct_elt_bitpos)
13209 (value_find_oload_method_list, find_overload_match)
13210 (value_rtti_indirect_type): Likewise.
13211 * valprint.c (val_print_scalar_type_p, generic_val_print):
13212 Likewise.
13213 * value.c (value_actual_type, value_as_address, unpack_long)
13214 (pack_long, pack_unsigned_long, coerce_ref_if_computed)
13215 (coerce_ref): Likewise.
13216 * varobj.c (varobj_get_value_type): Likewise.
13217
13218 2017-03-20 Artemiy Volkov <artemiyv@acm.org>
13219
13220 PR gdb/14441
13221 * doc/python.texi (Types in Python): Add TYPE_CODE_RVALUE_REF to
13222 table of constants.
13223 * python/lib/gdb/command/explore.py: Support exploring values
13224 of rvalue reference types.
13225 * python/lib/gdb/types.py: Implement get_basic_type() for
13226 rvalue reference types.
13227 * python/py-type.c (pyty_codes) <TYPE_CODE_RVALUE_REF>: New
13228 constant.
13229 * python/py-value.c (valpy_getitem): Add an rvalue reference
13230 check.
13231 (valpy_reference_value): Add new parameter "refcode".
13232 (valpy_lvalue_reference_value, valpy_rvalue_reference_value):
13233 New wrappers for valpy_reference_value().
13234 * python/py-xmethods.c (gdbpy_get_xmethod_result_type)
13235 (gdbpy_invoke_xmethod): Likewise.
13236
13237 2017-03-20 Artemiy Volkov <artemiyv@acm.org>
13238
13239 PR gdb/14441
13240 * dwarf2read.c (process_die, read_type_die_1): Handle the
13241 DW_TAG_rvalue_reference_type DIE.
13242 (read_tag_reference_type): Add new parameter "refcode".
13243
13244 2017-03-20 Artemiy Volkov <artemiyv@acm.org>
13245
13246 PR gdb/14441
13247 * c-typeprint.c (c_print_type, c_type_print_varspec_prefix)
13248 (c_type_print_modifier, c_type_print_varspec_suffix)
13249 (c_type_print_base): Support printing rvalue reference types.
13250 * c-valprint.c (c_val_print, c_value_print): Support printing
13251 rvalue reference values.
13252
13253 2017-03-20 Artemiy Volkov <artemiyv@acm.org>
13254
13255 PR gdb/14441
13256 * cp-name-parser.y (ptr_operator): Handle the '&&' token in
13257 typename.
13258 * cp-support.c (replace_typedefs): Handle
13259 DEMANGLE_COMPONENT_RVALUE_REFERENCE.
13260 * python/py-type.c (typy_lookup_type): Likewise.
13261
13262 2017-03-20 Artemiy Volkov <artemiyv@acm.org>
13263
13264 PR gdb/14441
13265 * c-exp.y (ptr_operator): Handle the '&&' token in the typename.
13266 * parse.c (insert_type): Change assert statement.
13267 (follow_types): Handle rvalue reference types.
13268 * parser-defs.h (enum type_pieces) <tp_rvalue_reference>: New
13269 constant.
13270
13271 2017-03-20 Artemiy Volkov <artemiyv@acm.org>
13272
13273 PR gdb/14441
13274 * ada-lang.c (ada_evaluate_subexp): Adhere to the new
13275 value_ref() interface.
13276 * c-valprint.c (c_value_print): Likewise.
13277 * infcall.c (value_arg_coerce): Likewise.
13278 * python/py-value.c (valpy_reference_value): Likewise.
13279 * valops.c (value_cast, value_reinterpret_cast)
13280 (value_dynamic_cast, typecmp): Likewise.
13281 (value_ref): Parameterize by kind of return value reference type.
13282 * value.h (value_ref): Add new parameter "refcode".
13283
13284 2017-03-20 Artemiy Volkov <artemiyv@acm.org>
13285
13286 PR gdb/14441
13287 * dwarf2read.c (read_tag_reference_type): Use
13288 lookup_lvalue_reference_type() instead of lookup_reference_type().
13289 * eval.c (evaluate_subexp_standard): Likewise.
13290 * f-exp.y: Likewise.
13291 * gdbtypes.c (make_reference_type, lookup_reference_type):
13292 Generalize with rvalue reference types.
13293 (lookup_lvalue_reference_type, lookup_rvalue_reference_type): New
13294 convenience wrappers for lookup_reference_type().
13295 * gdbtypes.h (make_reference_type, lookup_reference_type): Add a
13296 reference kind parameter.
13297 (lookup_lvalue_reference_type, lookup_rvalue_reference_type): Add
13298 wrappers for lookup_reference_type().
13299 * guile/scm-type.c (gdbscm_type_reference): Use
13300 lookup_lvalue_reference_type() instead of lookup_reference_type().
13301 * guile/scm-value.c (gdbscm_value_dynamic_type): Likewise.
13302 * parse.c (follow_types): Likewise.
13303 * python/py-type.c (typy_reference, typy_lookup_type): Likewise.
13304 * python/py-value.c (valpy_get_dynamic_type, valpy_getitem):
13305 Likewise.
13306 * python/py-xmethods.c (gdbpy_get_xmethod_result_type)
13307 (gdbpy_invoke_xmethod): Likewise.
13308 * stabsread.c: Provide extra argument to make_reference_type()
13309 call.
13310 * valops.c (value_ref, value_rtti_indirect_type): Use
13311 lookup_lvalue_reference_type() instead of lookup_reference_type().
13312
13313 2017-03-20 Artemiy Volkov <artemiyv@acm.org>
13314
13315 PR gdb/14441
13316 * gdbtypes.h (enum type_code) <TYPE_CODE_RVALUE_REF>: New constant.
13317 (TYPE_IS_REFERENCE): New macro.
13318 (struct type): Add rvalue_reference_type field.
13319 (TYPE_RVALUE_REFERENCE_TYPE): New macro.
13320
13321 2017-03-20 Marc-Andre Laperle <marc-andre.laperle@ericsson.com>
13322
13323 * NEWS: Add an entry about new '-file-list-shared-libraries' command.
13324 * mi/mi-cmd-file.c (mi_cmd_file_list_shared_libraries):
13325 New function definition.
13326 * mi/mi-cmds.c (mi_cmds): Add -file-list-shared-libraries command.
13327 * mi/mi-cmds.h (mi_cmd_file_list_shared_libraries):
13328 New function declaration.
13329 * mi/mi-interp.c (mi_output_solib_attribs): New Function.
13330 * mi/mi-interp.h: New file.
13331 * solib.c (info_sharedlibrary_command): Replace for loop with
13332 ALL_SO_LIBS macro
13333 * solib.h (update_solib_list): New function declaration.
13334 (so_list_head): Move macro.
13335 * solist.h (ALL_SO_LIBS): New macro.
13336
13337 2017-03-20 Marc-Andre Laperle <marc-andre.laperle@ericsson.com>
13338
13339 * infcmd.c (post_create_inferior): Remove unused argument in
13340 call to solib_add.
13341 * remote.c (remote_start_remote): Likewise.
13342 * solib-frv.c (frv_fetch_objfile_link_map): Likewise.
13343 * solib-svr4.c: (svr4_fetch_objfile_link_map): Likewise.
13344 (enable_break): Likewise.
13345 * solib.c (update_solib_list): Remove unused target argument
13346 and its documentation.
13347 (solib_add): Remove unused target argument. Remove unused
13348 argument in call to update_solib_list.
13349 (info_sharedlibrary_command): Remove unused argument in call
13350 to update_solib_list.
13351 (sharedlibrary_command): Remove unused argument in call to
13352 solib_add.
13353 (handle_solib_event): Likewise.
13354 (reload_shared_libraries): Likewise.
13355 * solib.h (solib_add): Remove unused target argument.
13356
13357 2017-03-20 Andreas Arnez <arnez@linux.vnet.ibm.com>
13358
13359 * s390-linux-tdep.c (is_rsi, is_rie): Remove functions.
13360 (s390_displaced_step_fixup): Cover relative branches with the
13361 default fixup handling. This fixes lack of support for some
13362 relative branch instructions.
13363
13364 2017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
13365
13366 * i386-gnu-nat.c (gnu_fetch_registers, gnu_store_registers): Use
13367 ptid from regcache.
13368
13369 2017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
13370
13371 * i386-darwin-nat.c (i386_darwin_fetch_inferior_registers,
13372 i386_darwin_store_inferior_registers): Use ptid from regcache.
13373
13374 2017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
13375
13376 * i386-bsd-nat.c (i386bsd_fetch_inferior_registers,
13377 i386bsd_store_inferior_registers): Use ptid from regcache.
13378
13379 2017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
13380
13381 * hppa-obsd-nat.c (hppaobsd_fetch_registers,
13382 hppaobsd_store_registers): Use ptid from regcache.
13383
13384 2017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
13385
13386 * hppa-nbsd-nat.c (hppanbsd_fetch_registers,
13387 hppanbsd_store_registers): Use ptid from regcache.
13388
13389 2017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
13390
13391 * hppa-linux-nat.c (fetch_register, store_register): Use ptid
13392 from regcache. Use get_ptrace_pid.
13393
13394 2017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
13395
13396 * corelow.c (get_core_register_section): Use ptid from regcache,
13397 update doc.
13398
13399 2017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
13400
13401 * bsd-uthread.c (bsd_uthread_fetch_registers,
13402 bsd_uthread_store_registers): Use ptid from regcache, set and
13403 restore inferior_ptid.
13404
13405 2017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
13406
13407 * arm-nbsd-nat.c (fetch_register, fetch_regs, fetch_fp_register,
13408 fetch_fp_regs, store_register, store_regs, store_fp_register,
13409 store_fp_regs): Use ptid from regcache.
13410
13411 2017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
13412
13413 * arm-linux-nat.c (fetch_fpregs, store_fpregs, fetch_regs,
13414 store_regs, fetch_wmmx_regs, store_wmmx_regs, fetch_vfp_regs,
13415 store_vfp_regs): Use ptid from regcache.
13416
13417 2017-03-17 Pedro Alves <palves@redhat.com>
13418
13419 PR remote/21188
13420 * ser-base.c (ser_base_wait_for): Add comment.
13421 (do_ser_base_readchar): Improve comment based on the ser-unix.c's
13422 version.
13423 * ser-unix.c (hardwire_raw): Remove reference to
13424 scb->current_timeout.
13425 (wait_for, do_hardwire_readchar, hardwire_readchar): Delete.
13426 (hardwire_ops): Install ser_base_readchar instead of
13427 hardwire_readchar.
13428 * serial.h (struct serial) <current_timeout, timeout_remaining>:
13429 Remove fields.
13430
13431 2017-03-17 Jonah Graham <jonah@kichwacoders.com>
13432
13433 PR gdb/19637
13434 * python/lib/gdb/printer/bound_registers.py: Add support for
13435 Python 3.
13436
13437 2017-03-16 Andreas Arnez <arnez@linux.vnet.ibm.com>
13438
13439 * dwarf2loc.c (indirect_synthetic_pointer): Get data type of
13440 pointed-to DIE and pass it to dwarf2_evaluate_loc_desc_full.
13441 (dwarf2_evaluate_loc_desc_full): New parameter subobj_type; rename
13442 byte_offset to subobj_byte_offset. Fix the handling of
13443 DWARF_VALUE_STACK on big-endian targets when coming via an
13444 implicit pointer.
13445 (dwarf2_evaluate_loc_desc): Adjust call to
13446 dwarf2_evaluate_loc_desc_full.
13447 * dwarf2loc.h (dwarf2_fetch_die_type_sect_off): New declaration.
13448 * dwarf2read.c (dwarf2_fetch_die_type_sect_off): New function.
13449
13450 2017-03-16 Yao Qi <yao.qi@linaro.org>
13451
13452 * arm-tdep.c (thumb_record_misc): Decode CBNZ, CBZ, REV16,
13453 and REVSH instructions.
13454
13455 2017-03-16 Yao Qi <yao.qi@linaro.org>
13456
13457 * arm-tdep.c [GDB_SELF_TEST]: include "selftests.h".
13458 (arm_record_test): Declare.
13459 (_initialize_arm_tdep) [GDB_SELF_TEST]: call register_self_test.
13460 (thumb_record_ld_st_reg_offset): Rewrite the opcode matching to
13461 align with the manual.
13462 (thumb_record_misc): Adjust the code order to align with the
13463 manual.
13464 (thumb2_record_decode_insn_handler): Fix instruction matching.
13465 (instruction_reader_thumb): New class.
13466 (arm_record_test): New function.
13467
13468 2017-03-16 Yao Qi <yao.qi@linaro.org>
13469
13470 * arm-tdep.c (abstract_memory_reader): New class.
13471 (instruction_reader): New class.
13472 (extract_arm_insn): Add argument 'reader'. Callers updated.
13473 (decode_insn): Likewise.
13474
13475 2017-03-16 Doug Evans <dje@google.com>
13476
13477 * guile/scm-lazy-string.c (lazy_string_smob): Clarify use of LENGTH
13478 member. Change type of TYPE member to SCM. All uses updated.
13479 (lsscm_make_lazy_string_smob): Add assert.
13480 (lsscm_make_lazy_string): Flag bad length values.
13481 (lsscm_elt_type): New function.
13482 (gdbscm_lazy_string_to_value): Rewrite to use
13483 lsscm_safe_lazy_string_to_value.
13484 (lsscm_safe_lazy_string_to_value): Fix handling of TYPE_CODE_PTR.
13485 * guile/scm-value.c (gdbscm_value_to_lazy_string): Flag bad length
13486 values. Fix TYPE_CODE_PTR. Handle TYPE_CODE_ARRAY. Handle typedefs
13487 in incoming type.
13488 * guile/guile-internal.h (tyscm_scm_to_type): Declare.
13489 * guile/scm-type.c (tyscm_scm_to_type): New function.
13490
13491 2017-03-15 Doug Evans <dje@google.com>
13492
13493 PR python/17728, python/18439, python/18779
13494 * python/py-lazy-string.c (lazy_string_object): Clarify use of LENGTH
13495 member. Change type of TYPE member to PyObject *. All uses updated.
13496 (stpy_convert_to_value): Fix handling of TYPE_CODE_PTR.
13497 (gdbpy_create_lazy_string_object): Flag bad length values.
13498 Handle TYPE_CODE_ARRAY with possibly different user-provided length.
13499 Handle typedefs in incoming type.
13500 (stpy_lazy_string_elt_type): New function.
13501 (gdbpy_extract_lazy_string): Call it.
13502 * python/py-value.c (valpy_lazy_string): Flag bad length values.
13503 Fix handling of TYPE_CODE_PTR. Handle TYPE_CODE_ARRAY. Handle
13504 typedefs in incoming type.
13505
13506 2017-03-16 Doug Evans <dje@google.com>
13507
13508 * guile/guile-internal.h (tyscm_scm_to_type): Declare.
13509 * guile/scm-type.c (tyscm_scm_to_type): New function.
13510
13511 2017-03-16 Jiong Wang <jiong.wang@arm.com>
13512
13513 * inf-ptrace.c (inf_ptrace_peek_poke): Change the type to
13514 "ULONGEST" for "skip".
13515
13516 2017-03-14 Andreas Arnez <arnez@linux.vnet.ibm.com>
13517
13518 PR gdb/21220
13519 * inf-ptrace.c (inf_ptrace_xfer_partial): In "case
13520 TARGET_OBJECT_MEMORY", extract the logic for ptrace peek/poke...
13521 (inf_ptrace_peek_poke): ...here. New function. Now also loop
13522 over ptrace peek/poke until end of buffer or error.
13523
13524 2017-03-14 Simon Marchi <simon.marchi@ericsson.com>
13525
13526 * parse.c (length_of_subexp): Make static.
13527 * parser-defs.h (length_of_subexp): Remove.
13528
13529 2017-03-14 Andreas Arnez <arnez@linux.vnet.ibm.com>
13530
13531 * linux-nat.c (linux_proc_xfer_partial): Handle write operations
13532 as well.
13533
13534 2017-03-14 Pedro Alves <palves@redhat.com>
13535
13536 * cp-name-parser.y (cp_demangled_name_to_comp): Update comment.
13537 (main): Use std::unique_ptr. Remove calls to
13538 cp_demangled_name_parse_free.
13539
13540 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
13541
13542 * alpha-bsd-nat.c (alphabsd_fetch_inferior_registers,
13543 alphabsd_store_inferior_registers): Use regcache->ptid instead
13544 of inferior_ptid.
13545
13546 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
13547
13548 * aix-thread.c (aix_thread_fetch_registers,
13549 aix_thread_store_registers): Use regcache->ptid instead of
13550 inferior_ptid.
13551
13552 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
13553
13554 * aarch64-linux-nat.c (fetch_gregs_from_thread,
13555 store_gregs_to_thread, fetch_fpregs_from_thread,
13556 store_fpregs_to_thread): Use regcache->ptid instead of
13557 inferior_ptid.
13558
13559 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
13560
13561 * amd64-linux-nat.c (amd64_linux_fetch_inferior_registers,
13562 amd64_linux_fetch_inferior_registers): Use regcache->ptid
13563 instead of inferior_ptid.
13564
13565 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
13566
13567 * target.c (target_fetch_registers, target_store_registers): Add
13568 assert.
13569
13570 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
13571
13572 * regcache.h (regcache_get_ptid): New function.
13573 * regcache.c (regcache_get_ptid): New function.
13574
13575 2017-03-13 Mark Wielaard <mark@klomp.org>
13576
13577 * cp-name-parser.y (make_empty): Initialize d_printing to zero.
13578
13579 2017-03-10 Keith Seitz <keiths@redhat.com>
13580
13581 PR c++/8218
13582 * c-typeprint.c (cp_type_print_method_args): Skip artificial arguments.
13583
13584 2017-03-08 Pedro Alves <palves@redhat.com>
13585
13586 PR gdb/18360
13587 * infrun.c (start_step_over, do_target_resume, resume)
13588 (restart_threads): Assert we're not resuming a thread that is
13589 meant to be stopped.
13590 (infrun_thread_stop_requested_callback): Delete.
13591 (infrun_thread_stop_requested): If the thread is internally
13592 stopped, queue a pending stop event and clear the thread's
13593 inline-frame state.
13594 (handle_stop_requested): New function.
13595 (handle_syscall_event, handle_inferior_event_1): Use
13596 handle_stop_requested.
13597 (handle_stop_requested): New function.
13598 (handle_signal_stop): Set the thread's stop_signal here instead of
13599 at caller.
13600 (finish_step_over): Clear step over info unconditionally.
13601 (handle_signal_stop): If the user had interrupted the event
13602 thread, consider the stop a random signal.
13603 (handle_signal_stop) <signal arrived while stepping over
13604 breakpoint>: Don't restart threads here.
13605 (stop_waiting): Don't clear step-over info here.
13606
13607 2017-03-08 Pedro Alves <palves@redhat.com>
13608
13609 PR 21206
13610 * common/gdb_unlinker.h (unlinker::unlinker): Attribute nonnull
13611 goes to argument 2, not 1.
13612
13613 2017-03-08 Pedro Alves <palves@redhat.com>
13614
13615 PR cli/21218
13616 * top.c (gdb_readline_wrapper): Avoid passing NULL to
13617 display_gdb_prompt.
13618 (command_line_input): Add comment.
13619
13620 2017-03-08 Pedro Alves <palves@redhat.com>
13621
13622 PR tui/21216
13623 * tui/tui-file.c (tui_file::write): New.
13624 * tui/tui-file.h (tui_file): Override "write".
13625 * tui/tui-io.c (do_tui_putc, update_start_line): New functions,
13626 factored out from ...
13627 (tui_puts): ... here.
13628 (tui_putc): Use them.
13629 (tui_write): New function.
13630 * tui/tui-io.h (tui_write): Declare.
13631
13632 2017-03-07 Sergio Durigan Junior <sergiodj@redhat.com>
13633
13634 * Makefile.in (SFILES): Replace "environ.c" with
13635 "common/environ.c".
13636 (HFILES_NO_SRCDIR): Likewise, for "environ.h".
13637 * environ.c: Include "common-defs.h" instead of "defs.h. Moved
13638 to...
13639 * common/environ.c: ... here.
13640 * environ.h: Moved to...
13641 * common/environ.h: ... here.
13642
13643 2017-03-07 Peter Bergner <bergner@vnet.ibm.com>
13644
13645 * gdbarch.sh (pstring_ptr): New static function.
13646 (gdbarch_disassembler_options): Use it.
13647 (gdbarch_verify_disassembler_options): Print valid_disassembler_options,
13648 not valid_disassembler_option->name.
13649 * gdbarch.c: Regenerate.
13650
13651 2017-03-07 Peter Bergner <bergner@vnet.ibm.com>
13652
13653 * config/powerpc/ppc64-linux.mh (MH_CFLAGS): Delete.
13654
13655 2017-03-07 Pedro Alves <palves@redhat.com>
13656
13657 * tui/tui-regs.c (tui_restore_gdbout): Don't delete gdb_stdout.
13658
13659 2017-03-07 Walfred Tedeschi <walfred.tedeschi@intel.com>
13660
13661 * i387-tdep.h (i387_reset_bnd_regs): Add function definition.
13662 * i387-tdep.c (i387_reset_bnd_regs): Add function implementation.
13663 * i386-tdep.c (i386_push_dummy_call): Call i387_reset_bnd_regs.
13664 * amd64-tdep.c (amd64_push_dummy_call): Call i387_reset_bnd_regs.
13665
13666 2017-03-06 Simon Marchi <simon.marchi@ericsson.com>
13667
13668 * xtensa-linux-nat.c (fetch_gregs): Remove const.
13669
13670 2017-03-03 Simon Marchi <simon.marchi@ericsson.com>
13671
13672 * remote.c (remote_add_target_side_commands): Use range-based
13673 for loop.
13674
13675 2017-03-03 Yao Qi <yao.qi@linaro.org>
13676
13677 PR gdb/21165
13678 * ada-valprint.c (ada_val_print_ref): Call value_fetch_lazy if
13679 value is lazy.
13680 * valprint.c (common_val_print): Likewise.
13681
13682 2017-02-28 Peter Bergner <bergner@vnet.ibm.com>
13683
13684 * NEWS: Mention new set/show disassembler-options commands.
13685 * doc/gdb.texinfo: Document new set/show disassembler-options commands.
13686 * disasm.c: Include "arch-utils.h", "gdbcmd.h" and "safe-ctype.h".
13687 (prospective_options): New static variable.
13688 (gdb_disassembler::gdb_disassembler): Initialize
13689 m_di.disassembler_options.
13690 (gdb_buffered_insn_length_init_dis): Initilize di->disassembler_options.
13691 (get_disassembler_options): New function.
13692 (set_disassembler_options): Likewise.
13693 (set_disassembler_options_sfunc): Likewise.
13694 (show_disassembler_options_sfunc): Likewise.
13695 (disassembler_options_completer): Likewise.
13696 (_initialize_disasm): Likewise.
13697 * disasm.h (get_disassembler_options): New prototype.
13698 (set_disassembler_options): Likewise.
13699 * gdbarch.sh (gdbarch_disassembler_options): New variable.
13700 (gdbarch_verify_disassembler_options): Likewise.
13701 * gdbarch.c: Regenerate.
13702 * gdbarch.h: Likewise.
13703 * arm-tdep.c (num_disassembly_options): Delete.
13704 (set_disassembly_style): Likewise.
13705 (arm_disassembler_options): New static variable.
13706 (set_disassembly_style_sfunc): Convert short style name into long
13707 option name. Call set_disassembler_options.
13708 (show_disassembly_style_sfunc): New function.
13709 (arm_gdbarch_init): Call set_gdbarch_disassembler_options and
13710 set_gdbarch_verify_disassembler_options.
13711 (_initialize_arm_tdep): Delete regnames variable and update callers.
13712 (arm_disassembler_options): Initialize.
13713 (disasm_options): New variable.
13714 (num_disassembly_options): Rename from this...
13715 (num_disassembly_styles): ...to this. Compute by scanning through
13716 disasm_options.
13717 (valid_disassembly_styles): Initialize using disasm_options.
13718 Remove calls to parse_arm_disassembler_option, get_arm_regnames and
13719 set_arm_regname_option.
13720 Pass show_disassembly_style_sfunc to the "disassembler" setshow command.
13721 * rs6000-tdep.c (powerpc_disassembler_options): New static variable.
13722 (rs6000_gdbarch_init): Call set_gdbarch_disassembler_options and
13723 set_gdbarch_verify_disassembler_options.
13724 * s390-tdep.c (s390_disassembler_options): New static variable.
13725 (s390_gdbarch_init):all set_gdbarch_disassembler_options and
13726 set_gdbarch_verify_disassembler_options.
13727
13728 2017-02-27 Simon Marchi <simon.marchi@ericsson.com>
13729
13730 * remote.c (remote_add_target_side_condition): Remove "struct"
13731 keyword from range-based for loop.
13732
13733 2017-02-27 Simon Marchi <simon.marchi@ericsson.com>
13734
13735 * remote.c (remote_add_target_side_condition): Use range-based
13736 for loop. Update comment.
13737
13738 2017-02-27 Yao Qi <yao.qi@linaro.org>
13739
13740 * f-typeprint.c (f_print_type): Check "varstring" is empty first.
13741
13742 2017-02-26 Alan Hayward <alan.hayward@arm.com>
13743
13744 * regcache.c (regcache_raw_update): New function.
13745 (regcache_raw_read): Move code to regcache_raw_update.
13746 * regcache.h (regcache_raw_update): New declaration.
13747 * remote.c (remote_prepare_to_store): Call regcache_raw_update.
13748
13749 2017-02-26 Jan Kratochvil <jan.kratochvil@redhat.com>
13750
13751 * dwarf2read.c (create_debug_type_hash_table): Initialize
13752 header.signature and header.type_offset_in_tu.
13753
13754 2017-02-24 Pedro Alves <palves@redhat.com>
13755
13756 * symtab.c (make_file_symbol_completion_list_1): Use
13757 add_symtab_completions.
13758
13759 2017-02-24 Alan Hayward <alan.hayward@arm.com>
13760
13761 * stack.c (frame_info): Use frame_unwind_register_value to avoid buf.
13762
13763 2017-02-24 Alan Hayward <alan.hayward@arm.com>
13764
13765 * i386-tdep.c (i386_pseudo_register_read_into_value): Use
13766 I386_MAX_REGISTER_SIZE.
13767 (i386_pseudo_register_write): Likewise.
13768 (i386_process_record): Likewise.
13769 * i387-tdep.c (i387_supply_xsave): Likewise.
13770 * m68k-linux-nat.c (fetch_register): Use M68K_MAX_REGISTER_SIZE.
13771 (store_register): Likewise.
13772
13773 2017-02-23 Pedro Alves <palves@redhat.com>
13774
13775 * ada-lang.c: Include "common/function-view.h".
13776 (ada_iterate_over_symbols): Adjust to use function_view as
13777 callback type.
13778 (struct add_partial_datum, ada_complete_symbol_matcher): Delete.
13779 (ada_make_symbol_completion_list): Use a lambda.
13780 (ada_exc_search_name_matches): Delete.
13781 (name_matches_regex): New.
13782 (ada_add_global_exceptions): Use a lambda and name_matches_regex.
13783 * compile/compile-c-support.c: Include "common/function-view.h".
13784 (print_one_macro): Change prototype to accept a ui_file pointer.
13785 (write_macro_definitions): Use a lambda.
13786 * dwarf2read.c: Include "common/function-view.h".
13787 (dw2_map_expand_apply, dw2_map_symtabs_matching_filename)
13788 (dw2_expand_symtabs_matching): Adjust to use function_view as
13789 callback type.
13790 * language.h: Include "common/function-view.h".
13791 (struct language_defn) <la_iterate_over_symbols>: Adjust to use
13792 function_view as callback type.
13793 (LA_ITERATE_OVER_SYMBOLS): Remove DATA parameter.
13794 * linespec.c: Include "common/function-view.h".
13795 (collect_info::add_symbol): New method.
13796 (struct symbol_and_data_callback, iterate_inline_only, struct
13797 symbol_matcher_data, iterate_name_matcher): Delete.
13798 (iterate_over_all_matching_symtabs): Adjust to use function_view
13799 as callback type and lambdas.
13800 (iterate_over_file_blocks): Adjust to use function_view as
13801 callback type.
13802 (decode_compound_collector): Now a class with private fields.
13803 (decode_compound_collector::release_symbols): New method.
13804 (collect_one_symbol): Rename to...
13805 (decode_compound_collector::operator()): ... this and adjust.
13806 (lookup_prefix_sym): decode_compound_collector construction bits
13807 move to decode_compound_collector ctor. Pass the
13808 decode_compound_collector object directly as callback. Remove
13809 cleanups and use decode_compound_collector::release_symbols
13810 instead.
13811 (symtab_collector): Now a class with private fields.
13812 (symtab_collector::release_symtabs): New method.
13813 (add_symtabs_to_list): Rename to...
13814 (symtab_collector::operator()): ... this and adjust.
13815 (collect_symtabs_from_filename): symtab_collector construction
13816 bits move to symtab_collector ctor. Pass the symtab_collector
13817 object directly as callback. Remove cleanups and use
13818 symtab_collector::release_symtabs instead.
13819 (collect_symbols): Delete.
13820 (add_matching_symbols_to_info): Use lambdas.
13821 * macrocmd.c (print_macro_callback): Delete.
13822 (info_macro_command): Use a lambda.
13823 (info_macros_command): Pass print_macro_definition as callable
13824 directly.
13825 (print_one_macro): Remove 'ignore' parameter.
13826 (macro_list_command): Adjust.
13827 * macrotab.c (macro_for_each_data::fn): Now a function_view.
13828 (macro_for_each_data::user_data): Delete field.
13829 (foreach_macro): Adjust to call the function_view.
13830 (macro_for_each): Adjust to use function_view as callback type.
13831 (foreach_macro_in_scope): Adjust to call the function_view.
13832 (macro_for_each_in_scope): Adjust to use function_view as callback
13833 type.
13834 * macrotab.h: Include "common/function-view.h".
13835 (macro_callback_fn): Declare a prototype instead of a pointer.
13836 Remove "user_data" parameter.
13837 (macro_for_each, macro_for_each_in_scope): Adjust to use
13838 function_view as callback type.
13839 * psymtab.c (partial_map_expand_apply)
13840 (psym_map_symtabs_matching_filename, recursively_search_psymtabs):
13841 Adjust to use function_view as callback type and to return bool.
13842 (psym_expand_symtabs_matching): Adjust to use function_view as
13843 callback types.
13844 * symfile-debug.c (debug_qf_map_symtabs_matching_filename): Adjust
13845 to use function_view as callback type and to return bool.
13846 (debug_qf_expand_symtabs_matching): Adjust to use function_view as
13847 callback types.
13848 * symfile.c (expand_symtabs_matching): Adjust to use function_view
13849 as callback types.
13850 * symfile.h: Include "common/function-view.h".
13851 (expand_symtabs_file_matcher_ftype)
13852 (expand_symtabs_symbol_matcher_ftype)
13853 (expand_symtabs_exp_notify_ftype): Remove "data" parameter and
13854 return bool.
13855 (quick_symbol_functions::map_symtabs_matching_filename)
13856 (quick_symbol_functions::expand_symtabs_matching): Adjust to use
13857 function_view as callback type and return bool.
13858 (expand_symtabs_matching): Adjust to use function_view as callback
13859 type.
13860 (maintenance_expand_name_matcher)
13861 (maintenance_expand_file_matcher): Delete.
13862 (maintenance_expand_symtabs): Use lambdas.
13863 * symtab.c (iterate_over_some_symtabs): Adjust to use
13864 function_view as callback types and return bool.
13865 (iterate_over_symtabs): Likewise. Use unique_xmalloc_ptr instead
13866 of a cleanup.
13867 (lookup_symtab_callback): Delete.
13868 (lookup_symtab): Use a lambda.
13869 (iterate_over_symbols): Adjust to use function_view as callback
13870 type.
13871 (struct search_symbols_data, search_symbols_file_matches)
13872 (search_symbols_name_matches): Delete.
13873 (search_symbols): Use a pair of lambdas.
13874 (struct add_name_data, add_macro_name, symbol_completion_matcher)
13875 (symtab_expansion_callback): Delete.
13876 (default_make_symbol_completion_list_break_on_1): Use lambdas.
13877 * symtab.h: Include "common/function-view.h".
13878 (iterate_over_some_symtabs): Adjust to use function_view as
13879 callback type and return bool.
13880 (iterate_over_symtabs): Adjust to use function_view as callback
13881 type.
13882 (symbol_found_callback_ftype): Remove 'data' parameter and return
13883 bool.
13884 (iterate_over_symbols): Adjust to use function_view as callback
13885 type.
13886
13887 2017-02-23 Pedro Alves <palves@redhat.com>
13888
13889 * Makefile.in (SUBDIR_UNITTESTS_SRCS, SUBDIR_UNITTESTS_OBS): New.
13890 (%.o) <unittests/%.c>: New pattern.
13891 * configure.ac ($development): Add $(SUBDIR_UNITTESTS_OBS) to
13892 CONFIG_OBS, and $(SUBDIR_UNITTESTS_SRCS) to CONFIG_SRCS.
13893 * common/function-view.h: New file.
13894 * unittests/function-view-selftests.c: New file.
13895 * configure: Regenerate.
13896
13897 2017-02-23 Simon Marchi <simon.marchi@ericsson.com>
13898
13899 * bsd-uthread.c (bsd_uthread_thread_alive): Use ptid instead of
13900 inferior_ptid.
13901 * go32-nat.c (go32_thread_alive): Likewise.
13902
13903 2017-02-23 Yao Qi <yao.qi@linaro.org>
13904
13905 * varobj-iter.h (varobj_iter_delete): Call xfree instead of
13906 delete.
13907
13908 2017-02-23 Yao Qi <yao.qi@linaro.org>
13909
13910 * varobj.c (varobj_clear_saved_item): Use delete instead of
13911 xfree.
13912 (update_dynamic_varobj_children): Likewise.
13913
13914 2017-02-21 Jan Kratochvil <jan.kratochvil@redhat.com>
13915
13916 * dwarf2read.c (dwarf2_record_block_ranges): Add forgotten BASEADDR.
13917
13918 2017-02-21 Simon Marchi <simon.marchi@ericsson.com>
13919
13920 * common/enum-flags.h (enum_flags::enum_flags): Initialize
13921 m_enum_value to 0 in default constructor.
13922
13923 2017-02-21 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
13924
13925 * rs6000-tdep.c (LOAD_AND_RESERVE_MASK): Rename from LWARX_MASK.
13926 (STORE_CONDITIONAL_MASK): Rename from STWCX_MASK.
13927 (LBARX_INSTRUCTION, LHARX_INSTRUCTION, LQARX_INSTRUCTION,
13928 STBCX_INSTRUCTION, STHCX_INSTRUCTION, STQCX_INSTRUCTION): New defines.
13929 (IS_LOAD_AND_RESERVE_INSN, IS_STORE_CONDITIONAL_INSN): New macros.
13930 (ppc_displaced_step_copy_insn): Use IS_LOAD_AND_RESERVE_INSN.
13931 (ppc_deal_with_atomic_sequence): Use IS_LOAD_AND_RESERVE_INSN and
13932 IS_STORE_CONDITIONAL_INSN.
13933
13934 2017-02-21 Jan Kratochvil <jan.kratochvil@redhat.com>
13935
13936 * dwarf2_rnglists_process: Initialize range_beginning and range_end.
13937
13938 2017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
13939
13940 * NEWS (Changes since GDB 7.12): Add DWARF-5.
13941
13942 2017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
13943
13944 * dwarf2read.c (skip_one_die, read_attribute_value)
13945 (dwarf2_const_value_attr, dump_die_shallow)
13946 (dwarf2_get_attr_constant_value, dwarf2_fetch_constant_bytes)
13947 (skip_form_bytes, attr_form_is_constant): Handle DW_FORM_data16.
13948
13949 2017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
13950
13951 * dwarf2read.c (read_file_scope): Rename DW_MACRO_GNU_*.
13952 (dwarf_parse_macro_header): Accept DWARF version 5.
13953 (dwarf_decode_macro_bytes, dwarf_decode_macros): Rename DW_MACRO_GNU_*.
13954
13955 2017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
13956
13957 * block.c (call_site_for_pc): Rename DW_OP_GNU_*, DW_TAG_GNU_* and
13958 DW_AT_GNU_*.
13959 * common/common-exceptions.h (enum errors): Likewise.
13960 * dwarf2-frame.c (class dwarf_expr_executor): Likewise.
13961 * dwarf2expr.c (dwarf_block_to_dwarf_reg)
13962 (dwarf_expr_context::execute_stack_op): Likewise.
13963 * dwarf2expr.h (struct dwarf_expr_context, struct dwarf_expr_piece):
13964 Likewise.
13965 * dwarf2loc.c (dwarf_evaluate_loc_desc::get_base_type)
13966 (dwarf_evaluate_loc_desc::push_dwarf_reg_entry_value)
13967 (show_entry_values_debug, call_site_to_target_addr)
13968 (func_addr_to_tail_call_list, func_verify_no_selftailcall)
13969 (dwarf_expr_reg_to_entry_parameter, dwarf_entry_parameter_to_value)
13970 (entry_data_value_free_closure, value_of_dwarf_reg_entry)
13971 (value_of_dwarf_block_entry, indirect_pieced_value)
13972 (symbol_needs_eval_context::push_dwarf_reg_entry_value):
13973 (disassemble_dwarf_expression): Likewise.
13974 * dwarf2read.c (process_die, inherit_abstract_dies)
13975 (read_call_site_scope): Likewise.
13976 * gdbtypes.h (struct func_type, struct call_site_parameter)
13977 (struct call_site): Likewise.
13978 * stack.c (read_frame_arg): Likewise.
13979 * std-operator.def (OP_VAR_ENTRY_VALUE): Likewise.
13980
13981 2017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
13982
13983 * defs.h (read_unsigned_leb128): New declaration.
13984 * dwarf2loc.c (decode_debug_loclists_addresses): New function.
13985 (decode_debug_loc_dwo_addresses): Update DEBUG_LOC_* to DW_LLE_*.
13986 (dwarf2_find_location_expression): Call also
13987 decode_debug_loclists_addresses. Handle DWARF-5 ULEB128 length.
13988 * dwarf2loc.h (dwarf2_version): New declaration.
13989 * dwarf2read.c (struct dwarf2_per_objfile): Add loclists, line_str,
13990 rnglists.
13991 (dwarf2_elf_names): Add .debug_loclists, .debug_line_str,
13992 .debug_rnglists.
13993 (struct dwop_section_names): Add loclists_dwo.
13994 (dwop_section_names): Add .debug_loclists.dwo.
13995 (struct comp_unit_head): Add unit_type, signature, type_offset_in_tu.
13996 (struct dwarf2_per_cu_data): Add dwarf_version.
13997 (struct dwo_sections): Add loclists.
13998 (struct attr_abbrev): Add implicit_const.
13999 (read_indirect_line_string): New declaration.
14000 (read_unsigned_leb128): Delete declaration.
14001 (rcuh_kind): New definition.
14002 (read_and_check_comp_unit_head): Change parameter
14003 is_debug_types_section to section_kind.
14004 (dwarf2_locate_sections): Handle loclists, line_str and rnglists.
14005 (read_comp_unit_head): Change parameter abfd to section, add parameter
14006 section_kind. Handle DWARF-5.
14007 (error_check_comp_unit_head): Accept also DWARF version 5.
14008 (read_and_check_comp_unit_head): Change parameter
14009 is_debug_types_section to section_kind.
14010 (read_and_check_type_unit_head): Delete function.
14011 (read_abbrev_offset): Handle DWARF-5.
14012 (create_debug_type_hash_table): Add parameter section_kind. Process
14013 only DW_UT_type. Use signature and type_offset_in_tu from struct
14014 comp_unit_head.
14015 (create_debug_types_hash_table): Update create_debug_type_hash_table
14016 caller.
14017 (create_all_type_units): Call create_debug_type_hash_table.
14018 (read_cutu_die_from_dwo, init_cutu_and_read_dies): Change
14019 read_and_check_type_unit_head caller to read_and_check_comp_unit_head
14020 caller.
14021 (skip_one_die): Handle DW_FORM_implicit_const.
14022 (dwarf2_rnglists_process): New function.
14023 (dwarf2_ranges_process): Call dwarf2_rnglists_process for DWARF-5.
14024 (abbrev_table_read_table): Handle DW_FORM_implicit_const.
14025 (read_attribute_value): Handle DW_FORM_implicit_const,
14026 DW_FORM_line_strp.
14027 (read_attribute): Handle DW_FORM_implicit_const.
14028 (read_indirect_string_at_offset_from): New function from
14029 read_indirect_string_at_offset.
14030 (read_indirect_string_at_offset): Call
14031 read_indirect_string_at_offset_from.
14032 (read_indirect_line_string_at_offset): New function.
14033 (read_indirect_string): New function comment.
14034 (read_indirect_line_string): New function.
14035 (read_unsigned_leb128): Make it global.
14036 (dwarf2_string_attr): Handle DWARF-5.
14037 (add_include_dir_stub, read_formatted_entries): New functions.
14038 (dwarf_decode_line_header, dump_die_shallow, cu_debug_loc_section):
14039 Handle DWARF-5.
14040 (per_cu_header_read_in): Update read_comp_unit_head caller.
14041 (dwarf2_version): New function.
14042 * symfile.h (struct dwarf2_debug_sections): Add loclists, line_str and
14043 rnglists.
14044 * xcoffread.c (dwarf2_xcoff_names): Update struct dwarf2_debug_sections
14045 fields.
14046
14047 2017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
14048
14049 * dwarf2read.c (abbrev_table_read_table): Read the data only once.
14050
14051 2017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
14052
14053 * dwarf2read.c (dwarf2_ranges_process): New function from
14054 dwarf2_ranges_read.
14055 (dwarf2_ranges_read, dwarf2_record_block_ranges): Use
14056 dwarf2_ranges_process.
14057
14058 2017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
14059
14060 * dwarf2read.c (create_debug_type_hash_table): New function from
14061 create_debug_types_hash_table.
14062 (create_debug_types_hash_table): Call create_debug_type_hash_table.
14063 (create_all_type_units, open_and_init_dwo_file): Update
14064 create_debug_types_hash_table callers.
14065
14066 2017-02-20 Sergio Durigan Junior <sergiodj@redhat.com>
14067
14068 PR gdb/16188
14069 * fork-child.c (trace_start_error): Fix thinko. va_end should
14070 refer to 'ap', not 'args'.
14071
14072 2017-02-20 Sergio Durigan Junior <sergiodj@redhat.com>
14073 Pedro Alves <palves@redhat.com>
14074
14075 PR gdb/16188
14076 * darwin-nat.c (darwin_ptrace_me): Check if calls to system
14077 calls succeeded.
14078 * fork-child.c (trace_start_error): New function.
14079 (trace_start_error_with_name): Likewise.
14080 * gnu-nat.c (gnu_ptrace_me): Check if call to PTRACE succeeded.
14081 * inf-ptrace.c (inf_ptrace_me): Likewise.
14082 * inferior.h (trace_start_error): New prototype.
14083 (trace_start_error_with_name): Likewise.
14084
14085 2017-02-15 Sergio Durigan Junior <sergiodj@redhat.com>
14086
14087 PR gdb/21164
14088 * psymtab.c (maintenance_print_psymbols): Verify if 'argv' is not
14089 NULL before using it.
14090 * symmisc.c (maintenance_print_symbols): Likewise.
14091 (maintenance_print_msymbols): Likewise.
14092
14093 2017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
14094
14095 * NEWS: Add record Python bindings entry.
14096
14097 2017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
14098
14099 * Makefile.in (SUBDIR_PYTHON_OBS): Add py-record-btrace.o,
14100 py-record-full.o.
14101 (SUBDIR_PYTHON_SRCS): Add py-record-btrace.c, py-record-full.c.
14102 * python/py-record-btrace.c, python/py-record-btrace.h,
14103 python/py-record-full.c, python/py-record-full.h: New file.
14104 * python/py-record.c: Add include for py-record-btrace.h and
14105 py-record-full.h.
14106 (recpy_method, recpy_format, recpy_goto, recpy_replay_position,
14107 recpy_instruction_history, recpy_function_call_history, recpy_begin,
14108 recpy_end): Use functions from py-record-btrace.c and py-record-full.c.
14109 * python/python-internal.h (PyInt_FromSsize_t, PyInt_AsSsize_t):
14110 New definition.
14111 (gdbpy_initialize_btrace): New export.
14112 * python/python.c (_initialize_python): Add gdbpy_initialize_btrace.
14113
14114 2017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
14115
14116 * Makefile.in (SUBDIR_PYTHON_OBS): Add python/py-record.o.
14117 (SUBDIR_PYTHON_SRCS): Add python/py-record.c.
14118 * python/py-record.c: New file.
14119 * python/python-internal.h (gdbpy_start_recording,
14120 gdbpy_current_recording, gdpy_stop_recording,
14121 gdbpy_initialize_record): New export.
14122 * python/python.c (_initialize_python): Add gdbpy_initialize_record.
14123 (python_GdbMethods): Add gdbpy_start_recording,
14124 gdbpy_current_recording and gdbpy_stop_recording.
14125
14126 2017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
14127
14128 * record-btrace.c (record_btrace_record_method): New function.
14129 (init_record_btrace_ops): Initialize to_record_method.
14130 * record-full.c (record_full_record_method): New function.
14131 (init_record_full_ops, init_record_full_core_ops): Add
14132 record_full_record_method.
14133 * record.h (enum record_method): New enum.
14134 * target-debug.h (target_debug_print_enum_record_method: New define.
14135 * target-delegates.c: Regenerate.
14136 * target.c (target_record_method): New function.
14137 * target.h: Include record.h.
14138 (struct target_ops) <to_record_method>: New field.
14139 (target_record_method): New export.
14140
14141 2017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
14142
14143 * record.h (record_start, record_stop): New export.
14144 * record.c (record_start, record_stop): New function.
14145
14146 2017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
14147
14148 * btrace.c (btrace_fetch): Copy function call segments pointer
14149 into a vector.
14150 (btrace_clear): Clear the vector.
14151 (btrace_find_insn_by_number): Use binary search to find the correct
14152 function call segment.
14153 * btrace.h (brace_fun_p): New typedef.
14154 (struct btrace_thread_info) <functions>: New field.
14155
14156 2017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
14157
14158 * record-btrace.c (btrace_ui_out_decode_error): Move most of it ...
14159 * btrace.c (btrace_decode_error): ... here. New function.
14160 * btrace.h (btrace_decode_error): New export.
14161
14162 2017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
14163
14164 * btrace.c (ftrace_call_num_insn, btrace_insn_get_error): New function.
14165 (ftrace_new_function, btrace_insn_number, btrace_insn_cmp,
14166 btrace_find_insn_by_number): Remove special case for gaps.
14167 * btrace.h (btrace_insn_get_error): New export.
14168 (btrace_insn_number, btrace_find_insn_by_number): Adjust comment.
14169 * record-btrace.c (btrace_insn_history): Print number for gaps.
14170 (record_btrace_info, record_btrace_goto): Handle gaps.
14171
14172 2017-02-14 Tom Tromey <tom@tromey.com>
14173
14174 PR python/13598:
14175 * python/python.c (gdbpy_before_prompt_hook): Emit before_prompt
14176 event.
14177 * python/py-evts.c (gdbpy_initialize_py_events): Add
14178 before_prompt registry.
14179 * python/py-events.h (events_object) <before_prompt>: New field.
14180
14181 2017-02-14 Markus Metzger <markus.t.metzger@intel.com>
14182
14183 * btrace.c (ftrace_new_switch): Preserve up link and flags.
14184
14185 2017-02-13 Luis Machado <lgustavo@codesourcery.com>
14186
14187 * symfile (_initialize_symfile): Add usage text to the load command's
14188 help text.
14189
14190 2017-02-10 Simon Marchi <simon.marchi@ericsson.com>
14191
14192 * utils.c (defaulted_query): Don't query on secondary UIs.
14193
14194 2017-02-10 Tom Tromey <tom@tromey.com>
14195
14196 * rust-lang.c (rust_get_disr_info): Remove unused variable.
14197
14198 2017-02-10 Tom Tromey <tom@tromey.com>
14199
14200 * python/py-value.c (valpy_richcompare_throw): Remove unnecessary
14201 "cleanup" local.
14202 * python/py-type.c (typy_legacy_template_argument): Remove
14203 unnecessary "cleanup" local.
14204
14205 2017-02-10 Tom Tromey <tom@tromey.com>
14206
14207 * python/python.c (do_start_initialization): New function, from
14208 _initialize_python.
14209 (_initialize_python): Call do_start_initialization.
14210 * python/py-linetable.c (ltpy_iternext): Use explicit returns, not
14211 goto.
14212
14213 2017-02-10 Tom Tromey <tom@tromey.com>
14214
14215 * python/py-prettyprint.c (pretty_print_one_value): Use
14216 gdbpy_ref.
14217
14218 2017-02-10 Tom Tromey <tom@tromey.com>
14219
14220 * python/py-cmd.c (cmdpy_destroyer): Use gdbpy_ref.
14221 * python/py-breakpoint.c (gdbpy_breakpoint_deleted): Use
14222 gdbpy_ref.
14223 * python/py-type.c (field_new): Use gdbpy_ref.
14224 * python/py-symtab.c (symtab_and_line_to_sal_object): Use
14225 gdbpy_ref.
14226 * python/py-progspace.c (pspy_new): Use gdbpy_ref.
14227 (py_free_pspace): Likewise.
14228 (pspace_to_pspace_object): Likewise.
14229 * python/py-objfile.c (objfpy_new): Use gdbpy_ref.
14230 (py_free_objfile): Likewise.
14231 (objfile_to_objfile_object): Likewise.
14232 * python/py-inferior.c (delete_thread_object): Use
14233 gdbpy_ref.
14234 (infpy_read_memory): Likewise.
14235 (py_free_inferior): Likewise.
14236 * python/py-evtregistry.c (create_eventregistry_object): Use
14237 gdbpy_ref.
14238 * python/py-event.c (create_event_object): Use gdbpy_ref.
14239
14240 2017-02-10 Tom Tromey <tom@tromey.com>
14241
14242 * python/py-ref.h (gdbpy_ref_policy): Now a template.
14243 (gdbpy_ref): Now a template; allow subclasses of PyObject to be
14244 used.
14245 * python/py-arch.c, python/py-bpevent.c, python/py-breakpoint.c,
14246 python/py-cmd.c, python/py-continueevent.c, python/py-event.c,
14247 python/py-exitedevent.c, python/py-finishbreakpoint.c,
14248 python/py-framefilter.c, python/py-function.c,
14249 python/py-inferior.c, python/py-infevents.c,
14250 python/py-linetable.c, python/py-newobjfileevent.c,
14251 python/py-param.c, python/py-prettyprint.c, python/py-ref.h,
14252 python/py-signalevent.c, python/py-stopevent.c,
14253 python/py-symbol.c, python/py-threadevent.c, python/py-type.c,
14254 python/py-unwind.c, python/py-utils.c, python/py-value.c,
14255 python/py-varobj.c, python/py-xmethods.c, python/python.c,
14256 varobj.c: Change gdbpy_ref to gdbpy_ref<>.
14257
14258 2017-02-10 Tom Tromey <tom@tromey.com>
14259
14260 * ui-out.h (ui_out_emit_type): New class.
14261 (ui_out_emit_tuple, ui_out_emit_list): New typedefs.
14262 * python/py-framefilter.c (py_print_single_arg): Use gdb::optional
14263 and ui_out_emit_tuple.
14264 (enumerate_locals): Likewise.
14265 (py_mi_print_variables, py_print_locals, py_print_args): Use
14266 ui_out_emit_list.
14267 (py_print_frame): Use gdb::optional, ui_out_emit_tuple,
14268 ui_out_emit_list.
14269 * common/gdb_optional.h: New file.
14270
14271 2017-02-10 Martin Galvan <martingalvan@sourceware.org>
14272
14273 * MAINTAINERS (Write After Approval): Update my e-mail address.
14274
14275 2017-02-10 Martin Galvan <martingalvan@sourceware.org>
14276
14277 PR gdb/21122
14278 * breakpoint.c (_initialize_breakpoint): Update the help description
14279 of the 'commands' command to indicate that it takes a list argument.
14280
14281 2017-02-09 Simon Marchi <simon.marchi@ericsson.com>
14282
14283 * interps.c (current_interp_set_logging): Remove "return".
14284
14285 2017-02-09 Gary Benson <gbenson@redhat.com>
14286
14287 * symtab.c (add_symtab_completions): Prevent NULL pointer
14288 dereference.
14289
14290 2017-02-08 Pedro Alves <palves@redhat.com>
14291
14292 * interps.c (interp::interp): Remove reference to quiet_p.
14293 (interp_set): Make static. Remove dead "Switching to" output
14294 code.
14295 (interp_quiet_p, interp_set_quiet): Delete.
14296 (interpreter_exec_cmd): Don't set the interpreter quiet.
14297 * interps.h (interp_quiet_p): Make static.
14298 (class interp) <quiet_p>: Remove field
14299
14300 2017-02-08 Jerome Guitton <guitton@adacore.com>
14301
14302 * cli/cli-decode.c (find_command_name_length): Make it extern.
14303 * cli/cli-decode.h (find_command_name_length): Declare.
14304 * cli/cli-script.c (command_name_equals, line_first_arg):
14305 New functions.
14306 (process_next_line): Use cli-decode to parse command names.
14307 (build_command_line): Make args a constant pointer.
14308
14309 2017-02-08 Jerome Guitton <guitton@adacore.com>
14310
14311 * cli-decode.c (lookup_cmd_1, lookup_cmd_composition):
14312 Remove case-insensitive search.
14313
14314 2017-02-07 Jose E. Marchesi <jose.marchesi@oracle.com>
14315
14316 * sparc-tdep.c (sparc32_gdbarch_init): Do not place a + operator
14317 at the end of the line. Avoids an ARI warning.
14318
14319 2017-02-06 Luis Machado <lgustavo@codesourcery.com>
14320
14321 * NEWS: Mention support for record/replay of Intel 64 rdrand and
14322 rdseed instructions.
14323 i386-tdep.c (i386_process_record): Handle Intel 64 rdrand and rseed.
14324
14325 2017-02-06 Ivo Raisr <ivo.raisr@oracle.com>
14326
14327 PR tdep/20936
14328 Provide and use sparc32 and sparc64 target description XML files.
14329 * features/sparc/sparc32-cp0.xml, features/sparc/sparc32-cpu.xml,
14330 features/sparc/sparc32-fpu.xml: New files for sparc 32-bit.
14331 * features/sparc/sparc64-cp0.xml, features/sparc/sparc64-cpu.xml,
14332 features/sparc/sparc64-fpu.xml: New files for sparc 64-bit.
14333 * features/sparc/sparc32-solaris.xml: New file.
14334 * features/sparc/sparc64-solaris.xml: New file.
14335 * features/sparc/sparc32-solaris.c: Generated.
14336 * features/sparc/sparc64-solaris.c: Generated.
14337 * sparc-tdep.h: Account for differences in target descriptions.
14338 * sparc-tdep.c (sparc32_register_name): Use target provided registers.
14339 (sparc32_register_type): Use target provided registers.
14340 (validate_tdesc_registers): New function.
14341 (sparc32_gdbarch_init): Use tdesc_has_registers.
14342 Set pseudoregister functions.
14343 * sparc64-tdep.c (sparc64_register_name): Use target provided registers.
14344 (sparc64_register_type): Use target provided registers.
14345 (sparc64_init_abi): Set pseudoregister functions.
14346
14347 2017-02-03 Tom Tromey <tom@tromey.com>
14348
14349 PR rust/21097:
14350 * rust-lang.c (rust_print_type) <TYPE_CODE_UNION>: Handle enums
14351 with a single member.
14352
14353 2017-02-03 Pedro Alves <palves@redhat.com>
14354
14355 * cli/cli-interp.c (cli_interp_base::cli_interp_base)
14356 (cli_interp_base::~cli_interp_base): New.
14357 (cli_interp): New struct.
14358 (as_cli_interp): Cast the interp itself to cli_interp.
14359 (cli_interpreter_pre_command_loop): Rename to ...
14360 (cli_interp_base::pre_command_loop): ... this. Remove 'self'
14361 parameter.
14362 (cli_interpreter_init): Rename to ...
14363 (cli_interp::init): ... this. Remove 'self' parameter. Use
14364 boolean. Make extern.
14365 (cli_interpreter_resume): Rename to ...
14366 (cli_interp::resume): ... this. Remove 'data' parameter. Make
14367 extern.
14368 (cli_interpreter_suspend): Rename to ...
14369 (cli_interp::suspend): ... this. Remove 'data' parameter. Make
14370 extern.
14371 (cli_interpreter_exec): Rename to ...
14372 (cli_interp::exec): ... this. Remove 'data' parameter. Make
14373 extern.
14374 (cli_interpreter_supports_command_editing): Rename to ...
14375 (cli_interp_base::supports_command_editing): ... this. Remove
14376 'interp' parameter. Make extern.
14377 (cli_ui_out): Rename to ...
14378 (cli_interp::interp_ui_out): ... this. Remove 'interp' parameter.
14379 Make extern.
14380 (cli_set_logging): Rename to ...
14381 (cli_interp_base::set_logging): ... this. Remove 'interp'
14382 parameter. Make extern.
14383 (cli_interp_procs): Delete.
14384 (cli_interp_factory): Adjust to use "new".
14385 * cli/cli-interp.h: Include "interps.h".
14386 (struct cli_interp_base): New struct.
14387 * interps.c (struct interp): Delete. Fields moved to interps.h.
14388 (interp_new): Delete.
14389 (interp::interp, interp::~interp): New.
14390 (interp_set): Use bool, and return void. Assume the interpreter
14391 has suspend, init and resume methods, and that the all return
14392 void.
14393 (set_top_level_interpreter): interp_set returns void.
14394 (interp_ui_out): Adapt.
14395 (current_interp_set_logging): Adapt.
14396 (interp_data): Delete.
14397 (interp_pre_command_loop, interp_supports_command_editing): Adapt.
14398 (interp_exec): Adapt.
14399 (top_level_interpreter_data): Delete.
14400 * interps.h (interp_init_ftype, interp_resume_ftype)
14401 (interp_suspend_ftype, interp_exec_ftype)
14402 (interp_pre_command_loop_ftype, interp_ui_out_ftype): Delete.
14403 (class interp): New.
14404 (interp_new): Delete.
14405 (interp_set): Now returns void. Use bool.
14406 (interp_data, top_level_interpreter_data): Delete.
14407 * mi/mi-common.h: Include interps.h.
14408 (class mi_interp): Inherit from interp. Define a ctor. Declare
14409 init, resume, suspect, exec, interp_ui_out, set_logging and
14410 pre_command_loop methods.
14411 * mi/mi-interp.c (as_mi_interp): Cast the interp itself.
14412 (mi_interpreter_init): Rename to ...
14413 (mi_interp::init): ... this. Remove the 'interp' parameter, use
14414 bool, return void and make extern. Adjust.
14415 (mi_interpreter_resume): ... Rename to ...
14416 (mi_interp::resume): ... this. Remove the 'data' parameter,
14417 return void and make extern. Adjust.
14418 (mi_interpreter_suspend): ... Rename to ...
14419 (mi_interp::suspend): ... this. Remove the 'data' parameter,
14420 return void and make extern. Adjust.
14421 (mi_interpreter_exec): ... Rename to ...
14422 (mi_interp::exec): ... this. Remove the 'data' parameter and make
14423 extern. Adjust.
14424 (mi_interpreter_pre_command_loop): ... Rename to ...
14425 (mi_interp::pre_command_loop): ... this. Remove the 'self'
14426 parameter and make extern.
14427 (mi_on_normal_stop_1): Adjust.
14428 (mi_ui_out): Rename to ...
14429 (mi_interp::interp_ui_out): ... this. Remove the 'interp'
14430 parameter and make extern. Adjust.
14431 (mi_set_logging): Rename to ...
14432 (mi_interp::set_logging): ... this. Remove the 'interp'
14433 parameter and make extern. Adjust.
14434 (mi_interp_procs): Delete.
14435 (mi_interp_factory): Adjust to use 'new'.
14436 * mi/mi-main.c (mi_cmd_gdb_exit, captured_mi_execute_command)
14437 (mi_print_exception, mi_execute_command, mi_load_progress):
14438 Adjust.
14439 * tui/tui-interp.c (tui_interp): New class.
14440 (as_tui_interp): Return a tui_interp pointer.
14441 (tui_on_normal_stop, tui_on_signal_received)
14442 (tui_on_end_stepping_range, tui_on_signal_exited, tui_on_exited)
14443 (tui_on_no_history, tui_on_user_selected_context_changed): Adjust
14444 to use interp::interp_ui_out.
14445 (tui_init): Rename to ...
14446 (tui_interp::init): ... this. Remove the 'self' parameter, use
14447 bool, return void and make extern. Adjust.
14448 (tui_resume): Rename to ...
14449 (tui_interp::resume): ... this. Remove the 'data' parameter,
14450 return void and make extern. Adjust.
14451 (tui_suspend): Rename to ...
14452 (tui_interp::suspend): ... this. Remove the 'data' parameter,
14453 return void and make extern. Adjust.
14454 (tui_ui_out): Rename to ...
14455 (tui_interp::interp_ui_out): ... this. Remove the 'self'
14456 parameter, and make extern. Adjust.
14457 (tui_exec): Rename to ...
14458 (tui_interp::exec): ... this. Remove the 'data' parameter and
14459 make extern.
14460 (tui_interp_procs): Delete.
14461 (tui_interp_factory): Use "new".
14462
14463 2017-02-02 Tom Tromey <tom@tromey.com>
14464
14465 * rust-exp.y (ends_raw_string, space_then_number)
14466 (rust_identifier_start_p): Return bool.
14467 * rust-lang.c (rust_tuple_type_p, rust_underscore_fields)
14468 (rust_tuple_struct_type_p, rust_tuple_variant_type_p)
14469 (rust_slice_type_p, rust_range_type_p, rust_u8_type_p)
14470 (rust_chartype_p): Return bool.
14471 (val_print_struct, rust_print_struct_def, rust_print_type):
14472 Update.
14473 * rust-lang.h (rust_tuple_type_p, rust_tuple_struct_type_p):
14474 Return bool.
14475
14476 2017-02-02 Tom Tromey <tom@tromey.com>
14477
14478 * rust-lang.c: Reindent.
14479
14480 2017-02-02 Tom Tromey <tom@tromey.com>
14481
14482 * rust-lang.h (rust_crate_for_block): Update.
14483 * rust-lang.c (rust_crate_for_block): Return std::string.
14484 (rust_get_disr_info): Use std:;string, not
14485 gdb::unique_xmalloc_ptr.
14486 * rust-exp.y (crate_name): Update.
14487
14488 2017-02-02 Pedro Alves <palves@redhat.com>
14489
14490 * disasm-selftests.c (print_one_insn_test): Move the "verbose"
14491 field out of gdb_disassembler_test and make it static.
14492
14493 2017-02-02 Pedro Alves <palves@redhat.com>
14494
14495 * mi/mi-common.h (struct mi_interp): Delete the mi2_interp,
14496 mi1_interp and mi_interp fields.
14497
14498 2017-02-02 Pedro Alves <palves@redhat.com>
14499
14500 * cli/cli-interp.c (struct saved_output_files, saved_output):
14501 Moved from cli/cli-logging.c.
14502 (cli_set_logging): New function.
14503 (cli_interp_procs): Install cli_set_logging.
14504 * cli/cli-interp.h (make_logging_output, cli_set_logging):
14505 Declare.
14506 * cli/cli-logging.c (struct saved_output_files, saved_output):
14507 Moved to cli/cli-interp.c.
14508 (pop_output_files): Don't save outputs here.
14509 (make_logging_output): New function.
14510 (handle_redirections): Don't build tee nor save previous outputs
14511 here.
14512 * interps.c (current_interp_set_logging): Change prototype.
14513 Assume there's always a set_logging_proc method installed.
14514 * interps.h (interp_set_logging_ftype): Change prototype.
14515 (current_interp_set_logging): Change prototype and adjust comment.
14516 * mi/mi-interp.c (mi_set_logging): Change protototype. Adjust to
14517 use make_logging_output.
14518 * tui/tui-interp.c (tui_interp_procs): Install cli_set_logging.
14519 2017-02-02 Pedro Alves <palves@redhat.com>
14520
14521 * cli/cli-logging.c (maybe_warn_already_logging): New factored out
14522 from ...
14523 (set_logging_overwrite): ... here.
14524 (logging_no_redirect_file): Delete.
14525 (set_logging_redirect): Don't handle redirection on the fly.
14526 Instead warn that "logging off" / "logging on" is necessary.
14527 (pop_output_files): Delete references to logging_no_redirect_file.
14528 (show_logging_command): Always speak in terms of what will happen
14529 once logging is reenabled.
14530
14531 2017-02-02 Pedro Alves <palves@redhat.com>
14532
14533 * disasm.h (gdb_pretty_print_disassembler): Tweak intro comment.
14534
14535 2017-02-02 Pedro Alves <palves@redhat.com>
14536
14537 * disasm.c (gdb_pretty_print_insn): Rename to ...
14538 (gdb_pretty_print_disassembler::pretty_print_insn): ... this.
14539 Remove gdbarch parameter. Adapt to clear the object's buffers
14540 instead of allocating new buffers, and to print using the object's
14541 gdb_disassembler instead of calling gdb_print_insn.
14542 (dump_insns): Use gdb_pretty_print_disassembler.
14543 * disasm.h (gdb_pretty_print_insn): Delete declaration.
14544 (gdb_pretty_print_disassembler): New class.
14545 * record-btrace.c (btrace_insn_history): Use
14546 gdb_pretty_print_disassembler.
14547
14548 2017-02-02 Pedro Alves <palves@redhat.com>
14549
14550 * ada-lang.c (type_as_string): Use string_file.
14551 * ada-valprint.c (ada_print_floating): Use string_file.
14552 * ada-varobj.c (ada_varobj_scalar_image)
14553 (ada_varobj_get_value_image): Use string_file.
14554 * aix-thread.c (aix_thread_extra_thread_info): Use string_file.
14555 * arm-tdep.c (_initialize_arm_tdep): Use string_printf.
14556 * breakpoint.c (update_inserted_breakpoint_locations)
14557 (insert_breakpoint_locations, reattach_breakpoints)
14558 (print_breakpoint_location, print_one_detail_ranged_breakpoint)
14559 (print_it_watchpoint): Use string_file.
14560 (save_breakpoints): Use stdio_file.
14561 * c-exp.y (oper): Use string_file.
14562 * cli/cli-logging.c (set_logging_redirect): Use ui_file_up and
14563 tee_file.
14564 (pop_output_files): Use delete.
14565 (handle_redirections): Use stdio_file and tee_file.
14566 * cli/cli-setshow.c (do_show_command): Use string_file.
14567 * compile/compile-c-support.c (c_compute_program): Use
14568 string_file.
14569 * compile/compile-c-symbols.c (generate_vla_size): Take a
14570 'string_file &' instead of a 'ui_file *'.
14571 (generate_c_for_for_one_variable): Take a 'string_file &' instead
14572 of a 'ui_file *'. Use string_file.
14573 (generate_c_for_variable_locations): Take a 'string_file &'
14574 instead of a 'ui_file *'.
14575 * compile/compile-internal.h (generate_c_for_for_one_variable):
14576 Take a 'string_file &' instead of a 'ui_file *'.
14577 * compile/compile-loc2c.c (push, pushf, unary, binary)
14578 (print_label, pushf_register_address, pushf_register)
14579 (do_compile_dwarf_expr_to_c): Take a 'string_file &' instead of a
14580 'ui_file *'. Adjust.
14581 * compile/compile.c (compile_to_object): Use string_file.
14582 * compile/compile.h (compile_dwarf_expr_to_c)
14583 (compile_dwarf_bounds_to_c): Take a 'string_file &' instead of a
14584 'ui_file *'.
14585 * cp-support.c (inspect_type): Use string_file and obstack_copy0.
14586 (replace_typedefs_qualified_name): Use string_file and
14587 obstack_copy0.
14588 * disasm.c (gdb_pretty_print_insn): Use string_file.
14589 (gdb_disassembly): Adjust reference the null_stream global.
14590 (do_ui_file_delete): Delete.
14591 (gdb_insn_length): Use null_stream.
14592 * dummy-frame.c (maintenance_print_dummy_frames): Use stdio_file.
14593 * dwarf2loc.c (dwarf2_compile_property_to_c)
14594 (locexpr_generate_c_location, loclist_generate_c_location): Take a
14595 'string_file &' instead of a 'ui_file *'.
14596 * dwarf2loc.h (dwarf2_compile_property_to_c): Likewise.
14597 * dwarf2read.c (do_ui_file_peek_last): Delete.
14598 (dwarf2_compute_name): Use string_file.
14599 * event-top.c (gdb_setup_readline): Use stdio_file.
14600 * gdbarch.sh (verify_gdbarch): Use string_file.
14601 * gdbtypes.c (safe_parse_type): Use null_stream.
14602 * guile/scm-breakpoint.c (gdbscm_breakpoint_commands): Use
14603 string_file.
14604 * guile/scm-disasm.c (gdbscm_print_insn_from_port): Take a
14605 'string_file *' instead of a 'ui_file *'.
14606 (gdbscm_arch_disassemble): Use string_file.
14607 * guile/scm-frame.c (frscm_print_frame_smob): Use string_file.
14608 * guile/scm-ports.c (class ioscm_file_port): Now a class that
14609 inherits from ui_file.
14610 (ioscm_file_port_delete, ioscm_file_port_rewind)
14611 (ioscm_file_port_put): Delete.
14612 (ioscm_file_port_write): Rename to ...
14613 (ioscm_file_port::write): ... this. Remove file_port_magic
14614 checks.
14615 (ioscm_file_port_new): Delete.
14616 (ioscm_with_output_to_port_worker): Use ioscm_file_port and
14617 ui_file_up.
14618 * guile/scm-type.c (tyscm_type_name): Use string_file.
14619 * guile/scm-value.c (vlscm_print_value_smob, gdbscm_value_print):
14620 Use string_file.
14621 * infcmd.c (print_return_value_1): Use string_file.
14622 * infrun.c (print_target_wait_results): Use string_file.
14623 * language.c (add_language): Use string_file.
14624 * location.c (explicit_to_string_internal): Use string_file.
14625 * main.c (captured_main_1): Use null_file.
14626 * maint.c (maintenance_print_architecture): Use stdio_file.
14627 * mi/mi-cmd-stack.c (list_arg_or_local): Use string_file.
14628 * mi/mi-common.h (struct mi_interp) <out, err, log, targ,
14629 event_channel>: Change type to mi_console_file pointer.
14630 * mi/mi-console.c (mi_console_file_fputs, mi_console_file_flush)
14631 (mi_console_file_delete): Delete.
14632 (struct mi_console_file): Delete.
14633 (mi_console_file_magic): Delete.
14634 (mi_console_file_new): Delete.
14635 (mi_console_file::mi_console_file): New.
14636 (mi_console_file_delete): Delete.
14637 (mi_console_file_fputs): Delete.
14638 (mi_console_file::write): New.
14639 (mi_console_raw_packet): Delete.
14640 (mi_console_file::flush): New.
14641 (mi_console_file_flush): Delete.
14642 (mi_console_set_raw): Rename to ...
14643 (mi_console_file::set_raw): ... this.
14644 * mi/mi-console.h (class mi_console_file): New class.
14645 (mi_console_file_new, mi_console_set_raw): Delete.
14646 * mi/mi-interp.c (mi_interpreter_init): Use mi_console_file.
14647 (mi_set_logging): Use delete and tee_file. Adjust.
14648 * mi/mi-main.c (output_register): Use string_file.
14649 (mi_cmd_data_evaluate_expression): Use string_file.
14650 (mi_cmd_data_read_memory): Use string_file.
14651 (mi_cmd_execute, print_variable_or_computed): Use string_file.
14652 * mi/mi-out.c (mi_ui_out::main_stream): New.
14653 (mi_ui_out::rewind): Use main_stream and
14654 string_file.
14655 (mi_ui_out::put): Use main_stream and string_file.
14656 (mi_ui_out::mi_ui_out): Remove 'stream' parameter.
14657 Allocate a 'string_file' instead.
14658 (mi_out_new): Don't allocate a mem_fileopen stream here.
14659 * mi/mi-out.h (mi_ui_out::mi_ui_out): Remove 'stream' parameter.
14660 (mi_ui_out::main_stream): Declare method.
14661 * printcmd.c (eval_command): Use string_file.
14662 * psymtab.c (maintenance_print_psymbols): Use stdio_file.
14663 * python/py-arch.c (archpy_disassemble): Use string_file.
14664 * python/py-breakpoint.c (bppy_get_commands): Use string_file.
14665 * python/py-frame.c (frapy_str): Use string_file.
14666 * python/py-framefilter.c (py_print_type, py_print_single_arg):
14667 Use string_file.
14668 * python/py-type.c (typy_str): Use string_file.
14669 * python/py-unwind.c (unwind_infopy_str): Use string_file.
14670 * python/py-value.c (valpy_str): Use string_file.
14671 * record-btrace.c (btrace_insn_history): Use string_file.
14672 * regcache.c (regcache_print): Use stdio_file.
14673 * reggroups.c (maintenance_print_reggroups): Use stdio_file.
14674 * remote.c (escape_buffer): Use string_file.
14675 * rust-lang.c (rust_get_disr_info): Use string_file.
14676 * serial.c (serial_open_ops_1): Use stdio_file.
14677 (do_serial_close): Use delete.
14678 * stack.c (print_frame_arg): Use string_file.
14679 (print_frame_args): Remove local mem_fileopen stream, not used.
14680 (print_frame): Use string_file.
14681 * symmisc.c (maintenance_print_symbols): Use stdio_file.
14682 * symtab.h (struct symbol_computed_ops) <generate_c_location>:
14683 Take a 'string_file *' instead of a 'ui_file *'.
14684 * top.c (new_ui): Use stdio_file and stderr_file.
14685 (free_ui): Use delete.
14686 (execute_command_to_string): Use string_file.
14687 (quit_confirm): Use string_file.
14688 * tracepoint.c (collection_list::append_exp): Use string_file.
14689 * tui/tui-disasm.c (tui_disassemble): Use string_file.
14690 * tui/tui-file.c: Don't include "ui-file.h".
14691 (enum streamtype, struct tui_stream): Delete.
14692 (tui_file_new, tui_file_delete, tui_fileopen, tui_sfileopen)
14693 (tui_file_isatty, tui_file_rewind, tui_file_put): Delete.
14694 (tui_file::tui_file): New method.
14695 (tui_file_fputs): Delete.
14696 (tui_file_get_strbuf): Delete.
14697 (tui_file::puts): New method.
14698 (tui_file_adjust_strbuf): Delete.
14699 (tui_file_flush): Delete.
14700 (tui_file::flush): New method.
14701 * tui/tui-file.h: Tweak intro comment.
14702 Include ui-file.h.
14703 (tui_fileopen, tui_sfileopen, tui_file_get_strbuf)
14704 (tui_file_adjust_strbuf): Delete declarations.
14705 (class tui_file): New class.
14706 * tui/tui-io.c (tui_initialize_io): Use tui_file.
14707 * tui/tui-regs.c (tui_restore_gdbout): Use delete.
14708 (tui_register_format): Use string_stream.
14709 * tui/tui-stack.c (tui_make_status_line): Use string_file.
14710 (tui_get_function_from_frame): Use string_file.
14711 * typeprint.c (type_to_string): Use string_file.
14712 * ui-file.c (struct ui_file, ui_file_magic, ui_file_new): Delete.
14713 (null_stream): New global.
14714 (ui_file_delete): Delete.
14715 (ui_file::ui_file): New.
14716 (null_file_isatty): Delete.
14717 (ui_file::~ui_file): New.
14718 (null_file_rewind): Delete.
14719 (ui_file::printf): New.
14720 (null_file_put): Delete.
14721 (null_file_flush): Delete.
14722 (ui_file::putstr): New.
14723 (null_file_write): Delete.
14724 (ui_file::putstrn): New.
14725 (null_file_read): Delete.
14726 (ui_file::putc): New.
14727 (null_file_fputs): Delete.
14728 (null_file_write_async_safe): Delete.
14729 (ui_file::vprintf): New.
14730 (null_file_delete): Delete.
14731 (null_file::write): New.
14732 (null_file_fseek): Delete.
14733 (null_file::puts): New.
14734 (ui_file_data): Delete.
14735 (null_file::write_async_safe): New.
14736 (gdb_flush, ui_file_isatty): Adjust.
14737 (ui_file_put, ui_file_rewind): Delete.
14738 (ui_file_write): Adjust.
14739 (ui_file_write_for_put): Delete.
14740 (ui_file_write_async_safe, ui_file_read): Adjust.
14741 (ui_file_fseek): Delete.
14742 (fputs_unfiltered): Adjust.
14743 (set_ui_file_flush, set_ui_file_isatty, set_ui_file_rewind)
14744 (set_ui_file_put, set_ui_file_write, set_ui_file_write_async_safe)
14745 (set_ui_file_read, set_ui_file_fputs, set_ui_file_fseek)
14746 (set_ui_file_data): Delete.
14747 (string_file::~string_file, string_file::write)
14748 (struct accumulated_ui_file, do_ui_file_xstrdup, ui_file_xstrdup)
14749 (do_ui_file_as_string, ui_file_as_string): Delete.
14750 (do_ui_file_obsavestring, ui_file_obsavestring): Delete.
14751 (struct mem_file): Delete.
14752 (mem_file_new): Delete.
14753 (stdio_file::stdio_file): New.
14754 (mem_file_delete): Delete.
14755 (stdio_file::stdio_file): New.
14756 (mem_fileopen): Delete.
14757 (stdio_file::~stdio_file): New.
14758 (mem_file_rewind): Delete.
14759 (stdio_file::set_stream): New.
14760 (mem_file_put): Delete.
14761 (stdio_file::open): New.
14762 (mem_file_write): Delete.
14763 (stdio_file_magic, struct stdio_file): Delete.
14764 (stdio_file_new, stdio_file_delete, stdio_file_flush): Delete.
14765 (stdio_file::flush): New.
14766 (stdio_file_read): Rename to ...
14767 (stdio_file::read): ... this. Adjust.
14768 (stdio_file_write): Rename to ...
14769 (stdio_file::write): ... this. Adjust.
14770 (stdio_file_write_async_safe): Rename to ...
14771 (stdio_file::write_async_safe) ... this. Adjust.
14772 (stdio_file_fputs): Rename to ...
14773 (stdio_file::puts) ... this. Adjust.
14774 (stdio_file_isatty): Delete.
14775 (stdio_file_fseek): Delete.
14776 (stdio_file::isatty): New.
14777 (stderr_file_write): Rename to ...
14778 (stderr_file::write) ... this. Adjust.
14779 (stderr_file_fputs): Rename to ...
14780 (stderr_file::puts) ... this. Adjust.
14781 (stderr_fileopen, stdio_fileopen, gdb_fopen): Delete.
14782 (stderr_file::stderr_file): New.
14783 (tee_file_magic): Delete.
14784 (struct tee_file): Delete.
14785 (tee_file::tee_file): New.
14786 (tee_file_new): Delete.
14787 (tee_file::~tee_file): New.
14788 (tee_file_delete): Delete.
14789 (tee_file_flush): Rename to ...
14790 (tee_file::flush): ... this. Adjust.
14791 (tee_file_write): Rename to ...
14792 (tee_file::write): ... this. Adjust.
14793 (tee_file::write_async_safe): New.
14794 (tee_file_fputs): Rename to ...
14795 (tee_file::puts): ... this. Adjust.
14796 (tee_file_isatty): Rename to ...
14797 (tee_file::isatty): ... this. Adjust.
14798 * ui-file.h (struct obstack, struct ui_file): Don't
14799 forward-declare.
14800 (ui_file_new, ui_file_flush_ftype, set_ui_file_flush)
14801 (ui_file_write_ftype)
14802 (set_ui_file_write, ui_file_fputs_ftype, set_ui_file_fputs)
14803 (ui_file_write_async_safe_ftype, set_ui_file_write_async_safe)
14804 (ui_file_read_ftype, set_ui_file_read, ui_file_isatty_ftype)
14805 (set_ui_file_isatty, ui_file_rewind_ftype, set_ui_file_rewind)
14806 (ui_file_put_method_ftype, ui_file_put_ftype, set_ui_file_put)
14807 (ui_file_delete_ftype, set_ui_file_data, ui_file_fseek_ftype)
14808 (set_ui_file_fseek): Delete.
14809 (ui_file_data, ui_file_delete, ui_file_rewind)
14810 (struct ui_file): New.
14811 (ui_file_up): New.
14812 (class null_file): New.
14813 (null_stream): Declare.
14814 (ui_file_write_for_put, ui_file_put): Delete.
14815 (ui_file_xstrdup, ui_file_as_string, ui_file_obsavestring):
14816 Delete.
14817 (ui_file_fseek, mem_fileopen, stdio_fileopen, stderr_fileopen)
14818 (gdb_fopen, tee_file_new): Delete.
14819 (struct string_file): New.
14820 (struct stdio_file): New.
14821 (stdio_file_up): New.
14822 (struct stderr_file): New.
14823 (class tee_file): New.
14824 * ui-out.c (ui_out::field_stream): Take a 'string_file &' instead
14825 of a 'ui_file *'. Adjust.
14826 * ui-out.h (class ui_out) <field_stream>: Likewise.
14827 * utils.c (do_ui_file_delete, make_cleanup_ui_file_delete)
14828 (null_stream): Delete.
14829 (error_stream): Take a 'string_file &' instead of a 'ui_file *'.
14830 Adjust.
14831 * utils.h (struct ui_file): Delete forward declaration..
14832 (make_cleanup_ui_file_delete, null_stream): Delete declarations.
14833 (error_stream): Take a 'string_file &' instead of a
14834 'ui_file *'.
14835 * varobj.c (varobj_value_get_print_value): Use string_file.
14836 * xtensa-tdep.c (xtensa_verify_config): Use string_file.
14837 * gdbarch.c: Regenerate.
14838
14839 2017-02-02 Pedro Alves <palves@redhat.com>
14840
14841 * disasm.c (gdb_disassembler::pretty_print_insn): Rename to...
14842 (gdb_pretty_print_insn): ... this. Now a free function. Add back
14843 a 'gdbarch' parameter. Allocate a mem_fileopen stream here.
14844 Adjust to call gdb_print_insn instead of
14845 gdb_disassembler::print_insn.
14846 (dump_insns, do_mixed_source_and_assembly_deprecated)
14847 (do_mixed_source_and_assembly, do_assembly_only): Add back a
14848 'gdbarch' parameter. Remove gdb_disassembler parameter.
14849 (gdb_disassembly): Don't allocate a gdb_disassembler here.
14850 * disasm.h (gdb_disassembler::pretty_print_insn): Delete
14851 declaration.
14852 (gdb_pretty_print_insn): Re-add declaration.
14853 * record-btrace.c (btrace_insn_history): Don't allocate a
14854 gdb_disassembler here. Adjust to call gdb_pretty_print_insn.
14855
14856 2017-02-01 Simon Marchi <simon.marchi@polymtl.ca>
14857
14858 * disasm.h (gdb_disassembly): Remove file_string parameter.
14859 * disasm.c (gdb_disassembly): Likewise.
14860 * cli/cli-cmds.c (print_disassembly): Adapt.
14861 * mi/mi-cmd-disas.c (mi_cmd_disassemble): Likewise.
14862 * stack.c (do_gdb_disassembly): Likewise.
14863
14864 2017-02-01 Andreas Arnez <arnez@linux.vnet.ibm.com>
14865
14866 * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): For
14867 DWARF_VALUE_LITERAL, no longer ignore the offset on big-endian
14868 targets. And if the implicit value is longer than needed, extract
14869 the first bytes instead of the "least significant" ones.
14870
14871 2017-02-01 Markus Metzger <markus.t.metzger@intel.com>
14872
14873 * btrace.c (btrace_enable): Do not call btrace_add_pc for
14874 BTRACE_FORMAT_PT or if can_access_registers_ptid returns false.
14875 (btrace_fetch): Assert can_access_registers_ptid.
14876 * record-btrace.c (require_btrace_thread, record_btrace_info): Call
14877 validate_registers_access.
14878
14879 2017-02-01 Markus Metzger <markus.t.metzger@intel.com>
14880
14881 * gdbthread.h (can_access_registers_ptid): New.
14882 * thread.c (can_access_registers_ptid): New.
14883
14884 2017-02-01 Pedro Alves <palves@redhat.com>
14885
14886 * i386-tdep.c (i386_fast_tracepoint_valid_at): Use gdb_insn_length.
14887
14888 2017-01-31 Pedro Alves <palves@redhat.com>
14889
14890 * mi/mi-interp.c (mi_breakpoint_created, mi_breakpoint_modified):
14891 Fix typos.
14892
14893 2017-01-31 Pedro Alves <palves@redhat.com>
14894
14895 * stack.c (print_frame_args): Remove local mem_fileopen stream,
14896 not used.
14897
14898 2017-01-31 Pedro Alves <palves@redhat.com>
14899
14900 * varobj.c (varobj_value_get_print_value): Remove xstrdup call.
14901
14902 2017-01-31 Pedro Alves <palves@redhat.com>
14903
14904 * common/scoped_restore.h
14905 (scoped_restore_tmpl::scoped_restore_tmpl): Template on T2, and
14906 change the value's parameter type to T2.
14907 (make_scoped_restore): Likewise.
14908
14909 2017-01-27 Walfred Tedeschi <walfred.tedeschi@intel.com>
14910 Richard Henderson <rth@redhat.com>
14911
14912 * amd64-linux-nat.c (PTRACE_ARCH_PRCTL): New define.
14913 (amd64_linux_fetch_inferior_registers): Add case to fetch FS_BASE
14914 GS_BASE for older kernels.
14915 (amd64_linux_store_inferior_registers): Add case to store FS_BASE
14916 GS_BASE for older kernels.
14917 * amd64-linux-tdep.c (amd64_linux_gregset_reg_offset): Add FS_BASE
14918 and GS_BASE to the offset table.
14919 (amd64_linux_register_reggroup_p): Add FS_BASE and GS_BASE to the
14920 system register group.
14921 * amd64-nat.c (amd64_native_gregset_reg_offset): Implements case
14922 for older kernels.
14923 * amd64-tdep.c (amd64_init_abi): Add segment registers for the
14924 amd64 ABI.
14925 * amd64-tdep.h (amd64_regnum): Add AMD64_FSBASE_REGNUM and
14926 AMD64_GSBASE_REGNUM.
14927 (AMD64_NUM_REGS): Set to AMD64_GSBASE_REGNUM + 1.
14928 * features/Makefile (amd64-linux.dat, amd64-avx-linux.dat)
14929 (amd64-mpx-linux.dat, amd64-avx512-linux.dat, x32-linux.dat)
14930 (x32-avx-linux.dat, x32-avx512-linux.dat): Add
14931 i386/64bit-segments.xml in those rules.
14932 * features/i386/64bit-segments.xml: New file.
14933 * features/i386/amd64-avx-mpx-linux.xml: Add 64bit-segments.xml.
14934 * features/i386/amd64-avx-linux.xml: Add 64bit-segments.xml.
14935 * features/i386/amd64-avx512-linux.xml: Add 64bit-segments.xml.
14936 * features/i386/amd64-mpx-linux.xml: Add 64bit-segments.xml.
14937 * features/i386/x32-avx512-linux.xml: Add 64bit-segments.xml.
14938 * features/i386/x32-avx-linux.xml: Add 64bit-segments.xml.
14939 * features/i386/amd64-linux.xml: Add 64bit-segments.xml.
14940 * features/i386/amd64-avx-linux.c: Regenerated.
14941 * features/i386/amd64-avx-mpx-linux.c: Regenerated.
14942 * features/i386/amd64-avx-mpx.c: Regenerated.
14943 * features/i386/amd64-avx512-linux.c: Regenerated.
14944 * features/i386/amd64-linux.c: Regenerated.
14945 * features/i386/amd64-mpx-linux.c: Regenerated.
14946 * features/i386/i386-avx-mpx-linux.c: Regenerated.
14947 * features/i386/i386-avx-mpx.c: Regenerated.
14948 * features/i386/x32-avx-linux.c: Regenerated.
14949 * features/i386/x32-avx512-linux.c: Regenerated.
14950 * regformats/i386/amd64-avx-linux.dat: Regenerated.
14951 * regformats/i386/amd64-avx-mpx-linux.dat: Regenerated.
14952 * regformats/i386/amd64-avx512-linux.dat: Regenerated.
14953 * regformats/i386/amd64-linux.dat: Regenerated.
14954 * regformats/i386/amd64-mpx-linux.dat: Regenerated.
14955 * regformats/i386/x32-avx-linux.dat: Regenerated.
14956 * regformats/i386/x32-avx512-linux.dat: Regenerated.
14957 * regformats/i386/x32-linux.dat: Regenerated.
14958
14959 2017-01-27 Walfred Tedeschi <walfred.tedeschi@intel.com>
14960
14961 * amd64-linux-tdep.h (AMD64_LINUX_ORIG_RAX_REGNUM):
14962 Set to AMD64_NUM_REGS.
14963
14964 2017-01-27 Walfred Tedeschi <walfred.tedeschi@intel.com>
14965
14966 * amd64-nat.c (amd64_native_gregset_reg_offset): Simplify logic
14967 that checks validity of a register number.
14968
14969 2017-01-27 Kees Cook <keescook@google.com>
14970
14971 * gdb/arm-linux-nat.c (arm_linux_fetch_inferior_registers): Call
14972 fetch_fpregs if target has fpa registers.
14973 (arm_linux_store_inferior_registers): Call store_fpregs if target
14974 has fpa registers.
14975
14976 2017-01-26 Andreas Arnez <arnez@linux.vnet.ibm.com>
14977
14978 * cris-tdep.c (cris_gdbarch_init): Remove check for
14979 info.byte_order and force it to BFD_ENDIAN_LITTLE.
14980
14981 2017-01-26 Antoine Tremblay <antoine.tremblay@ericsson.com>
14982
14983 * corelow.c (get_core_register_section): Check for regset
14984 existence before checking for REGSET_VARIABLE_SIZE.
14985
14986 2017-01-26 Yao Qi <yao.qi@linaro.org>
14987 Pedro Alves <palves@redhat.com>
14988
14989 PR gdb/20939
14990 * disasm.c (gdb_disassembler::dis_asm_memory_error): Don't
14991 call memory_error, save memaddr instead.
14992 (gdb_disassembler::print_insn): If gdbarch_print_insn returns
14993 negative, cal memory_error.
14994 * disasm.h (gdb_disassembler) <m_err_memaddr>: New field.
14995
14996 2017-01-26 Yao Qi <yao.qi@linaro.org>
14997
14998 * disasm-selftests.c (memory_error_test): New function.
14999 (_initialize_disasm_selftests): Register memory_error_test.
15000
15001 2017-01-26 Yao Qi <yao.qi@linaro.org>
15002
15003 * Makefile.in (SFILES): Add disasm-selftests.c and
15004 selftest-arch.c.
15005 (COMMON_OBS): Add disasm-selftests.o and selftest-arch.o.
15006 * disasm-selftests.c: New file.
15007 * selftest-arch.c: New file.
15008 * selftest-arch.h: New file.
15009
15010 2017-01-26 Yao Qi <yao.qi@linaro.org>
15011
15012 * mep-tdep.c (mep_gdb_print_insn): Set info->arch
15013 to bfd_arch_mep. Don't return 0 if section is not
15014 found. Call print_insn_mep.
15015
15016 2017-01-26 Pedro Alves <palves@redhat.com>
15017 Yao Qi <yao.qi@linaro.org>
15018
15019 * arm-tdep.c: Include "disasm.h".
15020 (gdb_print_insn_arm): Update code to get gdbarch.
15021 * disasm.c (dis_asm_read_memory): Change it to
15022 gdb_disassembler::dis_asm_read_memory.
15023 (dis_asm_memory_error): Likewise.
15024 (dis_asm_print_address): Likewise.
15025 (gdb_pretty_print_insn): Change it to
15026 gdb_disassembler::pretty_print_insn.
15027 (dump_insns): Add one argument gdb_disassemlber. All
15028 callers updated.
15029 (do_mixed_source_and_assembly_deprecated): Likewise.
15030 (do_mixed_source_and_assembly): Likewise.
15031 (do_assembly_only): Likewise.
15032 (gdb_disassembler::gdb_disassembler): New.
15033 (gdb_disassembler::print_insn): New.
15034 * disasm.h (class gdb_disassembler): New.
15035 (gdb_pretty_print_insn): Remove declaration.
15036 (gdb_disassemble_info): Likewise.
15037 * guile/scm-disasm.c (class gdbscm_disassembler): New.
15038 (gdbscm_disasm_read_memory_worker): Update.
15039 (gdbscm_disasm_read_memory): Update.
15040 (gdbscm_disasm_memory_error): Remove.
15041 (gdbscm_disasm_print_address): Remove.
15042 (gdbscm_disassembler::gdbscm_disassembler): New.
15043 (gdbscm_print_insn_from_port): Update.
15044 * mips-tdep.c: Include disasm.h.
15045 (gdb_print_insn_mips): Update code to get gdbarch.
15046 * record-btrace.c (btrace_insn_history): Update.
15047 * spu-tdep.c: Include disasm.h.
15048 (struct spu_dis_asm_data): Remove.
15049 (struct spu_dis_asm_info): New.
15050 (spu_dis_asm_print_address): Use spu_dis_asm_info to get
15051 SPU id.
15052 (gdb_print_insn_spu): Cast disassemble_info to
15053 spu_dis_asm_info.
15054
15055 2017-01-26 Yao Qi <yao.qi@linaro.org>
15056
15057 * disasm.c (do_ui_file_delete): Delete.
15058 (gdb_insn_length): Move code creating stream to ...
15059 * utils.c (null_stream): ... here. New function.
15060 * utils.h (null_stream): Declare.
15061
15062 2017-01-23 Simon Marchi <simon.marchi@polymtl.ca>
15063
15064 * python/py-inferior.c (find_thread_object): Return directly
15065 from the loop. Remove "found" variable.
15066
15067 2017-01-21 Joel Brobecker <brobecker@adacore.com>
15068
15069 GDB 7.12.1 released.
15070
15071 2017-01-20 Simon Marchi <simon.marchi@ericsson.com>
15072
15073 * python/py-function.c (fnpy_call): Reorder declarations to have
15074 the gdbpy_enter object declared first.
15075 * python/py-xmethods.c (gdbpy_get_xmethod_arg_types): Likewise.
15076
15077 2017-01-20 Simon Marchi <simon.marchi@ericsson.com>
15078
15079 PR python/21068
15080 * python/python-internal.h (PyMem_RawMalloc): Define for
15081 Python < 3.4.
15082 * python/py-gdb-readline.c (gdbpy_readline_wrapper): Use
15083 PyMem_RawMalloc instead of PyMem_Malloc.
15084
15085 2017-01-20 Mike Wrighton <mike_wrighton@codesourcery.com>
15086 Luis Machado <lgustavo@codesourcery.com>
15087
15088 * NEWS (New commands): Mention flash-erase.
15089 (New MI commands): Mention target-flash-erase.
15090 * mi/mi-cmds.c (mi_cmd_target_flash_erase): Add target-flash-erase MI
15091 command.
15092 * mi/mi-cmds.h (mi_cmd_target_flash_erase): New declaration.
15093 * mi/mi-main.c (mi_cmd_target_flash_erase): New function.
15094 * target.c (flash_erase_command): New function.
15095 (initialize_targets): Add new flash-erase command.
15096 * target.h (flash_erase_command): New declaration.
15097
15098 2017-01-20 Joel Brobecker <brobecker@adacore.com>
15099
15100 * nat/linux-ptrace.c: Only include <sys/procfs.h> if
15101 HAVE_SYS_PROCFS_H is defined.
15102
15103 2017-01-18 Alan Hayward <alan.hayward@arm.com>
15104
15105 * remote.c (struct cached_reg): Change data into a pointer.
15106 * (stop_reply_dtr): Free data pointers before deleting vector.
15107 (process_stop_reply): Likewise.
15108 (remote_parse_stop_reply): Allocate space for data
15109
15110 2017-01-18 Alan Hayward <alan.hayward@arm.com>
15111
15112 * amd64-tdep.c (amd64_pseudo_register_read_value): remove
15113 MAX_REGISTER_SIZE.
15114 (amd64_pseudo_register_read_value): Likewise.
15115 * remote.c (fetch_register_using_p): Remove MAX_REGISTER_SIZE.
15116 (store_register_using_P): Likewise.
15117 * regcache.c (regcache_xfer_part): Likewise.
15118
15119 2017-01-16 Ivo Raisr <ivo.raisr@oracle.com>
15120
15121 Split real and pseudo registers.
15122 * sparc-tdep.h (SPARC_CORE_REGISTERS): New macro.
15123 (sparc32_pseudo_regnum): New enum.
15124 * sparc64-tdep.h (sparc64_pseudo_regnum): New enum.
15125 * sparc-tdep.c (SPARC32_FPU_REGISTERS): New macro.
15126 (SPARC32_CP0_REGISTERS): New macro.
15127 (sparc32_pseudo_register_name): New function.
15128 (sparc32_register_name): Use sparc32_pseudo_register_name.
15129 (sparc32_pseudo_register_type): New function.
15130 (sparc32_register_type): Use sparc32_pseudo_register_type.
15131 (sparc32_pseudo_register_read, sparc32_pseudo_register_write): Handle
15132 pseudo register numbers.
15133 * sparc64-tdep.c SPARC64_FPU_REGISTERS): New macro.
15134 (SPARC64_CP0_REGISTERS): New macro.
15135 (sparc64_pseudo_register_name): New function.
15136 (sparc64_register_name): Use sparc64_pseudo_register_name.
15137 (sparc64_pseudo_register_type): New function.
15138 (sparc64_register_type): Use sparc64_pseudo_register_type.
15139 (sparc64_pseudo_register_read, sparc64_pseudo_register_write): Handle
15140 pseudo register numbers.
15141 (sparc64_store_floating_fields, sparc64_extract_floating_fields,
15142 sparc64_store_arguments): Handle pseudo register numbers.
15143
15144 2017-01-13 Yao Qi <yao.qi@linaro.org>
15145
15146 * remote.c (REMOTE_DEBUG_MAX_CHAR): New macro.
15147 (putpkt_binary): Print only REMOTE_DEBUG_MAX_CHAR chars in debug
15148 output.
15149 (getpkt_or_notif_sane_1): Likewise.
15150
15151 2017-01-13 Yao Qi <yao.qi@linaro.org>
15152
15153 * Makefile.in (checker-headers): Use CXX and CXX_DIALET instead
15154 of CC. Pass "-x c++-header" instead of "-x c".
15155
15156 2017-01-12 Simon Marchi <simon.marchi@ericsson.com>
15157
15158 * remote.c (remote_can_async_p): Update comment.
15159
15160 2017-01-12 Simon Marchi <simon.marchi@ericsson.com>
15161
15162 * linux-nat.c (linux_nat_can_async_p): Update comment.
15163
15164 2017-01-12 Simon Marchi <simon.marchi@ericsson.com>
15165
15166 * serial.c (serial_open): Forget about "pc" and "lpt" serial interface.
15167
15168 2017-01-11 Simon Marchi <simon.marchi@ericsson.com>
15169
15170 * cli/cli-decode.c (lookup_cmd_1): Fix typo in comment.
15171
15172 2017-01-10 Tom Tromey <tom@tromey.com>
15173
15174 * python/py-type.c (typy_legacy_template_argument): Update.
15175 * cp-support.h (struct demangle_parse_info) (demangle_parse_info,
15176 ~demangle_parse_info): Declare new members.
15177 (cp_demangled_name_to_comp): Return unique_ptr.
15178 (cp_demangled_name_parse_free)
15179 (make_cleanup_cp_demangled_name_parse_free)
15180 (cp_new_demangle_parse_info): Remove.
15181 * cp-support.c (do_demangled_name_parse_free_cleanup)
15182 (make_cleanup_cp_demangled_name_parse_free): Remove.
15183 (inspect_type, cp_canonicalize_string_full)
15184 (cp_canonicalize_string): Update.
15185 (mangled_name_to_comp): Change return type.
15186 (cp_class_name_from_physname, method_name_from_physname)
15187 (cp_func_name, cp_remove_params): Update.
15188 * cp-name-parser.y (demangle_parse_info): New constructor, from
15189 cp_new_demangle_parse_info.
15190 (~demangle_parse_info): New destructor, from
15191 cp_demangled_name_parse_free.
15192 (cp_merge_demangle_parse_infos): Update.
15193 (cp_demangled_name_to_comp): Change return type.
15194
15195 2017-01-10 Tom Tromey <tom@tromey.com>
15196
15197 * top.c (prevent_dont_repeat): Change return type.
15198 * python/python.c (execute_gdb_command): Use std::string.
15199 Update.
15200 * guile/guile.c (gdbscm_execute_gdb_command): Update.
15201 * command.h (prevent_dont_repeat): Change return type.
15202 * breakpoint.c (bpstat_do_actions_1): Update.
15203
15204 2017-01-10 Tom Tromey <tom@tromey.com>
15205
15206 * value.h (scoped_value_mark::~scoped_value_mark): Call
15207 free_to_mark.
15208 (scoped_value_mark::free_to_mark): New method.
15209 * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Use
15210 scoped_value_mark.
15211
15212 2017-01-10 Tom Tromey <tom@tromey.com>
15213
15214 * python/py-value.c (valpy_dereference, valpy_referenced_value)
15215 (valpy_reference_value, valpy_const_value, valpy_get_address)
15216 (valpy_get_dynamic_type, valpy_lazy_string, valpy_do_cast)
15217 (valpy_getitem, valpy_call, valpy_binop_throw, valpy_negative)
15218 (valpy_absolute, valpy_richcompare_throw): Use scoped_value_mark.
15219 * dwarf2loc.c (dwarf2_loc_desc_get_symbol_read_needs): Use
15220 scoped_value_mark.
15221 * dwarf2-frame.c (execute_stack_op): Use scoped_value_mark.
15222 * value.h (scoped_value_mark): New class.
15223
15224 2017-01-10 Tom Tromey <tom@tromey.com>
15225
15226 * dwarf2read.c (dwarf2_build_psymtabs): Use psymtab_discarder.
15227 * psympriv.h (make_cleanup_discard_psymtabs): Don't declare.
15228 * psymtab.c (discard_psymtabs_upto): Remove.
15229 (make_cleanup_discard_psymtabs): Remove.
15230 (struct psymtab_state): Remove.
15231
15232 2017-01-10 Tom Tromey <tom@tromey.com>
15233
15234 * record-full.c (record_full_save_cleanups): Remove.
15235 (record_full_save): Use gdb::unlinker.
15236 * gcore.c (do_bfd_delete_cleanup): Remove.
15237 (gcore_command): Use gdb::unlinker, unique_xmalloc_ptr. Remove
15238 cleanups.
15239 * dwarf2read.c (unlink_if_set): Remove.
15240 (write_psymtabs_to_index): Use gdb::unlinker.
15241 * common/gdb_unlinker.h: New file.
15242
15243 2017-01-10 Tom Tromey <tom@tromey.com>
15244
15245 * windows-tdep.c (windows_xfer_shared_library): Update.
15246 * windows-nat.c (windows_make_so): Update.
15247 * utils.h (make_cleanup_bfd_unref): Remove.
15248 * utils.c (do_bfd_close_cleanup, make_cleanup_bfd_unref): Remove.
15249 * symfile.h (symfile_bfd_open)
15250 (find_separate_debug_file_in_section): Return gdb_bfd_ref_ptr.
15251 * symfile.c (read_symbols, symbol_file_add)
15252 (separate_debug_file_exists): Update.
15253 (symfile_bfd_open): Return gdb_bfd_ref_ptr.
15254 (generic_load, reread_symbols): Update.
15255 * symfile-mem.c (symbol_file_add_from_memory): Update.
15256 * spu-linux-nat.c (spu_bfd_open): Return gdb_bfd_ref_ptr.
15257 (spu_symbol_file_add_from_memory): Update.
15258 * solist.h (struct target_so_ops) <bfd_open>: Return
15259 gdb_bfd_ref_ptr.
15260 (solib_bfd_fopen, solib_bfd_open): Return gdb_bfd_ref_ptr.
15261 * solib.c (solib_bfd_fopen, solib_bfd_open): Return
15262 gdb_bfd_ref_ptr.
15263 (solib_map_sections, reload_shared_libraries_1): Update.
15264 * solib-svr4.c (enable_break): Update.
15265 * solib-spu.c (spu_bfd_fopen): Return gdb_bfd_ref_ptr.
15266 * solib-frv.c (enable_break2): Update.
15267 * solib-dsbt.c (enable_break): Update.
15268 * solib-darwin.c (gdb_bfd_mach_o_fat_extract): Return
15269 gdb_bfd_ref_ptr.
15270 (darwin_solib_get_all_image_info_addr_at_init): Update.
15271 (darwin_bfd_open): Return gdb_bfd_ref_ptr.
15272 * solib-aix.c (solib_aix_bfd_open): Return gdb_bfd_ref_ptr.
15273 * record-full.c (record_full_save): Update.
15274 * python/py-objfile.c (objfpy_add_separate_debug_file): Update.
15275 * procfs.c (insert_dbx_link_bpt_in_file): Update.
15276 * minidebug.c (find_separate_debug_file_in_section): Return
15277 gdb_bfd_ref_ptr.
15278 * machoread.c (macho_add_oso_symfile): Change abfd to
15279 gdb_bfd_ref_ptr.
15280 (macho_symfile_read_all_oso): Update.
15281 (macho_check_dsym): Return gdb_bfd_ref_ptr.
15282 (macho_symfile_read): Update.
15283 * jit.c (bfd_open_from_target_memory): Return gdb_bfd_ref_ptr.
15284 (jit_bfd_try_read_symtab): Update.
15285 * gdb_bfd.h (gdb_bfd_open, gdb_bfd_fopen, gdb_bfd_openr)
15286 (gdb_bfd_openw, gdb_bfd_openr_iovec)
15287 (gdb_bfd_openr_next_archived_file, gdb_bfd_fdopenr): Return
15288 gdb_bfd_ref_ptr.
15289 (gdb_bfd_ref_policy): New struct.
15290 (gdb_bfd_ref_ptr): New typedef.
15291 * gdb_bfd.c (gdb_bfd_open, gdb_bfd_fopen, gdb_bfd_openr)
15292 (gdb_bfd_openw, gdb_bfd_openr_iovec)
15293 (gdb_bfd_openr_next_archived_file, gdb_bfd_fdopenr): Return
15294 gdb_bfd_ref_ptr.
15295 * gcore.h (create_gcore_bfd): Return gdb_bfd_ref_ptr.
15296 * gcore.c (create_gcore_bfd): Return gdb_bfd_ref_ptr.
15297 (gcore_command): Update.
15298 * exec.c (exec_file_attach): Update.
15299 * elfread.c (elf_symfile_read): Update.
15300 * dwarf2read.c (dwarf2_get_dwz_file): Update.
15301 (try_open_dwop_file, open_dwo_file): Return gdb_bfd_ref_ptr.
15302 (open_and_init_dwo_file): Update.
15303 (open_dwp_file): Return gdb_bfd_ref_ptr.
15304 (open_and_init_dwp_file): Update.
15305 * corelow.c (core_open): Update.
15306 * compile/compile-object-load.c (compile_object_load): Update.
15307 * common/gdb_ref_ptr.h (ref_ptr::operator->): New operator.
15308 * coffread.c (coff_symfile_read): Update.
15309 * cli/cli-dump.c (bfd_openr_or_error, bfd_openw_or_error): Return
15310 gdb_bfd_ref_ptr. Rename.
15311 (dump_bfd_file, restore_command): Update.
15312 * build-id.h (build_id_to_debug_bfd): Return gdb_bfd_ref_ptr.
15313 * build-id.c (build_id_to_debug_bfd): Return gdb_bfd_ref_ptr.
15314 (find_separate_debug_file_by_buildid): Update.
15315
15316 2017-01-10 Tom Tromey <tom@tromey.com>
15317
15318 * common/gdb_ref_ptr.h: New file.
15319 * python/py-ref.h (struct gdbpy_ref_policy): New.
15320 (gdbpy_ref): Now a typedef.
15321
15322 2017-01-10 Tom Tromey <tom@tromey.com>
15323
15324 * utils.h (make_cleanup_htab_delete): Don't declare.
15325 * utils.c (do_htab_delete_cleanup, make_cleanup_htab_delete):
15326 Remove.
15327 * linespec.c (decode_compound_collector): Add constructor,
15328 destructor.
15329 (lookup_prefix_sym): Remove cleanup.
15330 (symtab_collector): Add constructor, destructor.
15331 (collect_symtabs_from_filename): Remove cleanup.
15332 * disasm.c (do_mixed_source_and_assembly): Use htab_up.
15333 * compile/compile-c-symbols.c (generate_c_for_variable_locations):
15334 Use htab_up.
15335 * gnu-v3-abi.c (gnuv3_print_vtable): Use htab_up.
15336 * dwarf2read.c (dw2_expand_symtabs_matching)
15337 (dw2_map_symbol_filenames, dwarf_decode_macros)
15338 (write_psymtabs_to_index): Use htab_up.
15339 * dwarf2loc.c (func_verify_no_selftailcall)
15340 (call_site_find_chain_1, func_verify_no_selftailcall)
15341 (chain_candidate, call_site_find_chain_1): Use std::unordered_set,
15342 std::vector, gdb::unique_xmalloc_ptr.
15343 (call_sitep): Remove typedef.
15344 (dwarf2_locexpr_baton_eval): Remove unused variable.
15345
15346 2017-01-10 Tom Tromey <tom@tromey.com>
15347
15348 * python/python-internal.h (make_cleanup_py_decref)
15349 (make_cleanup_py_xdecref): Don't declare.
15350 * python/py-utils.c (py_decref, make_cleanup_py_decref)
15351 (py_xdecref, make_cleanup_py_xdecref): Remove.
15352
15353 2017-01-10 Tom Tromey <tom@tromey.com>
15354
15355 * python/py-framefilter.c (py_mi_print_variables): Use gdbpy_ref.
15356 (py_print_locals, enumerate_locals, py_print_args): Use gdbpy_ref.
15357
15358 2017-01-10 Tom Tromey <tom@tromey.com>
15359
15360 * python/py-framefilter.c (enumerate_args): Use gdbpy_ref.
15361
15362 2017-01-10 Tom Tromey <tom@tromey.com>
15363
15364 * python/py-utils.c (unicode_to_encoded_string)
15365 (python_string_to_target_string)
15366 (python_string_to_target_python_string)
15367 (python_string_to_host_string, gdbpy_obj_to_string)
15368 (get_addr_from_python): Use gdbpy_ref.
15369
15370 2017-01-10 Tom Tromey <tom@tromey.com>
15371
15372 * python/py-unwind.c (pyuw_object_attribute_to_pointer): Use
15373 gdbpy_ref.
15374
15375 2017-01-10 Tom Tromey <tom@tromey.com>
15376
15377 * python/python.c (eval_python_command, gdbpy_decode_line)
15378 (gdbpy_run_events, gdbpy_start_type_printers)
15379 (gdbpy_apply_type_printers): Use gdbpy_ref.
15380
15381 2017-01-10 Tom Tromey <tom@tromey.com>
15382
15383 * python/py-param.c (get_doc_string, compute_enum_values): Use
15384 gdbpy_ref.
15385
15386 2017-01-10 Tom Tromey <tom@tromey.com>
15387
15388 * python/py-inferior.c (find_thread_object, build_inferior_list):
15389 Use gdbpy_ref.
15390
15391 2017-01-10 Tom Tromey <tom@tromey.com>
15392
15393 * python/py-framefilter.c (py_print_frame): Use gdbpy_ref.
15394
15395 2017-01-10 Tom Tromey <tom@tromey.com>
15396
15397 * python/py-finishbreakpoint.c (bpfinishpy_out_of_scope): Use
15398 gdbpy_ref.
15399
15400 2017-01-10 Tom Tromey <tom@tromey.com>
15401
15402 * python/py-cmd.c (cmdpy_completer_helper): Use gdbpy_ref. Remove
15403 extra incref.
15404 (cmdpy_completer_handle_brkchars, cmdpy_completer, cmdpy_init):
15405 Use gdbpy_ref.
15406
15407 2017-01-10 Tom Tromey <tom@tromey.com>
15408
15409 * python/py-breakpoint.c (gdbpy_breakpoint_cond_says_stop): Use
15410 gdbpy_ref.
15411
15412 2017-01-10 Tom Tromey <tom@tromey.com>
15413
15414 * python/py-arch.c (archpy_disassemble): Use gdbpy_ref. Don't
15415 decref results of PyArg_ParseTupleAndKeywords.
15416
15417 2017-01-10 Tom Tromey <tom@tromey.com>
15418
15419 * python/python.c (python_run_simple_file): Use
15420 unique_xmalloc_ptr, gdbpy_ref.
15421
15422 2017-01-10 Tom Tromey <tom@tromey.com>
15423
15424 * python/py-prettyprint.c (print_stack_unless_memory_error)
15425 (print_string_repr, print_children): Use gdbpy_ref.
15426 (dummy_python_frame): New class.
15427 (dummy_python_frame::dummy_python_frame): Rename from
15428 push_dummy_python_frame.
15429 (py_restore_tstate): Remove.
15430
15431 2017-01-10 Tom Tromey <tom@tromey.com>
15432
15433 * python/py-framefilter.c (py_print_frame): Use gdbpy_ref.
15434
15435 2017-01-10 Tom Tromey <tom@tromey.com>
15436
15437 * python/python.c (ensure_python_env, restore_python_env):
15438 Remove.
15439 * python/python-internal.h (ensure_python_env): Don't declare.
15440 * varobj.h (varobj_ensure_python_env): Don't declare.
15441 * varobj.c (varobj_ensure_python_env): Remove.
15442
15443 2017-01-10 Tom Tromey <tom@tromey.com>
15444
15445 * varobj.c (varobj_value_get_print_value): Use
15446 gdbpy_enter_varobj.
15447
15448 2017-01-10 Tom Tromey <tom@tromey.com>
15449
15450 * python/py-prettyprint.c (print_string_repr, print_children):
15451 Update.
15452 * python/py-lazy-string.c (gdbpy_extract_lazy_string): Change type
15453 of "encoding".
15454 * varobj.c (varobj_value_get_print_value): Update.
15455 * python/python-internal.h (gdbpy_extract_lazy_string): Update.
15456
15457 2017-01-10 Tom Tromey <tom@tromey.com>
15458
15459 * varobj.c (varobj_get_display_hint)
15460 (dynamic_varobj_has_child_method, install_new_value_visualizer)
15461 (varobj_set_visualizer, free_variable): Use
15462 gdbpy_enter_varobj.
15463
15464 2017-01-10 Tom Tromey <tom@tromey.com>
15465
15466 * python/python.c (python_command): Use gdbpy_enter, gdbpy_ref.
15467 (do_finish_initialization): New function. Use gdbpy_ref.
15468 (gdbpy_finish_initialization): Use gdbpy_enter. Call
15469 do_finish_initialization.
15470
15471 2017-01-10 Tom Tromey <tom@tromey.com>
15472
15473 * python/py-param.c (get_set_value, get_show_value): Use
15474 gdbpy_enter, gdbpy_ref.
15475
15476 2017-01-10 Tom Tromey <tom@tromey.com>
15477
15478 * python/py-function.c (fnpy_call): Use gdbpy_enter, gdbpy_ref.
15479
15480 2017-01-10 Tom Tromey <tom@tromey.com>
15481
15482 * python/py-cmd.c (cmdpy_function): Use gdbpy_enter, gdbpy_ref.
15483
15484 2017-01-10 Tom Tromey <tom@tromey.com>
15485
15486 * python/py-varobj.c (py_varobj_iter_dtor, py_varobj_iter_next):
15487 Use gdbpy_enter_varobj.
15488
15489 2017-01-10 Tom Tromey <tom@tromey.com>
15490
15491 * varobj.c (gdbpy_enter_varobj): New constructor.
15492 * python/python-internal.h (gdbpy_enter_varobj): New class.
15493 * python/py-varobj.c (py_varobj_get_iterator): Use
15494 gdbpy_enter_varobj.
15495
15496 2017-01-10 Tom Tromey <tom@tromey.com>
15497
15498 * python/py-xmethods.c (gdbpy_get_xmethod_result_type): Use
15499 gdbpy_enter, gdbpy_ref, unique_xmalloc_ptr.
15500 (gdbpy_invoke_xmethod): Use gdbpy_ref, gdbpy_enter.
15501 (gdbpy_get_xmethod_arg_types): Use gdbpy_ref,
15502 unique_xmalloc_ptr.
15503 (gdbpy_get_xmethod_arg_types): Use gdbpy_ref, gdbpy_enter.
15504
15505 2017-01-10 Tom Tromey <tom@tromey.com>
15506
15507 * python/py-xmethods.c (invoke_match_method): Use
15508 gdbpy_ref.
15509
15510 2017-01-10 Tom Tromey <tom@tromey.com>
15511
15512 * python/py-xmethods.c (gdbpy_get_matching_xmethod_workers): use
15513 gdbpy_enter, gdbpy_ref.
15514
15515 2017-01-10 Tom Tromey <tom@tromey.com>
15516
15517 * python/python.c (python_interactive_command): Use gdbpy_enter.
15518
15519 2017-01-10 Tom Tromey <tom@tromey.com>
15520
15521 * python/python.c (gdbpy_before_prompt_hook): Use gdbpy_enter,
15522 gdbpy_ref.
15523
15524 2017-01-10 Tom Tromey <tom@tromey.com>
15525
15526 * python/py-prettyprint.c (gdbpy_apply_val_pretty_printer): Use
15527 gdbpy_enter, gdbpy_ref, unique_xmalloc_ptr.
15528
15529 2017-01-10 Tom Tromey <tom@tromey.com>
15530
15531 * utils.h (htab_deleter): New struct.
15532 (htab_up): New typedef.
15533 * python/py-framefilter.c (gdbpy_apply_frame_filter): Use
15534 gdbpy_enter, gdbpy_ref, htab_up.
15535
15536 2017-01-10 Tom Tromey <tom@tromey.com>
15537
15538 * python/py-unwind.c (pending_frame_invalidate): Remove.
15539 (pyuw_sniffer): Use gdbpy_enter and gdbpy_ref.
15540
15541 2017-01-10 Tom Tromey <tom@tromey.com>
15542
15543 * python/py-xmethods.c (gdbpy_free_xmethod_worker_data)
15544 (gdbpy_clone_xmethod_worker_data): Use gdbpy_enter.
15545
15546 2017-01-10 Tom Tromey <tom@tromey.com>
15547
15548 * python/py-type.c (save_objfile_types): Use gdbpy_enter.
15549
15550 2017-01-10 Tom Tromey <tom@tromey.com>
15551
15552 * python/python.c (gdbpy_eval_from_control_command)
15553 (gdbpy_source_script, gdbpy_run_events)
15554 (gdbpy_source_objfile_script, gdbpy_execute_objfile_script)
15555 (gdbpy_free_type_printers, gdbpy_finish_initialization): Use
15556 gdbpy_enter.
15557
15558 2017-01-10 Tom Tromey <tom@tromey.com>
15559
15560 * python/py-progspace.c (py_free_pspace): Use gdbpy_enter.
15561
15562 2017-01-10 Tom Tromey <tom@tromey.com>
15563
15564 * python/py-objfile.c (py_free_objfile): Use gdbpy_enter.
15565
15566 2017-01-10 Tom Tromey <tom@tromey.com>
15567
15568 * python/py-inferior.c (python_on_normal_stop, python_on_resume)
15569 (python_on_inferior_call_pre, python_on_inferior_call_post)
15570 (python_on_memory_change, python_on_register_change)
15571 (python_inferior_exit, python_new_objfile, add_thread_object)
15572 (delete_thread_object, py_free_inferior): Use gdbpy_enter.
15573
15574 2017-01-10 Tom Tromey <tom@tromey.com>
15575
15576 * python/py-finishbreakpoint.c (bpfinishpy_handle_stop)
15577 (bpfinishpy_handle_exit): Use gdbpy_enter.
15578
15579 2017-01-10 Tom Tromey <tom@tromey.com>
15580
15581 * python/py-cmd.c (cmdpy_destroyer)
15582 (cmdpy_completer_handle_brkchars, cmdpy_completer): Use
15583 gdbpy_enter.
15584
15585 2017-01-10 Tom Tromey <tom@tromey.com>
15586
15587 * python/py-breakpoint.c (gdbpy_breakpoint_cond_says_stop): Use
15588 gdbpy_enter.
15589 (gdbpy_breakpoint_has_cond): Likewise.
15590
15591 2017-01-10 Tom Tromey <tom@tromey.com>
15592
15593 * python/python.c (gdbpy_enter): New constructor.
15594 (~gdbpy_enter): New destructor.
15595 (restore_python_env, ensure_python_env): Rewrite.
15596 * python/python-internal.h (gdbpy_enter): New class.
15597
15598 2017-01-10 Tom Tromey <tom@tromey.com>
15599
15600 * python/py-symbol.c (gdbpy_lookup_symbol): Use gdbpy_ref.
15601
15602 2017-01-10 Tom Tromey <tom@tromey.com>
15603
15604 * python/py-value.c (value_has_field, get_field_flag)
15605 (get_field_type, valpy_getitem, convert_value_from_python): Use
15606 gdbpy_ref.
15607
15608 2017-01-10 Tom Tromey <tom@tromey.com>
15609
15610 * python/python.c (gdbpy_progspaces, gdbpy_objfiles): Use
15611 gdbpy_ref.
15612
15613 2017-01-10 Tom Tromey <tom@tromey.com>
15614
15615 * python/py-prettyprint.c (search_pp_list)
15616 (find_pretty_printer_from_objfiles)
15617 (find_pretty_printer_from_progspace)
15618 (find_pretty_printer_from_gdb, find_pretty_printer)
15619 (gdbpy_get_display_hint, gdbpy_get_varobj_pretty_printer): Use
15620 gdbpy_ref.
15621
15622 2017-01-10 Tom Tromey <tom@tromey.com>
15623
15624 * python/py-param.c (call_doc_function): Use gdbpy_ref.
15625
15626 2017-01-10 Tom Tromey <tom@tromey.com>
15627
15628 * python/py-linetable.c (build_line_table_tuple_from_pcs)
15629 (ltpy_get_all_source_lines): Use gdbpy_ref.
15630
15631 2017-01-10 Tom Tromey <tom@tromey.com>
15632
15633 * python/py-framefilter.c (extract_sym, extract_value)
15634 (get_py_iter_from_func, bootstrap_python_frame_filters): Use
15635 gdbpy_ref.
15636
15637 2017-01-10 Tom Tromey <tom@tromey.com>
15638
15639 * python/py-breakpoint.c (gdbpy_breakpoints): Use gdbpy_ref.
15640
15641 2017-01-10 Tom Tromey <tom@tromey.com>
15642
15643 * python/py-inferior.c (gdbpy_inferiors): Use gdbpy_ref.
15644
15645 2017-01-10 Tom Tromey <tom@tromey.com>
15646
15647 * python/py-function.c (convert_values_to_python, fnpy_init): Use
15648 gdbpy_ref.
15649
15650 2017-01-10 Tom Tromey <tom@tromey.com>
15651
15652 * python/py-cmd.c (gdbpy_string_to_argv): Use gdbpy_ref.
15653
15654 2017-01-10 Tom Tromey <tom@tromey.com>
15655
15656 * python/py-type.c (convert_field, make_fielditem, typy_fields)
15657 (typy_range): Use gdbpy_ref.
15658
15659 2017-01-10 Tom Tromey <tom@tromey.com>
15660
15661 * python/py-threadevent.c (create_thread_event_object): Use
15662 gdbpy_ref.
15663 * python/py-stopevent.c (create_stop_event_object): Simplify.
15664 (emit_stop_event): Use gdbpy_ref.
15665 * python/py-signalevent.c (create_signal_event_object): Use
15666 gdbpy_ref.
15667 * python/py-newobjfileevent.c (create_new_objfile_event_object)
15668 (emit_new_objfile_event, create_clear_objfiles_event_object)
15669 (emit_clear_objfiles_event): Use gdbpy_ref.
15670 * python/py-infevents.c (create_inferior_call_event_object)
15671 (create_register_changed_event_object)
15672 (create_memory_changed_event_object, emit_inferior_call_event)
15673 (emit_memory_changed_event, emit_register_changed_event): Use
15674 gdbpy_ref.
15675 * python/py-exitedevent.c (create_exited_event_object)
15676 (emit_exited_event): Use gdbpy_ref.
15677 * python/py-event.h (evpy_emit_event): Remove
15678 CPYCHECKER_STEALS_REFERENCE_TO_ARG annotation.
15679 * python/py-event.c (evpy_emit_event): Use gdbpy_ref.
15680 * python/py-continueevent.c (emit_continue_event): Use
15681 gdbpy_ref.
15682 * python/py-breakpoint.c (gdbpy_breakpoint_created)
15683 (gdbpy_breakpoint_deleted, gdbpy_breakpoint_modified): Use
15684 gdbpy_ref.
15685 * python/py-bpevent.c (create_breakpoint_event_object): Use
15686 gdbpy_ref.
15687
15688 2017-01-10 Tom Tromey <tom@tromey.com>
15689
15690 * python/py-ref.h: New file.
15691
15692 2017-01-10 Simon Marchi <simon.marchi@ericsson.com>
15693
15694 * cli-out.c (cli_ui_out::do_redirect): Change return type to
15695 void.
15696 * cli-out.h (cli_ui_out::do_redirect): Likewise.
15697 * mi/mi-out.c (mi_ui_out::do_redirect): Likewise.
15698 * mi/mi-out.h (mi_ui_out::do_redirect): Likewise.
15699 * ui-out.c (ui_out::redirect): Likewise.
15700 * ui-out.h (ui_out::redirect, ui_out::do_redirect): Likewise.
15701 * cli/cli-logging.c (set_logging_redirect): Update call site of
15702 ui_out::redirect.
15703 (handle_redirections): Likewise.
15704 * scm-ports.c (ioscm_with_output_to_port_worker): Likewise.
15705 * top.c (execute_command_to_string): Likewise.
15706 * utils.c (do_ui_out_redirect_pop): Likewise.
15707
15708 2017-01-10 Simon Marchi <simon.marchi@ericsson.com>
15709
15710 * stack.c (_initialize_stack): Update "frame" command help message.
15711
15712 2017-01-08 Iain Buclaw <ibuclaw@gdcproject.org>
15713
15714 * d-exp.y (CastExpression): Emit UNOP_CAST_TYPE.
15715
15716 2017-01-06 Yao Qi <yao.qi@linaro.org>
15717
15718 * x86-linux-nat.h: Include gdb_proc_service.h.
15719
15720 2017-01-06 Yao Qi <yao.qi@linaro.org>
15721
15722 * ser-base.h: Include serial.h.
15723
15724 2017-01-06 Yao Qi <yao.qi@linaro.org>
15725
15726 * ppc-linux-tdep.h: Include ppc-tdep.h.
15727
15728 2017-01-06 Yao Qi <yao.qi@linaro.org>
15729
15730 * nat/amd64-linux-siginfo.h: Include signal.h.
15731
15732 2017-01-06 Yao Qi <yao.qi@linaro.org>
15733
15734 * nat/aarch64-linux-hw-point.h: Include break-common.h.
15735
15736 2017-01-06 Yao Qi <yao.qi@linaro.org>
15737
15738 * mi/mi-parse.h: Include mi-cmds.h.
15739
15740 2017-01-06 Yao Qi <yao.qi@linaro.org>
15741
15742 * inf-loop.c: Don't include "target.h".
15743 * inf-loop.h: Include it here.
15744
15745 2017-01-06 Yao Qi <yao.qi@linaro.org>
15746
15747 * dfp.h: Include "dboulest.h" and "expression.h".
15748
15749 2017-01-06 Yao Qi <yao.qi@linaro.org>
15750
15751 * ax-gdb.h: Include "ax.h".
15752
15753 2017-01-06 Yao Qi <yao.qi@linaro.org>
15754
15755 * Makefile.in (HFILES_NO_SRCDIR): Replace gdb_ptrace.h
15756 with nat/gdb_ptrace.h.
15757
15758 2017-01-05 Yao Qi <yao.qi@linaro.org>
15759
15760 * mips-fbsd-tdep.c (mips_fbsd_sigframe_init): Move && to
15761 new line.
15762 (mips64_fbsd_sigframe_init): Likewise.
15763
15764 2017-01-04 John Baldwin <jhb@FreeBSD.org>
15765
15766 * mips-fbsd-tdep.c (_initialize_mips_fbsd_tdep): Use
15767 GDB_OSABI_FREEBSD instead of GDB_OSABI_FREEBSD_ELF.
15768
15769 2017-01-04 John Baldwin <jhb@FreeBSD.org>
15770
15771 * Makefile.in (ALLDEPFILES): Add mips-fbsd-nat.c.
15772 * NEWS: Mention new FreeBSD/mips native configuration.
15773 * config/mips/fbsd.mh: New file.
15774 * configure.host: Add mips*-*-freebsd*.
15775 * mips-fbsd-nat.c: New file.
15776
15777 2017-01-04 John Baldwin <jhb@FreeBSD.org>
15778
15779 * Makefile.in (ALL_TARGET_OBS): Add mips-fbsd-tdep.o.
15780 (ALLDEPFILES): Add mips-fbsd-tdep.c.
15781 * NEWS: Mention new FreeBSD/mips target.
15782 * configure.tgt: Add mips*-*-freebsd*.
15783 * mips-fbsd-tdep.c: New file.
15784 * mips-fbsd-tdep.h: New file.
15785
15786 2017-01-04 Yao Qi <yao.qi@linaro.org>
15787
15788 * dwarf2loc.c (write_pieced_value): Don't use VALUE_FRAME_ID (to),
15789 use c->frame_id when the piece location is DWARF_VALUE_REGISTER.
15790
15791 2017-01-01 Joel Brobecker <brobecker@adacore.com>
15792
15793 Update copyright year range in all GDB files.
15794
15795 2017-01-01 Joel Brobecker <brobecker@adacore.com>
15796
15797 * config/djgpp/fnchange.lst: Add entry for gdb/ChangeLog-2016.
15798
15799 For older changes see ChangeLog-2016.
15800 \f
15801 Local Variables:
15802 mode: change-log
15803 left-margin: 8
15804 fill-column: 74
15805 version-control: never
15806 coding: utf-8
15807 End:
This page took 0.34272 seconds and 5 git commands to generate.