]> git.ipfire.org Git - thirdparty/binutils-gdb.git/blob - gdb/ChangeLog
Fix gdb.base/starti.exp racy test
[thirdparty/binutils-gdb.git] / gdb / ChangeLog
1 2017-11-16 Yao Qi <yao.qi@linaro.org>
2
3 * features/tic6x-c62x.xml: Remove.
4 * features/tic6x-c64x.xml: Remove.
5 * features/tic6x-c64xp.xml: Remove.
6
7 2017-11-15 John Baldwin <jhb@FreeBSD.org>
8
9 * symtab.h: Include <array>.
10
11 2017-11-15 John Baldwin <jhb@FreeBSD.org>
12
13 * bsd-kvm.c (bsd_kvm_cmd): Constify 'arg'.
14 (bsd_kvm_proc_cmd): Likewise.
15
16 2017-11-15 Simon Marchi <simon.marchi@ericsson.com>
17
18 * tui/tui-win.c (window_name_completer): Replace VEC with
19 std::vector.
20
21 2017-11-15 Andrew Cagney <cagney@gnu.org>
22
23 * MAINTAINERS: Remove no-longer applicable entries.
24
25 2017-11-15 Andrew Cagney <cagney@gnu.org>
26
27 * MAINTAINERS: Move self to Past Maintainers.
28
29 2017-11-15 Yao Qi <yao.qi@linaro.org>
30
31 * features/Makefile (XMLTOC): Remove nios2-linux.xml.
32 * features/nios2-linux.c: Remove.
33 * nios2-linux-tdep.c (_initialize_nios2_linux_tdep): Don't call
34 initialize_tdesc_nios2_linux.
35
36 2017-11-15 Yao Qi <yao.qi@linaro.org>
37
38 * m68hc11-tdep.c (M68HC11_NUM_REGS): Change it to
39 M68HC11_LAST_HARD_REG + 1.
40
41 2017-11-14 Paul Carroll <pcarroll@codesourcery.com>
42
43 PR gdb/22388
44 * remote.c (remote_write_bytes_aux, remote_read_bytes_1,
45 remote_read_bytes, remote_write_qxfer, remote_xfer_partial):
46 Return TARGET_XFER_EOF if size of returned data is 0.
47
48 2017-11-14 Simon Marchi <simon.marchi@ericsson.com>
49
50 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
51 memory-map-selftests.c.
52 (SUBDIR_UNITTESTS_OBS): Add memory-map-selftests.o.
53 * memory-map.c (memory_map_start_memory): Fix computation of hi
54 address.
55 * unittests/memory-map-selftests.c: New file.
56
57 2017-11-09 Joel Brobecker <brobecker@adacore.com>
58
59 * ada-lang.c: Fix some typos in the general command documenting
60 how Ada expressions are being evaluated and how their result
61 is printed.
62
63 2017-11-09 Tom Tromey <tom@tromey.com>
64
65 * psymtab.c (psymbol_hash): Do not hash string contents.
66 (psymbol_compare): Add comment.
67
68 2017-11-09 Tom Tromey <tom@tromey.com>
69
70 * dictionary.c (dict_hash): Move "TKB" check into the "switch".
71
72 2017-11-08 Joel Brobecker <brobecker@adacore.com>
73
74 * ada-exp.y (write_var_from_sym): Remove parameter
75 "orig_left_context". Update all callers.
76
77 2017-11-08 Simon Marchi <simon.marchi@ericsson.com>
78
79 * tracepoint.h (class collection_list) <stringify>: Return
80 std::vector<std::string>.
81 (encode_actions_rsp): Change parameters to
82 std::vector<std::string> *.
83 * tracepoint.c (collection_list::stringify): Return
84 std::vector<std::string> and adjust accordingly.
85 (encode_actions_rsp): Changee parameters to
86 std::vector<std::string> and adjust accordingly.
87 * remote.c (free_actions_list),
88 free_actions_list_cleanup_wrapper): Remove.
89 (remote_download_tracepoint): Adjust to std::vector.
90
91 2017-11-08 Tom Tromey <tom@tromey.com>
92
93 * dwarf2read.c (symbolp): Remove typedef.
94 (read_func_scope): Use std::vector.
95 (process_structure_scope): Use std::vector.
96
97 2017-11-08 Pedro Alves <palves@redhat.com>
98
99 * ada-lang.c (ada_make_symbol_completion_list): Use
100 completion_skip_symbol.
101 * symtab.c (symbol_is_function_or_method(minimal_symbol*)): New.
102 (symbol_is_function_or_method(symbol*)): New.
103 (add_symtab_completions): Add complete_symbol_mode parameter. Use
104 completion_skip_symbol.
105 (default_collect_symbol_completion_matches_break_on): Use
106 completion_skip_symbol. Pass down mode.
107 (collect_file_symbol_completion_matches): Pass down mode.
108 * symtab.h (symbol_is_function_or_method): New declarations.
109 (completion_skip_symbol): New template function.
110
111 2017-11-08 Pedro Alves <palves@redhat.com>
112
113 * linespec.c (iterate_over_all_matching_symtabs): Add
114 search_domain parameter. Pass it down to expand_symtabs_matching.
115 (decode_objc): Request FUNCTIONS_DOMAIN symbols only.
116 (lookup_prefix_sym): Adjust by passing ALL_DOMAIN as
117 search_domain.
118 (add_all_symbol_names_from_pspace): Add search_domain parameter.
119 Pass it down.
120 (find_method, find_function_symbols): Request FUNCTIONS_DOMAIN
121 symbols.
122 (add_matching_symbols_to_info): Add search_domain parameter. Pass
123 it down.
124
125 2017-11-08 Pedro Alves <palves@redhat.com>
126
127 * ada-lang.c (ada_make_symbol_completion_list): Remove text and
128 text_len locals and don't pass them down.
129 * symtab.c (completion_list_add_name): Remove
130 sym_text/sym_text_len parameters and adjust.
131 (completion_list_add_symbol, completion_list_add_msymbol)
132 (completion_list_objc_symbol, completion_list_add_fields)
133 (add_symtab_completions): Likewise.
134 (default_collect_symbol_completion_matches_break_on)
135 (collect_file_symbol_completion_matches): Remove sym_text_len
136 local and don't pass it down.
137 * symtab.h (completion_list_add_name): Remove
138 sym_text/sym_text_len parameters.
139
140 2017-11-08 Pedro Alves <palves@redhat.com>
141
142 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
143 unittests/lookup_name_info-selftests.c.
144 (SUBDIR_UNITTESTS_OBS): Add lookup_name_info-selftests.o.
145 * cp-support.c: Include "selftest.h".
146 (cp_remove_params_1): Rename from cp_remove_params. Add
147 'require_param' parameter, and handle it.
148 (cp_remove_params): Reimplement.
149 (cp_remove_params_if_any): New.
150 (selftests::quote): New.
151 (selftests::check_remove_params): New.
152 (selftests::test_cp_remove_params): New.
153 (_initialize_cp_support): Install
154 selftests::test_cp_remove_params.
155 * cp-support.h (cp_remove_params_if_any): Declare.
156 * dwarf2read.c :Include "selftest.h".
157 (dw2_expand_symtabs_matching_symbol): Use
158 lookup_name_info::make_ignore_params.
159 (selftests::dw2_expand_symtabs_matching::mock_mapped_index)
160 (selftests::dw2_expand_symtabs_matching::string_or_null)
161 (selftests::dw2_expand_symtabs_matching::check_match)
162 (selftests::dw2_expand_symtabs_matching::test_symbols)
163 (selftests::dw2_expand_symtabs_matching::run_test): New.
164 (_initialize_dwarf2_read): Register
165 selftests::dw2_expand_symtabs_matching::run_test.
166 * psymtab.c (psym_expand_symtabs_matching): Use
167 lookup_name_info::make_ignore_params.
168 * symtab.c (demangle_for_lookup_info::demangle_for_lookup_info):
169 If the lookup name wants to ignore parameters, strip them.
170 (compare_symbol_name): Remove sym_text/sym_text_len parameters and
171 code handling '('.
172 (completion_list_add_name): Don't pass down sym_text/sym_text_len.
173 (default_collect_symbol_completion_matches_break_on): Don't try to
174 strip parameters.
175 * symtab.h (lookup_name_info::lookup_name_info): Add
176 'ignore_parameters' parameter.
177 (lookup_name_info::ignore_parameters)
178 (lookup_name_info::make_ignore_params): New methods.
179 (lookup_name_info::m_ignore_parameters): New field.
180 * unittests/lookup_name_info-selftests.c: New file.
181
182 2017-11-08 Pedro Alves <palves@redhat.com>
183
184 * dwarf2read.c (dw2_expand_marked_cus)
185 (dw2_expand_symtabs_matching_symbol): Remove forward declarations.
186 (dw2_expand_symtabs_matching): Move further below.
187 (dw2_expand_marked_cus): Reindent.
188
189 2017-11-08 Pedro Alves <palves@redhat.com>
190
191 * dwarf2read.c (byte_swap, MAYBE_SWAP): Move higher up in file.
192 (struct name_component): New.
193 (mapped_index::name_components): New field.
194 (mapped_index::symbol_name_at): New method.
195 (dwarf2_read_index): Call mapped_index ctor.
196 (dw2_map_matching_symbols): Add comment about name_components
197 table.
198 (dw2_expand_symtabs_matching): Factor part to...
199 (dw2_expand_symtabs_matching_symbol): ... this new function.
200 Build name components table, and lookup symbols in it before
201 calling the name matcher.
202 (dw2_expand_marked_cus): New, factored out from
203 dw2_expand_symtabs_matching.
204 (dwarf2_per_objfile_free): Call the mapped_index's dtor.
205
206 2017-11-08 Pedro Alves <palves@redhat.com>
207
208 * ada-lang.c (ada_encode): Rename to ..
209 (ada_encode_1): ... this. Add throw_errors parameter and handle
210 it.
211 (ada_encode): Reimplement.
212 (match_name): Delete, folded into full_name.
213 (resolve_subexp): No longer pass the encoded name to
214 ada_lookup_symbol_list.
215 (should_use_wild_match): Delete.
216 (name_match_type_from_name): New.
217 (ada_lookup_simple_minsym): Use lookup_name_info and the
218 language's symbol_name_matcher_ftype.
219 (add_symbols_from_enclosing_procs, ada_add_local_symbols)
220 (ada_add_block_renamings): Adjust to use lookup_name_info.
221 (ada_lookup_name): New.
222 (add_nonlocal_symbols, ada_add_all_symbols)
223 (ada_lookup_symbol_list_worker, ada_lookup_symbol_list)
224 (ada_iterate_over_symbols): Adjust to use lookup_name_info.
225 (ada_name_for_lookup): Delete.
226 (ada_lookup_encoded_symbol): Construct a verbatim name.
227 (wild_match): Reverse sense of return type. Use bool.
228 (full_match): Reverse sense of return type. Inline bits of old
229 match_name here.
230 (ada_add_block_symbols): Adjust to use lookup_name_info.
231 (symbol_completion_match): Delete, folded into...
232 (ada_lookup_name_info::matches): ... .this new method.
233 (symbol_completion_add): Delete.
234 (ada_collect_symbol_completion_matches): Add name_match_type
235 parameter. Adjust to use lookup_name_info and
236 completion_list_add_name.
237 (get_var_value, ada_add_global_exceptions): Adjust to use
238 lookup_name_info.
239 (ada_get_symbol_name_cmp): Delete.
240 (do_wild_match, do_full_match): New functions.
241 (ada_lookup_name_info::ada_lookup_name_info): New method.
242 (ada_symbol_name_matches, ada_get_symbol_name_matcher): New
243 functions.
244 (ada_language_defn): Install ada_get_symbol_name_matcher.
245 * ada-lex.l (processId): If name starts with '<', copy it
246 verbatim.
247 * block.c (block_iter_match_step, block_iter_match_first)
248 (block_iter_match_next, block_lookup_symbol)
249 (block_lookup_symbol_primary, block_find_symbol): Adjust to use
250 lookup_name_info.
251 * block.h (block_iter_match_first, block_iter_match_next)
252 (ALL_BLOCK_SYMBOLS_WITH_NAME): Adjust to use lookup_name_info.
253 * c-lang.c (c_language_defn, cplus_language_defn)
254 (asm_language_defn, minimal_language_defn): Adjust comments to
255 refer to la_get_symbol_name_matcher.
256 * completer.c (complete_files_symbols)
257 (collect_explicit_location_matches, symbol_completer): Pass a
258 symbol_name_match_type down.
259 * completer.h (class completion_match, completion_match_result):
260 New classes.
261 (completion_tracker::reset_completion_match_result): New method.
262 (completion_tracker::m_completion_match_result): New field.
263 * cp-support.c (make_symbol_overload_list_block): Adjust to use
264 lookup_name_info.
265 (cp_fq_symbol_name_matches, cp_get_symbol_name_matcher): New
266 functions.
267 * cp-support.h (cp_get_symbol_name_matcher): New declaration.
268 * d-lang.c: Adjust comments to refer to
269 la_get_symbol_name_matcher.
270 * dictionary.c (dict_vector) <iter_match_first, iter_match_next>:
271 Adjust to use lookup_name_info.
272 (dict_iter_match_first, dict_iter_match_next)
273 (iter_match_first_hashed, iter_match_next_hashed)
274 (iter_match_first_linear, iter_match_next_linear): Adjust to work
275 with a lookup_name_info.
276 * dictionary.h (dict_iter_match_first, dict_iter_match_next):
277 Likewise.
278 * dwarf2read.c (dw2_lookup_symbol): Adjust to use lookup_name_info.
279 (dw2_map_matching_symbols): Adjust to use symbol_name_match_type.
280 (gdb_index_symbol_name_matcher): New class.
281 (dw2_expand_symtabs_matching) Adjust to use lookup_name_info and
282 gdb_index_symbol_name_matcher. Accept a NULL symbol_matcher.
283 * f-lang.c (f_collect_symbol_completion_matches): Adjust to work
284 with a symbol_name_match_type.
285 (f_language_defn): Adjust comments to refer to
286 la_get_symbol_name_matcher.
287 * go-lang.c (go_language_defn): Adjust comments to refer to
288 la_get_symbol_name_matcher.
289 * language.c (default_symbol_name_matcher)
290 (language_get_symbol_name_matcher): New functions.
291 (unknown_language_defn, auto_language_defn): Adjust comments to
292 refer to la_get_symbol_name_matcher.
293 * language.h (symbol_name_cmp_ftype): Delete.
294 (language_defn) <la_collect_symbol_completion_matches>: Add match
295 type parameter.
296 <la_get_symbol_name_cmp>: Delete field.
297 <la_get_symbol_name_matcher>: New field.
298 <la_iterate_over_symbols>: Adjust to use lookup_name_info.
299 (default_symbol_name_matcher, language_get_symbol_name_matcher):
300 Declare.
301 * linespec.c (iterate_over_all_matching_symtabs)
302 (iterate_over_file_blocks): Adjust to use lookup_name_info.
303 (find_methods): Add language parameter, and use lookup_name_info
304 and the language's symbol_name_matcher_ftype.
305 (linespec_complete_function): Adjust.
306 (lookup_prefix_sym): Use lookup_name_info.
307 (add_all_symbol_names_from_pspace): Adjust.
308 (find_superclass_methods): Add language parameter and pass it
309 down.
310 (find_method): Pass symbol language down.
311 (find_linespec_symbols): Don't demangle or Ada encode here.
312 (search_minsyms_for_name): Add lookup_name_info parameter.
313 (add_matching_symbols_to_info): Add name_match_type parameter.
314 Use lookup_name_info.
315 * m2-lang.c (m2_language_defn): Adjust comments to refer to
316 la_get_symbol_name_matcher.
317 * minsyms.c: Include <algorithm>.
318 (add_minsym_to_demangled_hash_table): Remove table parameter and
319 add objfile parameter. Use search_name_hash, and add language to
320 demangled languages vector.
321 (struct found_minimal_symbols): New struct.
322 (lookup_minimal_symbol_mangled, lookup_minimal_symbol_demangled):
323 New functions.
324 (lookup_minimal_symbol): Adjust to use them. Don't canonicalize
325 input names here. Use lookup_name_info instead. Lookup up
326 demangled names once for each language in the demangled names
327 vector.
328 (iterate_over_minimal_symbols): Use lookup_name_info. Lookup up
329 demangled names once for each language in the demangled names
330 vector.
331 (build_minimal_symbol_hash_tables): Adjust.
332 * minsyms.h (iterate_over_minimal_symbols): Adjust to pass down a
333 lookup_name_info.
334 * objc-lang.c (objc_language_defn): Adjust comment to refer to
335 la_get_symbol_name_matcher.
336 * objfiles.h: Include <vector>.
337 (objfile_per_bfd_storage) <demangled_hash_languages>: New field.
338 * opencl-lang.c (opencl_language_defn): Adjust comment to refer to
339 la_get_symbol_name_matcher.
340 * p-lang.c (pascal_language_defn): Adjust comment to refer to
341 la_get_symbol_name_matcher.
342 * psymtab.c (psym_lookup_symbol): Use lookup_name_info.
343 (match_partial_symbol): Use symbol_name_match_type,
344 lookup_name_info and psymbol_name_matches.
345 (lookup_partial_symbol): Use lookup_name_info.
346 (map_block): Use symbol_name_match_type and lookup_name_info.
347 (psym_map_matching_symbols): Use symbol_name_match_type.
348 (psymbol_name_matches): New.
349 (recursively_search_psymtabs): Use lookup_name_info and
350 psymbol_name_matches. Rename 'kind' parameter to 'domain'.
351 (psym_expand_symtabs_matching): Use lookup_name_info. Rename
352 'kind' parameter to 'domain'.
353 * rust-lang.c (rust_language_defn): Adjust comment to refer to
354 la_get_symbol_name_matcher.
355 * symfile-debug.c (debug_qf_map_matching_symbols)
356 (debug_qf_map_matching_symbols): Use symbol_name_match_type.
357 (debug_qf_expand_symtabs_matching): Use lookup_name_info.
358 * symfile.c (expand_symtabs_matching): Use lookup_name_info.
359 * symfile.h (quick_symbol_functions) <map_matching_symbols>:
360 Adjust to use symbol_name_match_type.
361 <expand_symtabs_matching>: Adjust to use lookup_name_info.
362 (expand_symtabs_matching): Adjust to use lookup_name_info.
363 * symmisc.c (maintenance_expand_symtabs): Use
364 lookup_name_info::match_any ().
365 * symtab.c (symbol_matches_search_name): New.
366 (eq_symbol_entry): Adjust to use lookup_name_info and the
367 language's matcher.
368 (demangle_for_lookup_info::demangle_for_lookup_info): New.
369 (lookup_name_info::match_any): New.
370 (iterate_over_symbols, search_symbols): Use lookup_name_info.
371 (compare_symbol_name): Add language, lookup_name_info and
372 completion_match_result parameters, and use them.
373 (completion_list_add_name): Make extern. Add language and
374 lookup_name_info parameters. Use them.
375 (completion_list_add_symbol, completion_list_add_msymbol)
376 (completion_list_objc_symbol): Add lookup_name_info parameters and
377 adjust. Pass down language.
378 (completion_list_add_fields): Add lookup_name_info parameters and
379 adjust. Pass down language.
380 (add_symtab_completions): Add lookup_name_info parameters and
381 adjust.
382 (default_collect_symbol_completion_matches_break_on): Add
383 name_match_type parameter, and use it. Use lookup_name_info.
384 (default_collect_symbol_completion_matches)
385 (collect_symbol_completion_matches): Add name_match_type
386 parameter, and pass it down.
387 (collect_symbol_completion_matches_type): Adjust.
388 (collect_file_symbol_completion_matches): Add name_match_type
389 parameter, and use lookup_name_info.
390 * symtab.h: Include <string> and "common/gdb_optional.h".
391 (enum class symbol_name_match_type): New.
392 (class ada_lookup_name_info): New.
393 (struct demangle_for_lookup_info): New.
394 (class lookup_name_info): New.
395 (symbol_name_matcher_ftype): New.
396 (SYMBOL_MATCHES_SEARCH_NAME): Use symbol_matches_search_name.
397 (symbol_matches_search_name): Declare.
398 (MSYMBOL_MATCHES_SEARCH_NAME): Delete.
399 (default_collect_symbol_completion_matches)
400 (collect_symbol_completion_matches)
401 (collect_file_symbol_completion_matches): Add name_match_type
402 parameter.
403 (iterate_over_symbols): Use lookup_name_info.
404 (completion_list_add_name): Declare.
405 * utils.c (enum class strncmp_iw_mode): Moved to utils.h.
406 (strncmp_iw_with_mode): Now extern.
407 * utils.h (enum class strncmp_iw_mode): Moved from utils.c.
408 (strncmp_iw_with_mode): Declare.
409
410 2017-11-08 Keith Seitz <keiths@redhat.com>
411 Pedro Alves <palves@redhat.com>
412
413 * ada-lang.c (ada_language_defn): Install
414 default_search_name_hash.
415 * buildsym.c (struct buildsym_compunit): <language>: New field.
416 (finish_block_internal): Pass language when creating dictionaries.
417 (start_buildsym_compunit, start_symtab): New language parameters.
418 Use them.
419 (restart_symtab): Pass down compilation unit's language.
420 * buildsym.h (enum language): Forward declare.
421 (start_symtab): New 'language' parameter.
422 * c-lang.c (c_language_defn, cplus_language_defn)
423 (asm_language_defn, minimal_language_defn): Install
424 default_search_name_hash.
425 * coffread.c (coff_start_symtab): Adjust.
426 * d-lang.c (d_language_defn): Install default_search_name_hash.
427 * dbxread.c (struct symloc): Add 'pst_language' field.
428 (PST_LANGUAGE): Define.
429 (start_psymtab, read_ofile_symtab): Use it.
430 (process_one_symbol): New 'language' parameter. Pass it down.
431 * dictionary.c (struct dictionary) <language>: New field.
432 (DICT_LANGUAGE): Define.
433 (dict_create_hashed, dict_create_hashed_expandable)
434 (dict_create_linear, dict_create_linear_expandable): New parameter
435 'language'. Set the dictionary's language.
436 (iter_match_first_hashed): Adjust to rename.
437 (insert_symbol_hashed): Assert we don't see mismatching
438 languages. Adjust to rename.
439 (dict_hash): Rename to ...
440 (default_search_name_hash): ... this and make extern.
441 * dictionary.h (struct language_defn): Forward declare.
442 (dict_create_hashed): New parameter 'language'.
443 * dwarf2read.c (dwarf2_start_symtab): Pass down language.
444 * f-lang.c (f_language_defn): Install default_search_name_hash.
445 * go-lang.c (go_language_defn): Install default_search_name_hash.
446 * jit.c (finalize_symtab): Pass compunit's language to dictionary
447 creation.
448 * language.c (unknown_language_defn, auto_language_defn):
449 * language.h (language_defn::la_search_name_hash): New field.
450 (default_search_name_hash): Declare.
451 * m2-lang.c (m2_language_defn): Install default_search_name_hash.
452 * mdebugread.c (new_block): New parameter 'language'.
453 * mdebugread.c (parse_symbol): Pass symbol language to block
454 allocation.
455 (psymtab_to_symtab_1): Pass down language.
456 (new_symtab): Pass compunit's language to block allocation.
457 * objc-lang.c (objc_language_defn): Install
458 default_search_name_hash.
459 * opencl-lang.c (opencl_language_defn):
460 * p-lang.c (pascal_language_defn): Install
461 default_search_name_hash.
462 * rust-lang.c (rust_language_defn): Install
463 default_search_name_hash.
464 * stabsread.h (enum language): Forward declare.
465 (process_one_symbol): Add 'language' parameter.
466 * symtab.c (search_name_hash): New function.
467 * symtab.h (search_name_hash): Declare.
468 * xcoffread.c (read_xcoff_symtab): Pass language to start_symtab.
469
470 2017-11-08 Pedro Alves <palves@redhat.com>
471
472 * cp-name-parser.y (main): Don't initialize extra_chars.
473
474 2017-11-07 Tom Tromey <tom@tromey.com>
475
476 * event-top.h (command_handler): Constify.
477 * record-full.c (cmd_record_full_start): Update.
478 * thread.c (thread_apply_all_command): Update.
479 * printcmd.c (eval_command): Update.
480 * mi/mi-main.c (mi_execute_cli_command): Update.
481 (mi_execute_async_cli_command): Update.
482 * tui/tui-stack.c (tui_update_command): Update.
483 * cli/cli-interp.c (safe_execute_command): Constify.
484 * record.c (record_start): Update.
485 (record_start, record_stop, cmd_record_start): Update.
486 * record-btrace.c (cmd_record_btrace_bts_start): Update.
487 (cmd_record_btrace_pt_start): Update.
488 (cmd_record_btrace_start): Update.
489 (cmd_record_btrace_start): Update.
490 * reverse.c (exec_reverse_once): Update.
491 * python/python.c (execute_gdb_command): Don't copy the command.
492 * event-top.c (command_line_handler): Update.
493 (command_handler): Constify.
494 * defs.h (deprecated_call_command_hook): Constify.
495 * cli/cli-script.h (execute_user_command): Constify.
496 * cli/cli-script.c (execute_user_command): Constify.
497 (execute_cmd_pre_hook, execute_cmd_post_hook): Constify.
498 (enum command_control_type): Update.
499 * main.c (catch_command_errors): Remove non-const overload.
500 (catch_command_errors_ftype): Remove.
501 * python/py-cmd.c (cmdpy_function): Constify.
502 * guile/scm-cmd.c (cmdscm_function): Constify.
503 * cli/cli-dump.c (call_dump_func): Constify.
504 * cli/cli-decode.c (do_const_cfunc): Constify.
505 (do_sfunc): Constify.
506 (cmd_func): Constify.
507 * gdbcmd.h (execute_command, execute_command_to_string): Constify.
508 * top.h (execute_command): Constify.
509 * top.c (execute_command): Constify.
510 (execute_command_to_string): Constify.
511 (deprecated_call_command_hook): Constify.
512 * command.h (cmd_func): Constify.
513 * cli/cli-decode.h (struct cmd_list_element) <func>: Constify.
514
515 2017-11-07 Tom Tromey <tom@tromey.com>
516
517 * ada-lang.c (catch_ada_exception_command): Constify.
518 (catch_assert_command): Constify.
519 * break-catch-throw.c (catch_catch_command, catch_throw_command)
520 (catch_rethrow_command): Constify.
521 (catch_exception_command_1): Constify.
522 * breakpoint.h (add_catch_command): Constify.
523 * break-catch-syscall.c (catch_syscall_command_1): Constify.
524 (catch_syscall_split_args): Constify.
525 * break-catch-sig.c (catch_signal_command): Constify.
526 (catch_signal_split_args): Constify.
527 * cli/cli-decode.h (struct cmd_list_element) <function>: Use
528 cmd_const_sfunc_ftype.
529 * cli/cli-decode.c (add_setshow_cmd_full): Constify.
530 (add_setshow_enum_cmd, add_setshow_auto_boolean_cmd)
531 (add_setshow_boolean_cmd, add_setshow_filename_cmd)
532 (add_setshow_string_cmd, struct cmd_list_element)
533 (add_setshow_optional_filename_cmd, add_setshow_integer_cmd)
534 (add_setshow_uinteger_cmd, add_setshow_zinteger_cmd)
535 (add_setshow_zuinteger_unlimited_cmd, add_setshow_zuinteger_cmd):
536 Constify.
537 (set_cmd_sfunc): Constify.
538 (empty_sfunc): Constify.
539 * command.h (add_setshow_enum_cmd, add_setshow_auto_boolean_cmd)
540 (add_setshow_boolean_cmd, add_setshow_filename_cmd)
541 (add_setshow_string_cmd, add_setshow_string_noescape_cmd)
542 (add_setshow_optional_filename_cmd, add_setshow_integer_cmd)
543 (add_setshow_uinteger_cmd, add_setshow_zinteger_cmd)
544 (add_setshow_zuinteger_cmd, add_setshow_zuinteger_unlimited_cmd):
545 Constify.
546 (set_cmd_sfunc): Constify.
547 (cmd_sfunc_ftype): Remove.
548 * compile/compile.c (set_compile_args): Constify.
549 * infrun.c (set_disable_randomization): Constify.
550 * infcmd.c (set_args_command, set_cwd_command): Constify.
551 * breakpoint.c (set_condition_evaluation_mode): Constify.
552 (add_catch_command): Constify.
553 (catch_fork_command_1, catch_exec_command_1)
554 (catch_load_command_1, catch_unload_command_1): Constify.
555 (catch_load_or_unload): Constify.
556 * guile/scm-param.c (pascm_set_func): Constify.
557 (add_setshow_generic): Constify.
558 * python/py-param.c (get_set_value): Constify.
559 * top.h (set_verbose): Constify.
560 * tui/tui-win.c (tui_set_var_cmd): Constify.
561 * mi/mi-main.c (set_mi_async_command): Constify.
562 * cli/cli-logging.c (set_logging_overwrite)
563 (set_logging_redirect): Constify.
564 * value.c (set_max_value_size): Constify.
565 * valprint.c (set_input_radix, set_output_radix): Constify.
566 * utils.c (set_width_command, set_height_command): Constify.
567 * typeprint.c (set_print_type_methods, set_print_type_typedefs): Constify.
568 * tracepoint.c (set_disconnected_tracing)
569 (set_circular_trace_buffer, set_trace_buffer_size)
570 (set_trace_user, set_trace_notes, set_trace_stop_notes): Constify.
571 * top.c (set_history_size_command, set_verbose, set_editing)
572 (set_gdb_datadir, set_history_filename): Constify.
573 * target.c (set_targetdebug, maint_set_target_async_command)
574 (maint_set_target_non_stop_command, set_target_permissions)
575 (set_write_memory_permission): Constify.
576 (open_target): Constify.
577 * target-descriptions.c (set_tdesc_filename_cmd): Constify.
578 * target-dcache.c (set_stack_cache, set_code_cache): Constify.
579 * symtab.c (set_symbol_cache_size_handler): Constify.
580 * symfile.c (set_ext_lang_command): Constify.
581 * symfile-debug.c (set_debug_symfile): Constify.
582 * source.c (set_directories_command): Constify.
583 * solib.c (reload_shared_libraries, gdb_sysroot_changed): Constify.
584 * serial.c (set_parity): Constify.
585 * rs6000-tdep.c (powerpc_set_soft_float, powerpc_set_vector_abi): Constify.
586 * remote.c (set_remote_exec_file, set_remotebreak)
587 (set_remote_protocol_Z_packet_cmd, set_range_stepping): Constify.
588 * record.c (set_record_insn_history_size)
589 (set_record_call_history_size): Constify.
590 * record-full.c (set_record_full_insn_max_num): Constify.
591 * proc-api.c (set_procfs_trace_cmd, set_procfs_file_cmd): Constify.
592 * osabi.c (set_osabi): Constify.
593 * mips-tdep.c (set_mips64_transfers_32bit_regs)
594 (reinit_frame_cache_sfunc, mips_abi_update): Constify.
595 * maint.c (maintenance_set_profile_cmd): Constify.
596 * linux-thread-db.c (set_libthread_db_search_path): Constify.
597 * language.c (set_language_command, set_range_command)
598 (set_case_command): Constify.
599 * infrun.c (set_non_stop, set_observer_mode)
600 (set_stop_on_solib_events, set_schedlock_func)
601 (set_exec_direction_func): Constify.
602 * infcmd.c (set_inferior_tty_command): Constify.
603 * disasm.c (set_disassembler_options_sfunc): Constify.
604 * demangle.c (set_demangling_command): Constify.
605 * dcache.c (set_dcache_size, set_dcache_line_size): Constify.
606 * cris-tdep.c (set_cris_version, set_cris_mode)
607 (set_cris_dwarf2_cfi): Constify.
608 * corefile.c (set_gnutarget_command): Constify.
609 * charset.c (set_host_charset_sfunc, set_target_charset_sfunc)
610 (set_target_wide_charset_sfunc): Constify.
611 * breakpoint.c (update_dprintf_commands): Constify.
612 * auto-load.c (set_auto_load_dir, set_auto_load_safe_path): Constify.
613 * arm-tdep.c (set_fp_model_sfunc, arm_set_abi)
614 (set_disassembly_style_sfunc): Constify.
615 * arch-utils.c (set_endian, set_architecture): Constify.
616 * alpha-tdep.c (reinit_frame_cache_sfunc): Constify.
617 * agent.c (set_can_use_agent): Constify.
618
619 2017-11-07 Tom Tromey <tom@tromey.com>
620
621 * go32-nat.c (go32_sysinfo, go32_sldt, go32_sgdt, go32_sidt)
622 (go32_pde, go32_pte, go32_pte_for_address): Constify.
623 * gnu-nat.c (_parse_bool_arg, show_thread_default_pause_cmd)
624 (set_thread_default_pause_cmd, set_thread_default_run_cmd)
625 (show_thread_default_run_cmd, set_thread_default_detach_sc_cmd)
626 (parse_int_arg, show_thread_default_detach_sc_cmd)
627 (set_signals_cmd, show_signals_cmd, set_sig_thread_cmd)
628 (show_sig_thread_cmd, set_stopped_cmd, show_stopped_cmd)
629 (set_exceptions_cmd, show_exceptions_cmd, set_task_pause_cmd)
630 (show_task_pause_cmd, set_task_detach_sc_cmd)
631 (show_task_detach_sc_cmd, set_task_exc_port_cmd)
632 (set_noninvasive_cmd, set_thread_pause_cmd)
633 (show_thread_pause_cmd, set_thread_run_cmd, show_thread_run_cmd)
634 (set_thread_detach_sc_cmd, show_thread_detach_sc_cmd)
635 (set_thread_exc_port_cmd, thread_takeover_sc_cmd): Constify.
636 * windows-nat.c (display_selectors): Constify.
637 * cli/cli-decode.h (struct cmd_list_element) <function>: Remove
638 non-const "cfunc".
639 * cli/cli-decode.c (set_cmd_cfunc): Remove non-const overload.
640 (cmd_cfunc_eq): Likewise.
641 (struct cmd_list_element): Likewise.
642 (do_cfunc): Remove.
643 (cli_user_command_p): Update.
644 * command.h (add_cmd): Remove non-const overload.
645 (cmd_cfunc_ftype): Remove typedef.
646 (cmd_cfunc_eq): Remove non-const overload.
647 * value.c (show_values): Constify.
648 * thread.c (thread_apply_all_command): Constify.
649 * symfile.c (load_command): Constify.
650 * source.c (directory_command): Constify.
651 * maint.c (maintenance_internal_error)
652 (maintenance_demangler_warning, maintenance_space_display)
653 (maintenance_print_architecture, maintenance_translate_address)
654 (maintenance_info_selftests, maintenance_internal_warning):
655 Constify.
656 * breakpoint.c (disable_trace_command, enable_trace_command):
657 Constify.
658 * auto-load.c (info_auto_load_local_gdbinit, add_auto_load_dir):
659 Constify.
660 (add_auto_load_safe_path): Constify.
661 * guile/scm-auto-load.c (info_auto_load_guile_scripts): Constify.
662 * top.h (show_commands): Constify.
663 * linux-thread-db.c (info_auto_load_libthread_db): Constify.
664 * sparc64-tdep.c (adi_examine_command): Constify.
665 (adi_assign_command): Constify.
666
667 2017-11-07 Tom Tromey <tom@tromey.com>
668
669 * frame.h (info_locals_command, info_args_command): Constify.
670 * auto-load.h (auto_load_info_scripts): Constify.
671 * inferior.h (registers_info): Constify.
672 * copying.c: Rebuild.
673 * copying.awk: Constify generated commands.
674 * auto-load.c (auto_load_info_scripts)
675 (info_auto_load_gdb_scripts): Constify.
676 * cli/cli-decode.c (struct cmd_list_element): Take a
677 cmd_const_cfunc_ftype.
678 * command.h (add_info): Take a cmd_const_cfunc_ftype.
679 * tui/tui-win.c (tui_all_windows_info): Constify.
680 * python/py-auto-load.c (info_auto_load_python_scripts):
681 Constify.
682 * cli/cli-cmds.c (show_command): Remove non-const overload.
683 * tracepoint.c (info_tvariables_command, info_scope_command):
684 Constify.
685 (info_static_tracepoint_markers_command): Constify.
686 * thread.c (info_threads_command): Constify.
687 (print_thread_info_1): Constify.
688 * target.c (info_target_command): Constify.
689 * symtab.c (info_sources_command, info_functions_command)
690 (info_types_command): Constify.
691 (info_variables_command): Remove non-const overload.
692 * symfile.c (info_ext_lang_command): Constify.
693 * stack.c (info_frame_command, info_locals_command)
694 (info_args_command): Constify.
695 (backtrace_command): Remove non-const overload.
696 * source.c (info_source_command, info_line_command): Constify.
697 * solib.c (info_sharedlibrary_command): Constify.
698 * skip.c (info_skip_command): Constify.
699 * ser-go32.c (info_serial_command): Constify.
700 * reverse.c (info_bookmarks_command): Constify.
701 * printcmd.c (info_symbol_command, info_address_command)
702 (info_display_command): Constify.
703 * osdata.c (info_osdata_command): Constify.
704 * objc-lang.c (info_selectors_command, info_classes_command):
705 Constify.
706 * nto-procfs.c (procfs_pidlist, procfs_meminfo): Constify.
707 * memattr.c (info_mem_command): Constify.
708 * macrocmd.c (info_macro_command, info_macros_command): Constify.
709 * linux-fork.c (info_checkpoints_command): Constify.
710 * infrun.c (info_signals_command): Constify.
711 * inflow.c (info_terminal_command): Constify.
712 * inferior.c (info_inferiors_command): Constify.
713 (print_inferior): Constify.
714 * infcmd.c (info_program_command, info_all_registers_command)
715 (info_registers_command, info_vector_command)
716 (info_float_command): Constify.
717 (registers_info): Constify.
718 * gnu-nat.c (info_send_rights_cmd, info_recv_rights_cmd)
719 (info_port_sets_cmd, info_dead_names_cmd, info_port_rights_cmd):
720 Constify.
721 * f-valprint.c (info_common_command): Constify.
722 * dcache.c (info_dcache_command): Constify.
723 (dcache_info_1): Constify.
724 * darwin-nat-info.c (info_mach_tasks_command)
725 (info_mach_task_command, info_mach_ports_command)
726 (info_mach_port_command, info_mach_threads_command)
727 (info_mach_thread_command, info_mach_regions_command)
728 (info_mach_regions_recurse_command, info_mach_region_command)
729 (info_mach_exceptions_command): Constify.
730 (get_task_from_args): Constify.
731 * cp-support.c (info_vtbl_command): Constify.
732 * breakpoint.c (info_watchpoints_command)
733 (info_tracepoints_command): Constify.
734 (info_breakpoints_command): Remove non-const overload.
735 * avr-tdep.c (avr_io_reg_read_command): Constify.
736 * auxv.c (info_auxv_command): Constify.
737 * ada-tasks.c (info_tasks_command): Constify.
738 (info_task): Constify.
739 * ada-lang.c (info_exceptions_command): Constify.
740
741 2017-11-07 Tom Tromey <tom@tromey.com>
742
743 * solib.h (no_shared_libraries): Constify.
744 * frame.h (return_command): Constify.
745 * cli/cli-cmds.h (quit_command): Constify.
746 * top.h (quit_command, execute_command): Constify.
747 * target.h (flash_erase_command): Constify.
748 * inferior.h (set_inferior_args, attach_command): Constify.
749 * tracepoint.h (start_tracing, stop_tracing): Constify.
750 * breakpoint.h (break_command, tbreak_command)
751 (hbreak_command_wrapper, thbreak_command_wrapper)
752 (rbreak_command_wrapper, watch_command_wrapper)
753 (awatch_command_wrapper, rwatch_command_wrapper)
754 (get_tracepoint_by_number): Constify.
755 * symtab.c (info_variables_command, rbreak_command)
756 (symtab_symbol_info): Constify.
757 (info_variables_command): Add non-const overload.
758 * top.c (dont_repeat_command): Constify.
759 * breakpoint.c (ignore_command, commands_command)
760 (condition_command, tbreak_command, hbreak_command)
761 (thbreak_command, clear_command, break_command)
762 (info_breakpoints_command, watch_command, rwatch_command)
763 (awatch_command, trace_command, ftrace_command, strace_command)
764 (trace_pass_command, break_range_command, dprintf_command)
765 (agent_printf_command, get_tracepoint_by_number)
766 (watch_maybe_just_location, trace_pass_command): Constify.
767 (info_breakpoints_command): Add non-const overload.
768 * tracefile.c (tsave_command): Constify.
769 * infcmd.c (attach_command, disconnect_command, signal_command)
770 (queue_signal_command, stepi_command, nexti_command)
771 (finish_command, next_command, step_command, until_command)
772 (advance_command, jump_command, continue_command, run_command)
773 (start_command, starti_command, interrupt_command)
774 (run_command_1, set_inferior_args, step_1): Constify.
775 * inferior.c (add_inferior_command, remove_inferior_command)
776 (clone_inferior_command): Constify.
777 * linux-fork.c (checkpoint_command, restart_command): Constify.
778 * windows-nat.c (signal_event_command): Constify.
779 * guile/guile.c (guile_repl_command, guile_command): Constify.
780 * printcmd.c (x_command, display_command, printf_command)
781 (output_command, set_command, call_command, print_command)
782 (eval_command): Constify.
783 (non_const_set_command): Remove.
784 (_initialize_printcmd): Update.
785 * source.c (forward_search_command, reverse_search_command):
786 Constify.
787 * jit.c (jit_reader_load_command, jit_reader_unload_command):
788 Constify.
789 * infrun.c (handle_command): Constify.
790 * memattr.c (mem_command): Constify.
791 * stack.c (return_command, up_command, up_silently_command)
792 (down_command, down_silently_command, frame_command)
793 (backtrace_command, func_command, backtrace_command_1): Constify.
794 (backtrace_command): Add non-const overload.
795 * remote-sim.c (simulator_command): Constify.
796 * exec.c (set_section_command): Constify.
797 * tracepoint.c (tdump_command, trace_variable_command)
798 (tstatus_command, tstop_command, tstart_command)
799 (end_actions_pseudocommand, while_stepping_pseudocommand)
800 (collect_pseudocommand, teval_pseudocommand, actions_command)
801 (start_tracing, stop_tracing): Constify.
802 * value.c (init_if_undefined_command): Constify.
803 * tui/tui-stack.c (tui_update_command): Constify.
804 * tui/tui-win.c (tui_refresh_all_command)
805 (tui_set_tab_width_command, tui_set_win_height_command)
806 (tui_set_focus_command, tui_scroll_forward_command)
807 (tui_scroll_backward_command, tui_scroll_left_command)
808 (tui_scroll_right_command, parse_scrolling_args, tui_set_focus)
809 (tui_set_win_height): Constify.
810 * tui/tui-layout.c (tui_layout_command): Constify.
811 * procfs.c (proc_trace_syscalls, proc_trace_sysentry_cmd)
812 (proc_trace_sysexit_cmd, proc_untrace_sysentry_cmd)
813 (proc_untrace_sysexit_cmd): Constify.
814 * remote.c (threadlist_test_cmd, threadinfo_test_cmd)
815 (threadset_test_cmd, threadlist_update_test_cmd)
816 (threadalive_test): Constify.
817 * objc-lang.c (print_object_command): Constify.
818 * command.h (add_com): Constify.
819 * cli/cli-dump.c (restore_command): Constify.
820 * cli/cli-cmds.c (pwd_command, echo_command, quit_command)
821 (help_command, complete_command, shell_command, edit_command)
822 (list_command, disassemble_command, make_command)
823 (apropos_command, alias_command): Constify.
824 * cli/cli-script.c (document_command, define_command)
825 (while_command, if_command, validate_comname): Constify.
826 * cli/cli-decode.c (struct cmd_list_element): Change type of
827 "fun".
828 * target.c (do_monitor_command, flash_erase_command): Constify.
829 * regcache.c (reg_flush_command): Constify.
830 * reverse.c (reverse_step, reverse_next, reverse_stepi)
831 (reverse_nexti, reverse_continue, reverse_finish)
832 (save_bookmark_command, goto_bookmark_command)
833 (exec_reverse_once): Constify.
834 * python/python.c (python_interactive_command, python_command):
835 Constify.
836 * typeprint.c (ptype_command, whatis_command, whatis_exp):
837 Constify.
838 * solib.c (sharedlibrary_command, no_shared_libraries): Constify.
839 * gcore.c (gcore_command): Constify.
840
841 2017-11-07 Tom Tromey <tom@tromey.com>
842
843 * printcmd.c (x_command): Call set_repeat_arguments.
844 * cli/cli-cmds.c (list_command): Call set_repeat_arguments.
845 * top.c (repeat_arguments): New global.
846 (set_repeat_arguments): New function.
847 (execute_command): Handle repeat_arguments.
848 (show_commands): Calls set_repeat_arguments.
849 * command.h (set_repeat_arguments): Declare.
850
851 2017-11-07 Tom Tromey <tom@tromey.com>
852
853 * stack.c (backtrace_command): Use std::string.
854 (backtrace_command_1): Make "count_exp" const.
855
856 2017-11-07 Tom Tromey <tom@tromey.com>
857
858 * source.c (directory_switch, mod_path, add_path): Constify.
859 * defs.h (add_path, mod_path, directory_switch): Constify.
860 * mi/mi-cmd-env.c (env_mod_path): Constify.
861
862 2017-11-07 Tom Tromey <tom@tromey.com>
863
864 * infcmd.c (strip_bg_char): Return gdb::unique_xmalloc_ptr.
865 (run_command_1, continue_command, step_1, jump_command)
866 (signal_command, until_command, advance_command, finish_command)
867 (attach_command): Update.
868
869 2017-11-07 Tom Tromey <tom@tromey.com>
870
871 * command.h (set_cmd_cfunc): Don't declare.
872 * cli/cli-decode.c (set_cmd_cfunc): Now static.
873
874 2017-11-07 Tom Tromey <tom@tromey.com>
875
876 * stack.c (select_frame_command): Constify.
877 * cli/cli-decode.c (add_com_suppress_notification): Constify.
878 * command.h (add_com_suppress_notification): Constify.
879
880 2017-11-07 Tom Tromey <tom@tromey.com>
881
882 * breakpoint.c (stop_command): Constify.
883 * cli/cli-decode.c (struct cmd_list_element): Constify.
884 * command.h (add_abbrev_prefix_cmd): Constify.
885
886 2017-11-07 Pedro Alves <palves@redhat.com>
887
888 * breakpoint.c (extract_bp_kind): New enum.
889 (extract_bp_num, extract_bp_or_bp_range): New functions, partially
890 factored out from ...
891 (extract_bp_number_and_location): ... here.
892 * cli/cli-utils.c (get_number_trailer): Handle '-$variable'.
893
894 2017-11-07 Pedro Alves <palves@redhat.com>
895
896 * breakpoint.c (extract_bp_number_and_location): Change return
897 type to void. Throw error instead of warning.
898 (enable_disable_command): Adjust.
899
900 2017-11-07 Xavier Roirand <roirand@adacore.com>
901 Pedro Alves <palves@redhat.com>
902
903 * breakpoint.c (map_breakpoint_number_range): New, factored out
904 from ...
905 (map_breakpoint_numbers): ... here.
906 (find_location_by_number): Change parameters from string to
907 breakpoint number and location.
908 (extract_bp_number_and_location): New function.
909 (enable_disable_bp_num_loc)
910 (enable_disable_breakpoint_location_range)
911 (enable_disable_command): New functions, factored out ...
912 (enable_command, disable_command): ... these functions, and
913 adjusted to support ranges.
914 * NEWS: Document enable/disable breakpoint location range feature.
915
916 2017-11-06 Luis Machado <luis.machado@linaro.org>
917
918 * MAINTAINERS (Write After Approval): Update my e-mail address.
919
920 2017-11-06 Pedro Alves <palves@redhat.com>
921
922 * gnu-nat.c (gnu_terminal_init): Delete.
923 (gnu_target): Don't install gnu_terminal_init.
924 * inflow.c (child_terminal_init_with_pgrp): Delete, merged with ...
925 (child_terminal_init): ... this function.
926
927 2017-11-06 Pedro Alves <palves@redhat.com>
928
929 * common/common.m4 (GDB_AC_COMMON): No longer check termio.h nor
930 sgtty.h.
931 * config.in, configure: Regenerate.
932
933 2017-11-06 Pedro Alves <palves@redhat.com>
934
935 * event-top.c: Check SIGTSTP instead of STOP_SIGNAL thoughout.
936 (async_init_signals): Adjust.
937 (handle_stop_sig): Rename to ...
938 (handle_sigtstp): ... this.
939 (async_stop_sig): Rename to ...
940 (async_sigtstp_handler): ... this, and delete STOP_SIGNAL !=
941 SIGTSTP path.
942 * event-top.h: Move signal.h include to the top. Check SIGTSTP
943 instead of STOP_SIGNAL thoughout.
944 (handle_stop_sig): Rename to ...
945 (handle_sigtstp): ... this.
946 * top.c (command_line_input): Replace STOP_SIGNAL -> SIGTSTP.
947
948 2017-11-06 Pedro Alves <palves@redhat.com>
949
950 * inflow.c (child_terminal_inferior, child_terminal_ours_1): No
951 longer set flags twice in row.
952
953 2017-11-06 Pedro Alves <palves@redhat.com>
954
955 * Makefile.in (SER_HARDWIRE): Update comment.
956 (HFILES_NO_SRCDIR): Remove gdb_termios.h.
957 * common/gdb_termios.h: Delete file.
958 * common/job-control.c: Include termios.h and unistd.h instead of
959 gdb_termios.h.
960 (gdb_setpgid): Remove HAVE_TERMIOS || TIOCGPGRP preprocessor
961 check.
962 (have_job_control): Check HAVE_TERMIOS_H instead of HAVE_TERMIOS.
963 Remove sgtty code.
964 * configure.ac: No longer check for termio.h and sgtty.h.
965 * configure: Regenerate.
966 * inflow.c: Include termios.h instead of gdb_termios.h. Replace
967 PROCESS_GROUP_TYPE checks with HAVE_TERMIOS_H checks throughout.
968 Replace PROCESS_GROUP_TYPE references with pid_t references
969 throughout.
970 (gdb_getpgrp): Delete.
971 (set_initial_gdb_ttystate): Use tcgetpgrp instead of gdb_getpgrp.
972 (child_terminal_inferior): Remove comment. Remove sgtty code.
973 (child_terminal_ours_1): Use tcgetpgrp directly instead of
974 gdb_getpgrp. Use serial_set_tty_state instead aof
975 serial_noflush_set_tty_state. Remove sgtty code.
976 * inflow.h: Include unistd.h instead of gdb_termios.h. Replace
977 PROCESS_GROUP_TYPE check with HAVE_TERMIOS_H check.
978 (inferior_process_group): Now returns pid_t.
979 * ser-base.c (ser_base_noflush_set_tty_state): Delete.
980 * ser-base.h (ser_base_noflush_set_tty_state): Delete.
981 * ser-event.c (serial_event_ops): Update.
982 * ser-go32.c (dos_noflush_set_tty_state): Delete.
983 (dos_ops): Update.
984 * ser-mingw.c (hardwire_ops, tty_ops, pipe_ops, tcp_ops): Update.
985 * ser-pipe.c (pipe_ops): Update.
986 * ser-tcp.c (tcp_ops): Update.
987 * ser-unix.c: Include termios.h instead of gdb_termios.h. Remove
988 HAVE_TERMIOS checks.
989 [HAVE_TERMIO] (struct hardwire_ttystate): Delete.
990 [HAVE_SGTTY] (struct hardwire_ttystate): Delete.
991 (get_tty_state, set_tty_state): Drop termio and sgtty code, and
992 assume termios.
993 (hardwire_noflush_set_tty_state): Delete.
994 (hardwire_print_tty_state, hardwire_drain_output)
995 (hardwire_flush_output, hardwire_flush_input)
996 (hardwire_send_break, hardwire_raw, hardwire_setbaudrate)
997 (hardwire_setstopbits, hardwire_setparity): Drop termio and sgtty
998 code, and assume termios.
999 (hardwire_ops): Update.
1000 (_initialize_ser_hardwire): Remove HAVE_TERMIOS check.
1001 * serial.c (serial_noflush_set_tty_state): Delete.
1002 * serial.h (serial_noflush_set_tty_state): Delete.
1003 (serial_ops::noflush_set_tty_state): Delete.
1004
1005 2017-11-06 Ulrich Weigand <uweigand@de.ibm.com>
1006
1007 * Makefile.in (SFILES): Remove doublest.c and dfp.c.
1008 (HFILES_NO_SRCDIR): Remove doublest.h and dfp.h.
1009 (COMMON_OBS): Remove doublest.o and dfp.o.
1010 Do not build target-float.c (instead of doublest.c)
1011 with -Wformat-nonliteral.
1012
1013 * doublest.c: Remove file.
1014 * doublest.h: Remove file.
1015 * dfp.c: Remove file.
1016 * dfp.h: Remove file.
1017
1018 * target-float.c: Do not include "doublest.h" and "dfp.h".
1019 (DOUBLEST): Move here from doublest.h.
1020 (enum float_kind): Likewise.
1021 (FLOATFORMAT_CHAR_BIT): Likewise.
1022 (FLOATFORMAT_LARGEST_BYTES): Likewise.
1023 (floatformat_totalsize_bytes): Move here from doublest.c. Make static.
1024 (floatformat_precision): Likewise.
1025 (floatformat_normalize_byteorder, get_field, put_field): Likewise.
1026 (floatformat_is_negative, floatformat_classify, floatformat_mantissa):
1027 Likewise.
1028 (host_float_format, host_double_format, host_long_double_format):
1029 Likewise.
1030 (floatformat_to_string, floatformat_from_string): Likewise.
1031 (floatformat_to_doublest): Likewise. Also, inline the original
1032 convert_floatformat_to_doublest.
1033 (floatformat_from_doublest): Likewise. Also, inline the original
1034 convert_floatformat_from_doublest.
1035
1036 Include "dpd/decimal128.h", "dpd/decimal64.h", and "dpd/decimal32.h".
1037 (MAX_DECIMAL_STRING): Move here from dfp.c.
1038 (match_endianness): Likewise.
1039 (set_decnumber_context, decimal_check_errors): Likewise.
1040 (decimal_from_number, decimal_to_number): Likewise.
1041 (decimal_to_string, decimal_from_string): Likewise. Make static.
1042 (decimal_from_longest, decimal_from_ulongest): Likewise.
1043 (decimal_to_longest): Likewise.
1044 (decimal_binop, decimal_is_zero, decimal_compare): Likewise.
1045 (decimal_convert): Likewise.
1046
1047 2017-11-06 Ulrich Weigand <uweigand@de.ibm.com>
1048
1049 * doublest.c: Do not include "gdbtypes.h".
1050 (extract_typed_floating): Remove.
1051 (store_typed_floating): Remove.
1052 (convert_typed_floating): Remove.
1053 * doublest.h (struct type): Remove.
1054 (DOUBLEST_PRINT_FORMAT): Remove.
1055 (DOUBLEST_SCAN_FORMAT): Remove.
1056 (extract_typed_floating): Remove.
1057 (store_typed_floating): Remove.
1058 (convert_typed_floating): Remove.
1059
1060 * dfp.c (decimal_from_doublest): Remove.
1061 (decimal_to_doublest): Remove.
1062 * dfp.h: Do not include "doublest.h".
1063 (decimal_from_doublest): Remove.
1064 (decimal_to_doublest): Remove.
1065
1066 * value.c: Do not include "doublest.h" and "dfp.h".
1067 (value_as_double): Remove.
1068 (unpack_double): Remove.
1069 (value_from_double): Remove.
1070 (value_from_decfloat): Remove.
1071 * value.h: Do not include "doublest.h".
1072 (value_as_double): Remove.
1073 (unpack_double): Remove.
1074 (value_from_double): Remove.
1075 (value_from_decfloat): Remove.
1076
1077 2017-11-06 Ulrich Weigand <uweigand@de.ibm.com>
1078
1079 * i386-tdep.c: Include "target-float.h". Do not include "doublest.h".
1080 (i386_extract_return_value): Use target_float_convert.
1081 (i386_store_return_value): Likewise.
1082 * i387-tdep.c (i387_register_to_value): Use target_float_convert.
1083 (i387_value_to_register): Likewise.
1084 * ia64-tdep.c: Include "target-float.h". Do not include "doublest.h".
1085 (ia64_register_to_value): Use target_float_convert.
1086 (ia64_value_to_register): Likewise.
1087 (ia64_extract_return_value): Likewise.
1088 (ia64_store_return_value): Likewise.
1089 (ia64_push_dummy_call): Likewise.
1090 * m68k-tdep.c: Include "target-float.h".
1091 (m68k_register_to_value): Use target_float_convert.
1092 (m68k_value_to_register): Likewise.
1093 (m68k_svr4_extract_return_value): Likewise.
1094 (m68k_svr4_store_return_value): Likewise.
1095 * ppc-sysv-tdep.c: Include "target-float.h".
1096 (ppc_sysv_abi_push_dummy_call): Use target_float_convert.
1097 (do_ppc_sysv_return_value): Likewise.
1098 (ppc64_sysv_abi_push_freg): Likewise.
1099 (ppc64_sysv_abi_return_value_base): Likewise.
1100 * rs6000-aix-tdep.c: Include "target-float.h".
1101 (rs6000_push_dummy_call): Use target_float_convert.
1102 (rs6000_return_value): Likewise.
1103 * rs6000-lynx178-tdep.c: Include "target-float.h".
1104 (rs6000_lynx178_push_dummy_call): Use target_float_convert.
1105 (rs6000_lynx178_return_value): Likewise.
1106 * rs6000-tdep.c: Include "target-float.h". Do not include "doublest.h".
1107 (rs6000_register_to_value): Use target_float_convert.
1108 (rs6000_value_to_register): Likewise.
1109 * arm-tdep.c: Include "target-float.h". Do not include "doublest.h".
1110 (arm_extract_return_value): Use target_float_convert.
1111 (arm_store_return_value): Likewise.
1112 * sh-tdep.c: Include "target-float.h". Do not include "doublest.h".
1113 (sh_register_convert_to_virtual): Use target_float_convert.
1114 (sh_register_convert_to_raw): Likewise.
1115 * sh64-tdep.c: Include "target-float.h".
1116 (sh64_extract_return_value): Use target_float_convert.
1117 (sh64_register_convert_to_virtual): Likewise.
1118 (sh64_register_convert_to_raw): Likewise. Fix argument types.
1119
1120 2017-11-06 Ulrich Weigand <uweigand@de.ibm.com>
1121
1122 * target-float.c (floatformat_to_host_double): New function.
1123 (floatformat_from_host_double): Likewise.
1124 (target_float_to_host_double): Likewise.
1125 (target_float_from_host_double): Likewise.
1126 * target-float.h (target_float_to_host_double): Add prototype.
1127 (target_float_from_host_double): Likewise.
1128
1129 * guile/scm-value.c: Include "target-float.h".
1130 (gdbscm_value_to_real): Use target_float_to_host_double.
1131 Handle integer source values via value_as_long.
1132 * guile/scm-math.c: Include "target-float.h". Do not include
1133 "doublest.h", "dfp.h", and "expression.h".
1134 (vlscm_convert_typed_number): Use target_float_from_host_double.
1135 (vlscm_convert_number): Likewise.
1136
1137 * python/py-value.c (valpy_float): Use target_float_to_host_double.
1138 (convert_value_from_python): Use target_float_from_host_double.
1139
1140 2017-11-06 Ulrich Weigand <uweigand@de.ibm.com>
1141
1142 * ada-lang.c (cast_to_fixed): Reimplement in target arithmetic.
1143 (cast_from_fixed): Likewise.
1144 (ada_scaling_type): New function.
1145 (ada_delta): Return value instead of DOUBLEST. Perform target
1146 arithmetic instead of host arithmetic.
1147 (scaling_factor): Rename to ...
1148 (ada_scaling_factor) ... this. Make non-static. Return value instead
1149 of DOUBLEST. Perform target arithmetic instead of host arithmetic.
1150 (ada_fixed_to_float): Remove.
1151 (ada_float_to_fixed): Remove.
1152 * ada-lang.h (ada_fixed_to_float): Remove.
1153 (ada_float_to_fixed): Remove.
1154 (ada_delta): Return value instead of DOUBLEST.
1155 (ada_scaling_factor): Add prototype.
1156
1157 * ada-typeprint.c: Include "target-float.h".
1158 (print_fixed_point_type): Perform target arithmetic instead of
1159 host arithmetic.
1160 * ada-valprint.c: Include "target-float.h".
1161 (ada_val_print_num): Perform target arithmetic instead of
1162 host arithmetic for fixed-point types.
1163
1164 2017-11-06 Ulrich Weigand <uweigand@de.ibm.com>
1165
1166 * target-float.c: Include <math.h>.
1167 (floatformat_binop): New function.
1168 (floatformat_compare): Likewise.
1169 (target_float_binop): Likewise.
1170 (target_float_compare): Likewise.
1171 * target-float.h: Include "expression.h".
1172 (target_float_binop): Add prototype.
1173 (target_float_compare): Likewise.
1174
1175 * valarith.c: Do not include "doublest.h" and "dfp.h".
1176 Include "common/byte-vector.h".
1177 (value_args_as_decimal): Remove, replace by ...
1178 (value_args_as_target_float): ... this function. Handle both
1179 binary and decimal target floating-point formats.
1180 (scalar_binop): Handle both binary and decimal FP using
1181 value_args_as_target_float and target_float_binop.
1182 (value_equal): Handle both binary and decimal FP using
1183 value_args_as_target_float and target_float_compare.
1184 (value_less): Likewise.
1185 (value_pos): Handle all scalar types as simple copy.
1186 (value_neg): Handle all scalar types via BINOP_SUB from 0.
1187 * dfp.c (decimal_binop): Throw error instead of internal_error
1188 when called with an unsupported operation code.
1189
1190 2017-11-06 Ulrich Weigand <uweigand@de.ibm.com>
1191
1192 * target-float.c (target_float_to_string): New function.
1193 (target_float_from_string): New function.
1194 * target-float.h (target_float_to_string): Add prototype.
1195 (target_float_from_string): Add prototype.
1196
1197 * valprint.c: Include "target-float.h". Do not include
1198 "doublest.h" and "dfp.h".
1199 (print_floating): Use target_float_to_string.
1200 * printcmd.c: Include "target-float.h". Do not include "dfp.h".
1201 (printf_floating): Use target_float_to_string.
1202 * i387-tdep.c: Include "target-float.h". Do not include "doublest.h".
1203 (print_i387_value): Use target_float_to_string.
1204 * mips-tdep.c: Include "target-float.h".
1205 (mips_print_fp_register): Use target_float_to_string.
1206 * sh64-tdep.c: Include "target-float.h".
1207 (sh64_do_fp_register): Use target_float_to_string.
1208
1209 * parse.c: Include "target-float.h". Do not include
1210 "doublest.h" and "dfp.h".
1211 (parse_float): Use target_float_from_string.
1212 * stabsread.c: Include "target-float.h". Do not include "doublest.h".
1213 (define_symbol): Use target_float_from_string.
1214 * gdbarch-selftests.c: Include "target-float.h".
1215 (register_to_value_test): Use target_float_from_string.
1216
1217 2017-11-06 Ulrich Weigand <uweigand@de.ibm.com>
1218
1219 * Makefile.c (SFILES): Add target-float.c.
1220 (HFILES_NO_SRCDIR): Add target-float.h.
1221 (COMMON_OBS): Add target-float.o.
1222 * target-float.h: New file.
1223 * target-float.c: New file.
1224
1225 * doublest.c (floatformat_classify): Fix detection of float_zero.
1226
1227 * gdbtypes.c (is_floating_type): New function.
1228 * gdbtypes.h (is_floating_type): Add prototype.
1229
1230 * value.c: Do not include "floatformat.h".
1231 (unpack_double): Use target_float_is_valid.
1232 (is_floating_value): New function.
1233 * value.h (is_floating_value): Add prototype-
1234
1235 * valarith.c: Include "target-float.h".
1236 (value_logical_not): Use target_float_is_zero.
1237
1238 * python/py-value.c: Include "target-float.h".
1239 (valpy_nonzero): Use target_float_is_zero.
1240
1241 2017-11-04 Tom Tromey <tom@tromey.com>
1242
1243 * h8300-tdep.c (h8300_push_dummy_call): Use std::vector.
1244
1245 2017-11-04 Tom Tromey <tom@tromey.com>
1246
1247 * breakpoint.c (set_momentary_breakpoint): Return
1248 breakpoint_up.
1249 (until_break_command): Update.
1250 (new_until_break_fsm): Change argument types to
1251 breakpoint_up.
1252 (set_momentary_breakpoint_at_pc): Return breakpoint_up.
1253 (do_delete_breakpoint_cleanup, make_cleanup_delete_breakpoint):
1254 Remove.
1255 * infcmd.c (finish_forward): Update.
1256 * breakpoint.h (set_momentary_breakpoint)
1257 (set_momentary_breakpoint_at_pc): Return breakpoint_up.
1258 (make_cleanup_delete_breakpoint): Remove.
1259 (struct breakpoint_deleter): New.
1260 (breakpoint_up): New typedef.
1261 * infrun.c (insert_step_resume_breakpoint_at_sal_1): Update.
1262 (insert_exception_resume_breakpoint): Update.
1263 (insert_exception_resume_from_probe): Update.
1264 (insert_longjmp_resume_breakpoint): Update.
1265 * arm-linux-tdep.c (arm_linux_copy_svc): Update.
1266 * elfread.c (elf_gnu_ifunc_resolver_stop): Update.
1267 * infcall.c (call_function_by_hand_dummy): Update
1268
1269 2017-11-04 Tom Tromey <tom@tromey.com>
1270
1271 * c-typeprint.c (c_type_print_base): Use gdb::unique_xmalloc_ptr.
1272
1273 2017-11-04 Tom Tromey <tom@tromey.com>
1274
1275 * linux-tdep.c (linux_core_info_proc_mappings): Use
1276 gdb::def_vector.
1277 (linux_get_siginfo_data): Return gdb::byte_vector. Remove
1278 "size" argument.
1279 (linux_corefile_thread): Update.
1280 (linux_make_corefile_notes): Remove unused variable.
1281
1282 2017-11-04 Tom Tromey <tom@tromey.com>
1283
1284 * ppc-linux-tdep.c (ppc_linux_get_syscall_number): Use
1285 gdb::byte_vector.
1286
1287 2017-11-04 Tom Tromey <tom@tromey.com>
1288
1289 * objfiles.c (do_free_objfile_cleanup): Remove.
1290 * compile/compile-object-load.c (compile_object_load): Update.
1291 * objfiles.h (make_cleanup_free_objfile): Remove.
1292
1293 2017-11-04 Tom Tromey <tom@tromey.com>
1294
1295 * sparc64-tdep.c (do_examine): Use gdb::def_vector.
1296 (adi_read_versions): Change "tags" to "gdb_byte *".
1297 (adi_print_versions): Likewise.
1298
1299 2017-11-04 Tom Tromey <tom@tromey.com>
1300
1301 * breakpoint.c
1302 (scoped_rbreak_breakpoints::scoped_rbreak_breakpoints): Rename
1303 from start_rbreak_breakpoints.
1304 (scoped_rbreak_breakpoints): Rename from end_rbreak_breakpoints.
1305 * breakpoint.h (class scoped_rbreak_breakpoints): New.
1306 (start_rbreak_breakpoints, end_rbreak_breakpoints): Remove.
1307 * symtab.c (do_end_rbreak_breakpoints): Remove.
1308 (rbreak_command): Use scoped_rbreak_breakpoints, std::string.
1309
1310 2017-11-04 Tom Tromey <tom@tromey.com>
1311
1312 * cp-namespace.c (reset_directive_searched): Remove.
1313 (cp_lookup_symbol_via_imports): Use scoped_restore.
1314 * cp-support.c (reset_directive_searched): Remove.
1315 (make_symbol_overload_list_using): Use scoped_restore.
1316 * d-namespace.c (d_lookup_symbol_imports): Use scoped_restore.
1317 (reset_directive_searched): Remove.
1318
1319 2017-11-04 Tom Tromey <tom@tromey.com>
1320
1321 * symfile.c (find_separate_debug_file_by_debuglink): Use
1322 unique_xmalloc_ptr.
1323
1324 2017-11-04 Tom Tromey <tom@tromey.com>
1325
1326 * compile/compile-loc2c.c (compute_stack_depth_worker): Change
1327 type of "info".
1328 (compute_stack_depth): Likewise.
1329 (do_compile_dwarf_expr_to_c): Use std::vector.
1330
1331 2017-11-04 Tom Tromey <tom@tromey.com>
1332
1333 * compile/compile-object-load.c (link_callbacks_einfo): Use
1334 std::string.
1335
1336 2017-11-04 Tom Tromey <tom@tromey.com>
1337
1338 * dwarf2read.c (process_full_comp_unit, process_full_type_unit):
1339 Use scoped_free_pendings.
1340 * dbxread.c (dbx_symfile_read, dbx_psymtab_to_symtab_1): Use
1341 scoped_free_pendings.
1342 * xcoffread.c (xcoff_psymtab_to_symtab_1): Use scoped_free_pendings.
1343 (xcoff_initial_scan): Likewise.
1344 * buildsym.c (reset_symtab_globals): Update comment.
1345 (scoped_free_pendings): Rename from really_free_pendings.
1346 (prepare_for_building): Update comment.
1347 (buildsym_init): Likewise.
1348 * buildsym.h (class scoped_free_pendings): New class.
1349 (really_free_pendings): Don't declare.
1350
1351 2017-11-03 Ulrich Weigand <uweigand@de.ibm.com>
1352
1353 * doublest.c (convert_doublest_to_floatformat): Fix uninitialized
1354 output when converting a zero value to a special byteorder format.
1355
1356 2017-11-02 Yao Qi <yao.qi@linaro.org>
1357
1358 * frame.c (do_frame_register_read): Remove aspace.
1359 * jit.c (jit_frame_sniffer): Likwise.
1360 * ppc-linux-tdep.c (ppu2spu_sniffer): Likewise.
1361 * regcache.c (regcache::regcache): Pass nullptr.
1362 (regcache_print): Caller updated.
1363 * regcache.h (regcache::regcache): Remove one constructor
1364 parameter aspace.
1365
1366 2017-11-02 Yao Qi <yao.qi@linaro.org>
1367
1368 * regcache.h (regcache) <m_readonly_p>: Change it to const bool.
1369
1370 2017-11-02 Yao Qi <yao.qi@linaro.org>
1371
1372 * breakpoint.c (insert_single_step_breakpoints): Update.
1373 * frame.c (struct frame_info) <aspace>: Add const.
1374 (frame_save_as_regcache): Add const.
1375 (get_frame_address_space): Return const address_space *.
1376 * frame.h (get_frame_address_space): Update declaration.
1377 * infrun.c (struct step_over_info) <aspace>: Add const.
1378 (set_step_over_info): Make aspace const.
1379 (displaced_step_prepare_throw): Change variable const.
1380 (resume): Likewise.
1381 (proceed): Likewise.
1382 (adjust_pc_after_break): Likewise.
1383 (save_waitstatus): Likewise.
1384 (handle_signal_stop): Likewise.
1385 (keep_going_pass_signal): Likewise.
1386 * jit.c (jit_frame_sniffer): Add const.
1387 * mips-tdep.c (mips_single_step_through_delay): Likewise.
1388 * ppc-linux-tdep.c (ppu2spu_sniffer): Likewise.
1389 * record-full.c (record_full_wait_1): Likewise.
1390 * regcache.c (regcache::regcache): Change parameter to const.
1391 * regcache.h (regcache::regcache): Likewise.
1392 (regcache::aspace): Return const address_space *.
1393 (regcache) <m_aspace>: Add const.
1394
1395 2017-11-02 Yao Qi <yao.qi@linaro.org>
1396
1397 * darwin-nat.c (cancel_breakpoint): Use regcache->aspace ().
1398 * frame.c (create_sentinel_frame): Likewise.
1399 * infrun.c (displaced_step_prepare_throw): Likewise.
1400 (resume): Likewise.
1401 (thread_still_needs_step_over_bp): Likewise.
1402 (proceed): Likewise.
1403 (do_target_wait): Likewise.
1404 (adjust_pc_after_break): Likewise.
1405 (handle_syscall_event): Likewise.
1406 (save_waitstatus): Likewise.
1407 (handle_inferior_event_1): Likewise.
1408 (handle_signal_stop): Likewise.
1409 (keep_going_pass_signal): Likewise.
1410 * linux-nat.c (status_callback): Likewise.
1411 (save_stop_reason): Likewise.
1412 (resume_stopped_resumed_lwps): Likewise.
1413 * record-full.c (record_full_exec_insn): Likewise.
1414 (record_full_wait_1): Likewise.
1415 * regcache.c (get_regcache_aspace): Remove.
1416 * regcache.h (get_regcache_aspace): Remove.
1417
1418 2017-11-02 Yao Qi <yao.qi@linaro.org>
1419
1420 * regcache.c (struct regcache_descr) <nr_raw_registers>: Remove.
1421 (init_regcache_descr): Use gdbarch_num_regs.
1422 (regcache::regcache): Likewise.
1423 (regcache::get_register_status): Likewise.
1424 (regcache::assert_raw_regnum): Likewise.
1425 (regcache::cooked_read): Likewise.
1426 (regcache::cooked_read_value): Likewise.
1427 (regcache::cooked_write): Likewise.
1428 (regcache::dump): Likewise.
1429 (regcache::num_raw_registers): New method.
1430 * regcache.h (class regcache) <num_raw_registers>: New.
1431
1432 2017-11-02 Yao Qi <yao.qi@linaro.org>
1433
1434 * regcache.c (regcache::assert_regnum): New method.
1435 (regcache::invalidate): Call assert_regnum.
1436 (regcache::raw_update): Likewise.
1437 (regcache::raw_write): Likewise.
1438 (regcache::raw_read_part): Likewise.
1439 (regcache::raw_write_part): Likewise.
1440 (regcache::raw_supply): Likewise.
1441 (regcache::raw_supply_integer): Likewise.
1442 (regcache::raw_supply_zeroed): Likewise.
1443 (regcache::raw_collect): Likewise.
1444 (regcache::raw_collect_integer): Likewise.
1445 * regcache.h (regcache::assert_regnum): Declare.
1446
1447 2017-11-02 Yao Qi <yao.qi@linaro.org>
1448
1449 * regcache.c (regcache::dump): Remove code.
1450
1451 2017-11-02 Yao Qi <yao.qi@linaro.org>
1452
1453 * regcache.c (struct regcache_descr) <sizeof_raw_register_status>:
1454 Remove.
1455 <sizeof_cooked_register_status>: Remove.
1456 (init_regcache_descr): Update.
1457 (regcache::regcache): Use nr_cooked_registers and nr_raw_registers.
1458 (regcache::save): Likewise.
1459 (regcache::dump): Likewise.
1460
1461 2017-11-01 James Bowman <james.bowman@ftdichip.com>
1462
1463 * ft32-tdep.c (ft32_fetch_instruction): New function.
1464 (ft32_analyze_prologue): Use ft32_fetch_instruction().
1465
1466 2017-10-31 Simon Marchi <simon.marchi@polymtl.ca>
1467
1468 * cli/cli-script.c (execute_control_command): Rename to ...
1469 (execute_control_command_1): ... this.
1470 (execute_control_command): New function.
1471
1472 2017-10-31 Simon Marchi <simon.marchi@ericsson.com>
1473
1474 * tracepoint.c (tfind_command): Remove const_cast.
1475
1476 2017-10-30 Mike Gulick <mgulick@mathworks.com>
1477
1478 * Makefile.in (HFILES_NO_SRCDIR): Remove reference to gdb.h.
1479
1480 2017-10-30 Simon Marchi <simon.marchi@ericsson.com>
1481
1482 * common/common-utils.h (in_inclusive_range): New function.
1483 * arm-tdep.c (arm_record_extension_space): Use
1484 in_inclusive_range.
1485 (thumb_record_ld_st_reg_offset): Use in_inclusive_range.
1486 * cris-tdep.c (cris_spec_reg_applicable): Use
1487 in_inclusive_range.
1488
1489 2017-10-30 Pedro Alves <palves@redhat.com>
1490 Simon Marchi <simon.marchi@ericsson.com>
1491
1492 * remote.c (remote_set_syscall_catchpoint): Build a std::string
1493 instead of a gdb::unique_xmalloc_ptr, using string_appendf.
1494
1495 2017-10-30 Pedro Alves <palves@redhat.com>
1496
1497 * common/common-utils.c (string_appendf, string_vappendf): New
1498 functions.
1499 * common/common-utils.h (string_appendf, string_vappendf): New
1500 declarations.
1501 * unittests/common-utils-selftests.c (string_appendf_func)
1502 (test_appendf_func, string_vappendf_wrapper, string_appendf_tests)
1503 (string_vappendf_tests): New functions.
1504 (_initialize_common_utils_selftests): Register "string_appendf" and
1505 "string_vappendf tests".
1506
1507 2017-10-30 Pedro Alves <palves@redhat.com>
1508
1509 * unittests/common-utils-selftests.c (format_func): New typedef.
1510 (string_printf_tests, string_vprintf_tests): Tests factored out
1511 and merged to ...
1512 (test_format_func): ... this new function.
1513 (string_printf_tests, string_vprintf_tests): Reimplement on top of
1514 test_format_func.
1515
1516 2017-10-29 Simon Marchi <simon.marchi@ericsson.com>
1517
1518 * darwin-nat.c: Remove include of gdb.h.
1519
1520 2017-10-29 Simon Marchi <simon.marchi@ericsson.com>
1521
1522 * xtensa-xtregs.c: Fix formatting issues.
1523
1524 2017-10-29 Simon Marchi <simon.marchi@ericsson.com>
1525
1526 * xtensa-xtregs.c (xtensa_regtable_t) <name>: Constify.
1527
1528 2017-10-28 Maksim Dzabraev <dzabraew@gmail.com>
1529
1530 PR python/21213
1531 * python/py-infthread.c (thpy_get_inferior): Increment reference
1532 of inferior before returning it.
1533
1534 2017-10-27 Simon Marchi <simon.marchi@ericsson.com>
1535
1536 * unittests/common-utils-selftests.c (format): Add
1537 ATTRIBUTE_PRINTF.
1538
1539 2017-10-27 Simon Marchi <simon.marchi@polymtl.ca>
1540
1541 * xml-syscall.c (struct syscall_desc): Add constructor.
1542 <name>: Change type to std::string.
1543 (syscall_desc_up): New typedef.
1544 (syscall_desc_p): Remove typeder.
1545 (DEF_VEC_P(syscall_desc_p)): Remove.
1546 (struct syscall_group_desc): Add constructor.
1547 <name>: Change type to std::string.
1548 <syscalls>: Change type to std::vector.
1549 (syscall_group_desc_up): New typedef.
1550 (syscall_group_desc_p): Remove typedef.
1551 (DEF_VEC_P(syscall_group_desc_p)): Remove.
1552 (struct syscalls_info) <syscalls>: Change type to std::vector of
1553 unique_ptr.
1554 <groups>: Likewise.
1555 <my_gdb_datadir>: Change type to std::string.
1556 (syscalls_info_up): New typedef.
1557 (allocate_syscalls_info): Remove.
1558 (syscalls_info_free_syscalls_desc): Remove.
1559 (syscalls_info_free_syscall_group_desc): Remove.
1560 (free_syscalls_info): Remove.
1561 (make_cleanup_free_syscalls_info): Remove.
1562 (syscall_group_create_syscall_group_desc): Adjust.
1563 (syscall_group_add_syscall): Adjust.
1564 (syscall_create_syscall_desc): Adjust.
1565 (syscall_parse_xml): Adjust, use unique_ptr instead of cleanup.
1566 (init_syscalls_info): Adjust.
1567 (syscall_group_get_group_by_name): Adjust.
1568 (xml_get_syscall_number): Adjust.
1569 (xml_get_syscall_name): Adjust.
1570 (xml_list_of_syscalls): Adjust.
1571 (xml_list_syscalls_by_group): Adjust.
1572 (xml_list_of_groups): Adjust.
1573
1574 2017-10-27 Simon Marchi <simon.marchi@ericsson.com>
1575
1576 * probe.h: Don't include gdb_vecs.h.
1577 (DEF_VEC_P (probe_p)): Remove.
1578 (find_probes_in_objfile): Return an std::vector.
1579 * probe.c (find_probes_in_objfile): Likewise.
1580 * breakpoint.c (breakpoint_objfile_data)
1581 <longjmp_probes>: Change type to std::vector.
1582 <exception_probes>: Likewise.
1583 (free_breakpoint_probes): Don't manually free vectors.
1584 (create_longjmp_master_breakpoint): Adjust.
1585 (create_exception_master_breakpoint): Adjust.
1586 * solib-svr4.c (svr4_create_probe_breakpoints): Change
1587 parameter type, adjust.
1588 (svr4_create_solib_event_breakpoints): Adjust.
1589
1590 2017-10-27 Simon Marchi <simon.marchi@ericsson.com>
1591
1592 * breakpoint.c (breakpoint_objfile_data): Initialize fields.
1593 (get_breakpoint_objfile_data): Allocate breakpoint_objfile_data
1594 with new.
1595 (free_breakpoint_probes): Rename to ...
1596 (free_breakpoint_objfile_data): ... this, and call delete on
1597 bp_objfile_data..
1598
1599 2017-10-27 Simon Marchi <simon.marchi@polymtl.ca>
1600
1601 * auto-load.c: Don't include gdb_vecs.h, include algorithm.
1602 (loaded_script_ptr): Remove typedef.
1603 (DEF_VEC_P (loaded_script_ptr)): Remove.
1604 (struct collect_matching_scripts_data): Add constructor.
1605 <scripts_p>: Change type to (pointer to) std::vector.
1606 (collect_matching_scripts_data): Adjust.
1607 (sort_scripts_by_name): Make suitable for std::sort.
1608 (print_scripts): Don't sort vector, adjust to std::vector.
1609 (auto_load_info_scripts): Sort vectors, adjust to std::vector.
1610
1611 2017-10-27 Simon Marchi <simon.marchi@ericsson.com>
1612
1613 * symfile.c (filename_language): Make struct, not typedef. Add
1614 constructor.
1615 <ext>: Change type to std::string.
1616 (DEF_VEC_O (filename_language)): Remove.
1617 (filename_language_table): Change type to std::vector.
1618 (add_filename_language): Adjust.
1619 (set_ext_lang_command): Adjust.
1620 (info_ext_lang_command): Adjust.
1621 (deduce_language_from_filename): Adjust.
1622 (class scoped_restore_filename_language_table): Remove.
1623 (test_filename_language): Use scoped_restore.
1624 (test_set_ext_lang_command): Use scoped_restore, adjust to
1625 std::vector change.
1626
1627 2017-10-27 Simon Marchi <simon.marchi@ericsson.com>
1628
1629 * symfile.c: Include selftest.h.
1630 (class scoped_restore_filename_language_table): New.
1631 (test_filename_language): New test.
1632 (test_set_ext_lang_command): New test.
1633 (_initialize_symfile): Register tests.
1634
1635 2017-10-27 Keith Seitz <keiths@redhat.com>
1636
1637 * breakpoint.c (print_breakpoint_location): Use the symbol saved
1638 in the bp_location, falling back to find_pc_sect_function when
1639 needed.
1640 (add_location_to_breakpoint): Save sal->symbol.
1641 * breakpoint.h (struct bp_location) <symbol>: New field.
1642 * symtab.c (find_function_start_sal): Save the symbol into the SaL.
1643 * symtab.h (struct symtab_and_line) <symbol>: New field.
1644
1645 2017-10-26 Patrick Frants <osscontribute@gmail.com>
1646
1647 PR gdb/13669
1648 * cp-valprint.c (cp_print_value_fields): Use obstack_blank_fast
1649 to rewind obstack.
1650
1651 2017-10-26 Pedro Alves <palves@redhat.com>
1652
1653 * remote.c (remote_async_terminal_ours_p): Delete.
1654 (remote_open_1, remote_terminal_inferior, remote_terminal_ours):
1655 Remove references to 'remote_async_terminal_ours_p'.
1656
1657 2017-10-26 Yao Qi <yao.qi@linaro.org>
1658
1659 * breakpoint.h (regular_breakpoint_inserted_here_p): Remove.
1660
1661 2017-10-26 Yao Qi <yao.qi@linaro.org>
1662
1663 * break-catch-sig.c (signal_catchpoint_breakpoint_hit): Make
1664 aspace const.
1665 * break-catch-syscall.c (breakpoint_hit_catch_syscall):
1666 Likewise.
1667 * breakpoint.c (bpstat_check_location): Remove cast.
1668 (breakpoint_hit_catch_fork): Make aspce const.
1669 (breakpoint_hit_catch_solib): Likewise.
1670 (breakpoint_hit_catch_exec): Likewise.
1671 (breakpoint_hit_ranged_breakpoint): Likewise.
1672 (breakpoint_hit_watchpoint): Likewise.
1673 (base_breakpoint_breakpoint_hit): Likewise.
1674 (bkpt_breakpoint_hit): Likewise.
1675 (dprintf_breakpoint_hit): Likewise.
1676 (tracepoint_breakpoint_hit): Likewise.
1677 * breakpoint.h (breakpoint_ops) <breakpoint_hit>: Likewise.
1678
1679 2017-10-26 Yao Qi <yao.qi@linaro.org>
1680
1681 * breakpoint.c (breakpoint_location_address_match): Change
1682 "struct address_space *" to "const address_space".
1683 (breakpoint_location_address_range_overlap): Likewise.
1684 (breakpoint_here_p): Likewise.
1685 (breakpoint_in_range_p): Likewise.
1686 (moribund_breakpoint_here_p): Likewise.
1687 (bp_location_inserted_here_p): Likewise.
1688 (software_breakpoint_inserted_here_p): Likewise.
1689 (hardware_breakpoint_inserted_here_p): Likewise.
1690 (hardware_watchpoint_inserted_in_range): Likewise.
1691 (bpstat_check_location): Likewise.
1692 (bpstat_stop_status): Likewise.
1693 (breakpoint_address_match): Likewise.
1694 (breakpoint_address_match_range): Likewise.
1695 (breakpoint_location_address_match): Likewise.
1696 (breakpoint_location_address_range_overlap): Likewise.
1697 (insert_single_step_breakpoint): Likewise.
1698 (breakpoint_has_location_inserted_here): Likewise.
1699 (single_step_breakpoint_inserted_here_p): Likewise.
1700 (pc_at_non_inline_function): Likewise.
1701 * breakpoint.h (bpstat_stop_status): Update declaration.
1702 (breakpoint_here_p): Likewise.
1703 (breakpoint_in_range_p): Likewise.
1704 (moribund_breakpoint_here_p): Likewise.
1705 (breakpoint_inserted_here_p): Likewise.
1706 (software_breakpoint_inserted_here_p): Likewise.
1707 (hardware_breakpoint_inserted_here_p): Likewise.
1708 (breakpoint_has_location_inserted_here): Likewise.
1709 (single_step_breakpoint_inserted_here_p): Likewise.
1710 (hardware_watchpoint_inserted_in_range): Likewise.
1711 (breakpoint_address_match): Likewise.
1712 (insert_single_step_breakpoint): Likewise.
1713 (pc_at_non_inline_function): Likewise.
1714 * gdbthread.h (thread_has_single_step_breakpoint_here): Likewise.
1715 * record.c (record_check_stopped_by_breakpoint): Likewise.
1716 * record.h (record_check_stopped_by_breakpoint): Likewise.
1717 * thread.c (thread_has_single_step_breakpoint_here): Likewise.
1718
1719 2017-10-25 Yao Qi <yao.qi@linaro.org>
1720
1721 * aarch32-linux-nat.c (aarch32_gp_regcache_supply): Use
1722 regcache->arch () instead get_regcache_arch.
1723 * aarch64-fbsd-nat.c (aarch64_fbsd_fetch_inferior_registers):
1724 Likewise.
1725 (aarch64_fbsd_store_inferior_registers): Likewise.
1726 * aarch64-linux-nat.c (fetch_gregs_from_thread): Likewise.
1727 (store_gregs_to_thread): Likewise.
1728 (fetch_fpregs_from_thread): Likewise.
1729 (store_fpregs_to_thread): Likewise.
1730 * aarch64-tdep.c (aarch64_extract_return_value): Likewise.
1731 (aarch64_store_return_value): Likewise.
1732 (aarch64_software_single_step): Likewise.
1733 * aix-thread.c (aix_thread_wait): Likewise.
1734 (supply_reg32): Likewise.
1735 (supply_sprs64): Likewise.
1736 (supply_sprs32): Likewise.
1737 (fill_gprs64): Likewise.
1738 (fill_gprs32): Likewise.
1739 (fill_sprs64): Likewise.
1740 (fill_sprs32): Likewise.
1741 (store_regs_user_thread): Likewise.
1742 (store_regs_kernel_thread): Likewise.
1743 * alpha-bsd-nat.c (alphabsd_fetch_inferior_registers): Likewise.
1744 (alphabsd_store_inferior_registers): Likewise.
1745 * alpha-tdep.c (alpha_extract_return_value): Likewise.
1746 (alpha_store_return_value): Likewise.
1747 (alpha_deal_with_atomic_sequence): Likewise.
1748 (alpha_next_pc): Likewise.
1749 (alpha_software_single_step): Likewise.
1750 * amd64-bsd-nat.c (amd64bsd_fetch_inferior_registers): Likewise.
1751 (amd64bsd_store_inferior_registers): Likewise.
1752 * amd64-linux-nat.c (amd64_linux_fetch_inferior_registers):
1753 Likewise.
1754 (amd64_linux_store_inferior_registers): Likewise.
1755 * amd64-nat.c (amd64_supply_native_gregset): Likewise.
1756 (amd64_collect_native_gregset): Likewise.
1757 * amd64-obsd-tdep.c (amd64obsd_supply_uthread): Likewise.
1758 (amd64obsd_collect_uthread): Likewise.
1759 * amd64-tdep.c (amd64_supply_fpregset): Likewise.
1760 (amd64_collect_fpregset): Likewise.
1761 (amd64_supply_fxsave): Likewise.
1762 (amd64_supply_xsave): Likewise.
1763 (amd64_collect_fxsave): Likewise.
1764 (amd64_collect_xsave): Likewise.
1765 * arc-tdep.c (arc_write_pc): Likewise.
1766 * arch-utils.c (default_skip_permanent_breakpoint): Likewise.
1767 * arm-fbsd-nat.c (arm_fbsd_fetch_inferior_registers): Likewise.
1768 (arm_fbsd_store_inferior_registers): Likewise.
1769 * arm-linux-nat.c (fetch_vfp_regs): Likewise.
1770 (store_vfp_regs): Likewise.
1771 (arm_linux_fetch_inferior_registers): Likewise.
1772 (arm_linux_store_inferior_registers): Likewise.
1773 * arm-linux-tdep.c (arm_linux_supply_gregset): Likewise.
1774 (arm_linux_sigreturn_next_pc): Likewise.
1775 (arm_linux_get_next_pcs_syscall_next_pc): Likewise.
1776 * arm-nbsd-nat.c (arm_supply_gregset): Likewise.
1777 (fetch_register): Likewise.
1778 (store_register): Likewise.
1779 * arm-tdep.c (arm_is_thumb): Likewise.
1780 (displaced_in_arm_mode): Likewise.
1781 (bx_write_pc): Likewise.
1782 (arm_get_next_pcs_addr_bits_remove): Likewise.
1783 (arm_software_single_step): Likewise.
1784 (arm_extract_return_value): Likewise.
1785 (arm_store_return_value): Likewise.
1786 (arm_write_pc): Likewise.
1787 * bfin-tdep.c (bfin_extract_return_value): Likewise.
1788 * bsd-uthread.c (bsd_uthread_fetch_registers): Likewise.
1789 (bsd_uthread_store_registers): Likewise.
1790 * core-regset.c (fetch_core_registers): Likewise.
1791 * corelow.c (get_core_registers): Likewise.
1792 * cris-tdep.c (cris_store_return_value): Likewise.
1793 (cris_extract_return_value): Likewise.
1794 (find_step_target): Likewise.
1795 (find_step_target): Likewise.
1796 (cris_software_single_step): Likewise.
1797 * ctf.c (ctf_fetch_registers): Likewise.
1798 * darwin-nat.c (cancel_breakpoint): Likewise.
1799 * fbsd-tdep.c (fbsd_collect_thread_registers): Likewise.
1800 * frv-tdep.c (frv_extract_return_value): Likewise.
1801 * ft32-tdep.c (ft32_store_return_value): Likewise.
1802 (ft32_extract_return_value): Likewise.
1803 * go32-nat.c (fetch_register): Likewise.
1804 (go32_fetch_registers): Likewise.
1805 (go32_store_registers): Likewise.
1806 (store_register): Likewise.
1807 * h8300-tdep.c (h8300_extract_return_value): Likewise.
1808 (h8300_store_return_value): Likewise.
1809 * hppa-linux-nat.c (fetch_register): Likewise.
1810 (store_register): Likewise.
1811 (hppa_linux_fetch_inferior_registers): Likewise.
1812 (hppa_linux_store_inferior_registers): Likewise.
1813 * i386-darwin-nat.c (i386_darwin_fetch_inferior_registers): Likewise.
1814 (i386_darwin_store_inferior_registers): Likewise.
1815 * i386-gnu-nat.c (gnu_fetch_registers): Likewise.
1816 (gnu_store_registers): Likewise.
1817 * i386-linux-nat.c (fetch_register): Likewise.
1818 (store_register): Likewise.
1819 (supply_gregset): Likewise.
1820 (fill_gregset): Likewise.
1821 (i386_linux_fetch_inferior_registers): Likewise.
1822 (i386_linux_store_inferior_registers): Likewise.
1823 (i386_linux_resume): Likewise.
1824 * i386-linux-tdep.c (i386_linux_get_syscall_number_from_regcache):
1825 Likewise.
1826 * i386-nto-tdep.c (i386nto_supply_gregset): Likewise.
1827 * i386-obsd-nat.c (i386obsd_supply_pcb): Likewise.
1828 * i386-obsd-tdep.c (i386obsd_supply_uthread): Likewise.
1829 (i386obsd_collect_uthread): Likewise.
1830 * i386-tdep.c (i386_mmx_regnum_to_fp_regnum): Likewise.
1831 (i386_supply_gregset): Likewise.
1832 (i386_collect_gregset): Likewise.
1833 (i386_supply_fpregset): Likewise.
1834 (i386_collect_fpregset): Likewise.
1835 (i386_mpx_bd_base): Likewise.
1836 * i386-v4-nat.c (supply_fpregset): Likewise.
1837 (fill_fpregset): Likewise.
1838 * i387-tdep.c (i387_supply_fsave): Likewise.
1839 (i387_collect_fsave): Likewise.
1840 (i387_supply_fxsave): Likewise.
1841 (i387_collect_fxsave): Likewise.
1842 (i387_supply_xsave): Likewise.
1843 (i387_collect_xsave): Likewise.
1844 * ia64-linux-nat.c (ia64_linux_fetch_registers): Likewise.
1845 (ia64_linux_store_registers): Likewise.
1846 * ia64-tdep.c (ia64_access_rse_reg): Likewise.
1847 (ia64_extract_return_value): Likewise.
1848 (ia64_store_return_value): Likewise.
1849 (find_func_descr): Likewise.
1850 * inf-child.c (inf_child_fetch_inferior_registers): Likewise.
1851 * inf-ptrace.c (inf_ptrace_fetch_registers): Likewise.
1852 (inf_ptrace_store_registers): Likewise.
1853 * infrun.c (use_displaced_stepping): Likewise.
1854 (displaced_step_prepare_throw): Likewise.
1855 (resume): Likewise.
1856 (proceed): Likewise.
1857 (do_target_wait): Likewise.
1858 (adjust_pc_after_break): Likewise.
1859 (handle_inferior_event_1): Likewise.
1860 (handle_signal_stop): Likewise.
1861 (save_infcall_suspend_state): Likewise.
1862 (restore_infcall_suspend_state): Likewise.
1863 * iq2000-tdep.c (iq2000_extract_return_value): Likewise.
1864 * jit.c (jit_frame_prev_register): Likewise.
1865 * linux-nat.c (save_stop_reason): Likewise.
1866 (linux_nat_wait_1): Likewise.
1867 (resume_stopped_resumed_lwps): Likewise.
1868 * linux-record.c (record_linux_sockaddr): Likewise.
1869 (record_linux_msghdr): Likewise.
1870 (record_linux_system_call): Likewise.
1871 * linux-tdep.c (linux_collect_thread_registers): Likewise.
1872 * lm32-tdep.c (lm32_extract_return_value): Likewise.
1873 (lm32_store_return_value): Likewise.
1874 * m32c-tdep.c (m32c_read_flg): Likewise.
1875 (m32c_pseudo_register_read): Likewise.
1876 (m32c_pseudo_register_write): Likewise.
1877 * m32r-linux-tdep.c (m32r_linux_supply_gregset): Likewise.
1878 (m32r_linux_collect_gregset): Likewise.
1879 * m32r-tdep.c (m32r_store_return_value): Likewise.
1880 (m32r_extract_return_value): Likewise.
1881 * m68k-bsd-nat.c (m68kbsd_supply_fpregset): Likewise.
1882 (m68kbsd_collect_fpregset): Likewise.
1883 * m68k-bsd-tdep.c (m68kbsd_supply_fpregset): Likewise.
1884 * m68k-linux-nat.c (fetch_register): Likewise.
1885 (old_fetch_inferior_registers): Likewise.
1886 (old_store_inferior_registers): Likewise.
1887 (store_regs): Likewise.
1888 * m68k-tdep.c (m68k_svr4_extract_return_value): Likewise.
1889 (m68k_svr4_store_return_value): Likewise.
1890 * m88k-tdep.c (m88k_store_arguments): Likewise.
1891 * mi/mi-main.c (mi_cmd_data_list_changed_registers): Likewise.
1892 (mi_cmd_data_write_register_values): Likewise.
1893 * mips-fbsd-nat.c (mips_fbsd_fetch_inferior_registers): Likewise.
1894 (mips_fbsd_store_inferior_registers): Likewise.
1895 * mips-fbsd-tdep.c (mips_fbsd_supply_fpregs): Likewise.
1896 (mips_fbsd_supply_gregs): Likewise.
1897 (mips_fbsd_collect_fpregs): Likewise.
1898 (mips_fbsd_collect_gregs): Likewise.
1899 (mips_fbsd_supply_fpregset): Likewise.
1900 (mips_fbsd_collect_fpregset): Likewise.
1901 (mips_fbsd_supply_gregset): Likewise.
1902 (mips_fbsd_collect_gregset): Likewise.
1903 * mips-linux-nat.c (supply_gregset): Likewise.
1904 (fill_gregset): Likewise.
1905 (supply_fpregset): Likewise.
1906 (fill_fpregset): Likewise.
1907 * mips-linux-tdep.c (mips_supply_gregset): Likewise.
1908 (mips_fill_gregset): Likewise.
1909 (mips_supply_fpregset): Likewise.
1910 (mips_fill_fpregset): Likewise.
1911 (mips64_supply_gregset): Likewise.
1912 (micromips_linux_sigframe_validate): Likewise.
1913 * mips-nbsd-nat.c (mipsnbsd_fetch_inferior_registers): Likewise.
1914 (mipsnbsd_fetch_inferior_registers): Likewise.
1915 (mipsnbsd_store_inferior_registers): Likewise.
1916 * mips-nbsd-tdep.c (mipsnbsd_supply_fpregset): Likewise.
1917 (mipsnbsd_supply_gregset): Likewise.
1918 (mipsnbsd_iterate_over_regset_sections): Likewise.
1919 (mipsnbsd_supply_reg): Likewise.
1920 (mipsnbsd_supply_fpreg): Likewise.
1921 * mips-tdep.c (mips_in_frame_stub): Likewise.
1922 (mips_dummy_id): Likewise.
1923 (is_octeon_bbit_op): Likewise.
1924 (micromips_bc1_pc): Likewise.
1925 (extended_mips16_next_pc): Likewise.
1926 (mips16_next_pc): Likewise.
1927 (deal_with_atomic_sequence): Likewise.
1928 * moxie-tdep.c (moxie_process_readu): Likewise.
1929 * nios2-tdep.c (nios2_get_next_pc): Likewise.
1930 * nto-procfs.c (procfs_store_registers): Likewise.
1931 * ppc-fbsd-nat.c (ppcfbsd_fetch_inferior_registers): Likewise.
1932 (ppcfbsd_store_inferior_registers): Likewise.
1933 * ppc-linux-nat.c (fetch_vsx_register): Likewise.
1934 (fetch_altivec_register): Likewise.
1935 (get_spe_registers): Likewise.
1936 (fetch_spe_register): Likewise.
1937 (fetch_altivec_registers): Likewise.
1938 (fetch_all_gp_regs): Likewise.
1939 (fetch_all_fp_regs): Likewise.
1940 (store_vsx_register): Likewise.
1941 (store_altivec_register): Likewise.
1942 (set_spe_registers): Likewise.
1943 (store_spe_register): Likewise.
1944 (store_altivec_registers): Likewise.
1945 (store_all_gp_regs): Likewise.
1946 (store_all_fp_regs): Likewise.
1947 * ppc-linux-tdep.c (ppc_linux_supply_gregset): Likewise.
1948 (ppc_linux_collect_gregset): Likewise.
1949 (ppc_canonicalize_syscall): Likewise.
1950 (ppc_linux_record_signal): Likewise.
1951 (ppu2spu_prev_register): Likewise.
1952 * ppc-nbsd-nat.c (ppcnbsd_supply_pcb): Likewise.
1953 * ppc-obsd-nat.c (ppcobsd_fetch_registers): Likewise.
1954 (ppcobsd_store_registers): Likewise.
1955 * ppc-ravenscar-thread.c (ppc_ravenscar_generic_fetch_registers):
1956 Likewise.
1957 (ppc_ravenscar_generic_store_registers): Likewise.
1958 * procfs.c (procfs_fetch_registers): Likewise.
1959 (procfs_store_registers): Likewise.
1960 * ravenscar-thread.c (ravenscar_fetch_registers): Likewise.
1961 (ravenscar_store_registers): Likewise.
1962 (ravenscar_prepare_to_store): Likewise.
1963 * record-btrace.c (record_btrace_fetch_registers): Likewise.
1964 * record-full.c (record_full_wait_1): Likewise.
1965 (record_full_registers_change): Likewise.
1966 (record_full_store_registers): Likewise.
1967 (record_full_core_fetch_registers): Likewise.
1968 (record_full_save): Likewise.
1969 (record_full_goto_insn): Likewise.
1970 * regcache.c (regcache_register_size): Likewise.
1971 (get_regcache_arch): Remove.
1972 (regcache_read_pc): Likewise.
1973 * regcache.h (get_regcache_arch): Remove.
1974 * remote-sim.c (gdbsim_fetch_register): Likewise.
1975 (gdbsim_store_register): Likewise.
1976 * remote.c (fetch_register_using_p): Likewise.
1977 (send_g_packet): Likewise.
1978 (remote_prepare_to_store): Likewise.
1979 (store_registers_using_G): Likewise.
1980 * reverse.c (save_bookmark_command): Likewise.
1981 (goto_bookmark_command): Likewise.
1982 * rs6000-aix-tdep.c (branch_dest): Likewise.
1983 * rs6000-nat.c (rs6000_ptrace64): Likewise.
1984 (fetch_register): Likewise.
1985 * rs6000-tdep.c (ppc_supply_reg): Likewise.
1986 (ppc_collect_reg): Likewise.
1987 (ppc_collect_gregset): Likewise.
1988 (ppc_collect_fpregset): Likewise.
1989 (ppc_collect_vsxregset): Likewise.
1990 (ppc_collect_vrregset): Likewise.
1991 (ppc_displaced_step_hw_singlestep): Likewise.
1992 (rs6000_pseudo_register_read): Likewise.
1993 (rs6000_pseudo_register_write): Likewise.
1994 * s390-linux-nat.c (supply_gregset): Likewise.
1995 (fill_gregset): Likewise.
1996 (s390_linux_fetch_inferior_registers): Likewise.
1997 * s390-linux-tdep.c (s390_write_pc): Likewise.
1998 (s390_software_single_step): Likewise.
1999 (s390_all_but_pc_registers_record): Likewise.
2000 (s390_linux_syscall_record): Likewise.
2001 * sentinel-frame.c (sentinel_frame_prev_arch): Likewise.
2002 * sh-nbsd-nat.c (shnbsd_fetch_inferior_registers): Likewise.
2003 (shnbsd_store_inferior_registers): Likewise.
2004 * sh-tdep.c (sh_extract_return_value_nofpu): Likewise.
2005 (sh_extract_return_value_fpu): Likewise.
2006 (sh_store_return_value_nofpu): Likewise.
2007 (sh_corefile_supply_regset): Likewise.
2008 (sh_corefile_collect_regset): Likewise.
2009 * sh64-tdep.c (sh64_extract_return_value): Likewise.
2010 (sh64_store_return_value): Likewise.
2011 * sparc-linux-tdep.c (sparc32_linux_collect_core_fpregset): Likewise.
2012 * sparc-nat.c (sparc_fetch_inferior_registers): Likewise.
2013 (sparc_store_inferior_registers): Likewise.
2014 * sparc-ravenscar-thread.c (register_in_thread_descriptor_p): Likewise.
2015 (sparc_ravenscar_prepare_to_store): Likewise.
2016 * sparc-tdep.c (sparc32_store_arguments): Likewise.
2017 (sparc_analyze_control_transfer): Likewise.
2018 (sparc_step_trap): Likewise.
2019 (sparc_software_single_step): Likewise.
2020 (sparc32_gdbarch_init): Likewise.
2021 (sparc_supply_rwindow): Likewise.
2022 (sparc_collect_rwindow): Likewise.
2023 * sparc64-linux-tdep.c (sparc64_linux_collect_core_fpregset): Likewise.
2024 * sparc64-nbsd-nat.c (sparc64nbsd_supply_gregset): Likewise.
2025 (sparc64nbsd_collect_gregset): Likewise.
2026 (sparc64nbsd_supply_fpregset): Likewise.
2027 (sparc64nbsd_collect_fpregset): Likewise.
2028 * sparc64-tdep.c (sparc64_store_arguments): Likewise.
2029 (sparc64_supply_gregset): Likewise.
2030 (sparc64_collect_gregset): Likewise.
2031 (sparc64_supply_fpregset): Likewise.
2032 (sparc64_collect_fpregset): Likewise.
2033 * spu-linux-nat.c (spu_fetch_inferior_registers): Likewise.
2034 * spu-tdep.c (spu_unwind_sp): Likewise.
2035 (spu2ppu_prev_register): Likewise.
2036 (spu_memory_remove_breakpoint): Likewise.
2037 * stack.c (return_command): Likewise.
2038 * tic6x-tdep.c (tic6x_extract_signed_field): Likewise.
2039 * tracefile-tfile.c (tfile_fetch_registers): Likewise.
2040 * tracefile.c (trace_save_ctf): Likewise.
2041 * windows-nat.c (do_windows_fetch_inferior_registers): Likewise.
2042 (do_windows_store_inferior_registers): Likewise.
2043 (windows_resume): Likewise.
2044 * xtensa-linux-nat.c (fill_gregset): Likewise.
2045 (supply_gregset_reg): Likewise.
2046 * xtensa-tdep.c (xtensa_register_write_masked): Likewise.
2047 (xtensa_register_read_masked): Likewise.
2048 (xtensa_supply_gregset): Likewise.
2049 (xtensa_extract_return_value): Likewise.
2050 (xtensa_store_return_value): Likewise.
2051
2052 2017-10-25 Ulrich Weigand <uweigand@de.ibm.com>
2053
2054 * doublest.c (floatformat_from_string): New function.
2055 * doublest.h (floatformat_from_string): Add prototype.
2056
2057 * std-operator.def (OP_DOUBLE, OP_DECFLOAT): Remove, replace by ...
2058 (OP_FLOAT): ... this.
2059 * expression.h: Do not include "doublest.h".
2060 (union exp_element): Replace doubleconst and decfloatconst by
2061 new element floatconst.
2062 * ada-lang.c (resolve_subexp): Handle OP_FLOAT instead of OP_DOUBLE.
2063 (ada_evaluate_subexp): Likewise.
2064 * eval.c (evaluate_subexp_standard): Handle OP_FLOAT instead of
2065 OP_DOUBLE and OP_DECFLOAT.
2066 * expprint.c (print_subexp_standard): Likewise.
2067 (dump_subexp_body_standard): Likewise.
2068 * breakpoint.c (watchpoint_exp_is_const): Likewise.
2069
2070 * parse.c: Include "dfp.h".
2071 (write_exp_elt_dblcst, write_exp_elt_decfloatcst): Remove.
2072 (write_exp_elt_floatcst): New function.
2073 (operator_length_standard): Handle OP_FLOAT instead of OP_DOUBLE
2074 and OP_DECFLOAT.
2075 (operator_check_standard): Likewise.
2076 (parse_float): Do not accept suffix. Take type as input. Return bool.
2077 Return target format buffer instead of host DOUBLEST.
2078 Use floatformat_from_string and decimal_from_string to parse
2079 either binary or decimal floating-point types.
2080 (parse_c_float): Remove.
2081 * parser-defs.h: Do not include "doublest.h".
2082 (write_exp_elt_dblcst, write_exp_elt_decfloatcst): Remove.
2083 (write_exp_elt_floatcst): Add prototype.
2084 (parse_float): Update prototype.
2085 (parse_c_float): Remove.
2086
2087 * c-exp.y: Do not include "dfp.h".
2088 (typed_val_float): Use byte buffer instead of DOUBLEST.
2089 (typed_val_decfloat): Remove.
2090 (DECFLOAT): Remove.
2091 (FLOAT): Use OP_FLOAT and write_exp_elt_floatcst.
2092 (parse_number): Update to new parse_float interface.
2093 Parse suffixes and determine type before calling parse_float.
2094 Handle decimal and binary FP types the same way.
2095
2096 * d-exp.y (typed_val_float): Use byte buffer instead of DOUBLEST.
2097 (FLOAT_LITERAL): Use OP_FLOAT and write_exp_elt_floatcst.
2098 (parse_number): Update to new parse_float interface.
2099 Parse suffixes and determine type before calling parse_float.
2100
2101 * f-exp.y: Replace dval by typed_val_float.
2102 (FLOAT): Use OP_FLOAT and write_exp_elt_floatcst.
2103 (parse_number): Use parse_float instead of atof.
2104
2105 * go-exp.y (typed_val_float): Use byte buffer instead of DOUBLEST.
2106 (parse_go_float): Remove.
2107 (FLOAT): Use OP_FLOAT and write_exp_elt_floatcst.
2108 (parse_number): Call parse_float instead of parse_go_float.
2109 Parse suffixes and determine type before calling parse_float.
2110
2111 * p-exp.y (typed_val_float): Use byte buffer instead of DOUBLEST.
2112 (FLOAT): Use OP_FLOAT and write_exp_elt_floatcst.
2113 (parse_number): Update to new parse_float interface.
2114 Parse suffixes and determine type before calling parse_float.
2115
2116 * m2-exp.y: Replace dval by byte buffer val.
2117 (FLOAT): Use OP_FLOAT and write_exp_elt_floatcst.
2118 (parse_number): Call parse_float instead of atof.
2119
2120 * rust-exp.y (typed_val_float): Use byte buffer instead of DOUBLEST.
2121 (lex_number): Call parse_float instead of strtod.
2122 (ast_dliteral): Use OP_FLOAT instead of OP_DOUBLE.
2123 (convert_ast_to_expression): Handle OP_FLOAT instead of OP_DOUBLE.
2124 Use write_exp_elt_floatcst.
2125 (unit_testing): Remove static variable.
2126 (rust_type): Do not check unit_testing.
2127 (rust_lex_tests): Do not set uint_testing. Set up dummy rust_parser.
2128
2129 * ada-exp.y (type_float, type_double): Remove.
2130 (typed_val_float): Use byte buffer instead of DOUBLEST.
2131 (FLOAT): Use OP_FLOAT and write_exp_elt_floatcst.
2132 * ada-lex.l (processReal): Use parse_float instead of sscanf.
2133
2134 2017-10-25 Alan Hayward <alan.hayward@arm.com>
2135
2136 * aarch64-tdep.h (enum aarch64_regnum): Remove.
2137 * arch/aarch64.h: New file.
2138
2139 2017-10-24 Ulrich Weigand <uweigand@de.ibm.com>
2140
2141 * dfp.h (decimal_from_string): Use const reference for argument.
2142 * dfp.c (decimal_from_string): Likewise.
2143
2144 2017-10-24 Ulrich Weigand <uweigand@de.ibm.com>
2145
2146 * i387-tdep.c (print_i387_value): Use floatformat_to_string.
2147 * sh64-tdep.c (sh64_do_fp_register): Likewise.
2148 * mips-tdep.c (mips_print_fp_register): Likewise.
2149
2150 2017-10-24 Ulrich Weigand <uweigand@de.ibm.com>
2151
2152 * common/format.h (enum argclass): Replace decfloat_arg by
2153 dec32float_arg, dec64float_arg, and dec128float_arg.
2154 * common/format.c (parse_format_string): Update to return
2155 new decimal float argument classes.
2156
2157 * printcmd.c (printf_decfloat): Rename to ...
2158 (printf_floating): ... this. Add argclass argument, and use it
2159 instead of parsing the format string again. Add support for
2160 binary floating-point values, using floatformat_to_string.
2161 Convert value to the target format if it doesn't already match.
2162 (ui_printf): Call printf_floating instead of printf_decfloat,
2163 also for double_arg / long_double_arg. Pass argclass.
2164
2165 * dfp.c (decimal_to_string): Add format string argument.
2166 * dfp.h (decimal_to_string): Likewise.
2167
2168 * doublest.c (floatformat_to_string): Add format string argument.
2169 * doublest.h (floatformat_to_string): Likewise.
2170
2171 2017-10-24 Ulrich Weigand <uweigand@de.ibm.com>
2172
2173 * doublest.c (floatformat_precision): New routine.
2174 (floatformat_to_string): Likewise.
2175 * doublest.c (floatformat_to_string): Add prototype.
2176
2177 * printcmd.c (print_scalar_formatted): Only call print_floating
2178 on floating-point types.
2179 * valprint.c: Do not include "floatformat.h".
2180 (generic_val_print_decfloat): Remove.
2181 (generic_val_print): Call generic_val_print_float for both
2182 TYPE_CODE_FLT and TYPE_CODE_DECFLOAT.
2183 (print_floating): Use floatformat_to_string. Handle decimal float.
2184 (print_decimal_floating): Remove, merge into floatformat_to_string.
2185 * value.h (print_decimal_floating): Remove.
2186
2187 * Makefile.in: Do not build doublest.c with -Wformat-nonliteral.
2188
2189 2017-10-24 Ulrich Weigand <uweigand@de.ibm.com>
2190
2191 * buildsym.c (end_symtab_get_static_block): Use std::stable_sort.
2192
2193 2017-10-21 Simon Marchi <simon.marchi@ericsson.com>
2194
2195 * memattr.h: Don't include vec.h.
2196 (struct mem_attrib): Initialize fields.
2197 <unknown>: New static method.
2198 (struct mem_region): Add constructors, operator<, initialize
2199 fields.
2200 * memattr.c: Include algorithm.
2201 (default_mem_attrib, unknown_mem_attrib): Remove.
2202 (user_mem_region_list): New global.
2203 (target_mem_region_list, mem_region_list): Change type to
2204 std::vector<mem_region>.
2205 (mem_use_target): Now a function.
2206 (target_mem_regions_valid): Change type to bool.
2207 (mem_region_lessthan, mem_region_cmp, mem_region_init): Remove.
2208 (require_user_regions): Adjust.
2209 (require_target_regions): Adjust.
2210 (create_mem_region): Adjust.
2211 (lookup_mem_region): Adjust.
2212 (invalidate_target_mem_regions): Adjust.
2213 (mem_clear): Rename to...
2214 (user_mem_clear): ... this, and adjust.
2215 (mem_command): Adjust.
2216 (info_mem_command): Adjust.
2217 (mem_enable, enable_mem_command, mem_disable,
2218 disable_mem_command): Adjust.
2219 (mem_delete): Adjust.
2220 (delete_mem_command): Adjust.
2221 * memory-map.h (parse_memory_map): Return an std::vector.
2222 * memory-map.c (parse_memory_map): Likewise.
2223 (struct memory_map_parsing_data): Add constructor.
2224 <memory_map>: Point to std::vector.
2225 (memory_map_start_memory): Adjust.
2226 (memory_map_end_memory): Adjust.
2227 (memory_map_end_property): Adjust.
2228 (clear_result): Remove.
2229 * remote.c (remote_memory_map): Return an std::vector.
2230 * target-debug.h (target_debug_print_VEC_mem_region_s__p):
2231 Remove.
2232 (target_debug_print_mem_region_vector): New.
2233 * target-delegates.c: Regenerate.
2234 * target.h (mem_region_vector): New typedef.
2235 (to_memory_map): Return mem_region_vector.
2236 (target_memory_map): Return an std::vector.
2237 * target.c (target_memory_map): Return an std::vector.
2238 (flash_erase_command): Adjust.
2239
2240 2017-10-21 Simon Marchi <simon.marchi@ericsson.com>
2241
2242 * memory-map.c (struct memory_map_parsing_data) <property_name>:
2243 Change type to std::string.
2244 (memory_map_start_property): Adjust.
2245 (memory_map_end_property): Adjust.
2246
2247 2017-10-21 Simon Marchi <simon.marchi@polymtl.ca>
2248
2249 * infrun.h: Include common/byte-vector.h.
2250 (struct displaced_step_closure): New struct.
2251 (struct buf_displaced_step_closure): New struct.
2252 * infrun.c (displaced_step_closure::~displaced_step_closure):
2253 Provide default implementation.
2254 (displaced_step_clear): Deallocate step closure with delete.
2255 * aarch64-tdep.c (displaced_step_closure): Rename to ...
2256 (aarch64_displaced_step_closure): ... this, extend
2257 displaced_step_closure.
2258 (aarch64_displaced_step_data) <dsc>: Change type to
2259 aarch64_displaced_step_closure.
2260 (aarch64_displaced_step_copy_insn): Adjust to type change, use
2261 unique_ptr.
2262 (aarch64_displaced_step_fixup): Add cast for displaced step
2263 closure.
2264 * amd64-tdep.c (displaced_step_closure): Rename to ...
2265 (amd64_displaced_step_closure): ... this, extend
2266 displaced_step_closure.
2267 <insn_buf>: Change type to std::vector<gdb_byte>.
2268 <max_len>: Remove.
2269 (fixup_riprel): Change type of DSC parameter, adjust to type
2270 change of insn_buf.
2271 (fixup_displaced_copy): Change type of DSC parameter.
2272 (amd64_displaced_step_copy_insn): Instantiate
2273 amd64_displaced_step_closure.
2274 (amd64_displaced_step_fixup): Add cast for closure type, adjust
2275 to type change of insn_buf.
2276 * arm-linux-tdep.c (arm_linux_cleanup_svc): Change type of
2277 parameter DSC.
2278 (arm_linux_copy_svc): Likewise.
2279 (cleanup_kernel_helper_return): Likewise.
2280 (arm_catch_kernel_helper_return): Likewise.
2281 (arm_linux_displaced_step_copy_insn): Instantiate
2282 arm_displaced_step_closure.
2283 * arm-tdep.c (arm_pc_is_thumb): Add cast for closure.
2284 (displaced_read_reg): Change type of parameter DSC.
2285 (branch_write_pc): Likewise.
2286 (load_write_pc): Likewise.
2287 (alu_write_pc): Likewise.
2288 (displaced_write_reg): Likewise.
2289 (arm_copy_unmodified): Likewise.
2290 (thumb_copy_unmodified_32bit): Likewise.
2291 (thumb_copy_unmodified_16bit): Likewise.
2292 (cleanup_preload): Likewise.
2293 (install_preload): Likewise.
2294 (arm_copy_preload): Likewise.
2295 (thumb2_copy_preload): Likewise.
2296 (install_preload_reg): Likewise.
2297 (arm_copy_preload_reg): Likewise.
2298 (cleanup_copro_load_store): Likewise.
2299 (install_copro_load_store): Likewise.
2300 (arm_copy_copro_load_store) Likewise.
2301 (thumb2_copy_copro_load_store): Likewise.
2302 (cleanup_branch): Likewise.
2303 (install_b_bl_blx): Likewise.
2304 (arm_copy_b_bl_blx): Likewise.
2305 (thumb2_copy_b_bl_blx): Likewise.
2306 (thumb_copy_b): Likewise.
2307 (install_bx_blx_reg): Likewise.
2308 (arm_copy_bx_blx_reg): Likewise.
2309 (thumb_copy_bx_blx_reg): Likewise.
2310 (cleanup_alu_imm): Likewise.
2311 (arm_copy_alu_imm): Likewise.
2312 (thumb2_copy_alu_imm): Likewise.
2313 (cleanup_alu_reg): Likewise.
2314 (install_alu_reg): Likewise.
2315 (arm_copy_alu_reg): Likewise.
2316 (thumb_copy_alu_reg): Likewise.
2317 (cleanup_alu_shifted_reg): Likewise.
2318 (install_alu_shifted_reg): Likewise.
2319 (arm_copy_alu_shifted_reg): Likewise.
2320 (cleanup_load): Likewise.
2321 (cleanup_store): Likewise.
2322 (arm_copy_extra_ld_st): Likewise.
2323 (install_load_store): Likewise.
2324 (thumb2_copy_load_literal): Likewise.
2325 (thumb2_copy_load_reg_imm): Likewise.
2326 (arm_copy_ldr_str_ldrb_strb): Likewise.
2327 (cleanup_block_load_all): Likewise.
2328 (cleanup_block_store_pc): Likewise.
2329 (cleanup_block_load_pc): Likewise.
2330 (arm_copy_block_xfer): Likewise.
2331 (thumb2_copy_block_xfer): Likewise.
2332 (cleanup_svc): Likewise.
2333 (install_svc): Likewise.
2334 (arm_copy_svc): Likewise.
2335 (thumb_copy_svc): Likewise.
2336 (arm_copy_undef): Likewise.
2337 (thumb_32bit_copy_undef): Likewise.
2338 (arm_copy_unpred): Likewise.
2339 (arm_decode_misc_memhint_neon): Likewise.
2340 (arm_decode_unconditional): Likewise.
2341 (arm_decode_miscellaneous): Likewise.
2342 (arm_decode_dp_misc): Likewise.
2343 (arm_decode_ld_st_word_ubyte): Likewise.
2344 (arm_decode_media): Likewise.
2345 (arm_decode_b_bl_ldmstm): Likewise.
2346 (arm_decode_ext_reg_ld_st): Likewise.
2347 (thumb2_decode_dp_shift_reg): Likewise.
2348 (thumb2_decode_ext_reg_ld_st): Likewise.
2349 (arm_decode_svc_copro): Likewise.
2350 (thumb2_decode_svc_copro): Likewise.
2351 (install_pc_relative): Likewise.
2352 (thumb_copy_pc_relative_16bit): Likewise.
2353 (thumb_decode_pc_relative_16bit): Likewise.
2354 (thumb_copy_pc_relative_32bit): Likewise.
2355 (thumb_copy_16bit_ldr_literal): Likewise.
2356 (thumb_copy_cbnz_cbz): Likewise.
2357 (thumb2_copy_table_branch): Likewise.
2358 (cleanup_pop_pc_16bit_all): Likewise.
2359 (thumb_copy_pop_pc_16bit): Likewise.
2360 (thumb_process_displaced_16bit_insn): Likewise.
2361 (decode_thumb_32bit_ld_mem_hints): Likewise.
2362 (thumb_process_displaced_32bit_insn): Likewise.
2363 (thumb_process_displaced_insn): Likewise.
2364 (arm_process_displaced_insn): Likewise.
2365 (arm_displaced_init_closure): Likewise.
2366 (arm_displaced_step_fixup): Add cast for closure.
2367 * arm-tdep.h: Include infrun.h.
2368 (displaced_step_closure): Rename to ...
2369 (arm_displaced_step_closure): ... this, extend
2370 displaced_step_closure.
2371 <u::svc::copy_svc_os>: Change type of parameter DSC.
2372 <cleanup>: Likewise.
2373 (arm_process_displaced_insn): Likewise.
2374 (arm_displaced_init_closure): Likewise.
2375 (displaced_read_reg): Likewise.
2376 (displaced_write_reg): Likewise.
2377 * i386-linux-tdep.c (i386_linux_displaced_step_copy_insn):
2378 Adjust.
2379 * i386-tdep.h: Include infrun.h.
2380 (i386_displaced_step_closure): New typedef.
2381 * i386-tdep.c (i386_displaced_step_copy_insn): Use
2382 i386_displaced_step_closure.
2383 (i386_displaced_step_fixup): Adjust.
2384 * rs6000-tdep.c (ppc_displaced_step_closure): New typedef.
2385 (ppc_displaced_step_copy_insn): Use ppc_displaced_step_closure
2386 and unique_ptr.
2387 (ppc_displaced_step_fixup): Adjust.
2388 * s390-linux-tdep.c (s390_displaced_step_closure): New typedef.
2389 (s390_displaced_step_copy_insn): Use s390_displaced_step_closure
2390 and unique_ptr.
2391 (s390_displaced_step_fixup): Adjust.
2392
2393 2017-10-21 Simon Marchi <simon.marchi@polymtl.ca>
2394
2395 * interps.h (interp_resume, interp_suspend, interp_set_temp):
2396 Remove declarations.
2397
2398 2017-10-20 Tom Tromey <tom@tromey.com>
2399
2400 * gdb_bfd.c (struct gdb_bfd_data) <included_bfds>: Now a
2401 std::vector.
2402 (gdb_bfd_record_inclusion): Update.
2403 (bfdp): Remove typedef.
2404
2405 2017-10-20 Tom Tromey <tom@tromey.com>
2406
2407 * gdb_bfd.c (gdb_bfd_ref): Use new.
2408 (struct gdb_bfd_data): Add constructor, destructor, and member
2409 initializers.
2410 (gdb_bfd_unref): Use delete.
2411
2412 2017-10-20 Tom Tromey <tom@tromey.com>
2413
2414 * exec.c (exec_file_attach): Use new_bfd_ref.
2415 * symfile-mem.c (symbol_file_add_from_memory): Use new_bfd_ref.
2416 * gdb_bfd.c (gdb_bfd_open, gdb_bfd_fopen, gdb_bfd_openr)
2417 (gdb_bfd_openw, gdb_bfd_openr_iovec, gdb_bfd_fdopenr): Use
2418 new_bfd_ref.
2419 * gdb_bfd.h (new_bfd_ref): New function.
2420
2421 2017-10-20 Pedro Alves <palves@redhat.com>
2422
2423 * main.c (captured_command_loop): Add attribute noinline.
2424
2425 2017-10-19 Simon Marchi <simon.marchi@ericsson.com>
2426
2427 * interps.c (struct interp_factory): Add constructor.
2428 (interp_factory_p): Remove typedef.
2429 (DEF_VEC_P(interp_factory_p)): Remove.
2430 (interpreter_factories): Change type to std::vector.
2431 (interp_factory_register): Adjust.
2432 (interp_lookup): Adjust.
2433 (interpreter_completer): Adjust.
2434
2435 2017-10-19 Tom Tromey <tom@tromey.com>
2436
2437 * break-catch-syscall.c (catch_syscall_completer): Use
2438 std::string, gdb::unique_xmalloc_ptr.
2439
2440 2017-10-19 Tom Tromey <tom@tromey.com>
2441
2442 * infcall.c (call_function_by_hand_dummy): Use std::string.
2443
2444 2017-10-19 Tom Tromey <tom@tromey.com>
2445
2446 * mi/mi-main.c (mi_cmd_execute): Update.
2447 * top.h (prepare_execute_command): Return scoped_value_mark.
2448 * value.h (class scoped_value_mark): Use DISABLE_COPY_AND_ASSIGN.
2449 Add move constructor.
2450 * top.c (prepare_execute_command): Return scoped_value_mark.
2451 (execute_command): Update.
2452
2453 2017-10-19 Pedro Alves <palves@redhat.com>
2454
2455 * xml-support.c (xml_fetch_content_from_file): Check fread's
2456 return.
2457
2458 2017-10-19 Pedro Alves <palves@redhat.com>
2459
2460 * ser-base.c (ser_base_read_error_fd): Delete the file handler if
2461 async.
2462 (handle_error_fd): New function.
2463 (ser_base_async): Add/delete an event loop file handler for
2464 error_fd.
2465
2466 2017-10-19 Pedro Alves <palves@redhat.com>
2467
2468 * xml-support.c (xml_fetch_content_from_file): Don't read in
2469 chunks. Instead use fseek to determine the file's size, and read
2470 it in one go.
2471
2472 2017-11-18 Keith Seitz <keiths@redhat.com>
2473
2474 * c-exp.y (oper): Canonicalize conversion operators of user-defined
2475 types.
2476 Add whitespace to front of type name.
2477
2478 2017-10-18 Keith Seitz <keiths@redhat.com>
2479
2480 * dwarf2read.c (dwarf2_add_typedef): Issue a complaint on unhandled
2481 DW_AT_accessibility.
2482
2483 2017-10-18 Yao Qi <yao.qi@linaro.org>
2484
2485 * features/tic6x-c62x-linux.c: Remove.
2486
2487 2017-10-17 Tom Tromey <tom@tromey.com>
2488
2489 * disasm.c (do_mixed_source_and_assembly_deprecated): Use
2490 gdb::optional, ui_out_emit_list, ui_out_emit_tuple.
2491 (do_mixed_source_and_assembly): Likewise.
2492
2493 2017-10-17 Tom Tromey <tom@tromey.com>
2494
2495 * regcache.c (regcache::xfer_part): Remove assertion.
2496
2497 2017-10-17 Pedro Alves <palves@redhat.com>
2498
2499 * xml-support.c (xml_fetch_content_from_file): Call
2500 unique_ptr::release() instead unique_ptr::get() when passing
2501 through xrealloc.
2502
2503 2017-10-17 Yao Qi <yao.qi@linaro.org>
2504
2505 * regcache.c (regcache::xfer_part): Remove parameters read and
2506 write, add parameter is_raw. All callers are updated.
2507
2508 2017-10-16 Keith Seitz <keiths@redhat.com>
2509
2510 * c-typeprint.c (enum access_specifier): Moved here from
2511 c_type_print_base.
2512 (output_access_specifier): New function.
2513 (c_type_print_base): Consider typedefs when assessing
2514 whether access labels are needed.
2515 Use output_access_specifier as needed.
2516 Output access specifier for typedefs, if needed.
2517 * dwarf2read.c (dwarf2_add_typedef): Record DW_AT_accessibility.
2518 * gdbtypes.h (struct typedef_field) <is_protected, is_private>: New
2519 fields.
2520 (TYPE_TYPEDEF_FIELD_PROTECTED, TYPE_TYPEDEF_FIELD_PRIVATE): New
2521 accessor macros.
2522
2523 2017-10-16 Tom Tromey <tom@tromey.com>
2524
2525 * linux-tdep.c (linux_info_proc, linux_find_memory_regions_full)
2526 (linux_fill_prpsinfo, linux_vsyscall_range_raw): Update.
2527 * target.c (target_fileio_read_stralloc): Update.
2528 * sparc64-tdep.c (adi_is_addr_mapped): Update.
2529 * target.h (target_fileio_read_stralloc): Return
2530 unique_xmalloc_ptr.
2531
2532 2017-10-16 Tom Tromey <tom@tromey.com>
2533
2534 * xml-syscall.c (xml_init_syscalls_info): Update.
2535 * xml-support.c (xinclude_start_include): Update.
2536 (xml_fetch_content_from_file): Return unique_xmalloc_ptr.
2537 * xml-support.h (xml_fetch_another): Return unique_xmalloc_ptr.
2538 (xml_fetch_content_from_file): Likewise.
2539 * osdata.c (get_osdata): Update.
2540 * target.h (target_read_stralloc, target_get_osdata): Return
2541 unique_xmalloc_ptr.
2542 * solib-aix.c (solib_aix_get_library_list): Update.
2543 * solib-target.c (solib_target_current_sos): Update.
2544 * solib-svr4.c (svr4_current_sos_via_xfer_libraries): Update.
2545 * xml-tdesc.c (fetch_available_features_from_target): Update.
2546 (target_fetch_description_xml): Update.
2547 (file_read_description_xml): Update.
2548 * remote.c (remote_get_threads_with_qxfer, remote_memory_map)
2549 (remote_traceframe_info, btrace_read_config, remote_read_btrace)
2550 (remote_pid_to_exec_file): Update.
2551 * target.c (target_read_stralloc): Return unique_xmalloc_ptr.
2552 (target_get_osdata): Likewise.
2553
2554 2017-10-16 Tom Tromey <tom@tromey.com>
2555
2556 * remote.c (remote_register_number_and_offset): Use std::vector.
2557 (remote_set_syscall_catchpoint): Use gdb::unique_xmalloc_ptr.
2558 (putpkt_binary): Use gdb::def_vector.
2559 (compare_sections_command): Use gdb::byte_vector.
2560
2561 2017-10-16 Tom Tromey <tom@tromey.com>
2562
2563 * ppc-linux-nat.c (hwdebug_insert_point): Use
2564 gdb::unique_xmalloc_ptr, XDUP.
2565
2566 2017-10-16 Tom Tromey <tom@tromey.com>
2567
2568 * probe.c (parse_probes): Use std::string.
2569 (info_probes_for_ops, enable_probes_command)
2570 (disable_probes_command): Remove cleanups.
2571
2572 2017-10-16 Tom Tromey <tom@tromey.com>
2573
2574 * buildsym.c (block_compar): Remove.
2575 (end_symtab_get_static_block): Use std::vector.
2576
2577 2017-10-16 Simon Marchi <simon.marchi@ericsson.com>
2578
2579 * memrange.h (struct mem_range): Define operator< and operator==.
2580 (mem_range_s): Remove.
2581 (DEF_VEC_O (mem_range_s)): Remove.
2582 (normalize_mem_ranges): Change parameter type to std::vector.
2583 * memrange.c (compare_mem_ranges): Remove.
2584 (normalize_mem_ranges): Change parameter type to std::vector,
2585 adjust to vector change.
2586 * exec.c (section_table_available_memory): Return vector, remove
2587 parameter.
2588 (section_table_read_available_memory): Adjust to std::vector
2589 change.
2590 * remote.c (remote_read_bytes): Adjust to std::vector
2591 change.
2592 * tracepoint.h (traceframe_available_memory): Change parameter
2593 type to std::vector.
2594 * tracepoint.c (traceframe_available_memory): Change parameter
2595 type to std::vector, adjust.
2596 * gdb/mi/mi-main.c (mi_cmd_trace_frame_collected): Adjust to
2597 std::vector change.
2598 * gdb/Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
2599 unittests/memrange-selftests.c.
2600 (SUBDIR_UNITTESTS_OBS): Add memrange-selftests.o.
2601 * gdb/unittests/memrange-selftests.c: New file.
2602
2603 2017-10-16 Pedro Alves <palves@redhat.com>
2604
2605 * elfread.c (probe_key_free): Rename range-for variable.
2606 * probe.c (parse_probes_in_pspace, find_probes_in_objfile)
2607 (find_probe_by_pc, collect_probes): Rename range-for variable.
2608
2609 2017-10-16 Yao Qi <yao.qi@linaro.org>
2610
2611 * features/Makefile (XMLTOC): Remove tic6x-*.xml.
2612 * features/tic6x-c62x.c: Remove.
2613 * features/tic6x-c64x-linux.c: Remove.
2614 * features/tic6x-c64x.c: Remove.
2615 * features/tic6x-c64xp-linux.c: Remove.
2616 * features/tic6x-c64xp.c: Remove.
2617 * tic6x-linux-tdep.c (_initialize_tic6x_linux_tdep): Don't call
2618 initialize_tdesc_tic6x_*_linux functions.
2619 * tic6x-tdep.c (_initialize_tic6x_tdep): Don't call
2620 initialize_tdesc_tic6x_* functions.
2621
2622 2017-10-16 Yao Qi <yao.qi@linaro.org>
2623
2624 * features/Makefile (WHICH): Remove tic6x-c64xp, tic6x-c64x
2625 tic6x-c62x.
2626 * regformats/tic6x-c62x.dat: Remove.
2627 * regformats/tic6x-c64x.dat: Remove.
2628 * regformats/tic6x-c64xp.dat: Remove.
2629
2630 2017-10-15 Simon Marchi <simon.marchi@ericsson.com>
2631
2632 * tracepoint.c (parse_traceframe_info): Return a unique_ptr
2633 (the !HAVE_LIBEXPAT version).
2634
2635 2017-10-14 Simon Marchi <simon.marchi@ericsson.com>
2636
2637 * nat/linux-osdata.c (struct pid_pgid_entry) <operator<>: Make
2638 const.
2639
2640 2017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
2641
2642 * target.h: Include tracepoint.h.
2643 (enum trace_find_type): Move to tracepoint.h.
2644 (struct target_ops) <to_traceframe_info>: Return a unique ptr.
2645 * tracepoint.h: Don't include target.h
2646 (enum trace_find_type): Move from target.h.
2647 (parse_traceframe_info): Return a unique ptr.
2648 * tracepoint.c (current_traceframe_info): Change type to unique
2649 ptr.
2650 (free_traceframe_info): Remove.
2651 (clear_traceframe_info): Don't manually free
2652 current_traceframe_info.
2653 (free_result): Remove.
2654 (parse_traceframe_info): Return a unique ptr.
2655 (get_traceframe_info): Adjust to unique ptr.
2656 * ctf.c (ctf_traceframe_info): Return a unique ptr.
2657 * remote.c (remote_traceframe_info): Return a unique ptr.
2658 * tracefile-tfile.c (tfile_traceframe_info): Return a unique
2659 ptr.
2660 * target-debug.h (target_debug_print_traceframe_info_up): New
2661 macro.
2662 * target-delegates.c: Regenerate.
2663
2664 2017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
2665
2666 * memrange.h (struct mem_range): Add constructors.
2667 * tracepoint.h (struct traceframe_info) <memory>: Change type to
2668 std::vector<mem_range>.
2669 * tracepoint.c (free_traceframe_info): Don't manually free
2670 vector.
2671 (traceframe_info_start_memory): Adjust to vector change.
2672 (traceframe_available_memory): Likewise.
2673 * tracefile-tfile.c (build_traceframe_info): Likewise.
2674 * ctf.c (ctf_traceframe_info): Likewise.
2675
2676 2017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
2677
2678 * tracepoint.h (struct traceframe_info) <tvars>: Change type to
2679 std::vector<int>.
2680 * tracepoint.c (free_traceframe_info): Deallocate with delete.
2681 (traceframe_info_start_tvar): Adjust to vector change.
2682 (parse_traceframe_info): Allocate with new.
2683 * ctf.c (ctf_traceframe_info): Allocate with new, adjust to
2684 vector change.
2685 * tracefile-tfile.c (build_traceframe_info): Adjust to vector
2686 change.
2687 tfile_traceframe_info): Allocate with new.
2688 * mi/mi-main.c (mi_cmd_trace_frame_collected): Adjust to vector
2689 change.
2690
2691 2017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
2692
2693 * tracepoint.c (traceframe_info): Rename to...
2694 (current_traceframe_info): ...this.
2695 (clear_traceframe_info): Adjust.
2696 (get_traceframe_info): Adjust.
2697
2698 2017-10-14 Simon Marchi <simon.marchi@ericsson.com>
2699
2700 * nat/linux-osdata.c: Include algorithm.
2701 (compare_processes): Remove.
2702 (struct pid_pgid_entry): New struct.
2703 (linux_xfer_osdata_processgroups): Use std::vector instead of
2704 XNEWVEC.
2705
2706 2017-10-14 Simon Marchi <simon.marchi@ericsson.com>
2707
2708 * objfiles.h: Don't include symfile.h.
2709 (struct partial_symbol): Remove forward-declaration.
2710 (struct objfile) <global_psymbols, static_psymbols>: Change type
2711 to std::vector<partial_symbol *>.
2712 * objfiles.c (objfile::objfile): Don't memset those fields.
2713 (objfile::~objfile): Don't free those fields.
2714 * psympriv.h (struct psymbol_allocation_list): Remove
2715 forward-declaration.
2716 (add_psymbol_to_list): Change psymbol_allocation_list parameter
2717 to std::vector.
2718 (start_psymtab_common): Change parameters to std::vector.
2719 * psymtab.c: Include algorithm.
2720 (require_partial_symbols): Call shrink_to_fit.
2721 (find_pc_sect_psymbol): Adjust to vector change.
2722 (match_partial_symbol): Likewise.
2723 (lookup_partial_symbol): Likewise.
2724 (psym_relocate): Likewise.
2725 (dump_psymtab): Likewise.
2726 (recursively_search_psymtabs): Likewise.
2727 (compare_psymbols): Remove.
2728 (sort_pst_symbols): Adjust to vector change.
2729 (start_psymtab_common): Likewise.
2730 (end_psymtab_common): Likewise.
2731 (psymbol_bcache_full): De-constify return value.
2732 (add_psymbol_to_bcache): Likewise.
2733 (extend_psymbol_list): Remove.
2734 (append_psymbol_to_list): Adjust to vector change.
2735 (add_psymbol_to_list): Likewise.
2736 (init_psymbol_list): Likewise.
2737 (maintenance_info_psymtabs): Likewise.
2738 (maintenance_check_psymtabs): Likewise.
2739 * symfile.h (struct psymbol_allocation_list): Remove.
2740 * symfile.c (reread_symbols): Adjust to vector change.
2741 * dbxread.c (start_psymtab): Change type of parameters.
2742 (dbx_symfile_read): Adjust to vector change.
2743 (read_dbx_symtab): Likewise.
2744 (start_psymtab): Change type of parameters.
2745 * dwarf2read.c (dwarf2_build_psymtabs): Adjust to vector change.
2746 (create_partial_symtab): Likewise.
2747 (add_partial_symbol): Likewise.
2748 (write_one_signatured_type): Likewise.
2749 (recursively_write_psymbols): Likewise.
2750 * mdebugread.c (parse_partial_symbols): Likewise.
2751 * xcoffread.c (xcoff_start_psymtab): Change type of parameters.
2752 (scan_xcoff_symtab): Adjust to vector change.
2753 (xcoff_initial_scan): Likewise.
2754
2755 2017-10-13 Simon Marchi <simon.marchi@ericsson.com>
2756
2757 * ada-typeprint.c (print_dynamic_range_bound): Use std::string.
2758
2759 2017-10-13 Yao Qi <yao.qi@linaro.org>
2760
2761 * features/Makefile: Remove tic6x-*-expedite, add tic6x-expedite.
2762 Remove s390x-*-expedite, add s390x-expedite.
2763
2764 2017-10-13 Yao Qi <yao.qi@linaro.org>
2765
2766 * features/s390-gs-linux64.c: Regenerated.
2767 * features/s390x-gs-linux64.c: Regenerated.
2768
2769 2017-10-13 Tom Tromey <tom@tromey.com>
2770
2771 * compile/compile-object-run.c (do_module_cleanup): Use delete.
2772 * solib.c (update_solib_list, reload_shared_libraries_1): Use
2773 delete.
2774 * symfile.c (symbol_file_add_with_addrs): Use new.
2775 (symbol_file_add_separate): Update comment.
2776 (syms_from_objfile_1, remove_symbol_file_command): Use delete.
2777 * jit.c (jit_object_close_impl): Use new.
2778 (jit_unregister_code): Use delete.
2779 * objfiles.c (objfile::objfile): Rename from allocate_objfile.
2780 (~objfile): Rename from free_objfile.
2781 (free_objfile_separate_debug, do_free_objfile_cleanup)
2782 (free_all_objfiles, objfile_purge_solibs): Use delete.
2783 * objfiles.h (struct objfile): Add constructor and destructor.
2784 Use DISABLE_COPY_AND_ASSIGN. Add initializers to data members.
2785 (allocate_objfile, free_objfile): Don't declare.
2786 (struct objstats): Add initializers.
2787
2788 2017-10-12 Simon Marchi <simon.marchi@ericsson.com>
2789
2790 * arch-utils.h (simple_displaced_step_copy_insn): Remove.
2791 * arch-utils.c (simple_displaced_step_copy_insn): Remove.
2792 * gdbarch.sh (displaced_step_copy_insn): Adjust comment.
2793 * gdbarch.h: Regenerate.
2794 * i386-linux-tdep.c (i386_linux_displaced_step_copy_insn):
2795 Adjust comment.
2796 * i386-tdep.c (i386_displaced_step_copy_insn): Adjust comment.
2797 (i386_displaced_step_fixup): Adjust comment.
2798 * rs6000-tdep.c (ppc_displaced_step_copy_insn): Adjust comment.
2799
2800 2017-10-12 Tom Tromey <tom@tromey.com>
2801
2802 * prologue-value.h (pv_area::store_would_trash): Return bool.
2803 (pv_area::find_reg): Likewise.
2804 * prologue-value.c (pv_area::store_would_trash): Return bool.
2805 (pv_area::find_reg): Likewise.
2806
2807 2017-10-12 Tom Tromey <tom@tromey.com>
2808
2809 * s390-linux-tdep.c (s390_store, s390_load)
2810 (s390_check_for_saved, s390_analyze_prologue): Update.
2811 * rx-tdep.c (check_for_saved, rx_analyze_prologue): Update.
2812 * rl78-tdep.c (rl78_analyze_prologue, check_for_saved): Update.
2813 * prologue-value.h (class pv_area): Move from prologue-value.c.
2814 Change names of members. Add constructor, destructor, member
2815 functions.
2816 (make_pv_area, free_pv_area, make_cleanup_free_pv_area)
2817 (pv_area_store, pv_area_fetch, pv_area_store_would_trash)
2818 (pv_area_fetch, pv_area_scan): Don't declare.
2819 * prologue-value.c (struct pv_area::area_entry): Now member of
2820 pv_area.
2821 (struct pv_area): Move to prologue-value.h.
2822 (pv_area::pv_area): Rename from make_pv_area.
2823 (pv_area::~pv_area): Rename from free_pv_area.
2824 (do_free_pv_area_cleanup, make_cleanup_free_pv_area): Remove.
2825 (clear_entries, find_entry, overlaps, store_would_trash, store)
2826 (fetch, find_reg, scan): Now member of pv_area.
2827 Remove "area" argument. Update.
2828 * msp430-tdep.c (check_for_saved, msp430_analyze_prologue):
2829 Update.
2830 * mn10300-tdep.c (push_reg, check_for_saved)
2831 (mn10300_analyze_prologue): Update.
2832 * mep-tdep.c (is_arg_spill, check_for_saved)
2833 (mep_analyze_prologue): Update.
2834 * m32c-tdep.c (m32c_pv_push, m32c_srcdest_fetch)
2835 (m32c_srcdest_store, m32c_pv_enter, m32c_is_arg_spill)
2836 (m32c_is_struct_return, m32c_analyze_prologue): Update.
2837 * arm-tdep.c (thumb_analyze_prologue, arm_analyze_prologue):
2838 Update.
2839 * arc-tdep.c (arc_is_in_prologue, arc_analyze_prologue): Update.
2840 * aarch64-tdep.c (aarch64_analyze_prologue): Update.
2841
2842 2017-10-12 Simon Marchi <simon.marchi@ericsson.com>
2843
2844 * linux-nat.h (linux_nat_set_delete_thread): New declaration.
2845 * linux-nat.c (linux_nat_delete_thread): New variable.
2846 (lwp_free): Invoke linux_nat_delete_thread if set.
2847 (linux_nat_set_delete_thread): New function.
2848 * aarch64-linux-nat.c (_initialize_aarch64_linux_nat): Assign
2849 thread delete callback.
2850 * arm-linux-nat.c (arm_linux_delete_thread): New function.
2851 (_initialize_arm_linux_nat): Assign thread delete callback.
2852 * s390-linux-nat.c (s390_delete_thread): New function.
2853 (_initialize_s390_nat): Assign thread delete callback.
2854 * x86-linux-nat.c (x86_linux_add_target): Likewise.
2855 * nat/aarch64-linux.c (aarch64_linux_delete_thread): New
2856 function.
2857 * nat/aarch64-linux.h (aarch64_linux_delete_thread): New
2858 declaration.
2859 * nat/x86-linux.c (x86_linux_delete_thread): New function.
2860 * nat/x86-linux.h (x86_linux_delete_thread): New declaration.
2861
2862 2017-10-09 Tom Tromey <tom@tromey.com>
2863
2864 * tui/tui-win.c (tui_set_win_height, parse_scrolling_args): Use
2865 std::string.
2866 * tui/tui-layout.c (enum tui_status): Use std::string.
2867
2868 2017-10-11 Tom Tromey <tom@tromey.com>
2869
2870 * gdbthread.h (thread_command): Constify.
2871 * inferior.h (detach_command): Constify.
2872 * top.h (set_history, show_history): Constify.
2873 * arm-tdep.c (set_arm_command, show_arm_command): Constify.
2874 * serial.c (serial_set_cmd, serial_show_cmd): Constify.
2875 * bsd-kvm.c (bsd_kvm_cmd): Constify.
2876 * printcmd.c (set_command): Constify.
2877 (non_const_set_command): New function.
2878 * dcache.c (set_dcache_command, show_dcache_command): Constify.
2879 * breakpoint.c (enable_command, disable_command, delete_command)
2880 (catch_command, tcatch_command, set_breakpoint_cmd)
2881 (show_breakpoint_cmd): Constify.
2882 * macrocmd.c (macro_command): Constify.
2883 * infcmd.c (unset_command, kill_command, detach_command)
2884 (info_proc_cmd): Constify.
2885 * i386-tdep.c (set_mpx_cmd, show_mpx_cmd): Constify.
2886 * auto-load.c (show_auto_load_cmd, set_auto_load_cmd)
2887 (info_auto_load_cmd): Constify.
2888 * target-descriptions.c (set_tdesc_cmd, show_tdesc_cmd)
2889 (unset_tdesc_cmd): Constify.
2890 * ada-lang.c (set_ada_command, show_ada_command)
2891 (maint_set_ada_cmd, maint_show_ada_cmd): Constify.
2892 * guile/guile.c (set_guile_command, show_guile_command)
2893 (info_guile_command): Constify.
2894 * tui/tui-win.c (tui_command, set_tui_cmd, show_tui_cmd):
2895 Constify.
2896 * skip.c (skip_command): Constify.
2897 * compile/compile.c (_initialize_compile): Constify.
2898 * dwarf2read.c (set_dwarf_cmd, show_dwarf_cmd): Constify.
2899 * btrace.c (maint_btrace_cmd, maint_btrace_set_cmd)
2900 (maint_btrace_show_cmd, maint_btrace_pt_set_cmd)
2901 (maint_btrace_pt_show_cmd): Constify.
2902 * remote.c (set_remote_cmd, show_remote_cmd, remote_command):
2903 Constify.
2904 * python/python.c (user_show_python, user_set_python): Constify.
2905 * mips-tdep.c (set_mips_command, show_mips_command)
2906 (set_mipsfpu_command): Constify.
2907 * record-btrace.c (cmd_record_btrace_start)
2908 (cmd_set_record_btrace, cmd_show_record_btrace)
2909 (cmd_set_record_btrace_bts, cmd_show_record_btrace_bts)
2910 (cmd_set_record_btrace_pt, cmd_show_record_btrace_pt): Constify.
2911 * rs6000-tdep.c (set_powerpc_command, show_powerpc_command):
2912 Constify.
2913 * symfile.c (overlay_command): Constify.
2914 * spu-tdep.c (set_spu_command, show_spu_command): Constify.
2915 * cli/cli-logging.c (set_logging_command, show_logging_command):
2916 Constify.
2917 * cli/cli-dump.c (dump_command, append_command)
2918 (srec_dump_command, ihex_dump_command, verilog_dump_command)
2919 (tekhex_dump_command, binary_dump_command)
2920 (binary_append_command): Constify.
2921 * cli/cli-decode.c (struct cmd_list_element): Change type of
2922 "fun".
2923 * cli/cli-cmds.c (info_command, show_command, set_debug)
2924 (show_debug): Constify.
2925 (show_command): Add non-const overload.
2926 * top.c (set_history, show_history): Constify.
2927 * sh-tdep.c (set_sh_command, show_sh_command): Constify.
2928 * command.h (add_prefix_cmd): Accept a cmd_const_cfunc_ftype.
2929 * target.c (target_command): Constify.
2930 * sparc64-tdep.c (info_adi_command): Constify.
2931 * record-full.c (cmd_record_full_start): Constify.
2932 (set_record_full_command): Constify. Fix typo.
2933 (show_record_full_command): Constify.
2934 * thread.c (thread_command, thread_apply_command): Constify.
2935 * memattr.c (dummy_cmd): Constify.
2936 * value.c (function_command): Constify.
2937 * frame.c (set_backtrace_cmd, show_backtrace_cmd): Constify.
2938 * probe.c (info_probes_command): Constify.
2939 * ser-tcp.c (set_tcp_cmd, show_tcp_cmd): Constify.
2940 * gnu-nat.c (set_task_cmd, show_task_cmd, set_thread_cmd)
2941 (show_thread_cmd, set_thread_default_cmd)
2942 (show_thread_default_cmd): Constify.
2943 (check_empty): Constify.
2944 * tracepoint.c (tfind_command): Constify.
2945 * cp-support.c (maint_cplus_command): Constify.
2946 * windows-tdep.c (info_w32_command): Constify.
2947 * record.c (cmd_record_start, set_record_command)
2948 (show_record_command, info_record_command, cmd_record_goto):
2949 Constify.
2950 * ravenscar-thread.c (set_ravenscar_command)
2951 (show_ravenscar_command): Constify.
2952 * utils.c (set_internal_problem_cmd, show_internal_problem_cmd):
2953 Constify.
2954 (add_internal_problem_command): Remove casts.
2955 * arc-tdep.c (maintenance_print_arc_command): Constify.
2956 * valprint.c (set_print, show_print, set_print_raw)
2957 (show_print_raw): Constify.
2958 * maint.c (maintenance_command, maintenance_info_command)
2959 (maintenance_print_command, maintenance_set_cmd)
2960 (maintenance_show_cmd, set_per_command_cmd)
2961 (show_per_command_cmd, maintenance_check_command): Constify.
2962 * language.c (set_check, show_check): Constify.
2963 * typeprint.c (show_print_type, set_print_type): Constify.
2964 * go32-nat.c (go32_info_dos_command): Constify.
2965
2966 2017-10-11 Tom Tromey <tom@tromey.com>
2967
2968 * breakpoint.c (prepare_re_set_context): Remove.
2969 (breakpoint_re_set_one): Update. Don't use cleanups.
2970 (breakpoint_re_set): Use scoped_restore, std::string, and
2971 scoped_restore_current_language.
2972
2973 2017-10-11 Tom Tromey <tom@tromey.com>
2974
2975 * breakpoint.c (commands_command_1): Use std::string.
2976 (cleanup_executing_breakpoints): Remove.
2977 (bpstat_do_actions_1): Use scoped_restore.
2978 (bpstat_check_watchpoint): Use std::string.
2979 (decode_static_tracepoint_spec): Likewise.
2980 (break_range_command): Likewise.
2981 (watch_command_1): Likewise.
2982 (compare_breakpoints): Change argument types.
2983 (clear_command): Use std::vector.
2984 (cleanup_executing_breakpoints): Remove.
2985 (update_global_location_list): Use unique_xmalloc_ptr.
2986 (strace_command): Remove unused declaration.
2987
2988 2017-10-11 John Baldwin <jhb@FreeBSD.org>
2989
2990 * Makefile.in (ALLDEPFILES): Add arm-fbsd-nat.c.
2991 * NEWS: Mention new FreeBSD/arm native configuration.
2992 * configure.host: Add arm*-*-freebsd*.
2993 * configure.nat: Likewise.
2994 * arm-fbsd-nat.c: New file.
2995
2996 2017-10-11 John Baldwin <jhb@FreeBSD.org>
2997
2998 * Makefile.in (ALL_TARGET_OBS): Add arm-fbsd-tdep.o.
2999 (ALLDEPFILES): Add arm-fbsd-tdep.c.
3000 * NEWS: Mention new FreeBSD/arm target.
3001 * configure.tgt: Add arm*-*-freebsd*.
3002 * arm-fbsd-tdep.c: New file.
3003 * arm-fbsd-tdep.h: New file.
3004
3005 2017-10-11 Maciej W. Rozycki <macro@imgtec.com>
3006
3007 * linux-tdep.c (linux_make_corefile_notes): Remove call to
3008 `gdbarch_elfcore_write_linux_prpsinfo'.
3009 * gdbarch.sh (elfcore_write_linux_prpsinfo): Remove architecture
3010 method.
3011 (elf_internal_linux_prpsinfo): Remove declaration.
3012 * gdbarch.h: Regenerate.
3013 * gdbarch.c: Regenerate.
3014
3015 2017-10-11 Maciej W. Rozycki <macro@imgtec.com>
3016
3017 * ppc-linux-tdep.c (ppc_linux_init_abi): Remove call to
3018 `set_gdbarch_elfcore_write_linux_prpsinfo'.
3019
3020 2017-10-11 Pedro Alves <palves@redhat.com>
3021
3022 * breakpoint.c (reattach_breakpoints): Delete.
3023 * breakpoint.h (reattach_breakpoints): Delete.
3024
3025 2017-10-11 Simon Marchi <simon.marchi@ericsson.com>
3026
3027 * symfile.c (registered_sym_fns): Make struct, not typedef.
3028 (DEF_VEC_O (registered_sym_fns)): Remove.
3029 (symtab_fns): Change type to std::vector.
3030 (add_symtab_fns): Adjust.
3031 (find_sym_fns): Adjust.
3032
3033 2017-10-11 Anton Kolesov <Anton.Kolesov@synopsys.com>
3034
3035 * arc-tdep.c (arc_gdbarch_init): Pass proper cpu value to disassembler.
3036 * arc-tdep.h (arc_arch_is_em): New function.
3037 (arc_arch_is_hs): Likewise.
3038
3039 2017-10-11 Egeyar Bagcioglu <egeyar.bagcioglu@oracle.com>
3040
3041 * macrotab.h (macro_lookup_inclusion): Remove unnecessary
3042 parentheses in the declaration.
3043 (macro_lookup_inclusion): Likewise.
3044 (macro_lookup_definition): Likewise.
3045 * p-lang.h (pascal_builtin_types): Likewise.
3046 * tui/tui-data.c (tui_win_list): Likewise.
3047 * tui/tui-data.h (tui_win_list): Likewise.
3048 * utils.h (make_cleanup_free_section_addr_info): Likewise.
3049
3050 2017-10-11 Mark Rages <markrages@gmail.com>
3051
3052 * target-memory.c (block_boundaries): Fix for block address not
3053 aligned on block size.
3054
3055 2017-10-10 Pedro Alves <palves@redhat.com>
3056 Tom Tromey <tom@tromey.com>
3057
3058 * breakpoint.c (struct captured_breakpoint_query_args)
3059 (do_captured_breakpoint_query, gdb_breakpoint_query): Delete.
3060 (print_breakpoint): New.
3061 * breakpoint.h (print_breakpoint): Declare.
3062 * common/common-exceptions.h (enum return_reason): Remove
3063 references to catch_exceptions.
3064 * exceptions.c (catch_exceptions, catch_exceptions_with_msg):
3065 Delete.
3066 * exceptions.h (catch_exceptions_ftype, catch_exceptions)
3067 (catch_exception_ftype, catch_exceptions_with_msg): Delete.
3068 * gdb.h: Delete.
3069 * gdbthread.h (thread_select): Declare.
3070 * mi/mi-cmd-break.c: Don't include gdb.h.
3071 (breakpoint_notify): Use print_breakpoint.
3072 * mi/mi-cmd-catch.c: Don't include gdb.h.
3073 * mi/mi-interp.c: Don't include gdb.h.
3074 (mi_print_breakpoint_for_event): New.
3075 (mi_breakpoint_created, mi_breakpoint_modified): Use
3076 mi_print_breakpoint_for_event.
3077 * mi/mi-main.c: Don't include gdb.h.
3078 (mi_cmd_thread_select): Parse the global thread ID here. Use
3079 thread_select instead of gdb_thread_select.
3080 (mi_cmd_thread_list_ids): Output "thread-ids" tuple here instead
3081 of using gdb_list_thread_ids.
3082 * remote-fileio.c (do_remote_fileio_request): Change type. Reply
3083 FILEIO_ENOSYS here.
3084 (remote_fileio_request): Use TRY/CATCH instead of
3085 catch_exceptions.
3086 * symfile-mem.c (struct symbol_file_add_from_memory_args)
3087 (symbol_file_add_from_memory_wrapper): Delete.
3088 (add_vsyscall_page): Use TRY/CATCH instead of catch_exceptions.
3089 * thread.c: Don't include gdb.h.
3090 (do_captured_list_thread_ids, gdb_list_thread_ids): Delete.
3091 (thread_alive): Use thread_select.
3092 (do_captured_thread_select): Delete, parts salvaged as ...
3093 (thread_select): ... this new function.
3094 (gdb_thread_select): Delete.
3095
3096 2017-10-10 Pedro Alves <palves@redhat.com>
3097 Tom Tromey <tom@tromey.com>
3098
3099 * breakpoint.c (breakpoint_cond_eval): Change return type to bool
3100 and reverse logic.
3101 (WP_DELETED, WP_VALUE_CHANGED, WP_VALUE_NOT_CHANGED, WP_IGNORE):
3102 No longer macros. Instead ...
3103 (enum wp_check_result): They're now values of this new
3104 enumeration.
3105 (watchpoint_check): Change return type to wp_check_result and
3106 parameter type to bpstat.
3107 (bpstat_check_watchpoint): Use TRY/CATCH instead of catch_errors.
3108 (bpstat_check_breakpoint_conditions): Use TRY/CATCH instead of
3109 catch_errors. Reverse logic of watchpoint_check call.
3110 (breakpoint_re_set_one): Now returns void and takes a breakpoint
3111 pointer as parameter.
3112 (breakpoint_re_set): Use TRY/CATCH instead of catch_errors.
3113 * common/common-exceptions.c (throw_exception_sjlj): Update
3114 comments to avoid mentioning catch_errors.
3115 * exceptions.c (catch_errors): Delete.
3116 * exceptions.h: Update comments to avoid mentioning catch_errors.
3117 (catch_errors_ftype, catch_errors): Delete.
3118 * infrun.c (normal_stop): Use TRY/CATCH instead of catch_errors.
3119 (hook_stop_stub): Delete.
3120 (restore_selected_frame): Change return type to void, and
3121 parameter type to const frame_id &.
3122 (restore_infcall_control_state): Use TRY/CATCH instead of
3123 catch_errors.
3124 * main.c (captured_command_loop): Return void and remove
3125 parameter. Remove references to catch_errors.
3126 (captured_main): Use TRY/CATCH instead of catch_errors.
3127 * objc-lang.c (objc_submethod_helper_data)
3128 (find_objc_msgcall_submethod_helper): Delete.
3129 (find_objc_msgcall_submethod): Use TRY/CATCH instead of
3130 catch_errors.
3131 * record-full.c (record_full_message): Return void.
3132 (record_full_message_args, record_full_message_wrapper): Delete.
3133 (record_full_message_wrapper_safe): Return bool and use TRY/CATCH
3134 instead of catch_errors.
3135 * solib-aix.c (solib_aix_open_symbol_file_object): Change
3136 parameter type to int.
3137 * solib-darwin.c (open_symbol_file_object): Ditto.
3138 * solib-dsbt.c (open_symbol_file_object): Ditto.
3139 * solib-frv.c (open_symbol_file_object): Ditto.
3140 * solib-svr4.c (open_symbol_file_object): Ditto.
3141 * solib-target.c (solib_target_open_symbol_file_object): Ditto.
3142 * solib.c (update_solib_list): Use TRY/CATCH instead of
3143 catch_errors.
3144 * solist.h (struct target_so_ops) <open_symbol_file_object>:
3145 Change type.
3146 * symmisc.c (struct print_symbol_args): Remove.
3147 (dump_symtab_1): Use TRY/CATCH instead of catch_errors.
3148 (print_symbol): Change type.
3149 * windows-nat.c (handle_load_dll, handle_unload_dll): Return void
3150 and remove parameters.
3151 (catch_errors): New.
3152 (get_windows_debug_event): Adjust.
3153
3154 2017-10-09 Tom Tromey <tom@tromey.com>
3155
3156 * mi/mi-main.c (free_splay_tree): Remove.
3157 (list_available_thread_groups): Use splay_tree_up.
3158 * common/gdb_splay_tree.h: New file.
3159
3160 2017-10-09 Tom Tromey <tom@tromey.com>
3161
3162 * mi/mi-main.c (do_nothing): Remove.
3163 (list_available_thread_groups): Update.
3164
3165 2017-10-09 Pedro Alves <palves@redhat.com>
3166
3167 * infrun.c (handle_inferior_event_1) <TARGET_WAITKIND_EXECD>: Skip
3168 reading registers when switching context.
3169
3170 2017-10-09 John Baldwin <jhb@FreeBSD.org>
3171
3172 * fbsd-nat.c (fbsd_siginfo_size): Use gdbarch_long_bit.
3173 (fbsd_convert_siginfo): Likewise.
3174 * fbsd-tdep.c (fbsd_core_xfer_siginfo): Likewise.
3175
3176 2017-10-09 Simon Marchi <simon.marchi@polymtl.ca>
3177
3178 * configure.ac (try_guile_versions): Remove guile-2.2.
3179 * configure: Regenerate.
3180
3181 2017-10-09 Tom Tromey <tom@tromey.com>
3182
3183 * Makefile.in (COMPILE.post, POSTCOMPILE): Restore $(basename).
3184 (COMPILE.pre): Use $(CXX).
3185
3186 2017-10-09 Pedro Alves <palves@redhat.com>
3187
3188 * cp-support.c (cp_remove_params): Return a gdb::unique_xmalloc_ptr.
3189 Use bool.
3190 (overload_list_add_symbol): Adjust to use gdb::unique_xmalloc_ptr.
3191 * cp-support.h (cp_remove_params): Now returns a
3192 gdb::unique_xmalloc_ptr.
3193 * dwarf2read.c (find_slot_in_mapped_hash): Now returns bool.
3194 Adjust to cp_remove_params returning a gdb::unique_xmalloc_ptr.
3195 * psymtab.c (psymtab_search_name): Adjust to cp_remove_params
3196 returning a gdb::unique_xmalloc_ptr.
3197 (lookup_partial_symbol): Adjust to use gdb::unique_xmalloc_ptr.
3198 * stack.c (find_frame_funname): Adjust to cp_remove_params
3199 returning a gdb::unique_xmalloc_ptr.
3200
3201 2017-10-08 Tom Tromey <tom@tromey.com>
3202
3203 * dwarf2read.c (dwarf2_get_dwz_file): Use
3204 gdb::unique_xmalloc_ptr.
3205 (find_slot_in_mapped_hash): Likewise.
3206 (dwarf2_physname): Likewise.
3207 (create_dwo_unit_in_dwp_v1): Use std::string.
3208 (create_dwo_unit_in_dwp_v2): Likewise.
3209 (lookup_dwo_cutu): Likewise.
3210 (inherit_abstract_dies): Use std::vector.
3211 (read_array_type): Likewise.
3212 (dwarf_decode_macros): Remove unused declaration.
3213 (unsigned_int_compar): Remove.
3214 (dwarf2_build_psymtabs_hard): Use scoped_restore.
3215 (psymtabs_addrmap_cleanup): Remove.
3216
3217 2017-10-08 Tom Tromey <tom@tromey.com>
3218
3219 * frame-unwind.c (frame_unwind_try_unwinder): Update.
3220 * frame.h (frame_cleanup_after_sniffer): Declare.
3221 (frame_prepare_for_sniffer): Return void.
3222 * frame.c (frame_cleanup_after_sniffer): No longer static. Change
3223 type of argument.
3224 (frame_prepare_for_sniffer): Return void.
3225
3226 2017-10-08 Tom Tromey <tom@tromey.com>
3227
3228 * utils.h (make_cleanup_value_free): Remove.
3229 * utils.c (do_value_free, struct cleanup): Remove.
3230 * dwarf2loc.c (dwarf2_evaluate_loc_desc_full) <DWARF_VALUE_STACK>:
3231 Use gdb_value_up.
3232 * value.h (struct value_deleter): New.
3233 (gdb_value_up): New typedef.
3234
3235 2017-10-08 Tom Tromey <tom@tromey.com>
3236
3237 * symtab.c (free_search_symbols, do_free_search_symbols_cleanup)
3238 (make_cleanup_free_search_symbols): Remove.
3239 (search_symbols): Return std::vector.
3240 (symbol_search::compare_search_syms): Now member of
3241 symbol_search. Change arguments.
3242 (sort_search_symbols_remove_dups): Change arguments. Rewrite.
3243 (symtab_symbol_info, rbreak_command): Update.
3244 * symtab.h (struct symbol_search) <next>: Remove.
3245 Add constructors.
3246 (symbol_search::operator<): New function.
3247 (symbol_search::operator==): New function.
3248 (search_symbols): Remove std::vector.
3249 (free_search_symbols, make_cleanup_free_search_symbols): Remove.
3250 (symbol_search::compare_search_syms): Declare.
3251
3252 2017-10-06 Yao Qi <yao.qi@linaro.org>
3253
3254 * Makefile.in (ALL_64_TARGET_OBS): Replace aarch64-insn.o with
3255 arch/aarch64-insn.o.
3256 Remove one rule.
3257 * configure.tgt: Replace aarch64-insn.o with arch/aarch64-insn.o.
3258
3259 2017-10-06 Yao Qi <yao.qi@linaro.org>
3260
3261 * Makefile.in (ALL_TARGET_OBS): Replace arm.o, arm-get-next-pcs.o,
3262 and arm-linux.o with arch/arm.o, arch/arm-get-next-pcs.o and
3263 arch/arm-linux.o respectively.
3264 * configure.tgt: Likewise.
3265
3266 2017-10-06 Yao Qi <yao.qi@linaro.org>
3267
3268 * Makefile.in (ALL_TARGET_OBS): Rename i386.o to arch/i386.o.
3269 * configure.tgt (i386_tobjs): Replace i386.o with arch/i386.o.
3270
3271 2017-10-06 Pedro Alves <palves@redhat.com>
3272
3273 * windows-nat.c: Include <algorithm>.
3274
3275 2017-10-06 Yao Qi <yao.qi@linaro.org>
3276
3277 * configure.tgt (i386_tobjs): New variable.
3278 (amd64_tobjs): New variable.
3279 Set $cpu_obs and $os_obs.
3280
3281 2017-10-06 Yao Qi <yao.qi@linaro.org>
3282
3283 * Makefile.in (CONFIG_SRC_SUBDIR): New.
3284 (ALL_64_TARGET_OBS): Replace amd64.o with arch/amd64.o.
3285 (clean): Remove object files and dependency files.
3286 (distclean): Remove the directory.
3287 * configure.ac: Invoke AC_CONFIG_COMMANDS.
3288 * configure: Re-generated.
3289 * configure.tgt: Replace amd64.o with arch/amd64.o.
3290
3291 2017-10-05 Jose E. Marchesi <jose.marchesi@oracle.com>
3292
3293 PR build/22188
3294 * arm-tdep.c (arm_decode_misc_memhint_neon): Fix decoding of CPS
3295 and SETEND.
3296
3297 2017-10-05 Pedro Alves <palves@redhat.com>
3298
3299 * linux-nat.c (linux_child_follow_fork): When following the parent
3300 and detaching the child, consult the parent thread's architecture
3301 instead of the child's.
3302
3303 2017-10-05 Ulrich Weigand <uweigand@de.ibm.com>
3304
3305 * ax.h: Do not include "doublest.h".
3306 (union agent_val): Remove.
3307
3308 2017-10-05 Ulrich Weigand <uweigand@de.ibm.com>
3309
3310 * dfp.h (MAX_DECIMAL_STRING): Move to dfp.c.
3311 (decimal_to_string): Return std::string object.
3312 (decimal_from_string): Accept std::string object. Return bool.
3313 (decimal_from_integral, decimal_from_doublest): Remove.
3314 (decimal_from_longest): Add prototype.
3315 (decimal_from_ulongest): Likewise.
3316 (decimal_to_longest): Likewise.
3317 (decimal_from_doublest): Likewise.
3318 * dfp.c: Do not include "gdbtypes.h" or "value.h".
3319 (MAX_DECIMAL_STRING): Move here.
3320 (decimal_to_string): Return std::string object.
3321 (decimal_from_string): Accept std::string object. Return bool.
3322 (decimal_from_integral): Remove, replace by ...
3323 (decimal_from_longest, decimal_from_ulongest): ... these new functions.
3324 (decimal_to_longest): New function.
3325 (decimal_from_floating): Remove, replace by ...
3326 (decimal_from_doublest): ... this new function.
3327 (decimal_to_doublest): Update to new decimal_to_string interface.
3328
3329 * value.c (unpack_long): Use decimal_to_longest.
3330 * valops.c (value_cast): Use decimal_from_doublest instead of
3331 decimal_from_floating. Use decimal_from_[u]longest isntead of
3332 decimal_from_integral.
3333 * valarith.c (value_args_as_decimal): Likewise.
3334 * valprint.c (print_decimal_floating): Update to new
3335 decimal_to_string interface.
3336 * printcmd.c (printf_decfloat): Likewise.
3337 * c-exp.y (parse_number): Update to new decimal_from_string interface.
3338
3339 2017-10-05 Ulrich Weigand <uweigand@de.ibm.com>
3340
3341 * doublest.h: Do not include "floatformat.h". Remove stale comments.
3342 * gdbtypes.c: Include "floatformat.h".
3343 * value.c: Likewise.
3344 * m68k-tdep.c: Likewise.
3345
3346 * findvar.c: Do not include "floatformat.h".
3347 * amd64-darwin-tdep.c: Likewise.
3348 * arm-linux-tdep.c: Likewise.
3349 * i386-darwin-tdep.c: Likewise.
3350 * i387-tdep.c: Likewise.
3351 * m68k-linux-tdep.c: Likewise.
3352 * mep-tdep.c: Likewise.
3353 * mips-tdep.c: Likewise.
3354 * nios2-tdep.c: Likewise.
3355 * s390-linux-tdep.c: Likewise.
3356 * sparc-obsd-tdep.c: Likewise.
3357 * sparc-tdep.c: Likewise.
3358 * sparc64-tdep.c: Likewise.
3359 * spu-tdep.c: Likewise.
3360 * tic6x-tdep.c: Likewise.
3361 * tilegx-tdep.c: Likewise.
3362 * vax-tdep.c: Likewise.
3363 * xstormy16-tdep.c: Likewise.
3364 * xtensa-tdep.c: Likewise.
3365
3366 * top.c: Do not include "doublest.h".
3367 * aarch64-tdep.c: Likewise.
3368 * alpha-tdep.c: Likewise.
3369 * arm-linux-tdep.c: Likewise.
3370 * m68k-linux-tdep.c: Likewise.
3371 * tilegx-tdep.c: Likewise.
3372 * xstormy16-tdep.c: Likewise.
3373
3374 2017-10-05 John Baldwin <jhb@FreeBSD.org>
3375
3376 * mips-fbsd-tdep.c (MIPS_INST_ADDIU_A0_SP_N32): Define.
3377 (mipsn32_fbsd_sigframe): Define.
3378 (mips_fbsd_init_abi): Install mipsn32_fbsd_sigframe unwinder
3379 for FreeBSD/mipsn32.
3380
3381 2017-10-05 John Baldwin <jhb@FreeBSD.org>
3382
3383 * fbsd-tdep.c (fbsd_print_auxv_entry): Handle AT_EHDRFLAGS and
3384 AT_HWCAP.
3385
3386 2017-10-05 Tristan Gingold <tgingold@free.fr>
3387
3388 * MAINTAINERS (Misc): Update my email address.
3389
3390 2017-10-04 Pedro Alves <palves@redhat.com>
3391
3392 * remote.c (get_remote_arch_state): New 'gdbarch' parameter. Use
3393 it instead of target_gdbarch.
3394 (get_remote_state, get_remote_packet_size): Adjust
3395 get_remote_arch_state calls, passing down target_gdbarch
3396 explicitly.
3397 (packet_reg_from_regnum, packet_reg_from_pnum): New parameter
3398 'gdbarch' and use it instead of target_gdbarch.
3399 (get_memory_packet_size): Adjust get_remote_arch_state calls,
3400 passing down target_gdbarch explicitly.
3401 (struct stop_reply) <arch>: New field.
3402 (remote_parse_stop_reply): Use the stopped thread's architecture,
3403 not the current inferior's. Save the architecture in the
3404 stop_reply.
3405 (process_stop_reply): Use the stop reply's architecture.
3406 (process_g_packet, remote_fetch_registers)
3407 (remote_prepare_to_store, store_registers_using_G)
3408 (remote_store_registers): Adjust get_remote_arch_state calls,
3409 using the regcache's architecture.
3410 (remote_get_trace_status): Adjust get_remote_arch_state calls,
3411 passing down target_gdbarch explicitly.
3412 * spu-multiarch.c (spu_thread_architecture): Defer to the target
3413 beneath instead of calling target_gdbarch.
3414 * target.c (default_thread_architecture): Use the specified
3415 inferior's architecture, instead of the current inferior's
3416 architecture (via target_gdbarch).
3417
3418 2017-10-04 Pedro Alves <palves@redhat.com>
3419
3420 * regcache.c (get_thread_arch_regcache): Remove null_ptid special
3421 case.
3422 (regcache_print): Handle !target_has_registers here instead.
3423
3424 2017-10-04 Pedro Alves <palves@redhat.com>
3425
3426 * frame.c (create_test_frame): Delete.
3427 * frame.h (create_test_frame): Delete.
3428 * gdbarch-selftests.c: Include gdbthread.h and target.h.
3429 (class regcache_test): Delete.
3430 (test_target_has_registers, test_target_has_stack)
3431 (test_target_has_memory, test_target_prepare_to_store)
3432 (test_target_store_registers): New functions.
3433 (test_target_ops): New class.
3434 (register_to_value_test): Error out if there's already a
3435 process_stratum (or higher) target pushed. Create a fuller mock
3436 environment, with mock target_ops, inferior, address space, thread
3437 and inferior_ptid.
3438 * progspace.c (struct address_space): Move to ...
3439 * progspace.h (struct address_space): ... here.
3440 * regcache.h (regcache::~regcache, regcache::raw_write)
3441 [GDB_SELF_TEST]: No longer virtual.
3442
3443 2017-10-04 Simon Marchi <simon.marchi@ericsson.com>
3444
3445 * mi/mi-main.c (list_available_thread_groups): Reverse filter logic.
3446
3447 2017-10-04 Pedro Alves <palves@redhat.com>
3448
3449 * guile/scm-breakpoint.c (gdbscm_breakpoint_commands): Move code
3450 out of 'between TRY and CATCH'.
3451
3452 2017-10-04 Pedro Alves <palves@redhat.com>
3453
3454 * cli/cli-cmds.c (complete_command): Add missing END_CATCH.
3455 * common/common-exceptions.h (TRY): Open an outermost scope.
3456 Expand intro comment.
3457 (CATCH): Reindent.
3458 (END_CATCH): Close the outermost scope.
3459 * completer.c (complete_line_internal): Add missing END_CATCH.
3460
3461 2017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
3462
3463 * NEWS (Changes since GDB 8.0): Add entry about new
3464 'set-cwd-on-gdbserver' feature.
3465 (New remote packets): Add entry for QSetWorkingDir.
3466 * common/common-inferior.h (set_inferior_cwd): New prototype.
3467 * infcmd.c (set_inferior_cwd): Remove "static".
3468 (show_cwd_command): Expand text to include remote debugging.
3469 * remote.c: Add PACKET_QSetWorkingDir.
3470 (remote_protocol_features) <QSetWorkingDir>: New entry for
3471 PACKET_QSetWorkingDir.
3472 (extended_remote_set_inferior_cwd): New function.
3473 (extended_remote_create_inferior): Call
3474 "extended_remote_set_inferior_cwd".
3475 (_initialize_remote): Call "add_packet_config_cmd" for
3476 QSetWorkingDir.
3477
3478 2017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
3479
3480 * NEWS (New commands): Mention "set/show cwd".
3481 * cli/cli-cmds.c (_initialize_cli_cmds): Mention "set cwd" on
3482 "cd" command's help text.
3483 * common/common-inferior.h (get_inferior_cwd): New prototype.
3484 * infcmd.c (inferior_cwd_scratch): New global variable.
3485 (set_inferior_cwd): New function.
3486 (get_inferior_cwd): Likewise.
3487 (set_cwd_command): Likewise.
3488 (show_cwd_command): Likewise.
3489 (_initialize_infcmd): Add "set/show cwd" commands.
3490 * inferior.h (class inferior) <cwd>: New field.
3491 * nat/fork-inferior.c: Include "gdb_tilde_expand.h".
3492 (fork_inferior): Change inferior's cwd before its execution.
3493 * windows-nat.c (windows_create_inferior): Pass inferior's cwd
3494 to CreateProcess.
3495
3496 2017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
3497
3498 * Makefile.in (SFILES): Add gdb_tilde_expand.c.
3499 (HFILES_NO_SRCDIR): Add gdb_tilde_expand.h.
3500 (COMMON_OBS): Add gdb_tilde_expand.o.
3501 * common/gdb_tilde_expand.c: New file.
3502 * common/gdb_tilde_expand.h: Likewise.
3503
3504 2017-10-03 Maciej W. Rozycki <macro@imgtec.com>
3505
3506 * gdbarch.sh (objfile): Remove duplicate declaration.
3507 * gdbarch.h: Regenerate.
3508
3509 2017-10-03 Tom Tromey <tom@tromey.com>
3510
3511 * utils.c (internal_vproblem): Use string_vprintf.
3512
3513 2017-10-03 Tom Tromey <tom@tromey.com>
3514
3515 * printcmd.c (info_symbol_command): Use std::string.
3516
3517 2017-10-03 Tom Tromey <tom@tromey.com>
3518
3519 * top.c (gdb_safe_append_history): Use std::string.
3520
3521 2017-10-03 Tom Tromey <tom@tromey.com>
3522
3523 * event-top.c (stdin_event_handler): Update.
3524 * main.c (captured_main_1): Update.
3525 * top.h (make_delete_ui_cleanup): Remove.
3526 (struct ui): Add constructor and destructor.
3527 (new_ui, delete_ui): Remove.
3528 * top.c (make_delete_ui_cleanup): Remove.
3529 (new_ui_command): Use std::unique_ptr.
3530 (delete_ui_cleanup): Remove.
3531 (ui::ui): Rename from new_ui. Update.
3532 (free_ui): Remove.
3533 (ui::~ui): Rename from delete_ui. Update.
3534
3535 2017-10-03 Tom Tromey <tom@tromey.com>
3536
3537 * symfile.c (load_progress): Use gdb::byte_vector.
3538
3539 2017-10-03 Tom Tromey <tom@tromey.com>
3540
3541 * mi/mi-main.c (mi_cmd_trace_frame_collected): Remove unused
3542 declaration.
3543 * printcmd.c (x_command): Remove unused declaration.
3544 * symfile.c (symbol_file_command): Remove unused declaration.
3545
3546 2017-10-03 Tom Tromey <tom@tromey.com>
3547
3548 * utils.c (internal_vproblem): Use std::string.
3549 (defaulted_query): Likewise.
3550
3551 2017-10-03 Tom Tromey <tom@tromey.com>
3552
3553 * guile/scm-ports.c (ioscm_with_output_to_port_worker): Update.
3554 * top.c (execute_command_to_string): Update.
3555 * utils.c (make_cleanup_restore_page_info): Remove.
3556 (do_restore_page_info_cleanup): Remove.
3557 (set_batch_flag_and_restore_page_info):
3558 New.
3559 (make_cleanup_restore_page_info): Remove.
3560 (set_batch_flag_and_make_cleanup_restore_page_info): Remove.
3561 (~set_batch_flag_and_restore_page_info): New
3562 (make_cleanup_restore_uinteger): Remove.
3563 (make_cleanup_restore_integer): Remove.
3564 (struct restore_integer_closure): Remove.
3565 (restore_integer): Remove.
3566 * utils.h (struct set_batch_flag_and_restore_page_info): New
3567 class.
3568 (set_batch_flag_and_make_cleanup_restore_page_info): Remove.
3569 (make_cleanup_restore_page_info): Remove.
3570 (make_cleanup_restore_uinteger) Remove.
3571 (make_cleanup_restore_integer) Remove.
3572
3573 2017-10-03 Tom Tromey <tom@tromey.com>
3574
3575 * record-full.h (record_full_gdb_operation_disable_set): Return
3576 scoped_restore_tmpl<int>.
3577 * infrun.c (adjust_pc_after_break): Update.
3578 (handle_signal_stop): Update.
3579 * record-full.c (record_full_gdb_operation_disable_set): Return
3580 scoped_restore_tmpl<int>.
3581 (record_full_wait_1, record_full_insert_breakpoint)
3582 (record_full_remove_breakpoint, record_full_save)
3583 (record_full_goto_insn): Update.
3584
3585 2017-10-02 Tom Tromey <tom@tromey.com>
3586
3587 PR rust/22236:
3588 * rust-lang.c (rust_val_print_str): New function.
3589 (val_print_struct): Call it.
3590 (rust_subscript): Preserve name of slice type.
3591
3592 2017-10-02 Tom Tromey <tom@tromey.com>
3593
3594 * rust-lang.c (rust_subscript): Handle slices in
3595 EVAL_AVOID_SIDE_EFFECTS case.
3596
3597 2017-10-02 Tom Tromey <tom@tromey.com>
3598
3599 * rust-lang.c (rust_slice_type_p): Recognize &str as a slice type.
3600
3601 2017-10-02 Tom Tromey <tom@tromey.com>
3602
3603 * rust-lang.h (rust_slice_type): Add "extern".
3604
3605 2017-10-02 Tom Tromey <tom@tromey.com>
3606 Pedro Alves <palves@redhat.com>
3607
3608 * ada-lang.h (ada_exc_info::operator<): Make const.
3609 (ada_exc_info::operator==): Make const.
3610 * ada-lang.c (ada_exc_info::operator<, ada_exc_info::operator==):
3611 Make const.
3612
3613 2017-09-29 Tom Tromey <tom@tromey.com>
3614
3615 * target.c (read_whatever_is_readable): Change type of "result".
3616 Update.
3617 (free_memory_read_result_vector): Remove.
3618 (read_memory_robust): Change return type. Update.
3619 * mi/mi-main.c (mi_cmd_data_read_memory_bytes): Update. Use
3620 bin2hex, std::string.
3621 * target.h (memory_read_result_s): Remove typedef.
3622 (free_memory_read_result_vector): Remove.
3623 (read_memory_robust): Return std::vector.
3624
3625 2017-09-29 Tom Tromey <tom@tromey.com>
3626
3627 * mi/mi-main.c (captured_mi_execute_command): Use scope_restore.
3628
3629 2017-09-29 Tom Tromey <tom@tromey.com>
3630
3631 * mi/mi-cmd-info.c (mi_cmd_info_ada_exceptions): Update.
3632 * ada-lang.h (struct ada_exc_info): Remove typedef. Declare
3633 operator< and operator==.
3634 (ada_exceptions_list): Return a std::vector.
3635 * ada-lang.c (ada_exc_info::operator<): Rename from
3636 compare_ada_exception_info.
3637 (ada_exc_info::operator==): New.
3638 (sort_remove_dups_ada_exceptions_list): Change type of
3639 "exceptions".
3640 (ada_add_standard_exceptions, ada_add_exceptions_from_frame)
3641 (ada_add_global_exceptions): Likewise.
3642 (ada_exceptions_list_1): Return a std::vector.
3643 (ada_exceptions_list): Likewise.
3644
3645 2017-09-29 Tom Tromey <tom@tromey.com>
3646
3647 * mi/mi-main.c (struct print_one_inferior_data) <inferiors>: Now a
3648 'std::set *'.
3649 (print_one_inferior): Update.
3650 (free_vector_of_ints): Remove.
3651 (list_available_thread_groups): Change "ids" to std::set.
3652 (mi_cmd_list_thread_groups): Update.
3653 (struct collect_cores_data) <core>: Now a std::set.
3654 (collect_cores): Update.
3655 (unique): Remove.
3656 (print_one_inferior): Update.
3657
3658 2017-09-29 Tom Tromey <tom@tromey.com>
3659
3660 * mi/mi-main.c (mi_execute_cli_command): Use std::string.
3661 (mi_execute_async_cli_command): Likewise.
3662 (mi_cmd_trace_frame_collected): Use field_fmt.
3663
3664 2017-09-29 Tom Tromey <tom@tromey.com>
3665
3666 * mi/mi-main.c (mi_cmd_data_write_memory_bytes): Use
3667 gdb::byte_vector.
3668
3669 2017-09-29 Tom Tromey <tom@tromey.com>
3670
3671 * mi/mi-parse.c (mi_parse): Remove unused declaration.
3672
3673 2017-09-29 Tom Tromey <tom@tromey.com>
3674
3675 * mi/mi-cmd-disas.c (mi_cmd_disassemble): Don't copy "oarg".
3676
3677 2017-09-29 Tom Tromey <tom@tromey.com>
3678
3679 * varobj.h (varobj_gen_name): Return std::string.
3680 * varobj.c (varobj_gen_name): Return std::string.
3681 * mi/mi-cmd-var.c (mi_cmd_var_create): Use std::string.
3682 (mi_cmd_var_delete): Don't copy "name".
3683
3684 2017-09-29 Tom Tromey <tom@tromey.com>
3685
3686 * mi/mi-cmd-break.c (mi_argv_to_format): Return std::string.
3687 (mi_cmd_break_insert_1): Update.
3688
3689 2017-09-29 Tom Tromey <tom@tromey.com>
3690
3691 * target.h (make_scoped_defer_target_commit_resume): Update.
3692 * target.c (make_scoped_defer_target_commit_resume): Rename from
3693 make_cleanup_defer_target_commit_resume. Return a
3694 scoped_restore.
3695 * infrun.c (proceed): Use make_scoped_defer_target_commit_resume.
3696
3697 2017-09-29 Tom Tromey <tom@tromey.com>
3698
3699 * main.c (captured_main_1): Remove unused declaration.
3700 * spu-multiarch.c (parse_spufs_run): Remove unused declaration.
3701
3702 2017-09-29 Tom Tromey <tom@tromey.com>
3703
3704 * symtab.c (search_symbols): Remove unused outer cleanup.
3705 (make_source_files_completion_list): Remove unused declaration.
3706
3707 2017-09-29 Tom Tromey <tom@tromey.com>
3708
3709 * mt-tdep.c (mt_push_dummy_call): Use gdb::byte_vector.
3710
3711 2017-09-29 Tom Tromey <tom@tromey.com>
3712
3713 * xstormy16-tdep.c (xstormy16_push_dummy_call): Use
3714 gdb::byte_vector.
3715
3716 2017-09-29 Tom Tromey <tom@tromey.com>
3717
3718 * complaints.c (vcomplaint): Use std::string.
3719
3720 2017-09-29 Tom Tromey <tom@tromey.com>
3721
3722 * tracepoint.c (trace_variable_command): Use std::string.
3723 (encode_actions_1): Remove unused declarations.
3724 (create_tsv_from_upload): Use std::string.
3725
3726 2017-09-29 Tom Tromey <tom@tromey.com>
3727
3728 * cp-support.c (gdb_demangle): Use std::string.
3729
3730 2017-09-29 Tom Tromey <tom@tromey.com>
3731
3732 * stack.c (parse_frame_specification): Use std::string
3733 (info_frame_command): Use gdb::unique_xmalloc_ptr.
3734
3735 2017-09-29 Tom Tromey <tom@tromey.com>
3736
3737 * tilegx-tdep.c (tilegx_push_dummy_call): Use gdb::byte_vector.
3738
3739 2017-09-29 Tom Tromey <tom@tromey.com>
3740
3741 * utils.c (vfprintf_maybe_filtered): Use std::string.
3742 (vfprintf_unfiltered): Likewise.
3743
3744 2017-09-29 Tom Tromey <tom@tromey.com>
3745
3746 * event-top.c (top_level_prompt): Return std::string.
3747 (display_gdb_prompt): Update.
3748
3749 2017-09-29 Tom Tromey <tom@tromey.com>
3750
3751 * unittests/common-utils-selftests.c (format): New function.
3752 (string_vprintf_tests): New function.
3753 (_initialize_common_utils_selftests): Register new tests.
3754 * common/common-utils.c (string_vprintf): New function.
3755 * common/common-utils.h (string_vprintf): Declare.
3756
3757 2017-09-29 Pedro Alves <palves@redhat.com>
3758
3759 * common/rsp-low.c (unpack_varlen_hex): Constify.
3760 * common/rsp-low.h (unpack_varlen_hex): Constify.
3761 * linux-nat.c (linux_child_static_tracepoint_markers_by_strid):
3762 Constify.
3763 * remote.c (remote_set_permissions, read_ptid)
3764 (remote_current_thread, remote_get_threads_with_qthreadinfo)
3765 (remote_static_tracepoint_marker_at)
3766 (remote_static_tracepoint_markers_by_strid)
3767 (stop_reply_extract_thread, remote_parse_stop_reply): Constify.
3768 * tracepoint.c (parse_trace_status, parse_tracepoint_status)
3769 (parse_tracepoint_definition, parse_tsv_definition)
3770 (parse_static_tracepoint_marker_definition): Constify.
3771 * tracepoint.h (parse_static_tracepoint_marker_definition)
3772 (parse_trace_status, parse_tracepoint_status)
3773 (parse_tracepoint_definition, parse_tsv_definition): Constify.
3774
3775 2017-09-29 Pedro Alves <palves@redhat.com>
3776
3777 * remote.c (target_buf, target_buf_size): Delete.
3778 (remote_get_noisy_reply): Remove buf_p and sizeof_buf parameters.
3779 Use the connection's packet buffer instead.
3780 All callers adjusted.
3781 (_initialize_remote): Remove references to target_buf and
3782 target_buf_size.
3783
3784 2017-09-28 Pedro Alves <palves@redhat.com>
3785
3786 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
3787 unittests/common-utils-selftests.c.
3788 (SUBDIR_UNITTESTS_OBS): Add common-utils-selftests.o.
3789 (COMMON_OBS): Remove utils-selftests.o.
3790 * utils-selftests.c: Move to ...
3791 * unittests/common-utils-selftests.c: ... here and rename self
3792 test to "string_printf".
3793
3794 2017-09-28 Alexander Shaposhnikov <alexander.v.shaposhnikov@gmail.com> (tiny patch)
3795
3796 * dwarf2read.c (open_and_init_dwp_file): Protect against dwp_file
3797 having NULL cus or tus.
3798
3799 2017-09-27 Ulrich Weigand <uweigand@de.ibm.com>
3800
3801 * arm-tdep.c: (convert_from_extended): Remove.
3802 (convert_to_extended): Likewise.
3803 (arm_extract_return_value): Use convert_typed_floating.
3804 (arm_store_return_value): Likewise.
3805
3806 * sh-tdep.h (struct gdbarch_tdep): Add sh_littlebyte_bigword_type.
3807 * sh-tdep.c: Do not include "floatformat.h".
3808 (sh_littlebyte_bigword_type): New function.
3809 (sh_register_convert_to_virtual): Use convert_typed_floating.
3810 (sh_register_convert_to_raw): Likewise.
3811 * sh64-tdep.c: (struct gdbarch_tdep): Add sh_littlebyte_bigword_type.
3812 (sh64_littlebyte_bigword_type): New function.
3813 (sh64_extract_return_value): Use convert_typed_floating.
3814 (sh64_register_convert_to_virtual): Likewise.
3815 (sh64_register_convert_to_raw): Likewise.
3816
3817 2017-09-27 Ulrich Weigand <uweigand@de.ibm.com>
3818
3819 * doublest.h (floatformat_from_type): Move to gdbtypes.h.
3820 * doublest.c (floatformat_from_type): Move to gdbtypes.c.
3821
3822 * gdbtypes.h (union type_specific): Make field floatformat hold
3823 just a single struct floatformat, not an array.
3824 (floatformat_from_type): Move here.
3825 * gdbtypes.c (floatformat_from_type): Move here. Update to
3826 changed TYPE_FLOATFORMAT definition.
3827 (verify_floatformat): Update to changed TYPE_FLOATFORMAT.
3828 (recursive_dump_type): Likewise.
3829 (init_float_type): Install correct floatformat for byte order.
3830 (arch_float_type): Likewise.
3831
3832 2017-09-27 Ulrich Weigand <uweigand@de.ibm.com>
3833
3834 * gdbtypes.c (init_type): Change incoming argument from
3835 length-in-bytes to length-in-bits. Assert length is a
3836 multiple of TARGET_CHAR_BITS.
3837 (arch_type, arch_flags_type): Likewise.
3838 (init_integer_type): Update call to init_type.
3839 (init_character_type): Likewise.
3840 (init_boolean_type): Likewise.
3841 (init_float_type): Likewise.
3842 (init_decfloat_type): Likewise.
3843 (init_complex_type): Likewise.
3844 (init_pointer_type): Likewise.
3845 (objfile_type): Likewise.
3846 (arch_integer_type): Update call to arch_type.
3847 (arch_character_type): Likewise.
3848 (arch_boolean_type): Likewise.
3849 (arch_float_type): Likewise.
3850 (arch_decfloat_type): Likewise.
3851 (arch_complex_type): Likewise.
3852 (arch_pointer_type): Likewise.
3853 (gdbtypes_post_init): Likewise.
3854
3855 * dwarf2read.c (dwarf2_init_float_type): Update call to init_type.
3856 (read_base_type): Likewise.
3857 * mdebugread.c (basic_type): Likewise.
3858 * stabsread.c (dbx_init_float_type): Likewise.
3859 (rs6000_builtin_type): Likewise.
3860 (read_range_type): Likewise. Also, fix call to init_integer_type
3861 with erroneous length argument.
3862
3863 * ada-lang.c (ada_language_arch_info): Update call to arch_type.
3864 * d-lang.c (build_d_types): Likewise.
3865 * f-lang.c (build_fortran_types): Likewise.
3866 * go-lang.c (build_go_types): Likewise.
3867 * opencl-lang.c (build_opencl_types): Likewise.
3868 * jit.c (finalize_symtab): Likewise.
3869 * gnu-v3-abi.c (build_gdb_vtable_type): Likewise.
3870 (build_std_type_info_type): Likewise.
3871 * target-descriptions.c (tdesc_gdb_type): Likewise. Also,
3872 update call to arch_flags_type.
3873
3874 * linux-tdep.c (linux_get_siginfo_type_with_fields): Update call to
3875 arch_type.
3876 * fbsd-tdep.c (fbsd_get_siginfo_type): Likewise.
3877 * windows-tdep.c (windows_get_tlb_type): Likewise.
3878
3879 * avr-tdep.c (avr_gdbarch_init): Update call to arch_type.
3880 * ft32-tdep.c (ft32_gdbarch_init): Likewise.
3881 * m32c-tdep.c (make_types): Likewise.
3882 * rl78-tdep.c (rl78_gdbarch_init): Likewise.
3883 (rl78_psw_type): Update call to arch_flags_type.
3884 * m68k-tdep.c (m68k_ps_type): Update call to arch_flags_type.
3885 * rx-tdep.c (rx_psw_type): Likewise.
3886 (rx_fpsw_type): Likewise.
3887 * sparc-tdep.c (sparc_psr_type): Likewise.
3888 (sparc_fsr_type): Likewise.
3889 * sparc64-tdep.c (sparc64_pstate_type): Likewise.
3890 (sparc64_ccr_type): Likewise.
3891 (sparc64_fsr_type): Likewise.
3892 (sparc64_fprs_type): Likewise.
3893
3894 2017-09-27 Tom Tromey <tom@tromey.com>
3895
3896 * findcmd.c (find_command): Constify.
3897
3898 2017-09-27 Tom Tromey <tom@tromey.com>
3899
3900 * ada-tasks.c (task_command_1, task_command): Constify.
3901
3902 2017-09-27 Tom Tromey <tom@tromey.com>
3903
3904 * symtab.c (maintenance_print_symbol_cache)
3905 (maintenance_flush_symbol_cache)
3906 (maintenance_print_symbol_cache_statistics): Constify.
3907
3908 2017-09-27 Tom Tromey <tom@tromey.com>
3909
3910 * inferior.c (detach_inferior_command, kill_inferior_command)
3911 (inferior_command): Constify.
3912
3913 2017-09-27 Tom Tromey <tom@tromey.com>
3914
3915 * regcache.c (regcache_print, maintenance_print_registers)
3916 (maintenance_print_raw_registers)
3917 (maintenance_print_cooked_registers)
3918 (maintenance_print_register_groups)
3919 (maintenance_print_remote_registers): Constify.
3920
3921 2017-09-27 Tom Tromey <tom@tromey.com>
3922
3923 * printcmd.c (map_display_numbers, undisplay_command)
3924 (enable_disable_display_command, enable_display_command)
3925 (disable_display_command): Constify.
3926
3927 2017-09-27 Tom Tromey <tom@tromey.com>
3928
3929 * breakpoint.h (delete_command): Don't declare.
3930 * breakpoint.c (delete_command, enable_once_command)
3931 (enable_count_command, enable_delete_command, breakpoint_1)
3932 (maintenance_info_breakpoints, stopin_command, stopat_command)
3933 (delete_command, delete_trace_command, save_breakpoints)
3934 (save_breakpoints_command, save_tracepoints_command): Constify.
3935
3936 2017-09-27 Tom Tromey <tom@tromey.com>
3937
3938 * macrocmd.c (macro_expand_command, macro_expand_once_command)
3939 (skip_ws, extract_identifier, macro_define_command)
3940 (macro_undef_command, macro_list_command): Constify.
3941
3942 2017-09-27 Tom Tromey <tom@tromey.com>
3943
3944 * infcmd.c (environment_info, set_environment_command)
3945 (unset_environment_command, path_info, info_proc_cmd_1)
3946 (info_proc_cmd_mappings, info_proc_cmd_stat)
3947 (info_proc_cmd_status, info_proc_cmd_cwd, info_proc_cmd_cmdline)
3948 (info_proc_cmd_exe, info_proc_cmd_all): Constify.
3949
3950 2017-09-27 Tom Tromey <tom@tromey.com>
3951
3952 * i386-tdep.c (i386_mpx_info_bounds, i386_mpx_set_bounds):
3953 Constify.
3954
3955 2017-09-27 Tom Tromey <tom@tromey.com>
3956
3957 * symfile-mem.c (add_symbol_file_from_memory_command): Constify.
3958
3959 2017-09-27 Tom Tromey <tom@tromey.com>
3960
3961 * demangle.c (demangle_command): Constify.
3962
3963 2017-09-27 Tom Tromey <tom@tromey.com>
3964
3965 * progspace.c (maintenance_info_program_spaces_command):
3966 Constify.
3967
3968 2017-09-27 Tom Tromey <tom@tromey.com>
3969
3970 * compile/compile.c (check_raw_argument, compile_file_command)
3971 (compile_code_command, compile_print_command): Constify.
3972
3973 2017-09-27 Tom Tromey <tom@tromey.com>
3974
3975 * reggroups.c (maintenance_print_reggroups): Constify.
3976
3977 2017-09-27 Tom Tromey <tom@tromey.com>
3978
3979 * dwarf2read.c (save_gdb_index_command): Constify.
3980
3981 2017-09-27 Tom Tromey <tom@tromey.com>
3982
3983 * stap-probe.c (info_probes_stap_command): Constify.
3984
3985 2017-09-27 Tom Tromey <tom@tromey.com>
3986
3987 * fork-child.c (unset_exec_wrapper_command): Constify.
3988
3989 2017-09-27 Tom Tromey <tom@tromey.com>
3990
3991 * btrace.c (get_uint, get_context_size, no_chunk)
3992 (maint_btrace_packet_history_cmd)
3993 (maint_btrace_clear_packet_history_cmd, maint_btrace_clear_cmd)
3994 (maint_info_btrace_cmd): Constify.
3995
3996 2017-09-27 Tom Tromey <tom@tromey.com>
3997
3998 * reverse.c (delete_bookmark_command): Constify.
3999
4000 2017-09-27 Tom Tromey <tom@tromey.com>
4001
4002 * remote.c (set_memory_packet_size)
4003 (set_memory_write_packet_size, show_memory_write_packet_size)
4004 (set_memory_read_packet_size, show_memory_read_packet_size)
4005 (compare_sections_command, packet_command, remote_put_command)
4006 (remote_get_command, remote_delete_command): Constify.
4007
4008 2017-09-27 Tom Tromey <tom@tromey.com>
4009
4010 * mips-tdep.c (show_mipsfpu_command, set_mipsfpu_single_command)
4011 (set_mipsfpu_double_command, set_mipsfpu_none_command)
4012 (set_mipsfpu_auto_command): Constify.
4013
4014 2017-09-27 Tom Tromey <tom@tromey.com>
4015
4016 * cli/cli-cmds.h (cd_command): Constify.
4017 * cli/cli-cmds.c (cd_command): Constify.
4018
4019 2017-09-27 Tom Tromey <tom@tromey.com>
4020
4021 * thread.c (thread_name_command, thread_find_command): Constify.
4022
4023 2017-09-27 Tom Tromey <tom@tromey.com>
4024
4025 * probe.c (enable_probes_command, disable_probes_command):
4026 Constify.
4027
4028 2017-09-27 Tom Tromey <tom@tromey.com>
4029
4030 * symfile.c (symbol_file_command): Constify.
4031 * gdbcore.h (deprecated_file_changed_hook): Constify.
4032 * exec.c (deprecated_file_changed_hook, exec_file_command)
4033 (file_command): Constify.
4034 * defs.h (symbol_file_command): Constify.
4035
4036 2017-09-27 Tom Tromey <tom@tromey.com>
4037
4038 * remote-fileio.c (set_system_call_allowed)
4039 (show_system_call_allowed): Constify.
4040
4041 2017-09-27 Tom Tromey <tom@tromey.com>
4042
4043 * tracepoint.c (delete_trace_variable_command)
4044 (tfind_end_command, tfind_start_command, tfind_pc_command)
4045 (tfind_tracepoint_command, tfind_line_command)
4046 (tfind_range_command, tfind_outside_command): Constify.
4047
4048 2017-09-27 Tom Tromey <tom@tromey.com>
4049
4050 * ax-gdb.c (maint_agent_printf_command, agent_command)
4051 (agent_eval_command): Constify.
4052
4053 2017-09-27 Tom Tromey <tom@tromey.com>
4054
4055 * tracepoint.c (info_scope_command): Constify.
4056 * python/python.c (gdbpy_decode_line): Constify.
4057 * python/py-breakpoint.c (bppy_init): Constify.
4058 * mi/mi-cmd-break.c (mi_cmd_break_insert_1): Constify.
4059 * location.h: (new_linespec_location)
4060 (string_to_event_location_basic, string_to_event_location):
4061 Constify.
4062 * location.c (new_linespec_location)
4063 (string_to_event_location_basic, string_to_event_location):
4064 Constify.
4065 * linespec.h (decode_line_with_current_source)
4066 (decode_line_with_last_displayed, linespec_lex_to_end): Constify.
4067 * linespec.c (linespec_lex_to_end)
4068 (decode_line_with_current_source)
4069 (decode_line_with_last_displayed): Constify.
4070 * guile/scm-breakpoint.c (gdbscm_register_breakpoint_x):
4071 Constify.
4072 * cli/cli-cmds.c (edit_command, list_command): Constify.
4073 * breakpoint.h (until_break_command, watch_command_wrapper)
4074 (awatch_command_wrapper, rwatch_command_wrapper)
4075 (init_ada_exception_breakpoint): Constify.
4076 * breakpoint.c (break_command_1, dprintf_command)
4077 (break_range_command, watch_command_wrapper)
4078 (rwatch_command_wrapper, awatch_command_wrapper)
4079 (until_break_command, init_ada_exception_breakpoint)
4080 (strace_marker_create_sals_from_location, trace_command)
4081 (ftrace_command, strace_command, struct tracepoint): Constify.
4082 * ax-gdb.c (agent_command_1): Constify.
4083 * ada-lang.c (ada_exception_sal): Constify.
4084
4085 2017-09-27 Tom Tromey <tom@tromey.com>
4086
4087 * record.c (cmd_record_delete, cmd_record_stop, cmd_record_save)
4088 (cmd_record_goto_begin, cmd_record_goto_end, get_insn_number)
4089 (get_context_size, no_chunk, get_insn_history_modifiers)
4090 (cmd_record_insn_history, get_call_history_modifiers)
4091 (cmd_record_call_history): Constify.
4092
4093 2017-09-27 Tom Tromey <tom@tromey.com>
4094
4095 * source.c (show_substitute_path_command)
4096 (unset_substitute_path_command, set_substitute_path_command):
4097 Constify.
4098
4099 2017-09-27 Tom Tromey <tom@tromey.com>
4100
4101 * typeprint.c (maintenance_print_type): Constify.
4102 * maint.c (maintenance_dump_me, maintenance_demangle)
4103 (maintenance_time_display, maintenance_info_sections)
4104 (maintenance_print_statistics, maintenance_deprecate)
4105 (maintenance_undeprecate): Constify.
4106 (maintenance_do_deprecate): Constify. Use std::string.
4107 (maintenance_selftest): Constify.
4108 * gdbtypes.h (maintenance_print_type): Constify.
4109
4110 2017-09-27 Tom Tromey <tom@tromey.com>
4111
4112 * hppa-tdep.c (unwind_command): Constify.
4113
4114 2017-09-27 Tom Tromey <tom@tromey.com>
4115
4116 * target-descriptions.c (unset_tdesc_filename_cmd)
4117 (maint_print_c_tdesc_cmd, maintenance_check_xml_descriptions):
4118 Constify.
4119
4120 2017-09-27 Tom Tromey <tom@tromey.com>
4121
4122 * dummy-frame.c (maintenance_print_dummy_frames): Constify.
4123
4124 2017-09-27 Tom Tromey <tom@tromey.com>
4125
4126 * tui/tui.c (tui_enable_command, tui_disable_command): Constify.
4127
4128 2017-09-27 Tom Tromey <tom@tromey.com>
4129
4130 * tui/tui-regs.c (tui_reg_command): Constify.
4131
4132 2017-09-27 Tom Tromey <tom@tromey.com>
4133
4134 * skip.c (skip_file_command, skip_function_command)
4135 (skip_enable_command, skip_disable_command, skip_delete_command):
4136 Constify.
4137
4138 2017-09-27 Tom Tromey <tom@tromey.com>
4139
4140 * record-btrace.c (cmd_record_btrace_bts_start)
4141 (cmd_record_btrace_pt_start): Constify.
4142
4143 2017-09-27 Tom Tromey <tom@tromey.com>
4144
4145 * symmisc.c (maintenance_print_symbols)
4146 (maintenance_print_msymbols, maintenance_print_objfiles)
4147 (maintenance_info_symtabs, maintenance_check_symtabs)
4148 (maintenance_expand_symtabs, maintenance_info_line_tables):
4149 Constify.
4150
4151 2017-09-27 Tom Tromey <tom@tromey.com>
4152
4153 * top.c (new_ui_command): Constify.
4154
4155 2017-09-27 Tom Tromey <tom@tromey.com>
4156
4157 * symfile.c (add_symbol_file_command)
4158 (remove_symbol_file_command, list_overlays_command)
4159 (map_overlay_command, unmap_overlay_command)
4160 (overlay_auto_command, overlay_manual_command)
4161 (overlay_off_command, overlay_load_command): Constify.
4162
4163 2017-09-27 Tom Tromey <tom@tromey.com>
4164
4165 * spu-tdep.c (info_spu_event_command, info_spu_signal_command)
4166 (info_spu_mailbox_command, info_spu_dma_command)
4167 (info_spu_proxydma_command): Constify.
4168
4169 2017-09-27 Tom Tromey <tom@tromey.com>
4170
4171 * cli/cli-logging.c (set_logging_on, set_logging_off): Constify.
4172
4173 2017-09-27 Tom Tromey <tom@tromey.com>
4174
4175 * cli/cli-script.c (user_defined_command): Constify.
4176
4177 2017-09-27 Tom Tromey <tom@tromey.com>
4178
4179 * cli/cli-dump.c (dump_memory_command, dump_value_command)
4180 (dump_srec_memory, dump_srec_value, dump_ihex_memory)
4181 (dump_ihex_value, dump_verilog_memory, dump_verilog_value)
4182 (dump_tekhex_memory, dump_tekhex_value, dump_binary_memory)
4183 (dump_binary_value, append_binary_memory, append_binary_value):
4184 Constify.
4185 (struct dump_context) <func>: Constify.
4186 (add_dump_command): Update.
4187
4188 2017-09-27 Tom Tromey <tom@tromey.com>
4189
4190 * cli/cli-cmds.c (show_version, show_configuration)
4191 (source_command, show_user): Constify.
4192
4193 2017-09-27 Tom Tromey <tom@tromey.com>
4194
4195 * target.c (maintenance_print_target_stack): Constify.
4196
4197 2017-09-27 Tom Tromey <tom@tromey.com>
4198
4199 * interps.c (interpreter_exec_cmd): Constify.
4200
4201 2017-09-27 Tom Tromey <tom@tromey.com>
4202
4203 * record-full.c (cmd_record_full_restore): Constify.
4204
4205 2017-09-27 Tom Tromey <tom@tromey.com>
4206
4207 * memattr.c (enable_mem_command, disable_mem_command)
4208 (delete_mem_command): Constify.
4209
4210 2017-09-27 Tom Tromey <tom@tromey.com>
4211
4212 * value.c (show_convenience): Constify.
4213
4214 2017-09-27 Tom Tromey <tom@tromey.com>
4215
4216 * gdbcore.h (core_file_command): Update.
4217 * corefile.c (core_file_command): Constify.
4218
4219 2017-09-27 Tom Tromey <tom@tromey.com>
4220
4221 * user-regs.c (maintenance_print_user_registers): Constify.
4222
4223 2017-09-27 Tom Tromey <tom@tromey.com>
4224
4225 * cp-namespace.c (maintenance_cplus_namespace): Constify.
4226
4227 2017-09-27 Tom Tromey <tom@tromey.com>
4228
4229 * cp-support.c (first_component_command): Constify.
4230
4231 2017-09-27 Tom Tromey <tom@tromey.com>
4232
4233 * psymtab.c (maintenance_print_psymbols)
4234 (maintenance_info_psymtabs, maintenance_check_psymtabs):
4235 Constify.
4236
4237 2017-09-27 Tom Tromey <tom@tromey.com>
4238
4239 * windows-tdep.c (display_tib): Constify.
4240
4241 2017-09-27 Tom Tromey <tom@tromey.com>
4242
4243 * linux-fork.c (delete_checkpoint_command)
4244 (detach_checkpoint_command): Constify.
4245
4246 2017-09-27 Tom Tromey <tom@tromey.com>
4247
4248 * cp-abi.c (set_cp_abi_cmd, show_cp_abi_cmd): Constify.
4249
4250 2017-09-27 Tom Tromey <tom@tromey.com>
4251
4252 * arc-tdep.c (dump_arc_instruction_command): Constify.
4253
4254 2017-09-27 Tom Tromey <tom@tromey.com>
4255
4256 * valprint.c (set_radix, show_radix): Constify.
4257
4258 2017-09-27 Tom Tromey <tom@tromey.com>
4259
4260 * dtrace-probe.c (info_probes_dtrace_command): Constify.
4261
4262 2017-09-27 Tom Tromey <tom@tromey.com>
4263
4264 * command.h (not_just_help_class_command): Update.
4265 * cli/cli-decode.h (not_just_help_class_command): Update.
4266 * cli/cli-decode.c (not_just_help_class_command): Constify.
4267
4268 2017-09-27 Tom Tromey <tom@tromey.com>
4269
4270 * gdb_bfd.c (maintenance_info_bfds): Constify.
4271
4272 2017-09-27 Tom Tromey <tom@tromey.com>
4273
4274 * cli/cli-decode.c (add_cmd, set_cmd_cfunc): New function
4275 overloads.
4276 (do_add_cmd): Rename from add_cmd. Don't call set_cmd_cfunc.
4277 (do_const_cfunc): New function.
4278 (cmd_cfunc_eq): New overload.
4279 (cli_user_command_p): Check do_const_cfunc.
4280 * cli/cli-decode.h (struct cmd_list_element) <function>: New field
4281 const_cfunc.
4282 * command.h (add_cmd): Add const overload and no-function
4283 overload.
4284 (set_cmd_cfunc): Add const overload.
4285 (cmd_const_cfunc_ftype): Declare.
4286 (cmd_cfunc_eq): Add const overload.
4287 * breakpoint.c, cli-cmds.c, cli-dump.c, guile/scm-cmd.c,
4288 python/py-cmd.c, target.c, tracepoint.c: Use no-function add_cmd
4289 overload.
4290
4291 2017-09-27 Tom Tromey <tom@tromey.com>
4292
4293 * macroexp.c (get_next_token_for_substitution): New function.
4294 (substitute_args): Call it. Check for __VA_OPT__.
4295
4296 2017-09-26 Walfred Tedeschi <walfred.tedeschi@intel.com>
4297 Pedro Alves <palves@redhat.com>
4298
4299 * dwarf2read.c (dwarf2_cu): Remove field producer_is_icc and add
4300 producer_is_icc_lt_14.
4301 (producer_is_icc_lt_14): New function.
4302 (check_producer): Add code for checking version of ICC.
4303 (producer_is_icc): Move to producer.c.
4304 (read_structure_type): Restrict ICC workaround to ICC<14.
4305 * producer.c: Include selftest.h.
4306 (producer_is_icc, producer_parsing_tests, _initialize_producer):
4307 New functions.
4308 * producer.h (producer_is_icc): New declaration.
4309
4310 2017-09-26 Walfred Tedeschi <walfred.tedeschi@intel.com>
4311
4312 * Makefile.in (SFILES): Add producer.c.
4313 (COMMON_OBS): Add producer.o
4314 * amd64-tdep.c (producer.h): Add new include.
4315 * dwarf2read.c (producer.h): Add new include.
4316 * producer.c: New file.
4317 * producer.h: New file.
4318 * utils.c (producer_is_gcc, producer_is_gcc_ge_4): Move to
4319 producer.c.
4320 * utils.h (producer_is_gcc, producer_is_gcc_ge_4): Move to
4321 producer.h.
4322
4323 2017-09-26 Matthias Klose <doko@ubuntu.com>
4324
4325 * configure.ac: Search ncursesw before ncurses.
4326 Check ncursesw/ncurses.h before ncurses/ncurses.h.
4327 * gdb_curses.h: Include <ncursesw/ncurses.h>
4328 * config.in, configure: Regenerate.
4329
4330 2017-09-26 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
4331
4332 PR gdb/22185
4333 * configure.host <*-*-solaris2.[01], *-*-solaris2.[2-9]*>: Mark as
4334 obsolete.
4335 Use gdb_host sol2 for i[34567]86-*-solaris2*, x86_64-*-solaris2*.
4336 Remove i386sol2 support.
4337 * configure.nat <i386sol2>: Remove.
4338 <sol2-64>: Fold into ...
4339 <sol2>: ... this.
4340 Move common settings to default section.
4341 Add sol-thread.o.
4342 * configure.tgt <i[34567]86-*-solaris2.1[0-9]*,
4343 x86_64-*-solaris2.1[0-9]*>: Rename to ...
4344 <i[34567]86-*-solaris2*, x86_64-*-solaris2*>: ... this.
4345 <i[34567]86-*-solaris*>: Remove.
4346 <sparc-*-solaris2.[0-6], sparc-*-solaris2.[0-6].*>: Remove.
4347
4348 * configure.ac: Remove wctype in libw check.
4349 (_MSE_INT_H): Don't define on Solaris 7-9.
4350 <solaris*>: Remove libthread_db.so.1 check.
4351 * configure: Regenerate.
4352 * config.in: Regenerate.
4353
4354 * proc-service.c: Remove PROC_SERVICE_IS_OLD handling.
4355 (gdb_ps_prochandle_t, gdb_ps_read_buf_t, gdb_ps_write_buf_t)
4356 (gdb_ps_size_t): Remove.
4357 Use base types in users.
4358 * sol-thread.c: Likewise, also for gdb_ps_addr_t.
4359
4360 * NEWS (Changes since GDB 8.0): Document Solaris 2.0-9 removal.
4361
4362 2017-09-26 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
4363
4364 PR build/22206
4365 * sparc64-tdep.c (adi_tag_fd): Print pid as long.
4366 (adi_is_addr_mapped): Likewise.
4367 (PSR_ICC): Don't redefine.
4368 (PSR_IMPL): Likewise.
4369
4370 2017-09-25 Tom Tromey <tom@tromey.com>
4371
4372 * regcache.c (regcache::dump): Use string_printf.
4373
4374 2017-09-25 Tom Tromey <tom@tromey.com>
4375
4376 * regcache.c (class regcache_invalidator): New.
4377 (struct register_to_invalidate): Remove.
4378 (make_cleanup_regcache_invalidate): Remove.
4379 (regcache::raw_write): Use regcache_invalidator.
4380
4381 2017-09-25 Tom Tromey <tom@tromey.com>
4382
4383 * spu-tdep.c (spu2ppu_sniffer): Update.
4384 * regcache.h (make_cleanup_regcache_xfree): Don't declare.
4385 * regcache.c (do_regcache_xfree, make_cleanup_regcache_xfree):
4386 Remove.
4387 * ppc-linux-tdep.c (ppu2spu_sniffer): Update.
4388 * mi/mi-main.c (mi_cmd_data_list_changed_registers): Update.
4389 * frame.h (frame_save_as_regcache): Return std::unique_ptr.
4390 * frame.c (frame_save_as_regcache): Return std::unique_ptr.
4391 (frame_pop): Update.
4392
4393 2017-09-25 Tom Tromey <tom@tromey.com>
4394
4395 * spu-tdep.c (spu2ppu_dealloc_cache): Use delete.
4396 * regcache.h (regcache_xfree): Don't declare.
4397 * regcache.c (regcache_xfree): Remove.
4398 (do_regcache_xfree): Use delete.
4399 * ppc-linux-tdep.c (ppu2spu_dealloc_cache): Use delete.
4400 * linux-fork.c (free_fork): Use delete.
4401 (fork_save_infrun_state): Likewise.
4402 * jit.c (jit_dealloc_cache): Use delete.
4403 * infrun.c (discard_infcall_suspend_state): Use delete.
4404
4405 2017-09-25 Tom Tromey <tom@tromey.com>
4406
4407 * regcache.h (regcache_xmalloc): Don't declare.
4408 (regcache_raw_set_cached_value): Update comment.
4409 * regcache.c (regcache_xmalloc): Remove.
4410 * ppc-linux-tdep.c (ppu2spu_sniffer): Use new.
4411 * jit.c (jit_frame_sniffer): Use new.
4412 * frame.c (frame_save_as_regcache): Use new.
4413
4414 2017-09-25 Andreas Arnez <arnez@linux.vnet.ibm.com>
4415
4416 * NEWS: Advertise support for guarded-storage registers on IBM z.
4417
4418 2017-09-25 Andreas Arnez <arnez@linux.vnet.ibm.com>
4419
4420 * s390-linux-nat.c (have_regset_gs): New static variable.
4421 (s390_linux_fetch_inferior_registers): Handle guarded-storage
4422 control block and guarded-storage broadcast control regsets.
4423 (s390_read_description): Detect whether the target has
4424 guarded-storage support, return appropriate tdesc.
4425 * s390-linux-tdep.c (features/s390-gs-linux64.c): New include.
4426 (features/s390x-gs-linux64.c): Likewise.
4427 (struct gdbarch_tdep) <have_gs>: New field.
4428 (s390_regmap_gs, s390_regmap_gsbc, s390_gs_regset)
4429 (s390_gsbc_regset): New variables.
4430 (s390_iterate_over_regset_sections): Iterate over s390_gs_regset
4431 and s390_gsbc_regset, if applicable.
4432 (s390_core_read_description): Check whether core file was from a
4433 target with guarded-storage support; include appropriate regsets.
4434 (s390_gdbarch_init): Add registers for guarded-storage support.
4435 (_initialize_s390_tdep): Initialize new target descriptions that
4436 include registers for guarded-storage support.
4437 * s390-linux-tdep.h (HWCAP_S390_GS, S390_GSD_REGNUM)
4438 (S390_GSSM_REGNUM, S390_GSEPLA_REGNUM)
4439 (S390_BC_GSD_REGNUM, S390_BC_GSSM_REGNUM): New defines.
4440 (S390_NUM_REGS): Adjust macro definition.
4441 (s390_gs_regset, s390_gsbc_regset, tdesc_s390_gs_linux64)
4442 (tdesc_s390x_gs_linux64): New declarations.
4443
4444 2017-09-25 Andreas Arnez <arnez@linux.vnet.ibm.com>
4445
4446 * features/s390-gs-linux64.xml: New file.
4447 * features/s390-gs.xml: New file.
4448 * features/s390-gsbc.xml: New file.
4449 * features/s390x-gs-linux64.xml: New file.
4450 * features/Makefile (WHICH): Add s390-gs-linux64 and
4451 s390x-gs-linux64.
4452 (s390-gs-linux64-expedite, s390x-gs-linux64-expedite): New macros.
4453 (XMLTOC): Add s390-gs-linux64.xml and s390x-linux64.xml.
4454 * features/s390-gs-linux64.c: New generated file.
4455 * features/s390x-gs-linux64.c: New file.
4456 * regformats/s390-gs-linux64.dat: New file.
4457 * regformats/s390x-gs-linux64.dat: New file.
4458
4459 2017-09-23 Tom Tromey <tom@tromey.com>
4460
4461 * defs.h (make_cleanup_override_quit_handler): Don't declare.
4462
4463 2017-09-22 Tom Tromey <tom@tromey.com>
4464
4465 * utils.c (class scoped_input_handler) <m_quit_handler>: Change
4466 type to scoped_restore_tmpl.
4467 <scoped_input_handler>: Initialize m_quit_handler directly.
4468
4469 2017-09-22 Sergio Durigan Junior <sergiodj@redhat.com>
4470
4471 * cli/cli-cmds.c (pwd_command): Use "getcwd (NULL, 0)".
4472 (cd_command): Likewise. Free "current_directory" before
4473 assigning to it.
4474 * main.c (captured_main_1): Use "getcwd (NULL, 0)".
4475 * mi/mi-cmd-env.c (mi_cmd_env_pwd): Likewise.
4476 * top.c (gdb_dirbuf): Remove global declaration.
4477 * top.h (gdb_dirbuf): Likewise.
4478
4479 2017-09-22 Sergio Durigan Junior <sergiodj@redhat.com>
4480
4481 * gnulib/aclocal.m4: Regenerate.
4482 * gnulib/config.in: Regenerate.
4483 * gnulib/configure: Regenerate.
4484 * gnulib/import/Makefile.am: Regenerate.
4485 * gnulib/import/Makefile.in: Regenerate.
4486 * gnulib/import/assure.h: New file.
4487 * gnulib/import/at-func.c: Likewise
4488 * gnulib/import/chdir-long.c: New file.
4489 * gnulib/import/chdir-long.h: New file.
4490 * gnulib/import/cloexec.c: New file.
4491 * gnulib/import/cloexec.h: New file.
4492 * gnulib/import/close.c: New file.
4493 * gnulib/import/closedir.c: New file.
4494 * gnulib/import/dirent-private.h: New file.
4495 * gnulib/import/dup-safer.c: New file.
4496 * gnulib/import/dup.c: New file.
4497 * gnulib/import/dup2.c: New file.
4498 * gnulib/import/error.c: New file.
4499 * gnulib/import/error.h: New file.
4500 * gnulib/import/exitfail.c: New file.
4501 * gnulib/import/exitfail.h: New file.
4502 * gnulib/import/fchdir.c: New file.
4503 * gnulib/import/fcntl.c: New file.
4504 * gnulib/import/fcntl.in.h: New file.
4505 * gnulib/import/fd-hook.c: New file.
4506 * gnulib/import/fd-hook.h: New file.
4507 * gnulib/import/fd-safer.c: New file.
4508 * gnulib/import/fdopendir.c: New file.
4509 * gnulib/import/filename.h: New file.
4510 * gnulib/import/filenamecat-lgpl.c: New file.
4511 * gnulib/import/filenamecat.h: New file.
4512 * gnulib/import/fstat.c: New file.
4513 * gnulib/import/fstatat.c: New file.
4514 * gnulib/import/getcwd-lgpl.c: New file.
4515 * gnulib/import/getcwd.c: New file.
4516 * gnulib/import/getdtablesize.c: New file.
4517 * gnulib/import/getlogin_r.c: New file.
4518 * gnulib/import/getprogname.c: New file.
4519 * gnulib/import/getprogname.h: New file.
4520 * gnulib/import/gettext.h: New file.
4521 * gnulib/import/glob-libc.h: New file.
4522 * gnulib/import/glob.c: New file.
4523 * gnulib/import/glob.in.h: New file.
4524 * gnulib/import/intprops.h: New file.
4525 * gnulib/import/m4/chdir-long.m4: New file.
4526 * gnulib/import/m4/close.m4: New file.
4527 * gnulib/import/m4/closedir.m4: New file.
4528 * gnulib/import/m4/d-ino.m4: New file.
4529 * gnulib/import/m4/d-type.m4: New file.
4530 * gnulib/import/m4/dup.m4: New file.
4531 * gnulib/import/m4/dup2.m4: New file.
4532 * gnulib/import/m4/error.m4: New file.
4533 * gnulib/import/m4/fchdir.m4: New file.
4534 * gnulib/import/m4/fcntl.m4: New file.
4535 * gnulib/import/m4/fcntl_h.m4: New file.
4536 * gnulib/import/m4/fdopendir.m4: New file.
4537 * gnulib/import/m4/filenamecat.m4: New file.
4538 * gnulib/import/m4/fstat.m4: New file.
4539 * gnulib/import/m4/fstatat.m4: New file.
4540 * gnulib/import/m4/getcwd-abort-bug.m4: New file.
4541 * gnulib/import/m4/getcwd-path-max.m4: New file.
4542 * gnulib/import/m4/getcwd.m4: New file.
4543 * gnulib/import/m4/getdtablesize.m4: New file.
4544 * gnulib/import/m4/getlogin_r.m4: New file.
4545 * gnulib/import/m4/getprogname.m4: New file.
4546 * gnulib/import/m4/glob.m4: New file.
4547 * gnulib/import/m4/gnulib-cache.m4: Regenerate.
4548 * gnulib/import/m4/gnulib-comp.m4: Regenerate.
4549 * gnulib/import/m4/mempcpy.m4: New file.
4550 * gnulib/import/m4/memrchr.m4: New file.
4551 * gnulib/import/m4/mode_t.m4: New file.
4552 * gnulib/import/m4/msvc-inval.m4: New file.
4553 * gnulib/import/m4/msvc-nothrow.m4: New file.
4554 * gnulib/import/m4/open.m4: New file.
4555 * gnulib/import/m4/openat.m4: New file.
4556 * gnulib/import/m4/opendir.m4: New file.
4557 * gnulib/import/m4/readdir.m4: New file.
4558 * gnulib/import/m4/realloc.m4: New file.
4559 * gnulib/import/m4/rewinddir.m4: New file.
4560 * gnulib/import/m4/save-cwd.m4: New file.
4561 * gnulib/import/m4/strdup.m4: New file.
4562 * gnulib/import/m4/strerror.m4: New file.
4563 * gnulib/import/m4/unistd-safer.m4: New file.
4564 * gnulib/import/mempcpy.c: New file.
4565 * gnulib/import/memrchr.c: New file.
4566 * gnulib/import/msvc-inval.c: New file.
4567 * gnulib/import/msvc-inval.h: New file.
4568 * gnulib/import/msvc-nothrow.c: New file.
4569 * gnulib/import/msvc-nothrow.h: New file.
4570 * gnulib/import/open.c: New file.
4571 * gnulib/import/openat-die.c: New file.
4572 * gnulib/import/openat-priv.h: New file.
4573 * gnulib/import/openat-proc.c: New file.
4574 * gnulib/import/openat.c: New file.
4575 * gnulib/import/openat.h: New file.
4576 * gnulib/import/opendir.c: New file.
4577 * gnulib/import/pipe-safer.c: New file.
4578 * gnulib/import/readdir.c: New file.
4579 * gnulib/import/realloc.c: New file.
4580 * gnulib/import/rewinddir.c: New file.
4581 * gnulib/import/save-cwd.c: New file.
4582 * gnulib/import/save-cwd.h: New file.
4583 * gnulib/import/strdup.c: New file.
4584 * gnulib/import/strerror-override.c: New file.
4585 * gnulib/import/strerror-override.h: New file.
4586 * gnulib/import/strerror.c: New file.
4587 * gnulib/import/unistd--.h: New file.
4588 * gnulib/import/unistd-safer.h: New file.
4589 * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add
4590 "getcwd" and "glob".
4591 * ser-tcp.c: Undefine "close" before redefining it.
4592
4593 2017-09-21 Simon Marchi <simon.marchi@ericsson.com>
4594
4595 * guile/scm-value.c (gdbscm_value_address): Initialize address,
4596 get rid of res_val.
4597
4598 2017-09-22 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
4599
4600 * configure.nat <i386sol2,i386>: Add fork-inferior.o to NATDEPFILES.
4601 <sol2,sparc>: Likewise.
4602 <sol2-64,i386>: Likewise.
4603
4604 * warning.m4 (AM_GDB_WARNINGS): Disable -Wunknown-pragmas,
4605 -Wdeprecated-declarations on *-*-solaris*.
4606 * configure: Regenerate.
4607
4608 * procfs.c: Include "nat/inferior.h".
4609 (procfs_info_proc): Fix typo.
4610
4611 2017-09-21 Kevin Buettner <kevinb@redhat.com>
4612
4613 * remote.c (vector): Include.
4614 (struct private_thread_info): Add field, thread_handle.
4615 (free_private_thread_info): Deallocate storage associated with
4616 thread handle.
4617 (get_private_info_thread): Initialize `thread_handle' field.
4618 (struct thread_item): Add field, thread_handle.
4619 (clear_threads_listing_context): Deallocate storage associated
4620 with thread handle.
4621 (start_thread): Add support for "handle" attribute.
4622 (thread_attributes): Add "handle".
4623 (remote_get_threads_with_qthreadinfo): Initialize thread_handle
4624 field.
4625 (remote_update_thread_list): Update thread_handle.
4626 (remote_thread_handle_to_thread_info): New function.
4627 (init_remote_ops): Initialize to_thread_handle_to_thread_info.
4628
4629 2017-09-21 Kevin Buettner <kevinb@redhat.com>
4630
4631 * python/py-inferior.c (gdbpy_thread_from_thread_handle): New
4632 function.
4633 (inferior_object_methods): Add gdbpy_thread_from_thread_handle.
4634 * python/python-internal.h (thread_object_type): Declare.
4635
4636 2017-09-21 Kevin Buettner <kevinb@redhat.com>
4637
4638 * target.h (struct target_ops): Add to_thread_handle_to_thread_info.
4639 (target_thread_handle_to_thread_info): Declare.
4640 * target.c (target_thread_handle_to_thread_info): New function.
4641 * target-delegates.c: Regenerate.
4642 * gdbthread.h (find_thread_by_handle): Declare.
4643 * thread.c (find_thread_by_handle): New function.
4644 * linux-thread-db.c (thread_db_thread_handle_to_thread_info): New
4645 function.
4646 (init_thread_db_ops): Register thread_db_thread_handle_to_thread_info.
4647
4648 2017-09-21 Simon Marchi <simon.marchi@ericsson.com>
4649
4650 * nat/linux-waitpid.c (linux_debug): Add ATTRIBUTE_PRINTF.
4651
4652 2017-09-21 Simon Marchi <simon.marchi@ericsson.com>
4653
4654 * microblaze-tdep.c (microblaze_debug): Add ATTRIBUTE_PRINTF.
4655
4656 2017-09-21 Yao Qi <yao.qi@linaro.org>
4657
4658 * configure.tgt (aarch64*-*-freebsd*): Add fbsd-tdep.o solib-svr4.o
4659 to gdb_target_obs.
4660
4661 2017-09-20 Tom Tromey <tom@tromey.com>
4662
4663 * breakpoint.c (struct counted_command_line): Remove.
4664 (breakpoint_commands): Update.
4665 (alloc_counted_command_line, incref_counted_command_line)
4666 (decref_counted_command_line, do_cleanup_counted_command_line)
4667 (make_cleanup_decref_counted_command_line): Remove.
4668 (breakpoint_set_commands, commands_command_1, ~bpstats, bpstats)
4669 (bpstat_clear_actions, bpstat_do_actions_1, watchpoint_check)
4670 (bpstat_stop_status, print_one_breakpoint_location, ~breakpoint)
4671 (save_breakpoints): Update.
4672 * breakpoint.h (counted_command_line): Now a typedef to
4673 shared_ptr.
4674 (struct breakpoint) <commands>: Now a counted_command_line.
4675 (struct bpstats) <command>: Likewise.
4676
4677 2017-09-20 Tom Tromey <tom@tromey.com>
4678
4679 * breakpoint.c (struct commands_info, do_map_commands_command):
4680 Remove.
4681 (commands_command_1): Update.
4682 (iterate_over_related_breakpoints): Take a function_view.
4683 (do_delete_breakpoint, do_map_delete_breakpoint): Remove.
4684 (delete_command): Update.
4685 (map_breakpoint_numbers): Take a function_view.
4686 (do_disable_breakpoint, do_map_delete_breakpoint): Remove.
4687 (disable_command): Update.
4688 (do_enable_breakpoint, do_map_enable_breakpoint): Remove.
4689 (enable_command): Update.
4690 (struct disp_data, do_enable_breakpoint_disp)
4691 (do_map_enable_once_breakpoint, do_map_enable_count_breakpoint)
4692 (do_map_enable_delete_breakpoint): Remove.
4693 (enable_once_command, enable_count_command, enable_delete_command)
4694 (delete_trace_variable_command): Update.
4695
4696 2017-09-20 Tom Tromey <tom@tromey.com>
4697
4698 * breakpoint.c (~bpstats): Rename from bpstat_free. Update.
4699 (bpstat_clear): Use delete.
4700 (bpstats): New constructors.
4701 (bpstat_copy, bpstat_stop_status): Use new.
4702 (dprintf_after_condition_true): Update.
4703 * breakpoint.h (bpstats::bpstats): Add constructors.
4704 (bpstats::~bpstats): Add destructor.
4705
4706 2017-09-20 Pedro Alves <palves@redhat.com>
4707
4708 * eval.c (make_params): Delete, refactored as ...
4709 (class fake_method): ... this new type's ctor.
4710 (fake_method::~fake_method): New.
4711 (evaluate_subexp_standard): Use 'fake_method'.
4712
4713 2017-09-20 Tom Tromey <tom@tromey.com>
4714
4715 * windows-nat.c (get_windows_debug_event, windows_wait)
4716 (do_initial_windows_stuff, windows_attach): Update.
4717 * utils.c (vwarning, internal_vproblem): Update.
4718 (ui_unregister_input_event_handler_cleanup)
4719 (prepare_to_handle_input): Remove.
4720 (class scoped_input_handler): New.
4721 (defaulted_query, prompt_for_continue): Update.
4722 * tui/tui-hooks.c (tui_refresh_frame_and_register_information):
4723 Update.
4724 * top.c (undo_terminal_modifications_before_exit): Update.
4725 * target/target.h (target_terminal_init, target_terminal_inferior)
4726 (target_terminal_ours): Don't declare.
4727 (class target_terminal): New.
4728 * target.h (target_terminal_is_inferior, target_terminal_is_ours)
4729 (target_terminal_ours_for_output)
4730 (make_cleanup_restore_target_terminal): Don't declare.
4731 (target_terminal_info): Remove.
4732 * target.c (enum terminal_state, terminal_state): Remove.
4733 (target_terminal::terminal_state): Define.
4734 (target_terminal::init): Rename from target_terminal_init.
4735 (target_terminal::inferior): Rename from
4736 target_terminal_inferior.
4737 (target_terminal::ours): Rename from target_terminal_ours.
4738 (target_terminal::ours_for_output): Rename from
4739 target_terminal_ours_for_output.
4740 (target_terminal::info): New method.
4741 (cleanup_restore_target_terminal)
4742 (make_cleanup_restore_target_terminal): Remove.
4743 * solib.c (handle_solib_event): Update.
4744 * remote.c (remote_serial_quit_handler): Update.
4745 (remote_terminal_inferior, remote_wait_as): Update.
4746 * record-full.c (record_full_wait_1): Update.
4747 * nto-procfs.c (procfs_create_inferior): Update.
4748 * nat/fork-inferior.c (startup_inferior): Update.
4749 * mi/mi-interp.c (mi_new_thread, mi_thread_exit)
4750 (mi_record_changed, mi_inferior_added, mi_inferior_appeared)
4751 (mi_inferior_exit, mi_inferior_removed, mi_traceframe_changed)
4752 (mi_tsv_created, mi_tsv_deleted, mi_tsv_modified)
4753 (mi_breakpoint_created, mi_breakpoint_deleted)
4754 (mi_breakpoint_modified, mi_on_resume, mi_solib_loaded)
4755 (mi_solib_unloaded, mi_command_param_changed, mi_memory_changed)
4756 (mi_user_selected_context_changed, report_initial_inferior):
4757 Update.
4758 * linux-nat.c (linux_nat_attach, linux_nat_terminal_ours)
4759 (linux_nat_terminal_inferior): Update.
4760 * infrun.c (follow_fork_inferior)
4761 (handle_vfork_child_exec_or_exit, do_target_resume)
4762 (check_curr_ui_sync_execution_done, handle_inferior_event_1)
4763 (handle_signal_stop, maybe_remove_breakpoints, normal_stop):
4764 Update.
4765 * inflow.c (child_terminal_init, info_terminal_command): Update.
4766 * infcmd.c (post_create_inferior, continue_1, prepare_one_step)
4767 (attach_command): Update.
4768 * infcall.c (call_thread_fsm_should_stop): Update.
4769 * gnu-nat.c (gnu_attach): Update.
4770 * extension.c (struct active_ext_lang_state)
4771 (restore_active_ext_lang): Update.
4772 * exceptions.c (print_flush): Update.
4773 * event-top.c (async_enable_stdin, default_quit_handler): Update.
4774 (struct quit_handler_cleanup_data, restore_quit_handler)
4775 (restore_quit_handler_dtor, make_cleanup_override_quit_handler):
4776 Remove.
4777 * cp-support.c (gdb_demangle): Update.
4778 * breakpoint.c (update_inserted_breakpoint_locations)
4779 (insert_breakpoint_locations, handle_jit_event)
4780 (disable_breakpoints_in_unloaded_shlib): Update.
4781 * annotate.c (annotate_breakpoints_invalid)
4782 (annotate_frames_invalid): Update.
4783
4784 2017-09-20 Tom Tromey <tom@tromey.com>
4785
4786 * main.c (catch_command_errors): Rename from
4787 catch_command_errors_const.
4788 (captured_main_1): Update.
4789
4790 2017-09-20 Pedro Alves <palves@redhat.com>
4791
4792 * cli/cli-cmds.c (list_command): Use print_sal_location.
4793 (print_sal_location): New function.
4794 (ambiguous_line_spec): Use print_sal_location.
4795 * linespec.c (symbol_to_sal): Record the symbol in the sal.
4796 * symtab.c (find_function_start_sal): Likewise.
4797 * symtab.h (symtab_and_line::symbol): New field.
4798
4799 2017-09-20 Pedro Alves <palves@redhat.com>
4800
4801 * linespec.c (minsym_found): Handle non-text minsyms.
4802 (symbol_to_sal): Record a sal.pc for non-block, non-label symbols.
4803
4804 2017-09-20 Walfred Tedeschi <walfred.tedeschi@intel.com>
4805
4806 * features/Makefile (i386-avx-mpx-avx512-pku.dat): Add missing
4807 backslash.
4808
4809 2017-09-20 Walfred Tedeschi <walfred.tedeschi@intel.com>
4810
4811 * gdb.arch/i386-avx512.c (move_zmm_data_to_reg): Use
4812 vmovups instead vmovaps.
4813 (move_zmm_data_to_memory): Use vmovups instead vmovaps.
4814
4815 2017-09-19 John Baldwin <jhb@FreeBSD.org>
4816
4817 * NEWS (Changes since GDB 8.0): Add starti.
4818 * infcmd.c (enum run_break): New.
4819 (run_command_1): Queue pending event for RUN_STOP_AT_FIRST_INSN
4820 case.
4821 (run_command): Use enum run_how.
4822 (start_command): Likewise.
4823 (starti_command): New function.
4824 (RUN_ARGS_HELP): New macro.
4825 (_initialize_infcmd): Use RUN_ARGS_HELP for run and start
4826 commands. Add starti command.
4827
4828 2017-09-19 Yao Qi <yao.qi@linaro.org>
4829
4830 * Makefile.in (monitor.o): Remove the rule.
4831
4832 2017-09-19 Yao Qi <yao.qi@linaro.org>
4833
4834 * annotate.h (struct annotate_arg_emitter): Use
4835 DISABLE_COPY_AND_ASSIGN.
4836 * common/refcounted-object.h (refcounted_object): Likewise.
4837 * completer.h (struct completion_result): Likewise.
4838 * dwarf2read.c (struct dwarf2_per_objfile): Likewise.
4839 * filename-seen-cache.h (filename_seen_cache): Likewise.
4840 * gdbcore.h (thread_section_name): Likewise.
4841 * gdb_regex.h (compiled_regex): Likewise.
4842 * gdbthread.h (scoped_restore_current_thread): Likewise.
4843 * inferior.h (scoped_restore_current_inferior): Likewise.
4844 * jit.c (jit_reader): Likewise.
4845 * linespec.h (struct linespec_result): Likewise.
4846 * mi/mi-parse.h (struct mi_parse): Likewise.
4847 * nat/fork-inferior.c (execv_argv): Likewise.
4848 * progspace.h (scoped_restore_current_program_space): Likewise.
4849 * python/python-internal.h (class gdbpy_enter): Likewise.
4850 * regcache.h (regcache): Likewise.
4851 * target-descriptions.c (struct tdesc_reg): Likewise.
4852 (struct tdesc_type): Likewise.
4853 (struct tdesc_feature): Likewise.
4854 * ui-out.h (ui_out_emit_type): Likewise.
4855
4856 2017-09-18 Simon Marchi <simon.marchi@ericsson.com>
4857
4858 * dwarf2expr.c (dwarf_expr_context::execute_stack_op): Remove
4859 label abort_expression.
4860
4861 2017-09-16 Simon Marchi <simon.marchi@ericsson.com>
4862
4863 * common/buffer.c (buffer_xml_printf): Adjust.
4864 * common/xml-utils.c (xml_escape_text): Change return type to
4865 std::string, update code accordingly.
4866 * common/xml-utils.h (xml_escape_text): Change return type to
4867 std::string.
4868 * rs6000-aix-tdep.c (rs6000_aix_shared_library_to_xml): Adjust.
4869 * windows-tdep.c (windows_xfer_shared_library): Adjust.
4870 * unittests/xml-utils-selftests.c (test_xml_escape_text):
4871 Adjust.
4872
4873 2017-09-16 Simon Marchi <simon.marchi@ericsson.com>
4874
4875 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add new source file.
4876 (SUBDIR_UNITTESTS_OBS): Add new object file.
4877 * unittests/xml-utils-selftests.c: New file.
4878
4879 2017-09-16 Simon Marchi <simon.marchi@ericsson.com>
4880
4881 * common/selftest.h (selftest): New struct/interface.
4882 (register_test): Add name parameter, add new overload.
4883 (run_tests): Add filter parameter.
4884 (for_each_selftest_ftype): New typedef.
4885 (for_each_selftest): New declaration.
4886 * common/selftest.c (tests): Change type to
4887 map<string, unique_ptr<selftest>>.
4888 (simple_selftest): New struct.
4889 (register_test): New function.
4890 (register_test): Add name parameter and use it.
4891 (run_tests): Add filter parameter and use it. Add prints.
4892 Adjust to vector -> map change.
4893 * aarch64-tdep.c (_initialize_aarch64_tdep): Add names when
4894 registering selftests.
4895 * arm-tdep.c (_initialize_arm_tdep): Likewise.
4896 * disasm-selftests.c (_initialize_disasm_selftests): Likewise.
4897 * dwarf2-frame.c (_initialize_dwarf2_frame): Likewise.
4898 * dwarf2loc.c (_initialize_dwarf2loc): Likewise.
4899 * findvar.c (_initialize_findvar): Likewise.
4900 * gdbarch-selftests.c (_initialize_gdbarch_selftests): Likewise.
4901 * maint.c (maintenance_selftest): Update call to run_tests.
4902 (maintenance_info_selftests): New function.
4903 (_initialize_maint_cmds): Register "maintenance info selftests"
4904 command. Update "maintenance selftest" doc.
4905 * regcache.c (_initialize_regcache): Add names when registering
4906 selftests.
4907 * rust-exp.y (_initialize_rust_exp): Likewise.
4908 * selftest-arch.c (gdbarch_selftest): New struct.
4909 (gdbarch_tests): Remove.
4910 (register_test_foreach_arch): Add name parameter. Call
4911 register_test.
4912 (tests_with_arch): Remove, move most content to
4913 gdbarch_selftest::operator().
4914 (_initialize_selftests_foreach_arch): Remove.
4915 * selftest-arch.h (register_test_foreach_arch): Add name
4916 parameter.
4917 (run_tests_with_arch): New declaration.
4918 * utils-selftests.c (_initialize_utils_selftests): Add names
4919 when registering selftests.
4920 * utils.c (_initialize_utils): Likewise.
4921 * unittests/array-view-selftests.c
4922 (_initialize_array_view_selftests): Likewise.
4923 * unittests/environ-selftests.c (_initialize_environ_selftests):
4924 Likewise.
4925 * unittests/function-view-selftests.c
4926 (_initialize_function_view_selftests): Likewise.
4927 * unittests/offset-type-selftests.c
4928 (_initialize_offset_type_selftests): Likewise.
4929 * unittests/optional-selftests.c
4930 (_initialize_optional_selftests): Likewise.
4931 * unittests/scoped_restore-selftests.c
4932 (_initialize_scoped_restore_selftests): Likewise.
4933 * NEWS: Document "maintenance selftest" and "maint info
4934 selftests".
4935
4936 2017-09-16 Simon Marchi <simon.marchi@ericsson.com>
4937
4938 * mi/mi-main.c (mi_load_progress): Restore current_uiout using a
4939 scoped_restore.
4940
4941 2017-09-16 Simon Marchi <simon.marchi@ericsson.com>
4942
4943 * mi/mi-main.c (mi_load_progress): Make uiout variable
4944 a unique_ptr.
4945
4946 2017-09-15 Pedro Alves <palves@redhat.com>
4947
4948 * compile/compile-c-types.c (convert_enum, convert_int)
4949 (convert_float): Adjust to refer to int_type_v0 and float_type_v0.
4950
4951 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
4952
4953 * dwarf2read.c (copy_string): Remove.
4954 (parse_macro_definition): Replace copy_string with savestring.
4955
4956 2017-09-15 Yao Qi <yao.qi@linaro.org>
4957
4958 * configure.tgt (i[34567]86-*-darwin*): Append amd64.o to
4959 gdb_target_obs.
4960 (i[34567]86-*-solaris2.1[0-9]* | x86_64-*-solaris2.1[0-9]*):
4961 Likewise.
4962 (i[34567]86-*-linux*): Likewise.
4963
4964 2017-09-14 Simon Marchi <simon.marchi@ericsson.com>
4965
4966 * dwarf2expr.h (dwarf_stack_value): Add constructor.
4967 (dwarf_expr_context) <~dwarf_expr_context>: Define as default.
4968 <stack>: Change type to std::vector.
4969 <stack_len, stack_allocated>: Remove.
4970 <grow_stack>: Remove.
4971 * dwarf2expr.c (dwarf_expr_context::dwarf_expr_context): Adjust.
4972 (dwarf_expr_context::~dwarf_expr_context): Remove.
4973 (dwarf_expr_context::grow_stack): Remove.
4974 (dwarf_expr_context::push): Adjust.
4975 (dwarf_expr_context::pop): Adjust.
4976 (dwarf_expr_context::fetch): Adjust.
4977 (dwarf_expr_context::fetch_in_stack_memory): Adjust.
4978 (dwarf_expr_context::stack_empty_p): Adjust.
4979 (dwarf_expr_context::execute_stack_op): Adjust.
4980
4981 2017-09-14 Simon Marchi <simon.marchi@ericsson.com>
4982
4983 * dwarf2expr.h (dwarf_expr_context) <stack_empty_p>: Change
4984 return type to bool.
4985 * dwarf2expr.c (dwarf_expr_context::stack_empty_p): Likewise.
4986
4987 2017-09-14 Simon Marchi <simon.marchi@ericsson.com>
4988
4989 * dwarf2expr.h (dwarf_expr_piece) <v.mem.in_stack_memory>:
4990 Change type to bool.
4991 (dwarf_stack_value) <in_stack_memory>: Likewise.
4992 (dwarf_expr_context) <push_address>: Change parameter type to
4993 bool.
4994 <fetch_in_stack_memory>: Change return type to bool.
4995 <push>: Change parameter type to bool.
4996 * dwarf2expr.c (dwarf_expr_context::push): Change parameter type
4997 to bool.
4998 (dwarf_expr_context::push_address): Likewise.
4999 (dwarf_expr_context::fetch_in_stack_memory): Change return type
5000 to bool.
5001 (dwarf_expr_context::execute_stack_op): Adjust.
5002 * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Adjust.
5003
5004 2017-09-14 Simon Marchi <simon.marchi@ericsson.com>
5005
5006 * dwarf2expr.h (struct dwarf_expr_piece): Move up.
5007 (struct dwarf_expr_context) <n_pieces>: Remove.
5008 <pieces>: Change type to std::vector.
5009 * dwarf2expr.c (dwarf_expr_context::dwarf_expr_context): Adjust.
5010 (dwarf_expr_context::~dwarf_expr_context): Don't manually free
5011 pieces.
5012 (dwarf_expr_context::add_piece): Adjust.
5013 * dwarf2loc.c (struct piece_closure): Initialize fields.
5014 <n_pieces>: Remove.
5015 <pieces>: Change type to std::vector.
5016 (allocate_piece_closure): Adjust, change parameter to
5017 std::vector rvalue and std::move it to piece_closure.
5018 (rw_pieced_value): Adjust.
5019 (check_pieced_synthetic_pointer): Adjust.
5020 (indirect_synthetic_pointer): Adjust.
5021 (coerce_pieced_ref): Adjust.
5022 (free_pieced_value_closure): Adjust. Use delete to free
5023 piece_closure.
5024 (dwarf2_evaluate_loc_desc_full): Adjust. std::move ctx.pieces
5025 to allocate_piece_closure.
5026 (dwarf2_loc_desc_get_symbol_read_needs): Adjust.
5027
5028 2017-09-12 Simon Marchi <simon.marchi@ericsson.com>
5029
5030 * probe.h (probe_ops_cp): Remove typedef.
5031 (DEF_VEC_P (probe_ops_cp)): Remove.
5032 (all_probe_ops): Change type to std::vector.
5033 * probe.c (info_probes_for_ops): Adjust to vector change.
5034 (probe_linespec_to_ops): Likewise.
5035 (all_probe_ops): Change type to std::vector.
5036 (_initialize_probe): Adjust to vector change.
5037 * dtrace-probe.c (_initialize_dtrace_probe): Likewise.
5038 * elfread.c (elf_get_probes): Likewise.
5039 * stap-probe.c (_initialize_stap_probe): Likewise.
5040
5041 2017-09-12 Simon Marchi <simon.marchi@ericsson.com>
5042
5043 * probe.h (struct bound_probe): Define constructors.
5044 * probe.c (bound_probe_s): Remove typedef.
5045 (DEF_VEC_O (bound_probe_s)): Remove VEC.
5046 (collect_probes): Change return type to std::vector, remove
5047 cleanup.
5048 (compare_probes): Return bool, change parameter type. Change
5049 semantic to "less than".
5050 (gen_ui_out_table_header_info): Change parameter to std::vector
5051 and update.
5052 (exists_probe_with_pops): Likewise.
5053 (info_probes_for_ops): Update to std::vector change.
5054 (enable_probes_command): Likewise.
5055 (disable_probes_command): Likewise.
5056
5057 2017-09-12 Simon Marchi <simon.marchi@ericsson.com>
5058
5059 * probe.h (struct probe_ops) <get_probes>: Change parameter from
5060 vec to std::vector.
5061 * probe.c (parse_probes_in_pspace): Update.
5062 (find_probes_in_objfile): Update.
5063 (find_probe_by_pc): Update.
5064 (collect_probes): Update.
5065 (probe_any_get_probes): Update.
5066 * symfile.h (struct sym_probe_fns) <sym_get_probes> Change
5067 return type to reference to std::vector.
5068 * dtrace-probe.c (dtrace_process_dof_probe): Change parameter to
5069 std::vector and update.
5070 (dtrace_process_dof): Likewise.
5071 (dtrace_get_probes): Likewise.
5072 * elfread.c (elf_get_probes): Change return type to std::vector,
5073 store an std::vector in bfd_data.
5074 (probe_key_free): Update to std::vector.
5075 * stap-probe.c (handle_stap_probe): Change parameter to
5076 std::vector and update.
5077 (stap_get_probes): Likewise.
5078 * symfile-debug.c (debug_sym_get_probes): Change return type to
5079 std::vector and update.
5080
5081 2017-09-11 Tom Tromey <tom@tromey.com>
5082
5083 * breakpoint.c (program_breakpoint_here_p): Update.
5084 * target.c (make_scoped_restore_show_memory_breakpoints): Rename
5085 from make_show_memory_breakpoints_cleanup. Return a
5086 scoped_restore_tmpl<int>.
5087 (restore_show_memory_breakpoints): Remove.
5088 * ppc-linux-tdep.c (ppc_linux_memory_remove_breakpoint): Update.
5089 * mem-break.c (memory_validate_breakpoint): Update.
5090 * ia64-tdep.c (ia64_memory_insert_breakpoint): Update.
5091 (ia64_memory_remove_breakpoint): Update.
5092 (ia64_breakpoint_from_pc): Update.
5093 * target.h (make_scoped_restore_show_memory_breakpoints): Rename
5094 from make_show_memory_breakpoints_cleanup.
5095
5096 2017-09-11 Tom Tromey <tom@tromey.com>
5097
5098 * d-namespace.c (d_lookup_symbol): Use std::string.
5099 (find_symbol_in_baseclass): Likewise.
5100
5101 2017-09-11 Tom Tromey <tom@tromey.com>
5102
5103 * ctf.c (ctf_start): Use std::string.
5104
5105 2017-09-11 Tom Tromey <tom@tromey.com>
5106
5107 * ada-lang.c (is_known_support_routine): Update.
5108 (ada_unhandled_exception_name_addr_from_raise): Update.
5109 * guile/scm-frame.c (gdbscm_frame_name): Update.
5110 * python/py-frame.c (frapy_name): Update.
5111 (frapy_function): Update.
5112 * stack.h (find_frame_funname): Update.
5113 * stack.c (find_frame_funname): Return unique_xmalloc_ptr.
5114 (print_frame): Update.
5115
5116 2017-09-11 Tom Tromey <tom@tromey.com>
5117
5118 * findcmd.c (put_bits): Take a gdb::byte_vector.
5119 (parse_find_args): Return gdb::byte_vector. "args" now const.
5120 Remove "pattern_bufp" and "pattern_lenp" parameters. Remove
5121 cleanups.
5122 (find_command): Update.
5123
5124 2017-09-11 Tom Tromey <tom@tromey.com>
5125
5126 * cli/cli-script.c (class scoped_restore_hook_in): New.
5127 (clear_hook_in_cleanup): Remove.
5128 (execute_cmd_pre_hook, execute_cmd_post_hook): Use
5129 scoped_restore_hook_in.
5130
5131 2017-09-11 Tom Tromey <tom@tromey.com>
5132
5133 * cli/cli-script.c (restore_interp): Remove.
5134 (read_command_lines): Use scoped_restore_interp.
5135 * interps.c (scoped_restore_interp::set_temp): Rename from
5136 interp_set_temp.
5137 * interps.h (class scoped_restore_interp): New.
5138 (interp_set_temp): Remove.
5139
5140 2017-09-11 Tom Tromey <tom@tromey.com>
5141
5142 * mi/mi-cmd-catch.c (mi_cmd_catch_assert)
5143 (mi_cmd_catch_exception, mi_catch_load_unload): Update.
5144 * mi/mi-cmd-break.c (setup_breakpoint_reporting): Return a
5145 scoped_restore.
5146 (mi_cmd_break_insert_1): Update.
5147 * mi/mi-cmd-break.h (setup_breakpoint_reporting): Return a
5148 scoped_restore.
5149
5150 2017-09-11 Tom Tromey <tom@tromey.com>
5151
5152 * demangle.c (demangle_command): Update.
5153 * breakpoint.c (disable_command): Update.
5154 (enable_command): Update.
5155 (find_location_by_number): Make "number" const. Use
5156 get_number_trailer.
5157 * cli/cli-utils.c (extract_arg): Return std::string.
5158 * probe.c (parse_probe_linespec): Update. Change types.
5159 (collect_probes): Take string arguments.
5160 (parse_probe_linespec): Likewise.
5161 (info_probes_for_ops): Update.
5162 (enable_probes_command): Update.
5163 (disable_probes_command): Update.
5164 * break-catch-sig.c (catch_signal_split_args): Update.
5165 * mi/mi-parse.c (mi_parse): Update.
5166
5167 2017-09-11 Tom Tromey <tom@tromey.com>
5168
5169 * language.h (language_enum): Make argument const.
5170 * language.c (language_enum): Make argument const.
5171
5172 2017-09-11 Tom Tromey <tom@tromey.com>
5173
5174 * common/common-utils.h (skip_to_space): Remove macro, redeclare
5175 as function.
5176 (skip_to_space): Rename from skip_to_space_const.
5177 * common/common-utils.c (skip_to_space): New function.
5178 (skip_to_space): Rename from skip_to_space_const.
5179 * cli/cli-utils.h (get_number): Rename from get_number_const.
5180 (extract_arg): Rename from extract_arg_const.
5181 * cli/cli-utils.c (get_number): Rename from get_number_const.
5182 (extract_arg): Rename from extract_arg_const.
5183 (number_or_range_parser::get_number): Use ::get_number.
5184 * aarch64-linux-tdep.c, ada-lang.c, arm-linux-tdep.c, ax-gdb.c,
5185 break-catch-throw.c, breakpoint.c, cli/cli-cmds.c, cli/cli-dump.c,
5186 cli/cli-script.c, cli/cli-setshow.c, compile/compile.c,
5187 completer.c, demangle.c, disasm.c, findcmd.c, linespec.c,
5188 linux-tdep.c, linux-thread-db.c, location.c, mi/mi-parse.c,
5189 minsyms.c, nat/linux-procfs.c, printcmd.c, probe.c,
5190 python/py-breakpoint.c, record.c, rust-exp.y, serial.c, stack.c,
5191 stap-probe.c, tid-parse.c, tracepoint.c: Update all callers.
5192
5193 2017-09-11 Tom Tromey <tom@tromey.com>
5194
5195 * python/python.c (do_start_initialization): Use
5196 py-event-types.def to initialize types.
5197 Define all object type structures.
5198 * python/python-internal.h: Don't declare event initialization
5199 functions.
5200 * python/py-threadevent.c (thread_event_object_type): Don't
5201 define.
5202 * python/py-stopevent.c (stop_event_object_type): Don't define.
5203 * python/py-signalevent.c (signal_event_object_type): Don't
5204 declare or define.
5205 * python/py-newobjfileevent.c (new_objfile_event_object_type)
5206 (clear_objfiles_event_object_type): Don't declare or define.
5207 * python/py-infevents.c (inferior_call_pre_event_object_type)
5208 (inferior_call_post_event_object_type)
5209 (register_changed_event_object_type)
5210 (memory_changed_event_object_type): Don't declare or define.
5211 * python/py-inferior.c (new_thread_event_object_type)
5212 (new_inferior_event_object_type)
5213 (inferior_deleted_event_object_type): Don't declare or define.
5214 * python/py-exitedevent.c (exited_event_object_type): Don't
5215 declare or define.
5216 * python/py-evts.c (gdbpy_initialize_py_events): Use
5217 py-all-events.def.
5218 * python/py-events.h (thread_event_object_type): Don't declare.
5219 (events_object): Use py-all-events.def.
5220 * python/py-event.h (GDBPY_NEW_EVENT_TYPE): Remove. Use
5221 py-event-types.def.
5222 * python/py-event-types.def: New file.
5223 * python/py-continueevent.c (create_continue_event_object): Don't
5224 declare or define.
5225 * python/py-bpevent.c (breakpoint_event_object_type): Don't
5226 declare or define.
5227 * python/py-all-events.def: New file.
5228
5229 2017-09-11 Tom Tromey <tom@tromey.com>
5230
5231 * python/py-threadevent.c (create_thread_event_object): Return
5232 gdbpy_ref.
5233 * python/py-stopevent.h (create_stop_event_object)
5234 (create_breakpoint_event_object, create_signal_event_object):
5235 Update.
5236 * python/py-stopevent.c (create_stop_event_object): Return
5237 gdbpy_ref.
5238 (emit_stop_event): Update.
5239 * python/py-signalevent.c (create_signal_event_object): Return
5240 gdbpy_ref.
5241 * python/py-infevents.c (create_inferior_call_event_object):
5242 Update.
5243 * python/py-event.h (create_event_object)
5244 (create_thread_event_object): Update.
5245 * python/py-event.c (create_event_object): Return gdbpy_ref.
5246 * python/py-continueevent.c: Return gdbpy_ref.
5247 * python/py-bpevent.c (create_breakpoint_event_object): Return
5248 gdbpy_ref.
5249
5250 2017-09-11 Tom Tromey <tom@tromey.com>
5251
5252 PR python/15622:
5253 * NEWS: Add entry.
5254 * python/python.c (do_start_initialization): Initialize new event
5255 types.
5256 * python/python-internal.h (gdbpy_initialize_new_inferior_event)
5257 (gdbpy_initialize_inferior_deleted_event)
5258 (gdbpy_initialize_new_thread_event): Declare.
5259 * python/py-threadevent.c (create_thread_event_object): Add option
5260 "thread" parameter.
5261 * python/py-inferior.c (new_thread_event_object_type)
5262 (new_inferior_event_object_type)
5263 (inferior_deleted_event_object_type): Declare.
5264 (python_new_inferior, python_inferior_deleted): New functions.
5265 (add_thread_object): Emit new_thread event.
5266 (gdbpy_initialize_inferior): Attach new functions to corresponding
5267 observers.
5268 (new_thread, new_inferior, inferior_deleted): Define new event
5269 types.
5270 * python/py-evts.c (gdbpy_initialize_py_events): Add new
5271 registries.
5272 * python/py-events.h (events_object) <new_inferior,
5273 inferior_deleted, new_thread>: New fields.
5274 * python/py-event.h (create_thread_event_breakpoint): Add optional
5275 "thread" parameter.
5276
5277 2017-09-10 Andrew Burgess <andrew.burgess@embecosm.com>
5278
5279 * utils.c (abort_with_message): Don't compare gdb_stderr to NULL,
5280 check current_ui instead.
5281 (internal_vproblem): Likewise.
5282
5283 2017-09-09 Simon Marchi <simon.marchi@ericsson.com>
5284
5285 * thread.c (print_thread_info_1): Remove unnecessary calls to
5286 uiout->is_mi_like_p.
5287
5288 2017-09-09 Tom Tromey <tom@tromey.com>
5289
5290 * namespace.h (add_using_directive): Update.
5291 * namespace.c (add_using_directive): Change type of excludes to
5292 std::vector.
5293 * dwarf2read.c (read_import_statement): Use std::vector.
5294 (read_namespace): Update.
5295 * cp-namespace.c (cp_scan_for_anonymous_namespaces): Update.
5296
5297 2017-09-09 Tom Tromey <tom@tromey.com>
5298
5299 * linespec.c (create_sals_line_offset): Use gdb::def_vector.
5300
5301 2017-09-09 Tom Tromey <tom@tromey.com>
5302
5303 * p-valprint.c (pascal_object_print_value): Use gdb::byte_vector.
5304
5305 2017-09-09 Tom Tromey <tom@tromey.com>
5306
5307 * stack.c (func_command): Use gdb::def_vector.
5308
5309 2017-09-09 Tom Tromey <tom@tromey.com>
5310
5311 * mi/mi-cmd-var.c (mi_cmd_var_list_children): Use gdb::optional,
5312 ui_out_emit_list, ui_out_emit_tuple.
5313 (mi_cmd_var_update): Likewise.
5314
5315 2017-09-09 Tom Tromey <tom@tromey.com>
5316
5317 * mi/mi-interp.c (mi_user_selected_context_changed): Use
5318 ui_out_redirect_pop.
5319 * guile/scm-ports.c (ioscm_with_output_to_port_worker): Use
5320 ui_out_redirect_pop.
5321 * utils.c (do_ui_out_redirect_pop)
5322 (make_cleanup_ui_out_redirect_pop): Remove.
5323 * top.c (execute_command_to_string): Use ui_out_redirect_pop.
5324 * utils.h (make_cleanup_ui_out_redirect_pop): Remove.
5325 * ui-out.h (ui_out_redirect_pop): New class.
5326
5327 2017-09-09 Tom Tromey <tom@tromey.com>
5328
5329 * mi/mi-main.c (output_cores): Use ui_out_emit_list.
5330 (list_available_thread_groups, mi_cmd_list_thread_groups)
5331 (mi_cmd_data_list_changed_registers, mi_cmd_data_read_memory)
5332 (mi_cmd_data_read_memory_bytes, mi_cmd_trace_frame_collected):
5333 Likewise.
5334
5335 2017-09-09 Tom Tromey <tom@tromey.com>
5336
5337 * disasm.c (gdb_pretty_print_disassembler::pretty_print_insn): Use
5338 ui_out_emit_tuple.
5339
5340 2017-09-09 Tom Tromey <tom@tromey.com>
5341
5342 * target.c (flash_erase_command): Use ui_out_emit_tuple.
5343 * stack.c (print_frame): Use ui_out_emit_tuple.
5344 * spu-tdep.c (info_spu_event_command): Use ui_out_emit_tuple.
5345 (info_spu_mailbox_command, info_spu_dma_command)
5346 (info_spu_proxydma_command): Likewise.
5347 * mi/mi-main.c (mi_cmd_trace_frame_collected): Use
5348 ui_out_emit_tuple, gdb::byte_vector, bin2hex.
5349 * mi/mi-cmd-file.c (mi_cmd_file_list_shared_libraries): Use
5350 ui_out_emit_tuple.
5351 * breakpoint.c (print_it_watchpoint): Use ui_out_emit_tuple.
5352
5353 2017-09-09 Tom Tromey <tom@tromey.com>
5354
5355 * ui-out.h (make_cleanup_ui_out_table_begin_end): Remove.
5356 (class ui_out_emit_table): Update comment.
5357 * ui-out.c (do_cleanup_table_end)
5358 (make_cleanup_ui_out_table_begin_end): Remove.
5359 * spu-tdep.c (info_spu_mailbox_list): Use ui_out_emit_table.
5360 (info_spu_dma_cmdlist): Likewise.
5361 * probe.c (info_probes_for_ops): Use ui_out_emit_table.
5362 * darwin-nat-info.c (darwin_debug_regions_recurse): Use
5363 ui_out_emit_table.
5364
5365 2017-09-09 Tom Tromey <tom@tromey.com>
5366
5367 * thread.c (print_thread_info_1): Use ui_out_emit_table,
5368 ui_out_emit_list, gdb::optional.
5369
5370 2017-09-09 John Baldwin <jhb@FreeBSD.org>
5371
5372 * aarch64-linux-nat.c: Remove _initialize_aarch64_linux_nat
5373 prototype.
5374 * aarch64-linux-tdep.c: Remove _initialize_aarch64_linux_tdep
5375 prototype.
5376 * aarch64-newlib-tdep.c: Remove _initialize_aarch64_newlib_tdep
5377 prototype.
5378 * aarch64-tdep.c: Remove _initialize_aarch64_tdep prototype.
5379 * ada-exp.y: Remove _initialize_ada_exp prototype.
5380 * ada-lang.c: Remove _initialize_ada_language prototype.
5381 * ada-tasks.c: Remove _initialize_tasks prototype.
5382 * addrmap.c: Remove _initialize_addrmap prototype.
5383 * agent.c: Remove _initialize_agent prototype.
5384 * aix-thread.c: Remove _initialize_aix_thread prototype.
5385 * alpha-bsd-nat.c: Remove _initialize_alphabsd_nat prototype.
5386 * alpha-linux-nat.c: Remove _initialize_alpha_linux_nat prototype.
5387 * alpha-linux-tdep.c: Remove _initialize_alpha_linux_tdep
5388 prototype.
5389 * alpha-nbsd-tdep.c: Remove _initialize_alphanbsd_tdep prototype.
5390 * alpha-obsd-tdep.c: Remove _initialize_alphaobsd_tdep prototype.
5391 * alpha-tdep.c: Remove _initialize_alpha_tdep prototype.
5392 * amd64-darwin-tdep.c: Remove _initialize_amd64_darwin_tdep
5393 prototype.
5394 * amd64-dicos-tdep.c: Remove _initialize_amd64_dicos_tdep
5395 prototype.
5396 * amd64-fbsd-nat.c: Remove _initialize_amd64fbsd_nat prototype.
5397 * amd64-fbsd-tdep.c: Remove _initialize_amd64fbsd_tdep prototype.
5398 * amd64-linux-nat.c: Remove _initialize_amd64_linux_nat prototype.
5399 * amd64-linux-tdep.c: Remove _initialize_amd64_linux_tdep
5400 prototype.
5401 * amd64-nbsd-nat.c: Remove _initialize_amd64nbsd_nat prototype.
5402 * amd64-nbsd-tdep.c: Remove _initialize_amd64nbsd_tdep prototype.
5403 * amd64-obsd-nat.c: Remove _initialize_amd64obsd_nat prototype.
5404 * amd64-obsd-tdep.c: Remove _initialize_amd64obsd_tdep prototype.
5405 * amd64-sol2-tdep.c: Remove _initialize_amd64_sol2_tdep prototype.
5406 * amd64-tdep.c: Remove _initialize_amd64_tdep prototype.
5407 * amd64-windows-nat.c: Remove _initialize_amd64_windows_nat
5408 prototype.
5409 * amd64-windows-tdep.c: Remove _initialize_amd64_windows_tdep
5410 prototype.
5411 * annotate.c: Remove _initialize_annotate prototype.
5412 * arc-newlib-tdep.c: Remove _initialize_arc_newlib_tdep prototype.
5413 * arc-tdep.c: Remove _initialize_arc_tdep prototype.
5414 * arch-utils.c: Remove _initialize_gdbarch_utils prototype.
5415 * arm-linux-nat.c: Remove _initialize_arm_linux_nat prototype.
5416 * arm-linux-tdep.c: Remove _initialize_arm_linux_tdep prototype.
5417 * arm-nbsd-tdep.c: Remove _initialize_arm_netbsd_tdep prototype.
5418 * arm-obsd-tdep.c: Remove _initialize_armobsd_tdep prototype.
5419 * arm-symbian-tdep.c: Remove _initialize_arm_symbian_tdep
5420 prototype.
5421 * arm-tdep.c: Remove _initialize_arm_tdep prototype.
5422 * arm-wince-tdep.c: Remove _initialize_arm_wince_tdep prototype.
5423 * auto-load.c: Remove _initialize_auto_load prototype.
5424 * auxv.c: Remove _initialize_auxv prototype.
5425 * avr-tdep.c: Remove _initialize_avr_tdep prototype.
5426 * ax-gdb.c: Remove _initialize_ax_gdb prototype.
5427 * bfin-linux-tdep.c: Remove _initialize_bfin_linux_tdep prototype.
5428 * bfin-tdep.c: Remove _initialize_bfin_tdep prototype.
5429 * break-catch-sig.c: Remove _initialize_break_catch_sig prototype.
5430 * break-catch-syscall.c: Remove _initialize_break_catch_syscall
5431 prototype.
5432 * break-catch-throw.c: Remove _initialize_break_catch_throw
5433 prototype.
5434 * breakpoint.c: Remove _initialize_breakpoint prototype.
5435 * bsd-uthread.c: Remove _initialize_bsd_uthread prototype.
5436 * btrace.c: Remove _initialize_btrace prototype.
5437 * charset.c: Remove _initialize_charset prototype.
5438 * cli/cli-cmds.c: Remove _initialize_cli_cmds prototype.
5439 * cli/cli-dump.c: Remove _initialize_cli_dump prototype.
5440 * cli/cli-interp.c: Remove _initialize_cli_interp prototype.
5441 * cli/cli-logging.c: Remove _initialize_cli_logging prototype.
5442 * cli/cli-script.c: Remove _initialize_cli_script prototype.
5443 * coff-pe-read.c: Remove _initialize_coff_pe_read prototype.
5444 * coffread.c: Remove _initialize_coffread prototype.
5445 * compile/compile.c: Remove _initialize_compile prototype.
5446 * complaints.c: Remove _initialize_complaints prototype.
5447 * completer.c: Remove _initialize_completer prototype.
5448 * copying.awk: Remove _initialize_copying prototype.
5449 * copying.c: Regenerate.
5450 * core-regset.c: Remove _initialize_core_regset prototype.
5451 * corefile.c: Remove _initialize_core prototype.
5452 * corelow.c: Remove _initialize_corelow prototype.
5453 * cp-abi.c: Remove _initialize_cp_abi prototype.
5454 * cp-namespace.c: Remove _initialize_cp_namespace prototype.
5455 * cp-support.c: Remove _initialize_cp_support prototype.
5456 * cp-valprint.c: Remove _initialize_cp_valprint prototype.
5457 * cris-linux-tdep.c: Remove _initialize_cris_linux_tdep prototype.
5458 * cris-tdep.c: Remove _initialize_cris_tdep prototype.
5459 * ctf.c: Remove _initialize_ctf prototype.
5460 * d-lang.c: Remove _initialize_d_language prototype.
5461 * darwin-nat-info.c: Remove _initialize_darwin_info_commands
5462 prototype.
5463 * darwin-nat.c: Remove _initialize_darwin_inferior prototype.
5464 * dbxread.c: Remove _initialize_dbxread prototype.
5465 * dcache.c: Remove _initialize_dcache prototype.
5466 * demangle.c: Remove _initialize_demangler prototype.
5467 * disasm-selftests.c: Remove _initialize_disasm_selftests
5468 prototype.
5469 * disasm.c: Remove _initialize_disasm prototype.
5470 * dtrace-probe.c: Remove _initialize_dtrace_probe prototype.
5471 * dummy-frame.c: Remove _initialize_dummy_frame prototype.
5472 * dwarf2-frame-tailcall.c: Remove _initialize_tailcall_frame
5473 prototype.
5474 * dwarf2-frame.c: Remove _initialize_dwarf2_frame prototype.
5475 * dwarf2expr.c: Remove _initialize_dwarf2expr prototype.
5476 * dwarf2loc.c: Remove _initialize_dwarf2loc prototype.
5477 * dwarf2read.c: Remove _initialize_dwarf2_read prototype.
5478 * elfread.c: Remove _initialize_elfread prototype.
5479 * exec.c: Remove _initialize_exec prototype.
5480 * extension.c: Remove _initialize_extension prototype.
5481 * f-lang.c: Remove _initialize_f_language prototype.
5482 * f-valprint.c: Remove _initialize_f_valprint prototype.
5483 * fbsd-nat.c: Remove _initialize_fbsd_nat prototype.
5484 * fbsd-tdep.c: Remove _initialize_fbsd_tdep prototype.
5485 * filesystem.c: Remove _initialize_filesystem prototype.
5486 * findcmd.c: Remove _initialize_mem_search prototype.
5487 * fork-child.c: Remove _initialize_fork_child prototype.
5488 * frame-base.c: Remove _initialize_frame_base prototype.
5489 * frame-unwind.c: Remove _initialize_frame_unwind prototype.
5490 * frame.c: Remove _initialize_frame prototype.
5491 * frv-linux-tdep.c: Remove _initialize_frv_linux_tdep prototype.
5492 * frv-tdep.c: Remove _initialize_frv_tdep prototype.
5493 * ft32-tdep.c: Remove _initialize_ft32_tdep prototype.
5494 * gcore.c: Remove _initialize_gcore prototype.
5495 * gdb_bfd.c: Remove _initialize_gdb_bfd prototype.
5496 * gdbarch.c: Regenerate.
5497 * gdbarch.sh: Remove _initialize_gdbarch prototype.
5498 * gdbtypes.c: Remove _initialize_gdbtypes prototype.
5499 * gnu-nat.c: Remove _initialize_gnu_nat prototype.
5500 * gnu-v2-abi.c: Remove _initialize_gnu_v2_abi prototype.
5501 * gnu-v3-abi.c: Remove _initialize_gnu_v3_abi prototype.
5502 * go-lang.c: Remove _initialize_go_language prototype.
5503 * go32-nat.c: Remove _initialize_go32_nat prototype.
5504 * guile/guile.c: Remove _initialize_guile prototype.
5505 * h8300-tdep.c: Remove _initialize_h8300_tdep prototype.
5506 * hppa-linux-nat.c: Remove _initialize_hppa_linux_nat prototype.
5507 * hppa-linux-tdep.c: Remove _initialize_hppa_linux_tdep prototype.
5508 * hppa-nbsd-nat.c: Remove _initialize_hppanbsd_nat prototype.
5509 * hppa-nbsd-tdep.c: Remove _initialize_hppanbsd_tdep prototype.
5510 * hppa-obsd-nat.c: Remove _initialize_hppaobsd_nat prototype.
5511 * hppa-obsd-tdep.c: Remove _initialize_hppaobsd_tdep prototype.
5512 * hppa-tdep.c: Remove _initialize_hppa_tdep prototype.
5513 * i386-bsd-nat.c: Remove _initialize_i386bsd_nat prototype.
5514 * i386-cygwin-tdep.c: Remove _initialize_i386_cygwin_tdep
5515 prototype.
5516 * i386-darwin-tdep.c: Remove _initialize_i386_darwin_tdep
5517 prototype.
5518 * i386-dicos-tdep.c: Remove _initialize_i386_dicos_tdep prototype.
5519 * i386-fbsd-nat.c: Remove _initialize_i386fbsd_nat prototype.
5520 * i386-fbsd-tdep.c: Remove _initialize_i386fbsd_tdep prototype.
5521 * i386-gnu-nat.c: Remove _initialize_i386gnu_nat prototype.
5522 * i386-gnu-tdep.c: Remove _initialize_i386gnu_tdep prototype.
5523 * i386-linux-nat.c: Remove _initialize_i386_linux_nat prototype.
5524 * i386-linux-tdep.c: Remove _initialize_i386_linux_tdep prototype.
5525 * i386-nbsd-nat.c: Remove _initialize_i386nbsd_nat prototype.
5526 * i386-nbsd-tdep.c: Remove _initialize_i386nbsd_tdep prototype.
5527 * i386-nto-tdep.c: Remove _initialize_i386nto_tdep prototype.
5528 * i386-obsd-nat.c: Remove _initialize_i386obsd_nat prototype.
5529 * i386-obsd-tdep.c: Remove _initialize_i386obsd_tdep prototype.
5530 * i386-sol2-nat.c: Remove _initialize_amd64_sol2_nat prototype.
5531 * i386-sol2-tdep.c: Remove _initialize_amd64_sol2_tdep prototype.
5532 * i386-tdep.c: Remove _initialize_i386_tdep prototype.
5533 * i386-windows-nat.c: Remove _initialize_i386_windows_nat
5534 prototype.
5535 * ia64-libunwind-tdep.c: Remove _initialize_libunwind_frame
5536 prototype.
5537 * ia64-linux-nat.c: Remove _initialize_ia64_linux_nat prototype.
5538 * ia64-linux-tdep.c: Remove _initialize_ia64_linux_tdep prototype.
5539 * ia64-tdep.c: Remove _initialize_ia64_tdep prototype.
5540 * ia64-vms-tdep.c: Remove _initialize_ia64_vms_tdep prototype.
5541 * infcall.c: Remove _initialize_infcall prototype.
5542 * infcmd.c: Remove _initialize_infcmd prototype.
5543 * inferior.c: Remove _initialize_inferiors prototype.
5544 * inflow.c: Remove _initialize_inflow prototype.
5545 * infrun.c: Remove _initialize_infrun prototype.
5546 * interps.c: Remove _initialize_interpreter prototype.
5547 * iq2000-tdep.c: Remove _initialize_iq2000_tdep prototype.
5548 * jit.c: Remove _initialize_jit prototype.
5549 * language.c: Remove _initialize_language prototype.
5550 * linux-fork.c: Remove _initialize_linux_fork prototype.
5551 * linux-nat.c: Remove _initialize_linux_nat prototype.
5552 * linux-tdep.c: Remove _initialize_linux_tdep prototype.
5553 * linux-thread-db.c: Remove _initialize_thread_db prototype.
5554 * lm32-tdep.c: Remove _initialize_lm32_tdep prototype.
5555 * m2-lang.c: Remove _initialize_m2_language prototype.
5556 * m32c-tdep.c: Remove _initialize_m32c_tdep prototype.
5557 * m32r-linux-nat.c: Remove _initialize_m32r_linux_nat prototype.
5558 * m32r-linux-tdep.c: Remove _initialize_m32r_linux_tdep prototype.
5559 * m32r-tdep.c: Remove _initialize_m32r_tdep prototype.
5560 * m68hc11-tdep.c: Remove _initialize_m68hc11_tdep prototype.
5561 * m68k-bsd-nat.c: Remove _initialize_m68kbsd_nat prototype.
5562 * m68k-bsd-tdep.c: Remove _initialize_m68kbsd_tdep prototype.
5563 * m68k-linux-nat.c: Remove _initialize_m68k_linux_tdep prototype.
5564 * m68k-linux-tdep.c: Remove _initialize_m68k_linux_tdep prototype.
5565 * m68k-tdep.c: Remove _initialize_m68k_tdep prototype.
5566 * m88k-bsd-nat.c: Remove _initialize_m68kbsd_nat prototype.
5567 * m88k-tdep.c: Remove _initialize_m68kbsd_tdep prototype.
5568 * machoread.c: Remove _initialize_machoread prototype.
5569 * macrocmd.c: Remove _initialize_macrocmd prototype.
5570 * macroscope.c: Remove _initialize_macroscope prototype.
5571 * maint.c: Remove _initialize_maint_cmds prototype.
5572 * mdebugread.c: Remove _initialize_mdebugread prototype.
5573 * memattr.c: Remove _initialize_mem prototype.
5574 * mep-tdep.c: Remove _initialize_mep_tdep prototype.
5575 * mi/mi-cmd-env.c: Remove _initialize_mi_cmd_env prototype.
5576 * mi/mi-cmds.c: Remove _initialize_mi_cmds prototype.
5577 * mi/mi-interp.c: Remove _initialize_mi_interp prototype.
5578 * mi/mi-main.c: Remove _initialize_mi_main prototype.
5579 * microblaze-linux-tdep.c: Remove
5580 _initialize_microblaze_linux_tdep prototype.
5581 * microblaze-tdep.c: Remove _initialize_microblaze_tdep prototype.
5582 * mips-fbsd-nat.c: Remove _initialize_mips_fbsd_nat prototype.
5583 * mips-fbsd-tdep.c: Remove _initialize_mips_fbsd_tdep prototype.
5584 * mips-linux-nat.c: Remove _initialize_mips_linux_nat prototype.
5585 * mips-linux-tdep.c: Remove _initialize_mips_linux_tdep prototype.
5586 * mips-nbsd-nat.c: Remove _initialize_mipsnbsd_nat prototype.
5587 * mips-nbsd-tdep.c: Remove _initialize_mipsnbsd_tdep prototype.
5588 * mips-sde-tdep.c: Remove _initialize_mips_sde_tdep prototype.
5589 * mips-tdep.c: Remove _initialize_mips_tdep prototype.
5590 * mips64-obsd-nat.c: Remove _initialize_mips64obsd_nat prototype.
5591 * mips64-obsd-tdep.c: Remove _initialize_mips64obsd_tdep
5592 prototype.
5593 * mipsread.c: Remove _initialize_mipsread prototype.
5594 * mn10300-linux-tdep.c: Remove _initialize_mn10300_linux_tdep
5595 prototype.
5596 * mn10300-tdep.c: Remove _initialize_mn10300_tdep prototype.
5597 * moxie-tdep.c: Remove _initialize_moxie_tdep prototype.
5598 * msp430-tdep.c: Remove _initialize_msp430_tdep prototype.
5599 * mt-tdep.c: Remove _initialize_mt_tdep prototype.
5600 * nds32-tdep.c: Remove _initialize_nds32_tdep prototype.
5601 * nios2-linux-tdep.c: Remove _initialize_nios2_linux_tdep
5602 prototype.
5603 * nios2-tdep.c: Remove _initialize_nios2_tdep prototype.
5604 * nto-procfs.c: Remove _initialize_procfs prototype.
5605 * nto-tdep.c: Remove _initialize_nto_tdep prototype.
5606 * objc-lang.c: Remove _initialize_objc_language prototype.
5607 * objfiles.c: Remove _initialize_objfiles prototype.
5608 * observer.c: Remove observer_test_first_notification_function,
5609 observer_test_second_notification_function,
5610 observer_test_third_notification_function, and
5611 _initialize_observer prototypes.
5612 * opencl-lang.c: Remove _initialize_opencl_language prototypes.
5613 * osabi.c: Remove _initialize_gdb_osabi prototype.
5614 * osdata.c: Remove _initialize_osdata prototype.
5615 * p-valprint.c: Remove _initialize_pascal_valprint prototype.
5616 * parse.c: Remove _initialize_parse prototype.
5617 * ppc-fbsd-nat.c: Remove _initialize_ppcfbsd_nat prototype.
5618 * ppc-fbsd-tdep.c: Remove _initialize_ppcfbsd_tdep prototype.
5619 * ppc-linux-nat.c: Remove _initialize_ppc_linux_nat prototype.
5620 * ppc-linux-tdep.c: Remove _initialize_ppc_linux_tdep prototype.
5621 * ppc-nbsd-nat.c: Remove _initialize_ppcnbsd_nat prototype.
5622 * ppc-nbsd-tdep.c: Remove _initialize_ppcnbsd_tdep prototype.
5623 * ppc-obsd-nat.c: Remove _initialize_ppcobsd_nat prototype.
5624 * ppc-obsd-tdep.c: Remove _initialize_ppcobsd_tdep prototype.
5625 * printcmd.c: Remove _initialize_printcmd prototype.
5626 * probe.c: Remove _initialize_probe prototype.
5627 * proc-api.c: Remove _initialize_proc_api prototype.
5628 * proc-events.c: Remove _initialize_proc_events prototype.
5629 * proc-service.c: Remove _initialize_proc_service prototype.
5630 * procfs.c: Remove _initialize_procfs prototype.
5631 * psymtab.c: Remove _initialize_psymtab prototype.
5632 * python/python.c: Remove _initialize_python prototype.
5633 * ravenscar-thread.c: Remove _initialize_ravenscar prototype.
5634 * record-btrace.c: Remove _initialize_record_btrace prototype.
5635 * record-full.c: Remove _initialize_record_full prototype.
5636 * record.c: Remove _initialize_record prototype.
5637 * regcache.c: Remove _initialize_regcache prototype.
5638 * reggroups.c: Remove _initialize_reggroup prototype.
5639 * remote-notif.c: Remove _initialize_notif prototype.
5640 * remote-sim.c: Remove _initialize_remote_sim prototype.
5641 * remote.c: Remove _initialize_remote prototype.
5642 * reverse.c: Remove _initialize_reverse prototype.
5643 * rl78-tdep.c: Remove _initialize_rl78_tdep prototype.
5644 * rs6000-aix-tdep.c: Remove _initialize_rs6000_aix_tdep prototype.
5645 * rs6000-lynx178-tdep.c: Remove _initialize_rs6000_lynx178_tdep
5646 prototype.
5647 * rs6000-nat.c: Remove _initialize_rs6000_nat prototype.
5648 * rs6000-tdep.c: Remove _initialize_rs6000_tdep prototype.
5649 * rust-exp.y: Remove _initialize_rust_exp prototype.
5650 * rx-tdep.c: Remove _initialize_rx_tdep prototype.
5651 * s390-linux-nat.c: Remove _initialize_s390_nat prototype.
5652 * s390-linux-tdep.c: Remove _initialize_s390_tdep prototype.
5653 * score-tdep.c: Remove _initialize_score_tdep prototype.
5654 * selftest-arch.c: Remove _initialize_selftests_foreach_arch
5655 prototype.
5656 * ser-go32.c: Remove _initialize_ser_dos prototype.
5657 * ser-mingw.c: Remove _initialize_ser_windows prototype.
5658 * ser-pipe.c: Remove _initialize_ser_pipe prototype.
5659 * ser-tcp.c: Remove _initialize_ser_tcp prototype.
5660 * ser-unix.c: Remove _initialize_ser_hardwire prototype.
5661 * serial.c: Remove _initialize_serial prototype.
5662 * sh-linux-tdep.c: Remove _initialize_sh_linux_tdep prototype.
5663 * sh-nbsd-nat.c: Remove _initialize_shnbsd_nat prototype.
5664 * sh-nbsd-tdep.c: Remove _initialize_shnbsd_tdep prototype.
5665 * sh-tdep.c: Remove _initialize_sh_tdep prototype.
5666 * skip.c: Remove _initialize_step_skip prototype.
5667 * sol-thread.c: Remove _initialize_sol_thread prototype.
5668 * solib-aix.c: Remove _initialize_solib_aix prototype.
5669 * solib-darwin.c: Remove _initialize_darwin_solib prototype.
5670 * solib-dsbt.c: Remove _initialize_dsbt_solib prototype.
5671 * solib-frv.c: Remove _initialize_frv_solib prototype.
5672 * solib-spu.c: Remove _initialize_spu_solib prototype.
5673 * solib-svr4.c: Remove _initialize_svr4_solib prototype.
5674 * solib-target.c: Remove _initialize_solib_target prototype.
5675 * solib.c: Remove _initialize_solib prototype.
5676 * source.c: Remove _initialize_source prototype.
5677 * sparc-linux-nat.c: Remove _initialize_sparc_linux_nat prototype.
5678 * sparc-linux-tdep.c: Remove _initialize_sparc_linux_tdep
5679 prototype.
5680 * sparc-nat.c: Remove _initialize_sparc_nat prototype.
5681 * sparc-nbsd-nat.c: Remove _initialize_sparcnbsd_nat prototype.
5682 * sparc-nbsd-tdep.c: Remove _initialize_sparcnbsd_tdep prototype.
5683 * sparc-obsd-tdep.c: Remove _initialize_sparc32obsd_tdep
5684 prototype.
5685 * sparc-sol2-nat.c: Remove _initialize_sparc_sol2_nat prototype.
5686 * sparc-sol2-tdep.c: Remove _initialize_sparc_sol2_tdep prototype.
5687 * sparc-tdep.c: Remove _initialize_sparc_tdep prototype.
5688 * sparc64-fbsd-nat.c: Remove _initialize_sparc64fbsd_nat
5689 prototype.
5690 * sparc64-fbsd-tdep.c: Remove _initialize_sparc64fbsd_tdep
5691 prototype.
5692 * sparc64-linux-nat.c: Remove _initialize_sparc64_linux_nat
5693 prototype.
5694 * sparc64-linux-tdep.c: Remove _initialize_sparc64_linux_tdep
5695 prototype.
5696 * sparc64-nat.c: Remove _initialize_sparc64_nat prototype.
5697 * sparc64-nbsd-nat.c: Remove _initialize_sparc64nbsd_nat
5698 prototype.
5699 * sparc64-nbsd-tdep.c: Remove _initialize_sparc64nbsd_tdep
5700 prototype.
5701 * sparc64-obsd-nat.c: Remove _initialize_sparc64obsd_nat
5702 prototype.
5703 * sparc64-obsd-tdep.c: Remove _initialize_sparc64obsd_tdep
5704 prototype.
5705 * sparc64-sol2-tdep.c: Remove _initialize_sparc64_sol2_tdep
5706 prototype.
5707 * spu-linux-nat.c: Remove _initialize_spu_nat prototype.
5708 * spu-multiarch.c: Remove _initialize_spu_multiarch prototype.
5709 * spu-tdep.c: Remove _initialize_spu_tdep prototype.
5710 * stabsread.c: Remove _initialize_stabsread prototype.
5711 * stack.c: Remove _initialize_stack prototype.
5712 * stap-probe.c: Remove _initialize_stap_probe prototype.
5713 * std-regs.c: Remove _initialize_frame_reg prototype.
5714 * symfile-debug.c: Remove _initialize_symfile_debug prototype.
5715 * symfile-mem.c: Remove _initialize_symfile_mem prototype.
5716 * symfile.c: Remove _initialize_symfile prototype.
5717 * symmisc.c: Remove _initialize_symmisc prototype.
5718 * symtab.c: Remove _initialize_symtab prototype.
5719 * target-dcache.c: Remove _initialize_target_dcache prototype.
5720 * target-descriptions.c: Remove _initialize_target_descriptions
5721 prototype.
5722 * thread.c: Remove _initialize_thread prototype.
5723 * tic6x-linux-tdep.c: Remove _initialize_tic6x_linux_tdep
5724 prototype.
5725 * tic6x-tdep.c: Remove _initialize_tic6x_tdep prototype.
5726 * tilegx-linux-nat.c: Remove _initialize_tile_linux_nat prototype.
5727 * tilegx-linux-tdep.c: Remove _initialize_tilegx_linux_tdep
5728 prototype.
5729 * tilegx-tdep.c: Remove _initialize_tilegx_tdep prototype.
5730 * tracefile-tfile.c: Remove _initialize_tracefile_tfile prototype.
5731 * tracefile.c: Remove _initialize_tracefile prototype.
5732 * tracepoint.c: Remove _initialize_tracepoint prototype.
5733 * tui/tui-hooks.c: Remove _initialize_tui_hooks prototype.
5734 * tui/tui-interp.c: Remove _initialize_tui_interp prototype.
5735 * tui/tui-layout.c: Remove _initialize_tui_layout prototype.
5736 * tui/tui-regs.c: Remove _initialize_tui_regs prototype.
5737 * tui/tui-stack.c: Remove _initialize_tui_stack prototype.
5738 * tui/tui-win.c: Remove _initialize_tui_win prototype.
5739 * tui/tui.c: Remove _initialize_tui prototype.
5740 * typeprint.c: Remove _initialize_typeprint prototype.
5741 * user-regs.c: Remove _initialize_user_regs prototype.
5742 * utils.c: Remove _initialize_utils prototype.
5743 * v850-tdep.c: Remove _initialize_v850_tdep prototype.
5744 * valarith.c: Remove _initialize_valarith prototype.
5745 * valops.c: Remove _initialize_valops prototype.
5746 * valprint.c: Remove _initialize_valprint prototype.
5747 * value.c: Remove _initialize_values prototype.
5748 * varobj.c: Remove _initialize_varobj prototype.
5749 * vax-bsd-nat.c: Remove _initialize_vaxbsd_nat prototype.
5750 * vax-nbsd-tdep.c: Remove _initialize_vaxnbsd_tdep prototype.
5751 * vax-tdep.c: Remove _initialize_vax_tdep prototype.
5752 * windows-nat.c: Remove _initialize_windows_nat,
5753 _initialize_check_for_gdb_ini, and _initialize_loadable
5754 prototypes.
5755 * windows-tdep.c: Remove _initialize_windows_tdep prototype.
5756 * xcoffread.c: Remove _initialize_xcoffread prototype.
5757 * xml-support.c: Remove _initialize_xml_support prototype.
5758 * xstormy16-tdep.c: Remove _initialize_xstormy16_tdep prototype.
5759 * xtensa-linux-nat.c: Remove _initialize_xtensa_linux_nat
5760 prototype.
5761 * xtensa-linux-tdep.c: Remove _initialize_xtensa_linux_tdep
5762 prototype.
5763 * xtensa-tdep.c: Remove _initialize_xtensa_tdep prototype.
5764
5765 2017-09-08 Keith Seitz <keiths@redhat.com>
5766
5767 * dwarf2read.c (struct field_info) <fnfields>: Remove unused
5768 field.
5769
5770 2017-09-08 Christoph Weinmann <christoph.t.weinmann@intel.com>
5771
5772 * f-valprint.c (f_val_print): Remove check for one byte
5773 sized integers. Remove printing of character type.
5774
5775 2017-09-08 Frank Penczek <frank.penczek@intel.com>
5776 Christoph Weinmann <christoph.t.weinmann@intel.com>
5777 Bernhard Heckel <bernhard.heckel@intel.com>
5778
5779 * f-typeprint.c (f_type_print_base): Use fprintfi_filtered
5780 to maintain proper indentation when printing pointers/refs.
5781
5782 2017-09-07 Joel Brobecker <brobecker@adacore.com>
5783
5784 GDB 8.0.1 released.
5785
5786 2017-09-07 Joel Brobecker <brobecker@adacore.com>
5787
5788 * NEWS (Changes in GDB 7.11): Remove entry for QStartupWithShell.
5789
5790 2017-09-05 Tom Tromey <tom@tromey.com>
5791
5792 * parse.c (funcall_chain): Now a std::vector.
5793 (start_arglist, end_arglist): Simplify.
5794 (free_funcalls): Remove.
5795 (parse_exp_in_context_1): Remove cleanup.
5796
5797 2017-09-05 Tom Tromey <tom@tromey.com>
5798
5799 * go-exp.y (go_parse): Don't create a cleanup.
5800
5801 2017-09-05 Tom Tromey <tom@tromey.com>
5802
5803 * d-exp.y (PrimaryExpression): Use std::string.
5804 (d_parse): Don't create a cleanup.
5805
5806 2017-09-05 Tom Tromey <tom@tromey.com>
5807
5808 * utils.c (do_clear_parser_state): Remove.
5809 (make_cleanup_clear_parser_state): Remove.
5810 * p-exp.y (pascal_parse): Use scoped_restore.
5811 * m2-exp.y (m2_parse): Use scoped_restore.
5812 * f-exp.y (f_parse): Use scoped_restore.
5813 * d-exp.y (d_parse): Use scoped_restore.
5814 * c-exp.y (c_parse): Use scoped_restore.
5815 * ada-exp.y (ada_parse): Use scoped_restore.
5816 * utils.h (make_cleanup_clear_parser_state): Remove.
5817
5818 2017-09-06 Keith Seitz <keiths@redhat.com>
5819
5820 * dwarf2read.c (dw2_linkage_name_attr): New function.
5821 (dw2_linkage_name): New function.
5822 (dwarf2_compute_name, dwarf2_physname, read_call_site_scope)
5823 (guess_full_die_structure_name, dwarf2_name): Use dw2_linkage_name.
5824 (anonymous_struct_prefix, dwarf2_name): Use dw2_linkage_name_attr.
5825
5826 2017-09-06 Kamil Rytarowski <n54@gmx.com>
5827
5828 * config/djgpp/djconfig.sh: Correct shell portability issue.
5829
5830 2017-09-06 Kamil Rytarowski <n54@gmx.com>
5831
5832 * configure.nat: Define HAVE_NATIVE_GCORE_HOST on NetBSD.
5833
5834 2017-09-06 John Baldwin <jhb@FreeBSD.org>
5835
5836 * Makefile.in (ALLDEPFILES): Add mips-fbsd-nat.c.
5837 * NEWS: Mention new FreeBSD/mips native configuration.
5838 * configure.host: Add aarch64*-*-freebsd*.
5839 * configure.nat: Likewise.
5840 * aarch64-fbsd-nat.c: New file.
5841
5842 2017-09-06 John Baldwin <jhb@FreeBSD.org>
5843
5844 * Makefile.in (ALL_64_TARGET_OBS): Add aarch64-fbsd-tdep.o.
5845 (ALLDEPFILES): Add aarch64-fbsd-tdep.c.
5846 * NEWS: Mention new FreeBSD/aarch64 target.
5847 * configure.tgt: Add aarch64*-*-freebsd*.
5848 * aarch64-fbsd-tdep.c: New file.
5849 * aarch64-fbsd-tdep.h: New file.
5850
5851 2017-09-06 Kamil Rytarowski <n54@gmx.com>
5852
5853 * MAINTAINERS (Write After Approval): Add Kamil Rytarowski.
5854
5855 2017-09-06 Jan Kratochvil <jan.kratochvil@redhat.com>
5856
5857 * parse.c (find_minsym_type_and_address): Don't relocate addresses
5858 of TLS symbols.
5859
5860 2017-09-05 Philippe Waroquiers <philippe.waroquiers@skynet.be>
5861
5862 * objfiles.c (get_objfile_bfd_data): Remove useless obstack_init
5863 call.
5864
5865 2017-09-05 Simon Marchi <simon.marchi@ericsson.com>
5866
5867 * infrun.c (follow_exec): Call add_thread after
5868 target_find_description.
5869
5870 2017-09-05 Simon Marchi <simon.marchi@ericsson.com>
5871
5872 * infrun.c (handle_inferior_event_1): When exec'ing, read
5873 stop_pc after follow_exec.
5874
5875 2017-09-05 Simon Marchi <simon.marchi@ericsson.com>
5876
5877 * remote.c (process_g_packet): Update error message.
5878
5879 2017-09-05 Yao Qi <yao.qi@linaro.org>
5880
5881 * configure.tgt (gdb_target_obs): Add i386.o for x86_64-*
5882 targets.
5883
5884 2017-09-05 Pedro Alves <palves@redhat.com>
5885
5886 * eval.c (eval_call, evaluate_funcall): New functions, factored
5887 out from ...
5888 (evaluate_subexp_standard): ... this.
5889
5890 2017-09-05 Yao Qi <yao.qi@linaro.org>
5891
5892 * amd64-tdep.c (amd64_target_description): Create target
5893 descriptions.
5894 (_initialize_amd64_tdep): Don't call functions
5895 initialize_tdesc_amd64_*. Add self tests.
5896 * arch/amd64.c (amd64_create_target_description): Add parameter
5897 is_linux. Call set_tdesc_osabi if is_linux is true.
5898 * arch/amd64.h (amd64_create_target_description): Update the
5899 declaration.
5900 * arch/i386.c (i386_create_target_description): Add parameter
5901 is_linux. Call set_tdesc_osabi if is_linux is true.
5902 * arch/i386.h (i386_create_target_description): Update
5903 declaration.
5904 * configure.tgt: Add i386.o to gdb_target_obs.
5905 * features/Makefile (XMLTOC): Remove i386/*.xml.
5906 * features/i386/amd64-avx-avx512.c: Remove.
5907 * features/i386/amd64-avx-mpx-avx512-pku.c: Remove.
5908 * features/i386/amd64-avx-mpx.c: Remove.
5909 * features/i386/amd64-avx.c: Remove.
5910 * features/i386/amd64-mpx.c: Remove.
5911 * features/i386/amd64.c: Remove.
5912 * features/i386/i386-avx-avx512.c: Remove.
5913 * features/i386/i386-avx-mpx-avx512-pku.c: Remove.
5914 * features/i386/i386-avx-mpx.c: Remove.
5915 * features/i386/i386-avx.c: Remove.
5916 * features/i386/i386-mmx.c: Remove.
5917 * features/i386/i386-mpx.c: Remove.
5918 * features/i386/i386.c: Remove.
5919 * i386-tdep.c: Don't include features/i386/i386*.c., include
5920 target-descriptions.h and arch/i386.h.
5921 (i386_target_description): Create target descriptions.
5922 (i386_gdbarch_init): Don't call initialize_tdesc_i386_*
5923 functions. Do self tests.
5924
5925 2017-09-05 Yao Qi <yao.qi@linaro.org>
5926
5927 * features/Makefile (XMLTOC): Remove i386/amd64XXX-linux.xml.
5928 * features/i386/amd64-avx-avx512-linux.c: Removed.
5929 * features/i386/amd64-avx-linux.c: Removed.
5930 * features/i386/amd64-avx-mpx-avx512-pku-linux.c: Removed.
5931 * features/i386/amd64-avx-mpx-linux.c: Removed.
5932 * features/i386/amd64-linux.c: Removed.
5933 * features/i386/amd64-mpx-linux.c: Removed.
5934 * features/i386/x32-avx-avx512-linux.c: Removed.
5935 * features/i386/x32-avx-linux.c: Removed.
5936 * features/i386/x32-linux.c: Removed.
5937
5938 2017-09-05 Yao Qi <yao.qi@linaro.org>
5939
5940 * amd64-linux-tdep.c: Include arch/amd64.h. Don't include
5941 features/i386/*.c.
5942 (amd64_linux_read_description): Call
5943 amd64_create_target_description.
5944 * arch/amd64.c: New file.
5945 * arch/amd64.h: New file.
5946 * configure.tgt (x86_64-*-linux*): Append amd64.o.
5947 * Makefile.in (ALL_64_TARGET_OBS): Append amd64.o.
5948
5949 2017-09-05 Yao Qi <yao.qi@linaro.org>
5950
5951 * amd64-linux-tdep.c: Don't include amd64-XXX-linux and
5952 x32-XXX-linux.c. Include 64bit-XX.c and x32-XX.c.
5953 (amd64_linux_read_description): Create target descriptions.
5954 (_initialize_amd64_linux_tdep): Don't call initialize_tdesc_XXX
5955 functions. Add unit tests.
5956 * features/Makefile (FEATURE_XMLFILES): Append 64bit-XXX.xml and
5957 x32-core.xml.
5958 * features/i386/64bit-avx.c: Generated.
5959 * features/i386/64bit-avx512.c: Generated.
5960 * features/i386/64bit-core.c: Generated.
5961 * features/i386/64bit-linux.c: Generated.
5962 * features/i386/64bit-mpx.c: Generated.
5963 * features/i386/64bit-pkeys.c: Generated.
5964 * features/i386/64bit-segments.c: Generated.
5965 * features/i386/64bit-sse.c: Generated.
5966 * features/i386/x32-core.c: Generated.
5967 * target-descriptions.c (maint_print_c_tdesc_cmd): Print feature
5968 c files for amd64-linux and x32-linux.
5969
5970 2017-09-05 Yao Qi <yao.qi@linaro.org>
5971
5972 * amd64-linux-tdep.c (amd64_linux_read_description): New
5973 function.
5974 (amd64_linux_core_read_description): Call
5975 amd64_linux_read_description.
5976 (amd64_linux_init_abi): Likewise.
5977 (amd64_x32_linux_init_abi): Likewise.
5978 * amd64-linux-tdep.h (amd64_linux_read_description): Declare.
5979 * x86-linux-nat.c (x86_linux_read_description): Call
5980 amd64_linux_read_description.
5981
5982 2017-09-05 Yao Qi <yao.qi@linaro.org>
5983
5984 * amd64-linux-tdep.c (amd64_linux_core_read_description): Update
5985 comments.
5986
5987 2017-09-05 Yao Qi <yao.qi@linaro.org>
5988
5989 * features/Makefile (XMLTOC): Remove i386/i386-XX-linux.xml.
5990 * features/i386/i386-avx-avx512-linux.c: Remove.
5991 * features/i386/i386-avx-linux.c: Remove.
5992 * features/i386/i386-avx-mpx-avx512-pku-linux.c: Remove.
5993 * features/i386/i386-avx-mpx-linux.c: Remove.
5994 * features/i386/i386-linux.c: Remove.
5995 * features/i386/i386-mmx-linux.c: Remove.
5996 * features/i386/i386-mpx-linux.c: Remove.
5997
5998 2017-09-05 Yao Qi <yao.qi@linaro.org>
5999
6000 * Makefile.in (ALL_TARGET_OBS): Add i386.o.
6001 (SFILES): Add arch/i386.c.
6002 (HFILES_NO_SRCDIR): Add arch/i386.h.
6003 * arch/i386.c: New file.
6004 * arch/i386.h: New file.
6005 * arch/tdesc.h (allocate_target_description): Declare.
6006 (set_tdesc_architecture): Declare.
6007 (set_tdesc_osabi): Declare.
6008 * configure.tgt (i[34567]86-*-linux*): Add i386.o.
6009 * i386-linux-tdep.c: Don't include ../features/i386/32bit-XXX.c.
6010 include arch/i386.h.
6011 (i386_linux_read_description): Remove code and call
6012 i386_create_target_description.
6013 (set_tdesc_architecture): New function.
6014 (set_tdesc_osabi): New function.
6015 * target-descriptions.h (allocate_target_description): Remove.
6016
6017 2017-09-05 Yao Qi <yao.qi@linaro.org>
6018
6019 * arch/tdesc.h (tdesc_create_feature): Add an argument xml.
6020 * target-descriptions.c (tdesc_create_feature): Likewise, and
6021 adjust code.
6022 * features/i386/32bit-avx.c: Re-generated.
6023 * features/i386/32bit-avx512.c: Re-generated.
6024 * features/i386/32bit-core.c: Re-generated.
6025 * features/i386/32bit-linux.c: Re-generated.
6026 * features/i386/32bit-mpx.c: Re-generated.
6027 * features/i386/32bit-pkeys.c: Re-generated.
6028 * features/i386/32bit-sse.c: Re-generated.
6029
6030 2017-09-05 Yao Qi <yao.qi@linaro.org>
6031
6032 * regformats/regdef.h (struct reg): Override operator == and !=.
6033
6034 2017-09-05 Yao Qi <yao.qi@linaro.org>
6035
6036 * arch/tdesc.h: New file.
6037 * regformats/regdat.sh: Generate code using tdesc_create_reg.
6038 * target-descriptions.c: Update comments.
6039 * target-descriptions.h: Include "arch/tdesc.h". Remove the
6040 declarations.
6041 * features/i386/32bit-avx.c: Re-generated.
6042 * features/i386/32bit-avx512.c: Re-generated.
6043 * features/i386/32bit-core.c: Re-generated.
6044 * features/i386/32bit-linux.c: Re-generated.
6045 * features/i386/32bit-mpx.c: Re-generated.
6046 * features/i386/32bit-pkeys.c: Re-generated.
6047 * features/i386/32bit-sse.c: Re-generated.
6048
6049 2017-09-05 Yao Qi <yao.qi@linaro.org>
6050
6051 * regformats/regdat.sh: Update generated code.
6052
6053 2017-09-05 Yao Qi <yao.qi@linaro.org>
6054
6055 * regformats/regdat.sh: Adjust code order.
6056
6057 2017-09-05 Simon Marchi <simon.marchi@ericsson.com>
6058
6059 * expprint.c (dump_subexp_body_standard): Use constant format
6060 string in fprintf_filtered call.
6061
6062 2017-09-04 John Baldwin <jhb@FreeBSD.org>
6063
6064 * configure.nat: Add "x86-nat.o x86-dregs.o" for NetBSD/amd64 and
6065 NetBSD/i386.
6066 * x86-bsd-nat.c [!DBREG_DRX && __NetBSD__]: Define DBREG_DRX.
6067
6068 2017-09-04 John Baldwin <jhb@FreeBSD.org>
6069
6070 * bsd-kvm.o: Make <sys/user.h> conditional on HAVE_SYS_USER_H.
6071
6072 2017-09-04 John Baldwin <jhb@FreeBSD.org>
6073
6074 * bsd-kvm.o: Define _KMEMUSER.
6075 * configure.ac: Define _KMEMUSER when checking for "struct lwp".
6076 * configure: Regenerate.
6077
6078 2017-09-04 John Baldwin <jhb@FreeBSD.org>
6079
6080 * amd64-fbsd-nat.c: Add include of "x86-xstate.h".
6081 * i386-fbsd-nat.c: Likewise.
6082
6083 2017-09-04 John Baldwin <jhb@FreeBSD.org>
6084
6085 * unittests/array-view-selftests.c: Add include of <array>.
6086
6087 2017-09-04 John Baldwin <jhb@FreeBSD.org>
6088
6089 * spu-tdep.c (flush_ea_cache): Add missing argument to
6090 call_function_by_hand.
6091
6092 2017-09-04 Pedro Alves <palves@redhat.com>
6093
6094 * NEWS (Safer support for debugging with no debug info): New.
6095
6096 2017-09-04 Pedro Alves <palves@redhat.com>
6097
6098 * c-exp.y (function_method, function_method_void): Add current
6099 instance flags to TYPE_INSTANCE.
6100 * dwarf2read.c (check_modifier): New.
6101 (compute_delayed_physnames): Assert that only C++ adds delayed
6102 physnames. Mark fn_fields as const/volatile depending on
6103 physname.
6104 * eval.c (make_params): New type_instance_flags parameter. Use
6105 it as the new type's instance flags.
6106 (evaluate_subexp_standard) <TYPE_INSTANCE>: Extract the instance
6107 flags element and pass it to make_params.
6108 * expprint.c (print_subexp_standard) <TYPE_INSTANCE>: Handle
6109 instance flags element.
6110 (dump_subexp_body_standard) <TYPE_INSTANCE>: Likewise.
6111 * gdbtypes.h: Include "enum-flags.h".
6112 (type_instance_flags): New enum-flags type.
6113 (TYPE_CONST, TYPE_VOLATILE, TYPE_RESTRICT, TYPE_ATOMIC)
6114 (TYPE_CODE_SPACE, TYPE_DATA_SPACE): Return boolean.
6115 * parse.c (operator_length_standard) <TYPE_INSTANCE>: Adjust.
6116 (follow_type_instance_flags): New function.
6117 (operator_check_standard) <TYPE_INSTANCE>: Adjust.
6118 * parser-defs.h (follow_type_instance_flags): Declare.
6119 * valops.c (value_struct_elt_for_reference): const/volatile must
6120 match too.
6121
6122 2017-09-04 Pedro Alves <palves@redhat.com>
6123
6124 * cp-namespace.c (cp_search_static_and_baseclasses): Handle
6125 function/method scopes; lookup the nested name as a function local
6126 static variable.
6127
6128 2017-09-04 Pedro Alves <palves@redhat.com>
6129
6130 (%type <voidval>): Add function_method.
6131 * c-exp.y (exp): New production for calls with no arguments.
6132 (function_method, function_method_void_or_typelist): New
6133 productions.
6134 (exp): New production for "method()::static_var".
6135 * eval.c (evaluate_subexp_standard): Handle OP_FUNC_STATIC_VAR.
6136 * expprint.c (print_subexp_standard, dump_subexp_body_standard):
6137 Handle OP_FUNC_STATIC_VAR.
6138 * parse.c (operator_length_standard):
6139 Handle OP_FUNC_STATIC_VAR.
6140
6141 2017-09-04 Pedro Alves <palves@redhat.com>
6142
6143 * eval.c (evaluate_subexp_standard): Remove UNOP_MEMVAL_TLS
6144 handling.
6145 * expprint.c (print_subexp_standard, dump_subexp_body_standard):
6146 Ditto.
6147 * parse.c (operator_length_standard, operator_check_standard):
6148 Ditto.
6149 * std-operator.def (UNOP_MEMVAL_TLS): Delete.
6150
6151 2017-09-04 Pedro Alves <palves@redhat.com>
6152
6153 * ax-gdb.c: Include "typeprint.h".
6154 (gen_expr_for_cast): New function.
6155 (gen_expr) <OP_CAST, OP_CAST_TYPE>: Use it.
6156 <OP_VAR_VALUE, OP_MSYM_VAR_VALUE>: Error out if the variable's
6157 type is unknown.
6158 * dwarf2read.c (new_symbol_full): Fallback to int instead of
6159 nodebug_data_symbol.
6160 * eval.c: Include "typeprint.h".
6161 (evaluate_subexp_standard) <OP_VAR_VALUE, OP_VAR_MSYM_VALUE>:
6162 Error out if symbol has unknown type.
6163 <UNOP_CAST, UNOP_CAST_TYPE>: Common bits factored out to
6164 evaluate_subexp_for_cast.
6165 (evaluate_subexp_for_address, evaluate_subexp_for_sizeof): Handle
6166 OP_VAR_MSYM_VALUE.
6167 (evaluate_subexp_for_cast): New function.
6168 * gdbtypes.c (init_nodebug_var_type): New function.
6169 (objfile_type): Use it to initialize types of variables with no
6170 debug info.
6171 * typeprint.c (error_unknown_type): New.
6172 * typeprint.h (error_unknown_type): New declaration.
6173 * compile/compile-c-types.c (convert_type_basic): Handle
6174 TYPE_CODE_ERROR; warn and fallback to int for variables with
6175 unknown type.
6176
6177 2017-09-04 Pedro Alves <palves@redhat.com>
6178
6179 * eval.c (evaluate_var_value): New function, factored out from ...
6180 (evaluate_subexp_standard): ... here.
6181
6182 2017-09-04 Pedro Alves <palves@redhat.com>
6183
6184 * eval.c (evaluate_subexp_standard) <UNOP_COMPLEMENT, UNOP_ADDR>:
6185 Remove useless assignments to 'op'.
6186
6187 2017-09-04 Pedro Alves <palves@redhat.com>
6188
6189 * eval.c (eval_skip_value): New function.
6190 (evaluate_subexp_standard): Use it.
6191
6192 2017-09-04 Pedro Alves <palves@redhat.com>
6193
6194 * eval.c (evaluate_subexp_standard): <OP_FUNCALL>: Extract
6195 function name from symbol/minsym and pass it to
6196 error_call_unknown_return_type.
6197
6198 2017-09-04 Pedro Alves <palves@redhat.com>
6199
6200 * ada-lang.c (resolve_subexp): Handle OP_VAR_MSYM_VALUE.
6201 * ax-gdb.c (gen_msym_var_ref): New function.
6202 (gen_expr): Handle OP_VAR_MSYM_VALUE.
6203 * eval.c (evaluate_var_msym_value): New function.
6204 * eval.c (evaluate_subexp_standard): Handle OP_VAR_MSYM_VALUE.
6205 <OP_FUNCALL>: Extract function name from symbol/minsym and pass it
6206 to call_function_by_hand.
6207 * expprint.c (print_subexp_standard, dump_subexp_body_standard):
6208 Handle OP_VAR_MSYM_VALUE.
6209 (union exp_element) <msymbol>: New field.
6210 * minsyms.h (struct type): Forward declare.
6211 (find_minsym_type_and_address): Declare.
6212 * parse.c (write_exp_elt_msym): New function.
6213 (write_exp_msymbol): Delete, refactored as ...
6214 (find_minsym_type_and_address): ... this new function.
6215 (write_exp_msymbol): Reimplement using OP_VAR_MSYM_VALUE.
6216 (operator_length_standard, operator_check_standard): Handle
6217 OP_VAR_MSYM_VALUE.
6218 * std-operator.def (OP_VAR_MSYM_VALUE): New.
6219
6220 2017-09-04 Pedro Alves <palves@redhat.com>
6221
6222 * ada-lang.c (ada_evaluate_subexp) <TYPE_CODE_FUNC>: Don't handle
6223 TYPE_GNU_IFUNC specially here. Throw error if return type is
6224 unknown.
6225 * ada-typeprint.c (print_func_type): Handle functions with unknown
6226 return type.
6227 * c-typeprint.c (c_type_print_base): Handle functions and methods
6228 with unknown return type.
6229 * compile/compile-c-symbols.c (convert_symbol_bmsym)
6230 <mst_text_gnu_ifunc>: Use nodebug_text_gnu_ifunc_symbol.
6231 * compile/compile-c-types.c: Include "objfiles.h".
6232 (convert_func): For functions with unknown return type, warn and
6233 default to int.
6234 * compile/compile-object-run.c (compile_object_run): Adjust call
6235 to call_function_by_hand_dummy.
6236 * elfread.c (elf_gnu_ifunc_resolve_addr): Adjust call to
6237 call_function_by_hand.
6238 * eval.c (evaluate_subexp_standard): Adjust calls to
6239 call_function_by_hand. Handle functions and methods with unknown
6240 return type. Pass expect_type to call_function_by_hand.
6241 * f-typeprint.c (f_type_print_base): Handle functions with unknown
6242 return type.
6243 * gcore.c (call_target_sbrk): Adjust call to
6244 call_function_by_hand.
6245 * gdbtypes.c (objfile_type): Leave nodebug text symbol with NULL
6246 return type instead of int. Make nodebug_text_gnu_ifunc_symbol be
6247 an integer address type instead of nodebug.
6248 * guile/scm-value.c (gdbscm_value_call): Adjust call to
6249 call_function_by_hand.
6250 * infcall.c (error_call_unknown_return_type): New function.
6251 (call_function_by_hand): New "default_return_type" parameter.
6252 Pass it down.
6253 (call_function_by_hand_dummy): New "default_return_type"
6254 parameter. Use it instead of defaulting to int. If there's no
6255 default and the return type is unknown, throw an error. If
6256 there's a default return type, and the called function has no
6257 debug info, then assume the function is prototyped.
6258 * infcall.h (call_function_by_hand, call_function_by_hand_dummy):
6259 New "default_return_type" parameter.
6260 (error_call_unknown_return_type): New declaration.
6261 * linux-fork.c (call_lseek): Cast return type of lseek.
6262 (inferior_call_waitpid, checkpoint_command): Adjust calls to
6263 call_function_by_hand.
6264 * linux-tdep.c (linux_infcall_mmap, linux_infcall_munmap): Adjust
6265 calls to call_function_by_hand.
6266 * m2-typeprint.c (m2_procedure): Handle functions with unknown
6267 return type.
6268 * objc-lang.c (lookup_objc_class, lookup_child_selector)
6269 (value_nsstring, print_object_command): Adjust calls to
6270 call_function_by_hand.
6271 * p-typeprint.c (pascal_type_print_varspec_prefix): Handle
6272 functions with unknown return type.
6273 (pascal_type_print_func_varspec_suffix): New function.
6274 (pascal_type_print_varspec_suffix) <TYPE_CODE_FUNC,
6275 TYPE_CODE_METHOD>: Use it.
6276 * python/py-value.c (valpy_call): Adjust call to
6277 call_function_by_hand.
6278 * rust-lang.c (rust_evaluate_funcall): Adjust call to
6279 call_function_by_hand.
6280 * valarith.c (value_x_binop, value_x_unop): Adjust calls to
6281 call_function_by_hand.
6282 * valops.c (value_allocate_space_in_inferior): Adjust call to
6283 call_function_by_hand.
6284 * typeprint.c (type_print_unknown_return_type): New function.
6285 * typeprint.h (type_print_unknown_return_type): New declaration.
6286
6287 2017-09-04 Pedro Alves <palves@redhat.com>
6288
6289 * gdbtypes.c (lookup_function_type_with_arguments): Mark function
6290 types with more than one parameter as prototyped.
6291
6292 2017-09-04 Pedro Alves <palves@redhat.com>
6293
6294 * cli/cli-cmds.c (print_disassembly, disassemble_current_function)
6295 (disassemble_command): Use gdb_disassembly_flags instead of bare
6296 int.
6297 * disasm.c (gdb_pretty_print_disassembler::pretty_print_insn)
6298 (dump_insns, do_mixed_source_and_assembly_deprecated)
6299 (do_mixed_source_and_assembly, do_assembly_only, gdb_disassembly):
6300 Use gdb_disassembly_flags instead of bare int.
6301 * disasm.h (DISASSEMBLY_SOURCE_DEPRECATED, DISASSEMBLY_RAW_INSN)
6302 (DISASSEMBLY_OMIT_FNAME, DISASSEMBLY_FILENAME)
6303 (DISASSEMBLY_OMIT_PC, DISASSEMBLY_SOURCE)
6304 (DISASSEMBLY_SPECULATIVE): No longer macros. Instead they're...
6305 (enum gdb_disassembly_flag): ... values of this new enumeration.
6306 (gdb_disassembly_flags): Define.
6307 (gdb_disassembly)
6308 (gdb_pretty_print_disassembler::pretty_print_insn): Use it.
6309 * mi/mi-cmd-disas.c (mi_cmd_disassemble): Use
6310 gdb_disassembly_flags instead of bare int.
6311 * record-btrace.c (btrace_insn_history)
6312 (record_btrace_insn_history, record_btrace_insn_history_range)
6313 (record_btrace_insn_history_from): Use gdb_disassembly_flags
6314 instead of bare int.
6315 * record.c (get_insn_history_modifiers, cmd_record_insn_history):
6316 Use gdb_disassembly_flags instead of bare int.
6317 * target-debug.h (target_debug_print_gdb_disassembly_flags):
6318 Define.
6319 * target-delegates.c: Regenerate.
6320 * target.c (target_insn_history, target_insn_history_from)
6321 (target_insn_history_range): Use gdb_disassembly_flags instead of
6322 bare int.
6323 * target.h: Include "disasm.h".
6324 (struct target_ops) <to_insn_history, to_insn_history_from,
6325 to_insn_history_range>: Use gdb_disassembly_flags instead of bare
6326 int.
6327 (target_insn_history, target_insn_history_from)
6328 (target_insn_history_range): Use gdb_disassembly_flags instead of
6329 bare int.
6330
6331 2017-09-04 Simon Marchi <simon.marchi@ericsson.com>
6332
6333 * cli/cli-script.c (build_command_line): For if/while commands,
6334 check whether args is empty.
6335
6336 2017-09-04 Simon Marchi <simon.marchi@ericsson.com>
6337
6338 * cli/cli-script.h (enum misc_command_type): Move from defs.h.
6339 (enum command_control_type): Likewise.
6340 (struct command_line): Likewise.
6341 (free_command_lines): Likewise.
6342 (struct command_lines_deleter): Likewise.
6343 (command_line_up): Likewise.
6344 (read_command_lines): Likewise.
6345 (read_command_lines_1): Likewise.
6346 * defs.h (enum misc_command_type): Move to cli/cli-script.h.
6347 (enum command_control_type): Likewise.
6348 (struct command_line): Likewise.
6349 (free_command_lines): Likewise.
6350 (struct command_lines_deleter): Likewise.
6351 (command_line_up): Likewise.
6352 (read_command_lines): Likewise.
6353 (read_command_lines_1): Likewise.
6354 * breakpoint.h: Include cli/cli-script.h.
6355 * extension-priv.h: Likewise.
6356 * gdbcmd.h: Likewise.
6357
6358 2017-09-04 Pedro Alves <palves@redhat.com>
6359
6360 * ada-lang.c (is_known_support_routine): Move sal declaration to
6361 where it is initialized.
6362 * breakpoint.c (create_internal_breakpoint, init_catchpoint)
6363 (parse_breakpoint_sals, decode_static_tracepoint_spec)
6364 (clear_command, update_static_tracepoint): Remove init_sal
6365 references. Move declarations closer to initializations.
6366 * cli/cli-cmds.c (list_command): Move sal declarations closer to
6367 initializations.
6368 * elfread.c (elf_gnu_ifunc_resolver_stop): Remove init_sal
6369 references. Move sal declarations closer to initializations.
6370 * frame.c (find_frame_sal): Return a symtab_and_line via function
6371 return instead of output parameter. Remove init_sal references.
6372 * frame.h (find_frame_sal): Return a symtab_and_line via function
6373 return instead of output parameter.
6374 * guile/scm-frame.c (gdbscm_frame_sal): Adjust.
6375 * guile/scm-symtab.c (stscm_make_sal_smob): Use in-place new
6376 instead of memset.
6377 (gdbscm_find_pc_line): Remove init_sal reference.
6378 * infcall.c (call_function_by_hand_dummy): Remove init_sal
6379 references. Move declarations closer to initializations.
6380 * infcmd.c (set_step_frame): Update. Move declarations closer to
6381 initializations.
6382 (finish_backward): Remove init_sal references. Move declarations
6383 closer to initializations.
6384 * infrun.c (process_event_stop_test, handle_step_into_function)
6385 (insert_hp_step_resume_breakpoint_at_frame)
6386 (insert_step_resume_breakpoint_at_caller): Likewise.
6387 * linespec.c (create_sals_line_offset, decode_digits_ordinary)
6388 (symbol_to_sal): Likewise.
6389 * probe.c (parse_probes_in_pspace): Remove init_sal reference.
6390 * python/py-frame.c (frapy_find_sal): Move sal declaration closer
6391 to its initialization.
6392 * reverse.c (save_bookmark_command): Use new/delete. Remove
6393 init_sal references. Move declarations closer to initializations.
6394 * source.c (get_current_source_symtab_and_line): Remove brace
6395 initialization.
6396 (set_current_source_symtab_and_line): Now takes the sal by const
6397 reference. Remove brace initialization.
6398 (line_info): Remove init_sal reference.
6399 * source.h (set_current_source_symtab_and_line): Now takes a
6400 symtab_and_line via const reference.
6401 * stack.c (set_current_sal_from_frame): Adjust.
6402 (print_frame_info): Adjust.
6403 (get_last_displayed_sal): Return the sal via function return
6404 instead of via output parameter. Simplify.
6405 (frame_info): Adjust.
6406 * stack.h (get_last_displayed_sal): Return the sal via function
6407 return instead of via output parameter.
6408 * symtab.c (init_sal): Delete.
6409 (find_pc_sect_line): Remove init_sal references. Move
6410 declarations closer to initializations.
6411 (find_function_start_sal): Remove init_sal references. Move
6412 declarations closer to initializations.
6413 * symtab.h (struct symtab_and_line): In-class initialize all
6414 fields.
6415 * tracepoint.c (set_traceframe_context)
6416 (print_one_static_tracepoint_marker): Remove init_sal references.
6417 Move declarations closer to initializations.
6418 * tui/tui-disasm.c (tui_show_disassem_and_update_source): Adjust.
6419 * tui/tui-stack.c (tui_show_frame_info): Adjust. Move
6420 declarations closer to initializations.
6421 * tui/tui-winsource.c (tui_update_source_window_as_is): Remove
6422 init_sal references. Adjust.
6423
6424 2017-09-04 Pedro Alves <palves@redhat.com>
6425
6426 * ax-gdb.c (agent_command_1): Use range-for.
6427 * break-catch-throw.c (re_set_exception_catchpoint): Update.
6428 * breakpoint.c: Include "common/array-view.h".
6429 (init_breakpoint_sal, create_breakpoint_sal): Change sals
6430 parameter from struct symtabs_and_lines to
6431 array_view<symtab_and_line>. Adjust. Use range-for. Update.
6432 (breakpoint_sals_to_pc): Change sals parameter from struct
6433 symtabs_and_lines to std::vector reference.
6434 (check_fast_tracepoint_sals): Change sals parameter from struct
6435 symtabs_and_lines to std::array_view. Use range-for.
6436 (decode_static_tracepoint_spec): Return a std::vector instead of
6437 symtabs_and_lines. Update.
6438 (create_breakpoint): Update.
6439 (break_range_command, until_break_command, clear_command): Update.
6440 (base_breakpoint_decode_location, bkpt_decode_location)
6441 (bkpt_probe_create_sals_from_location)
6442 (bkpt_probe_decode_location, tracepoint_decode_location)
6443 (tracepoint_probe_decode_location)
6444 (strace_marker_create_sals_from_location): Return a std::vector
6445 instead of symtabs_and_lines.
6446 (strace_marker_create_breakpoints_sal): Update.
6447 (strace_marker_decode_location): Return a std::vector instead of
6448 symtabs_and_lines. Update.
6449 (update_breakpoint_locations): Change struct symtabs_and_lines
6450 parameters to gdb::array_view. Adjust.
6451 (location_to_sals): Return a std::vector instead of
6452 symtabs_and_lines. Update.
6453 (breakpoint_re_set_default): Use std::vector instead of struct
6454 symtabs_and_lines.
6455 (decode_location_default): Return a std::vector instead of
6456 symtabs_and_lines. Update.
6457 * breakpoint.h: Include "common/array-view.h".
6458 (struct breakpoint_ops) <decode_location>: Now returns a
6459 std::vector instead of returning a symtabs_and_lines via output
6460 parameter.
6461 (update_breakpoint_locations): Change sals parameters to use
6462 gdb::array_view.
6463 * cli/cli-cmds.c (edit_command, list_command): Update to use
6464 std::vector and gdb::array_view.
6465 (ambiguous_line_spec): Adjust to use gdb::array_view and
6466 range-for.
6467 (compare_symtabs): Rename to ...
6468 (cmp_symtabs): ... this. Change parameters to symtab_and_line
6469 const reference and adjust.
6470 (filter_sals): Rewrite using std::vector and standard algorithms.
6471 * elfread.c (elf_gnu_ifunc_resolver_return_stop): Simplify.
6472 (jump_command): Update to use std::vector.
6473 * linespec.c (struct linespec_state) <canonical_names>: Update
6474 comment.
6475 (add_sal_to_sals_basic): Delete.
6476 (add_sal_to_sals, filter_results, convert_results_to_lsals)
6477 (decode_line_2, create_sals_line_offset)
6478 (convert_address_location_to_sals, convert_linespec_to_sals)
6479 (convert_explicit_location_to_sals, parse_linespec)
6480 (event_location_to_sals, decode_line_full, decode_line_1)
6481 (decode_line_with_current_source)
6482 (decode_line_with_last_displayed, decode_objc)
6483 (decode_digits_list_mode, decode_digits_ordinary, minsym_found)
6484 (linespec_result::~linespec_result): Adjust to use std::vector
6485 instead of symtabs_and_lines.
6486 * linespec.h (linespec_sals::sals): Now a std::vector.
6487 (struct linespec_result): Use std::vector, bool, and in-class
6488 initialization.
6489 (decode_line_1, decode_line_with_current_source)
6490 (decode_line_with_last_displayed): Return std::vector.
6491 * macrocmd.c (info_macros_command): Use std::vector.
6492 * mi/mi-main.c (mi_cmd_trace_find): Use std::vector.
6493 * probe.c (parse_probes_in_pspace, parse_probes): Adjust to use
6494 std::vector.
6495 * probe.h (parse_probes): Return a std::vector.
6496 * python/python.c (gdbpy_decode_line): Use std::vector and
6497 gdb::array_view.
6498 * source.c (select_source_symtab, line_info): Use std::vector.
6499 * stack.c (func_command): Use std::vector.
6500 * symtab.h (struct symtabs_and_lines): Delete.
6501 * tracepoint.c (tfind_line_command, scope_info): Use std::vector.
6502
6503 2017-09-04 Pedro Alves <palves@redhat.com>
6504
6505 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
6506 unittests/array-view-selftests.c.
6507 (SUBDIR_UNITTESTS_OBS): Add array-view-selftests.o.
6508 * common/array-view.h: New file.
6509 * unittests/array-view-selftests.c: New file.
6510
6511 2017-09-04 Pedro Alves <palves@redhat.com>
6512
6513 * cli/cli-cmds.c (edit_command): Pass message to
6514 ambiguous_line_spec.
6515 (list_command): Pass message to ambiguous_line_spec. Say
6516 "first"/"last" instead of "start" and "end" to be consistent with
6517 the manual.
6518 (ambiguous_line_spec): Add 'format' and vararg parameters. Use
6519 them to print formatted message.
6520
6521 2017-09-04 Pedro Alves <palves@redhat.com>
6522
6523 * btrace.c (ftrace_add_pt): Pass btrace_insn to
6524 ftrace_update_insns by reference instead of pointer.
6525
6526 2017-09-04 Yao Qi <yao.qi@linaro.org>
6527
6528 * i386-go32-tdep.c: Include x86-xstate.h.
6529 (i386_go32_init_abi): Call i386_target_description.
6530 * i386-tdep.c (i386_target_description): Return tdesc_i386_mmx
6531 if xcr0 is X86_XSTATE_X87_MASK.
6532 * i386-tdep.h (tdesc_i386): Remove the declaration.
6533 (tdesc_i386_mmx): Likewise.
6534
6535 2017-09-04 Yao Qi <yao.qi@linaro.org>
6536
6537 * i386-fbsd-tdep.c (i386fbsd_core_read_xcr0): Return
6538 X86_XSTATE_SSE_MASK instead of 0.
6539
6540 2017-09-04 Yao Qi <yao.qi@linaro.org>
6541
6542 * amd64-fbsd-nat.c (amd64fbsd_read_description): Call
6543 i386_target_description.
6544 * i386-fbsd-nat.c (i386fbsd_read_description): Call
6545 i386_target_description.
6546 * i386-tdep.c (i386_gdbarch_init): Likewise.
6547
6548 2017-09-04 Yao Qi <yao.qi@linaro.org>
6549
6550 * amd64-darwin-tdep.c: Include "x86-xstate.h".
6551 (x86_darwin_init_abi_64): Call amd64_target_description.
6552 * amd64-dicos-tdep.c: Likewise.
6553 * amd64-fbsd-nat.c: Likewise.
6554 * amd64-fbsd-tdep.c: Likewise.
6555 * amd64-nbsd-tdep.c: Likewise.
6556 * amd64-obsd-tdep.c: Likewise.
6557 * amd64-sol2-tdep.c: Likewise.
6558 * amd64-windows-tdep.c: Likewise.
6559 * amd64-tdep.h (tdesc_amd64): Remove the declaration.
6560
6561 2017-09-04 Simon Marchi <simon.marchi@ericsson.com>
6562
6563 * btrace.h (btrace_insn_s, DEF_VEC_O (btrace_insn_s)): Remove.
6564 (btrace_function) <insn>: Change type to use std::vector.
6565 * btrace.c (ftrace_debug, ftrace_call_num_insn,
6566 ftrace_find_call, ftrace_new_gap, ftrace_update_function,
6567 ftrace_update_insns, ftrace_compute_global_level_offset,
6568 btrace_stitch_bts, btrace_clear, btrace_insn_get,
6569 btrace_insn_end, btrace_insn_next, btrace_insn_prev): Adjust to
6570 change to std::vector.
6571 (ftrace_update_insns): Adjust to change to std::vector, change
6572 type of INSN parameter.
6573 (btrace_compute_ftrace_bts): Adjust call to ftrace_update_insns.
6574 * record-btrace.c (btrace_call_history_insn_range,
6575 btrace_compute_src_line_range,
6576 record_btrace_frame_prev_register): Adjust to change to
6577 std::vector.
6578 * python/py-record-btrace.c (recpy_bt_func_instructions): Adjust
6579 to change to std::vector.
6580
6581 2017-09-03 Tom Tromey <tom@tromey.com>
6582
6583 * corefile.c (reopen_exec_file): Use std::string.
6584
6585 2017-09-03 Tom Tromey <tom@tromey.com>
6586
6587 * compile/compile.c (compile_register_name_mangled): Return
6588 std::string.
6589 * compile/compile-loc2c.c (pushf_register_address): Update.
6590 (pushf_register): Update.
6591 * compile/compile-c-types.c (convert_array): Update.
6592 * compile/compile-c-symbols.c (generate_vla_size): Update.
6593 (error_symbol_once): Use a gdb::unique_xmalloc_ptr.
6594 (symbol_substitution_name): Return a gdb::unique_xmalloc_ptr.
6595 (convert_one_symbol): Update.
6596 (generate_c_for_for_one_variable): Update.
6597 * compile/compile-c-support.c (c_get_range_decl_name): Return a
6598 std::string.
6599 (generate_register_struct): Update.
6600 * compile/compile-internal.h (c_get_range_decl_name): Return a
6601 std::string.
6602 (compile_register_name_mangled): Return std::string.
6603
6604 2017-09-03 Tom Tromey <tom@tromey.com>
6605
6606 * utils.c (perror_string): Return a std::string.
6607 (throw_perror_with_name, perror_warning_with_name): Update.
6608
6609 2017-09-03 Tom Tromey <tom@tromey.com>
6610
6611 * demangle.c (demangle_command): Use std::string,
6612 unique_xmalloc_ptr.
6613
6614 2017-09-03 Tom Tromey <tom@tromey.com>
6615
6616 * cli/cli-setshow.c (do_set_command): Use std::string.
6617
6618 2017-09-03 Tom Tromey <tom@tromey.com>
6619
6620 * cli/cli-cmds.c (cd_command): Use gdb::unique_xmalloc_ptr.
6621
6622 2017-09-03 Tom Tromey <tom@tromey.com>
6623
6624 * mi/mi-interp.c (mi_cmd_interpreter_exec): Use std::string.
6625
6626 2017-09-03 Tom Tromey <tom@tromey.com>
6627
6628 * mi/mi-cmd-env.c (env_execute_cli_command): Use
6629 gdb::unique_xmalloc_ptr.
6630
6631 2017-09-03 Tom Tromey <tom@tromey.com>
6632
6633 * thread.c (print_thread_info_1): Use string_printf.
6634 (thread_apply_command, thread_apply_all_command): Use
6635 std::string.
6636
6637 2017-09-03 Tom Tromey <tom@tromey.com>
6638
6639 * valprint.c (val_print_string): Update.
6640 * gdbcore.h (memory_error_message): Return std::string.
6641 * corefile.c (memory_error_message): Return std::string.
6642 (memory_error): Update.
6643 * breakpoint.c (insert_bp_location): Update.
6644
6645 2017-09-03 Simon Marchi <simon.marchi@ericsson.com>
6646
6647 * target/waitstatus.h (target_waitstatus_to_string): Change
6648 return type to std::string.
6649 * target/waitstatus.c (target_waitstatus_to_string): Return
6650 std::string.
6651 * target.h (target_waitstatus_to_string): Remove declaration.
6652 * infrun.c (resume, clear_proceed_status_thread,
6653 print_target_wait_results, do_target_wait, save_waitstatus,
6654 stop_all_threads): Adjust.
6655 * record-btrace.c (record_btrace_wait): Adjust.
6656 * target-debug.h
6657 (target_debug_print_struct_target_waitstatus_p): Adjust.
6658
6659 2017-09-01 Jan Kratochvil <jan.kratochvil@redhat.com>
6660
6661 PR gdb/22046
6662 * nat/linux-procfs.c (parse_proc_status_state): Fix PROC_STATE_STOPPED
6663 detection.
6664
6665 2017-08-31 Sergio Durigan Junior <sergiodj@redhat.com>
6666
6667 * NEWS (Changes since GDB 8.0): Add entry mentioning new support
6668 for setting/unsetting environment variables on the remote target.
6669 (New remote packets): Add entries for QEnvironmentHexEncoded,
6670 QEnvironmentUnset and QEnvironmentReset.
6671 * common/environ.c (gdb_environ::operator=): Extend method to
6672 handle m_user_set_env_list and m_user_unset_env_list.
6673 (gdb_environ::clear): Likewise.
6674 (match_var_in_string): Change type of first parameter from 'char
6675 *' to 'const char *'.
6676 (gdb_environ::set): Extend method to handle
6677 m_user_set_env_list and m_user_unset_env_list.
6678 (gdb_environ::unset): Likewise.
6679 (gdb_environ::clear_user_set_env): New method.
6680 (gdb_environ::user_set_envp): Likewise.
6681 (gdb_environ::user_unset_envp): Likewise.
6682 * common/environ.h (gdb_environ): Handle m_user_set_env_list and
6683 m_user_unset_env_list on move constructor/assignment.
6684 (unset): Add new default parameter 'update_unset_list = true'.
6685 (clear_user_set_env): New method.
6686 (user_set_envp): Likewise.
6687 (user_unset_envp): Likewise.
6688 (m_user_set_env_list): New std::set.
6689 (m_user_unset_env_list): Likewise.
6690 * common/rsp-low.c (hex2str): New function.
6691 (bin2hex): New overload for bin2hex function.
6692 * common/rsp-low.c (hex2str): New prototype.
6693 (str2hex): New overload prototype.
6694 * remote.c: Include "environ.h". Add QEnvironmentHexEncoded,
6695 QEnvironmentUnset and QEnvironmentReset.
6696 (remote_protocol_features): Add QEnvironmentHexEncoded,
6697 QEnvironmentUnset and QEnvironmentReset packets.
6698 (send_environment_packet): New function.
6699 (extended_remote_environment_support): Likewise.
6700 (extended_remote_create_inferior): Call
6701 extended_remote_environment_support.
6702 (_initialize_remote): Add QEnvironmentHexEncoded,
6703 QEnvironmentUnset and QEnvironmentReset packet configs.
6704 * unittests/environ-selftests.c (gdb_selftest_env_var):
6705 New variable.
6706 (test_vector_initialization): New function.
6707 (test_init_from_host_environ): Likewise.
6708 (test_reinit_from_host_environ): Likewise.
6709 (test_set_A_unset_B_unset_A_cannot_find_A_can_find_B):
6710 Likewise.
6711 (test_unset_set_empty_vector): Likewise.
6712 (test_vector_clear): Likewise.
6713 (test_std_move): Likewise.
6714 (test_move_constructor):
6715 (test_self_move): Likewise.
6716 (test_set_unset_reset): Likewise.
6717 (run_tests): Rewrite in terms of the functions above.
6718
6719 2017-08-31 Weimin Pan <weimin.pan@oracle.com>
6720
6721 * sparc64-tdep.c (adi_stat_t): Fix comment formatting.
6722 (adi_available): Use a temp variable of type CORE_ADDR as argument
6723 3 when calling target_auxv_search.
6724 (adi_normalize_address): Use masks and xor operators to calculate
6725 normalized address.
6726 (adi_read_versions, adi_write_versions, adi_print_versions)
6727 (do_examine, do_assign): Use paddress.
6728
6729 2017-08-29 John Baldwin <jhb@FreeBSD.org>
6730
6731 * mips-fbsd-nat.c (getfpregs_supplies): Return true for FIR.
6732 * mips-fbsd-tdep.c (mips_fbsd_supply_fpregs): Split supply of FSR
6733 out of loop and add supply of FIR.
6734 (mips_fbsd_collect_fpregs): Split collect of FSR out of loop and
6735 add collect of FIR.
6736
6737 2017-08-28 Simon Marchi <simon.marchi@ericsson.com>
6738
6739 PR gdb/21827
6740 * cli/cli-script.c (define_command): Don't convert command name
6741 to lower case.
6742
6743 2017-08-25 Joel Brobecker <brobecker@adacore.com>
6744
6745 * ada-lang.c (ada_lookup_struct_elt_type): Remove parameter "dispp".
6746 Update all callers accordingly. Remove all code blocks handling
6747 the case where DISPP is not NULL.
6748
6749 2017-08-24 Jan Kratochvil <jan.kratochvil@redhat.com>
6750
6751 PR symtab/22003
6752 * dwarf2read.c (dwarf2_const_value_attr, dump_die_shallow)
6753 (dwarf2_get_attr_constant_value, dwarf2_fetch_constant_bytes)
6754 (skip_form_bytes, attr_form_is_constant): Handle DW_FORM_implicit_const.
6755
6756 2017-08-24 Jan Kratochvil <jan.kratochvil@redhat.com>
6757
6758 * dwarf2read.c (build_type_psymtabs_reader): New prototype.
6759 (process_psymtab_comp_unit): Accept IS_DEBUG_TYPES.
6760 (read_comp_units_from_section): New parameter abbrev_section, use
6761 read_and_check_comp_unit_head, allocate signatured_type if needed.
6762 (create_all_comp_units): Update read_comp_units_from_section caller.
6763
6764 2017-08-23 Pedro Alves <palves@redhat.com>
6765
6766 PR remote/21852
6767 * remote.c (add_current_inferior_and_thread): Set inferior_ptid
6768 to null_ptid and switch to thread without reading the registers
6769 after adding the inferior.
6770
6771 2017-08-23 Jan Kratochvil <jan.kratochvil@redhat.com>
6772
6773 * NEWS (Changes since GDB 8.0): Add set compile-gcc and show
6774 compile-gcc.
6775 * compile/compile.c (compile_gcc, show_compile_gcc): New.
6776 (compile_to_object): Implement compile_gcc.
6777 (_initialize_compile): Install "set compile-gcc". Initialize
6778 compile_gcc.
6779
6780 2017-08-23 Jan Kratochvil <jan.kratochvil@redhat.com>
6781
6782 * compile/compile.c (compile_to_object): Conditionally call
6783 set_verbose. Conditionally call compile or compile_v0.
6784
6785 2017-08-07 Weimin Pan <weimin.pan@oracle.com>
6786
6787 * sparc64-tdep.h: (adi_normalize_address): New export.
6788 * sparc-nat.h: (open_adi_tag_fd): New export.
6789 * sparc64-linux-nat.c: (open_adi_tag_fd): New function.
6790 * sparc64-linux-tdep.c:
6791 (SEGV_ACCADI, SEGV_ADIDERR, SEGV_ADIPERR) New defines.
6792 (sparc64_linux_handle_segmentation_fault): New function.
6793 (sparc64_linux_init_abi): Register
6794 sparc64_linux_handle_segmentation_fault
6795 * sparc64-tdep.c: Include cli-utils.h,gdbcmd.h,auxv.h.
6796 (sparc64_addr_bits_remove): New function.
6797 (sparc64_init_abi): Register sparc64_addr_bits_remove.
6798 (MAX_PROC_NAME_SIZE): New macro.
6799 (AT_ADI_BLKSZ, AT_ADI_NBITS, AT_ADI_UEONADI) New defines.
6800 (sparc64adilist): New variable.
6801 (adi_proc_list): New variable.
6802 (find_adi_info): New function.
6803 (add_adi_info): New function.
6804 (get_adi_info_proc): New function.
6805 (get_adi_info): New function.
6806 (info_adi_command): New function.
6807 (read_maps_entry): New function.
6808 (adi_available): New function.
6809 (adi_normalize_address): New function.
6810 (adi_align_address): New function.
6811 (adi_convert_byte_count): New function.
6812 (adi_tag_fd): New function.
6813 (adi_is_addr_mapped): New function.
6814 (adi_read_versions): New function.
6815 (adi_write_versions): New function.
6816 (adi_print_versions): New function.
6817 (do_examine): New function.
6818 (do_assign): New function.
6819 (adi_examine_command): New function.
6820 (adi_assign_command): New function.
6821 (_initialize_sparc64_adi_tdep): New function.
6822
6823 2017-08-22 Simon Marchi <simon.marchi@ericsson.com>
6824
6825 * breakpoint.c (breakpoints_info): Rename to ...
6826 (info_breakpoints_command): ... this.
6827 (watchpoints_info): Rename to ...
6828 (info_watchpoints_command): ... this.
6829 (tracepoints_info): Rename to ...
6830 (info_tracepoints_command): ... this.
6831 (_initialize_breakpoint): Adjust.
6832 * dcache.c (dcache_info): Rename to ...
6833 (info_display_command): ... this.
6834 (_initialize_dcache): Adjust.
6835 * frame.h (args_info): Rename to ...
6836 (info_args_command): ... this.
6837 (locals_info): Rename to ...
6838 (info_locals_command): ... this.
6839 * infcmd.c (nofp_registers_info): Rename to ...
6840 (info_registers_command): ... this.
6841 (float_info): Rename to ...
6842 (info_float_command): ... this.
6843 (program_info): Rename to ...
6844 (info_program_command): ... this.
6845 (all_registers_info): Rename to ...
6846 (info_all_registers_command): ... this.
6847 (vector_info): Rename to ...
6848 (info_vector_command): ... this.
6849 (float_info): Rename to ...
6850 (info_float_command): ... this.
6851 (_initialize_infcmd): Adjust.
6852 * inferior.h (term_info): Rename to ...
6853 (info_terminal_command): ... this.
6854 * inflow.c (term_info): Rename to ...
6855 (info_terminal_command): ... this.
6856 (_initialize_inflow): Adjust.
6857 * infrun.c (signals_info): Rename to ...
6858 (info_signals_command): ... this.
6859 (_initialize_infrun): Adjust.
6860 * objc-lang.c (classes_info): Rename to ...
6861 (info_classes_command): ... this.
6862 (selectors_info): Rename to ...
6863 (info_selectors_command): ... this.
6864 (_initialize_objc_language): Adjust.
6865 * printcmd.c (sym_info): Rename to ...
6866 (info_symbol_command): ... this.
6867 (address_info): Rename to ...
6868 (info_address_command): ... this.
6869 (display_info): Rename to ...
6870 (info_display_command): ... this.
6871 (_initialize_printcmd): Adjust.
6872 * reverse.c (bookmarks_info): Rename to ...
6873 (info_breakpoints_command): ... this.
6874 (_initialize_reverse): Adjust.
6875 * ser-go32.c (dos_info): Rename to ...
6876 (info_serial_command): ... this.
6877 (_initialize_ser_dos): Adjust.
6878 * skip.c (skip_info): Rename to ...
6879 (info_skip_command): ... this.
6880 (_initialize_step_skip): Adjust.
6881 * source.c (line_info): Rename to ...
6882 (info_line_command): ... this.
6883 (source_info): Rename to ...
6884 (info_source_command)
6885 * stack.c (frame_info): Rename to ...
6886 (info_frame_command): ... this.
6887 (locals_info): Rename to ...
6888 (info_locals_command): ... this.
6889 (args_info): Rename to ...
6890 (info_args_command): ... this.
6891 (_initialize_stack): Adjust.
6892 * symtab.c (sources_info): Rename to ...
6893 (info_sources_command): ... this.
6894 (variables_info): Rename to ...
6895 (info_variables_command): ... this.
6896 (functions_info): Rename to ...
6897 (info_functions_command): ... this.
6898 (types_info): Rename to ...
6899 (info_types_command): ... this.
6900 (_initialize_symtab): Adjust.
6901 * target.c (target_info): Rename to ...
6902 (info_target_command): ... this.
6903 (initialize_targets): Adjust.
6904 * tracepoint.c (tvariables_info): Rename to ...
6905 (info_tvariables_command): ... this.
6906 (scope_info): Rename to ...
6907 (info_scope_command): ... this.
6908 (trace_dump_actions): Adjust.
6909 (_initialize_tracepoint): Adjust.
6910
6911 2017-08-22 Tom Tromey <tom@tromey.com>
6912
6913 * breakpoint.h (install_breakpoint): Update.
6914 * breakpoint.c (add_solib_catchpoint): Update.
6915 (install_breakpoint): Change argument to a std::unique_ptr.
6916 (create_fork_vfork_event_catchpoint): Use std::unique_ptr.
6917 (create_breakpoint_sal, create_breakpoint): Update.
6918 (watch_command_1, catch_exec_command_1)
6919 (strace_marker_create_breakpoints_sal): Use std::unique_ptr.
6920 (add_to_breakpoint_chain): Change argument to a std::unique_ptr.
6921 Return the breakpoint.
6922 (set_raw_breakpoint_without_location, set_raw_breakpoint)
6923 (new_single_step_breakpoint): Update.
6924 * break-catch-throw.c (handle_gnu_v3_exceptions): Use
6925 std::unique_ptr.
6926 * break-catch-syscall.c (create_syscall_event_catchpoint): Use
6927 std::unique_ptr.
6928 * break-catch-sig.c (create_signal_catchpoint): Use
6929 std::unique_ptr.
6930 * ada-lang.c (create_ada_exception_catchpoint): Use
6931 std::unique_ptr.
6932
6933 2017-08-22 Tom Tromey <tom@tromey.com>
6934
6935 * breakpoint.c (add_solib_catchpoint): Use std::unique_ptr.
6936
6937 2017-08-22 Tom Tromey <tom@tromey.com>
6938
6939 * psymtab.c (psymtab_search_name): Return a unique_xmalloc_ptr.
6940 (lookup_partial_symbol): Update.
6941
6942 2017-08-22 Tom Tromey <tom@tromey.com>
6943
6944 * source.h (rewrite_source_path): Return a unique_xmalloc_ptr.
6945 * source.c (rewrite_source_path): Return a unique_xmalloc_ptr.
6946 (find_and_open_source, symtab_to_fullname): Update.
6947 * psymtab.c (psymtab_to_fullname): Update.
6948
6949 2017-08-22 Tom Tromey <tom@tromey.com>
6950
6951 * exec.c (exec_file_attach): Update.
6952 * linux-thread-db.c (try_thread_db_load): Update.
6953 * guile/scm-safe-call.c (gdbscm_safe_source_script): Update.
6954 * utils.c (gdb_realpath): Change return type.
6955 (gdb_realpath_keepfile): Update.
6956 (gdb_realpath_check_trailer, gdb_realpath_tests): New functions.
6957 (_initialize_utils): Register the new self test.
6958 * source.c (openp): Update.
6959 (find_and_open_source): Update.
6960 * nto-tdep.c (nto_find_and_open_solib): Update.
6961 * main.c (set_gdb_data_directory): Update.
6962 (captured_main_1): Update.
6963 * dwarf2read.c (dwarf2_get_dwz_file): Update
6964 (dw2_map_symbol_filenames): Update.
6965 * auto-load.c (auto_load_safe_path_vec_update): Update.
6966 (filename_is_in_auto_load_safe_path_vec): Change type of
6967 "filename_realp".
6968 (auto_load_objfile_script): Update.
6969 (file_is_auto_load_safe): Update. Use std::string.
6970 * utils.h (gdb_realpath): Return a gdb::unique_xmalloc_ptr.
6971
6972 2017-08-22 Tom Tromey <tom@tromey.com>
6973
6974 * utils.c (gdb_realpath_keepfile): Return a
6975 gdb::unique_xmalloc_ptr.
6976 * exec.c (exec_file_attach): Update.
6977 * utils.h (gdb_realpath_keepfile): Return a
6978 gdb::unique_xmalloc_ptr.
6979
6980 2017-08-22 Tom Tromey <tom@tromey.com>
6981
6982 * compile/compile.c (compile_file_command): Use
6983 gdb::unique_xmalloc_ptr, std::string.
6984 * utils.c (gdb_abspath): Change return type.
6985 * source.c (openp): Update.
6986 * objfiles.c (allocate_objfile): Update.
6987 * main.c (set_gdb_data_directory): Update.
6988 * utils.h (gdb_abspath): Return a gdb::unique_xmalloc_ptr.
6989
6990 2017-08-22 Zhouyi Zhou <zhouzhouyi@gmail.com>
6991
6992 * cli-cmds.c (list_commands): List actual code around more than
6993 one location.
6994
6995 2017-08-21 John Baldwin <jhb@FreeBSD.org>
6996
6997 * fbsd-nat.c (fbsd_add_threads): Use array type for `lwps'.
6998
6999 2017-08-21 Pedro Alves <palves@redhat.com>
7000
7001 PR gdb/19487
7002 * c-exp.y (variable production): Handle function aliases.
7003 * minsyms.c (msymbol_is_text): New function.
7004 * minsyms.h (msymbol_is_text): Declare.
7005 * symtab.c (find_function_alias_target): New function.
7006 * symtab.h (find_function_alias_target): Declare.
7007
7008 2017-08-21 Pedro Alves <palves@redhat.com>
7009
7010 * eval.c (evaluate_subexp_standard) <OP_TYPE>: Don't dig past
7011 typedefs.
7012 * typeprint.c (whatis_exp): If handling "whatis", and expression
7013 is OP_TYPE, strip one typedef level. Otherwise don't strip
7014 typedefs here.
7015 * valops.c (value_cast): Save "to" type before resolving
7016 stubs/typedefs. Use that type as resulting value's type.
7017
7018 2017-08-18 Tom Tromey <tom@tromey.com>
7019 Pedro Alves <palves@redhat.com>
7020
7021 * spu-multiarch.c (parse_spufs_run): Use scoped_restore.
7022 * sol-thread.c (sol_thread_resume, sol_thread_wait)
7023 (sol_thread_xfer_partial, rw_common): Use scoped_restore.
7024 * procfs.c (procfs_do_thread_registers): Use scoped_restore.
7025 * proc-service.c (ps_xfer_memory): Use scoped_restore.
7026 * linux-tdep.c (linux_corefile_thread): Remove a cleanup.
7027 (linux_get_siginfo_data): Add "thread" argument. Use
7028 scoped_restore.
7029 * linux-nat.c (linux_child_follow_fork)
7030 (check_stopped_by_watchpoint): Use scoped_restore.
7031 * infrun.c (displaced_step_prepare_throw, write_memory_ptid)
7032 (THREAD_STOPPED_BY, handle_signal_stop): Use scoped_restore.
7033 (restore_inferior_ptid, save_inferior_ptid): Remove.
7034 * btrace.c (btrace_fetch): Use scoped_restore.
7035 * bsd-uthread.c (bsd_uthread_fetch_registers)
7036 (bsd_uthread_store_registers): Use scoped_restore.
7037 * breakpoint.c (reattach_breakpoints, detach_breakpoints): Use
7038 scoped_restore.
7039 * aix-thread.c (aix_thread_resume, aix_thread_wait)
7040 (aix_thread_xfer_partial): Use scoped_restore.
7041 * inferior.h (save_inferior_ptid): Remove.
7042
7043 2017-08-18 Yao Qi <yao.qi@linaro.org>
7044
7045 PR tdep/21818
7046 * arm-tdep.c (gdb_print_insn_arm): Mark
7047 USER_SPECIFIED_MACHINE_TYPE if exec_bfd isn't NULL.
7048
7049 2017-08-18 Yao Qi <yao.qi@linaro.org>
7050
7051 * NEWS: Mention GDBserver's new option "--selftest".
7052 * Makefile.in (SFILES): Remove selftest.c, add common/selftest.c.
7053 * selftest.c: Move it to common/selftest.c.
7054 * selftest.h: Move it to common/selftest.h.
7055 * selftest-arch.c (reset): New function.
7056 (tests_with_arch): Call reset.
7057
7058 2017-08-18 Yao Qi <yao.qi@linaro.org>
7059
7060 * selftest.c (run_tests): Don't call QUIT. Call debug_printf
7061 instead of exception_fprintf and printf_filtered.
7062
7063 2017-08-18 Yao Qi <yao.qi@linaro.org>
7064
7065 * selftest.c (register_self_test): Rename it to
7066 selftests::register_test.
7067 (run_self_tests): selftest::run_tests.
7068 * selftest.h: Update declarations.
7069 * selftest-arch.c (register_self_test_foreach_arch): Rename it to
7070 selftests::register_test_foreach_arch.
7071 * selftest-arch.h: Update declaration.
7072 * aarch64-tdep.c: Update.
7073 * arm-tdep.c: Likewise.
7074 * disasm-selftests.c: Likewise.
7075 * dwarf2loc.c: Likewise.
7076 * dwarf2-frame.c: Likewise.
7077 * findvar.c: Likewise.
7078 * gdbarch-selftests.c: Likewise.
7079 * maint.c (maintenance_selftest): Likewise.
7080 * regcache.c: Likewise.
7081 * rust-exp.y: Likewise.
7082 * selftest-arch.c: Likewise.
7083 * unittests/environ-selftests.c: Likewise.
7084 * unittests/function-view-selftests.c: Likewise.
7085 * unittests/offset-type-selftests.c: Likewise.
7086 * unittests/optional-selftests.c: Likewise.
7087 * unittests/scoped_restore-selftests.c: Likewise.
7088 * utils-selftests.c: Likewise.
7089
7090 2017-08-17 Pedro Alves <palves@redhat.com>
7091
7092 * cli/cli-cmds.c (source_command): Delete 'old_source_verbose'
7093 local.
7094
7095 2017-08-17 Pedro Alves <palves@redhat.com>
7096
7097 * dwarf2read.c (struct dwarf2_cu) <line_header_die_owner>: New
7098 field.
7099 (reset_die_in_process): Delete, replaced by ...
7100 (process_die_scope): ... this new class. Make it responsible for
7101 freeing cu->line_header too.
7102 (process_die): Use process_die_scope.
7103 (handle_DW_AT_stmt_list): Record the line header's owner CU/DIE in
7104 cu->line_header_die_owner. Don't release the line header if it's
7105 owned by the CU.
7106 (setup_type_unit_groups): Make the CU/DIE own the line header.
7107 Don't release the line header here.
7108
7109 2017-08-17 Alex Lindsay <alexlindsay239@gmail.com> (tiny change)
7110
7111 * elfread.c (elf_read_minimal_symbols): xfree synthsyms.
7112
7113 2017-08-17 Ruslan Kabatsayev <b7.10110111@gmail.com>
7114
7115 * NEWS: Mention new shortcuts for nexti and stepi in TUI
7116 Single-Key mode
7117
7118 2017-08-16 Ruslan Kabatsayev <b7.10110111@gmail.com>
7119
7120 * tui/tui.c (tui_commands): Add "nexti" and "stepi" to the Single-Key
7121 mode command list.
7122
7123 2017-08-15 Stafford Horne <shorne@gmail.com>
7124
7125 * MAINTAINERS (Write After Approval): Add Stafford Horne.
7126
7127 2017-08-15 Stafford Horne <shorne@gmail.com>
7128
7129 * xtensa-tdep.c (xtensa_init_reggroups): Use xstrdup for cpname.
7130
7131 2017-08-15 Sergio Durigan Junior <sergiodj@redhat.com>
7132
7133 PR gdb/21954
7134 * infcmd.c (unset_environment_command): Use the 'clear' method on
7135 the environment instead of resetting it.
7136
7137 2017-08-15 John Baldwin <jhb@FreeBSD.org>
7138
7139 * fbsd-nat.c (fbsd_convert_siginfo): Fix compile on big-endian
7140 platforms.
7141
7142 2017-08-14 Tom Tromey <tom@tromey.com>
7143
7144 * valprint.c (print_octal_chars): Use HOST_CHAR_BIT.
7145 (print_binary_chars): Likewise.
7146 (BITS_IN_BYTES): Remove.
7147
7148 2017-08-14 Tom Tromey <tom@tromey.com>
7149
7150 PR gdb/21675
7151 * valprint.c (LOW_ZERO): Change value to 034.
7152 (print_octal_chars): Add static_asserts for octal constants.
7153 * printcmd.c (print_scalar_formatted): Add 'd' case.
7154
7155 2017-08-11 Tom Tromey <tom@tromey.com>
7156
7157 * symfile.c (add_symbol_file_command): Use std::vector.
7158
7159 2017-08-14 Tom Tromey <tom@tromey.com>
7160
7161 * break-catch-throw.c (handle_gnu_v3_exceptions): Use std::move.
7162 * break-catch-syscall.c (create_syscall_event_catchpoint): Use
7163 std::move.
7164 * break-catch-sig.c (create_signal_catchpoint): Use std::move.
7165
7166 2017-08-11 Pedro Alves <palves@redhat.com>
7167
7168 * infrun.c (process_event_stop_test): Adjust
7169 function_name_is_marked_for_skip call.
7170 * skip.c: Include <list>.
7171 (skiplist_entry): Make it a class with private fields, and
7172 getters/setters.
7173 (skiplist_entry_chain): Delete.
7174 (skiplist_entries): New.
7175 (skiplist_entry_count): Delete.
7176 (highest_skiplist_entry_num): New.
7177 (ALL_SKIPLIST_ENTRIES, ALL_SKIPLIST_ENTRIES_SAFE): Delete.
7178 (add_skiplist_entry): Delete.
7179 (skiplist_entry::skiplist_entry): New.
7180 (skiplist_entry::add_entry): New.
7181 (skip_file_command, skip_function): Adjust.
7182 (compile_skip_regexp): Delete.
7183 (skip_command): Don't compile regexp here. Adjust to use
7184 skiplist_entry::add_entry.
7185 (skip_info): Adjust to use range-for and getters.
7186 (skip_enable_command, skip_disable_command): Adjust to use
7187 range-for and setters.
7188 (skip_delete_command): Adjust to use std::list.
7189 (add_skiplist_entry): Delete.
7190 (skip_file_p): Delete, refactored as ...
7191 (skiplist_entry::do_skip_file_p): ... this new method.
7192 (skip_gfile_p): Delete, refactored as ...
7193 (skiplist_entry::do_gskip_file_p): ... this new method.
7194 (skip_function_p, skip_rfunction_p): Delete, refactored as ...
7195 (skiplist_entry::skip_function_p): ... this new method.
7196 (function_name_is_marked_for_skip): Now returns bool, and takes
7197 the function sal by const reference. Adjust to use range-for and
7198 skiplist_entry methods.
7199 (_initialize_step_skip): Remove references to
7200 skiplist_entry_chain, skiplist_entry_count.
7201 * skip.h (function_name_is_marked_for_skip): Now returns bool, and
7202 takes the function sal by const reference.
7203
7204 2017-08-11 Yao Qi <yao.qi@linaro.org>
7205
7206 * dwarf2-frame.c (clear_pointer_cleanup): Remove.
7207 (dwarf2_frame_cache): Remove reset_cache_cleanup.
7208 (dwarf2_frame_cache):
7209 * frame-unwind.c (frame_unwind_try_unwinder): Catch
7210 RETURN_MASK_ALL and set *this_case to NULL.
7211 * frame-unwind.h: Update comments.
7212
7213 2017-08-11 Yao Qi <yao.qi@linaro.org>
7214
7215 * dwarf2-frame.c (dwarf2_frame_state_alloc_regs): Remove.
7216 (dwarf2_frame_state_copy_regs): Remove.
7217 (dwarf2_frame_state_free_regs): Remove.
7218 (dwarf2_frame_state::~dwarf2_frame_state): Remove.
7219 (dwarf2_restore_rule): Call method .alloc_regs instead of
7220 dwarf2_frame_state_alloc_regs.
7221 (execute_cfa_program): Likewise. Call dwarf2_frame_state_reg_info
7222 constructor. Call std::move.
7223 (dwarf2_fetch_cfa_info): Don't call dwarf2_frame_state_copy_regs.
7224 (dwarf2_frame_cache): Likewise.
7225
7226 [GDB_SELF_TEST]: Include selftest.h and
7227 selftest-arch.h.
7228 [GDB_SELF_TEST] (execute_cfa_program_test): New function.
7229 (_initialize_dwarf2_frame) [GDB_SELF_TEST]: Register
7230 execute_cfa_program_test.
7231
7232 * dwarf2-frame.h (dwarf2_frame_state_reg_info): Add ctor, dtor,
7233 copy ctor, assignment operator, move assignment.
7234 <alloc_regs>: New method.
7235 <swap>: New method.
7236 (struct dwarf2_frame_state): Delete dtor.
7237 (dwarf2_frame_state_alloc_regs): Remove declaration.
7238 * sparc-tdep.c (sparc_execute_dwarf_cfa_vendor_op): Don't call
7239 dwarf2_frame_state_alloc_regs, use .alloc_regs instead.
7240
7241 2017-08-11 Yao Qi <yao.qi@linaro.org>
7242
7243 * dwarf2-frame.c (dwarf2_frame_state_free): Remove.
7244 (dwarf2_frame_state::dwarf2_frame_state): New.
7245 (dwarf2_frame_state::~dwarf2_frame_state): New.
7246 (dwarf2_fetch_cfa_info): Update.
7247 (dwarf2_frame_cache): Remove old_chain. Change 'fs' to an object
7248 rather than a pointer. Update code.
7249 * dwarf2-frame.h (struct dwarf2_frame_state): Declare ctor and
7250 dtor.
7251 <data_align, code_align, retaddr_column>: Change them to const.
7252 <armcc_cfa_offsets_sf, armcc_cfa_offsets_reversed>: Change them
7253 to bool.
7254
7255 2017-08-11 Yao Qi <yao.qi@linaro.org>
7256
7257 * dwarf2-frame.h (struct dwarf2_frame_state_reg) <exp_len>: Remove.
7258 <loc.exp>: New field.
7259 * dwarf2-frame.c (execute_cfa_program): Update.
7260 (dwarf2_frame_prev_register): Update.
7261
7262 2017-08-10 Pedro Alves <palves@redhat.com>
7263
7264 * common/gdb_unique_ptr.h (xfree_deleter<T[]>): Define.
7265
7266 2017-08-09 John Baldwin <jhb@FreeBSD.org>
7267
7268 * fbsd-nat.c (struct fbsd_fork_info): Remove.
7269 (fbsd_pending_children): Use std::list.
7270 (fbsd_remember_child): Likewise.
7271 (fbsd_is_child_pending): Likewise.
7272 (fbsd_pending_vfork_done): Use std::forward_list.
7273 (fbsd_add_vfork_done): Likewise.
7274 (fbsd_is_vfork_done_pending): Likewise.
7275 (fbsd_next_vfork_done): Likewise.
7276
7277 2017-08-09 John Baldwin <jhb@FreeBSD.org>
7278
7279 * fbsd-nat.c [HAVE_KINFO_GETVMMAP] (struct free_deleter): New.
7280 (fbsd_find_memory_regions): Use free_deleter with std::unique_ptr.
7281 [!HAVE_KINFO_GETVMMAP] (fbsd_find_memory_regions): Use std::string
7282 for `mapfilename'.
7283 (fbsd_xfer_partial): Use gdb::byte_vector.
7284 (fbsd_add_threads): Use gdb::unique_xmalloc_ptr.
7285
7286 2017-08-09 John Baldwin <jhb@FreeBSD.org>
7287
7288 * fbsd-nat.c: [!HAVE_KINFO_GETVMMAP]: Include <sys/user.h> and
7289 "filestuff.h".
7290 (fbsd_find_memory_regions): Fix `mapfile' initialization.
7291
7292 2017-08-09 Tom Tromey <tom@tromey.com>
7293
7294 * skip.c (skiplist_entry): New constructor.
7295 (skiplist_entry::enabled, skiplist_entry::function_is_regexp)
7296 (skiplist_entry::file_is_glob): Now bool.
7297 (skiplist_entry::file, skiplist_entry::function): Now
7298 std::string.
7299 (make_skip_entry): Return a unique_ptr. Use new.
7300 (free_skiplist_entry, free_skiplist_entry_cleanup)
7301 (make_free_skiplist_entry_cleanup): Remove.
7302 (skip_command, skip_disable_command, add_skiplist_entry)
7303 (skip_form_bytes, compile_skip_regexp, skip_command, skip_info)
7304 (skip_file_p, skip_gfile_p, skip_function_p, skip_rfunction_p)
7305 (function_name_is_marked_for_skip): Update.
7306 (skip_delete_command): Update. Use delete.
7307
7308 2017-08-09 Jiong Wang <jiong.wang@arm.com>
7309
7310 * aarch64-linux-tdep.c: Include "auxv.h" and "elf/common.h".
7311 (aarch64_linux_core_read_description): New function.
7312 (aarch64_linux_init_abi): Register gdbarch_core_read_description.
7313
7314 2017-08-09 Pedro Alves <palves@redhat.com>
7315
7316 * cp-name-parser.y (cp_comp_to_string): Return a
7317 gdb::unique_xmalloc_ptr<char>.
7318 * cp-support.c (replace_typedefs_qualified_name)
7319 (replace_typedefs): Adjust to use gdb::unique_xmalloc_ptr<char>.
7320 (cp_canonicalize_string_full): Use op= instead of explicit
7321 convertion.
7322 (cp_class_name_from_physname, method_name_from_physname)
7323 (cp_func_name, cp_remove_params): Adjust to use
7324 gdb::unique_xmalloc_ptr<char>.
7325 * cp-support.h (cp_comp_to_string): Return a
7326 gdb::unique_xmalloc_ptr<char>.
7327 * python/py-type.c (typy_lookup_type): Adjust to use
7328 gdb::unique_xmalloc_ptr<char>.
7329
7330 2017-08-09 H.J. Lu <hongjiu.lu@intel.com>
7331
7332 * dwarf2read.c (dwarf2_string_attr): Fix a typo.
7333
7334 2017-08-09 Alex Lindsay <alexlindsay239@gmail.com>
7335 Yao Qi <yao.qi@linaro.org>
7336
7337 * cp-support.c (cp_canonicalize_string_full): Use
7338 gdb::unique_xmalloc_ptr<char>.
7339 (cp_canonicalize_string): Likewise.
7340
7341 2017-08-09 Yao Qi <yao.qi@linaro.org>
7342
7343 * features/Makefile (WHICH): Remove i386/ non-linux stuff.
7344 * regformats/i386/amd64-avx-avx512.dat: Remove.
7345 * regformats/i386/amd64-avx-mpx-avx512-pku.dat: Remove.
7346 * regformats/i386/amd64-avx-mpx.dat:Remove.
7347 * regformats/i386/amd64-avx.dat: Remove.
7348 * regformats/i386/amd64-mpx.dat: Remove.
7349 * regformats/i386/i386-avx-avx512.dat: Remove.
7350 * regformats/i386/i386-avx-mpx-avx512-pku.dat: Remove.
7351 * regformats/i386/i386-avx-mpx.dat: Remove.
7352 * regformats/i386/i386-mmx.dat: Remove.
7353 * regformats/i386/i386-mpx.dat: Remove.
7354
7355 2017-08-09 Yao Qi <yao.qi@linaro.org>
7356
7357 * amd64-tdep.h (tdesc_x32): Remove the declaration.
7358 * amd64-tdep.c: Don't include features/i386/x32*.c.
7359 (_initialize_amd64_tdep): Don't call initialize_tdesc_x32*
7360 functions.
7361 * features/Makefile (WHICH): Remove i386/x32, i386/x32-avx,
7362 and i386/x32-avx-avx512.
7363 (XMLTOC): Remove i386/x32-avx.xml, i386/x32-avx-avx512.xml,
7364 and i386/x32.xml.
7365 * features/i386/x32-avx-avx512.c: Removed.
7366 * features/i386/x32-avx-avx512.xml: Removed.
7367 * features/i386/x32-avx.c: Removed.
7368 * features/i386/x32-avx.xml: Removed.
7369 * features/i386/x32.c: Removed.
7370 * features/i386/x32.xml: Removed.
7371 * regformats/i386/x32-avx-avx512.dat: Removed.
7372 * regformats/i386/x32-avx.dat: Removed.
7373 * regformats/i386/x32.dat: Removed.
7374
7375 2017-08-07 Maciej W. Rozycki <macro@imgtec.com>
7376
7377 PR breakpoints/21886
7378 * mem-break.c (default_memory_insert_breakpoint): Use
7379 `->placed_address' rather than `->reqstd_address' for the
7380 breakpoint location.
7381
7382 2017-08-07 Maciej W. Rozycki <macro@imgtec.com>
7383
7384 * arch-utils.c (default_print_insn): Remove arch/mach/endian
7385 assertions.
7386
7387 2017-08-07 Maciej W. Rozycki <macro@imgtec.com>
7388
7389 * gdbarch.sh (gdbarch_info): Replace the `tdep_info' member with
7390 a union of `tdep_info', `tdesc_data' and `id'.
7391 * aarch64-tdep.c (aarch64_gdbarch_init): Use `info.tdesc_data'
7392 rather than `info.tdep_info'.
7393 * amd64-linux-tdep.c (amd64_linux_init_abi): Likewise.
7394 * i386-linux-tdep.c (i386_linux_init_abi): Likewise.
7395 * i386-tdep.c (i386_gdbarch_init): Likewise.
7396 * mips-linux-tdep.c (mips_linux_init_abi): Likewise.
7397 * mips-tdep.c (mips_gdbarch_init): Likewise.
7398 * nds32-tdep.c (nds32_gdbarch_init): Likewise.
7399 * rs6000-tdep.c (rs6000_gdbarch_init): Likewise.
7400 * ppc-linux-tdep.c (ppu2spu_sniffer): Use `info.id' rather than
7401 `info.tdep_info'.
7402 (ppc_linux_init_abi): Use `info.tdesc_data' rather than
7403 `info.tdep_info'.
7404 * sparc-tdep.c (sparc32_gdbarch_init): Likewise.
7405 * spu-multiarch.c (spu_gdbarch): Use `info.id' rather than
7406 `info.tdep_info'.
7407 * spu-tdep.c (spu_gdbarch_init): Likewise.
7408 * gdbarch.h: Regenerate.
7409
7410 2017-08-07 Leszek Swirski <leszeks@google.com>
7411
7412 PR symtab/20899
7413 * dwarf2read.c (dwarf2_string_attr): Allow DW_FORM_GNU_strp_alt.
7414
7415 2017-08-07 Simon Marchi <simon.marchi@ericsson.com>
7416
7417 * remote-sim.c (gdbsim_load): Remove char **argv local variable.
7418 (gdbsim_open): Rename gdb_argv args object to argv.
7419
7420 2017-08-05 Tom Tromey <tom@tromey.com>
7421
7422 * compile/compile-object-load.c (compile_object_load): Use
7423 gdb::unique_xmalloc_ptr.
7424 * cli/cli-dump.c (scan_filename): Rename from
7425 scan_filename_with_cleanup. Change return type.
7426 (scan_expression): Rename from scan_expression_with_cleanup.
7427 Change return type.
7428 (dump_memory_to_file, dump_value_to_file, restore_command):
7429 Use gdb::unique_xmalloc_ptr. Update.
7430 * cli/cli-cmds.c (find_and_open_script): Use
7431 gdb::unique_xmalloc_ptr.
7432 * tracefile-tfile.c (tfile_open): Use gdb::unique_xmalloc_ptr.
7433 * symmisc.c (maintenance_print_symbols)
7434 (maintenance_print_msymbols): Use gdb::unique_xmalloc_ptr.
7435 * symfile.c (symfile_bfd_open, generic_load)
7436 (add_symbol_file_command, remove_symbol_file_command): Use
7437 gdb::unique_xmalloc_ptr.
7438 * source.c (openp): Use gdb::unique_xmalloc_ptr.
7439 * psymtab.c (maintenance_print_psymbols): Use
7440 gdb::unique_xmalloc_ptr.
7441 * corelow.c (core_open): Use gdb::unique_xmalloc_ptr.
7442 * breakpoint.c (save_breakpoints): Use gdb::unique_xmalloc_ptr.
7443 * solib.c (solib_map_sections): Use gdb::unique_xmalloc_ptr.
7444 (reload_shared_libraries_1): Likewise.
7445
7446 2017-08-05 Tom Tromey <tom@tromey.com>
7447
7448 * rust-exp.y (rust_op_ptr, set_field): Remove typedefs.
7449 (rust_op_vector, rust_set_vector): New typedefs.
7450 (current_parser): New global.
7451 (work_obstack): Change to pointer type. Update all users.
7452 (rust_ast, pstate): Remove globals.
7453 (struct rust_parser): New.
7454 (%union) <params, field_inits>: Change type.
7455 (start, tuple_expr, unit_expr, struct_expr_list, literal)
7456 (field_expr, expr_list, maybe_expr_list, type_list): Update.
7457 (ast_call_ish, ast_path, ast_function_type, ast_tuple_type)
7458 (convert_params_to_types, convert_params_to_expression): Change
7459 type of "params".
7460 (ast_string): Change type of "fields".
7461 (rust_parse): Make a rust_parser. Remove cleanups.
7462 (rust_lex_tests): Make and install an auto_obstack.
7463
7464 2017-08-04 Yao Qi <yao.qi@linaro.org>
7465
7466 * configure.srv (ipa_x32_linux_regobj): New.
7467 * linux-amd64-ipa.c (get_ipa_tdesc): Use X86_TDESC_AVX_AVX512
7468 instead of X86_TDESC_AVX512.
7469 (initialize_low_tracepoint): Call
7470 init_registers_x32_avx_avx512_linux.
7471
7472 2017-08-04 Yao Qi <yao.qi@linaro.org>
7473
7474 * utils.h (gdb_argv): Add namespace std for nullptr_t.
7475
7476 2017-08-03 Ruslan Kabatsayev <b7.10110111@gmail.com>
7477
7478 * MAINTAINERS (Write After Approval): Add Ruslan Kabatsayev.
7479
7480 2017-08-03 Tom Tromey <tom@tromey.com>
7481
7482 * utils.c (make_cleanup_freeargv, do_freeargv, gdb_buildargv):
7483 Remove.
7484 * utils.h (make_cleanup_freeargv, gdb_buildargv): Remove.
7485
7486 2017-08-03 Tom Tromey <tom@tromey.com>
7487
7488 * python/py-param.c (compute_enum_values): Use gdb_argv.
7489
7490 2017-08-03 Tom Tromey <tom@tromey.com>
7491
7492 * utils.h (struct gdb_argv_deleter): New.
7493 (gdb_argv): New class.
7494 * utils.c (gdb_argv::reset): New method.
7495 * tracepoint.c (delete_trace_variable_command): Use gdb_argv.
7496 * tracefile.c (tsave_command): Use gdb_argv.
7497 * top.c (new_ui_command): Use gdb_argv.
7498 * symmisc.c (maintenance_print_symbols)
7499 (maintenance_print_msymbols, maintenance_expand_symtabs): Use gdb_argv.
7500 * symfile.c (symbol_file_command, generic_load)
7501 (remove_symbol_file_command): Use gdb_argv.
7502 * stack.c (backtrace_command): Use gdb_argv.
7503 * source.c (add_path, show_substitute_path_command)
7504 (unset_substitute_path_command, set_substitute_path_command):
7505 Use gdb_argv.
7506 * skip.c (skip_command): Use gdb_argv. Use gdb_buildargv.
7507 * ser-mingw.c (pipe_windows_open): Use gdb_argv.
7508 * remote.c (extended_remote_run, remote_put_command)
7509 (remote_get_command, remote_delete_command): Use gdb_argv.
7510 * remote-sim.c (gdbsim_load, gdbsim_create_inferior)
7511 (gdbsim_open): Use gdb_argv.
7512 * python/py-cmd.c (gdbpy_string_to_argv): Use gdb_argv.
7513 * psymtab.c (maintenance_print_psymbols): Use gdb_argv.
7514 * procfs.c (procfs_info_proc): Use gdb_argv.
7515 * interps.c (interpreter_exec_cmd): Use gdb_argv.
7516 * infrun.c (handle_command): Use gdb_argv.
7517 * inferior.c (add_inferior_command, clone_inferior_command):
7518 Use gdb_argv.
7519 * guile/scm-string.c (gdbscm_string_to_argv): Use gdb_argv.
7520 * exec.c (exec_file_command): Use gdb_argv.
7521 * cli/cli-cmds.c (alias_command): Use gdb_argv.
7522 * compile/compile.c (build_argc_argv): Use gdb_argv.
7523
7524 2017-08-03 Tom Tromey <tom@tromey.com>
7525
7526 * python/python.c (gdbpy_decode_line): Use unique_xmalloc_ptr.
7527
7528 2017-08-03 Tom Tromey <tom@tromey.com>
7529
7530 * python/python.c (compute_python_string): Return std::string.
7531 (gdbpy_eval_from_control_command): Update.
7532 (do_start_initialization): Use std::string.
7533 * python/py-varobj.c (py_varobj_iter_next): Use string_printf, not
7534 xstrprintf.
7535 * python/py-breakpoint.c (local_setattro): Use string_printf, not
7536 xstrprintf.
7537
7538 2017-08-03 Tom Tromey <tom@tromey.com>
7539
7540 * top.h (do_restore_instream_cleanup): Remove.
7541 * top.c (do_restore_instream_cleanup): Remove.
7542 (read_command_file): Use scoped_restore.
7543 * cli/cli-script.c (execute_user_command): Use scoped_restore.
7544
7545 2017-08-03 Tom Tromey <tom@tromey.com>
7546
7547 * cli/cli-script.c (execute_user_command)
7548 (execute_control_command): Use scoped_restore.
7549
7550 2017-08-03 Tom Tromey <tom@tromey.com>
7551
7552 * cli/cli-script.c (do_restore_user_call_depth): Remove.
7553 (execute_user_command): Remove user_call_depth; use
7554 user_args_stack's size instead.
7555
7556 2017-08-03 Tom Tromey <tom@tromey.com>
7557
7558 * top.h (in_user_command): Remove.
7559 * top.c (in_user_command): Remove.
7560 * cli/cli-script.c (do_restore_user_call_depth)
7561 (execute_user_command): Update.
7562
7563 2017-08-03 Tom Tromey <tom@tromey.com>
7564
7565 * valops.c (search_struct_method): Use gdb::byte_vector.
7566 * valarith.c (value_concat): Use std::vector.
7567 * target.c (memory_xfer_partial): Use gdb::byte_vector.
7568 (simple_search_memory): Likewise.
7569 * printcmd.c (find_string_backward): Use gdb::byte_vector.
7570 * mi/mi-main.c (mi_cmd_data_write_memory): Use gdb::byte_vector.
7571 * gcore.c (gcore_copy_callback): Use gdb::byte_vector.
7572 * elfread.c (elf_rel_plt_read): Use std::string.
7573 * cp-valprint.c (cp_print_value): Use gdb::byte_vector.
7574 * cli/cli-dump.c (restore_section_callback): Use
7575 gdb::byte_vector.
7576
7577 2017-08-03 Tom Tromey <tom@tromey.com>
7578
7579 * jit.c (jit_reader_load_command): Use unique_xmalloc_ptr.
7580
7581 2017-08-03 Tom Tromey <tom@tromey.com>
7582
7583 * tui/tui-regs.c (tui_restore_gdbout): Remove.
7584 (tui_register_format): Use scoped_restore.
7585
7586 2017-08-03 Tom Tromey <tom@tromey.com>
7587
7588 * reverse.c (exec_direction_default): Remove.
7589 (exec_reverse_once): Use scoped_restore.
7590 * remote.c (restore_remote_timeout): Remove.
7591 (remote_flash_erase, remote_flash_write, remote_flash_done)
7592 (readchar, remote_serial_write): Use scoped_restore.
7593 * cli/cli-script.c (struct source_cleanup_lines_args)
7594 (source_cleanup_lines): Remove.
7595 (script_from_file): Use scoped_restore.
7596 * cli/cli-cmds.c (source_verbose_cleanup): Remove.
7597 (source_command): Use scoped_restore.
7598
7599 2017-08-03 Tom Tromey <tom@tromey.com>
7600
7601 * utils.h (make_cleanup_free_so): Remove.
7602 * utils.c (do_free_so, make_cleanup_free_so): Remove.
7603 * solist.h (struct so_deleter): New.
7604 (so_list_up): New typedef.
7605 * solib-svr4.c (svr4_read_so_list): Use so_list_up.
7606
7607 2017-08-03 Tom Tromey <tom@tromey.com>
7608
7609 * utils.h (make_cleanup_restore_current_language): Remove.
7610 * utils.c (do_restore_current_language)
7611 (make_cleanup_restore_current_language): Remove.
7612 * parse.c (parse_exp_in_context_1)
7613 (parse_expression_with_language): Use
7614 scoped_restore_current_language.
7615 * mi/mi-main.c (mi_cmd_execute): Use
7616 scoped_restore_current_language.
7617 * language.h (scoped_restore_current_language): New class.
7618
7619 2017-08-03 Tom Tromey <tom@tromey.com>
7620
7621 * compile/compile.c (cleanup_unlink_file): Remove.
7622 (compile_to_object): Use gdb::unlinker.
7623 (eval_compile_command): Likewise.
7624
7625 2017-08-03 Tom Tromey <tom@tromey.com>
7626
7627 * utils.h (make_cleanup_fclose): Remove.
7628 * utils.c (do_fclose_cleanup, make_cleanup_fclose): Remove.
7629
7630 2017-08-03 Tom Tromey <tom@tromey.com>
7631
7632 * top.c (open_terminal_stream): Return gdb_file_up.
7633 (new_ui_command): Update.
7634
7635 2017-08-03 Tom Tromey <tom@tromey.com>
7636
7637 * source.c (print_source_lines_base, forward_search_command)
7638 (reverse_search_command): Use gdb_file_up.
7639
7640 2017-08-03 Tom Tromey <tom@tromey.com>
7641
7642 * fbsd-nat.c (fbsd_find_memory_regions): Update.
7643
7644 2017-08-03 Tom Tromey <tom@tromey.com>
7645
7646 * cli/cli-cmds.c (find_and_open_script): Change return type.
7647 Remove "streamp" and "full_path" parameters.
7648 (source_script_with_search): Update.
7649 * auto-load.c (source_script_file): Update.
7650 * cli/cli-cmds.h (find_and_open_script): Change type.
7651 (open_script): New struct.
7652
7653 2017-08-03 Tom Tromey <tom@tromey.com>
7654
7655 * xml-support.c (xml_fetch_content_from_file): Update.
7656 * ui-file.c (stdio_file::open): Update.
7657 * tracefile-tfile.c (tfile_start): Update.
7658 * remote.c (remote_file_put, remote_file_get): Update.
7659 * nat/linux-procfs.c (linux_proc_get_int)
7660 (linux_proc_pid_get_state, linux_proc_tid_get_name): Update.
7661 * nat/linux-osdata.c (linux_common_core_of_thread): Update.
7662 (command_from_pid, commandline_from_pid, linux_xfer_osdata_cpus)
7663 (print_sockets, linux_xfer_osdata_shm, linux_xfer_osdata_sem)
7664 (linux_xfer_osdata_msg, linux_xfer_osdata_modules): Update.
7665 * nat/linux-btrace.c (linux_determine_kernel_start): Update.
7666 * linux-nat.c (linux_proc_pending_signals): Update.
7667 * dwarf2read.c (write_psymtabs_to_index): Use gdb_file_up.
7668 (file_closer): Remove.
7669 * compile/compile.c (compile_to_object): Update.
7670 * common/filestuff.h (struct gdb_file_deleter): New.
7671 (gdb_file_up): New typedef.
7672 (gdb_fopen_cloexec): Change return type.
7673 * common/filestuff.c (gdb_fopen_cloexec): Return gdb_file_up.
7674 * cli/cli-dump.c (fopen_with_cleanup): Remove.
7675 (dump_binary_file, restore_binary_file): Update.
7676 * auto-load.c (auto_load_objfile_script_1): Update.
7677
7678 2017-08-03 Tom Tromey <tom@tromey.com>
7679
7680 * tracepoint.c (tvariables_info_1): Use ui_out_emit_table.
7681 (info_static_tracepoint_markers_command): Likewise.
7682 * solib.c (info_sharedlibrary_command): Use ui_out_emit_table.
7683 * skip.c (skip_info): Use ui_out_emit_table.
7684 * progspace.c (print_program_space): Use ui_out_emit_table.
7685 * osdata.c (info_osdata): Use ui_out_emit_table.
7686 * mi/mi-cmd-info.c (mi_cmd_info_ada_exceptions): Use
7687 ui_out_emit_table.
7688 * linux-thread-db.c (info_auto_load_libthread_db): Use
7689 ui_out_emit_table.
7690 * inferior.c (print_inferior): Use ui_out_emit_table.
7691 * gdb_bfd.c (maintenance_info_bfds): Use ui_out_emit_table.
7692 * breakpoint.c (breakpoint_1): Use ui_out_emit_table.
7693 * auto-load.c (auto_load_info_scripts): Use ui_out_emit_table.
7694 * ada-tasks.c (print_ada_task_info): Use ui_out_emit_table.
7695 * ui-out.h (class ui_out_emit_table): New.
7696
7697 2017-08-02 Maciej W. Rozycki <macro@imgtec.com>
7698
7699 * mips-tdep.c (mips_fpu_type_str): New function.
7700 (mips_dump_tdep): Call it.
7701
7702 2017-08-01 Maciej W. Rozycki <macro@imgtec.com>
7703
7704 * mips-tdep.c (mips_gdbarch_init): Use MIPS_FPU_TYPE to access
7705 `->mips_fpu_type'.
7706
7707 2017-07-31 Xavier Roirand <roirand@adacore.com>
7708
7709 * solib-darwin.c (DYLD_VERSION_MAX): Increase value.
7710
7711 2017-07-27 Xavier Roirand <roirand@adacore.com>
7712
7713 * MAINTAINERS (Write After Approval): Add Xavier Roirand.
7714
7715 2017-07-26 Yao Qi <yao.qi@linaro.org>
7716
7717 * cli/cli-cmds.c (maintenancechecklist): New variable.
7718 * gdbcmd.h (maintenancechecklist): Declare it.
7719 * i386-linux-tdep.c (_initialize_i386_linux_tdep) [GDB_SELF_TEST]:
7720 Call i386_linux_read_description with different masks.
7721 * maint.c (maintenance_check_command): New function.
7722 (_initialize_maint_cmds): Call add_prefix_cmd.
7723 * target-descriptions.c (tdesc_reg): override operator != and ==.
7724 (tdesc_type): Likewise.
7725 (tdesc_feature): Likewise.
7726 (target_desc): Likewise.
7727 [GDB_SELF_TEST] (selftests::record_xml_tdesc): New function.
7728 (maintenance_check_xml_descriptions): New function.
7729 (_initialize_target_descriptions) Add command "xml-descriptions".
7730 * target-descriptions.h (selftests::record_xml_tdesc): Declare.
7731
7732 2017-07-26 Yao Qi <yao.qi@linaro.org>
7733
7734 * i386-linux-tdep.c: Don't include features/i386/i386-*linux.c.
7735 Include features/i386/32bit-*.c.
7736 (i386_linux_read_description): Generate target description if it
7737 doesn't exist.
7738 (_initialize_i386_linux_tdep): Don't call _initialize_tdesc_i386
7739 functions.
7740 * features/i386/32bit-linux.c: Re-generated.
7741 * features/i386/32bit-sse.c: Likewise.
7742 * target-descriptions.c (print_c_feature::visit): Print code to
7743 set register number if needed.
7744 (print_c_feature) <m_next_regnum>: New field.
7745
7746 2017-07-26 Yao Qi <yao.qi@linaro.org>
7747
7748 * features/Makefile (CFILES): Rename with TDESC_CFILES.
7749 (FEATURE_XMLFILES): New.
7750 (FEATURE_CFILES): New.
7751 New rules.
7752 (clean-cfiles): Remove generated c files.
7753 * features/i386/32bit-avx.c: Generated.
7754 * features/i386/32bit-avx512.c: Generated.
7755 * features/i386/32bit-core.c: Generated.
7756 * features/i386/32bit-linux.c: Generated.
7757 * features/i386/32bit-mpx.c: Generated.
7758 * features/i386/32bit-pkeys.c: Generated.
7759 * features/i386/32bit-sse.c: Generated.
7760 * target-descriptions.c: Include algorithm.
7761 (tdesc_element_visitor): Add method visit_end.
7762 (print_c_tdesc): Implement visit_end.
7763 (print_c_tdesc:: m_filename_after_features): Move it to
7764 protected.
7765 (print_c_feature): New class.
7766 (maint_print_c_tdesc_cmd): Use print_c_feature if XML file
7767 name starts with "i386/32bit-".
7768
7769 2017-07-26 Yao Qi <yao.qi@linaro.org>
7770
7771 * target-descriptions.c (tdesc_element_visitor): New class.
7772 (tdesc_element): New class.
7773 (tdesc_reg): Inherit from tdesc_element.
7774 (tdesc_reg::accept): New function.
7775 (tdesc_type): Inherit from tdesc_element.
7776 (tdesc_type::accept): New function.
7777 (tdesc_feature): Inherit from tdesc_element.
7778 (tdesc_feature::accept): New function.
7779 (target_desc): Inherit from tdesc_element.
7780 (target_desc::target_desc): New.
7781 (target_desc::~target_desc): New.
7782 (target_desc::accept): New.
7783 (allocate_target_description): Use new.
7784 (free_target_description): Use delete.
7785 (print_c_tdesc): New class.
7786 (maint_print_c_tdesc_cmd): Adjust.
7787
7788 * features/aarch64.c: Re-generated.
7789 * features/arc-arcompact.c: Re-generated.
7790 * features/arc-v2.c: Re-generated.
7791 * features/arm/arm-with-iwmmxt.c: Re-generated.
7792 * features/arm/arm-with-m.c: Re-generated.
7793 * features/arm/arm-with-m-fpa-layout.c: Re-generated.
7794 * features/arm/arm-with-m-vfp-d16.c: Re-generated.
7795 * features/arm/arm-with-neon.c: Re-generated.
7796 * features/arm/arm-with-vfpv2.c: Re-generated.
7797 * features/arm/arm-with-vfpv3.c: Re-generated.
7798 * features/i386/amd64-avx-avx512.c: Re-generated.
7799 * features/i386/amd64-avx-avx512-linux.c: Re-generated.
7800 * features/i386/amd64-avx.c: Re-generated.
7801 * features/i386/amd64-avx-linux.c: Re-generated.
7802 * features/i386/amd64-avx-mpx-avx512-pku.c: Re-generated.
7803 * features/i386/amd64-avx-mpx-avx512-pku-linux.c: Re-generated.
7804 * features/i386/amd64-avx-mpx.c: Re-generated.
7805 * features/i386/amd64-avx-mpx-linux.c: Re-generated.
7806 * features/i386/amd64.c: Re-generated.
7807 * features/i386/amd64-linux.c: Re-generated.
7808 * features/i386/amd64-mpx.c: Re-generated.
7809 * features/i386/amd64-mpx-linux.c: Re-generated.
7810 * features/i386/i386-avx-avx512.c: Re-generated.
7811 * features/i386/i386-avx-avx512-linux.c: Re-generated.
7812 * features/i386/i386-avx.c: Re-generated.
7813 * features/i386/i386-avx-linux.c: Re-generated.
7814 * features/i386/i386-avx-mpx-avx512-pku.c: Re-generated.
7815 * features/i386/i386-avx-mpx-avx512-pku-linux.c: Re-generated.
7816 * features/i386/i386-avx-mpx.c: Re-generated.
7817 * features/i386/i386-avx-mpx-linux.c: Re-generated.
7818 * features/i386/i386.c: Re-generated.
7819 * features/i386/i386-linux.c: Re-generated.
7820 * features/i386/i386-mmx.c: Re-generated.
7821 * features/i386/i386-mmx-linux.c: Re-generated.
7822 * features/i386/i386-mpx.c: Re-generated.
7823 * features/i386/i386-mpx-linux.c: Re-generated.
7824 * features/i386/x32-avx-avx512.c: Re-generated.
7825 * features/i386/x32-avx-avx512-linux.c: Re-generated.
7826 * features/i386/x32-avx.c: Re-generated.
7827 * features/i386/x32-avx-linux.c: Re-generated.
7828 * features/i386/x32.c: Re-generated.
7829 * features/i386/x32-linux.c: Re-generated.
7830 * features/microblaze.c: Re-generated.
7831 * features/microblaze-with-stack-protect.c: Re-generated.
7832 * features/mips64-dsp-linux.c: Re-generated.
7833 * features/mips64-linux.c: Re-generated.
7834 * features/mips-dsp-linux.c: Re-generated.
7835 * features/mips-linux.c: Re-generated.
7836 * features/nds32.c: Re-generated.
7837 * features/nios2.c: Re-generated.
7838 * features/nios2-linux.c: Re-generated.
7839 * features/rs6000/powerpc-32.c: Re-generated.
7840 * features/rs6000/powerpc-32l.c: Re-generated.
7841 * features/rs6000/powerpc-403.c: Re-generated.
7842 * features/rs6000/powerpc-403gc.c : Re-generated.
7843 * features/rs6000/powerpc-405.c: Re-generated.
7844 * features/rs6000/powerpc-505.c: Re-generated.
7845 * features/rs6000/powerpc-601.c: Re-generated.
7846 * features/rs6000/powerpc-602.c: Re-generated.
7847 * features/rs6000/powerpc-603.c: Re-generated.
7848 * features/rs6000/powerpc-604.c: Re-generated.
7849 * features/rs6000/powerpc-64.c: Re-generated.
7850 * features/rs6000/powerpc-64l.c: Re-generated.
7851 * features/rs6000/powerpc-7400.c: Re-generated.
7852 * features/rs6000/powerpc-750.c: Re-generated.
7853 * features/rs6000/powerpc-860.c: Re-generated.
7854 * features/rs6000/powerpc-altivec32.c: Re-generated.
7855 * features/rs6000/powerpc-altivec32l.c: Re-generated.
7856 * features/rs6000/powerpc-altivec64.c: Re-generated.
7857 * features/rs6000/powerpc-altivec64l.c: Re-generated.
7858 * features/rs6000/powerpc-cell32l.c: Re-generated.
7859 * features/rs6000/powerpc-cell64l.c: Re-generated.
7860 * features/rs6000/powerpc-e500.c: Re-generated.
7861 * features/rs6000/powerpc-e500l.c: Re-generated.
7862 * features/rs6000/powerpc-isa205-32l.c: Re-generated.
7863 * features/rs6000/powerpc-isa205-64l.c: Re-generated.
7864 * features/rs6000/powerpc-isa205-altivec32l.c: Re-generated.
7865 * features/rs6000/powerpc-isa205-altivec64l.c: Re-generated.
7866 * features/rs6000/powerpc-isa205-vsx32l.c: Re-generated.
7867 * features/rs6000/powerpc-isa205-vsx64l.c: Re-generated.
7868 * features/rs6000/powerpc-vsx32.c: Re-generated.
7869 * features/rs6000/powerpc-vsx32l.c: Re-generated.
7870 * features/rs6000/powerpc-vsx64.c: Re-generated.
7871 * features/rs6000/powerpc-vsx64l.c: Re-generated.
7872 * features/rs6000/rs6000.c: Re-generated.
7873 * features/s390-linux32.c: Re-generated.
7874 * features/s390-linux32v1.c: Re-generated.
7875 * features/s390-linux32v2.c: Re-generated.
7876 * features/s390-linux64.c: Re-generated.
7877 * features/s390-linux64v1.c: Re-generated.
7878 * features/s390-linux64v2.c: Re-generated.
7879 * features/s390-te-linux64.c: Re-generated.
7880 * features/s390-tevx-linux64.c: Re-generated.
7881 * features/s390-vx-linux64.c: Re-generated.
7882 * features/s390x-linux64.c: Re-generated.
7883 * features/s390x-linux64v1.c: Re-generated.
7884 * features/s390x-linux64v2.c: Re-generated.
7885 * features/s390x-te-linux64.c: Re-generated.
7886 * features/s390x-tevx-linux64.c: Re-generated.
7887 * features/s390x-vx-linux64.c: Re-generated.
7888 * features/sparc/sparc32-solaris.c: Re-generated.
7889 * features/sparc/sparc64-solaris.c: Re-generated.
7890 * features/tic6x-c62x.c: Re-generated.
7891 * features/tic6x-c62x-linux.c: Re-generated.
7892 * features/tic6x-c64x.c: Re-generated.
7893 * features/tic6x-c64x-linux.c: Re-generated.
7894 * features/tic6x-c64xp.c: Re-generated.
7895 * features/tic6x-c64xp-linux.c: Re-generated.
7896
7897 2017-07-26 Yao Qi <yao.qi@linaro.org>
7898
7899 * i386-linux-tdep.c (i386_linux_read_description): New function.
7900 (i386_linux_core_read_description): Call
7901 i386_linux_read_description.
7902 * i386-linux-tdep.h (i386_linux_read_description): Declare.
7903 (tdesc_i386_linux, tdesc_i386_mmx_linux): Remove declarations.
7904 (tdesc_i386_avx_linux, tdesc_i386_mpx_linux): Likewise
7905 (tdesc_i386_avx_mpx_linux, tdesc_i386_avx_avx512_linux): Likewise.
7906 (tdesc_i386_avx_mpx_avx512_pku_linux): Likewise.
7907 * x86-linux-nat.c (x86_linux_read_description): Call
7908 i386_linux_read_description.
7909
7910 2017-07-26 Yao Qi <yao.qi@linaro.org>
7911
7912 * NEWS: Mention it.
7913 * features/Makefile (%.c: %.xml): Pass the xml file name to
7914 command "maint print c-tdesc".
7915 * target-descriptions.c (maint_print_c_tdesc_cmd): Get file
7916 name from 'arg'.
7917
7918 2017-07-26 Yao Qi <yao.qi@linaro.org>
7919
7920 * target-descriptions.c (target_desc): Add ctor and dtor. Do
7921 in-class initialization.
7922 (tdesc_create_feature): Call new instead of XCNEW.
7923 (free_target_description): Ue delete.
7924
7925 2017-07-25 John Baldwin <jhb@FreeBSD.org>
7926
7927 * configure.nat: Add "-lkvm" for NetBSD/sparc64 and fix typo.
7928
7929 2017-07-25 Yao Qi <yao.qi@linaro.org>
7930
7931 * amd64-tdep.c (amd64_init_abi): Make argument default_tdesc
7932 constant.
7933 (amd64_x32_init_abi): Likewise.
7934 * amd64-tdep.h (amd64_init_abi): Update declaration.
7935 (amd64_x32_init_abi): Likewise.
7936
7937 2017-07-25 Yao Qi <yao.qi@linaro.org>
7938
7939 PR tdep/21717
7940 * arm-linux-nat.c (arm_linux_fetch_inferior_registers): Update
7941 condition for FPSCR.
7942 (arm_linux_store_inferior_registers): Likewise.
7943
7944 2017-07-22 Tom Tromey <tom@tromey.com>
7945
7946 * break-catch-syscall.c (struct catch_syscall_inferior_data)
7947 <syscalls_counts>: Now a std::vector.
7948 (get_catch_syscall_inferior_data): Use "new".
7949 (catch_syscall_inferior_data_cleanup): Use "delete".
7950 (insert_catch_syscall, remove_catch_syscall)
7951 (clear_syscall_counts): Update.
7952
7953 2017-07-22 Tom Tromey <tom@tromey.com>
7954
7955 * break-catch-syscall.c (syscall_catchpoint)
7956 <syscalls_to_be_caught>: Now a std::vector<int>
7957 (~syscall_catchpoint): Remove.
7958 (insert_catch_syscall, remove_catch_syscall)
7959 (breakpoint_hit_catch_syscall, print_one_catch_syscall)
7960 (print_mention_catch_syscall, print_recreate_catch_syscall):
7961 Update.
7962 (create_syscall_event_catchpoint): Change type of "filter"
7963 parameter.
7964 (catch_syscall_split_args): Return a std::vector.
7965 (catch_syscall_command_1, catching_syscall_number_1): Update.
7966
7967 2017-07-22 Tom Tromey <tom@tromey.com>
7968
7969 * break-catch-throw.c (struct exception_catchpoint)
7970 <exception_rx>: Now a std::string.
7971 (~exception_catchpoint): Remove.
7972 (print_one_detail_exception_catchpoint): Update.
7973 (handle_gnu_v3_exceptions): Change type of except_rx.
7974 (extract_exception_regexp): Return a std::string.
7975 (catch_exception_command_1): Update.
7976
7977 2017-07-22 Tom Tromey <tom@tromey.com>
7978
7979 * break-catch-sig.c (gdb_signal_type): Remove typedef.
7980 (struct signal_catchpoint) <signals_to_be_caught>: Now a
7981 std::vector.
7982 <catch_all>: Now a bool.
7983 (~signal_catchpoint): Remove.
7984 (signal_catchpoint_insert_location)
7985 (signal_catchpoint_remove_location)
7986 (signal_catchpoint_breakpoint_hit, signal_catchpoint_print_one)
7987 (signal_catchpoint_print_mention)
7988 (signal_catchpoint_print_recreate)
7989 (signal_catchpoint_explains_signal): Update.
7990 (create_signal_catchpoint): Change type of "filter" and
7991 "catch_all".
7992 (catch_signal_split_args): Return a std::vector. Change type of
7993 "catch_all".
7994 (catch_signal_command): Update.
7995
7996 2017-07-20 Pedro Alves <palves@redhat.com>
7997
7998 * ada-lang.c (ada_language_defn): Make extern.
7999 (_initialize_ada_language): Remove add_language call.
8000 * c-lang.c (c_language_defn, cplus_language_defn)
8001 (asm_language_defn, minimal_language_defn): Make extern.
8002 (_initialize_c_language): Delete.
8003 * completer.c (compare_cstrings): Delete, moved to utils.h.
8004 * d-lang.c (d_language_defn): Make extern.
8005 (_initialize_d_language): Remove add_language calls.
8006 * defs.h (enum language): Add comment.
8007 * f-lang.c (f_language_defn): Make extern.
8008 (_initialize_f_language): Remove add_language call.
8009 * go-lang.c (go_language_defn): Make extern.
8010 (_initialize_go_language): Remove add_language call.
8011 * language.c: Include <algorithm>.
8012 (languages): Redefine as const array.
8013 (languages_size, languages_allocsize, DEFAULT_ALLOCSIZE): Delete.
8014 (set_language_command): Handle "local". Use for-range loop.
8015 (set_language): Remove loop.
8016 (language_enum): Rewrite.
8017 (language_def, language_str): Remove loops.
8018 (add_language): Delete.
8019 (add_set_language_command): New, based on add_languages.
8020 (skip_language_trampoline): Adjust.
8021 (local_language_defn): Delete.
8022 (language_gdbarch_post_init): Adjust.
8023 (_initialize_language): Remove add_language calls. Call
8024 add_set_language_command.
8025 * language.h (add_language): Delete.
8026 (auto_language_defn)
8027 (unknown_language_defn, minimal_language_defn, ada_language_defn)
8028 (asm_language_defn, c_language_defn, cplus_language_defn)
8029 (d_language_defn, f_language_defn, go_language_defn)
8030 (m2_language_defn, objc_language_defn, opencl_language_defn)
8031 (pascal_language_defn, rust_language_defn): Declare.
8032 * m2-lang.c (m2_language_defn): Make extern.
8033 (_initialize_m2_language): Remove add_language call.
8034 * objc-lang.c (objc_language_defn): Make extern.
8035 (_initialize_objc_language): Remove add_language call.
8036 * opencl-lang.c (opencl_language_defn): Make extern.
8037 (_initialize_opencl_language): Remove add_language call.
8038 * p-lang.c (pascal_language_defn): Make extern.
8039 (_initialize_pascal_language): Delete.
8040 * rust-lang.c (rust_language_defn): Make extern.
8041 (_initialize_rust_language): Delete.
8042 * utils.h (compare_cstrings): New static inline function.
8043
8044 2017-07-20 Pedro Alves <palves@redhat.com>
8045
8046 * ada-lang.c (ada_to_fixed_type_1): Adjust.
8047 (get_var_value): Constify parameters.
8048 (get_int_var_value): Change prototype.
8049 (to_fixed_range_type): Adjust.
8050 * ada-lang.h (get_int_var_value): Change prototype.
8051
8052 2017-07-20 Pedro Alves <palves@redhat.com>
8053
8054 * dwarf2read.c (dw2_lookup_symbol): Use
8055 SYMBOL_MATCHES_SEARCH_NAME.
8056 * psymtab.c (psym_lookup_symbol): Use SYMBOL_MATCHES_SEARCH_NAME.
8057
8058 2017-07-20 Pedro Alves <palves@redhat.com>
8059
8060 * block.c (block_iter_name_step, block_iter_name_first)
8061 (block_iter_name_next): Delete.
8062 (block_lookup_symbol_primary): Adjust to use
8063 dict_iter_match_first/dict_iter_match_next.
8064 * block.h (block_iter_name_first, block_iter_name_next): Delete
8065 declarations.
8066 (ALL_BLOCK_SYMBOLS_WITH_NAME): Adjust to use
8067 dict_iter_match_first/dict_iter_match_next.
8068
8069 2017-07-20 Pedro Alves <palves@redhat.com>
8070
8071 * cp-support.c (cp_find_first_component_aux): Add missing case for
8072 end of string.
8073
8074 2017-07-18 David Blaikie <dblaikie@gmail.com>
8075
8076 * dwarf2read.c (create_cus_hash_table): Re-add lost initialization
8077 of dwo_cu's dwo_file.
8078
8079 2017-07-18 Yao Qi <yao.qi@linaro.org>
8080
8081 * remote.c (store_registers_using_G): Remove one line comment.
8082
8083 2017-07-18 Yao Qi <yao.qi@linaro.org>
8084
8085 * regcache.c (regcache_cpy): Simplify it.
8086 (regcache::cpy_no_passthrough): Remove it.
8087 * regcache.h (cpy_no_passthrough): Remove it.
8088 (regcache_dup, regcache_cpy): Update comments.
8089
8090 2017-07-18 Pedro Alves <palves@redhat.com>
8091
8092 * remote-sim.c (sim_command_completer): Adjust to work with a
8093 completion_tracker instead of a VEC.
8094
8095 2017-07-17 Pedro Alves <palves@redhat.com>
8096
8097 * completer.c (complete_source_filenames): New function.
8098 (complete_address_and_linespec_locations): New function.
8099 (location_completer): Use complete_address_and_linespec_locations.
8100 (completion_tracker::build_completion_result): Honor the tracker's
8101 request to suppress append.
8102 * completer.h (completion_tracker::suppress_append_ws)
8103 (completion_tracker::set_suppress_append_ws): New methods.
8104 (completion_tracker::m_suppress_append_ws): New field.
8105 (complete_source_filenames): New declaration.
8106 * linespec.c (linespec_complete_what): New.
8107 (struct ls_parser) <complete_what, completion_word,
8108 completion_quote_char, completion_quote_end, completion_tracker>:
8109 New fields.
8110 (string_find_incomplete_keyword_at_end): New.
8111 (linespec_lexer_lex_string): Record quote char. If in completion
8112 mode, don't throw.
8113 (linespec_lexer_consume_token): Advance the completion word point.
8114 (linespec_lexer_peek_token): Save/restore completion info.
8115 (save_stream_and_consume_token): New.
8116 (set_completion_after_number): New.
8117 (linespec_parse_basic): Set what to complete next depending on
8118 token. Handle function and label completions specially.
8119 (parse_linespec): Disable objc shortcut in completion mode. Set
8120 what to complete next depending on token type. Skip keyword if in
8121 completion mode.
8122 (complete_linespec_component, linespec_complete): New.
8123 * linespec.h (linespec_complete): Declare.
8124
8125 2017-07-17 Pedro Alves <palves@redhat.com>
8126
8127 * linespec.c (linespec_lexer_lex_string, find_toplevel_char):
8128 Handle 'operator<' / 'operator<<'.
8129
8130 2017-07-17 Pedro Alves <palves@redhat.com>
8131
8132 * completer.c (collect_explicit_location_matches): Handle
8133 MATCH_LABEL.
8134 (convert_explicit_location_to_linespec): New, factored out from
8135 ...
8136 (convert_explicit_location_to_sals): ... this.
8137 (complete_label): New.
8138 (linespec_complete_label, find_label_symbols_in_block): New.
8139 (find_label_symbols): Add completion_mode parameter and adjust to
8140 call find_label_symbols_in_block.
8141 * linespec.h (linespec_complete_label): Declare.
8142
8143 2017-07-17 Pedro Alves <palves@redhat.com>
8144
8145 * ada-lang.c (ada_collect_symbol_completion_matches): Add
8146 complete_symbol_mode parameter.
8147 * cli/cli-cmds.c (complete_command): Get the completion result out
8148 of the handle_brkchars tracker if used a custom word point.
8149 * completer.c: Include "linespec.h".
8150 (enum explicit_location_match_type) <MATCH_LINE>: New enumerator.
8151 (advance_to_expression_complete_word_point): New.
8152 (completion_tracker::completes_to_completion_word): New.
8153 (complete_files_symbols): Pass down
8154 complete_symbol_mode::EXPRESSION.
8155 (explicit_options, probe_options): New.
8156 (collect_explicit_location_matches): Complete on the
8157 explictit_loc->foo instead of word. Use
8158 linespec_complete_function. Handle MATCH_LINE. Handle offering
8159 keyword and options completions.
8160 (backup_text_ptr): Delete.
8161 (skip_keyword): New.
8162 (complete_explicit_location): Remove 'word' parameter. Add
8163 language, quoted_arg_start and quoted_arg_end parameters.
8164 Rewrite, parsing left to right.
8165 (location_completer): Rewrite.
8166 (location_completer_handle_brkchars): New function.
8167 (symbol_completer): Pass down complete_symbol_mode::EXPRESSION.
8168 (enum complete_line_internal_reason): Adjust comments.
8169 (completion_tracker::discard_completions): New.
8170 (completer_handle_brkchars_func_for_completer): Handle
8171 location_completer.
8172 (gdb_custom_word_point_brkchars)
8173 (gdb_org_rl_basic_quote_characters): New.
8174 (gdb_completion_word_break_characters_throw)
8175 (completion_find_completion_word): Handle trackers that use a
8176 custom word point.
8177 (completion_tracker::advance_custom_word_point_by): New.
8178 (completion_tracker::build_completion_result): Don't rely on
8179 readline appending the quote char.
8180 (gdb_rl_attempted_completion_function_throw): Handle trackers that
8181 use a custom word point.
8182 (gdb_rl_attempted_completion_function): Restore
8183 rl_basic_quote_characters.
8184 * completer.h (class completion_tracker): Extend intro comment.
8185 (completion_tracker::set_quote_char)
8186 (completion_tracker::quote_char)
8187 (completion_tracker::set_use_custom_word_point)
8188 (completion_tracker::use_custom_word_point)
8189 (completion_tracker::custom_word_point)
8190 (completion_tracker::set_custom_word_point)
8191 (completion_tracker::advance_custom_word_point_by)
8192 (completion_tracker::completes_to_completion_word)
8193 (completion_tracker::discard_completions): New methods.
8194 (completion_tracker::m_quote_char)
8195 (completion_tracker::m_use_custom_word_point)
8196 (completion_tracker::m_custom_word_point): New fields.
8197 (advance_to_expression_complete_word_point): Declare.
8198 * f-lang.c (f_collect_symbol_completion_matches): Add
8199 complete_symbol_mode parameter.
8200 * language.h (struct language_defn)
8201 <la_collect_symbol_completion_matches>: Add complete_symbol_mode
8202 parameter.
8203 * linespec.c (linespec_keywords): Add NULL terminator. Make extern.
8204 (linespec_complete_function): New function.
8205 (linespec_lexer_lex_keyword): Adjust.
8206 * linespec.h (linespec_keywords, linespec_complete_function): New
8207 declarations.
8208 * location.c (find_end_quote): New function.
8209 (explicit_location_lex_one): Add explicit_completion_info
8210 parameter. Save quoting info. Don't throw if being called for
8211 completion. Don't handle Ada operators here.
8212 (is_cp_operator, skip_op_false_positives, first_of)
8213 (explicit_location_lex_one_function): New function.
8214 (string_to_explicit_location): Replace 'dont_throw' parameter with
8215 an explicit_completion_info pointer parameter. Handle it. Don't
8216 use explicit_location_lex_one to lex function names. Use
8217 explicit_location_lex_one_function instead.
8218 * location.h (struct explicit_completion_info): New.
8219 (string_to_explicit_location): Replace 'dont_throw' parameter with
8220 an explicit_completion_info pointer parameter.
8221 * symtab.c (default_collect_symbol_completion_matches_break_on):
8222 Add complete_symbol_mode parameter. Handle LINESPEC mode.
8223 (default_collect_symbol_completion_matches)
8224 (collect_symbol_completion_matches): Add complete_symbol_mode
8225 parameter.
8226 (collect_symbol_completion_matches_type): Pass down
8227 complete_symbol_mode::EXPRESSION.
8228 (collect_file_symbol_completion_matches): Add complete_symbol_mode
8229 parameter. Handle LINESPEC mode.
8230 * symtab.h (complete_symbol_mode): New.
8231 (default_collect_symbol_completion_matches_break_on)
8232 (default_collect_symbol_completion_matches)
8233 (collect_symbol_completion_matches)
8234 (collect_file_symbol_completion_matches): Add complete_symbol_mode
8235 parameter.
8236
8237 2017-07-17 Pedro Alves <palves@redhat.com>
8238
8239 * utils.c (enum class strncmp_iw_mode): New.
8240 (strcmp_iw): Rename to ...
8241 (strncmp_iw_with_mode): ... this. Add string2_len and mode
8242 parameters. Handle them.
8243 (strncmp_iw): New.
8244 (strcmp_iw): Reimplement as wrapper around strncmp_iw_with_mode.
8245 * utils.h (strncmp_iw): Declare.
8246 (strcmp_iw): Move describing comments here.
8247
8248 2017-07-17 Pedro Alves <palves@redhat.com>
8249
8250 * c-exp.y (operator_stoken): Use CP_OPERATOR_LEN and
8251 CP_OPERATOR_STR.
8252 * c-typeprint.c (is_type_conversion_operator): Use
8253 CP_OPERATOR_STR.
8254 * cp-support.c (LENGTH_OF_OPERATOR): Delete.
8255 (cp_find_first_component_aux): Use CP_OPERATOR_STR and
8256 CP_OPERATOR_LEN.
8257 * cp-support.h (CP_OPERATOR_STR, CP_OPERATOR_LEN): New.
8258 * gnu-v2-abi.c (gnuv2_is_operator_name): Use CP_OPERATOR_STR.
8259 * gnu-v3-abi.c (gnuv3_is_operator_name): Use CP_OPERATOR_STR.
8260 * linespec.c (linespec_lexer_lex_string): Use CP_OPERATOR_LEN and
8261 CP_OPERATOR_STR.
8262 * location.c: Include "cp-support.h".
8263 (explicit_location_lex_one): Use CP_OPERATOR_LEN and
8264 CP_OPERATOR_STR.
8265 * symtab.c (operator_chars): Use CP_OPERATOR_STR and
8266 CP_OPERATOR_LEN.
8267
8268 2017-07-17 Pedro Alves <palves@redhat.com>
8269
8270 * cli/cli-cmds.c (complete_command): Use a completion tracker
8271 along with completion_find_completion_word for handle_brkchars
8272 phase.
8273 * completer.c (RL_QF_SINGLE_QUOTE, RL_QF_DOUBLE_QUOTE)
8274 (RL_QF_BACKSLASH, RL_QF_OTHER_QUOTE): New.
8275 (struct gdb_rl_completion_word_info): New.
8276 (gdb_rl_find_completion_word): New.
8277 (completion_find_completion_word): New.
8278 * completer.h (completion_find_completion_word): Declare.
8279
8280 2017-07-17 Pedro Alves <palves@redhat.com>
8281
8282 * ada-lang.c (symbol_completion_match): Adjust comments.
8283 (symbol_completion_add): Replace vector parameter with
8284 completion_tracker parameter. Use it.
8285 (ada_make_symbol_completion_list): Rename to...
8286 (ada_collect_symbol_completion_matches): ... this. Add
8287 completion_tracker parameter and use it.
8288 (ada_language_defn): Adjust.
8289 * break-catch-syscall.c (catch_syscall_completer): Adjust
8290 prototype and work with completion_tracker instead of VEC.
8291 * breakpoint.c (condition_completer): Adjust prototype and work
8292 with completion_tracker instead of VEC.
8293 * c-lang.c (c_language_defn, cplus_language_defn)
8294 (asm_language_defn, minimal_language_defn): Adjust to renames.
8295 * cli/cli-cmds.c (complete_command): Rework using
8296 completion_tracker. Catch exceptions when completing.
8297 * cli/cli-decode.c (integer_unlimited_completer)
8298 (complete_on_cmdlist, complete_on_enum): Adjust prototype and work
8299 with completion_tracker instead of VEC.
8300 * command.h (struct completion_tracker): Forward declare.
8301 (completer_ftype, completer_handle_brkchars_ftype): Change
8302 types.
8303 (complete_on_cmdlist, complete_on_enum): Adjust.
8304 * completer.c: Include <algorithm>.
8305 (struct gdb_completer_state): New.
8306 (current_completion): New global.
8307 (readline_line_completion_function): Delete.
8308 (noop_completer, filename_completer)
8309 (filename_completer_handle_brkchars, complete_files_symbols)
8310 (linespec_location_completer): Adjust to work with a
8311 completion_tracker instead of a VEC.
8312 (string_or_empty): New.
8313 (collect_explicit_location_matches): Adjust to work with a
8314 completion_tracker instead of a VEC.
8315 (explicit_location_completer): Rename to ...
8316 (complete_explicit_location): ... this and adjust to work with a
8317 completion_tracker instead of a VEC.
8318 (location_completer): Adjust to work with a completion_tracker
8319 instead of a VEC.
8320 (add_struct_fields): Adjust to work with a completion_list instead
8321 of VEC.
8322 (expression_completer): Rename to ...
8323 (complete_expression): ... this and adjust to work with a
8324 completion_tracker instead of a VEC. Use complete_files_symbols.
8325 (expression_completer): Reimplement on top of complete_expression.
8326 (symbol_completer): Adjust to work with a completion_tracker
8327 instead of a VEC.
8328 (enum complete_line_internal_reason): Add describing comments.
8329 (complete_line_internal_normal_command): Adjust to work with a
8330 completion_tracker instead of a VEC.
8331 (complete_line_internal): Rename to ...
8332 (complete_line_internal_1): ... this and adjust to work with a
8333 completion_tracker instead of a VEC. Assert TEXT is NULL in the
8334 handle_brkchars phase.
8335 (new_completion_tracker): Delete.
8336 (complete_line_internal): Reimplement as TRY/CATCH wrapper around
8337 complete_line_internal_1.
8338 (free_completion_tracker): Delete.
8339 (INITIAL_COMPLETION_HTAB_SIZE): New.
8340 (completion_tracker::completion_tracker)
8341 (completion_tracker::~completion_tracker): New.
8342 (maybe_add_completion): Delete.
8343 (completion_tracker::maybe_add_completion)
8344 (completion_tracker::add_completion)
8345 (completion_tracker::add_completions): New.
8346 (throw_max_completions_reached_error): Delete.
8347 (complete_line): Adjust to work with a completion_tracker instead
8348 of a VEC. Don't create a completion_tracker_t or check for max
8349 completions here.
8350 (command_completer, command_completer_handle_brkchars)
8351 (signal_completer, reg_or_group_completer_1)
8352 (reg_or_group_completer, default_completer_handle_brkchars):
8353 Adjust to work with a completion_tracker.
8354 (gdb_completion_word_break_characters_throw): New.
8355 (gdb_completion_word_break_characters): Reimplement.
8356 (line_completion_function): Delete.
8357 (completion_tracker::recompute_lowest_common_denominator)
8358 (expand_preserving_ws)
8359 (completion_tracker::build_completion_result)
8360 (completion_result::completion_result)
8361 (completion_result::completion_result)
8362 (completion_result::~completion_result)
8363 (completion_result::completion_result)
8364 (completion_result::release_match_list, compare_cstrings)
8365 (completion_result::sort_match_list)
8366 (completion_result::reset_match_list)
8367 (gdb_rl_attempted_completion_function_throw)
8368 (gdb_rl_attempted_completion_function): New.
8369 * completer.h (completion_list, struct completion_result)
8370 (class completion_tracker): New.
8371 (complete_line): Add completion_tracker parameter.
8372 (readline_line_completion_function): Delete.
8373 (gdb_rl_attempted_completion_function): New.
8374 (noop_completer, filename_completer, expression_completer)
8375 (location_completer, symbol_completer, command_completer)
8376 (signal_completer, reg_or_group_completer): Update prototypes.
8377 (completion_tracker_t, new_completion_tracker)
8378 (make_cleanup_free_completion_tracker): Delete.
8379 (enum maybe_add_completion_enum): Delete.
8380 (maybe_add_completion): Delete.
8381 (throw_max_completions_reached_error): Delete.
8382 * corefile.c (complete_set_gnutarget): Adjust to work with a
8383 completion_tracker instead of a VEC.
8384 * cp-abi.c (cp_abi_completer): Adjust to work with a
8385 completion_tracker instead of a VEC.
8386 * d-lang.c (d_language_defn): Adjust.
8387 * disasm.c (disassembler_options_completer): Adjust to work with a
8388 completion_tracker instead of a VEC.
8389 * f-lang.c (f_make_symbol_completion_list): Rename to ...
8390 (f_collect_symbol_completion_matches): ... this. Adjust to work
8391 with a completion_tracker instead of a VEC.
8392 (f_language_defn): Adjust.
8393 * go-lang.c (go_language_defn): Adjust.
8394 * guile/scm-cmd.c (cmdscm_add_completion, cmdscm_completer):
8395 Adjust to work with a completion_tracker instead of a VEC.
8396 * infrun.c (handle_completer): Likewise.
8397 * interps.c (interpreter_completer): Likewise.
8398 * interps.h (interpreter_completer): Likewise.
8399 * language.c (unknown_language_defn, auto_language_defn)
8400 (local_language_defn): Adjust.
8401 * language.h (language_defn::la_make_symbol_completion_list):
8402 Rename to ...
8403 (language_defn::la_collect_symbol_completion_matches): ... this
8404 and adjust to work with a completion_tracker instead of a VEC.
8405 * m2-lang.c (m2_language_defn): Adjust.
8406 * objc-lang.c (objc_language_defn): Adjust.
8407 * opencl-lang.c (opencl_language_defn): Adjust.
8408 * p-lang.c (pascal_language_defn): Adjust.
8409 * python/py-cmd.c (cmdpy_completer_helper): Handle NULL word.
8410 (cmdpy_completer_handle_brkchars, cmdpy_completer): Adjust to work
8411 with a completion_tracker.
8412 * rust-lang.c (rust_language_defn): Adjust.
8413 * symtab.c (free_completion_list, do_free_completion_list)
8414 (return_val, completion_tracker): Delete.
8415 (completion_list_add_name, completion_list_add_symbol)
8416 (completion_list_add_msymbol, completion_list_objc_symbol)
8417 (completion_list_add_fields, add_symtab_completions): Add
8418 completion_tracker parameter and use it.
8419 (default_make_symbol_completion_list_break_on_1): Rename to...
8420 (default_collect_symbol_completion_matches_break_on): ... this.
8421 Add completion_tracker parameter and use it instead of allocating
8422 a completion tracker here.
8423 (default_make_symbol_completion_list_break_on): Delete old
8424 implementation.
8425 (default_make_symbol_completion_list): Delete.
8426 (default_collect_symbol_completion_matches): New.
8427 (make_symbol_completion_list): Delete.
8428 (collect_symbol_completion_matches): New.
8429 (make_symbol_completion_type): Rename to ...
8430 (collect_symbol_completion_matches_type): ... this. Add
8431 completion_tracker parameter and use it instead of VEC.
8432 (make_file_symbol_completion_list_1): Rename to...
8433 (collect_file_symbol_completion_matches): ... this. Add
8434 completion_tracker parameter and use it instead of VEC.
8435 (make_file_symbol_completion_list): Delete.
8436 (add_filename_to_list): Use completion_list instead of a VEC.
8437 (add_partial_filename_data::list): Now a completion_list.
8438 (make_source_files_completion_list): Work with a completion_list
8439 instead of a VEC.
8440 * symtab.h: Include "completer.h".
8441 (default_make_symbol_completion_list_break_on)
8442 (default_make_symbol_completion_list, make_symbol_completion_list)
8443 (make_symbol_completion_type, make_file_symbol_completion_list)
8444 (make_source_files_completion_list): Delete.
8445 (default_collect_symbol_completion_matches_break_on)
8446 (default_collect_symbol_completion_matches)
8447 (collect_symbol_completion_matches)
8448 (collect_symbol_completion_matches_type)
8449 (collect_file_symbol_completion_matches)
8450 (make_source_files_completion_list): New.
8451 * top.c (init_main): Don't install a rl_completion_entry_function
8452 hook. Install a rl_attempted_completion_function hook instead.
8453 * tui/tui-layout.c (layout_completer): Adjust to work with a
8454 completion_tracker.
8455 * tui/tui-regs.c (tui_reggroup_completer):
8456 * tui/tui-win.c (window_name_completer, focus_completer)
8457 (winheight_completer): Adjust to work with a completion_tracker.
8458 * value.c: Include "completer.h".
8459 (complete_internalvar): Adjust to work with a completion_tracker.
8460 * value.h (complete_internalvar): Likewise.
8461
8462 2017-07-17 Pedro Alves <palves@redhat.com>
8463
8464 * cli/cli-decode.c (set_cmd_completer_handle_brkchars): Adjust to
8465 renames.
8466 * cli/cli-decode.h (struct cmd_list_element) <completer>: Move
8467 comments to completer_ftype's declaration.
8468 <completer_handle_brkchars>: Change type to
8469 completer_handle_brkchars_ftype.
8470 * command.h (completer_ftype): Add describing comment and give
8471 names to parameters.
8472 (completer_ftype_void): Rename to ...
8473 (completer_handle_brkchars_ftype) ... this. Add describing comment.
8474 (set_cmd_completer_handle_brkchars): Adjust.
8475 * completer.c (filename_completer_handle_brkchars): New function.
8476 (complete_line_internal_normal_command): New function, factored
8477 out from ...
8478 (complete_line_internal): ... here.
8479 (command_completer_handle_brkchars)
8480 (default_completer_handle_brkchars)
8481 (completer_handle_brkchars_func_for_completer): New functions.
8482 * completer.h (set_gdb_completion_word_break_characters): Delete
8483 declaration.
8484 (completer_handle_brkchars_func_for_completer): New declaration.
8485 * python/py-cmd.c (cmdpy_completer_handle_brkchars): Adjust to use
8486 completer_handle_brkchars_func_for_completer.
8487
8488 2017-07-17 Pedro Alves <palves@redhat.com>
8489
8490 * completer.c (symbol_completer): New function, based on
8491 make_symbol_completion_list_fn.
8492 * completer.h (symbol_completer): New declaration.
8493 * guile/scm-cmd.c (cmdscm_completers): Adjust.
8494 * python/py-cmd.c (completers): Adjust.
8495 * symtab.c (make_symbol_completion_list_fn): Delete.
8496 * symtab.h (make_symbol_completion_list_fn): Delete.
8497 * cli/cli-decode.c (add_cmd): Adjust.
8498
8499 2017-07-17 Pedro Alves <palves@redhat.com>
8500
8501 * Makefile.in (COMMON_OBS): Add filename-seen-cache.o.
8502 * dwarf2read.c: Include "filename-seen-cache.h".
8503 * dwarf2read.c (dwarf2_per_objfile) <filenames_cache>: New field.
8504 (dw2_map_symbol_filenames): Build and use a filenames_seen_cache.
8505 * filename-seen-cache.c: New file.
8506 * filename-seen-cache.h: New file.
8507 * symtab.c: Include "filename-seen-cache.h".
8508 (struct filename_seen_cache, INITIAL_FILENAME_SEEN_CACHE_SIZE)
8509 (create_filename_seen_cache, clear_filename_seen_cache)
8510 (delete_filename_seen_cache, filename_seen): Delete, parts moved
8511 to filename-seen-cache.h/filename-seen-cache.c.
8512 (output_source_filename, sources_info)
8513 (maybe_add_partial_symtab_filename)
8514 (make_source_files_completion_list): Adjust to use
8515 filename_seen_cache.
8516
8517 2017-07-17 Pedro Alves <palves@redhat.com>
8518
8519 * dwarf2read.c (dwarf2_per_objfile): In-class initialize all
8520 fields.
8521 (dwarf2_per_objfile::dwarf2_per_objfile(objfile*, const
8522 dwarf2_debug_sections*)): New.
8523 (dwarf2_per_objfile::dwarf2_per_objfile(const
8524 dwarf2_per_objfile&)): Declare as deleted.
8525 (dwarf2_per_objfile::operator=): Declare as deleted.
8526 (dwarf2_per_objfile::dwarf2_per_objfile)
8527 (dwarf2_per_objfile::~dwarf2_per_objfile)
8528 (dwarf2_per_objfile::free_cached_comp_units): New.
8529 (dwarf2_has_info): dwarf2_per_objfile initialization code moved to
8530 ctor. Call dwarf2_per_objfile's ctor manually.
8531 (dwarf2_locate_sections): Deleted/refactored as ...
8532 (dwarf2_per_objfile::locate_sections): ... this new method.
8533 (free_cached_comp_units): Defer to
8534 dwarf2_per_objfile::free_cached_comp_units.
8535 (dwarf2_free_objfile): Call dwarf2_per_objfile's dtor manually.
8536
8537 2017-07-14 Tom Tromey <tom@tromey.com>
8538
8539 PR rust/21764:
8540 * rust-exp.y (convert_ast_to_expression): Add "want_type"
8541 parameter.
8542 <UNOP_SIZEOF>: Split into separate case.
8543 <UNOP_VAR_VALUE>: Handle want_type. Add error case.
8544
8545 2017-07-14 Tom Tromey <tom@tromey.com>
8546
8547 PR rust/21763:
8548 * symtab.c (symbol_matches_domain): Add language_rust to special
8549 case.
8550 * rust-exp.y (convert_ast_to_expression) <OP_VAR_VALUE>: Don't
8551 treat LOC_TYPEDEF symbols as variables.
8552
8553 2017-07-14 Pedro Alves <palves@redhat.com>
8554
8555 * symtab.c (make_file_symbol_completion_list_1): Iterate over
8556 symtabs matching all symtabs with SRCFILE as file name instead of
8557 only considering the first hit, with lookup_symtab.
8558
8559 2017-07-14 Simon Marchi <simon.marchi@ericsson.com>
8560
8561 * ax-gdb.c (gen_aggregate_elt_ref): Remove operand_name and
8562 operator_name parameters.
8563 (gen_expr): Update function call.
8564
8565 2017-07-14 Simon Marchi <simon.marchi@ericsson.com>
8566
8567 * dwarf2loc.h (dwarf2_compile_expr_to_ax): Remove gdbarch
8568 parameter.
8569 * symtab.h (struct symbol_computed_ops::tracepoint_var_ref):
8570 Likewise.
8571 * dwarf2loc.c (dwarf2_compile_expr_to_ax): Remove gdbarch
8572 parameter, use agent_expr::gdbarch instead, update function
8573 calls.
8574 (locexpr_tracepoint_var_ref): Likewise.
8575 (loclist_tracepoint_var_ref): Likewise.
8576 * ax-gdb.c (gen_trace_static_fields): Likewise.
8577 (gen_traced_pop): Likewise.
8578 (gen_frame_args_address): Likewise.
8579 (gen_frame_locals_address): Likewise.
8580 (gen_var_ref): Likewise.
8581 (gen_struct_ref_recursive): Likewise.
8582 (gen_static_field): Likewise.
8583 (gen_maybe_namespace_elt): Likewise.
8584 (gen_expr): Likewise.
8585 (gen_trace_for_var): Likewise.
8586 (gen_trace_for_expr): Likewise.
8587 (gen_trace_for_return_address): Likewise.
8588
8589 2017-07-14 Simon Marchi <simon.marchi@ericsson.com>
8590
8591 * ax-gdb.c (gen_deref, gen_address_of): Remove unused ax
8592 parameter.
8593 (gen_struct_ref, gen_expr, gen_expr_binop_rest): Update call.
8594
8595 2017-07-14 Simon Marchi <simon.marchi@ericsson.com>
8596
8597 * ax-gdb.c (gen_usual_unary): Remove exp parameter, get gdbarch
8598 from ax, update calls.
8599 (gen_usual_arithmetic): Likewise.
8600 (gen_integral_promotions): Likewise.
8601 (gen_bitfield_ref): Likewise.
8602 (gen_primitive_field): Likewise.
8603 (gen_struct_ref_recursive): Likewise.
8604 (gen_struct_ref): Likewise.
8605 (gen_maybe_namespace_elt): Likewise.
8606 (gen_struct_elt_for_reference): Likewise.
8607 (gen_namespace_elt): Likewise.
8608 (gen_aggregate_elt_ref): Likewise.
8609 (gen_expr): Get gdbarch from ax, update calls.
8610 (gen_expr_binop_rest): Likewise.
8611
8612 2017-07-13 Pedro Alves <palves@redhat.com>
8613
8614 * amd64-darwin-tdep.c (x86_darwin_init_abi_64): Pass tdesc_amd64
8615 as default tdesc.
8616 * amd64-dicos-tdep.c (amd64_dicos_init_abi):
8617 * amd64-fbsd-tdep.c (amd64fbsd_init_abi):
8618 * amd64-linux-tdep.c (amd64_linux_init_abi): Pass
8619 tdesc_amd64_linux as default tdesc. Get final tdesc from the
8620 tdep.
8621 (amd64_x32_linux_init_abi): Pass tdesc_x32_linux as default tdesc.
8622 Get final tdesc from the tdep.
8623 * amd64-nbsd-tdep.c (amd64nbsd_init_abi): Pass tdesc_amd64 as
8624 default tdesc.
8625 * amd64-obsd-tdep.c (amd64obsd_init_abi): Likewise.
8626 * amd64-sol2-tdep.c (amd64_sol2_init_abi): Likewise.
8627 * amd64-tdep.c (amd64_init_abi): Add 'default_tdesc' parameter.
8628 Use it as default tdesc.
8629 (amd64_x32_init_abi): Add 'default_tdesc' parameter, and pass it
8630 down to amd_init_abi. No longer handle fallback tdesc here.
8631 * amd64-tdep.h (tdesc_x32): Declare.
8632 (amd64_init_abi, amd64_x32_init_abi): Add 'default_tdesc'
8633 parameter.
8634 * amd64-windows-tdep.c (amd64_windows_init_abi): Pass tdesc_amd64
8635 as default tdesc.
8636
8637 2017-07-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
8638
8639 * s390-linux-tdep.c (s390_process_record): Add support for
8640 instructions new in arch12.
8641
8642 2017-07-11 John Baldwin <jhb@FreeBSD.org>
8643
8644 * amd64-bsd-nat.c (amd64bsd_fetch_inferior_registers): Use
8645 PT_GETFSBASE and PT_GETGSBASE.
8646 (amd64bsd_store_inferior_registers): Use PT_SETFSBASE and
8647 PT_SETGSBASE.
8648
8649 2017-07-11 John Baldwin <jhb@FreeBSD.org>
8650
8651 * features/Makefile (amd64.dat, amd64-avx.dat, amd64-mpx.dat)
8652 (amd64-avx-mpx.dat, amd64-avx-avx512.dat)
8653 (amd64-avx-mpx-avx512-pku.dat): Add i386/64bit-segments.xml in
8654 those rules.
8655 * features/i386/amd64-avx-avx512.xml: Add 64bit-segments.xml.
8656 * features/i386/amd64-avx-mpx-avx512-pku.xml: Add 64bit-segments.xml.
8657 * features/i386/amd64-avx-mpx.xml: Add 64bit-segments.xml.
8658 * features/i386/amd64-avx.xml: Add 64bit-segments.xml.
8659 * features/i386/amd64-mpx.xml: Add 64bit-segments.xml.
8660 * features/i386/amd64.xml: Add 64bit-segments.xml.
8661 * features/i386/amd64-avx-avx512.c: Regenerated.
8662 * features/i386/amd64-avx-mpx-avx512-pku.c: Regenerated.
8663 * features/i386/amd64-avx-mpx.c: Regenerated.
8664 * features/i386/amd64-avx.c: Regenerated.
8665 * features/i386/amd64-mpx.c: Regenerated.
8666 * features/i386/amd64.c: Regenerated.
8667 * regformats/i386/amd64-avx-avx512.dat: Regenerated.
8668 * regformats/i386/amd64-avx-mpx-avx512-pku.dat: Regenerated.
8669 * regformats/i386/amd64-avx-mpx.dat: Regenerated.
8670 * regformats/i386/amd64-avx.dat: Regenerated.
8671 * regformats/i386/amd64-mpx.dat: Regenerated.
8672 * regformats/i386/amd64.dat: Regenerated.
8673
8674 2017-07-10 Yao Qi <yao.qi@linaro.org>
8675
8676 * features/i386/amd64-avx-avx512-linux.c: Re-generated.
8677 * features/i386/amd64-avx-mpx-avx512-pku-linux.c: Re-generated.
8678
8679 2017-07-10 Anton Kolesov <Anton.Kolesov@synopsys.com>
8680
8681 * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add setenv and
8682 unsetenv.
8683 * gnulib/aclocal.m4: Regenerate.
8684 * gnulib/config.in: Regenerate.
8685 * gnulib/configure: Regenerate.
8686 * gnulib/import/Makefile.am: Regenerate.
8687 * gnulib/import/Makefile.in: Regenerate.
8688 * gnulib/import/m4/gnulib-cache.m4: Regenerate.
8689 * gnulib/import/m4/gnulib-comp.m4: Regenerate.
8690 * gnulib/import/m4/environ.m4: New file.
8691 * gnulib/import/m4/setenv.m4: New file.
8692 * gnulib/import/setenv.c: New file.
8693 * gnulib/import/unsetenv.c: New file.
8694
8695 2017-07-09 Simon Marchi <simon.marchi@ericsson.com>
8696
8697 * compile/compile-loc2c.c (do_compile_dwarf_expr_to_c): Read
8698 address when op is DW_OP_addr.
8699
8700 2017-07-09 Tom Tromey <tom@tromey.com>
8701
8702 * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Reverse size
8703 check and apply to outer type.
8704
8705 2017-07-07 John Baldwin <jhb@FreeBSD.org>
8706
8707 * fbsd-tdep.c (LWPINFO_OFFSET, LWPINFO_PL_FLAGS)
8708 (LWPINFO64_PL_SIGINFO, LWPINFO32_PL_SIGINFO, PL_FLAG_SI)
8709 (SIZE64_SIGINFO_T, SIZE32_SIGINFO_T, fbsd_core_xfer_siginfo): New.
8710 (fbsd_init_abi): Install gdbarch "core_xfer_siginfo" method.
8711
8712 2017-07-07 John Baldwin <jhb@FreeBSD.org>
8713
8714 * fbsd-tdep.c (fbsd_core_thread_name): Use thread_section_name.
8715
8716 2017-07-07 John Baldwin <jhb@FreeBSD.org>
8717
8718 * corelow.c (get_core_siginfo): Remove.
8719 (core_xfer_partial): Use the gdbarch "core_xfer_siginfo" method
8720 instead of get_core_siginfo.
8721 * gdbarch.sh (core_xfer_siginfo): New gdbarch callback.
8722 * gdbarch.h: Re-generate.
8723 * gdbarch.c: Re-generate.
8724 * linux-tdep.c (linux_core_xfer_siginfo): New.
8725 (linux_init_abi): Install gdbarch "core_xfer_siginfo" method.
8726
8727 2017-07-07 John Baldwin <jhb@FreeBSD.org>
8728
8729 * corelow.c (thread_section_name): Move to ...
8730 * gdbcore.h (thread_section_name): ... here.
8731
8732 2017-07-07 John Baldwin <jhb@FreeBSD.org>
8733
8734 * fbsd-nat.c [PT_LWPINFO && __LP64__] (union sigval32)
8735 (struct siginfo32): New.
8736 [PT_LWPINFO] (fbsd_siginfo_size, fbsd_convert_siginfo): New.
8737 (fbsd_xfer_partial) [PT_LWPINFO]: Handle TARGET_OBJECT_SIGNAL_INFO
8738 via ptrace(PT_LWPINFO).
8739
8740 2017-07-07 John Baldwin <jhb@FreeBSD.org>
8741
8742 * fbsd-tdep.c (fbsd_gdbarch_data_handle, struct fbsd_gdbarch_data)
8743 (init_fbsd_gdbarch_data, get_fbsd_gdbarch_data)
8744 (fbsd_get_siginfo_type): New.
8745 (fbsd_init_abi): Install gdbarch "get_siginfo_type" method.
8746 (_initialize_fbsd_tdep): New.
8747
8748 2017-07-06 David Blaikie <dblaikie@gmail.com>
8749
8750 * dwarf2read.c (struct dwo_file): Use a htab of dwo_unit* (rather than
8751 a singular dwo_unit*) to support multiple CUs in the same way that
8752 multiple TUs are supported.
8753 (create_cus_hash_table): Replace create_dwo_cu with a function for
8754 parsing multiple CUs from a DWO file.
8755 (open_and_init_dwo_file): Use create_cus_hash_table rather than
8756 create_dwo_cu.
8757 (lookup_dwo_cutu): Lookup CU in the hash table in the dwo_file with
8758 htab_find, rather than comparing the signature to a singleton CU in
8759 the dwo_file.
8760
8761 2017-07-06 Pedro Alves <palves@redhat.com>
8762
8763 * python/py-unwind.c (pyuw_dealloc_cache): Fix for loop condition.
8764
8765 2017-07-04 Pedro Alves <palves@redhat.com>
8766
8767 * gdbtypes.c (recursive_dump_type): Don't reference TYPE_STATIC.
8768 * gdbtypes.h (TYPE_STATIC): Delete.
8769 (struct fn_field) <is_public, is_abstract, is_static, is_final,
8770 is_synchronized, is_native>: Delete.
8771 <dummy>: Bump.
8772 (TYPE_FN_FIELD_PUBLIC, TYPE_FN_FIELD_STATIC, TYPE_FN_FIELD_FINAL)
8773 (TYPE_FN_FIELD_SYNCHRONIZED, TYPE_FN_FIELD_NATIVE)
8774 (TYPE_FN_FIELD_ABSTRACT): Delete.
8775
8776 2017-07-03 Simon Marchi <simon.marchi@ericsson.com>
8777
8778 * buffer.h (buffer_finish): Fix spelling mistakes.
8779
8780 2017-07-01 Eli Zaretskii <eliz@gnu.org>
8781
8782 * .dir-locals.el: Automatically switch to C-style comments in
8783 versions of Emacs that support the feature.
8784
8785 2017-06-30 Sergio Durigan Junior <sergiodj@redhat.com>
8786 Pedro Alves <palves@redhat.com>
8787
8788 PR cli/21688
8789 * cli/cli-script.c (command_name_equals_not_inline): Remove function.
8790 (process_next_line): New variable 'inline_cmd'.
8791 Adjust 'if' clauses for "python", "compile" and "guile" to use
8792 'command_name_equals' and check for '!inline_cmd'.
8793
8794 2017-06-30 Sergio Durigan Junior <sergiodj@redhat.com>
8795
8796 PR cli/21688
8797 * cli/cli-script.c (command_name_equals_not_inline): New function.
8798 (process_next_line): Adjust 'if' clauses for "python", "compile"
8799 and "guile" to use command_name_equals_not_inline.
8800
8801 2017-06-29 Pedro Alves <palves@redhat.com>
8802
8803 * completer.c (expression_completer): Call
8804 linespec_location_completer instead of location_completer.
8805
8806 2017-06-29 Pedro Alves <palves@redhat.com>
8807
8808 * completer.c (expression_completer): Remove code that recomputes
8809 'text' from 'word'.
8810
8811 2017-06-29 Yao Qi <yao.qi@linaro.org>
8812
8813 * regformats/regdat.sh: Generate code with
8814 "ifndef IN_PROCESS_AGENT".
8815
8816 2017-06-28 Pedro Alves <palves@redhat.com>
8817
8818 * command.h: Include "common/scoped_restore.h".
8819
8820 2017-06-28 Yao Qi <yao.qi@linaro.org>
8821
8822 * mi/mi-cmd-break.c (mi_argv_to_format): Use obstack_grow_str
8823 instead of obstack_grow.
8824
8825 2017-06-28 Doug Gilmore <Doug.Gilmore@imgtec.com>
8826
8827 PR gdb/21337
8828 * symfile.c (reread_symbols): Call objfiles_changed just before
8829 read_symbols.
8830
8831 2017-06-27 Pedro Alves <palves@redhat.com>
8832
8833 * symtab.c (COMPLETION_LIST_ADD_SYMBOL)
8834 (MCOMPLETION_LIST_ADD_SYMBOL): Delete macros, replace with ...
8835 (completion_list_add_symbol, completion_list_add_msymbol):
8836 ... these new functions.
8837 (add_symtab_completions)
8838 (default_make_symbol_completion_list_break_on_1): Adjust.
8839
8840 2017-06-27 Pedro Alves <palves@redhat.com>
8841
8842 * objfiles.c (get_objfile_bfd_data): Call bfd_alloc instead of
8843 bfd_zalloc. Call objfile_per_bfd_storage's ctor.
8844 (free_objfile_per_bfd_storage): Call objfile_per_bfd_storage's
8845 dtor.
8846 * objfiles.h (objfile_per_bfd_storage): Add ctor. Make
8847 'storage_obstack' field an auto_obstack. In-class initialize all
8848 non-bitfield fields. Make minsyms_read bool.
8849 * symfile.c (read_symbols): Adjust.
8850
8851 2017-06-27 Alan Hayward <alan.hayward@arm.com>
8852
8853 * remote-sim.c (gdbsim_fetch_register): Use byte_vector.
8854 (gdbsim_store_register): Likewise.
8855
8856 2017-06-27 Pedro Alves <palves@redhat.com>
8857
8858 * c-exp.y (name_obstack): Now an auto_obstack.
8859 (yylex): Use auto_obstack::clear.
8860 (c_parse): Use auto_obstack::clear instead of reinitializing and
8861 freeing the obstack.
8862 * c-lang.c (evaluate_subexp_c): Use auto_obstack.
8863 * d-exp.y (name_obstack): Now an auto_obstack.
8864 (yylex): Use auto_obstack::clear.
8865 (d_parse): Use auto_obstack::clear instead of reinitializing and
8866 freeing the obstack.
8867 * dwarf2loc.c (fetch_const_value_from_synthetic_pointer): Use
8868 auto_obstack.
8869 * dwarf2read.c (create_addrmap_from_index)
8870 (dwarf2_build_psymtabs_hard)
8871 (update_enumeration_type_from_children): Likewise.
8872 * gdb_obstack.h (auto_obstack): New type.
8873 * go-exp.y (name_obstack): Now an auto_obstack.
8874 (build_packaged_name): Use auto_obstack::clear.
8875 (go_parse): Use auto_obstack::clear instead of reinitializing and
8876 freeing the obstack.
8877 * linux-tdep.c (linux_make_mappings_corefile_notes): Use
8878 auto_obstack.
8879 * printcmd.c (printf_wide_c_string, ui_printf): Use auto_obstack.
8880 * rust-exp.y (work_obstack): Now an auto_obstack.
8881 (rust_parse, rust_lex_tests): Use auto_obstack::clear instead of
8882 reinitializing and freeing the obstack.
8883 * utils.c (do_obstack_free, make_cleanup_obstack_free): Delete.
8884 (host_char_to_target): Use auto_obstack.
8885 * utils.h (make_cleanup_obstack_free): Delete declaration.
8886 * valprint.c (generic_emit_char, generic_printstr): Use
8887 auto_obstack.
8888
8889 2017-06-27 Simon Marchi <simon.marchi@ericsson.com>
8890
8891 * darwin-nat.c (darwin_check_new_threads): Don't handle dummy
8892 thread.
8893 (darwin_init_thread_list): Don't update dummy thread.
8894 (darwin_create_inferior, darwin_attach): Don't add a dummy thread.
8895
8896 2017-06-26 Simon Marchi <simon.marchi@ericsson.com>
8897
8898 * record-full.c (netorder16): Remove.
8899
8900 2017-06-26 Simon Marchi <simon.marchi@ericsson.com>
8901
8902 * common/diagnostics.h: Define macros for GCC.
8903 (DIAGNOSTIC_IGNORE_UNUSED_FUNCTION): New macro.
8904 * common/vec.h: Include diagnostics.h.
8905 (DIAGNOSTIC_IGNORE_UNUSED_VEC_FUNCTION): New macro.
8906 (DEF_VEC_I, DEF_VEC_P, DEF_VEC_O): Ignore -Wunused-function
8907 warning.
8908
8909 2017-06-26 Simon Marchi <simon.marchi@ericsson.com>
8910
8911 * common/diagnostics.h (DIAGNOSTIC_IGNORE_DEPRECATED_REGISTER):
8912 New macro.
8913 * ada-lex.l: Ignore deprecated register warnings.
8914
8915 2017-06-25 Simon Marchi <simon.marchi@ericsson.com>
8916
8917 * main.c (get_init_files): Replace "SYSTEM_GDBINIT +
8918 datadir_len" with "&SYSTEM_GDBINIT[datadir_len]".
8919
8920 2017-06-25 Simon Marchi <simon.marchi@ericsson.com>
8921
8922 * dtrace-probe.c (dtrace_process_dof_probe): Put semi-colon on
8923 its own line.
8924
8925 2017-06-25 Simon Marchi <simon.marchi@ericsson.com>
8926
8927 * nat/x86-dregs.c (x86_show_dr): Print registers one per line.
8928
8929 2017-06-23 Alan Hayward <alan.hayward@arm.com>
8930
8931 * xtensa-tdep.c (XTENSA_MAX_REGISTER_SIZE): Add.
8932 (xtensa_register_write_masked): Use XTENSA_MAX_REGISTER_SIZE.
8933 (xtensa_register_read_masked): Likewise.
8934
8935 2017-06-22 Sergio Durigan Junior <sergiodj@redhat.com>
8936
8937 * common/environ.c (gdb_environ::unset): Update comment.
8938
8939 2017-06-22 Alan Hayward <alan.hayward@arm.com>
8940
8941 * python/py-unwind.c (pyuw_sniffer): Allocate space for
8942 registers.
8943
8944 2017-06-22 Alan Hayward <alan.hayward@arm.com>
8945
8946 * record-full.c (record_full_exec_insn): Use byte_vector.
8947
8948 2017-06-22 Yao Qi <yao.qi@linaro.org>
8949
8950 * regformats/i386/amd64-avx-mpx-avx512-pku-linux.dat: Regenerated.
8951 * regformats/i386/amd64-avx-mpx-avx512-pku.dat: Regenerated.
8952
8953 2017-06-22 Alan Hayward <alan.hayward@arm.com>
8954
8955 * remote.c (cached_reg): Move from here...
8956 * regcache.h (cached_reg): ...to here.
8957 * python/py-unwind.c (struct reg_info): Remove.
8958 (cached_frame_info): Use cached_reg_t.
8959 (pyuw_prev_register): Likewise.
8960 (pyuw_sniffer): Use cached_reg_t and allocate registers.
8961 (pyuw_dealloc_cache): Free all registers.
8962
8963 2017-06-22 Pedro Alves <palves@redhat.com>
8964 Simon Marchi <simon.marchi@ericsson.com>
8965
8966 * unittests/environ-selftests.c (run_tests): Ignore -Wself-move
8967 warning.
8968 * common/diagnostics.h: New file.
8969
8970 2017-06-22 Pedro Alves <palves@redhat.com>
8971
8972 * common/agent.h: Add include guards.
8973
8974 2017-06-21 Simon Marchi <simon.marchi@ericsson.com>
8975
8976 * target.h (struct target_ops) <to_xfer_partial>: Update doc to
8977 talk about addressable units instead of bytes.
8978
8979 2017-06-20 Sergio Durigan Junior <sergiodj@redhat.com>
8980
8981 * common/environ.c (gdb_environ::unset): Use '::iterator' instead
8982 of '::const_iterator'.
8983
8984 2017-06-20 Sergio Durigan Junior <sergiodj@redhat.com>
8985
8986 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
8987 'unittests/environ-selftests.c'.
8988 (SUBDIR_UNITTESTS_OBS): Add 'environ-selftests.o'.
8989 * charset.c (find_charset_names): Declare object 'iconv_env'.
8990 Update code to use 'iconv_env' object. Remove call to
8991 'free_environ'.
8992 * common/environ.c: Include <utility>.
8993 (make_environ): Delete function.
8994 (free_environ): Delete function.
8995 (gdb_environ::clear): New function.
8996 (gdb_environ::operator=): New function.
8997 (gdb_environ::get): Likewise.
8998 (environ_vector): Delete function.
8999 (set_in_environ): Delete function.
9000 (gdb_environ::set): New function.
9001 (unset_in_environ): Delete function.
9002 (gdb_environ::unset): New function.
9003 (gdb_environ::envp): Likewise.
9004 * common/environ.h: Include <vector>.
9005 (struct gdb_environ): Delete; transform into...
9006 (class gdb_environ): ... this class.
9007 (free_environ): Delete prototype.
9008 (init_environ, get_in_environ, set_in_environ, unset_in_environ,
9009 environ_vector): Likewise.
9010 * infcmd.c (run_command_1): Update code to call
9011 'envp' from 'gdb_environ' class.
9012 (environment_info): Update code to call methods from 'gdb_environ'
9013 class.
9014 (unset_environment_command): Likewise.
9015 (path_info): Likewise.
9016 (path_command): Likewise.
9017 * inferior.c (inferior::~inferior): Delete call to 'free_environ'.
9018 (inferior::inferior): Initialize 'environment' using the host's
9019 information.
9020 * inferior.h: Remove forward declaration of 'struct gdb_environ'.
9021 Include "environ.h".
9022 (class inferior) <environment>: Change type from 'struct
9023 gdb_environ' to 'gdb_environ'.
9024 * mi/mi-cmd-env.c (mi_cmd_env_path): Update code to call
9025 methods from 'gdb_environ' class.
9026 * solib.c (solib_find_1): Likewise
9027 * unittests/environ-selftests.c: New file.
9028
9029 2017-06-20 Yao Qi <yao.qi@linaro.org>
9030
9031 * features/i386/i386-linux.xml: Exchange the order of including
9032 32bit-linux.xml and 32bit-sse.xml.
9033 * features/i386/i386-linux.c: Regenerated.
9034
9035 2017-06-20 Yao Qi <yao.qi@linaro.org>
9036
9037 * target-descriptions.c (tdesc_reg): Add ctor, dtor.
9038 Delete copy ctor and assignment operator.
9039 (tdesc_type): Likewise.
9040 (tdesc_feature): Likewise.
9041 (tdesc_free_reg): Remove.
9042 (tdesc_create_reg): Use new.
9043 (tdesc_free_type): Remove.
9044 (tdesc_create_vector): Use new.
9045 (tdesc_create_union): Likewise.
9046 (tdesc_create_flags): Likewise.
9047 (tdesc_create_enum): Likewise.
9048 (tdesc_free_feature): Delete.
9049 (free_target_description): Use delete.
9050
9051 2017-06-19 John Baldwin <jhb@FreeBSD.org>
9052
9053 * mips-tdep.c (print_gp_register_row): Don't error for unavailable
9054 registers.
9055
9056 2017-06-19 Pedro Alves <palves@redhat.com>
9057
9058 * dwarf2read.c (write_psymtabs_to_index): Construct file_closer
9059 after gdb::unlinker.
9060
9061 2017-06-19 Sergio Durigan Junior <sergiodj@redhat.com>
9062
9063 * mi/mi-cm-env.c (_initialize_mi_cmd_env): Use getenv instead of
9064 gdb_environ to access an environment variable.
9065
9066 2017-06-18 Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
9067
9068 * nat/linux-ptrace.c (linux_fork_to_function): Add cast to
9069 gdb_byte*.
9070
9071 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
9072
9073 * nat/fork-inferior.h (trace_start_error): Add ATTRIBUTE_PRINTF.
9074
9075 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
9076
9077 * configure: Re-generate.
9078 * warning.m4 (build_warnings): Add -Wno-mismatched-tags.
9079
9080 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
9081
9082 * configure: Re-generate.
9083 * warning.m4: Pass -Werror to compiler when checking for
9084 supported warning flags.
9085
9086 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
9087
9088 * Makefile.in (COMPILE.pre): Add "-x c++".
9089
9090 2017-06-16 Alan Hayward <alan.hayward@arm.com>
9091 Pedro Alves <palves@redhat.com>
9092 Yao Qi <yao.qi@linaro.org>
9093
9094 * defs.h (RequireLongest): New.
9095 (extract_integer): Declare function template.
9096 (extract_signed_integer): Remove the declaration, but define it
9097 static inline.
9098 (extract_unsigned_integer): Likewise.
9099 (store_integer): Declare function template.
9100 (store_signed_integer): Remove the declaration, but define it
9101 static inline.
9102 (store_unsigned_integer): Likewise.
9103 * findvar.c (extract_integer): New function template.
9104 (extract_signed_integer): Remove.
9105 (extract_unsigned_integer): Remove.
9106 (extract_integer<LONGEST>, extract_integer<ULONGEST>): Explicit
9107 instantiations.
9108 (store_integer): New function template.
9109 (store_signed_integer): Remove.
9110 (store_unsigned_integer): Remove.
9111 (store_integer): Explicit instantiations.
9112 * regcache.c (regcache_raw_read_signed): Update.
9113 (regcache::raw_read): New function.
9114 (regcache::raw_read_signed): Remove.
9115 (regcache::raw_read_unsigned): Remove.
9116 (regcache_raw_read_unsigned): Update.
9117 (regcache_raw_write_unsigned): Update.
9118 (regcache::raw_write_signed): Remove.
9119 (regcache::raw_write): New function.
9120 (regcache_cooked_read_signed): Update.
9121 (regcache::raw_write_unsigned): Remove.
9122 (regcache::cooked_read_signed): Remove.
9123 (regcache_cooked_read_unsigned): Update.
9124 (regcache::cooked_read_unsigned): Remove.
9125 (regcache_cooked_write_signed): Update.
9126 (regcache_cooked_write_unsigned): Update.
9127 * regcache.h (regcache) <raw_read_signed>: Remove.
9128 <raw_write_signed, raw_read_unsigned, raw_write_unsigned>: Remove.
9129 <raw_read, raw_write>: New.
9130 <cooked_read_signed, cooked_write_signed>: Remove.
9131 <cooked_write_unsigned, cooked_read_unsigned>: Remove.
9132 <cooked_read, cooked_write>: New.
9133 * sh64-tdep.c (sh64_pseudo_register_read): Update.
9134 (sh64_pseudo_register_write): Update.
9135
9136 2017-06-16 Anton Kolesov <anton.kolesov@synopsys.com>
9137
9138 * arc-tdep.c (arc_disassembler_options): New variable.
9139 (arc_gdbarch_init): Set and use it. Use arc_delayed_print_insn instead
9140 of default_print_insn.
9141 (arc_delayed_print_insn): Set info->section when needed,
9142 use default_print_insn to retrieve a disassembler.
9143
9144 2017-06-14 Sergio Durigan Junior <sergiodj@redhat.com>
9145
9146 PR gdb/21574
9147 * infcmd.c (_initialize_infcmd): Expand "help run" documentation
9148 to mention $SHELL and startup-with-shell.
9149
9150 2017-06-14 Max Filippov <jcmvbkbc@gmail.com>
9151
9152 * MAINTAINERS: Move Maxim Grigoriev to the Past Maintainers.
9153
9154 2017-06-14 Yao Qi <yao.qi@linaro.org>
9155
9156 * aarch64-tdep.c (aarch64_gdb_print_insn): Call
9157 default_print_insn instead of print_insn_aarch64.
9158 * arm-tdep.c (gdb_print_insn_arm): Call
9159 default_print_insn instead of print_insn_big_arm
9160 and print_insn_little_arm.
9161 * i386-tdep.c (i386_print_insn): Call default_print_insn
9162 instead of print_insn_i386.
9163 * ia64-tdep.c (ia64_print_insn): Call
9164 default_print_insn instead of print_insn_ia64.
9165 * mips-tdep.c (gdb_print_insn_mips): Call
9166 default_print_insn instead of print_insn_big_mips
9167 and print_insn_little_mips.
9168 * spu-tdep.c (gdb_print_insn_spu): Call default_print_insn
9169 instead of print_insn_spu.
9170
9171 2017-06-14 Pedro Alves <palves@redhat.com>
9172
9173 * ada-lang.c: Include "common/byte-vector.h".
9174 (ada_value_primitive_packed_val): Use gdb::byte_vector.
9175 * charset.c (wchar_iterator::iterate): Resize the vector instead
9176 of reserving it.
9177 * common/byte-vector.h: Include "common/def-vector.h".
9178 (wchar_iterator::m_out): Now a gdb::def_vector<gdb_wchar_t>.
9179 * cli/cli-dump.c: Include "common/byte-vector.h".
9180 (dump_memory_to_file, restore_binary_file): Use gdb::byte_vector.
9181 * common/byte-vector.h: New file.
9182 * common/def-vector.h: New file.
9183 * common/default-init-alloc.h: New file.
9184 * dwarf2loc.c: Include "common/byte-vector.h".
9185 (rw_pieced_value): Use gdb::byte_vector, and resize the vector
9186 instead of reserving it.
9187 * dwarf2read.c: Include "common/byte-vector.h".
9188 (data_buf::m_vec): Now a gdb::byte_vector.
9189 * gdb_regex.c: Include "common/def-vector.h".
9190 (compiled_regex::compiled_regex): Use gdb::def_vector<char>.
9191 * mi/mi-main.c: Include "common/byte-vector.h".
9192 (mi_cmd_data_read_memory): Use gdb::byte_vector.
9193 * printcmd.c: Include "common/byte-vector.h".
9194 (print_scalar_formatted): Use gdb::byte_vector.
9195 * valprint.c: Include "common/byte-vector.h".
9196 (maybe_negate_by_bytes, print_decimal_chars): Use
9197 gdb::byte_vector.
9198
9199 2017-06-13 Simon Marchi <simon.marchi@ericsson.com>
9200
9201 * darwin-nat.c: Include "nat/fork-inferior.h".
9202
9203 2017-06-13 Simon Marchi <simon.marchi@ericsson.com>
9204
9205 * configure.nat: Factor out Darwin bits that are not
9206 architecture-specific. Add fork-inferior.o.
9207
9208 2017-06-13 Simon Marchi <simon.marchi@ericsson.com>
9209
9210 * configure.nat: Factor out AIX bits that are not
9211 architecture-specific. Add fork-inferior.o.
9212
9213 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
9214
9215 * dwarf2loc.c (rw_pieced_value): New. Merge logic from...
9216 (read_pieced_value, write_pieced_value): ...here. Reduce to
9217 wrappers that just call rw_pieced_value.
9218
9219 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
9220
9221 * dwarf2loc.c (write_pieced_value): When writing the data for a
9222 memory piece, use write_memory_with_notification instead of
9223 write_memory.
9224
9225 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
9226
9227 * valops.c (read_value_memory): Change embedded_offset to
9228 represent a bit offset instead of a byte offset.
9229 * value.h (read_value_memory): Adjust comment.
9230
9231 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
9232
9233 * dwarf2loc.c (read_pieced_value): Remove unnecessary variables
9234 dest_offset_bits and source_offset_bits.
9235 (write_pieced_value): Likewise.
9236
9237 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
9238
9239 * dwarf2loc.c (read_pieced_value): Respect the piece offset, as
9240 given by DW_OP_bit_piece.
9241 (write_pieced_value): Likewise.
9242
9243 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
9244
9245 * dwarf2loc.c (read_pieced_value): Move the buffer allocation and
9246 some other preparations to the places where sufficient information
9247 is available.
9248 (write_pieced_value): Likewise.
9249
9250 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
9251
9252 * dwarf2loc.c (bits_to_bytes): New function.
9253 (read_pieced_value): Fix offset calculations for register pieces
9254 on big-endian targets.
9255 (write_pieced_value): Likewise.
9256
9257 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
9258
9259 * dwarf2loc.c (read_pieced_value): Remove buffer_size variable.
9260 (write_pieced_value): Likewise.
9261
9262 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
9263
9264 * dwarf2loc.c (write_pieced_value): When writing to a bit-field,
9265 transfer the source value's least significant bits, instead of its
9266 lowest-addressed ones. Rename type_len to max_offset.
9267 (read_pieced_value): Mirror above changes to write_pieced_value as
9268 applicable.
9269
9270 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
9271
9272 * dwarf2loc.c (write_pieced_value): In DWARF_VALUE_MEMORY,
9273 truncate full bytes from dest_offset_bits before using it as an
9274 offset into the buffer.
9275
9276 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
9277
9278 * dwarf2loc.c (write_pieced_value): Include transfer size in
9279 byte-wise check.
9280
9281 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
9282
9283 * dwarf2loc.c (write_pieced_value): Fix copy/paste error in the
9284 calculation of this_size.
9285
9286 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
9287
9288 * dwarf2loc.c (read_pieced_value): Respect parent value's offset
9289 when targeting a bit-field.
9290 (write_pieced_value): Likewise.
9291
9292 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
9293
9294 * dwarf2loc.c (struct piece_closure) <addr_size>: Remove field.
9295 (allocate_piece_closure): Drop addr_size parameter.
9296 (dwarf2_evaluate_loc_desc_full): Adjust call to
9297 allocate_piece_closure.
9298
9299 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
9300
9301 PR gdb/21226
9302 * dwarf2loc.c (read_pieced_value): Anchor stack value pieces at
9303 the LSB end, independent of endianness.
9304
9305 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
9306
9307 * dwarf2loc.c (write_pieced_value): Fix order of calculations for
9308 size capping.
9309
9310 2017-06-13 Yao Qi <yao.qi@linaro.org>
9311
9312 * mips-linux-nat.c: Move include features/mips*-linux.c to
9313 mips-linux-tdep.c.
9314 (_initialize_mips_linux_nat): Move initialize_tdesc_mips* calls
9315 to mips-linux-tdep.c.
9316 * mips-linux-tdep.c: Include features/mips*-linux.c
9317 (_initialize_mips_linux_tdep): Call initialize_tdesc_mips*
9318 functions.
9319 * mips-linux-tdep.h (tdesc_mips_linux): Declare.
9320 (tdesc_mips_dsp_linux, tdesc_mips64_linux): Declare.
9321 (tdesc_mips64_dsp_linux): Declare.
9322
9323 2017-06-12 Tom Tromey <tom@tromey.com>
9324
9325 * valprint.h (val_print_type_code_int): Remove.
9326 * valprint.c (generic_val_print_int): Always call
9327 val_print_scalar_formatted.
9328 (val_print_type_code_int): Remove.
9329 * printcmd.c (print_scalar_formatted): Handle options->format==0.
9330 * f-valprint.c (f_val_print): Use val_print_scalar_formatted.
9331 * c-valprint.c (c_val_print_int): Use val_print_scalar_formatted.
9332 * ada-valprint.c (ada_val_print_num): Use
9333 val_print_scalar_formatted.
9334
9335 2017-06-12 Tom Tromey <tom@tromey.com>
9336
9337 * printcmd.c (print_scalar_formatted): Unify the two switches.
9338 Don't convert scalars to LONGEST.
9339
9340 2017-06-12 Tom Tromey <tom@tromey.com>
9341
9342 PR exp/16225:
9343 * valprint.h (print_decimal_chars): Update.
9344 * valprint.c (maybe_negate_by_bytes): New function.
9345 (print_decimal_chars): Add "is_signed" argument.
9346 * printcmd.c (print_scalar_formatted): Update.
9347
9348 2017-06-12 Tom Tromey <tom@tromey.com>
9349
9350 PR exp/16225:
9351 * valprint.h (print_binary_chars, print_hex_chars): Update.
9352 * valprint.c (val_print_type_code_int): Update.
9353 (print_binary_chars): Add "zero_pad" argument.
9354 (emit_octal_digit): New function.
9355 (print_octal_chars): Don't zero-pad.
9356 (print_decimal_chars): Likewise.
9357 (print_hex_chars): Add "zero_pad" argument.
9358 * sh64-tdep.c (sh64_do_fp_register): Update.
9359 * regcache.c (regcache::dump): Update.
9360 * printcmd.c (print_scalar_formatted): Update.
9361 * infcmd.c (default_print_one_register_info): Update.
9362
9363 2017-06-12 Pedro Alves <palves@redhat.com>
9364 Alan Hayward <alan.hayward@arm.com>
9365
9366 * mips-tdep.c (MAX_MIPS_ABI_REGSIZE): New.
9367 (mips_eabi_push_dummy_call): Rename local 'regsize' to
9368 'abi_regsize'. Rename local array 'valbuf' to 'ref_valbuf', and
9369 use MAX_MIPS_ABI_REGSIZE instead of MAX_REGISTER_SIZE to size it.
9370 Assert that abi_regsize bytes fit in 'ref_valbuf'.
9371
9372 2017-06-12 Pedro Alves <palves@redhat.com>
9373
9374 * dwarf2read.c (mapped_symtab::data): Now a vector of
9375 symtab_index_entry instead of vector of
9376 std::unique_ptr<symtab_index_entry>. All users adjusted to check
9377 whether an element's name is NULL instead of checking whether the
9378 element itself is NULL.
9379 (find_slot): Change return type. Adjust.
9380 (hash_expand, , add_index_entry, uniquify_cu_indices)
9381 (write_hash_table): Adjust.
9382
9383 2017-06-12 Pedro Alves <palves@redhat.com>
9384
9385 * dwarf2read.c (recursively_count_psymbols): New function.
9386 (write_psymtabs_to_index): Call it to compute number of psyms and
9387 pass estimate size of psyms_seen to unordered_set's ctor.
9388
9389 2017-06-12 Pedro Alves <palves@redhat.com>
9390
9391 * dwarf2read.c (write_hash_table): Check if key already exists
9392 before emplacing.
9393
9394 2017-06-12 Pedro Alves <palves@redhat.com>
9395
9396 * dwarf2read.c (data_buf::append_space): Rename to...
9397 (data_buf::grow): ... this, and make private. Adjust all callers.
9398 (data_buf::append_uint): New method.
9399 (add_address_entry, write_one_signatured_type)
9400 (write_psymtabs_to_index): Use it.
9401
9402 2017-06-12 Pedro Alves <palves@redhat.com>
9403
9404 * dwarf2read.c (file_write(FILE *, const void *, size_t)): Delete.
9405 (file_write (FILE *, const std::vector<Elem>&)): Delete.
9406 (data_buf::file_write): Call ::fwrite directly.
9407
9408 2017-06-12 Pedro Alves <palves@redhat.com>
9409
9410 * dwarf2read.c (uniquify_cu_indices): Use std::unique and
9411 std::vector::erase.
9412
9413 2017-06-12 Jan Kratochvil <jan.kratochvil@redhat.com>
9414
9415 Code cleanup: C++ify .gdb_index producer.
9416 * dwarf2read.c: Include <unordered_set> and <unordered_map>.
9417 (MAYBE_SWAP) [WORDS_BIGENDIAN]: Cast to offset_type.
9418 (struct strtab_entry, hash_strtab_entry, eq_strtab_entry)
9419 (create_strtab, add_string): Remove.
9420 (file_write, data_buf): New.
9421 (struct symtab_index_entry): Use std::vector for cu_indices.
9422 (struct mapped_symtab): Use std::vector for data.
9423 (hash_symtab_entry, eq_symtab_entry, delete_symtab_entry)
9424 (create_symbol_hash_table, create_mapped_symtab, cleanup_mapped_symtab):
9425 Remove.
9426 (find_slot): Change return type. Update it to the new data structures.
9427 (hash_expand, add_index_entry): Update it to the new data structures.
9428 (offset_type_compare): Remove.
9429 (uniquify_cu_indices): Update it to the new data structures.
9430 (c_str_view, c_str_view_hasher, vector_hasher): New.
9431 (add_indices_to_cpool): Remove.
9432 (write_hash_table): Update it to the new data structures.
9433 (struct psymtab_cu_index_map, hash_psymtab_cu_index)
9434 (eq_psymtab_cu_index): Remove.
9435 (psym_index_map): New typedef.
9436 (struct addrmap_index_data): Change addr_obstack pointer to data_buf
9437 reference and std::unordered_map for cu_index_htab.
9438 (add_address_entry, add_address_entry_worker, write_address_map)
9439 (write_psymbols): Update it to the new data structures.
9440 (write_obstack): Remove.
9441 (struct signatured_type_index_data): Change types_list to a data_buf
9442 reference and psyms_seen to a std::unordered_set reference.
9443 (write_one_signatured_type, recursively_write_psymbols)
9444 (write_psymtabs_to_index): Update it to the new data structures.
9445
9446 2017-06-11 Simon Marchi <simon.marchi@ericsson.com>
9447
9448 * NEWS (Changes since GDB 8.0): Announce {set,show} debug
9449 separate-debug-file commands.
9450 * symfile.h (separate_debug_file_debug): New global.
9451 * symfile.c (separate_debug_file_debug): New global.
9452 (separate_debug_file_exists, find_separate_debug_file): Add
9453 debug output.
9454 (_initialize_symfile): Add "set debug separate-debug-file"
9455 command.
9456 * build-id.c (build_id_to_debug_bfd,
9457 find_separate_debug_file_by_buildid): Add debug output.
9458
9459 2017-06-10 Simon Marchi <simon.marchi@polymtl.ca>
9460
9461 * gdbarch.sh (displaced_step_free_closure): Remove.
9462 * gdbarch.h, gdbarch.c: Re-generate.
9463 * aarch64-linux-tdep.c (aarch64_linux_init_abi): Don't set
9464 displaced_step_free_closure.
9465 * amd64-linux-tdep.c (amd64_linux_init_abi_common): Likewise.
9466 * arm-linux-tdep.c (arm_linux_init_abi): Likewise.
9467 * i386-linux-tdep.c (i386_linux_init_abi): Likewise.
9468 * rs6000-aix-tdep.c (rs6000_aix_init_osabi): Likewise.
9469 * rs6000-tdep.c (rs6000_gdbarch_init): Likewise.
9470 * s390-linux-tdep.c (s390_gdbarch_init): Likewise.
9471 * arch-utils.h (simple_displaced_step_free_closure): Remove.
9472 * arch-utils.c (simple_displaced_step_free_closure): Remove.
9473 * infrun.c (displaced_step_clear): Call xfree instead of
9474 gdbarch_displaced_step_free_closure.
9475
9476 2017-06-08 Sergio Durigan Junior <sergiodj@redhat.com>
9477
9478 * common/common-utils.c (stringify_argv): Check for "arg[0] !=
9479 NULL".
9480
9481 2017-06-08 Alan Hayward <alan.hayward@arm.com>
9482
9483 * mn10300-tdep.c (MN10300_MAX_REGISTER_SIZE): Add.
9484 (mn10300_extract_return_value): Use MN10300_MAX_REGISTER_SIZE.
9485 (mn10300_push_dummy_call): Likewise.
9486
9487 2017-06-08 Alan Hayward <alan.hayward@arm.com>
9488
9489 * mi/mi-main.c (register_changed_p): Use value_contents_eq.
9490
9491 2017-06-08 Alan Hayward <alan.hayward@arm.com>
9492
9493 * mi/mi-main.c (register_changed_p): Use cooked_read_value.
9494
9495 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
9496
9497 * NEWS (Changes since GDB 8.0): Announce that GDBserver is now
9498 able to start inferiors using a shell.
9499 (New remote packets): Announce new packet "QStartupWithShell".
9500 * remote.c: Add PACKET_QStartupWithShell.
9501 (extended_remote_create_inferior): Handle new
9502 PACKET_QStartupWithShell.
9503 (remote_protocol_features) <QStartupWithShell>: New entry for
9504 PACKET_QStartupWithShell.
9505 (_initialize_remote): Call "add_packet_config_cmd" for
9506 QStartupShell.
9507
9508 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
9509 Pedro Alves <palves@redhat.com>
9510
9511 * Makefile.in (HFILES_NO_SRCDIR): Add "common/common-inferior.h"
9512 and "nat/fork-inferior.h".
9513 * common/common-inferior.h: New file, with contents from
9514 "gdb/inferior.h".
9515 * commom/common-utils.c: Include "common-utils.h".
9516 (stringify_argv): New function.
9517 * common/common-utils.h (stringify_argv): New prototype.
9518 * configure.nat: Add "fork-inferior.o" as a dependency for
9519 "*linux*", "fbsd*" and "nbsd*" hosts.
9520 * corefile.c (get_exec_file): Update comment.
9521 * darwin-nat.c (darwin_ptrace_him): Call "gdb_startup_inferior"
9522 instead of "startup_inferior".
9523 (darwin_create_inferior): Call "add_thread_silent" after
9524 "fork_inferior".
9525 * fork-child.c: Cleanup unnecessary includes.
9526 (SHELL_FILE): Move to "common/common-fork-child.c".
9527 (environ): Likewise.
9528 (exec_wrapper): Initialize.
9529 (get_exec_wrapper): New function.
9530 (breakup_args): Move to "common/common-fork-child.c"; rename to
9531 "breakup_args_for_exec".
9532 (escape_bang_in_quoted_argument): Move to
9533 "common/common-fork-child.c".
9534 (saved_ui): New variable.
9535 (prefork_hook): New function.
9536 (postfork_hook): Likewise.
9537 (postfork_child_hook): Likewise.
9538 (gdb_startup_inferior): Likewise.
9539 (fork_inferior): Move to "common/common-fork-child.c". Update
9540 function to support gdbserver.
9541 (startup_inferior): Likewise.
9542 * gdbcore.h (get_exec_file): Remove declaration.
9543 * gnu-nat.c (gnu_create_inferior): Call "gdb_startup_inferior"
9544 instead of "startup_inferior". Call "add_thread_silent" after
9545 "fork_inferior".
9546 * inf-ptrace.c: Include "nat/fork-inferior.h" and "utils.h".
9547 (inf_ptrace_create_inferior): Call "gdb_startup_inferior"
9548 instead of "startup_inferior". Call "add_thread_silent" after
9549 "fork_inferior".
9550 * inferior.h: Include "common-inferior.h".
9551 (trace_start_error): Move to "common/common-utils.h".
9552 (trace_start_error_with_name): Likewise.
9553 (fork_inferior): Move prototype to "nat/fork-inferior.h".
9554 (startup_inferior): Likewise.
9555 (gdb_startup_inferior): New prototype.
9556 * nat/fork-inferior.c: New file, with contents from "fork-child.c".
9557 * nat/fork-inferior.h: New file.
9558 * procfs.c (procfs_init_inferior): Call "gdb_startup_inferior"
9559 instead of "startup_inferior". Call "add_thread_silent" after
9560 "fork_inferior".
9561 * target.h (target_terminal_init): Move prototype to
9562 "target/target.h".
9563 (target_terminal_inferior): Likewise.
9564 (target_terminal_ours): Likewise.
9565 * target/target.h (target_terminal_init): New prototype, moved
9566 from "target.h".
9567 (target_terminal_inferior): Likewise.
9568 (target_terminal_ours): Likewise.
9569 * utils.c (gdb_flush_out_err): New function.
9570
9571 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
9572
9573 * Makefile.in (HFILES_NO_SRCDIR): Add "common/common-gdbthread.h".
9574 * common/common-gdbthread.h: New file, with parts from
9575 "gdb/gdbthread.h".
9576 * gdbthread.h: Include "common-gdbthread.h".
9577 (switch_to_thread): Moved to "common/common-gdbthread.h".
9578
9579 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
9580
9581 * Makefile.in (SFILES): Add "common/job-control.c".
9582 (HFILES_NO_SRCDIR): Add "common/job-control.h".
9583 (COMMON_OBS): Add "job-control.o".
9584 * common/job-control.c: New file, with contents from
9585 "gdb/inflow.c".
9586 * common/job-control.h: New file, with contents from "terminal.h".
9587 * fork-child.c: Include "job-control.h".
9588 * inflow.c: Include "job-control.h".
9589 (gdb_setpgid): Move to "common/common-inflow.c".
9590 (_initialize_inflow): Move setting of "job_control" to
9591 "handle_job_control".
9592 * terminal.h (job_control): Moved to "common/common-terminal.h".
9593 (gdb_setpgid): Likewise.
9594 * top.c: Include "job_control.h".
9595 * utils.c: Likewise.
9596 (job_control): Moved to "job-control.c".
9597
9598 2017-06-07 Pedro Alves <palves@redhat.com>
9599
9600 * Makefile.in (SFILES): Add gdb_regex.c.
9601 (COMMON_OBS): Add gdb_regex.o.
9602 * ada-lang.c (ada_add_standard_exceptions)
9603 (ada_add_exceptions_from_frame, name_matches_regex)
9604 (ada_add_global_exceptions, ada_exceptions_list_1): Change regex
9605 parameter type to compiled_regex. Adjust.
9606 (ada_exceptions_list): Use compiled_regex.
9607 * break-catch-throw.c (exception_catchpoint::pattern): Now a
9608 std::unique_ptr<compiled_regex>.
9609 (exception_catchpoint::~exception_catchpoint): Remove regfree
9610 call.
9611 (check_status_exception_catchpoint): Adjust to use compiled_regex.
9612 (handle_gnu_v3_exceptions): Adjust to use compiled_regex.
9613 * breakpoint.c (solib_catchpoint::compiled): Now a
9614 std::unique_ptr<compiled_regex>.
9615 (solib_catchpoint::~solib_catchpoint): Remove regfree call.
9616 (check_status_catch_solib): Adjust to use compiled_regex.
9617 (add_solib_catchpoint): Adjust to use compiled_regex.
9618 * cli/cli-cmds.c (apropos_command): Use compiled_regex.
9619 * cli/cli-decode.c (apropos_cmd): Change regex parameter to
9620 compiled_regex reference. Adjust to use it.
9621 * cli/cli-decode.h: Remove struct re_pattern_buffer forward
9622 declaration. Include "gdb_regex.h".
9623 (apropos_cmd): Change regex parameter to compiled_regex reference.
9624 * gdb_regex.c: New file.
9625 * gdb_regex.h (make_regfree_cleanup, get_regcomp_error): Delete
9626 declarations.
9627 (class compiled_regex): New.
9628 * linux-tdep.c: Include "common/gdb_optional.h".
9629 (struct mapping_regexes): New, factored out from
9630 mapping_is_anonymous_p, and adjusted to use compiled_regex.
9631 (mapping_is_anonymous_p): Use mapping_regexes wrapped in a
9632 gdb::optional and remove cleanups. Adjust to compiled_regex.
9633 * probe.c: Include "common/gdb_optional.h".
9634 (collect_probes): Use compiled_regex and gdb::optional and remove
9635 cleanups.
9636 * skip.c: Include "common/gdb_optional.h".
9637 (skiplist_entry::compiled_function_regexp): Now a
9638 gdb::optional<compiled_regex>.
9639 (skiplist_entry::compiled_function_regexp_is_valid): Delete field.
9640 (free_skiplist_entry): Remove regfree call.
9641 (compile_skip_regexp, skip_rfunction_p): Adjust to use
9642 compiled_regex and gdb::optional.
9643 * symtab.c: Include "common/gdb_optional.h".
9644 (search_symbols): Use compiled_regex and gdb::optional.
9645 * utils.c (do_regfree_cleanup, make_regfree_cleanup)
9646 (get_regcomp_error, compile_rx_or_error): Delete. Some bits moved
9647 to gdb_regex.c.
9648
9649 2017-06-07 Alan Hayward <alan.hayward@arm.com>
9650
9651 * regcache.c (regcache::save): Avoid buffer use.
9652 (regcache::dump): Likewise.
9653
9654 2017-06-07 Alan Hayward <alan.hayward@arm.com>
9655
9656 * sh-tdep.c (sh_pseudo_register_read): Remove
9657 MAX_REGISTER_SIZE.
9658 (sh_pseudo_register_write): Likewise.
9659 * sh64-tdep.c (sh64_pseudo_register_read): Likewise.
9660 (sh64_pseudo_register_write): Likewise
9661
9662 2017-06-07 Alan Hayward <alan.hayward@arm.com>
9663
9664 * aarch64-tdep.c (aarch64_store_return_value): Use
9665 V_REGISTER_SIZE.
9666 (aarch64_pseudo_read_value): Likewise.
9667 (aarch64_pseudo_write): Likewise.
9668
9669 2017-06-06 Yao Qi <yao.qi@linaro.org>
9670
9671 * regformats/regdef.h (set_register_cache): Remove the
9672 declaration.
9673
9674 2017-06-06 Alan Hayward <alan.hayward@arm.com>
9675
9676 * frame.c (frame_unwind_register_signed): Use
9677 frame_unwind_register_value.
9678
9679 2017-06-06 Pedro Alves <palves@redhat.com>
9680
9681 PR breakpoints/21553
9682 * breakpoint.c (create_breakpoints_sal_default)
9683 (init_breakpoint_sal, create_breakpoint_sal): Use
9684 gdb::unique_xmalloc_ptr for string parameters.
9685 (create_breakpoint): Constify 'extra_string' and 'cond_string'
9686 parameters. Replace cleanups with gdb::unique_xmalloc_ptr.
9687 (base_breakpoint_create_breakpoints_sal)
9688 (bkpt_create_breakpoints_sal, tracepoint_create_breakpoints_sal)
9689 (strace_marker_create_breakpoints_sal)
9690 (create_breakpoints_sal_default): Use gdb::unique_xmalloc_ptr for
9691 string parameters.
9692 * breakpoint.h (breakpoint_ops::create_breakpoints_sal): Use
9693 gdb::unique_xmalloc_ptr for string parameters.
9694 (create_breakpoint): Constify 'extra_string' and 'cond_string'
9695 parameters.
9696
9697 2017-06-06 Alan Hayward <alan.hayward@arm.com>
9698
9699 * alpha-tdep.c (alpha_register_to_value): Use
9700 get_frame_register_value.
9701 (alpha_value_to_register): Use ALPHA_REGISTER_SIZE.
9702
9703 2017-06-06 Alan Hayward <alan.hayward@arm.com>
9704
9705 * ia64-tdep.c (IA64_MAX_FP_REGISTER_SIZE) Add.
9706 (ia64_register_to_value): Use IA64_MAX_FP_REGISTER_SIZE.
9707 (ia64_value_to_register): Likewise.
9708 (ia64_extract_return_value): Likewise.
9709 (ia64_store_return_value): Likewise.
9710 (ia64_push_dummy_call): Likewise.
9711
9712 2017-06-04 Joel Brobecker <brobecker@adacore.com>
9713
9714 GDB 8.0 released.
9715
9716 2017-06-03 Simon Marchi <simon.marchi@ericsson.com>
9717
9718 * x86-linux-nat.c (struct arch_lwp_info): Remove.
9719
9720 2017-06-03 Simon Marchi <simon.marchi@polymtl.ca>
9721
9722 * linux-nat.c (linux_nat_post_attach_wait): Remove FIRST
9723 parameter.
9724 (linux_nat_attach): Adjust call to linux_nat_post_attach_wait.
9725
9726 2017-06-02 Simon Marchi <simon.marchi@ericsson.com>
9727
9728 * event-loop.c (poll_timers): Unallocate timer using delete
9729 instead of xfree.
9730
9731 2017-06-02 Simon Marchi <simon.marchi@polymtl.ca>
9732
9733 * breakpoint.h (struct breakpoint_ops) <dtor>: Remove.
9734 (struct breakpoint) <~breakpoint>: New.
9735 (struct watchpoint): Inherit from breakpoint.
9736 <~watchpoint>: New.
9737 <base>: Remove.
9738 (struct tracepoint): Inherit from breakpoint.
9739 <base>: Remove.
9740 * breakpoint.c (longjmp_breakpoint_ops): Remove.
9741 (struct longjmp_breakpoint): Inherit from breakpoint.
9742 <~longjmp_breakpoint>: New.
9743 <base>: Remove.
9744 (new_breakpoint_from_type): Remove casts.
9745 (watchpoint_in_thread_scope): Remove reference to base field.
9746 (watchpoint_del_at_next_stop): Likewise.
9747 (update_watchpoint): Likewise.
9748 (watchpoint_check): Likewise.
9749 (bpstat_check_watchpoint): Likewise.
9750 (set_longjmp_breakpoint): Likewise.
9751 (struct fork_catchpoint): Inherit from breakpoint.
9752 <base>: Remove.
9753 (struct solib_catchpoint): Inherit from breakpoint.
9754 <~solib_catchpoint>: New.
9755 <base>: Remove.
9756 (dtor_catch_solib): Change to ...
9757 (solib_catchpoint::~solib_catchpoint): ... this.
9758 (breakpoint_hit_catch_solib): Remove reference to base field.
9759 (add_solib_catchpoint): Likewise.
9760 (create_fork_vfork_event_catchpoint): Likewise.
9761 (struct exec_catchpoint): Inherit from breakpoint.
9762 <~exec_catchpoint>: New.
9763 <base>: Remove.
9764 (dtor_catch_exec): Change to ...
9765 (exec_catchpoint::~exec_catchpoint): ... this.
9766 (dtor_watchpoint): Change to ...
9767 (watchpoint::~watchpoint): ... this.
9768 (watch_command_1): Remove reference to base field.
9769 (catch_exec_command_1): Likewise.
9770 (base_breakpoint_dtor): Change to ...
9771 (breakpoint::~breakpoint): ... this.
9772 (base_breakpoint_ops): Remove dtor field value.
9773 (longjmp_bkpt_dtor): Change to ...
9774 (longjmp_breakpoint::~longjmp_breakpoint): ... this.
9775 (strace_marker_create_breakpoints_sal): Remove reference to base
9776 field.
9777 (delete_breakpoint): Don't manually call breakpoint destructor.
9778 (create_tracepoint_from_upload): Remove reference to base field.
9779 (trace_pass_set_count): Likewise.
9780 (initialize_breakpoint_ops): Don't initialize
9781 momentary_breakpoint_ops, don't set dtors.
9782 * ada-lang.c (struct ada_catchpoint): Inherit from breakpoint.
9783 <~ada_catchpoint>: New.
9784 <base>: Remove.
9785 (create_excep_cond_exprs): Remove reference to base field.
9786 (dtor_exception): Change to ...
9787 (ada_catchpoint::~ada_catchpoint): ... this.
9788 (dtor_catch_exception): Remove.
9789 (dtor_catch_exception_unhandled): Remove.
9790 (dtor_catch_assert): Remove.
9791 (create_ada_exception_catchpoint): Remove reference to base
9792 field.
9793 (initialize_ada_catchpoint_ops): Don't set dtors.
9794 * break-catch-sig.c (struct signal_catchpoint): Inherit from
9795 breakpoint.
9796 <~signal_catchpoint>: New.
9797 <base>: Remove.
9798 (signal_catchpoint_dtor): Change to ...
9799 (signal_catchpoint::~signal_catchpoint): ... this.
9800 (create_signal_catchpoint): Remove reference to base field.
9801 (initialize_signal_catchpoint_ops): Don't set dtor.
9802 * break-catch-syscall.c (struct syscall_catchpoint): Inherit
9803 from breakpoint.
9804 <~syscall_catchpoint>: New.
9805 <base>: Remove.
9806 (dtor_catch_syscall): Change to ...
9807 (syscall_catchpoint::~syscall_catchpoint): ... this.
9808 (create_syscall_event_catchpoint): Remove reference to base
9809 field.
9810 (initialize_syscall_catchpoint_ops): Don't set dtor.
9811 * break-catch-throw.c (struct exception_catchpoint): Inherit
9812 from breakpoint.
9813 <~exception_catchpoint>: New.
9814 <base>: Remove.
9815 (dtor_exception_catchpoint): Change to ...
9816 (exception_catchpoint::~exception_catchpoint): ... this.
9817 (handle_gnu_v3_exceptions): Remove reference to base field.
9818 (initialize_throw_catchpoint_ops): Don't set dtor.
9819 * ctf.c (ctf_get_traceframe_address): Remove reference to base
9820 field.
9821 * remote.c (remote_get_tracepoint_status): Likewise.
9822 * tracefile-tfile.c (tfile_get_traceframe_address): Likewise.
9823 * tracefile.c (tracefile_fetch_registers): Likewise.
9824 * tracepoint.c (actions_command): Likewise.
9825 (validate_actionline): Likewise.
9826 (tfind_1): Likewise.
9827 (get_traceframe_location): Likewise.
9828 (find_matching_tracepoint_location): Likewise.
9829 (parse_tracepoint_status): Likewise.
9830 * mi/mi-cmd-break.c (mi_cmd_break_passcount): Likewise.
9831
9832 2017-06-02 Simon Marchi <simon.marchi@polymtl.ca>
9833
9834 * breakpoint.c (struct longjmp_breakpoint): New struct.
9835 (is_tracepoint_type): Change return type to bool.
9836 (is_longjmp_type): New function.
9837 (new_breakpoint_from_type): Handle longjmp kinds of breakpoints.
9838 (set_raw_breakpoint_without_location): Use
9839 new_breakpoint_from_type.
9840 (set_raw_breakpoint): Likewise.
9841
9842 2017-06-02 Simon Marchi <simon.marchi@polymtl.ca>
9843
9844 * breakpoint.c (new_breakpoint_from_type): New function.
9845 (create_breakpoint_sal): Use new_breakpoint_from_type and
9846 unique_ptr.
9847 (create_breakpoint): Likewise.
9848
9849 2017-05-31 Simon Marchi <simon.marchi@ericsson.com>
9850
9851 * memattr.c (mem_info_command): Rename to ...
9852 (info_mem_command): ... this.
9853 (mem_enable_command): Rename to ...
9854 (enable_mem_command): ... this.
9855 (mem_disable_command): Rename to ...
9856 (disable_mem_command): ... this.
9857 (mem_delete_command): Rename to ...
9858 (delete_mem_command): ... this.
9859 (_initialize_mem): Adjust function names.
9860
9861 2017-05-31 Markus Metzger <markus.t.metzger@intel.com>
9862
9863 * btrace.c (handle_pt_insn_events): New.
9864 (ftrace_add_pt): Call handle_pt_insn_events. Rename ERRCODE into
9865 STATUS. Split into this and ...
9866 (handle_pt_insn_event_flags): ... this.
9867
9868 2017-05-31 Markus Metzger <markus.t.metzger@intel.com>
9869
9870 * configure.ac: Check for pt_insn_event, struct pt_insn.enabled,
9871 and struct pt_insn.resynced.
9872 * configure: Regenerated.
9873 * config.in: Regenerated.
9874
9875 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
9876
9877 * btrace.c (ftrace_find_call_by_number): New function.
9878 (ftrace_new_function): Store objects, not pointers.
9879 (ftrace_find_call_by_number, ftrace_new_return, ftrace_new_switch,
9880 ftrace_new_gap, ftrace_update_function,
9881 ftrace_compute_global_level_offset, btrace_stich_bts, btrace_clear,
9882 btrace_insn_get, btrace_insn_get_error, btrace_insn_end,
9883 btrace_insn_next, btrace_insn_prev, ptrace_find_insn_by_number,
9884 btrace_ends_with_single_insn, btrace_call_get): Account for
9885 btrace_thread_info::functions now storing objects.
9886 * btrace.h (struct btrace_thread_info): Add constructor.
9887 (struct btrace_thread_info) <functions>: Make std::vector.
9888 (struct btrace_thread_info) <prev, next, up, insn, errcode, flags):
9889 Initialize with default values.
9890 * record-btrace.c (record_btrace_frame_sniffer): Account for
9891 btrace_thread_info::functions now storing objects.
9892
9893 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
9894
9895 * btrace.c: Remove typedef bfun_s.
9896 (ftrace_new_gap): Directly add gaps to the list of gaps.
9897 (btrace_bridge_gaps, btrace_compute_ftrace_bts, pt_btrace_insn_flags,
9898 ftrace_add_pt, btrace_compute_ftrace_pt, btrace_compute_ftrace_1,
9899 btrace_finalize_ftrace, btrace_compute_ftrace): Use std::vector
9900 instead of gdb VEC.
9901
9902 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
9903
9904 * btrace.c (ftrace_fixup_caller, ftrace_new_return, ftrace_connect_bfun,
9905 ftrace_bridge_gap): Replace references to btrace_thread_info::segment
9906 with btrace_thread_info::next_segment and
9907 btrace_thread_info::prev_segment.
9908 * btrace.h: Remove struct btrace_func_link.
9909 (struct btrace_function): Replace pair of function segment pointers
9910 with pair of indices.
9911 * python/py-record-btrace.c (btpy_call_prev_sibling,
9912 btpy_call_next_sibling): Replace references to
9913 btrace_thread_info::segment with btrace_thread_info::next_segment and
9914 btrace_thread_info::prev_segment.
9915 * record-btrace.c (record_btrace_frame_this_id): Use
9916 btrace_find_call_by_number.
9917
9918 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
9919
9920 * btrace.c (ftrace_new_function, ftrace_fixup_level,
9921 ftrace_connect_bfun, ftrace_bridge_gap, btrace_bridge_gaps,
9922 btrace_insn_next, btrace_insn_prev): Remove references to
9923 btrace_thread_info::flow.
9924 * btrace.h (struct btrace_function): Remove FLOW.
9925
9926 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
9927
9928 * btrace.c (ftrace_find_call_by_number): New function.
9929 (ftrace_update_caller, ftrace_new_call, ftrace_new_tailcall,
9930 ftrace_get_caller, ftrace_find_call, ftrace_new_return,
9931 ftrace_match_backtrace, ftrace_connect_bfun, ftrace_connect_backtrace,
9932 ftrace_bridge_gap, btrace_bridge_gaps): Use btrace_function::up as an
9933 index.
9934 * btrace.h (struct btrace_function): Turn UP into an index.
9935 * python/py-record-btrace.c (btpy_call_up): Use btrace_function::up
9936 as an index.
9937 * record-btrace.c (record_btrace_frame_unwind_stop_reason,
9938 record_btrace_frame_prev_register, record_btrace_frame_sniffer,
9939 record_btrace_tailcall_frame_sniffe): Use btrace_find_call_by_number.
9940
9941 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
9942
9943 * btrace.c (ftrace_new_function, ftrace_new_call, ftrace_new_tailcall,
9944 ftrace_new_return, ftrace_new_switch, ftrace_new_gap,
9945 ftrace_update_function, ftrace_compute_global_level_offset,
9946 btrace_compute_ftrace_bts, ftrace_add_pt, btrace_compute_ftrace_pt,
9947 btrace_stitch_bts, btrace_fetch, btrace_clear, btrace_insn_number,
9948 btrace_insn_end, btrace_is_empty): Remove references to
9949 btrace_thread_info::begin and btrace_thread_info::end.
9950 * btrace.h (struct btrace_thread_info): Remove BEGIN and END.
9951 (struct btrace_thread_info) <functions>: Adjust comment.
9952 * record-btrace.c (record_btrace_start_replaying): Remove reference to
9953 btrace_thread_info::begin.
9954
9955 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
9956
9957 * btrace.c (ftrace_new_function, ftrace_new_call, ftrace_new_tailcall,
9958 ftrace_new_return, ftrace_new_switch, ftrace_new_gap,
9959 ftrace_update_function): Remove arguments that implicitly were always
9960 BTINFO->END.
9961 (btrace_compute_ftrace_bts, ftrace_add_pt, btrace_compute_ftrace_pt):
9962 Don't pass BTINFO->END.
9963
9964 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
9965
9966 * btrace.c: (btrace_insn_get, btrace_insn_get_error, btrace_insn_number,
9967 btrace_insn_begin, btrace_insn_end, btrace_insn_next, btrace_insn_prev,
9968 btrace_find_insn_by_number): Replace function segment pointer with
9969 index.
9970 (btrace_insn_cmp): Simplify.
9971 * btrace.h: (struct btrace_insn_iterator) Rename index to
9972 insn_index. Replace function segment pointer with index into function
9973 segment vector.
9974 * record-btrace.c (record_btrace_call_history): Replace function
9975 segment pointer use with index.
9976 (record_btrace_frame_sniffer): Retrieve function call segment through
9977 vector.
9978 (record_btrace_set_replay): Remove defunc't safety check.
9979
9980 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
9981
9982 * btrace.c (btrace_ends_with_single_insn): New function.
9983 (btrace_call_get, btrace_call_number, btrace_call_begin,
9984 btrace_call_end, btrace_call_next, btrace_call_prev,
9985 btrace_find_call_by_number): Use index into call segment vector
9986 instead of pointer.
9987 (btrace_call_cmp): Simplify.
9988 * btrace.h (struct btrace_call_iterator): Replace function call segment
9989 pointer with index into vector.
9990 * record-btrace.c (record_btrace_call_history): Use index instead of
9991 pointer.
9992
9993 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
9994
9995 * btrace.c (btrace_insn_begin, btrace_insn_end,
9996 btrace_find_insn_by_number): Add btinfo to iterator.
9997 * btrace.h (struct btrace_insn_iterator): Add btinfo.
9998
9999 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
10000
10001 * btrace.c (ftrace_new_function): Add btrace_thread_info to arguments
10002 and save pointers directly.
10003 (ftrace_new_call, ftrace_new_tailcall, ftrace_new_return,
10004 ftrace_new_switch, ftrace_new_gap, ftrace_update_function,
10005 ftrace_add_pt): Add btrace_thread_info to arguments. Adjust for
10006 changed signature of functions.
10007 (btrace_compute_ftrace_pt): Adjust for changed signature of functions.
10008 (btrace_fetch): Remove code that adds btrace_function pointers to
10009 vector of btrace_functions.
10010 (btrace_clear): Simplify freeing vector of btrace_functions.
10011
10012 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
10013
10014 * btrace.c (btrace_fetch, btrace_clear, btrace_find_insn_by_number):
10015 Replace VEC_* with std::vector functions.
10016 * btrace.h: Add include: vector. Remove typedef for DEF_VEC_P.
10017 (struct btrace_thread_info)<functions>: Change type to std::vector.
10018
10019 2017-05-30 Simon Marchi <simon.marchi@ericsson.com>
10020
10021 * NEWS (Changes in GDB 8.0): Remove extra empty line. Move
10022 "Removed targets and native configurations" up. Merge duplicate
10023 "New commands" sub-sections. Add "New options" sub-sections.
10024
10025 2017-05-26 Alan Hayward <alan.hayward@arm.com>
10026
10027 * defs.h (copy_integer_to_size): New declaration.
10028 * findvar.c (copy_integer_to_size): New function.
10029 (do_cint_test): New selftest function.
10030 (copy_integer_to_size_test): Likewise.
10031 (_initialize_findvar): Likewise.
10032 * mips-fbsd-tdep.c (mips_fbsd_supply_reg): Use raw_supply_integer.
10033 (mips_fbsd_collect_reg): Use raw_collect_integer.
10034 * mips-linux-tdep.c (supply_32bit_reg): Use raw_supply_integer.
10035 (mips64_fill_gregset): Use raw_collect_integer
10036 (mips64_fill_fpregset): Use raw_supply_integer.
10037 * regcache.c (regcache::raw_supply_integer): New function.
10038 (regcache::raw_collect_integer): Likewise.
10039 * regcache.h: (regcache::raw_supply_integer): New declaration.
10040 (regcache::raw_collect_integer): Likewise.
10041
10042 2017-05-24 Yao Qi <yao.qi@linaro.org>
10043
10044 * Makefile.in (SFILES): Add gdbarch-selftests.c.
10045 (COMMON_OBS): Add gdbarch-selftests.o.
10046 * frame.c [GDB_SELF_TESTS] (create_new_frame): New function.
10047 * frame.h [GDB_SELF_TESTS] (create_new_frame): Declare.
10048 * gdbarch-selftests.c: New file.
10049 * regcache.h (regcache) <~regcache>: Mark it virtual if
10050 GDB_SELF_TEST.
10051 <raw_write>: Likewise.
10052
10053 2017-05-24 Yao Qi <yao.qi@linaro.org>
10054
10055 * regcache.c (current_regcache): Change it to
10056 regcache::current_regcache.
10057 (regcache_observer_target_changed): Update.
10058 (regcache_thread_ptid_changed): Make it a regcache static
10059 method.
10060 (regcache_thread_ptid_changed): Update.
10061 (class regcache_access): New.
10062 (current_regcache_test): Update.
10063 (_initialize_regcache): Update.
10064 * regcache.h: Include forward_list.
10065 (regcache): Declare regcache_thread_ptid_changed and declare
10066 registers_changed_ptid as friend.
10067
10068 2017-05-24 Yao Qi <yao.qi@linaro.org>
10069
10070 * i387-tdep.c (i387_register_to_value): Use register_size
10071 instead of TYPE_LENGTH.
10072 * m68k-tdep.c (m68k_register_to_value): Likewise.
10073
10074 2017-05-24 Yao Qi <yao.qi@linaro.org>
10075
10076 * i387-tdep.c (i387_convert_register_p): Return false if type
10077 code isn't TYPE_CODE_FLT.
10078
10079 2017-05-24 Yao Qi <yao.qi@linaro.org>
10080
10081 * alpha-tdep.c (alpha_convert_register_p): Return true if type
10082 length is 4.
10083 (alpha_register_to_value): Remove type length check.
10084 (alpha_value_to_register): Likewise.
10085
10086 2017-05-24 Yao Qi <yao.qi@linaro.org>
10087
10088 * ia64-tdep.c (ia64_convert_register_p): Check type's code is
10089 TYPE_CODE_FLT.
10090
10091 2017-05-24 Yao Qi <yao.qi@linaro.org>
10092
10093 * m68k-tdep.c (m68k_convert_register_p): Check type's code is
10094 TYPE_CODE_FLT or not.
10095
10096 2017-05-24 Yao Qi <yao.qi@linaro.org>
10097
10098 * alpha-tdep.c (alpha_gdbarch_init): Use XCNEW instead of XNEW.
10099 * avr-tdep.c (avr_gdbarch_init): Likewise.
10100 * bfin-tdep.c (bfin_gdbarch_init): Likewise.
10101 * cris-tdep.c (cris_gdbarch_init): Likewise.
10102 * ft32-tdep.c (ft32_gdbarch_init): Likewise.
10103 * lm32-tdep.c (lm32_gdbarch_init): Likewise.
10104 * m32r-tdep.c (m32r_gdbarch_init): Likewise.
10105 * m68hc11-tdep.c (m68hc11_gdbarch_init): Likewise.
10106 * mep-tdep.c (mep_gdbarch_init): Likewise.
10107 * microblaze-tdep.c (microblaze_gdbarch_init): Likewise.
10108 * mips-tdep.c (mips_gdbarch_init): Likewise.
10109 * mn10300-tdep.c (mn10300_gdbarch_init): Likewise.
10110 * moxie-tdep.c (moxie_gdbarch_init): Likewise.
10111 * msp430-tdep.c (msp430_gdbarch_init): Likewise.
10112 * sh64-tdep.c (sh64_gdbarch_init): Likewise.
10113 * v850-tdep.c (v850_gdbarch_init): Likewise.
10114
10115 2017-05-24 Yao Qi <yao.qi@linaro.org>
10116
10117 * selftest-arch.c (tests_with_arch): Call registers_changed
10118 and reinit_frame_cache.
10119 * selftest.c (run_self_tests): Likewise.
10120
10121 2017-05-24 Yao Qi <yao.qi@linaro.org>
10122
10123 * rs6000-tdep.c (gdb_print_insn_powerpc): Remove.
10124 (rs6000_gdbarch_init): Don't call set_gdbarch_print_insn.
10125
10126 2017-05-24 Yao Qi <yao.qi@linaro.org>
10127
10128 * rl78-tdep.c (rl78_gdbarch_init): Don't call
10129 set_gdbarch_print_insn.
10130
10131 2017-05-24 Yao Qi <yao.qi@linaro.org>
10132
10133 * h8300-tdep.c (h8300_gdbarch_init): Don't call
10134 set_gdbarch_print_insn.
10135
10136 2017-05-24 Yao Qi <yao.qi@linaro.org>
10137
10138 * alpha-tdep.c (alpha_gdbarch_init): Don't call
10139 set_gdbarch_print_insn.
10140 * arc-tdep.c (arc_gdbarch_init): Likewise.
10141 * arch-utils.c: include dis-asm.h.
10142 (default_print_insn): New function.
10143 * arch-utils.h (default_print_insn): Declare.
10144 * avr-tdep.c (avr_gdbarch_init): Don't call set_gdbarch_print_insn.
10145 * bfin-tdep.c (bfin_gdbarch_init): Likewise.
10146 * cris-tdep.c (cris_delayed_get_disassembler): Remove.
10147 (cris_gdbarch_init): Don't call set_gdbarch_print_insn.
10148 * frv-tdep.c (frv_gdbarch_init): Likewise.
10149 * ft32-tdep.c (ft32_gdbarch_init): Likewise.
10150 * gdbarch.sh (print_insn): Use default_print_insn.
10151 * gdbarch.c: Regenerated.
10152 * hppa-tdep.c (hppa_gdbarch_init): Likewise.
10153 * iq2000-tdep.c (iq2000_gdbarch_init): Likewise.
10154 * lm32-tdep.c (lm32_gdbarch_init): Likewise.
10155 * m32c-tdep.c (m32c_gdbarch_init): Likewise.
10156 * m32r-tdep.c (m32r_gdbarch_init): Likewise.
10157 * m68hc11-tdep.c (gdb_print_insn_m68hc11): Remove.
10158 (m68hc11_gdbarch_init): Don't call set_gdbarch_print_insn.
10159 * m68k-tdep.c (m68k_gdbarch_init): Likewise.
10160 * m88k-tdep.c (m88k_gdbarch_init): Likewise.
10161 * microblaze-tdep.c (microblaze_gdbarch_init): Likewise.
10162 * mn10300-tdep.c (mn10300_gdbarch_init): Likewise.
10163 * moxie-tdep.c (moxie_gdbarch_init): Likewise.
10164 * msp430-tdep.c (msp430_gdbarch_init): Likewise.
10165 * mt-tdep.c (mt_gdbarch_init): Likewise.
10166 * nds32-tdep.c (nds32_gdbarch_init): Likewise.
10167 * nios2-tdep.c (nios2_print_insn): Remove.
10168 (nios2_gdbarch_init): Don't call set_gdbarch_print_insn.
10169 * rx-tdep.c (rx_gdbarch_init): Likewise.
10170 * s390-linux-tdep.c (s390_gdbarch_init): Likewise.
10171 * score-tdep.c (score_print_insn): Remove.
10172 (score_gdbarch_init): Don't call set_gdbarch_print_insn.
10173 * sh-tdep.c (sh_gdbarch_init): Likewise.
10174 * sh64-tdep.c (sh64_gdbarch_init): Likewise.
10175 * sparc-tdep.c (sparc32_gdbarch_init): Likewise.
10176 * tic6x-tdep.c (tic6x_print_insn): Remove.
10177 (tic6x_gdbarch_init): Don't call set_gdbarch_print_insn.
10178 * tilegx-tdep.c (tilegx_gdbarch_init): Likewise.
10179 * v850-tdep.c (v850_gdbarch_init): Likewise.
10180 * vax-tdep.c (vax_gdbarch_init): Likewise.
10181 * xstormy16-tdep.c (xstormy16_gdbarch_init): Likewise.
10182 * xtensa-tdep.c (xtensa_gdbarch_init): Likewise.
10183
10184 2017-05-23 John Baldwin <jhb@FreeBSD.org>
10185
10186 * mips-fbsd-tdep.c (MIPS_PC_REGNUM): Remove.
10187 (MIPS_FP0_REGNUM): Remove.
10188 (MIPS_FSR_REGNUM): Remove.
10189 (mips_fbsd_supply_fpregs): Use mips_regnum.
10190 (mips_fbsd_supply_gregs): Likewise.
10191 (mips_fbsd_collect_fpregs): Likewise.
10192 (mips_fbsd_collect_gregs): Likewise.
10193
10194 2017-05-23 John Baldwin <jhb@FreeBSD.org>
10195
10196 * mips-fbsd-nat.c (getregs_supplies): Fix upper bound comparison.
10197 (getpfpregs_supplies): New function.
10198 (mips_fbsd_fetch_inferior_registers): Remove early exit and use
10199 getfpregs_supplies.
10200 (mips_fbsd_store_inferior_registers): Likewise.
10201
10202 2017-05-22 Pedro Alves <palves@redhat.com>
10203
10204 * MAINTAINERS (Host/Native): Add John Baldwin as FreeBSD
10205 maintainer.
10206
10207 2017-05-22 Alan Hayward <alan.hayward@arm.com>
10208
10209 * ppc-linux-nat.c (fetch_register): Use PPC_MAX_REGISTER_SIZE.
10210 (store_register): Likewise.
10211 * ppc-sysv-tdep.c (ppc_sysv_abi_push_dummy_call): Likewise.
10212 (get_decimal_float_return_value): Likewise.
10213 (do_ppc_sysv_return_value): Likewise.
10214 (ppc64_sysv_abi_push_integer): Likewise.
10215 (ppc64_sysv_abi_push_freg): Likewise.
10216 (ppc64_sysv_abi_return_value_base): Likewise.
10217 (ppc64_sysv_abi_return_value): Likewise.
10218 * rs6000-aix-tdep.c (rs6000_push_dummy_call): Likewise.
10219 * rs6000-lynx178-tdep.c (rs6000_lynx178_push_dummy_call): Likewise.
10220 * rs6000-nat.c: Likewise.
10221 * rs6000-tdep.c (rs6000_register_to_value): Likewise.
10222 (rs6000_value_to_register): Likewise.
10223 * ppc-tdep.h (PPC_MAX_REGISTER_SIZE): Add.
10224
10225 2017-05-21 Tom Tromey <tom@tromey.com>
10226
10227 PR rust/21466:
10228 * rust-lang.c (rust_print_type) <TYPE_CODE_ARRAY>: Print unsized
10229 arrays as "[T]", not "[T; ]".
10230
10231 2017-05-19 Tom Tromey <tom@tromey.com>
10232
10233 PR rust/21484:
10234 * rust-lang.c (exp_descriptor_rust): New function.
10235 (rust_language_defn): Use it.
10236 * p-lang.c (pascal_language_defn): Update.
10237 * opencl-lang.c (opencl_language_defn): Update.
10238 * objc-lang.c (objc_language_defn): Update.
10239 * m2-lang.c (m2_language_defn): Update.
10240 * language.h (struct language_defn)
10241 <la_watch_location_expression>: New member.
10242 * language.c (unknown_language_defn, auto_language_defn)
10243 (local_language_defn): Update.
10244 * go-lang.c (go_language_defn): Update.
10245 * f-lang.c (f_language_defn): Update.
10246 * d-lang.c (d_language_defn): Update.
10247 * c-lang.h (c_watch_location_expression): Declare.
10248 * c-lang.c (c_watch_location_expression): New function.
10249 (c_language_defn, cplus_language_defn, asm_language_defn)
10250 (minimal_language_defn): Use it.
10251 * breakpoint.c (watch_command_1): Call
10252 la_watch_location_expression.
10253 * ada-lang.c (ada_language_defn): Update.
10254
10255 2017-05-19 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
10256
10257 PR tui/21482
10258 * gdb_curses.h (NOMACROS): Define.
10259 (NCURSES_NOMACROS): Define.
10260
10261 2017-05-19 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
10262
10263 PR tui/21482
10264 * tui/tui-windata.c (tui_erase_data_content): Cast last mvwaddstr
10265 arg to char *.
10266 * tui/tui-wingeneral.c (box_win): Likewise.
10267 * tui/tui-winsource.c (tui_erase_source_content): Likewise.
10268 (tui_show_source_line): Likewise.
10269 (tui_show_exec_info_content): Likewise.
10270
10271 2017-05-19 Vladimir Mezentsev <vladimir.mezentsev@oracle.com>
10272
10273 * sparc-tdep.c (sparc_structure_return_p)
10274 (sparc_arg_on_registers_p): New functions.
10275 (sparc32_store_arguments): Use them.
10276 * sparc64-tdep.c (sparc64_16_byte_align_p)
10277 (sparc64_store_floating_fields, sparc64_extract_floating_fields):
10278 Handle TYPE_CODE_ARRAY.
10279
10280 2017-05-17 Yao Qi <yao.qi@linaro.org>
10281
10282 * cli/cli-decode.c (add_alias_cmd): New function.
10283 * command.h (add_alias_cmd): Declare.
10284 * infcmd.c (_initialize_infcmd): Don't call add_com_alias,
10285 instead call add_alias_cmd.
10286
10287 2017-05-17 Pedro Alves <palves@redhat.com>
10288
10289 * Makefile.in (nat_extra_makefile_frag): Rename to ...
10290 (nat_makefile_frag): ... this. All references updated.
10291 * configure.ac: Likewise.
10292 * configure.nat: Likewise. Enhance comments.
10293 * configure: Regenerate.
10294
10295 2017-05-15 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
10296
10297 * procfs.c (procfs_create_inferior): Change prototype to match
10298 definition.
10299
10300 2017-05-13 Eli Zaretskii <eliz@gnu.org>
10301
10302 * tui/tui.c (tui_enable): Cast "unknown" to 'char *' to avoid a
10303 C++ compiler warning.
10304
10305 2017-05-12 Tom Tromey <tom@tromey.com>
10306
10307 PR rust/21483:
10308 * rust-lang.c (rust_evaluate_subexp) <STRUCTOP_STRUCT>: Don't
10309 recurse, just call value_struct_elt directly.
10310
10311 2017-05-12 Tom Tromey <tom@tromey.com>
10312
10313 * rust-lang.c (rust_dump_subexp_body) <STRUCTOP_ANONYMOUS,
10314 OP_RUST_ARRAY>: Fix.
10315
10316 2017-05-12 Tom Tromey <tom@tromey.com>
10317
10318 * rust-lang.c (rust_print_subexp): Replace "return" with "break".
10319
10320 2017-05-09 Yao Qi <yao.qi@linaro.org>
10321
10322 * regcache.c: Include <forward_list>.
10323 (struct regcache_list): Remove.
10324 (current_regcache): Update.
10325 (get_thread_arch_aspace_regcache): Update for std::forward_list.
10326 (regcache_thread_ptid_changed): Likewise.
10327 (registers_changed_ptid): Likewise.
10328 (current_regcache_size): Likewise.
10329
10330 2017-05-09 Yao Qi <yao.qi@linaro.org>
10331
10332 * regcache.c [GDB_SELF_TEST]: Include selftest.h.
10333 (current_regcache_size): New function.
10334 (current_regcache_test): New function.
10335 (_initialize_regcache) [GDB_SELF_TEST]: Register the unit test.
10336
10337 2017-05-08 Alan Hayward <alan.hayward@arm.com>
10338
10339 * mips-tdep.c (mips_o32_return_value): Remove unused buffer.
10340 (print_gp_register_row): Use get_frame_register_value.
10341
10342 2017-05-08 Alan Hayward <alan.hayward@arm.com>
10343
10344 * mips-linux-tdep.c (mips_supply_gregset): Use raw_supply_zeroed.
10345 (mips_supply_fpregset): Likewise.
10346 (mips64_supply_gregset): Likewise.
10347
10348 2017-05-08 Alan Hayward <alan.hayward@arm.com>
10349
10350 * mn10300-linux-tdep.c (am33_supply_gregset_method): Use
10351 regcache->raw_supply_zeroed.
10352
10353 2017-05-06 Sergio Durigan Junior <sergiodj@redhat.com>
10354
10355 * configure.nat: Rearrange 'case' statements to match
10356 host before cpu.
10357
10358 2017-05-06 Sergio Durigan Junior <sergiodj@redhat.com>
10359
10360 * Makefile.in: Remove "@host_makefile_frag@". Add variables
10361 NAT_FILE, NATDEPFILES, NAT_CDEPS, LOADLIBES, MH_CFLAGS, XM_CLIBS,
10362 NAT_GENERATED_FILES, HAVE_NATIVE_GCORE_HOST. Add
10363 "@nat_extra_makefile_frag@".
10364 (Makefile): Remove dependency on "@frags@".
10365 ($(GNULIB_BUILDDIR)/Makefile): Likewise.
10366 (data-directory/Makefile): Likewise.
10367 * config/aarch64/linux.mh: Deleted; moved contents to
10368 "gdb/configure.nat".
10369 * config/alpha/alpha-linux.mh: Likewise.
10370 * config/alpha/nbsd.mh: Likewise.
10371 * config/arm/linux.mh: Likewise.
10372 * config/arm/nbsdelf.mh: Likewise.
10373 * config/i386/cygwin.mh: Likewise.
10374 * config/i386/cygwin64.mh: Likewise.
10375 * config/i386/darwin.mh: Likewise.
10376 * config/i386/fbsd.mh: Likewise.
10377 * config/i386/fbsd64.mh: Likewise.
10378 * config/i386/go32.mh: Likewise.
10379 * config/i386/i386gnu.mh: Likewise.
10380 * config/i386/i386sol2.mh: Likewise.
10381 * config/i386/linux.mh: Likewise.
10382 * config/i386/linux64.mh: Likewise.
10383 * config/i386/mingw.mh: Likewise.
10384 * config/i386/mingw64.mh: Likewise.
10385 * config/i386/nbsd64.mh: Likewise.
10386 * config/i386/nbsdelf.mh: Likewise.
10387 * config/i386/nto.mh: Likewise.
10388 * config/i386/obsd.mh: Likewise.
10389 * config/i386/obsd64.mh: Likewise.
10390 * config/i386/sol2-64.mh: Likewise.
10391 * config/ia64/linux.mh: Likewise.
10392 * config/m32r/linux.mh: Likewise.
10393 * config/m68k/linux.mh: Likewise.
10394 * config/m68k/nbsdelf.mh: Likewise.
10395 * config/m68k/obsd.mh: Likewise.
10396 * config/m88k/obsd.mh: Likewise.
10397 * config/mips/fbsd.mh: Likewise.
10398 * config/mips/linux.mh: Likewise.
10399 * config/mips/nbsd.mh: Likewise.
10400 * config/mips/obsd64.mh: Likewise.
10401 * config/pa/linux.mh: Likewise.
10402 * config/pa/nbsd.mh: Likewise.
10403 * config/pa/obsd.mh: Likewise.
10404 * config/powerpc/aix.mh: Likewise.
10405 * config/powerpc/fbsd.mh: Likewise.
10406 * config/powerpc/linux.mh: Likewise.
10407 * config/powerpc/nbsd.mh: Likewise.
10408 * config/powerpc/obsd.mh: Likewise.
10409 * config/powerpc/ppc64-linux.mh: Likewise.
10410 * config/powerpc/spu-linux.mh: Likewise.
10411 * config/s390/linux.mh: Likewise.
10412 * config/sh/nbsd.mh: Likewise.
10413 * config/sparc/fbsd.mh: Likewise.
10414 * config/sparc/linux.mh: Likewise.
10415 * config/sparc/linux64.mh: Likewise.
10416 * config/sparc/nbsd64.mh: Likewise.
10417 * config/sparc/nbsdelf.mh: Likewise.
10418 * config/sparc/obsd64.mh: Likewise.
10419 * config/sparc/sol2.mh: Likewise.
10420 * config/tilegx/linux.mh: Likewise.
10421 * config/vax/nbsdelf.mh: Likewise.
10422 * config/vax/obsd.mh: Likewise.
10423 * config/xtensa/linux.mh: Likewise.
10424 * config/i386/i386gnu.mn: New file, with excerpts from
10425 "config/i386/i386gnu.mh".
10426 * configure: Regenerate.
10427 * configure.ac: Rewrite code to use "gdb/configure.nat" instead of
10428 *.mh files under "gdb/config".
10429 * configure.nat: New file, with contents from the
10430 "gdb/config/*/*.mh" files.
10431
10432 2017-05-05 Tim Wiederhake <tim.wiederhake@intel.com>
10433
10434 * btrace.c (btrace_clear): Free insn vector.
10435
10436 2017-05-05 Pedro Alves <palves@redhat.com>
10437
10438 * warning.m4 (build_warnings): Add -Wno-error=maybe-uninitialized.
10439 * configure: Regenerate.
10440
10441 2017-05-04 Pedro Alves <palves@redhat.com>
10442
10443 * Makefile.in (SFILES): Add progspace-and-thread.c.
10444 (HFILES_NO_SRCDIR): Add progspace-and-thread.h.
10445 (COMMON_OBS): Add progspace-and-thread.o.
10446 * breakpoint.c: Include "progspace-and-thread.h".
10447 (update_inserted_breakpoint_locations)
10448 (insert_breakpoint_locations, create_longjmp_master_breakpoint):
10449 Use scoped_restore_current_pspace_and_thread.
10450 (create_std_terminate_master_breakpoint): Use
10451 scoped_restore_current_program_space.
10452 (remove_breakpoint): Use scoped_restore_current_pspace_and_thread.
10453 (print_breakpoint_location): Use
10454 scoped_restore_current_program_space.
10455 (bp_loc_is_permanent): Use
10456 scoped_restore_current_pspace_and_thread.
10457 (resolve_sal_pc): Use scoped_restore_current_pspace_and_thread.
10458 (download_tracepoint_locations): Use
10459 scoped_restore_current_pspace_and_thread.
10460 (breakpoint_re_set): Use scoped_restore_current_pspace_and_thread.
10461 * exec.c (exec_close_1): Use scoped_restore_current_program_space.
10462 (enum step_over_calls_kind): Moved from inferior.h.
10463 (class scoped_restore_current_thread): New class.
10464 * gdbthread.h (make_cleanup_restore_current_thread): Delete
10465 declaration.
10466 (scoped_restore_current_thread): New class.
10467 * infcmd.c: Include "common/gdb_optional.h".
10468 (continue_1, proceed_after_attach): Use
10469 scoped_restore_current_thread.
10470 (notice_new_inferior): Use scoped_restore_current_thread.
10471 * inferior.c: Include "progspace-and-thread.h".
10472 (restore_inferior, save_current_inferior): Delete.
10473 (add_inferior_command, clone_inferior_command): Use
10474 scoped_restore_current_pspace_and_thread.
10475 * inferior.h (scoped_restore_current_inferior): New class.
10476 * infrun.c: Include "progspace-and-thread.h" and
10477 "common/gdb_optional.h".
10478 (follow_fork_inferior): Use
10479 scoped_restore_current_pspace_and_thread.
10480 (scoped_restore_exited_inferior): New class.
10481 (handle_vfork_child_exec_or_exit): Use
10482 scoped_restore_exited_inferior,
10483 scoped_restore_current_pspace_and_thread,
10484 scoped_restore_current_thread and scoped_restore.
10485 (fetch_inferior_event): Use scoped_restore_current_thread.
10486 * linespec.c (decode_line_full, decode_line_1): Use
10487 scoped_restore_current_program_space.
10488 * mi/mi-main.c: Include "progspace-and-thread.h".
10489 (exec_continue): Use scoped_restore_current_thread.
10490 (mi_cmd_exec_run): Use scoped_restore_current_pspace_and_thread.
10491 (mi_cmd_trace_frame_collected): Use scoped_restore_current_thread.
10492 * proc-service.c (ps_pglobal_lookup): Use
10493 scoped_restore_current_program_space.
10494 * progspace-and-thread.c: New file.
10495 * progspace-and-thread.h: New file.
10496 * progspace.c (release_program_space, clone_program_space): Use
10497 scoped_restore_current_program_space.
10498 (restore_program_space, save_current_program_space)
10499 (save_current_space_and_thread): Delete.
10500 (switch_to_program_space_and_thread): Moved to
10501 progspace-and-thread.c.
10502 * progspace.h (save_current_program_space)
10503 (save_current_space_and_thread): Delete declarations.
10504 (scoped_restore_current_program_space): New class.
10505 * remote.c (remote_btrace_maybe_reopen): Use
10506 scoped_restore_current_thread.
10507 * symtab.c: Include "progspace-and-thread.h".
10508 (skip_prologue_sal): Use scoped_restore_current_pspace_and_thread.
10509 * thread.c (print_thread_info_1): Use
10510 scoped_restore_current_thread.
10511 (struct current_thread_cleanup): Delete.
10512 (do_restore_current_thread_cleanup)
10513 (restore_current_thread_cleanup_dtor): Rename/convert both to ...
10514 (scoped_restore_current_thread::~scoped_restore_current_thread):
10515 ... this new dtor.
10516 (make_cleanup_restore_current_thread): Rename/convert to ...
10517 (scoped_restore_current_thread::scoped_restore_current_thread):
10518 ... this new ctor.
10519 (thread_apply_all_command): Use scoped_restore_current_thread.
10520 (thread_apply_command): Use scoped_restore_current_thread.
10521 * tracepoint.c (tdump_command): Use scoped_restore_current_thread.
10522 * varobj.c (value_of_root_1): Use scoped_restore_current_thread.
10523
10524 2017-05-04 Pedro Alves <palves@redhat.com>
10525
10526 * thread.c (make_cleanup_restore_current_thread): Move
10527 find_thread_ptid call before the is_stopped call. Assert that the
10528 thread is found. Replace is_stopped call by checking the thread's
10529 state directly. Remove unnecessary NULL-thread check.
10530
10531 2017-05-04 Pedro Alves <palves@redhat.com>
10532
10533 * corelow.c (thread_section_name): New class.
10534 (get_core_register_section, get_core_siginfo): Use it.
10535
10536 2017-05-04 Andreas Arnez <arnez@linux.vnet.ibm.com>
10537
10538 * corelow.c (sniff_core_bfd): Remove extra semicolon.
10539 (get_core_register_section): Remove xfree of NULL pointer.
10540
10541 2017-05-03 Alan Hayward <alan.hayward@arm.com>
10542
10543 * frv-linux-tdep.c (frv_linux_supply_gregset): Use raw_supply_zeroed.
10544 * regcache.c (regcache::raw_supply_zeroed): New function.
10545 * regcache.h (regcache::raw_supply_zeroed): New declaration.
10546
10547 2017-05-03 Simon Marchi <simon.marchi@ericsson.com>
10548
10549 * gdbarch.sh: Remove commented out definition of
10550 TARGET_CHAR_BIT.
10551 * gdbarch.h: Re-generate.
10552
10553 2017-05-03 Sergio Durigan Junior <sergiodj@redhat.com>
10554
10555 * configure: Regenerate.
10556
10557 2017-05-02 Simon Marchi <simon.marchi@ericsson.com>
10558
10559 * solib-target.c (solib_target_relocate_section_addresses):
10560 Remove num_section_bases, num_bases, segment_bases variables.
10561
10562 2017-05-02 Simon Marchi <simon.marchi@polymtl.ca>
10563
10564 * common/gdb_vecs.h (DEF_VEC_I (CORE_ADDR)): Remove.
10565
10566 2017-05-02 Simon Marchi <simon.marchi@polymtl.ca>
10567
10568 * solib-target.c: Include <vector>
10569 (struct lm_info_target) <~lm_info_target>: Remove.
10570 <segment_bases, section_bases>: Change type to
10571 std::vector<CORE_ADDR>.
10572 (library_list_start_segment, library_list_start_section,
10573 library_list_end_library,
10574 solib_target_relocate_section_addresses): Adjust.
10575
10576 2017-05-02 Simon Marchi <simon.marchi@polymtl.ca>
10577
10578 * gdbarch.sh (software_single_step): Change return type to
10579 std::vector<CORE_ADDR>.
10580 * gdbarch.c, gdbarch.h: Re-generate.
10581 * arch/arm-get-next-pcs.c (thumb_deal_with_atomic_sequence_raw):
10582 Adjust.
10583 (arm_deal_with_atomic_sequence_raw): Adjust.
10584 (thumb_get_next_pcs_raw): Adjust.
10585 (arm_get_next_pcs_raw): Adjust.
10586 (arm_get_next_pcs): Adjust.
10587 * arch/arm-get-next-pcs.h (arm_get_next_pcs): Adjust.
10588 * aarch64-tdep.c (aarch64_software_single_step): Adjust.
10589 * alpha-tdep.c (alpha_deal_with_atomic_sequence): Adjust.
10590 (alpha_software_single_step): Adjust.
10591 * alpha-tdep.h (alpha_software_single_step): Adjust.
10592 * arm-linux-tdep.c (arm_linux_software_single_step): Adjust.
10593 * arm-tdep.c (arm_software_single_step): Adjust.
10594 (arm_breakpoint_kind_from_current_state): Adjust.
10595 * arm-tdep.h (arm_software_single_step): Adjust.
10596 * breakpoint.c (insert_single_step_breakpoint): Adjust.
10597 * cris-tdep.c (cris_software_single_step): Adjust.
10598 * mips-tdep.c (mips_deal_with_atomic_sequence): Adjust.
10599 (micromips_deal_with_atomic_sequence): Adjust.
10600 (deal_with_atomic_sequence): Adjust.
10601 (mips_software_single_step): Adjust.
10602 * mips-tdep.h (mips_software_single_step): Adjust.
10603 * moxie-tdep.c (moxie_software_single_step): Adjust.
10604 * nios2-tdep.c (nios2_software_single_step): Adjust.
10605 * ppc-tdep.h (ppc_deal_with_atomic_sequence): Adjust.
10606 * rs6000-aix-tdep.c (rs6000_software_single_step): Adjust.
10607 * rs6000-tdep.c (ppc_deal_with_atomic_sequence): Adjust.
10608 * s390-linux-tdep.c (s390_software_single_step): Adjust.
10609 * sparc-tdep.c (sparc_software_single_step): Adjust.
10610 * spu-tdep.c (spu_software_single_step): Adjust.
10611 * tic6x-tdep.c (tic6x_software_single_step): Adjust.
10612
10613 2017-05-02 Simon Marchi <simon.marchi@polymtl.ca>
10614
10615 * gdbarch.sh: Use semi-colon as field separator instead of colon.
10616 * gdbarch.h: Re-generate.
10617
10618 2017-05-01 Tim Wiederhake <tim.wiederhake@intel.com>
10619
10620 * Makefile.in (SUBDIR_PYTHON_OBS): Add py-instruction.o.
10621 (SUBDIR_PYTHON_SRCS): Add py-instruction.c.
10622 * python/py-instruction.c, python/py-instruction.h: New file.
10623 * python/py-record.c: Add py-instruction.h include.
10624 (gdbpy_initialize_record): Make gdb.Instruction a super class of
10625 gdb.RecordInstruction.
10626 * python/python-internal.h: Add gdbpy_initialize_instruction
10627 declaration.
10628 * python/python.c (do_start_initialization): Add
10629 gdbpy_initialize_instruction.
10630
10631 2017-05-01 Tim Wiederhake <tim.wiederhake@intel.com>
10632
10633 * python/py-record-btrace.c (BTPY_REQUIRE_VALID_CALL, btpy_call_type):
10634 Remove.
10635 (btrace_func_from_recpy_func): New function.
10636 (btpy_call_new, btpy_number, btpy_hash, btpy_richcompare): Remove.
10637 (btpy_call_level, btpy_call_symbol, btpy_call_instructions,
10638 btpy_call_up, btpy_call_prev_sibling, btpy_call_next_sibling): Rename to ...
10639 (recpy_bt_func_level, recpy_bt_func_symbol, recpy_bt_func_instructions,
10640 recpy_bt_func_up, recpy_bt_func_prev, recpy_bt_func_next): This.
10641 Also, use new helper functions.
10642 (btpy_list_item): Use new helper functions.
10643 (recpy_bt_function_call_history): Use new type name.
10644 (btpy_call_getset): Remove.
10645 (gdbpy_initialize_btrace): Remove code to initialize
10646 gdb.BtraceFunctionCall.
10647 * python/py-record-btrace.h (recpy_bt_func_number, recpy_btb_func_level,
10648 recpy_btb_func_symbol, recpy_bt_func_instructions, recpy_bt_func_up,
10649 recpy_bt_func_prev, recpy_bt_func_next): New export.
10650 * python/py-record.c (recpy_func_type): New static object.
10651 (recpy_func_new, recpy_func_level, recpy_func_symbol,
10652 recpy_func_instructions, recpy_func_up, recpy_func_prev,
10653 recpy_func_next): New function.
10654 (recpy_element_hash, recpy_element_richcompare): Updated comment.
10655 (recpy_func_getset): New static object.
10656 (gdbpy_initialize_record): Add code to initialize gdb.RecordInstruction.
10657 * python/py-record.h (recpy_func_type, recpy_func_new): New export.
10658
10659 2017-05-01 Tim Wiederhake <tim.wiederhake@intel.com>
10660
10661 * python/py-record-btrace.c (BTPY_REQUIRE_VALID_INSN): Remove.
10662 (btpy_object, btpy_insn_type, btpy_new): Remove.
10663 (btpy_list_object): Use gdb.RecordInstruction type instead of
10664 gdb.BtraceInstruction type.
10665 (btrace_insn_from_recpy_insn): New function.
10666 (btpy_insn_or_gap_new): Adjust comment. Use recpy_insn_new instead of
10667 btpy_new.
10668 (btpy_call_new, btpy_list_item): Do not use btpy_new anymore.
10669 (btpy_number, btpy_hash, btpy_call_level, btpy_call_symbol,
10670 btpy_call_instructions, btpy_call_up, btpy_call_prev_sibling,
10671 btpy_call_next_sibling, btpy_richcompare): Use recpy_element_object
10672 instead of btpy_object.
10673 (btpy_insn_sal, btpy_insn_pc, btpy_insn_size, btpy_insn_is_speculative,
10674 btpy_insn_data, btpy_insn_decode): Rename to ...
10675 (recpy_bt_insn_sal, recpy_bt_insn_pc, recpy_bt_insn_size,
10676 recpy_bt_insn_is_speculative, recpy_bt_insn_data,
10677 recpy_bt_insn_decode): This. Also, use new helper functions.
10678 (btpy_list_position, recpy_bt_goto): Use recpy_element_object and
10679 recpy_insn_type.
10680 (btpy_insn_getset): Remove.
10681 (gdbpy_initialize_btrace): Remove code to initialize
10682 gdb.BtraceInstruction. Use recpy_element_object.
10683 * python/py-record-btrace.h (recpy_bt_insn_number, recpy_bt_insn_sal,
10684 recpy_bt_insn_pc, recpy_bt_insn_data, recpy_bt_insn_decoded,
10685 recpy_bt_insn_size, recpy_bt_insn_is_speculative): New export.
10686 * python/py-record.c (recpy_insn_type): New static object.
10687 (recpy_insn_new, recpy_insn_sal, recpy_insn_pc, recpy_insn_data,
10688 recpy_insn_decoded, recpy_insn_size, recpy_insn_is_speculative,
10689 recpy_element_number, recpy_element_hash, recpy_element_richcompare):
10690 New function.
10691 (recpy_insn_getset): New static object.
10692 (gdbpy_initialize_record): Initialize gdb.RecordInstruction.
10693 * python/py-record.h (recpy_element_object): New typedef.
10694 (recpy_insn_type, recpy_insn_new): New export.
10695
10696 2017-05-01 Tim Wiederhake <tim.wiederhake@intel.com>
10697
10698 * py-record-btrace.c (btpy_insn_new): Removed.
10699 (btpy_insn_or_gap_new): New function.
10700 (btpy_insn_error): Removed.
10701 (btpy_insn_sal, btpy_insn_pc, btpy_insn_size, btpy_insn_is_speculative,
10702 btpy_insn_data, btpy_insn_decode): Remove code path for gaps.
10703 (recpy_bt_replay_position, recpy_bt_begin, recpy_bt_end): Call
10704 btpy_insn_or_gap_new instead of btpy_insn_new.
10705 (btpy_insn_getset): Remove btpy_insn_error.
10706 * py-record.c (recpy_gap_type): New static object.
10707 (recpy_gap_object): New typedef.
10708 (recpy_gap_new, recpy_gap_number, recpy_gap_reason_code,
10709 recpy_gap_reason_string): New function.
10710 (recpy_gap_getset): New static object.
10711 (gdbpy_initialize_record): Initialize gdb.RecordGap type.
10712 * py-record.h (recpy_gap_new): New export.
10713
10714 2017-05-01 Tim Wiederhake <tim.wiederhake@intel.com>
10715
10716 * python/py-record.c (recpy_ptid): Remove.
10717 (recpy_record_getset): Remove recpy_ptid.
10718
10719 2017-05-01 Tim Wiederhake <tim.wiederhake@intel.com>
10720
10721 * btrace.c (btrace_fetch): Set inferior_ptid.
10722 * python/py-record-btrace.c: Add "py-record.h" include.
10723 (recpy_bt_format, recpy_bt_replay_position, recpy_bt_begin,
10724 recpy_bt_end, recpy_bt_instruction_history,
10725 recpy_bt_function_call_history, recpy_bt_goto): Use ptid stored
10726 in gdb.Record object instead of current ptid.
10727 * python/py-record.c: Include new "py-record.h" file.
10728 (recpy_record_object): Moved to py-record.h.
10729 * python/py-record.h: New file.
10730
10731 2017-05-01 Tim Wiederhake <tim.wiederhake@intel.com>
10732
10733 * python/py-record-btrace.c (BTPY_REQUIRE_VALID_INSN,
10734 BTPY_REQUIRE_VALID_CALL, recpy_bt_function_call_history): Fix
10735 indentation.
10736
10737 2017-05-01 Joel Brobecker <brobecker@adacore.com>
10738
10739 * MAINTAINERS: Move Daniel Jacobowitz and Mark Kettenis to
10740 the past maintainers section.
10741
10742 2017-04-28 Yao Qi <yao.qi@linaro.org>
10743
10744 * infcmd.c (get_return_value): Use regcache ctor, and remove
10745 cleanup.
10746
10747 2017-04-28 Yao Qi <yao.qi@linaro.org>
10748 Pedro Alves <palves@redhat.com>
10749
10750 * regcache.c (regcache::regcache): New tag dispatch ctor.
10751 (do_cooked_read): Moved above.
10752 (regcache_dup): Use the tag dispatch ctor..
10753 * regcache.h (regcache): Declare ctor, delete copy ctor and
10754 assignment operator, remove friend regcache_dup.
10755
10756 2017-04-28 Yao Qi <yao.qi@linaro.org>
10757
10758 * regcache.c (regcache_dup): Assert !src->m_readonly_p and
10759 call method save instead of regcache_cpy.
10760 * regcache.h (struct regcache): Make regcache_dup a friend.
10761
10762 2017-04-28 Yao Qi <yao.qi@linaro.org>
10763
10764 * regcache.c (struct regcache): Move to regcache.h
10765 (regcache::arch): New method.
10766 (regcache_get_ptid): Update.
10767 (get_regcache_arch): Call arch method.
10768 (get_regcache_aspace): Call method aspace.
10769 (register_buffer): Change it to method.
10770 (regcache_save): Change it to regcache::save.
10771 (regcache_restore): Likewise.
10772 (regcache_cpy_no_passthrough): Remove the declaration.
10773 (regcache_cpy): Call methods restore and cpy_no_passthrough.
10774 (regcache_cpy_no_passthrough): Change it to method
10775 cpy_no_passthrough.
10776 (regcache_register_status): Change it to method
10777 get_register_status.
10778 (regcache_invalidate): Change it to method invalidate.
10779 (regcache_thread_ptid_changed): Use methods ptid and set_ptid.
10780 (regcache_raw_update): Change it to method raw_update.
10781 (regcache_raw_read): Likewise.
10782 (regcache_raw_read_signed): Likewise.
10783 (regcache_raw_read_unsigned): Likewise.
10784 (regcache_raw_write_signed): Likewise.
10785 (regcache_raw_write_unsigned): Likewise.
10786 (regcache_cooked_read): Likewise.
10787 (regcache_cooked_read_value): Likewise.
10788 (regcache_cooked_read_signed): Likewise.
10789 (regcache_cooked_read_unsigned): Likewise.
10790 (regcache_cooked_write_signed): Likewise.
10791 (regcache_cooked_write_unsigned): Likewise.
10792 (regcache_raw_set_cached_value): Likewise.
10793 (regcache_raw_write): Likewise.
10794 (regcache_cooked_write): Likewise.
10795 (regcache_xfer_part): Likewise.
10796 (regcache_raw_read_part): Likewise.
10797 (regcache_raw_write_part): Likewise.
10798 (regcache_cooked_read_part): Likewise.
10799 (regcache_cooked_write_part): Likewise.
10800 (regcache_raw_supply): Likewise.
10801 (regcache_raw_collect): Likewise.
10802 (regcache_transfer_regset): Likewise.
10803 (regcache_supply_regset): Likewise.
10804 (regcache_collect_regset): Likewise.
10805 (regcache_debug_print_register): Likewise.
10806 (enum regcache_dump_what): Move it to regcache.h.
10807 (regcache_dump): Change it to method dump.
10808 * regcache.h (enum regcache_dump_what): New.
10809 (class regcache): New.
10810 * target.c (target_fetch_registers): Call method
10811 debug_print_register.
10812 (target_store_registers): Likewise.
10813
10814 2017-04-28 Simon Marchi <simon.marchi@ericsson.com>
10815
10816 * windows-nat.c (struct lm_info_windows): Initialize field.
10817 (windows_make_so): Allocate lm_info_windows with new.
10818 (windows_free_so): Free lm_info_windows with delete.
10819
10820 2017-04-28 Simon Marchi <simon.marchi@ericsson.com>
10821
10822 * solib-darwin.c (struct lm_info_darwin): Initialize field.
10823 (darwin_current_sos): Allocate lm_info_darwin with new, remove
10824 cleanup.
10825 (darwin_free_so): Free lm_info_darwin with delete.
10826
10827 2017-04-28 Simon Marchi <simon.marchi@ericsson.com>
10828
10829 * solib-svr4.h (struct lm_info_svr4): Initialize fields.
10830 <l_addr_p>: Change type to bool.
10831 * solib-svr4.c (lm_info_read): Allocate lm_info_svr4 with new.
10832 (svr4_free_so): Free lm_info_svr4 with delete.
10833 (svr4_copy_library_list): Replace memcpy with call to copy
10834 constructor.
10835 (library_list_start_library, svr4_default_sos): Allocate
10836 lm_info_svr4 with new.
10837
10838 2017-04-28 Simon Marchi <simon.marchi@ericsson.com>
10839
10840 * solib-target.c (struct lm_info_target): Add destructor,
10841 initialize fields.
10842 <name>: Change type to std::string.
10843 (library_list_start_library): Allocate lm_info_target with new.
10844 (solib_target_free_library_list): Free lm_info_target with
10845 delete.
10846 (solib_target_current_sos): Adapt to std::string.
10847 (solib_target_free_so): Free lm_info_target with delete.
10848
10849 2017-04-28 Simon Marchi <simon.marchi@ericsson.com>
10850
10851 * solib-frv.c (struct lm_info_frv): Add destructor, initialize
10852 fields.
10853 (frv_current_sos): Allocate lm_info_frv with new.
10854 (frv_relocate_main_executable): Free lm_info_frv with delete,
10855 allocate with new.
10856 (frv_clear_solib, frv_free_so): Free lm_info_frv with delete.
10857
10858 2017-04-28 Simon Marchi <simon.marchi@ericsson.com>
10859
10860 * solib-frv.c (struct lm_info_frv): Fix indentation.
10861
10862 2017-04-28 Simon Marchi <simon.marchi@ericsson.com>
10863
10864 * solib-dsbt.c (struct lm_info_dsbt): Add destructor, initialize
10865 map field.
10866 (dsbt_current_sos): Allocate lm_info_dsbt with new.
10867 (dsbt_relocate_main_executable): Free lm_info_dsbt with delete
10868 and allocate with new.
10869 (dsbt_clear_solib, dsbt_free_so): Free lm_info_dsbt with delete.
10870
10871 2017-04-28 Simon Marchi <simon.marchi@ericsson.com>
10872
10873 * solib-aix.c (struct lm_info_aix): Initialize fields in-class.
10874 <filename, member_name>: Change type to std::string.
10875 (solib_aix_new_lm_info, solib_aix_xfree_lm_info): Remove.
10876 (library_list_start_library): Allocate lm_info_aix with new.
10877 (solib_aix_free_library_list, solib_aix_free_so): Free with delete.
10878 (solib_aix_current_sos): Adapt to std::string, copy lm_info_aix
10879 with copy constructor.
10880
10881 2017-04-28 Simon Marchi <simon.marchi@ericsson.com>
10882
10883 * solist.h (struct lm_info): Remove.
10884 (struct lm_info_base): New class.
10885 (struct so_list) <lm_info>: Change type to lm_info_base *.
10886 * nto-tdep.c (struct lm_info): Remove.
10887 (lm_addr): Adjust.
10888 * solib-aix.c (struct lm_info): Rename to ...
10889 (struct lm_info_aix): ... this. Extend lm_info_base.
10890 (lm_info_p): Rename to ...
10891 (lm_info_aix_p): ... this, and adjust.
10892 (solib_aix_new_lm_info, solib_aix_xfree_lm_info,
10893 solib_aix_parse_libraries, library_list_start_library,
10894 solib_aix_free_library_list, solib_aix_parse_libraries,
10895 solib_aix_get_library_list,
10896 solib_aix_relocate_section_addresses, solib_aix_free_so,
10897 solib_aix_get_section_offsets,
10898 solib_aix_solib_create_inferior_hook, solib_aix_current_sos):
10899 Adjust.
10900 (struct solib_aix_inferior_data) <library_list>: Adjust.
10901 * solib-darwin.c (struct lm_info): Rename to ...
10902 (struct lm_info_darwin): ... this. Extend lm_info_base.
10903 (darwin_current_sos, darwin_relocate_section_addresses): Adjust.
10904 * solib-dsbt.c (struct lm_info): Rename to ...
10905 (struct lm_info_dsbt): ... this. Extend lm_info_base.
10906 (struct dsbt_info) <main_executable_lm_info): Adjust.
10907 (dsbt_current_sos, dsbt_relocate_main_executable, dsbt_free_so,
10908 dsbt_relocate_section_addresses): Adjust.
10909 * solib-frv.c (struct lm_info): Rename to ...
10910 (struct lm_info_frv): ... this. Extend lm_info_base.
10911 (main_executable_lm_info): Adjust.
10912 (frv_current_sos, frv_relocate_main_executable, frv_free_so,
10913 frv_relocate_section_addresses, frv_fdpic_find_global_pointer,
10914 find_canonical_descriptor_in_load_object,
10915 frv_fdpic_find_canonical_descriptor): Adjust.
10916 * solib-svr4.c (struct lm_info): Move to solib-svr4.h, renamed
10917 to lm_info_svr4.
10918 (lm_info_read, lm_addr_check, svr4_keep_data_in_core,
10919 svr4_clear_so, svr4_copy_library_list,
10920 library_list_start_library, svr4_default_sos, svr4_read_so_list,
10921 svr4_current_sos, svr4_fetch_objfile_link_map,
10922 solist_update_incremental): Adjust.
10923 * solib-svr4.h (struct lm_info_svr4): Move here from
10924 solib-svr4.c.
10925 * solib-target.c (struct lm_info): Rename to ...
10926 (struct lm_info_target): ... this. Extend lm_info_base.
10927 (lm_info_p): Rename to ...
10928 (lm_info_target_p): ... this.
10929 (solib_target_parse_libraries, library_list_start_segment,
10930 library_list_start_section, library_list_start_library,
10931 library_list_end_library, solib_target_free_library_list,
10932 solib_target_current_sos, solib_target_free_so,
10933 solib_target_relocate_section_addresses): Adjust.
10934 * windows-nat.c (struct lm_info): Rename to ...
10935 (struct lm_info_windows): ... this. Extend lm_info_base.
10936 (windows_make_so, handle_load_dll, handle_unload_dll,
10937 windows_xfer_shared_libraries): Adjust.
10938
10939 2017-04-28 Simon Marchi <simon.marchi@ericsson.com>
10940
10941 * solib-darwin.c (struct darwin_so_list): Remove.
10942 (darwin_current_sos): Allocate an so_list object instead of a
10943 darwin_so_list, separately allocate an lm_info object.
10944 (darwin_free_so): Free lm_info.
10945
10946 2017-04-28 John Baldwin <jhb@FreeBSD.org>
10947
10948 * mips-tdep.c (print_gp_register_row): Replace printf_filtered
10949 with fprintf_filtered.
10950
10951 2017-04-28 Yao Qi <yao.qi@linaro.org>
10952
10953 * regcache.c (regcache::regcache): New function.
10954 (regcache::~regcache): New function.
10955 (regcache_xmalloc_1): Remove.
10956 (regcache_xmalloc): Call new regcache.
10957 (regcache_xfree): Call delete regcache.
10958 (get_thread_arch_aspace_regcache): Call new regcache.
10959
10960 2017-04-28 Yao Qi <yao.qi@linaro.org>
10961
10962 * mips-linux-nat.c (mips_linux_new_thread): Use ptid method
10963 lwp instead of ptid_get_lwp.
10964
10965 2017-04-28 Yao Qi <yao.qi@linaro.org>
10966
10967 * mips-linux-nat.c (mips_linux_new_thread): Get lwpid from
10968 lwp_info instead of getting from inferior_ptid.
10969
10970 2017-04-27 Keith Seitz <keiths@redhat.com>
10971
10972 * gdbtypes.c (LVALUE_REFERENCE_TO_RVALUE_BINDING_BADNESS)
10973 DIFFERENT_REFERENCE_TYPE_BADNESS): Remove.
10974 (CV_CONVERSION_BADNESS): Define.
10975 (rank_one_type): Remove overly restrictive rvalue reference
10976 rank checks.
10977 Add cv-qualifier checks and subranks for type equality.
10978 * gdbtypes.h (REFERENCE_CONVERSION_RVALUE,
10979 REFERENCE_CONVERSION_CONST_LVALUE, CV_CONVERSION_BADNESS,
10980 CV_CONVERSION_CONST, CV_CONVERSION_VOLATILE): Declare.
10981
10982 2017-04-27 Simon Marchi <simon.marchi@ericsson.com>
10983
10984 * python/py-inferior.c (inferior_to_inferior_object): Increment reference
10985 count when creating the object.
10986
10987 2017-04-27 Sangamesh Mallayya <sangamesh.swamy@in.ibm.com>
10988 Ulrich Weigand <uweigand@de.ibm.com>
10989
10990 * xcoffread.c (read_xcoff_symtab): Read correct function auxiliary
10991 entry if xlc -qfuncsect or gcc -ffunction-sections compiler option
10992 is used in AIX.
10993 (read_xcoff_symtab): Handle C_WEAKEXT storage class.
10994 (process_xcoff_symbol): Likewise.
10995 (scan_xcoff_symtab): Likewise.
10996
10997 2017-04-26 Alan Hayward <alan.hayward@arm.com>
10998
10999 * ia64-tdep.c (examine_prologue): Use get_frame_register_unsigned.
11000 (ia64_sigtramp_frame_prev_register): Use read_memory_unsigned_integer.
11001 (ia64_access_reg): Use get_frame_register_unsigned.
11002 (ia64_access_rse_reg): Likewise.
11003 (ia64_libunwind_frame_prev_register): Likewise.
11004
11005 2017-04-26 Jiong Wang <jiong.wang@arm.com>
11006
11007 * gdbarch.sh: New gdbarch method execute_dwarf_cfa_vendor_op.
11008 * gdbarch.c: Regenerated.
11009 * gdbarch.h: Regenerated.
11010 * dwarf2-frame.c (dwarf2_frame_state_alloc_regs): Made the
11011 visibility external.
11012 (execute_cfa_program): Call execute_dwarf_cfa_vendor_op for CFI
11013 between DW_CFA_lo_user and DW_CFA_high_user inclusive.
11014 (enum cfa_how_kind): Move to ...
11015 (struct dwarf2_frame_state_reg_info): Likewise.
11016 (struct dwarf2_frame_state): Likewise.
11017 * dwarf2-frame.h: ... here.
11018 (dwarf2_frame_state_alloc_regs): New declaration.
11019 * sparc-tdep.c (sparc_execute_dwarf_cfa_vendor_op): New function.
11020 (sparc32_gdbarch_init): Register execute_dwarf_cfa_vendor_op hook.
11021
11022 2017-04-26 Alan Hayward <alan.hayward@arm.com>
11023
11024 * xtensa-tdep.c (xtensa_pseudo_register_read): Use
11025 regcache_raw_read_unsigned.
11026 (xtensa_pseudo_register_write): Likewise.
11027
11028 2017-04-26 Alan Hayward <alan.hayward@arm.com>
11029
11030 * nds32-tdep.c (nds32_pseudo_register_read): Abort on errors.
11031 (nds32_pseudo_register_write): Likewise.
11032
11033 2017-04-25 Yao Qi <yao.qi@linaro.org>
11034
11035 * regcache.c (struct regcache) <readonly_p>: Change its type
11036 to bool.
11037 (regcache_xmalloc_1): Update parameter type and callers update.
11038
11039 2017-04-25 Yao Qi <yao.qi@linaro.org>
11040
11041 * aarch64-tdep.c (aarch64_gdbarch_init): Don't call
11042 set_gdbarch_wchar_bit.
11043 * arm-tdep.c (arm_gdbarch_init): Likewise.
11044
11045 2017-04-25 Pedro Alves <palves@redhat.com>
11046
11047 * common/poison.h [!HAVE_IS_TRIVIALLY_COPYABLE] (IsRelocatable)
11048 (BothAreRelocatable, memcopy, memmove): Don't define.
11049 * common/traits.h (__has_feature, HAVE_IS_TRIVIALLY_COPYABLE): New
11050 macros.
11051
11052 2017-04-25 Pedro Alves <palves@redhat.com>
11053
11054 * common/common-defs.h: Include "common/poison.h".
11055 * common/function-view.h: (Not, Or, Requires): Move to traits.h
11056 and adjust.
11057 * common/poison.h: New file.
11058 * common/traits.h: Include <type_traits>.
11059 (Not, Or, Requires): New, moved from common/function-view.h.
11060
11061 2017-04-25 Pedro Alves <palves@redhat.com>
11062
11063 * breakpoint.h (struct breakpoint): In-class initialize all
11064 fields. Make boolean fields "bool".
11065 * breakpoint.c (init_raw_breakpoint_without_location): Remove
11066 memset call and initializations no longer necessary.
11067
11068 2017-04-25 Pedro Alves <palves@redhat.com>
11069
11070 * btrace.c (pt_btrace_insn_flags): Change parameter type to
11071 reference.
11072 (pt_btrace_insn): New function.
11073 (ftrace_add_pt): Remove memset call and use pt_btrace_insn.
11074
11075 2017-04-25 Pedro Alves <palves@redhat.com>
11076
11077 * ada-lang.c (ada_catchpoint_location): Now a "class". Remove
11078 "base" field and inherit from "bp_location" instead. Add
11079 non-default ctor.
11080 (allocate_location_exception): Use new non-default ctor.
11081 * breakpoint.c (get_first_locp_gte_addr): Remove memset call.
11082 (init_bp_location): Convert to ...
11083 (bp_location::bp_location): ... this new ctor, and remove memset
11084 call.
11085 (base_breakpoint_allocate_location): Use the new non-default ctor.
11086 * breakpoint.h (bp_location): Now a class. Declare default and
11087 non-default ctors. In-class initialize all members.
11088 (init_bp_location): Remove declaration.
11089
11090 2017-04-25 Pedro Alves <palves@redhat.com>
11091
11092 * common/enum-flags.h (enum_flags): Don't implement copy ctor and
11093 assignment operator.
11094
11095 2017-04-24 Yao Qi <yao.qi@linaro.org>
11096
11097 * doublest.c (convert_doublest_to_floatformat): Call
11098 floatformat_totalsize_bytes.
11099
11100 2017-04-22 Tom Tromey <tom@tromey.com>
11101
11102 * mi/mi-cmd-file.c (mi_cmd_file_list_shared_libraries): Use
11103 ui_out_emit_list.
11104 * stack.c (print_frame): Use ui_out_emit_list.
11105 * mi/mi-symbol-cmds.c (mi_cmd_symbol_list_lines): Use
11106 ui_out_emit_list.
11107 * mi/mi-main.c (print_one_inferior)
11108 (mi_cmd_data_list_register_names)
11109 (mi_cmd_data_list_register_values, mi_cmd_list_features)
11110 (mi_cmd_list_target_features, mi_cmd_trace_frame_collected): Use
11111 ui_out_emit_list.
11112 * mi/mi-interp.c (mi_on_normal_stop_1): Use ui_out_emit_list.
11113 (mi_output_solib_attribs): Use ui_out_emit_list,
11114 ui_out_emit_tuple.
11115 * mi/mi-cmd-var.c (varobj_update_one): Use ui_out_emit_list.
11116 * mi/mi-cmd-stack.c (mi_cmd_stack_list_frames)
11117 (mi_cmd_stack_list_args, list_args_or_locals): Use
11118 ui_out_emit_list.
11119 * disasm.c (do_assembly_only): Use ui_out_emit_list.
11120 * breakpoint.c (print_solib_event, output_thread_groups): Use
11121 ui_out_emit_list.
11122
11123 2017-04-22 Tom Tromey <tom@tromey.com>
11124
11125 * mi/mi-main.c (print_variable_or_computed): Use ui_out_emit_tuple.
11126 * mi/mi-cmd-var.c (varobj_update_one): Use ui_out_emit_tuple.
11127 * mi/mi-cmd-stack.c (list_arg_or_local): Use ui_out_emit_tuple.
11128
11129 2017-04-22 Tom Tromey <tom@tromey.com>
11130
11131 * tracepoint.c (tvariables_info_1)
11132 (print_one_static_tracepoint_marker): Use ui_out_emit_tuple.
11133
11134 2017-04-22 Tom Tromey <tom@tromey.com>
11135
11136 * stack.c (print_frame_arg): Use ui_out_emit_tuple,
11137 annotate_arg_emitter.
11138 * breakpoint.c (print_mention_watchpoint)
11139 (print_mention_masked_watchpoint): Use ui_out_emit_tuple.
11140 * annotate.h (struct annotate_arg_emitter): New.
11141
11142 2017-04-22 Tom Tromey <tom@tromey.com>
11143
11144 * record-btrace.c (record_btrace_insn_history)
11145 (record_btrace_insn_history_range, record_btrace_call_history)
11146 (record_btrace_call_history_range): Use ui_out_emit_tuple.
11147 * thread.c (do_captured_list_thread_ids, print_thread_info_1): Use
11148 ui_out_emit_tuple.
11149 * stack.c (print_frame_info): Use ui_out_emit_tuple.
11150 * solib.c (info_sharedlibrary_command): Use ui_out_emit_tuple.
11151 * skip.c (skip_info): Use ui_out_emit_tuple.
11152 * remote.c (show_remote_cmd): Use ui_out_emit_tuple.
11153 * progspace.c (print_program_space): Use ui_out_emit_tuple.
11154 * probe.c (info_probes_for_ops): Use ui_out_emit_tuple.
11155 * osdata.c (info_osdata): Use ui_out_emit_tuple.
11156 * mi/mi-symbol-cmds.c (mi_cmd_symbol_list_lines): Use
11157 ui_out_emit_tuple.
11158 * mi/mi-main.c (print_one_inferior, list_available_thread_groups)
11159 (output_register, mi_cmd_data_read_memory)
11160 (mi_cmd_data_read_memory_bytes, mi_load_progress)
11161 (mi_cmd_trace_frame_collected): Use ui_out_emit_tuple.
11162 * mi/mi-cmd-var.c (mi_cmd_var_list_children, varobj_update_one):
11163 Use ui_out_emit_tuple.
11164 * mi/mi-cmd-stack.c (mi_cmd_stack_list_args): Use
11165 ui_out_emit_tuple.
11166 * mi/mi-cmd-info.c (mi_cmd_info_ada_exceptions)
11167 (mi_cmd_info_gdb_mi_command): Use ui_out_emit_tuple.
11168 * linux-thread-db.c (info_auto_load_libthread_db): Use
11169 ui_out_emit_tuple.
11170 * inferior.c (print_inferior): Use ui_out_emit_tuple.
11171 * gdb_bfd.c (print_one_bfd): Use ui_out_emit_tuple.
11172 * disasm.c (do_mixed_source_and_assembly_deprecated)
11173 (do_mixed_source_and_assembly): Use ui_out_emit_tuple.
11174 * cp-abi.c (list_cp_abis): Use ui_out_emit_tuple.
11175 * cli/cli-setshow.c (cmd_show_list): Use ui_out_emit_tuple.
11176 * breakpoint.c (print_one_breakpoint_location)
11177 (print_one_breakpoint): Use ui_out_emit_tuple.
11178 * auto-load.c (print_script, info_auto_load_cmd): Use
11179 ui_out_emit_tuple.
11180 * ada-tasks.c (print_ada_task_info): Use ui_out_emit_tuple.
11181
11182 2017-04-21 Simon Marchi <simon.marchi@ericsson.com>
11183
11184 * thread.c (print_thread_info_1): Remove dead code.
11185
11186 2017-04-21 Jan Kratochvil <jan.kratochvil@redhat.com>
11187
11188 * aarch64-tdep.c (selftests::aarch64_process_record_test): Make it #if
11189 GDB_SELF_TEST.
11190 * arm-tdep.c (selftests::arm_record_test): Likewise.
11191
11192 2017-04-21 Yao Qi <yao.qi@linaro.org>
11193
11194 * regcache.c (regcache_restore): Remove argument 2. Replace
11195 argument 3 with regcache. Get register status from
11196 src->register_status and get register contents from
11197 register_buffer (src, regnum).
11198 (regcache_cpy): Update.
11199
11200 2017-04-19 Pedro Alves <palves@redhat.com>
11201
11202 * gdbthread.h (thread): Add missing closing parenthesis in
11203 comment.
11204
11205 2017-04-19 Pedro Alves <palves@redhat.com>
11206
11207 * common/refcounted-object.h: New file.
11208 * gdbthread.h: Include "common/refcounted-object.h".
11209 (thread_info): Inherit from refcounted_object and add comments.
11210 (thread_info::incref, thread_info::decref)
11211 (thread_info::m_refcount): Delete.
11212 (thread_info::deletable): Use the refcounted_object::refcount()
11213 method.
11214 * inferior.c (current_inferior_): Add comment.
11215 (set_current_inferior): Increment/decrement refcounts.
11216 (prune_inferiors, remove_inferior_command): Skip inferiors marked
11217 not-deletable instead of comparing with the current inferior.
11218 (initialize_inferiors): Increment the initial inferior's refcount.
11219 * inferior.h (struct inferior): Forward declare.
11220 Include "common/refcounted-object.h".
11221 (current_inferior, set_current_inferior): Move declaration to
11222 before struct inferior's definition, and fix comment.
11223 (inferior): Inherit from refcounted_object. Add comments.
11224 * thread.c (switch_to_thread_no_regs): Reference the thread's
11225 inferior pointer directly instead of doing a ptid lookup.
11226 (switch_to_no_thread): New function.
11227 (switch_to_thread(thread_info *)): New function, factored out
11228 from ...
11229 (switch_to_thread(ptid_t)): ... this.
11230 (restore_current_thread): Delete.
11231 (current_thread_cleanup): Remove 'inf_id' and 'was_removable'
11232 fields, and add 'inf' field.
11233 (do_restore_current_thread_cleanup): Check whether old->inf is
11234 alive instead of looking up an inferior by ptid. Use
11235 switch_to_thread and switch_to_no_thread.
11236 (restore_current_thread_cleanup_dtor): Use old->inf directly
11237 instead of lookup up an inferior by id. Decref the inferior.
11238 Don't restore 'removable'.
11239 (make_cleanup_restore_current_thread): Same the inferior pointer
11240 in old, instead of the inferior number. Incref the inferior.
11241 Don't save/clear 'removable'.
11242
11243 2017-04-19 Pedro Alves <palves@redhat.com>
11244
11245 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
11246 unittests/scoped_restore-selftests.c.
11247 (SUBDIR_UNITTESTS_OBS): Add scoped_restore-selftests.o.
11248 * common/scoped_restore.h (scoped_restore_base): Make "class".
11249 (scoped_restore_base::release): New public method.
11250 (scoped_restore_base::scoped_restore_base): New protected ctor.
11251 (scoped_restore_base::m_saved_var): New protected field.
11252 (scoped_restore_tmpl::scoped_restore_tmpl(T*)): Initialize the
11253 scoped_restore_base base class instead of m_saved_var directly.
11254 (scoped_restore_tmpl::scoped_restore_tmpl(T*, T2)): Likewise.
11255 (scoped_restore_tmpl::scoped_restore_tmpl(const
11256 scoped_restore_tmpl<T>&)): Likewise.
11257 (scoped_restore_tmpl::~scoped_restore_tmpl): Use the saved_var
11258 method.
11259 (scoped_restore_tmpl::saved_var): New method.
11260 (scoped_restore_tmpl::m_saved_var): Delete.
11261 * inferior.h (inferior::detaching): Now a bool.
11262 * infrun.c (prepare_for_detach): Use a scoped_restore instead of a
11263 cleanup.
11264 * unittests/scoped_restore-selftests.c: New file.
11265
11266 2017-04-19 Pedro Alves <palves@redhat.com>
11267
11268 * Makefile.in (SUBDIR_UNITTESTS_SRCS, SUBDIR_UNITTESTS_OBS):
11269 Re-sort in alphabetic order.
11270
11271 2017-04-18 Pedro Alves <palves@redhat.com>
11272
11273 * xml-support.c (obstack_xml_printf): Delete.
11274 * xml-support.h (obstack_xml_printf): Delete.
11275
11276 2017-04-18 Pedro Alves <palves@redhat.com>
11277
11278 * xml-support.c (gdb_xml_parser) <use_dtd, dtd_name, parse,
11279 vdebug, verror, body_text, start_element, end_element, name,
11280 user_data, set_is_xinclude, set_error, expat_parser>: New methods.
11281 <name, user_data, expat_parser, scopes, error, last_line, dtd_name,
11282 is_xinclude>: Make private and add m_ prefix.
11283 (gdb_xml_parser::body_text): New method, based on ...
11284 (gdb_xml_body_text): ... this. Adjust.
11285 (gdb_xml_parser::vdebug): New method, based on ...
11286 (gdb_xml_debug): ... this. Adjust.
11287 (gdb_xml_parser::verror): New method, based on ...
11288 (gdb_xml_error): ... this. Adjust.
11289 (gdb_xml_parser::start_element): New method, based on ...
11290 (gdb_xml_start_element): ... this. Adjust.
11291 (gdb_xml_start_element_wrapper): Defer to
11292 gdb_xml_parser::start_element and gdb_xml_parser::set_error.
11293 (gdb_xml_parser::end_element): New method, based on ...
11294 (gdb_xml_end_element_wrapper): ... this. Adjust.
11295 (gdb_xml_parser::~gdb_xml_parser): Adjust.
11296 (gdb_xml_parser::gdb_xml_parser): Adjust to field renames.
11297 (gdb_xml_parser::use_dtd): New method, based on ...
11298 (gdb_xml_use_dtd): ... this. Adjust.
11299 (gdb_xml_parser::parse): New method, based on ...
11300 (gdb_xml_parse): ... this. Adjust.
11301 (gdb_xml_parse_quick): Adjust to call the parser's parse method.
11302 (xinclude_start_include): Adjust to call the parser's name method.
11303 (xml_xinclude_default, xml_xinclude_start_doctype)
11304 (xml_xinclude_end_doctype): Adjust to call the parser's user_data
11305 method.
11306 (xml_process_xincludes): Adjust to call parser methods.
11307 * xml-support.h (gdb_xml_use_dtd, gdb_xml_parse): Delete
11308 declarations.
11309
11310 2017-04-18 Pedro Alves <palves@redhat.com>
11311
11312 * tracefile-tfile.c (tfile_write_tdesc): Adjust to use
11313 gdb::optional<std::string>.
11314 * xml-support.c: Include <string>.
11315 (scope_level::scope_level(scope_level &&))
11316 (scope_level::~scope_level): Delete.
11317 (scope_level::body): Now a std::string.
11318 (gdb_xml_body_text, gdb_xml_end_element): Adjust.
11319 (xinclude_parsing_data::xinclude_parsing_data): Add 'output'
11320 parameter.
11321 (xinclude_parsing_data::~xinclude_parsing_data): Delete.
11322 (xinclude_parsing_data::output): Now a std::string reference.
11323 (xinclude_start_include): Adjust.
11324 (xml_xinclude_default): Adjust.
11325 (xml_process_xincludes): Add 'output' parameter, and return bool.
11326 * xml-support.h (xml_process_xincludes): Add 'output' parameter,
11327 and return bool.
11328 * xml-tdesc.c: Include <unordered_map> and <string>.
11329 (tdesc_xml_cache): Delete.
11330 (tdesc_xml_cache_s): Delete.
11331 (xml_cache): Now an std::unordered_map.
11332 (tdesc_parse_xml): Adjust to use std::string and unordered_map.
11333 (target_fetch_description_xml): Change return type to
11334 gdb::optional<std::string>, and adjust.
11335 * xml-tdesc.h: Include "common/gdb_optional.h" and <string>.
11336 (target_fetch_description_xml): Change return type to
11337 gdb::optional<std::string>.
11338
11339 2017-04-18 Pedro Alves <palves@redhat.com>
11340
11341 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
11342 unittests/optional-selftests.c.
11343 (SUBDIR_UNITTESTS_OBS): Add optional-selftests.o.
11344 * unittests/optional-selftests.c: New file.
11345 * unittests/optional/assignment/1.cc: New file.
11346 * unittests/optional/assignment/2.cc: New file.
11347 * unittests/optional/assignment/3.cc: New file.
11348 * unittests/optional/assignment/4.cc: New file.
11349 * unittests/optional/assignment/5.cc: New file.
11350 * unittests/optional/assignment/6.cc: New file.
11351 * unittests/optional/assignment/7.cc: New file.
11352 * unittests/optional/cons/copy.cc: New file.
11353 * unittests/optional/cons/default.cc: New file.
11354 * unittests/optional/cons/move.cc: New file.
11355 * unittests/optional/cons/value.cc: New file.
11356 * unittests/optional/in_place.cc: New file.
11357 * unittests/optional/observers/1.cc: New file.
11358 * unittests/optional/observers/2.cc: New file.
11359
11360 2017-04-18 Pedro Alves <palves@redhat.com>
11361
11362 * common/gdb_optional.h: Include common/traits.h.
11363 (in_place_t): New type.
11364 (in_place): New constexpr variable.
11365 (optional::optional): Remove member initialization of
11366 m_instantiated.
11367 (optional::optional(in_place_t...)): New constructor.
11368 (optional::~optional): Use reset.
11369 (optional::optional(const optional&)): New.
11370 (optional::optional(const optional&&)): New.
11371 (optional::optional(T &)): New.
11372 (optional::optional(T &&)): New.
11373 (operator::operator=(const optional &)): New.
11374 (operator::operator=(optional &&)): New.
11375 (operator::operator= (const T &))
11376 (operator::operator= (T &&))
11377 (operator::emplace (Args &&... args)): Return a T&. Use reset.
11378 (operator::reset): New.
11379 (operator::m_instantiated):: Add in-class initializer.
11380 * common/traits.h: Include <type_traits>.
11381 (struct And): New types.
11382
11383 2017-04-18 Pedro Alves <palves@redhat.com>
11384
11385 * xml-support.c: Include <vector>.
11386 (scope_level::scope_level(const gdb_xml_element *))
11387 (scope_level::scope_level(scope_level&&)): New.
11388 (scope_level::~scope_level): New.
11389 (scope_level_s): Delete.
11390 (gdb_xml_parser::scopes): Now a std::vector.
11391 (gdb_xml_body_text, gdb_xml_start_element, gdb_xml_end_element):
11392 Use std::vector.
11393 (gdb_xml_parser::~gdb_xml_parser): Remove now unnecessary
11394 scope cleanup code.
11395 (gdb_xml_parser::gdb_xml_parser): Remove explicit initialization
11396 of the scopes member. Use std::vector::emplace_back.
11397
11398 2017-04-18 Pedro Alves <palves@redhat.com>
11399
11400 * xml-support.c (gdb_xml_parser): Add ctor/dtor. Make is_xinclude
11401 a bool.
11402 (gdb_xml_end_element): Change type of first parameter.
11403 (gdb_xml_cleanup): Rename to ...
11404 (gdb_xml_parser::~gdb_xml_parser): ... this.
11405 (gdb_xml_create_parser_and_cleanup): Delete with ...
11406 (gdb_xml_parser::gdb_xml_parser): ... creation parts factored out
11407 to this new ctor.
11408 (gdb_xml_parse_quick): Create a local gdb_xml_parser instead of
11409 using gdb_xml_create_parser_and_cleanup.
11410 (xinclude_parsing_data): Add ctor/dtor.
11411 (xml_xinclude_cleanup): Delete.
11412 (xml_process_xincludes): Create a local xinclude_parsing_data
11413 instead of heap-allocating one. Create a local gdb_xml_parser
11414 instead of heap-allocating one with
11415 gdb_xml_create_parser_and_cleanup.
11416
11417 2017-04-18 John Baldwin <jhb@FreeBSD.org>
11418
11419 PR threads/20743
11420 * fbsd-nat.c (resume_one_thread_cb): Remove.
11421 (resume_all_threads_cb): Remove.
11422 (fbsd_resume): Use ALL_NON_EXITED_THREADS instead of
11423 iterate_over_threads.
11424
11425 2017-04-17 Joel Brobecker <brobecker@adacore.com>
11426
11427 * NEWS: Create a new section for the next release branch.
11428 Rename the section of the current branch, now that it has
11429 been cut.
11430
11431 2017-04-17 Joel Brobecker <brobecker@adacore.com>
11432
11433 GDB 8.0 branch created (725bf5cf125783c2a7ca4ab63d3768e220bab2db):
11434 * version.in: Bump version to 8.0.50.DATE-git.
11435
11436 2017-04-13 Sergio Durigan Junior <sergiodj@redhat.com>
11437
11438 PR gdb/21385
11439 * windows-nat.c (windows_create_inferior): Declare 'allargs'
11440 independently of the host, and fix build breakage on Cygwin.
11441
11442 2017-04-13 Pedro Alves <palves@redhat.com>
11443
11444 * inferior.c (free_inferior): Convert to ...
11445 (inferior::~inferior): ... this dtor.
11446 (inferior::inferior): New ctor, factored out from ...
11447 (add_inferior_silent): ... here. Allocate the inferior with a new
11448 expression.
11449 (delete_inferior): Call delete instead of free_inferior.
11450 * inferior.h (gdb_environ, continuation): Forward declare.
11451 (inferior): Now a class. Add in-class initialization to all
11452 members. Make boolean fields bool, except 'detaching'.
11453 (inferior::inferior): New explicit ctor.
11454 (inferior::~inferior): New.
11455
11456 2017-04-13 Pedro Alves <palves@redhat.com>
11457
11458 * inferior.c (init_inferior_list): Delete.
11459 * inferior.h (init_inferior_list): Delete.
11460
11461 2017-04-13 Pedro Alves <palves@redhat.com>
11462
11463 PR threads/13217
11464 * gdb.threads/threadapply.exp (thr_apply_detach): New procedure.
11465 (top level): Call it twice, with different thread sets.
11466
11467 2017-04-13 Pedro Alves <palves@redhat.com>
11468
11469 * thread.c: Include <algorithm>.
11470 (thread_array_cleanup): Delete.
11471 (scoped_inc_dec_ref): New class.
11472 (live_threads_count): New function.
11473 (set_thread_refcount): Delete.
11474 (tp_array_compar_ascending): Now a bool.
11475 (tp_array_compar): Convert to a std::sort comparison function.
11476 (thread_apply_all_command): Use std::vector and scoped_inc_dec_ref
11477 and live_threads_count.
11478
11479 2017-04-13 Pedro Alves <palves@redhat.com>
11480
11481 * infrun.c (follow_fork_inferior): Also switch the current
11482 inferior.
11483
11484 2017-04-13 Pedro Alves <palves@redhat.com>
11485
11486 * breakpoint.c (watch_command_1): Save watchpoint-frame info
11487 before calling create_internal_breakpoint.
11488
11489 2017-04-13 Pedro Alves <palves@redhat.com>
11490
11491 * fork-child.c (execv_argv): New class.
11492 (breakup_args): Refactored as ...
11493 (execv_argv::init_for_no_shell): .. this method of execv_argv.
11494 Copy arguments to storage and replace separators with NULL
11495 terminators in place.
11496 (escape_bang_in_quoted_argument): Adjust to return bool.
11497 (execv_argv::execv_argv): New ctor.
11498 (execv_argv::init_for_shell): New method, factored out from
11499 fork_inferior. Don't strdup strings into the vector.
11500 (fork_inferior): Eliminate "shell" local and use execv_argv. Use
11501 Remove free_vector_argv call.
11502
11503 2017-04-13 Yao Qi <yao.qi@linaro.org>
11504
11505 * rx-tdep.c (rx_fpsw_type): Check tdep->rx_fpsw_type instead of
11506 tdep->rx_psw_type.
11507
11508 2017-04-13 Yao Qi <yao.qi@linaro.org>
11509
11510 * rl78-tdep.c (rl78_gdbarch_init): Use XCNEW instead of XNEW.
11511 * rx-tdep.c (rx_gdbarch_init): Likewise.
11512
11513 2017-04-13 Pedro Alves <palves@redhat.com>
11514
11515 * breakpoint.h (struct breakpoint): Reindent.
11516
11517 2017-04-13 Pedro Alves <palves@redhat.com>
11518
11519 * breakpoint.c (bp_location): Rename to ...
11520 (bp_locations): ... this. All references updated.
11521 (bp_location_count): Rename to ...
11522 (bp_locations_count): ... this. All references updated.
11523 (bp_location_placed_address_before_address_max): Rename to ...
11524 (bp_locations_placed_address_before_address_max): ... this. All
11525 references updated.
11526 (bp_location_shadow_len_after_address_max): Rename to ...
11527 (bp_locations_shadow_len_after_address_max): ... this. All
11528 references updated.
11529 (bp_location_compare_addrs): Rename to ...
11530 (bp_locations_compare_addrs): ... this. All references updated.
11531 (bp_location_compare):Rename to ...
11532 (bp_locations_compare): ... this. All references updated.
11533 (bp_location_target_extensions_update): Rename to ...
11534 (bp_locations_target_extensions_update): ... this. All references
11535 updated.
11536
11537 2017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
11538
11539 * Makefile.in (HFILES_NO_SRCDIR): Add "common/gdb_termios.h".
11540 * common/common.m4: Check headers 'termios.h', 'termio.h' and
11541 'sgtty.h'.
11542 * common/gdb_termios.h: New file, with parts of "terminal.h".
11543 * inflow.c: Include "gdb_termios.h".
11544 * ser-unix.c: Include "gdb_termios.h".
11545 * terminal.h: Move terminal-related defines to
11546 "common/gdb_termios.h".
11547
11548 2017-04-12 Tom Tromey <tom@tromey.com>
11549
11550 * probe.c (parse_probes): Update.
11551 * location.h (delete_event_location): Don't declare.
11552 (event_location_deleter::operator()): Update.
11553 * location.c (event_location_deleter::operator()): Rename from
11554 delete_event_location.
11555 * linespec.h (linespec_result) <location>: Change type to
11556 event_location_up.
11557 * linespec.c (canonicalize_linespec, event_location_to_sals)
11558 (decode_objc): Update.
11559 (linespec_result): Don't call delete_event_location.
11560 * breakpoint.c (create_breakpoints_sal)
11561 (bkpt_probe_create_sals_from_location)
11562 (strace_marker_create_sals_from_location): Update.
11563
11564 2017-04-12 Tom Tromey <tom@tromey.com>
11565
11566 * linespec.h (struct linespec_result): Add constructor and
11567 destructor.
11568 (init_linespec_result, destroy_linespec_result)
11569 (make_cleanup_destroy_linespec_result): Don't declare.
11570 * linespec.c (init_linespec_result): Remove.
11571 (linespec_result::~linespec_result): Rename from
11572 destroy_linespec_result. Update.
11573 (cleanup_linespec_result, make_cleanup_destroy_linespec_result):
11574 Remove.
11575 * breakpoint.c (create_breakpoint, break_range_command)
11576 (decode_location_default): Update.
11577 * ax-gdb.c (agent_command_1): Update.
11578
11579 2017-04-12 Tom Tromey <tom@tromey.com>
11580
11581 * remote.c (remote_download_tracepoint): Update.
11582 * python/py-breakpoint.c (bppy_get_location): Update.
11583 * guile/scm-breakpoint.c (bpscm_print_breakpoint_smob)
11584 (gdbscm_breakpoint_location): Update.
11585 * elfread.c (elf_gnu_ifunc_resolver_return_stop): Update.
11586 * breakpoint.h (struct breakpoint) <location, location_range_end>:
11587 Change type to event_location_up.
11588 * breakpoint.c (create_overlay_event_breakpoint)
11589 (create_longjmp_master_breakpoint)
11590 (create_std_terminate_master_breakpoint)
11591 (create_exception_master_breakpoint)
11592 (breakpoint_event_location_empty_p, print_breakpoint_location)
11593 (print_one_breakpoint_location, create_thread_event_breakpoint)
11594 (init_breakpoint_sal, create_breakpoint)
11595 (print_recreate_ranged_breakpoint, break_range_command)
11596 (init_ada_exception_breakpoint, say_where): Update.
11597 (base_breakpoint_dtor): Don't call delete_event_location.
11598 (bkpt_print_recreate, tracepoint_print_recreate)
11599 (dprintf_print_recreate, update_static_tracepoint)
11600 (breakpoint_re_set_default): Update.
11601
11602 2017-04-12 Tom Tromey <tom@tromey.com>
11603
11604 * compile/compile-loc2c.c (compute_stack_depth_worker): Change
11605 type of "to_do". Update.
11606 (compute_stack_depth): Use std::vector.
11607
11608 2017-04-12 Tom Tromey <tom@tromey.com>
11609
11610 * printcmd.c (find_instruction_backward): Use std::vector.
11611
11612 2017-04-12 Tom Tromey <tom@tromey.com>
11613
11614 * symfile.c (objfilep): Remove typedef.
11615 (reread_symbols): Use a std::vector.
11616
11617 2017-04-12 Tom Tromey <tom@tromey.com>
11618
11619 * mi/mi-main.c (exec_direction_forward): Remove.
11620 (exec_reverse_continue, mi_execute_command): Use scoped_restore.
11621 * guile/scm-ports.c (ioscm_with_output_to_port_worker): Use
11622 scoped_restore.
11623 * guile/guile.c (guile_repl_command, guile_command)
11624 (gdbscm_execute_gdb_command): Use scoped_restore.
11625 * go-exp.y (go_parse): Use scoped_restore.
11626 * d-exp.y (d_parse): Use scoped_restore.
11627 * cli/cli-decode.c (cmd_func): Use scoped_restore.
11628 * c-exp.y (c_parse): Use scoped_restore.
11629
11630 2017-04-12 Tom Tromey <tom@tromey.com>
11631
11632 * mi/mi-parse.h (struct mi_parse): Add constructor, destructor.
11633 (mi_parse): Update return type.
11634 (mi_parse_free): Remove.
11635 * mi/mi-parse.c (mi_parse::mi_parse): New constructor.
11636 (mi_parse::~mi_parse): Rename from mi_parse_free.
11637 (mi_parse_cleanup): Remove.
11638 (mi_parse): Return a unique_ptr. Use new.
11639 * mi/mi-main.c (mi_execute_command): Update.
11640
11641 2017-04-12 Tom Tromey <tom@tromey.com>
11642
11643 * location.c (explicit_location_lex_one): Return a
11644 unique_xmalloc_ptr.
11645 (string_to_explicit_location): Update. Remove cleanups.
11646
11647 2017-04-12 Tom Tromey <tom@tromey.com>
11648
11649 * gnu-v3-abi.c (value_and_voffset_p): Remove typedef.
11650 (compare_value_and_voffset): Change type. Update.
11651 (compute_vtable_size): Change type of "offset_vec".
11652 (gnuv3_print_vtable): Use std::vector. Remove cleanups.
11653 (gnuv3_get_typeid): Remove extraneous declaration.
11654
11655 2017-04-12 Tom Tromey <tom@tromey.com>
11656
11657 * charset.h (wchar_iterator): Fix comment.
11658
11659 2017-04-12 Tom Tromey <tom@tromey.com>
11660
11661 * charset.c (iconv_wrapper): New class.
11662 (cleanup_iconv): Remove.
11663 (convert_between_encodings): Use it.
11664
11665 2017-04-12 Tom Tromey <tom@tromey.com>
11666
11667 * symfile.h (increment_reading_symtab): Update type.
11668 * symfile.c (decrement_reading_symtab): Remove.
11669 (increment_reading_symtab): Return a scoped_restore_tmpl<int>.
11670 * psymtab.c (psymtab_to_symtab): Update.
11671 * dwarf2read.c (dw2_instantiate_symtab): Update.
11672
11673 2017-04-12 Tom Tromey <tom@tromey.com>
11674
11675 * jit.c (struct jit_reader): Declare separately. Add constructor
11676 and destructor. Change type of "handle".
11677 (loaded_jit_reader): Define separately.
11678 (jit_reader_load): Update. New "new".
11679 (jit_reader_unload_command): Use "delete".
11680 * gdb-dlfcn.h (struct dlclose_deleter): New.
11681 (gdb_dlhandle_up): New typedef.
11682 (gdb_dlopen, gdb_dlsym): Update types.
11683 (gdb_dlclose): Remove.
11684 * gdb-dlfcn.c (gdb_dlopen): Return a gdb_dlhandle_up.
11685 (gdb_dlsym): Change type of "handle".
11686 (make_cleanup_dlclose): Remove.
11687 (dlclose_deleter::operator()): Rename from gdb_dlclose.
11688 * compile/compile-c-support.c (load_libcc): Update.
11689
11690 2017-04-12 Tom Tromey <tom@tromey.com>
11691
11692 * symtab.h (find_pcs_for_symtab_line): Change return type.
11693 * symtab.c (find_pcs_for_symtab_line): Change return type.
11694 * python/py-linetable.c (build_line_table_tuple_from_pcs): Change
11695 type of "vec". Update.
11696 (ltpy_get_pcs_for_line): Update.
11697 * linespec.c (decode_digits_ordinary): Update.
11698
11699 2017-04-12 Tom Tromey <tom@tromey.com>
11700
11701 * tracepoint.c (actions_command): Update.
11702 * python/python.c (python_command, python_interactive_command):
11703 Update.
11704 * mi/mi-cmd-break.c (mi_cmd_break_commands): Update.
11705 * guile/guile.c (guile_command): Update.
11706 * defs.h (read_command_lines, read_command_lines_1): Return
11707 command_line_up.
11708 (command_lines_deleter): New struct.
11709 (command_line_up): New typedef.
11710 * compile/compile.c (compile_code_command)
11711 (compile_print_command): Update.
11712 * cli/cli-script.h (get_command_line, copy_command_lines): Return
11713 command_line_up.
11714 (make_cleanup_free_command_lines): Remove.
11715 * cli/cli-script.c (get_command_line, read_command_lines_1)
11716 (copy_command_lines): Return command_line_up.
11717 (while_command, if_command, read_command_lines, define_command)
11718 (document_command): Update.
11719 (do_free_command_lines_cleanup, make_cleanup_free_command_lines):
11720 Remove.
11721 * breakpoint.h (breakpoint_set_commands): Change type of
11722 "commands".
11723 * breakpoint.c (breakpoint_set_commands): Change type of
11724 "commands". Update.
11725 (do_map_commands_command, update_dprintf_command_list)
11726 (create_tracepoint_from_upload): Update.
11727
11728 2017-04-12 Tom Tromey <tom@tromey.com>
11729
11730 * tracepoint.c (scope_info): Update.
11731 * spu-tdep.c (spu_catch_start): Update.
11732 * python/python.c (gdbpy_decode_line): Update.
11733 * python/py-finishbreakpoint.c (bpfinishpy_init): Update.
11734 * python/py-breakpoint.c (bppy_init): Update.
11735 * probe.c (parse_probes): Update.
11736 * mi/mi-cmd-break.c (mi_cmd_break_insert_1): Update.
11737 * location.h (event_location_deleter): New struct.
11738 (event_location_up): New typedef.
11739 (new_linespec_location, new_address_location, new_probe_location)
11740 (new_explicit_location, copy_event_location)
11741 (string_to_event_location, string_to_event_location_basic)
11742 (string_to_explicit_location): Update return type.
11743 (make_cleanup_delete_event_location): Remove.
11744 * location.c (new_linespec_location, new_address_location)
11745 (new_probe_location, new_explicit_location, copy_event_location):
11746 Return event_location_up.
11747 (delete_event_location_cleanup)
11748 (make_cleanup_delete_event_location): Remove.
11749 (string_to_explicit_location, string_to_event_location_basic)
11750 (string_to_event_location): Return event_location_up.
11751 * linespec.c (canonicalize_linespec, event_location_to_sals)
11752 (decode_line_with_current_source)
11753 (decode_line_with_last_displayed, decode_objc): Update.
11754 * guile/scm-breakpoint.c (gdbscm_register_breakpoint_x): Update.
11755 * completer.c (location_completer): Update.
11756 * cli/cli-cmds.c (edit_command, list_command): Update.
11757 * breakpoint.c (create_overlay_event_breakpoint)
11758 (create_longjmp_master_breakpoint)
11759 (create_std_terminate_master_breakpoint)
11760 (create_exception_master_breakpoint)
11761 (create_thread_event_breakpoint): Update.
11762 (init_breakpoint_sal): Update. Remove some dead code.
11763 (create_breakpoint_sal): Change type of "location". Update.
11764 (create_breakpoints_sal, create_breakpoint, break_command_1)
11765 (dprintf_command, break_range_command, until_break_command)
11766 (init_ada_exception_breakpoint)
11767 (strace_marker_create_sals_from_location)
11768 (update_static_tracepoint, trace_command, ftrace_command)
11769 (strace_command, create_tracepoint_from_upload): Update.
11770 * break-catch-throw.c (re_set_exception_catchpoint): Update.
11771 * ax-gdb.c (agent_command_1): Update.
11772
11773 2017-04-12 Pedro Alves <palves@redhat.com>
11774
11775 * Makefile.in (ALL_TARGET_OBS): Add i386-go32-tdep.o.
11776 * configure.tgt: Handle i[34567]86-*-go32* and
11777 i[34567]86-*-msdosdjgpp*.
11778 * i386-tdep.c (i386_svr4_reg_to_regnum):
11779 Make extern.
11780 (i386_go32_init_abi, i386_coff_osabi_sniffer): Moved to
11781 i386-go32-tdep.c.
11782 (_initialize_i386_tdep): DJGPP bits moved to i386-go32-tdep.c.
11783 * i386-go32-tdep.c: New file.
11784 * i386-tdep.h (tdesc_i386_mmx, i386_svr4_reg_to_regnum): New
11785 declarations.
11786
11787 2017-04-12 Simon Marchi <simon.marchi@ericsson.com>
11788
11789 * aix-thread.c (pd_status2str): Change return type to const char *.
11790
11791 2017-04-12 Pedro Alves <palves@redhat.com>
11792
11793 * i386-tdep.c (i386_elf_init_abi, i386_go32_init_abi): Remove
11794 calls to set_gdbarch_gnu_triplet_regexp.
11795
11796 2017-04-12 Pedro Alves <palves@redhat.com>
11797
11798 PR gdb/21323
11799 * c-lang.c (cplus_primitive_types) <cplus_primitive_type_wchar_t>:
11800 New enum value.
11801 (cplus_language_arch_info): Register cplus_primitive_type_wchar_t.
11802 * gdbtypes.h (struct builtin_type) <builtin_wchar>: New field.
11803 * gdbtypes.c (gdbtypes_post_init): Create the "wchar_t" type.
11804 * gdbarch.sh (wchar_bit, wchar_signed): New per-arch values.
11805 * gdbarch.h, gdbarch.c: Regenerate.
11806 * aarch64-tdep.c (aarch64_gdbarch_init): Override
11807 gdbarch_wchar_bit and gdbarch_wchar_signed.
11808 * alpha-tdep.c (alpha_gdbarch_init): Likewise.
11809 * arm-tdep.c (arm_gdbarch_init): Likewise.
11810 * avr-tdep.c (avr_gdbarch_init): Likewise.
11811 * h8300-tdep.c (h8300_gdbarch_init): Likewise.
11812 * i386-nto-tdep.c (i386nto_init_abi): Likewise.
11813 * i386-tdep.c (i386_go32_init_abi): Likewise.
11814 * m32r-tdep.c (m32r_gdbarch_init): Likewise.
11815 * moxie-tdep.c (moxie_gdbarch_init): Likewise.
11816 * nds32-tdep.c (nds32_gdbarch_init): Likewise.
11817 * rs6000-aix-tdep.c (rs6000_aix_init_osabi): Likewise.
11818 * sh-tdep.c (sh_gdbarch_init): Likewise.
11819 * sparc-tdep.c (sparc32_gdbarch_init): Likewise.
11820 * sparc64-tdep.c (sparc64_init_abi): Likewise.
11821 * windows-tdep.c (windows_init_abi): Likewise.
11822 * xstormy16-tdep.c (xstormy16_gdbarch_init): Likewise.
11823
11824 2017-04-12 Pedro Alves <palves@redhat.com>
11825
11826 PR c++/21323
11827 * c-lang.c (cplus_primitive_types) <cplus_primitive_type_char16_t,
11828 cplus_primitive_type_char32_t>: New enum values.
11829 (cplus_language_arch_info): Register cplus_primitive_type_char16_t
11830 and cplus_primitive_type_char32_t.
11831 * dwarf2read.c (read_base_type) <DW_ATE_UTF>: If bit size is 16 or
11832 32, use the archtecture's built-in type for char16_t and char32_t,
11833 respectively. Otherwise, fallback to init_integer_type as before,
11834 but make the type unsigned, and issue a complaint.
11835 * gdbtypes.c (gdbtypes_post_init): Make char16_t and char32_t unsigned.
11836
11837 2017-04-12 Alan Hayward <alan.hayward@arm.com>
11838
11839 * m32r-tdep.c (M32R_ARG_REGISTER_SIZE): Added.
11840 (m32r_push_dummy_call): Use M32R_ARG_REGISTER_SIZE.
11841
11842 2017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
11843
11844 * windows-nat.c (windows_create_inferior): Declare 'toexec' as
11845 'const char *'.
11846
11847 2017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
11848
11849 * common/common-utils.c (free_vector_argv): New function.
11850 * common/common-utils.h: Include <vector>.
11851 (free_vector_argv): New prototype.
11852 * darwin-nat.c (darwin_create_inferior): Rewrite function
11853 prototype in order to constify "exec_file" and accept a
11854 "std::string" for "allargs".
11855 * fork-child.c: Include <vector>.
11856 (breakup_args): Rewrite function, using C++.
11857 (fork_inferior): Rewrite function header, constify "exec_file_arg"
11858 and accept "std::string" for "allargs". Update the code to
11859 calculate "argv" based on "allargs". Update calls to "exec_fun"
11860 and "execvp".
11861 * gnu-nat.c (gnu_create_inferior): Rewrite function prototype in
11862 order to constify "exec_file" and accept a "std::string" for
11863 "allargs".
11864 * go32-nat.c (go32_create_inferior): Likewise.
11865 * inf-ptrace.c (inf_ptrace_create_inferior): Likewise.
11866 * infcmd.c (run_command_1): Constify "exec_file". Use
11867 "std::string" for inferior arguments.
11868 * inferior.h (fork_inferior): Update prototype.
11869 * linux-nat.c (linux_nat_create_inferior): Rewrite function
11870 prototype in order to constify "exec_file" and accept a
11871 "std::string" for "allargs".
11872 * nto-procfs.c (procfs_create_inferior): Likewise.
11873 * procfs.c (procfs_create_inferior): Likewise.
11874 * remote-sim.c (gdbsim_create_inferior): Likewise.
11875 * remote.c (extended_remote_run): Update code to accept
11876 "std::string" as argument.
11877 (extended_remote_create_inferior): Rewrite function prototype in
11878 order to constify "exec_file" and accept a "std::string" for
11879 "allargs".
11880 * rs6000-nat.c (super_create_inferior): Likewise.
11881 (rs6000_create_inferior): Likewise.
11882 * target.h (struct target_ops) <to_create_inferior>: Likewise.
11883 * windows-nat.c (windows_create_inferior): Likewise.
11884
11885 2017-04-11 Pedro Alves <palves@redhat.com>
11886
11887 * thread.c: Fix whitespace throughout.
11888
11889 2017-04-11 Philipp Rudo <prudo@linux.vnet.ibm.com>
11890
11891 * linux-nat.c (linux_nat_detach): Remove delete_lwp call.
11892
11893 2017-04-11 Alan Hayward <alan.hayward@arm.com>
11894
11895 * arm-tdep.c (arm_store_return_value): Use FP_REGISTER_SIZE
11896
11897 2017-04-10 Sergio Durigan Junior <sergiodj@redhat.com>
11898
11899 PR gdb/21364
11900 * osdata.c (info_osdata): Check if 'type' is an empty string
11901 instead of NULL.
11902
11903 2017-04-10 Pedro Alves <palves@redhat.com>
11904
11905 * thread.c (add_thread_silent, delete_thread_1, find_thread_ptid)
11906 (ptid_to_global_thread_id, in_thread_list)
11907 (do_captured_list_thread_ids, set_resumed, set_running)
11908 (set_executing, set_stop_requested, finish_thread_state)
11909 (validate_registers_access, can_access_registers_ptid)
11910 (print_thread_info_1, switch_to_thread)
11911 (do_restore_current_thread_cleanup)
11912 (make_cleanup_restore_current_thread, thread_command)
11913 (thread_name_command): Use operator== instead of ptid_equal.
11914
11915 2017-04-10 Pedro Alves <palves@redhat.com>
11916
11917 * thread.c (struct current_thread_cleanup) <next>: Delete field.
11918 (current_thread_cleanup_chain): Delete.
11919 (restore_current_thread_cleanup_dtor)
11920 (make_cleanup_restore_current_thread): Remove references to
11921 current_thread_cleanup_chain.
11922
11923 2017-04-10 Alan Hayward <alan.hayward@arm.com>
11924
11925 * msp430-tdep.c (msp430_pseudo_register_read): Never return
11926 REG_UNKNOWN.
11927
11928 2017-04-10 Yao Qi <yao.qi@linaro.org>
11929
11930 PR gdb/19942
11931 * gdbthread.h (thread_info::deletable): New method.
11932 (thread_info::incref): New method.
11933 (thread_info::decref): New method.
11934 (thread_info::refcount): Move it to private.
11935 * infrun.c (save_stop_context): Call inc_refcount.
11936 (release_stop_context_cleanup): Likewise.
11937 * thread.c (set_thread_exited): New function.
11938 (init_thread_list): Delete "tp" only it is deletable, otherwise
11939 call set_thread_exited.
11940 (delete_thread_1): Call set_thread_exited.
11941 (current_thread_cleanup) <inferior_pid>: Remove.
11942 <thread>: New field.
11943 (restore_current_thread_ptid_changed): Removed.
11944 (do_restore_current_thread_cleanup): Adjust.
11945 (restore_current_thread_cleanup_dtor): Don't call
11946 find_thread_ptid.
11947 (set_thread_refcount): Use dec_refcount.
11948 (make_cleanup_restore_current_thread): Adjust.
11949 (thread_apply_all_command): Call inc_refcount.
11950 (_initialize_thread): Don't call
11951 observer_attach_thread_ptid_changed.
11952
11953 2017-04-10 Yao Qi <yao.qi@linaro.org>
11954
11955 * thread.c (delete_thread_1): Hoist code on marking thread as
11956 exited.
11957
11958 2017-04-09 Simon Marchi <simon.marchi@polymtl.ca>
11959
11960 * windows-nat.c (windows_detach): Initialize ptid with
11961 minus_one_ptid.
11962
11963 2017-04-07 Simon Marchi <simon.marchi@ericsson.com>
11964
11965 * unittests/ptid-selftests.c: Fix erroneous assert messages.
11966
11967 2017-04-07 Alan Hayward <alan.hayward@arm.com>
11968
11969 * bfin-tdep.c (BFIN_MAX_REGISTER_SIZE): Add.
11970 (bfin_pseudo_register_read): Use BFIN_MAX_REGISTER_SIZE.
11971 (bfin_pseudo_register_write): Likewise
11972
11973 2017-04-06 Simon Marchi <simon.marchi@ericsson.com>
11974
11975 * common/ptid.h (struct ptid): Change to...
11976 (class ptid_t): ... this.
11977 <ptid_t>: New constructors.
11978 <pid, lwp_p, lwp, tid_p, tid, is_pid, operator==, operator!=,
11979 matches>: New methods.
11980 <make_null, make_minus_one>: New static methods.
11981 <pid>: Rename to...
11982 <m_pid>: ...this.
11983 <lwp>: Rename to...
11984 <m_lwp>: ...this.
11985 <tid>: Rename to...
11986 <m_tid>: ...this.
11987 (ptid_build, ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal,
11988 ptid_is_pid, ptid_lwp_p, ptid_tid_p, ptid_match): Take ptid arguments
11989 as references, move comment to class ptid_t.
11990 * common/ptid.c (null_ptid, minus_one_ptid): Initialize with
11991 ptid_t static methods.
11992 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_tid,
11993 ptid_equal, ptid_is_pid, ptid_lwp_p, ptid_tid_p, ptid_match):
11994 Take ptid arguments as references, implement using ptid_t methods.
11995 * unittests/ptid-selftests.c: New file.
11996 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
11997 unittests/ptid-selftests.c.
11998 (SUBDIR_UNITTESTS_OBS): Add unittests/ptid-selftests.o.
11999
12000 2017-04-06 Thomas Preud'homme <thomas.preudhomme@arm.com>
12001
12002 * python/python.c (python_run_simple_file): Cast mode literal to
12003 non-const char pointer as expected by PyFile_FromString.
12004
12005 2017-04-05 Simon Marchi <simon.marchi@ericsson.com>
12006
12007 * common/ptid.c (ptid_lwp_p, ptid_tid_p): Remove comparison with
12008 minus_one_ptid and null_ptid.
12009
12010 2017-04-05 Pedro Alves <palves@redhat.com>
12011
12012 * warning.m4 (build_warnings): Remove -Wno-write-strings.
12013 * configure: Regenerate.
12014
12015 2017-04-05 Pedro Alves <palves@redhat.com>
12016
12017 * ada-exp.y (yyerror): Constify.
12018 * ada-lang.c (bound_name, get_selections)
12019 (ada_variant_discrim_type)
12020 (ada_variant_discrim_name, ada_value_struct_elt)
12021 (ada_lookup_struct_elt_type, is_unchecked_variant)
12022 (ada_which_variant_applies, standard_exc, ada_get_next_arg)
12023 (catch_ada_exception_command_split)
12024 (catch_ada_assert_command_split, catch_assert_command)
12025 (ada_op_name): Constify.
12026 * ada-lang.h (ada_yyerror, get_selections)
12027 (ada_variant_discrim_name, ada_value_struct_elt): Constify.
12028 * arc-tdep.c (arc_print_frame_cache): Constify.
12029 * arm-tdep.c (arm_skip_stub): Constify.
12030 * ax-gdb.c (gen_binop, gen_struct_ref_recursive, gen_struct_ref)
12031 (gen_aggregate_elt_ref): Constify.
12032 * bcache.c (print_bcache_statistics): Constify.
12033 * bcache.h (print_bcache_statistics): Constify.
12034 * break-catch-throw.c (catch_exception_command_1):
12035 * breakpoint.c (struct ep_type_description::description):
12036 Constify.
12037 (add_solib_catchpoint): Constify.
12038 (catch_fork_command_1): Add cast.
12039 (add_catch_command): Constify.
12040 * breakpoint.h (add_catch_command, add_solib_catchpoint):
12041 Constify.
12042 * bsd-uthread.c (bsd_uthread_state): Constify.
12043 * buildsym.c (patch_subfile_names): Constify.
12044 * buildsym.h (next_symbol_text_func, patch_subfile_names):
12045 Constify.
12046 * c-exp.y (yyerror): Constify.
12047 (token::oper): Constify.
12048 * c-lang.h (c_yyerror, cp_print_class_member): Constify.
12049 * c-varobj.c (cplus_describe_child): Constify.
12050 * charset.c (find_charset_names): Add cast.
12051 (find_charset_names): Constify array and add const_cast.
12052 * cli/cli-cmds.c (complete_command, cd_command): Constify.
12053 (edit_command): Constify.
12054 * cli/cli-decode.c (lookup_cmd): Constify.
12055 * cli/cli-dump.c (dump_memory_command, dump_value_command):
12056 Constify.
12057 (struct dump_context): Constify.
12058 (add_dump_command, restore_command): Constify.
12059 * cli/cli-script.c (get_command_line): Constify.
12060 * cli/cli-script.h (get_command_line): Constify.
12061 * cli/cli-utils.c (check_for_argument): Constify.
12062 * cli/cli-utils.h (check_for_argument): Constify.
12063 * coff-pe-read.c (struct read_pe_section_data): Constify.
12064 * command.h (lookup_cmd): Constify.
12065 * common/print-utils.c (decimal2str): Constify.
12066 * completer.c (gdb_print_filename): Constify.
12067 * corefile.c (set_gnutarget): Constify.
12068 * cp-name-parser.y (yyerror): Constify.
12069 * cp-valprint.c (cp_print_class_member): Constify.
12070 * cris-tdep.c (cris_register_name, crisv32_register_name):
12071 Constify.
12072 * d-exp.y (yyerror): Constify.
12073 (struct token::oper): Constify.
12074 * d-lang.h (d_yyerror): Constify.
12075 * dbxread.c (struct header_file_location::name): Constify.
12076 (add_old_header_file, add_new_header_file, last_function_name)
12077 (dbx_next_symbol_text, add_bincl_to_list)
12078 (find_corresponding_bincl_psymtab, set_namestring)
12079 (find_stab_function_addr, read_dbx_symtab, start_psymtab)
12080 (dbx_end_psymtab, read_ofile_symtab, process_one_symbol):
12081 * defs.h (command_line_input, print_address_symbolic)
12082 (deprecated_readline_begin_hook): Constify.
12083 * dwarf2read.c (anonymous_struct_prefix, dwarf_bool_name):
12084 Constify.
12085 * event-top.c (handle_line_of_input): Constify and add cast.
12086 * exceptions.c (catch_errors): Constify.
12087 * exceptions.h (catch_errors): Constify.
12088 * expprint.c (print_subexp_standard, op_string, op_name)
12089 (op_name_standard, dump_raw_expression, dump_raw_expression):
12090 * expression.h (op_name, op_string, dump_raw_expression):
12091 Constify.
12092 * f-exp.y (yyerror): Constify.
12093 (struct token::oper): Constify.
12094 (struct f77_boolean_val::name): Constify.
12095 * f-lang.c (f_word_break_characters): Constify.
12096 * f-lang.h (f_yyerror): Constify.
12097 * fork-child.c (fork_inferior): Add cast.
12098 * frv-tdep.c (struct gdbarch_tdep::register_names): Constify.
12099 (new_variant): Constify.
12100 * gdbarch.sh (pstring_ptr, pstring_list): Constify.
12101 * gdbarch.c: Regenerate.
12102 * gdbcore.h (set_gnutarget): Constify.
12103 * go-exp.y (yyerror): Constify.
12104 (token::oper): Constify.
12105 * go-lang.h (go_yyerror): Constify.
12106 * go32-nat.c (go32_sysinfo): Constify.
12107 * guile/scm-breakpoint.c (gdbscm_breakpoint_expression): Constify.
12108 * guile/scm-cmd.c (cmdscm_function): Constify.
12109 * guile/scm-param.c (pascm_param_value): Constify.
12110 * h8300-tdep.c (h8300_register_name, h8300s_register_name)
12111 (h8300sx_register_name): Constify.
12112 * hppa-tdep.c (hppa32_register_name, hppa64_register_name):
12113 Constify.
12114 * ia64-tdep.c (ia64_register_names): Constify.
12115 * infcmd.c (construct_inferior_arguments): Constify.
12116 (path_command, attach_post_wait): Constify.
12117 * language.c (show_range_command, show_case_command)
12118 (unk_lang_error): Constify.
12119 * language.h (language_defn::la_error)
12120 (language_defn::la_name_of_this): Constify.
12121 * linespec.c (decode_line_2): Constify.
12122 * linux-thread-db.c (thread_db_err_str): Constify.
12123 * lm32-tdep.c (lm32_register_name): Constify.
12124 * m2-exp.y (yyerror): Constify.
12125 * m2-lang.h (m2_yyerror): Constify.
12126 * m32r-tdep.c (m32r_register_names): Constify and make static.
12127 * m68hc11-tdep.c (m68hc11_register_names): Constify.
12128 * m88k-tdep.c (m88k_register_name): Constify.
12129 * macroexp.c (appendmem): Constify.
12130 * mdebugread.c (fdr_name, add_data_symbol, parse_type)
12131 (upgrade_type, parse_external, parse_partial_symbols)
12132 (mdebug_next_symbol_text, cross_ref, mylookup_symbol, new_psymtab)
12133 (new_symbol): Constify.
12134 * memattr.c (mem_info_command): Constify.
12135 * mep-tdep.c (register_name_from_keyword): Constify.
12136 * mi/mi-cmd-env.c (mi_cmd_env_path, _initialize_mi_cmd_env):
12137 Constify.
12138 * mi/mi-cmd-stack.c (list_args_or_locals): Constify.
12139 * mi/mi-cmd-var.c (mi_cmd_var_show_attributes): Constify.
12140 * mi/mi-main.c (captured_mi_execute_command): Constify and add
12141 cast.
12142 (mi_execute_async_cli_command): Constify.
12143 * mips-tdep.c (mips_register_name): Constify.
12144 * mn10300-tdep.c (register_name, mn10300_generic_register_name)
12145 (am33_register_name, am33_2_register_name)
12146 * moxie-tdep.c (moxie_register_names): Constify.
12147 * nat/linux-osdata.c (osdata_type): Constify fields.
12148 * nto-tdep.c (nto_parse_redirection): Constify.
12149 * objc-lang.c (lookup_struct_typedef, lookup_objc_class)
12150 (lookup_child_selector): Constify.
12151 (objc_methcall::name): Constify.
12152 * objc-lang.h (lookup_objc_class, lookup_child_selector)
12153 (lookup_struct_typedef): Constify.
12154 * objfiles.c (pc_in_section): Constify.
12155 * objfiles.h (pc_in_section): Constify.
12156 * p-exp.y (struct token::oper): Constify.
12157 (yyerror): Constify.
12158 * p-lang.h (pascal_yyerror): Constify.
12159 * parser-defs.h (op_name_standard): Constify.
12160 (op_print::string): Constify.
12161 (exp_descriptor::op_name): Constify.
12162 * printcmd.c (print_address_symbolic): Constify.
12163 * psymtab.c (print_partial_symbols): Constify.
12164 * python/py-breakpoint.c (stop_func): Constify.
12165 (bppy_get_expression): Constify.
12166 * python/py-cmd.c (cmdpy_completer::name): Constify.
12167 (cmdpy_function): Constify.
12168 * python/py-event.c (evpy_add_attribute)
12169 (gdbpy_initialize_event_generic): Constify.
12170 * python/py-event.h (evpy_add_attribute)
12171 (gdbpy_initialize_event_generic): Constify.
12172 * python/py-evts.c (add_new_registry): Constify.
12173 * python/py-finishbreakpoint.c (outofscope_func): Constify.
12174 * python/py-framefilter.c (get_py_iter_from_func): Constify.
12175 * python/py-inferior.c (get_buffer): Add cast.
12176 * python/py-param.c (parm_constant::name): Constify.
12177 * python/py-unwind.c (fprint_frame_id): Constify.
12178 * python/python.c (gdbpy_parameter_value): Constify.
12179 * remote-fileio.c (remote_fio_func_map): Make 'name' const.
12180 * remote.c (memory_packet_config::name): Constify.
12181 (show_packet_config_cmd, remote_write_bytes)
12182 (remote_buffer_add_string):
12183 * reverse.c (exec_reverse_once): Constify.
12184 * rs6000-tdep.c (variant::name, variant::description): Constify.
12185 * rust-exp.y (rustyyerror): Constify.
12186 * rust-lang.c (rust_op_name): Constify.
12187 * rust-lang.h (rustyyerror): Constify.
12188 * serial.h (serial_ops::name): Constify.
12189 * sh-tdep.c (sh_sh_register_name, sh_sh3_register_name)
12190 (sh_sh3e_register_name, sh_sh2e_register_name)
12191 (sh_sh2a_register_name, sh_sh2a_nofpu_register_name)
12192 (sh_sh_dsp_register_name, sh_sh3_dsp_register_name)
12193 (sh_sh4_register_name, sh_sh4_nofpu_register_name)
12194 (sh_sh4al_dsp_register_name): Constify.
12195 * sh64-tdep.c (sh64_register_name): Constify.
12196 * solib-darwin.c (lookup_symbol_from_bfd): Constify.
12197 * spu-tdep.c (spu_register_name, info_spu_dma_cmdlist): Constify.
12198 * stabsread.c (patch_block_stabs, read_type_number)
12199 (ref_map::stabs, ref_add, process_reference)
12200 (symbol_reference_defined, define_symbol, define_symbol)
12201 (error_type, read_type, read_member_functions, read_cpp_abbrev)
12202 (read_one_struct_field, read_struct_fields, read_baseclasses)
12203 (read_tilde_fields, read_struct_type, read_array_type)
12204 (read_enum_type, read_sun_builtin_type, read_sun_floating_type)
12205 (read_huge_number, read_range_type, read_args, common_block_start)
12206 (find_name_end): Constify.
12207 * stabsread.h (common_block_start, define_symbol)
12208 (process_one_symbol, symbol_reference_defined, ref_add):
12209 * symfile.c (get_section_index, add_symbol_file_command):
12210 * symfile.h (get_section_index): Constify.
12211 * target-descriptions.c (tdesc_type::name): Constify.
12212 (tdesc_free_type): Add cast.
12213 * target.c (find_default_run_target):
12214 (add_deprecated_target_alias, find_default_run_target)
12215 (target_announce_detach): Constify.
12216 (do_option): Constify.
12217 * target.h (add_deprecated_target_alias): Constify.
12218 * thread.c (print_thread_info_1): Constify.
12219 * top.c (deprecated_readline_begin_hook, command_line_input):
12220 Constify.
12221 (init_main): Add casts.
12222 * top.h (handle_line_of_input): Constify.
12223 * tracefile-tfile.c (tfile_write_uploaded_tsv): Constify.
12224 * tracepoint.c (tvariables_info_1, trace_status_mi): Constify.
12225 (tfind_command): Rename to ...
12226 (tfind_command_1): ... this and constify.
12227 (tfind_command): New function.
12228 (tfind_end_command, tfind_start_command): Adjust.
12229 (encode_source_string): Constify.
12230 * tracepoint.h (encode_source_string): Constify.
12231 * tui/tui-data.c (tui_partial_win_by_name): Constify.
12232 * tui/tui-data.h (tui_partial_win_by_name): Constify.
12233 * tui/tui-source.c (tui_set_source_content_nil): Constify.
12234 * tui/tui-source.h (tui_set_source_content_nil): Constify.
12235 * tui/tui-win.c (parse_scrolling_args): Constify.
12236 * tui/tui-windata.c (tui_erase_data_content): Constify.
12237 * tui/tui-windata.h (tui_erase_data_content): Constify.
12238 * tui/tui-winsource.c (tui_erase_source_content): Constify.
12239 * tui/tui.c (tui_enable): Add cast.
12240 * utils.c (defaulted_query): Constify.
12241 (init_page_info): Add cast.
12242 (puts_debug, subset_compare): Constify.
12243 * utils.h (subset_compare): Constify.
12244 * varobj.c (varobj_format_string): Constify.
12245 * varobj.h (varobj_format_string): Constify.
12246 * vax-tdep.c (vax_register_name): Constify.
12247 * windows-nat.c (windows_detach): Constify.
12248 * xcoffread.c (process_linenos, xcoff_next_symbol_text): Constify.
12249 * xml-support.c (gdb_xml_end_element): Constify.
12250 * xml-tdesc.c (tdesc_start_reg): Constify.
12251 * xstormy16-tdep.c (xstormy16_register_name): Constify.
12252 * xtensa-tdep.c (xtensa_find_register_by_name): Constify.
12253 * xtensa-tdep.h (xtensa_register_t::name): Constify.
12254
12255 2017-04-05 Pedro Alves <palves@redhat.com>
12256
12257 * proc-api.c (struct trans): Constify.
12258 (procfs_note): Constify.
12259 * proc-events.c (struct trans, syscall_table):
12260 * proc-flags.c (struct trans): Constify.
12261 * proc-utils.h (procfs_note): Constify.
12262 * proc-why.c (struct trans): Constify.
12263 * procfs.c (dead_procinfo, find_syscall, proc_warn, proc_error)
12264 (procfs_detach): Constify.
12265 * sol-thread.c (struct string_map): Constify.
12266 (td_err_string, td_state_string): Constify.
12267
12268 2017-04-05 Pedro Alves <palves@redhat.com>
12269
12270 * proc-api.c (procfs_filename): Don't initialize
12271 procfs_filename.
12272 (prepare_to_trace): Assume procfs_filename is non-NULL.
12273 (_initialize_proc_api): Give procfs_filename a default value here.
12274
12275 2017-04-05 Pedro Alves <palves@redhat.com>
12276
12277 * break-catch-throw.c (handle_gnu_v3_exceptions): Constify
12278 'cond_string' parameter.
12279 (extract_exception_regexp): Constify 'string' parameter.
12280 (catch_exception_command_1): Constify.
12281 * breakpoint.c (init_catchpoint)
12282 (create_fork_vfork_event_catchpoint): Constify 'cond_string'
12283 parameter.
12284 (ep_parse_optional_if_clause, catch_fork_command_1)
12285 (catch_exec_command_1): Constify.
12286 * breakpoint.h (init_catchpoint): Constify 'cond_string'
12287 parameter.
12288 (ep_parse_optional_if_clause): Constify.
12289 * cli/cli-utils.c (remove_trailing_whitespace)
12290 (check_for_argument): Constify.
12291 * cli/cli-utils.h (remove_trailing_whitespace): Constify and add
12292 non-const overload.
12293 (check_for_argument): Likewise.
12294
12295 2017-04-05 Pedro Alves <palves@redhat.com>
12296
12297 * event-top.c (command_line_handler): Add cast to execute_command
12298 call.
12299 * record-btrace.c (cmd_record_btrace_bts_start)
12300 (cmd_record_btrace_pt_start, cmd_record_btrace_start)
12301 (cmd_record_btrace_start): Add cast to execute_command call.
12302 * record-full.c (record_full_goto_insn):
12303 * record.c (record_start, record_stop): Add cast to
12304 execute_command_to_string calls.
12305 (cmd_record_start): Add cast to execute_command calls.
12306
12307 2017-04-05 Pedro Alves <palves@redhat.com>
12308
12309 * python/python-internal.h (gdb_PyArg_ParseTupleAndKeywords): New
12310 static inline function.
12311 * python/py-arch.c (archpy_disassemble): Constify 'keywords'
12312 array and use gdb_PyArg_ParseTupleAndKeywords.
12313 * python/py-cmd.c (cmdpy_init): Likewise.
12314 * python/py-finishbreakpoint.c (bpfinishpy_init): Likewise.
12315 * python/py-inferior.c (infpy_read_memory, infpy_write_memory)
12316 (infpy_search_memory): Likewise.
12317 * python/py-objfile.c (objfpy_add_separate_debug_file)
12318 (gdbpy_lookup_objfile): Likewise.
12319 * python/py-symbol.c (gdbpy_lookup_symbol)
12320 (gdbpy_lookup_global_symbol): Likewise.
12321 * python/py-type.c (gdbpy_lookup_type): Likewise.
12322 * python/py-value.c (valpy_lazy_string, valpy_string): Likewise.
12323 * python/python.c (execute_gdb_command, gdbpy_write, gdbpy_flush):
12324 Likewise.
12325
12326 2017-04-05 Pedro Alves <palves@redhat.com>
12327
12328 * python/python-internal.h (gdb_PyGetSetDef): New type.
12329 * python/py-block.c (block_object_getset)
12330 (breakpoint_object_getset): Now a gdb_PyGetSetDef array.
12331 * python/py-event.c (event_object_getset)
12332 (finish_breakpoint_object_getset): Likewise.
12333 * python/py-inferior.c (inferior_object_getset): Likewise.
12334 * python/py-infthread.c (thread_object_getset): Likewise.
12335 * python/py-lazy-string.c (lazy_string_object_getset): Likewise.
12336 * python/py-linetable.c (linetable_entry_object_getset): Likewise.
12337 * python/py-objfile.c (objfile_getset): Likewise.
12338 * python/py-progspace.c (pspace_getset): Likewise.
12339 * python/py-record-btrace.c (btpy_insn_getset, btpy_call_getset):
12340 Likewise.
12341 * python/py-record.c (recpy_record_getset): Likewise.
12342 * python/py-symbol.c (symbol_object_getset): Likewise.
12343 * python/py-symtab.c (symtab_object_getset, sal_object_getset):
12344 Likewise.
12345 * python/py-type.c (type_object_getset, field_object_getset):
12346 Likewise.
12347 * python/py-value.c (value_object_getset): Likewise.
12348
12349 2017-04-05 Pedro Alves <palves@redhat.com>
12350
12351 * python/python-internal.h (gdb_PyObject_CallMethod)
12352 (gdb_PyErr_NewException, gdb_PySys_GetObject, gdb_PySys_SetPath):
12353 New functions.
12354 (GDB_PYSYS_SETPATH_CHAR, PyObject_CallMethod, PyErr_NewException)
12355 (PySys_GetObject, PySys_SetPath): New macros.
12356
12357 2017-04-05 Pedro Alves <palves@redhat.com>
12358
12359 * mi/mi-cmd-info.c (mi_cmd_info_os): Call info_osdata instead of
12360 info_osdata_command.
12361 * osdata.c (info_osdata_command): Rename to ...
12362 (info_osdata): ... this. Constify 'type' parameter, and remove
12363 the 'from_tty' parameter. Accept NULL TYPE.
12364 (info_osdata_command): New function.
12365 * osdata.h (info_osdata_command): Remove declaration.
12366 (info_osdata): New declaration.
12367
12368 2017-04-05 Pedro Alves <palves@redhat.com>
12369
12370 * mi/mi-cmd-break.c (mi_cmd_break_insert_1, mi_cmd_break_insert)
12371 (mi_cmd_dprintf_insert, mi_cmd_break_passcount)
12372 (mi_cmd_break_watch, mi_cmd_break_commands): Constify 'command'
12373 parameter.
12374 * mi/mi-cmd-catch.c (mi_cmd_catch_assert, mi_cmd_catch_exception)
12375 (mi_cmd_catch_load, mi_cmd_catch_unload): Constify cmd' parameter.
12376 * mi/mi-cmd-disas.c (mi_cmd_disassemble): Constify 'command'
12377 parameter.
12378 * mi/mi-cmd-env.c (mi_cmd_env_pwd, mi_cmd_env_cd, mi_cmd_env_path)
12379 (mi_cmd_env_dir, mi_cmd_inferior_tty_set, _cmd_inferior_tty_show)
12380 * mi/mi-cmd-file.c (mi_cmd_file_list_exec_source_file)
12381 (mi_cmd_file_list_exec_source_files)
12382 (mi_cmd_file_list_shared_libraries): Constify 'command' parameter.
12383 * mi/mi-cmd-info.c (mi_cmd_info_ada_exceptions)
12384 (mi_cmd_info_gdb_mi_command, mi_cmd_info_os): Constify 'command'
12385 parameter.
12386 * mi/mi-cmd-stack.c (mi_cmd_enable_frame_filters)
12387 (mi_cmd_stack_list_frames, mi_cmd_stack_info_depth)
12388 (mi_cmd_stack_list_locals, mi_cmd_stack_list_args)
12389 (mi_cmd_stack_list_variables, mi_cmd_stack_select_frame)
12390 (mi_cmd_stack_info_frame): Constify 'command' parameter.
12391 * mi/mi-cmd-target.c (mi_cmd_target_file_get)
12392 (mi_cmd_target_file_put, mi_cmd_target_file_delete): Constify
12393 'command' parameter.
12394 * mi/mi-cmd-var.c (mi_cmd_var_create, mi_cmd_var_delete)
12395 (mi_cmd_var_set_format, mi_cmd_var_set_visualizer)
12396 (mi_cmd_var_set_frozen, mi_cmd_var_show_format)
12397 (mi_cmd_var_info_num_children, mi_cmd_var_list_children)
12398 (mi_cmd_var_info_type, mi_cmd_var_info_path_expression)
12399 (mi_cmd_var_info_expression, mi_cmd_var_show_attributes)
12400 (mi_cmd_var_evaluate_expression, mi_cmd_var_assign)
12401 (mi_cmd_var_update, mi_cmd_enable_pretty_printing)
12402 (mi_cmd_var_set_update_range): Constify 'command' parameter.
12403 * mi/mi-cmds.h (mi_cmd_argv_ftype): Constify 'command' parameter.
12404 * mi/mi-interp.c (mi_cmd_interpreter_exec): Constify 'command'
12405 parameter.
12406 * mi/mi-main.c (mi_cmd_gdb_exit, mi_cmd_exec_next)
12407 (mi_cmd_exec_next_instruction, mi_cmd_exec_step)
12408 (mi_cmd_exec_step_instruction, mi_cmd_exec_finish)
12409 (mi_cmd_exec_return ,mi_cmd_exec_jump, mi_cmd_exec_continue)
12410 (mi_cmd_exec_interrupt, mi_cmd_exec_run, mi_cmd_target_detach)
12411 (mi_cmd_target_flash_erase, mi_cmd_thread_select)
12412 (mi_cmd_thread_list_ids, mi_cmd_thread_info)
12413 (mi_cmd_list_thread_groups, mi_cmd_data_list_register_names)
12414 (mi_cmd_data_list_changed_registers)
12415 (mi_cmd_data_write_register_values)
12416 (mi_cmd_data_evaluate_expression, mi_cmd_data_read_memory)
12417 (mi_cmd_data_read_memory_bytes, mi_cmd_data_write_memory)
12418 (mi_cmd_data_write_memory_bytes, mi_cmd_enable_timings)
12419 (mi_cmd_list_features, mi_cmd_list_target_features)
12420 (mi_cmd_add_inferior, mi_cmd_remove_inferior)
12421 (mi_cmd_trace_define_variable, mi_cmd_trace_list_variables)
12422 (mi_cmd_trace_find, mi_cmd_trace_save, mi_cmd_trace_start)
12423 (mi_cmd_trace_status, mi_cmd_trace_stop, mi_cmd_ada_task_info)
12424 (mi_cmd_trace_frame_collected): Constify 'command'
12425 parameter.
12426 * mi/mi-symbol-cmds.c (mi_cmd_symbol_list_lines): Constify
12427 'command' parameter.
12428
12429 2017-04-05 Pedro Alves <palves@redhat.com>
12430
12431 * ada-lang.c (ada_completer_word_break_characters): Now a const
12432 array.
12433 (ada_get_gdb_completer_word_break_characters): Constify.
12434 * completer.c (gdb_completer_command_word_break_characters)
12435 (gdb_completer_file_name_break_characters)
12436 (gdb_completer_quote_characters): Now const arrays.
12437 (get_gdb_completer_quote_characters): Constify.
12438 (set_rl_completer_word_break_characters): New function.
12439 (set_gdb_completion_word_break_characters)
12440 (complete_line_internal): Use it.
12441 * completer.h (get_gdb_completer_quote_characters): Constify.
12442 (set_rl_completer_word_break_characters): Declare.
12443 * f-lang.c (f_word_break_characters): Constify.
12444 * language.c (default_word_break_characters): Constify.
12445 * language.h (language_defn::la_word_break_characters): Constify.
12446 (default_word_break_characters): Constify.
12447 * top.c (init_main): Use set_rl_completer_word_break_characters.
12448
12449 2017-04-05 Pedro Alves <palves@redhat.com>
12450
12451 * aix-thread.c (aix_thread_pid_to_str)
12452 (aix_thread_extra_thread_info): Constify.
12453 * bsd-kvm.c (bsd_kvm_pid_to_str): Constify.
12454 * bsd-uthread.c (bsd_uthread_extra_thread_info)
12455 (bsd_uthread_pid_to_str): Constify.
12456 * corelow.c (core_pid_to_str): Constify.
12457 * darwin-nat.c (darwin_pid_to_str): Constify.
12458 * fbsd-nat.c (fbsd_pid_to_str): Constify.
12459 * fbsd-tdep.c (fbsd_core_pid_to_str, gdbarch_core_pid_to_str):
12460 Constify.
12461 * gnu-nat.c (gnu_pid_to_str): Constify.
12462 * go32-nat.c (go32_pid_to_str): Constify.
12463 * i386-cygwin-tdep.c (i386_windows_core_pid_to_str): Constify.
12464 * inf-ptrace.c (inf_ptrace_pid_to_str): Constify.
12465 * inferior.c (inferior_pid_to_str): Constify.
12466 * linux-nat.c (linux_nat_pid_to_str): Constify.
12467 * linux-tdep.c (linux_core_pid_to_str): Constify.
12468 * linux-thread-db.c (thread_db_pid_to_str)
12469 (thread_db_extra_thread_info): Constify.
12470 * nto-tdep.c (nto_extra_thread_info): Constify.
12471 * nto-tdep.h (nto_extra_thread_info): Constify.
12472 * obsd-nat.c (obsd_pid_to_str): Constify.
12473 * procfs.c (procfs_pid_to_str): Constify.
12474 * ravenscar-thread.c (ravenscar_extra_thread_info)
12475 (ravenscar_pid_to_str): Constify.
12476 * remote-sim.c (gdbsim_pid_to_str): Constify.
12477 * remote.c (remote_threads_extra_info, remote_pid_to_str):
12478 Constify.
12479 * sol-thread.c (solaris_pid_to_str): Constify.
12480 * sol2-tdep.c (sol2_core_pid_to_str): Constify.
12481 * sol2-tdep.h (sol2_core_pid_to_str): Constify.
12482 * target.c (default_pid_to_str, target_pid_to_str)
12483 (normal_pid_to_str, default_pid_to_str): Constify.
12484 * target.h (target_ops::to_pid_to_str)
12485 (target_ops::to_extra_thread_info): Constify.
12486 (target_pid_to_str, normal_pid_to_str): Constify.
12487 * windows-nat.c (windows_pid_to_str): Constify.
12488 * gdbarch.sh (core_pid_to_str): Constify.
12489 * target-delegates.c: Regenerate.
12490 * gdbarch.h, gdbarch.c: Regenerate.
12491
12492 2017-04-05 Pedro Alves <palves@redhat.com>
12493
12494 * main.c (captured_main_1): Use gdb::unique_xmalloc_ptr to manage
12495 the memory of the temporary warning_pre_print override.
12496 * utils.c (warning_pre_print): Constify.
12497 * utils.h (warning_pre_print): Constify.
12498
12499 2017-04-05 Pedro Alves <palves@redhat.com>
12500
12501 * cli/cli-cmds.c (shell_escape): Constify 'arg' parameter.
12502 (shell_command): New function.
12503 (make_command): Use std::string.
12504 (init_cli_cmds): Register shell_command instead of shell_escape.
12505
12506 2017-04-05 Pedro Alves <palves@redhat.com>
12507
12508 * breakpoint.c (dprintf_function, dprintf_channel): Don't initialize.
12509 * tracepoint.c (default_collect): Don't initialize.
12510
12511 2017-04-05 Pedro Alves <palves@redhat.com>
12512
12513 * macroexp.c (macro_buffer::shared): Now a bool.
12514 (init_buffer): Update.
12515 (init_shared_buffer): Constify 'addr' parameter.
12516 (substitute_args, expand, macro_expand, macro_expand_next): Remove
12517 casts.
12518
12519 2017-04-05 Pedro Alves <palves@redhat.com>
12520
12521 * arm-tdep.c (show_disassembly_style_sfunc): Constify local.
12522 * disasm.c (set_disassembler_options): Constify local.
12523 * i386-tdep.c (i386_print_insn): Remove cast and FIXME comment.
12524
12525 2017-04-05 Sergio Durigan Junior <sergiodj@redhat.com>
12526
12527 PR gdb/21352
12528 * tracefile.c (tsave_command): Fix argument parsing for '-r'
12529 option.
12530
12531 2017-04-05 Yao Qi <yao.qi@linaro.org>
12532
12533 * frame.c (frame_unwind_register_unsigned): Call
12534 frame_unwind_register_value.
12535
12536 2017-04-05 Yao Qi <yao.qi@linaro.org>
12537
12538 * gdb.threads/thread-specific-bp.exp (check_thread_specific_breakpoint):
12539 Use gdb_test_multiple, and don't match anchor.
12540
12541 2017-04-05 Pedro Alves <palves@redhat.com>
12542
12543 * MAINTAINERS (Global Maintainers): Add Simon Marchi.
12544 (Write After Approval): Remove Simon Marchi.
12545
12546 2017-04-05 Pedro Alves <palves@redhat.com>
12547
12548 * common/gdb_optional.h (optional::optional): Make constexpr and
12549 initialize m_dummy.
12550
12551 2017-04-04 John Baldwin <jhb@FreeBSD.org>
12552
12553 * amd64-fbsd-tdep.c: Remove "bsd-uthread.h" include.
12554 (amd64fbsd_jmp_buf_reg_offset): Remove.
12555 (amd64fbsd_supply_uthread): Remove function.
12556 (amd64fbsd_collect_uthread): Remove function.
12557 (amd64fbsd_init_abi): Don't set bsd-uthread callbacks.
12558 * configure.tgt (i[34567]86-*-freebsd*): Remove bsd-uthread.o.
12559 (x86_64-*-freebsd*): Remove bsd-uthread.o.
12560 (fbsd-nat.c): Update comment.
12561 * i386-fbsd-tdep.c: Remove "bsd-uthread.h" include.
12562 (i386fbsd_jmp_buf_reg_offset): Remove.
12563 (i386fbsd_supply_uthread): Remove function.
12564 (i386fbsd_collect_uthread): Remove function.
12565 (i386fbsd_init_abi): Don't set bsd-uthread callbacks.
12566
12567 2017-04-04 John Baldwin <jhb@FreeBSD.org>
12568
12569 * Makefile.in (ALL_64_TARGET_OBS): Remove alpha-fbsd-tdep.o.
12570 (ALLDEPFILES): Remove alpha-fbsd-tdep.c
12571 * NEWS: Mention that support for FreeBSD/alpha was removed.
12572 * alpha-fbsd-tdep.c: Delete file.
12573 * config/alpha/fbsd.mh: Delete file.
12574 * configure.host: Delete alpha*-*-freebsd* and
12575 alpha*-*-kfreebsd*-gnu.
12576 * configure.tgt: Delete alpha*-*-freebsd* and
12577 alpha*-*-kfreebsd*-gnu.
12578
12579 2017-04-04 John Baldwin <jhb@FreeBSD.org>
12580
12581 * amd64-bsd-nat.c (amd64bsd_fetch_inferior_registers,
12582 amd64bsd_store_inferior_registers): Use ptid from regcache.
12583
12584 2017-04-04 Pedro Alves <palves@redhat.com>
12585
12586 * dwarf2read.c (lnp_state_machine): Now a class. Initialize all
12587 data fields, make them private and add "m_" prefixes.
12588 (lnp_state_machine::lnp_state_machine): New ctor.
12589 (record_line, check_line_address, handle_set_discriminator)
12590 (handle_set_address, handle_advance_pc, handle_special_opcode)
12591 (handle_advance_line, handle_set_file, handle_negate_stmt)
12592 (handle_const_add_pc, handle_fixed_advance_pc, handle_copy)
12593 (end_sequence, advance_line): New methods.
12594 (m_gdbarch, m_record_lines_p): New fields.
12595 (lnp_reader_state): Delete.
12596 (dwarf_record_line): Rename to ...
12597 (lnp_state_machine::record_line): ... adjust.
12598 (init_lnp_state_machine): Delete.
12599 (lnp_state_machine::lnp_state_machine): New.
12600 (check_line_address): Rename to ...
12601 (lnp_state_machine::check_line_address): This.
12602 (dwarf_decode_lines_1): Remove reference to "reader_state".
12603 Adjust lnp_state_machine having a non-default ctor. Use bool.
12604 State machine internal state manipulation moved to
12605 lnp_state_machine methods.
12606
12607 2017-04-04 Pedro Alves <palves@redhat.com>
12608
12609 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
12610 unittests/offset-type-selftests.c.
12611 (SUBDIR_UNITTESTS_OBS): Add offset-type-selftests.o.
12612 * common/offset-type.h: New file.
12613 * common/preprocessor.h: New file.
12614 * common/traits.h: New file.
12615 * common/valid-expr.h: New file.
12616 * dwarf2expr.c: Include "common/underlying.h". Adjust to use
12617 sect_offset and cu_offset strong typedefs throughout.
12618 * dwarf2expr.h: Adjust to use sect_offset and cu_offset strong
12619 typedefs throughout.
12620 * dwarf2loc.c: Include "common/underlying.h". Adjust to use
12621 sect_offset and cu_offset strong typedefs throughout.
12622 * dwarf2read.c: Adjust to use sect_offset and cu_offset strong
12623 typedefs throughout.
12624 * gdbtypes.h: Include "common/offset-type.h".
12625 (cu_offset): Now an offset type (strong typedef) instead of a
12626 struct.
12627 (sect_offset): Likewise.
12628 (union call_site_parameter_u): Rename "param_offset" field to
12629 "param_cu_off".
12630 * unittests/offset-type-selftests.c: New file.
12631
12632 2017-04-04 Pedro Alves <palves@redhat.com>
12633
12634 * common/underlying.h: New file.
12635 * dwarf2read.c: Include "common/gdb_optional.h" and
12636 "common/underlying.h".
12637 (dir_index, file_name_index): New types.
12638 (file_entry): Use them.
12639 (file_entry::include): Use to_underlying.
12640 (line_header::add_file_name): Use dir_index.
12641 (read_formatted_entries): Use gdb::optional. Read form before
12642 writting to file_entry.
12643 (dwarf_decode_line_header): Use dir_index.
12644 (lnp_state_machine::current_file): Use to_underlying.
12645 (lnp_state_machine::file): Change type to file_name_index.
12646 (dwarf_record_line): Use to_underlying.
12647 (init_lnp_state_machine): Use file_name_index.
12648 (dwarf_decode_lines_1): Use dir_index and file_name_index.
12649
12650 2017-04-04 Pedro Alves <palves@redhat.com>
12651
12652 * common/gdb_optional.h (gdb::optiona): Add operator->, operator*,
12653 operator bool, has_value and get methods.
12654
12655 2017-04-04 Pedro Alves <palves@redhat.com>
12656
12657 * dwarf2read.c (struct file_entry): Add ctors, and initialize all
12658 fields.
12659 (line_header): Initialize all data fields. Change type of
12660 standard_opcode_lengths to std::unique_ptr<unsigned char[]>.
12661 Change type of include_dirs to std::vector<const char *>. Remove
12662 num_include_dirs, include_dirs_size. Change type of file_names to
12663 std::vector<file_entry>. Remove num_file_names, file_names_size.
12664 (line_header::line_header): New.
12665 (line_header::add_include_dir, line_header::add_file_name): New
12666 methods.
12667 (line_header::include_dir_at): Remove NULL check.
12668 (line_header::file_name_at): Add const overload.
12669 (line_header_up): New unique_ptr typedef.
12670 (dw2_get_file_names_reader): Use line_header_up. Adjust to use
12671 std::vector. Remove free_line_header call.
12672 (dwarf2_build_include_psymtabs): Use line_header_up. Remove
12673 free_line_header call.
12674 (free_cu_line_header): Delete.
12675 (handle_DW_AT_stmt_list, handle_DW_AT_stmt_list)
12676 (setup_type_unit_groups): Use line_header_up instead of cleanups.
12677 Adjust to use std::vector.
12678 (free_line_header): Delete.
12679 (free_line_header_voidp): Use delete.
12680 (add_include_dir): Replace with ...
12681 (line_header::add_include_dir): ... this method. Use std::vector.
12682 (add_file_name): Replace with ...
12683 (line_header::add_file_name): ... this method. Use std::vector.
12684 (add_include_dir_stub): Delete.
12685 (read_formatted_entries): Remove memset.
12686 (dwarf_decode_line_header): Return a line_header_up instead of a
12687 raw pointer. Remove cleanup handling. Pass lambdas to
12688 read_formatted_entries. Adjust to use line_header methods.
12689 (dwarf_decode_lines_1): Adjust to use line_header methods.
12690 (dwarf_decode_lines, file_file_name, file_full_name): Adjust to
12691 use std::vector.
12692
12693 2017-04-04 Simon Marchi <simon.marchi@polymtl.ca>
12694
12695 * remote.c (set_general_thread, set_continue_thread): Use ptid_t
12696 instead of struct ptid.
12697
12698 2017-05-04 Alan Hayward <alan.hayward@arm.com>
12699
12700 * frame.c (get_frame_register_bytes): Unwind using value.
12701 (put_frame_register_bytes): Likewise.
12702
12703 2017-03-30 Iain Buclaw <ibuclaw@gdcproject.org>
12704
12705 * d-exp.y (type_aggregate_p): Treat TYPE_CODE_MODULE as being
12706 aggregate-like.
12707
12708 2017-03-29 Jan Kratochvil <jan.kratochvil@redhat.com>
12709
12710 * auto-load.c (auto_load_section_scripts): Check SEC_HAS_CONTENTS.
12711
12712 2017-03-29 Yao Qi <yao.qi@linaro.org>
12713
12714 * gdbthread.h (struct thread_info): Declare constructor and
12715 destructor. Add some in-class member initializers.
12716 * thread.c (free_thread): Remove.
12717 (init_thread_list): Call delete instead of free_thread.
12718 (new_thread): Call thread_info constructor.
12719 (thread_info::thread_info): New function.
12720 (thread_info::~thread_info): New function.
12721 (delete_thread_1): Call delete instead of free_thread.
12722 (make_cleanup_restore_current_thread): Move tp and frame to
12723 inner block.
12724
12725 2017-03-28 Anton Kolesov <anton.kolesov@synopsys.com>
12726
12727 * arc-tdep.c (arc_frame_cache): Add support for prologue analysis.
12728 (arc_skip_prologue): Likewise.
12729 (arc_make_frame_cache): Likewise.
12730 (arc_pv_get_operand): New function.
12731 (arc_is_in_prologue): Likewise.
12732 (arc_analyze_prologue): Likewise.
12733 (arc_print_frame_cache): Likewise.
12734 (MAX_PROLOGUE_LENGTH): New constant.
12735
12736 2017-03-28 Anton Kolesov <anton.kolesov@synopsys.com>
12737
12738 * configure.tgt: Add arc-insn.o.
12739 * arc-tdep.c (arc_delayed_print_insn): Make non-static.
12740 (dump_arc_instruction_command): New function.
12741 (arc_fprintf_disasm): Likewise.
12742 (arc_disassemble_info): Likewise.
12743 (arc_insn_get_operand_value): Likewise.
12744 (arc_insn_get_operand_value_signed): Likewise.
12745 (arc_insn_get_memory_base_reg): Likewise.
12746 (arc_insn_get_memory_offset): Likewise.
12747 (arc_insn_get_branch_target): Likewise.
12748 (arc_insn_dump): Likewise.
12749 (arc_insn_get_linear_next_pc): Likewise.
12750 * arc-tdep.h (arc_delayed_print_insn): Add function declaration.
12751 (arc_disassemble_info): Likewise.
12752 (arc_insn_get_branch_target): Likewise.
12753 (arc_insn_get_linear_next_pc): Likewise.
12754 * NEWS: Mention new "maint print arc arc-instruction".
12755
12756 2017-03-28 Anton Kolesov <anton.kolesov@synopsys.com>
12757
12758 * arc-tdep (maintenance_print_arc_list): New variable.
12759 (maintenance_print_arc_command): New function.
12760
12761 2017-03-28 Anton Kolesov <anton.kolesov@synopsys.com>
12762
12763 * arc-tdep.c (core_v2_register_names, core_arcompact_register_names)
12764 Add "limm" and "reserved".
12765 (arc_cannot_fetch_register, arc_cannot_store_register): Add
12766 ARC_RESERVED_REGNUM and ARC_LIMM_REGNUM.
12767 * arc-tdep.h (arc_regnum): Likewise.
12768
12769 2017-03-27 Max Filippov <jcmvbkbc@gmail.com>
12770
12771 * xtensa-linux-nat.c (fill_gregset): Call regcache_raw_collect
12772 for THREADPTR register.
12773 (supply_gregset_reg): Call regcache_raw_supply for THREADPTR
12774 register.
12775 * xtensa-tdep.c (XTENSA_DBREGN_UREG): New definition.
12776 (xtensa_derive_tdep): Initialize tdep->threadptr_regnum.
12777 * xtensa-tdep.h (gdbarch_tdep::threadptr_regnum): New field.
12778
12779 2017-03-27 Max Filippov <jcmvbkbc@gmail.com>
12780
12781 * xtensa-tdep.c (xtensa_pseudo_register_read): Treat all
12782 registers above gdbarch_num_regs (gdbarch) as privileged in
12783 call0 ABI.
12784
12785 2017-03-27 Max Filippov <jcmvbkbc@gmail.com>
12786
12787 * xtensa-linux-nat.c (fill_gregset): Call regcache_raw_collect
12788 for a single specified register or for all registers in
12789 a0_base..a0_base + C0_NREGS range.
12790 (supply_gregset_reg): Call regcache_raw_supply for a single
12791 specified register or for all registers in a0_base..a0_base +
12792 C0_NREGS range.
12793
12794 2017-03-27 Max Filippov <jcmvbkbc@gmail.com>
12795
12796 * arch/xtensa.h (C0_NREGS): Add definition.
12797 * xtensa-tdep.c (C0_NREGS): Remove definition.
12798
12799 2017-03-27 Max Filippov <jcmvbkbc@gmail.com>
12800
12801 * xtensa-tdep.c (xtensa_scan_prologue, call0_analyze_prologue):
12802 Drop xtensa_default_isa initialization.
12803 (xtensa_gdbarch_init): Initialize xtensa_default_isa.
12804
12805 2017-03-27 Pedro Alves <palves@redhat.com>
12806
12807 * dwarf2read.c (file_entry) <dir_index>: Add comment.
12808 (file_entry::include_dir): New method.
12809 (line_header::include_dir_at, line_header::file_name_at): New
12810 methods.
12811 (setup_type_unit_groups, setup_type_unit_groups)
12812 (psymtab_include_file_name): Simplify using the new methods.
12813 (lnp_state_machine) <the_line_header>: New field.
12814 <file>: Add comment.
12815 (lnp_state_machine::current_file): New method.
12816 (dwarf_record_line): Simplify using the new methods.
12817 (init_lnp_state_machine): Initialize the "the_line_header" field.
12818 (dwarf_decode_lines_1, dwarf_decode_lines, file_file_name):
12819 Simplify using the new methods.
12820
12821 2017-03-27 Pedro Alves <palves@redhat.com>
12822
12823 * cp-name-parser.y (make_empty): Delete.
12824 (demangler_special, nested_name, ptr_operator, array_indicator)
12825 (direct_declarator, declarator_1): Use fill_comp instead of
12826 make_empty.
12827
12828 2017-03-27 Pedro Alves <palves@redhat.com>
12829
12830 * xml-support.h (gdb_xml_debug): Pass a "first-to-check" argument
12831 to ATTRIBUTE_PRINTF.
12832 * solib-target.c (library_list_start_list): Print "string" not
12833 "version".
12834 * xml-tdesc.c (tdesc_start_field): Pass "field_name" to
12835 gdb_xml_error call.
12836
12837 2017-03-27 Pedro Alves <palves@redhat.com>
12838
12839 * dwarf2read.c (struct file_and_directory): New.
12840 (dwarf2_get_dwz_file): Adjust to use std::string.
12841 (dw2_get_file_names_reader): Adjust to use file_and_directory.
12842 (find_file_and_directory): Adjust to return a file_and_directory
12843 object.
12844 (read_file_scope): Adjust to use file_and_directory. Remove
12845 make_cleanup/do_cleanups calls.
12846 (open_and_init_dwp_file): Adjust to use std::string. Remove
12847 make_cleanup/do_cleanups calls.
12848 * python/python.c (do_start_initialization): Adjust to ldirname
12849 returning a std::string.
12850 * utils.c (ldirname): Now returns a std::string.
12851 * utils.h (ldirname): Change return type to std::string.
12852 * xml-syscall.c (xml_init_syscalls_info): Adjust to ldirname
12853 returning a std::string.
12854 * xml-tdesc.c (file_read_description_xml): Likewise.
12855
12856 2017-03-24 Alan Hayward <alan.hayward@arm.com>
12857
12858 * regcache.c (regcache_debug_print_register): New function.
12859 * regcache.h (regcache_debug_print_register): New declaration.
12860 * target.c (debug_print_register): Remove.
12861 (target_fetch_registers): Call regcache_debug_print_register.
12862 (target_store_registers): Likewise.
12863
12864 2017-03-24 Pádraig Brady <pbrady@fb.com>
12865
12866 * dwarf2read.c (setup_type_unit_groups): Ensure dir_index doesn't
12867 reference beyond the 'lh->include_dirs' array before accessing to
12868 it.
12869 (psymtab_include_file_name): Likewise.
12870 (dwarf_decode_lines_1): Likewise.
12871 (dwarf_decode_lines): Likewise.
12872 (file_file_name): Likewise.
12873
12874 2017-03-23 Simon Marchi <simon.marchi@ericsson.com>
12875
12876 * fbsd-tdep.c (fbsd_corefile_thread): Don't set/restore
12877 inferior_ptid.
12878 * proc-service.c (ps_lgetregs, ps_lsetregs, ps_lgetfpregs,
12879 ps_lsetfpregs): Likewise.
12880 * regcache.c (regcache_raw_update, regcache_raw_write): Likewise.
12881 * sol-thread.c (ps_lgetregs, ps_lsetregs, ps_lgetfpregs,
12882 ps_lsetfpregs): Likewise.
12883 * target.c (target_fetch_registers, target_store_registers):
12884 Remove asserts.
12885
12886 2017-03-23 Alan Hayward <alan.hayward@arm.com>
12887
12888 * sol-thread.c (sol_thread_store_registers): Remove regcache calls.
12889
12890 2017-03-23 Yao Qi <yao.qi@linaro.org>
12891
12892 * aarch64-tdep.c (aarch64_process_record_test): Declare.
12893 (_initialize_aarch64_tdep): Register it.
12894 (aarch64_record_load_store): Handle PRFM instruction.
12895 (aarch64_process_record_test): New function.
12896
12897 2017-03-23 Yao Qi <yao.qi@linaro.org>
12898
12899 * aarch64-tdep.c (aarch64_record_load_store): Fix code
12900 indentation.
12901
12902 2017-03-23 Yao Qi <yao.qi@linaro.org>
12903
12904 * aarch64-tdep.c: Remove AARCH64_RECORD_FAILURE.
12905
12906 2017-03-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
12907
12908 python/python.c (do_start_initialization): Fix memory leak.
12909
12910 2017-03-22 Simon Marchi <simon.marchi@polymtl.ca>
12911
12912 * inf-ptrace.c (inf_ptrace_xfer_partial): Get pid from ptid
12913 using get_ptrace_pid.
12914 * linux-nat.c (linux_nat_xfer_partial): Don't set/restore
12915 inferior_ptid.
12916 (linux_proc_xfer_partial, linux_proc_xfer_spu): Use lwp of
12917 inferior_ptid instead of pid.
12918
12919 2017-03-22 Yao Qi <yao.qi@linaro.org>
12920
12921 * aarch64-tdep.c: Wrap locally used classes in anonymous
12922 namespace.
12923 * arm-tdep.c: Likewise.
12924 * linespec.c: Likewise.
12925 * ui-out.c: Likewise.
12926
12927 2017-03-22 Jonah Graham <jonah@kichwacoders.com>
12928
12929 PR gdb/19637
12930 * python/lib/gdb/printer/bound_registers.py: Import sys.
12931
12932 2017-03-21 Simon Marchi <simon.marchi@ericsson.com>
12933
12934 * windows-nat.c (do_windows_fetch_inferior_registers): Add
12935 windows_thread_info parameter and use it instead of
12936 current_thread.
12937 (windows_fetch_inferior_registers): Don't set current_thread,
12938 pass the thread to do_windows_fetch_inferior_registers. Use
12939 ptid from regcache instead of inferior_ptid.
12940 (do_windows_store_inferior_registers): Add windows_thread_info
12941 parameter and use it instead of current_thread.
12942 (windows_store_inferior_registers): Don't set current_thread,
12943 pass the thread to do_windows_store_inferior_registers. Use
12944 ptid from regcache instead of inferior_ptid.
12945
12946 2017-03-21 Simon Marchi <simon.marchi@ericsson.com>
12947
12948 * ser-mingw.c (ser_windows_raw): Remove reference to
12949 struct serial::current_timeout.
12950
12951 2017-03-21 Ivo Raisr <ivo.raisr@oracle.com>
12952
12953 PR tdep/20928
12954 * gdb/sparc-tdep.h (gdbarch_tdep) <sparc64_ccr_type>: New field.
12955 * gdb/sparc64-tdep.c (sparc64_ccr_type): New function.
12956 (sparc64_fsr_type): Fix %fsr decoding.
12957
12958 2017-03-21 Tim Wiederhake <tim.wiederhake@intel.com>
12959
12960 * python/py-record-btrace.c (btpy_insn_data): Change return type
12961 for Python 2.
12962
12963 2017-03-20 Simon Marchi <simon.marchi@polymtl.ca>
12964
12965 * spu-linux-nat.c (spu_fetch_inferior_registers,
12966 spu_store_inferior_registers): Use ptid from regcache, set and
12967 restore inferior_ptid.
12968 * spu-multiarch.c (spu_fetch_registers, spu_store_registers):
12969 Likewise.
12970
12971 2017-03-20 Simon Marchi <simon.marchi@polymtl.ca>
12972
12973 * i386-linux-nat.c (fetch_register, store_register,
12974 i386_linux_fetch_inferior_registers,
12975 i386_linux_store_inferior_registers): Use ptid from regcache.
12976 * ia64-linux-nat.c (ia64_linux_fetch_register,
12977 ia64_linux_store_register): Likewise.
12978 * inf-ptrace.c (inf_ptrace_fetch_register,
12979 inf_ptrace_store_register): Likewise.
12980 * m32r-linux-nat.c (m32r_linux_fetch_inferior_registers,
12981 m32r_linux_store_inferior_registers): Likewise.
12982 * m68k-bsd-nat.c (m68kbsd_fetch_inferior_registers,
12983 m68kbsd_store_inferior_registers): Likewise.
12984 * m68k-linux-nat.c (fetch_register, store_register,
12985 m68k_linux_fetch_inferior_registers,
12986 m68k_linux_store_inferior_registers): Likewise.
12987 * m88k-bsd-nat.c (m88kbsd_fetch_inferior_registers,
12988 m88kbsd_store_inferior_registers): Likewise.
12989 * mips-fbsd-nat.c (mips_fbsd_fetch_inferior_registers,
12990 mips_fbsd_store_inferior_registers): Likewise.
12991 * mips-linux-nat.c (mips64_linux_regsets_fetch_registers,
12992 mips64_linux_regsets_store_registers): Likewise.
12993 * mips-nbsd-nat.c (mipsnbsd_fetch_inferior_registers,
12994 mipsnbsd_store_inferior_registers): Likewise.
12995 * mips-obsd-nat.c (mips64obsd_fetch_inferior_registers,
12996 mips64obsd_store_inferior_registers): Likewise.
12997 * nto-procfs.c (procfs_fetch_registers, procfs_store_registers):
12998 Likewise.
12999 * ppc-fbsd-nat.c (ppcfbsd_fetch_inferior_registers,
13000 ppcfbsd_store_inferior_registers): Likewise.
13001 * ppc-linux-nat.c (ppc_linux_fetch_inferior_registers,
13002 ppc_linux_store_inferior_registers): Likewise.
13003 * ppc-nbsd-nat.c (ppcnbsd_fetch_inferior_registers,
13004 ppcnbsd_store_inferior_registers): Likewise.
13005 * ppc-obsd-nat.c (ppcobsd_fetch_registers,
13006 ppcobsd_store_registers): Likewise.
13007 * procfs.c (procfs_fetch_registers, procfs_store_registers):
13008 Likewise.
13009 * ravenscar-thread.c (ravenscar_fetch_registers,
13010 ravenscar_store_registers, ravenscar_prepare_to_store):
13011 Likewise.
13012 * record-btrace.c (record_btrace_fetch_registers,
13013 record_btrace_store_registers, record_btrace_prepare_to_store):
13014 Likewise.
13015 * remote-sim.c (gdbsim_fetch_register, gdbsim_store_register):
13016 Lookup inferior using ptid from regcache, instead of
13017 current_inferior.
13018 * remote.c (remote_fetch_registers, remote_store_registers): Use
13019 ptid from regcache.
13020 * rs6000-nat.c (fetch_register, store_register): Likewise.
13021 * s390-linux-nat.c (s390_linux_fetch_inferior_registers,
13022 s390_linux_store_inferior_registers): Likewise.
13023 * sh-nbsd-nat.c (shnbsd_fetch_inferior_registers,
13024 shnbsd_store_inferior_registers): Likewise.
13025 * sol-thread.c (sol_thread_fetch_registers,
13026 sol_thread_store_registers): Likewise.
13027 * sparc-nat.c (sparc_fetch_inferior_registers,
13028 sparc_store_inferior_registers): Likewise.
13029 * tilegx-linux-nat.c (fetch_inferior_registers,
13030 store_inferior_registers): Likewise.
13031 * vax-bsd-nat.c (vaxbsd_fetch_inferior_registers,
13032 vaxbsd_store_inferior_registers): Likewise.
13033 * xtensa-linux-nat.c (fetch_gregs, store_gregs, fetch_xtregs,
13034 store_xtregs): Likewise.
13035
13036 2017-03-20 Artemiy Volkov <artemiyv@acm.org>
13037
13038 PR gdb/14441
13039 * NEWS: Mention support for rvalue references in GDB and python.
13040 * doc/gdb.texinfo (C Plus Plus Expressions): Mention that GDB
13041 supports both lvalue and rvalue references.
13042
13043 2017-03-20 Artemiy Volkov <artemiyv@acm.org>
13044
13045 PR gdb/14441
13046 * gdbtypes.c (rank_one_type): Implement overloading
13047 resolution rules regarding rvalue references.
13048
13049 2017-03-20 Artemiy Volkov <artemiyv@acm.org>
13050
13051 PR gdb/14441
13052 * aarch64-tdep.c (aarch64_type_align)
13053 (aarch64_extract_return_value, aarch64_store_return_value): Change
13054 lvalue reference type checks to general reference type checks.
13055 * amd64-tdep.c (amd64_classify): Likewise.
13056 * amd64-windows-tdep.c (amd64_windows_passed_by_integer_register):
13057 Likewise.
13058 * arm-tdep.c (arm_type_align, arm_extract_return_value)
13059 (arm_store_return_value): Likewise.
13060 * ax-gdb.c (gen_fetch, gen_cast): Likewise.
13061 * c-typeprint.c (c_print_type): Likewise.
13062 * c-varobj.c (adjust_value_for_child_access, c_value_of_variable)
13063 (cplus_number_of_children, cplus_describe_child): Likewise.
13064 * compile/compile-c-symbols.c (generate_vla_size): Likewise.
13065 * completer.c (expression_completer): Likewise.
13066 * cp-support.c (make_symbol_overload_list_adl_namespace):
13067 Likewise.
13068 * darwin-nat-info.c (info_mach_region_command): Likewise.
13069 * dwarf2loc.c (entry_data_value_coerce_ref)
13070 (value_of_dwarf_reg_entry): Likewise.
13071 * eval.c (ptrmath_type_p, evaluate_subexp_standard)
13072 (evaluate_subexp_for_address, evaluate_subexp_for_sizeof):
13073 Likewise.
13074 * findvar.c (extract_typed_address, store_typed_address):
13075 Likewise.
13076 * gdbtypes.c (rank_one_type): Likewise.
13077 * hppa-tdep.c (hppa64_integral_or_pointer_p): Likewise.
13078 * infcall.c (value_arg_coerce): Likewise.
13079 * language.c (pointer_type): Likewise.
13080 * m32c-tdep.c (m32c_reg_arg_type, m32c_m16c_address_to_pointer):
13081 Likewise.
13082 * m88k-tdep.c (m88k_integral_or_pointer_p): Likewise.
13083 * mn10300-tdep.c (mn10300_type_align): Likewise.
13084 * msp430-tdep.c (msp430_push_dummy_call): Likewise.
13085 * ppc-sysv-tdep.c (do_ppc_sysv_return_value)
13086 (ppc64_sysv_abi_push_param, ppc64_sysv_abi_return_value):
13087 Likewise.
13088 * printcmd.c (print_formatted, x_command): Likewise.
13089 * python/py-type.c (typy_get_composite, typy_template_argument):
13090 Likewise.
13091 * python/py-value.c (valpy_referenced_value)
13092 (valpy_get_dynamic_type, value_has_field): Likewise.
13093 * s390-linux-tdep.c (s390_function_arg_integer): Likewise.
13094 * sparc-tdep.c (sparc_integral_or_pointer_p): Likewise.
13095 * sparc64-tdep.c (sparc64_integral_or_pointer_p): Likewise.
13096 * spu-tdep.c (spu_scalar_value_p): Likewise.
13097 * symtab.c (lookup_symbol_aux): Likewise.
13098 * typeprint.c (whatis_exp, print_type_scalar): Likewise.
13099 * valarith.c (binop_types_user_defined_p, unop_user_defined_p):
13100 Likewise.
13101 * valops.c (value_cast_pointers, value_cast)
13102 (value_reinterpret_cast, value_dynamic_cast, value_addr, typecmp)
13103 (value_struct_elt, value_struct_elt_bitpos)
13104 (value_find_oload_method_list, find_overload_match)
13105 (value_rtti_indirect_type): Likewise.
13106 * valprint.c (val_print_scalar_type_p, generic_val_print):
13107 Likewise.
13108 * value.c (value_actual_type, value_as_address, unpack_long)
13109 (pack_long, pack_unsigned_long, coerce_ref_if_computed)
13110 (coerce_ref): Likewise.
13111 * varobj.c (varobj_get_value_type): Likewise.
13112
13113 2017-03-20 Artemiy Volkov <artemiyv@acm.org>
13114
13115 PR gdb/14441
13116 * doc/python.texi (Types in Python): Add TYPE_CODE_RVALUE_REF to
13117 table of constants.
13118 * python/lib/gdb/command/explore.py: Support exploring values
13119 of rvalue reference types.
13120 * python/lib/gdb/types.py: Implement get_basic_type() for
13121 rvalue reference types.
13122 * python/py-type.c (pyty_codes) <TYPE_CODE_RVALUE_REF>: New
13123 constant.
13124 * python/py-value.c (valpy_getitem): Add an rvalue reference
13125 check.
13126 (valpy_reference_value): Add new parameter "refcode".
13127 (valpy_lvalue_reference_value, valpy_rvalue_reference_value):
13128 New wrappers for valpy_reference_value().
13129 * python/py-xmethods.c (gdbpy_get_xmethod_result_type)
13130 (gdbpy_invoke_xmethod): Likewise.
13131
13132 2017-03-20 Artemiy Volkov <artemiyv@acm.org>
13133
13134 PR gdb/14441
13135 * dwarf2read.c (process_die, read_type_die_1): Handle the
13136 DW_TAG_rvalue_reference_type DIE.
13137 (read_tag_reference_type): Add new parameter "refcode".
13138
13139 2017-03-20 Artemiy Volkov <artemiyv@acm.org>
13140
13141 PR gdb/14441
13142 * c-typeprint.c (c_print_type, c_type_print_varspec_prefix)
13143 (c_type_print_modifier, c_type_print_varspec_suffix)
13144 (c_type_print_base): Support printing rvalue reference types.
13145 * c-valprint.c (c_val_print, c_value_print): Support printing
13146 rvalue reference values.
13147
13148 2017-03-20 Artemiy Volkov <artemiyv@acm.org>
13149
13150 PR gdb/14441
13151 * cp-name-parser.y (ptr_operator): Handle the '&&' token in
13152 typename.
13153 * cp-support.c (replace_typedefs): Handle
13154 DEMANGLE_COMPONENT_RVALUE_REFERENCE.
13155 * python/py-type.c (typy_lookup_type): Likewise.
13156
13157 2017-03-20 Artemiy Volkov <artemiyv@acm.org>
13158
13159 PR gdb/14441
13160 * c-exp.y (ptr_operator): Handle the '&&' token in the typename.
13161 * parse.c (insert_type): Change assert statement.
13162 (follow_types): Handle rvalue reference types.
13163 * parser-defs.h (enum type_pieces) <tp_rvalue_reference>: New
13164 constant.
13165
13166 2017-03-20 Artemiy Volkov <artemiyv@acm.org>
13167
13168 PR gdb/14441
13169 * ada-lang.c (ada_evaluate_subexp): Adhere to the new
13170 value_ref() interface.
13171 * c-valprint.c (c_value_print): Likewise.
13172 * infcall.c (value_arg_coerce): Likewise.
13173 * python/py-value.c (valpy_reference_value): Likewise.
13174 * valops.c (value_cast, value_reinterpret_cast)
13175 (value_dynamic_cast, typecmp): Likewise.
13176 (value_ref): Parameterize by kind of return value reference type.
13177 * value.h (value_ref): Add new parameter "refcode".
13178
13179 2017-03-20 Artemiy Volkov <artemiyv@acm.org>
13180
13181 PR gdb/14441
13182 * dwarf2read.c (read_tag_reference_type): Use
13183 lookup_lvalue_reference_type() instead of lookup_reference_type().
13184 * eval.c (evaluate_subexp_standard): Likewise.
13185 * f-exp.y: Likewise.
13186 * gdbtypes.c (make_reference_type, lookup_reference_type):
13187 Generalize with rvalue reference types.
13188 (lookup_lvalue_reference_type, lookup_rvalue_reference_type): New
13189 convenience wrappers for lookup_reference_type().
13190 * gdbtypes.h (make_reference_type, lookup_reference_type): Add a
13191 reference kind parameter.
13192 (lookup_lvalue_reference_type, lookup_rvalue_reference_type): Add
13193 wrappers for lookup_reference_type().
13194 * guile/scm-type.c (gdbscm_type_reference): Use
13195 lookup_lvalue_reference_type() instead of lookup_reference_type().
13196 * guile/scm-value.c (gdbscm_value_dynamic_type): Likewise.
13197 * parse.c (follow_types): Likewise.
13198 * python/py-type.c (typy_reference, typy_lookup_type): Likewise.
13199 * python/py-value.c (valpy_get_dynamic_type, valpy_getitem):
13200 Likewise.
13201 * python/py-xmethods.c (gdbpy_get_xmethod_result_type)
13202 (gdbpy_invoke_xmethod): Likewise.
13203 * stabsread.c: Provide extra argument to make_reference_type()
13204 call.
13205 * valops.c (value_ref, value_rtti_indirect_type): Use
13206 lookup_lvalue_reference_type() instead of lookup_reference_type().
13207
13208 2017-03-20 Artemiy Volkov <artemiyv@acm.org>
13209
13210 PR gdb/14441
13211 * gdbtypes.h (enum type_code) <TYPE_CODE_RVALUE_REF>: New constant.
13212 (TYPE_IS_REFERENCE): New macro.
13213 (struct type): Add rvalue_reference_type field.
13214 (TYPE_RVALUE_REFERENCE_TYPE): New macro.
13215
13216 2017-03-20 Marc-Andre Laperle <marc-andre.laperle@ericsson.com>
13217
13218 * NEWS: Add an entry about new '-file-list-shared-libraries' command.
13219 * mi/mi-cmd-file.c (mi_cmd_file_list_shared_libraries):
13220 New function definition.
13221 * mi/mi-cmds.c (mi_cmds): Add -file-list-shared-libraries command.
13222 * mi/mi-cmds.h (mi_cmd_file_list_shared_libraries):
13223 New function declaration.
13224 * mi/mi-interp.c (mi_output_solib_attribs): New Function.
13225 * mi/mi-interp.h: New file.
13226 * solib.c (info_sharedlibrary_command): Replace for loop with
13227 ALL_SO_LIBS macro
13228 * solib.h (update_solib_list): New function declaration.
13229 (so_list_head): Move macro.
13230 * solist.h (ALL_SO_LIBS): New macro.
13231
13232 2017-03-20 Marc-Andre Laperle <marc-andre.laperle@ericsson.com>
13233
13234 * infcmd.c (post_create_inferior): Remove unused argument in
13235 call to solib_add.
13236 * remote.c (remote_start_remote): Likewise.
13237 * solib-frv.c (frv_fetch_objfile_link_map): Likewise.
13238 * solib-svr4.c: (svr4_fetch_objfile_link_map): Likewise.
13239 (enable_break): Likewise.
13240 * solib.c (update_solib_list): Remove unused target argument
13241 and its documentation.
13242 (solib_add): Remove unused target argument. Remove unused
13243 argument in call to update_solib_list.
13244 (info_sharedlibrary_command): Remove unused argument in call
13245 to update_solib_list.
13246 (sharedlibrary_command): Remove unused argument in call to
13247 solib_add.
13248 (handle_solib_event): Likewise.
13249 (reload_shared_libraries): Likewise.
13250 * solib.h (solib_add): Remove unused target argument.
13251
13252 2017-03-20 Andreas Arnez <arnez@linux.vnet.ibm.com>
13253
13254 * s390-linux-tdep.c (is_rsi, is_rie): Remove functions.
13255 (s390_displaced_step_fixup): Cover relative branches with the
13256 default fixup handling. This fixes lack of support for some
13257 relative branch instructions.
13258
13259 2017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
13260
13261 * i386-gnu-nat.c (gnu_fetch_registers, gnu_store_registers): Use
13262 ptid from regcache.
13263
13264 2017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
13265
13266 * i386-darwin-nat.c (i386_darwin_fetch_inferior_registers,
13267 i386_darwin_store_inferior_registers): Use ptid from regcache.
13268
13269 2017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
13270
13271 * i386-bsd-nat.c (i386bsd_fetch_inferior_registers,
13272 i386bsd_store_inferior_registers): Use ptid from regcache.
13273
13274 2017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
13275
13276 * hppa-obsd-nat.c (hppaobsd_fetch_registers,
13277 hppaobsd_store_registers): Use ptid from regcache.
13278
13279 2017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
13280
13281 * hppa-nbsd-nat.c (hppanbsd_fetch_registers,
13282 hppanbsd_store_registers): Use ptid from regcache.
13283
13284 2017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
13285
13286 * hppa-linux-nat.c (fetch_register, store_register): Use ptid
13287 from regcache. Use get_ptrace_pid.
13288
13289 2017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
13290
13291 * corelow.c (get_core_register_section): Use ptid from regcache,
13292 update doc.
13293
13294 2017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
13295
13296 * bsd-uthread.c (bsd_uthread_fetch_registers,
13297 bsd_uthread_store_registers): Use ptid from regcache, set and
13298 restore inferior_ptid.
13299
13300 2017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
13301
13302 * arm-nbsd-nat.c (fetch_register, fetch_regs, fetch_fp_register,
13303 fetch_fp_regs, store_register, store_regs, store_fp_register,
13304 store_fp_regs): Use ptid from regcache.
13305
13306 2017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
13307
13308 * arm-linux-nat.c (fetch_fpregs, store_fpregs, fetch_regs,
13309 store_regs, fetch_wmmx_regs, store_wmmx_regs, fetch_vfp_regs,
13310 store_vfp_regs): Use ptid from regcache.
13311
13312 2017-03-17 Pedro Alves <palves@redhat.com>
13313
13314 PR remote/21188
13315 * ser-base.c (ser_base_wait_for): Add comment.
13316 (do_ser_base_readchar): Improve comment based on the ser-unix.c's
13317 version.
13318 * ser-unix.c (hardwire_raw): Remove reference to
13319 scb->current_timeout.
13320 (wait_for, do_hardwire_readchar, hardwire_readchar): Delete.
13321 (hardwire_ops): Install ser_base_readchar instead of
13322 hardwire_readchar.
13323 * serial.h (struct serial) <current_timeout, timeout_remaining>:
13324 Remove fields.
13325
13326 2017-03-17 Jonah Graham <jonah@kichwacoders.com>
13327
13328 PR gdb/19637
13329 * python/lib/gdb/printer/bound_registers.py: Add support for
13330 Python 3.
13331
13332 2017-03-16 Andreas Arnez <arnez@linux.vnet.ibm.com>
13333
13334 * dwarf2loc.c (indirect_synthetic_pointer): Get data type of
13335 pointed-to DIE and pass it to dwarf2_evaluate_loc_desc_full.
13336 (dwarf2_evaluate_loc_desc_full): New parameter subobj_type; rename
13337 byte_offset to subobj_byte_offset. Fix the handling of
13338 DWARF_VALUE_STACK on big-endian targets when coming via an
13339 implicit pointer.
13340 (dwarf2_evaluate_loc_desc): Adjust call to
13341 dwarf2_evaluate_loc_desc_full.
13342 * dwarf2loc.h (dwarf2_fetch_die_type_sect_off): New declaration.
13343 * dwarf2read.c (dwarf2_fetch_die_type_sect_off): New function.
13344
13345 2017-03-16 Yao Qi <yao.qi@linaro.org>
13346
13347 * arm-tdep.c (thumb_record_misc): Decode CBNZ, CBZ, REV16,
13348 and REVSH instructions.
13349
13350 2017-03-16 Yao Qi <yao.qi@linaro.org>
13351
13352 * arm-tdep.c [GDB_SELF_TEST]: include "selftests.h".
13353 (arm_record_test): Declare.
13354 (_initialize_arm_tdep) [GDB_SELF_TEST]: call register_self_test.
13355 (thumb_record_ld_st_reg_offset): Rewrite the opcode matching to
13356 align with the manual.
13357 (thumb_record_misc): Adjust the code order to align with the
13358 manual.
13359 (thumb2_record_decode_insn_handler): Fix instruction matching.
13360 (instruction_reader_thumb): New class.
13361 (arm_record_test): New function.
13362
13363 2017-03-16 Yao Qi <yao.qi@linaro.org>
13364
13365 * arm-tdep.c (abstract_memory_reader): New class.
13366 (instruction_reader): New class.
13367 (extract_arm_insn): Add argument 'reader'. Callers updated.
13368 (decode_insn): Likewise.
13369
13370 2017-03-16 Doug Evans <dje@google.com>
13371
13372 * guile/scm-lazy-string.c (lazy_string_smob): Clarify use of LENGTH
13373 member. Change type of TYPE member to SCM. All uses updated.
13374 (lsscm_make_lazy_string_smob): Add assert.
13375 (lsscm_make_lazy_string): Flag bad length values.
13376 (lsscm_elt_type): New function.
13377 (gdbscm_lazy_string_to_value): Rewrite to use
13378 lsscm_safe_lazy_string_to_value.
13379 (lsscm_safe_lazy_string_to_value): Fix handling of TYPE_CODE_PTR.
13380 * guile/scm-value.c (gdbscm_value_to_lazy_string): Flag bad length
13381 values. Fix TYPE_CODE_PTR. Handle TYPE_CODE_ARRAY. Handle typedefs
13382 in incoming type.
13383 * guile/guile-internal.h (tyscm_scm_to_type): Declare.
13384 * guile/scm-type.c (tyscm_scm_to_type): New function.
13385
13386 2017-03-15 Doug Evans <dje@google.com>
13387
13388 PR python/17728, python/18439, python/18779
13389 * python/py-lazy-string.c (lazy_string_object): Clarify use of LENGTH
13390 member. Change type of TYPE member to PyObject *. All uses updated.
13391 (stpy_convert_to_value): Fix handling of TYPE_CODE_PTR.
13392 (gdbpy_create_lazy_string_object): Flag bad length values.
13393 Handle TYPE_CODE_ARRAY with possibly different user-provided length.
13394 Handle typedefs in incoming type.
13395 (stpy_lazy_string_elt_type): New function.
13396 (gdbpy_extract_lazy_string): Call it.
13397 * python/py-value.c (valpy_lazy_string): Flag bad length values.
13398 Fix handling of TYPE_CODE_PTR. Handle TYPE_CODE_ARRAY. Handle
13399 typedefs in incoming type.
13400
13401 2017-03-16 Doug Evans <dje@google.com>
13402
13403 * guile/guile-internal.h (tyscm_scm_to_type): Declare.
13404 * guile/scm-type.c (tyscm_scm_to_type): New function.
13405
13406 2017-03-16 Jiong Wang <jiong.wang@arm.com>
13407
13408 * inf-ptrace.c (inf_ptrace_peek_poke): Change the type to
13409 "ULONGEST" for "skip".
13410
13411 2017-03-14 Andreas Arnez <arnez@linux.vnet.ibm.com>
13412
13413 PR gdb/21220
13414 * inf-ptrace.c (inf_ptrace_xfer_partial): In "case
13415 TARGET_OBJECT_MEMORY", extract the logic for ptrace peek/poke...
13416 (inf_ptrace_peek_poke): ...here. New function. Now also loop
13417 over ptrace peek/poke until end of buffer or error.
13418
13419 2017-03-14 Simon Marchi <simon.marchi@ericsson.com>
13420
13421 * parse.c (length_of_subexp): Make static.
13422 * parser-defs.h (length_of_subexp): Remove.
13423
13424 2017-03-14 Andreas Arnez <arnez@linux.vnet.ibm.com>
13425
13426 * linux-nat.c (linux_proc_xfer_partial): Handle write operations
13427 as well.
13428
13429 2017-03-14 Pedro Alves <palves@redhat.com>
13430
13431 * cp-name-parser.y (cp_demangled_name_to_comp): Update comment.
13432 (main): Use std::unique_ptr. Remove calls to
13433 cp_demangled_name_parse_free.
13434
13435 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
13436
13437 * alpha-bsd-nat.c (alphabsd_fetch_inferior_registers,
13438 alphabsd_store_inferior_registers): Use regcache->ptid instead
13439 of inferior_ptid.
13440
13441 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
13442
13443 * aix-thread.c (aix_thread_fetch_registers,
13444 aix_thread_store_registers): Use regcache->ptid instead of
13445 inferior_ptid.
13446
13447 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
13448
13449 * aarch64-linux-nat.c (fetch_gregs_from_thread,
13450 store_gregs_to_thread, fetch_fpregs_from_thread,
13451 store_fpregs_to_thread): Use regcache->ptid instead of
13452 inferior_ptid.
13453
13454 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
13455
13456 * amd64-linux-nat.c (amd64_linux_fetch_inferior_registers,
13457 amd64_linux_fetch_inferior_registers): Use regcache->ptid
13458 instead of inferior_ptid.
13459
13460 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
13461
13462 * target.c (target_fetch_registers, target_store_registers): Add
13463 assert.
13464
13465 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
13466
13467 * regcache.h (regcache_get_ptid): New function.
13468 * regcache.c (regcache_get_ptid): New function.
13469
13470 2017-03-13 Mark Wielaard <mark@klomp.org>
13471
13472 * cp-name-parser.y (make_empty): Initialize d_printing to zero.
13473
13474 2017-03-10 Keith Seitz <keiths@redhat.com>
13475
13476 PR c++/8218
13477 * c-typeprint.c (cp_type_print_method_args): Skip artificial arguments.
13478
13479 2017-03-08 Pedro Alves <palves@redhat.com>
13480
13481 PR gdb/18360
13482 * infrun.c (start_step_over, do_target_resume, resume)
13483 (restart_threads): Assert we're not resuming a thread that is
13484 meant to be stopped.
13485 (infrun_thread_stop_requested_callback): Delete.
13486 (infrun_thread_stop_requested): If the thread is internally
13487 stopped, queue a pending stop event and clear the thread's
13488 inline-frame state.
13489 (handle_stop_requested): New function.
13490 (handle_syscall_event, handle_inferior_event_1): Use
13491 handle_stop_requested.
13492 (handle_stop_requested): New function.
13493 (handle_signal_stop): Set the thread's stop_signal here instead of
13494 at caller.
13495 (finish_step_over): Clear step over info unconditionally.
13496 (handle_signal_stop): If the user had interrupted the event
13497 thread, consider the stop a random signal.
13498 (handle_signal_stop) <signal arrived while stepping over
13499 breakpoint>: Don't restart threads here.
13500 (stop_waiting): Don't clear step-over info here.
13501
13502 2017-03-08 Pedro Alves <palves@redhat.com>
13503
13504 PR 21206
13505 * common/gdb_unlinker.h (unlinker::unlinker): Attribute nonnull
13506 goes to argument 2, not 1.
13507
13508 2017-03-08 Pedro Alves <palves@redhat.com>
13509
13510 PR cli/21218
13511 * top.c (gdb_readline_wrapper): Avoid passing NULL to
13512 display_gdb_prompt.
13513 (command_line_input): Add comment.
13514
13515 2017-03-08 Pedro Alves <palves@redhat.com>
13516
13517 PR tui/21216
13518 * tui/tui-file.c (tui_file::write): New.
13519 * tui/tui-file.h (tui_file): Override "write".
13520 * tui/tui-io.c (do_tui_putc, update_start_line): New functions,
13521 factored out from ...
13522 (tui_puts): ... here.
13523 (tui_putc): Use them.
13524 (tui_write): New function.
13525 * tui/tui-io.h (tui_write): Declare.
13526
13527 2017-03-07 Sergio Durigan Junior <sergiodj@redhat.com>
13528
13529 * Makefile.in (SFILES): Replace "environ.c" with
13530 "common/environ.c".
13531 (HFILES_NO_SRCDIR): Likewise, for "environ.h".
13532 * environ.c: Include "common-defs.h" instead of "defs.h. Moved
13533 to...
13534 * common/environ.c: ... here.
13535 * environ.h: Moved to...
13536 * common/environ.h: ... here.
13537
13538 2017-03-07 Peter Bergner <bergner@vnet.ibm.com>
13539
13540 * gdbarch.sh (pstring_ptr): New static function.
13541 (gdbarch_disassembler_options): Use it.
13542 (gdbarch_verify_disassembler_options): Print valid_disassembler_options,
13543 not valid_disassembler_option->name.
13544 * gdbarch.c: Regenerate.
13545
13546 2017-03-07 Peter Bergner <bergner@vnet.ibm.com>
13547
13548 * config/powerpc/ppc64-linux.mh (MH_CFLAGS): Delete.
13549
13550 2017-03-07 Pedro Alves <palves@redhat.com>
13551
13552 * tui/tui-regs.c (tui_restore_gdbout): Don't delete gdb_stdout.
13553
13554 2017-03-07 Walfred Tedeschi <walfred.tedeschi@intel.com>
13555
13556 * i387-tdep.h (i387_reset_bnd_regs): Add function definition.
13557 * i387-tdep.c (i387_reset_bnd_regs): Add function implementation.
13558 * i386-tdep.c (i386_push_dummy_call): Call i387_reset_bnd_regs.
13559 * amd64-tdep.c (amd64_push_dummy_call): Call i387_reset_bnd_regs.
13560
13561 2017-03-06 Simon Marchi <simon.marchi@ericsson.com>
13562
13563 * xtensa-linux-nat.c (fetch_gregs): Remove const.
13564
13565 2017-03-03 Simon Marchi <simon.marchi@ericsson.com>
13566
13567 * remote.c (remote_add_target_side_commands): Use range-based
13568 for loop.
13569
13570 2017-03-03 Yao Qi <yao.qi@linaro.org>
13571
13572 PR gdb/21165
13573 * ada-valprint.c (ada_val_print_ref): Call value_fetch_lazy if
13574 value is lazy.
13575 * valprint.c (common_val_print): Likewise.
13576
13577 2017-02-28 Peter Bergner <bergner@vnet.ibm.com>
13578
13579 * NEWS: Mention new set/show disassembler-options commands.
13580 * doc/gdb.texinfo: Document new set/show disassembler-options commands.
13581 * disasm.c: Include "arch-utils.h", "gdbcmd.h" and "safe-ctype.h".
13582 (prospective_options): New static variable.
13583 (gdb_disassembler::gdb_disassembler): Initialize
13584 m_di.disassembler_options.
13585 (gdb_buffered_insn_length_init_dis): Initilize di->disassembler_options.
13586 (get_disassembler_options): New function.
13587 (set_disassembler_options): Likewise.
13588 (set_disassembler_options_sfunc): Likewise.
13589 (show_disassembler_options_sfunc): Likewise.
13590 (disassembler_options_completer): Likewise.
13591 (_initialize_disasm): Likewise.
13592 * disasm.h (get_disassembler_options): New prototype.
13593 (set_disassembler_options): Likewise.
13594 * gdbarch.sh (gdbarch_disassembler_options): New variable.
13595 (gdbarch_verify_disassembler_options): Likewise.
13596 * gdbarch.c: Regenerate.
13597 * gdbarch.h: Likewise.
13598 * arm-tdep.c (num_disassembly_options): Delete.
13599 (set_disassembly_style): Likewise.
13600 (arm_disassembler_options): New static variable.
13601 (set_disassembly_style_sfunc): Convert short style name into long
13602 option name. Call set_disassembler_options.
13603 (show_disassembly_style_sfunc): New function.
13604 (arm_gdbarch_init): Call set_gdbarch_disassembler_options and
13605 set_gdbarch_verify_disassembler_options.
13606 (_initialize_arm_tdep): Delete regnames variable and update callers.
13607 (arm_disassembler_options): Initialize.
13608 (disasm_options): New variable.
13609 (num_disassembly_options): Rename from this...
13610 (num_disassembly_styles): ...to this. Compute by scanning through
13611 disasm_options.
13612 (valid_disassembly_styles): Initialize using disasm_options.
13613 Remove calls to parse_arm_disassembler_option, get_arm_regnames and
13614 set_arm_regname_option.
13615 Pass show_disassembly_style_sfunc to the "disassembler" setshow command.
13616 * rs6000-tdep.c (powerpc_disassembler_options): New static variable.
13617 (rs6000_gdbarch_init): Call set_gdbarch_disassembler_options and
13618 set_gdbarch_verify_disassembler_options.
13619 * s390-tdep.c (s390_disassembler_options): New static variable.
13620 (s390_gdbarch_init):all set_gdbarch_disassembler_options and
13621 set_gdbarch_verify_disassembler_options.
13622
13623 2017-02-27 Simon Marchi <simon.marchi@ericsson.com>
13624
13625 * remote.c (remote_add_target_side_condition): Remove "struct"
13626 keyword from range-based for loop.
13627
13628 2017-02-27 Simon Marchi <simon.marchi@ericsson.com>
13629
13630 * remote.c (remote_add_target_side_condition): Use range-based
13631 for loop. Update comment.
13632
13633 2017-02-27 Yao Qi <yao.qi@linaro.org>
13634
13635 * f-typeprint.c (f_print_type): Check "varstring" is empty first.
13636
13637 2017-02-26 Alan Hayward <alan.hayward@arm.com>
13638
13639 * regcache.c (regcache_raw_update): New function.
13640 (regcache_raw_read): Move code to regcache_raw_update.
13641 * regcache.h (regcache_raw_update): New declaration.
13642 * remote.c (remote_prepare_to_store): Call regcache_raw_update.
13643
13644 2017-02-26 Jan Kratochvil <jan.kratochvil@redhat.com>
13645
13646 * dwarf2read.c (create_debug_type_hash_table): Initialize
13647 header.signature and header.type_offset_in_tu.
13648
13649 2017-02-24 Pedro Alves <palves@redhat.com>
13650
13651 * symtab.c (make_file_symbol_completion_list_1): Use
13652 add_symtab_completions.
13653
13654 2017-02-24 Alan Hayward <alan.hayward@arm.com>
13655
13656 * stack.c (frame_info): Use frame_unwind_register_value to avoid buf.
13657
13658 2017-02-24 Alan Hayward <alan.hayward@arm.com>
13659
13660 * i386-tdep.c (i386_pseudo_register_read_into_value): Use
13661 I386_MAX_REGISTER_SIZE.
13662 (i386_pseudo_register_write): Likewise.
13663 (i386_process_record): Likewise.
13664 * i387-tdep.c (i387_supply_xsave): Likewise.
13665 * m68k-linux-nat.c (fetch_register): Use M68K_MAX_REGISTER_SIZE.
13666 (store_register): Likewise.
13667
13668 2017-02-23 Pedro Alves <palves@redhat.com>
13669
13670 * ada-lang.c: Include "common/function-view.h".
13671 (ada_iterate_over_symbols): Adjust to use function_view as
13672 callback type.
13673 (struct add_partial_datum, ada_complete_symbol_matcher): Delete.
13674 (ada_make_symbol_completion_list): Use a lambda.
13675 (ada_exc_search_name_matches): Delete.
13676 (name_matches_regex): New.
13677 (ada_add_global_exceptions): Use a lambda and name_matches_regex.
13678 * compile/compile-c-support.c: Include "common/function-view.h".
13679 (print_one_macro): Change prototype to accept a ui_file pointer.
13680 (write_macro_definitions): Use a lambda.
13681 * dwarf2read.c: Include "common/function-view.h".
13682 (dw2_map_expand_apply, dw2_map_symtabs_matching_filename)
13683 (dw2_expand_symtabs_matching): Adjust to use function_view as
13684 callback type.
13685 * language.h: Include "common/function-view.h".
13686 (struct language_defn) <la_iterate_over_symbols>: Adjust to use
13687 function_view as callback type.
13688 (LA_ITERATE_OVER_SYMBOLS): Remove DATA parameter.
13689 * linespec.c: Include "common/function-view.h".
13690 (collect_info::add_symbol): New method.
13691 (struct symbol_and_data_callback, iterate_inline_only, struct
13692 symbol_matcher_data, iterate_name_matcher): Delete.
13693 (iterate_over_all_matching_symtabs): Adjust to use function_view
13694 as callback type and lambdas.
13695 (iterate_over_file_blocks): Adjust to use function_view as
13696 callback type.
13697 (decode_compound_collector): Now a class with private fields.
13698 (decode_compound_collector::release_symbols): New method.
13699 (collect_one_symbol): Rename to...
13700 (decode_compound_collector::operator()): ... this and adjust.
13701 (lookup_prefix_sym): decode_compound_collector construction bits
13702 move to decode_compound_collector ctor. Pass the
13703 decode_compound_collector object directly as callback. Remove
13704 cleanups and use decode_compound_collector::release_symbols
13705 instead.
13706 (symtab_collector): Now a class with private fields.
13707 (symtab_collector::release_symtabs): New method.
13708 (add_symtabs_to_list): Rename to...
13709 (symtab_collector::operator()): ... this and adjust.
13710 (collect_symtabs_from_filename): symtab_collector construction
13711 bits move to symtab_collector ctor. Pass the symtab_collector
13712 object directly as callback. Remove cleanups and use
13713 symtab_collector::release_symtabs instead.
13714 (collect_symbols): Delete.
13715 (add_matching_symbols_to_info): Use lambdas.
13716 * macrocmd.c (print_macro_callback): Delete.
13717 (info_macro_command): Use a lambda.
13718 (info_macros_command): Pass print_macro_definition as callable
13719 directly.
13720 (print_one_macro): Remove 'ignore' parameter.
13721 (macro_list_command): Adjust.
13722 * macrotab.c (macro_for_each_data::fn): Now a function_view.
13723 (macro_for_each_data::user_data): Delete field.
13724 (foreach_macro): Adjust to call the function_view.
13725 (macro_for_each): Adjust to use function_view as callback type.
13726 (foreach_macro_in_scope): Adjust to call the function_view.
13727 (macro_for_each_in_scope): Adjust to use function_view as callback
13728 type.
13729 * macrotab.h: Include "common/function-view.h".
13730 (macro_callback_fn): Declare a prototype instead of a pointer.
13731 Remove "user_data" parameter.
13732 (macro_for_each, macro_for_each_in_scope): Adjust to use
13733 function_view as callback type.
13734 * psymtab.c (partial_map_expand_apply)
13735 (psym_map_symtabs_matching_filename, recursively_search_psymtabs):
13736 Adjust to use function_view as callback type and to return bool.
13737 (psym_expand_symtabs_matching): Adjust to use function_view as
13738 callback types.
13739 * symfile-debug.c (debug_qf_map_symtabs_matching_filename): Adjust
13740 to use function_view as callback type and to return bool.
13741 (debug_qf_expand_symtabs_matching): Adjust to use function_view as
13742 callback types.
13743 * symfile.c (expand_symtabs_matching): Adjust to use function_view
13744 as callback types.
13745 * symfile.h: Include "common/function-view.h".
13746 (expand_symtabs_file_matcher_ftype)
13747 (expand_symtabs_symbol_matcher_ftype)
13748 (expand_symtabs_exp_notify_ftype): Remove "data" parameter and
13749 return bool.
13750 (quick_symbol_functions::map_symtabs_matching_filename)
13751 (quick_symbol_functions::expand_symtabs_matching): Adjust to use
13752 function_view as callback type and return bool.
13753 (expand_symtabs_matching): Adjust to use function_view as callback
13754 type.
13755 (maintenance_expand_name_matcher)
13756 (maintenance_expand_file_matcher): Delete.
13757 (maintenance_expand_symtabs): Use lambdas.
13758 * symtab.c (iterate_over_some_symtabs): Adjust to use
13759 function_view as callback types and return bool.
13760 (iterate_over_symtabs): Likewise. Use unique_xmalloc_ptr instead
13761 of a cleanup.
13762 (lookup_symtab_callback): Delete.
13763 (lookup_symtab): Use a lambda.
13764 (iterate_over_symbols): Adjust to use function_view as callback
13765 type.
13766 (struct search_symbols_data, search_symbols_file_matches)
13767 (search_symbols_name_matches): Delete.
13768 (search_symbols): Use a pair of lambdas.
13769 (struct add_name_data, add_macro_name, symbol_completion_matcher)
13770 (symtab_expansion_callback): Delete.
13771 (default_make_symbol_completion_list_break_on_1): Use lambdas.
13772 * symtab.h: Include "common/function-view.h".
13773 (iterate_over_some_symtabs): Adjust to use function_view as
13774 callback type and return bool.
13775 (iterate_over_symtabs): Adjust to use function_view as callback
13776 type.
13777 (symbol_found_callback_ftype): Remove 'data' parameter and return
13778 bool.
13779 (iterate_over_symbols): Adjust to use function_view as callback
13780 type.
13781
13782 2017-02-23 Pedro Alves <palves@redhat.com>
13783
13784 * Makefile.in (SUBDIR_UNITTESTS_SRCS, SUBDIR_UNITTESTS_OBS): New.
13785 (%.o) <unittests/%.c>: New pattern.
13786 * configure.ac ($development): Add $(SUBDIR_UNITTESTS_OBS) to
13787 CONFIG_OBS, and $(SUBDIR_UNITTESTS_SRCS) to CONFIG_SRCS.
13788 * common/function-view.h: New file.
13789 * unittests/function-view-selftests.c: New file.
13790 * configure: Regenerate.
13791
13792 2017-02-23 Simon Marchi <simon.marchi@ericsson.com>
13793
13794 * bsd-uthread.c (bsd_uthread_thread_alive): Use ptid instead of
13795 inferior_ptid.
13796 * go32-nat.c (go32_thread_alive): Likewise.
13797
13798 2017-02-23 Yao Qi <yao.qi@linaro.org>
13799
13800 * varobj-iter.h (varobj_iter_delete): Call xfree instead of
13801 delete.
13802
13803 2017-02-23 Yao Qi <yao.qi@linaro.org>
13804
13805 * varobj.c (varobj_clear_saved_item): Use delete instead of
13806 xfree.
13807 (update_dynamic_varobj_children): Likewise.
13808
13809 2017-02-21 Jan Kratochvil <jan.kratochvil@redhat.com>
13810
13811 * dwarf2read.c (dwarf2_record_block_ranges): Add forgotten BASEADDR.
13812
13813 2017-02-21 Simon Marchi <simon.marchi@ericsson.com>
13814
13815 * common/enum-flags.h (enum_flags::enum_flags): Initialize
13816 m_enum_value to 0 in default constructor.
13817
13818 2017-02-21 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
13819
13820 * rs6000-tdep.c (LOAD_AND_RESERVE_MASK): Rename from LWARX_MASK.
13821 (STORE_CONDITIONAL_MASK): Rename from STWCX_MASK.
13822 (LBARX_INSTRUCTION, LHARX_INSTRUCTION, LQARX_INSTRUCTION,
13823 STBCX_INSTRUCTION, STHCX_INSTRUCTION, STQCX_INSTRUCTION): New defines.
13824 (IS_LOAD_AND_RESERVE_INSN, IS_STORE_CONDITIONAL_INSN): New macros.
13825 (ppc_displaced_step_copy_insn): Use IS_LOAD_AND_RESERVE_INSN.
13826 (ppc_deal_with_atomic_sequence): Use IS_LOAD_AND_RESERVE_INSN and
13827 IS_STORE_CONDITIONAL_INSN.
13828
13829 2017-02-21 Jan Kratochvil <jan.kratochvil@redhat.com>
13830
13831 * dwarf2_rnglists_process: Initialize range_beginning and range_end.
13832
13833 2017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
13834
13835 * NEWS (Changes since GDB 7.12): Add DWARF-5.
13836
13837 2017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
13838
13839 * dwarf2read.c (skip_one_die, read_attribute_value)
13840 (dwarf2_const_value_attr, dump_die_shallow)
13841 (dwarf2_get_attr_constant_value, dwarf2_fetch_constant_bytes)
13842 (skip_form_bytes, attr_form_is_constant): Handle DW_FORM_data16.
13843
13844 2017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
13845
13846 * dwarf2read.c (read_file_scope): Rename DW_MACRO_GNU_*.
13847 (dwarf_parse_macro_header): Accept DWARF version 5.
13848 (dwarf_decode_macro_bytes, dwarf_decode_macros): Rename DW_MACRO_GNU_*.
13849
13850 2017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
13851
13852 * block.c (call_site_for_pc): Rename DW_OP_GNU_*, DW_TAG_GNU_* and
13853 DW_AT_GNU_*.
13854 * common/common-exceptions.h (enum errors): Likewise.
13855 * dwarf2-frame.c (class dwarf_expr_executor): Likewise.
13856 * dwarf2expr.c (dwarf_block_to_dwarf_reg)
13857 (dwarf_expr_context::execute_stack_op): Likewise.
13858 * dwarf2expr.h (struct dwarf_expr_context, struct dwarf_expr_piece):
13859 Likewise.
13860 * dwarf2loc.c (dwarf_evaluate_loc_desc::get_base_type)
13861 (dwarf_evaluate_loc_desc::push_dwarf_reg_entry_value)
13862 (show_entry_values_debug, call_site_to_target_addr)
13863 (func_addr_to_tail_call_list, func_verify_no_selftailcall)
13864 (dwarf_expr_reg_to_entry_parameter, dwarf_entry_parameter_to_value)
13865 (entry_data_value_free_closure, value_of_dwarf_reg_entry)
13866 (value_of_dwarf_block_entry, indirect_pieced_value)
13867 (symbol_needs_eval_context::push_dwarf_reg_entry_value):
13868 (disassemble_dwarf_expression): Likewise.
13869 * dwarf2read.c (process_die, inherit_abstract_dies)
13870 (read_call_site_scope): Likewise.
13871 * gdbtypes.h (struct func_type, struct call_site_parameter)
13872 (struct call_site): Likewise.
13873 * stack.c (read_frame_arg): Likewise.
13874 * std-operator.def (OP_VAR_ENTRY_VALUE): Likewise.
13875
13876 2017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
13877
13878 * defs.h (read_unsigned_leb128): New declaration.
13879 * dwarf2loc.c (decode_debug_loclists_addresses): New function.
13880 (decode_debug_loc_dwo_addresses): Update DEBUG_LOC_* to DW_LLE_*.
13881 (dwarf2_find_location_expression): Call also
13882 decode_debug_loclists_addresses. Handle DWARF-5 ULEB128 length.
13883 * dwarf2loc.h (dwarf2_version): New declaration.
13884 * dwarf2read.c (struct dwarf2_per_objfile): Add loclists, line_str,
13885 rnglists.
13886 (dwarf2_elf_names): Add .debug_loclists, .debug_line_str,
13887 .debug_rnglists.
13888 (struct dwop_section_names): Add loclists_dwo.
13889 (dwop_section_names): Add .debug_loclists.dwo.
13890 (struct comp_unit_head): Add unit_type, signature, type_offset_in_tu.
13891 (struct dwarf2_per_cu_data): Add dwarf_version.
13892 (struct dwo_sections): Add loclists.
13893 (struct attr_abbrev): Add implicit_const.
13894 (read_indirect_line_string): New declaration.
13895 (read_unsigned_leb128): Delete declaration.
13896 (rcuh_kind): New definition.
13897 (read_and_check_comp_unit_head): Change parameter
13898 is_debug_types_section to section_kind.
13899 (dwarf2_locate_sections): Handle loclists, line_str and rnglists.
13900 (read_comp_unit_head): Change parameter abfd to section, add parameter
13901 section_kind. Handle DWARF-5.
13902 (error_check_comp_unit_head): Accept also DWARF version 5.
13903 (read_and_check_comp_unit_head): Change parameter
13904 is_debug_types_section to section_kind.
13905 (read_and_check_type_unit_head): Delete function.
13906 (read_abbrev_offset): Handle DWARF-5.
13907 (create_debug_type_hash_table): Add parameter section_kind. Process
13908 only DW_UT_type. Use signature and type_offset_in_tu from struct
13909 comp_unit_head.
13910 (create_debug_types_hash_table): Update create_debug_type_hash_table
13911 caller.
13912 (create_all_type_units): Call create_debug_type_hash_table.
13913 (read_cutu_die_from_dwo, init_cutu_and_read_dies): Change
13914 read_and_check_type_unit_head caller to read_and_check_comp_unit_head
13915 caller.
13916 (skip_one_die): Handle DW_FORM_implicit_const.
13917 (dwarf2_rnglists_process): New function.
13918 (dwarf2_ranges_process): Call dwarf2_rnglists_process for DWARF-5.
13919 (abbrev_table_read_table): Handle DW_FORM_implicit_const.
13920 (read_attribute_value): Handle DW_FORM_implicit_const,
13921 DW_FORM_line_strp.
13922 (read_attribute): Handle DW_FORM_implicit_const.
13923 (read_indirect_string_at_offset_from): New function from
13924 read_indirect_string_at_offset.
13925 (read_indirect_string_at_offset): Call
13926 read_indirect_string_at_offset_from.
13927 (read_indirect_line_string_at_offset): New function.
13928 (read_indirect_string): New function comment.
13929 (read_indirect_line_string): New function.
13930 (read_unsigned_leb128): Make it global.
13931 (dwarf2_string_attr): Handle DWARF-5.
13932 (add_include_dir_stub, read_formatted_entries): New functions.
13933 (dwarf_decode_line_header, dump_die_shallow, cu_debug_loc_section):
13934 Handle DWARF-5.
13935 (per_cu_header_read_in): Update read_comp_unit_head caller.
13936 (dwarf2_version): New function.
13937 * symfile.h (struct dwarf2_debug_sections): Add loclists, line_str and
13938 rnglists.
13939 * xcoffread.c (dwarf2_xcoff_names): Update struct dwarf2_debug_sections
13940 fields.
13941
13942 2017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
13943
13944 * dwarf2read.c (abbrev_table_read_table): Read the data only once.
13945
13946 2017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
13947
13948 * dwarf2read.c (dwarf2_ranges_process): New function from
13949 dwarf2_ranges_read.
13950 (dwarf2_ranges_read, dwarf2_record_block_ranges): Use
13951 dwarf2_ranges_process.
13952
13953 2017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
13954
13955 * dwarf2read.c (create_debug_type_hash_table): New function from
13956 create_debug_types_hash_table.
13957 (create_debug_types_hash_table): Call create_debug_type_hash_table.
13958 (create_all_type_units, open_and_init_dwo_file): Update
13959 create_debug_types_hash_table callers.
13960
13961 2017-02-20 Sergio Durigan Junior <sergiodj@redhat.com>
13962
13963 PR gdb/16188
13964 * fork-child.c (trace_start_error): Fix thinko. va_end should
13965 refer to 'ap', not 'args'.
13966
13967 2017-02-20 Sergio Durigan Junior <sergiodj@redhat.com>
13968 Pedro Alves <palves@redhat.com>
13969
13970 PR gdb/16188
13971 * darwin-nat.c (darwin_ptrace_me): Check if calls to system
13972 calls succeeded.
13973 * fork-child.c (trace_start_error): New function.
13974 (trace_start_error_with_name): Likewise.
13975 * gnu-nat.c (gnu_ptrace_me): Check if call to PTRACE succeeded.
13976 * inf-ptrace.c (inf_ptrace_me): Likewise.
13977 * inferior.h (trace_start_error): New prototype.
13978 (trace_start_error_with_name): Likewise.
13979
13980 2017-02-15 Sergio Durigan Junior <sergiodj@redhat.com>
13981
13982 PR gdb/21164
13983 * psymtab.c (maintenance_print_psymbols): Verify if 'argv' is not
13984 NULL before using it.
13985 * symmisc.c (maintenance_print_symbols): Likewise.
13986 (maintenance_print_msymbols): Likewise.
13987
13988 2017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
13989
13990 * NEWS: Add record Python bindings entry.
13991
13992 2017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
13993
13994 * Makefile.in (SUBDIR_PYTHON_OBS): Add py-record-btrace.o,
13995 py-record-full.o.
13996 (SUBDIR_PYTHON_SRCS): Add py-record-btrace.c, py-record-full.c.
13997 * python/py-record-btrace.c, python/py-record-btrace.h,
13998 python/py-record-full.c, python/py-record-full.h: New file.
13999 * python/py-record.c: Add include for py-record-btrace.h and
14000 py-record-full.h.
14001 (recpy_method, recpy_format, recpy_goto, recpy_replay_position,
14002 recpy_instruction_history, recpy_function_call_history, recpy_begin,
14003 recpy_end): Use functions from py-record-btrace.c and py-record-full.c.
14004 * python/python-internal.h (PyInt_FromSsize_t, PyInt_AsSsize_t):
14005 New definition.
14006 (gdbpy_initialize_btrace): New export.
14007 * python/python.c (_initialize_python): Add gdbpy_initialize_btrace.
14008
14009 2017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
14010
14011 * Makefile.in (SUBDIR_PYTHON_OBS): Add python/py-record.o.
14012 (SUBDIR_PYTHON_SRCS): Add python/py-record.c.
14013 * python/py-record.c: New file.
14014 * python/python-internal.h (gdbpy_start_recording,
14015 gdbpy_current_recording, gdpy_stop_recording,
14016 gdbpy_initialize_record): New export.
14017 * python/python.c (_initialize_python): Add gdbpy_initialize_record.
14018 (python_GdbMethods): Add gdbpy_start_recording,
14019 gdbpy_current_recording and gdbpy_stop_recording.
14020
14021 2017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
14022
14023 * record-btrace.c (record_btrace_record_method): New function.
14024 (init_record_btrace_ops): Initialize to_record_method.
14025 * record-full.c (record_full_record_method): New function.
14026 (init_record_full_ops, init_record_full_core_ops): Add
14027 record_full_record_method.
14028 * record.h (enum record_method): New enum.
14029 * target-debug.h (target_debug_print_enum_record_method: New define.
14030 * target-delegates.c: Regenerate.
14031 * target.c (target_record_method): New function.
14032 * target.h: Include record.h.
14033 (struct target_ops) <to_record_method>: New field.
14034 (target_record_method): New export.
14035
14036 2017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
14037
14038 * record.h (record_start, record_stop): New export.
14039 * record.c (record_start, record_stop): New function.
14040
14041 2017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
14042
14043 * btrace.c (btrace_fetch): Copy function call segments pointer
14044 into a vector.
14045 (btrace_clear): Clear the vector.
14046 (btrace_find_insn_by_number): Use binary search to find the correct
14047 function call segment.
14048 * btrace.h (brace_fun_p): New typedef.
14049 (struct btrace_thread_info) <functions>: New field.
14050
14051 2017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
14052
14053 * record-btrace.c (btrace_ui_out_decode_error): Move most of it ...
14054 * btrace.c (btrace_decode_error): ... here. New function.
14055 * btrace.h (btrace_decode_error): New export.
14056
14057 2017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
14058
14059 * btrace.c (ftrace_call_num_insn, btrace_insn_get_error): New function.
14060 (ftrace_new_function, btrace_insn_number, btrace_insn_cmp,
14061 btrace_find_insn_by_number): Remove special case for gaps.
14062 * btrace.h (btrace_insn_get_error): New export.
14063 (btrace_insn_number, btrace_find_insn_by_number): Adjust comment.
14064 * record-btrace.c (btrace_insn_history): Print number for gaps.
14065 (record_btrace_info, record_btrace_goto): Handle gaps.
14066
14067 2017-02-14 Tom Tromey <tom@tromey.com>
14068
14069 PR python/13598:
14070 * python/python.c (gdbpy_before_prompt_hook): Emit before_prompt
14071 event.
14072 * python/py-evts.c (gdbpy_initialize_py_events): Add
14073 before_prompt registry.
14074 * python/py-events.h (events_object) <before_prompt>: New field.
14075
14076 2017-02-14 Markus Metzger <markus.t.metzger@intel.com>
14077
14078 * btrace.c (ftrace_new_switch): Preserve up link and flags.
14079
14080 2017-02-13 Luis Machado <lgustavo@codesourcery.com>
14081
14082 * symfile (_initialize_symfile): Add usage text to the load command's
14083 help text.
14084
14085 2017-02-10 Simon Marchi <simon.marchi@ericsson.com>
14086
14087 * utils.c (defaulted_query): Don't query on secondary UIs.
14088
14089 2017-02-10 Tom Tromey <tom@tromey.com>
14090
14091 * rust-lang.c (rust_get_disr_info): Remove unused variable.
14092
14093 2017-02-10 Tom Tromey <tom@tromey.com>
14094
14095 * python/py-value.c (valpy_richcompare_throw): Remove unnecessary
14096 "cleanup" local.
14097 * python/py-type.c (typy_legacy_template_argument): Remove
14098 unnecessary "cleanup" local.
14099
14100 2017-02-10 Tom Tromey <tom@tromey.com>
14101
14102 * python/python.c (do_start_initialization): New function, from
14103 _initialize_python.
14104 (_initialize_python): Call do_start_initialization.
14105 * python/py-linetable.c (ltpy_iternext): Use explicit returns, not
14106 goto.
14107
14108 2017-02-10 Tom Tromey <tom@tromey.com>
14109
14110 * python/py-prettyprint.c (pretty_print_one_value): Use
14111 gdbpy_ref.
14112
14113 2017-02-10 Tom Tromey <tom@tromey.com>
14114
14115 * python/py-cmd.c (cmdpy_destroyer): Use gdbpy_ref.
14116 * python/py-breakpoint.c (gdbpy_breakpoint_deleted): Use
14117 gdbpy_ref.
14118 * python/py-type.c (field_new): Use gdbpy_ref.
14119 * python/py-symtab.c (symtab_and_line_to_sal_object): Use
14120 gdbpy_ref.
14121 * python/py-progspace.c (pspy_new): Use gdbpy_ref.
14122 (py_free_pspace): Likewise.
14123 (pspace_to_pspace_object): Likewise.
14124 * python/py-objfile.c (objfpy_new): Use gdbpy_ref.
14125 (py_free_objfile): Likewise.
14126 (objfile_to_objfile_object): Likewise.
14127 * python/py-inferior.c (delete_thread_object): Use
14128 gdbpy_ref.
14129 (infpy_read_memory): Likewise.
14130 (py_free_inferior): Likewise.
14131 * python/py-evtregistry.c (create_eventregistry_object): Use
14132 gdbpy_ref.
14133 * python/py-event.c (create_event_object): Use gdbpy_ref.
14134
14135 2017-02-10 Tom Tromey <tom@tromey.com>
14136
14137 * python/py-ref.h (gdbpy_ref_policy): Now a template.
14138 (gdbpy_ref): Now a template; allow subclasses of PyObject to be
14139 used.
14140 * python/py-arch.c, python/py-bpevent.c, python/py-breakpoint.c,
14141 python/py-cmd.c, python/py-continueevent.c, python/py-event.c,
14142 python/py-exitedevent.c, python/py-finishbreakpoint.c,
14143 python/py-framefilter.c, python/py-function.c,
14144 python/py-inferior.c, python/py-infevents.c,
14145 python/py-linetable.c, python/py-newobjfileevent.c,
14146 python/py-param.c, python/py-prettyprint.c, python/py-ref.h,
14147 python/py-signalevent.c, python/py-stopevent.c,
14148 python/py-symbol.c, python/py-threadevent.c, python/py-type.c,
14149 python/py-unwind.c, python/py-utils.c, python/py-value.c,
14150 python/py-varobj.c, python/py-xmethods.c, python/python.c,
14151 varobj.c: Change gdbpy_ref to gdbpy_ref<>.
14152
14153 2017-02-10 Tom Tromey <tom@tromey.com>
14154
14155 * ui-out.h (ui_out_emit_type): New class.
14156 (ui_out_emit_tuple, ui_out_emit_list): New typedefs.
14157 * python/py-framefilter.c (py_print_single_arg): Use gdb::optional
14158 and ui_out_emit_tuple.
14159 (enumerate_locals): Likewise.
14160 (py_mi_print_variables, py_print_locals, py_print_args): Use
14161 ui_out_emit_list.
14162 (py_print_frame): Use gdb::optional, ui_out_emit_tuple,
14163 ui_out_emit_list.
14164 * common/gdb_optional.h: New file.
14165
14166 2017-02-10 Martin Galvan <martingalvan@sourceware.org>
14167
14168 * MAINTAINERS (Write After Approval): Update my e-mail address.
14169
14170 2017-02-10 Martin Galvan <martingalvan@sourceware.org>
14171
14172 PR gdb/21122
14173 * breakpoint.c (_initialize_breakpoint): Update the help description
14174 of the 'commands' command to indicate that it takes a list argument.
14175
14176 2017-02-09 Simon Marchi <simon.marchi@ericsson.com>
14177
14178 * interps.c (current_interp_set_logging): Remove "return".
14179
14180 2017-02-09 Gary Benson <gbenson@redhat.com>
14181
14182 * symtab.c (add_symtab_completions): Prevent NULL pointer
14183 dereference.
14184
14185 2017-02-08 Pedro Alves <palves@redhat.com>
14186
14187 * interps.c (interp::interp): Remove reference to quiet_p.
14188 (interp_set): Make static. Remove dead "Switching to" output
14189 code.
14190 (interp_quiet_p, interp_set_quiet): Delete.
14191 (interpreter_exec_cmd): Don't set the interpreter quiet.
14192 * interps.h (interp_quiet_p): Make static.
14193 (class interp) <quiet_p>: Remove field
14194
14195 2017-02-08 Jerome Guitton <guitton@adacore.com>
14196
14197 * cli/cli-decode.c (find_command_name_length): Make it extern.
14198 * cli/cli-decode.h (find_command_name_length): Declare.
14199 * cli/cli-script.c (command_name_equals, line_first_arg):
14200 New functions.
14201 (process_next_line): Use cli-decode to parse command names.
14202 (build_command_line): Make args a constant pointer.
14203
14204 2017-02-08 Jerome Guitton <guitton@adacore.com>
14205
14206 * cli-decode.c (lookup_cmd_1, lookup_cmd_composition):
14207 Remove case-insensitive search.
14208
14209 2017-02-07 Jose E. Marchesi <jose.marchesi@oracle.com>
14210
14211 * sparc-tdep.c (sparc32_gdbarch_init): Do not place a + operator
14212 at the end of the line. Avoids an ARI warning.
14213
14214 2017-02-06 Luis Machado <lgustavo@codesourcery.com>
14215
14216 * NEWS: Mention support for record/replay of Intel 64 rdrand and
14217 rdseed instructions.
14218 i386-tdep.c (i386_process_record): Handle Intel 64 rdrand and rseed.
14219
14220 2017-02-06 Ivo Raisr <ivo.raisr@oracle.com>
14221
14222 PR tdep/20936
14223 Provide and use sparc32 and sparc64 target description XML files.
14224 * features/sparc/sparc32-cp0.xml, features/sparc/sparc32-cpu.xml,
14225 features/sparc/sparc32-fpu.xml: New files for sparc 32-bit.
14226 * features/sparc/sparc64-cp0.xml, features/sparc/sparc64-cpu.xml,
14227 features/sparc/sparc64-fpu.xml: New files for sparc 64-bit.
14228 * features/sparc/sparc32-solaris.xml: New file.
14229 * features/sparc/sparc64-solaris.xml: New file.
14230 * features/sparc/sparc32-solaris.c: Generated.
14231 * features/sparc/sparc64-solaris.c: Generated.
14232 * sparc-tdep.h: Account for differences in target descriptions.
14233 * sparc-tdep.c (sparc32_register_name): Use target provided registers.
14234 (sparc32_register_type): Use target provided registers.
14235 (validate_tdesc_registers): New function.
14236 (sparc32_gdbarch_init): Use tdesc_has_registers.
14237 Set pseudoregister functions.
14238 * sparc64-tdep.c (sparc64_register_name): Use target provided registers.
14239 (sparc64_register_type): Use target provided registers.
14240 (sparc64_init_abi): Set pseudoregister functions.
14241
14242 2017-02-03 Tom Tromey <tom@tromey.com>
14243
14244 PR rust/21097:
14245 * rust-lang.c (rust_print_type) <TYPE_CODE_UNION>: Handle enums
14246 with a single member.
14247
14248 2017-02-03 Pedro Alves <palves@redhat.com>
14249
14250 * cli/cli-interp.c (cli_interp_base::cli_interp_base)
14251 (cli_interp_base::~cli_interp_base): New.
14252 (cli_interp): New struct.
14253 (as_cli_interp): Cast the interp itself to cli_interp.
14254 (cli_interpreter_pre_command_loop): Rename to ...
14255 (cli_interp_base::pre_command_loop): ... this. Remove 'self'
14256 parameter.
14257 (cli_interpreter_init): Rename to ...
14258 (cli_interp::init): ... this. Remove 'self' parameter. Use
14259 boolean. Make extern.
14260 (cli_interpreter_resume): Rename to ...
14261 (cli_interp::resume): ... this. Remove 'data' parameter. Make
14262 extern.
14263 (cli_interpreter_suspend): Rename to ...
14264 (cli_interp::suspend): ... this. Remove 'data' parameter. Make
14265 extern.
14266 (cli_interpreter_exec): Rename to ...
14267 (cli_interp::exec): ... this. Remove 'data' parameter. Make
14268 extern.
14269 (cli_interpreter_supports_command_editing): Rename to ...
14270 (cli_interp_base::supports_command_editing): ... this. Remove
14271 'interp' parameter. Make extern.
14272 (cli_ui_out): Rename to ...
14273 (cli_interp::interp_ui_out): ... this. Remove 'interp' parameter.
14274 Make extern.
14275 (cli_set_logging): Rename to ...
14276 (cli_interp_base::set_logging): ... this. Remove 'interp'
14277 parameter. Make extern.
14278 (cli_interp_procs): Delete.
14279 (cli_interp_factory): Adjust to use "new".
14280 * cli/cli-interp.h: Include "interps.h".
14281 (struct cli_interp_base): New struct.
14282 * interps.c (struct interp): Delete. Fields moved to interps.h.
14283 (interp_new): Delete.
14284 (interp::interp, interp::~interp): New.
14285 (interp_set): Use bool, and return void. Assume the interpreter
14286 has suspend, init and resume methods, and that the all return
14287 void.
14288 (set_top_level_interpreter): interp_set returns void.
14289 (interp_ui_out): Adapt.
14290 (current_interp_set_logging): Adapt.
14291 (interp_data): Delete.
14292 (interp_pre_command_loop, interp_supports_command_editing): Adapt.
14293 (interp_exec): Adapt.
14294 (top_level_interpreter_data): Delete.
14295 * interps.h (interp_init_ftype, interp_resume_ftype)
14296 (interp_suspend_ftype, interp_exec_ftype)
14297 (interp_pre_command_loop_ftype, interp_ui_out_ftype): Delete.
14298 (class interp): New.
14299 (interp_new): Delete.
14300 (interp_set): Now returns void. Use bool.
14301 (interp_data, top_level_interpreter_data): Delete.
14302 * mi/mi-common.h: Include interps.h.
14303 (class mi_interp): Inherit from interp. Define a ctor. Declare
14304 init, resume, suspect, exec, interp_ui_out, set_logging and
14305 pre_command_loop methods.
14306 * mi/mi-interp.c (as_mi_interp): Cast the interp itself.
14307 (mi_interpreter_init): Rename to ...
14308 (mi_interp::init): ... this. Remove the 'interp' parameter, use
14309 bool, return void and make extern. Adjust.
14310 (mi_interpreter_resume): ... Rename to ...
14311 (mi_interp::resume): ... this. Remove the 'data' parameter,
14312 return void and make extern. Adjust.
14313 (mi_interpreter_suspend): ... Rename to ...
14314 (mi_interp::suspend): ... this. Remove the 'data' parameter,
14315 return void and make extern. Adjust.
14316 (mi_interpreter_exec): ... Rename to ...
14317 (mi_interp::exec): ... this. Remove the 'data' parameter and make
14318 extern. Adjust.
14319 (mi_interpreter_pre_command_loop): ... Rename to ...
14320 (mi_interp::pre_command_loop): ... this. Remove the 'self'
14321 parameter and make extern.
14322 (mi_on_normal_stop_1): Adjust.
14323 (mi_ui_out): Rename to ...
14324 (mi_interp::interp_ui_out): ... this. Remove the 'interp'
14325 parameter and make extern. Adjust.
14326 (mi_set_logging): Rename to ...
14327 (mi_interp::set_logging): ... this. Remove the 'interp'
14328 parameter and make extern. Adjust.
14329 (mi_interp_procs): Delete.
14330 (mi_interp_factory): Adjust to use 'new'.
14331 * mi/mi-main.c (mi_cmd_gdb_exit, captured_mi_execute_command)
14332 (mi_print_exception, mi_execute_command, mi_load_progress):
14333 Adjust.
14334 * tui/tui-interp.c (tui_interp): New class.
14335 (as_tui_interp): Return a tui_interp pointer.
14336 (tui_on_normal_stop, tui_on_signal_received)
14337 (tui_on_end_stepping_range, tui_on_signal_exited, tui_on_exited)
14338 (tui_on_no_history, tui_on_user_selected_context_changed): Adjust
14339 to use interp::interp_ui_out.
14340 (tui_init): Rename to ...
14341 (tui_interp::init): ... this. Remove the 'self' parameter, use
14342 bool, return void and make extern. Adjust.
14343 (tui_resume): Rename to ...
14344 (tui_interp::resume): ... this. Remove the 'data' parameter,
14345 return void and make extern. Adjust.
14346 (tui_suspend): Rename to ...
14347 (tui_interp::suspend): ... this. Remove the 'data' parameter,
14348 return void and make extern. Adjust.
14349 (tui_ui_out): Rename to ...
14350 (tui_interp::interp_ui_out): ... this. Remove the 'self'
14351 parameter, and make extern. Adjust.
14352 (tui_exec): Rename to ...
14353 (tui_interp::exec): ... this. Remove the 'data' parameter and
14354 make extern.
14355 (tui_interp_procs): Delete.
14356 (tui_interp_factory): Use "new".
14357
14358 2017-02-02 Tom Tromey <tom@tromey.com>
14359
14360 * rust-exp.y (ends_raw_string, space_then_number)
14361 (rust_identifier_start_p): Return bool.
14362 * rust-lang.c (rust_tuple_type_p, rust_underscore_fields)
14363 (rust_tuple_struct_type_p, rust_tuple_variant_type_p)
14364 (rust_slice_type_p, rust_range_type_p, rust_u8_type_p)
14365 (rust_chartype_p): Return bool.
14366 (val_print_struct, rust_print_struct_def, rust_print_type):
14367 Update.
14368 * rust-lang.h (rust_tuple_type_p, rust_tuple_struct_type_p):
14369 Return bool.
14370
14371 2017-02-02 Tom Tromey <tom@tromey.com>
14372
14373 * rust-lang.c: Reindent.
14374
14375 2017-02-02 Tom Tromey <tom@tromey.com>
14376
14377 * rust-lang.h (rust_crate_for_block): Update.
14378 * rust-lang.c (rust_crate_for_block): Return std::string.
14379 (rust_get_disr_info): Use std:;string, not
14380 gdb::unique_xmalloc_ptr.
14381 * rust-exp.y (crate_name): Update.
14382
14383 2017-02-02 Pedro Alves <palves@redhat.com>
14384
14385 * disasm-selftests.c (print_one_insn_test): Move the "verbose"
14386 field out of gdb_disassembler_test and make it static.
14387
14388 2017-02-02 Pedro Alves <palves@redhat.com>
14389
14390 * mi/mi-common.h (struct mi_interp): Delete the mi2_interp,
14391 mi1_interp and mi_interp fields.
14392
14393 2017-02-02 Pedro Alves <palves@redhat.com>
14394
14395 * cli/cli-interp.c (struct saved_output_files, saved_output):
14396 Moved from cli/cli-logging.c.
14397 (cli_set_logging): New function.
14398 (cli_interp_procs): Install cli_set_logging.
14399 * cli/cli-interp.h (make_logging_output, cli_set_logging):
14400 Declare.
14401 * cli/cli-logging.c (struct saved_output_files, saved_output):
14402 Moved to cli/cli-interp.c.
14403 (pop_output_files): Don't save outputs here.
14404 (make_logging_output): New function.
14405 (handle_redirections): Don't build tee nor save previous outputs
14406 here.
14407 * interps.c (current_interp_set_logging): Change prototype.
14408 Assume there's always a set_logging_proc method installed.
14409 * interps.h (interp_set_logging_ftype): Change prototype.
14410 (current_interp_set_logging): Change prototype and adjust comment.
14411 * mi/mi-interp.c (mi_set_logging): Change protototype. Adjust to
14412 use make_logging_output.
14413 * tui/tui-interp.c (tui_interp_procs): Install cli_set_logging.
14414 2017-02-02 Pedro Alves <palves@redhat.com>
14415
14416 * cli/cli-logging.c (maybe_warn_already_logging): New factored out
14417 from ...
14418 (set_logging_overwrite): ... here.
14419 (logging_no_redirect_file): Delete.
14420 (set_logging_redirect): Don't handle redirection on the fly.
14421 Instead warn that "logging off" / "logging on" is necessary.
14422 (pop_output_files): Delete references to logging_no_redirect_file.
14423 (show_logging_command): Always speak in terms of what will happen
14424 once logging is reenabled.
14425
14426 2017-02-02 Pedro Alves <palves@redhat.com>
14427
14428 * disasm.h (gdb_pretty_print_disassembler): Tweak intro comment.
14429
14430 2017-02-02 Pedro Alves <palves@redhat.com>
14431
14432 * disasm.c (gdb_pretty_print_insn): Rename to ...
14433 (gdb_pretty_print_disassembler::pretty_print_insn): ... this.
14434 Remove gdbarch parameter. Adapt to clear the object's buffers
14435 instead of allocating new buffers, and to print using the object's
14436 gdb_disassembler instead of calling gdb_print_insn.
14437 (dump_insns): Use gdb_pretty_print_disassembler.
14438 * disasm.h (gdb_pretty_print_insn): Delete declaration.
14439 (gdb_pretty_print_disassembler): New class.
14440 * record-btrace.c (btrace_insn_history): Use
14441 gdb_pretty_print_disassembler.
14442
14443 2017-02-02 Pedro Alves <palves@redhat.com>
14444
14445 * ada-lang.c (type_as_string): Use string_file.
14446 * ada-valprint.c (ada_print_floating): Use string_file.
14447 * ada-varobj.c (ada_varobj_scalar_image)
14448 (ada_varobj_get_value_image): Use string_file.
14449 * aix-thread.c (aix_thread_extra_thread_info): Use string_file.
14450 * arm-tdep.c (_initialize_arm_tdep): Use string_printf.
14451 * breakpoint.c (update_inserted_breakpoint_locations)
14452 (insert_breakpoint_locations, reattach_breakpoints)
14453 (print_breakpoint_location, print_one_detail_ranged_breakpoint)
14454 (print_it_watchpoint): Use string_file.
14455 (save_breakpoints): Use stdio_file.
14456 * c-exp.y (oper): Use string_file.
14457 * cli/cli-logging.c (set_logging_redirect): Use ui_file_up and
14458 tee_file.
14459 (pop_output_files): Use delete.
14460 (handle_redirections): Use stdio_file and tee_file.
14461 * cli/cli-setshow.c (do_show_command): Use string_file.
14462 * compile/compile-c-support.c (c_compute_program): Use
14463 string_file.
14464 * compile/compile-c-symbols.c (generate_vla_size): Take a
14465 'string_file &' instead of a 'ui_file *'.
14466 (generate_c_for_for_one_variable): Take a 'string_file &' instead
14467 of a 'ui_file *'. Use string_file.
14468 (generate_c_for_variable_locations): Take a 'string_file &'
14469 instead of a 'ui_file *'.
14470 * compile/compile-internal.h (generate_c_for_for_one_variable):
14471 Take a 'string_file &' instead of a 'ui_file *'.
14472 * compile/compile-loc2c.c (push, pushf, unary, binary)
14473 (print_label, pushf_register_address, pushf_register)
14474 (do_compile_dwarf_expr_to_c): Take a 'string_file &' instead of a
14475 'ui_file *'. Adjust.
14476 * compile/compile.c (compile_to_object): Use string_file.
14477 * compile/compile.h (compile_dwarf_expr_to_c)
14478 (compile_dwarf_bounds_to_c): Take a 'string_file &' instead of a
14479 'ui_file *'.
14480 * cp-support.c (inspect_type): Use string_file and obstack_copy0.
14481 (replace_typedefs_qualified_name): Use string_file and
14482 obstack_copy0.
14483 * disasm.c (gdb_pretty_print_insn): Use string_file.
14484 (gdb_disassembly): Adjust reference the null_stream global.
14485 (do_ui_file_delete): Delete.
14486 (gdb_insn_length): Use null_stream.
14487 * dummy-frame.c (maintenance_print_dummy_frames): Use stdio_file.
14488 * dwarf2loc.c (dwarf2_compile_property_to_c)
14489 (locexpr_generate_c_location, loclist_generate_c_location): Take a
14490 'string_file &' instead of a 'ui_file *'.
14491 * dwarf2loc.h (dwarf2_compile_property_to_c): Likewise.
14492 * dwarf2read.c (do_ui_file_peek_last): Delete.
14493 (dwarf2_compute_name): Use string_file.
14494 * event-top.c (gdb_setup_readline): Use stdio_file.
14495 * gdbarch.sh (verify_gdbarch): Use string_file.
14496 * gdbtypes.c (safe_parse_type): Use null_stream.
14497 * guile/scm-breakpoint.c (gdbscm_breakpoint_commands): Use
14498 string_file.
14499 * guile/scm-disasm.c (gdbscm_print_insn_from_port): Take a
14500 'string_file *' instead of a 'ui_file *'.
14501 (gdbscm_arch_disassemble): Use string_file.
14502 * guile/scm-frame.c (frscm_print_frame_smob): Use string_file.
14503 * guile/scm-ports.c (class ioscm_file_port): Now a class that
14504 inherits from ui_file.
14505 (ioscm_file_port_delete, ioscm_file_port_rewind)
14506 (ioscm_file_port_put): Delete.
14507 (ioscm_file_port_write): Rename to ...
14508 (ioscm_file_port::write): ... this. Remove file_port_magic
14509 checks.
14510 (ioscm_file_port_new): Delete.
14511 (ioscm_with_output_to_port_worker): Use ioscm_file_port and
14512 ui_file_up.
14513 * guile/scm-type.c (tyscm_type_name): Use string_file.
14514 * guile/scm-value.c (vlscm_print_value_smob, gdbscm_value_print):
14515 Use string_file.
14516 * infcmd.c (print_return_value_1): Use string_file.
14517 * infrun.c (print_target_wait_results): Use string_file.
14518 * language.c (add_language): Use string_file.
14519 * location.c (explicit_to_string_internal): Use string_file.
14520 * main.c (captured_main_1): Use null_file.
14521 * maint.c (maintenance_print_architecture): Use stdio_file.
14522 * mi/mi-cmd-stack.c (list_arg_or_local): Use string_file.
14523 * mi/mi-common.h (struct mi_interp) <out, err, log, targ,
14524 event_channel>: Change type to mi_console_file pointer.
14525 * mi/mi-console.c (mi_console_file_fputs, mi_console_file_flush)
14526 (mi_console_file_delete): Delete.
14527 (struct mi_console_file): Delete.
14528 (mi_console_file_magic): Delete.
14529 (mi_console_file_new): Delete.
14530 (mi_console_file::mi_console_file): New.
14531 (mi_console_file_delete): Delete.
14532 (mi_console_file_fputs): Delete.
14533 (mi_console_file::write): New.
14534 (mi_console_raw_packet): Delete.
14535 (mi_console_file::flush): New.
14536 (mi_console_file_flush): Delete.
14537 (mi_console_set_raw): Rename to ...
14538 (mi_console_file::set_raw): ... this.
14539 * mi/mi-console.h (class mi_console_file): New class.
14540 (mi_console_file_new, mi_console_set_raw): Delete.
14541 * mi/mi-interp.c (mi_interpreter_init): Use mi_console_file.
14542 (mi_set_logging): Use delete and tee_file. Adjust.
14543 * mi/mi-main.c (output_register): Use string_file.
14544 (mi_cmd_data_evaluate_expression): Use string_file.
14545 (mi_cmd_data_read_memory): Use string_file.
14546 (mi_cmd_execute, print_variable_or_computed): Use string_file.
14547 * mi/mi-out.c (mi_ui_out::main_stream): New.
14548 (mi_ui_out::rewind): Use main_stream and
14549 string_file.
14550 (mi_ui_out::put): Use main_stream and string_file.
14551 (mi_ui_out::mi_ui_out): Remove 'stream' parameter.
14552 Allocate a 'string_file' instead.
14553 (mi_out_new): Don't allocate a mem_fileopen stream here.
14554 * mi/mi-out.h (mi_ui_out::mi_ui_out): Remove 'stream' parameter.
14555 (mi_ui_out::main_stream): Declare method.
14556 * printcmd.c (eval_command): Use string_file.
14557 * psymtab.c (maintenance_print_psymbols): Use stdio_file.
14558 * python/py-arch.c (archpy_disassemble): Use string_file.
14559 * python/py-breakpoint.c (bppy_get_commands): Use string_file.
14560 * python/py-frame.c (frapy_str): Use string_file.
14561 * python/py-framefilter.c (py_print_type, py_print_single_arg):
14562 Use string_file.
14563 * python/py-type.c (typy_str): Use string_file.
14564 * python/py-unwind.c (unwind_infopy_str): Use string_file.
14565 * python/py-value.c (valpy_str): Use string_file.
14566 * record-btrace.c (btrace_insn_history): Use string_file.
14567 * regcache.c (regcache_print): Use stdio_file.
14568 * reggroups.c (maintenance_print_reggroups): Use stdio_file.
14569 * remote.c (escape_buffer): Use string_file.
14570 * rust-lang.c (rust_get_disr_info): Use string_file.
14571 * serial.c (serial_open_ops_1): Use stdio_file.
14572 (do_serial_close): Use delete.
14573 * stack.c (print_frame_arg): Use string_file.
14574 (print_frame_args): Remove local mem_fileopen stream, not used.
14575 (print_frame): Use string_file.
14576 * symmisc.c (maintenance_print_symbols): Use stdio_file.
14577 * symtab.h (struct symbol_computed_ops) <generate_c_location>:
14578 Take a 'string_file *' instead of a 'ui_file *'.
14579 * top.c (new_ui): Use stdio_file and stderr_file.
14580 (free_ui): Use delete.
14581 (execute_command_to_string): Use string_file.
14582 (quit_confirm): Use string_file.
14583 * tracepoint.c (collection_list::append_exp): Use string_file.
14584 * tui/tui-disasm.c (tui_disassemble): Use string_file.
14585 * tui/tui-file.c: Don't include "ui-file.h".
14586 (enum streamtype, struct tui_stream): Delete.
14587 (tui_file_new, tui_file_delete, tui_fileopen, tui_sfileopen)
14588 (tui_file_isatty, tui_file_rewind, tui_file_put): Delete.
14589 (tui_file::tui_file): New method.
14590 (tui_file_fputs): Delete.
14591 (tui_file_get_strbuf): Delete.
14592 (tui_file::puts): New method.
14593 (tui_file_adjust_strbuf): Delete.
14594 (tui_file_flush): Delete.
14595 (tui_file::flush): New method.
14596 * tui/tui-file.h: Tweak intro comment.
14597 Include ui-file.h.
14598 (tui_fileopen, tui_sfileopen, tui_file_get_strbuf)
14599 (tui_file_adjust_strbuf): Delete declarations.
14600 (class tui_file): New class.
14601 * tui/tui-io.c (tui_initialize_io): Use tui_file.
14602 * tui/tui-regs.c (tui_restore_gdbout): Use delete.
14603 (tui_register_format): Use string_stream.
14604 * tui/tui-stack.c (tui_make_status_line): Use string_file.
14605 (tui_get_function_from_frame): Use string_file.
14606 * typeprint.c (type_to_string): Use string_file.
14607 * ui-file.c (struct ui_file, ui_file_magic, ui_file_new): Delete.
14608 (null_stream): New global.
14609 (ui_file_delete): Delete.
14610 (ui_file::ui_file): New.
14611 (null_file_isatty): Delete.
14612 (ui_file::~ui_file): New.
14613 (null_file_rewind): Delete.
14614 (ui_file::printf): New.
14615 (null_file_put): Delete.
14616 (null_file_flush): Delete.
14617 (ui_file::putstr): New.
14618 (null_file_write): Delete.
14619 (ui_file::putstrn): New.
14620 (null_file_read): Delete.
14621 (ui_file::putc): New.
14622 (null_file_fputs): Delete.
14623 (null_file_write_async_safe): Delete.
14624 (ui_file::vprintf): New.
14625 (null_file_delete): Delete.
14626 (null_file::write): New.
14627 (null_file_fseek): Delete.
14628 (null_file::puts): New.
14629 (ui_file_data): Delete.
14630 (null_file::write_async_safe): New.
14631 (gdb_flush, ui_file_isatty): Adjust.
14632 (ui_file_put, ui_file_rewind): Delete.
14633 (ui_file_write): Adjust.
14634 (ui_file_write_for_put): Delete.
14635 (ui_file_write_async_safe, ui_file_read): Adjust.
14636 (ui_file_fseek): Delete.
14637 (fputs_unfiltered): Adjust.
14638 (set_ui_file_flush, set_ui_file_isatty, set_ui_file_rewind)
14639 (set_ui_file_put, set_ui_file_write, set_ui_file_write_async_safe)
14640 (set_ui_file_read, set_ui_file_fputs, set_ui_file_fseek)
14641 (set_ui_file_data): Delete.
14642 (string_file::~string_file, string_file::write)
14643 (struct accumulated_ui_file, do_ui_file_xstrdup, ui_file_xstrdup)
14644 (do_ui_file_as_string, ui_file_as_string): Delete.
14645 (do_ui_file_obsavestring, ui_file_obsavestring): Delete.
14646 (struct mem_file): Delete.
14647 (mem_file_new): Delete.
14648 (stdio_file::stdio_file): New.
14649 (mem_file_delete): Delete.
14650 (stdio_file::stdio_file): New.
14651 (mem_fileopen): Delete.
14652 (stdio_file::~stdio_file): New.
14653 (mem_file_rewind): Delete.
14654 (stdio_file::set_stream): New.
14655 (mem_file_put): Delete.
14656 (stdio_file::open): New.
14657 (mem_file_write): Delete.
14658 (stdio_file_magic, struct stdio_file): Delete.
14659 (stdio_file_new, stdio_file_delete, stdio_file_flush): Delete.
14660 (stdio_file::flush): New.
14661 (stdio_file_read): Rename to ...
14662 (stdio_file::read): ... this. Adjust.
14663 (stdio_file_write): Rename to ...
14664 (stdio_file::write): ... this. Adjust.
14665 (stdio_file_write_async_safe): Rename to ...
14666 (stdio_file::write_async_safe) ... this. Adjust.
14667 (stdio_file_fputs): Rename to ...
14668 (stdio_file::puts) ... this. Adjust.
14669 (stdio_file_isatty): Delete.
14670 (stdio_file_fseek): Delete.
14671 (stdio_file::isatty): New.
14672 (stderr_file_write): Rename to ...
14673 (stderr_file::write) ... this. Adjust.
14674 (stderr_file_fputs): Rename to ...
14675 (stderr_file::puts) ... this. Adjust.
14676 (stderr_fileopen, stdio_fileopen, gdb_fopen): Delete.
14677 (stderr_file::stderr_file): New.
14678 (tee_file_magic): Delete.
14679 (struct tee_file): Delete.
14680 (tee_file::tee_file): New.
14681 (tee_file_new): Delete.
14682 (tee_file::~tee_file): New.
14683 (tee_file_delete): Delete.
14684 (tee_file_flush): Rename to ...
14685 (tee_file::flush): ... this. Adjust.
14686 (tee_file_write): Rename to ...
14687 (tee_file::write): ... this. Adjust.
14688 (tee_file::write_async_safe): New.
14689 (tee_file_fputs): Rename to ...
14690 (tee_file::puts): ... this. Adjust.
14691 (tee_file_isatty): Rename to ...
14692 (tee_file::isatty): ... this. Adjust.
14693 * ui-file.h (struct obstack, struct ui_file): Don't
14694 forward-declare.
14695 (ui_file_new, ui_file_flush_ftype, set_ui_file_flush)
14696 (ui_file_write_ftype)
14697 (set_ui_file_write, ui_file_fputs_ftype, set_ui_file_fputs)
14698 (ui_file_write_async_safe_ftype, set_ui_file_write_async_safe)
14699 (ui_file_read_ftype, set_ui_file_read, ui_file_isatty_ftype)
14700 (set_ui_file_isatty, ui_file_rewind_ftype, set_ui_file_rewind)
14701 (ui_file_put_method_ftype, ui_file_put_ftype, set_ui_file_put)
14702 (ui_file_delete_ftype, set_ui_file_data, ui_file_fseek_ftype)
14703 (set_ui_file_fseek): Delete.
14704 (ui_file_data, ui_file_delete, ui_file_rewind)
14705 (struct ui_file): New.
14706 (ui_file_up): New.
14707 (class null_file): New.
14708 (null_stream): Declare.
14709 (ui_file_write_for_put, ui_file_put): Delete.
14710 (ui_file_xstrdup, ui_file_as_string, ui_file_obsavestring):
14711 Delete.
14712 (ui_file_fseek, mem_fileopen, stdio_fileopen, stderr_fileopen)
14713 (gdb_fopen, tee_file_new): Delete.
14714 (struct string_file): New.
14715 (struct stdio_file): New.
14716 (stdio_file_up): New.
14717 (struct stderr_file): New.
14718 (class tee_file): New.
14719 * ui-out.c (ui_out::field_stream): Take a 'string_file &' instead
14720 of a 'ui_file *'. Adjust.
14721 * ui-out.h (class ui_out) <field_stream>: Likewise.
14722 * utils.c (do_ui_file_delete, make_cleanup_ui_file_delete)
14723 (null_stream): Delete.
14724 (error_stream): Take a 'string_file &' instead of a 'ui_file *'.
14725 Adjust.
14726 * utils.h (struct ui_file): Delete forward declaration..
14727 (make_cleanup_ui_file_delete, null_stream): Delete declarations.
14728 (error_stream): Take a 'string_file &' instead of a
14729 'ui_file *'.
14730 * varobj.c (varobj_value_get_print_value): Use string_file.
14731 * xtensa-tdep.c (xtensa_verify_config): Use string_file.
14732 * gdbarch.c: Regenerate.
14733
14734 2017-02-02 Pedro Alves <palves@redhat.com>
14735
14736 * disasm.c (gdb_disassembler::pretty_print_insn): Rename to...
14737 (gdb_pretty_print_insn): ... this. Now a free function. Add back
14738 a 'gdbarch' parameter. Allocate a mem_fileopen stream here.
14739 Adjust to call gdb_print_insn instead of
14740 gdb_disassembler::print_insn.
14741 (dump_insns, do_mixed_source_and_assembly_deprecated)
14742 (do_mixed_source_and_assembly, do_assembly_only): Add back a
14743 'gdbarch' parameter. Remove gdb_disassembler parameter.
14744 (gdb_disassembly): Don't allocate a gdb_disassembler here.
14745 * disasm.h (gdb_disassembler::pretty_print_insn): Delete
14746 declaration.
14747 (gdb_pretty_print_insn): Re-add declaration.
14748 * record-btrace.c (btrace_insn_history): Don't allocate a
14749 gdb_disassembler here. Adjust to call gdb_pretty_print_insn.
14750
14751 2017-02-01 Simon Marchi <simon.marchi@polymtl.ca>
14752
14753 * disasm.h (gdb_disassembly): Remove file_string parameter.
14754 * disasm.c (gdb_disassembly): Likewise.
14755 * cli/cli-cmds.c (print_disassembly): Adapt.
14756 * mi/mi-cmd-disas.c (mi_cmd_disassemble): Likewise.
14757 * stack.c (do_gdb_disassembly): Likewise.
14758
14759 2017-02-01 Andreas Arnez <arnez@linux.vnet.ibm.com>
14760
14761 * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): For
14762 DWARF_VALUE_LITERAL, no longer ignore the offset on big-endian
14763 targets. And if the implicit value is longer than needed, extract
14764 the first bytes instead of the "least significant" ones.
14765
14766 2017-02-01 Markus Metzger <markus.t.metzger@intel.com>
14767
14768 * btrace.c (btrace_enable): Do not call btrace_add_pc for
14769 BTRACE_FORMAT_PT or if can_access_registers_ptid returns false.
14770 (btrace_fetch): Assert can_access_registers_ptid.
14771 * record-btrace.c (require_btrace_thread, record_btrace_info): Call
14772 validate_registers_access.
14773
14774 2017-02-01 Markus Metzger <markus.t.metzger@intel.com>
14775
14776 * gdbthread.h (can_access_registers_ptid): New.
14777 * thread.c (can_access_registers_ptid): New.
14778
14779 2017-02-01 Pedro Alves <palves@redhat.com>
14780
14781 * i386-tdep.c (i386_fast_tracepoint_valid_at): Use gdb_insn_length.
14782
14783 2017-01-31 Pedro Alves <palves@redhat.com>
14784
14785 * mi/mi-interp.c (mi_breakpoint_created, mi_breakpoint_modified):
14786 Fix typos.
14787
14788 2017-01-31 Pedro Alves <palves@redhat.com>
14789
14790 * stack.c (print_frame_args): Remove local mem_fileopen stream,
14791 not used.
14792
14793 2017-01-31 Pedro Alves <palves@redhat.com>
14794
14795 * varobj.c (varobj_value_get_print_value): Remove xstrdup call.
14796
14797 2017-01-31 Pedro Alves <palves@redhat.com>
14798
14799 * common/scoped_restore.h
14800 (scoped_restore_tmpl::scoped_restore_tmpl): Template on T2, and
14801 change the value's parameter type to T2.
14802 (make_scoped_restore): Likewise.
14803
14804 2017-01-27 Walfred Tedeschi <walfred.tedeschi@intel.com>
14805 Richard Henderson <rth@redhat.com>
14806
14807 * amd64-linux-nat.c (PTRACE_ARCH_PRCTL): New define.
14808 (amd64_linux_fetch_inferior_registers): Add case to fetch FS_BASE
14809 GS_BASE for older kernels.
14810 (amd64_linux_store_inferior_registers): Add case to store FS_BASE
14811 GS_BASE for older kernels.
14812 * amd64-linux-tdep.c (amd64_linux_gregset_reg_offset): Add FS_BASE
14813 and GS_BASE to the offset table.
14814 (amd64_linux_register_reggroup_p): Add FS_BASE and GS_BASE to the
14815 system register group.
14816 * amd64-nat.c (amd64_native_gregset_reg_offset): Implements case
14817 for older kernels.
14818 * amd64-tdep.c (amd64_init_abi): Add segment registers for the
14819 amd64 ABI.
14820 * amd64-tdep.h (amd64_regnum): Add AMD64_FSBASE_REGNUM and
14821 AMD64_GSBASE_REGNUM.
14822 (AMD64_NUM_REGS): Set to AMD64_GSBASE_REGNUM + 1.
14823 * features/Makefile (amd64-linux.dat, amd64-avx-linux.dat)
14824 (amd64-mpx-linux.dat, amd64-avx512-linux.dat, x32-linux.dat)
14825 (x32-avx-linux.dat, x32-avx512-linux.dat): Add
14826 i386/64bit-segments.xml in those rules.
14827 * features/i386/64bit-segments.xml: New file.
14828 * features/i386/amd64-avx-mpx-linux.xml: Add 64bit-segments.xml.
14829 * features/i386/amd64-avx-linux.xml: Add 64bit-segments.xml.
14830 * features/i386/amd64-avx512-linux.xml: Add 64bit-segments.xml.
14831 * features/i386/amd64-mpx-linux.xml: Add 64bit-segments.xml.
14832 * features/i386/x32-avx512-linux.xml: Add 64bit-segments.xml.
14833 * features/i386/x32-avx-linux.xml: Add 64bit-segments.xml.
14834 * features/i386/amd64-linux.xml: Add 64bit-segments.xml.
14835 * features/i386/amd64-avx-linux.c: Regenerated.
14836 * features/i386/amd64-avx-mpx-linux.c: Regenerated.
14837 * features/i386/amd64-avx-mpx.c: Regenerated.
14838 * features/i386/amd64-avx512-linux.c: Regenerated.
14839 * features/i386/amd64-linux.c: Regenerated.
14840 * features/i386/amd64-mpx-linux.c: Regenerated.
14841 * features/i386/i386-avx-mpx-linux.c: Regenerated.
14842 * features/i386/i386-avx-mpx.c: Regenerated.
14843 * features/i386/x32-avx-linux.c: Regenerated.
14844 * features/i386/x32-avx512-linux.c: Regenerated.
14845 * regformats/i386/amd64-avx-linux.dat: Regenerated.
14846 * regformats/i386/amd64-avx-mpx-linux.dat: Regenerated.
14847 * regformats/i386/amd64-avx512-linux.dat: Regenerated.
14848 * regformats/i386/amd64-linux.dat: Regenerated.
14849 * regformats/i386/amd64-mpx-linux.dat: Regenerated.
14850 * regformats/i386/x32-avx-linux.dat: Regenerated.
14851 * regformats/i386/x32-avx512-linux.dat: Regenerated.
14852 * regformats/i386/x32-linux.dat: Regenerated.
14853
14854 2017-01-27 Walfred Tedeschi <walfred.tedeschi@intel.com>
14855
14856 * amd64-linux-tdep.h (AMD64_LINUX_ORIG_RAX_REGNUM):
14857 Set to AMD64_NUM_REGS.
14858
14859 2017-01-27 Walfred Tedeschi <walfred.tedeschi@intel.com>
14860
14861 * amd64-nat.c (amd64_native_gregset_reg_offset): Simplify logic
14862 that checks validity of a register number.
14863
14864 2017-01-27 Kees Cook <keescook@google.com>
14865
14866 * gdb/arm-linux-nat.c (arm_linux_fetch_inferior_registers): Call
14867 fetch_fpregs if target has fpa registers.
14868 (arm_linux_store_inferior_registers): Call store_fpregs if target
14869 has fpa registers.
14870
14871 2017-01-26 Andreas Arnez <arnez@linux.vnet.ibm.com>
14872
14873 * cris-tdep.c (cris_gdbarch_init): Remove check for
14874 info.byte_order and force it to BFD_ENDIAN_LITTLE.
14875
14876 2017-01-26 Antoine Tremblay <antoine.tremblay@ericsson.com>
14877
14878 * corelow.c (get_core_register_section): Check for regset
14879 existence before checking for REGSET_VARIABLE_SIZE.
14880
14881 2017-01-26 Yao Qi <yao.qi@linaro.org>
14882 Pedro Alves <palves@redhat.com>
14883
14884 PR gdb/20939
14885 * disasm.c (gdb_disassembler::dis_asm_memory_error): Don't
14886 call memory_error, save memaddr instead.
14887 (gdb_disassembler::print_insn): If gdbarch_print_insn returns
14888 negative, cal memory_error.
14889 * disasm.h (gdb_disassembler) <m_err_memaddr>: New field.
14890
14891 2017-01-26 Yao Qi <yao.qi@linaro.org>
14892
14893 * disasm-selftests.c (memory_error_test): New function.
14894 (_initialize_disasm_selftests): Register memory_error_test.
14895
14896 2017-01-26 Yao Qi <yao.qi@linaro.org>
14897
14898 * Makefile.in (SFILES): Add disasm-selftests.c and
14899 selftest-arch.c.
14900 (COMMON_OBS): Add disasm-selftests.o and selftest-arch.o.
14901 * disasm-selftests.c: New file.
14902 * selftest-arch.c: New file.
14903 * selftest-arch.h: New file.
14904
14905 2017-01-26 Yao Qi <yao.qi@linaro.org>
14906
14907 * mep-tdep.c (mep_gdb_print_insn): Set info->arch
14908 to bfd_arch_mep. Don't return 0 if section is not
14909 found. Call print_insn_mep.
14910
14911 2017-01-26 Pedro Alves <palves@redhat.com>
14912 Yao Qi <yao.qi@linaro.org>
14913
14914 * arm-tdep.c: Include "disasm.h".
14915 (gdb_print_insn_arm): Update code to get gdbarch.
14916 * disasm.c (dis_asm_read_memory): Change it to
14917 gdb_disassembler::dis_asm_read_memory.
14918 (dis_asm_memory_error): Likewise.
14919 (dis_asm_print_address): Likewise.
14920 (gdb_pretty_print_insn): Change it to
14921 gdb_disassembler::pretty_print_insn.
14922 (dump_insns): Add one argument gdb_disassemlber. All
14923 callers updated.
14924 (do_mixed_source_and_assembly_deprecated): Likewise.
14925 (do_mixed_source_and_assembly): Likewise.
14926 (do_assembly_only): Likewise.
14927 (gdb_disassembler::gdb_disassembler): New.
14928 (gdb_disassembler::print_insn): New.
14929 * disasm.h (class gdb_disassembler): New.
14930 (gdb_pretty_print_insn): Remove declaration.
14931 (gdb_disassemble_info): Likewise.
14932 * guile/scm-disasm.c (class gdbscm_disassembler): New.
14933 (gdbscm_disasm_read_memory_worker): Update.
14934 (gdbscm_disasm_read_memory): Update.
14935 (gdbscm_disasm_memory_error): Remove.
14936 (gdbscm_disasm_print_address): Remove.
14937 (gdbscm_disassembler::gdbscm_disassembler): New.
14938 (gdbscm_print_insn_from_port): Update.
14939 * mips-tdep.c: Include disasm.h.
14940 (gdb_print_insn_mips): Update code to get gdbarch.
14941 * record-btrace.c (btrace_insn_history): Update.
14942 * spu-tdep.c: Include disasm.h.
14943 (struct spu_dis_asm_data): Remove.
14944 (struct spu_dis_asm_info): New.
14945 (spu_dis_asm_print_address): Use spu_dis_asm_info to get
14946 SPU id.
14947 (gdb_print_insn_spu): Cast disassemble_info to
14948 spu_dis_asm_info.
14949
14950 2017-01-26 Yao Qi <yao.qi@linaro.org>
14951
14952 * disasm.c (do_ui_file_delete): Delete.
14953 (gdb_insn_length): Move code creating stream to ...
14954 * utils.c (null_stream): ... here. New function.
14955 * utils.h (null_stream): Declare.
14956
14957 2017-01-23 Simon Marchi <simon.marchi@polymtl.ca>
14958
14959 * python/py-inferior.c (find_thread_object): Return directly
14960 from the loop. Remove "found" variable.
14961
14962 2017-01-21 Joel Brobecker <brobecker@adacore.com>
14963
14964 GDB 7.12.1 released.
14965
14966 2017-01-20 Simon Marchi <simon.marchi@ericsson.com>
14967
14968 * python/py-function.c (fnpy_call): Reorder declarations to have
14969 the gdbpy_enter object declared first.
14970 * python/py-xmethods.c (gdbpy_get_xmethod_arg_types): Likewise.
14971
14972 2017-01-20 Simon Marchi <simon.marchi@ericsson.com>
14973
14974 PR python/21068
14975 * python/python-internal.h (PyMem_RawMalloc): Define for
14976 Python < 3.4.
14977 * python/py-gdb-readline.c (gdbpy_readline_wrapper): Use
14978 PyMem_RawMalloc instead of PyMem_Malloc.
14979
14980 2017-01-20 Mike Wrighton <mike_wrighton@codesourcery.com>
14981 Luis Machado <lgustavo@codesourcery.com>
14982
14983 * NEWS (New commands): Mention flash-erase.
14984 (New MI commands): Mention target-flash-erase.
14985 * mi/mi-cmds.c (mi_cmd_target_flash_erase): Add target-flash-erase MI
14986 command.
14987 * mi/mi-cmds.h (mi_cmd_target_flash_erase): New declaration.
14988 * mi/mi-main.c (mi_cmd_target_flash_erase): New function.
14989 * target.c (flash_erase_command): New function.
14990 (initialize_targets): Add new flash-erase command.
14991 * target.h (flash_erase_command): New declaration.
14992
14993 2017-01-20 Joel Brobecker <brobecker@adacore.com>
14994
14995 * nat/linux-ptrace.c: Only include <sys/procfs.h> if
14996 HAVE_SYS_PROCFS_H is defined.
14997
14998 2017-01-18 Alan Hayward <alan.hayward@arm.com>
14999
15000 * remote.c (struct cached_reg): Change data into a pointer.
15001 * (stop_reply_dtr): Free data pointers before deleting vector.
15002 (process_stop_reply): Likewise.
15003 (remote_parse_stop_reply): Allocate space for data
15004
15005 2017-01-18 Alan Hayward <alan.hayward@arm.com>
15006
15007 * amd64-tdep.c (amd64_pseudo_register_read_value): remove
15008 MAX_REGISTER_SIZE.
15009 (amd64_pseudo_register_read_value): Likewise.
15010 * remote.c (fetch_register_using_p): Remove MAX_REGISTER_SIZE.
15011 (store_register_using_P): Likewise.
15012 * regcache.c (regcache_xfer_part): Likewise.
15013
15014 2017-01-16 Ivo Raisr <ivo.raisr@oracle.com>
15015
15016 Split real and pseudo registers.
15017 * sparc-tdep.h (SPARC_CORE_REGISTERS): New macro.
15018 (sparc32_pseudo_regnum): New enum.
15019 * sparc64-tdep.h (sparc64_pseudo_regnum): New enum.
15020 * sparc-tdep.c (SPARC32_FPU_REGISTERS): New macro.
15021 (SPARC32_CP0_REGISTERS): New macro.
15022 (sparc32_pseudo_register_name): New function.
15023 (sparc32_register_name): Use sparc32_pseudo_register_name.
15024 (sparc32_pseudo_register_type): New function.
15025 (sparc32_register_type): Use sparc32_pseudo_register_type.
15026 (sparc32_pseudo_register_read, sparc32_pseudo_register_write): Handle
15027 pseudo register numbers.
15028 * sparc64-tdep.c SPARC64_FPU_REGISTERS): New macro.
15029 (SPARC64_CP0_REGISTERS): New macro.
15030 (sparc64_pseudo_register_name): New function.
15031 (sparc64_register_name): Use sparc64_pseudo_register_name.
15032 (sparc64_pseudo_register_type): New function.
15033 (sparc64_register_type): Use sparc64_pseudo_register_type.
15034 (sparc64_pseudo_register_read, sparc64_pseudo_register_write): Handle
15035 pseudo register numbers.
15036 (sparc64_store_floating_fields, sparc64_extract_floating_fields,
15037 sparc64_store_arguments): Handle pseudo register numbers.
15038
15039 2017-01-13 Yao Qi <yao.qi@linaro.org>
15040
15041 * remote.c (REMOTE_DEBUG_MAX_CHAR): New macro.
15042 (putpkt_binary): Print only REMOTE_DEBUG_MAX_CHAR chars in debug
15043 output.
15044 (getpkt_or_notif_sane_1): Likewise.
15045
15046 2017-01-13 Yao Qi <yao.qi@linaro.org>
15047
15048 * Makefile.in (checker-headers): Use CXX and CXX_DIALET instead
15049 of CC. Pass "-x c++-header" instead of "-x c".
15050
15051 2017-01-12 Simon Marchi <simon.marchi@ericsson.com>
15052
15053 * remote.c (remote_can_async_p): Update comment.
15054
15055 2017-01-12 Simon Marchi <simon.marchi@ericsson.com>
15056
15057 * linux-nat.c (linux_nat_can_async_p): Update comment.
15058
15059 2017-01-12 Simon Marchi <simon.marchi@ericsson.com>
15060
15061 * serial.c (serial_open): Forget about "pc" and "lpt" serial interface.
15062
15063 2017-01-11 Simon Marchi <simon.marchi@ericsson.com>
15064
15065 * cli/cli-decode.c (lookup_cmd_1): Fix typo in comment.
15066
15067 2017-01-10 Tom Tromey <tom@tromey.com>
15068
15069 * python/py-type.c (typy_legacy_template_argument): Update.
15070 * cp-support.h (struct demangle_parse_info) (demangle_parse_info,
15071 ~demangle_parse_info): Declare new members.
15072 (cp_demangled_name_to_comp): Return unique_ptr.
15073 (cp_demangled_name_parse_free)
15074 (make_cleanup_cp_demangled_name_parse_free)
15075 (cp_new_demangle_parse_info): Remove.
15076 * cp-support.c (do_demangled_name_parse_free_cleanup)
15077 (make_cleanup_cp_demangled_name_parse_free): Remove.
15078 (inspect_type, cp_canonicalize_string_full)
15079 (cp_canonicalize_string): Update.
15080 (mangled_name_to_comp): Change return type.
15081 (cp_class_name_from_physname, method_name_from_physname)
15082 (cp_func_name, cp_remove_params): Update.
15083 * cp-name-parser.y (demangle_parse_info): New constructor, from
15084 cp_new_demangle_parse_info.
15085 (~demangle_parse_info): New destructor, from
15086 cp_demangled_name_parse_free.
15087 (cp_merge_demangle_parse_infos): Update.
15088 (cp_demangled_name_to_comp): Change return type.
15089
15090 2017-01-10 Tom Tromey <tom@tromey.com>
15091
15092 * top.c (prevent_dont_repeat): Change return type.
15093 * python/python.c (execute_gdb_command): Use std::string.
15094 Update.
15095 * guile/guile.c (gdbscm_execute_gdb_command): Update.
15096 * command.h (prevent_dont_repeat): Change return type.
15097 * breakpoint.c (bpstat_do_actions_1): Update.
15098
15099 2017-01-10 Tom Tromey <tom@tromey.com>
15100
15101 * value.h (scoped_value_mark::~scoped_value_mark): Call
15102 free_to_mark.
15103 (scoped_value_mark::free_to_mark): New method.
15104 * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Use
15105 scoped_value_mark.
15106
15107 2017-01-10 Tom Tromey <tom@tromey.com>
15108
15109 * python/py-value.c (valpy_dereference, valpy_referenced_value)
15110 (valpy_reference_value, valpy_const_value, valpy_get_address)
15111 (valpy_get_dynamic_type, valpy_lazy_string, valpy_do_cast)
15112 (valpy_getitem, valpy_call, valpy_binop_throw, valpy_negative)
15113 (valpy_absolute, valpy_richcompare_throw): Use scoped_value_mark.
15114 * dwarf2loc.c (dwarf2_loc_desc_get_symbol_read_needs): Use
15115 scoped_value_mark.
15116 * dwarf2-frame.c (execute_stack_op): Use scoped_value_mark.
15117 * value.h (scoped_value_mark): New class.
15118
15119 2017-01-10 Tom Tromey <tom@tromey.com>
15120
15121 * dwarf2read.c (dwarf2_build_psymtabs): Use psymtab_discarder.
15122 * psympriv.h (make_cleanup_discard_psymtabs): Don't declare.
15123 * psymtab.c (discard_psymtabs_upto): Remove.
15124 (make_cleanup_discard_psymtabs): Remove.
15125 (struct psymtab_state): Remove.
15126
15127 2017-01-10 Tom Tromey <tom@tromey.com>
15128
15129 * record-full.c (record_full_save_cleanups): Remove.
15130 (record_full_save): Use gdb::unlinker.
15131 * gcore.c (do_bfd_delete_cleanup): Remove.
15132 (gcore_command): Use gdb::unlinker, unique_xmalloc_ptr. Remove
15133 cleanups.
15134 * dwarf2read.c (unlink_if_set): Remove.
15135 (write_psymtabs_to_index): Use gdb::unlinker.
15136 * common/gdb_unlinker.h: New file.
15137
15138 2017-01-10 Tom Tromey <tom@tromey.com>
15139
15140 * windows-tdep.c (windows_xfer_shared_library): Update.
15141 * windows-nat.c (windows_make_so): Update.
15142 * utils.h (make_cleanup_bfd_unref): Remove.
15143 * utils.c (do_bfd_close_cleanup, make_cleanup_bfd_unref): Remove.
15144 * symfile.h (symfile_bfd_open)
15145 (find_separate_debug_file_in_section): Return gdb_bfd_ref_ptr.
15146 * symfile.c (read_symbols, symbol_file_add)
15147 (separate_debug_file_exists): Update.
15148 (symfile_bfd_open): Return gdb_bfd_ref_ptr.
15149 (generic_load, reread_symbols): Update.
15150 * symfile-mem.c (symbol_file_add_from_memory): Update.
15151 * spu-linux-nat.c (spu_bfd_open): Return gdb_bfd_ref_ptr.
15152 (spu_symbol_file_add_from_memory): Update.
15153 * solist.h (struct target_so_ops) <bfd_open>: Return
15154 gdb_bfd_ref_ptr.
15155 (solib_bfd_fopen, solib_bfd_open): Return gdb_bfd_ref_ptr.
15156 * solib.c (solib_bfd_fopen, solib_bfd_open): Return
15157 gdb_bfd_ref_ptr.
15158 (solib_map_sections, reload_shared_libraries_1): Update.
15159 * solib-svr4.c (enable_break): Update.
15160 * solib-spu.c (spu_bfd_fopen): Return gdb_bfd_ref_ptr.
15161 * solib-frv.c (enable_break2): Update.
15162 * solib-dsbt.c (enable_break): Update.
15163 * solib-darwin.c (gdb_bfd_mach_o_fat_extract): Return
15164 gdb_bfd_ref_ptr.
15165 (darwin_solib_get_all_image_info_addr_at_init): Update.
15166 (darwin_bfd_open): Return gdb_bfd_ref_ptr.
15167 * solib-aix.c (solib_aix_bfd_open): Return gdb_bfd_ref_ptr.
15168 * record-full.c (record_full_save): Update.
15169 * python/py-objfile.c (objfpy_add_separate_debug_file): Update.
15170 * procfs.c (insert_dbx_link_bpt_in_file): Update.
15171 * minidebug.c (find_separate_debug_file_in_section): Return
15172 gdb_bfd_ref_ptr.
15173 * machoread.c (macho_add_oso_symfile): Change abfd to
15174 gdb_bfd_ref_ptr.
15175 (macho_symfile_read_all_oso): Update.
15176 (macho_check_dsym): Return gdb_bfd_ref_ptr.
15177 (macho_symfile_read): Update.
15178 * jit.c (bfd_open_from_target_memory): Return gdb_bfd_ref_ptr.
15179 (jit_bfd_try_read_symtab): Update.
15180 * gdb_bfd.h (gdb_bfd_open, gdb_bfd_fopen, gdb_bfd_openr)
15181 (gdb_bfd_openw, gdb_bfd_openr_iovec)
15182 (gdb_bfd_openr_next_archived_file, gdb_bfd_fdopenr): Return
15183 gdb_bfd_ref_ptr.
15184 (gdb_bfd_ref_policy): New struct.
15185 (gdb_bfd_ref_ptr): New typedef.
15186 * gdb_bfd.c (gdb_bfd_open, gdb_bfd_fopen, gdb_bfd_openr)
15187 (gdb_bfd_openw, gdb_bfd_openr_iovec)
15188 (gdb_bfd_openr_next_archived_file, gdb_bfd_fdopenr): Return
15189 gdb_bfd_ref_ptr.
15190 * gcore.h (create_gcore_bfd): Return gdb_bfd_ref_ptr.
15191 * gcore.c (create_gcore_bfd): Return gdb_bfd_ref_ptr.
15192 (gcore_command): Update.
15193 * exec.c (exec_file_attach): Update.
15194 * elfread.c (elf_symfile_read): Update.
15195 * dwarf2read.c (dwarf2_get_dwz_file): Update.
15196 (try_open_dwop_file, open_dwo_file): Return gdb_bfd_ref_ptr.
15197 (open_and_init_dwo_file): Update.
15198 (open_dwp_file): Return gdb_bfd_ref_ptr.
15199 (open_and_init_dwp_file): Update.
15200 * corelow.c (core_open): Update.
15201 * compile/compile-object-load.c (compile_object_load): Update.
15202 * common/gdb_ref_ptr.h (ref_ptr::operator->): New operator.
15203 * coffread.c (coff_symfile_read): Update.
15204 * cli/cli-dump.c (bfd_openr_or_error, bfd_openw_or_error): Return
15205 gdb_bfd_ref_ptr. Rename.
15206 (dump_bfd_file, restore_command): Update.
15207 * build-id.h (build_id_to_debug_bfd): Return gdb_bfd_ref_ptr.
15208 * build-id.c (build_id_to_debug_bfd): Return gdb_bfd_ref_ptr.
15209 (find_separate_debug_file_by_buildid): Update.
15210
15211 2017-01-10 Tom Tromey <tom@tromey.com>
15212
15213 * common/gdb_ref_ptr.h: New file.
15214 * python/py-ref.h (struct gdbpy_ref_policy): New.
15215 (gdbpy_ref): Now a typedef.
15216
15217 2017-01-10 Tom Tromey <tom@tromey.com>
15218
15219 * utils.h (make_cleanup_htab_delete): Don't declare.
15220 * utils.c (do_htab_delete_cleanup, make_cleanup_htab_delete):
15221 Remove.
15222 * linespec.c (decode_compound_collector): Add constructor,
15223 destructor.
15224 (lookup_prefix_sym): Remove cleanup.
15225 (symtab_collector): Add constructor, destructor.
15226 (collect_symtabs_from_filename): Remove cleanup.
15227 * disasm.c (do_mixed_source_and_assembly): Use htab_up.
15228 * compile/compile-c-symbols.c (generate_c_for_variable_locations):
15229 Use htab_up.
15230 * gnu-v3-abi.c (gnuv3_print_vtable): Use htab_up.
15231 * dwarf2read.c (dw2_expand_symtabs_matching)
15232 (dw2_map_symbol_filenames, dwarf_decode_macros)
15233 (write_psymtabs_to_index): Use htab_up.
15234 * dwarf2loc.c (func_verify_no_selftailcall)
15235 (call_site_find_chain_1, func_verify_no_selftailcall)
15236 (chain_candidate, call_site_find_chain_1): Use std::unordered_set,
15237 std::vector, gdb::unique_xmalloc_ptr.
15238 (call_sitep): Remove typedef.
15239 (dwarf2_locexpr_baton_eval): Remove unused variable.
15240
15241 2017-01-10 Tom Tromey <tom@tromey.com>
15242
15243 * python/python-internal.h (make_cleanup_py_decref)
15244 (make_cleanup_py_xdecref): Don't declare.
15245 * python/py-utils.c (py_decref, make_cleanup_py_decref)
15246 (py_xdecref, make_cleanup_py_xdecref): Remove.
15247
15248 2017-01-10 Tom Tromey <tom@tromey.com>
15249
15250 * python/py-framefilter.c (py_mi_print_variables): Use gdbpy_ref.
15251 (py_print_locals, enumerate_locals, py_print_args): Use gdbpy_ref.
15252
15253 2017-01-10 Tom Tromey <tom@tromey.com>
15254
15255 * python/py-framefilter.c (enumerate_args): Use gdbpy_ref.
15256
15257 2017-01-10 Tom Tromey <tom@tromey.com>
15258
15259 * python/py-utils.c (unicode_to_encoded_string)
15260 (python_string_to_target_string)
15261 (python_string_to_target_python_string)
15262 (python_string_to_host_string, gdbpy_obj_to_string)
15263 (get_addr_from_python): Use gdbpy_ref.
15264
15265 2017-01-10 Tom Tromey <tom@tromey.com>
15266
15267 * python/py-unwind.c (pyuw_object_attribute_to_pointer): Use
15268 gdbpy_ref.
15269
15270 2017-01-10 Tom Tromey <tom@tromey.com>
15271
15272 * python/python.c (eval_python_command, gdbpy_decode_line)
15273 (gdbpy_run_events, gdbpy_start_type_printers)
15274 (gdbpy_apply_type_printers): Use gdbpy_ref.
15275
15276 2017-01-10 Tom Tromey <tom@tromey.com>
15277
15278 * python/py-param.c (get_doc_string, compute_enum_values): Use
15279 gdbpy_ref.
15280
15281 2017-01-10 Tom Tromey <tom@tromey.com>
15282
15283 * python/py-inferior.c (find_thread_object, build_inferior_list):
15284 Use gdbpy_ref.
15285
15286 2017-01-10 Tom Tromey <tom@tromey.com>
15287
15288 * python/py-framefilter.c (py_print_frame): Use gdbpy_ref.
15289
15290 2017-01-10 Tom Tromey <tom@tromey.com>
15291
15292 * python/py-finishbreakpoint.c (bpfinishpy_out_of_scope): Use
15293 gdbpy_ref.
15294
15295 2017-01-10 Tom Tromey <tom@tromey.com>
15296
15297 * python/py-cmd.c (cmdpy_completer_helper): Use gdbpy_ref. Remove
15298 extra incref.
15299 (cmdpy_completer_handle_brkchars, cmdpy_completer, cmdpy_init):
15300 Use gdbpy_ref.
15301
15302 2017-01-10 Tom Tromey <tom@tromey.com>
15303
15304 * python/py-breakpoint.c (gdbpy_breakpoint_cond_says_stop): Use
15305 gdbpy_ref.
15306
15307 2017-01-10 Tom Tromey <tom@tromey.com>
15308
15309 * python/py-arch.c (archpy_disassemble): Use gdbpy_ref. Don't
15310 decref results of PyArg_ParseTupleAndKeywords.
15311
15312 2017-01-10 Tom Tromey <tom@tromey.com>
15313
15314 * python/python.c (python_run_simple_file): Use
15315 unique_xmalloc_ptr, gdbpy_ref.
15316
15317 2017-01-10 Tom Tromey <tom@tromey.com>
15318
15319 * python/py-prettyprint.c (print_stack_unless_memory_error)
15320 (print_string_repr, print_children): Use gdbpy_ref.
15321 (dummy_python_frame): New class.
15322 (dummy_python_frame::dummy_python_frame): Rename from
15323 push_dummy_python_frame.
15324 (py_restore_tstate): Remove.
15325
15326 2017-01-10 Tom Tromey <tom@tromey.com>
15327
15328 * python/py-framefilter.c (py_print_frame): Use gdbpy_ref.
15329
15330 2017-01-10 Tom Tromey <tom@tromey.com>
15331
15332 * python/python.c (ensure_python_env, restore_python_env):
15333 Remove.
15334 * python/python-internal.h (ensure_python_env): Don't declare.
15335 * varobj.h (varobj_ensure_python_env): Don't declare.
15336 * varobj.c (varobj_ensure_python_env): Remove.
15337
15338 2017-01-10 Tom Tromey <tom@tromey.com>
15339
15340 * varobj.c (varobj_value_get_print_value): Use
15341 gdbpy_enter_varobj.
15342
15343 2017-01-10 Tom Tromey <tom@tromey.com>
15344
15345 * python/py-prettyprint.c (print_string_repr, print_children):
15346 Update.
15347 * python/py-lazy-string.c (gdbpy_extract_lazy_string): Change type
15348 of "encoding".
15349 * varobj.c (varobj_value_get_print_value): Update.
15350 * python/python-internal.h (gdbpy_extract_lazy_string): Update.
15351
15352 2017-01-10 Tom Tromey <tom@tromey.com>
15353
15354 * varobj.c (varobj_get_display_hint)
15355 (dynamic_varobj_has_child_method, install_new_value_visualizer)
15356 (varobj_set_visualizer, free_variable): Use
15357 gdbpy_enter_varobj.
15358
15359 2017-01-10 Tom Tromey <tom@tromey.com>
15360
15361 * python/python.c (python_command): Use gdbpy_enter, gdbpy_ref.
15362 (do_finish_initialization): New function. Use gdbpy_ref.
15363 (gdbpy_finish_initialization): Use gdbpy_enter. Call
15364 do_finish_initialization.
15365
15366 2017-01-10 Tom Tromey <tom@tromey.com>
15367
15368 * python/py-param.c (get_set_value, get_show_value): Use
15369 gdbpy_enter, gdbpy_ref.
15370
15371 2017-01-10 Tom Tromey <tom@tromey.com>
15372
15373 * python/py-function.c (fnpy_call): Use gdbpy_enter, gdbpy_ref.
15374
15375 2017-01-10 Tom Tromey <tom@tromey.com>
15376
15377 * python/py-cmd.c (cmdpy_function): Use gdbpy_enter, gdbpy_ref.
15378
15379 2017-01-10 Tom Tromey <tom@tromey.com>
15380
15381 * python/py-varobj.c (py_varobj_iter_dtor, py_varobj_iter_next):
15382 Use gdbpy_enter_varobj.
15383
15384 2017-01-10 Tom Tromey <tom@tromey.com>
15385
15386 * varobj.c (gdbpy_enter_varobj): New constructor.
15387 * python/python-internal.h (gdbpy_enter_varobj): New class.
15388 * python/py-varobj.c (py_varobj_get_iterator): Use
15389 gdbpy_enter_varobj.
15390
15391 2017-01-10 Tom Tromey <tom@tromey.com>
15392
15393 * python/py-xmethods.c (gdbpy_get_xmethod_result_type): Use
15394 gdbpy_enter, gdbpy_ref, unique_xmalloc_ptr.
15395 (gdbpy_invoke_xmethod): Use gdbpy_ref, gdbpy_enter.
15396 (gdbpy_get_xmethod_arg_types): Use gdbpy_ref,
15397 unique_xmalloc_ptr.
15398 (gdbpy_get_xmethod_arg_types): Use gdbpy_ref, gdbpy_enter.
15399
15400 2017-01-10 Tom Tromey <tom@tromey.com>
15401
15402 * python/py-xmethods.c (invoke_match_method): Use
15403 gdbpy_ref.
15404
15405 2017-01-10 Tom Tromey <tom@tromey.com>
15406
15407 * python/py-xmethods.c (gdbpy_get_matching_xmethod_workers): use
15408 gdbpy_enter, gdbpy_ref.
15409
15410 2017-01-10 Tom Tromey <tom@tromey.com>
15411
15412 * python/python.c (python_interactive_command): Use gdbpy_enter.
15413
15414 2017-01-10 Tom Tromey <tom@tromey.com>
15415
15416 * python/python.c (gdbpy_before_prompt_hook): Use gdbpy_enter,
15417 gdbpy_ref.
15418
15419 2017-01-10 Tom Tromey <tom@tromey.com>
15420
15421 * python/py-prettyprint.c (gdbpy_apply_val_pretty_printer): Use
15422 gdbpy_enter, gdbpy_ref, unique_xmalloc_ptr.
15423
15424 2017-01-10 Tom Tromey <tom@tromey.com>
15425
15426 * utils.h (htab_deleter): New struct.
15427 (htab_up): New typedef.
15428 * python/py-framefilter.c (gdbpy_apply_frame_filter): Use
15429 gdbpy_enter, gdbpy_ref, htab_up.
15430
15431 2017-01-10 Tom Tromey <tom@tromey.com>
15432
15433 * python/py-unwind.c (pending_frame_invalidate): Remove.
15434 (pyuw_sniffer): Use gdbpy_enter and gdbpy_ref.
15435
15436 2017-01-10 Tom Tromey <tom@tromey.com>
15437
15438 * python/py-xmethods.c (gdbpy_free_xmethod_worker_data)
15439 (gdbpy_clone_xmethod_worker_data): Use gdbpy_enter.
15440
15441 2017-01-10 Tom Tromey <tom@tromey.com>
15442
15443 * python/py-type.c (save_objfile_types): Use gdbpy_enter.
15444
15445 2017-01-10 Tom Tromey <tom@tromey.com>
15446
15447 * python/python.c (gdbpy_eval_from_control_command)
15448 (gdbpy_source_script, gdbpy_run_events)
15449 (gdbpy_source_objfile_script, gdbpy_execute_objfile_script)
15450 (gdbpy_free_type_printers, gdbpy_finish_initialization): Use
15451 gdbpy_enter.
15452
15453 2017-01-10 Tom Tromey <tom@tromey.com>
15454
15455 * python/py-progspace.c (py_free_pspace): Use gdbpy_enter.
15456
15457 2017-01-10 Tom Tromey <tom@tromey.com>
15458
15459 * python/py-objfile.c (py_free_objfile): Use gdbpy_enter.
15460
15461 2017-01-10 Tom Tromey <tom@tromey.com>
15462
15463 * python/py-inferior.c (python_on_normal_stop, python_on_resume)
15464 (python_on_inferior_call_pre, python_on_inferior_call_post)
15465 (python_on_memory_change, python_on_register_change)
15466 (python_inferior_exit, python_new_objfile, add_thread_object)
15467 (delete_thread_object, py_free_inferior): Use gdbpy_enter.
15468
15469 2017-01-10 Tom Tromey <tom@tromey.com>
15470
15471 * python/py-finishbreakpoint.c (bpfinishpy_handle_stop)
15472 (bpfinishpy_handle_exit): Use gdbpy_enter.
15473
15474 2017-01-10 Tom Tromey <tom@tromey.com>
15475
15476 * python/py-cmd.c (cmdpy_destroyer)
15477 (cmdpy_completer_handle_brkchars, cmdpy_completer): Use
15478 gdbpy_enter.
15479
15480 2017-01-10 Tom Tromey <tom@tromey.com>
15481
15482 * python/py-breakpoint.c (gdbpy_breakpoint_cond_says_stop): Use
15483 gdbpy_enter.
15484 (gdbpy_breakpoint_has_cond): Likewise.
15485
15486 2017-01-10 Tom Tromey <tom@tromey.com>
15487
15488 * python/python.c (gdbpy_enter): New constructor.
15489 (~gdbpy_enter): New destructor.
15490 (restore_python_env, ensure_python_env): Rewrite.
15491 * python/python-internal.h (gdbpy_enter): New class.
15492
15493 2017-01-10 Tom Tromey <tom@tromey.com>
15494
15495 * python/py-symbol.c (gdbpy_lookup_symbol): Use gdbpy_ref.
15496
15497 2017-01-10 Tom Tromey <tom@tromey.com>
15498
15499 * python/py-value.c (value_has_field, get_field_flag)
15500 (get_field_type, valpy_getitem, convert_value_from_python): Use
15501 gdbpy_ref.
15502
15503 2017-01-10 Tom Tromey <tom@tromey.com>
15504
15505 * python/python.c (gdbpy_progspaces, gdbpy_objfiles): Use
15506 gdbpy_ref.
15507
15508 2017-01-10 Tom Tromey <tom@tromey.com>
15509
15510 * python/py-prettyprint.c (search_pp_list)
15511 (find_pretty_printer_from_objfiles)
15512 (find_pretty_printer_from_progspace)
15513 (find_pretty_printer_from_gdb, find_pretty_printer)
15514 (gdbpy_get_display_hint, gdbpy_get_varobj_pretty_printer): Use
15515 gdbpy_ref.
15516
15517 2017-01-10 Tom Tromey <tom@tromey.com>
15518
15519 * python/py-param.c (call_doc_function): Use gdbpy_ref.
15520
15521 2017-01-10 Tom Tromey <tom@tromey.com>
15522
15523 * python/py-linetable.c (build_line_table_tuple_from_pcs)
15524 (ltpy_get_all_source_lines): Use gdbpy_ref.
15525
15526 2017-01-10 Tom Tromey <tom@tromey.com>
15527
15528 * python/py-framefilter.c (extract_sym, extract_value)
15529 (get_py_iter_from_func, bootstrap_python_frame_filters): Use
15530 gdbpy_ref.
15531
15532 2017-01-10 Tom Tromey <tom@tromey.com>
15533
15534 * python/py-breakpoint.c (gdbpy_breakpoints): Use gdbpy_ref.
15535
15536 2017-01-10 Tom Tromey <tom@tromey.com>
15537
15538 * python/py-inferior.c (gdbpy_inferiors): Use gdbpy_ref.
15539
15540 2017-01-10 Tom Tromey <tom@tromey.com>
15541
15542 * python/py-function.c (convert_values_to_python, fnpy_init): Use
15543 gdbpy_ref.
15544
15545 2017-01-10 Tom Tromey <tom@tromey.com>
15546
15547 * python/py-cmd.c (gdbpy_string_to_argv): Use gdbpy_ref.
15548
15549 2017-01-10 Tom Tromey <tom@tromey.com>
15550
15551 * python/py-type.c (convert_field, make_fielditem, typy_fields)
15552 (typy_range): Use gdbpy_ref.
15553
15554 2017-01-10 Tom Tromey <tom@tromey.com>
15555
15556 * python/py-threadevent.c (create_thread_event_object): Use
15557 gdbpy_ref.
15558 * python/py-stopevent.c (create_stop_event_object): Simplify.
15559 (emit_stop_event): Use gdbpy_ref.
15560 * python/py-signalevent.c (create_signal_event_object): Use
15561 gdbpy_ref.
15562 * python/py-newobjfileevent.c (create_new_objfile_event_object)
15563 (emit_new_objfile_event, create_clear_objfiles_event_object)
15564 (emit_clear_objfiles_event): Use gdbpy_ref.
15565 * python/py-infevents.c (create_inferior_call_event_object)
15566 (create_register_changed_event_object)
15567 (create_memory_changed_event_object, emit_inferior_call_event)
15568 (emit_memory_changed_event, emit_register_changed_event): Use
15569 gdbpy_ref.
15570 * python/py-exitedevent.c (create_exited_event_object)
15571 (emit_exited_event): Use gdbpy_ref.
15572 * python/py-event.h (evpy_emit_event): Remove
15573 CPYCHECKER_STEALS_REFERENCE_TO_ARG annotation.
15574 * python/py-event.c (evpy_emit_event): Use gdbpy_ref.
15575 * python/py-continueevent.c (emit_continue_event): Use
15576 gdbpy_ref.
15577 * python/py-breakpoint.c (gdbpy_breakpoint_created)
15578 (gdbpy_breakpoint_deleted, gdbpy_breakpoint_modified): Use
15579 gdbpy_ref.
15580 * python/py-bpevent.c (create_breakpoint_event_object): Use
15581 gdbpy_ref.
15582
15583 2017-01-10 Tom Tromey <tom@tromey.com>
15584
15585 * python/py-ref.h: New file.
15586
15587 2017-01-10 Simon Marchi <simon.marchi@ericsson.com>
15588
15589 * cli-out.c (cli_ui_out::do_redirect): Change return type to
15590 void.
15591 * cli-out.h (cli_ui_out::do_redirect): Likewise.
15592 * mi/mi-out.c (mi_ui_out::do_redirect): Likewise.
15593 * mi/mi-out.h (mi_ui_out::do_redirect): Likewise.
15594 * ui-out.c (ui_out::redirect): Likewise.
15595 * ui-out.h (ui_out::redirect, ui_out::do_redirect): Likewise.
15596 * cli/cli-logging.c (set_logging_redirect): Update call site of
15597 ui_out::redirect.
15598 (handle_redirections): Likewise.
15599 * scm-ports.c (ioscm_with_output_to_port_worker): Likewise.
15600 * top.c (execute_command_to_string): Likewise.
15601 * utils.c (do_ui_out_redirect_pop): Likewise.
15602
15603 2017-01-10 Simon Marchi <simon.marchi@ericsson.com>
15604
15605 * stack.c (_initialize_stack): Update "frame" command help message.
15606
15607 2017-01-08 Iain Buclaw <ibuclaw@gdcproject.org>
15608
15609 * d-exp.y (CastExpression): Emit UNOP_CAST_TYPE.
15610
15611 2017-01-06 Yao Qi <yao.qi@linaro.org>
15612
15613 * x86-linux-nat.h: Include gdb_proc_service.h.
15614
15615 2017-01-06 Yao Qi <yao.qi@linaro.org>
15616
15617 * ser-base.h: Include serial.h.
15618
15619 2017-01-06 Yao Qi <yao.qi@linaro.org>
15620
15621 * ppc-linux-tdep.h: Include ppc-tdep.h.
15622
15623 2017-01-06 Yao Qi <yao.qi@linaro.org>
15624
15625 * nat/amd64-linux-siginfo.h: Include signal.h.
15626
15627 2017-01-06 Yao Qi <yao.qi@linaro.org>
15628
15629 * nat/aarch64-linux-hw-point.h: Include break-common.h.
15630
15631 2017-01-06 Yao Qi <yao.qi@linaro.org>
15632
15633 * mi/mi-parse.h: Include mi-cmds.h.
15634
15635 2017-01-06 Yao Qi <yao.qi@linaro.org>
15636
15637 * inf-loop.c: Don't include "target.h".
15638 * inf-loop.h: Include it here.
15639
15640 2017-01-06 Yao Qi <yao.qi@linaro.org>
15641
15642 * dfp.h: Include "dboulest.h" and "expression.h".
15643
15644 2017-01-06 Yao Qi <yao.qi@linaro.org>
15645
15646 * ax-gdb.h: Include "ax.h".
15647
15648 2017-01-06 Yao Qi <yao.qi@linaro.org>
15649
15650 * Makefile.in (HFILES_NO_SRCDIR): Replace gdb_ptrace.h
15651 with nat/gdb_ptrace.h.
15652
15653 2017-01-05 Yao Qi <yao.qi@linaro.org>
15654
15655 * mips-fbsd-tdep.c (mips_fbsd_sigframe_init): Move && to
15656 new line.
15657 (mips64_fbsd_sigframe_init): Likewise.
15658
15659 2017-01-04 John Baldwin <jhb@FreeBSD.org>
15660
15661 * mips-fbsd-tdep.c (_initialize_mips_fbsd_tdep): Use
15662 GDB_OSABI_FREEBSD instead of GDB_OSABI_FREEBSD_ELF.
15663
15664 2017-01-04 John Baldwin <jhb@FreeBSD.org>
15665
15666 * Makefile.in (ALLDEPFILES): Add mips-fbsd-nat.c.
15667 * NEWS: Mention new FreeBSD/mips native configuration.
15668 * config/mips/fbsd.mh: New file.
15669 * configure.host: Add mips*-*-freebsd*.
15670 * mips-fbsd-nat.c: New file.
15671
15672 2017-01-04 John Baldwin <jhb@FreeBSD.org>
15673
15674 * Makefile.in (ALL_TARGET_OBS): Add mips-fbsd-tdep.o.
15675 (ALLDEPFILES): Add mips-fbsd-tdep.c.
15676 * NEWS: Mention new FreeBSD/mips target.
15677 * configure.tgt: Add mips*-*-freebsd*.
15678 * mips-fbsd-tdep.c: New file.
15679 * mips-fbsd-tdep.h: New file.
15680
15681 2017-01-04 Yao Qi <yao.qi@linaro.org>
15682
15683 * dwarf2loc.c (write_pieced_value): Don't use VALUE_FRAME_ID (to),
15684 use c->frame_id when the piece location is DWARF_VALUE_REGISTER.
15685
15686 2017-01-01 Joel Brobecker <brobecker@adacore.com>
15687
15688 Update copyright year range in all GDB files.
15689
15690 2017-01-01 Joel Brobecker <brobecker@adacore.com>
15691
15692 * config/djgpp/fnchange.lst: Add entry for gdb/ChangeLog-2016.
15693
15694 For older changes see ChangeLog-2016.
15695 \f
15696 Local Variables:
15697 mode: change-log
15698 left-margin: 8
15699 fill-column: 74
15700 version-control: never
15701 coding: utf-8
15702 End: