]> git.ipfire.org Git - thirdparty/binutils-gdb.git/blob - gdb/ChangeLog
Add Python rbreak command.
[thirdparty/binutils-gdb.git] / gdb / ChangeLog
1 2017-11-16 Phil Muldoon <pmuldoon@redhat.com>
2
3 * python/python.c (gdbpy_rbreak): New function.
4 * NEWS: Document Python rbreak feature.
5
6 2017-11-16 Yao Qi <yao.qi@linaro.org>
7
8 * features/tic6x-c62x.xml: Remove.
9 * features/tic6x-c64x.xml: Remove.
10 * features/tic6x-c64xp.xml: Remove.
11
12 2017-11-15 John Baldwin <jhb@FreeBSD.org>
13
14 * symtab.h: Include <array>.
15
16 2017-11-15 John Baldwin <jhb@FreeBSD.org>
17
18 * bsd-kvm.c (bsd_kvm_cmd): Constify 'arg'.
19 (bsd_kvm_proc_cmd): Likewise.
20
21 2017-11-15 Simon Marchi <simon.marchi@ericsson.com>
22
23 * tui/tui-win.c (window_name_completer): Replace VEC with
24 std::vector.
25
26 2017-11-15 Andrew Cagney <cagney@gnu.org>
27
28 * MAINTAINERS: Remove no-longer applicable entries.
29
30 2017-11-15 Andrew Cagney <cagney@gnu.org>
31
32 * MAINTAINERS: Move self to Past Maintainers.
33
34 2017-11-15 Yao Qi <yao.qi@linaro.org>
35
36 * features/Makefile (XMLTOC): Remove nios2-linux.xml.
37 * features/nios2-linux.c: Remove.
38 * nios2-linux-tdep.c (_initialize_nios2_linux_tdep): Don't call
39 initialize_tdesc_nios2_linux.
40
41 2017-11-15 Yao Qi <yao.qi@linaro.org>
42
43 * m68hc11-tdep.c (M68HC11_NUM_REGS): Change it to
44 M68HC11_LAST_HARD_REG + 1.
45
46 2017-11-14 Paul Carroll <pcarroll@codesourcery.com>
47
48 PR gdb/22388
49 * remote.c (remote_write_bytes_aux, remote_read_bytes_1,
50 remote_read_bytes, remote_write_qxfer, remote_xfer_partial):
51 Return TARGET_XFER_EOF if size of returned data is 0.
52
53 2017-11-14 Simon Marchi <simon.marchi@ericsson.com>
54
55 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
56 memory-map-selftests.c.
57 (SUBDIR_UNITTESTS_OBS): Add memory-map-selftests.o.
58 * memory-map.c (memory_map_start_memory): Fix computation of hi
59 address.
60 * unittests/memory-map-selftests.c: New file.
61
62 2017-11-09 Joel Brobecker <brobecker@adacore.com>
63
64 * ada-lang.c: Fix some typos in the general command documenting
65 how Ada expressions are being evaluated and how their result
66 is printed.
67
68 2017-11-09 Tom Tromey <tom@tromey.com>
69
70 * psymtab.c (psymbol_hash): Do not hash string contents.
71 (psymbol_compare): Add comment.
72
73 2017-11-09 Tom Tromey <tom@tromey.com>
74
75 * dictionary.c (dict_hash): Move "TKB" check into the "switch".
76
77 2017-11-08 Joel Brobecker <brobecker@adacore.com>
78
79 * ada-exp.y (write_var_from_sym): Remove parameter
80 "orig_left_context". Update all callers.
81
82 2017-11-08 Simon Marchi <simon.marchi@ericsson.com>
83
84 * tracepoint.h (class collection_list) <stringify>: Return
85 std::vector<std::string>.
86 (encode_actions_rsp): Change parameters to
87 std::vector<std::string> *.
88 * tracepoint.c (collection_list::stringify): Return
89 std::vector<std::string> and adjust accordingly.
90 (encode_actions_rsp): Changee parameters to
91 std::vector<std::string> and adjust accordingly.
92 * remote.c (free_actions_list),
93 free_actions_list_cleanup_wrapper): Remove.
94 (remote_download_tracepoint): Adjust to std::vector.
95
96 2017-11-08 Tom Tromey <tom@tromey.com>
97
98 * dwarf2read.c (symbolp): Remove typedef.
99 (read_func_scope): Use std::vector.
100 (process_structure_scope): Use std::vector.
101
102 2017-11-08 Pedro Alves <palves@redhat.com>
103
104 * ada-lang.c (ada_make_symbol_completion_list): Use
105 completion_skip_symbol.
106 * symtab.c (symbol_is_function_or_method(minimal_symbol*)): New.
107 (symbol_is_function_or_method(symbol*)): New.
108 (add_symtab_completions): Add complete_symbol_mode parameter. Use
109 completion_skip_symbol.
110 (default_collect_symbol_completion_matches_break_on): Use
111 completion_skip_symbol. Pass down mode.
112 (collect_file_symbol_completion_matches): Pass down mode.
113 * symtab.h (symbol_is_function_or_method): New declarations.
114 (completion_skip_symbol): New template function.
115
116 2017-11-08 Pedro Alves <palves@redhat.com>
117
118 * linespec.c (iterate_over_all_matching_symtabs): Add
119 search_domain parameter. Pass it down to expand_symtabs_matching.
120 (decode_objc): Request FUNCTIONS_DOMAIN symbols only.
121 (lookup_prefix_sym): Adjust by passing ALL_DOMAIN as
122 search_domain.
123 (add_all_symbol_names_from_pspace): Add search_domain parameter.
124 Pass it down.
125 (find_method, find_function_symbols): Request FUNCTIONS_DOMAIN
126 symbols.
127 (add_matching_symbols_to_info): Add search_domain parameter. Pass
128 it down.
129
130 2017-11-08 Pedro Alves <palves@redhat.com>
131
132 * ada-lang.c (ada_make_symbol_completion_list): Remove text and
133 text_len locals and don't pass them down.
134 * symtab.c (completion_list_add_name): Remove
135 sym_text/sym_text_len parameters and adjust.
136 (completion_list_add_symbol, completion_list_add_msymbol)
137 (completion_list_objc_symbol, completion_list_add_fields)
138 (add_symtab_completions): Likewise.
139 (default_collect_symbol_completion_matches_break_on)
140 (collect_file_symbol_completion_matches): Remove sym_text_len
141 local and don't pass it down.
142 * symtab.h (completion_list_add_name): Remove
143 sym_text/sym_text_len parameters.
144
145 2017-11-08 Pedro Alves <palves@redhat.com>
146
147 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
148 unittests/lookup_name_info-selftests.c.
149 (SUBDIR_UNITTESTS_OBS): Add lookup_name_info-selftests.o.
150 * cp-support.c: Include "selftest.h".
151 (cp_remove_params_1): Rename from cp_remove_params. Add
152 'require_param' parameter, and handle it.
153 (cp_remove_params): Reimplement.
154 (cp_remove_params_if_any): New.
155 (selftests::quote): New.
156 (selftests::check_remove_params): New.
157 (selftests::test_cp_remove_params): New.
158 (_initialize_cp_support): Install
159 selftests::test_cp_remove_params.
160 * cp-support.h (cp_remove_params_if_any): Declare.
161 * dwarf2read.c :Include "selftest.h".
162 (dw2_expand_symtabs_matching_symbol): Use
163 lookup_name_info::make_ignore_params.
164 (selftests::dw2_expand_symtabs_matching::mock_mapped_index)
165 (selftests::dw2_expand_symtabs_matching::string_or_null)
166 (selftests::dw2_expand_symtabs_matching::check_match)
167 (selftests::dw2_expand_symtabs_matching::test_symbols)
168 (selftests::dw2_expand_symtabs_matching::run_test): New.
169 (_initialize_dwarf2_read): Register
170 selftests::dw2_expand_symtabs_matching::run_test.
171 * psymtab.c (psym_expand_symtabs_matching): Use
172 lookup_name_info::make_ignore_params.
173 * symtab.c (demangle_for_lookup_info::demangle_for_lookup_info):
174 If the lookup name wants to ignore parameters, strip them.
175 (compare_symbol_name): Remove sym_text/sym_text_len parameters and
176 code handling '('.
177 (completion_list_add_name): Don't pass down sym_text/sym_text_len.
178 (default_collect_symbol_completion_matches_break_on): Don't try to
179 strip parameters.
180 * symtab.h (lookup_name_info::lookup_name_info): Add
181 'ignore_parameters' parameter.
182 (lookup_name_info::ignore_parameters)
183 (lookup_name_info::make_ignore_params): New methods.
184 (lookup_name_info::m_ignore_parameters): New field.
185 * unittests/lookup_name_info-selftests.c: New file.
186
187 2017-11-08 Pedro Alves <palves@redhat.com>
188
189 * dwarf2read.c (dw2_expand_marked_cus)
190 (dw2_expand_symtabs_matching_symbol): Remove forward declarations.
191 (dw2_expand_symtabs_matching): Move further below.
192 (dw2_expand_marked_cus): Reindent.
193
194 2017-11-08 Pedro Alves <palves@redhat.com>
195
196 * dwarf2read.c (byte_swap, MAYBE_SWAP): Move higher up in file.
197 (struct name_component): New.
198 (mapped_index::name_components): New field.
199 (mapped_index::symbol_name_at): New method.
200 (dwarf2_read_index): Call mapped_index ctor.
201 (dw2_map_matching_symbols): Add comment about name_components
202 table.
203 (dw2_expand_symtabs_matching): Factor part to...
204 (dw2_expand_symtabs_matching_symbol): ... this new function.
205 Build name components table, and lookup symbols in it before
206 calling the name matcher.
207 (dw2_expand_marked_cus): New, factored out from
208 dw2_expand_symtabs_matching.
209 (dwarf2_per_objfile_free): Call the mapped_index's dtor.
210
211 2017-11-08 Pedro Alves <palves@redhat.com>
212
213 * ada-lang.c (ada_encode): Rename to ..
214 (ada_encode_1): ... this. Add throw_errors parameter and handle
215 it.
216 (ada_encode): Reimplement.
217 (match_name): Delete, folded into full_name.
218 (resolve_subexp): No longer pass the encoded name to
219 ada_lookup_symbol_list.
220 (should_use_wild_match): Delete.
221 (name_match_type_from_name): New.
222 (ada_lookup_simple_minsym): Use lookup_name_info and the
223 language's symbol_name_matcher_ftype.
224 (add_symbols_from_enclosing_procs, ada_add_local_symbols)
225 (ada_add_block_renamings): Adjust to use lookup_name_info.
226 (ada_lookup_name): New.
227 (add_nonlocal_symbols, ada_add_all_symbols)
228 (ada_lookup_symbol_list_worker, ada_lookup_symbol_list)
229 (ada_iterate_over_symbols): Adjust to use lookup_name_info.
230 (ada_name_for_lookup): Delete.
231 (ada_lookup_encoded_symbol): Construct a verbatim name.
232 (wild_match): Reverse sense of return type. Use bool.
233 (full_match): Reverse sense of return type. Inline bits of old
234 match_name here.
235 (ada_add_block_symbols): Adjust to use lookup_name_info.
236 (symbol_completion_match): Delete, folded into...
237 (ada_lookup_name_info::matches): ... .this new method.
238 (symbol_completion_add): Delete.
239 (ada_collect_symbol_completion_matches): Add name_match_type
240 parameter. Adjust to use lookup_name_info and
241 completion_list_add_name.
242 (get_var_value, ada_add_global_exceptions): Adjust to use
243 lookup_name_info.
244 (ada_get_symbol_name_cmp): Delete.
245 (do_wild_match, do_full_match): New functions.
246 (ada_lookup_name_info::ada_lookup_name_info): New method.
247 (ada_symbol_name_matches, ada_get_symbol_name_matcher): New
248 functions.
249 (ada_language_defn): Install ada_get_symbol_name_matcher.
250 * ada-lex.l (processId): If name starts with '<', copy it
251 verbatim.
252 * block.c (block_iter_match_step, block_iter_match_first)
253 (block_iter_match_next, block_lookup_symbol)
254 (block_lookup_symbol_primary, block_find_symbol): Adjust to use
255 lookup_name_info.
256 * block.h (block_iter_match_first, block_iter_match_next)
257 (ALL_BLOCK_SYMBOLS_WITH_NAME): Adjust to use lookup_name_info.
258 * c-lang.c (c_language_defn, cplus_language_defn)
259 (asm_language_defn, minimal_language_defn): Adjust comments to
260 refer to la_get_symbol_name_matcher.
261 * completer.c (complete_files_symbols)
262 (collect_explicit_location_matches, symbol_completer): Pass a
263 symbol_name_match_type down.
264 * completer.h (class completion_match, completion_match_result):
265 New classes.
266 (completion_tracker::reset_completion_match_result): New method.
267 (completion_tracker::m_completion_match_result): New field.
268 * cp-support.c (make_symbol_overload_list_block): Adjust to use
269 lookup_name_info.
270 (cp_fq_symbol_name_matches, cp_get_symbol_name_matcher): New
271 functions.
272 * cp-support.h (cp_get_symbol_name_matcher): New declaration.
273 * d-lang.c: Adjust comments to refer to
274 la_get_symbol_name_matcher.
275 * dictionary.c (dict_vector) <iter_match_first, iter_match_next>:
276 Adjust to use lookup_name_info.
277 (dict_iter_match_first, dict_iter_match_next)
278 (iter_match_first_hashed, iter_match_next_hashed)
279 (iter_match_first_linear, iter_match_next_linear): Adjust to work
280 with a lookup_name_info.
281 * dictionary.h (dict_iter_match_first, dict_iter_match_next):
282 Likewise.
283 * dwarf2read.c (dw2_lookup_symbol): Adjust to use lookup_name_info.
284 (dw2_map_matching_symbols): Adjust to use symbol_name_match_type.
285 (gdb_index_symbol_name_matcher): New class.
286 (dw2_expand_symtabs_matching) Adjust to use lookup_name_info and
287 gdb_index_symbol_name_matcher. Accept a NULL symbol_matcher.
288 * f-lang.c (f_collect_symbol_completion_matches): Adjust to work
289 with a symbol_name_match_type.
290 (f_language_defn): Adjust comments to refer to
291 la_get_symbol_name_matcher.
292 * go-lang.c (go_language_defn): Adjust comments to refer to
293 la_get_symbol_name_matcher.
294 * language.c (default_symbol_name_matcher)
295 (language_get_symbol_name_matcher): New functions.
296 (unknown_language_defn, auto_language_defn): Adjust comments to
297 refer to la_get_symbol_name_matcher.
298 * language.h (symbol_name_cmp_ftype): Delete.
299 (language_defn) <la_collect_symbol_completion_matches>: Add match
300 type parameter.
301 <la_get_symbol_name_cmp>: Delete field.
302 <la_get_symbol_name_matcher>: New field.
303 <la_iterate_over_symbols>: Adjust to use lookup_name_info.
304 (default_symbol_name_matcher, language_get_symbol_name_matcher):
305 Declare.
306 * linespec.c (iterate_over_all_matching_symtabs)
307 (iterate_over_file_blocks): Adjust to use lookup_name_info.
308 (find_methods): Add language parameter, and use lookup_name_info
309 and the language's symbol_name_matcher_ftype.
310 (linespec_complete_function): Adjust.
311 (lookup_prefix_sym): Use lookup_name_info.
312 (add_all_symbol_names_from_pspace): Adjust.
313 (find_superclass_methods): Add language parameter and pass it
314 down.
315 (find_method): Pass symbol language down.
316 (find_linespec_symbols): Don't demangle or Ada encode here.
317 (search_minsyms_for_name): Add lookup_name_info parameter.
318 (add_matching_symbols_to_info): Add name_match_type parameter.
319 Use lookup_name_info.
320 * m2-lang.c (m2_language_defn): Adjust comments to refer to
321 la_get_symbol_name_matcher.
322 * minsyms.c: Include <algorithm>.
323 (add_minsym_to_demangled_hash_table): Remove table parameter and
324 add objfile parameter. Use search_name_hash, and add language to
325 demangled languages vector.
326 (struct found_minimal_symbols): New struct.
327 (lookup_minimal_symbol_mangled, lookup_minimal_symbol_demangled):
328 New functions.
329 (lookup_minimal_symbol): Adjust to use them. Don't canonicalize
330 input names here. Use lookup_name_info instead. Lookup up
331 demangled names once for each language in the demangled names
332 vector.
333 (iterate_over_minimal_symbols): Use lookup_name_info. Lookup up
334 demangled names once for each language in the demangled names
335 vector.
336 (build_minimal_symbol_hash_tables): Adjust.
337 * minsyms.h (iterate_over_minimal_symbols): Adjust to pass down a
338 lookup_name_info.
339 * objc-lang.c (objc_language_defn): Adjust comment to refer to
340 la_get_symbol_name_matcher.
341 * objfiles.h: Include <vector>.
342 (objfile_per_bfd_storage) <demangled_hash_languages>: New field.
343 * opencl-lang.c (opencl_language_defn): Adjust comment to refer to
344 la_get_symbol_name_matcher.
345 * p-lang.c (pascal_language_defn): Adjust comment to refer to
346 la_get_symbol_name_matcher.
347 * psymtab.c (psym_lookup_symbol): Use lookup_name_info.
348 (match_partial_symbol): Use symbol_name_match_type,
349 lookup_name_info and psymbol_name_matches.
350 (lookup_partial_symbol): Use lookup_name_info.
351 (map_block): Use symbol_name_match_type and lookup_name_info.
352 (psym_map_matching_symbols): Use symbol_name_match_type.
353 (psymbol_name_matches): New.
354 (recursively_search_psymtabs): Use lookup_name_info and
355 psymbol_name_matches. Rename 'kind' parameter to 'domain'.
356 (psym_expand_symtabs_matching): Use lookup_name_info. Rename
357 'kind' parameter to 'domain'.
358 * rust-lang.c (rust_language_defn): Adjust comment to refer to
359 la_get_symbol_name_matcher.
360 * symfile-debug.c (debug_qf_map_matching_symbols)
361 (debug_qf_map_matching_symbols): Use symbol_name_match_type.
362 (debug_qf_expand_symtabs_matching): Use lookup_name_info.
363 * symfile.c (expand_symtabs_matching): Use lookup_name_info.
364 * symfile.h (quick_symbol_functions) <map_matching_symbols>:
365 Adjust to use symbol_name_match_type.
366 <expand_symtabs_matching>: Adjust to use lookup_name_info.
367 (expand_symtabs_matching): Adjust to use lookup_name_info.
368 * symmisc.c (maintenance_expand_symtabs): Use
369 lookup_name_info::match_any ().
370 * symtab.c (symbol_matches_search_name): New.
371 (eq_symbol_entry): Adjust to use lookup_name_info and the
372 language's matcher.
373 (demangle_for_lookup_info::demangle_for_lookup_info): New.
374 (lookup_name_info::match_any): New.
375 (iterate_over_symbols, search_symbols): Use lookup_name_info.
376 (compare_symbol_name): Add language, lookup_name_info and
377 completion_match_result parameters, and use them.
378 (completion_list_add_name): Make extern. Add language and
379 lookup_name_info parameters. Use them.
380 (completion_list_add_symbol, completion_list_add_msymbol)
381 (completion_list_objc_symbol): Add lookup_name_info parameters and
382 adjust. Pass down language.
383 (completion_list_add_fields): Add lookup_name_info parameters and
384 adjust. Pass down language.
385 (add_symtab_completions): Add lookup_name_info parameters and
386 adjust.
387 (default_collect_symbol_completion_matches_break_on): Add
388 name_match_type parameter, and use it. Use lookup_name_info.
389 (default_collect_symbol_completion_matches)
390 (collect_symbol_completion_matches): Add name_match_type
391 parameter, and pass it down.
392 (collect_symbol_completion_matches_type): Adjust.
393 (collect_file_symbol_completion_matches): Add name_match_type
394 parameter, and use lookup_name_info.
395 * symtab.h: Include <string> and "common/gdb_optional.h".
396 (enum class symbol_name_match_type): New.
397 (class ada_lookup_name_info): New.
398 (struct demangle_for_lookup_info): New.
399 (class lookup_name_info): New.
400 (symbol_name_matcher_ftype): New.
401 (SYMBOL_MATCHES_SEARCH_NAME): Use symbol_matches_search_name.
402 (symbol_matches_search_name): Declare.
403 (MSYMBOL_MATCHES_SEARCH_NAME): Delete.
404 (default_collect_symbol_completion_matches)
405 (collect_symbol_completion_matches)
406 (collect_file_symbol_completion_matches): Add name_match_type
407 parameter.
408 (iterate_over_symbols): Use lookup_name_info.
409 (completion_list_add_name): Declare.
410 * utils.c (enum class strncmp_iw_mode): Moved to utils.h.
411 (strncmp_iw_with_mode): Now extern.
412 * utils.h (enum class strncmp_iw_mode): Moved from utils.c.
413 (strncmp_iw_with_mode): Declare.
414
415 2017-11-08 Keith Seitz <keiths@redhat.com>
416 Pedro Alves <palves@redhat.com>
417
418 * ada-lang.c (ada_language_defn): Install
419 default_search_name_hash.
420 * buildsym.c (struct buildsym_compunit): <language>: New field.
421 (finish_block_internal): Pass language when creating dictionaries.
422 (start_buildsym_compunit, start_symtab): New language parameters.
423 Use them.
424 (restart_symtab): Pass down compilation unit's language.
425 * buildsym.h (enum language): Forward declare.
426 (start_symtab): New 'language' parameter.
427 * c-lang.c (c_language_defn, cplus_language_defn)
428 (asm_language_defn, minimal_language_defn): Install
429 default_search_name_hash.
430 * coffread.c (coff_start_symtab): Adjust.
431 * d-lang.c (d_language_defn): Install default_search_name_hash.
432 * dbxread.c (struct symloc): Add 'pst_language' field.
433 (PST_LANGUAGE): Define.
434 (start_psymtab, read_ofile_symtab): Use it.
435 (process_one_symbol): New 'language' parameter. Pass it down.
436 * dictionary.c (struct dictionary) <language>: New field.
437 (DICT_LANGUAGE): Define.
438 (dict_create_hashed, dict_create_hashed_expandable)
439 (dict_create_linear, dict_create_linear_expandable): New parameter
440 'language'. Set the dictionary's language.
441 (iter_match_first_hashed): Adjust to rename.
442 (insert_symbol_hashed): Assert we don't see mismatching
443 languages. Adjust to rename.
444 (dict_hash): Rename to ...
445 (default_search_name_hash): ... this and make extern.
446 * dictionary.h (struct language_defn): Forward declare.
447 (dict_create_hashed): New parameter 'language'.
448 * dwarf2read.c (dwarf2_start_symtab): Pass down language.
449 * f-lang.c (f_language_defn): Install default_search_name_hash.
450 * go-lang.c (go_language_defn): Install default_search_name_hash.
451 * jit.c (finalize_symtab): Pass compunit's language to dictionary
452 creation.
453 * language.c (unknown_language_defn, auto_language_defn):
454 * language.h (language_defn::la_search_name_hash): New field.
455 (default_search_name_hash): Declare.
456 * m2-lang.c (m2_language_defn): Install default_search_name_hash.
457 * mdebugread.c (new_block): New parameter 'language'.
458 * mdebugread.c (parse_symbol): Pass symbol language to block
459 allocation.
460 (psymtab_to_symtab_1): Pass down language.
461 (new_symtab): Pass compunit's language to block allocation.
462 * objc-lang.c (objc_language_defn): Install
463 default_search_name_hash.
464 * opencl-lang.c (opencl_language_defn):
465 * p-lang.c (pascal_language_defn): Install
466 default_search_name_hash.
467 * rust-lang.c (rust_language_defn): Install
468 default_search_name_hash.
469 * stabsread.h (enum language): Forward declare.
470 (process_one_symbol): Add 'language' parameter.
471 * symtab.c (search_name_hash): New function.
472 * symtab.h (search_name_hash): Declare.
473 * xcoffread.c (read_xcoff_symtab): Pass language to start_symtab.
474
475 2017-11-08 Pedro Alves <palves@redhat.com>
476
477 * cp-name-parser.y (main): Don't initialize extra_chars.
478
479 2017-11-07 Tom Tromey <tom@tromey.com>
480
481 * event-top.h (command_handler): Constify.
482 * record-full.c (cmd_record_full_start): Update.
483 * thread.c (thread_apply_all_command): Update.
484 * printcmd.c (eval_command): Update.
485 * mi/mi-main.c (mi_execute_cli_command): Update.
486 (mi_execute_async_cli_command): Update.
487 * tui/tui-stack.c (tui_update_command): Update.
488 * cli/cli-interp.c (safe_execute_command): Constify.
489 * record.c (record_start): Update.
490 (record_start, record_stop, cmd_record_start): Update.
491 * record-btrace.c (cmd_record_btrace_bts_start): Update.
492 (cmd_record_btrace_pt_start): Update.
493 (cmd_record_btrace_start): Update.
494 (cmd_record_btrace_start): Update.
495 * reverse.c (exec_reverse_once): Update.
496 * python/python.c (execute_gdb_command): Don't copy the command.
497 * event-top.c (command_line_handler): Update.
498 (command_handler): Constify.
499 * defs.h (deprecated_call_command_hook): Constify.
500 * cli/cli-script.h (execute_user_command): Constify.
501 * cli/cli-script.c (execute_user_command): Constify.
502 (execute_cmd_pre_hook, execute_cmd_post_hook): Constify.
503 (enum command_control_type): Update.
504 * main.c (catch_command_errors): Remove non-const overload.
505 (catch_command_errors_ftype): Remove.
506 * python/py-cmd.c (cmdpy_function): Constify.
507 * guile/scm-cmd.c (cmdscm_function): Constify.
508 * cli/cli-dump.c (call_dump_func): Constify.
509 * cli/cli-decode.c (do_const_cfunc): Constify.
510 (do_sfunc): Constify.
511 (cmd_func): Constify.
512 * gdbcmd.h (execute_command, execute_command_to_string): Constify.
513 * top.h (execute_command): Constify.
514 * top.c (execute_command): Constify.
515 (execute_command_to_string): Constify.
516 (deprecated_call_command_hook): Constify.
517 * command.h (cmd_func): Constify.
518 * cli/cli-decode.h (struct cmd_list_element) <func>: Constify.
519
520 2017-11-07 Tom Tromey <tom@tromey.com>
521
522 * ada-lang.c (catch_ada_exception_command): Constify.
523 (catch_assert_command): Constify.
524 * break-catch-throw.c (catch_catch_command, catch_throw_command)
525 (catch_rethrow_command): Constify.
526 (catch_exception_command_1): Constify.
527 * breakpoint.h (add_catch_command): Constify.
528 * break-catch-syscall.c (catch_syscall_command_1): Constify.
529 (catch_syscall_split_args): Constify.
530 * break-catch-sig.c (catch_signal_command): Constify.
531 (catch_signal_split_args): Constify.
532 * cli/cli-decode.h (struct cmd_list_element) <function>: Use
533 cmd_const_sfunc_ftype.
534 * cli/cli-decode.c (add_setshow_cmd_full): Constify.
535 (add_setshow_enum_cmd, add_setshow_auto_boolean_cmd)
536 (add_setshow_boolean_cmd, add_setshow_filename_cmd)
537 (add_setshow_string_cmd, struct cmd_list_element)
538 (add_setshow_optional_filename_cmd, add_setshow_integer_cmd)
539 (add_setshow_uinteger_cmd, add_setshow_zinteger_cmd)
540 (add_setshow_zuinteger_unlimited_cmd, add_setshow_zuinteger_cmd):
541 Constify.
542 (set_cmd_sfunc): Constify.
543 (empty_sfunc): Constify.
544 * command.h (add_setshow_enum_cmd, add_setshow_auto_boolean_cmd)
545 (add_setshow_boolean_cmd, add_setshow_filename_cmd)
546 (add_setshow_string_cmd, add_setshow_string_noescape_cmd)
547 (add_setshow_optional_filename_cmd, add_setshow_integer_cmd)
548 (add_setshow_uinteger_cmd, add_setshow_zinteger_cmd)
549 (add_setshow_zuinteger_cmd, add_setshow_zuinteger_unlimited_cmd):
550 Constify.
551 (set_cmd_sfunc): Constify.
552 (cmd_sfunc_ftype): Remove.
553 * compile/compile.c (set_compile_args): Constify.
554 * infrun.c (set_disable_randomization): Constify.
555 * infcmd.c (set_args_command, set_cwd_command): Constify.
556 * breakpoint.c (set_condition_evaluation_mode): Constify.
557 (add_catch_command): Constify.
558 (catch_fork_command_1, catch_exec_command_1)
559 (catch_load_command_1, catch_unload_command_1): Constify.
560 (catch_load_or_unload): Constify.
561 * guile/scm-param.c (pascm_set_func): Constify.
562 (add_setshow_generic): Constify.
563 * python/py-param.c (get_set_value): Constify.
564 * top.h (set_verbose): Constify.
565 * tui/tui-win.c (tui_set_var_cmd): Constify.
566 * mi/mi-main.c (set_mi_async_command): Constify.
567 * cli/cli-logging.c (set_logging_overwrite)
568 (set_logging_redirect): Constify.
569 * value.c (set_max_value_size): Constify.
570 * valprint.c (set_input_radix, set_output_radix): Constify.
571 * utils.c (set_width_command, set_height_command): Constify.
572 * typeprint.c (set_print_type_methods, set_print_type_typedefs): Constify.
573 * tracepoint.c (set_disconnected_tracing)
574 (set_circular_trace_buffer, set_trace_buffer_size)
575 (set_trace_user, set_trace_notes, set_trace_stop_notes): Constify.
576 * top.c (set_history_size_command, set_verbose, set_editing)
577 (set_gdb_datadir, set_history_filename): Constify.
578 * target.c (set_targetdebug, maint_set_target_async_command)
579 (maint_set_target_non_stop_command, set_target_permissions)
580 (set_write_memory_permission): Constify.
581 (open_target): Constify.
582 * target-descriptions.c (set_tdesc_filename_cmd): Constify.
583 * target-dcache.c (set_stack_cache, set_code_cache): Constify.
584 * symtab.c (set_symbol_cache_size_handler): Constify.
585 * symfile.c (set_ext_lang_command): Constify.
586 * symfile-debug.c (set_debug_symfile): Constify.
587 * source.c (set_directories_command): Constify.
588 * solib.c (reload_shared_libraries, gdb_sysroot_changed): Constify.
589 * serial.c (set_parity): Constify.
590 * rs6000-tdep.c (powerpc_set_soft_float, powerpc_set_vector_abi): Constify.
591 * remote.c (set_remote_exec_file, set_remotebreak)
592 (set_remote_protocol_Z_packet_cmd, set_range_stepping): Constify.
593 * record.c (set_record_insn_history_size)
594 (set_record_call_history_size): Constify.
595 * record-full.c (set_record_full_insn_max_num): Constify.
596 * proc-api.c (set_procfs_trace_cmd, set_procfs_file_cmd): Constify.
597 * osabi.c (set_osabi): Constify.
598 * mips-tdep.c (set_mips64_transfers_32bit_regs)
599 (reinit_frame_cache_sfunc, mips_abi_update): Constify.
600 * maint.c (maintenance_set_profile_cmd): Constify.
601 * linux-thread-db.c (set_libthread_db_search_path): Constify.
602 * language.c (set_language_command, set_range_command)
603 (set_case_command): Constify.
604 * infrun.c (set_non_stop, set_observer_mode)
605 (set_stop_on_solib_events, set_schedlock_func)
606 (set_exec_direction_func): Constify.
607 * infcmd.c (set_inferior_tty_command): Constify.
608 * disasm.c (set_disassembler_options_sfunc): Constify.
609 * demangle.c (set_demangling_command): Constify.
610 * dcache.c (set_dcache_size, set_dcache_line_size): Constify.
611 * cris-tdep.c (set_cris_version, set_cris_mode)
612 (set_cris_dwarf2_cfi): Constify.
613 * corefile.c (set_gnutarget_command): Constify.
614 * charset.c (set_host_charset_sfunc, set_target_charset_sfunc)
615 (set_target_wide_charset_sfunc): Constify.
616 * breakpoint.c (update_dprintf_commands): Constify.
617 * auto-load.c (set_auto_load_dir, set_auto_load_safe_path): Constify.
618 * arm-tdep.c (set_fp_model_sfunc, arm_set_abi)
619 (set_disassembly_style_sfunc): Constify.
620 * arch-utils.c (set_endian, set_architecture): Constify.
621 * alpha-tdep.c (reinit_frame_cache_sfunc): Constify.
622 * agent.c (set_can_use_agent): Constify.
623
624 2017-11-07 Tom Tromey <tom@tromey.com>
625
626 * go32-nat.c (go32_sysinfo, go32_sldt, go32_sgdt, go32_sidt)
627 (go32_pde, go32_pte, go32_pte_for_address): Constify.
628 * gnu-nat.c (_parse_bool_arg, show_thread_default_pause_cmd)
629 (set_thread_default_pause_cmd, set_thread_default_run_cmd)
630 (show_thread_default_run_cmd, set_thread_default_detach_sc_cmd)
631 (parse_int_arg, show_thread_default_detach_sc_cmd)
632 (set_signals_cmd, show_signals_cmd, set_sig_thread_cmd)
633 (show_sig_thread_cmd, set_stopped_cmd, show_stopped_cmd)
634 (set_exceptions_cmd, show_exceptions_cmd, set_task_pause_cmd)
635 (show_task_pause_cmd, set_task_detach_sc_cmd)
636 (show_task_detach_sc_cmd, set_task_exc_port_cmd)
637 (set_noninvasive_cmd, set_thread_pause_cmd)
638 (show_thread_pause_cmd, set_thread_run_cmd, show_thread_run_cmd)
639 (set_thread_detach_sc_cmd, show_thread_detach_sc_cmd)
640 (set_thread_exc_port_cmd, thread_takeover_sc_cmd): Constify.
641 * windows-nat.c (display_selectors): Constify.
642 * cli/cli-decode.h (struct cmd_list_element) <function>: Remove
643 non-const "cfunc".
644 * cli/cli-decode.c (set_cmd_cfunc): Remove non-const overload.
645 (cmd_cfunc_eq): Likewise.
646 (struct cmd_list_element): Likewise.
647 (do_cfunc): Remove.
648 (cli_user_command_p): Update.
649 * command.h (add_cmd): Remove non-const overload.
650 (cmd_cfunc_ftype): Remove typedef.
651 (cmd_cfunc_eq): Remove non-const overload.
652 * value.c (show_values): Constify.
653 * thread.c (thread_apply_all_command): Constify.
654 * symfile.c (load_command): Constify.
655 * source.c (directory_command): Constify.
656 * maint.c (maintenance_internal_error)
657 (maintenance_demangler_warning, maintenance_space_display)
658 (maintenance_print_architecture, maintenance_translate_address)
659 (maintenance_info_selftests, maintenance_internal_warning):
660 Constify.
661 * breakpoint.c (disable_trace_command, enable_trace_command):
662 Constify.
663 * auto-load.c (info_auto_load_local_gdbinit, add_auto_load_dir):
664 Constify.
665 (add_auto_load_safe_path): Constify.
666 * guile/scm-auto-load.c (info_auto_load_guile_scripts): Constify.
667 * top.h (show_commands): Constify.
668 * linux-thread-db.c (info_auto_load_libthread_db): Constify.
669 * sparc64-tdep.c (adi_examine_command): Constify.
670 (adi_assign_command): Constify.
671
672 2017-11-07 Tom Tromey <tom@tromey.com>
673
674 * frame.h (info_locals_command, info_args_command): Constify.
675 * auto-load.h (auto_load_info_scripts): Constify.
676 * inferior.h (registers_info): Constify.
677 * copying.c: Rebuild.
678 * copying.awk: Constify generated commands.
679 * auto-load.c (auto_load_info_scripts)
680 (info_auto_load_gdb_scripts): Constify.
681 * cli/cli-decode.c (struct cmd_list_element): Take a
682 cmd_const_cfunc_ftype.
683 * command.h (add_info): Take a cmd_const_cfunc_ftype.
684 * tui/tui-win.c (tui_all_windows_info): Constify.
685 * python/py-auto-load.c (info_auto_load_python_scripts):
686 Constify.
687 * cli/cli-cmds.c (show_command): Remove non-const overload.
688 * tracepoint.c (info_tvariables_command, info_scope_command):
689 Constify.
690 (info_static_tracepoint_markers_command): Constify.
691 * thread.c (info_threads_command): Constify.
692 (print_thread_info_1): Constify.
693 * target.c (info_target_command): Constify.
694 * symtab.c (info_sources_command, info_functions_command)
695 (info_types_command): Constify.
696 (info_variables_command): Remove non-const overload.
697 * symfile.c (info_ext_lang_command): Constify.
698 * stack.c (info_frame_command, info_locals_command)
699 (info_args_command): Constify.
700 (backtrace_command): Remove non-const overload.
701 * source.c (info_source_command, info_line_command): Constify.
702 * solib.c (info_sharedlibrary_command): Constify.
703 * skip.c (info_skip_command): Constify.
704 * ser-go32.c (info_serial_command): Constify.
705 * reverse.c (info_bookmarks_command): Constify.
706 * printcmd.c (info_symbol_command, info_address_command)
707 (info_display_command): Constify.
708 * osdata.c (info_osdata_command): Constify.
709 * objc-lang.c (info_selectors_command, info_classes_command):
710 Constify.
711 * nto-procfs.c (procfs_pidlist, procfs_meminfo): Constify.
712 * memattr.c (info_mem_command): Constify.
713 * macrocmd.c (info_macro_command, info_macros_command): Constify.
714 * linux-fork.c (info_checkpoints_command): Constify.
715 * infrun.c (info_signals_command): Constify.
716 * inflow.c (info_terminal_command): Constify.
717 * inferior.c (info_inferiors_command): Constify.
718 (print_inferior): Constify.
719 * infcmd.c (info_program_command, info_all_registers_command)
720 (info_registers_command, info_vector_command)
721 (info_float_command): Constify.
722 (registers_info): Constify.
723 * gnu-nat.c (info_send_rights_cmd, info_recv_rights_cmd)
724 (info_port_sets_cmd, info_dead_names_cmd, info_port_rights_cmd):
725 Constify.
726 * f-valprint.c (info_common_command): Constify.
727 * dcache.c (info_dcache_command): Constify.
728 (dcache_info_1): Constify.
729 * darwin-nat-info.c (info_mach_tasks_command)
730 (info_mach_task_command, info_mach_ports_command)
731 (info_mach_port_command, info_mach_threads_command)
732 (info_mach_thread_command, info_mach_regions_command)
733 (info_mach_regions_recurse_command, info_mach_region_command)
734 (info_mach_exceptions_command): Constify.
735 (get_task_from_args): Constify.
736 * cp-support.c (info_vtbl_command): Constify.
737 * breakpoint.c (info_watchpoints_command)
738 (info_tracepoints_command): Constify.
739 (info_breakpoints_command): Remove non-const overload.
740 * avr-tdep.c (avr_io_reg_read_command): Constify.
741 * auxv.c (info_auxv_command): Constify.
742 * ada-tasks.c (info_tasks_command): Constify.
743 (info_task): Constify.
744 * ada-lang.c (info_exceptions_command): Constify.
745
746 2017-11-07 Tom Tromey <tom@tromey.com>
747
748 * solib.h (no_shared_libraries): Constify.
749 * frame.h (return_command): Constify.
750 * cli/cli-cmds.h (quit_command): Constify.
751 * top.h (quit_command, execute_command): Constify.
752 * target.h (flash_erase_command): Constify.
753 * inferior.h (set_inferior_args, attach_command): Constify.
754 * tracepoint.h (start_tracing, stop_tracing): Constify.
755 * breakpoint.h (break_command, tbreak_command)
756 (hbreak_command_wrapper, thbreak_command_wrapper)
757 (rbreak_command_wrapper, watch_command_wrapper)
758 (awatch_command_wrapper, rwatch_command_wrapper)
759 (get_tracepoint_by_number): Constify.
760 * symtab.c (info_variables_command, rbreak_command)
761 (symtab_symbol_info): Constify.
762 (info_variables_command): Add non-const overload.
763 * top.c (dont_repeat_command): Constify.
764 * breakpoint.c (ignore_command, commands_command)
765 (condition_command, tbreak_command, hbreak_command)
766 (thbreak_command, clear_command, break_command)
767 (info_breakpoints_command, watch_command, rwatch_command)
768 (awatch_command, trace_command, ftrace_command, strace_command)
769 (trace_pass_command, break_range_command, dprintf_command)
770 (agent_printf_command, get_tracepoint_by_number)
771 (watch_maybe_just_location, trace_pass_command): Constify.
772 (info_breakpoints_command): Add non-const overload.
773 * tracefile.c (tsave_command): Constify.
774 * infcmd.c (attach_command, disconnect_command, signal_command)
775 (queue_signal_command, stepi_command, nexti_command)
776 (finish_command, next_command, step_command, until_command)
777 (advance_command, jump_command, continue_command, run_command)
778 (start_command, starti_command, interrupt_command)
779 (run_command_1, set_inferior_args, step_1): Constify.
780 * inferior.c (add_inferior_command, remove_inferior_command)
781 (clone_inferior_command): Constify.
782 * linux-fork.c (checkpoint_command, restart_command): Constify.
783 * windows-nat.c (signal_event_command): Constify.
784 * guile/guile.c (guile_repl_command, guile_command): Constify.
785 * printcmd.c (x_command, display_command, printf_command)
786 (output_command, set_command, call_command, print_command)
787 (eval_command): Constify.
788 (non_const_set_command): Remove.
789 (_initialize_printcmd): Update.
790 * source.c (forward_search_command, reverse_search_command):
791 Constify.
792 * jit.c (jit_reader_load_command, jit_reader_unload_command):
793 Constify.
794 * infrun.c (handle_command): Constify.
795 * memattr.c (mem_command): Constify.
796 * stack.c (return_command, up_command, up_silently_command)
797 (down_command, down_silently_command, frame_command)
798 (backtrace_command, func_command, backtrace_command_1): Constify.
799 (backtrace_command): Add non-const overload.
800 * remote-sim.c (simulator_command): Constify.
801 * exec.c (set_section_command): Constify.
802 * tracepoint.c (tdump_command, trace_variable_command)
803 (tstatus_command, tstop_command, tstart_command)
804 (end_actions_pseudocommand, while_stepping_pseudocommand)
805 (collect_pseudocommand, teval_pseudocommand, actions_command)
806 (start_tracing, stop_tracing): Constify.
807 * value.c (init_if_undefined_command): Constify.
808 * tui/tui-stack.c (tui_update_command): Constify.
809 * tui/tui-win.c (tui_refresh_all_command)
810 (tui_set_tab_width_command, tui_set_win_height_command)
811 (tui_set_focus_command, tui_scroll_forward_command)
812 (tui_scroll_backward_command, tui_scroll_left_command)
813 (tui_scroll_right_command, parse_scrolling_args, tui_set_focus)
814 (tui_set_win_height): Constify.
815 * tui/tui-layout.c (tui_layout_command): Constify.
816 * procfs.c (proc_trace_syscalls, proc_trace_sysentry_cmd)
817 (proc_trace_sysexit_cmd, proc_untrace_sysentry_cmd)
818 (proc_untrace_sysexit_cmd): Constify.
819 * remote.c (threadlist_test_cmd, threadinfo_test_cmd)
820 (threadset_test_cmd, threadlist_update_test_cmd)
821 (threadalive_test): Constify.
822 * objc-lang.c (print_object_command): Constify.
823 * command.h (add_com): Constify.
824 * cli/cli-dump.c (restore_command): Constify.
825 * cli/cli-cmds.c (pwd_command, echo_command, quit_command)
826 (help_command, complete_command, shell_command, edit_command)
827 (list_command, disassemble_command, make_command)
828 (apropos_command, alias_command): Constify.
829 * cli/cli-script.c (document_command, define_command)
830 (while_command, if_command, validate_comname): Constify.
831 * cli/cli-decode.c (struct cmd_list_element): Change type of
832 "fun".
833 * target.c (do_monitor_command, flash_erase_command): Constify.
834 * regcache.c (reg_flush_command): Constify.
835 * reverse.c (reverse_step, reverse_next, reverse_stepi)
836 (reverse_nexti, reverse_continue, reverse_finish)
837 (save_bookmark_command, goto_bookmark_command)
838 (exec_reverse_once): Constify.
839 * python/python.c (python_interactive_command, python_command):
840 Constify.
841 * typeprint.c (ptype_command, whatis_command, whatis_exp):
842 Constify.
843 * solib.c (sharedlibrary_command, no_shared_libraries): Constify.
844 * gcore.c (gcore_command): Constify.
845
846 2017-11-07 Tom Tromey <tom@tromey.com>
847
848 * printcmd.c (x_command): Call set_repeat_arguments.
849 * cli/cli-cmds.c (list_command): Call set_repeat_arguments.
850 * top.c (repeat_arguments): New global.
851 (set_repeat_arguments): New function.
852 (execute_command): Handle repeat_arguments.
853 (show_commands): Calls set_repeat_arguments.
854 * command.h (set_repeat_arguments): Declare.
855
856 2017-11-07 Tom Tromey <tom@tromey.com>
857
858 * stack.c (backtrace_command): Use std::string.
859 (backtrace_command_1): Make "count_exp" const.
860
861 2017-11-07 Tom Tromey <tom@tromey.com>
862
863 * source.c (directory_switch, mod_path, add_path): Constify.
864 * defs.h (add_path, mod_path, directory_switch): Constify.
865 * mi/mi-cmd-env.c (env_mod_path): Constify.
866
867 2017-11-07 Tom Tromey <tom@tromey.com>
868
869 * infcmd.c (strip_bg_char): Return gdb::unique_xmalloc_ptr.
870 (run_command_1, continue_command, step_1, jump_command)
871 (signal_command, until_command, advance_command, finish_command)
872 (attach_command): Update.
873
874 2017-11-07 Tom Tromey <tom@tromey.com>
875
876 * command.h (set_cmd_cfunc): Don't declare.
877 * cli/cli-decode.c (set_cmd_cfunc): Now static.
878
879 2017-11-07 Tom Tromey <tom@tromey.com>
880
881 * stack.c (select_frame_command): Constify.
882 * cli/cli-decode.c (add_com_suppress_notification): Constify.
883 * command.h (add_com_suppress_notification): Constify.
884
885 2017-11-07 Tom Tromey <tom@tromey.com>
886
887 * breakpoint.c (stop_command): Constify.
888 * cli/cli-decode.c (struct cmd_list_element): Constify.
889 * command.h (add_abbrev_prefix_cmd): Constify.
890
891 2017-11-07 Pedro Alves <palves@redhat.com>
892
893 * breakpoint.c (extract_bp_kind): New enum.
894 (extract_bp_num, extract_bp_or_bp_range): New functions, partially
895 factored out from ...
896 (extract_bp_number_and_location): ... here.
897 * cli/cli-utils.c (get_number_trailer): Handle '-$variable'.
898
899 2017-11-07 Pedro Alves <palves@redhat.com>
900
901 * breakpoint.c (extract_bp_number_and_location): Change return
902 type to void. Throw error instead of warning.
903 (enable_disable_command): Adjust.
904
905 2017-11-07 Xavier Roirand <roirand@adacore.com>
906 Pedro Alves <palves@redhat.com>
907
908 * breakpoint.c (map_breakpoint_number_range): New, factored out
909 from ...
910 (map_breakpoint_numbers): ... here.
911 (find_location_by_number): Change parameters from string to
912 breakpoint number and location.
913 (extract_bp_number_and_location): New function.
914 (enable_disable_bp_num_loc)
915 (enable_disable_breakpoint_location_range)
916 (enable_disable_command): New functions, factored out ...
917 (enable_command, disable_command): ... these functions, and
918 adjusted to support ranges.
919 * NEWS: Document enable/disable breakpoint location range feature.
920
921 2017-11-06 Luis Machado <luis.machado@linaro.org>
922
923 * MAINTAINERS (Write After Approval): Update my e-mail address.
924
925 2017-11-06 Pedro Alves <palves@redhat.com>
926
927 * gnu-nat.c (gnu_terminal_init): Delete.
928 (gnu_target): Don't install gnu_terminal_init.
929 * inflow.c (child_terminal_init_with_pgrp): Delete, merged with ...
930 (child_terminal_init): ... this function.
931
932 2017-11-06 Pedro Alves <palves@redhat.com>
933
934 * common/common.m4 (GDB_AC_COMMON): No longer check termio.h nor
935 sgtty.h.
936 * config.in, configure: Regenerate.
937
938 2017-11-06 Pedro Alves <palves@redhat.com>
939
940 * event-top.c: Check SIGTSTP instead of STOP_SIGNAL thoughout.
941 (async_init_signals): Adjust.
942 (handle_stop_sig): Rename to ...
943 (handle_sigtstp): ... this.
944 (async_stop_sig): Rename to ...
945 (async_sigtstp_handler): ... this, and delete STOP_SIGNAL !=
946 SIGTSTP path.
947 * event-top.h: Move signal.h include to the top. Check SIGTSTP
948 instead of STOP_SIGNAL thoughout.
949 (handle_stop_sig): Rename to ...
950 (handle_sigtstp): ... this.
951 * top.c (command_line_input): Replace STOP_SIGNAL -> SIGTSTP.
952
953 2017-11-06 Pedro Alves <palves@redhat.com>
954
955 * inflow.c (child_terminal_inferior, child_terminal_ours_1): No
956 longer set flags twice in row.
957
958 2017-11-06 Pedro Alves <palves@redhat.com>
959
960 * Makefile.in (SER_HARDWIRE): Update comment.
961 (HFILES_NO_SRCDIR): Remove gdb_termios.h.
962 * common/gdb_termios.h: Delete file.
963 * common/job-control.c: Include termios.h and unistd.h instead of
964 gdb_termios.h.
965 (gdb_setpgid): Remove HAVE_TERMIOS || TIOCGPGRP preprocessor
966 check.
967 (have_job_control): Check HAVE_TERMIOS_H instead of HAVE_TERMIOS.
968 Remove sgtty code.
969 * configure.ac: No longer check for termio.h and sgtty.h.
970 * configure: Regenerate.
971 * inflow.c: Include termios.h instead of gdb_termios.h. Replace
972 PROCESS_GROUP_TYPE checks with HAVE_TERMIOS_H checks throughout.
973 Replace PROCESS_GROUP_TYPE references with pid_t references
974 throughout.
975 (gdb_getpgrp): Delete.
976 (set_initial_gdb_ttystate): Use tcgetpgrp instead of gdb_getpgrp.
977 (child_terminal_inferior): Remove comment. Remove sgtty code.
978 (child_terminal_ours_1): Use tcgetpgrp directly instead of
979 gdb_getpgrp. Use serial_set_tty_state instead aof
980 serial_noflush_set_tty_state. Remove sgtty code.
981 * inflow.h: Include unistd.h instead of gdb_termios.h. Replace
982 PROCESS_GROUP_TYPE check with HAVE_TERMIOS_H check.
983 (inferior_process_group): Now returns pid_t.
984 * ser-base.c (ser_base_noflush_set_tty_state): Delete.
985 * ser-base.h (ser_base_noflush_set_tty_state): Delete.
986 * ser-event.c (serial_event_ops): Update.
987 * ser-go32.c (dos_noflush_set_tty_state): Delete.
988 (dos_ops): Update.
989 * ser-mingw.c (hardwire_ops, tty_ops, pipe_ops, tcp_ops): Update.
990 * ser-pipe.c (pipe_ops): Update.
991 * ser-tcp.c (tcp_ops): Update.
992 * ser-unix.c: Include termios.h instead of gdb_termios.h. Remove
993 HAVE_TERMIOS checks.
994 [HAVE_TERMIO] (struct hardwire_ttystate): Delete.
995 [HAVE_SGTTY] (struct hardwire_ttystate): Delete.
996 (get_tty_state, set_tty_state): Drop termio and sgtty code, and
997 assume termios.
998 (hardwire_noflush_set_tty_state): Delete.
999 (hardwire_print_tty_state, hardwire_drain_output)
1000 (hardwire_flush_output, hardwire_flush_input)
1001 (hardwire_send_break, hardwire_raw, hardwire_setbaudrate)
1002 (hardwire_setstopbits, hardwire_setparity): Drop termio and sgtty
1003 code, and assume termios.
1004 (hardwire_ops): Update.
1005 (_initialize_ser_hardwire): Remove HAVE_TERMIOS check.
1006 * serial.c (serial_noflush_set_tty_state): Delete.
1007 * serial.h (serial_noflush_set_tty_state): Delete.
1008 (serial_ops::noflush_set_tty_state): Delete.
1009
1010 2017-11-06 Ulrich Weigand <uweigand@de.ibm.com>
1011
1012 * Makefile.in (SFILES): Remove doublest.c and dfp.c.
1013 (HFILES_NO_SRCDIR): Remove doublest.h and dfp.h.
1014 (COMMON_OBS): Remove doublest.o and dfp.o.
1015 Do not build target-float.c (instead of doublest.c)
1016 with -Wformat-nonliteral.
1017
1018 * doublest.c: Remove file.
1019 * doublest.h: Remove file.
1020 * dfp.c: Remove file.
1021 * dfp.h: Remove file.
1022
1023 * target-float.c: Do not include "doublest.h" and "dfp.h".
1024 (DOUBLEST): Move here from doublest.h.
1025 (enum float_kind): Likewise.
1026 (FLOATFORMAT_CHAR_BIT): Likewise.
1027 (FLOATFORMAT_LARGEST_BYTES): Likewise.
1028 (floatformat_totalsize_bytes): Move here from doublest.c. Make static.
1029 (floatformat_precision): Likewise.
1030 (floatformat_normalize_byteorder, get_field, put_field): Likewise.
1031 (floatformat_is_negative, floatformat_classify, floatformat_mantissa):
1032 Likewise.
1033 (host_float_format, host_double_format, host_long_double_format):
1034 Likewise.
1035 (floatformat_to_string, floatformat_from_string): Likewise.
1036 (floatformat_to_doublest): Likewise. Also, inline the original
1037 convert_floatformat_to_doublest.
1038 (floatformat_from_doublest): Likewise. Also, inline the original
1039 convert_floatformat_from_doublest.
1040
1041 Include "dpd/decimal128.h", "dpd/decimal64.h", and "dpd/decimal32.h".
1042 (MAX_DECIMAL_STRING): Move here from dfp.c.
1043 (match_endianness): Likewise.
1044 (set_decnumber_context, decimal_check_errors): Likewise.
1045 (decimal_from_number, decimal_to_number): Likewise.
1046 (decimal_to_string, decimal_from_string): Likewise. Make static.
1047 (decimal_from_longest, decimal_from_ulongest): Likewise.
1048 (decimal_to_longest): Likewise.
1049 (decimal_binop, decimal_is_zero, decimal_compare): Likewise.
1050 (decimal_convert): Likewise.
1051
1052 2017-11-06 Ulrich Weigand <uweigand@de.ibm.com>
1053
1054 * doublest.c: Do not include "gdbtypes.h".
1055 (extract_typed_floating): Remove.
1056 (store_typed_floating): Remove.
1057 (convert_typed_floating): Remove.
1058 * doublest.h (struct type): Remove.
1059 (DOUBLEST_PRINT_FORMAT): Remove.
1060 (DOUBLEST_SCAN_FORMAT): Remove.
1061 (extract_typed_floating): Remove.
1062 (store_typed_floating): Remove.
1063 (convert_typed_floating): Remove.
1064
1065 * dfp.c (decimal_from_doublest): Remove.
1066 (decimal_to_doublest): Remove.
1067 * dfp.h: Do not include "doublest.h".
1068 (decimal_from_doublest): Remove.
1069 (decimal_to_doublest): Remove.
1070
1071 * value.c: Do not include "doublest.h" and "dfp.h".
1072 (value_as_double): Remove.
1073 (unpack_double): Remove.
1074 (value_from_double): Remove.
1075 (value_from_decfloat): Remove.
1076 * value.h: Do not include "doublest.h".
1077 (value_as_double): Remove.
1078 (unpack_double): Remove.
1079 (value_from_double): Remove.
1080 (value_from_decfloat): Remove.
1081
1082 2017-11-06 Ulrich Weigand <uweigand@de.ibm.com>
1083
1084 * i386-tdep.c: Include "target-float.h". Do not include "doublest.h".
1085 (i386_extract_return_value): Use target_float_convert.
1086 (i386_store_return_value): Likewise.
1087 * i387-tdep.c (i387_register_to_value): Use target_float_convert.
1088 (i387_value_to_register): Likewise.
1089 * ia64-tdep.c: Include "target-float.h". Do not include "doublest.h".
1090 (ia64_register_to_value): Use target_float_convert.
1091 (ia64_value_to_register): Likewise.
1092 (ia64_extract_return_value): Likewise.
1093 (ia64_store_return_value): Likewise.
1094 (ia64_push_dummy_call): Likewise.
1095 * m68k-tdep.c: Include "target-float.h".
1096 (m68k_register_to_value): Use target_float_convert.
1097 (m68k_value_to_register): Likewise.
1098 (m68k_svr4_extract_return_value): Likewise.
1099 (m68k_svr4_store_return_value): Likewise.
1100 * ppc-sysv-tdep.c: Include "target-float.h".
1101 (ppc_sysv_abi_push_dummy_call): Use target_float_convert.
1102 (do_ppc_sysv_return_value): Likewise.
1103 (ppc64_sysv_abi_push_freg): Likewise.
1104 (ppc64_sysv_abi_return_value_base): Likewise.
1105 * rs6000-aix-tdep.c: Include "target-float.h".
1106 (rs6000_push_dummy_call): Use target_float_convert.
1107 (rs6000_return_value): Likewise.
1108 * rs6000-lynx178-tdep.c: Include "target-float.h".
1109 (rs6000_lynx178_push_dummy_call): Use target_float_convert.
1110 (rs6000_lynx178_return_value): Likewise.
1111 * rs6000-tdep.c: Include "target-float.h". Do not include "doublest.h".
1112 (rs6000_register_to_value): Use target_float_convert.
1113 (rs6000_value_to_register): Likewise.
1114 * arm-tdep.c: Include "target-float.h". Do not include "doublest.h".
1115 (arm_extract_return_value): Use target_float_convert.
1116 (arm_store_return_value): Likewise.
1117 * sh-tdep.c: Include "target-float.h". Do not include "doublest.h".
1118 (sh_register_convert_to_virtual): Use target_float_convert.
1119 (sh_register_convert_to_raw): Likewise.
1120 * sh64-tdep.c: Include "target-float.h".
1121 (sh64_extract_return_value): Use target_float_convert.
1122 (sh64_register_convert_to_virtual): Likewise.
1123 (sh64_register_convert_to_raw): Likewise. Fix argument types.
1124
1125 2017-11-06 Ulrich Weigand <uweigand@de.ibm.com>
1126
1127 * target-float.c (floatformat_to_host_double): New function.
1128 (floatformat_from_host_double): Likewise.
1129 (target_float_to_host_double): Likewise.
1130 (target_float_from_host_double): Likewise.
1131 * target-float.h (target_float_to_host_double): Add prototype.
1132 (target_float_from_host_double): Likewise.
1133
1134 * guile/scm-value.c: Include "target-float.h".
1135 (gdbscm_value_to_real): Use target_float_to_host_double.
1136 Handle integer source values via value_as_long.
1137 * guile/scm-math.c: Include "target-float.h". Do not include
1138 "doublest.h", "dfp.h", and "expression.h".
1139 (vlscm_convert_typed_number): Use target_float_from_host_double.
1140 (vlscm_convert_number): Likewise.
1141
1142 * python/py-value.c (valpy_float): Use target_float_to_host_double.
1143 (convert_value_from_python): Use target_float_from_host_double.
1144
1145 2017-11-06 Ulrich Weigand <uweigand@de.ibm.com>
1146
1147 * ada-lang.c (cast_to_fixed): Reimplement in target arithmetic.
1148 (cast_from_fixed): Likewise.
1149 (ada_scaling_type): New function.
1150 (ada_delta): Return value instead of DOUBLEST. Perform target
1151 arithmetic instead of host arithmetic.
1152 (scaling_factor): Rename to ...
1153 (ada_scaling_factor) ... this. Make non-static. Return value instead
1154 of DOUBLEST. Perform target arithmetic instead of host arithmetic.
1155 (ada_fixed_to_float): Remove.
1156 (ada_float_to_fixed): Remove.
1157 * ada-lang.h (ada_fixed_to_float): Remove.
1158 (ada_float_to_fixed): Remove.
1159 (ada_delta): Return value instead of DOUBLEST.
1160 (ada_scaling_factor): Add prototype.
1161
1162 * ada-typeprint.c: Include "target-float.h".
1163 (print_fixed_point_type): Perform target arithmetic instead of
1164 host arithmetic.
1165 * ada-valprint.c: Include "target-float.h".
1166 (ada_val_print_num): Perform target arithmetic instead of
1167 host arithmetic for fixed-point types.
1168
1169 2017-11-06 Ulrich Weigand <uweigand@de.ibm.com>
1170
1171 * target-float.c: Include <math.h>.
1172 (floatformat_binop): New function.
1173 (floatformat_compare): Likewise.
1174 (target_float_binop): Likewise.
1175 (target_float_compare): Likewise.
1176 * target-float.h: Include "expression.h".
1177 (target_float_binop): Add prototype.
1178 (target_float_compare): Likewise.
1179
1180 * valarith.c: Do not include "doublest.h" and "dfp.h".
1181 Include "common/byte-vector.h".
1182 (value_args_as_decimal): Remove, replace by ...
1183 (value_args_as_target_float): ... this function. Handle both
1184 binary and decimal target floating-point formats.
1185 (scalar_binop): Handle both binary and decimal FP using
1186 value_args_as_target_float and target_float_binop.
1187 (value_equal): Handle both binary and decimal FP using
1188 value_args_as_target_float and target_float_compare.
1189 (value_less): Likewise.
1190 (value_pos): Handle all scalar types as simple copy.
1191 (value_neg): Handle all scalar types via BINOP_SUB from 0.
1192 * dfp.c (decimal_binop): Throw error instead of internal_error
1193 when called with an unsupported operation code.
1194
1195 2017-11-06 Ulrich Weigand <uweigand@de.ibm.com>
1196
1197 * target-float.c (target_float_to_string): New function.
1198 (target_float_from_string): New function.
1199 * target-float.h (target_float_to_string): Add prototype.
1200 (target_float_from_string): Add prototype.
1201
1202 * valprint.c: Include "target-float.h". Do not include
1203 "doublest.h" and "dfp.h".
1204 (print_floating): Use target_float_to_string.
1205 * printcmd.c: Include "target-float.h". Do not include "dfp.h".
1206 (printf_floating): Use target_float_to_string.
1207 * i387-tdep.c: Include "target-float.h". Do not include "doublest.h".
1208 (print_i387_value): Use target_float_to_string.
1209 * mips-tdep.c: Include "target-float.h".
1210 (mips_print_fp_register): Use target_float_to_string.
1211 * sh64-tdep.c: Include "target-float.h".
1212 (sh64_do_fp_register): Use target_float_to_string.
1213
1214 * parse.c: Include "target-float.h". Do not include
1215 "doublest.h" and "dfp.h".
1216 (parse_float): Use target_float_from_string.
1217 * stabsread.c: Include "target-float.h". Do not include "doublest.h".
1218 (define_symbol): Use target_float_from_string.
1219 * gdbarch-selftests.c: Include "target-float.h".
1220 (register_to_value_test): Use target_float_from_string.
1221
1222 2017-11-06 Ulrich Weigand <uweigand@de.ibm.com>
1223
1224 * Makefile.c (SFILES): Add target-float.c.
1225 (HFILES_NO_SRCDIR): Add target-float.h.
1226 (COMMON_OBS): Add target-float.o.
1227 * target-float.h: New file.
1228 * target-float.c: New file.
1229
1230 * doublest.c (floatformat_classify): Fix detection of float_zero.
1231
1232 * gdbtypes.c (is_floating_type): New function.
1233 * gdbtypes.h (is_floating_type): Add prototype.
1234
1235 * value.c: Do not include "floatformat.h".
1236 (unpack_double): Use target_float_is_valid.
1237 (is_floating_value): New function.
1238 * value.h (is_floating_value): Add prototype-
1239
1240 * valarith.c: Include "target-float.h".
1241 (value_logical_not): Use target_float_is_zero.
1242
1243 * python/py-value.c: Include "target-float.h".
1244 (valpy_nonzero): Use target_float_is_zero.
1245
1246 2017-11-04 Tom Tromey <tom@tromey.com>
1247
1248 * h8300-tdep.c (h8300_push_dummy_call): Use std::vector.
1249
1250 2017-11-04 Tom Tromey <tom@tromey.com>
1251
1252 * breakpoint.c (set_momentary_breakpoint): Return
1253 breakpoint_up.
1254 (until_break_command): Update.
1255 (new_until_break_fsm): Change argument types to
1256 breakpoint_up.
1257 (set_momentary_breakpoint_at_pc): Return breakpoint_up.
1258 (do_delete_breakpoint_cleanup, make_cleanup_delete_breakpoint):
1259 Remove.
1260 * infcmd.c (finish_forward): Update.
1261 * breakpoint.h (set_momentary_breakpoint)
1262 (set_momentary_breakpoint_at_pc): Return breakpoint_up.
1263 (make_cleanup_delete_breakpoint): Remove.
1264 (struct breakpoint_deleter): New.
1265 (breakpoint_up): New typedef.
1266 * infrun.c (insert_step_resume_breakpoint_at_sal_1): Update.
1267 (insert_exception_resume_breakpoint): Update.
1268 (insert_exception_resume_from_probe): Update.
1269 (insert_longjmp_resume_breakpoint): Update.
1270 * arm-linux-tdep.c (arm_linux_copy_svc): Update.
1271 * elfread.c (elf_gnu_ifunc_resolver_stop): Update.
1272 * infcall.c (call_function_by_hand_dummy): Update
1273
1274 2017-11-04 Tom Tromey <tom@tromey.com>
1275
1276 * c-typeprint.c (c_type_print_base): Use gdb::unique_xmalloc_ptr.
1277
1278 2017-11-04 Tom Tromey <tom@tromey.com>
1279
1280 * linux-tdep.c (linux_core_info_proc_mappings): Use
1281 gdb::def_vector.
1282 (linux_get_siginfo_data): Return gdb::byte_vector. Remove
1283 "size" argument.
1284 (linux_corefile_thread): Update.
1285 (linux_make_corefile_notes): Remove unused variable.
1286
1287 2017-11-04 Tom Tromey <tom@tromey.com>
1288
1289 * ppc-linux-tdep.c (ppc_linux_get_syscall_number): Use
1290 gdb::byte_vector.
1291
1292 2017-11-04 Tom Tromey <tom@tromey.com>
1293
1294 * objfiles.c (do_free_objfile_cleanup): Remove.
1295 * compile/compile-object-load.c (compile_object_load): Update.
1296 * objfiles.h (make_cleanup_free_objfile): Remove.
1297
1298 2017-11-04 Tom Tromey <tom@tromey.com>
1299
1300 * sparc64-tdep.c (do_examine): Use gdb::def_vector.
1301 (adi_read_versions): Change "tags" to "gdb_byte *".
1302 (adi_print_versions): Likewise.
1303
1304 2017-11-04 Tom Tromey <tom@tromey.com>
1305
1306 * breakpoint.c
1307 (scoped_rbreak_breakpoints::scoped_rbreak_breakpoints): Rename
1308 from start_rbreak_breakpoints.
1309 (scoped_rbreak_breakpoints): Rename from end_rbreak_breakpoints.
1310 * breakpoint.h (class scoped_rbreak_breakpoints): New.
1311 (start_rbreak_breakpoints, end_rbreak_breakpoints): Remove.
1312 * symtab.c (do_end_rbreak_breakpoints): Remove.
1313 (rbreak_command): Use scoped_rbreak_breakpoints, std::string.
1314
1315 2017-11-04 Tom Tromey <tom@tromey.com>
1316
1317 * cp-namespace.c (reset_directive_searched): Remove.
1318 (cp_lookup_symbol_via_imports): Use scoped_restore.
1319 * cp-support.c (reset_directive_searched): Remove.
1320 (make_symbol_overload_list_using): Use scoped_restore.
1321 * d-namespace.c (d_lookup_symbol_imports): Use scoped_restore.
1322 (reset_directive_searched): Remove.
1323
1324 2017-11-04 Tom Tromey <tom@tromey.com>
1325
1326 * symfile.c (find_separate_debug_file_by_debuglink): Use
1327 unique_xmalloc_ptr.
1328
1329 2017-11-04 Tom Tromey <tom@tromey.com>
1330
1331 * compile/compile-loc2c.c (compute_stack_depth_worker): Change
1332 type of "info".
1333 (compute_stack_depth): Likewise.
1334 (do_compile_dwarf_expr_to_c): Use std::vector.
1335
1336 2017-11-04 Tom Tromey <tom@tromey.com>
1337
1338 * compile/compile-object-load.c (link_callbacks_einfo): Use
1339 std::string.
1340
1341 2017-11-04 Tom Tromey <tom@tromey.com>
1342
1343 * dwarf2read.c (process_full_comp_unit, process_full_type_unit):
1344 Use scoped_free_pendings.
1345 * dbxread.c (dbx_symfile_read, dbx_psymtab_to_symtab_1): Use
1346 scoped_free_pendings.
1347 * xcoffread.c (xcoff_psymtab_to_symtab_1): Use scoped_free_pendings.
1348 (xcoff_initial_scan): Likewise.
1349 * buildsym.c (reset_symtab_globals): Update comment.
1350 (scoped_free_pendings): Rename from really_free_pendings.
1351 (prepare_for_building): Update comment.
1352 (buildsym_init): Likewise.
1353 * buildsym.h (class scoped_free_pendings): New class.
1354 (really_free_pendings): Don't declare.
1355
1356 2017-11-03 Ulrich Weigand <uweigand@de.ibm.com>
1357
1358 * doublest.c (convert_doublest_to_floatformat): Fix uninitialized
1359 output when converting a zero value to a special byteorder format.
1360
1361 2017-11-02 Yao Qi <yao.qi@linaro.org>
1362
1363 * frame.c (do_frame_register_read): Remove aspace.
1364 * jit.c (jit_frame_sniffer): Likwise.
1365 * ppc-linux-tdep.c (ppu2spu_sniffer): Likewise.
1366 * regcache.c (regcache::regcache): Pass nullptr.
1367 (regcache_print): Caller updated.
1368 * regcache.h (regcache::regcache): Remove one constructor
1369 parameter aspace.
1370
1371 2017-11-02 Yao Qi <yao.qi@linaro.org>
1372
1373 * regcache.h (regcache) <m_readonly_p>: Change it to const bool.
1374
1375 2017-11-02 Yao Qi <yao.qi@linaro.org>
1376
1377 * breakpoint.c (insert_single_step_breakpoints): Update.
1378 * frame.c (struct frame_info) <aspace>: Add const.
1379 (frame_save_as_regcache): Add const.
1380 (get_frame_address_space): Return const address_space *.
1381 * frame.h (get_frame_address_space): Update declaration.
1382 * infrun.c (struct step_over_info) <aspace>: Add const.
1383 (set_step_over_info): Make aspace const.
1384 (displaced_step_prepare_throw): Change variable const.
1385 (resume): Likewise.
1386 (proceed): Likewise.
1387 (adjust_pc_after_break): Likewise.
1388 (save_waitstatus): Likewise.
1389 (handle_signal_stop): Likewise.
1390 (keep_going_pass_signal): Likewise.
1391 * jit.c (jit_frame_sniffer): Add const.
1392 * mips-tdep.c (mips_single_step_through_delay): Likewise.
1393 * ppc-linux-tdep.c (ppu2spu_sniffer): Likewise.
1394 * record-full.c (record_full_wait_1): Likewise.
1395 * regcache.c (regcache::regcache): Change parameter to const.
1396 * regcache.h (regcache::regcache): Likewise.
1397 (regcache::aspace): Return const address_space *.
1398 (regcache) <m_aspace>: Add const.
1399
1400 2017-11-02 Yao Qi <yao.qi@linaro.org>
1401
1402 * darwin-nat.c (cancel_breakpoint): Use regcache->aspace ().
1403 * frame.c (create_sentinel_frame): Likewise.
1404 * infrun.c (displaced_step_prepare_throw): Likewise.
1405 (resume): Likewise.
1406 (thread_still_needs_step_over_bp): Likewise.
1407 (proceed): Likewise.
1408 (do_target_wait): Likewise.
1409 (adjust_pc_after_break): Likewise.
1410 (handle_syscall_event): Likewise.
1411 (save_waitstatus): Likewise.
1412 (handle_inferior_event_1): Likewise.
1413 (handle_signal_stop): Likewise.
1414 (keep_going_pass_signal): Likewise.
1415 * linux-nat.c (status_callback): Likewise.
1416 (save_stop_reason): Likewise.
1417 (resume_stopped_resumed_lwps): Likewise.
1418 * record-full.c (record_full_exec_insn): Likewise.
1419 (record_full_wait_1): Likewise.
1420 * regcache.c (get_regcache_aspace): Remove.
1421 * regcache.h (get_regcache_aspace): Remove.
1422
1423 2017-11-02 Yao Qi <yao.qi@linaro.org>
1424
1425 * regcache.c (struct regcache_descr) <nr_raw_registers>: Remove.
1426 (init_regcache_descr): Use gdbarch_num_regs.
1427 (regcache::regcache): Likewise.
1428 (regcache::get_register_status): Likewise.
1429 (regcache::assert_raw_regnum): Likewise.
1430 (regcache::cooked_read): Likewise.
1431 (regcache::cooked_read_value): Likewise.
1432 (regcache::cooked_write): Likewise.
1433 (regcache::dump): Likewise.
1434 (regcache::num_raw_registers): New method.
1435 * regcache.h (class regcache) <num_raw_registers>: New.
1436
1437 2017-11-02 Yao Qi <yao.qi@linaro.org>
1438
1439 * regcache.c (regcache::assert_regnum): New method.
1440 (regcache::invalidate): Call assert_regnum.
1441 (regcache::raw_update): Likewise.
1442 (regcache::raw_write): Likewise.
1443 (regcache::raw_read_part): Likewise.
1444 (regcache::raw_write_part): Likewise.
1445 (regcache::raw_supply): Likewise.
1446 (regcache::raw_supply_integer): Likewise.
1447 (regcache::raw_supply_zeroed): Likewise.
1448 (regcache::raw_collect): Likewise.
1449 (regcache::raw_collect_integer): Likewise.
1450 * regcache.h (regcache::assert_regnum): Declare.
1451
1452 2017-11-02 Yao Qi <yao.qi@linaro.org>
1453
1454 * regcache.c (regcache::dump): Remove code.
1455
1456 2017-11-02 Yao Qi <yao.qi@linaro.org>
1457
1458 * regcache.c (struct regcache_descr) <sizeof_raw_register_status>:
1459 Remove.
1460 <sizeof_cooked_register_status>: Remove.
1461 (init_regcache_descr): Update.
1462 (regcache::regcache): Use nr_cooked_registers and nr_raw_registers.
1463 (regcache::save): Likewise.
1464 (regcache::dump): Likewise.
1465
1466 2017-11-01 James Bowman <james.bowman@ftdichip.com>
1467
1468 * ft32-tdep.c (ft32_fetch_instruction): New function.
1469 (ft32_analyze_prologue): Use ft32_fetch_instruction().
1470
1471 2017-10-31 Simon Marchi <simon.marchi@polymtl.ca>
1472
1473 * cli/cli-script.c (execute_control_command): Rename to ...
1474 (execute_control_command_1): ... this.
1475 (execute_control_command): New function.
1476
1477 2017-10-31 Simon Marchi <simon.marchi@ericsson.com>
1478
1479 * tracepoint.c (tfind_command): Remove const_cast.
1480
1481 2017-10-30 Mike Gulick <mgulick@mathworks.com>
1482
1483 * Makefile.in (HFILES_NO_SRCDIR): Remove reference to gdb.h.
1484
1485 2017-10-30 Simon Marchi <simon.marchi@ericsson.com>
1486
1487 * common/common-utils.h (in_inclusive_range): New function.
1488 * arm-tdep.c (arm_record_extension_space): Use
1489 in_inclusive_range.
1490 (thumb_record_ld_st_reg_offset): Use in_inclusive_range.
1491 * cris-tdep.c (cris_spec_reg_applicable): Use
1492 in_inclusive_range.
1493
1494 2017-10-30 Pedro Alves <palves@redhat.com>
1495 Simon Marchi <simon.marchi@ericsson.com>
1496
1497 * remote.c (remote_set_syscall_catchpoint): Build a std::string
1498 instead of a gdb::unique_xmalloc_ptr, using string_appendf.
1499
1500 2017-10-30 Pedro Alves <palves@redhat.com>
1501
1502 * common/common-utils.c (string_appendf, string_vappendf): New
1503 functions.
1504 * common/common-utils.h (string_appendf, string_vappendf): New
1505 declarations.
1506 * unittests/common-utils-selftests.c (string_appendf_func)
1507 (test_appendf_func, string_vappendf_wrapper, string_appendf_tests)
1508 (string_vappendf_tests): New functions.
1509 (_initialize_common_utils_selftests): Register "string_appendf" and
1510 "string_vappendf tests".
1511
1512 2017-10-30 Pedro Alves <palves@redhat.com>
1513
1514 * unittests/common-utils-selftests.c (format_func): New typedef.
1515 (string_printf_tests, string_vprintf_tests): Tests factored out
1516 and merged to ...
1517 (test_format_func): ... this new function.
1518 (string_printf_tests, string_vprintf_tests): Reimplement on top of
1519 test_format_func.
1520
1521 2017-10-29 Simon Marchi <simon.marchi@ericsson.com>
1522
1523 * darwin-nat.c: Remove include of gdb.h.
1524
1525 2017-10-29 Simon Marchi <simon.marchi@ericsson.com>
1526
1527 * xtensa-xtregs.c: Fix formatting issues.
1528
1529 2017-10-29 Simon Marchi <simon.marchi@ericsson.com>
1530
1531 * xtensa-xtregs.c (xtensa_regtable_t) <name>: Constify.
1532
1533 2017-10-28 Maksim Dzabraev <dzabraew@gmail.com>
1534
1535 PR python/21213
1536 * python/py-infthread.c (thpy_get_inferior): Increment reference
1537 of inferior before returning it.
1538
1539 2017-10-27 Simon Marchi <simon.marchi@ericsson.com>
1540
1541 * unittests/common-utils-selftests.c (format): Add
1542 ATTRIBUTE_PRINTF.
1543
1544 2017-10-27 Simon Marchi <simon.marchi@polymtl.ca>
1545
1546 * xml-syscall.c (struct syscall_desc): Add constructor.
1547 <name>: Change type to std::string.
1548 (syscall_desc_up): New typedef.
1549 (syscall_desc_p): Remove typeder.
1550 (DEF_VEC_P(syscall_desc_p)): Remove.
1551 (struct syscall_group_desc): Add constructor.
1552 <name>: Change type to std::string.
1553 <syscalls>: Change type to std::vector.
1554 (syscall_group_desc_up): New typedef.
1555 (syscall_group_desc_p): Remove typedef.
1556 (DEF_VEC_P(syscall_group_desc_p)): Remove.
1557 (struct syscalls_info) <syscalls>: Change type to std::vector of
1558 unique_ptr.
1559 <groups>: Likewise.
1560 <my_gdb_datadir>: Change type to std::string.
1561 (syscalls_info_up): New typedef.
1562 (allocate_syscalls_info): Remove.
1563 (syscalls_info_free_syscalls_desc): Remove.
1564 (syscalls_info_free_syscall_group_desc): Remove.
1565 (free_syscalls_info): Remove.
1566 (make_cleanup_free_syscalls_info): Remove.
1567 (syscall_group_create_syscall_group_desc): Adjust.
1568 (syscall_group_add_syscall): Adjust.
1569 (syscall_create_syscall_desc): Adjust.
1570 (syscall_parse_xml): Adjust, use unique_ptr instead of cleanup.
1571 (init_syscalls_info): Adjust.
1572 (syscall_group_get_group_by_name): Adjust.
1573 (xml_get_syscall_number): Adjust.
1574 (xml_get_syscall_name): Adjust.
1575 (xml_list_of_syscalls): Adjust.
1576 (xml_list_syscalls_by_group): Adjust.
1577 (xml_list_of_groups): Adjust.
1578
1579 2017-10-27 Simon Marchi <simon.marchi@ericsson.com>
1580
1581 * probe.h: Don't include gdb_vecs.h.
1582 (DEF_VEC_P (probe_p)): Remove.
1583 (find_probes_in_objfile): Return an std::vector.
1584 * probe.c (find_probes_in_objfile): Likewise.
1585 * breakpoint.c (breakpoint_objfile_data)
1586 <longjmp_probes>: Change type to std::vector.
1587 <exception_probes>: Likewise.
1588 (free_breakpoint_probes): Don't manually free vectors.
1589 (create_longjmp_master_breakpoint): Adjust.
1590 (create_exception_master_breakpoint): Adjust.
1591 * solib-svr4.c (svr4_create_probe_breakpoints): Change
1592 parameter type, adjust.
1593 (svr4_create_solib_event_breakpoints): Adjust.
1594
1595 2017-10-27 Simon Marchi <simon.marchi@ericsson.com>
1596
1597 * breakpoint.c (breakpoint_objfile_data): Initialize fields.
1598 (get_breakpoint_objfile_data): Allocate breakpoint_objfile_data
1599 with new.
1600 (free_breakpoint_probes): Rename to ...
1601 (free_breakpoint_objfile_data): ... this, and call delete on
1602 bp_objfile_data..
1603
1604 2017-10-27 Simon Marchi <simon.marchi@polymtl.ca>
1605
1606 * auto-load.c: Don't include gdb_vecs.h, include algorithm.
1607 (loaded_script_ptr): Remove typedef.
1608 (DEF_VEC_P (loaded_script_ptr)): Remove.
1609 (struct collect_matching_scripts_data): Add constructor.
1610 <scripts_p>: Change type to (pointer to) std::vector.
1611 (collect_matching_scripts_data): Adjust.
1612 (sort_scripts_by_name): Make suitable for std::sort.
1613 (print_scripts): Don't sort vector, adjust to std::vector.
1614 (auto_load_info_scripts): Sort vectors, adjust to std::vector.
1615
1616 2017-10-27 Simon Marchi <simon.marchi@ericsson.com>
1617
1618 * symfile.c (filename_language): Make struct, not typedef. Add
1619 constructor.
1620 <ext>: Change type to std::string.
1621 (DEF_VEC_O (filename_language)): Remove.
1622 (filename_language_table): Change type to std::vector.
1623 (add_filename_language): Adjust.
1624 (set_ext_lang_command): Adjust.
1625 (info_ext_lang_command): Adjust.
1626 (deduce_language_from_filename): Adjust.
1627 (class scoped_restore_filename_language_table): Remove.
1628 (test_filename_language): Use scoped_restore.
1629 (test_set_ext_lang_command): Use scoped_restore, adjust to
1630 std::vector change.
1631
1632 2017-10-27 Simon Marchi <simon.marchi@ericsson.com>
1633
1634 * symfile.c: Include selftest.h.
1635 (class scoped_restore_filename_language_table): New.
1636 (test_filename_language): New test.
1637 (test_set_ext_lang_command): New test.
1638 (_initialize_symfile): Register tests.
1639
1640 2017-10-27 Keith Seitz <keiths@redhat.com>
1641
1642 * breakpoint.c (print_breakpoint_location): Use the symbol saved
1643 in the bp_location, falling back to find_pc_sect_function when
1644 needed.
1645 (add_location_to_breakpoint): Save sal->symbol.
1646 * breakpoint.h (struct bp_location) <symbol>: New field.
1647 * symtab.c (find_function_start_sal): Save the symbol into the SaL.
1648 * symtab.h (struct symtab_and_line) <symbol>: New field.
1649
1650 2017-10-26 Patrick Frants <osscontribute@gmail.com>
1651
1652 PR gdb/13669
1653 * cp-valprint.c (cp_print_value_fields): Use obstack_blank_fast
1654 to rewind obstack.
1655
1656 2017-10-26 Pedro Alves <palves@redhat.com>
1657
1658 * remote.c (remote_async_terminal_ours_p): Delete.
1659 (remote_open_1, remote_terminal_inferior, remote_terminal_ours):
1660 Remove references to 'remote_async_terminal_ours_p'.
1661
1662 2017-10-26 Yao Qi <yao.qi@linaro.org>
1663
1664 * breakpoint.h (regular_breakpoint_inserted_here_p): Remove.
1665
1666 2017-10-26 Yao Qi <yao.qi@linaro.org>
1667
1668 * break-catch-sig.c (signal_catchpoint_breakpoint_hit): Make
1669 aspace const.
1670 * break-catch-syscall.c (breakpoint_hit_catch_syscall):
1671 Likewise.
1672 * breakpoint.c (bpstat_check_location): Remove cast.
1673 (breakpoint_hit_catch_fork): Make aspce const.
1674 (breakpoint_hit_catch_solib): Likewise.
1675 (breakpoint_hit_catch_exec): Likewise.
1676 (breakpoint_hit_ranged_breakpoint): Likewise.
1677 (breakpoint_hit_watchpoint): Likewise.
1678 (base_breakpoint_breakpoint_hit): Likewise.
1679 (bkpt_breakpoint_hit): Likewise.
1680 (dprintf_breakpoint_hit): Likewise.
1681 (tracepoint_breakpoint_hit): Likewise.
1682 * breakpoint.h (breakpoint_ops) <breakpoint_hit>: Likewise.
1683
1684 2017-10-26 Yao Qi <yao.qi@linaro.org>
1685
1686 * breakpoint.c (breakpoint_location_address_match): Change
1687 "struct address_space *" to "const address_space".
1688 (breakpoint_location_address_range_overlap): Likewise.
1689 (breakpoint_here_p): Likewise.
1690 (breakpoint_in_range_p): Likewise.
1691 (moribund_breakpoint_here_p): Likewise.
1692 (bp_location_inserted_here_p): Likewise.
1693 (software_breakpoint_inserted_here_p): Likewise.
1694 (hardware_breakpoint_inserted_here_p): Likewise.
1695 (hardware_watchpoint_inserted_in_range): Likewise.
1696 (bpstat_check_location): Likewise.
1697 (bpstat_stop_status): Likewise.
1698 (breakpoint_address_match): Likewise.
1699 (breakpoint_address_match_range): Likewise.
1700 (breakpoint_location_address_match): Likewise.
1701 (breakpoint_location_address_range_overlap): Likewise.
1702 (insert_single_step_breakpoint): Likewise.
1703 (breakpoint_has_location_inserted_here): Likewise.
1704 (single_step_breakpoint_inserted_here_p): Likewise.
1705 (pc_at_non_inline_function): Likewise.
1706 * breakpoint.h (bpstat_stop_status): Update declaration.
1707 (breakpoint_here_p): Likewise.
1708 (breakpoint_in_range_p): Likewise.
1709 (moribund_breakpoint_here_p): Likewise.
1710 (breakpoint_inserted_here_p): Likewise.
1711 (software_breakpoint_inserted_here_p): Likewise.
1712 (hardware_breakpoint_inserted_here_p): Likewise.
1713 (breakpoint_has_location_inserted_here): Likewise.
1714 (single_step_breakpoint_inserted_here_p): Likewise.
1715 (hardware_watchpoint_inserted_in_range): Likewise.
1716 (breakpoint_address_match): Likewise.
1717 (insert_single_step_breakpoint): Likewise.
1718 (pc_at_non_inline_function): Likewise.
1719 * gdbthread.h (thread_has_single_step_breakpoint_here): Likewise.
1720 * record.c (record_check_stopped_by_breakpoint): Likewise.
1721 * record.h (record_check_stopped_by_breakpoint): Likewise.
1722 * thread.c (thread_has_single_step_breakpoint_here): Likewise.
1723
1724 2017-10-25 Yao Qi <yao.qi@linaro.org>
1725
1726 * aarch32-linux-nat.c (aarch32_gp_regcache_supply): Use
1727 regcache->arch () instead get_regcache_arch.
1728 * aarch64-fbsd-nat.c (aarch64_fbsd_fetch_inferior_registers):
1729 Likewise.
1730 (aarch64_fbsd_store_inferior_registers): Likewise.
1731 * aarch64-linux-nat.c (fetch_gregs_from_thread): Likewise.
1732 (store_gregs_to_thread): Likewise.
1733 (fetch_fpregs_from_thread): Likewise.
1734 (store_fpregs_to_thread): Likewise.
1735 * aarch64-tdep.c (aarch64_extract_return_value): Likewise.
1736 (aarch64_store_return_value): Likewise.
1737 (aarch64_software_single_step): Likewise.
1738 * aix-thread.c (aix_thread_wait): Likewise.
1739 (supply_reg32): Likewise.
1740 (supply_sprs64): Likewise.
1741 (supply_sprs32): Likewise.
1742 (fill_gprs64): Likewise.
1743 (fill_gprs32): Likewise.
1744 (fill_sprs64): Likewise.
1745 (fill_sprs32): Likewise.
1746 (store_regs_user_thread): Likewise.
1747 (store_regs_kernel_thread): Likewise.
1748 * alpha-bsd-nat.c (alphabsd_fetch_inferior_registers): Likewise.
1749 (alphabsd_store_inferior_registers): Likewise.
1750 * alpha-tdep.c (alpha_extract_return_value): Likewise.
1751 (alpha_store_return_value): Likewise.
1752 (alpha_deal_with_atomic_sequence): Likewise.
1753 (alpha_next_pc): Likewise.
1754 (alpha_software_single_step): Likewise.
1755 * amd64-bsd-nat.c (amd64bsd_fetch_inferior_registers): Likewise.
1756 (amd64bsd_store_inferior_registers): Likewise.
1757 * amd64-linux-nat.c (amd64_linux_fetch_inferior_registers):
1758 Likewise.
1759 (amd64_linux_store_inferior_registers): Likewise.
1760 * amd64-nat.c (amd64_supply_native_gregset): Likewise.
1761 (amd64_collect_native_gregset): Likewise.
1762 * amd64-obsd-tdep.c (amd64obsd_supply_uthread): Likewise.
1763 (amd64obsd_collect_uthread): Likewise.
1764 * amd64-tdep.c (amd64_supply_fpregset): Likewise.
1765 (amd64_collect_fpregset): Likewise.
1766 (amd64_supply_fxsave): Likewise.
1767 (amd64_supply_xsave): Likewise.
1768 (amd64_collect_fxsave): Likewise.
1769 (amd64_collect_xsave): Likewise.
1770 * arc-tdep.c (arc_write_pc): Likewise.
1771 * arch-utils.c (default_skip_permanent_breakpoint): Likewise.
1772 * arm-fbsd-nat.c (arm_fbsd_fetch_inferior_registers): Likewise.
1773 (arm_fbsd_store_inferior_registers): Likewise.
1774 * arm-linux-nat.c (fetch_vfp_regs): Likewise.
1775 (store_vfp_regs): Likewise.
1776 (arm_linux_fetch_inferior_registers): Likewise.
1777 (arm_linux_store_inferior_registers): Likewise.
1778 * arm-linux-tdep.c (arm_linux_supply_gregset): Likewise.
1779 (arm_linux_sigreturn_next_pc): Likewise.
1780 (arm_linux_get_next_pcs_syscall_next_pc): Likewise.
1781 * arm-nbsd-nat.c (arm_supply_gregset): Likewise.
1782 (fetch_register): Likewise.
1783 (store_register): Likewise.
1784 * arm-tdep.c (arm_is_thumb): Likewise.
1785 (displaced_in_arm_mode): Likewise.
1786 (bx_write_pc): Likewise.
1787 (arm_get_next_pcs_addr_bits_remove): Likewise.
1788 (arm_software_single_step): Likewise.
1789 (arm_extract_return_value): Likewise.
1790 (arm_store_return_value): Likewise.
1791 (arm_write_pc): Likewise.
1792 * bfin-tdep.c (bfin_extract_return_value): Likewise.
1793 * bsd-uthread.c (bsd_uthread_fetch_registers): Likewise.
1794 (bsd_uthread_store_registers): Likewise.
1795 * core-regset.c (fetch_core_registers): Likewise.
1796 * corelow.c (get_core_registers): Likewise.
1797 * cris-tdep.c (cris_store_return_value): Likewise.
1798 (cris_extract_return_value): Likewise.
1799 (find_step_target): Likewise.
1800 (find_step_target): Likewise.
1801 (cris_software_single_step): Likewise.
1802 * ctf.c (ctf_fetch_registers): Likewise.
1803 * darwin-nat.c (cancel_breakpoint): Likewise.
1804 * fbsd-tdep.c (fbsd_collect_thread_registers): Likewise.
1805 * frv-tdep.c (frv_extract_return_value): Likewise.
1806 * ft32-tdep.c (ft32_store_return_value): Likewise.
1807 (ft32_extract_return_value): Likewise.
1808 * go32-nat.c (fetch_register): Likewise.
1809 (go32_fetch_registers): Likewise.
1810 (go32_store_registers): Likewise.
1811 (store_register): Likewise.
1812 * h8300-tdep.c (h8300_extract_return_value): Likewise.
1813 (h8300_store_return_value): Likewise.
1814 * hppa-linux-nat.c (fetch_register): Likewise.
1815 (store_register): Likewise.
1816 (hppa_linux_fetch_inferior_registers): Likewise.
1817 (hppa_linux_store_inferior_registers): Likewise.
1818 * i386-darwin-nat.c (i386_darwin_fetch_inferior_registers): Likewise.
1819 (i386_darwin_store_inferior_registers): Likewise.
1820 * i386-gnu-nat.c (gnu_fetch_registers): Likewise.
1821 (gnu_store_registers): Likewise.
1822 * i386-linux-nat.c (fetch_register): Likewise.
1823 (store_register): Likewise.
1824 (supply_gregset): Likewise.
1825 (fill_gregset): Likewise.
1826 (i386_linux_fetch_inferior_registers): Likewise.
1827 (i386_linux_store_inferior_registers): Likewise.
1828 (i386_linux_resume): Likewise.
1829 * i386-linux-tdep.c (i386_linux_get_syscall_number_from_regcache):
1830 Likewise.
1831 * i386-nto-tdep.c (i386nto_supply_gregset): Likewise.
1832 * i386-obsd-nat.c (i386obsd_supply_pcb): Likewise.
1833 * i386-obsd-tdep.c (i386obsd_supply_uthread): Likewise.
1834 (i386obsd_collect_uthread): Likewise.
1835 * i386-tdep.c (i386_mmx_regnum_to_fp_regnum): Likewise.
1836 (i386_supply_gregset): Likewise.
1837 (i386_collect_gregset): Likewise.
1838 (i386_supply_fpregset): Likewise.
1839 (i386_collect_fpregset): Likewise.
1840 (i386_mpx_bd_base): Likewise.
1841 * i386-v4-nat.c (supply_fpregset): Likewise.
1842 (fill_fpregset): Likewise.
1843 * i387-tdep.c (i387_supply_fsave): Likewise.
1844 (i387_collect_fsave): Likewise.
1845 (i387_supply_fxsave): Likewise.
1846 (i387_collect_fxsave): Likewise.
1847 (i387_supply_xsave): Likewise.
1848 (i387_collect_xsave): Likewise.
1849 * ia64-linux-nat.c (ia64_linux_fetch_registers): Likewise.
1850 (ia64_linux_store_registers): Likewise.
1851 * ia64-tdep.c (ia64_access_rse_reg): Likewise.
1852 (ia64_extract_return_value): Likewise.
1853 (ia64_store_return_value): Likewise.
1854 (find_func_descr): Likewise.
1855 * inf-child.c (inf_child_fetch_inferior_registers): Likewise.
1856 * inf-ptrace.c (inf_ptrace_fetch_registers): Likewise.
1857 (inf_ptrace_store_registers): Likewise.
1858 * infrun.c (use_displaced_stepping): Likewise.
1859 (displaced_step_prepare_throw): Likewise.
1860 (resume): Likewise.
1861 (proceed): Likewise.
1862 (do_target_wait): Likewise.
1863 (adjust_pc_after_break): Likewise.
1864 (handle_inferior_event_1): Likewise.
1865 (handle_signal_stop): Likewise.
1866 (save_infcall_suspend_state): Likewise.
1867 (restore_infcall_suspend_state): Likewise.
1868 * iq2000-tdep.c (iq2000_extract_return_value): Likewise.
1869 * jit.c (jit_frame_prev_register): Likewise.
1870 * linux-nat.c (save_stop_reason): Likewise.
1871 (linux_nat_wait_1): Likewise.
1872 (resume_stopped_resumed_lwps): Likewise.
1873 * linux-record.c (record_linux_sockaddr): Likewise.
1874 (record_linux_msghdr): Likewise.
1875 (record_linux_system_call): Likewise.
1876 * linux-tdep.c (linux_collect_thread_registers): Likewise.
1877 * lm32-tdep.c (lm32_extract_return_value): Likewise.
1878 (lm32_store_return_value): Likewise.
1879 * m32c-tdep.c (m32c_read_flg): Likewise.
1880 (m32c_pseudo_register_read): Likewise.
1881 (m32c_pseudo_register_write): Likewise.
1882 * m32r-linux-tdep.c (m32r_linux_supply_gregset): Likewise.
1883 (m32r_linux_collect_gregset): Likewise.
1884 * m32r-tdep.c (m32r_store_return_value): Likewise.
1885 (m32r_extract_return_value): Likewise.
1886 * m68k-bsd-nat.c (m68kbsd_supply_fpregset): Likewise.
1887 (m68kbsd_collect_fpregset): Likewise.
1888 * m68k-bsd-tdep.c (m68kbsd_supply_fpregset): Likewise.
1889 * m68k-linux-nat.c (fetch_register): Likewise.
1890 (old_fetch_inferior_registers): Likewise.
1891 (old_store_inferior_registers): Likewise.
1892 (store_regs): Likewise.
1893 * m68k-tdep.c (m68k_svr4_extract_return_value): Likewise.
1894 (m68k_svr4_store_return_value): Likewise.
1895 * m88k-tdep.c (m88k_store_arguments): Likewise.
1896 * mi/mi-main.c (mi_cmd_data_list_changed_registers): Likewise.
1897 (mi_cmd_data_write_register_values): Likewise.
1898 * mips-fbsd-nat.c (mips_fbsd_fetch_inferior_registers): Likewise.
1899 (mips_fbsd_store_inferior_registers): Likewise.
1900 * mips-fbsd-tdep.c (mips_fbsd_supply_fpregs): Likewise.
1901 (mips_fbsd_supply_gregs): Likewise.
1902 (mips_fbsd_collect_fpregs): Likewise.
1903 (mips_fbsd_collect_gregs): Likewise.
1904 (mips_fbsd_supply_fpregset): Likewise.
1905 (mips_fbsd_collect_fpregset): Likewise.
1906 (mips_fbsd_supply_gregset): Likewise.
1907 (mips_fbsd_collect_gregset): Likewise.
1908 * mips-linux-nat.c (supply_gregset): Likewise.
1909 (fill_gregset): Likewise.
1910 (supply_fpregset): Likewise.
1911 (fill_fpregset): Likewise.
1912 * mips-linux-tdep.c (mips_supply_gregset): Likewise.
1913 (mips_fill_gregset): Likewise.
1914 (mips_supply_fpregset): Likewise.
1915 (mips_fill_fpregset): Likewise.
1916 (mips64_supply_gregset): Likewise.
1917 (micromips_linux_sigframe_validate): Likewise.
1918 * mips-nbsd-nat.c (mipsnbsd_fetch_inferior_registers): Likewise.
1919 (mipsnbsd_fetch_inferior_registers): Likewise.
1920 (mipsnbsd_store_inferior_registers): Likewise.
1921 * mips-nbsd-tdep.c (mipsnbsd_supply_fpregset): Likewise.
1922 (mipsnbsd_supply_gregset): Likewise.
1923 (mipsnbsd_iterate_over_regset_sections): Likewise.
1924 (mipsnbsd_supply_reg): Likewise.
1925 (mipsnbsd_supply_fpreg): Likewise.
1926 * mips-tdep.c (mips_in_frame_stub): Likewise.
1927 (mips_dummy_id): Likewise.
1928 (is_octeon_bbit_op): Likewise.
1929 (micromips_bc1_pc): Likewise.
1930 (extended_mips16_next_pc): Likewise.
1931 (mips16_next_pc): Likewise.
1932 (deal_with_atomic_sequence): Likewise.
1933 * moxie-tdep.c (moxie_process_readu): Likewise.
1934 * nios2-tdep.c (nios2_get_next_pc): Likewise.
1935 * nto-procfs.c (procfs_store_registers): Likewise.
1936 * ppc-fbsd-nat.c (ppcfbsd_fetch_inferior_registers): Likewise.
1937 (ppcfbsd_store_inferior_registers): Likewise.
1938 * ppc-linux-nat.c (fetch_vsx_register): Likewise.
1939 (fetch_altivec_register): Likewise.
1940 (get_spe_registers): Likewise.
1941 (fetch_spe_register): Likewise.
1942 (fetch_altivec_registers): Likewise.
1943 (fetch_all_gp_regs): Likewise.
1944 (fetch_all_fp_regs): Likewise.
1945 (store_vsx_register): Likewise.
1946 (store_altivec_register): Likewise.
1947 (set_spe_registers): Likewise.
1948 (store_spe_register): Likewise.
1949 (store_altivec_registers): Likewise.
1950 (store_all_gp_regs): Likewise.
1951 (store_all_fp_regs): Likewise.
1952 * ppc-linux-tdep.c (ppc_linux_supply_gregset): Likewise.
1953 (ppc_linux_collect_gregset): Likewise.
1954 (ppc_canonicalize_syscall): Likewise.
1955 (ppc_linux_record_signal): Likewise.
1956 (ppu2spu_prev_register): Likewise.
1957 * ppc-nbsd-nat.c (ppcnbsd_supply_pcb): Likewise.
1958 * ppc-obsd-nat.c (ppcobsd_fetch_registers): Likewise.
1959 (ppcobsd_store_registers): Likewise.
1960 * ppc-ravenscar-thread.c (ppc_ravenscar_generic_fetch_registers):
1961 Likewise.
1962 (ppc_ravenscar_generic_store_registers): Likewise.
1963 * procfs.c (procfs_fetch_registers): Likewise.
1964 (procfs_store_registers): Likewise.
1965 * ravenscar-thread.c (ravenscar_fetch_registers): Likewise.
1966 (ravenscar_store_registers): Likewise.
1967 (ravenscar_prepare_to_store): Likewise.
1968 * record-btrace.c (record_btrace_fetch_registers): Likewise.
1969 * record-full.c (record_full_wait_1): Likewise.
1970 (record_full_registers_change): Likewise.
1971 (record_full_store_registers): Likewise.
1972 (record_full_core_fetch_registers): Likewise.
1973 (record_full_save): Likewise.
1974 (record_full_goto_insn): Likewise.
1975 * regcache.c (regcache_register_size): Likewise.
1976 (get_regcache_arch): Remove.
1977 (regcache_read_pc): Likewise.
1978 * regcache.h (get_regcache_arch): Remove.
1979 * remote-sim.c (gdbsim_fetch_register): Likewise.
1980 (gdbsim_store_register): Likewise.
1981 * remote.c (fetch_register_using_p): Likewise.
1982 (send_g_packet): Likewise.
1983 (remote_prepare_to_store): Likewise.
1984 (store_registers_using_G): Likewise.
1985 * reverse.c (save_bookmark_command): Likewise.
1986 (goto_bookmark_command): Likewise.
1987 * rs6000-aix-tdep.c (branch_dest): Likewise.
1988 * rs6000-nat.c (rs6000_ptrace64): Likewise.
1989 (fetch_register): Likewise.
1990 * rs6000-tdep.c (ppc_supply_reg): Likewise.
1991 (ppc_collect_reg): Likewise.
1992 (ppc_collect_gregset): Likewise.
1993 (ppc_collect_fpregset): Likewise.
1994 (ppc_collect_vsxregset): Likewise.
1995 (ppc_collect_vrregset): Likewise.
1996 (ppc_displaced_step_hw_singlestep): Likewise.
1997 (rs6000_pseudo_register_read): Likewise.
1998 (rs6000_pseudo_register_write): Likewise.
1999 * s390-linux-nat.c (supply_gregset): Likewise.
2000 (fill_gregset): Likewise.
2001 (s390_linux_fetch_inferior_registers): Likewise.
2002 * s390-linux-tdep.c (s390_write_pc): Likewise.
2003 (s390_software_single_step): Likewise.
2004 (s390_all_but_pc_registers_record): Likewise.
2005 (s390_linux_syscall_record): Likewise.
2006 * sentinel-frame.c (sentinel_frame_prev_arch): Likewise.
2007 * sh-nbsd-nat.c (shnbsd_fetch_inferior_registers): Likewise.
2008 (shnbsd_store_inferior_registers): Likewise.
2009 * sh-tdep.c (sh_extract_return_value_nofpu): Likewise.
2010 (sh_extract_return_value_fpu): Likewise.
2011 (sh_store_return_value_nofpu): Likewise.
2012 (sh_corefile_supply_regset): Likewise.
2013 (sh_corefile_collect_regset): Likewise.
2014 * sh64-tdep.c (sh64_extract_return_value): Likewise.
2015 (sh64_store_return_value): Likewise.
2016 * sparc-linux-tdep.c (sparc32_linux_collect_core_fpregset): Likewise.
2017 * sparc-nat.c (sparc_fetch_inferior_registers): Likewise.
2018 (sparc_store_inferior_registers): Likewise.
2019 * sparc-ravenscar-thread.c (register_in_thread_descriptor_p): Likewise.
2020 (sparc_ravenscar_prepare_to_store): Likewise.
2021 * sparc-tdep.c (sparc32_store_arguments): Likewise.
2022 (sparc_analyze_control_transfer): Likewise.
2023 (sparc_step_trap): Likewise.
2024 (sparc_software_single_step): Likewise.
2025 (sparc32_gdbarch_init): Likewise.
2026 (sparc_supply_rwindow): Likewise.
2027 (sparc_collect_rwindow): Likewise.
2028 * sparc64-linux-tdep.c (sparc64_linux_collect_core_fpregset): Likewise.
2029 * sparc64-nbsd-nat.c (sparc64nbsd_supply_gregset): Likewise.
2030 (sparc64nbsd_collect_gregset): Likewise.
2031 (sparc64nbsd_supply_fpregset): Likewise.
2032 (sparc64nbsd_collect_fpregset): Likewise.
2033 * sparc64-tdep.c (sparc64_store_arguments): Likewise.
2034 (sparc64_supply_gregset): Likewise.
2035 (sparc64_collect_gregset): Likewise.
2036 (sparc64_supply_fpregset): Likewise.
2037 (sparc64_collect_fpregset): Likewise.
2038 * spu-linux-nat.c (spu_fetch_inferior_registers): Likewise.
2039 * spu-tdep.c (spu_unwind_sp): Likewise.
2040 (spu2ppu_prev_register): Likewise.
2041 (spu_memory_remove_breakpoint): Likewise.
2042 * stack.c (return_command): Likewise.
2043 * tic6x-tdep.c (tic6x_extract_signed_field): Likewise.
2044 * tracefile-tfile.c (tfile_fetch_registers): Likewise.
2045 * tracefile.c (trace_save_ctf): Likewise.
2046 * windows-nat.c (do_windows_fetch_inferior_registers): Likewise.
2047 (do_windows_store_inferior_registers): Likewise.
2048 (windows_resume): Likewise.
2049 * xtensa-linux-nat.c (fill_gregset): Likewise.
2050 (supply_gregset_reg): Likewise.
2051 * xtensa-tdep.c (xtensa_register_write_masked): Likewise.
2052 (xtensa_register_read_masked): Likewise.
2053 (xtensa_supply_gregset): Likewise.
2054 (xtensa_extract_return_value): Likewise.
2055 (xtensa_store_return_value): Likewise.
2056
2057 2017-10-25 Ulrich Weigand <uweigand@de.ibm.com>
2058
2059 * doublest.c (floatformat_from_string): New function.
2060 * doublest.h (floatformat_from_string): Add prototype.
2061
2062 * std-operator.def (OP_DOUBLE, OP_DECFLOAT): Remove, replace by ...
2063 (OP_FLOAT): ... this.
2064 * expression.h: Do not include "doublest.h".
2065 (union exp_element): Replace doubleconst and decfloatconst by
2066 new element floatconst.
2067 * ada-lang.c (resolve_subexp): Handle OP_FLOAT instead of OP_DOUBLE.
2068 (ada_evaluate_subexp): Likewise.
2069 * eval.c (evaluate_subexp_standard): Handle OP_FLOAT instead of
2070 OP_DOUBLE and OP_DECFLOAT.
2071 * expprint.c (print_subexp_standard): Likewise.
2072 (dump_subexp_body_standard): Likewise.
2073 * breakpoint.c (watchpoint_exp_is_const): Likewise.
2074
2075 * parse.c: Include "dfp.h".
2076 (write_exp_elt_dblcst, write_exp_elt_decfloatcst): Remove.
2077 (write_exp_elt_floatcst): New function.
2078 (operator_length_standard): Handle OP_FLOAT instead of OP_DOUBLE
2079 and OP_DECFLOAT.
2080 (operator_check_standard): Likewise.
2081 (parse_float): Do not accept suffix. Take type as input. Return bool.
2082 Return target format buffer instead of host DOUBLEST.
2083 Use floatformat_from_string and decimal_from_string to parse
2084 either binary or decimal floating-point types.
2085 (parse_c_float): Remove.
2086 * parser-defs.h: Do not include "doublest.h".
2087 (write_exp_elt_dblcst, write_exp_elt_decfloatcst): Remove.
2088 (write_exp_elt_floatcst): Add prototype.
2089 (parse_float): Update prototype.
2090 (parse_c_float): Remove.
2091
2092 * c-exp.y: Do not include "dfp.h".
2093 (typed_val_float): Use byte buffer instead of DOUBLEST.
2094 (typed_val_decfloat): Remove.
2095 (DECFLOAT): Remove.
2096 (FLOAT): Use OP_FLOAT and write_exp_elt_floatcst.
2097 (parse_number): Update to new parse_float interface.
2098 Parse suffixes and determine type before calling parse_float.
2099 Handle decimal and binary FP types the same way.
2100
2101 * d-exp.y (typed_val_float): Use byte buffer instead of DOUBLEST.
2102 (FLOAT_LITERAL): Use OP_FLOAT and write_exp_elt_floatcst.
2103 (parse_number): Update to new parse_float interface.
2104 Parse suffixes and determine type before calling parse_float.
2105
2106 * f-exp.y: Replace dval by typed_val_float.
2107 (FLOAT): Use OP_FLOAT and write_exp_elt_floatcst.
2108 (parse_number): Use parse_float instead of atof.
2109
2110 * go-exp.y (typed_val_float): Use byte buffer instead of DOUBLEST.
2111 (parse_go_float): Remove.
2112 (FLOAT): Use OP_FLOAT and write_exp_elt_floatcst.
2113 (parse_number): Call parse_float instead of parse_go_float.
2114 Parse suffixes and determine type before calling parse_float.
2115
2116 * p-exp.y (typed_val_float): Use byte buffer instead of DOUBLEST.
2117 (FLOAT): Use OP_FLOAT and write_exp_elt_floatcst.
2118 (parse_number): Update to new parse_float interface.
2119 Parse suffixes and determine type before calling parse_float.
2120
2121 * m2-exp.y: Replace dval by byte buffer val.
2122 (FLOAT): Use OP_FLOAT and write_exp_elt_floatcst.
2123 (parse_number): Call parse_float instead of atof.
2124
2125 * rust-exp.y (typed_val_float): Use byte buffer instead of DOUBLEST.
2126 (lex_number): Call parse_float instead of strtod.
2127 (ast_dliteral): Use OP_FLOAT instead of OP_DOUBLE.
2128 (convert_ast_to_expression): Handle OP_FLOAT instead of OP_DOUBLE.
2129 Use write_exp_elt_floatcst.
2130 (unit_testing): Remove static variable.
2131 (rust_type): Do not check unit_testing.
2132 (rust_lex_tests): Do not set uint_testing. Set up dummy rust_parser.
2133
2134 * ada-exp.y (type_float, type_double): Remove.
2135 (typed_val_float): Use byte buffer instead of DOUBLEST.
2136 (FLOAT): Use OP_FLOAT and write_exp_elt_floatcst.
2137 * ada-lex.l (processReal): Use parse_float instead of sscanf.
2138
2139 2017-10-25 Alan Hayward <alan.hayward@arm.com>
2140
2141 * aarch64-tdep.h (enum aarch64_regnum): Remove.
2142 * arch/aarch64.h: New file.
2143
2144 2017-10-24 Ulrich Weigand <uweigand@de.ibm.com>
2145
2146 * dfp.h (decimal_from_string): Use const reference for argument.
2147 * dfp.c (decimal_from_string): Likewise.
2148
2149 2017-10-24 Ulrich Weigand <uweigand@de.ibm.com>
2150
2151 * i387-tdep.c (print_i387_value): Use floatformat_to_string.
2152 * sh64-tdep.c (sh64_do_fp_register): Likewise.
2153 * mips-tdep.c (mips_print_fp_register): Likewise.
2154
2155 2017-10-24 Ulrich Weigand <uweigand@de.ibm.com>
2156
2157 * common/format.h (enum argclass): Replace decfloat_arg by
2158 dec32float_arg, dec64float_arg, and dec128float_arg.
2159 * common/format.c (parse_format_string): Update to return
2160 new decimal float argument classes.
2161
2162 * printcmd.c (printf_decfloat): Rename to ...
2163 (printf_floating): ... this. Add argclass argument, and use it
2164 instead of parsing the format string again. Add support for
2165 binary floating-point values, using floatformat_to_string.
2166 Convert value to the target format if it doesn't already match.
2167 (ui_printf): Call printf_floating instead of printf_decfloat,
2168 also for double_arg / long_double_arg. Pass argclass.
2169
2170 * dfp.c (decimal_to_string): Add format string argument.
2171 * dfp.h (decimal_to_string): Likewise.
2172
2173 * doublest.c (floatformat_to_string): Add format string argument.
2174 * doublest.h (floatformat_to_string): Likewise.
2175
2176 2017-10-24 Ulrich Weigand <uweigand@de.ibm.com>
2177
2178 * doublest.c (floatformat_precision): New routine.
2179 (floatformat_to_string): Likewise.
2180 * doublest.c (floatformat_to_string): Add prototype.
2181
2182 * printcmd.c (print_scalar_formatted): Only call print_floating
2183 on floating-point types.
2184 * valprint.c: Do not include "floatformat.h".
2185 (generic_val_print_decfloat): Remove.
2186 (generic_val_print): Call generic_val_print_float for both
2187 TYPE_CODE_FLT and TYPE_CODE_DECFLOAT.
2188 (print_floating): Use floatformat_to_string. Handle decimal float.
2189 (print_decimal_floating): Remove, merge into floatformat_to_string.
2190 * value.h (print_decimal_floating): Remove.
2191
2192 * Makefile.in: Do not build doublest.c with -Wformat-nonliteral.
2193
2194 2017-10-24 Ulrich Weigand <uweigand@de.ibm.com>
2195
2196 * buildsym.c (end_symtab_get_static_block): Use std::stable_sort.
2197
2198 2017-10-21 Simon Marchi <simon.marchi@ericsson.com>
2199
2200 * memattr.h: Don't include vec.h.
2201 (struct mem_attrib): Initialize fields.
2202 <unknown>: New static method.
2203 (struct mem_region): Add constructors, operator<, initialize
2204 fields.
2205 * memattr.c: Include algorithm.
2206 (default_mem_attrib, unknown_mem_attrib): Remove.
2207 (user_mem_region_list): New global.
2208 (target_mem_region_list, mem_region_list): Change type to
2209 std::vector<mem_region>.
2210 (mem_use_target): Now a function.
2211 (target_mem_regions_valid): Change type to bool.
2212 (mem_region_lessthan, mem_region_cmp, mem_region_init): Remove.
2213 (require_user_regions): Adjust.
2214 (require_target_regions): Adjust.
2215 (create_mem_region): Adjust.
2216 (lookup_mem_region): Adjust.
2217 (invalidate_target_mem_regions): Adjust.
2218 (mem_clear): Rename to...
2219 (user_mem_clear): ... this, and adjust.
2220 (mem_command): Adjust.
2221 (info_mem_command): Adjust.
2222 (mem_enable, enable_mem_command, mem_disable,
2223 disable_mem_command): Adjust.
2224 (mem_delete): Adjust.
2225 (delete_mem_command): Adjust.
2226 * memory-map.h (parse_memory_map): Return an std::vector.
2227 * memory-map.c (parse_memory_map): Likewise.
2228 (struct memory_map_parsing_data): Add constructor.
2229 <memory_map>: Point to std::vector.
2230 (memory_map_start_memory): Adjust.
2231 (memory_map_end_memory): Adjust.
2232 (memory_map_end_property): Adjust.
2233 (clear_result): Remove.
2234 * remote.c (remote_memory_map): Return an std::vector.
2235 * target-debug.h (target_debug_print_VEC_mem_region_s__p):
2236 Remove.
2237 (target_debug_print_mem_region_vector): New.
2238 * target-delegates.c: Regenerate.
2239 * target.h (mem_region_vector): New typedef.
2240 (to_memory_map): Return mem_region_vector.
2241 (target_memory_map): Return an std::vector.
2242 * target.c (target_memory_map): Return an std::vector.
2243 (flash_erase_command): Adjust.
2244
2245 2017-10-21 Simon Marchi <simon.marchi@ericsson.com>
2246
2247 * memory-map.c (struct memory_map_parsing_data) <property_name>:
2248 Change type to std::string.
2249 (memory_map_start_property): Adjust.
2250 (memory_map_end_property): Adjust.
2251
2252 2017-10-21 Simon Marchi <simon.marchi@polymtl.ca>
2253
2254 * infrun.h: Include common/byte-vector.h.
2255 (struct displaced_step_closure): New struct.
2256 (struct buf_displaced_step_closure): New struct.
2257 * infrun.c (displaced_step_closure::~displaced_step_closure):
2258 Provide default implementation.
2259 (displaced_step_clear): Deallocate step closure with delete.
2260 * aarch64-tdep.c (displaced_step_closure): Rename to ...
2261 (aarch64_displaced_step_closure): ... this, extend
2262 displaced_step_closure.
2263 (aarch64_displaced_step_data) <dsc>: Change type to
2264 aarch64_displaced_step_closure.
2265 (aarch64_displaced_step_copy_insn): Adjust to type change, use
2266 unique_ptr.
2267 (aarch64_displaced_step_fixup): Add cast for displaced step
2268 closure.
2269 * amd64-tdep.c (displaced_step_closure): Rename to ...
2270 (amd64_displaced_step_closure): ... this, extend
2271 displaced_step_closure.
2272 <insn_buf>: Change type to std::vector<gdb_byte>.
2273 <max_len>: Remove.
2274 (fixup_riprel): Change type of DSC parameter, adjust to type
2275 change of insn_buf.
2276 (fixup_displaced_copy): Change type of DSC parameter.
2277 (amd64_displaced_step_copy_insn): Instantiate
2278 amd64_displaced_step_closure.
2279 (amd64_displaced_step_fixup): Add cast for closure type, adjust
2280 to type change of insn_buf.
2281 * arm-linux-tdep.c (arm_linux_cleanup_svc): Change type of
2282 parameter DSC.
2283 (arm_linux_copy_svc): Likewise.
2284 (cleanup_kernel_helper_return): Likewise.
2285 (arm_catch_kernel_helper_return): Likewise.
2286 (arm_linux_displaced_step_copy_insn): Instantiate
2287 arm_displaced_step_closure.
2288 * arm-tdep.c (arm_pc_is_thumb): Add cast for closure.
2289 (displaced_read_reg): Change type of parameter DSC.
2290 (branch_write_pc): Likewise.
2291 (load_write_pc): Likewise.
2292 (alu_write_pc): Likewise.
2293 (displaced_write_reg): Likewise.
2294 (arm_copy_unmodified): Likewise.
2295 (thumb_copy_unmodified_32bit): Likewise.
2296 (thumb_copy_unmodified_16bit): Likewise.
2297 (cleanup_preload): Likewise.
2298 (install_preload): Likewise.
2299 (arm_copy_preload): Likewise.
2300 (thumb2_copy_preload): Likewise.
2301 (install_preload_reg): Likewise.
2302 (arm_copy_preload_reg): Likewise.
2303 (cleanup_copro_load_store): Likewise.
2304 (install_copro_load_store): Likewise.
2305 (arm_copy_copro_load_store) Likewise.
2306 (thumb2_copy_copro_load_store): Likewise.
2307 (cleanup_branch): Likewise.
2308 (install_b_bl_blx): Likewise.
2309 (arm_copy_b_bl_blx): Likewise.
2310 (thumb2_copy_b_bl_blx): Likewise.
2311 (thumb_copy_b): Likewise.
2312 (install_bx_blx_reg): Likewise.
2313 (arm_copy_bx_blx_reg): Likewise.
2314 (thumb_copy_bx_blx_reg): Likewise.
2315 (cleanup_alu_imm): Likewise.
2316 (arm_copy_alu_imm): Likewise.
2317 (thumb2_copy_alu_imm): Likewise.
2318 (cleanup_alu_reg): Likewise.
2319 (install_alu_reg): Likewise.
2320 (arm_copy_alu_reg): Likewise.
2321 (thumb_copy_alu_reg): Likewise.
2322 (cleanup_alu_shifted_reg): Likewise.
2323 (install_alu_shifted_reg): Likewise.
2324 (arm_copy_alu_shifted_reg): Likewise.
2325 (cleanup_load): Likewise.
2326 (cleanup_store): Likewise.
2327 (arm_copy_extra_ld_st): Likewise.
2328 (install_load_store): Likewise.
2329 (thumb2_copy_load_literal): Likewise.
2330 (thumb2_copy_load_reg_imm): Likewise.
2331 (arm_copy_ldr_str_ldrb_strb): Likewise.
2332 (cleanup_block_load_all): Likewise.
2333 (cleanup_block_store_pc): Likewise.
2334 (cleanup_block_load_pc): Likewise.
2335 (arm_copy_block_xfer): Likewise.
2336 (thumb2_copy_block_xfer): Likewise.
2337 (cleanup_svc): Likewise.
2338 (install_svc): Likewise.
2339 (arm_copy_svc): Likewise.
2340 (thumb_copy_svc): Likewise.
2341 (arm_copy_undef): Likewise.
2342 (thumb_32bit_copy_undef): Likewise.
2343 (arm_copy_unpred): Likewise.
2344 (arm_decode_misc_memhint_neon): Likewise.
2345 (arm_decode_unconditional): Likewise.
2346 (arm_decode_miscellaneous): Likewise.
2347 (arm_decode_dp_misc): Likewise.
2348 (arm_decode_ld_st_word_ubyte): Likewise.
2349 (arm_decode_media): Likewise.
2350 (arm_decode_b_bl_ldmstm): Likewise.
2351 (arm_decode_ext_reg_ld_st): Likewise.
2352 (thumb2_decode_dp_shift_reg): Likewise.
2353 (thumb2_decode_ext_reg_ld_st): Likewise.
2354 (arm_decode_svc_copro): Likewise.
2355 (thumb2_decode_svc_copro): Likewise.
2356 (install_pc_relative): Likewise.
2357 (thumb_copy_pc_relative_16bit): Likewise.
2358 (thumb_decode_pc_relative_16bit): Likewise.
2359 (thumb_copy_pc_relative_32bit): Likewise.
2360 (thumb_copy_16bit_ldr_literal): Likewise.
2361 (thumb_copy_cbnz_cbz): Likewise.
2362 (thumb2_copy_table_branch): Likewise.
2363 (cleanup_pop_pc_16bit_all): Likewise.
2364 (thumb_copy_pop_pc_16bit): Likewise.
2365 (thumb_process_displaced_16bit_insn): Likewise.
2366 (decode_thumb_32bit_ld_mem_hints): Likewise.
2367 (thumb_process_displaced_32bit_insn): Likewise.
2368 (thumb_process_displaced_insn): Likewise.
2369 (arm_process_displaced_insn): Likewise.
2370 (arm_displaced_init_closure): Likewise.
2371 (arm_displaced_step_fixup): Add cast for closure.
2372 * arm-tdep.h: Include infrun.h.
2373 (displaced_step_closure): Rename to ...
2374 (arm_displaced_step_closure): ... this, extend
2375 displaced_step_closure.
2376 <u::svc::copy_svc_os>: Change type of parameter DSC.
2377 <cleanup>: Likewise.
2378 (arm_process_displaced_insn): Likewise.
2379 (arm_displaced_init_closure): Likewise.
2380 (displaced_read_reg): Likewise.
2381 (displaced_write_reg): Likewise.
2382 * i386-linux-tdep.c (i386_linux_displaced_step_copy_insn):
2383 Adjust.
2384 * i386-tdep.h: Include infrun.h.
2385 (i386_displaced_step_closure): New typedef.
2386 * i386-tdep.c (i386_displaced_step_copy_insn): Use
2387 i386_displaced_step_closure.
2388 (i386_displaced_step_fixup): Adjust.
2389 * rs6000-tdep.c (ppc_displaced_step_closure): New typedef.
2390 (ppc_displaced_step_copy_insn): Use ppc_displaced_step_closure
2391 and unique_ptr.
2392 (ppc_displaced_step_fixup): Adjust.
2393 * s390-linux-tdep.c (s390_displaced_step_closure): New typedef.
2394 (s390_displaced_step_copy_insn): Use s390_displaced_step_closure
2395 and unique_ptr.
2396 (s390_displaced_step_fixup): Adjust.
2397
2398 2017-10-21 Simon Marchi <simon.marchi@polymtl.ca>
2399
2400 * interps.h (interp_resume, interp_suspend, interp_set_temp):
2401 Remove declarations.
2402
2403 2017-10-20 Tom Tromey <tom@tromey.com>
2404
2405 * gdb_bfd.c (struct gdb_bfd_data) <included_bfds>: Now a
2406 std::vector.
2407 (gdb_bfd_record_inclusion): Update.
2408 (bfdp): Remove typedef.
2409
2410 2017-10-20 Tom Tromey <tom@tromey.com>
2411
2412 * gdb_bfd.c (gdb_bfd_ref): Use new.
2413 (struct gdb_bfd_data): Add constructor, destructor, and member
2414 initializers.
2415 (gdb_bfd_unref): Use delete.
2416
2417 2017-10-20 Tom Tromey <tom@tromey.com>
2418
2419 * exec.c (exec_file_attach): Use new_bfd_ref.
2420 * symfile-mem.c (symbol_file_add_from_memory): Use new_bfd_ref.
2421 * gdb_bfd.c (gdb_bfd_open, gdb_bfd_fopen, gdb_bfd_openr)
2422 (gdb_bfd_openw, gdb_bfd_openr_iovec, gdb_bfd_fdopenr): Use
2423 new_bfd_ref.
2424 * gdb_bfd.h (new_bfd_ref): New function.
2425
2426 2017-10-20 Pedro Alves <palves@redhat.com>
2427
2428 * main.c (captured_command_loop): Add attribute noinline.
2429
2430 2017-10-19 Simon Marchi <simon.marchi@ericsson.com>
2431
2432 * interps.c (struct interp_factory): Add constructor.
2433 (interp_factory_p): Remove typedef.
2434 (DEF_VEC_P(interp_factory_p)): Remove.
2435 (interpreter_factories): Change type to std::vector.
2436 (interp_factory_register): Adjust.
2437 (interp_lookup): Adjust.
2438 (interpreter_completer): Adjust.
2439
2440 2017-10-19 Tom Tromey <tom@tromey.com>
2441
2442 * break-catch-syscall.c (catch_syscall_completer): Use
2443 std::string, gdb::unique_xmalloc_ptr.
2444
2445 2017-10-19 Tom Tromey <tom@tromey.com>
2446
2447 * infcall.c (call_function_by_hand_dummy): Use std::string.
2448
2449 2017-10-19 Tom Tromey <tom@tromey.com>
2450
2451 * mi/mi-main.c (mi_cmd_execute): Update.
2452 * top.h (prepare_execute_command): Return scoped_value_mark.
2453 * value.h (class scoped_value_mark): Use DISABLE_COPY_AND_ASSIGN.
2454 Add move constructor.
2455 * top.c (prepare_execute_command): Return scoped_value_mark.
2456 (execute_command): Update.
2457
2458 2017-10-19 Pedro Alves <palves@redhat.com>
2459
2460 * xml-support.c (xml_fetch_content_from_file): Check fread's
2461 return.
2462
2463 2017-10-19 Pedro Alves <palves@redhat.com>
2464
2465 * ser-base.c (ser_base_read_error_fd): Delete the file handler if
2466 async.
2467 (handle_error_fd): New function.
2468 (ser_base_async): Add/delete an event loop file handler for
2469 error_fd.
2470
2471 2017-10-19 Pedro Alves <palves@redhat.com>
2472
2473 * xml-support.c (xml_fetch_content_from_file): Don't read in
2474 chunks. Instead use fseek to determine the file's size, and read
2475 it in one go.
2476
2477 2017-11-18 Keith Seitz <keiths@redhat.com>
2478
2479 * c-exp.y (oper): Canonicalize conversion operators of user-defined
2480 types.
2481 Add whitespace to front of type name.
2482
2483 2017-10-18 Keith Seitz <keiths@redhat.com>
2484
2485 * dwarf2read.c (dwarf2_add_typedef): Issue a complaint on unhandled
2486 DW_AT_accessibility.
2487
2488 2017-10-18 Yao Qi <yao.qi@linaro.org>
2489
2490 * features/tic6x-c62x-linux.c: Remove.
2491
2492 2017-10-17 Tom Tromey <tom@tromey.com>
2493
2494 * disasm.c (do_mixed_source_and_assembly_deprecated): Use
2495 gdb::optional, ui_out_emit_list, ui_out_emit_tuple.
2496 (do_mixed_source_and_assembly): Likewise.
2497
2498 2017-10-17 Tom Tromey <tom@tromey.com>
2499
2500 * regcache.c (regcache::xfer_part): Remove assertion.
2501
2502 2017-10-17 Pedro Alves <palves@redhat.com>
2503
2504 * xml-support.c (xml_fetch_content_from_file): Call
2505 unique_ptr::release() instead unique_ptr::get() when passing
2506 through xrealloc.
2507
2508 2017-10-17 Yao Qi <yao.qi@linaro.org>
2509
2510 * regcache.c (regcache::xfer_part): Remove parameters read and
2511 write, add parameter is_raw. All callers are updated.
2512
2513 2017-10-16 Keith Seitz <keiths@redhat.com>
2514
2515 * c-typeprint.c (enum access_specifier): Moved here from
2516 c_type_print_base.
2517 (output_access_specifier): New function.
2518 (c_type_print_base): Consider typedefs when assessing
2519 whether access labels are needed.
2520 Use output_access_specifier as needed.
2521 Output access specifier for typedefs, if needed.
2522 * dwarf2read.c (dwarf2_add_typedef): Record DW_AT_accessibility.
2523 * gdbtypes.h (struct typedef_field) <is_protected, is_private>: New
2524 fields.
2525 (TYPE_TYPEDEF_FIELD_PROTECTED, TYPE_TYPEDEF_FIELD_PRIVATE): New
2526 accessor macros.
2527
2528 2017-10-16 Tom Tromey <tom@tromey.com>
2529
2530 * linux-tdep.c (linux_info_proc, linux_find_memory_regions_full)
2531 (linux_fill_prpsinfo, linux_vsyscall_range_raw): Update.
2532 * target.c (target_fileio_read_stralloc): Update.
2533 * sparc64-tdep.c (adi_is_addr_mapped): Update.
2534 * target.h (target_fileio_read_stralloc): Return
2535 unique_xmalloc_ptr.
2536
2537 2017-10-16 Tom Tromey <tom@tromey.com>
2538
2539 * xml-syscall.c (xml_init_syscalls_info): Update.
2540 * xml-support.c (xinclude_start_include): Update.
2541 (xml_fetch_content_from_file): Return unique_xmalloc_ptr.
2542 * xml-support.h (xml_fetch_another): Return unique_xmalloc_ptr.
2543 (xml_fetch_content_from_file): Likewise.
2544 * osdata.c (get_osdata): Update.
2545 * target.h (target_read_stralloc, target_get_osdata): Return
2546 unique_xmalloc_ptr.
2547 * solib-aix.c (solib_aix_get_library_list): Update.
2548 * solib-target.c (solib_target_current_sos): Update.
2549 * solib-svr4.c (svr4_current_sos_via_xfer_libraries): Update.
2550 * xml-tdesc.c (fetch_available_features_from_target): Update.
2551 (target_fetch_description_xml): Update.
2552 (file_read_description_xml): Update.
2553 * remote.c (remote_get_threads_with_qxfer, remote_memory_map)
2554 (remote_traceframe_info, btrace_read_config, remote_read_btrace)
2555 (remote_pid_to_exec_file): Update.
2556 * target.c (target_read_stralloc): Return unique_xmalloc_ptr.
2557 (target_get_osdata): Likewise.
2558
2559 2017-10-16 Tom Tromey <tom@tromey.com>
2560
2561 * remote.c (remote_register_number_and_offset): Use std::vector.
2562 (remote_set_syscall_catchpoint): Use gdb::unique_xmalloc_ptr.
2563 (putpkt_binary): Use gdb::def_vector.
2564 (compare_sections_command): Use gdb::byte_vector.
2565
2566 2017-10-16 Tom Tromey <tom@tromey.com>
2567
2568 * ppc-linux-nat.c (hwdebug_insert_point): Use
2569 gdb::unique_xmalloc_ptr, XDUP.
2570
2571 2017-10-16 Tom Tromey <tom@tromey.com>
2572
2573 * probe.c (parse_probes): Use std::string.
2574 (info_probes_for_ops, enable_probes_command)
2575 (disable_probes_command): Remove cleanups.
2576
2577 2017-10-16 Tom Tromey <tom@tromey.com>
2578
2579 * buildsym.c (block_compar): Remove.
2580 (end_symtab_get_static_block): Use std::vector.
2581
2582 2017-10-16 Simon Marchi <simon.marchi@ericsson.com>
2583
2584 * memrange.h (struct mem_range): Define operator< and operator==.
2585 (mem_range_s): Remove.
2586 (DEF_VEC_O (mem_range_s)): Remove.
2587 (normalize_mem_ranges): Change parameter type to std::vector.
2588 * memrange.c (compare_mem_ranges): Remove.
2589 (normalize_mem_ranges): Change parameter type to std::vector,
2590 adjust to vector change.
2591 * exec.c (section_table_available_memory): Return vector, remove
2592 parameter.
2593 (section_table_read_available_memory): Adjust to std::vector
2594 change.
2595 * remote.c (remote_read_bytes): Adjust to std::vector
2596 change.
2597 * tracepoint.h (traceframe_available_memory): Change parameter
2598 type to std::vector.
2599 * tracepoint.c (traceframe_available_memory): Change parameter
2600 type to std::vector, adjust.
2601 * gdb/mi/mi-main.c (mi_cmd_trace_frame_collected): Adjust to
2602 std::vector change.
2603 * gdb/Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
2604 unittests/memrange-selftests.c.
2605 (SUBDIR_UNITTESTS_OBS): Add memrange-selftests.o.
2606 * gdb/unittests/memrange-selftests.c: New file.
2607
2608 2017-10-16 Pedro Alves <palves@redhat.com>
2609
2610 * elfread.c (probe_key_free): Rename range-for variable.
2611 * probe.c (parse_probes_in_pspace, find_probes_in_objfile)
2612 (find_probe_by_pc, collect_probes): Rename range-for variable.
2613
2614 2017-10-16 Yao Qi <yao.qi@linaro.org>
2615
2616 * features/Makefile (XMLTOC): Remove tic6x-*.xml.
2617 * features/tic6x-c62x.c: Remove.
2618 * features/tic6x-c64x-linux.c: Remove.
2619 * features/tic6x-c64x.c: Remove.
2620 * features/tic6x-c64xp-linux.c: Remove.
2621 * features/tic6x-c64xp.c: Remove.
2622 * tic6x-linux-tdep.c (_initialize_tic6x_linux_tdep): Don't call
2623 initialize_tdesc_tic6x_*_linux functions.
2624 * tic6x-tdep.c (_initialize_tic6x_tdep): Don't call
2625 initialize_tdesc_tic6x_* functions.
2626
2627 2017-10-16 Yao Qi <yao.qi@linaro.org>
2628
2629 * features/Makefile (WHICH): Remove tic6x-c64xp, tic6x-c64x
2630 tic6x-c62x.
2631 * regformats/tic6x-c62x.dat: Remove.
2632 * regformats/tic6x-c64x.dat: Remove.
2633 * regformats/tic6x-c64xp.dat: Remove.
2634
2635 2017-10-15 Simon Marchi <simon.marchi@ericsson.com>
2636
2637 * tracepoint.c (parse_traceframe_info): Return a unique_ptr
2638 (the !HAVE_LIBEXPAT version).
2639
2640 2017-10-14 Simon Marchi <simon.marchi@ericsson.com>
2641
2642 * nat/linux-osdata.c (struct pid_pgid_entry) <operator<>: Make
2643 const.
2644
2645 2017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
2646
2647 * target.h: Include tracepoint.h.
2648 (enum trace_find_type): Move to tracepoint.h.
2649 (struct target_ops) <to_traceframe_info>: Return a unique ptr.
2650 * tracepoint.h: Don't include target.h
2651 (enum trace_find_type): Move from target.h.
2652 (parse_traceframe_info): Return a unique ptr.
2653 * tracepoint.c (current_traceframe_info): Change type to unique
2654 ptr.
2655 (free_traceframe_info): Remove.
2656 (clear_traceframe_info): Don't manually free
2657 current_traceframe_info.
2658 (free_result): Remove.
2659 (parse_traceframe_info): Return a unique ptr.
2660 (get_traceframe_info): Adjust to unique ptr.
2661 * ctf.c (ctf_traceframe_info): Return a unique ptr.
2662 * remote.c (remote_traceframe_info): Return a unique ptr.
2663 * tracefile-tfile.c (tfile_traceframe_info): Return a unique
2664 ptr.
2665 * target-debug.h (target_debug_print_traceframe_info_up): New
2666 macro.
2667 * target-delegates.c: Regenerate.
2668
2669 2017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
2670
2671 * memrange.h (struct mem_range): Add constructors.
2672 * tracepoint.h (struct traceframe_info) <memory>: Change type to
2673 std::vector<mem_range>.
2674 * tracepoint.c (free_traceframe_info): Don't manually free
2675 vector.
2676 (traceframe_info_start_memory): Adjust to vector change.
2677 (traceframe_available_memory): Likewise.
2678 * tracefile-tfile.c (build_traceframe_info): Likewise.
2679 * ctf.c (ctf_traceframe_info): Likewise.
2680
2681 2017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
2682
2683 * tracepoint.h (struct traceframe_info) <tvars>: Change type to
2684 std::vector<int>.
2685 * tracepoint.c (free_traceframe_info): Deallocate with delete.
2686 (traceframe_info_start_tvar): Adjust to vector change.
2687 (parse_traceframe_info): Allocate with new.
2688 * ctf.c (ctf_traceframe_info): Allocate with new, adjust to
2689 vector change.
2690 * tracefile-tfile.c (build_traceframe_info): Adjust to vector
2691 change.
2692 tfile_traceframe_info): Allocate with new.
2693 * mi/mi-main.c (mi_cmd_trace_frame_collected): Adjust to vector
2694 change.
2695
2696 2017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
2697
2698 * tracepoint.c (traceframe_info): Rename to...
2699 (current_traceframe_info): ...this.
2700 (clear_traceframe_info): Adjust.
2701 (get_traceframe_info): Adjust.
2702
2703 2017-10-14 Simon Marchi <simon.marchi@ericsson.com>
2704
2705 * nat/linux-osdata.c: Include algorithm.
2706 (compare_processes): Remove.
2707 (struct pid_pgid_entry): New struct.
2708 (linux_xfer_osdata_processgroups): Use std::vector instead of
2709 XNEWVEC.
2710
2711 2017-10-14 Simon Marchi <simon.marchi@ericsson.com>
2712
2713 * objfiles.h: Don't include symfile.h.
2714 (struct partial_symbol): Remove forward-declaration.
2715 (struct objfile) <global_psymbols, static_psymbols>: Change type
2716 to std::vector<partial_symbol *>.
2717 * objfiles.c (objfile::objfile): Don't memset those fields.
2718 (objfile::~objfile): Don't free those fields.
2719 * psympriv.h (struct psymbol_allocation_list): Remove
2720 forward-declaration.
2721 (add_psymbol_to_list): Change psymbol_allocation_list parameter
2722 to std::vector.
2723 (start_psymtab_common): Change parameters to std::vector.
2724 * psymtab.c: Include algorithm.
2725 (require_partial_symbols): Call shrink_to_fit.
2726 (find_pc_sect_psymbol): Adjust to vector change.
2727 (match_partial_symbol): Likewise.
2728 (lookup_partial_symbol): Likewise.
2729 (psym_relocate): Likewise.
2730 (dump_psymtab): Likewise.
2731 (recursively_search_psymtabs): Likewise.
2732 (compare_psymbols): Remove.
2733 (sort_pst_symbols): Adjust to vector change.
2734 (start_psymtab_common): Likewise.
2735 (end_psymtab_common): Likewise.
2736 (psymbol_bcache_full): De-constify return value.
2737 (add_psymbol_to_bcache): Likewise.
2738 (extend_psymbol_list): Remove.
2739 (append_psymbol_to_list): Adjust to vector change.
2740 (add_psymbol_to_list): Likewise.
2741 (init_psymbol_list): Likewise.
2742 (maintenance_info_psymtabs): Likewise.
2743 (maintenance_check_psymtabs): Likewise.
2744 * symfile.h (struct psymbol_allocation_list): Remove.
2745 * symfile.c (reread_symbols): Adjust to vector change.
2746 * dbxread.c (start_psymtab): Change type of parameters.
2747 (dbx_symfile_read): Adjust to vector change.
2748 (read_dbx_symtab): Likewise.
2749 (start_psymtab): Change type of parameters.
2750 * dwarf2read.c (dwarf2_build_psymtabs): Adjust to vector change.
2751 (create_partial_symtab): Likewise.
2752 (add_partial_symbol): Likewise.
2753 (write_one_signatured_type): Likewise.
2754 (recursively_write_psymbols): Likewise.
2755 * mdebugread.c (parse_partial_symbols): Likewise.
2756 * xcoffread.c (xcoff_start_psymtab): Change type of parameters.
2757 (scan_xcoff_symtab): Adjust to vector change.
2758 (xcoff_initial_scan): Likewise.
2759
2760 2017-10-13 Simon Marchi <simon.marchi@ericsson.com>
2761
2762 * ada-typeprint.c (print_dynamic_range_bound): Use std::string.
2763
2764 2017-10-13 Yao Qi <yao.qi@linaro.org>
2765
2766 * features/Makefile: Remove tic6x-*-expedite, add tic6x-expedite.
2767 Remove s390x-*-expedite, add s390x-expedite.
2768
2769 2017-10-13 Yao Qi <yao.qi@linaro.org>
2770
2771 * features/s390-gs-linux64.c: Regenerated.
2772 * features/s390x-gs-linux64.c: Regenerated.
2773
2774 2017-10-13 Tom Tromey <tom@tromey.com>
2775
2776 * compile/compile-object-run.c (do_module_cleanup): Use delete.
2777 * solib.c (update_solib_list, reload_shared_libraries_1): Use
2778 delete.
2779 * symfile.c (symbol_file_add_with_addrs): Use new.
2780 (symbol_file_add_separate): Update comment.
2781 (syms_from_objfile_1, remove_symbol_file_command): Use delete.
2782 * jit.c (jit_object_close_impl): Use new.
2783 (jit_unregister_code): Use delete.
2784 * objfiles.c (objfile::objfile): Rename from allocate_objfile.
2785 (~objfile): Rename from free_objfile.
2786 (free_objfile_separate_debug, do_free_objfile_cleanup)
2787 (free_all_objfiles, objfile_purge_solibs): Use delete.
2788 * objfiles.h (struct objfile): Add constructor and destructor.
2789 Use DISABLE_COPY_AND_ASSIGN. Add initializers to data members.
2790 (allocate_objfile, free_objfile): Don't declare.
2791 (struct objstats): Add initializers.
2792
2793 2017-10-12 Simon Marchi <simon.marchi@ericsson.com>
2794
2795 * arch-utils.h (simple_displaced_step_copy_insn): Remove.
2796 * arch-utils.c (simple_displaced_step_copy_insn): Remove.
2797 * gdbarch.sh (displaced_step_copy_insn): Adjust comment.
2798 * gdbarch.h: Regenerate.
2799 * i386-linux-tdep.c (i386_linux_displaced_step_copy_insn):
2800 Adjust comment.
2801 * i386-tdep.c (i386_displaced_step_copy_insn): Adjust comment.
2802 (i386_displaced_step_fixup): Adjust comment.
2803 * rs6000-tdep.c (ppc_displaced_step_copy_insn): Adjust comment.
2804
2805 2017-10-12 Tom Tromey <tom@tromey.com>
2806
2807 * prologue-value.h (pv_area::store_would_trash): Return bool.
2808 (pv_area::find_reg): Likewise.
2809 * prologue-value.c (pv_area::store_would_trash): Return bool.
2810 (pv_area::find_reg): Likewise.
2811
2812 2017-10-12 Tom Tromey <tom@tromey.com>
2813
2814 * s390-linux-tdep.c (s390_store, s390_load)
2815 (s390_check_for_saved, s390_analyze_prologue): Update.
2816 * rx-tdep.c (check_for_saved, rx_analyze_prologue): Update.
2817 * rl78-tdep.c (rl78_analyze_prologue, check_for_saved): Update.
2818 * prologue-value.h (class pv_area): Move from prologue-value.c.
2819 Change names of members. Add constructor, destructor, member
2820 functions.
2821 (make_pv_area, free_pv_area, make_cleanup_free_pv_area)
2822 (pv_area_store, pv_area_fetch, pv_area_store_would_trash)
2823 (pv_area_fetch, pv_area_scan): Don't declare.
2824 * prologue-value.c (struct pv_area::area_entry): Now member of
2825 pv_area.
2826 (struct pv_area): Move to prologue-value.h.
2827 (pv_area::pv_area): Rename from make_pv_area.
2828 (pv_area::~pv_area): Rename from free_pv_area.
2829 (do_free_pv_area_cleanup, make_cleanup_free_pv_area): Remove.
2830 (clear_entries, find_entry, overlaps, store_would_trash, store)
2831 (fetch, find_reg, scan): Now member of pv_area.
2832 Remove "area" argument. Update.
2833 * msp430-tdep.c (check_for_saved, msp430_analyze_prologue):
2834 Update.
2835 * mn10300-tdep.c (push_reg, check_for_saved)
2836 (mn10300_analyze_prologue): Update.
2837 * mep-tdep.c (is_arg_spill, check_for_saved)
2838 (mep_analyze_prologue): Update.
2839 * m32c-tdep.c (m32c_pv_push, m32c_srcdest_fetch)
2840 (m32c_srcdest_store, m32c_pv_enter, m32c_is_arg_spill)
2841 (m32c_is_struct_return, m32c_analyze_prologue): Update.
2842 * arm-tdep.c (thumb_analyze_prologue, arm_analyze_prologue):
2843 Update.
2844 * arc-tdep.c (arc_is_in_prologue, arc_analyze_prologue): Update.
2845 * aarch64-tdep.c (aarch64_analyze_prologue): Update.
2846
2847 2017-10-12 Simon Marchi <simon.marchi@ericsson.com>
2848
2849 * linux-nat.h (linux_nat_set_delete_thread): New declaration.
2850 * linux-nat.c (linux_nat_delete_thread): New variable.
2851 (lwp_free): Invoke linux_nat_delete_thread if set.
2852 (linux_nat_set_delete_thread): New function.
2853 * aarch64-linux-nat.c (_initialize_aarch64_linux_nat): Assign
2854 thread delete callback.
2855 * arm-linux-nat.c (arm_linux_delete_thread): New function.
2856 (_initialize_arm_linux_nat): Assign thread delete callback.
2857 * s390-linux-nat.c (s390_delete_thread): New function.
2858 (_initialize_s390_nat): Assign thread delete callback.
2859 * x86-linux-nat.c (x86_linux_add_target): Likewise.
2860 * nat/aarch64-linux.c (aarch64_linux_delete_thread): New
2861 function.
2862 * nat/aarch64-linux.h (aarch64_linux_delete_thread): New
2863 declaration.
2864 * nat/x86-linux.c (x86_linux_delete_thread): New function.
2865 * nat/x86-linux.h (x86_linux_delete_thread): New declaration.
2866
2867 2017-10-09 Tom Tromey <tom@tromey.com>
2868
2869 * tui/tui-win.c (tui_set_win_height, parse_scrolling_args): Use
2870 std::string.
2871 * tui/tui-layout.c (enum tui_status): Use std::string.
2872
2873 2017-10-11 Tom Tromey <tom@tromey.com>
2874
2875 * gdbthread.h (thread_command): Constify.
2876 * inferior.h (detach_command): Constify.
2877 * top.h (set_history, show_history): Constify.
2878 * arm-tdep.c (set_arm_command, show_arm_command): Constify.
2879 * serial.c (serial_set_cmd, serial_show_cmd): Constify.
2880 * bsd-kvm.c (bsd_kvm_cmd): Constify.
2881 * printcmd.c (set_command): Constify.
2882 (non_const_set_command): New function.
2883 * dcache.c (set_dcache_command, show_dcache_command): Constify.
2884 * breakpoint.c (enable_command, disable_command, delete_command)
2885 (catch_command, tcatch_command, set_breakpoint_cmd)
2886 (show_breakpoint_cmd): Constify.
2887 * macrocmd.c (macro_command): Constify.
2888 * infcmd.c (unset_command, kill_command, detach_command)
2889 (info_proc_cmd): Constify.
2890 * i386-tdep.c (set_mpx_cmd, show_mpx_cmd): Constify.
2891 * auto-load.c (show_auto_load_cmd, set_auto_load_cmd)
2892 (info_auto_load_cmd): Constify.
2893 * target-descriptions.c (set_tdesc_cmd, show_tdesc_cmd)
2894 (unset_tdesc_cmd): Constify.
2895 * ada-lang.c (set_ada_command, show_ada_command)
2896 (maint_set_ada_cmd, maint_show_ada_cmd): Constify.
2897 * guile/guile.c (set_guile_command, show_guile_command)
2898 (info_guile_command): Constify.
2899 * tui/tui-win.c (tui_command, set_tui_cmd, show_tui_cmd):
2900 Constify.
2901 * skip.c (skip_command): Constify.
2902 * compile/compile.c (_initialize_compile): Constify.
2903 * dwarf2read.c (set_dwarf_cmd, show_dwarf_cmd): Constify.
2904 * btrace.c (maint_btrace_cmd, maint_btrace_set_cmd)
2905 (maint_btrace_show_cmd, maint_btrace_pt_set_cmd)
2906 (maint_btrace_pt_show_cmd): Constify.
2907 * remote.c (set_remote_cmd, show_remote_cmd, remote_command):
2908 Constify.
2909 * python/python.c (user_show_python, user_set_python): Constify.
2910 * mips-tdep.c (set_mips_command, show_mips_command)
2911 (set_mipsfpu_command): Constify.
2912 * record-btrace.c (cmd_record_btrace_start)
2913 (cmd_set_record_btrace, cmd_show_record_btrace)
2914 (cmd_set_record_btrace_bts, cmd_show_record_btrace_bts)
2915 (cmd_set_record_btrace_pt, cmd_show_record_btrace_pt): Constify.
2916 * rs6000-tdep.c (set_powerpc_command, show_powerpc_command):
2917 Constify.
2918 * symfile.c (overlay_command): Constify.
2919 * spu-tdep.c (set_spu_command, show_spu_command): Constify.
2920 * cli/cli-logging.c (set_logging_command, show_logging_command):
2921 Constify.
2922 * cli/cli-dump.c (dump_command, append_command)
2923 (srec_dump_command, ihex_dump_command, verilog_dump_command)
2924 (tekhex_dump_command, binary_dump_command)
2925 (binary_append_command): Constify.
2926 * cli/cli-decode.c (struct cmd_list_element): Change type of
2927 "fun".
2928 * cli/cli-cmds.c (info_command, show_command, set_debug)
2929 (show_debug): Constify.
2930 (show_command): Add non-const overload.
2931 * top.c (set_history, show_history): Constify.
2932 * sh-tdep.c (set_sh_command, show_sh_command): Constify.
2933 * command.h (add_prefix_cmd): Accept a cmd_const_cfunc_ftype.
2934 * target.c (target_command): Constify.
2935 * sparc64-tdep.c (info_adi_command): Constify.
2936 * record-full.c (cmd_record_full_start): Constify.
2937 (set_record_full_command): Constify. Fix typo.
2938 (show_record_full_command): Constify.
2939 * thread.c (thread_command, thread_apply_command): Constify.
2940 * memattr.c (dummy_cmd): Constify.
2941 * value.c (function_command): Constify.
2942 * frame.c (set_backtrace_cmd, show_backtrace_cmd): Constify.
2943 * probe.c (info_probes_command): Constify.
2944 * ser-tcp.c (set_tcp_cmd, show_tcp_cmd): Constify.
2945 * gnu-nat.c (set_task_cmd, show_task_cmd, set_thread_cmd)
2946 (show_thread_cmd, set_thread_default_cmd)
2947 (show_thread_default_cmd): Constify.
2948 (check_empty): Constify.
2949 * tracepoint.c (tfind_command): Constify.
2950 * cp-support.c (maint_cplus_command): Constify.
2951 * windows-tdep.c (info_w32_command): Constify.
2952 * record.c (cmd_record_start, set_record_command)
2953 (show_record_command, info_record_command, cmd_record_goto):
2954 Constify.
2955 * ravenscar-thread.c (set_ravenscar_command)
2956 (show_ravenscar_command): Constify.
2957 * utils.c (set_internal_problem_cmd, show_internal_problem_cmd):
2958 Constify.
2959 (add_internal_problem_command): Remove casts.
2960 * arc-tdep.c (maintenance_print_arc_command): Constify.
2961 * valprint.c (set_print, show_print, set_print_raw)
2962 (show_print_raw): Constify.
2963 * maint.c (maintenance_command, maintenance_info_command)
2964 (maintenance_print_command, maintenance_set_cmd)
2965 (maintenance_show_cmd, set_per_command_cmd)
2966 (show_per_command_cmd, maintenance_check_command): Constify.
2967 * language.c (set_check, show_check): Constify.
2968 * typeprint.c (show_print_type, set_print_type): Constify.
2969 * go32-nat.c (go32_info_dos_command): Constify.
2970
2971 2017-10-11 Tom Tromey <tom@tromey.com>
2972
2973 * breakpoint.c (prepare_re_set_context): Remove.
2974 (breakpoint_re_set_one): Update. Don't use cleanups.
2975 (breakpoint_re_set): Use scoped_restore, std::string, and
2976 scoped_restore_current_language.
2977
2978 2017-10-11 Tom Tromey <tom@tromey.com>
2979
2980 * breakpoint.c (commands_command_1): Use std::string.
2981 (cleanup_executing_breakpoints): Remove.
2982 (bpstat_do_actions_1): Use scoped_restore.
2983 (bpstat_check_watchpoint): Use std::string.
2984 (decode_static_tracepoint_spec): Likewise.
2985 (break_range_command): Likewise.
2986 (watch_command_1): Likewise.
2987 (compare_breakpoints): Change argument types.
2988 (clear_command): Use std::vector.
2989 (cleanup_executing_breakpoints): Remove.
2990 (update_global_location_list): Use unique_xmalloc_ptr.
2991 (strace_command): Remove unused declaration.
2992
2993 2017-10-11 John Baldwin <jhb@FreeBSD.org>
2994
2995 * Makefile.in (ALLDEPFILES): Add arm-fbsd-nat.c.
2996 * NEWS: Mention new FreeBSD/arm native configuration.
2997 * configure.host: Add arm*-*-freebsd*.
2998 * configure.nat: Likewise.
2999 * arm-fbsd-nat.c: New file.
3000
3001 2017-10-11 John Baldwin <jhb@FreeBSD.org>
3002
3003 * Makefile.in (ALL_TARGET_OBS): Add arm-fbsd-tdep.o.
3004 (ALLDEPFILES): Add arm-fbsd-tdep.c.
3005 * NEWS: Mention new FreeBSD/arm target.
3006 * configure.tgt: Add arm*-*-freebsd*.
3007 * arm-fbsd-tdep.c: New file.
3008 * arm-fbsd-tdep.h: New file.
3009
3010 2017-10-11 Maciej W. Rozycki <macro@imgtec.com>
3011
3012 * linux-tdep.c (linux_make_corefile_notes): Remove call to
3013 `gdbarch_elfcore_write_linux_prpsinfo'.
3014 * gdbarch.sh (elfcore_write_linux_prpsinfo): Remove architecture
3015 method.
3016 (elf_internal_linux_prpsinfo): Remove declaration.
3017 * gdbarch.h: Regenerate.
3018 * gdbarch.c: Regenerate.
3019
3020 2017-10-11 Maciej W. Rozycki <macro@imgtec.com>
3021
3022 * ppc-linux-tdep.c (ppc_linux_init_abi): Remove call to
3023 `set_gdbarch_elfcore_write_linux_prpsinfo'.
3024
3025 2017-10-11 Pedro Alves <palves@redhat.com>
3026
3027 * breakpoint.c (reattach_breakpoints): Delete.
3028 * breakpoint.h (reattach_breakpoints): Delete.
3029
3030 2017-10-11 Simon Marchi <simon.marchi@ericsson.com>
3031
3032 * symfile.c (registered_sym_fns): Make struct, not typedef.
3033 (DEF_VEC_O (registered_sym_fns)): Remove.
3034 (symtab_fns): Change type to std::vector.
3035 (add_symtab_fns): Adjust.
3036 (find_sym_fns): Adjust.
3037
3038 2017-10-11 Anton Kolesov <Anton.Kolesov@synopsys.com>
3039
3040 * arc-tdep.c (arc_gdbarch_init): Pass proper cpu value to disassembler.
3041 * arc-tdep.h (arc_arch_is_em): New function.
3042 (arc_arch_is_hs): Likewise.
3043
3044 2017-10-11 Egeyar Bagcioglu <egeyar.bagcioglu@oracle.com>
3045
3046 * macrotab.h (macro_lookup_inclusion): Remove unnecessary
3047 parentheses in the declaration.
3048 (macro_lookup_inclusion): Likewise.
3049 (macro_lookup_definition): Likewise.
3050 * p-lang.h (pascal_builtin_types): Likewise.
3051 * tui/tui-data.c (tui_win_list): Likewise.
3052 * tui/tui-data.h (tui_win_list): Likewise.
3053 * utils.h (make_cleanup_free_section_addr_info): Likewise.
3054
3055 2017-10-11 Mark Rages <markrages@gmail.com>
3056
3057 * target-memory.c (block_boundaries): Fix for block address not
3058 aligned on block size.
3059
3060 2017-10-10 Pedro Alves <palves@redhat.com>
3061 Tom Tromey <tom@tromey.com>
3062
3063 * breakpoint.c (struct captured_breakpoint_query_args)
3064 (do_captured_breakpoint_query, gdb_breakpoint_query): Delete.
3065 (print_breakpoint): New.
3066 * breakpoint.h (print_breakpoint): Declare.
3067 * common/common-exceptions.h (enum return_reason): Remove
3068 references to catch_exceptions.
3069 * exceptions.c (catch_exceptions, catch_exceptions_with_msg):
3070 Delete.
3071 * exceptions.h (catch_exceptions_ftype, catch_exceptions)
3072 (catch_exception_ftype, catch_exceptions_with_msg): Delete.
3073 * gdb.h: Delete.
3074 * gdbthread.h (thread_select): Declare.
3075 * mi/mi-cmd-break.c: Don't include gdb.h.
3076 (breakpoint_notify): Use print_breakpoint.
3077 * mi/mi-cmd-catch.c: Don't include gdb.h.
3078 * mi/mi-interp.c: Don't include gdb.h.
3079 (mi_print_breakpoint_for_event): New.
3080 (mi_breakpoint_created, mi_breakpoint_modified): Use
3081 mi_print_breakpoint_for_event.
3082 * mi/mi-main.c: Don't include gdb.h.
3083 (mi_cmd_thread_select): Parse the global thread ID here. Use
3084 thread_select instead of gdb_thread_select.
3085 (mi_cmd_thread_list_ids): Output "thread-ids" tuple here instead
3086 of using gdb_list_thread_ids.
3087 * remote-fileio.c (do_remote_fileio_request): Change type. Reply
3088 FILEIO_ENOSYS here.
3089 (remote_fileio_request): Use TRY/CATCH instead of
3090 catch_exceptions.
3091 * symfile-mem.c (struct symbol_file_add_from_memory_args)
3092 (symbol_file_add_from_memory_wrapper): Delete.
3093 (add_vsyscall_page): Use TRY/CATCH instead of catch_exceptions.
3094 * thread.c: Don't include gdb.h.
3095 (do_captured_list_thread_ids, gdb_list_thread_ids): Delete.
3096 (thread_alive): Use thread_select.
3097 (do_captured_thread_select): Delete, parts salvaged as ...
3098 (thread_select): ... this new function.
3099 (gdb_thread_select): Delete.
3100
3101 2017-10-10 Pedro Alves <palves@redhat.com>
3102 Tom Tromey <tom@tromey.com>
3103
3104 * breakpoint.c (breakpoint_cond_eval): Change return type to bool
3105 and reverse logic.
3106 (WP_DELETED, WP_VALUE_CHANGED, WP_VALUE_NOT_CHANGED, WP_IGNORE):
3107 No longer macros. Instead ...
3108 (enum wp_check_result): They're now values of this new
3109 enumeration.
3110 (watchpoint_check): Change return type to wp_check_result and
3111 parameter type to bpstat.
3112 (bpstat_check_watchpoint): Use TRY/CATCH instead of catch_errors.
3113 (bpstat_check_breakpoint_conditions): Use TRY/CATCH instead of
3114 catch_errors. Reverse logic of watchpoint_check call.
3115 (breakpoint_re_set_one): Now returns void and takes a breakpoint
3116 pointer as parameter.
3117 (breakpoint_re_set): Use TRY/CATCH instead of catch_errors.
3118 * common/common-exceptions.c (throw_exception_sjlj): Update
3119 comments to avoid mentioning catch_errors.
3120 * exceptions.c (catch_errors): Delete.
3121 * exceptions.h: Update comments to avoid mentioning catch_errors.
3122 (catch_errors_ftype, catch_errors): Delete.
3123 * infrun.c (normal_stop): Use TRY/CATCH instead of catch_errors.
3124 (hook_stop_stub): Delete.
3125 (restore_selected_frame): Change return type to void, and
3126 parameter type to const frame_id &.
3127 (restore_infcall_control_state): Use TRY/CATCH instead of
3128 catch_errors.
3129 * main.c (captured_command_loop): Return void and remove
3130 parameter. Remove references to catch_errors.
3131 (captured_main): Use TRY/CATCH instead of catch_errors.
3132 * objc-lang.c (objc_submethod_helper_data)
3133 (find_objc_msgcall_submethod_helper): Delete.
3134 (find_objc_msgcall_submethod): Use TRY/CATCH instead of
3135 catch_errors.
3136 * record-full.c (record_full_message): Return void.
3137 (record_full_message_args, record_full_message_wrapper): Delete.
3138 (record_full_message_wrapper_safe): Return bool and use TRY/CATCH
3139 instead of catch_errors.
3140 * solib-aix.c (solib_aix_open_symbol_file_object): Change
3141 parameter type to int.
3142 * solib-darwin.c (open_symbol_file_object): Ditto.
3143 * solib-dsbt.c (open_symbol_file_object): Ditto.
3144 * solib-frv.c (open_symbol_file_object): Ditto.
3145 * solib-svr4.c (open_symbol_file_object): Ditto.
3146 * solib-target.c (solib_target_open_symbol_file_object): Ditto.
3147 * solib.c (update_solib_list): Use TRY/CATCH instead of
3148 catch_errors.
3149 * solist.h (struct target_so_ops) <open_symbol_file_object>:
3150 Change type.
3151 * symmisc.c (struct print_symbol_args): Remove.
3152 (dump_symtab_1): Use TRY/CATCH instead of catch_errors.
3153 (print_symbol): Change type.
3154 * windows-nat.c (handle_load_dll, handle_unload_dll): Return void
3155 and remove parameters.
3156 (catch_errors): New.
3157 (get_windows_debug_event): Adjust.
3158
3159 2017-10-09 Tom Tromey <tom@tromey.com>
3160
3161 * mi/mi-main.c (free_splay_tree): Remove.
3162 (list_available_thread_groups): Use splay_tree_up.
3163 * common/gdb_splay_tree.h: New file.
3164
3165 2017-10-09 Tom Tromey <tom@tromey.com>
3166
3167 * mi/mi-main.c (do_nothing): Remove.
3168 (list_available_thread_groups): Update.
3169
3170 2017-10-09 Pedro Alves <palves@redhat.com>
3171
3172 * infrun.c (handle_inferior_event_1) <TARGET_WAITKIND_EXECD>: Skip
3173 reading registers when switching context.
3174
3175 2017-10-09 John Baldwin <jhb@FreeBSD.org>
3176
3177 * fbsd-nat.c (fbsd_siginfo_size): Use gdbarch_long_bit.
3178 (fbsd_convert_siginfo): Likewise.
3179 * fbsd-tdep.c (fbsd_core_xfer_siginfo): Likewise.
3180
3181 2017-10-09 Simon Marchi <simon.marchi@polymtl.ca>
3182
3183 * configure.ac (try_guile_versions): Remove guile-2.2.
3184 * configure: Regenerate.
3185
3186 2017-10-09 Tom Tromey <tom@tromey.com>
3187
3188 * Makefile.in (COMPILE.post, POSTCOMPILE): Restore $(basename).
3189 (COMPILE.pre): Use $(CXX).
3190
3191 2017-10-09 Pedro Alves <palves@redhat.com>
3192
3193 * cp-support.c (cp_remove_params): Return a gdb::unique_xmalloc_ptr.
3194 Use bool.
3195 (overload_list_add_symbol): Adjust to use gdb::unique_xmalloc_ptr.
3196 * cp-support.h (cp_remove_params): Now returns a
3197 gdb::unique_xmalloc_ptr.
3198 * dwarf2read.c (find_slot_in_mapped_hash): Now returns bool.
3199 Adjust to cp_remove_params returning a gdb::unique_xmalloc_ptr.
3200 * psymtab.c (psymtab_search_name): Adjust to cp_remove_params
3201 returning a gdb::unique_xmalloc_ptr.
3202 (lookup_partial_symbol): Adjust to use gdb::unique_xmalloc_ptr.
3203 * stack.c (find_frame_funname): Adjust to cp_remove_params
3204 returning a gdb::unique_xmalloc_ptr.
3205
3206 2017-10-08 Tom Tromey <tom@tromey.com>
3207
3208 * dwarf2read.c (dwarf2_get_dwz_file): Use
3209 gdb::unique_xmalloc_ptr.
3210 (find_slot_in_mapped_hash): Likewise.
3211 (dwarf2_physname): Likewise.
3212 (create_dwo_unit_in_dwp_v1): Use std::string.
3213 (create_dwo_unit_in_dwp_v2): Likewise.
3214 (lookup_dwo_cutu): Likewise.
3215 (inherit_abstract_dies): Use std::vector.
3216 (read_array_type): Likewise.
3217 (dwarf_decode_macros): Remove unused declaration.
3218 (unsigned_int_compar): Remove.
3219 (dwarf2_build_psymtabs_hard): Use scoped_restore.
3220 (psymtabs_addrmap_cleanup): Remove.
3221
3222 2017-10-08 Tom Tromey <tom@tromey.com>
3223
3224 * frame-unwind.c (frame_unwind_try_unwinder): Update.
3225 * frame.h (frame_cleanup_after_sniffer): Declare.
3226 (frame_prepare_for_sniffer): Return void.
3227 * frame.c (frame_cleanup_after_sniffer): No longer static. Change
3228 type of argument.
3229 (frame_prepare_for_sniffer): Return void.
3230
3231 2017-10-08 Tom Tromey <tom@tromey.com>
3232
3233 * utils.h (make_cleanup_value_free): Remove.
3234 * utils.c (do_value_free, struct cleanup): Remove.
3235 * dwarf2loc.c (dwarf2_evaluate_loc_desc_full) <DWARF_VALUE_STACK>:
3236 Use gdb_value_up.
3237 * value.h (struct value_deleter): New.
3238 (gdb_value_up): New typedef.
3239
3240 2017-10-08 Tom Tromey <tom@tromey.com>
3241
3242 * symtab.c (free_search_symbols, do_free_search_symbols_cleanup)
3243 (make_cleanup_free_search_symbols): Remove.
3244 (search_symbols): Return std::vector.
3245 (symbol_search::compare_search_syms): Now member of
3246 symbol_search. Change arguments.
3247 (sort_search_symbols_remove_dups): Change arguments. Rewrite.
3248 (symtab_symbol_info, rbreak_command): Update.
3249 * symtab.h (struct symbol_search) <next>: Remove.
3250 Add constructors.
3251 (symbol_search::operator<): New function.
3252 (symbol_search::operator==): New function.
3253 (search_symbols): Remove std::vector.
3254 (free_search_symbols, make_cleanup_free_search_symbols): Remove.
3255 (symbol_search::compare_search_syms): Declare.
3256
3257 2017-10-06 Yao Qi <yao.qi@linaro.org>
3258
3259 * Makefile.in (ALL_64_TARGET_OBS): Replace aarch64-insn.o with
3260 arch/aarch64-insn.o.
3261 Remove one rule.
3262 * configure.tgt: Replace aarch64-insn.o with arch/aarch64-insn.o.
3263
3264 2017-10-06 Yao Qi <yao.qi@linaro.org>
3265
3266 * Makefile.in (ALL_TARGET_OBS): Replace arm.o, arm-get-next-pcs.o,
3267 and arm-linux.o with arch/arm.o, arch/arm-get-next-pcs.o and
3268 arch/arm-linux.o respectively.
3269 * configure.tgt: Likewise.
3270
3271 2017-10-06 Yao Qi <yao.qi@linaro.org>
3272
3273 * Makefile.in (ALL_TARGET_OBS): Rename i386.o to arch/i386.o.
3274 * configure.tgt (i386_tobjs): Replace i386.o with arch/i386.o.
3275
3276 2017-10-06 Pedro Alves <palves@redhat.com>
3277
3278 * windows-nat.c: Include <algorithm>.
3279
3280 2017-10-06 Yao Qi <yao.qi@linaro.org>
3281
3282 * configure.tgt (i386_tobjs): New variable.
3283 (amd64_tobjs): New variable.
3284 Set $cpu_obs and $os_obs.
3285
3286 2017-10-06 Yao Qi <yao.qi@linaro.org>
3287
3288 * Makefile.in (CONFIG_SRC_SUBDIR): New.
3289 (ALL_64_TARGET_OBS): Replace amd64.o with arch/amd64.o.
3290 (clean): Remove object files and dependency files.
3291 (distclean): Remove the directory.
3292 * configure.ac: Invoke AC_CONFIG_COMMANDS.
3293 * configure: Re-generated.
3294 * configure.tgt: Replace amd64.o with arch/amd64.o.
3295
3296 2017-10-05 Jose E. Marchesi <jose.marchesi@oracle.com>
3297
3298 PR build/22188
3299 * arm-tdep.c (arm_decode_misc_memhint_neon): Fix decoding of CPS
3300 and SETEND.
3301
3302 2017-10-05 Pedro Alves <palves@redhat.com>
3303
3304 * linux-nat.c (linux_child_follow_fork): When following the parent
3305 and detaching the child, consult the parent thread's architecture
3306 instead of the child's.
3307
3308 2017-10-05 Ulrich Weigand <uweigand@de.ibm.com>
3309
3310 * ax.h: Do not include "doublest.h".
3311 (union agent_val): Remove.
3312
3313 2017-10-05 Ulrich Weigand <uweigand@de.ibm.com>
3314
3315 * dfp.h (MAX_DECIMAL_STRING): Move to dfp.c.
3316 (decimal_to_string): Return std::string object.
3317 (decimal_from_string): Accept std::string object. Return bool.
3318 (decimal_from_integral, decimal_from_doublest): Remove.
3319 (decimal_from_longest): Add prototype.
3320 (decimal_from_ulongest): Likewise.
3321 (decimal_to_longest): Likewise.
3322 (decimal_from_doublest): Likewise.
3323 * dfp.c: Do not include "gdbtypes.h" or "value.h".
3324 (MAX_DECIMAL_STRING): Move here.
3325 (decimal_to_string): Return std::string object.
3326 (decimal_from_string): Accept std::string object. Return bool.
3327 (decimal_from_integral): Remove, replace by ...
3328 (decimal_from_longest, decimal_from_ulongest): ... these new functions.
3329 (decimal_to_longest): New function.
3330 (decimal_from_floating): Remove, replace by ...
3331 (decimal_from_doublest): ... this new function.
3332 (decimal_to_doublest): Update to new decimal_to_string interface.
3333
3334 * value.c (unpack_long): Use decimal_to_longest.
3335 * valops.c (value_cast): Use decimal_from_doublest instead of
3336 decimal_from_floating. Use decimal_from_[u]longest isntead of
3337 decimal_from_integral.
3338 * valarith.c (value_args_as_decimal): Likewise.
3339 * valprint.c (print_decimal_floating): Update to new
3340 decimal_to_string interface.
3341 * printcmd.c (printf_decfloat): Likewise.
3342 * c-exp.y (parse_number): Update to new decimal_from_string interface.
3343
3344 2017-10-05 Ulrich Weigand <uweigand@de.ibm.com>
3345
3346 * doublest.h: Do not include "floatformat.h". Remove stale comments.
3347 * gdbtypes.c: Include "floatformat.h".
3348 * value.c: Likewise.
3349 * m68k-tdep.c: Likewise.
3350
3351 * findvar.c: Do not include "floatformat.h".
3352 * amd64-darwin-tdep.c: Likewise.
3353 * arm-linux-tdep.c: Likewise.
3354 * i386-darwin-tdep.c: Likewise.
3355 * i387-tdep.c: Likewise.
3356 * m68k-linux-tdep.c: Likewise.
3357 * mep-tdep.c: Likewise.
3358 * mips-tdep.c: Likewise.
3359 * nios2-tdep.c: Likewise.
3360 * s390-linux-tdep.c: Likewise.
3361 * sparc-obsd-tdep.c: Likewise.
3362 * sparc-tdep.c: Likewise.
3363 * sparc64-tdep.c: Likewise.
3364 * spu-tdep.c: Likewise.
3365 * tic6x-tdep.c: Likewise.
3366 * tilegx-tdep.c: Likewise.
3367 * vax-tdep.c: Likewise.
3368 * xstormy16-tdep.c: Likewise.
3369 * xtensa-tdep.c: Likewise.
3370
3371 * top.c: Do not include "doublest.h".
3372 * aarch64-tdep.c: Likewise.
3373 * alpha-tdep.c: Likewise.
3374 * arm-linux-tdep.c: Likewise.
3375 * m68k-linux-tdep.c: Likewise.
3376 * tilegx-tdep.c: Likewise.
3377 * xstormy16-tdep.c: Likewise.
3378
3379 2017-10-05 John Baldwin <jhb@FreeBSD.org>
3380
3381 * mips-fbsd-tdep.c (MIPS_INST_ADDIU_A0_SP_N32): Define.
3382 (mipsn32_fbsd_sigframe): Define.
3383 (mips_fbsd_init_abi): Install mipsn32_fbsd_sigframe unwinder
3384 for FreeBSD/mipsn32.
3385
3386 2017-10-05 John Baldwin <jhb@FreeBSD.org>
3387
3388 * fbsd-tdep.c (fbsd_print_auxv_entry): Handle AT_EHDRFLAGS and
3389 AT_HWCAP.
3390
3391 2017-10-05 Tristan Gingold <tgingold@free.fr>
3392
3393 * MAINTAINERS (Misc): Update my email address.
3394
3395 2017-10-04 Pedro Alves <palves@redhat.com>
3396
3397 * remote.c (get_remote_arch_state): New 'gdbarch' parameter. Use
3398 it instead of target_gdbarch.
3399 (get_remote_state, get_remote_packet_size): Adjust
3400 get_remote_arch_state calls, passing down target_gdbarch
3401 explicitly.
3402 (packet_reg_from_regnum, packet_reg_from_pnum): New parameter
3403 'gdbarch' and use it instead of target_gdbarch.
3404 (get_memory_packet_size): Adjust get_remote_arch_state calls,
3405 passing down target_gdbarch explicitly.
3406 (struct stop_reply) <arch>: New field.
3407 (remote_parse_stop_reply): Use the stopped thread's architecture,
3408 not the current inferior's. Save the architecture in the
3409 stop_reply.
3410 (process_stop_reply): Use the stop reply's architecture.
3411 (process_g_packet, remote_fetch_registers)
3412 (remote_prepare_to_store, store_registers_using_G)
3413 (remote_store_registers): Adjust get_remote_arch_state calls,
3414 using the regcache's architecture.
3415 (remote_get_trace_status): Adjust get_remote_arch_state calls,
3416 passing down target_gdbarch explicitly.
3417 * spu-multiarch.c (spu_thread_architecture): Defer to the target
3418 beneath instead of calling target_gdbarch.
3419 * target.c (default_thread_architecture): Use the specified
3420 inferior's architecture, instead of the current inferior's
3421 architecture (via target_gdbarch).
3422
3423 2017-10-04 Pedro Alves <palves@redhat.com>
3424
3425 * regcache.c (get_thread_arch_regcache): Remove null_ptid special
3426 case.
3427 (regcache_print): Handle !target_has_registers here instead.
3428
3429 2017-10-04 Pedro Alves <palves@redhat.com>
3430
3431 * frame.c (create_test_frame): Delete.
3432 * frame.h (create_test_frame): Delete.
3433 * gdbarch-selftests.c: Include gdbthread.h and target.h.
3434 (class regcache_test): Delete.
3435 (test_target_has_registers, test_target_has_stack)
3436 (test_target_has_memory, test_target_prepare_to_store)
3437 (test_target_store_registers): New functions.
3438 (test_target_ops): New class.
3439 (register_to_value_test): Error out if there's already a
3440 process_stratum (or higher) target pushed. Create a fuller mock
3441 environment, with mock target_ops, inferior, address space, thread
3442 and inferior_ptid.
3443 * progspace.c (struct address_space): Move to ...
3444 * progspace.h (struct address_space): ... here.
3445 * regcache.h (regcache::~regcache, regcache::raw_write)
3446 [GDB_SELF_TEST]: No longer virtual.
3447
3448 2017-10-04 Simon Marchi <simon.marchi@ericsson.com>
3449
3450 * mi/mi-main.c (list_available_thread_groups): Reverse filter logic.
3451
3452 2017-10-04 Pedro Alves <palves@redhat.com>
3453
3454 * guile/scm-breakpoint.c (gdbscm_breakpoint_commands): Move code
3455 out of 'between TRY and CATCH'.
3456
3457 2017-10-04 Pedro Alves <palves@redhat.com>
3458
3459 * cli/cli-cmds.c (complete_command): Add missing END_CATCH.
3460 * common/common-exceptions.h (TRY): Open an outermost scope.
3461 Expand intro comment.
3462 (CATCH): Reindent.
3463 (END_CATCH): Close the outermost scope.
3464 * completer.c (complete_line_internal): Add missing END_CATCH.
3465
3466 2017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
3467
3468 * NEWS (Changes since GDB 8.0): Add entry about new
3469 'set-cwd-on-gdbserver' feature.
3470 (New remote packets): Add entry for QSetWorkingDir.
3471 * common/common-inferior.h (set_inferior_cwd): New prototype.
3472 * infcmd.c (set_inferior_cwd): Remove "static".
3473 (show_cwd_command): Expand text to include remote debugging.
3474 * remote.c: Add PACKET_QSetWorkingDir.
3475 (remote_protocol_features) <QSetWorkingDir>: New entry for
3476 PACKET_QSetWorkingDir.
3477 (extended_remote_set_inferior_cwd): New function.
3478 (extended_remote_create_inferior): Call
3479 "extended_remote_set_inferior_cwd".
3480 (_initialize_remote): Call "add_packet_config_cmd" for
3481 QSetWorkingDir.
3482
3483 2017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
3484
3485 * NEWS (New commands): Mention "set/show cwd".
3486 * cli/cli-cmds.c (_initialize_cli_cmds): Mention "set cwd" on
3487 "cd" command's help text.
3488 * common/common-inferior.h (get_inferior_cwd): New prototype.
3489 * infcmd.c (inferior_cwd_scratch): New global variable.
3490 (set_inferior_cwd): New function.
3491 (get_inferior_cwd): Likewise.
3492 (set_cwd_command): Likewise.
3493 (show_cwd_command): Likewise.
3494 (_initialize_infcmd): Add "set/show cwd" commands.
3495 * inferior.h (class inferior) <cwd>: New field.
3496 * nat/fork-inferior.c: Include "gdb_tilde_expand.h".
3497 (fork_inferior): Change inferior's cwd before its execution.
3498 * windows-nat.c (windows_create_inferior): Pass inferior's cwd
3499 to CreateProcess.
3500
3501 2017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
3502
3503 * Makefile.in (SFILES): Add gdb_tilde_expand.c.
3504 (HFILES_NO_SRCDIR): Add gdb_tilde_expand.h.
3505 (COMMON_OBS): Add gdb_tilde_expand.o.
3506 * common/gdb_tilde_expand.c: New file.
3507 * common/gdb_tilde_expand.h: Likewise.
3508
3509 2017-10-03 Maciej W. Rozycki <macro@imgtec.com>
3510
3511 * gdbarch.sh (objfile): Remove duplicate declaration.
3512 * gdbarch.h: Regenerate.
3513
3514 2017-10-03 Tom Tromey <tom@tromey.com>
3515
3516 * utils.c (internal_vproblem): Use string_vprintf.
3517
3518 2017-10-03 Tom Tromey <tom@tromey.com>
3519
3520 * printcmd.c (info_symbol_command): Use std::string.
3521
3522 2017-10-03 Tom Tromey <tom@tromey.com>
3523
3524 * top.c (gdb_safe_append_history): Use std::string.
3525
3526 2017-10-03 Tom Tromey <tom@tromey.com>
3527
3528 * event-top.c (stdin_event_handler): Update.
3529 * main.c (captured_main_1): Update.
3530 * top.h (make_delete_ui_cleanup): Remove.
3531 (struct ui): Add constructor and destructor.
3532 (new_ui, delete_ui): Remove.
3533 * top.c (make_delete_ui_cleanup): Remove.
3534 (new_ui_command): Use std::unique_ptr.
3535 (delete_ui_cleanup): Remove.
3536 (ui::ui): Rename from new_ui. Update.
3537 (free_ui): Remove.
3538 (ui::~ui): Rename from delete_ui. Update.
3539
3540 2017-10-03 Tom Tromey <tom@tromey.com>
3541
3542 * symfile.c (load_progress): Use gdb::byte_vector.
3543
3544 2017-10-03 Tom Tromey <tom@tromey.com>
3545
3546 * mi/mi-main.c (mi_cmd_trace_frame_collected): Remove unused
3547 declaration.
3548 * printcmd.c (x_command): Remove unused declaration.
3549 * symfile.c (symbol_file_command): Remove unused declaration.
3550
3551 2017-10-03 Tom Tromey <tom@tromey.com>
3552
3553 * utils.c (internal_vproblem): Use std::string.
3554 (defaulted_query): Likewise.
3555
3556 2017-10-03 Tom Tromey <tom@tromey.com>
3557
3558 * guile/scm-ports.c (ioscm_with_output_to_port_worker): Update.
3559 * top.c (execute_command_to_string): Update.
3560 * utils.c (make_cleanup_restore_page_info): Remove.
3561 (do_restore_page_info_cleanup): Remove.
3562 (set_batch_flag_and_restore_page_info):
3563 New.
3564 (make_cleanup_restore_page_info): Remove.
3565 (set_batch_flag_and_make_cleanup_restore_page_info): Remove.
3566 (~set_batch_flag_and_restore_page_info): New
3567 (make_cleanup_restore_uinteger): Remove.
3568 (make_cleanup_restore_integer): Remove.
3569 (struct restore_integer_closure): Remove.
3570 (restore_integer): Remove.
3571 * utils.h (struct set_batch_flag_and_restore_page_info): New
3572 class.
3573 (set_batch_flag_and_make_cleanup_restore_page_info): Remove.
3574 (make_cleanup_restore_page_info): Remove.
3575 (make_cleanup_restore_uinteger) Remove.
3576 (make_cleanup_restore_integer) Remove.
3577
3578 2017-10-03 Tom Tromey <tom@tromey.com>
3579
3580 * record-full.h (record_full_gdb_operation_disable_set): Return
3581 scoped_restore_tmpl<int>.
3582 * infrun.c (adjust_pc_after_break): Update.
3583 (handle_signal_stop): Update.
3584 * record-full.c (record_full_gdb_operation_disable_set): Return
3585 scoped_restore_tmpl<int>.
3586 (record_full_wait_1, record_full_insert_breakpoint)
3587 (record_full_remove_breakpoint, record_full_save)
3588 (record_full_goto_insn): Update.
3589
3590 2017-10-02 Tom Tromey <tom@tromey.com>
3591
3592 PR rust/22236:
3593 * rust-lang.c (rust_val_print_str): New function.
3594 (val_print_struct): Call it.
3595 (rust_subscript): Preserve name of slice type.
3596
3597 2017-10-02 Tom Tromey <tom@tromey.com>
3598
3599 * rust-lang.c (rust_subscript): Handle slices in
3600 EVAL_AVOID_SIDE_EFFECTS case.
3601
3602 2017-10-02 Tom Tromey <tom@tromey.com>
3603
3604 * rust-lang.c (rust_slice_type_p): Recognize &str as a slice type.
3605
3606 2017-10-02 Tom Tromey <tom@tromey.com>
3607
3608 * rust-lang.h (rust_slice_type): Add "extern".
3609
3610 2017-10-02 Tom Tromey <tom@tromey.com>
3611 Pedro Alves <palves@redhat.com>
3612
3613 * ada-lang.h (ada_exc_info::operator<): Make const.
3614 (ada_exc_info::operator==): Make const.
3615 * ada-lang.c (ada_exc_info::operator<, ada_exc_info::operator==):
3616 Make const.
3617
3618 2017-09-29 Tom Tromey <tom@tromey.com>
3619
3620 * target.c (read_whatever_is_readable): Change type of "result".
3621 Update.
3622 (free_memory_read_result_vector): Remove.
3623 (read_memory_robust): Change return type. Update.
3624 * mi/mi-main.c (mi_cmd_data_read_memory_bytes): Update. Use
3625 bin2hex, std::string.
3626 * target.h (memory_read_result_s): Remove typedef.
3627 (free_memory_read_result_vector): Remove.
3628 (read_memory_robust): Return std::vector.
3629
3630 2017-09-29 Tom Tromey <tom@tromey.com>
3631
3632 * mi/mi-main.c (captured_mi_execute_command): Use scope_restore.
3633
3634 2017-09-29 Tom Tromey <tom@tromey.com>
3635
3636 * mi/mi-cmd-info.c (mi_cmd_info_ada_exceptions): Update.
3637 * ada-lang.h (struct ada_exc_info): Remove typedef. Declare
3638 operator< and operator==.
3639 (ada_exceptions_list): Return a std::vector.
3640 * ada-lang.c (ada_exc_info::operator<): Rename from
3641 compare_ada_exception_info.
3642 (ada_exc_info::operator==): New.
3643 (sort_remove_dups_ada_exceptions_list): Change type of
3644 "exceptions".
3645 (ada_add_standard_exceptions, ada_add_exceptions_from_frame)
3646 (ada_add_global_exceptions): Likewise.
3647 (ada_exceptions_list_1): Return a std::vector.
3648 (ada_exceptions_list): Likewise.
3649
3650 2017-09-29 Tom Tromey <tom@tromey.com>
3651
3652 * mi/mi-main.c (struct print_one_inferior_data) <inferiors>: Now a
3653 'std::set *'.
3654 (print_one_inferior): Update.
3655 (free_vector_of_ints): Remove.
3656 (list_available_thread_groups): Change "ids" to std::set.
3657 (mi_cmd_list_thread_groups): Update.
3658 (struct collect_cores_data) <core>: Now a std::set.
3659 (collect_cores): Update.
3660 (unique): Remove.
3661 (print_one_inferior): Update.
3662
3663 2017-09-29 Tom Tromey <tom@tromey.com>
3664
3665 * mi/mi-main.c (mi_execute_cli_command): Use std::string.
3666 (mi_execute_async_cli_command): Likewise.
3667 (mi_cmd_trace_frame_collected): Use field_fmt.
3668
3669 2017-09-29 Tom Tromey <tom@tromey.com>
3670
3671 * mi/mi-main.c (mi_cmd_data_write_memory_bytes): Use
3672 gdb::byte_vector.
3673
3674 2017-09-29 Tom Tromey <tom@tromey.com>
3675
3676 * mi/mi-parse.c (mi_parse): Remove unused declaration.
3677
3678 2017-09-29 Tom Tromey <tom@tromey.com>
3679
3680 * mi/mi-cmd-disas.c (mi_cmd_disassemble): Don't copy "oarg".
3681
3682 2017-09-29 Tom Tromey <tom@tromey.com>
3683
3684 * varobj.h (varobj_gen_name): Return std::string.
3685 * varobj.c (varobj_gen_name): Return std::string.
3686 * mi/mi-cmd-var.c (mi_cmd_var_create): Use std::string.
3687 (mi_cmd_var_delete): Don't copy "name".
3688
3689 2017-09-29 Tom Tromey <tom@tromey.com>
3690
3691 * mi/mi-cmd-break.c (mi_argv_to_format): Return std::string.
3692 (mi_cmd_break_insert_1): Update.
3693
3694 2017-09-29 Tom Tromey <tom@tromey.com>
3695
3696 * target.h (make_scoped_defer_target_commit_resume): Update.
3697 * target.c (make_scoped_defer_target_commit_resume): Rename from
3698 make_cleanup_defer_target_commit_resume. Return a
3699 scoped_restore.
3700 * infrun.c (proceed): Use make_scoped_defer_target_commit_resume.
3701
3702 2017-09-29 Tom Tromey <tom@tromey.com>
3703
3704 * main.c (captured_main_1): Remove unused declaration.
3705 * spu-multiarch.c (parse_spufs_run): Remove unused declaration.
3706
3707 2017-09-29 Tom Tromey <tom@tromey.com>
3708
3709 * symtab.c (search_symbols): Remove unused outer cleanup.
3710 (make_source_files_completion_list): Remove unused declaration.
3711
3712 2017-09-29 Tom Tromey <tom@tromey.com>
3713
3714 * mt-tdep.c (mt_push_dummy_call): Use gdb::byte_vector.
3715
3716 2017-09-29 Tom Tromey <tom@tromey.com>
3717
3718 * xstormy16-tdep.c (xstormy16_push_dummy_call): Use
3719 gdb::byte_vector.
3720
3721 2017-09-29 Tom Tromey <tom@tromey.com>
3722
3723 * complaints.c (vcomplaint): Use std::string.
3724
3725 2017-09-29 Tom Tromey <tom@tromey.com>
3726
3727 * tracepoint.c (trace_variable_command): Use std::string.
3728 (encode_actions_1): Remove unused declarations.
3729 (create_tsv_from_upload): Use std::string.
3730
3731 2017-09-29 Tom Tromey <tom@tromey.com>
3732
3733 * cp-support.c (gdb_demangle): Use std::string.
3734
3735 2017-09-29 Tom Tromey <tom@tromey.com>
3736
3737 * stack.c (parse_frame_specification): Use std::string
3738 (info_frame_command): Use gdb::unique_xmalloc_ptr.
3739
3740 2017-09-29 Tom Tromey <tom@tromey.com>
3741
3742 * tilegx-tdep.c (tilegx_push_dummy_call): Use gdb::byte_vector.
3743
3744 2017-09-29 Tom Tromey <tom@tromey.com>
3745
3746 * utils.c (vfprintf_maybe_filtered): Use std::string.
3747 (vfprintf_unfiltered): Likewise.
3748
3749 2017-09-29 Tom Tromey <tom@tromey.com>
3750
3751 * event-top.c (top_level_prompt): Return std::string.
3752 (display_gdb_prompt): Update.
3753
3754 2017-09-29 Tom Tromey <tom@tromey.com>
3755
3756 * unittests/common-utils-selftests.c (format): New function.
3757 (string_vprintf_tests): New function.
3758 (_initialize_common_utils_selftests): Register new tests.
3759 * common/common-utils.c (string_vprintf): New function.
3760 * common/common-utils.h (string_vprintf): Declare.
3761
3762 2017-09-29 Pedro Alves <palves@redhat.com>
3763
3764 * common/rsp-low.c (unpack_varlen_hex): Constify.
3765 * common/rsp-low.h (unpack_varlen_hex): Constify.
3766 * linux-nat.c (linux_child_static_tracepoint_markers_by_strid):
3767 Constify.
3768 * remote.c (remote_set_permissions, read_ptid)
3769 (remote_current_thread, remote_get_threads_with_qthreadinfo)
3770 (remote_static_tracepoint_marker_at)
3771 (remote_static_tracepoint_markers_by_strid)
3772 (stop_reply_extract_thread, remote_parse_stop_reply): Constify.
3773 * tracepoint.c (parse_trace_status, parse_tracepoint_status)
3774 (parse_tracepoint_definition, parse_tsv_definition)
3775 (parse_static_tracepoint_marker_definition): Constify.
3776 * tracepoint.h (parse_static_tracepoint_marker_definition)
3777 (parse_trace_status, parse_tracepoint_status)
3778 (parse_tracepoint_definition, parse_tsv_definition): Constify.
3779
3780 2017-09-29 Pedro Alves <palves@redhat.com>
3781
3782 * remote.c (target_buf, target_buf_size): Delete.
3783 (remote_get_noisy_reply): Remove buf_p and sizeof_buf parameters.
3784 Use the connection's packet buffer instead.
3785 All callers adjusted.
3786 (_initialize_remote): Remove references to target_buf and
3787 target_buf_size.
3788
3789 2017-09-28 Pedro Alves <palves@redhat.com>
3790
3791 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
3792 unittests/common-utils-selftests.c.
3793 (SUBDIR_UNITTESTS_OBS): Add common-utils-selftests.o.
3794 (COMMON_OBS): Remove utils-selftests.o.
3795 * utils-selftests.c: Move to ...
3796 * unittests/common-utils-selftests.c: ... here and rename self
3797 test to "string_printf".
3798
3799 2017-09-28 Alexander Shaposhnikov <alexander.v.shaposhnikov@gmail.com> (tiny patch)
3800
3801 * dwarf2read.c (open_and_init_dwp_file): Protect against dwp_file
3802 having NULL cus or tus.
3803
3804 2017-09-27 Ulrich Weigand <uweigand@de.ibm.com>
3805
3806 * arm-tdep.c: (convert_from_extended): Remove.
3807 (convert_to_extended): Likewise.
3808 (arm_extract_return_value): Use convert_typed_floating.
3809 (arm_store_return_value): Likewise.
3810
3811 * sh-tdep.h (struct gdbarch_tdep): Add sh_littlebyte_bigword_type.
3812 * sh-tdep.c: Do not include "floatformat.h".
3813 (sh_littlebyte_bigword_type): New function.
3814 (sh_register_convert_to_virtual): Use convert_typed_floating.
3815 (sh_register_convert_to_raw): Likewise.
3816 * sh64-tdep.c: (struct gdbarch_tdep): Add sh_littlebyte_bigword_type.
3817 (sh64_littlebyte_bigword_type): New function.
3818 (sh64_extract_return_value): Use convert_typed_floating.
3819 (sh64_register_convert_to_virtual): Likewise.
3820 (sh64_register_convert_to_raw): Likewise.
3821
3822 2017-09-27 Ulrich Weigand <uweigand@de.ibm.com>
3823
3824 * doublest.h (floatformat_from_type): Move to gdbtypes.h.
3825 * doublest.c (floatformat_from_type): Move to gdbtypes.c.
3826
3827 * gdbtypes.h (union type_specific): Make field floatformat hold
3828 just a single struct floatformat, not an array.
3829 (floatformat_from_type): Move here.
3830 * gdbtypes.c (floatformat_from_type): Move here. Update to
3831 changed TYPE_FLOATFORMAT definition.
3832 (verify_floatformat): Update to changed TYPE_FLOATFORMAT.
3833 (recursive_dump_type): Likewise.
3834 (init_float_type): Install correct floatformat for byte order.
3835 (arch_float_type): Likewise.
3836
3837 2017-09-27 Ulrich Weigand <uweigand@de.ibm.com>
3838
3839 * gdbtypes.c (init_type): Change incoming argument from
3840 length-in-bytes to length-in-bits. Assert length is a
3841 multiple of TARGET_CHAR_BITS.
3842 (arch_type, arch_flags_type): Likewise.
3843 (init_integer_type): Update call to init_type.
3844 (init_character_type): Likewise.
3845 (init_boolean_type): Likewise.
3846 (init_float_type): Likewise.
3847 (init_decfloat_type): Likewise.
3848 (init_complex_type): Likewise.
3849 (init_pointer_type): Likewise.
3850 (objfile_type): Likewise.
3851 (arch_integer_type): Update call to arch_type.
3852 (arch_character_type): Likewise.
3853 (arch_boolean_type): Likewise.
3854 (arch_float_type): Likewise.
3855 (arch_decfloat_type): Likewise.
3856 (arch_complex_type): Likewise.
3857 (arch_pointer_type): Likewise.
3858 (gdbtypes_post_init): Likewise.
3859
3860 * dwarf2read.c (dwarf2_init_float_type): Update call to init_type.
3861 (read_base_type): Likewise.
3862 * mdebugread.c (basic_type): Likewise.
3863 * stabsread.c (dbx_init_float_type): Likewise.
3864 (rs6000_builtin_type): Likewise.
3865 (read_range_type): Likewise. Also, fix call to init_integer_type
3866 with erroneous length argument.
3867
3868 * ada-lang.c (ada_language_arch_info): Update call to arch_type.
3869 * d-lang.c (build_d_types): Likewise.
3870 * f-lang.c (build_fortran_types): Likewise.
3871 * go-lang.c (build_go_types): Likewise.
3872 * opencl-lang.c (build_opencl_types): Likewise.
3873 * jit.c (finalize_symtab): Likewise.
3874 * gnu-v3-abi.c (build_gdb_vtable_type): Likewise.
3875 (build_std_type_info_type): Likewise.
3876 * target-descriptions.c (tdesc_gdb_type): Likewise. Also,
3877 update call to arch_flags_type.
3878
3879 * linux-tdep.c (linux_get_siginfo_type_with_fields): Update call to
3880 arch_type.
3881 * fbsd-tdep.c (fbsd_get_siginfo_type): Likewise.
3882 * windows-tdep.c (windows_get_tlb_type): Likewise.
3883
3884 * avr-tdep.c (avr_gdbarch_init): Update call to arch_type.
3885 * ft32-tdep.c (ft32_gdbarch_init): Likewise.
3886 * m32c-tdep.c (make_types): Likewise.
3887 * rl78-tdep.c (rl78_gdbarch_init): Likewise.
3888 (rl78_psw_type): Update call to arch_flags_type.
3889 * m68k-tdep.c (m68k_ps_type): Update call to arch_flags_type.
3890 * rx-tdep.c (rx_psw_type): Likewise.
3891 (rx_fpsw_type): Likewise.
3892 * sparc-tdep.c (sparc_psr_type): Likewise.
3893 (sparc_fsr_type): Likewise.
3894 * sparc64-tdep.c (sparc64_pstate_type): Likewise.
3895 (sparc64_ccr_type): Likewise.
3896 (sparc64_fsr_type): Likewise.
3897 (sparc64_fprs_type): Likewise.
3898
3899 2017-09-27 Tom Tromey <tom@tromey.com>
3900
3901 * findcmd.c (find_command): Constify.
3902
3903 2017-09-27 Tom Tromey <tom@tromey.com>
3904
3905 * ada-tasks.c (task_command_1, task_command): Constify.
3906
3907 2017-09-27 Tom Tromey <tom@tromey.com>
3908
3909 * symtab.c (maintenance_print_symbol_cache)
3910 (maintenance_flush_symbol_cache)
3911 (maintenance_print_symbol_cache_statistics): Constify.
3912
3913 2017-09-27 Tom Tromey <tom@tromey.com>
3914
3915 * inferior.c (detach_inferior_command, kill_inferior_command)
3916 (inferior_command): Constify.
3917
3918 2017-09-27 Tom Tromey <tom@tromey.com>
3919
3920 * regcache.c (regcache_print, maintenance_print_registers)
3921 (maintenance_print_raw_registers)
3922 (maintenance_print_cooked_registers)
3923 (maintenance_print_register_groups)
3924 (maintenance_print_remote_registers): Constify.
3925
3926 2017-09-27 Tom Tromey <tom@tromey.com>
3927
3928 * printcmd.c (map_display_numbers, undisplay_command)
3929 (enable_disable_display_command, enable_display_command)
3930 (disable_display_command): Constify.
3931
3932 2017-09-27 Tom Tromey <tom@tromey.com>
3933
3934 * breakpoint.h (delete_command): Don't declare.
3935 * breakpoint.c (delete_command, enable_once_command)
3936 (enable_count_command, enable_delete_command, breakpoint_1)
3937 (maintenance_info_breakpoints, stopin_command, stopat_command)
3938 (delete_command, delete_trace_command, save_breakpoints)
3939 (save_breakpoints_command, save_tracepoints_command): Constify.
3940
3941 2017-09-27 Tom Tromey <tom@tromey.com>
3942
3943 * macrocmd.c (macro_expand_command, macro_expand_once_command)
3944 (skip_ws, extract_identifier, macro_define_command)
3945 (macro_undef_command, macro_list_command): Constify.
3946
3947 2017-09-27 Tom Tromey <tom@tromey.com>
3948
3949 * infcmd.c (environment_info, set_environment_command)
3950 (unset_environment_command, path_info, info_proc_cmd_1)
3951 (info_proc_cmd_mappings, info_proc_cmd_stat)
3952 (info_proc_cmd_status, info_proc_cmd_cwd, info_proc_cmd_cmdline)
3953 (info_proc_cmd_exe, info_proc_cmd_all): Constify.
3954
3955 2017-09-27 Tom Tromey <tom@tromey.com>
3956
3957 * i386-tdep.c (i386_mpx_info_bounds, i386_mpx_set_bounds):
3958 Constify.
3959
3960 2017-09-27 Tom Tromey <tom@tromey.com>
3961
3962 * symfile-mem.c (add_symbol_file_from_memory_command): Constify.
3963
3964 2017-09-27 Tom Tromey <tom@tromey.com>
3965
3966 * demangle.c (demangle_command): Constify.
3967
3968 2017-09-27 Tom Tromey <tom@tromey.com>
3969
3970 * progspace.c (maintenance_info_program_spaces_command):
3971 Constify.
3972
3973 2017-09-27 Tom Tromey <tom@tromey.com>
3974
3975 * compile/compile.c (check_raw_argument, compile_file_command)
3976 (compile_code_command, compile_print_command): Constify.
3977
3978 2017-09-27 Tom Tromey <tom@tromey.com>
3979
3980 * reggroups.c (maintenance_print_reggroups): Constify.
3981
3982 2017-09-27 Tom Tromey <tom@tromey.com>
3983
3984 * dwarf2read.c (save_gdb_index_command): Constify.
3985
3986 2017-09-27 Tom Tromey <tom@tromey.com>
3987
3988 * stap-probe.c (info_probes_stap_command): Constify.
3989
3990 2017-09-27 Tom Tromey <tom@tromey.com>
3991
3992 * fork-child.c (unset_exec_wrapper_command): Constify.
3993
3994 2017-09-27 Tom Tromey <tom@tromey.com>
3995
3996 * btrace.c (get_uint, get_context_size, no_chunk)
3997 (maint_btrace_packet_history_cmd)
3998 (maint_btrace_clear_packet_history_cmd, maint_btrace_clear_cmd)
3999 (maint_info_btrace_cmd): Constify.
4000
4001 2017-09-27 Tom Tromey <tom@tromey.com>
4002
4003 * reverse.c (delete_bookmark_command): Constify.
4004
4005 2017-09-27 Tom Tromey <tom@tromey.com>
4006
4007 * remote.c (set_memory_packet_size)
4008 (set_memory_write_packet_size, show_memory_write_packet_size)
4009 (set_memory_read_packet_size, show_memory_read_packet_size)
4010 (compare_sections_command, packet_command, remote_put_command)
4011 (remote_get_command, remote_delete_command): Constify.
4012
4013 2017-09-27 Tom Tromey <tom@tromey.com>
4014
4015 * mips-tdep.c (show_mipsfpu_command, set_mipsfpu_single_command)
4016 (set_mipsfpu_double_command, set_mipsfpu_none_command)
4017 (set_mipsfpu_auto_command): Constify.
4018
4019 2017-09-27 Tom Tromey <tom@tromey.com>
4020
4021 * cli/cli-cmds.h (cd_command): Constify.
4022 * cli/cli-cmds.c (cd_command): Constify.
4023
4024 2017-09-27 Tom Tromey <tom@tromey.com>
4025
4026 * thread.c (thread_name_command, thread_find_command): Constify.
4027
4028 2017-09-27 Tom Tromey <tom@tromey.com>
4029
4030 * probe.c (enable_probes_command, disable_probes_command):
4031 Constify.
4032
4033 2017-09-27 Tom Tromey <tom@tromey.com>
4034
4035 * symfile.c (symbol_file_command): Constify.
4036 * gdbcore.h (deprecated_file_changed_hook): Constify.
4037 * exec.c (deprecated_file_changed_hook, exec_file_command)
4038 (file_command): Constify.
4039 * defs.h (symbol_file_command): Constify.
4040
4041 2017-09-27 Tom Tromey <tom@tromey.com>
4042
4043 * remote-fileio.c (set_system_call_allowed)
4044 (show_system_call_allowed): Constify.
4045
4046 2017-09-27 Tom Tromey <tom@tromey.com>
4047
4048 * tracepoint.c (delete_trace_variable_command)
4049 (tfind_end_command, tfind_start_command, tfind_pc_command)
4050 (tfind_tracepoint_command, tfind_line_command)
4051 (tfind_range_command, tfind_outside_command): Constify.
4052
4053 2017-09-27 Tom Tromey <tom@tromey.com>
4054
4055 * ax-gdb.c (maint_agent_printf_command, agent_command)
4056 (agent_eval_command): Constify.
4057
4058 2017-09-27 Tom Tromey <tom@tromey.com>
4059
4060 * tracepoint.c (info_scope_command): Constify.
4061 * python/python.c (gdbpy_decode_line): Constify.
4062 * python/py-breakpoint.c (bppy_init): Constify.
4063 * mi/mi-cmd-break.c (mi_cmd_break_insert_1): Constify.
4064 * location.h: (new_linespec_location)
4065 (string_to_event_location_basic, string_to_event_location):
4066 Constify.
4067 * location.c (new_linespec_location)
4068 (string_to_event_location_basic, string_to_event_location):
4069 Constify.
4070 * linespec.h (decode_line_with_current_source)
4071 (decode_line_with_last_displayed, linespec_lex_to_end): Constify.
4072 * linespec.c (linespec_lex_to_end)
4073 (decode_line_with_current_source)
4074 (decode_line_with_last_displayed): Constify.
4075 * guile/scm-breakpoint.c (gdbscm_register_breakpoint_x):
4076 Constify.
4077 * cli/cli-cmds.c (edit_command, list_command): Constify.
4078 * breakpoint.h (until_break_command, watch_command_wrapper)
4079 (awatch_command_wrapper, rwatch_command_wrapper)
4080 (init_ada_exception_breakpoint): Constify.
4081 * breakpoint.c (break_command_1, dprintf_command)
4082 (break_range_command, watch_command_wrapper)
4083 (rwatch_command_wrapper, awatch_command_wrapper)
4084 (until_break_command, init_ada_exception_breakpoint)
4085 (strace_marker_create_sals_from_location, trace_command)
4086 (ftrace_command, strace_command, struct tracepoint): Constify.
4087 * ax-gdb.c (agent_command_1): Constify.
4088 * ada-lang.c (ada_exception_sal): Constify.
4089
4090 2017-09-27 Tom Tromey <tom@tromey.com>
4091
4092 * record.c (cmd_record_delete, cmd_record_stop, cmd_record_save)
4093 (cmd_record_goto_begin, cmd_record_goto_end, get_insn_number)
4094 (get_context_size, no_chunk, get_insn_history_modifiers)
4095 (cmd_record_insn_history, get_call_history_modifiers)
4096 (cmd_record_call_history): Constify.
4097
4098 2017-09-27 Tom Tromey <tom@tromey.com>
4099
4100 * source.c (show_substitute_path_command)
4101 (unset_substitute_path_command, set_substitute_path_command):
4102 Constify.
4103
4104 2017-09-27 Tom Tromey <tom@tromey.com>
4105
4106 * typeprint.c (maintenance_print_type): Constify.
4107 * maint.c (maintenance_dump_me, maintenance_demangle)
4108 (maintenance_time_display, maintenance_info_sections)
4109 (maintenance_print_statistics, maintenance_deprecate)
4110 (maintenance_undeprecate): Constify.
4111 (maintenance_do_deprecate): Constify. Use std::string.
4112 (maintenance_selftest): Constify.
4113 * gdbtypes.h (maintenance_print_type): Constify.
4114
4115 2017-09-27 Tom Tromey <tom@tromey.com>
4116
4117 * hppa-tdep.c (unwind_command): Constify.
4118
4119 2017-09-27 Tom Tromey <tom@tromey.com>
4120
4121 * target-descriptions.c (unset_tdesc_filename_cmd)
4122 (maint_print_c_tdesc_cmd, maintenance_check_xml_descriptions):
4123 Constify.
4124
4125 2017-09-27 Tom Tromey <tom@tromey.com>
4126
4127 * dummy-frame.c (maintenance_print_dummy_frames): Constify.
4128
4129 2017-09-27 Tom Tromey <tom@tromey.com>
4130
4131 * tui/tui.c (tui_enable_command, tui_disable_command): Constify.
4132
4133 2017-09-27 Tom Tromey <tom@tromey.com>
4134
4135 * tui/tui-regs.c (tui_reg_command): Constify.
4136
4137 2017-09-27 Tom Tromey <tom@tromey.com>
4138
4139 * skip.c (skip_file_command, skip_function_command)
4140 (skip_enable_command, skip_disable_command, skip_delete_command):
4141 Constify.
4142
4143 2017-09-27 Tom Tromey <tom@tromey.com>
4144
4145 * record-btrace.c (cmd_record_btrace_bts_start)
4146 (cmd_record_btrace_pt_start): Constify.
4147
4148 2017-09-27 Tom Tromey <tom@tromey.com>
4149
4150 * symmisc.c (maintenance_print_symbols)
4151 (maintenance_print_msymbols, maintenance_print_objfiles)
4152 (maintenance_info_symtabs, maintenance_check_symtabs)
4153 (maintenance_expand_symtabs, maintenance_info_line_tables):
4154 Constify.
4155
4156 2017-09-27 Tom Tromey <tom@tromey.com>
4157
4158 * top.c (new_ui_command): Constify.
4159
4160 2017-09-27 Tom Tromey <tom@tromey.com>
4161
4162 * symfile.c (add_symbol_file_command)
4163 (remove_symbol_file_command, list_overlays_command)
4164 (map_overlay_command, unmap_overlay_command)
4165 (overlay_auto_command, overlay_manual_command)
4166 (overlay_off_command, overlay_load_command): Constify.
4167
4168 2017-09-27 Tom Tromey <tom@tromey.com>
4169
4170 * spu-tdep.c (info_spu_event_command, info_spu_signal_command)
4171 (info_spu_mailbox_command, info_spu_dma_command)
4172 (info_spu_proxydma_command): Constify.
4173
4174 2017-09-27 Tom Tromey <tom@tromey.com>
4175
4176 * cli/cli-logging.c (set_logging_on, set_logging_off): Constify.
4177
4178 2017-09-27 Tom Tromey <tom@tromey.com>
4179
4180 * cli/cli-script.c (user_defined_command): Constify.
4181
4182 2017-09-27 Tom Tromey <tom@tromey.com>
4183
4184 * cli/cli-dump.c (dump_memory_command, dump_value_command)
4185 (dump_srec_memory, dump_srec_value, dump_ihex_memory)
4186 (dump_ihex_value, dump_verilog_memory, dump_verilog_value)
4187 (dump_tekhex_memory, dump_tekhex_value, dump_binary_memory)
4188 (dump_binary_value, append_binary_memory, append_binary_value):
4189 Constify.
4190 (struct dump_context) <func>: Constify.
4191 (add_dump_command): Update.
4192
4193 2017-09-27 Tom Tromey <tom@tromey.com>
4194
4195 * cli/cli-cmds.c (show_version, show_configuration)
4196 (source_command, show_user): Constify.
4197
4198 2017-09-27 Tom Tromey <tom@tromey.com>
4199
4200 * target.c (maintenance_print_target_stack): Constify.
4201
4202 2017-09-27 Tom Tromey <tom@tromey.com>
4203
4204 * interps.c (interpreter_exec_cmd): Constify.
4205
4206 2017-09-27 Tom Tromey <tom@tromey.com>
4207
4208 * record-full.c (cmd_record_full_restore): Constify.
4209
4210 2017-09-27 Tom Tromey <tom@tromey.com>
4211
4212 * memattr.c (enable_mem_command, disable_mem_command)
4213 (delete_mem_command): Constify.
4214
4215 2017-09-27 Tom Tromey <tom@tromey.com>
4216
4217 * value.c (show_convenience): Constify.
4218
4219 2017-09-27 Tom Tromey <tom@tromey.com>
4220
4221 * gdbcore.h (core_file_command): Update.
4222 * corefile.c (core_file_command): Constify.
4223
4224 2017-09-27 Tom Tromey <tom@tromey.com>
4225
4226 * user-regs.c (maintenance_print_user_registers): Constify.
4227
4228 2017-09-27 Tom Tromey <tom@tromey.com>
4229
4230 * cp-namespace.c (maintenance_cplus_namespace): Constify.
4231
4232 2017-09-27 Tom Tromey <tom@tromey.com>
4233
4234 * cp-support.c (first_component_command): Constify.
4235
4236 2017-09-27 Tom Tromey <tom@tromey.com>
4237
4238 * psymtab.c (maintenance_print_psymbols)
4239 (maintenance_info_psymtabs, maintenance_check_psymtabs):
4240 Constify.
4241
4242 2017-09-27 Tom Tromey <tom@tromey.com>
4243
4244 * windows-tdep.c (display_tib): Constify.
4245
4246 2017-09-27 Tom Tromey <tom@tromey.com>
4247
4248 * linux-fork.c (delete_checkpoint_command)
4249 (detach_checkpoint_command): Constify.
4250
4251 2017-09-27 Tom Tromey <tom@tromey.com>
4252
4253 * cp-abi.c (set_cp_abi_cmd, show_cp_abi_cmd): Constify.
4254
4255 2017-09-27 Tom Tromey <tom@tromey.com>
4256
4257 * arc-tdep.c (dump_arc_instruction_command): Constify.
4258
4259 2017-09-27 Tom Tromey <tom@tromey.com>
4260
4261 * valprint.c (set_radix, show_radix): Constify.
4262
4263 2017-09-27 Tom Tromey <tom@tromey.com>
4264
4265 * dtrace-probe.c (info_probes_dtrace_command): Constify.
4266
4267 2017-09-27 Tom Tromey <tom@tromey.com>
4268
4269 * command.h (not_just_help_class_command): Update.
4270 * cli/cli-decode.h (not_just_help_class_command): Update.
4271 * cli/cli-decode.c (not_just_help_class_command): Constify.
4272
4273 2017-09-27 Tom Tromey <tom@tromey.com>
4274
4275 * gdb_bfd.c (maintenance_info_bfds): Constify.
4276
4277 2017-09-27 Tom Tromey <tom@tromey.com>
4278
4279 * cli/cli-decode.c (add_cmd, set_cmd_cfunc): New function
4280 overloads.
4281 (do_add_cmd): Rename from add_cmd. Don't call set_cmd_cfunc.
4282 (do_const_cfunc): New function.
4283 (cmd_cfunc_eq): New overload.
4284 (cli_user_command_p): Check do_const_cfunc.
4285 * cli/cli-decode.h (struct cmd_list_element) <function>: New field
4286 const_cfunc.
4287 * command.h (add_cmd): Add const overload and no-function
4288 overload.
4289 (set_cmd_cfunc): Add const overload.
4290 (cmd_const_cfunc_ftype): Declare.
4291 (cmd_cfunc_eq): Add const overload.
4292 * breakpoint.c, cli-cmds.c, cli-dump.c, guile/scm-cmd.c,
4293 python/py-cmd.c, target.c, tracepoint.c: Use no-function add_cmd
4294 overload.
4295
4296 2017-09-27 Tom Tromey <tom@tromey.com>
4297
4298 * macroexp.c (get_next_token_for_substitution): New function.
4299 (substitute_args): Call it. Check for __VA_OPT__.
4300
4301 2017-09-26 Walfred Tedeschi <walfred.tedeschi@intel.com>
4302 Pedro Alves <palves@redhat.com>
4303
4304 * dwarf2read.c (dwarf2_cu): Remove field producer_is_icc and add
4305 producer_is_icc_lt_14.
4306 (producer_is_icc_lt_14): New function.
4307 (check_producer): Add code for checking version of ICC.
4308 (producer_is_icc): Move to producer.c.
4309 (read_structure_type): Restrict ICC workaround to ICC<14.
4310 * producer.c: Include selftest.h.
4311 (producer_is_icc, producer_parsing_tests, _initialize_producer):
4312 New functions.
4313 * producer.h (producer_is_icc): New declaration.
4314
4315 2017-09-26 Walfred Tedeschi <walfred.tedeschi@intel.com>
4316
4317 * Makefile.in (SFILES): Add producer.c.
4318 (COMMON_OBS): Add producer.o
4319 * amd64-tdep.c (producer.h): Add new include.
4320 * dwarf2read.c (producer.h): Add new include.
4321 * producer.c: New file.
4322 * producer.h: New file.
4323 * utils.c (producer_is_gcc, producer_is_gcc_ge_4): Move to
4324 producer.c.
4325 * utils.h (producer_is_gcc, producer_is_gcc_ge_4): Move to
4326 producer.h.
4327
4328 2017-09-26 Matthias Klose <doko@ubuntu.com>
4329
4330 * configure.ac: Search ncursesw before ncurses.
4331 Check ncursesw/ncurses.h before ncurses/ncurses.h.
4332 * gdb_curses.h: Include <ncursesw/ncurses.h>
4333 * config.in, configure: Regenerate.
4334
4335 2017-09-26 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
4336
4337 PR gdb/22185
4338 * configure.host <*-*-solaris2.[01], *-*-solaris2.[2-9]*>: Mark as
4339 obsolete.
4340 Use gdb_host sol2 for i[34567]86-*-solaris2*, x86_64-*-solaris2*.
4341 Remove i386sol2 support.
4342 * configure.nat <i386sol2>: Remove.
4343 <sol2-64>: Fold into ...
4344 <sol2>: ... this.
4345 Move common settings to default section.
4346 Add sol-thread.o.
4347 * configure.tgt <i[34567]86-*-solaris2.1[0-9]*,
4348 x86_64-*-solaris2.1[0-9]*>: Rename to ...
4349 <i[34567]86-*-solaris2*, x86_64-*-solaris2*>: ... this.
4350 <i[34567]86-*-solaris*>: Remove.
4351 <sparc-*-solaris2.[0-6], sparc-*-solaris2.[0-6].*>: Remove.
4352
4353 * configure.ac: Remove wctype in libw check.
4354 (_MSE_INT_H): Don't define on Solaris 7-9.
4355 <solaris*>: Remove libthread_db.so.1 check.
4356 * configure: Regenerate.
4357 * config.in: Regenerate.
4358
4359 * proc-service.c: Remove PROC_SERVICE_IS_OLD handling.
4360 (gdb_ps_prochandle_t, gdb_ps_read_buf_t, gdb_ps_write_buf_t)
4361 (gdb_ps_size_t): Remove.
4362 Use base types in users.
4363 * sol-thread.c: Likewise, also for gdb_ps_addr_t.
4364
4365 * NEWS (Changes since GDB 8.0): Document Solaris 2.0-9 removal.
4366
4367 2017-09-26 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
4368
4369 PR build/22206
4370 * sparc64-tdep.c (adi_tag_fd): Print pid as long.
4371 (adi_is_addr_mapped): Likewise.
4372 (PSR_ICC): Don't redefine.
4373 (PSR_IMPL): Likewise.
4374
4375 2017-09-25 Tom Tromey <tom@tromey.com>
4376
4377 * regcache.c (regcache::dump): Use string_printf.
4378
4379 2017-09-25 Tom Tromey <tom@tromey.com>
4380
4381 * regcache.c (class regcache_invalidator): New.
4382 (struct register_to_invalidate): Remove.
4383 (make_cleanup_regcache_invalidate): Remove.
4384 (regcache::raw_write): Use regcache_invalidator.
4385
4386 2017-09-25 Tom Tromey <tom@tromey.com>
4387
4388 * spu-tdep.c (spu2ppu_sniffer): Update.
4389 * regcache.h (make_cleanup_regcache_xfree): Don't declare.
4390 * regcache.c (do_regcache_xfree, make_cleanup_regcache_xfree):
4391 Remove.
4392 * ppc-linux-tdep.c (ppu2spu_sniffer): Update.
4393 * mi/mi-main.c (mi_cmd_data_list_changed_registers): Update.
4394 * frame.h (frame_save_as_regcache): Return std::unique_ptr.
4395 * frame.c (frame_save_as_regcache): Return std::unique_ptr.
4396 (frame_pop): Update.
4397
4398 2017-09-25 Tom Tromey <tom@tromey.com>
4399
4400 * spu-tdep.c (spu2ppu_dealloc_cache): Use delete.
4401 * regcache.h (regcache_xfree): Don't declare.
4402 * regcache.c (regcache_xfree): Remove.
4403 (do_regcache_xfree): Use delete.
4404 * ppc-linux-tdep.c (ppu2spu_dealloc_cache): Use delete.
4405 * linux-fork.c (free_fork): Use delete.
4406 (fork_save_infrun_state): Likewise.
4407 * jit.c (jit_dealloc_cache): Use delete.
4408 * infrun.c (discard_infcall_suspend_state): Use delete.
4409
4410 2017-09-25 Tom Tromey <tom@tromey.com>
4411
4412 * regcache.h (regcache_xmalloc): Don't declare.
4413 (regcache_raw_set_cached_value): Update comment.
4414 * regcache.c (regcache_xmalloc): Remove.
4415 * ppc-linux-tdep.c (ppu2spu_sniffer): Use new.
4416 * jit.c (jit_frame_sniffer): Use new.
4417 * frame.c (frame_save_as_regcache): Use new.
4418
4419 2017-09-25 Andreas Arnez <arnez@linux.vnet.ibm.com>
4420
4421 * NEWS: Advertise support for guarded-storage registers on IBM z.
4422
4423 2017-09-25 Andreas Arnez <arnez@linux.vnet.ibm.com>
4424
4425 * s390-linux-nat.c (have_regset_gs): New static variable.
4426 (s390_linux_fetch_inferior_registers): Handle guarded-storage
4427 control block and guarded-storage broadcast control regsets.
4428 (s390_read_description): Detect whether the target has
4429 guarded-storage support, return appropriate tdesc.
4430 * s390-linux-tdep.c (features/s390-gs-linux64.c): New include.
4431 (features/s390x-gs-linux64.c): Likewise.
4432 (struct gdbarch_tdep) <have_gs>: New field.
4433 (s390_regmap_gs, s390_regmap_gsbc, s390_gs_regset)
4434 (s390_gsbc_regset): New variables.
4435 (s390_iterate_over_regset_sections): Iterate over s390_gs_regset
4436 and s390_gsbc_regset, if applicable.
4437 (s390_core_read_description): Check whether core file was from a
4438 target with guarded-storage support; include appropriate regsets.
4439 (s390_gdbarch_init): Add registers for guarded-storage support.
4440 (_initialize_s390_tdep): Initialize new target descriptions that
4441 include registers for guarded-storage support.
4442 * s390-linux-tdep.h (HWCAP_S390_GS, S390_GSD_REGNUM)
4443 (S390_GSSM_REGNUM, S390_GSEPLA_REGNUM)
4444 (S390_BC_GSD_REGNUM, S390_BC_GSSM_REGNUM): New defines.
4445 (S390_NUM_REGS): Adjust macro definition.
4446 (s390_gs_regset, s390_gsbc_regset, tdesc_s390_gs_linux64)
4447 (tdesc_s390x_gs_linux64): New declarations.
4448
4449 2017-09-25 Andreas Arnez <arnez@linux.vnet.ibm.com>
4450
4451 * features/s390-gs-linux64.xml: New file.
4452 * features/s390-gs.xml: New file.
4453 * features/s390-gsbc.xml: New file.
4454 * features/s390x-gs-linux64.xml: New file.
4455 * features/Makefile (WHICH): Add s390-gs-linux64 and
4456 s390x-gs-linux64.
4457 (s390-gs-linux64-expedite, s390x-gs-linux64-expedite): New macros.
4458 (XMLTOC): Add s390-gs-linux64.xml and s390x-linux64.xml.
4459 * features/s390-gs-linux64.c: New generated file.
4460 * features/s390x-gs-linux64.c: New file.
4461 * regformats/s390-gs-linux64.dat: New file.
4462 * regformats/s390x-gs-linux64.dat: New file.
4463
4464 2017-09-23 Tom Tromey <tom@tromey.com>
4465
4466 * defs.h (make_cleanup_override_quit_handler): Don't declare.
4467
4468 2017-09-22 Tom Tromey <tom@tromey.com>
4469
4470 * utils.c (class scoped_input_handler) <m_quit_handler>: Change
4471 type to scoped_restore_tmpl.
4472 <scoped_input_handler>: Initialize m_quit_handler directly.
4473
4474 2017-09-22 Sergio Durigan Junior <sergiodj@redhat.com>
4475
4476 * cli/cli-cmds.c (pwd_command): Use "getcwd (NULL, 0)".
4477 (cd_command): Likewise. Free "current_directory" before
4478 assigning to it.
4479 * main.c (captured_main_1): Use "getcwd (NULL, 0)".
4480 * mi/mi-cmd-env.c (mi_cmd_env_pwd): Likewise.
4481 * top.c (gdb_dirbuf): Remove global declaration.
4482 * top.h (gdb_dirbuf): Likewise.
4483
4484 2017-09-22 Sergio Durigan Junior <sergiodj@redhat.com>
4485
4486 * gnulib/aclocal.m4: Regenerate.
4487 * gnulib/config.in: Regenerate.
4488 * gnulib/configure: Regenerate.
4489 * gnulib/import/Makefile.am: Regenerate.
4490 * gnulib/import/Makefile.in: Regenerate.
4491 * gnulib/import/assure.h: New file.
4492 * gnulib/import/at-func.c: Likewise
4493 * gnulib/import/chdir-long.c: New file.
4494 * gnulib/import/chdir-long.h: New file.
4495 * gnulib/import/cloexec.c: New file.
4496 * gnulib/import/cloexec.h: New file.
4497 * gnulib/import/close.c: New file.
4498 * gnulib/import/closedir.c: New file.
4499 * gnulib/import/dirent-private.h: New file.
4500 * gnulib/import/dup-safer.c: New file.
4501 * gnulib/import/dup.c: New file.
4502 * gnulib/import/dup2.c: New file.
4503 * gnulib/import/error.c: New file.
4504 * gnulib/import/error.h: New file.
4505 * gnulib/import/exitfail.c: New file.
4506 * gnulib/import/exitfail.h: New file.
4507 * gnulib/import/fchdir.c: New file.
4508 * gnulib/import/fcntl.c: New file.
4509 * gnulib/import/fcntl.in.h: New file.
4510 * gnulib/import/fd-hook.c: New file.
4511 * gnulib/import/fd-hook.h: New file.
4512 * gnulib/import/fd-safer.c: New file.
4513 * gnulib/import/fdopendir.c: New file.
4514 * gnulib/import/filename.h: New file.
4515 * gnulib/import/filenamecat-lgpl.c: New file.
4516 * gnulib/import/filenamecat.h: New file.
4517 * gnulib/import/fstat.c: New file.
4518 * gnulib/import/fstatat.c: New file.
4519 * gnulib/import/getcwd-lgpl.c: New file.
4520 * gnulib/import/getcwd.c: New file.
4521 * gnulib/import/getdtablesize.c: New file.
4522 * gnulib/import/getlogin_r.c: New file.
4523 * gnulib/import/getprogname.c: New file.
4524 * gnulib/import/getprogname.h: New file.
4525 * gnulib/import/gettext.h: New file.
4526 * gnulib/import/glob-libc.h: New file.
4527 * gnulib/import/glob.c: New file.
4528 * gnulib/import/glob.in.h: New file.
4529 * gnulib/import/intprops.h: New file.
4530 * gnulib/import/m4/chdir-long.m4: New file.
4531 * gnulib/import/m4/close.m4: New file.
4532 * gnulib/import/m4/closedir.m4: New file.
4533 * gnulib/import/m4/d-ino.m4: New file.
4534 * gnulib/import/m4/d-type.m4: New file.
4535 * gnulib/import/m4/dup.m4: New file.
4536 * gnulib/import/m4/dup2.m4: New file.
4537 * gnulib/import/m4/error.m4: New file.
4538 * gnulib/import/m4/fchdir.m4: New file.
4539 * gnulib/import/m4/fcntl.m4: New file.
4540 * gnulib/import/m4/fcntl_h.m4: New file.
4541 * gnulib/import/m4/fdopendir.m4: New file.
4542 * gnulib/import/m4/filenamecat.m4: New file.
4543 * gnulib/import/m4/fstat.m4: New file.
4544 * gnulib/import/m4/fstatat.m4: New file.
4545 * gnulib/import/m4/getcwd-abort-bug.m4: New file.
4546 * gnulib/import/m4/getcwd-path-max.m4: New file.
4547 * gnulib/import/m4/getcwd.m4: New file.
4548 * gnulib/import/m4/getdtablesize.m4: New file.
4549 * gnulib/import/m4/getlogin_r.m4: New file.
4550 * gnulib/import/m4/getprogname.m4: New file.
4551 * gnulib/import/m4/glob.m4: New file.
4552 * gnulib/import/m4/gnulib-cache.m4: Regenerate.
4553 * gnulib/import/m4/gnulib-comp.m4: Regenerate.
4554 * gnulib/import/m4/mempcpy.m4: New file.
4555 * gnulib/import/m4/memrchr.m4: New file.
4556 * gnulib/import/m4/mode_t.m4: New file.
4557 * gnulib/import/m4/msvc-inval.m4: New file.
4558 * gnulib/import/m4/msvc-nothrow.m4: New file.
4559 * gnulib/import/m4/open.m4: New file.
4560 * gnulib/import/m4/openat.m4: New file.
4561 * gnulib/import/m4/opendir.m4: New file.
4562 * gnulib/import/m4/readdir.m4: New file.
4563 * gnulib/import/m4/realloc.m4: New file.
4564 * gnulib/import/m4/rewinddir.m4: New file.
4565 * gnulib/import/m4/save-cwd.m4: New file.
4566 * gnulib/import/m4/strdup.m4: New file.
4567 * gnulib/import/m4/strerror.m4: New file.
4568 * gnulib/import/m4/unistd-safer.m4: New file.
4569 * gnulib/import/mempcpy.c: New file.
4570 * gnulib/import/memrchr.c: New file.
4571 * gnulib/import/msvc-inval.c: New file.
4572 * gnulib/import/msvc-inval.h: New file.
4573 * gnulib/import/msvc-nothrow.c: New file.
4574 * gnulib/import/msvc-nothrow.h: New file.
4575 * gnulib/import/open.c: New file.
4576 * gnulib/import/openat-die.c: New file.
4577 * gnulib/import/openat-priv.h: New file.
4578 * gnulib/import/openat-proc.c: New file.
4579 * gnulib/import/openat.c: New file.
4580 * gnulib/import/openat.h: New file.
4581 * gnulib/import/opendir.c: New file.
4582 * gnulib/import/pipe-safer.c: New file.
4583 * gnulib/import/readdir.c: New file.
4584 * gnulib/import/realloc.c: New file.
4585 * gnulib/import/rewinddir.c: New file.
4586 * gnulib/import/save-cwd.c: New file.
4587 * gnulib/import/save-cwd.h: New file.
4588 * gnulib/import/strdup.c: New file.
4589 * gnulib/import/strerror-override.c: New file.
4590 * gnulib/import/strerror-override.h: New file.
4591 * gnulib/import/strerror.c: New file.
4592 * gnulib/import/unistd--.h: New file.
4593 * gnulib/import/unistd-safer.h: New file.
4594 * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add
4595 "getcwd" and "glob".
4596 * ser-tcp.c: Undefine "close" before redefining it.
4597
4598 2017-09-21 Simon Marchi <simon.marchi@ericsson.com>
4599
4600 * guile/scm-value.c (gdbscm_value_address): Initialize address,
4601 get rid of res_val.
4602
4603 2017-09-22 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
4604
4605 * configure.nat <i386sol2,i386>: Add fork-inferior.o to NATDEPFILES.
4606 <sol2,sparc>: Likewise.
4607 <sol2-64,i386>: Likewise.
4608
4609 * warning.m4 (AM_GDB_WARNINGS): Disable -Wunknown-pragmas,
4610 -Wdeprecated-declarations on *-*-solaris*.
4611 * configure: Regenerate.
4612
4613 * procfs.c: Include "nat/inferior.h".
4614 (procfs_info_proc): Fix typo.
4615
4616 2017-09-21 Kevin Buettner <kevinb@redhat.com>
4617
4618 * remote.c (vector): Include.
4619 (struct private_thread_info): Add field, thread_handle.
4620 (free_private_thread_info): Deallocate storage associated with
4621 thread handle.
4622 (get_private_info_thread): Initialize `thread_handle' field.
4623 (struct thread_item): Add field, thread_handle.
4624 (clear_threads_listing_context): Deallocate storage associated
4625 with thread handle.
4626 (start_thread): Add support for "handle" attribute.
4627 (thread_attributes): Add "handle".
4628 (remote_get_threads_with_qthreadinfo): Initialize thread_handle
4629 field.
4630 (remote_update_thread_list): Update thread_handle.
4631 (remote_thread_handle_to_thread_info): New function.
4632 (init_remote_ops): Initialize to_thread_handle_to_thread_info.
4633
4634 2017-09-21 Kevin Buettner <kevinb@redhat.com>
4635
4636 * python/py-inferior.c (gdbpy_thread_from_thread_handle): New
4637 function.
4638 (inferior_object_methods): Add gdbpy_thread_from_thread_handle.
4639 * python/python-internal.h (thread_object_type): Declare.
4640
4641 2017-09-21 Kevin Buettner <kevinb@redhat.com>
4642
4643 * target.h (struct target_ops): Add to_thread_handle_to_thread_info.
4644 (target_thread_handle_to_thread_info): Declare.
4645 * target.c (target_thread_handle_to_thread_info): New function.
4646 * target-delegates.c: Regenerate.
4647 * gdbthread.h (find_thread_by_handle): Declare.
4648 * thread.c (find_thread_by_handle): New function.
4649 * linux-thread-db.c (thread_db_thread_handle_to_thread_info): New
4650 function.
4651 (init_thread_db_ops): Register thread_db_thread_handle_to_thread_info.
4652
4653 2017-09-21 Simon Marchi <simon.marchi@ericsson.com>
4654
4655 * nat/linux-waitpid.c (linux_debug): Add ATTRIBUTE_PRINTF.
4656
4657 2017-09-21 Simon Marchi <simon.marchi@ericsson.com>
4658
4659 * microblaze-tdep.c (microblaze_debug): Add ATTRIBUTE_PRINTF.
4660
4661 2017-09-21 Yao Qi <yao.qi@linaro.org>
4662
4663 * configure.tgt (aarch64*-*-freebsd*): Add fbsd-tdep.o solib-svr4.o
4664 to gdb_target_obs.
4665
4666 2017-09-20 Tom Tromey <tom@tromey.com>
4667
4668 * breakpoint.c (struct counted_command_line): Remove.
4669 (breakpoint_commands): Update.
4670 (alloc_counted_command_line, incref_counted_command_line)
4671 (decref_counted_command_line, do_cleanup_counted_command_line)
4672 (make_cleanup_decref_counted_command_line): Remove.
4673 (breakpoint_set_commands, commands_command_1, ~bpstats, bpstats)
4674 (bpstat_clear_actions, bpstat_do_actions_1, watchpoint_check)
4675 (bpstat_stop_status, print_one_breakpoint_location, ~breakpoint)
4676 (save_breakpoints): Update.
4677 * breakpoint.h (counted_command_line): Now a typedef to
4678 shared_ptr.
4679 (struct breakpoint) <commands>: Now a counted_command_line.
4680 (struct bpstats) <command>: Likewise.
4681
4682 2017-09-20 Tom Tromey <tom@tromey.com>
4683
4684 * breakpoint.c (struct commands_info, do_map_commands_command):
4685 Remove.
4686 (commands_command_1): Update.
4687 (iterate_over_related_breakpoints): Take a function_view.
4688 (do_delete_breakpoint, do_map_delete_breakpoint): Remove.
4689 (delete_command): Update.
4690 (map_breakpoint_numbers): Take a function_view.
4691 (do_disable_breakpoint, do_map_delete_breakpoint): Remove.
4692 (disable_command): Update.
4693 (do_enable_breakpoint, do_map_enable_breakpoint): Remove.
4694 (enable_command): Update.
4695 (struct disp_data, do_enable_breakpoint_disp)
4696 (do_map_enable_once_breakpoint, do_map_enable_count_breakpoint)
4697 (do_map_enable_delete_breakpoint): Remove.
4698 (enable_once_command, enable_count_command, enable_delete_command)
4699 (delete_trace_variable_command): Update.
4700
4701 2017-09-20 Tom Tromey <tom@tromey.com>
4702
4703 * breakpoint.c (~bpstats): Rename from bpstat_free. Update.
4704 (bpstat_clear): Use delete.
4705 (bpstats): New constructors.
4706 (bpstat_copy, bpstat_stop_status): Use new.
4707 (dprintf_after_condition_true): Update.
4708 * breakpoint.h (bpstats::bpstats): Add constructors.
4709 (bpstats::~bpstats): Add destructor.
4710
4711 2017-09-20 Pedro Alves <palves@redhat.com>
4712
4713 * eval.c (make_params): Delete, refactored as ...
4714 (class fake_method): ... this new type's ctor.
4715 (fake_method::~fake_method): New.
4716 (evaluate_subexp_standard): Use 'fake_method'.
4717
4718 2017-09-20 Tom Tromey <tom@tromey.com>
4719
4720 * windows-nat.c (get_windows_debug_event, windows_wait)
4721 (do_initial_windows_stuff, windows_attach): Update.
4722 * utils.c (vwarning, internal_vproblem): Update.
4723 (ui_unregister_input_event_handler_cleanup)
4724 (prepare_to_handle_input): Remove.
4725 (class scoped_input_handler): New.
4726 (defaulted_query, prompt_for_continue): Update.
4727 * tui/tui-hooks.c (tui_refresh_frame_and_register_information):
4728 Update.
4729 * top.c (undo_terminal_modifications_before_exit): Update.
4730 * target/target.h (target_terminal_init, target_terminal_inferior)
4731 (target_terminal_ours): Don't declare.
4732 (class target_terminal): New.
4733 * target.h (target_terminal_is_inferior, target_terminal_is_ours)
4734 (target_terminal_ours_for_output)
4735 (make_cleanup_restore_target_terminal): Don't declare.
4736 (target_terminal_info): Remove.
4737 * target.c (enum terminal_state, terminal_state): Remove.
4738 (target_terminal::terminal_state): Define.
4739 (target_terminal::init): Rename from target_terminal_init.
4740 (target_terminal::inferior): Rename from
4741 target_terminal_inferior.
4742 (target_terminal::ours): Rename from target_terminal_ours.
4743 (target_terminal::ours_for_output): Rename from
4744 target_terminal_ours_for_output.
4745 (target_terminal::info): New method.
4746 (cleanup_restore_target_terminal)
4747 (make_cleanup_restore_target_terminal): Remove.
4748 * solib.c (handle_solib_event): Update.
4749 * remote.c (remote_serial_quit_handler): Update.
4750 (remote_terminal_inferior, remote_wait_as): Update.
4751 * record-full.c (record_full_wait_1): Update.
4752 * nto-procfs.c (procfs_create_inferior): Update.
4753 * nat/fork-inferior.c (startup_inferior): Update.
4754 * mi/mi-interp.c (mi_new_thread, mi_thread_exit)
4755 (mi_record_changed, mi_inferior_added, mi_inferior_appeared)
4756 (mi_inferior_exit, mi_inferior_removed, mi_traceframe_changed)
4757 (mi_tsv_created, mi_tsv_deleted, mi_tsv_modified)
4758 (mi_breakpoint_created, mi_breakpoint_deleted)
4759 (mi_breakpoint_modified, mi_on_resume, mi_solib_loaded)
4760 (mi_solib_unloaded, mi_command_param_changed, mi_memory_changed)
4761 (mi_user_selected_context_changed, report_initial_inferior):
4762 Update.
4763 * linux-nat.c (linux_nat_attach, linux_nat_terminal_ours)
4764 (linux_nat_terminal_inferior): Update.
4765 * infrun.c (follow_fork_inferior)
4766 (handle_vfork_child_exec_or_exit, do_target_resume)
4767 (check_curr_ui_sync_execution_done, handle_inferior_event_1)
4768 (handle_signal_stop, maybe_remove_breakpoints, normal_stop):
4769 Update.
4770 * inflow.c (child_terminal_init, info_terminal_command): Update.
4771 * infcmd.c (post_create_inferior, continue_1, prepare_one_step)
4772 (attach_command): Update.
4773 * infcall.c (call_thread_fsm_should_stop): Update.
4774 * gnu-nat.c (gnu_attach): Update.
4775 * extension.c (struct active_ext_lang_state)
4776 (restore_active_ext_lang): Update.
4777 * exceptions.c (print_flush): Update.
4778 * event-top.c (async_enable_stdin, default_quit_handler): Update.
4779 (struct quit_handler_cleanup_data, restore_quit_handler)
4780 (restore_quit_handler_dtor, make_cleanup_override_quit_handler):
4781 Remove.
4782 * cp-support.c (gdb_demangle): Update.
4783 * breakpoint.c (update_inserted_breakpoint_locations)
4784 (insert_breakpoint_locations, handle_jit_event)
4785 (disable_breakpoints_in_unloaded_shlib): Update.
4786 * annotate.c (annotate_breakpoints_invalid)
4787 (annotate_frames_invalid): Update.
4788
4789 2017-09-20 Tom Tromey <tom@tromey.com>
4790
4791 * main.c (catch_command_errors): Rename from
4792 catch_command_errors_const.
4793 (captured_main_1): Update.
4794
4795 2017-09-20 Pedro Alves <palves@redhat.com>
4796
4797 * cli/cli-cmds.c (list_command): Use print_sal_location.
4798 (print_sal_location): New function.
4799 (ambiguous_line_spec): Use print_sal_location.
4800 * linespec.c (symbol_to_sal): Record the symbol in the sal.
4801 * symtab.c (find_function_start_sal): Likewise.
4802 * symtab.h (symtab_and_line::symbol): New field.
4803
4804 2017-09-20 Pedro Alves <palves@redhat.com>
4805
4806 * linespec.c (minsym_found): Handle non-text minsyms.
4807 (symbol_to_sal): Record a sal.pc for non-block, non-label symbols.
4808
4809 2017-09-20 Walfred Tedeschi <walfred.tedeschi@intel.com>
4810
4811 * features/Makefile (i386-avx-mpx-avx512-pku.dat): Add missing
4812 backslash.
4813
4814 2017-09-20 Walfred Tedeschi <walfred.tedeschi@intel.com>
4815
4816 * gdb.arch/i386-avx512.c (move_zmm_data_to_reg): Use
4817 vmovups instead vmovaps.
4818 (move_zmm_data_to_memory): Use vmovups instead vmovaps.
4819
4820 2017-09-19 John Baldwin <jhb@FreeBSD.org>
4821
4822 * NEWS (Changes since GDB 8.0): Add starti.
4823 * infcmd.c (enum run_break): New.
4824 (run_command_1): Queue pending event for RUN_STOP_AT_FIRST_INSN
4825 case.
4826 (run_command): Use enum run_how.
4827 (start_command): Likewise.
4828 (starti_command): New function.
4829 (RUN_ARGS_HELP): New macro.
4830 (_initialize_infcmd): Use RUN_ARGS_HELP for run and start
4831 commands. Add starti command.
4832
4833 2017-09-19 Yao Qi <yao.qi@linaro.org>
4834
4835 * Makefile.in (monitor.o): Remove the rule.
4836
4837 2017-09-19 Yao Qi <yao.qi@linaro.org>
4838
4839 * annotate.h (struct annotate_arg_emitter): Use
4840 DISABLE_COPY_AND_ASSIGN.
4841 * common/refcounted-object.h (refcounted_object): Likewise.
4842 * completer.h (struct completion_result): Likewise.
4843 * dwarf2read.c (struct dwarf2_per_objfile): Likewise.
4844 * filename-seen-cache.h (filename_seen_cache): Likewise.
4845 * gdbcore.h (thread_section_name): Likewise.
4846 * gdb_regex.h (compiled_regex): Likewise.
4847 * gdbthread.h (scoped_restore_current_thread): Likewise.
4848 * inferior.h (scoped_restore_current_inferior): Likewise.
4849 * jit.c (jit_reader): Likewise.
4850 * linespec.h (struct linespec_result): Likewise.
4851 * mi/mi-parse.h (struct mi_parse): Likewise.
4852 * nat/fork-inferior.c (execv_argv): Likewise.
4853 * progspace.h (scoped_restore_current_program_space): Likewise.
4854 * python/python-internal.h (class gdbpy_enter): Likewise.
4855 * regcache.h (regcache): Likewise.
4856 * target-descriptions.c (struct tdesc_reg): Likewise.
4857 (struct tdesc_type): Likewise.
4858 (struct tdesc_feature): Likewise.
4859 * ui-out.h (ui_out_emit_type): Likewise.
4860
4861 2017-09-18 Simon Marchi <simon.marchi@ericsson.com>
4862
4863 * dwarf2expr.c (dwarf_expr_context::execute_stack_op): Remove
4864 label abort_expression.
4865
4866 2017-09-16 Simon Marchi <simon.marchi@ericsson.com>
4867
4868 * common/buffer.c (buffer_xml_printf): Adjust.
4869 * common/xml-utils.c (xml_escape_text): Change return type to
4870 std::string, update code accordingly.
4871 * common/xml-utils.h (xml_escape_text): Change return type to
4872 std::string.
4873 * rs6000-aix-tdep.c (rs6000_aix_shared_library_to_xml): Adjust.
4874 * windows-tdep.c (windows_xfer_shared_library): Adjust.
4875 * unittests/xml-utils-selftests.c (test_xml_escape_text):
4876 Adjust.
4877
4878 2017-09-16 Simon Marchi <simon.marchi@ericsson.com>
4879
4880 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add new source file.
4881 (SUBDIR_UNITTESTS_OBS): Add new object file.
4882 * unittests/xml-utils-selftests.c: New file.
4883
4884 2017-09-16 Simon Marchi <simon.marchi@ericsson.com>
4885
4886 * common/selftest.h (selftest): New struct/interface.
4887 (register_test): Add name parameter, add new overload.
4888 (run_tests): Add filter parameter.
4889 (for_each_selftest_ftype): New typedef.
4890 (for_each_selftest): New declaration.
4891 * common/selftest.c (tests): Change type to
4892 map<string, unique_ptr<selftest>>.
4893 (simple_selftest): New struct.
4894 (register_test): New function.
4895 (register_test): Add name parameter and use it.
4896 (run_tests): Add filter parameter and use it. Add prints.
4897 Adjust to vector -> map change.
4898 * aarch64-tdep.c (_initialize_aarch64_tdep): Add names when
4899 registering selftests.
4900 * arm-tdep.c (_initialize_arm_tdep): Likewise.
4901 * disasm-selftests.c (_initialize_disasm_selftests): Likewise.
4902 * dwarf2-frame.c (_initialize_dwarf2_frame): Likewise.
4903 * dwarf2loc.c (_initialize_dwarf2loc): Likewise.
4904 * findvar.c (_initialize_findvar): Likewise.
4905 * gdbarch-selftests.c (_initialize_gdbarch_selftests): Likewise.
4906 * maint.c (maintenance_selftest): Update call to run_tests.
4907 (maintenance_info_selftests): New function.
4908 (_initialize_maint_cmds): Register "maintenance info selftests"
4909 command. Update "maintenance selftest" doc.
4910 * regcache.c (_initialize_regcache): Add names when registering
4911 selftests.
4912 * rust-exp.y (_initialize_rust_exp): Likewise.
4913 * selftest-arch.c (gdbarch_selftest): New struct.
4914 (gdbarch_tests): Remove.
4915 (register_test_foreach_arch): Add name parameter. Call
4916 register_test.
4917 (tests_with_arch): Remove, move most content to
4918 gdbarch_selftest::operator().
4919 (_initialize_selftests_foreach_arch): Remove.
4920 * selftest-arch.h (register_test_foreach_arch): Add name
4921 parameter.
4922 (run_tests_with_arch): New declaration.
4923 * utils-selftests.c (_initialize_utils_selftests): Add names
4924 when registering selftests.
4925 * utils.c (_initialize_utils): Likewise.
4926 * unittests/array-view-selftests.c
4927 (_initialize_array_view_selftests): Likewise.
4928 * unittests/environ-selftests.c (_initialize_environ_selftests):
4929 Likewise.
4930 * unittests/function-view-selftests.c
4931 (_initialize_function_view_selftests): Likewise.
4932 * unittests/offset-type-selftests.c
4933 (_initialize_offset_type_selftests): Likewise.
4934 * unittests/optional-selftests.c
4935 (_initialize_optional_selftests): Likewise.
4936 * unittests/scoped_restore-selftests.c
4937 (_initialize_scoped_restore_selftests): Likewise.
4938 * NEWS: Document "maintenance selftest" and "maint info
4939 selftests".
4940
4941 2017-09-16 Simon Marchi <simon.marchi@ericsson.com>
4942
4943 * mi/mi-main.c (mi_load_progress): Restore current_uiout using a
4944 scoped_restore.
4945
4946 2017-09-16 Simon Marchi <simon.marchi@ericsson.com>
4947
4948 * mi/mi-main.c (mi_load_progress): Make uiout variable
4949 a unique_ptr.
4950
4951 2017-09-15 Pedro Alves <palves@redhat.com>
4952
4953 * compile/compile-c-types.c (convert_enum, convert_int)
4954 (convert_float): Adjust to refer to int_type_v0 and float_type_v0.
4955
4956 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
4957
4958 * dwarf2read.c (copy_string): Remove.
4959 (parse_macro_definition): Replace copy_string with savestring.
4960
4961 2017-09-15 Yao Qi <yao.qi@linaro.org>
4962
4963 * configure.tgt (i[34567]86-*-darwin*): Append amd64.o to
4964 gdb_target_obs.
4965 (i[34567]86-*-solaris2.1[0-9]* | x86_64-*-solaris2.1[0-9]*):
4966 Likewise.
4967 (i[34567]86-*-linux*): Likewise.
4968
4969 2017-09-14 Simon Marchi <simon.marchi@ericsson.com>
4970
4971 * dwarf2expr.h (dwarf_stack_value): Add constructor.
4972 (dwarf_expr_context) <~dwarf_expr_context>: Define as default.
4973 <stack>: Change type to std::vector.
4974 <stack_len, stack_allocated>: Remove.
4975 <grow_stack>: Remove.
4976 * dwarf2expr.c (dwarf_expr_context::dwarf_expr_context): Adjust.
4977 (dwarf_expr_context::~dwarf_expr_context): Remove.
4978 (dwarf_expr_context::grow_stack): Remove.
4979 (dwarf_expr_context::push): Adjust.
4980 (dwarf_expr_context::pop): Adjust.
4981 (dwarf_expr_context::fetch): Adjust.
4982 (dwarf_expr_context::fetch_in_stack_memory): Adjust.
4983 (dwarf_expr_context::stack_empty_p): Adjust.
4984 (dwarf_expr_context::execute_stack_op): Adjust.
4985
4986 2017-09-14 Simon Marchi <simon.marchi@ericsson.com>
4987
4988 * dwarf2expr.h (dwarf_expr_context) <stack_empty_p>: Change
4989 return type to bool.
4990 * dwarf2expr.c (dwarf_expr_context::stack_empty_p): Likewise.
4991
4992 2017-09-14 Simon Marchi <simon.marchi@ericsson.com>
4993
4994 * dwarf2expr.h (dwarf_expr_piece) <v.mem.in_stack_memory>:
4995 Change type to bool.
4996 (dwarf_stack_value) <in_stack_memory>: Likewise.
4997 (dwarf_expr_context) <push_address>: Change parameter type to
4998 bool.
4999 <fetch_in_stack_memory>: Change return type to bool.
5000 <push>: Change parameter type to bool.
5001 * dwarf2expr.c (dwarf_expr_context::push): Change parameter type
5002 to bool.
5003 (dwarf_expr_context::push_address): Likewise.
5004 (dwarf_expr_context::fetch_in_stack_memory): Change return type
5005 to bool.
5006 (dwarf_expr_context::execute_stack_op): Adjust.
5007 * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Adjust.
5008
5009 2017-09-14 Simon Marchi <simon.marchi@ericsson.com>
5010
5011 * dwarf2expr.h (struct dwarf_expr_piece): Move up.
5012 (struct dwarf_expr_context) <n_pieces>: Remove.
5013 <pieces>: Change type to std::vector.
5014 * dwarf2expr.c (dwarf_expr_context::dwarf_expr_context): Adjust.
5015 (dwarf_expr_context::~dwarf_expr_context): Don't manually free
5016 pieces.
5017 (dwarf_expr_context::add_piece): Adjust.
5018 * dwarf2loc.c (struct piece_closure): Initialize fields.
5019 <n_pieces>: Remove.
5020 <pieces>: Change type to std::vector.
5021 (allocate_piece_closure): Adjust, change parameter to
5022 std::vector rvalue and std::move it to piece_closure.
5023 (rw_pieced_value): Adjust.
5024 (check_pieced_synthetic_pointer): Adjust.
5025 (indirect_synthetic_pointer): Adjust.
5026 (coerce_pieced_ref): Adjust.
5027 (free_pieced_value_closure): Adjust. Use delete to free
5028 piece_closure.
5029 (dwarf2_evaluate_loc_desc_full): Adjust. std::move ctx.pieces
5030 to allocate_piece_closure.
5031 (dwarf2_loc_desc_get_symbol_read_needs): Adjust.
5032
5033 2017-09-12 Simon Marchi <simon.marchi@ericsson.com>
5034
5035 * probe.h (probe_ops_cp): Remove typedef.
5036 (DEF_VEC_P (probe_ops_cp)): Remove.
5037 (all_probe_ops): Change type to std::vector.
5038 * probe.c (info_probes_for_ops): Adjust to vector change.
5039 (probe_linespec_to_ops): Likewise.
5040 (all_probe_ops): Change type to std::vector.
5041 (_initialize_probe): Adjust to vector change.
5042 * dtrace-probe.c (_initialize_dtrace_probe): Likewise.
5043 * elfread.c (elf_get_probes): Likewise.
5044 * stap-probe.c (_initialize_stap_probe): Likewise.
5045
5046 2017-09-12 Simon Marchi <simon.marchi@ericsson.com>
5047
5048 * probe.h (struct bound_probe): Define constructors.
5049 * probe.c (bound_probe_s): Remove typedef.
5050 (DEF_VEC_O (bound_probe_s)): Remove VEC.
5051 (collect_probes): Change return type to std::vector, remove
5052 cleanup.
5053 (compare_probes): Return bool, change parameter type. Change
5054 semantic to "less than".
5055 (gen_ui_out_table_header_info): Change parameter to std::vector
5056 and update.
5057 (exists_probe_with_pops): Likewise.
5058 (info_probes_for_ops): Update to std::vector change.
5059 (enable_probes_command): Likewise.
5060 (disable_probes_command): Likewise.
5061
5062 2017-09-12 Simon Marchi <simon.marchi@ericsson.com>
5063
5064 * probe.h (struct probe_ops) <get_probes>: Change parameter from
5065 vec to std::vector.
5066 * probe.c (parse_probes_in_pspace): Update.
5067 (find_probes_in_objfile): Update.
5068 (find_probe_by_pc): Update.
5069 (collect_probes): Update.
5070 (probe_any_get_probes): Update.
5071 * symfile.h (struct sym_probe_fns) <sym_get_probes> Change
5072 return type to reference to std::vector.
5073 * dtrace-probe.c (dtrace_process_dof_probe): Change parameter to
5074 std::vector and update.
5075 (dtrace_process_dof): Likewise.
5076 (dtrace_get_probes): Likewise.
5077 * elfread.c (elf_get_probes): Change return type to std::vector,
5078 store an std::vector in bfd_data.
5079 (probe_key_free): Update to std::vector.
5080 * stap-probe.c (handle_stap_probe): Change parameter to
5081 std::vector and update.
5082 (stap_get_probes): Likewise.
5083 * symfile-debug.c (debug_sym_get_probes): Change return type to
5084 std::vector and update.
5085
5086 2017-09-11 Tom Tromey <tom@tromey.com>
5087
5088 * breakpoint.c (program_breakpoint_here_p): Update.
5089 * target.c (make_scoped_restore_show_memory_breakpoints): Rename
5090 from make_show_memory_breakpoints_cleanup. Return a
5091 scoped_restore_tmpl<int>.
5092 (restore_show_memory_breakpoints): Remove.
5093 * ppc-linux-tdep.c (ppc_linux_memory_remove_breakpoint): Update.
5094 * mem-break.c (memory_validate_breakpoint): Update.
5095 * ia64-tdep.c (ia64_memory_insert_breakpoint): Update.
5096 (ia64_memory_remove_breakpoint): Update.
5097 (ia64_breakpoint_from_pc): Update.
5098 * target.h (make_scoped_restore_show_memory_breakpoints): Rename
5099 from make_show_memory_breakpoints_cleanup.
5100
5101 2017-09-11 Tom Tromey <tom@tromey.com>
5102
5103 * d-namespace.c (d_lookup_symbol): Use std::string.
5104 (find_symbol_in_baseclass): Likewise.
5105
5106 2017-09-11 Tom Tromey <tom@tromey.com>
5107
5108 * ctf.c (ctf_start): Use std::string.
5109
5110 2017-09-11 Tom Tromey <tom@tromey.com>
5111
5112 * ada-lang.c (is_known_support_routine): Update.
5113 (ada_unhandled_exception_name_addr_from_raise): Update.
5114 * guile/scm-frame.c (gdbscm_frame_name): Update.
5115 * python/py-frame.c (frapy_name): Update.
5116 (frapy_function): Update.
5117 * stack.h (find_frame_funname): Update.
5118 * stack.c (find_frame_funname): Return unique_xmalloc_ptr.
5119 (print_frame): Update.
5120
5121 2017-09-11 Tom Tromey <tom@tromey.com>
5122
5123 * findcmd.c (put_bits): Take a gdb::byte_vector.
5124 (parse_find_args): Return gdb::byte_vector. "args" now const.
5125 Remove "pattern_bufp" and "pattern_lenp" parameters. Remove
5126 cleanups.
5127 (find_command): Update.
5128
5129 2017-09-11 Tom Tromey <tom@tromey.com>
5130
5131 * cli/cli-script.c (class scoped_restore_hook_in): New.
5132 (clear_hook_in_cleanup): Remove.
5133 (execute_cmd_pre_hook, execute_cmd_post_hook): Use
5134 scoped_restore_hook_in.
5135
5136 2017-09-11 Tom Tromey <tom@tromey.com>
5137
5138 * cli/cli-script.c (restore_interp): Remove.
5139 (read_command_lines): Use scoped_restore_interp.
5140 * interps.c (scoped_restore_interp::set_temp): Rename from
5141 interp_set_temp.
5142 * interps.h (class scoped_restore_interp): New.
5143 (interp_set_temp): Remove.
5144
5145 2017-09-11 Tom Tromey <tom@tromey.com>
5146
5147 * mi/mi-cmd-catch.c (mi_cmd_catch_assert)
5148 (mi_cmd_catch_exception, mi_catch_load_unload): Update.
5149 * mi/mi-cmd-break.c (setup_breakpoint_reporting): Return a
5150 scoped_restore.
5151 (mi_cmd_break_insert_1): Update.
5152 * mi/mi-cmd-break.h (setup_breakpoint_reporting): Return a
5153 scoped_restore.
5154
5155 2017-09-11 Tom Tromey <tom@tromey.com>
5156
5157 * demangle.c (demangle_command): Update.
5158 * breakpoint.c (disable_command): Update.
5159 (enable_command): Update.
5160 (find_location_by_number): Make "number" const. Use
5161 get_number_trailer.
5162 * cli/cli-utils.c (extract_arg): Return std::string.
5163 * probe.c (parse_probe_linespec): Update. Change types.
5164 (collect_probes): Take string arguments.
5165 (parse_probe_linespec): Likewise.
5166 (info_probes_for_ops): Update.
5167 (enable_probes_command): Update.
5168 (disable_probes_command): Update.
5169 * break-catch-sig.c (catch_signal_split_args): Update.
5170 * mi/mi-parse.c (mi_parse): Update.
5171
5172 2017-09-11 Tom Tromey <tom@tromey.com>
5173
5174 * language.h (language_enum): Make argument const.
5175 * language.c (language_enum): Make argument const.
5176
5177 2017-09-11 Tom Tromey <tom@tromey.com>
5178
5179 * common/common-utils.h (skip_to_space): Remove macro, redeclare
5180 as function.
5181 (skip_to_space): Rename from skip_to_space_const.
5182 * common/common-utils.c (skip_to_space): New function.
5183 (skip_to_space): Rename from skip_to_space_const.
5184 * cli/cli-utils.h (get_number): Rename from get_number_const.
5185 (extract_arg): Rename from extract_arg_const.
5186 * cli/cli-utils.c (get_number): Rename from get_number_const.
5187 (extract_arg): Rename from extract_arg_const.
5188 (number_or_range_parser::get_number): Use ::get_number.
5189 * aarch64-linux-tdep.c, ada-lang.c, arm-linux-tdep.c, ax-gdb.c,
5190 break-catch-throw.c, breakpoint.c, cli/cli-cmds.c, cli/cli-dump.c,
5191 cli/cli-script.c, cli/cli-setshow.c, compile/compile.c,
5192 completer.c, demangle.c, disasm.c, findcmd.c, linespec.c,
5193 linux-tdep.c, linux-thread-db.c, location.c, mi/mi-parse.c,
5194 minsyms.c, nat/linux-procfs.c, printcmd.c, probe.c,
5195 python/py-breakpoint.c, record.c, rust-exp.y, serial.c, stack.c,
5196 stap-probe.c, tid-parse.c, tracepoint.c: Update all callers.
5197
5198 2017-09-11 Tom Tromey <tom@tromey.com>
5199
5200 * python/python.c (do_start_initialization): Use
5201 py-event-types.def to initialize types.
5202 Define all object type structures.
5203 * python/python-internal.h: Don't declare event initialization
5204 functions.
5205 * python/py-threadevent.c (thread_event_object_type): Don't
5206 define.
5207 * python/py-stopevent.c (stop_event_object_type): Don't define.
5208 * python/py-signalevent.c (signal_event_object_type): Don't
5209 declare or define.
5210 * python/py-newobjfileevent.c (new_objfile_event_object_type)
5211 (clear_objfiles_event_object_type): Don't declare or define.
5212 * python/py-infevents.c (inferior_call_pre_event_object_type)
5213 (inferior_call_post_event_object_type)
5214 (register_changed_event_object_type)
5215 (memory_changed_event_object_type): Don't declare or define.
5216 * python/py-inferior.c (new_thread_event_object_type)
5217 (new_inferior_event_object_type)
5218 (inferior_deleted_event_object_type): Don't declare or define.
5219 * python/py-exitedevent.c (exited_event_object_type): Don't
5220 declare or define.
5221 * python/py-evts.c (gdbpy_initialize_py_events): Use
5222 py-all-events.def.
5223 * python/py-events.h (thread_event_object_type): Don't declare.
5224 (events_object): Use py-all-events.def.
5225 * python/py-event.h (GDBPY_NEW_EVENT_TYPE): Remove. Use
5226 py-event-types.def.
5227 * python/py-event-types.def: New file.
5228 * python/py-continueevent.c (create_continue_event_object): Don't
5229 declare or define.
5230 * python/py-bpevent.c (breakpoint_event_object_type): Don't
5231 declare or define.
5232 * python/py-all-events.def: New file.
5233
5234 2017-09-11 Tom Tromey <tom@tromey.com>
5235
5236 * python/py-threadevent.c (create_thread_event_object): Return
5237 gdbpy_ref.
5238 * python/py-stopevent.h (create_stop_event_object)
5239 (create_breakpoint_event_object, create_signal_event_object):
5240 Update.
5241 * python/py-stopevent.c (create_stop_event_object): Return
5242 gdbpy_ref.
5243 (emit_stop_event): Update.
5244 * python/py-signalevent.c (create_signal_event_object): Return
5245 gdbpy_ref.
5246 * python/py-infevents.c (create_inferior_call_event_object):
5247 Update.
5248 * python/py-event.h (create_event_object)
5249 (create_thread_event_object): Update.
5250 * python/py-event.c (create_event_object): Return gdbpy_ref.
5251 * python/py-continueevent.c: Return gdbpy_ref.
5252 * python/py-bpevent.c (create_breakpoint_event_object): Return
5253 gdbpy_ref.
5254
5255 2017-09-11 Tom Tromey <tom@tromey.com>
5256
5257 PR python/15622:
5258 * NEWS: Add entry.
5259 * python/python.c (do_start_initialization): Initialize new event
5260 types.
5261 * python/python-internal.h (gdbpy_initialize_new_inferior_event)
5262 (gdbpy_initialize_inferior_deleted_event)
5263 (gdbpy_initialize_new_thread_event): Declare.
5264 * python/py-threadevent.c (create_thread_event_object): Add option
5265 "thread" parameter.
5266 * python/py-inferior.c (new_thread_event_object_type)
5267 (new_inferior_event_object_type)
5268 (inferior_deleted_event_object_type): Declare.
5269 (python_new_inferior, python_inferior_deleted): New functions.
5270 (add_thread_object): Emit new_thread event.
5271 (gdbpy_initialize_inferior): Attach new functions to corresponding
5272 observers.
5273 (new_thread, new_inferior, inferior_deleted): Define new event
5274 types.
5275 * python/py-evts.c (gdbpy_initialize_py_events): Add new
5276 registries.
5277 * python/py-events.h (events_object) <new_inferior,
5278 inferior_deleted, new_thread>: New fields.
5279 * python/py-event.h (create_thread_event_breakpoint): Add optional
5280 "thread" parameter.
5281
5282 2017-09-10 Andrew Burgess <andrew.burgess@embecosm.com>
5283
5284 * utils.c (abort_with_message): Don't compare gdb_stderr to NULL,
5285 check current_ui instead.
5286 (internal_vproblem): Likewise.
5287
5288 2017-09-09 Simon Marchi <simon.marchi@ericsson.com>
5289
5290 * thread.c (print_thread_info_1): Remove unnecessary calls to
5291 uiout->is_mi_like_p.
5292
5293 2017-09-09 Tom Tromey <tom@tromey.com>
5294
5295 * namespace.h (add_using_directive): Update.
5296 * namespace.c (add_using_directive): Change type of excludes to
5297 std::vector.
5298 * dwarf2read.c (read_import_statement): Use std::vector.
5299 (read_namespace): Update.
5300 * cp-namespace.c (cp_scan_for_anonymous_namespaces): Update.
5301
5302 2017-09-09 Tom Tromey <tom@tromey.com>
5303
5304 * linespec.c (create_sals_line_offset): Use gdb::def_vector.
5305
5306 2017-09-09 Tom Tromey <tom@tromey.com>
5307
5308 * p-valprint.c (pascal_object_print_value): Use gdb::byte_vector.
5309
5310 2017-09-09 Tom Tromey <tom@tromey.com>
5311
5312 * stack.c (func_command): Use gdb::def_vector.
5313
5314 2017-09-09 Tom Tromey <tom@tromey.com>
5315
5316 * mi/mi-cmd-var.c (mi_cmd_var_list_children): Use gdb::optional,
5317 ui_out_emit_list, ui_out_emit_tuple.
5318 (mi_cmd_var_update): Likewise.
5319
5320 2017-09-09 Tom Tromey <tom@tromey.com>
5321
5322 * mi/mi-interp.c (mi_user_selected_context_changed): Use
5323 ui_out_redirect_pop.
5324 * guile/scm-ports.c (ioscm_with_output_to_port_worker): Use
5325 ui_out_redirect_pop.
5326 * utils.c (do_ui_out_redirect_pop)
5327 (make_cleanup_ui_out_redirect_pop): Remove.
5328 * top.c (execute_command_to_string): Use ui_out_redirect_pop.
5329 * utils.h (make_cleanup_ui_out_redirect_pop): Remove.
5330 * ui-out.h (ui_out_redirect_pop): New class.
5331
5332 2017-09-09 Tom Tromey <tom@tromey.com>
5333
5334 * mi/mi-main.c (output_cores): Use ui_out_emit_list.
5335 (list_available_thread_groups, mi_cmd_list_thread_groups)
5336 (mi_cmd_data_list_changed_registers, mi_cmd_data_read_memory)
5337 (mi_cmd_data_read_memory_bytes, mi_cmd_trace_frame_collected):
5338 Likewise.
5339
5340 2017-09-09 Tom Tromey <tom@tromey.com>
5341
5342 * disasm.c (gdb_pretty_print_disassembler::pretty_print_insn): Use
5343 ui_out_emit_tuple.
5344
5345 2017-09-09 Tom Tromey <tom@tromey.com>
5346
5347 * target.c (flash_erase_command): Use ui_out_emit_tuple.
5348 * stack.c (print_frame): Use ui_out_emit_tuple.
5349 * spu-tdep.c (info_spu_event_command): Use ui_out_emit_tuple.
5350 (info_spu_mailbox_command, info_spu_dma_command)
5351 (info_spu_proxydma_command): Likewise.
5352 * mi/mi-main.c (mi_cmd_trace_frame_collected): Use
5353 ui_out_emit_tuple, gdb::byte_vector, bin2hex.
5354 * mi/mi-cmd-file.c (mi_cmd_file_list_shared_libraries): Use
5355 ui_out_emit_tuple.
5356 * breakpoint.c (print_it_watchpoint): Use ui_out_emit_tuple.
5357
5358 2017-09-09 Tom Tromey <tom@tromey.com>
5359
5360 * ui-out.h (make_cleanup_ui_out_table_begin_end): Remove.
5361 (class ui_out_emit_table): Update comment.
5362 * ui-out.c (do_cleanup_table_end)
5363 (make_cleanup_ui_out_table_begin_end): Remove.
5364 * spu-tdep.c (info_spu_mailbox_list): Use ui_out_emit_table.
5365 (info_spu_dma_cmdlist): Likewise.
5366 * probe.c (info_probes_for_ops): Use ui_out_emit_table.
5367 * darwin-nat-info.c (darwin_debug_regions_recurse): Use
5368 ui_out_emit_table.
5369
5370 2017-09-09 Tom Tromey <tom@tromey.com>
5371
5372 * thread.c (print_thread_info_1): Use ui_out_emit_table,
5373 ui_out_emit_list, gdb::optional.
5374
5375 2017-09-09 John Baldwin <jhb@FreeBSD.org>
5376
5377 * aarch64-linux-nat.c: Remove _initialize_aarch64_linux_nat
5378 prototype.
5379 * aarch64-linux-tdep.c: Remove _initialize_aarch64_linux_tdep
5380 prototype.
5381 * aarch64-newlib-tdep.c: Remove _initialize_aarch64_newlib_tdep
5382 prototype.
5383 * aarch64-tdep.c: Remove _initialize_aarch64_tdep prototype.
5384 * ada-exp.y: Remove _initialize_ada_exp prototype.
5385 * ada-lang.c: Remove _initialize_ada_language prototype.
5386 * ada-tasks.c: Remove _initialize_tasks prototype.
5387 * addrmap.c: Remove _initialize_addrmap prototype.
5388 * agent.c: Remove _initialize_agent prototype.
5389 * aix-thread.c: Remove _initialize_aix_thread prototype.
5390 * alpha-bsd-nat.c: Remove _initialize_alphabsd_nat prototype.
5391 * alpha-linux-nat.c: Remove _initialize_alpha_linux_nat prototype.
5392 * alpha-linux-tdep.c: Remove _initialize_alpha_linux_tdep
5393 prototype.
5394 * alpha-nbsd-tdep.c: Remove _initialize_alphanbsd_tdep prototype.
5395 * alpha-obsd-tdep.c: Remove _initialize_alphaobsd_tdep prototype.
5396 * alpha-tdep.c: Remove _initialize_alpha_tdep prototype.
5397 * amd64-darwin-tdep.c: Remove _initialize_amd64_darwin_tdep
5398 prototype.
5399 * amd64-dicos-tdep.c: Remove _initialize_amd64_dicos_tdep
5400 prototype.
5401 * amd64-fbsd-nat.c: Remove _initialize_amd64fbsd_nat prototype.
5402 * amd64-fbsd-tdep.c: Remove _initialize_amd64fbsd_tdep prototype.
5403 * amd64-linux-nat.c: Remove _initialize_amd64_linux_nat prototype.
5404 * amd64-linux-tdep.c: Remove _initialize_amd64_linux_tdep
5405 prototype.
5406 * amd64-nbsd-nat.c: Remove _initialize_amd64nbsd_nat prototype.
5407 * amd64-nbsd-tdep.c: Remove _initialize_amd64nbsd_tdep prototype.
5408 * amd64-obsd-nat.c: Remove _initialize_amd64obsd_nat prototype.
5409 * amd64-obsd-tdep.c: Remove _initialize_amd64obsd_tdep prototype.
5410 * amd64-sol2-tdep.c: Remove _initialize_amd64_sol2_tdep prototype.
5411 * amd64-tdep.c: Remove _initialize_amd64_tdep prototype.
5412 * amd64-windows-nat.c: Remove _initialize_amd64_windows_nat
5413 prototype.
5414 * amd64-windows-tdep.c: Remove _initialize_amd64_windows_tdep
5415 prototype.
5416 * annotate.c: Remove _initialize_annotate prototype.
5417 * arc-newlib-tdep.c: Remove _initialize_arc_newlib_tdep prototype.
5418 * arc-tdep.c: Remove _initialize_arc_tdep prototype.
5419 * arch-utils.c: Remove _initialize_gdbarch_utils prototype.
5420 * arm-linux-nat.c: Remove _initialize_arm_linux_nat prototype.
5421 * arm-linux-tdep.c: Remove _initialize_arm_linux_tdep prototype.
5422 * arm-nbsd-tdep.c: Remove _initialize_arm_netbsd_tdep prototype.
5423 * arm-obsd-tdep.c: Remove _initialize_armobsd_tdep prototype.
5424 * arm-symbian-tdep.c: Remove _initialize_arm_symbian_tdep
5425 prototype.
5426 * arm-tdep.c: Remove _initialize_arm_tdep prototype.
5427 * arm-wince-tdep.c: Remove _initialize_arm_wince_tdep prototype.
5428 * auto-load.c: Remove _initialize_auto_load prototype.
5429 * auxv.c: Remove _initialize_auxv prototype.
5430 * avr-tdep.c: Remove _initialize_avr_tdep prototype.
5431 * ax-gdb.c: Remove _initialize_ax_gdb prototype.
5432 * bfin-linux-tdep.c: Remove _initialize_bfin_linux_tdep prototype.
5433 * bfin-tdep.c: Remove _initialize_bfin_tdep prototype.
5434 * break-catch-sig.c: Remove _initialize_break_catch_sig prototype.
5435 * break-catch-syscall.c: Remove _initialize_break_catch_syscall
5436 prototype.
5437 * break-catch-throw.c: Remove _initialize_break_catch_throw
5438 prototype.
5439 * breakpoint.c: Remove _initialize_breakpoint prototype.
5440 * bsd-uthread.c: Remove _initialize_bsd_uthread prototype.
5441 * btrace.c: Remove _initialize_btrace prototype.
5442 * charset.c: Remove _initialize_charset prototype.
5443 * cli/cli-cmds.c: Remove _initialize_cli_cmds prototype.
5444 * cli/cli-dump.c: Remove _initialize_cli_dump prototype.
5445 * cli/cli-interp.c: Remove _initialize_cli_interp prototype.
5446 * cli/cli-logging.c: Remove _initialize_cli_logging prototype.
5447 * cli/cli-script.c: Remove _initialize_cli_script prototype.
5448 * coff-pe-read.c: Remove _initialize_coff_pe_read prototype.
5449 * coffread.c: Remove _initialize_coffread prototype.
5450 * compile/compile.c: Remove _initialize_compile prototype.
5451 * complaints.c: Remove _initialize_complaints prototype.
5452 * completer.c: Remove _initialize_completer prototype.
5453 * copying.awk: Remove _initialize_copying prototype.
5454 * copying.c: Regenerate.
5455 * core-regset.c: Remove _initialize_core_regset prototype.
5456 * corefile.c: Remove _initialize_core prototype.
5457 * corelow.c: Remove _initialize_corelow prototype.
5458 * cp-abi.c: Remove _initialize_cp_abi prototype.
5459 * cp-namespace.c: Remove _initialize_cp_namespace prototype.
5460 * cp-support.c: Remove _initialize_cp_support prototype.
5461 * cp-valprint.c: Remove _initialize_cp_valprint prototype.
5462 * cris-linux-tdep.c: Remove _initialize_cris_linux_tdep prototype.
5463 * cris-tdep.c: Remove _initialize_cris_tdep prototype.
5464 * ctf.c: Remove _initialize_ctf prototype.
5465 * d-lang.c: Remove _initialize_d_language prototype.
5466 * darwin-nat-info.c: Remove _initialize_darwin_info_commands
5467 prototype.
5468 * darwin-nat.c: Remove _initialize_darwin_inferior prototype.
5469 * dbxread.c: Remove _initialize_dbxread prototype.
5470 * dcache.c: Remove _initialize_dcache prototype.
5471 * demangle.c: Remove _initialize_demangler prototype.
5472 * disasm-selftests.c: Remove _initialize_disasm_selftests
5473 prototype.
5474 * disasm.c: Remove _initialize_disasm prototype.
5475 * dtrace-probe.c: Remove _initialize_dtrace_probe prototype.
5476 * dummy-frame.c: Remove _initialize_dummy_frame prototype.
5477 * dwarf2-frame-tailcall.c: Remove _initialize_tailcall_frame
5478 prototype.
5479 * dwarf2-frame.c: Remove _initialize_dwarf2_frame prototype.
5480 * dwarf2expr.c: Remove _initialize_dwarf2expr prototype.
5481 * dwarf2loc.c: Remove _initialize_dwarf2loc prototype.
5482 * dwarf2read.c: Remove _initialize_dwarf2_read prototype.
5483 * elfread.c: Remove _initialize_elfread prototype.
5484 * exec.c: Remove _initialize_exec prototype.
5485 * extension.c: Remove _initialize_extension prototype.
5486 * f-lang.c: Remove _initialize_f_language prototype.
5487 * f-valprint.c: Remove _initialize_f_valprint prototype.
5488 * fbsd-nat.c: Remove _initialize_fbsd_nat prototype.
5489 * fbsd-tdep.c: Remove _initialize_fbsd_tdep prototype.
5490 * filesystem.c: Remove _initialize_filesystem prototype.
5491 * findcmd.c: Remove _initialize_mem_search prototype.
5492 * fork-child.c: Remove _initialize_fork_child prototype.
5493 * frame-base.c: Remove _initialize_frame_base prototype.
5494 * frame-unwind.c: Remove _initialize_frame_unwind prototype.
5495 * frame.c: Remove _initialize_frame prototype.
5496 * frv-linux-tdep.c: Remove _initialize_frv_linux_tdep prototype.
5497 * frv-tdep.c: Remove _initialize_frv_tdep prototype.
5498 * ft32-tdep.c: Remove _initialize_ft32_tdep prototype.
5499 * gcore.c: Remove _initialize_gcore prototype.
5500 * gdb_bfd.c: Remove _initialize_gdb_bfd prototype.
5501 * gdbarch.c: Regenerate.
5502 * gdbarch.sh: Remove _initialize_gdbarch prototype.
5503 * gdbtypes.c: Remove _initialize_gdbtypes prototype.
5504 * gnu-nat.c: Remove _initialize_gnu_nat prototype.
5505 * gnu-v2-abi.c: Remove _initialize_gnu_v2_abi prototype.
5506 * gnu-v3-abi.c: Remove _initialize_gnu_v3_abi prototype.
5507 * go-lang.c: Remove _initialize_go_language prototype.
5508 * go32-nat.c: Remove _initialize_go32_nat prototype.
5509 * guile/guile.c: Remove _initialize_guile prototype.
5510 * h8300-tdep.c: Remove _initialize_h8300_tdep prototype.
5511 * hppa-linux-nat.c: Remove _initialize_hppa_linux_nat prototype.
5512 * hppa-linux-tdep.c: Remove _initialize_hppa_linux_tdep prototype.
5513 * hppa-nbsd-nat.c: Remove _initialize_hppanbsd_nat prototype.
5514 * hppa-nbsd-tdep.c: Remove _initialize_hppanbsd_tdep prototype.
5515 * hppa-obsd-nat.c: Remove _initialize_hppaobsd_nat prototype.
5516 * hppa-obsd-tdep.c: Remove _initialize_hppaobsd_tdep prototype.
5517 * hppa-tdep.c: Remove _initialize_hppa_tdep prototype.
5518 * i386-bsd-nat.c: Remove _initialize_i386bsd_nat prototype.
5519 * i386-cygwin-tdep.c: Remove _initialize_i386_cygwin_tdep
5520 prototype.
5521 * i386-darwin-tdep.c: Remove _initialize_i386_darwin_tdep
5522 prototype.
5523 * i386-dicos-tdep.c: Remove _initialize_i386_dicos_tdep prototype.
5524 * i386-fbsd-nat.c: Remove _initialize_i386fbsd_nat prototype.
5525 * i386-fbsd-tdep.c: Remove _initialize_i386fbsd_tdep prototype.
5526 * i386-gnu-nat.c: Remove _initialize_i386gnu_nat prototype.
5527 * i386-gnu-tdep.c: Remove _initialize_i386gnu_tdep prototype.
5528 * i386-linux-nat.c: Remove _initialize_i386_linux_nat prototype.
5529 * i386-linux-tdep.c: Remove _initialize_i386_linux_tdep prototype.
5530 * i386-nbsd-nat.c: Remove _initialize_i386nbsd_nat prototype.
5531 * i386-nbsd-tdep.c: Remove _initialize_i386nbsd_tdep prototype.
5532 * i386-nto-tdep.c: Remove _initialize_i386nto_tdep prototype.
5533 * i386-obsd-nat.c: Remove _initialize_i386obsd_nat prototype.
5534 * i386-obsd-tdep.c: Remove _initialize_i386obsd_tdep prototype.
5535 * i386-sol2-nat.c: Remove _initialize_amd64_sol2_nat prototype.
5536 * i386-sol2-tdep.c: Remove _initialize_amd64_sol2_tdep prototype.
5537 * i386-tdep.c: Remove _initialize_i386_tdep prototype.
5538 * i386-windows-nat.c: Remove _initialize_i386_windows_nat
5539 prototype.
5540 * ia64-libunwind-tdep.c: Remove _initialize_libunwind_frame
5541 prototype.
5542 * ia64-linux-nat.c: Remove _initialize_ia64_linux_nat prototype.
5543 * ia64-linux-tdep.c: Remove _initialize_ia64_linux_tdep prototype.
5544 * ia64-tdep.c: Remove _initialize_ia64_tdep prototype.
5545 * ia64-vms-tdep.c: Remove _initialize_ia64_vms_tdep prototype.
5546 * infcall.c: Remove _initialize_infcall prototype.
5547 * infcmd.c: Remove _initialize_infcmd prototype.
5548 * inferior.c: Remove _initialize_inferiors prototype.
5549 * inflow.c: Remove _initialize_inflow prototype.
5550 * infrun.c: Remove _initialize_infrun prototype.
5551 * interps.c: Remove _initialize_interpreter prototype.
5552 * iq2000-tdep.c: Remove _initialize_iq2000_tdep prototype.
5553 * jit.c: Remove _initialize_jit prototype.
5554 * language.c: Remove _initialize_language prototype.
5555 * linux-fork.c: Remove _initialize_linux_fork prototype.
5556 * linux-nat.c: Remove _initialize_linux_nat prototype.
5557 * linux-tdep.c: Remove _initialize_linux_tdep prototype.
5558 * linux-thread-db.c: Remove _initialize_thread_db prototype.
5559 * lm32-tdep.c: Remove _initialize_lm32_tdep prototype.
5560 * m2-lang.c: Remove _initialize_m2_language prototype.
5561 * m32c-tdep.c: Remove _initialize_m32c_tdep prototype.
5562 * m32r-linux-nat.c: Remove _initialize_m32r_linux_nat prototype.
5563 * m32r-linux-tdep.c: Remove _initialize_m32r_linux_tdep prototype.
5564 * m32r-tdep.c: Remove _initialize_m32r_tdep prototype.
5565 * m68hc11-tdep.c: Remove _initialize_m68hc11_tdep prototype.
5566 * m68k-bsd-nat.c: Remove _initialize_m68kbsd_nat prototype.
5567 * m68k-bsd-tdep.c: Remove _initialize_m68kbsd_tdep prototype.
5568 * m68k-linux-nat.c: Remove _initialize_m68k_linux_tdep prototype.
5569 * m68k-linux-tdep.c: Remove _initialize_m68k_linux_tdep prototype.
5570 * m68k-tdep.c: Remove _initialize_m68k_tdep prototype.
5571 * m88k-bsd-nat.c: Remove _initialize_m68kbsd_nat prototype.
5572 * m88k-tdep.c: Remove _initialize_m68kbsd_tdep prototype.
5573 * machoread.c: Remove _initialize_machoread prototype.
5574 * macrocmd.c: Remove _initialize_macrocmd prototype.
5575 * macroscope.c: Remove _initialize_macroscope prototype.
5576 * maint.c: Remove _initialize_maint_cmds prototype.
5577 * mdebugread.c: Remove _initialize_mdebugread prototype.
5578 * memattr.c: Remove _initialize_mem prototype.
5579 * mep-tdep.c: Remove _initialize_mep_tdep prototype.
5580 * mi/mi-cmd-env.c: Remove _initialize_mi_cmd_env prototype.
5581 * mi/mi-cmds.c: Remove _initialize_mi_cmds prototype.
5582 * mi/mi-interp.c: Remove _initialize_mi_interp prototype.
5583 * mi/mi-main.c: Remove _initialize_mi_main prototype.
5584 * microblaze-linux-tdep.c: Remove
5585 _initialize_microblaze_linux_tdep prototype.
5586 * microblaze-tdep.c: Remove _initialize_microblaze_tdep prototype.
5587 * mips-fbsd-nat.c: Remove _initialize_mips_fbsd_nat prototype.
5588 * mips-fbsd-tdep.c: Remove _initialize_mips_fbsd_tdep prototype.
5589 * mips-linux-nat.c: Remove _initialize_mips_linux_nat prototype.
5590 * mips-linux-tdep.c: Remove _initialize_mips_linux_tdep prototype.
5591 * mips-nbsd-nat.c: Remove _initialize_mipsnbsd_nat prototype.
5592 * mips-nbsd-tdep.c: Remove _initialize_mipsnbsd_tdep prototype.
5593 * mips-sde-tdep.c: Remove _initialize_mips_sde_tdep prototype.
5594 * mips-tdep.c: Remove _initialize_mips_tdep prototype.
5595 * mips64-obsd-nat.c: Remove _initialize_mips64obsd_nat prototype.
5596 * mips64-obsd-tdep.c: Remove _initialize_mips64obsd_tdep
5597 prototype.
5598 * mipsread.c: Remove _initialize_mipsread prototype.
5599 * mn10300-linux-tdep.c: Remove _initialize_mn10300_linux_tdep
5600 prototype.
5601 * mn10300-tdep.c: Remove _initialize_mn10300_tdep prototype.
5602 * moxie-tdep.c: Remove _initialize_moxie_tdep prototype.
5603 * msp430-tdep.c: Remove _initialize_msp430_tdep prototype.
5604 * mt-tdep.c: Remove _initialize_mt_tdep prototype.
5605 * nds32-tdep.c: Remove _initialize_nds32_tdep prototype.
5606 * nios2-linux-tdep.c: Remove _initialize_nios2_linux_tdep
5607 prototype.
5608 * nios2-tdep.c: Remove _initialize_nios2_tdep prototype.
5609 * nto-procfs.c: Remove _initialize_procfs prototype.
5610 * nto-tdep.c: Remove _initialize_nto_tdep prototype.
5611 * objc-lang.c: Remove _initialize_objc_language prototype.
5612 * objfiles.c: Remove _initialize_objfiles prototype.
5613 * observer.c: Remove observer_test_first_notification_function,
5614 observer_test_second_notification_function,
5615 observer_test_third_notification_function, and
5616 _initialize_observer prototypes.
5617 * opencl-lang.c: Remove _initialize_opencl_language prototypes.
5618 * osabi.c: Remove _initialize_gdb_osabi prototype.
5619 * osdata.c: Remove _initialize_osdata prototype.
5620 * p-valprint.c: Remove _initialize_pascal_valprint prototype.
5621 * parse.c: Remove _initialize_parse prototype.
5622 * ppc-fbsd-nat.c: Remove _initialize_ppcfbsd_nat prototype.
5623 * ppc-fbsd-tdep.c: Remove _initialize_ppcfbsd_tdep prototype.
5624 * ppc-linux-nat.c: Remove _initialize_ppc_linux_nat prototype.
5625 * ppc-linux-tdep.c: Remove _initialize_ppc_linux_tdep prototype.
5626 * ppc-nbsd-nat.c: Remove _initialize_ppcnbsd_nat prototype.
5627 * ppc-nbsd-tdep.c: Remove _initialize_ppcnbsd_tdep prototype.
5628 * ppc-obsd-nat.c: Remove _initialize_ppcobsd_nat prototype.
5629 * ppc-obsd-tdep.c: Remove _initialize_ppcobsd_tdep prototype.
5630 * printcmd.c: Remove _initialize_printcmd prototype.
5631 * probe.c: Remove _initialize_probe prototype.
5632 * proc-api.c: Remove _initialize_proc_api prototype.
5633 * proc-events.c: Remove _initialize_proc_events prototype.
5634 * proc-service.c: Remove _initialize_proc_service prototype.
5635 * procfs.c: Remove _initialize_procfs prototype.
5636 * psymtab.c: Remove _initialize_psymtab prototype.
5637 * python/python.c: Remove _initialize_python prototype.
5638 * ravenscar-thread.c: Remove _initialize_ravenscar prototype.
5639 * record-btrace.c: Remove _initialize_record_btrace prototype.
5640 * record-full.c: Remove _initialize_record_full prototype.
5641 * record.c: Remove _initialize_record prototype.
5642 * regcache.c: Remove _initialize_regcache prototype.
5643 * reggroups.c: Remove _initialize_reggroup prototype.
5644 * remote-notif.c: Remove _initialize_notif prototype.
5645 * remote-sim.c: Remove _initialize_remote_sim prototype.
5646 * remote.c: Remove _initialize_remote prototype.
5647 * reverse.c: Remove _initialize_reverse prototype.
5648 * rl78-tdep.c: Remove _initialize_rl78_tdep prototype.
5649 * rs6000-aix-tdep.c: Remove _initialize_rs6000_aix_tdep prototype.
5650 * rs6000-lynx178-tdep.c: Remove _initialize_rs6000_lynx178_tdep
5651 prototype.
5652 * rs6000-nat.c: Remove _initialize_rs6000_nat prototype.
5653 * rs6000-tdep.c: Remove _initialize_rs6000_tdep prototype.
5654 * rust-exp.y: Remove _initialize_rust_exp prototype.
5655 * rx-tdep.c: Remove _initialize_rx_tdep prototype.
5656 * s390-linux-nat.c: Remove _initialize_s390_nat prototype.
5657 * s390-linux-tdep.c: Remove _initialize_s390_tdep prototype.
5658 * score-tdep.c: Remove _initialize_score_tdep prototype.
5659 * selftest-arch.c: Remove _initialize_selftests_foreach_arch
5660 prototype.
5661 * ser-go32.c: Remove _initialize_ser_dos prototype.
5662 * ser-mingw.c: Remove _initialize_ser_windows prototype.
5663 * ser-pipe.c: Remove _initialize_ser_pipe prototype.
5664 * ser-tcp.c: Remove _initialize_ser_tcp prototype.
5665 * ser-unix.c: Remove _initialize_ser_hardwire prototype.
5666 * serial.c: Remove _initialize_serial prototype.
5667 * sh-linux-tdep.c: Remove _initialize_sh_linux_tdep prototype.
5668 * sh-nbsd-nat.c: Remove _initialize_shnbsd_nat prototype.
5669 * sh-nbsd-tdep.c: Remove _initialize_shnbsd_tdep prototype.
5670 * sh-tdep.c: Remove _initialize_sh_tdep prototype.
5671 * skip.c: Remove _initialize_step_skip prototype.
5672 * sol-thread.c: Remove _initialize_sol_thread prototype.
5673 * solib-aix.c: Remove _initialize_solib_aix prototype.
5674 * solib-darwin.c: Remove _initialize_darwin_solib prototype.
5675 * solib-dsbt.c: Remove _initialize_dsbt_solib prototype.
5676 * solib-frv.c: Remove _initialize_frv_solib prototype.
5677 * solib-spu.c: Remove _initialize_spu_solib prototype.
5678 * solib-svr4.c: Remove _initialize_svr4_solib prototype.
5679 * solib-target.c: Remove _initialize_solib_target prototype.
5680 * solib.c: Remove _initialize_solib prototype.
5681 * source.c: Remove _initialize_source prototype.
5682 * sparc-linux-nat.c: Remove _initialize_sparc_linux_nat prototype.
5683 * sparc-linux-tdep.c: Remove _initialize_sparc_linux_tdep
5684 prototype.
5685 * sparc-nat.c: Remove _initialize_sparc_nat prototype.
5686 * sparc-nbsd-nat.c: Remove _initialize_sparcnbsd_nat prototype.
5687 * sparc-nbsd-tdep.c: Remove _initialize_sparcnbsd_tdep prototype.
5688 * sparc-obsd-tdep.c: Remove _initialize_sparc32obsd_tdep
5689 prototype.
5690 * sparc-sol2-nat.c: Remove _initialize_sparc_sol2_nat prototype.
5691 * sparc-sol2-tdep.c: Remove _initialize_sparc_sol2_tdep prototype.
5692 * sparc-tdep.c: Remove _initialize_sparc_tdep prototype.
5693 * sparc64-fbsd-nat.c: Remove _initialize_sparc64fbsd_nat
5694 prototype.
5695 * sparc64-fbsd-tdep.c: Remove _initialize_sparc64fbsd_tdep
5696 prototype.
5697 * sparc64-linux-nat.c: Remove _initialize_sparc64_linux_nat
5698 prototype.
5699 * sparc64-linux-tdep.c: Remove _initialize_sparc64_linux_tdep
5700 prototype.
5701 * sparc64-nat.c: Remove _initialize_sparc64_nat prototype.
5702 * sparc64-nbsd-nat.c: Remove _initialize_sparc64nbsd_nat
5703 prototype.
5704 * sparc64-nbsd-tdep.c: Remove _initialize_sparc64nbsd_tdep
5705 prototype.
5706 * sparc64-obsd-nat.c: Remove _initialize_sparc64obsd_nat
5707 prototype.
5708 * sparc64-obsd-tdep.c: Remove _initialize_sparc64obsd_tdep
5709 prototype.
5710 * sparc64-sol2-tdep.c: Remove _initialize_sparc64_sol2_tdep
5711 prototype.
5712 * spu-linux-nat.c: Remove _initialize_spu_nat prototype.
5713 * spu-multiarch.c: Remove _initialize_spu_multiarch prototype.
5714 * spu-tdep.c: Remove _initialize_spu_tdep prototype.
5715 * stabsread.c: Remove _initialize_stabsread prototype.
5716 * stack.c: Remove _initialize_stack prototype.
5717 * stap-probe.c: Remove _initialize_stap_probe prototype.
5718 * std-regs.c: Remove _initialize_frame_reg prototype.
5719 * symfile-debug.c: Remove _initialize_symfile_debug prototype.
5720 * symfile-mem.c: Remove _initialize_symfile_mem prototype.
5721 * symfile.c: Remove _initialize_symfile prototype.
5722 * symmisc.c: Remove _initialize_symmisc prototype.
5723 * symtab.c: Remove _initialize_symtab prototype.
5724 * target-dcache.c: Remove _initialize_target_dcache prototype.
5725 * target-descriptions.c: Remove _initialize_target_descriptions
5726 prototype.
5727 * thread.c: Remove _initialize_thread prototype.
5728 * tic6x-linux-tdep.c: Remove _initialize_tic6x_linux_tdep
5729 prototype.
5730 * tic6x-tdep.c: Remove _initialize_tic6x_tdep prototype.
5731 * tilegx-linux-nat.c: Remove _initialize_tile_linux_nat prototype.
5732 * tilegx-linux-tdep.c: Remove _initialize_tilegx_linux_tdep
5733 prototype.
5734 * tilegx-tdep.c: Remove _initialize_tilegx_tdep prototype.
5735 * tracefile-tfile.c: Remove _initialize_tracefile_tfile prototype.
5736 * tracefile.c: Remove _initialize_tracefile prototype.
5737 * tracepoint.c: Remove _initialize_tracepoint prototype.
5738 * tui/tui-hooks.c: Remove _initialize_tui_hooks prototype.
5739 * tui/tui-interp.c: Remove _initialize_tui_interp prototype.
5740 * tui/tui-layout.c: Remove _initialize_tui_layout prototype.
5741 * tui/tui-regs.c: Remove _initialize_tui_regs prototype.
5742 * tui/tui-stack.c: Remove _initialize_tui_stack prototype.
5743 * tui/tui-win.c: Remove _initialize_tui_win prototype.
5744 * tui/tui.c: Remove _initialize_tui prototype.
5745 * typeprint.c: Remove _initialize_typeprint prototype.
5746 * user-regs.c: Remove _initialize_user_regs prototype.
5747 * utils.c: Remove _initialize_utils prototype.
5748 * v850-tdep.c: Remove _initialize_v850_tdep prototype.
5749 * valarith.c: Remove _initialize_valarith prototype.
5750 * valops.c: Remove _initialize_valops prototype.
5751 * valprint.c: Remove _initialize_valprint prototype.
5752 * value.c: Remove _initialize_values prototype.
5753 * varobj.c: Remove _initialize_varobj prototype.
5754 * vax-bsd-nat.c: Remove _initialize_vaxbsd_nat prototype.
5755 * vax-nbsd-tdep.c: Remove _initialize_vaxnbsd_tdep prototype.
5756 * vax-tdep.c: Remove _initialize_vax_tdep prototype.
5757 * windows-nat.c: Remove _initialize_windows_nat,
5758 _initialize_check_for_gdb_ini, and _initialize_loadable
5759 prototypes.
5760 * windows-tdep.c: Remove _initialize_windows_tdep prototype.
5761 * xcoffread.c: Remove _initialize_xcoffread prototype.
5762 * xml-support.c: Remove _initialize_xml_support prototype.
5763 * xstormy16-tdep.c: Remove _initialize_xstormy16_tdep prototype.
5764 * xtensa-linux-nat.c: Remove _initialize_xtensa_linux_nat
5765 prototype.
5766 * xtensa-linux-tdep.c: Remove _initialize_xtensa_linux_tdep
5767 prototype.
5768 * xtensa-tdep.c: Remove _initialize_xtensa_tdep prototype.
5769
5770 2017-09-08 Keith Seitz <keiths@redhat.com>
5771
5772 * dwarf2read.c (struct field_info) <fnfields>: Remove unused
5773 field.
5774
5775 2017-09-08 Christoph Weinmann <christoph.t.weinmann@intel.com>
5776
5777 * f-valprint.c (f_val_print): Remove check for one byte
5778 sized integers. Remove printing of character type.
5779
5780 2017-09-08 Frank Penczek <frank.penczek@intel.com>
5781 Christoph Weinmann <christoph.t.weinmann@intel.com>
5782 Bernhard Heckel <bernhard.heckel@intel.com>
5783
5784 * f-typeprint.c (f_type_print_base): Use fprintfi_filtered
5785 to maintain proper indentation when printing pointers/refs.
5786
5787 2017-09-07 Joel Brobecker <brobecker@adacore.com>
5788
5789 GDB 8.0.1 released.
5790
5791 2017-09-07 Joel Brobecker <brobecker@adacore.com>
5792
5793 * NEWS (Changes in GDB 7.11): Remove entry for QStartupWithShell.
5794
5795 2017-09-05 Tom Tromey <tom@tromey.com>
5796
5797 * parse.c (funcall_chain): Now a std::vector.
5798 (start_arglist, end_arglist): Simplify.
5799 (free_funcalls): Remove.
5800 (parse_exp_in_context_1): Remove cleanup.
5801
5802 2017-09-05 Tom Tromey <tom@tromey.com>
5803
5804 * go-exp.y (go_parse): Don't create a cleanup.
5805
5806 2017-09-05 Tom Tromey <tom@tromey.com>
5807
5808 * d-exp.y (PrimaryExpression): Use std::string.
5809 (d_parse): Don't create a cleanup.
5810
5811 2017-09-05 Tom Tromey <tom@tromey.com>
5812
5813 * utils.c (do_clear_parser_state): Remove.
5814 (make_cleanup_clear_parser_state): Remove.
5815 * p-exp.y (pascal_parse): Use scoped_restore.
5816 * m2-exp.y (m2_parse): Use scoped_restore.
5817 * f-exp.y (f_parse): Use scoped_restore.
5818 * d-exp.y (d_parse): Use scoped_restore.
5819 * c-exp.y (c_parse): Use scoped_restore.
5820 * ada-exp.y (ada_parse): Use scoped_restore.
5821 * utils.h (make_cleanup_clear_parser_state): Remove.
5822
5823 2017-09-06 Keith Seitz <keiths@redhat.com>
5824
5825 * dwarf2read.c (dw2_linkage_name_attr): New function.
5826 (dw2_linkage_name): New function.
5827 (dwarf2_compute_name, dwarf2_physname, read_call_site_scope)
5828 (guess_full_die_structure_name, dwarf2_name): Use dw2_linkage_name.
5829 (anonymous_struct_prefix, dwarf2_name): Use dw2_linkage_name_attr.
5830
5831 2017-09-06 Kamil Rytarowski <n54@gmx.com>
5832
5833 * config/djgpp/djconfig.sh: Correct shell portability issue.
5834
5835 2017-09-06 Kamil Rytarowski <n54@gmx.com>
5836
5837 * configure.nat: Define HAVE_NATIVE_GCORE_HOST on NetBSD.
5838
5839 2017-09-06 John Baldwin <jhb@FreeBSD.org>
5840
5841 * Makefile.in (ALLDEPFILES): Add mips-fbsd-nat.c.
5842 * NEWS: Mention new FreeBSD/mips native configuration.
5843 * configure.host: Add aarch64*-*-freebsd*.
5844 * configure.nat: Likewise.
5845 * aarch64-fbsd-nat.c: New file.
5846
5847 2017-09-06 John Baldwin <jhb@FreeBSD.org>
5848
5849 * Makefile.in (ALL_64_TARGET_OBS): Add aarch64-fbsd-tdep.o.
5850 (ALLDEPFILES): Add aarch64-fbsd-tdep.c.
5851 * NEWS: Mention new FreeBSD/aarch64 target.
5852 * configure.tgt: Add aarch64*-*-freebsd*.
5853 * aarch64-fbsd-tdep.c: New file.
5854 * aarch64-fbsd-tdep.h: New file.
5855
5856 2017-09-06 Kamil Rytarowski <n54@gmx.com>
5857
5858 * MAINTAINERS (Write After Approval): Add Kamil Rytarowski.
5859
5860 2017-09-06 Jan Kratochvil <jan.kratochvil@redhat.com>
5861
5862 * parse.c (find_minsym_type_and_address): Don't relocate addresses
5863 of TLS symbols.
5864
5865 2017-09-05 Philippe Waroquiers <philippe.waroquiers@skynet.be>
5866
5867 * objfiles.c (get_objfile_bfd_data): Remove useless obstack_init
5868 call.
5869
5870 2017-09-05 Simon Marchi <simon.marchi@ericsson.com>
5871
5872 * infrun.c (follow_exec): Call add_thread after
5873 target_find_description.
5874
5875 2017-09-05 Simon Marchi <simon.marchi@ericsson.com>
5876
5877 * infrun.c (handle_inferior_event_1): When exec'ing, read
5878 stop_pc after follow_exec.
5879
5880 2017-09-05 Simon Marchi <simon.marchi@ericsson.com>
5881
5882 * remote.c (process_g_packet): Update error message.
5883
5884 2017-09-05 Yao Qi <yao.qi@linaro.org>
5885
5886 * configure.tgt (gdb_target_obs): Add i386.o for x86_64-*
5887 targets.
5888
5889 2017-09-05 Pedro Alves <palves@redhat.com>
5890
5891 * eval.c (eval_call, evaluate_funcall): New functions, factored
5892 out from ...
5893 (evaluate_subexp_standard): ... this.
5894
5895 2017-09-05 Yao Qi <yao.qi@linaro.org>
5896
5897 * amd64-tdep.c (amd64_target_description): Create target
5898 descriptions.
5899 (_initialize_amd64_tdep): Don't call functions
5900 initialize_tdesc_amd64_*. Add self tests.
5901 * arch/amd64.c (amd64_create_target_description): Add parameter
5902 is_linux. Call set_tdesc_osabi if is_linux is true.
5903 * arch/amd64.h (amd64_create_target_description): Update the
5904 declaration.
5905 * arch/i386.c (i386_create_target_description): Add parameter
5906 is_linux. Call set_tdesc_osabi if is_linux is true.
5907 * arch/i386.h (i386_create_target_description): Update
5908 declaration.
5909 * configure.tgt: Add i386.o to gdb_target_obs.
5910 * features/Makefile (XMLTOC): Remove i386/*.xml.
5911 * features/i386/amd64-avx-avx512.c: Remove.
5912 * features/i386/amd64-avx-mpx-avx512-pku.c: Remove.
5913 * features/i386/amd64-avx-mpx.c: Remove.
5914 * features/i386/amd64-avx.c: Remove.
5915 * features/i386/amd64-mpx.c: Remove.
5916 * features/i386/amd64.c: Remove.
5917 * features/i386/i386-avx-avx512.c: Remove.
5918 * features/i386/i386-avx-mpx-avx512-pku.c: Remove.
5919 * features/i386/i386-avx-mpx.c: Remove.
5920 * features/i386/i386-avx.c: Remove.
5921 * features/i386/i386-mmx.c: Remove.
5922 * features/i386/i386-mpx.c: Remove.
5923 * features/i386/i386.c: Remove.
5924 * i386-tdep.c: Don't include features/i386/i386*.c., include
5925 target-descriptions.h and arch/i386.h.
5926 (i386_target_description): Create target descriptions.
5927 (i386_gdbarch_init): Don't call initialize_tdesc_i386_*
5928 functions. Do self tests.
5929
5930 2017-09-05 Yao Qi <yao.qi@linaro.org>
5931
5932 * features/Makefile (XMLTOC): Remove i386/amd64XXX-linux.xml.
5933 * features/i386/amd64-avx-avx512-linux.c: Removed.
5934 * features/i386/amd64-avx-linux.c: Removed.
5935 * features/i386/amd64-avx-mpx-avx512-pku-linux.c: Removed.
5936 * features/i386/amd64-avx-mpx-linux.c: Removed.
5937 * features/i386/amd64-linux.c: Removed.
5938 * features/i386/amd64-mpx-linux.c: Removed.
5939 * features/i386/x32-avx-avx512-linux.c: Removed.
5940 * features/i386/x32-avx-linux.c: Removed.
5941 * features/i386/x32-linux.c: Removed.
5942
5943 2017-09-05 Yao Qi <yao.qi@linaro.org>
5944
5945 * amd64-linux-tdep.c: Include arch/amd64.h. Don't include
5946 features/i386/*.c.
5947 (amd64_linux_read_description): Call
5948 amd64_create_target_description.
5949 * arch/amd64.c: New file.
5950 * arch/amd64.h: New file.
5951 * configure.tgt (x86_64-*-linux*): Append amd64.o.
5952 * Makefile.in (ALL_64_TARGET_OBS): Append amd64.o.
5953
5954 2017-09-05 Yao Qi <yao.qi@linaro.org>
5955
5956 * amd64-linux-tdep.c: Don't include amd64-XXX-linux and
5957 x32-XXX-linux.c. Include 64bit-XX.c and x32-XX.c.
5958 (amd64_linux_read_description): Create target descriptions.
5959 (_initialize_amd64_linux_tdep): Don't call initialize_tdesc_XXX
5960 functions. Add unit tests.
5961 * features/Makefile (FEATURE_XMLFILES): Append 64bit-XXX.xml and
5962 x32-core.xml.
5963 * features/i386/64bit-avx.c: Generated.
5964 * features/i386/64bit-avx512.c: Generated.
5965 * features/i386/64bit-core.c: Generated.
5966 * features/i386/64bit-linux.c: Generated.
5967 * features/i386/64bit-mpx.c: Generated.
5968 * features/i386/64bit-pkeys.c: Generated.
5969 * features/i386/64bit-segments.c: Generated.
5970 * features/i386/64bit-sse.c: Generated.
5971 * features/i386/x32-core.c: Generated.
5972 * target-descriptions.c (maint_print_c_tdesc_cmd): Print feature
5973 c files for amd64-linux and x32-linux.
5974
5975 2017-09-05 Yao Qi <yao.qi@linaro.org>
5976
5977 * amd64-linux-tdep.c (amd64_linux_read_description): New
5978 function.
5979 (amd64_linux_core_read_description): Call
5980 amd64_linux_read_description.
5981 (amd64_linux_init_abi): Likewise.
5982 (amd64_x32_linux_init_abi): Likewise.
5983 * amd64-linux-tdep.h (amd64_linux_read_description): Declare.
5984 * x86-linux-nat.c (x86_linux_read_description): Call
5985 amd64_linux_read_description.
5986
5987 2017-09-05 Yao Qi <yao.qi@linaro.org>
5988
5989 * amd64-linux-tdep.c (amd64_linux_core_read_description): Update
5990 comments.
5991
5992 2017-09-05 Yao Qi <yao.qi@linaro.org>
5993
5994 * features/Makefile (XMLTOC): Remove i386/i386-XX-linux.xml.
5995 * features/i386/i386-avx-avx512-linux.c: Remove.
5996 * features/i386/i386-avx-linux.c: Remove.
5997 * features/i386/i386-avx-mpx-avx512-pku-linux.c: Remove.
5998 * features/i386/i386-avx-mpx-linux.c: Remove.
5999 * features/i386/i386-linux.c: Remove.
6000 * features/i386/i386-mmx-linux.c: Remove.
6001 * features/i386/i386-mpx-linux.c: Remove.
6002
6003 2017-09-05 Yao Qi <yao.qi@linaro.org>
6004
6005 * Makefile.in (ALL_TARGET_OBS): Add i386.o.
6006 (SFILES): Add arch/i386.c.
6007 (HFILES_NO_SRCDIR): Add arch/i386.h.
6008 * arch/i386.c: New file.
6009 * arch/i386.h: New file.
6010 * arch/tdesc.h (allocate_target_description): Declare.
6011 (set_tdesc_architecture): Declare.
6012 (set_tdesc_osabi): Declare.
6013 * configure.tgt (i[34567]86-*-linux*): Add i386.o.
6014 * i386-linux-tdep.c: Don't include ../features/i386/32bit-XXX.c.
6015 include arch/i386.h.
6016 (i386_linux_read_description): Remove code and call
6017 i386_create_target_description.
6018 (set_tdesc_architecture): New function.
6019 (set_tdesc_osabi): New function.
6020 * target-descriptions.h (allocate_target_description): Remove.
6021
6022 2017-09-05 Yao Qi <yao.qi@linaro.org>
6023
6024 * arch/tdesc.h (tdesc_create_feature): Add an argument xml.
6025 * target-descriptions.c (tdesc_create_feature): Likewise, and
6026 adjust code.
6027 * features/i386/32bit-avx.c: Re-generated.
6028 * features/i386/32bit-avx512.c: Re-generated.
6029 * features/i386/32bit-core.c: Re-generated.
6030 * features/i386/32bit-linux.c: Re-generated.
6031 * features/i386/32bit-mpx.c: Re-generated.
6032 * features/i386/32bit-pkeys.c: Re-generated.
6033 * features/i386/32bit-sse.c: Re-generated.
6034
6035 2017-09-05 Yao Qi <yao.qi@linaro.org>
6036
6037 * regformats/regdef.h (struct reg): Override operator == and !=.
6038
6039 2017-09-05 Yao Qi <yao.qi@linaro.org>
6040
6041 * arch/tdesc.h: New file.
6042 * regformats/regdat.sh: Generate code using tdesc_create_reg.
6043 * target-descriptions.c: Update comments.
6044 * target-descriptions.h: Include "arch/tdesc.h". Remove the
6045 declarations.
6046 * features/i386/32bit-avx.c: Re-generated.
6047 * features/i386/32bit-avx512.c: Re-generated.
6048 * features/i386/32bit-core.c: Re-generated.
6049 * features/i386/32bit-linux.c: Re-generated.
6050 * features/i386/32bit-mpx.c: Re-generated.
6051 * features/i386/32bit-pkeys.c: Re-generated.
6052 * features/i386/32bit-sse.c: Re-generated.
6053
6054 2017-09-05 Yao Qi <yao.qi@linaro.org>
6055
6056 * regformats/regdat.sh: Update generated code.
6057
6058 2017-09-05 Yao Qi <yao.qi@linaro.org>
6059
6060 * regformats/regdat.sh: Adjust code order.
6061
6062 2017-09-05 Simon Marchi <simon.marchi@ericsson.com>
6063
6064 * expprint.c (dump_subexp_body_standard): Use constant format
6065 string in fprintf_filtered call.
6066
6067 2017-09-04 John Baldwin <jhb@FreeBSD.org>
6068
6069 * configure.nat: Add "x86-nat.o x86-dregs.o" for NetBSD/amd64 and
6070 NetBSD/i386.
6071 * x86-bsd-nat.c [!DBREG_DRX && __NetBSD__]: Define DBREG_DRX.
6072
6073 2017-09-04 John Baldwin <jhb@FreeBSD.org>
6074
6075 * bsd-kvm.o: Make <sys/user.h> conditional on HAVE_SYS_USER_H.
6076
6077 2017-09-04 John Baldwin <jhb@FreeBSD.org>
6078
6079 * bsd-kvm.o: Define _KMEMUSER.
6080 * configure.ac: Define _KMEMUSER when checking for "struct lwp".
6081 * configure: Regenerate.
6082
6083 2017-09-04 John Baldwin <jhb@FreeBSD.org>
6084
6085 * amd64-fbsd-nat.c: Add include of "x86-xstate.h".
6086 * i386-fbsd-nat.c: Likewise.
6087
6088 2017-09-04 John Baldwin <jhb@FreeBSD.org>
6089
6090 * unittests/array-view-selftests.c: Add include of <array>.
6091
6092 2017-09-04 John Baldwin <jhb@FreeBSD.org>
6093
6094 * spu-tdep.c (flush_ea_cache): Add missing argument to
6095 call_function_by_hand.
6096
6097 2017-09-04 Pedro Alves <palves@redhat.com>
6098
6099 * NEWS (Safer support for debugging with no debug info): New.
6100
6101 2017-09-04 Pedro Alves <palves@redhat.com>
6102
6103 * c-exp.y (function_method, function_method_void): Add current
6104 instance flags to TYPE_INSTANCE.
6105 * dwarf2read.c (check_modifier): New.
6106 (compute_delayed_physnames): Assert that only C++ adds delayed
6107 physnames. Mark fn_fields as const/volatile depending on
6108 physname.
6109 * eval.c (make_params): New type_instance_flags parameter. Use
6110 it as the new type's instance flags.
6111 (evaluate_subexp_standard) <TYPE_INSTANCE>: Extract the instance
6112 flags element and pass it to make_params.
6113 * expprint.c (print_subexp_standard) <TYPE_INSTANCE>: Handle
6114 instance flags element.
6115 (dump_subexp_body_standard) <TYPE_INSTANCE>: Likewise.
6116 * gdbtypes.h: Include "enum-flags.h".
6117 (type_instance_flags): New enum-flags type.
6118 (TYPE_CONST, TYPE_VOLATILE, TYPE_RESTRICT, TYPE_ATOMIC)
6119 (TYPE_CODE_SPACE, TYPE_DATA_SPACE): Return boolean.
6120 * parse.c (operator_length_standard) <TYPE_INSTANCE>: Adjust.
6121 (follow_type_instance_flags): New function.
6122 (operator_check_standard) <TYPE_INSTANCE>: Adjust.
6123 * parser-defs.h (follow_type_instance_flags): Declare.
6124 * valops.c (value_struct_elt_for_reference): const/volatile must
6125 match too.
6126
6127 2017-09-04 Pedro Alves <palves@redhat.com>
6128
6129 * cp-namespace.c (cp_search_static_and_baseclasses): Handle
6130 function/method scopes; lookup the nested name as a function local
6131 static variable.
6132
6133 2017-09-04 Pedro Alves <palves@redhat.com>
6134
6135 (%type <voidval>): Add function_method.
6136 * c-exp.y (exp): New production for calls with no arguments.
6137 (function_method, function_method_void_or_typelist): New
6138 productions.
6139 (exp): New production for "method()::static_var".
6140 * eval.c (evaluate_subexp_standard): Handle OP_FUNC_STATIC_VAR.
6141 * expprint.c (print_subexp_standard, dump_subexp_body_standard):
6142 Handle OP_FUNC_STATIC_VAR.
6143 * parse.c (operator_length_standard):
6144 Handle OP_FUNC_STATIC_VAR.
6145
6146 2017-09-04 Pedro Alves <palves@redhat.com>
6147
6148 * eval.c (evaluate_subexp_standard): Remove UNOP_MEMVAL_TLS
6149 handling.
6150 * expprint.c (print_subexp_standard, dump_subexp_body_standard):
6151 Ditto.
6152 * parse.c (operator_length_standard, operator_check_standard):
6153 Ditto.
6154 * std-operator.def (UNOP_MEMVAL_TLS): Delete.
6155
6156 2017-09-04 Pedro Alves <palves@redhat.com>
6157
6158 * ax-gdb.c: Include "typeprint.h".
6159 (gen_expr_for_cast): New function.
6160 (gen_expr) <OP_CAST, OP_CAST_TYPE>: Use it.
6161 <OP_VAR_VALUE, OP_MSYM_VAR_VALUE>: Error out if the variable's
6162 type is unknown.
6163 * dwarf2read.c (new_symbol_full): Fallback to int instead of
6164 nodebug_data_symbol.
6165 * eval.c: Include "typeprint.h".
6166 (evaluate_subexp_standard) <OP_VAR_VALUE, OP_VAR_MSYM_VALUE>:
6167 Error out if symbol has unknown type.
6168 <UNOP_CAST, UNOP_CAST_TYPE>: Common bits factored out to
6169 evaluate_subexp_for_cast.
6170 (evaluate_subexp_for_address, evaluate_subexp_for_sizeof): Handle
6171 OP_VAR_MSYM_VALUE.
6172 (evaluate_subexp_for_cast): New function.
6173 * gdbtypes.c (init_nodebug_var_type): New function.
6174 (objfile_type): Use it to initialize types of variables with no
6175 debug info.
6176 * typeprint.c (error_unknown_type): New.
6177 * typeprint.h (error_unknown_type): New declaration.
6178 * compile/compile-c-types.c (convert_type_basic): Handle
6179 TYPE_CODE_ERROR; warn and fallback to int for variables with
6180 unknown type.
6181
6182 2017-09-04 Pedro Alves <palves@redhat.com>
6183
6184 * eval.c (evaluate_var_value): New function, factored out from ...
6185 (evaluate_subexp_standard): ... here.
6186
6187 2017-09-04 Pedro Alves <palves@redhat.com>
6188
6189 * eval.c (evaluate_subexp_standard) <UNOP_COMPLEMENT, UNOP_ADDR>:
6190 Remove useless assignments to 'op'.
6191
6192 2017-09-04 Pedro Alves <palves@redhat.com>
6193
6194 * eval.c (eval_skip_value): New function.
6195 (evaluate_subexp_standard): Use it.
6196
6197 2017-09-04 Pedro Alves <palves@redhat.com>
6198
6199 * eval.c (evaluate_subexp_standard): <OP_FUNCALL>: Extract
6200 function name from symbol/minsym and pass it to
6201 error_call_unknown_return_type.
6202
6203 2017-09-04 Pedro Alves <palves@redhat.com>
6204
6205 * ada-lang.c (resolve_subexp): Handle OP_VAR_MSYM_VALUE.
6206 * ax-gdb.c (gen_msym_var_ref): New function.
6207 (gen_expr): Handle OP_VAR_MSYM_VALUE.
6208 * eval.c (evaluate_var_msym_value): New function.
6209 * eval.c (evaluate_subexp_standard): Handle OP_VAR_MSYM_VALUE.
6210 <OP_FUNCALL>: Extract function name from symbol/minsym and pass it
6211 to call_function_by_hand.
6212 * expprint.c (print_subexp_standard, dump_subexp_body_standard):
6213 Handle OP_VAR_MSYM_VALUE.
6214 (union exp_element) <msymbol>: New field.
6215 * minsyms.h (struct type): Forward declare.
6216 (find_minsym_type_and_address): Declare.
6217 * parse.c (write_exp_elt_msym): New function.
6218 (write_exp_msymbol): Delete, refactored as ...
6219 (find_minsym_type_and_address): ... this new function.
6220 (write_exp_msymbol): Reimplement using OP_VAR_MSYM_VALUE.
6221 (operator_length_standard, operator_check_standard): Handle
6222 OP_VAR_MSYM_VALUE.
6223 * std-operator.def (OP_VAR_MSYM_VALUE): New.
6224
6225 2017-09-04 Pedro Alves <palves@redhat.com>
6226
6227 * ada-lang.c (ada_evaluate_subexp) <TYPE_CODE_FUNC>: Don't handle
6228 TYPE_GNU_IFUNC specially here. Throw error if return type is
6229 unknown.
6230 * ada-typeprint.c (print_func_type): Handle functions with unknown
6231 return type.
6232 * c-typeprint.c (c_type_print_base): Handle functions and methods
6233 with unknown return type.
6234 * compile/compile-c-symbols.c (convert_symbol_bmsym)
6235 <mst_text_gnu_ifunc>: Use nodebug_text_gnu_ifunc_symbol.
6236 * compile/compile-c-types.c: Include "objfiles.h".
6237 (convert_func): For functions with unknown return type, warn and
6238 default to int.
6239 * compile/compile-object-run.c (compile_object_run): Adjust call
6240 to call_function_by_hand_dummy.
6241 * elfread.c (elf_gnu_ifunc_resolve_addr): Adjust call to
6242 call_function_by_hand.
6243 * eval.c (evaluate_subexp_standard): Adjust calls to
6244 call_function_by_hand. Handle functions and methods with unknown
6245 return type. Pass expect_type to call_function_by_hand.
6246 * f-typeprint.c (f_type_print_base): Handle functions with unknown
6247 return type.
6248 * gcore.c (call_target_sbrk): Adjust call to
6249 call_function_by_hand.
6250 * gdbtypes.c (objfile_type): Leave nodebug text symbol with NULL
6251 return type instead of int. Make nodebug_text_gnu_ifunc_symbol be
6252 an integer address type instead of nodebug.
6253 * guile/scm-value.c (gdbscm_value_call): Adjust call to
6254 call_function_by_hand.
6255 * infcall.c (error_call_unknown_return_type): New function.
6256 (call_function_by_hand): New "default_return_type" parameter.
6257 Pass it down.
6258 (call_function_by_hand_dummy): New "default_return_type"
6259 parameter. Use it instead of defaulting to int. If there's no
6260 default and the return type is unknown, throw an error. If
6261 there's a default return type, and the called function has no
6262 debug info, then assume the function is prototyped.
6263 * infcall.h (call_function_by_hand, call_function_by_hand_dummy):
6264 New "default_return_type" parameter.
6265 (error_call_unknown_return_type): New declaration.
6266 * linux-fork.c (call_lseek): Cast return type of lseek.
6267 (inferior_call_waitpid, checkpoint_command): Adjust calls to
6268 call_function_by_hand.
6269 * linux-tdep.c (linux_infcall_mmap, linux_infcall_munmap): Adjust
6270 calls to call_function_by_hand.
6271 * m2-typeprint.c (m2_procedure): Handle functions with unknown
6272 return type.
6273 * objc-lang.c (lookup_objc_class, lookup_child_selector)
6274 (value_nsstring, print_object_command): Adjust calls to
6275 call_function_by_hand.
6276 * p-typeprint.c (pascal_type_print_varspec_prefix): Handle
6277 functions with unknown return type.
6278 (pascal_type_print_func_varspec_suffix): New function.
6279 (pascal_type_print_varspec_suffix) <TYPE_CODE_FUNC,
6280 TYPE_CODE_METHOD>: Use it.
6281 * python/py-value.c (valpy_call): Adjust call to
6282 call_function_by_hand.
6283 * rust-lang.c (rust_evaluate_funcall): Adjust call to
6284 call_function_by_hand.
6285 * valarith.c (value_x_binop, value_x_unop): Adjust calls to
6286 call_function_by_hand.
6287 * valops.c (value_allocate_space_in_inferior): Adjust call to
6288 call_function_by_hand.
6289 * typeprint.c (type_print_unknown_return_type): New function.
6290 * typeprint.h (type_print_unknown_return_type): New declaration.
6291
6292 2017-09-04 Pedro Alves <palves@redhat.com>
6293
6294 * gdbtypes.c (lookup_function_type_with_arguments): Mark function
6295 types with more than one parameter as prototyped.
6296
6297 2017-09-04 Pedro Alves <palves@redhat.com>
6298
6299 * cli/cli-cmds.c (print_disassembly, disassemble_current_function)
6300 (disassemble_command): Use gdb_disassembly_flags instead of bare
6301 int.
6302 * disasm.c (gdb_pretty_print_disassembler::pretty_print_insn)
6303 (dump_insns, do_mixed_source_and_assembly_deprecated)
6304 (do_mixed_source_and_assembly, do_assembly_only, gdb_disassembly):
6305 Use gdb_disassembly_flags instead of bare int.
6306 * disasm.h (DISASSEMBLY_SOURCE_DEPRECATED, DISASSEMBLY_RAW_INSN)
6307 (DISASSEMBLY_OMIT_FNAME, DISASSEMBLY_FILENAME)
6308 (DISASSEMBLY_OMIT_PC, DISASSEMBLY_SOURCE)
6309 (DISASSEMBLY_SPECULATIVE): No longer macros. Instead they're...
6310 (enum gdb_disassembly_flag): ... values of this new enumeration.
6311 (gdb_disassembly_flags): Define.
6312 (gdb_disassembly)
6313 (gdb_pretty_print_disassembler::pretty_print_insn): Use it.
6314 * mi/mi-cmd-disas.c (mi_cmd_disassemble): Use
6315 gdb_disassembly_flags instead of bare int.
6316 * record-btrace.c (btrace_insn_history)
6317 (record_btrace_insn_history, record_btrace_insn_history_range)
6318 (record_btrace_insn_history_from): Use gdb_disassembly_flags
6319 instead of bare int.
6320 * record.c (get_insn_history_modifiers, cmd_record_insn_history):
6321 Use gdb_disassembly_flags instead of bare int.
6322 * target-debug.h (target_debug_print_gdb_disassembly_flags):
6323 Define.
6324 * target-delegates.c: Regenerate.
6325 * target.c (target_insn_history, target_insn_history_from)
6326 (target_insn_history_range): Use gdb_disassembly_flags instead of
6327 bare int.
6328 * target.h: Include "disasm.h".
6329 (struct target_ops) <to_insn_history, to_insn_history_from,
6330 to_insn_history_range>: Use gdb_disassembly_flags instead of bare
6331 int.
6332 (target_insn_history, target_insn_history_from)
6333 (target_insn_history_range): Use gdb_disassembly_flags instead of
6334 bare int.
6335
6336 2017-09-04 Simon Marchi <simon.marchi@ericsson.com>
6337
6338 * cli/cli-script.c (build_command_line): For if/while commands,
6339 check whether args is empty.
6340
6341 2017-09-04 Simon Marchi <simon.marchi@ericsson.com>
6342
6343 * cli/cli-script.h (enum misc_command_type): Move from defs.h.
6344 (enum command_control_type): Likewise.
6345 (struct command_line): Likewise.
6346 (free_command_lines): Likewise.
6347 (struct command_lines_deleter): Likewise.
6348 (command_line_up): Likewise.
6349 (read_command_lines): Likewise.
6350 (read_command_lines_1): Likewise.
6351 * defs.h (enum misc_command_type): Move to cli/cli-script.h.
6352 (enum command_control_type): Likewise.
6353 (struct command_line): Likewise.
6354 (free_command_lines): Likewise.
6355 (struct command_lines_deleter): Likewise.
6356 (command_line_up): Likewise.
6357 (read_command_lines): Likewise.
6358 (read_command_lines_1): Likewise.
6359 * breakpoint.h: Include cli/cli-script.h.
6360 * extension-priv.h: Likewise.
6361 * gdbcmd.h: Likewise.
6362
6363 2017-09-04 Pedro Alves <palves@redhat.com>
6364
6365 * ada-lang.c (is_known_support_routine): Move sal declaration to
6366 where it is initialized.
6367 * breakpoint.c (create_internal_breakpoint, init_catchpoint)
6368 (parse_breakpoint_sals, decode_static_tracepoint_spec)
6369 (clear_command, update_static_tracepoint): Remove init_sal
6370 references. Move declarations closer to initializations.
6371 * cli/cli-cmds.c (list_command): Move sal declarations closer to
6372 initializations.
6373 * elfread.c (elf_gnu_ifunc_resolver_stop): Remove init_sal
6374 references. Move sal declarations closer to initializations.
6375 * frame.c (find_frame_sal): Return a symtab_and_line via function
6376 return instead of output parameter. Remove init_sal references.
6377 * frame.h (find_frame_sal): Return a symtab_and_line via function
6378 return instead of output parameter.
6379 * guile/scm-frame.c (gdbscm_frame_sal): Adjust.
6380 * guile/scm-symtab.c (stscm_make_sal_smob): Use in-place new
6381 instead of memset.
6382 (gdbscm_find_pc_line): Remove init_sal reference.
6383 * infcall.c (call_function_by_hand_dummy): Remove init_sal
6384 references. Move declarations closer to initializations.
6385 * infcmd.c (set_step_frame): Update. Move declarations closer to
6386 initializations.
6387 (finish_backward): Remove init_sal references. Move declarations
6388 closer to initializations.
6389 * infrun.c (process_event_stop_test, handle_step_into_function)
6390 (insert_hp_step_resume_breakpoint_at_frame)
6391 (insert_step_resume_breakpoint_at_caller): Likewise.
6392 * linespec.c (create_sals_line_offset, decode_digits_ordinary)
6393 (symbol_to_sal): Likewise.
6394 * probe.c (parse_probes_in_pspace): Remove init_sal reference.
6395 * python/py-frame.c (frapy_find_sal): Move sal declaration closer
6396 to its initialization.
6397 * reverse.c (save_bookmark_command): Use new/delete. Remove
6398 init_sal references. Move declarations closer to initializations.
6399 * source.c (get_current_source_symtab_and_line): Remove brace
6400 initialization.
6401 (set_current_source_symtab_and_line): Now takes the sal by const
6402 reference. Remove brace initialization.
6403 (line_info): Remove init_sal reference.
6404 * source.h (set_current_source_symtab_and_line): Now takes a
6405 symtab_and_line via const reference.
6406 * stack.c (set_current_sal_from_frame): Adjust.
6407 (print_frame_info): Adjust.
6408 (get_last_displayed_sal): Return the sal via function return
6409 instead of via output parameter. Simplify.
6410 (frame_info): Adjust.
6411 * stack.h (get_last_displayed_sal): Return the sal via function
6412 return instead of via output parameter.
6413 * symtab.c (init_sal): Delete.
6414 (find_pc_sect_line): Remove init_sal references. Move
6415 declarations closer to initializations.
6416 (find_function_start_sal): Remove init_sal references. Move
6417 declarations closer to initializations.
6418 * symtab.h (struct symtab_and_line): In-class initialize all
6419 fields.
6420 * tracepoint.c (set_traceframe_context)
6421 (print_one_static_tracepoint_marker): Remove init_sal references.
6422 Move declarations closer to initializations.
6423 * tui/tui-disasm.c (tui_show_disassem_and_update_source): Adjust.
6424 * tui/tui-stack.c (tui_show_frame_info): Adjust. Move
6425 declarations closer to initializations.
6426 * tui/tui-winsource.c (tui_update_source_window_as_is): Remove
6427 init_sal references. Adjust.
6428
6429 2017-09-04 Pedro Alves <palves@redhat.com>
6430
6431 * ax-gdb.c (agent_command_1): Use range-for.
6432 * break-catch-throw.c (re_set_exception_catchpoint): Update.
6433 * breakpoint.c: Include "common/array-view.h".
6434 (init_breakpoint_sal, create_breakpoint_sal): Change sals
6435 parameter from struct symtabs_and_lines to
6436 array_view<symtab_and_line>. Adjust. Use range-for. Update.
6437 (breakpoint_sals_to_pc): Change sals parameter from struct
6438 symtabs_and_lines to std::vector reference.
6439 (check_fast_tracepoint_sals): Change sals parameter from struct
6440 symtabs_and_lines to std::array_view. Use range-for.
6441 (decode_static_tracepoint_spec): Return a std::vector instead of
6442 symtabs_and_lines. Update.
6443 (create_breakpoint): Update.
6444 (break_range_command, until_break_command, clear_command): Update.
6445 (base_breakpoint_decode_location, bkpt_decode_location)
6446 (bkpt_probe_create_sals_from_location)
6447 (bkpt_probe_decode_location, tracepoint_decode_location)
6448 (tracepoint_probe_decode_location)
6449 (strace_marker_create_sals_from_location): Return a std::vector
6450 instead of symtabs_and_lines.
6451 (strace_marker_create_breakpoints_sal): Update.
6452 (strace_marker_decode_location): Return a std::vector instead of
6453 symtabs_and_lines. Update.
6454 (update_breakpoint_locations): Change struct symtabs_and_lines
6455 parameters to gdb::array_view. Adjust.
6456 (location_to_sals): Return a std::vector instead of
6457 symtabs_and_lines. Update.
6458 (breakpoint_re_set_default): Use std::vector instead of struct
6459 symtabs_and_lines.
6460 (decode_location_default): Return a std::vector instead of
6461 symtabs_and_lines. Update.
6462 * breakpoint.h: Include "common/array-view.h".
6463 (struct breakpoint_ops) <decode_location>: Now returns a
6464 std::vector instead of returning a symtabs_and_lines via output
6465 parameter.
6466 (update_breakpoint_locations): Change sals parameters to use
6467 gdb::array_view.
6468 * cli/cli-cmds.c (edit_command, list_command): Update to use
6469 std::vector and gdb::array_view.
6470 (ambiguous_line_spec): Adjust to use gdb::array_view and
6471 range-for.
6472 (compare_symtabs): Rename to ...
6473 (cmp_symtabs): ... this. Change parameters to symtab_and_line
6474 const reference and adjust.
6475 (filter_sals): Rewrite using std::vector and standard algorithms.
6476 * elfread.c (elf_gnu_ifunc_resolver_return_stop): Simplify.
6477 (jump_command): Update to use std::vector.
6478 * linespec.c (struct linespec_state) <canonical_names>: Update
6479 comment.
6480 (add_sal_to_sals_basic): Delete.
6481 (add_sal_to_sals, filter_results, convert_results_to_lsals)
6482 (decode_line_2, create_sals_line_offset)
6483 (convert_address_location_to_sals, convert_linespec_to_sals)
6484 (convert_explicit_location_to_sals, parse_linespec)
6485 (event_location_to_sals, decode_line_full, decode_line_1)
6486 (decode_line_with_current_source)
6487 (decode_line_with_last_displayed, decode_objc)
6488 (decode_digits_list_mode, decode_digits_ordinary, minsym_found)
6489 (linespec_result::~linespec_result): Adjust to use std::vector
6490 instead of symtabs_and_lines.
6491 * linespec.h (linespec_sals::sals): Now a std::vector.
6492 (struct linespec_result): Use std::vector, bool, and in-class
6493 initialization.
6494 (decode_line_1, decode_line_with_current_source)
6495 (decode_line_with_last_displayed): Return std::vector.
6496 * macrocmd.c (info_macros_command): Use std::vector.
6497 * mi/mi-main.c (mi_cmd_trace_find): Use std::vector.
6498 * probe.c (parse_probes_in_pspace, parse_probes): Adjust to use
6499 std::vector.
6500 * probe.h (parse_probes): Return a std::vector.
6501 * python/python.c (gdbpy_decode_line): Use std::vector and
6502 gdb::array_view.
6503 * source.c (select_source_symtab, line_info): Use std::vector.
6504 * stack.c (func_command): Use std::vector.
6505 * symtab.h (struct symtabs_and_lines): Delete.
6506 * tracepoint.c (tfind_line_command, scope_info): Use std::vector.
6507
6508 2017-09-04 Pedro Alves <palves@redhat.com>
6509
6510 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
6511 unittests/array-view-selftests.c.
6512 (SUBDIR_UNITTESTS_OBS): Add array-view-selftests.o.
6513 * common/array-view.h: New file.
6514 * unittests/array-view-selftests.c: New file.
6515
6516 2017-09-04 Pedro Alves <palves@redhat.com>
6517
6518 * cli/cli-cmds.c (edit_command): Pass message to
6519 ambiguous_line_spec.
6520 (list_command): Pass message to ambiguous_line_spec. Say
6521 "first"/"last" instead of "start" and "end" to be consistent with
6522 the manual.
6523 (ambiguous_line_spec): Add 'format' and vararg parameters. Use
6524 them to print formatted message.
6525
6526 2017-09-04 Pedro Alves <palves@redhat.com>
6527
6528 * btrace.c (ftrace_add_pt): Pass btrace_insn to
6529 ftrace_update_insns by reference instead of pointer.
6530
6531 2017-09-04 Yao Qi <yao.qi@linaro.org>
6532
6533 * i386-go32-tdep.c: Include x86-xstate.h.
6534 (i386_go32_init_abi): Call i386_target_description.
6535 * i386-tdep.c (i386_target_description): Return tdesc_i386_mmx
6536 if xcr0 is X86_XSTATE_X87_MASK.
6537 * i386-tdep.h (tdesc_i386): Remove the declaration.
6538 (tdesc_i386_mmx): Likewise.
6539
6540 2017-09-04 Yao Qi <yao.qi@linaro.org>
6541
6542 * i386-fbsd-tdep.c (i386fbsd_core_read_xcr0): Return
6543 X86_XSTATE_SSE_MASK instead of 0.
6544
6545 2017-09-04 Yao Qi <yao.qi@linaro.org>
6546
6547 * amd64-fbsd-nat.c (amd64fbsd_read_description): Call
6548 i386_target_description.
6549 * i386-fbsd-nat.c (i386fbsd_read_description): Call
6550 i386_target_description.
6551 * i386-tdep.c (i386_gdbarch_init): Likewise.
6552
6553 2017-09-04 Yao Qi <yao.qi@linaro.org>
6554
6555 * amd64-darwin-tdep.c: Include "x86-xstate.h".
6556 (x86_darwin_init_abi_64): Call amd64_target_description.
6557 * amd64-dicos-tdep.c: Likewise.
6558 * amd64-fbsd-nat.c: Likewise.
6559 * amd64-fbsd-tdep.c: Likewise.
6560 * amd64-nbsd-tdep.c: Likewise.
6561 * amd64-obsd-tdep.c: Likewise.
6562 * amd64-sol2-tdep.c: Likewise.
6563 * amd64-windows-tdep.c: Likewise.
6564 * amd64-tdep.h (tdesc_amd64): Remove the declaration.
6565
6566 2017-09-04 Simon Marchi <simon.marchi@ericsson.com>
6567
6568 * btrace.h (btrace_insn_s, DEF_VEC_O (btrace_insn_s)): Remove.
6569 (btrace_function) <insn>: Change type to use std::vector.
6570 * btrace.c (ftrace_debug, ftrace_call_num_insn,
6571 ftrace_find_call, ftrace_new_gap, ftrace_update_function,
6572 ftrace_update_insns, ftrace_compute_global_level_offset,
6573 btrace_stitch_bts, btrace_clear, btrace_insn_get,
6574 btrace_insn_end, btrace_insn_next, btrace_insn_prev): Adjust to
6575 change to std::vector.
6576 (ftrace_update_insns): Adjust to change to std::vector, change
6577 type of INSN parameter.
6578 (btrace_compute_ftrace_bts): Adjust call to ftrace_update_insns.
6579 * record-btrace.c (btrace_call_history_insn_range,
6580 btrace_compute_src_line_range,
6581 record_btrace_frame_prev_register): Adjust to change to
6582 std::vector.
6583 * python/py-record-btrace.c (recpy_bt_func_instructions): Adjust
6584 to change to std::vector.
6585
6586 2017-09-03 Tom Tromey <tom@tromey.com>
6587
6588 * corefile.c (reopen_exec_file): Use std::string.
6589
6590 2017-09-03 Tom Tromey <tom@tromey.com>
6591
6592 * compile/compile.c (compile_register_name_mangled): Return
6593 std::string.
6594 * compile/compile-loc2c.c (pushf_register_address): Update.
6595 (pushf_register): Update.
6596 * compile/compile-c-types.c (convert_array): Update.
6597 * compile/compile-c-symbols.c (generate_vla_size): Update.
6598 (error_symbol_once): Use a gdb::unique_xmalloc_ptr.
6599 (symbol_substitution_name): Return a gdb::unique_xmalloc_ptr.
6600 (convert_one_symbol): Update.
6601 (generate_c_for_for_one_variable): Update.
6602 * compile/compile-c-support.c (c_get_range_decl_name): Return a
6603 std::string.
6604 (generate_register_struct): Update.
6605 * compile/compile-internal.h (c_get_range_decl_name): Return a
6606 std::string.
6607 (compile_register_name_mangled): Return std::string.
6608
6609 2017-09-03 Tom Tromey <tom@tromey.com>
6610
6611 * utils.c (perror_string): Return a std::string.
6612 (throw_perror_with_name, perror_warning_with_name): Update.
6613
6614 2017-09-03 Tom Tromey <tom@tromey.com>
6615
6616 * demangle.c (demangle_command): Use std::string,
6617 unique_xmalloc_ptr.
6618
6619 2017-09-03 Tom Tromey <tom@tromey.com>
6620
6621 * cli/cli-setshow.c (do_set_command): Use std::string.
6622
6623 2017-09-03 Tom Tromey <tom@tromey.com>
6624
6625 * cli/cli-cmds.c (cd_command): Use gdb::unique_xmalloc_ptr.
6626
6627 2017-09-03 Tom Tromey <tom@tromey.com>
6628
6629 * mi/mi-interp.c (mi_cmd_interpreter_exec): Use std::string.
6630
6631 2017-09-03 Tom Tromey <tom@tromey.com>
6632
6633 * mi/mi-cmd-env.c (env_execute_cli_command): Use
6634 gdb::unique_xmalloc_ptr.
6635
6636 2017-09-03 Tom Tromey <tom@tromey.com>
6637
6638 * thread.c (print_thread_info_1): Use string_printf.
6639 (thread_apply_command, thread_apply_all_command): Use
6640 std::string.
6641
6642 2017-09-03 Tom Tromey <tom@tromey.com>
6643
6644 * valprint.c (val_print_string): Update.
6645 * gdbcore.h (memory_error_message): Return std::string.
6646 * corefile.c (memory_error_message): Return std::string.
6647 (memory_error): Update.
6648 * breakpoint.c (insert_bp_location): Update.
6649
6650 2017-09-03 Simon Marchi <simon.marchi@ericsson.com>
6651
6652 * target/waitstatus.h (target_waitstatus_to_string): Change
6653 return type to std::string.
6654 * target/waitstatus.c (target_waitstatus_to_string): Return
6655 std::string.
6656 * target.h (target_waitstatus_to_string): Remove declaration.
6657 * infrun.c (resume, clear_proceed_status_thread,
6658 print_target_wait_results, do_target_wait, save_waitstatus,
6659 stop_all_threads): Adjust.
6660 * record-btrace.c (record_btrace_wait): Adjust.
6661 * target-debug.h
6662 (target_debug_print_struct_target_waitstatus_p): Adjust.
6663
6664 2017-09-01 Jan Kratochvil <jan.kratochvil@redhat.com>
6665
6666 PR gdb/22046
6667 * nat/linux-procfs.c (parse_proc_status_state): Fix PROC_STATE_STOPPED
6668 detection.
6669
6670 2017-08-31 Sergio Durigan Junior <sergiodj@redhat.com>
6671
6672 * NEWS (Changes since GDB 8.0): Add entry mentioning new support
6673 for setting/unsetting environment variables on the remote target.
6674 (New remote packets): Add entries for QEnvironmentHexEncoded,
6675 QEnvironmentUnset and QEnvironmentReset.
6676 * common/environ.c (gdb_environ::operator=): Extend method to
6677 handle m_user_set_env_list and m_user_unset_env_list.
6678 (gdb_environ::clear): Likewise.
6679 (match_var_in_string): Change type of first parameter from 'char
6680 *' to 'const char *'.
6681 (gdb_environ::set): Extend method to handle
6682 m_user_set_env_list and m_user_unset_env_list.
6683 (gdb_environ::unset): Likewise.
6684 (gdb_environ::clear_user_set_env): New method.
6685 (gdb_environ::user_set_envp): Likewise.
6686 (gdb_environ::user_unset_envp): Likewise.
6687 * common/environ.h (gdb_environ): Handle m_user_set_env_list and
6688 m_user_unset_env_list on move constructor/assignment.
6689 (unset): Add new default parameter 'update_unset_list = true'.
6690 (clear_user_set_env): New method.
6691 (user_set_envp): Likewise.
6692 (user_unset_envp): Likewise.
6693 (m_user_set_env_list): New std::set.
6694 (m_user_unset_env_list): Likewise.
6695 * common/rsp-low.c (hex2str): New function.
6696 (bin2hex): New overload for bin2hex function.
6697 * common/rsp-low.c (hex2str): New prototype.
6698 (str2hex): New overload prototype.
6699 * remote.c: Include "environ.h". Add QEnvironmentHexEncoded,
6700 QEnvironmentUnset and QEnvironmentReset.
6701 (remote_protocol_features): Add QEnvironmentHexEncoded,
6702 QEnvironmentUnset and QEnvironmentReset packets.
6703 (send_environment_packet): New function.
6704 (extended_remote_environment_support): Likewise.
6705 (extended_remote_create_inferior): Call
6706 extended_remote_environment_support.
6707 (_initialize_remote): Add QEnvironmentHexEncoded,
6708 QEnvironmentUnset and QEnvironmentReset packet configs.
6709 * unittests/environ-selftests.c (gdb_selftest_env_var):
6710 New variable.
6711 (test_vector_initialization): New function.
6712 (test_init_from_host_environ): Likewise.
6713 (test_reinit_from_host_environ): Likewise.
6714 (test_set_A_unset_B_unset_A_cannot_find_A_can_find_B):
6715 Likewise.
6716 (test_unset_set_empty_vector): Likewise.
6717 (test_vector_clear): Likewise.
6718 (test_std_move): Likewise.
6719 (test_move_constructor):
6720 (test_self_move): Likewise.
6721 (test_set_unset_reset): Likewise.
6722 (run_tests): Rewrite in terms of the functions above.
6723
6724 2017-08-31 Weimin Pan <weimin.pan@oracle.com>
6725
6726 * sparc64-tdep.c (adi_stat_t): Fix comment formatting.
6727 (adi_available): Use a temp variable of type CORE_ADDR as argument
6728 3 when calling target_auxv_search.
6729 (adi_normalize_address): Use masks and xor operators to calculate
6730 normalized address.
6731 (adi_read_versions, adi_write_versions, adi_print_versions)
6732 (do_examine, do_assign): Use paddress.
6733
6734 2017-08-29 John Baldwin <jhb@FreeBSD.org>
6735
6736 * mips-fbsd-nat.c (getfpregs_supplies): Return true for FIR.
6737 * mips-fbsd-tdep.c (mips_fbsd_supply_fpregs): Split supply of FSR
6738 out of loop and add supply of FIR.
6739 (mips_fbsd_collect_fpregs): Split collect of FSR out of loop and
6740 add collect of FIR.
6741
6742 2017-08-28 Simon Marchi <simon.marchi@ericsson.com>
6743
6744 PR gdb/21827
6745 * cli/cli-script.c (define_command): Don't convert command name
6746 to lower case.
6747
6748 2017-08-25 Joel Brobecker <brobecker@adacore.com>
6749
6750 * ada-lang.c (ada_lookup_struct_elt_type): Remove parameter "dispp".
6751 Update all callers accordingly. Remove all code blocks handling
6752 the case where DISPP is not NULL.
6753
6754 2017-08-24 Jan Kratochvil <jan.kratochvil@redhat.com>
6755
6756 PR symtab/22003
6757 * dwarf2read.c (dwarf2_const_value_attr, dump_die_shallow)
6758 (dwarf2_get_attr_constant_value, dwarf2_fetch_constant_bytes)
6759 (skip_form_bytes, attr_form_is_constant): Handle DW_FORM_implicit_const.
6760
6761 2017-08-24 Jan Kratochvil <jan.kratochvil@redhat.com>
6762
6763 * dwarf2read.c (build_type_psymtabs_reader): New prototype.
6764 (process_psymtab_comp_unit): Accept IS_DEBUG_TYPES.
6765 (read_comp_units_from_section): New parameter abbrev_section, use
6766 read_and_check_comp_unit_head, allocate signatured_type if needed.
6767 (create_all_comp_units): Update read_comp_units_from_section caller.
6768
6769 2017-08-23 Pedro Alves <palves@redhat.com>
6770
6771 PR remote/21852
6772 * remote.c (add_current_inferior_and_thread): Set inferior_ptid
6773 to null_ptid and switch to thread without reading the registers
6774 after adding the inferior.
6775
6776 2017-08-23 Jan Kratochvil <jan.kratochvil@redhat.com>
6777
6778 * NEWS (Changes since GDB 8.0): Add set compile-gcc and show
6779 compile-gcc.
6780 * compile/compile.c (compile_gcc, show_compile_gcc): New.
6781 (compile_to_object): Implement compile_gcc.
6782 (_initialize_compile): Install "set compile-gcc". Initialize
6783 compile_gcc.
6784
6785 2017-08-23 Jan Kratochvil <jan.kratochvil@redhat.com>
6786
6787 * compile/compile.c (compile_to_object): Conditionally call
6788 set_verbose. Conditionally call compile or compile_v0.
6789
6790 2017-08-07 Weimin Pan <weimin.pan@oracle.com>
6791
6792 * sparc64-tdep.h: (adi_normalize_address): New export.
6793 * sparc-nat.h: (open_adi_tag_fd): New export.
6794 * sparc64-linux-nat.c: (open_adi_tag_fd): New function.
6795 * sparc64-linux-tdep.c:
6796 (SEGV_ACCADI, SEGV_ADIDERR, SEGV_ADIPERR) New defines.
6797 (sparc64_linux_handle_segmentation_fault): New function.
6798 (sparc64_linux_init_abi): Register
6799 sparc64_linux_handle_segmentation_fault
6800 * sparc64-tdep.c: Include cli-utils.h,gdbcmd.h,auxv.h.
6801 (sparc64_addr_bits_remove): New function.
6802 (sparc64_init_abi): Register sparc64_addr_bits_remove.
6803 (MAX_PROC_NAME_SIZE): New macro.
6804 (AT_ADI_BLKSZ, AT_ADI_NBITS, AT_ADI_UEONADI) New defines.
6805 (sparc64adilist): New variable.
6806 (adi_proc_list): New variable.
6807 (find_adi_info): New function.
6808 (add_adi_info): New function.
6809 (get_adi_info_proc): New function.
6810 (get_adi_info): New function.
6811 (info_adi_command): New function.
6812 (read_maps_entry): New function.
6813 (adi_available): New function.
6814 (adi_normalize_address): New function.
6815 (adi_align_address): New function.
6816 (adi_convert_byte_count): New function.
6817 (adi_tag_fd): New function.
6818 (adi_is_addr_mapped): New function.
6819 (adi_read_versions): New function.
6820 (adi_write_versions): New function.
6821 (adi_print_versions): New function.
6822 (do_examine): New function.
6823 (do_assign): New function.
6824 (adi_examine_command): New function.
6825 (adi_assign_command): New function.
6826 (_initialize_sparc64_adi_tdep): New function.
6827
6828 2017-08-22 Simon Marchi <simon.marchi@ericsson.com>
6829
6830 * breakpoint.c (breakpoints_info): Rename to ...
6831 (info_breakpoints_command): ... this.
6832 (watchpoints_info): Rename to ...
6833 (info_watchpoints_command): ... this.
6834 (tracepoints_info): Rename to ...
6835 (info_tracepoints_command): ... this.
6836 (_initialize_breakpoint): Adjust.
6837 * dcache.c (dcache_info): Rename to ...
6838 (info_display_command): ... this.
6839 (_initialize_dcache): Adjust.
6840 * frame.h (args_info): Rename to ...
6841 (info_args_command): ... this.
6842 (locals_info): Rename to ...
6843 (info_locals_command): ... this.
6844 * infcmd.c (nofp_registers_info): Rename to ...
6845 (info_registers_command): ... this.
6846 (float_info): Rename to ...
6847 (info_float_command): ... this.
6848 (program_info): Rename to ...
6849 (info_program_command): ... this.
6850 (all_registers_info): Rename to ...
6851 (info_all_registers_command): ... this.
6852 (vector_info): Rename to ...
6853 (info_vector_command): ... this.
6854 (float_info): Rename to ...
6855 (info_float_command): ... this.
6856 (_initialize_infcmd): Adjust.
6857 * inferior.h (term_info): Rename to ...
6858 (info_terminal_command): ... this.
6859 * inflow.c (term_info): Rename to ...
6860 (info_terminal_command): ... this.
6861 (_initialize_inflow): Adjust.
6862 * infrun.c (signals_info): Rename to ...
6863 (info_signals_command): ... this.
6864 (_initialize_infrun): Adjust.
6865 * objc-lang.c (classes_info): Rename to ...
6866 (info_classes_command): ... this.
6867 (selectors_info): Rename to ...
6868 (info_selectors_command): ... this.
6869 (_initialize_objc_language): Adjust.
6870 * printcmd.c (sym_info): Rename to ...
6871 (info_symbol_command): ... this.
6872 (address_info): Rename to ...
6873 (info_address_command): ... this.
6874 (display_info): Rename to ...
6875 (info_display_command): ... this.
6876 (_initialize_printcmd): Adjust.
6877 * reverse.c (bookmarks_info): Rename to ...
6878 (info_breakpoints_command): ... this.
6879 (_initialize_reverse): Adjust.
6880 * ser-go32.c (dos_info): Rename to ...
6881 (info_serial_command): ... this.
6882 (_initialize_ser_dos): Adjust.
6883 * skip.c (skip_info): Rename to ...
6884 (info_skip_command): ... this.
6885 (_initialize_step_skip): Adjust.
6886 * source.c (line_info): Rename to ...
6887 (info_line_command): ... this.
6888 (source_info): Rename to ...
6889 (info_source_command)
6890 * stack.c (frame_info): Rename to ...
6891 (info_frame_command): ... this.
6892 (locals_info): Rename to ...
6893 (info_locals_command): ... this.
6894 (args_info): Rename to ...
6895 (info_args_command): ... this.
6896 (_initialize_stack): Adjust.
6897 * symtab.c (sources_info): Rename to ...
6898 (info_sources_command): ... this.
6899 (variables_info): Rename to ...
6900 (info_variables_command): ... this.
6901 (functions_info): Rename to ...
6902 (info_functions_command): ... this.
6903 (types_info): Rename to ...
6904 (info_types_command): ... this.
6905 (_initialize_symtab): Adjust.
6906 * target.c (target_info): Rename to ...
6907 (info_target_command): ... this.
6908 (initialize_targets): Adjust.
6909 * tracepoint.c (tvariables_info): Rename to ...
6910 (info_tvariables_command): ... this.
6911 (scope_info): Rename to ...
6912 (info_scope_command): ... this.
6913 (trace_dump_actions): Adjust.
6914 (_initialize_tracepoint): Adjust.
6915
6916 2017-08-22 Tom Tromey <tom@tromey.com>
6917
6918 * breakpoint.h (install_breakpoint): Update.
6919 * breakpoint.c (add_solib_catchpoint): Update.
6920 (install_breakpoint): Change argument to a std::unique_ptr.
6921 (create_fork_vfork_event_catchpoint): Use std::unique_ptr.
6922 (create_breakpoint_sal, create_breakpoint): Update.
6923 (watch_command_1, catch_exec_command_1)
6924 (strace_marker_create_breakpoints_sal): Use std::unique_ptr.
6925 (add_to_breakpoint_chain): Change argument to a std::unique_ptr.
6926 Return the breakpoint.
6927 (set_raw_breakpoint_without_location, set_raw_breakpoint)
6928 (new_single_step_breakpoint): Update.
6929 * break-catch-throw.c (handle_gnu_v3_exceptions): Use
6930 std::unique_ptr.
6931 * break-catch-syscall.c (create_syscall_event_catchpoint): Use
6932 std::unique_ptr.
6933 * break-catch-sig.c (create_signal_catchpoint): Use
6934 std::unique_ptr.
6935 * ada-lang.c (create_ada_exception_catchpoint): Use
6936 std::unique_ptr.
6937
6938 2017-08-22 Tom Tromey <tom@tromey.com>
6939
6940 * breakpoint.c (add_solib_catchpoint): Use std::unique_ptr.
6941
6942 2017-08-22 Tom Tromey <tom@tromey.com>
6943
6944 * psymtab.c (psymtab_search_name): Return a unique_xmalloc_ptr.
6945 (lookup_partial_symbol): Update.
6946
6947 2017-08-22 Tom Tromey <tom@tromey.com>
6948
6949 * source.h (rewrite_source_path): Return a unique_xmalloc_ptr.
6950 * source.c (rewrite_source_path): Return a unique_xmalloc_ptr.
6951 (find_and_open_source, symtab_to_fullname): Update.
6952 * psymtab.c (psymtab_to_fullname): Update.
6953
6954 2017-08-22 Tom Tromey <tom@tromey.com>
6955
6956 * exec.c (exec_file_attach): Update.
6957 * linux-thread-db.c (try_thread_db_load): Update.
6958 * guile/scm-safe-call.c (gdbscm_safe_source_script): Update.
6959 * utils.c (gdb_realpath): Change return type.
6960 (gdb_realpath_keepfile): Update.
6961 (gdb_realpath_check_trailer, gdb_realpath_tests): New functions.
6962 (_initialize_utils): Register the new self test.
6963 * source.c (openp): Update.
6964 (find_and_open_source): Update.
6965 * nto-tdep.c (nto_find_and_open_solib): Update.
6966 * main.c (set_gdb_data_directory): Update.
6967 (captured_main_1): Update.
6968 * dwarf2read.c (dwarf2_get_dwz_file): Update
6969 (dw2_map_symbol_filenames): Update.
6970 * auto-load.c (auto_load_safe_path_vec_update): Update.
6971 (filename_is_in_auto_load_safe_path_vec): Change type of
6972 "filename_realp".
6973 (auto_load_objfile_script): Update.
6974 (file_is_auto_load_safe): Update. Use std::string.
6975 * utils.h (gdb_realpath): Return a gdb::unique_xmalloc_ptr.
6976
6977 2017-08-22 Tom Tromey <tom@tromey.com>
6978
6979 * utils.c (gdb_realpath_keepfile): Return a
6980 gdb::unique_xmalloc_ptr.
6981 * exec.c (exec_file_attach): Update.
6982 * utils.h (gdb_realpath_keepfile): Return a
6983 gdb::unique_xmalloc_ptr.
6984
6985 2017-08-22 Tom Tromey <tom@tromey.com>
6986
6987 * compile/compile.c (compile_file_command): Use
6988 gdb::unique_xmalloc_ptr, std::string.
6989 * utils.c (gdb_abspath): Change return type.
6990 * source.c (openp): Update.
6991 * objfiles.c (allocate_objfile): Update.
6992 * main.c (set_gdb_data_directory): Update.
6993 * utils.h (gdb_abspath): Return a gdb::unique_xmalloc_ptr.
6994
6995 2017-08-22 Zhouyi Zhou <zhouzhouyi@gmail.com>
6996
6997 * cli-cmds.c (list_commands): List actual code around more than
6998 one location.
6999
7000 2017-08-21 John Baldwin <jhb@FreeBSD.org>
7001
7002 * fbsd-nat.c (fbsd_add_threads): Use array type for `lwps'.
7003
7004 2017-08-21 Pedro Alves <palves@redhat.com>
7005
7006 PR gdb/19487
7007 * c-exp.y (variable production): Handle function aliases.
7008 * minsyms.c (msymbol_is_text): New function.
7009 * minsyms.h (msymbol_is_text): Declare.
7010 * symtab.c (find_function_alias_target): New function.
7011 * symtab.h (find_function_alias_target): Declare.
7012
7013 2017-08-21 Pedro Alves <palves@redhat.com>
7014
7015 * eval.c (evaluate_subexp_standard) <OP_TYPE>: Don't dig past
7016 typedefs.
7017 * typeprint.c (whatis_exp): If handling "whatis", and expression
7018 is OP_TYPE, strip one typedef level. Otherwise don't strip
7019 typedefs here.
7020 * valops.c (value_cast): Save "to" type before resolving
7021 stubs/typedefs. Use that type as resulting value's type.
7022
7023 2017-08-18 Tom Tromey <tom@tromey.com>
7024 Pedro Alves <palves@redhat.com>
7025
7026 * spu-multiarch.c (parse_spufs_run): Use scoped_restore.
7027 * sol-thread.c (sol_thread_resume, sol_thread_wait)
7028 (sol_thread_xfer_partial, rw_common): Use scoped_restore.
7029 * procfs.c (procfs_do_thread_registers): Use scoped_restore.
7030 * proc-service.c (ps_xfer_memory): Use scoped_restore.
7031 * linux-tdep.c (linux_corefile_thread): Remove a cleanup.
7032 (linux_get_siginfo_data): Add "thread" argument. Use
7033 scoped_restore.
7034 * linux-nat.c (linux_child_follow_fork)
7035 (check_stopped_by_watchpoint): Use scoped_restore.
7036 * infrun.c (displaced_step_prepare_throw, write_memory_ptid)
7037 (THREAD_STOPPED_BY, handle_signal_stop): Use scoped_restore.
7038 (restore_inferior_ptid, save_inferior_ptid): Remove.
7039 * btrace.c (btrace_fetch): Use scoped_restore.
7040 * bsd-uthread.c (bsd_uthread_fetch_registers)
7041 (bsd_uthread_store_registers): Use scoped_restore.
7042 * breakpoint.c (reattach_breakpoints, detach_breakpoints): Use
7043 scoped_restore.
7044 * aix-thread.c (aix_thread_resume, aix_thread_wait)
7045 (aix_thread_xfer_partial): Use scoped_restore.
7046 * inferior.h (save_inferior_ptid): Remove.
7047
7048 2017-08-18 Yao Qi <yao.qi@linaro.org>
7049
7050 PR tdep/21818
7051 * arm-tdep.c (gdb_print_insn_arm): Mark
7052 USER_SPECIFIED_MACHINE_TYPE if exec_bfd isn't NULL.
7053
7054 2017-08-18 Yao Qi <yao.qi@linaro.org>
7055
7056 * NEWS: Mention GDBserver's new option "--selftest".
7057 * Makefile.in (SFILES): Remove selftest.c, add common/selftest.c.
7058 * selftest.c: Move it to common/selftest.c.
7059 * selftest.h: Move it to common/selftest.h.
7060 * selftest-arch.c (reset): New function.
7061 (tests_with_arch): Call reset.
7062
7063 2017-08-18 Yao Qi <yao.qi@linaro.org>
7064
7065 * selftest.c (run_tests): Don't call QUIT. Call debug_printf
7066 instead of exception_fprintf and printf_filtered.
7067
7068 2017-08-18 Yao Qi <yao.qi@linaro.org>
7069
7070 * selftest.c (register_self_test): Rename it to
7071 selftests::register_test.
7072 (run_self_tests): selftest::run_tests.
7073 * selftest.h: Update declarations.
7074 * selftest-arch.c (register_self_test_foreach_arch): Rename it to
7075 selftests::register_test_foreach_arch.
7076 * selftest-arch.h: Update declaration.
7077 * aarch64-tdep.c: Update.
7078 * arm-tdep.c: Likewise.
7079 * disasm-selftests.c: Likewise.
7080 * dwarf2loc.c: Likewise.
7081 * dwarf2-frame.c: Likewise.
7082 * findvar.c: Likewise.
7083 * gdbarch-selftests.c: Likewise.
7084 * maint.c (maintenance_selftest): Likewise.
7085 * regcache.c: Likewise.
7086 * rust-exp.y: Likewise.
7087 * selftest-arch.c: Likewise.
7088 * unittests/environ-selftests.c: Likewise.
7089 * unittests/function-view-selftests.c: Likewise.
7090 * unittests/offset-type-selftests.c: Likewise.
7091 * unittests/optional-selftests.c: Likewise.
7092 * unittests/scoped_restore-selftests.c: Likewise.
7093 * utils-selftests.c: Likewise.
7094
7095 2017-08-17 Pedro Alves <palves@redhat.com>
7096
7097 * cli/cli-cmds.c (source_command): Delete 'old_source_verbose'
7098 local.
7099
7100 2017-08-17 Pedro Alves <palves@redhat.com>
7101
7102 * dwarf2read.c (struct dwarf2_cu) <line_header_die_owner>: New
7103 field.
7104 (reset_die_in_process): Delete, replaced by ...
7105 (process_die_scope): ... this new class. Make it responsible for
7106 freeing cu->line_header too.
7107 (process_die): Use process_die_scope.
7108 (handle_DW_AT_stmt_list): Record the line header's owner CU/DIE in
7109 cu->line_header_die_owner. Don't release the line header if it's
7110 owned by the CU.
7111 (setup_type_unit_groups): Make the CU/DIE own the line header.
7112 Don't release the line header here.
7113
7114 2017-08-17 Alex Lindsay <alexlindsay239@gmail.com> (tiny change)
7115
7116 * elfread.c (elf_read_minimal_symbols): xfree synthsyms.
7117
7118 2017-08-17 Ruslan Kabatsayev <b7.10110111@gmail.com>
7119
7120 * NEWS: Mention new shortcuts for nexti and stepi in TUI
7121 Single-Key mode
7122
7123 2017-08-16 Ruslan Kabatsayev <b7.10110111@gmail.com>
7124
7125 * tui/tui.c (tui_commands): Add "nexti" and "stepi" to the Single-Key
7126 mode command list.
7127
7128 2017-08-15 Stafford Horne <shorne@gmail.com>
7129
7130 * MAINTAINERS (Write After Approval): Add Stafford Horne.
7131
7132 2017-08-15 Stafford Horne <shorne@gmail.com>
7133
7134 * xtensa-tdep.c (xtensa_init_reggroups): Use xstrdup for cpname.
7135
7136 2017-08-15 Sergio Durigan Junior <sergiodj@redhat.com>
7137
7138 PR gdb/21954
7139 * infcmd.c (unset_environment_command): Use the 'clear' method on
7140 the environment instead of resetting it.
7141
7142 2017-08-15 John Baldwin <jhb@FreeBSD.org>
7143
7144 * fbsd-nat.c (fbsd_convert_siginfo): Fix compile on big-endian
7145 platforms.
7146
7147 2017-08-14 Tom Tromey <tom@tromey.com>
7148
7149 * valprint.c (print_octal_chars): Use HOST_CHAR_BIT.
7150 (print_binary_chars): Likewise.
7151 (BITS_IN_BYTES): Remove.
7152
7153 2017-08-14 Tom Tromey <tom@tromey.com>
7154
7155 PR gdb/21675
7156 * valprint.c (LOW_ZERO): Change value to 034.
7157 (print_octal_chars): Add static_asserts for octal constants.
7158 * printcmd.c (print_scalar_formatted): Add 'd' case.
7159
7160 2017-08-11 Tom Tromey <tom@tromey.com>
7161
7162 * symfile.c (add_symbol_file_command): Use std::vector.
7163
7164 2017-08-14 Tom Tromey <tom@tromey.com>
7165
7166 * break-catch-throw.c (handle_gnu_v3_exceptions): Use std::move.
7167 * break-catch-syscall.c (create_syscall_event_catchpoint): Use
7168 std::move.
7169 * break-catch-sig.c (create_signal_catchpoint): Use std::move.
7170
7171 2017-08-11 Pedro Alves <palves@redhat.com>
7172
7173 * infrun.c (process_event_stop_test): Adjust
7174 function_name_is_marked_for_skip call.
7175 * skip.c: Include <list>.
7176 (skiplist_entry): Make it a class with private fields, and
7177 getters/setters.
7178 (skiplist_entry_chain): Delete.
7179 (skiplist_entries): New.
7180 (skiplist_entry_count): Delete.
7181 (highest_skiplist_entry_num): New.
7182 (ALL_SKIPLIST_ENTRIES, ALL_SKIPLIST_ENTRIES_SAFE): Delete.
7183 (add_skiplist_entry): Delete.
7184 (skiplist_entry::skiplist_entry): New.
7185 (skiplist_entry::add_entry): New.
7186 (skip_file_command, skip_function): Adjust.
7187 (compile_skip_regexp): Delete.
7188 (skip_command): Don't compile regexp here. Adjust to use
7189 skiplist_entry::add_entry.
7190 (skip_info): Adjust to use range-for and getters.
7191 (skip_enable_command, skip_disable_command): Adjust to use
7192 range-for and setters.
7193 (skip_delete_command): Adjust to use std::list.
7194 (add_skiplist_entry): Delete.
7195 (skip_file_p): Delete, refactored as ...
7196 (skiplist_entry::do_skip_file_p): ... this new method.
7197 (skip_gfile_p): Delete, refactored as ...
7198 (skiplist_entry::do_gskip_file_p): ... this new method.
7199 (skip_function_p, skip_rfunction_p): Delete, refactored as ...
7200 (skiplist_entry::skip_function_p): ... this new method.
7201 (function_name_is_marked_for_skip): Now returns bool, and takes
7202 the function sal by const reference. Adjust to use range-for and
7203 skiplist_entry methods.
7204 (_initialize_step_skip): Remove references to
7205 skiplist_entry_chain, skiplist_entry_count.
7206 * skip.h (function_name_is_marked_for_skip): Now returns bool, and
7207 takes the function sal by const reference.
7208
7209 2017-08-11 Yao Qi <yao.qi@linaro.org>
7210
7211 * dwarf2-frame.c (clear_pointer_cleanup): Remove.
7212 (dwarf2_frame_cache): Remove reset_cache_cleanup.
7213 (dwarf2_frame_cache):
7214 * frame-unwind.c (frame_unwind_try_unwinder): Catch
7215 RETURN_MASK_ALL and set *this_case to NULL.
7216 * frame-unwind.h: Update comments.
7217
7218 2017-08-11 Yao Qi <yao.qi@linaro.org>
7219
7220 * dwarf2-frame.c (dwarf2_frame_state_alloc_regs): Remove.
7221 (dwarf2_frame_state_copy_regs): Remove.
7222 (dwarf2_frame_state_free_regs): Remove.
7223 (dwarf2_frame_state::~dwarf2_frame_state): Remove.
7224 (dwarf2_restore_rule): Call method .alloc_regs instead of
7225 dwarf2_frame_state_alloc_regs.
7226 (execute_cfa_program): Likewise. Call dwarf2_frame_state_reg_info
7227 constructor. Call std::move.
7228 (dwarf2_fetch_cfa_info): Don't call dwarf2_frame_state_copy_regs.
7229 (dwarf2_frame_cache): Likewise.
7230
7231 [GDB_SELF_TEST]: Include selftest.h and
7232 selftest-arch.h.
7233 [GDB_SELF_TEST] (execute_cfa_program_test): New function.
7234 (_initialize_dwarf2_frame) [GDB_SELF_TEST]: Register
7235 execute_cfa_program_test.
7236
7237 * dwarf2-frame.h (dwarf2_frame_state_reg_info): Add ctor, dtor,
7238 copy ctor, assignment operator, move assignment.
7239 <alloc_regs>: New method.
7240 <swap>: New method.
7241 (struct dwarf2_frame_state): Delete dtor.
7242 (dwarf2_frame_state_alloc_regs): Remove declaration.
7243 * sparc-tdep.c (sparc_execute_dwarf_cfa_vendor_op): Don't call
7244 dwarf2_frame_state_alloc_regs, use .alloc_regs instead.
7245
7246 2017-08-11 Yao Qi <yao.qi@linaro.org>
7247
7248 * dwarf2-frame.c (dwarf2_frame_state_free): Remove.
7249 (dwarf2_frame_state::dwarf2_frame_state): New.
7250 (dwarf2_frame_state::~dwarf2_frame_state): New.
7251 (dwarf2_fetch_cfa_info): Update.
7252 (dwarf2_frame_cache): Remove old_chain. Change 'fs' to an object
7253 rather than a pointer. Update code.
7254 * dwarf2-frame.h (struct dwarf2_frame_state): Declare ctor and
7255 dtor.
7256 <data_align, code_align, retaddr_column>: Change them to const.
7257 <armcc_cfa_offsets_sf, armcc_cfa_offsets_reversed>: Change them
7258 to bool.
7259
7260 2017-08-11 Yao Qi <yao.qi@linaro.org>
7261
7262 * dwarf2-frame.h (struct dwarf2_frame_state_reg) <exp_len>: Remove.
7263 <loc.exp>: New field.
7264 * dwarf2-frame.c (execute_cfa_program): Update.
7265 (dwarf2_frame_prev_register): Update.
7266
7267 2017-08-10 Pedro Alves <palves@redhat.com>
7268
7269 * common/gdb_unique_ptr.h (xfree_deleter<T[]>): Define.
7270
7271 2017-08-09 John Baldwin <jhb@FreeBSD.org>
7272
7273 * fbsd-nat.c (struct fbsd_fork_info): Remove.
7274 (fbsd_pending_children): Use std::list.
7275 (fbsd_remember_child): Likewise.
7276 (fbsd_is_child_pending): Likewise.
7277 (fbsd_pending_vfork_done): Use std::forward_list.
7278 (fbsd_add_vfork_done): Likewise.
7279 (fbsd_is_vfork_done_pending): Likewise.
7280 (fbsd_next_vfork_done): Likewise.
7281
7282 2017-08-09 John Baldwin <jhb@FreeBSD.org>
7283
7284 * fbsd-nat.c [HAVE_KINFO_GETVMMAP] (struct free_deleter): New.
7285 (fbsd_find_memory_regions): Use free_deleter with std::unique_ptr.
7286 [!HAVE_KINFO_GETVMMAP] (fbsd_find_memory_regions): Use std::string
7287 for `mapfilename'.
7288 (fbsd_xfer_partial): Use gdb::byte_vector.
7289 (fbsd_add_threads): Use gdb::unique_xmalloc_ptr.
7290
7291 2017-08-09 John Baldwin <jhb@FreeBSD.org>
7292
7293 * fbsd-nat.c: [!HAVE_KINFO_GETVMMAP]: Include <sys/user.h> and
7294 "filestuff.h".
7295 (fbsd_find_memory_regions): Fix `mapfile' initialization.
7296
7297 2017-08-09 Tom Tromey <tom@tromey.com>
7298
7299 * skip.c (skiplist_entry): New constructor.
7300 (skiplist_entry::enabled, skiplist_entry::function_is_regexp)
7301 (skiplist_entry::file_is_glob): Now bool.
7302 (skiplist_entry::file, skiplist_entry::function): Now
7303 std::string.
7304 (make_skip_entry): Return a unique_ptr. Use new.
7305 (free_skiplist_entry, free_skiplist_entry_cleanup)
7306 (make_free_skiplist_entry_cleanup): Remove.
7307 (skip_command, skip_disable_command, add_skiplist_entry)
7308 (skip_form_bytes, compile_skip_regexp, skip_command, skip_info)
7309 (skip_file_p, skip_gfile_p, skip_function_p, skip_rfunction_p)
7310 (function_name_is_marked_for_skip): Update.
7311 (skip_delete_command): Update. Use delete.
7312
7313 2017-08-09 Jiong Wang <jiong.wang@arm.com>
7314
7315 * aarch64-linux-tdep.c: Include "auxv.h" and "elf/common.h".
7316 (aarch64_linux_core_read_description): New function.
7317 (aarch64_linux_init_abi): Register gdbarch_core_read_description.
7318
7319 2017-08-09 Pedro Alves <palves@redhat.com>
7320
7321 * cp-name-parser.y (cp_comp_to_string): Return a
7322 gdb::unique_xmalloc_ptr<char>.
7323 * cp-support.c (replace_typedefs_qualified_name)
7324 (replace_typedefs): Adjust to use gdb::unique_xmalloc_ptr<char>.
7325 (cp_canonicalize_string_full): Use op= instead of explicit
7326 convertion.
7327 (cp_class_name_from_physname, method_name_from_physname)
7328 (cp_func_name, cp_remove_params): Adjust to use
7329 gdb::unique_xmalloc_ptr<char>.
7330 * cp-support.h (cp_comp_to_string): Return a
7331 gdb::unique_xmalloc_ptr<char>.
7332 * python/py-type.c (typy_lookup_type): Adjust to use
7333 gdb::unique_xmalloc_ptr<char>.
7334
7335 2017-08-09 H.J. Lu <hongjiu.lu@intel.com>
7336
7337 * dwarf2read.c (dwarf2_string_attr): Fix a typo.
7338
7339 2017-08-09 Alex Lindsay <alexlindsay239@gmail.com>
7340 Yao Qi <yao.qi@linaro.org>
7341
7342 * cp-support.c (cp_canonicalize_string_full): Use
7343 gdb::unique_xmalloc_ptr<char>.
7344 (cp_canonicalize_string): Likewise.
7345
7346 2017-08-09 Yao Qi <yao.qi@linaro.org>
7347
7348 * features/Makefile (WHICH): Remove i386/ non-linux stuff.
7349 * regformats/i386/amd64-avx-avx512.dat: Remove.
7350 * regformats/i386/amd64-avx-mpx-avx512-pku.dat: Remove.
7351 * regformats/i386/amd64-avx-mpx.dat:Remove.
7352 * regformats/i386/amd64-avx.dat: Remove.
7353 * regformats/i386/amd64-mpx.dat: Remove.
7354 * regformats/i386/i386-avx-avx512.dat: Remove.
7355 * regformats/i386/i386-avx-mpx-avx512-pku.dat: Remove.
7356 * regformats/i386/i386-avx-mpx.dat: Remove.
7357 * regformats/i386/i386-mmx.dat: Remove.
7358 * regformats/i386/i386-mpx.dat: Remove.
7359
7360 2017-08-09 Yao Qi <yao.qi@linaro.org>
7361
7362 * amd64-tdep.h (tdesc_x32): Remove the declaration.
7363 * amd64-tdep.c: Don't include features/i386/x32*.c.
7364 (_initialize_amd64_tdep): Don't call initialize_tdesc_x32*
7365 functions.
7366 * features/Makefile (WHICH): Remove i386/x32, i386/x32-avx,
7367 and i386/x32-avx-avx512.
7368 (XMLTOC): Remove i386/x32-avx.xml, i386/x32-avx-avx512.xml,
7369 and i386/x32.xml.
7370 * features/i386/x32-avx-avx512.c: Removed.
7371 * features/i386/x32-avx-avx512.xml: Removed.
7372 * features/i386/x32-avx.c: Removed.
7373 * features/i386/x32-avx.xml: Removed.
7374 * features/i386/x32.c: Removed.
7375 * features/i386/x32.xml: Removed.
7376 * regformats/i386/x32-avx-avx512.dat: Removed.
7377 * regformats/i386/x32-avx.dat: Removed.
7378 * regformats/i386/x32.dat: Removed.
7379
7380 2017-08-07 Maciej W. Rozycki <macro@imgtec.com>
7381
7382 PR breakpoints/21886
7383 * mem-break.c (default_memory_insert_breakpoint): Use
7384 `->placed_address' rather than `->reqstd_address' for the
7385 breakpoint location.
7386
7387 2017-08-07 Maciej W. Rozycki <macro@imgtec.com>
7388
7389 * arch-utils.c (default_print_insn): Remove arch/mach/endian
7390 assertions.
7391
7392 2017-08-07 Maciej W. Rozycki <macro@imgtec.com>
7393
7394 * gdbarch.sh (gdbarch_info): Replace the `tdep_info' member with
7395 a union of `tdep_info', `tdesc_data' and `id'.
7396 * aarch64-tdep.c (aarch64_gdbarch_init): Use `info.tdesc_data'
7397 rather than `info.tdep_info'.
7398 * amd64-linux-tdep.c (amd64_linux_init_abi): Likewise.
7399 * i386-linux-tdep.c (i386_linux_init_abi): Likewise.
7400 * i386-tdep.c (i386_gdbarch_init): Likewise.
7401 * mips-linux-tdep.c (mips_linux_init_abi): Likewise.
7402 * mips-tdep.c (mips_gdbarch_init): Likewise.
7403 * nds32-tdep.c (nds32_gdbarch_init): Likewise.
7404 * rs6000-tdep.c (rs6000_gdbarch_init): Likewise.
7405 * ppc-linux-tdep.c (ppu2spu_sniffer): Use `info.id' rather than
7406 `info.tdep_info'.
7407 (ppc_linux_init_abi): Use `info.tdesc_data' rather than
7408 `info.tdep_info'.
7409 * sparc-tdep.c (sparc32_gdbarch_init): Likewise.
7410 * spu-multiarch.c (spu_gdbarch): Use `info.id' rather than
7411 `info.tdep_info'.
7412 * spu-tdep.c (spu_gdbarch_init): Likewise.
7413 * gdbarch.h: Regenerate.
7414
7415 2017-08-07 Leszek Swirski <leszeks@google.com>
7416
7417 PR symtab/20899
7418 * dwarf2read.c (dwarf2_string_attr): Allow DW_FORM_GNU_strp_alt.
7419
7420 2017-08-07 Simon Marchi <simon.marchi@ericsson.com>
7421
7422 * remote-sim.c (gdbsim_load): Remove char **argv local variable.
7423 (gdbsim_open): Rename gdb_argv args object to argv.
7424
7425 2017-08-05 Tom Tromey <tom@tromey.com>
7426
7427 * compile/compile-object-load.c (compile_object_load): Use
7428 gdb::unique_xmalloc_ptr.
7429 * cli/cli-dump.c (scan_filename): Rename from
7430 scan_filename_with_cleanup. Change return type.
7431 (scan_expression): Rename from scan_expression_with_cleanup.
7432 Change return type.
7433 (dump_memory_to_file, dump_value_to_file, restore_command):
7434 Use gdb::unique_xmalloc_ptr. Update.
7435 * cli/cli-cmds.c (find_and_open_script): Use
7436 gdb::unique_xmalloc_ptr.
7437 * tracefile-tfile.c (tfile_open): Use gdb::unique_xmalloc_ptr.
7438 * symmisc.c (maintenance_print_symbols)
7439 (maintenance_print_msymbols): Use gdb::unique_xmalloc_ptr.
7440 * symfile.c (symfile_bfd_open, generic_load)
7441 (add_symbol_file_command, remove_symbol_file_command): Use
7442 gdb::unique_xmalloc_ptr.
7443 * source.c (openp): Use gdb::unique_xmalloc_ptr.
7444 * psymtab.c (maintenance_print_psymbols): Use
7445 gdb::unique_xmalloc_ptr.
7446 * corelow.c (core_open): Use gdb::unique_xmalloc_ptr.
7447 * breakpoint.c (save_breakpoints): Use gdb::unique_xmalloc_ptr.
7448 * solib.c (solib_map_sections): Use gdb::unique_xmalloc_ptr.
7449 (reload_shared_libraries_1): Likewise.
7450
7451 2017-08-05 Tom Tromey <tom@tromey.com>
7452
7453 * rust-exp.y (rust_op_ptr, set_field): Remove typedefs.
7454 (rust_op_vector, rust_set_vector): New typedefs.
7455 (current_parser): New global.
7456 (work_obstack): Change to pointer type. Update all users.
7457 (rust_ast, pstate): Remove globals.
7458 (struct rust_parser): New.
7459 (%union) <params, field_inits>: Change type.
7460 (start, tuple_expr, unit_expr, struct_expr_list, literal)
7461 (field_expr, expr_list, maybe_expr_list, type_list): Update.
7462 (ast_call_ish, ast_path, ast_function_type, ast_tuple_type)
7463 (convert_params_to_types, convert_params_to_expression): Change
7464 type of "params".
7465 (ast_string): Change type of "fields".
7466 (rust_parse): Make a rust_parser. Remove cleanups.
7467 (rust_lex_tests): Make and install an auto_obstack.
7468
7469 2017-08-04 Yao Qi <yao.qi@linaro.org>
7470
7471 * configure.srv (ipa_x32_linux_regobj): New.
7472 * linux-amd64-ipa.c (get_ipa_tdesc): Use X86_TDESC_AVX_AVX512
7473 instead of X86_TDESC_AVX512.
7474 (initialize_low_tracepoint): Call
7475 init_registers_x32_avx_avx512_linux.
7476
7477 2017-08-04 Yao Qi <yao.qi@linaro.org>
7478
7479 * utils.h (gdb_argv): Add namespace std for nullptr_t.
7480
7481 2017-08-03 Ruslan Kabatsayev <b7.10110111@gmail.com>
7482
7483 * MAINTAINERS (Write After Approval): Add Ruslan Kabatsayev.
7484
7485 2017-08-03 Tom Tromey <tom@tromey.com>
7486
7487 * utils.c (make_cleanup_freeargv, do_freeargv, gdb_buildargv):
7488 Remove.
7489 * utils.h (make_cleanup_freeargv, gdb_buildargv): Remove.
7490
7491 2017-08-03 Tom Tromey <tom@tromey.com>
7492
7493 * python/py-param.c (compute_enum_values): Use gdb_argv.
7494
7495 2017-08-03 Tom Tromey <tom@tromey.com>
7496
7497 * utils.h (struct gdb_argv_deleter): New.
7498 (gdb_argv): New class.
7499 * utils.c (gdb_argv::reset): New method.
7500 * tracepoint.c (delete_trace_variable_command): Use gdb_argv.
7501 * tracefile.c (tsave_command): Use gdb_argv.
7502 * top.c (new_ui_command): Use gdb_argv.
7503 * symmisc.c (maintenance_print_symbols)
7504 (maintenance_print_msymbols, maintenance_expand_symtabs): Use gdb_argv.
7505 * symfile.c (symbol_file_command, generic_load)
7506 (remove_symbol_file_command): Use gdb_argv.
7507 * stack.c (backtrace_command): Use gdb_argv.
7508 * source.c (add_path, show_substitute_path_command)
7509 (unset_substitute_path_command, set_substitute_path_command):
7510 Use gdb_argv.
7511 * skip.c (skip_command): Use gdb_argv. Use gdb_buildargv.
7512 * ser-mingw.c (pipe_windows_open): Use gdb_argv.
7513 * remote.c (extended_remote_run, remote_put_command)
7514 (remote_get_command, remote_delete_command): Use gdb_argv.
7515 * remote-sim.c (gdbsim_load, gdbsim_create_inferior)
7516 (gdbsim_open): Use gdb_argv.
7517 * python/py-cmd.c (gdbpy_string_to_argv): Use gdb_argv.
7518 * psymtab.c (maintenance_print_psymbols): Use gdb_argv.
7519 * procfs.c (procfs_info_proc): Use gdb_argv.
7520 * interps.c (interpreter_exec_cmd): Use gdb_argv.
7521 * infrun.c (handle_command): Use gdb_argv.
7522 * inferior.c (add_inferior_command, clone_inferior_command):
7523 Use gdb_argv.
7524 * guile/scm-string.c (gdbscm_string_to_argv): Use gdb_argv.
7525 * exec.c (exec_file_command): Use gdb_argv.
7526 * cli/cli-cmds.c (alias_command): Use gdb_argv.
7527 * compile/compile.c (build_argc_argv): Use gdb_argv.
7528
7529 2017-08-03 Tom Tromey <tom@tromey.com>
7530
7531 * python/python.c (gdbpy_decode_line): Use unique_xmalloc_ptr.
7532
7533 2017-08-03 Tom Tromey <tom@tromey.com>
7534
7535 * python/python.c (compute_python_string): Return std::string.
7536 (gdbpy_eval_from_control_command): Update.
7537 (do_start_initialization): Use std::string.
7538 * python/py-varobj.c (py_varobj_iter_next): Use string_printf, not
7539 xstrprintf.
7540 * python/py-breakpoint.c (local_setattro): Use string_printf, not
7541 xstrprintf.
7542
7543 2017-08-03 Tom Tromey <tom@tromey.com>
7544
7545 * top.h (do_restore_instream_cleanup): Remove.
7546 * top.c (do_restore_instream_cleanup): Remove.
7547 (read_command_file): Use scoped_restore.
7548 * cli/cli-script.c (execute_user_command): Use scoped_restore.
7549
7550 2017-08-03 Tom Tromey <tom@tromey.com>
7551
7552 * cli/cli-script.c (execute_user_command)
7553 (execute_control_command): Use scoped_restore.
7554
7555 2017-08-03 Tom Tromey <tom@tromey.com>
7556
7557 * cli/cli-script.c (do_restore_user_call_depth): Remove.
7558 (execute_user_command): Remove user_call_depth; use
7559 user_args_stack's size instead.
7560
7561 2017-08-03 Tom Tromey <tom@tromey.com>
7562
7563 * top.h (in_user_command): Remove.
7564 * top.c (in_user_command): Remove.
7565 * cli/cli-script.c (do_restore_user_call_depth)
7566 (execute_user_command): Update.
7567
7568 2017-08-03 Tom Tromey <tom@tromey.com>
7569
7570 * valops.c (search_struct_method): Use gdb::byte_vector.
7571 * valarith.c (value_concat): Use std::vector.
7572 * target.c (memory_xfer_partial): Use gdb::byte_vector.
7573 (simple_search_memory): Likewise.
7574 * printcmd.c (find_string_backward): Use gdb::byte_vector.
7575 * mi/mi-main.c (mi_cmd_data_write_memory): Use gdb::byte_vector.
7576 * gcore.c (gcore_copy_callback): Use gdb::byte_vector.
7577 * elfread.c (elf_rel_plt_read): Use std::string.
7578 * cp-valprint.c (cp_print_value): Use gdb::byte_vector.
7579 * cli/cli-dump.c (restore_section_callback): Use
7580 gdb::byte_vector.
7581
7582 2017-08-03 Tom Tromey <tom@tromey.com>
7583
7584 * jit.c (jit_reader_load_command): Use unique_xmalloc_ptr.
7585
7586 2017-08-03 Tom Tromey <tom@tromey.com>
7587
7588 * tui/tui-regs.c (tui_restore_gdbout): Remove.
7589 (tui_register_format): Use scoped_restore.
7590
7591 2017-08-03 Tom Tromey <tom@tromey.com>
7592
7593 * reverse.c (exec_direction_default): Remove.
7594 (exec_reverse_once): Use scoped_restore.
7595 * remote.c (restore_remote_timeout): Remove.
7596 (remote_flash_erase, remote_flash_write, remote_flash_done)
7597 (readchar, remote_serial_write): Use scoped_restore.
7598 * cli/cli-script.c (struct source_cleanup_lines_args)
7599 (source_cleanup_lines): Remove.
7600 (script_from_file): Use scoped_restore.
7601 * cli/cli-cmds.c (source_verbose_cleanup): Remove.
7602 (source_command): Use scoped_restore.
7603
7604 2017-08-03 Tom Tromey <tom@tromey.com>
7605
7606 * utils.h (make_cleanup_free_so): Remove.
7607 * utils.c (do_free_so, make_cleanup_free_so): Remove.
7608 * solist.h (struct so_deleter): New.
7609 (so_list_up): New typedef.
7610 * solib-svr4.c (svr4_read_so_list): Use so_list_up.
7611
7612 2017-08-03 Tom Tromey <tom@tromey.com>
7613
7614 * utils.h (make_cleanup_restore_current_language): Remove.
7615 * utils.c (do_restore_current_language)
7616 (make_cleanup_restore_current_language): Remove.
7617 * parse.c (parse_exp_in_context_1)
7618 (parse_expression_with_language): Use
7619 scoped_restore_current_language.
7620 * mi/mi-main.c (mi_cmd_execute): Use
7621 scoped_restore_current_language.
7622 * language.h (scoped_restore_current_language): New class.
7623
7624 2017-08-03 Tom Tromey <tom@tromey.com>
7625
7626 * compile/compile.c (cleanup_unlink_file): Remove.
7627 (compile_to_object): Use gdb::unlinker.
7628 (eval_compile_command): Likewise.
7629
7630 2017-08-03 Tom Tromey <tom@tromey.com>
7631
7632 * utils.h (make_cleanup_fclose): Remove.
7633 * utils.c (do_fclose_cleanup, make_cleanup_fclose): Remove.
7634
7635 2017-08-03 Tom Tromey <tom@tromey.com>
7636
7637 * top.c (open_terminal_stream): Return gdb_file_up.
7638 (new_ui_command): Update.
7639
7640 2017-08-03 Tom Tromey <tom@tromey.com>
7641
7642 * source.c (print_source_lines_base, forward_search_command)
7643 (reverse_search_command): Use gdb_file_up.
7644
7645 2017-08-03 Tom Tromey <tom@tromey.com>
7646
7647 * fbsd-nat.c (fbsd_find_memory_regions): Update.
7648
7649 2017-08-03 Tom Tromey <tom@tromey.com>
7650
7651 * cli/cli-cmds.c (find_and_open_script): Change return type.
7652 Remove "streamp" and "full_path" parameters.
7653 (source_script_with_search): Update.
7654 * auto-load.c (source_script_file): Update.
7655 * cli/cli-cmds.h (find_and_open_script): Change type.
7656 (open_script): New struct.
7657
7658 2017-08-03 Tom Tromey <tom@tromey.com>
7659
7660 * xml-support.c (xml_fetch_content_from_file): Update.
7661 * ui-file.c (stdio_file::open): Update.
7662 * tracefile-tfile.c (tfile_start): Update.
7663 * remote.c (remote_file_put, remote_file_get): Update.
7664 * nat/linux-procfs.c (linux_proc_get_int)
7665 (linux_proc_pid_get_state, linux_proc_tid_get_name): Update.
7666 * nat/linux-osdata.c (linux_common_core_of_thread): Update.
7667 (command_from_pid, commandline_from_pid, linux_xfer_osdata_cpus)
7668 (print_sockets, linux_xfer_osdata_shm, linux_xfer_osdata_sem)
7669 (linux_xfer_osdata_msg, linux_xfer_osdata_modules): Update.
7670 * nat/linux-btrace.c (linux_determine_kernel_start): Update.
7671 * linux-nat.c (linux_proc_pending_signals): Update.
7672 * dwarf2read.c (write_psymtabs_to_index): Use gdb_file_up.
7673 (file_closer): Remove.
7674 * compile/compile.c (compile_to_object): Update.
7675 * common/filestuff.h (struct gdb_file_deleter): New.
7676 (gdb_file_up): New typedef.
7677 (gdb_fopen_cloexec): Change return type.
7678 * common/filestuff.c (gdb_fopen_cloexec): Return gdb_file_up.
7679 * cli/cli-dump.c (fopen_with_cleanup): Remove.
7680 (dump_binary_file, restore_binary_file): Update.
7681 * auto-load.c (auto_load_objfile_script_1): Update.
7682
7683 2017-08-03 Tom Tromey <tom@tromey.com>
7684
7685 * tracepoint.c (tvariables_info_1): Use ui_out_emit_table.
7686 (info_static_tracepoint_markers_command): Likewise.
7687 * solib.c (info_sharedlibrary_command): Use ui_out_emit_table.
7688 * skip.c (skip_info): Use ui_out_emit_table.
7689 * progspace.c (print_program_space): Use ui_out_emit_table.
7690 * osdata.c (info_osdata): Use ui_out_emit_table.
7691 * mi/mi-cmd-info.c (mi_cmd_info_ada_exceptions): Use
7692 ui_out_emit_table.
7693 * linux-thread-db.c (info_auto_load_libthread_db): Use
7694 ui_out_emit_table.
7695 * inferior.c (print_inferior): Use ui_out_emit_table.
7696 * gdb_bfd.c (maintenance_info_bfds): Use ui_out_emit_table.
7697 * breakpoint.c (breakpoint_1): Use ui_out_emit_table.
7698 * auto-load.c (auto_load_info_scripts): Use ui_out_emit_table.
7699 * ada-tasks.c (print_ada_task_info): Use ui_out_emit_table.
7700 * ui-out.h (class ui_out_emit_table): New.
7701
7702 2017-08-02 Maciej W. Rozycki <macro@imgtec.com>
7703
7704 * mips-tdep.c (mips_fpu_type_str): New function.
7705 (mips_dump_tdep): Call it.
7706
7707 2017-08-01 Maciej W. Rozycki <macro@imgtec.com>
7708
7709 * mips-tdep.c (mips_gdbarch_init): Use MIPS_FPU_TYPE to access
7710 `->mips_fpu_type'.
7711
7712 2017-07-31 Xavier Roirand <roirand@adacore.com>
7713
7714 * solib-darwin.c (DYLD_VERSION_MAX): Increase value.
7715
7716 2017-07-27 Xavier Roirand <roirand@adacore.com>
7717
7718 * MAINTAINERS (Write After Approval): Add Xavier Roirand.
7719
7720 2017-07-26 Yao Qi <yao.qi@linaro.org>
7721
7722 * cli/cli-cmds.c (maintenancechecklist): New variable.
7723 * gdbcmd.h (maintenancechecklist): Declare it.
7724 * i386-linux-tdep.c (_initialize_i386_linux_tdep) [GDB_SELF_TEST]:
7725 Call i386_linux_read_description with different masks.
7726 * maint.c (maintenance_check_command): New function.
7727 (_initialize_maint_cmds): Call add_prefix_cmd.
7728 * target-descriptions.c (tdesc_reg): override operator != and ==.
7729 (tdesc_type): Likewise.
7730 (tdesc_feature): Likewise.
7731 (target_desc): Likewise.
7732 [GDB_SELF_TEST] (selftests::record_xml_tdesc): New function.
7733 (maintenance_check_xml_descriptions): New function.
7734 (_initialize_target_descriptions) Add command "xml-descriptions".
7735 * target-descriptions.h (selftests::record_xml_tdesc): Declare.
7736
7737 2017-07-26 Yao Qi <yao.qi@linaro.org>
7738
7739 * i386-linux-tdep.c: Don't include features/i386/i386-*linux.c.
7740 Include features/i386/32bit-*.c.
7741 (i386_linux_read_description): Generate target description if it
7742 doesn't exist.
7743 (_initialize_i386_linux_tdep): Don't call _initialize_tdesc_i386
7744 functions.
7745 * features/i386/32bit-linux.c: Re-generated.
7746 * features/i386/32bit-sse.c: Likewise.
7747 * target-descriptions.c (print_c_feature::visit): Print code to
7748 set register number if needed.
7749 (print_c_feature) <m_next_regnum>: New field.
7750
7751 2017-07-26 Yao Qi <yao.qi@linaro.org>
7752
7753 * features/Makefile (CFILES): Rename with TDESC_CFILES.
7754 (FEATURE_XMLFILES): New.
7755 (FEATURE_CFILES): New.
7756 New rules.
7757 (clean-cfiles): Remove generated c files.
7758 * features/i386/32bit-avx.c: Generated.
7759 * features/i386/32bit-avx512.c: Generated.
7760 * features/i386/32bit-core.c: Generated.
7761 * features/i386/32bit-linux.c: Generated.
7762 * features/i386/32bit-mpx.c: Generated.
7763 * features/i386/32bit-pkeys.c: Generated.
7764 * features/i386/32bit-sse.c: Generated.
7765 * target-descriptions.c: Include algorithm.
7766 (tdesc_element_visitor): Add method visit_end.
7767 (print_c_tdesc): Implement visit_end.
7768 (print_c_tdesc:: m_filename_after_features): Move it to
7769 protected.
7770 (print_c_feature): New class.
7771 (maint_print_c_tdesc_cmd): Use print_c_feature if XML file
7772 name starts with "i386/32bit-".
7773
7774 2017-07-26 Yao Qi <yao.qi@linaro.org>
7775
7776 * target-descriptions.c (tdesc_element_visitor): New class.
7777 (tdesc_element): New class.
7778 (tdesc_reg): Inherit from tdesc_element.
7779 (tdesc_reg::accept): New function.
7780 (tdesc_type): Inherit from tdesc_element.
7781 (tdesc_type::accept): New function.
7782 (tdesc_feature): Inherit from tdesc_element.
7783 (tdesc_feature::accept): New function.
7784 (target_desc): Inherit from tdesc_element.
7785 (target_desc::target_desc): New.
7786 (target_desc::~target_desc): New.
7787 (target_desc::accept): New.
7788 (allocate_target_description): Use new.
7789 (free_target_description): Use delete.
7790 (print_c_tdesc): New class.
7791 (maint_print_c_tdesc_cmd): Adjust.
7792
7793 * features/aarch64.c: Re-generated.
7794 * features/arc-arcompact.c: Re-generated.
7795 * features/arc-v2.c: Re-generated.
7796 * features/arm/arm-with-iwmmxt.c: Re-generated.
7797 * features/arm/arm-with-m.c: Re-generated.
7798 * features/arm/arm-with-m-fpa-layout.c: Re-generated.
7799 * features/arm/arm-with-m-vfp-d16.c: Re-generated.
7800 * features/arm/arm-with-neon.c: Re-generated.
7801 * features/arm/arm-with-vfpv2.c: Re-generated.
7802 * features/arm/arm-with-vfpv3.c: Re-generated.
7803 * features/i386/amd64-avx-avx512.c: Re-generated.
7804 * features/i386/amd64-avx-avx512-linux.c: Re-generated.
7805 * features/i386/amd64-avx.c: Re-generated.
7806 * features/i386/amd64-avx-linux.c: Re-generated.
7807 * features/i386/amd64-avx-mpx-avx512-pku.c: Re-generated.
7808 * features/i386/amd64-avx-mpx-avx512-pku-linux.c: Re-generated.
7809 * features/i386/amd64-avx-mpx.c: Re-generated.
7810 * features/i386/amd64-avx-mpx-linux.c: Re-generated.
7811 * features/i386/amd64.c: Re-generated.
7812 * features/i386/amd64-linux.c: Re-generated.
7813 * features/i386/amd64-mpx.c: Re-generated.
7814 * features/i386/amd64-mpx-linux.c: Re-generated.
7815 * features/i386/i386-avx-avx512.c: Re-generated.
7816 * features/i386/i386-avx-avx512-linux.c: Re-generated.
7817 * features/i386/i386-avx.c: Re-generated.
7818 * features/i386/i386-avx-linux.c: Re-generated.
7819 * features/i386/i386-avx-mpx-avx512-pku.c: Re-generated.
7820 * features/i386/i386-avx-mpx-avx512-pku-linux.c: Re-generated.
7821 * features/i386/i386-avx-mpx.c: Re-generated.
7822 * features/i386/i386-avx-mpx-linux.c: Re-generated.
7823 * features/i386/i386.c: Re-generated.
7824 * features/i386/i386-linux.c: Re-generated.
7825 * features/i386/i386-mmx.c: Re-generated.
7826 * features/i386/i386-mmx-linux.c: Re-generated.
7827 * features/i386/i386-mpx.c: Re-generated.
7828 * features/i386/i386-mpx-linux.c: Re-generated.
7829 * features/i386/x32-avx-avx512.c: Re-generated.
7830 * features/i386/x32-avx-avx512-linux.c: Re-generated.
7831 * features/i386/x32-avx.c: Re-generated.
7832 * features/i386/x32-avx-linux.c: Re-generated.
7833 * features/i386/x32.c: Re-generated.
7834 * features/i386/x32-linux.c: Re-generated.
7835 * features/microblaze.c: Re-generated.
7836 * features/microblaze-with-stack-protect.c: Re-generated.
7837 * features/mips64-dsp-linux.c: Re-generated.
7838 * features/mips64-linux.c: Re-generated.
7839 * features/mips-dsp-linux.c: Re-generated.
7840 * features/mips-linux.c: Re-generated.
7841 * features/nds32.c: Re-generated.
7842 * features/nios2.c: Re-generated.
7843 * features/nios2-linux.c: Re-generated.
7844 * features/rs6000/powerpc-32.c: Re-generated.
7845 * features/rs6000/powerpc-32l.c: Re-generated.
7846 * features/rs6000/powerpc-403.c: Re-generated.
7847 * features/rs6000/powerpc-403gc.c : Re-generated.
7848 * features/rs6000/powerpc-405.c: Re-generated.
7849 * features/rs6000/powerpc-505.c: Re-generated.
7850 * features/rs6000/powerpc-601.c: Re-generated.
7851 * features/rs6000/powerpc-602.c: Re-generated.
7852 * features/rs6000/powerpc-603.c: Re-generated.
7853 * features/rs6000/powerpc-604.c: Re-generated.
7854 * features/rs6000/powerpc-64.c: Re-generated.
7855 * features/rs6000/powerpc-64l.c: Re-generated.
7856 * features/rs6000/powerpc-7400.c: Re-generated.
7857 * features/rs6000/powerpc-750.c: Re-generated.
7858 * features/rs6000/powerpc-860.c: Re-generated.
7859 * features/rs6000/powerpc-altivec32.c: Re-generated.
7860 * features/rs6000/powerpc-altivec32l.c: Re-generated.
7861 * features/rs6000/powerpc-altivec64.c: Re-generated.
7862 * features/rs6000/powerpc-altivec64l.c: Re-generated.
7863 * features/rs6000/powerpc-cell32l.c: Re-generated.
7864 * features/rs6000/powerpc-cell64l.c: Re-generated.
7865 * features/rs6000/powerpc-e500.c: Re-generated.
7866 * features/rs6000/powerpc-e500l.c: Re-generated.
7867 * features/rs6000/powerpc-isa205-32l.c: Re-generated.
7868 * features/rs6000/powerpc-isa205-64l.c: Re-generated.
7869 * features/rs6000/powerpc-isa205-altivec32l.c: Re-generated.
7870 * features/rs6000/powerpc-isa205-altivec64l.c: Re-generated.
7871 * features/rs6000/powerpc-isa205-vsx32l.c: Re-generated.
7872 * features/rs6000/powerpc-isa205-vsx64l.c: Re-generated.
7873 * features/rs6000/powerpc-vsx32.c: Re-generated.
7874 * features/rs6000/powerpc-vsx32l.c: Re-generated.
7875 * features/rs6000/powerpc-vsx64.c: Re-generated.
7876 * features/rs6000/powerpc-vsx64l.c: Re-generated.
7877 * features/rs6000/rs6000.c: Re-generated.
7878 * features/s390-linux32.c: Re-generated.
7879 * features/s390-linux32v1.c: Re-generated.
7880 * features/s390-linux32v2.c: Re-generated.
7881 * features/s390-linux64.c: Re-generated.
7882 * features/s390-linux64v1.c: Re-generated.
7883 * features/s390-linux64v2.c: Re-generated.
7884 * features/s390-te-linux64.c: Re-generated.
7885 * features/s390-tevx-linux64.c: Re-generated.
7886 * features/s390-vx-linux64.c: Re-generated.
7887 * features/s390x-linux64.c: Re-generated.
7888 * features/s390x-linux64v1.c: Re-generated.
7889 * features/s390x-linux64v2.c: Re-generated.
7890 * features/s390x-te-linux64.c: Re-generated.
7891 * features/s390x-tevx-linux64.c: Re-generated.
7892 * features/s390x-vx-linux64.c: Re-generated.
7893 * features/sparc/sparc32-solaris.c: Re-generated.
7894 * features/sparc/sparc64-solaris.c: Re-generated.
7895 * features/tic6x-c62x.c: Re-generated.
7896 * features/tic6x-c62x-linux.c: Re-generated.
7897 * features/tic6x-c64x.c: Re-generated.
7898 * features/tic6x-c64x-linux.c: Re-generated.
7899 * features/tic6x-c64xp.c: Re-generated.
7900 * features/tic6x-c64xp-linux.c: Re-generated.
7901
7902 2017-07-26 Yao Qi <yao.qi@linaro.org>
7903
7904 * i386-linux-tdep.c (i386_linux_read_description): New function.
7905 (i386_linux_core_read_description): Call
7906 i386_linux_read_description.
7907 * i386-linux-tdep.h (i386_linux_read_description): Declare.
7908 (tdesc_i386_linux, tdesc_i386_mmx_linux): Remove declarations.
7909 (tdesc_i386_avx_linux, tdesc_i386_mpx_linux): Likewise
7910 (tdesc_i386_avx_mpx_linux, tdesc_i386_avx_avx512_linux): Likewise.
7911 (tdesc_i386_avx_mpx_avx512_pku_linux): Likewise.
7912 * x86-linux-nat.c (x86_linux_read_description): Call
7913 i386_linux_read_description.
7914
7915 2017-07-26 Yao Qi <yao.qi@linaro.org>
7916
7917 * NEWS: Mention it.
7918 * features/Makefile (%.c: %.xml): Pass the xml file name to
7919 command "maint print c-tdesc".
7920 * target-descriptions.c (maint_print_c_tdesc_cmd): Get file
7921 name from 'arg'.
7922
7923 2017-07-26 Yao Qi <yao.qi@linaro.org>
7924
7925 * target-descriptions.c (target_desc): Add ctor and dtor. Do
7926 in-class initialization.
7927 (tdesc_create_feature): Call new instead of XCNEW.
7928 (free_target_description): Ue delete.
7929
7930 2017-07-25 John Baldwin <jhb@FreeBSD.org>
7931
7932 * configure.nat: Add "-lkvm" for NetBSD/sparc64 and fix typo.
7933
7934 2017-07-25 Yao Qi <yao.qi@linaro.org>
7935
7936 * amd64-tdep.c (amd64_init_abi): Make argument default_tdesc
7937 constant.
7938 (amd64_x32_init_abi): Likewise.
7939 * amd64-tdep.h (amd64_init_abi): Update declaration.
7940 (amd64_x32_init_abi): Likewise.
7941
7942 2017-07-25 Yao Qi <yao.qi@linaro.org>
7943
7944 PR tdep/21717
7945 * arm-linux-nat.c (arm_linux_fetch_inferior_registers): Update
7946 condition for FPSCR.
7947 (arm_linux_store_inferior_registers): Likewise.
7948
7949 2017-07-22 Tom Tromey <tom@tromey.com>
7950
7951 * break-catch-syscall.c (struct catch_syscall_inferior_data)
7952 <syscalls_counts>: Now a std::vector.
7953 (get_catch_syscall_inferior_data): Use "new".
7954 (catch_syscall_inferior_data_cleanup): Use "delete".
7955 (insert_catch_syscall, remove_catch_syscall)
7956 (clear_syscall_counts): Update.
7957
7958 2017-07-22 Tom Tromey <tom@tromey.com>
7959
7960 * break-catch-syscall.c (syscall_catchpoint)
7961 <syscalls_to_be_caught>: Now a std::vector<int>
7962 (~syscall_catchpoint): Remove.
7963 (insert_catch_syscall, remove_catch_syscall)
7964 (breakpoint_hit_catch_syscall, print_one_catch_syscall)
7965 (print_mention_catch_syscall, print_recreate_catch_syscall):
7966 Update.
7967 (create_syscall_event_catchpoint): Change type of "filter"
7968 parameter.
7969 (catch_syscall_split_args): Return a std::vector.
7970 (catch_syscall_command_1, catching_syscall_number_1): Update.
7971
7972 2017-07-22 Tom Tromey <tom@tromey.com>
7973
7974 * break-catch-throw.c (struct exception_catchpoint)
7975 <exception_rx>: Now a std::string.
7976 (~exception_catchpoint): Remove.
7977 (print_one_detail_exception_catchpoint): Update.
7978 (handle_gnu_v3_exceptions): Change type of except_rx.
7979 (extract_exception_regexp): Return a std::string.
7980 (catch_exception_command_1): Update.
7981
7982 2017-07-22 Tom Tromey <tom@tromey.com>
7983
7984 * break-catch-sig.c (gdb_signal_type): Remove typedef.
7985 (struct signal_catchpoint) <signals_to_be_caught>: Now a
7986 std::vector.
7987 <catch_all>: Now a bool.
7988 (~signal_catchpoint): Remove.
7989 (signal_catchpoint_insert_location)
7990 (signal_catchpoint_remove_location)
7991 (signal_catchpoint_breakpoint_hit, signal_catchpoint_print_one)
7992 (signal_catchpoint_print_mention)
7993 (signal_catchpoint_print_recreate)
7994 (signal_catchpoint_explains_signal): Update.
7995 (create_signal_catchpoint): Change type of "filter" and
7996 "catch_all".
7997 (catch_signal_split_args): Return a std::vector. Change type of
7998 "catch_all".
7999 (catch_signal_command): Update.
8000
8001 2017-07-20 Pedro Alves <palves@redhat.com>
8002
8003 * ada-lang.c (ada_language_defn): Make extern.
8004 (_initialize_ada_language): Remove add_language call.
8005 * c-lang.c (c_language_defn, cplus_language_defn)
8006 (asm_language_defn, minimal_language_defn): Make extern.
8007 (_initialize_c_language): Delete.
8008 * completer.c (compare_cstrings): Delete, moved to utils.h.
8009 * d-lang.c (d_language_defn): Make extern.
8010 (_initialize_d_language): Remove add_language calls.
8011 * defs.h (enum language): Add comment.
8012 * f-lang.c (f_language_defn): Make extern.
8013 (_initialize_f_language): Remove add_language call.
8014 * go-lang.c (go_language_defn): Make extern.
8015 (_initialize_go_language): Remove add_language call.
8016 * language.c: Include <algorithm>.
8017 (languages): Redefine as const array.
8018 (languages_size, languages_allocsize, DEFAULT_ALLOCSIZE): Delete.
8019 (set_language_command): Handle "local". Use for-range loop.
8020 (set_language): Remove loop.
8021 (language_enum): Rewrite.
8022 (language_def, language_str): Remove loops.
8023 (add_language): Delete.
8024 (add_set_language_command): New, based on add_languages.
8025 (skip_language_trampoline): Adjust.
8026 (local_language_defn): Delete.
8027 (language_gdbarch_post_init): Adjust.
8028 (_initialize_language): Remove add_language calls. Call
8029 add_set_language_command.
8030 * language.h (add_language): Delete.
8031 (auto_language_defn)
8032 (unknown_language_defn, minimal_language_defn, ada_language_defn)
8033 (asm_language_defn, c_language_defn, cplus_language_defn)
8034 (d_language_defn, f_language_defn, go_language_defn)
8035 (m2_language_defn, objc_language_defn, opencl_language_defn)
8036 (pascal_language_defn, rust_language_defn): Declare.
8037 * m2-lang.c (m2_language_defn): Make extern.
8038 (_initialize_m2_language): Remove add_language call.
8039 * objc-lang.c (objc_language_defn): Make extern.
8040 (_initialize_objc_language): Remove add_language call.
8041 * opencl-lang.c (opencl_language_defn): Make extern.
8042 (_initialize_opencl_language): Remove add_language call.
8043 * p-lang.c (pascal_language_defn): Make extern.
8044 (_initialize_pascal_language): Delete.
8045 * rust-lang.c (rust_language_defn): Make extern.
8046 (_initialize_rust_language): Delete.
8047 * utils.h (compare_cstrings): New static inline function.
8048
8049 2017-07-20 Pedro Alves <palves@redhat.com>
8050
8051 * ada-lang.c (ada_to_fixed_type_1): Adjust.
8052 (get_var_value): Constify parameters.
8053 (get_int_var_value): Change prototype.
8054 (to_fixed_range_type): Adjust.
8055 * ada-lang.h (get_int_var_value): Change prototype.
8056
8057 2017-07-20 Pedro Alves <palves@redhat.com>
8058
8059 * dwarf2read.c (dw2_lookup_symbol): Use
8060 SYMBOL_MATCHES_SEARCH_NAME.
8061 * psymtab.c (psym_lookup_symbol): Use SYMBOL_MATCHES_SEARCH_NAME.
8062
8063 2017-07-20 Pedro Alves <palves@redhat.com>
8064
8065 * block.c (block_iter_name_step, block_iter_name_first)
8066 (block_iter_name_next): Delete.
8067 (block_lookup_symbol_primary): Adjust to use
8068 dict_iter_match_first/dict_iter_match_next.
8069 * block.h (block_iter_name_first, block_iter_name_next): Delete
8070 declarations.
8071 (ALL_BLOCK_SYMBOLS_WITH_NAME): Adjust to use
8072 dict_iter_match_first/dict_iter_match_next.
8073
8074 2017-07-20 Pedro Alves <palves@redhat.com>
8075
8076 * cp-support.c (cp_find_first_component_aux): Add missing case for
8077 end of string.
8078
8079 2017-07-18 David Blaikie <dblaikie@gmail.com>
8080
8081 * dwarf2read.c (create_cus_hash_table): Re-add lost initialization
8082 of dwo_cu's dwo_file.
8083
8084 2017-07-18 Yao Qi <yao.qi@linaro.org>
8085
8086 * remote.c (store_registers_using_G): Remove one line comment.
8087
8088 2017-07-18 Yao Qi <yao.qi@linaro.org>
8089
8090 * regcache.c (regcache_cpy): Simplify it.
8091 (regcache::cpy_no_passthrough): Remove it.
8092 * regcache.h (cpy_no_passthrough): Remove it.
8093 (regcache_dup, regcache_cpy): Update comments.
8094
8095 2017-07-18 Pedro Alves <palves@redhat.com>
8096
8097 * remote-sim.c (sim_command_completer): Adjust to work with a
8098 completion_tracker instead of a VEC.
8099
8100 2017-07-17 Pedro Alves <palves@redhat.com>
8101
8102 * completer.c (complete_source_filenames): New function.
8103 (complete_address_and_linespec_locations): New function.
8104 (location_completer): Use complete_address_and_linespec_locations.
8105 (completion_tracker::build_completion_result): Honor the tracker's
8106 request to suppress append.
8107 * completer.h (completion_tracker::suppress_append_ws)
8108 (completion_tracker::set_suppress_append_ws): New methods.
8109 (completion_tracker::m_suppress_append_ws): New field.
8110 (complete_source_filenames): New declaration.
8111 * linespec.c (linespec_complete_what): New.
8112 (struct ls_parser) <complete_what, completion_word,
8113 completion_quote_char, completion_quote_end, completion_tracker>:
8114 New fields.
8115 (string_find_incomplete_keyword_at_end): New.
8116 (linespec_lexer_lex_string): Record quote char. If in completion
8117 mode, don't throw.
8118 (linespec_lexer_consume_token): Advance the completion word point.
8119 (linespec_lexer_peek_token): Save/restore completion info.
8120 (save_stream_and_consume_token): New.
8121 (set_completion_after_number): New.
8122 (linespec_parse_basic): Set what to complete next depending on
8123 token. Handle function and label completions specially.
8124 (parse_linespec): Disable objc shortcut in completion mode. Set
8125 what to complete next depending on token type. Skip keyword if in
8126 completion mode.
8127 (complete_linespec_component, linespec_complete): New.
8128 * linespec.h (linespec_complete): Declare.
8129
8130 2017-07-17 Pedro Alves <palves@redhat.com>
8131
8132 * linespec.c (linespec_lexer_lex_string, find_toplevel_char):
8133 Handle 'operator<' / 'operator<<'.
8134
8135 2017-07-17 Pedro Alves <palves@redhat.com>
8136
8137 * completer.c (collect_explicit_location_matches): Handle
8138 MATCH_LABEL.
8139 (convert_explicit_location_to_linespec): New, factored out from
8140 ...
8141 (convert_explicit_location_to_sals): ... this.
8142 (complete_label): New.
8143 (linespec_complete_label, find_label_symbols_in_block): New.
8144 (find_label_symbols): Add completion_mode parameter and adjust to
8145 call find_label_symbols_in_block.
8146 * linespec.h (linespec_complete_label): Declare.
8147
8148 2017-07-17 Pedro Alves <palves@redhat.com>
8149
8150 * ada-lang.c (ada_collect_symbol_completion_matches): Add
8151 complete_symbol_mode parameter.
8152 * cli/cli-cmds.c (complete_command): Get the completion result out
8153 of the handle_brkchars tracker if used a custom word point.
8154 * completer.c: Include "linespec.h".
8155 (enum explicit_location_match_type) <MATCH_LINE>: New enumerator.
8156 (advance_to_expression_complete_word_point): New.
8157 (completion_tracker::completes_to_completion_word): New.
8158 (complete_files_symbols): Pass down
8159 complete_symbol_mode::EXPRESSION.
8160 (explicit_options, probe_options): New.
8161 (collect_explicit_location_matches): Complete on the
8162 explictit_loc->foo instead of word. Use
8163 linespec_complete_function. Handle MATCH_LINE. Handle offering
8164 keyword and options completions.
8165 (backup_text_ptr): Delete.
8166 (skip_keyword): New.
8167 (complete_explicit_location): Remove 'word' parameter. Add
8168 language, quoted_arg_start and quoted_arg_end parameters.
8169 Rewrite, parsing left to right.
8170 (location_completer): Rewrite.
8171 (location_completer_handle_brkchars): New function.
8172 (symbol_completer): Pass down complete_symbol_mode::EXPRESSION.
8173 (enum complete_line_internal_reason): Adjust comments.
8174 (completion_tracker::discard_completions): New.
8175 (completer_handle_brkchars_func_for_completer): Handle
8176 location_completer.
8177 (gdb_custom_word_point_brkchars)
8178 (gdb_org_rl_basic_quote_characters): New.
8179 (gdb_completion_word_break_characters_throw)
8180 (completion_find_completion_word): Handle trackers that use a
8181 custom word point.
8182 (completion_tracker::advance_custom_word_point_by): New.
8183 (completion_tracker::build_completion_result): Don't rely on
8184 readline appending the quote char.
8185 (gdb_rl_attempted_completion_function_throw): Handle trackers that
8186 use a custom word point.
8187 (gdb_rl_attempted_completion_function): Restore
8188 rl_basic_quote_characters.
8189 * completer.h (class completion_tracker): Extend intro comment.
8190 (completion_tracker::set_quote_char)
8191 (completion_tracker::quote_char)
8192 (completion_tracker::set_use_custom_word_point)
8193 (completion_tracker::use_custom_word_point)
8194 (completion_tracker::custom_word_point)
8195 (completion_tracker::set_custom_word_point)
8196 (completion_tracker::advance_custom_word_point_by)
8197 (completion_tracker::completes_to_completion_word)
8198 (completion_tracker::discard_completions): New methods.
8199 (completion_tracker::m_quote_char)
8200 (completion_tracker::m_use_custom_word_point)
8201 (completion_tracker::m_custom_word_point): New fields.
8202 (advance_to_expression_complete_word_point): Declare.
8203 * f-lang.c (f_collect_symbol_completion_matches): Add
8204 complete_symbol_mode parameter.
8205 * language.h (struct language_defn)
8206 <la_collect_symbol_completion_matches>: Add complete_symbol_mode
8207 parameter.
8208 * linespec.c (linespec_keywords): Add NULL terminator. Make extern.
8209 (linespec_complete_function): New function.
8210 (linespec_lexer_lex_keyword): Adjust.
8211 * linespec.h (linespec_keywords, linespec_complete_function): New
8212 declarations.
8213 * location.c (find_end_quote): New function.
8214 (explicit_location_lex_one): Add explicit_completion_info
8215 parameter. Save quoting info. Don't throw if being called for
8216 completion. Don't handle Ada operators here.
8217 (is_cp_operator, skip_op_false_positives, first_of)
8218 (explicit_location_lex_one_function): New function.
8219 (string_to_explicit_location): Replace 'dont_throw' parameter with
8220 an explicit_completion_info pointer parameter. Handle it. Don't
8221 use explicit_location_lex_one to lex function names. Use
8222 explicit_location_lex_one_function instead.
8223 * location.h (struct explicit_completion_info): New.
8224 (string_to_explicit_location): Replace 'dont_throw' parameter with
8225 an explicit_completion_info pointer parameter.
8226 * symtab.c (default_collect_symbol_completion_matches_break_on):
8227 Add complete_symbol_mode parameter. Handle LINESPEC mode.
8228 (default_collect_symbol_completion_matches)
8229 (collect_symbol_completion_matches): Add complete_symbol_mode
8230 parameter.
8231 (collect_symbol_completion_matches_type): Pass down
8232 complete_symbol_mode::EXPRESSION.
8233 (collect_file_symbol_completion_matches): Add complete_symbol_mode
8234 parameter. Handle LINESPEC mode.
8235 * symtab.h (complete_symbol_mode): New.
8236 (default_collect_symbol_completion_matches_break_on)
8237 (default_collect_symbol_completion_matches)
8238 (collect_symbol_completion_matches)
8239 (collect_file_symbol_completion_matches): Add complete_symbol_mode
8240 parameter.
8241
8242 2017-07-17 Pedro Alves <palves@redhat.com>
8243
8244 * utils.c (enum class strncmp_iw_mode): New.
8245 (strcmp_iw): Rename to ...
8246 (strncmp_iw_with_mode): ... this. Add string2_len and mode
8247 parameters. Handle them.
8248 (strncmp_iw): New.
8249 (strcmp_iw): Reimplement as wrapper around strncmp_iw_with_mode.
8250 * utils.h (strncmp_iw): Declare.
8251 (strcmp_iw): Move describing comments here.
8252
8253 2017-07-17 Pedro Alves <palves@redhat.com>
8254
8255 * c-exp.y (operator_stoken): Use CP_OPERATOR_LEN and
8256 CP_OPERATOR_STR.
8257 * c-typeprint.c (is_type_conversion_operator): Use
8258 CP_OPERATOR_STR.
8259 * cp-support.c (LENGTH_OF_OPERATOR): Delete.
8260 (cp_find_first_component_aux): Use CP_OPERATOR_STR and
8261 CP_OPERATOR_LEN.
8262 * cp-support.h (CP_OPERATOR_STR, CP_OPERATOR_LEN): New.
8263 * gnu-v2-abi.c (gnuv2_is_operator_name): Use CP_OPERATOR_STR.
8264 * gnu-v3-abi.c (gnuv3_is_operator_name): Use CP_OPERATOR_STR.
8265 * linespec.c (linespec_lexer_lex_string): Use CP_OPERATOR_LEN and
8266 CP_OPERATOR_STR.
8267 * location.c: Include "cp-support.h".
8268 (explicit_location_lex_one): Use CP_OPERATOR_LEN and
8269 CP_OPERATOR_STR.
8270 * symtab.c (operator_chars): Use CP_OPERATOR_STR and
8271 CP_OPERATOR_LEN.
8272
8273 2017-07-17 Pedro Alves <palves@redhat.com>
8274
8275 * cli/cli-cmds.c (complete_command): Use a completion tracker
8276 along with completion_find_completion_word for handle_brkchars
8277 phase.
8278 * completer.c (RL_QF_SINGLE_QUOTE, RL_QF_DOUBLE_QUOTE)
8279 (RL_QF_BACKSLASH, RL_QF_OTHER_QUOTE): New.
8280 (struct gdb_rl_completion_word_info): New.
8281 (gdb_rl_find_completion_word): New.
8282 (completion_find_completion_word): New.
8283 * completer.h (completion_find_completion_word): Declare.
8284
8285 2017-07-17 Pedro Alves <palves@redhat.com>
8286
8287 * ada-lang.c (symbol_completion_match): Adjust comments.
8288 (symbol_completion_add): Replace vector parameter with
8289 completion_tracker parameter. Use it.
8290 (ada_make_symbol_completion_list): Rename to...
8291 (ada_collect_symbol_completion_matches): ... this. Add
8292 completion_tracker parameter and use it.
8293 (ada_language_defn): Adjust.
8294 * break-catch-syscall.c (catch_syscall_completer): Adjust
8295 prototype and work with completion_tracker instead of VEC.
8296 * breakpoint.c (condition_completer): Adjust prototype and work
8297 with completion_tracker instead of VEC.
8298 * c-lang.c (c_language_defn, cplus_language_defn)
8299 (asm_language_defn, minimal_language_defn): Adjust to renames.
8300 * cli/cli-cmds.c (complete_command): Rework using
8301 completion_tracker. Catch exceptions when completing.
8302 * cli/cli-decode.c (integer_unlimited_completer)
8303 (complete_on_cmdlist, complete_on_enum): Adjust prototype and work
8304 with completion_tracker instead of VEC.
8305 * command.h (struct completion_tracker): Forward declare.
8306 (completer_ftype, completer_handle_brkchars_ftype): Change
8307 types.
8308 (complete_on_cmdlist, complete_on_enum): Adjust.
8309 * completer.c: Include <algorithm>.
8310 (struct gdb_completer_state): New.
8311 (current_completion): New global.
8312 (readline_line_completion_function): Delete.
8313 (noop_completer, filename_completer)
8314 (filename_completer_handle_brkchars, complete_files_symbols)
8315 (linespec_location_completer): Adjust to work with a
8316 completion_tracker instead of a VEC.
8317 (string_or_empty): New.
8318 (collect_explicit_location_matches): Adjust to work with a
8319 completion_tracker instead of a VEC.
8320 (explicit_location_completer): Rename to ...
8321 (complete_explicit_location): ... this and adjust to work with a
8322 completion_tracker instead of a VEC.
8323 (location_completer): Adjust to work with a completion_tracker
8324 instead of a VEC.
8325 (add_struct_fields): Adjust to work with a completion_list instead
8326 of VEC.
8327 (expression_completer): Rename to ...
8328 (complete_expression): ... this and adjust to work with a
8329 completion_tracker instead of a VEC. Use complete_files_symbols.
8330 (expression_completer): Reimplement on top of complete_expression.
8331 (symbol_completer): Adjust to work with a completion_tracker
8332 instead of a VEC.
8333 (enum complete_line_internal_reason): Add describing comments.
8334 (complete_line_internal_normal_command): Adjust to work with a
8335 completion_tracker instead of a VEC.
8336 (complete_line_internal): Rename to ...
8337 (complete_line_internal_1): ... this and adjust to work with a
8338 completion_tracker instead of a VEC. Assert TEXT is NULL in the
8339 handle_brkchars phase.
8340 (new_completion_tracker): Delete.
8341 (complete_line_internal): Reimplement as TRY/CATCH wrapper around
8342 complete_line_internal_1.
8343 (free_completion_tracker): Delete.
8344 (INITIAL_COMPLETION_HTAB_SIZE): New.
8345 (completion_tracker::completion_tracker)
8346 (completion_tracker::~completion_tracker): New.
8347 (maybe_add_completion): Delete.
8348 (completion_tracker::maybe_add_completion)
8349 (completion_tracker::add_completion)
8350 (completion_tracker::add_completions): New.
8351 (throw_max_completions_reached_error): Delete.
8352 (complete_line): Adjust to work with a completion_tracker instead
8353 of a VEC. Don't create a completion_tracker_t or check for max
8354 completions here.
8355 (command_completer, command_completer_handle_brkchars)
8356 (signal_completer, reg_or_group_completer_1)
8357 (reg_or_group_completer, default_completer_handle_brkchars):
8358 Adjust to work with a completion_tracker.
8359 (gdb_completion_word_break_characters_throw): New.
8360 (gdb_completion_word_break_characters): Reimplement.
8361 (line_completion_function): Delete.
8362 (completion_tracker::recompute_lowest_common_denominator)
8363 (expand_preserving_ws)
8364 (completion_tracker::build_completion_result)
8365 (completion_result::completion_result)
8366 (completion_result::completion_result)
8367 (completion_result::~completion_result)
8368 (completion_result::completion_result)
8369 (completion_result::release_match_list, compare_cstrings)
8370 (completion_result::sort_match_list)
8371 (completion_result::reset_match_list)
8372 (gdb_rl_attempted_completion_function_throw)
8373 (gdb_rl_attempted_completion_function): New.
8374 * completer.h (completion_list, struct completion_result)
8375 (class completion_tracker): New.
8376 (complete_line): Add completion_tracker parameter.
8377 (readline_line_completion_function): Delete.
8378 (gdb_rl_attempted_completion_function): New.
8379 (noop_completer, filename_completer, expression_completer)
8380 (location_completer, symbol_completer, command_completer)
8381 (signal_completer, reg_or_group_completer): Update prototypes.
8382 (completion_tracker_t, new_completion_tracker)
8383 (make_cleanup_free_completion_tracker): Delete.
8384 (enum maybe_add_completion_enum): Delete.
8385 (maybe_add_completion): Delete.
8386 (throw_max_completions_reached_error): Delete.
8387 * corefile.c (complete_set_gnutarget): Adjust to work with a
8388 completion_tracker instead of a VEC.
8389 * cp-abi.c (cp_abi_completer): Adjust to work with a
8390 completion_tracker instead of a VEC.
8391 * d-lang.c (d_language_defn): Adjust.
8392 * disasm.c (disassembler_options_completer): Adjust to work with a
8393 completion_tracker instead of a VEC.
8394 * f-lang.c (f_make_symbol_completion_list): Rename to ...
8395 (f_collect_symbol_completion_matches): ... this. Adjust to work
8396 with a completion_tracker instead of a VEC.
8397 (f_language_defn): Adjust.
8398 * go-lang.c (go_language_defn): Adjust.
8399 * guile/scm-cmd.c (cmdscm_add_completion, cmdscm_completer):
8400 Adjust to work with a completion_tracker instead of a VEC.
8401 * infrun.c (handle_completer): Likewise.
8402 * interps.c (interpreter_completer): Likewise.
8403 * interps.h (interpreter_completer): Likewise.
8404 * language.c (unknown_language_defn, auto_language_defn)
8405 (local_language_defn): Adjust.
8406 * language.h (language_defn::la_make_symbol_completion_list):
8407 Rename to ...
8408 (language_defn::la_collect_symbol_completion_matches): ... this
8409 and adjust to work with a completion_tracker instead of a VEC.
8410 * m2-lang.c (m2_language_defn): Adjust.
8411 * objc-lang.c (objc_language_defn): Adjust.
8412 * opencl-lang.c (opencl_language_defn): Adjust.
8413 * p-lang.c (pascal_language_defn): Adjust.
8414 * python/py-cmd.c (cmdpy_completer_helper): Handle NULL word.
8415 (cmdpy_completer_handle_brkchars, cmdpy_completer): Adjust to work
8416 with a completion_tracker.
8417 * rust-lang.c (rust_language_defn): Adjust.
8418 * symtab.c (free_completion_list, do_free_completion_list)
8419 (return_val, completion_tracker): Delete.
8420 (completion_list_add_name, completion_list_add_symbol)
8421 (completion_list_add_msymbol, completion_list_objc_symbol)
8422 (completion_list_add_fields, add_symtab_completions): Add
8423 completion_tracker parameter and use it.
8424 (default_make_symbol_completion_list_break_on_1): Rename to...
8425 (default_collect_symbol_completion_matches_break_on): ... this.
8426 Add completion_tracker parameter and use it instead of allocating
8427 a completion tracker here.
8428 (default_make_symbol_completion_list_break_on): Delete old
8429 implementation.
8430 (default_make_symbol_completion_list): Delete.
8431 (default_collect_symbol_completion_matches): New.
8432 (make_symbol_completion_list): Delete.
8433 (collect_symbol_completion_matches): New.
8434 (make_symbol_completion_type): Rename to ...
8435 (collect_symbol_completion_matches_type): ... this. Add
8436 completion_tracker parameter and use it instead of VEC.
8437 (make_file_symbol_completion_list_1): Rename to...
8438 (collect_file_symbol_completion_matches): ... this. Add
8439 completion_tracker parameter and use it instead of VEC.
8440 (make_file_symbol_completion_list): Delete.
8441 (add_filename_to_list): Use completion_list instead of a VEC.
8442 (add_partial_filename_data::list): Now a completion_list.
8443 (make_source_files_completion_list): Work with a completion_list
8444 instead of a VEC.
8445 * symtab.h: Include "completer.h".
8446 (default_make_symbol_completion_list_break_on)
8447 (default_make_symbol_completion_list, make_symbol_completion_list)
8448 (make_symbol_completion_type, make_file_symbol_completion_list)
8449 (make_source_files_completion_list): Delete.
8450 (default_collect_symbol_completion_matches_break_on)
8451 (default_collect_symbol_completion_matches)
8452 (collect_symbol_completion_matches)
8453 (collect_symbol_completion_matches_type)
8454 (collect_file_symbol_completion_matches)
8455 (make_source_files_completion_list): New.
8456 * top.c (init_main): Don't install a rl_completion_entry_function
8457 hook. Install a rl_attempted_completion_function hook instead.
8458 * tui/tui-layout.c (layout_completer): Adjust to work with a
8459 completion_tracker.
8460 * tui/tui-regs.c (tui_reggroup_completer):
8461 * tui/tui-win.c (window_name_completer, focus_completer)
8462 (winheight_completer): Adjust to work with a completion_tracker.
8463 * value.c: Include "completer.h".
8464 (complete_internalvar): Adjust to work with a completion_tracker.
8465 * value.h (complete_internalvar): Likewise.
8466
8467 2017-07-17 Pedro Alves <palves@redhat.com>
8468
8469 * cli/cli-decode.c (set_cmd_completer_handle_brkchars): Adjust to
8470 renames.
8471 * cli/cli-decode.h (struct cmd_list_element) <completer>: Move
8472 comments to completer_ftype's declaration.
8473 <completer_handle_brkchars>: Change type to
8474 completer_handle_brkchars_ftype.
8475 * command.h (completer_ftype): Add describing comment and give
8476 names to parameters.
8477 (completer_ftype_void): Rename to ...
8478 (completer_handle_brkchars_ftype) ... this. Add describing comment.
8479 (set_cmd_completer_handle_brkchars): Adjust.
8480 * completer.c (filename_completer_handle_brkchars): New function.
8481 (complete_line_internal_normal_command): New function, factored
8482 out from ...
8483 (complete_line_internal): ... here.
8484 (command_completer_handle_brkchars)
8485 (default_completer_handle_brkchars)
8486 (completer_handle_brkchars_func_for_completer): New functions.
8487 * completer.h (set_gdb_completion_word_break_characters): Delete
8488 declaration.
8489 (completer_handle_brkchars_func_for_completer): New declaration.
8490 * python/py-cmd.c (cmdpy_completer_handle_brkchars): Adjust to use
8491 completer_handle_brkchars_func_for_completer.
8492
8493 2017-07-17 Pedro Alves <palves@redhat.com>
8494
8495 * completer.c (symbol_completer): New function, based on
8496 make_symbol_completion_list_fn.
8497 * completer.h (symbol_completer): New declaration.
8498 * guile/scm-cmd.c (cmdscm_completers): Adjust.
8499 * python/py-cmd.c (completers): Adjust.
8500 * symtab.c (make_symbol_completion_list_fn): Delete.
8501 * symtab.h (make_symbol_completion_list_fn): Delete.
8502 * cli/cli-decode.c (add_cmd): Adjust.
8503
8504 2017-07-17 Pedro Alves <palves@redhat.com>
8505
8506 * Makefile.in (COMMON_OBS): Add filename-seen-cache.o.
8507 * dwarf2read.c: Include "filename-seen-cache.h".
8508 * dwarf2read.c (dwarf2_per_objfile) <filenames_cache>: New field.
8509 (dw2_map_symbol_filenames): Build and use a filenames_seen_cache.
8510 * filename-seen-cache.c: New file.
8511 * filename-seen-cache.h: New file.
8512 * symtab.c: Include "filename-seen-cache.h".
8513 (struct filename_seen_cache, INITIAL_FILENAME_SEEN_CACHE_SIZE)
8514 (create_filename_seen_cache, clear_filename_seen_cache)
8515 (delete_filename_seen_cache, filename_seen): Delete, parts moved
8516 to filename-seen-cache.h/filename-seen-cache.c.
8517 (output_source_filename, sources_info)
8518 (maybe_add_partial_symtab_filename)
8519 (make_source_files_completion_list): Adjust to use
8520 filename_seen_cache.
8521
8522 2017-07-17 Pedro Alves <palves@redhat.com>
8523
8524 * dwarf2read.c (dwarf2_per_objfile): In-class initialize all
8525 fields.
8526 (dwarf2_per_objfile::dwarf2_per_objfile(objfile*, const
8527 dwarf2_debug_sections*)): New.
8528 (dwarf2_per_objfile::dwarf2_per_objfile(const
8529 dwarf2_per_objfile&)): Declare as deleted.
8530 (dwarf2_per_objfile::operator=): Declare as deleted.
8531 (dwarf2_per_objfile::dwarf2_per_objfile)
8532 (dwarf2_per_objfile::~dwarf2_per_objfile)
8533 (dwarf2_per_objfile::free_cached_comp_units): New.
8534 (dwarf2_has_info): dwarf2_per_objfile initialization code moved to
8535 ctor. Call dwarf2_per_objfile's ctor manually.
8536 (dwarf2_locate_sections): Deleted/refactored as ...
8537 (dwarf2_per_objfile::locate_sections): ... this new method.
8538 (free_cached_comp_units): Defer to
8539 dwarf2_per_objfile::free_cached_comp_units.
8540 (dwarf2_free_objfile): Call dwarf2_per_objfile's dtor manually.
8541
8542 2017-07-14 Tom Tromey <tom@tromey.com>
8543
8544 PR rust/21764:
8545 * rust-exp.y (convert_ast_to_expression): Add "want_type"
8546 parameter.
8547 <UNOP_SIZEOF>: Split into separate case.
8548 <UNOP_VAR_VALUE>: Handle want_type. Add error case.
8549
8550 2017-07-14 Tom Tromey <tom@tromey.com>
8551
8552 PR rust/21763:
8553 * symtab.c (symbol_matches_domain): Add language_rust to special
8554 case.
8555 * rust-exp.y (convert_ast_to_expression) <OP_VAR_VALUE>: Don't
8556 treat LOC_TYPEDEF symbols as variables.
8557
8558 2017-07-14 Pedro Alves <palves@redhat.com>
8559
8560 * symtab.c (make_file_symbol_completion_list_1): Iterate over
8561 symtabs matching all symtabs with SRCFILE as file name instead of
8562 only considering the first hit, with lookup_symtab.
8563
8564 2017-07-14 Simon Marchi <simon.marchi@ericsson.com>
8565
8566 * ax-gdb.c (gen_aggregate_elt_ref): Remove operand_name and
8567 operator_name parameters.
8568 (gen_expr): Update function call.
8569
8570 2017-07-14 Simon Marchi <simon.marchi@ericsson.com>
8571
8572 * dwarf2loc.h (dwarf2_compile_expr_to_ax): Remove gdbarch
8573 parameter.
8574 * symtab.h (struct symbol_computed_ops::tracepoint_var_ref):
8575 Likewise.
8576 * dwarf2loc.c (dwarf2_compile_expr_to_ax): Remove gdbarch
8577 parameter, use agent_expr::gdbarch instead, update function
8578 calls.
8579 (locexpr_tracepoint_var_ref): Likewise.
8580 (loclist_tracepoint_var_ref): Likewise.
8581 * ax-gdb.c (gen_trace_static_fields): Likewise.
8582 (gen_traced_pop): Likewise.
8583 (gen_frame_args_address): Likewise.
8584 (gen_frame_locals_address): Likewise.
8585 (gen_var_ref): Likewise.
8586 (gen_struct_ref_recursive): Likewise.
8587 (gen_static_field): Likewise.
8588 (gen_maybe_namespace_elt): Likewise.
8589 (gen_expr): Likewise.
8590 (gen_trace_for_var): Likewise.
8591 (gen_trace_for_expr): Likewise.
8592 (gen_trace_for_return_address): Likewise.
8593
8594 2017-07-14 Simon Marchi <simon.marchi@ericsson.com>
8595
8596 * ax-gdb.c (gen_deref, gen_address_of): Remove unused ax
8597 parameter.
8598 (gen_struct_ref, gen_expr, gen_expr_binop_rest): Update call.
8599
8600 2017-07-14 Simon Marchi <simon.marchi@ericsson.com>
8601
8602 * ax-gdb.c (gen_usual_unary): Remove exp parameter, get gdbarch
8603 from ax, update calls.
8604 (gen_usual_arithmetic): Likewise.
8605 (gen_integral_promotions): Likewise.
8606 (gen_bitfield_ref): Likewise.
8607 (gen_primitive_field): Likewise.
8608 (gen_struct_ref_recursive): Likewise.
8609 (gen_struct_ref): Likewise.
8610 (gen_maybe_namespace_elt): Likewise.
8611 (gen_struct_elt_for_reference): Likewise.
8612 (gen_namespace_elt): Likewise.
8613 (gen_aggregate_elt_ref): Likewise.
8614 (gen_expr): Get gdbarch from ax, update calls.
8615 (gen_expr_binop_rest): Likewise.
8616
8617 2017-07-13 Pedro Alves <palves@redhat.com>
8618
8619 * amd64-darwin-tdep.c (x86_darwin_init_abi_64): Pass tdesc_amd64
8620 as default tdesc.
8621 * amd64-dicos-tdep.c (amd64_dicos_init_abi):
8622 * amd64-fbsd-tdep.c (amd64fbsd_init_abi):
8623 * amd64-linux-tdep.c (amd64_linux_init_abi): Pass
8624 tdesc_amd64_linux as default tdesc. Get final tdesc from the
8625 tdep.
8626 (amd64_x32_linux_init_abi): Pass tdesc_x32_linux as default tdesc.
8627 Get final tdesc from the tdep.
8628 * amd64-nbsd-tdep.c (amd64nbsd_init_abi): Pass tdesc_amd64 as
8629 default tdesc.
8630 * amd64-obsd-tdep.c (amd64obsd_init_abi): Likewise.
8631 * amd64-sol2-tdep.c (amd64_sol2_init_abi): Likewise.
8632 * amd64-tdep.c (amd64_init_abi): Add 'default_tdesc' parameter.
8633 Use it as default tdesc.
8634 (amd64_x32_init_abi): Add 'default_tdesc' parameter, and pass it
8635 down to amd_init_abi. No longer handle fallback tdesc here.
8636 * amd64-tdep.h (tdesc_x32): Declare.
8637 (amd64_init_abi, amd64_x32_init_abi): Add 'default_tdesc'
8638 parameter.
8639 * amd64-windows-tdep.c (amd64_windows_init_abi): Pass tdesc_amd64
8640 as default tdesc.
8641
8642 2017-07-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
8643
8644 * s390-linux-tdep.c (s390_process_record): Add support for
8645 instructions new in arch12.
8646
8647 2017-07-11 John Baldwin <jhb@FreeBSD.org>
8648
8649 * amd64-bsd-nat.c (amd64bsd_fetch_inferior_registers): Use
8650 PT_GETFSBASE and PT_GETGSBASE.
8651 (amd64bsd_store_inferior_registers): Use PT_SETFSBASE and
8652 PT_SETGSBASE.
8653
8654 2017-07-11 John Baldwin <jhb@FreeBSD.org>
8655
8656 * features/Makefile (amd64.dat, amd64-avx.dat, amd64-mpx.dat)
8657 (amd64-avx-mpx.dat, amd64-avx-avx512.dat)
8658 (amd64-avx-mpx-avx512-pku.dat): Add i386/64bit-segments.xml in
8659 those rules.
8660 * features/i386/amd64-avx-avx512.xml: Add 64bit-segments.xml.
8661 * features/i386/amd64-avx-mpx-avx512-pku.xml: Add 64bit-segments.xml.
8662 * features/i386/amd64-avx-mpx.xml: Add 64bit-segments.xml.
8663 * features/i386/amd64-avx.xml: Add 64bit-segments.xml.
8664 * features/i386/amd64-mpx.xml: Add 64bit-segments.xml.
8665 * features/i386/amd64.xml: Add 64bit-segments.xml.
8666 * features/i386/amd64-avx-avx512.c: Regenerated.
8667 * features/i386/amd64-avx-mpx-avx512-pku.c: Regenerated.
8668 * features/i386/amd64-avx-mpx.c: Regenerated.
8669 * features/i386/amd64-avx.c: Regenerated.
8670 * features/i386/amd64-mpx.c: Regenerated.
8671 * features/i386/amd64.c: Regenerated.
8672 * regformats/i386/amd64-avx-avx512.dat: Regenerated.
8673 * regformats/i386/amd64-avx-mpx-avx512-pku.dat: Regenerated.
8674 * regformats/i386/amd64-avx-mpx.dat: Regenerated.
8675 * regformats/i386/amd64-avx.dat: Regenerated.
8676 * regformats/i386/amd64-mpx.dat: Regenerated.
8677 * regformats/i386/amd64.dat: Regenerated.
8678
8679 2017-07-10 Yao Qi <yao.qi@linaro.org>
8680
8681 * features/i386/amd64-avx-avx512-linux.c: Re-generated.
8682 * features/i386/amd64-avx-mpx-avx512-pku-linux.c: Re-generated.
8683
8684 2017-07-10 Anton Kolesov <Anton.Kolesov@synopsys.com>
8685
8686 * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add setenv and
8687 unsetenv.
8688 * gnulib/aclocal.m4: Regenerate.
8689 * gnulib/config.in: Regenerate.
8690 * gnulib/configure: Regenerate.
8691 * gnulib/import/Makefile.am: Regenerate.
8692 * gnulib/import/Makefile.in: Regenerate.
8693 * gnulib/import/m4/gnulib-cache.m4: Regenerate.
8694 * gnulib/import/m4/gnulib-comp.m4: Regenerate.
8695 * gnulib/import/m4/environ.m4: New file.
8696 * gnulib/import/m4/setenv.m4: New file.
8697 * gnulib/import/setenv.c: New file.
8698 * gnulib/import/unsetenv.c: New file.
8699
8700 2017-07-09 Simon Marchi <simon.marchi@ericsson.com>
8701
8702 * compile/compile-loc2c.c (do_compile_dwarf_expr_to_c): Read
8703 address when op is DW_OP_addr.
8704
8705 2017-07-09 Tom Tromey <tom@tromey.com>
8706
8707 * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Reverse size
8708 check and apply to outer type.
8709
8710 2017-07-07 John Baldwin <jhb@FreeBSD.org>
8711
8712 * fbsd-tdep.c (LWPINFO_OFFSET, LWPINFO_PL_FLAGS)
8713 (LWPINFO64_PL_SIGINFO, LWPINFO32_PL_SIGINFO, PL_FLAG_SI)
8714 (SIZE64_SIGINFO_T, SIZE32_SIGINFO_T, fbsd_core_xfer_siginfo): New.
8715 (fbsd_init_abi): Install gdbarch "core_xfer_siginfo" method.
8716
8717 2017-07-07 John Baldwin <jhb@FreeBSD.org>
8718
8719 * fbsd-tdep.c (fbsd_core_thread_name): Use thread_section_name.
8720
8721 2017-07-07 John Baldwin <jhb@FreeBSD.org>
8722
8723 * corelow.c (get_core_siginfo): Remove.
8724 (core_xfer_partial): Use the gdbarch "core_xfer_siginfo" method
8725 instead of get_core_siginfo.
8726 * gdbarch.sh (core_xfer_siginfo): New gdbarch callback.
8727 * gdbarch.h: Re-generate.
8728 * gdbarch.c: Re-generate.
8729 * linux-tdep.c (linux_core_xfer_siginfo): New.
8730 (linux_init_abi): Install gdbarch "core_xfer_siginfo" method.
8731
8732 2017-07-07 John Baldwin <jhb@FreeBSD.org>
8733
8734 * corelow.c (thread_section_name): Move to ...
8735 * gdbcore.h (thread_section_name): ... here.
8736
8737 2017-07-07 John Baldwin <jhb@FreeBSD.org>
8738
8739 * fbsd-nat.c [PT_LWPINFO && __LP64__] (union sigval32)
8740 (struct siginfo32): New.
8741 [PT_LWPINFO] (fbsd_siginfo_size, fbsd_convert_siginfo): New.
8742 (fbsd_xfer_partial) [PT_LWPINFO]: Handle TARGET_OBJECT_SIGNAL_INFO
8743 via ptrace(PT_LWPINFO).
8744
8745 2017-07-07 John Baldwin <jhb@FreeBSD.org>
8746
8747 * fbsd-tdep.c (fbsd_gdbarch_data_handle, struct fbsd_gdbarch_data)
8748 (init_fbsd_gdbarch_data, get_fbsd_gdbarch_data)
8749 (fbsd_get_siginfo_type): New.
8750 (fbsd_init_abi): Install gdbarch "get_siginfo_type" method.
8751 (_initialize_fbsd_tdep): New.
8752
8753 2017-07-06 David Blaikie <dblaikie@gmail.com>
8754
8755 * dwarf2read.c (struct dwo_file): Use a htab of dwo_unit* (rather than
8756 a singular dwo_unit*) to support multiple CUs in the same way that
8757 multiple TUs are supported.
8758 (create_cus_hash_table): Replace create_dwo_cu with a function for
8759 parsing multiple CUs from a DWO file.
8760 (open_and_init_dwo_file): Use create_cus_hash_table rather than
8761 create_dwo_cu.
8762 (lookup_dwo_cutu): Lookup CU in the hash table in the dwo_file with
8763 htab_find, rather than comparing the signature to a singleton CU in
8764 the dwo_file.
8765
8766 2017-07-06 Pedro Alves <palves@redhat.com>
8767
8768 * python/py-unwind.c (pyuw_dealloc_cache): Fix for loop condition.
8769
8770 2017-07-04 Pedro Alves <palves@redhat.com>
8771
8772 * gdbtypes.c (recursive_dump_type): Don't reference TYPE_STATIC.
8773 * gdbtypes.h (TYPE_STATIC): Delete.
8774 (struct fn_field) <is_public, is_abstract, is_static, is_final,
8775 is_synchronized, is_native>: Delete.
8776 <dummy>: Bump.
8777 (TYPE_FN_FIELD_PUBLIC, TYPE_FN_FIELD_STATIC, TYPE_FN_FIELD_FINAL)
8778 (TYPE_FN_FIELD_SYNCHRONIZED, TYPE_FN_FIELD_NATIVE)
8779 (TYPE_FN_FIELD_ABSTRACT): Delete.
8780
8781 2017-07-03 Simon Marchi <simon.marchi@ericsson.com>
8782
8783 * buffer.h (buffer_finish): Fix spelling mistakes.
8784
8785 2017-07-01 Eli Zaretskii <eliz@gnu.org>
8786
8787 * .dir-locals.el: Automatically switch to C-style comments in
8788 versions of Emacs that support the feature.
8789
8790 2017-06-30 Sergio Durigan Junior <sergiodj@redhat.com>
8791 Pedro Alves <palves@redhat.com>
8792
8793 PR cli/21688
8794 * cli/cli-script.c (command_name_equals_not_inline): Remove function.
8795 (process_next_line): New variable 'inline_cmd'.
8796 Adjust 'if' clauses for "python", "compile" and "guile" to use
8797 'command_name_equals' and check for '!inline_cmd'.
8798
8799 2017-06-30 Sergio Durigan Junior <sergiodj@redhat.com>
8800
8801 PR cli/21688
8802 * cli/cli-script.c (command_name_equals_not_inline): New function.
8803 (process_next_line): Adjust 'if' clauses for "python", "compile"
8804 and "guile" to use command_name_equals_not_inline.
8805
8806 2017-06-29 Pedro Alves <palves@redhat.com>
8807
8808 * completer.c (expression_completer): Call
8809 linespec_location_completer instead of location_completer.
8810
8811 2017-06-29 Pedro Alves <palves@redhat.com>
8812
8813 * completer.c (expression_completer): Remove code that recomputes
8814 'text' from 'word'.
8815
8816 2017-06-29 Yao Qi <yao.qi@linaro.org>
8817
8818 * regformats/regdat.sh: Generate code with
8819 "ifndef IN_PROCESS_AGENT".
8820
8821 2017-06-28 Pedro Alves <palves@redhat.com>
8822
8823 * command.h: Include "common/scoped_restore.h".
8824
8825 2017-06-28 Yao Qi <yao.qi@linaro.org>
8826
8827 * mi/mi-cmd-break.c (mi_argv_to_format): Use obstack_grow_str
8828 instead of obstack_grow.
8829
8830 2017-06-28 Doug Gilmore <Doug.Gilmore@imgtec.com>
8831
8832 PR gdb/21337
8833 * symfile.c (reread_symbols): Call objfiles_changed just before
8834 read_symbols.
8835
8836 2017-06-27 Pedro Alves <palves@redhat.com>
8837
8838 * symtab.c (COMPLETION_LIST_ADD_SYMBOL)
8839 (MCOMPLETION_LIST_ADD_SYMBOL): Delete macros, replace with ...
8840 (completion_list_add_symbol, completion_list_add_msymbol):
8841 ... these new functions.
8842 (add_symtab_completions)
8843 (default_make_symbol_completion_list_break_on_1): Adjust.
8844
8845 2017-06-27 Pedro Alves <palves@redhat.com>
8846
8847 * objfiles.c (get_objfile_bfd_data): Call bfd_alloc instead of
8848 bfd_zalloc. Call objfile_per_bfd_storage's ctor.
8849 (free_objfile_per_bfd_storage): Call objfile_per_bfd_storage's
8850 dtor.
8851 * objfiles.h (objfile_per_bfd_storage): Add ctor. Make
8852 'storage_obstack' field an auto_obstack. In-class initialize all
8853 non-bitfield fields. Make minsyms_read bool.
8854 * symfile.c (read_symbols): Adjust.
8855
8856 2017-06-27 Alan Hayward <alan.hayward@arm.com>
8857
8858 * remote-sim.c (gdbsim_fetch_register): Use byte_vector.
8859 (gdbsim_store_register): Likewise.
8860
8861 2017-06-27 Pedro Alves <palves@redhat.com>
8862
8863 * c-exp.y (name_obstack): Now an auto_obstack.
8864 (yylex): Use auto_obstack::clear.
8865 (c_parse): Use auto_obstack::clear instead of reinitializing and
8866 freeing the obstack.
8867 * c-lang.c (evaluate_subexp_c): Use auto_obstack.
8868 * d-exp.y (name_obstack): Now an auto_obstack.
8869 (yylex): Use auto_obstack::clear.
8870 (d_parse): Use auto_obstack::clear instead of reinitializing and
8871 freeing the obstack.
8872 * dwarf2loc.c (fetch_const_value_from_synthetic_pointer): Use
8873 auto_obstack.
8874 * dwarf2read.c (create_addrmap_from_index)
8875 (dwarf2_build_psymtabs_hard)
8876 (update_enumeration_type_from_children): Likewise.
8877 * gdb_obstack.h (auto_obstack): New type.
8878 * go-exp.y (name_obstack): Now an auto_obstack.
8879 (build_packaged_name): Use auto_obstack::clear.
8880 (go_parse): Use auto_obstack::clear instead of reinitializing and
8881 freeing the obstack.
8882 * linux-tdep.c (linux_make_mappings_corefile_notes): Use
8883 auto_obstack.
8884 * printcmd.c (printf_wide_c_string, ui_printf): Use auto_obstack.
8885 * rust-exp.y (work_obstack): Now an auto_obstack.
8886 (rust_parse, rust_lex_tests): Use auto_obstack::clear instead of
8887 reinitializing and freeing the obstack.
8888 * utils.c (do_obstack_free, make_cleanup_obstack_free): Delete.
8889 (host_char_to_target): Use auto_obstack.
8890 * utils.h (make_cleanup_obstack_free): Delete declaration.
8891 * valprint.c (generic_emit_char, generic_printstr): Use
8892 auto_obstack.
8893
8894 2017-06-27 Simon Marchi <simon.marchi@ericsson.com>
8895
8896 * darwin-nat.c (darwin_check_new_threads): Don't handle dummy
8897 thread.
8898 (darwin_init_thread_list): Don't update dummy thread.
8899 (darwin_create_inferior, darwin_attach): Don't add a dummy thread.
8900
8901 2017-06-26 Simon Marchi <simon.marchi@ericsson.com>
8902
8903 * record-full.c (netorder16): Remove.
8904
8905 2017-06-26 Simon Marchi <simon.marchi@ericsson.com>
8906
8907 * common/diagnostics.h: Define macros for GCC.
8908 (DIAGNOSTIC_IGNORE_UNUSED_FUNCTION): New macro.
8909 * common/vec.h: Include diagnostics.h.
8910 (DIAGNOSTIC_IGNORE_UNUSED_VEC_FUNCTION): New macro.
8911 (DEF_VEC_I, DEF_VEC_P, DEF_VEC_O): Ignore -Wunused-function
8912 warning.
8913
8914 2017-06-26 Simon Marchi <simon.marchi@ericsson.com>
8915
8916 * common/diagnostics.h (DIAGNOSTIC_IGNORE_DEPRECATED_REGISTER):
8917 New macro.
8918 * ada-lex.l: Ignore deprecated register warnings.
8919
8920 2017-06-25 Simon Marchi <simon.marchi@ericsson.com>
8921
8922 * main.c (get_init_files): Replace "SYSTEM_GDBINIT +
8923 datadir_len" with "&SYSTEM_GDBINIT[datadir_len]".
8924
8925 2017-06-25 Simon Marchi <simon.marchi@ericsson.com>
8926
8927 * dtrace-probe.c (dtrace_process_dof_probe): Put semi-colon on
8928 its own line.
8929
8930 2017-06-25 Simon Marchi <simon.marchi@ericsson.com>
8931
8932 * nat/x86-dregs.c (x86_show_dr): Print registers one per line.
8933
8934 2017-06-23 Alan Hayward <alan.hayward@arm.com>
8935
8936 * xtensa-tdep.c (XTENSA_MAX_REGISTER_SIZE): Add.
8937 (xtensa_register_write_masked): Use XTENSA_MAX_REGISTER_SIZE.
8938 (xtensa_register_read_masked): Likewise.
8939
8940 2017-06-22 Sergio Durigan Junior <sergiodj@redhat.com>
8941
8942 * common/environ.c (gdb_environ::unset): Update comment.
8943
8944 2017-06-22 Alan Hayward <alan.hayward@arm.com>
8945
8946 * python/py-unwind.c (pyuw_sniffer): Allocate space for
8947 registers.
8948
8949 2017-06-22 Alan Hayward <alan.hayward@arm.com>
8950
8951 * record-full.c (record_full_exec_insn): Use byte_vector.
8952
8953 2017-06-22 Yao Qi <yao.qi@linaro.org>
8954
8955 * regformats/i386/amd64-avx-mpx-avx512-pku-linux.dat: Regenerated.
8956 * regformats/i386/amd64-avx-mpx-avx512-pku.dat: Regenerated.
8957
8958 2017-06-22 Alan Hayward <alan.hayward@arm.com>
8959
8960 * remote.c (cached_reg): Move from here...
8961 * regcache.h (cached_reg): ...to here.
8962 * python/py-unwind.c (struct reg_info): Remove.
8963 (cached_frame_info): Use cached_reg_t.
8964 (pyuw_prev_register): Likewise.
8965 (pyuw_sniffer): Use cached_reg_t and allocate registers.
8966 (pyuw_dealloc_cache): Free all registers.
8967
8968 2017-06-22 Pedro Alves <palves@redhat.com>
8969 Simon Marchi <simon.marchi@ericsson.com>
8970
8971 * unittests/environ-selftests.c (run_tests): Ignore -Wself-move
8972 warning.
8973 * common/diagnostics.h: New file.
8974
8975 2017-06-22 Pedro Alves <palves@redhat.com>
8976
8977 * common/agent.h: Add include guards.
8978
8979 2017-06-21 Simon Marchi <simon.marchi@ericsson.com>
8980
8981 * target.h (struct target_ops) <to_xfer_partial>: Update doc to
8982 talk about addressable units instead of bytes.
8983
8984 2017-06-20 Sergio Durigan Junior <sergiodj@redhat.com>
8985
8986 * common/environ.c (gdb_environ::unset): Use '::iterator' instead
8987 of '::const_iterator'.
8988
8989 2017-06-20 Sergio Durigan Junior <sergiodj@redhat.com>
8990
8991 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
8992 'unittests/environ-selftests.c'.
8993 (SUBDIR_UNITTESTS_OBS): Add 'environ-selftests.o'.
8994 * charset.c (find_charset_names): Declare object 'iconv_env'.
8995 Update code to use 'iconv_env' object. Remove call to
8996 'free_environ'.
8997 * common/environ.c: Include <utility>.
8998 (make_environ): Delete function.
8999 (free_environ): Delete function.
9000 (gdb_environ::clear): New function.
9001 (gdb_environ::operator=): New function.
9002 (gdb_environ::get): Likewise.
9003 (environ_vector): Delete function.
9004 (set_in_environ): Delete function.
9005 (gdb_environ::set): New function.
9006 (unset_in_environ): Delete function.
9007 (gdb_environ::unset): New function.
9008 (gdb_environ::envp): Likewise.
9009 * common/environ.h: Include <vector>.
9010 (struct gdb_environ): Delete; transform into...
9011 (class gdb_environ): ... this class.
9012 (free_environ): Delete prototype.
9013 (init_environ, get_in_environ, set_in_environ, unset_in_environ,
9014 environ_vector): Likewise.
9015 * infcmd.c (run_command_1): Update code to call
9016 'envp' from 'gdb_environ' class.
9017 (environment_info): Update code to call methods from 'gdb_environ'
9018 class.
9019 (unset_environment_command): Likewise.
9020 (path_info): Likewise.
9021 (path_command): Likewise.
9022 * inferior.c (inferior::~inferior): Delete call to 'free_environ'.
9023 (inferior::inferior): Initialize 'environment' using the host's
9024 information.
9025 * inferior.h: Remove forward declaration of 'struct gdb_environ'.
9026 Include "environ.h".
9027 (class inferior) <environment>: Change type from 'struct
9028 gdb_environ' to 'gdb_environ'.
9029 * mi/mi-cmd-env.c (mi_cmd_env_path): Update code to call
9030 methods from 'gdb_environ' class.
9031 * solib.c (solib_find_1): Likewise
9032 * unittests/environ-selftests.c: New file.
9033
9034 2017-06-20 Yao Qi <yao.qi@linaro.org>
9035
9036 * features/i386/i386-linux.xml: Exchange the order of including
9037 32bit-linux.xml and 32bit-sse.xml.
9038 * features/i386/i386-linux.c: Regenerated.
9039
9040 2017-06-20 Yao Qi <yao.qi@linaro.org>
9041
9042 * target-descriptions.c (tdesc_reg): Add ctor, dtor.
9043 Delete copy ctor and assignment operator.
9044 (tdesc_type): Likewise.
9045 (tdesc_feature): Likewise.
9046 (tdesc_free_reg): Remove.
9047 (tdesc_create_reg): Use new.
9048 (tdesc_free_type): Remove.
9049 (tdesc_create_vector): Use new.
9050 (tdesc_create_union): Likewise.
9051 (tdesc_create_flags): Likewise.
9052 (tdesc_create_enum): Likewise.
9053 (tdesc_free_feature): Delete.
9054 (free_target_description): Use delete.
9055
9056 2017-06-19 John Baldwin <jhb@FreeBSD.org>
9057
9058 * mips-tdep.c (print_gp_register_row): Don't error for unavailable
9059 registers.
9060
9061 2017-06-19 Pedro Alves <palves@redhat.com>
9062
9063 * dwarf2read.c (write_psymtabs_to_index): Construct file_closer
9064 after gdb::unlinker.
9065
9066 2017-06-19 Sergio Durigan Junior <sergiodj@redhat.com>
9067
9068 * mi/mi-cm-env.c (_initialize_mi_cmd_env): Use getenv instead of
9069 gdb_environ to access an environment variable.
9070
9071 2017-06-18 Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
9072
9073 * nat/linux-ptrace.c (linux_fork_to_function): Add cast to
9074 gdb_byte*.
9075
9076 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
9077
9078 * nat/fork-inferior.h (trace_start_error): Add ATTRIBUTE_PRINTF.
9079
9080 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
9081
9082 * configure: Re-generate.
9083 * warning.m4 (build_warnings): Add -Wno-mismatched-tags.
9084
9085 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
9086
9087 * configure: Re-generate.
9088 * warning.m4: Pass -Werror to compiler when checking for
9089 supported warning flags.
9090
9091 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
9092
9093 * Makefile.in (COMPILE.pre): Add "-x c++".
9094
9095 2017-06-16 Alan Hayward <alan.hayward@arm.com>
9096 Pedro Alves <palves@redhat.com>
9097 Yao Qi <yao.qi@linaro.org>
9098
9099 * defs.h (RequireLongest): New.
9100 (extract_integer): Declare function template.
9101 (extract_signed_integer): Remove the declaration, but define it
9102 static inline.
9103 (extract_unsigned_integer): Likewise.
9104 (store_integer): Declare function template.
9105 (store_signed_integer): Remove the declaration, but define it
9106 static inline.
9107 (store_unsigned_integer): Likewise.
9108 * findvar.c (extract_integer): New function template.
9109 (extract_signed_integer): Remove.
9110 (extract_unsigned_integer): Remove.
9111 (extract_integer<LONGEST>, extract_integer<ULONGEST>): Explicit
9112 instantiations.
9113 (store_integer): New function template.
9114 (store_signed_integer): Remove.
9115 (store_unsigned_integer): Remove.
9116 (store_integer): Explicit instantiations.
9117 * regcache.c (regcache_raw_read_signed): Update.
9118 (regcache::raw_read): New function.
9119 (regcache::raw_read_signed): Remove.
9120 (regcache::raw_read_unsigned): Remove.
9121 (regcache_raw_read_unsigned): Update.
9122 (regcache_raw_write_unsigned): Update.
9123 (regcache::raw_write_signed): Remove.
9124 (regcache::raw_write): New function.
9125 (regcache_cooked_read_signed): Update.
9126 (regcache::raw_write_unsigned): Remove.
9127 (regcache::cooked_read_signed): Remove.
9128 (regcache_cooked_read_unsigned): Update.
9129 (regcache::cooked_read_unsigned): Remove.
9130 (regcache_cooked_write_signed): Update.
9131 (regcache_cooked_write_unsigned): Update.
9132 * regcache.h (regcache) <raw_read_signed>: Remove.
9133 <raw_write_signed, raw_read_unsigned, raw_write_unsigned>: Remove.
9134 <raw_read, raw_write>: New.
9135 <cooked_read_signed, cooked_write_signed>: Remove.
9136 <cooked_write_unsigned, cooked_read_unsigned>: Remove.
9137 <cooked_read, cooked_write>: New.
9138 * sh64-tdep.c (sh64_pseudo_register_read): Update.
9139 (sh64_pseudo_register_write): Update.
9140
9141 2017-06-16 Anton Kolesov <anton.kolesov@synopsys.com>
9142
9143 * arc-tdep.c (arc_disassembler_options): New variable.
9144 (arc_gdbarch_init): Set and use it. Use arc_delayed_print_insn instead
9145 of default_print_insn.
9146 (arc_delayed_print_insn): Set info->section when needed,
9147 use default_print_insn to retrieve a disassembler.
9148
9149 2017-06-14 Sergio Durigan Junior <sergiodj@redhat.com>
9150
9151 PR gdb/21574
9152 * infcmd.c (_initialize_infcmd): Expand "help run" documentation
9153 to mention $SHELL and startup-with-shell.
9154
9155 2017-06-14 Max Filippov <jcmvbkbc@gmail.com>
9156
9157 * MAINTAINERS: Move Maxim Grigoriev to the Past Maintainers.
9158
9159 2017-06-14 Yao Qi <yao.qi@linaro.org>
9160
9161 * aarch64-tdep.c (aarch64_gdb_print_insn): Call
9162 default_print_insn instead of print_insn_aarch64.
9163 * arm-tdep.c (gdb_print_insn_arm): Call
9164 default_print_insn instead of print_insn_big_arm
9165 and print_insn_little_arm.
9166 * i386-tdep.c (i386_print_insn): Call default_print_insn
9167 instead of print_insn_i386.
9168 * ia64-tdep.c (ia64_print_insn): Call
9169 default_print_insn instead of print_insn_ia64.
9170 * mips-tdep.c (gdb_print_insn_mips): Call
9171 default_print_insn instead of print_insn_big_mips
9172 and print_insn_little_mips.
9173 * spu-tdep.c (gdb_print_insn_spu): Call default_print_insn
9174 instead of print_insn_spu.
9175
9176 2017-06-14 Pedro Alves <palves@redhat.com>
9177
9178 * ada-lang.c: Include "common/byte-vector.h".
9179 (ada_value_primitive_packed_val): Use gdb::byte_vector.
9180 * charset.c (wchar_iterator::iterate): Resize the vector instead
9181 of reserving it.
9182 * common/byte-vector.h: Include "common/def-vector.h".
9183 (wchar_iterator::m_out): Now a gdb::def_vector<gdb_wchar_t>.
9184 * cli/cli-dump.c: Include "common/byte-vector.h".
9185 (dump_memory_to_file, restore_binary_file): Use gdb::byte_vector.
9186 * common/byte-vector.h: New file.
9187 * common/def-vector.h: New file.
9188 * common/default-init-alloc.h: New file.
9189 * dwarf2loc.c: Include "common/byte-vector.h".
9190 (rw_pieced_value): Use gdb::byte_vector, and resize the vector
9191 instead of reserving it.
9192 * dwarf2read.c: Include "common/byte-vector.h".
9193 (data_buf::m_vec): Now a gdb::byte_vector.
9194 * gdb_regex.c: Include "common/def-vector.h".
9195 (compiled_regex::compiled_regex): Use gdb::def_vector<char>.
9196 * mi/mi-main.c: Include "common/byte-vector.h".
9197 (mi_cmd_data_read_memory): Use gdb::byte_vector.
9198 * printcmd.c: Include "common/byte-vector.h".
9199 (print_scalar_formatted): Use gdb::byte_vector.
9200 * valprint.c: Include "common/byte-vector.h".
9201 (maybe_negate_by_bytes, print_decimal_chars): Use
9202 gdb::byte_vector.
9203
9204 2017-06-13 Simon Marchi <simon.marchi@ericsson.com>
9205
9206 * darwin-nat.c: Include "nat/fork-inferior.h".
9207
9208 2017-06-13 Simon Marchi <simon.marchi@ericsson.com>
9209
9210 * configure.nat: Factor out Darwin bits that are not
9211 architecture-specific. Add fork-inferior.o.
9212
9213 2017-06-13 Simon Marchi <simon.marchi@ericsson.com>
9214
9215 * configure.nat: Factor out AIX bits that are not
9216 architecture-specific. Add fork-inferior.o.
9217
9218 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
9219
9220 * dwarf2loc.c (rw_pieced_value): New. Merge logic from...
9221 (read_pieced_value, write_pieced_value): ...here. Reduce to
9222 wrappers that just call rw_pieced_value.
9223
9224 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
9225
9226 * dwarf2loc.c (write_pieced_value): When writing the data for a
9227 memory piece, use write_memory_with_notification instead of
9228 write_memory.
9229
9230 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
9231
9232 * valops.c (read_value_memory): Change embedded_offset to
9233 represent a bit offset instead of a byte offset.
9234 * value.h (read_value_memory): Adjust comment.
9235
9236 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
9237
9238 * dwarf2loc.c (read_pieced_value): Remove unnecessary variables
9239 dest_offset_bits and source_offset_bits.
9240 (write_pieced_value): Likewise.
9241
9242 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
9243
9244 * dwarf2loc.c (read_pieced_value): Respect the piece offset, as
9245 given by DW_OP_bit_piece.
9246 (write_pieced_value): Likewise.
9247
9248 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
9249
9250 * dwarf2loc.c (read_pieced_value): Move the buffer allocation and
9251 some other preparations to the places where sufficient information
9252 is available.
9253 (write_pieced_value): Likewise.
9254
9255 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
9256
9257 * dwarf2loc.c (bits_to_bytes): New function.
9258 (read_pieced_value): Fix offset calculations for register pieces
9259 on big-endian targets.
9260 (write_pieced_value): Likewise.
9261
9262 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
9263
9264 * dwarf2loc.c (read_pieced_value): Remove buffer_size variable.
9265 (write_pieced_value): Likewise.
9266
9267 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
9268
9269 * dwarf2loc.c (write_pieced_value): When writing to a bit-field,
9270 transfer the source value's least significant bits, instead of its
9271 lowest-addressed ones. Rename type_len to max_offset.
9272 (read_pieced_value): Mirror above changes to write_pieced_value as
9273 applicable.
9274
9275 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
9276
9277 * dwarf2loc.c (write_pieced_value): In DWARF_VALUE_MEMORY,
9278 truncate full bytes from dest_offset_bits before using it as an
9279 offset into the buffer.
9280
9281 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
9282
9283 * dwarf2loc.c (write_pieced_value): Include transfer size in
9284 byte-wise check.
9285
9286 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
9287
9288 * dwarf2loc.c (write_pieced_value): Fix copy/paste error in the
9289 calculation of this_size.
9290
9291 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
9292
9293 * dwarf2loc.c (read_pieced_value): Respect parent value's offset
9294 when targeting a bit-field.
9295 (write_pieced_value): Likewise.
9296
9297 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
9298
9299 * dwarf2loc.c (struct piece_closure) <addr_size>: Remove field.
9300 (allocate_piece_closure): Drop addr_size parameter.
9301 (dwarf2_evaluate_loc_desc_full): Adjust call to
9302 allocate_piece_closure.
9303
9304 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
9305
9306 PR gdb/21226
9307 * dwarf2loc.c (read_pieced_value): Anchor stack value pieces at
9308 the LSB end, independent of endianness.
9309
9310 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
9311
9312 * dwarf2loc.c (write_pieced_value): Fix order of calculations for
9313 size capping.
9314
9315 2017-06-13 Yao Qi <yao.qi@linaro.org>
9316
9317 * mips-linux-nat.c: Move include features/mips*-linux.c to
9318 mips-linux-tdep.c.
9319 (_initialize_mips_linux_nat): Move initialize_tdesc_mips* calls
9320 to mips-linux-tdep.c.
9321 * mips-linux-tdep.c: Include features/mips*-linux.c
9322 (_initialize_mips_linux_tdep): Call initialize_tdesc_mips*
9323 functions.
9324 * mips-linux-tdep.h (tdesc_mips_linux): Declare.
9325 (tdesc_mips_dsp_linux, tdesc_mips64_linux): Declare.
9326 (tdesc_mips64_dsp_linux): Declare.
9327
9328 2017-06-12 Tom Tromey <tom@tromey.com>
9329
9330 * valprint.h (val_print_type_code_int): Remove.
9331 * valprint.c (generic_val_print_int): Always call
9332 val_print_scalar_formatted.
9333 (val_print_type_code_int): Remove.
9334 * printcmd.c (print_scalar_formatted): Handle options->format==0.
9335 * f-valprint.c (f_val_print): Use val_print_scalar_formatted.
9336 * c-valprint.c (c_val_print_int): Use val_print_scalar_formatted.
9337 * ada-valprint.c (ada_val_print_num): Use
9338 val_print_scalar_formatted.
9339
9340 2017-06-12 Tom Tromey <tom@tromey.com>
9341
9342 * printcmd.c (print_scalar_formatted): Unify the two switches.
9343 Don't convert scalars to LONGEST.
9344
9345 2017-06-12 Tom Tromey <tom@tromey.com>
9346
9347 PR exp/16225:
9348 * valprint.h (print_decimal_chars): Update.
9349 * valprint.c (maybe_negate_by_bytes): New function.
9350 (print_decimal_chars): Add "is_signed" argument.
9351 * printcmd.c (print_scalar_formatted): Update.
9352
9353 2017-06-12 Tom Tromey <tom@tromey.com>
9354
9355 PR exp/16225:
9356 * valprint.h (print_binary_chars, print_hex_chars): Update.
9357 * valprint.c (val_print_type_code_int): Update.
9358 (print_binary_chars): Add "zero_pad" argument.
9359 (emit_octal_digit): New function.
9360 (print_octal_chars): Don't zero-pad.
9361 (print_decimal_chars): Likewise.
9362 (print_hex_chars): Add "zero_pad" argument.
9363 * sh64-tdep.c (sh64_do_fp_register): Update.
9364 * regcache.c (regcache::dump): Update.
9365 * printcmd.c (print_scalar_formatted): Update.
9366 * infcmd.c (default_print_one_register_info): Update.
9367
9368 2017-06-12 Pedro Alves <palves@redhat.com>
9369 Alan Hayward <alan.hayward@arm.com>
9370
9371 * mips-tdep.c (MAX_MIPS_ABI_REGSIZE): New.
9372 (mips_eabi_push_dummy_call): Rename local 'regsize' to
9373 'abi_regsize'. Rename local array 'valbuf' to 'ref_valbuf', and
9374 use MAX_MIPS_ABI_REGSIZE instead of MAX_REGISTER_SIZE to size it.
9375 Assert that abi_regsize bytes fit in 'ref_valbuf'.
9376
9377 2017-06-12 Pedro Alves <palves@redhat.com>
9378
9379 * dwarf2read.c (mapped_symtab::data): Now a vector of
9380 symtab_index_entry instead of vector of
9381 std::unique_ptr<symtab_index_entry>. All users adjusted to check
9382 whether an element's name is NULL instead of checking whether the
9383 element itself is NULL.
9384 (find_slot): Change return type. Adjust.
9385 (hash_expand, , add_index_entry, uniquify_cu_indices)
9386 (write_hash_table): Adjust.
9387
9388 2017-06-12 Pedro Alves <palves@redhat.com>
9389
9390 * dwarf2read.c (recursively_count_psymbols): New function.
9391 (write_psymtabs_to_index): Call it to compute number of psyms and
9392 pass estimate size of psyms_seen to unordered_set's ctor.
9393
9394 2017-06-12 Pedro Alves <palves@redhat.com>
9395
9396 * dwarf2read.c (write_hash_table): Check if key already exists
9397 before emplacing.
9398
9399 2017-06-12 Pedro Alves <palves@redhat.com>
9400
9401 * dwarf2read.c (data_buf::append_space): Rename to...
9402 (data_buf::grow): ... this, and make private. Adjust all callers.
9403 (data_buf::append_uint): New method.
9404 (add_address_entry, write_one_signatured_type)
9405 (write_psymtabs_to_index): Use it.
9406
9407 2017-06-12 Pedro Alves <palves@redhat.com>
9408
9409 * dwarf2read.c (file_write(FILE *, const void *, size_t)): Delete.
9410 (file_write (FILE *, const std::vector<Elem>&)): Delete.
9411 (data_buf::file_write): Call ::fwrite directly.
9412
9413 2017-06-12 Pedro Alves <palves@redhat.com>
9414
9415 * dwarf2read.c (uniquify_cu_indices): Use std::unique and
9416 std::vector::erase.
9417
9418 2017-06-12 Jan Kratochvil <jan.kratochvil@redhat.com>
9419
9420 Code cleanup: C++ify .gdb_index producer.
9421 * dwarf2read.c: Include <unordered_set> and <unordered_map>.
9422 (MAYBE_SWAP) [WORDS_BIGENDIAN]: Cast to offset_type.
9423 (struct strtab_entry, hash_strtab_entry, eq_strtab_entry)
9424 (create_strtab, add_string): Remove.
9425 (file_write, data_buf): New.
9426 (struct symtab_index_entry): Use std::vector for cu_indices.
9427 (struct mapped_symtab): Use std::vector for data.
9428 (hash_symtab_entry, eq_symtab_entry, delete_symtab_entry)
9429 (create_symbol_hash_table, create_mapped_symtab, cleanup_mapped_symtab):
9430 Remove.
9431 (find_slot): Change return type. Update it to the new data structures.
9432 (hash_expand, add_index_entry): Update it to the new data structures.
9433 (offset_type_compare): Remove.
9434 (uniquify_cu_indices): Update it to the new data structures.
9435 (c_str_view, c_str_view_hasher, vector_hasher): New.
9436 (add_indices_to_cpool): Remove.
9437 (write_hash_table): Update it to the new data structures.
9438 (struct psymtab_cu_index_map, hash_psymtab_cu_index)
9439 (eq_psymtab_cu_index): Remove.
9440 (psym_index_map): New typedef.
9441 (struct addrmap_index_data): Change addr_obstack pointer to data_buf
9442 reference and std::unordered_map for cu_index_htab.
9443 (add_address_entry, add_address_entry_worker, write_address_map)
9444 (write_psymbols): Update it to the new data structures.
9445 (write_obstack): Remove.
9446 (struct signatured_type_index_data): Change types_list to a data_buf
9447 reference and psyms_seen to a std::unordered_set reference.
9448 (write_one_signatured_type, recursively_write_psymbols)
9449 (write_psymtabs_to_index): Update it to the new data structures.
9450
9451 2017-06-11 Simon Marchi <simon.marchi@ericsson.com>
9452
9453 * NEWS (Changes since GDB 8.0): Announce {set,show} debug
9454 separate-debug-file commands.
9455 * symfile.h (separate_debug_file_debug): New global.
9456 * symfile.c (separate_debug_file_debug): New global.
9457 (separate_debug_file_exists, find_separate_debug_file): Add
9458 debug output.
9459 (_initialize_symfile): Add "set debug separate-debug-file"
9460 command.
9461 * build-id.c (build_id_to_debug_bfd,
9462 find_separate_debug_file_by_buildid): Add debug output.
9463
9464 2017-06-10 Simon Marchi <simon.marchi@polymtl.ca>
9465
9466 * gdbarch.sh (displaced_step_free_closure): Remove.
9467 * gdbarch.h, gdbarch.c: Re-generate.
9468 * aarch64-linux-tdep.c (aarch64_linux_init_abi): Don't set
9469 displaced_step_free_closure.
9470 * amd64-linux-tdep.c (amd64_linux_init_abi_common): Likewise.
9471 * arm-linux-tdep.c (arm_linux_init_abi): Likewise.
9472 * i386-linux-tdep.c (i386_linux_init_abi): Likewise.
9473 * rs6000-aix-tdep.c (rs6000_aix_init_osabi): Likewise.
9474 * rs6000-tdep.c (rs6000_gdbarch_init): Likewise.
9475 * s390-linux-tdep.c (s390_gdbarch_init): Likewise.
9476 * arch-utils.h (simple_displaced_step_free_closure): Remove.
9477 * arch-utils.c (simple_displaced_step_free_closure): Remove.
9478 * infrun.c (displaced_step_clear): Call xfree instead of
9479 gdbarch_displaced_step_free_closure.
9480
9481 2017-06-08 Sergio Durigan Junior <sergiodj@redhat.com>
9482
9483 * common/common-utils.c (stringify_argv): Check for "arg[0] !=
9484 NULL".
9485
9486 2017-06-08 Alan Hayward <alan.hayward@arm.com>
9487
9488 * mn10300-tdep.c (MN10300_MAX_REGISTER_SIZE): Add.
9489 (mn10300_extract_return_value): Use MN10300_MAX_REGISTER_SIZE.
9490 (mn10300_push_dummy_call): Likewise.
9491
9492 2017-06-08 Alan Hayward <alan.hayward@arm.com>
9493
9494 * mi/mi-main.c (register_changed_p): Use value_contents_eq.
9495
9496 2017-06-08 Alan Hayward <alan.hayward@arm.com>
9497
9498 * mi/mi-main.c (register_changed_p): Use cooked_read_value.
9499
9500 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
9501
9502 * NEWS (Changes since GDB 8.0): Announce that GDBserver is now
9503 able to start inferiors using a shell.
9504 (New remote packets): Announce new packet "QStartupWithShell".
9505 * remote.c: Add PACKET_QStartupWithShell.
9506 (extended_remote_create_inferior): Handle new
9507 PACKET_QStartupWithShell.
9508 (remote_protocol_features) <QStartupWithShell>: New entry for
9509 PACKET_QStartupWithShell.
9510 (_initialize_remote): Call "add_packet_config_cmd" for
9511 QStartupShell.
9512
9513 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
9514 Pedro Alves <palves@redhat.com>
9515
9516 * Makefile.in (HFILES_NO_SRCDIR): Add "common/common-inferior.h"
9517 and "nat/fork-inferior.h".
9518 * common/common-inferior.h: New file, with contents from
9519 "gdb/inferior.h".
9520 * commom/common-utils.c: Include "common-utils.h".
9521 (stringify_argv): New function.
9522 * common/common-utils.h (stringify_argv): New prototype.
9523 * configure.nat: Add "fork-inferior.o" as a dependency for
9524 "*linux*", "fbsd*" and "nbsd*" hosts.
9525 * corefile.c (get_exec_file): Update comment.
9526 * darwin-nat.c (darwin_ptrace_him): Call "gdb_startup_inferior"
9527 instead of "startup_inferior".
9528 (darwin_create_inferior): Call "add_thread_silent" after
9529 "fork_inferior".
9530 * fork-child.c: Cleanup unnecessary includes.
9531 (SHELL_FILE): Move to "common/common-fork-child.c".
9532 (environ): Likewise.
9533 (exec_wrapper): Initialize.
9534 (get_exec_wrapper): New function.
9535 (breakup_args): Move to "common/common-fork-child.c"; rename to
9536 "breakup_args_for_exec".
9537 (escape_bang_in_quoted_argument): Move to
9538 "common/common-fork-child.c".
9539 (saved_ui): New variable.
9540 (prefork_hook): New function.
9541 (postfork_hook): Likewise.
9542 (postfork_child_hook): Likewise.
9543 (gdb_startup_inferior): Likewise.
9544 (fork_inferior): Move to "common/common-fork-child.c". Update
9545 function to support gdbserver.
9546 (startup_inferior): Likewise.
9547 * gdbcore.h (get_exec_file): Remove declaration.
9548 * gnu-nat.c (gnu_create_inferior): Call "gdb_startup_inferior"
9549 instead of "startup_inferior". Call "add_thread_silent" after
9550 "fork_inferior".
9551 * inf-ptrace.c: Include "nat/fork-inferior.h" and "utils.h".
9552 (inf_ptrace_create_inferior): Call "gdb_startup_inferior"
9553 instead of "startup_inferior". Call "add_thread_silent" after
9554 "fork_inferior".
9555 * inferior.h: Include "common-inferior.h".
9556 (trace_start_error): Move to "common/common-utils.h".
9557 (trace_start_error_with_name): Likewise.
9558 (fork_inferior): Move prototype to "nat/fork-inferior.h".
9559 (startup_inferior): Likewise.
9560 (gdb_startup_inferior): New prototype.
9561 * nat/fork-inferior.c: New file, with contents from "fork-child.c".
9562 * nat/fork-inferior.h: New file.
9563 * procfs.c (procfs_init_inferior): Call "gdb_startup_inferior"
9564 instead of "startup_inferior". Call "add_thread_silent" after
9565 "fork_inferior".
9566 * target.h (target_terminal_init): Move prototype to
9567 "target/target.h".
9568 (target_terminal_inferior): Likewise.
9569 (target_terminal_ours): Likewise.
9570 * target/target.h (target_terminal_init): New prototype, moved
9571 from "target.h".
9572 (target_terminal_inferior): Likewise.
9573 (target_terminal_ours): Likewise.
9574 * utils.c (gdb_flush_out_err): New function.
9575
9576 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
9577
9578 * Makefile.in (HFILES_NO_SRCDIR): Add "common/common-gdbthread.h".
9579 * common/common-gdbthread.h: New file, with parts from
9580 "gdb/gdbthread.h".
9581 * gdbthread.h: Include "common-gdbthread.h".
9582 (switch_to_thread): Moved to "common/common-gdbthread.h".
9583
9584 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
9585
9586 * Makefile.in (SFILES): Add "common/job-control.c".
9587 (HFILES_NO_SRCDIR): Add "common/job-control.h".
9588 (COMMON_OBS): Add "job-control.o".
9589 * common/job-control.c: New file, with contents from
9590 "gdb/inflow.c".
9591 * common/job-control.h: New file, with contents from "terminal.h".
9592 * fork-child.c: Include "job-control.h".
9593 * inflow.c: Include "job-control.h".
9594 (gdb_setpgid): Move to "common/common-inflow.c".
9595 (_initialize_inflow): Move setting of "job_control" to
9596 "handle_job_control".
9597 * terminal.h (job_control): Moved to "common/common-terminal.h".
9598 (gdb_setpgid): Likewise.
9599 * top.c: Include "job_control.h".
9600 * utils.c: Likewise.
9601 (job_control): Moved to "job-control.c".
9602
9603 2017-06-07 Pedro Alves <palves@redhat.com>
9604
9605 * Makefile.in (SFILES): Add gdb_regex.c.
9606 (COMMON_OBS): Add gdb_regex.o.
9607 * ada-lang.c (ada_add_standard_exceptions)
9608 (ada_add_exceptions_from_frame, name_matches_regex)
9609 (ada_add_global_exceptions, ada_exceptions_list_1): Change regex
9610 parameter type to compiled_regex. Adjust.
9611 (ada_exceptions_list): Use compiled_regex.
9612 * break-catch-throw.c (exception_catchpoint::pattern): Now a
9613 std::unique_ptr<compiled_regex>.
9614 (exception_catchpoint::~exception_catchpoint): Remove regfree
9615 call.
9616 (check_status_exception_catchpoint): Adjust to use compiled_regex.
9617 (handle_gnu_v3_exceptions): Adjust to use compiled_regex.
9618 * breakpoint.c (solib_catchpoint::compiled): Now a
9619 std::unique_ptr<compiled_regex>.
9620 (solib_catchpoint::~solib_catchpoint): Remove regfree call.
9621 (check_status_catch_solib): Adjust to use compiled_regex.
9622 (add_solib_catchpoint): Adjust to use compiled_regex.
9623 * cli/cli-cmds.c (apropos_command): Use compiled_regex.
9624 * cli/cli-decode.c (apropos_cmd): Change regex parameter to
9625 compiled_regex reference. Adjust to use it.
9626 * cli/cli-decode.h: Remove struct re_pattern_buffer forward
9627 declaration. Include "gdb_regex.h".
9628 (apropos_cmd): Change regex parameter to compiled_regex reference.
9629 * gdb_regex.c: New file.
9630 * gdb_regex.h (make_regfree_cleanup, get_regcomp_error): Delete
9631 declarations.
9632 (class compiled_regex): New.
9633 * linux-tdep.c: Include "common/gdb_optional.h".
9634 (struct mapping_regexes): New, factored out from
9635 mapping_is_anonymous_p, and adjusted to use compiled_regex.
9636 (mapping_is_anonymous_p): Use mapping_regexes wrapped in a
9637 gdb::optional and remove cleanups. Adjust to compiled_regex.
9638 * probe.c: Include "common/gdb_optional.h".
9639 (collect_probes): Use compiled_regex and gdb::optional and remove
9640 cleanups.
9641 * skip.c: Include "common/gdb_optional.h".
9642 (skiplist_entry::compiled_function_regexp): Now a
9643 gdb::optional<compiled_regex>.
9644 (skiplist_entry::compiled_function_regexp_is_valid): Delete field.
9645 (free_skiplist_entry): Remove regfree call.
9646 (compile_skip_regexp, skip_rfunction_p): Adjust to use
9647 compiled_regex and gdb::optional.
9648 * symtab.c: Include "common/gdb_optional.h".
9649 (search_symbols): Use compiled_regex and gdb::optional.
9650 * utils.c (do_regfree_cleanup, make_regfree_cleanup)
9651 (get_regcomp_error, compile_rx_or_error): Delete. Some bits moved
9652 to gdb_regex.c.
9653
9654 2017-06-07 Alan Hayward <alan.hayward@arm.com>
9655
9656 * regcache.c (regcache::save): Avoid buffer use.
9657 (regcache::dump): Likewise.
9658
9659 2017-06-07 Alan Hayward <alan.hayward@arm.com>
9660
9661 * sh-tdep.c (sh_pseudo_register_read): Remove
9662 MAX_REGISTER_SIZE.
9663 (sh_pseudo_register_write): Likewise.
9664 * sh64-tdep.c (sh64_pseudo_register_read): Likewise.
9665 (sh64_pseudo_register_write): Likewise
9666
9667 2017-06-07 Alan Hayward <alan.hayward@arm.com>
9668
9669 * aarch64-tdep.c (aarch64_store_return_value): Use
9670 V_REGISTER_SIZE.
9671 (aarch64_pseudo_read_value): Likewise.
9672 (aarch64_pseudo_write): Likewise.
9673
9674 2017-06-06 Yao Qi <yao.qi@linaro.org>
9675
9676 * regformats/regdef.h (set_register_cache): Remove the
9677 declaration.
9678
9679 2017-06-06 Alan Hayward <alan.hayward@arm.com>
9680
9681 * frame.c (frame_unwind_register_signed): Use
9682 frame_unwind_register_value.
9683
9684 2017-06-06 Pedro Alves <palves@redhat.com>
9685
9686 PR breakpoints/21553
9687 * breakpoint.c (create_breakpoints_sal_default)
9688 (init_breakpoint_sal, create_breakpoint_sal): Use
9689 gdb::unique_xmalloc_ptr for string parameters.
9690 (create_breakpoint): Constify 'extra_string' and 'cond_string'
9691 parameters. Replace cleanups with gdb::unique_xmalloc_ptr.
9692 (base_breakpoint_create_breakpoints_sal)
9693 (bkpt_create_breakpoints_sal, tracepoint_create_breakpoints_sal)
9694 (strace_marker_create_breakpoints_sal)
9695 (create_breakpoints_sal_default): Use gdb::unique_xmalloc_ptr for
9696 string parameters.
9697 * breakpoint.h (breakpoint_ops::create_breakpoints_sal): Use
9698 gdb::unique_xmalloc_ptr for string parameters.
9699 (create_breakpoint): Constify 'extra_string' and 'cond_string'
9700 parameters.
9701
9702 2017-06-06 Alan Hayward <alan.hayward@arm.com>
9703
9704 * alpha-tdep.c (alpha_register_to_value): Use
9705 get_frame_register_value.
9706 (alpha_value_to_register): Use ALPHA_REGISTER_SIZE.
9707
9708 2017-06-06 Alan Hayward <alan.hayward@arm.com>
9709
9710 * ia64-tdep.c (IA64_MAX_FP_REGISTER_SIZE) Add.
9711 (ia64_register_to_value): Use IA64_MAX_FP_REGISTER_SIZE.
9712 (ia64_value_to_register): Likewise.
9713 (ia64_extract_return_value): Likewise.
9714 (ia64_store_return_value): Likewise.
9715 (ia64_push_dummy_call): Likewise.
9716
9717 2017-06-04 Joel Brobecker <brobecker@adacore.com>
9718
9719 GDB 8.0 released.
9720
9721 2017-06-03 Simon Marchi <simon.marchi@ericsson.com>
9722
9723 * x86-linux-nat.c (struct arch_lwp_info): Remove.
9724
9725 2017-06-03 Simon Marchi <simon.marchi@polymtl.ca>
9726
9727 * linux-nat.c (linux_nat_post_attach_wait): Remove FIRST
9728 parameter.
9729 (linux_nat_attach): Adjust call to linux_nat_post_attach_wait.
9730
9731 2017-06-02 Simon Marchi <simon.marchi@ericsson.com>
9732
9733 * event-loop.c (poll_timers): Unallocate timer using delete
9734 instead of xfree.
9735
9736 2017-06-02 Simon Marchi <simon.marchi@polymtl.ca>
9737
9738 * breakpoint.h (struct breakpoint_ops) <dtor>: Remove.
9739 (struct breakpoint) <~breakpoint>: New.
9740 (struct watchpoint): Inherit from breakpoint.
9741 <~watchpoint>: New.
9742 <base>: Remove.
9743 (struct tracepoint): Inherit from breakpoint.
9744 <base>: Remove.
9745 * breakpoint.c (longjmp_breakpoint_ops): Remove.
9746 (struct longjmp_breakpoint): Inherit from breakpoint.
9747 <~longjmp_breakpoint>: New.
9748 <base>: Remove.
9749 (new_breakpoint_from_type): Remove casts.
9750 (watchpoint_in_thread_scope): Remove reference to base field.
9751 (watchpoint_del_at_next_stop): Likewise.
9752 (update_watchpoint): Likewise.
9753 (watchpoint_check): Likewise.
9754 (bpstat_check_watchpoint): Likewise.
9755 (set_longjmp_breakpoint): Likewise.
9756 (struct fork_catchpoint): Inherit from breakpoint.
9757 <base>: Remove.
9758 (struct solib_catchpoint): Inherit from breakpoint.
9759 <~solib_catchpoint>: New.
9760 <base>: Remove.
9761 (dtor_catch_solib): Change to ...
9762 (solib_catchpoint::~solib_catchpoint): ... this.
9763 (breakpoint_hit_catch_solib): Remove reference to base field.
9764 (add_solib_catchpoint): Likewise.
9765 (create_fork_vfork_event_catchpoint): Likewise.
9766 (struct exec_catchpoint): Inherit from breakpoint.
9767 <~exec_catchpoint>: New.
9768 <base>: Remove.
9769 (dtor_catch_exec): Change to ...
9770 (exec_catchpoint::~exec_catchpoint): ... this.
9771 (dtor_watchpoint): Change to ...
9772 (watchpoint::~watchpoint): ... this.
9773 (watch_command_1): Remove reference to base field.
9774 (catch_exec_command_1): Likewise.
9775 (base_breakpoint_dtor): Change to ...
9776 (breakpoint::~breakpoint): ... this.
9777 (base_breakpoint_ops): Remove dtor field value.
9778 (longjmp_bkpt_dtor): Change to ...
9779 (longjmp_breakpoint::~longjmp_breakpoint): ... this.
9780 (strace_marker_create_breakpoints_sal): Remove reference to base
9781 field.
9782 (delete_breakpoint): Don't manually call breakpoint destructor.
9783 (create_tracepoint_from_upload): Remove reference to base field.
9784 (trace_pass_set_count): Likewise.
9785 (initialize_breakpoint_ops): Don't initialize
9786 momentary_breakpoint_ops, don't set dtors.
9787 * ada-lang.c (struct ada_catchpoint): Inherit from breakpoint.
9788 <~ada_catchpoint>: New.
9789 <base>: Remove.
9790 (create_excep_cond_exprs): Remove reference to base field.
9791 (dtor_exception): Change to ...
9792 (ada_catchpoint::~ada_catchpoint): ... this.
9793 (dtor_catch_exception): Remove.
9794 (dtor_catch_exception_unhandled): Remove.
9795 (dtor_catch_assert): Remove.
9796 (create_ada_exception_catchpoint): Remove reference to base
9797 field.
9798 (initialize_ada_catchpoint_ops): Don't set dtors.
9799 * break-catch-sig.c (struct signal_catchpoint): Inherit from
9800 breakpoint.
9801 <~signal_catchpoint>: New.
9802 <base>: Remove.
9803 (signal_catchpoint_dtor): Change to ...
9804 (signal_catchpoint::~signal_catchpoint): ... this.
9805 (create_signal_catchpoint): Remove reference to base field.
9806 (initialize_signal_catchpoint_ops): Don't set dtor.
9807 * break-catch-syscall.c (struct syscall_catchpoint): Inherit
9808 from breakpoint.
9809 <~syscall_catchpoint>: New.
9810 <base>: Remove.
9811 (dtor_catch_syscall): Change to ...
9812 (syscall_catchpoint::~syscall_catchpoint): ... this.
9813 (create_syscall_event_catchpoint): Remove reference to base
9814 field.
9815 (initialize_syscall_catchpoint_ops): Don't set dtor.
9816 * break-catch-throw.c (struct exception_catchpoint): Inherit
9817 from breakpoint.
9818 <~exception_catchpoint>: New.
9819 <base>: Remove.
9820 (dtor_exception_catchpoint): Change to ...
9821 (exception_catchpoint::~exception_catchpoint): ... this.
9822 (handle_gnu_v3_exceptions): Remove reference to base field.
9823 (initialize_throw_catchpoint_ops): Don't set dtor.
9824 * ctf.c (ctf_get_traceframe_address): Remove reference to base
9825 field.
9826 * remote.c (remote_get_tracepoint_status): Likewise.
9827 * tracefile-tfile.c (tfile_get_traceframe_address): Likewise.
9828 * tracefile.c (tracefile_fetch_registers): Likewise.
9829 * tracepoint.c (actions_command): Likewise.
9830 (validate_actionline): Likewise.
9831 (tfind_1): Likewise.
9832 (get_traceframe_location): Likewise.
9833 (find_matching_tracepoint_location): Likewise.
9834 (parse_tracepoint_status): Likewise.
9835 * mi/mi-cmd-break.c (mi_cmd_break_passcount): Likewise.
9836
9837 2017-06-02 Simon Marchi <simon.marchi@polymtl.ca>
9838
9839 * breakpoint.c (struct longjmp_breakpoint): New struct.
9840 (is_tracepoint_type): Change return type to bool.
9841 (is_longjmp_type): New function.
9842 (new_breakpoint_from_type): Handle longjmp kinds of breakpoints.
9843 (set_raw_breakpoint_without_location): Use
9844 new_breakpoint_from_type.
9845 (set_raw_breakpoint): Likewise.
9846
9847 2017-06-02 Simon Marchi <simon.marchi@polymtl.ca>
9848
9849 * breakpoint.c (new_breakpoint_from_type): New function.
9850 (create_breakpoint_sal): Use new_breakpoint_from_type and
9851 unique_ptr.
9852 (create_breakpoint): Likewise.
9853
9854 2017-05-31 Simon Marchi <simon.marchi@ericsson.com>
9855
9856 * memattr.c (mem_info_command): Rename to ...
9857 (info_mem_command): ... this.
9858 (mem_enable_command): Rename to ...
9859 (enable_mem_command): ... this.
9860 (mem_disable_command): Rename to ...
9861 (disable_mem_command): ... this.
9862 (mem_delete_command): Rename to ...
9863 (delete_mem_command): ... this.
9864 (_initialize_mem): Adjust function names.
9865
9866 2017-05-31 Markus Metzger <markus.t.metzger@intel.com>
9867
9868 * btrace.c (handle_pt_insn_events): New.
9869 (ftrace_add_pt): Call handle_pt_insn_events. Rename ERRCODE into
9870 STATUS. Split into this and ...
9871 (handle_pt_insn_event_flags): ... this.
9872
9873 2017-05-31 Markus Metzger <markus.t.metzger@intel.com>
9874
9875 * configure.ac: Check for pt_insn_event, struct pt_insn.enabled,
9876 and struct pt_insn.resynced.
9877 * configure: Regenerated.
9878 * config.in: Regenerated.
9879
9880 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
9881
9882 * btrace.c (ftrace_find_call_by_number): New function.
9883 (ftrace_new_function): Store objects, not pointers.
9884 (ftrace_find_call_by_number, ftrace_new_return, ftrace_new_switch,
9885 ftrace_new_gap, ftrace_update_function,
9886 ftrace_compute_global_level_offset, btrace_stich_bts, btrace_clear,
9887 btrace_insn_get, btrace_insn_get_error, btrace_insn_end,
9888 btrace_insn_next, btrace_insn_prev, ptrace_find_insn_by_number,
9889 btrace_ends_with_single_insn, btrace_call_get): Account for
9890 btrace_thread_info::functions now storing objects.
9891 * btrace.h (struct btrace_thread_info): Add constructor.
9892 (struct btrace_thread_info) <functions>: Make std::vector.
9893 (struct btrace_thread_info) <prev, next, up, insn, errcode, flags):
9894 Initialize with default values.
9895 * record-btrace.c (record_btrace_frame_sniffer): Account for
9896 btrace_thread_info::functions now storing objects.
9897
9898 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
9899
9900 * btrace.c: Remove typedef bfun_s.
9901 (ftrace_new_gap): Directly add gaps to the list of gaps.
9902 (btrace_bridge_gaps, btrace_compute_ftrace_bts, pt_btrace_insn_flags,
9903 ftrace_add_pt, btrace_compute_ftrace_pt, btrace_compute_ftrace_1,
9904 btrace_finalize_ftrace, btrace_compute_ftrace): Use std::vector
9905 instead of gdb VEC.
9906
9907 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
9908
9909 * btrace.c (ftrace_fixup_caller, ftrace_new_return, ftrace_connect_bfun,
9910 ftrace_bridge_gap): Replace references to btrace_thread_info::segment
9911 with btrace_thread_info::next_segment and
9912 btrace_thread_info::prev_segment.
9913 * btrace.h: Remove struct btrace_func_link.
9914 (struct btrace_function): Replace pair of function segment pointers
9915 with pair of indices.
9916 * python/py-record-btrace.c (btpy_call_prev_sibling,
9917 btpy_call_next_sibling): Replace references to
9918 btrace_thread_info::segment with btrace_thread_info::next_segment and
9919 btrace_thread_info::prev_segment.
9920 * record-btrace.c (record_btrace_frame_this_id): Use
9921 btrace_find_call_by_number.
9922
9923 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
9924
9925 * btrace.c (ftrace_new_function, ftrace_fixup_level,
9926 ftrace_connect_bfun, ftrace_bridge_gap, btrace_bridge_gaps,
9927 btrace_insn_next, btrace_insn_prev): Remove references to
9928 btrace_thread_info::flow.
9929 * btrace.h (struct btrace_function): Remove FLOW.
9930
9931 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
9932
9933 * btrace.c (ftrace_find_call_by_number): New function.
9934 (ftrace_update_caller, ftrace_new_call, ftrace_new_tailcall,
9935 ftrace_get_caller, ftrace_find_call, ftrace_new_return,
9936 ftrace_match_backtrace, ftrace_connect_bfun, ftrace_connect_backtrace,
9937 ftrace_bridge_gap, btrace_bridge_gaps): Use btrace_function::up as an
9938 index.
9939 * btrace.h (struct btrace_function): Turn UP into an index.
9940 * python/py-record-btrace.c (btpy_call_up): Use btrace_function::up
9941 as an index.
9942 * record-btrace.c (record_btrace_frame_unwind_stop_reason,
9943 record_btrace_frame_prev_register, record_btrace_frame_sniffer,
9944 record_btrace_tailcall_frame_sniffe): Use btrace_find_call_by_number.
9945
9946 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
9947
9948 * btrace.c (ftrace_new_function, ftrace_new_call, ftrace_new_tailcall,
9949 ftrace_new_return, ftrace_new_switch, ftrace_new_gap,
9950 ftrace_update_function, ftrace_compute_global_level_offset,
9951 btrace_compute_ftrace_bts, ftrace_add_pt, btrace_compute_ftrace_pt,
9952 btrace_stitch_bts, btrace_fetch, btrace_clear, btrace_insn_number,
9953 btrace_insn_end, btrace_is_empty): Remove references to
9954 btrace_thread_info::begin and btrace_thread_info::end.
9955 * btrace.h (struct btrace_thread_info): Remove BEGIN and END.
9956 (struct btrace_thread_info) <functions>: Adjust comment.
9957 * record-btrace.c (record_btrace_start_replaying): Remove reference to
9958 btrace_thread_info::begin.
9959
9960 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
9961
9962 * btrace.c (ftrace_new_function, ftrace_new_call, ftrace_new_tailcall,
9963 ftrace_new_return, ftrace_new_switch, ftrace_new_gap,
9964 ftrace_update_function): Remove arguments that implicitly were always
9965 BTINFO->END.
9966 (btrace_compute_ftrace_bts, ftrace_add_pt, btrace_compute_ftrace_pt):
9967 Don't pass BTINFO->END.
9968
9969 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
9970
9971 * btrace.c: (btrace_insn_get, btrace_insn_get_error, btrace_insn_number,
9972 btrace_insn_begin, btrace_insn_end, btrace_insn_next, btrace_insn_prev,
9973 btrace_find_insn_by_number): Replace function segment pointer with
9974 index.
9975 (btrace_insn_cmp): Simplify.
9976 * btrace.h: (struct btrace_insn_iterator) Rename index to
9977 insn_index. Replace function segment pointer with index into function
9978 segment vector.
9979 * record-btrace.c (record_btrace_call_history): Replace function
9980 segment pointer use with index.
9981 (record_btrace_frame_sniffer): Retrieve function call segment through
9982 vector.
9983 (record_btrace_set_replay): Remove defunc't safety check.
9984
9985 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
9986
9987 * btrace.c (btrace_ends_with_single_insn): New function.
9988 (btrace_call_get, btrace_call_number, btrace_call_begin,
9989 btrace_call_end, btrace_call_next, btrace_call_prev,
9990 btrace_find_call_by_number): Use index into call segment vector
9991 instead of pointer.
9992 (btrace_call_cmp): Simplify.
9993 * btrace.h (struct btrace_call_iterator): Replace function call segment
9994 pointer with index into vector.
9995 * record-btrace.c (record_btrace_call_history): Use index instead of
9996 pointer.
9997
9998 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
9999
10000 * btrace.c (btrace_insn_begin, btrace_insn_end,
10001 btrace_find_insn_by_number): Add btinfo to iterator.
10002 * btrace.h (struct btrace_insn_iterator): Add btinfo.
10003
10004 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
10005
10006 * btrace.c (ftrace_new_function): Add btrace_thread_info to arguments
10007 and save pointers directly.
10008 (ftrace_new_call, ftrace_new_tailcall, ftrace_new_return,
10009 ftrace_new_switch, ftrace_new_gap, ftrace_update_function,
10010 ftrace_add_pt): Add btrace_thread_info to arguments. Adjust for
10011 changed signature of functions.
10012 (btrace_compute_ftrace_pt): Adjust for changed signature of functions.
10013 (btrace_fetch): Remove code that adds btrace_function pointers to
10014 vector of btrace_functions.
10015 (btrace_clear): Simplify freeing vector of btrace_functions.
10016
10017 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
10018
10019 * btrace.c (btrace_fetch, btrace_clear, btrace_find_insn_by_number):
10020 Replace VEC_* with std::vector functions.
10021 * btrace.h: Add include: vector. Remove typedef for DEF_VEC_P.
10022 (struct btrace_thread_info)<functions>: Change type to std::vector.
10023
10024 2017-05-30 Simon Marchi <simon.marchi@ericsson.com>
10025
10026 * NEWS (Changes in GDB 8.0): Remove extra empty line. Move
10027 "Removed targets and native configurations" up. Merge duplicate
10028 "New commands" sub-sections. Add "New options" sub-sections.
10029
10030 2017-05-26 Alan Hayward <alan.hayward@arm.com>
10031
10032 * defs.h (copy_integer_to_size): New declaration.
10033 * findvar.c (copy_integer_to_size): New function.
10034 (do_cint_test): New selftest function.
10035 (copy_integer_to_size_test): Likewise.
10036 (_initialize_findvar): Likewise.
10037 * mips-fbsd-tdep.c (mips_fbsd_supply_reg): Use raw_supply_integer.
10038 (mips_fbsd_collect_reg): Use raw_collect_integer.
10039 * mips-linux-tdep.c (supply_32bit_reg): Use raw_supply_integer.
10040 (mips64_fill_gregset): Use raw_collect_integer
10041 (mips64_fill_fpregset): Use raw_supply_integer.
10042 * regcache.c (regcache::raw_supply_integer): New function.
10043 (regcache::raw_collect_integer): Likewise.
10044 * regcache.h: (regcache::raw_supply_integer): New declaration.
10045 (regcache::raw_collect_integer): Likewise.
10046
10047 2017-05-24 Yao Qi <yao.qi@linaro.org>
10048
10049 * Makefile.in (SFILES): Add gdbarch-selftests.c.
10050 (COMMON_OBS): Add gdbarch-selftests.o.
10051 * frame.c [GDB_SELF_TESTS] (create_new_frame): New function.
10052 * frame.h [GDB_SELF_TESTS] (create_new_frame): Declare.
10053 * gdbarch-selftests.c: New file.
10054 * regcache.h (regcache) <~regcache>: Mark it virtual if
10055 GDB_SELF_TEST.
10056 <raw_write>: Likewise.
10057
10058 2017-05-24 Yao Qi <yao.qi@linaro.org>
10059
10060 * regcache.c (current_regcache): Change it to
10061 regcache::current_regcache.
10062 (regcache_observer_target_changed): Update.
10063 (regcache_thread_ptid_changed): Make it a regcache static
10064 method.
10065 (regcache_thread_ptid_changed): Update.
10066 (class regcache_access): New.
10067 (current_regcache_test): Update.
10068 (_initialize_regcache): Update.
10069 * regcache.h: Include forward_list.
10070 (regcache): Declare regcache_thread_ptid_changed and declare
10071 registers_changed_ptid as friend.
10072
10073 2017-05-24 Yao Qi <yao.qi@linaro.org>
10074
10075 * i387-tdep.c (i387_register_to_value): Use register_size
10076 instead of TYPE_LENGTH.
10077 * m68k-tdep.c (m68k_register_to_value): Likewise.
10078
10079 2017-05-24 Yao Qi <yao.qi@linaro.org>
10080
10081 * i387-tdep.c (i387_convert_register_p): Return false if type
10082 code isn't TYPE_CODE_FLT.
10083
10084 2017-05-24 Yao Qi <yao.qi@linaro.org>
10085
10086 * alpha-tdep.c (alpha_convert_register_p): Return true if type
10087 length is 4.
10088 (alpha_register_to_value): Remove type length check.
10089 (alpha_value_to_register): Likewise.
10090
10091 2017-05-24 Yao Qi <yao.qi@linaro.org>
10092
10093 * ia64-tdep.c (ia64_convert_register_p): Check type's code is
10094 TYPE_CODE_FLT.
10095
10096 2017-05-24 Yao Qi <yao.qi@linaro.org>
10097
10098 * m68k-tdep.c (m68k_convert_register_p): Check type's code is
10099 TYPE_CODE_FLT or not.
10100
10101 2017-05-24 Yao Qi <yao.qi@linaro.org>
10102
10103 * alpha-tdep.c (alpha_gdbarch_init): Use XCNEW instead of XNEW.
10104 * avr-tdep.c (avr_gdbarch_init): Likewise.
10105 * bfin-tdep.c (bfin_gdbarch_init): Likewise.
10106 * cris-tdep.c (cris_gdbarch_init): Likewise.
10107 * ft32-tdep.c (ft32_gdbarch_init): Likewise.
10108 * lm32-tdep.c (lm32_gdbarch_init): Likewise.
10109 * m32r-tdep.c (m32r_gdbarch_init): Likewise.
10110 * m68hc11-tdep.c (m68hc11_gdbarch_init): Likewise.
10111 * mep-tdep.c (mep_gdbarch_init): Likewise.
10112 * microblaze-tdep.c (microblaze_gdbarch_init): Likewise.
10113 * mips-tdep.c (mips_gdbarch_init): Likewise.
10114 * mn10300-tdep.c (mn10300_gdbarch_init): Likewise.
10115 * moxie-tdep.c (moxie_gdbarch_init): Likewise.
10116 * msp430-tdep.c (msp430_gdbarch_init): Likewise.
10117 * sh64-tdep.c (sh64_gdbarch_init): Likewise.
10118 * v850-tdep.c (v850_gdbarch_init): Likewise.
10119
10120 2017-05-24 Yao Qi <yao.qi@linaro.org>
10121
10122 * selftest-arch.c (tests_with_arch): Call registers_changed
10123 and reinit_frame_cache.
10124 * selftest.c (run_self_tests): Likewise.
10125
10126 2017-05-24 Yao Qi <yao.qi@linaro.org>
10127
10128 * rs6000-tdep.c (gdb_print_insn_powerpc): Remove.
10129 (rs6000_gdbarch_init): Don't call set_gdbarch_print_insn.
10130
10131 2017-05-24 Yao Qi <yao.qi@linaro.org>
10132
10133 * rl78-tdep.c (rl78_gdbarch_init): Don't call
10134 set_gdbarch_print_insn.
10135
10136 2017-05-24 Yao Qi <yao.qi@linaro.org>
10137
10138 * h8300-tdep.c (h8300_gdbarch_init): Don't call
10139 set_gdbarch_print_insn.
10140
10141 2017-05-24 Yao Qi <yao.qi@linaro.org>
10142
10143 * alpha-tdep.c (alpha_gdbarch_init): Don't call
10144 set_gdbarch_print_insn.
10145 * arc-tdep.c (arc_gdbarch_init): Likewise.
10146 * arch-utils.c: include dis-asm.h.
10147 (default_print_insn): New function.
10148 * arch-utils.h (default_print_insn): Declare.
10149 * avr-tdep.c (avr_gdbarch_init): Don't call set_gdbarch_print_insn.
10150 * bfin-tdep.c (bfin_gdbarch_init): Likewise.
10151 * cris-tdep.c (cris_delayed_get_disassembler): Remove.
10152 (cris_gdbarch_init): Don't call set_gdbarch_print_insn.
10153 * frv-tdep.c (frv_gdbarch_init): Likewise.
10154 * ft32-tdep.c (ft32_gdbarch_init): Likewise.
10155 * gdbarch.sh (print_insn): Use default_print_insn.
10156 * gdbarch.c: Regenerated.
10157 * hppa-tdep.c (hppa_gdbarch_init): Likewise.
10158 * iq2000-tdep.c (iq2000_gdbarch_init): Likewise.
10159 * lm32-tdep.c (lm32_gdbarch_init): Likewise.
10160 * m32c-tdep.c (m32c_gdbarch_init): Likewise.
10161 * m32r-tdep.c (m32r_gdbarch_init): Likewise.
10162 * m68hc11-tdep.c (gdb_print_insn_m68hc11): Remove.
10163 (m68hc11_gdbarch_init): Don't call set_gdbarch_print_insn.
10164 * m68k-tdep.c (m68k_gdbarch_init): Likewise.
10165 * m88k-tdep.c (m88k_gdbarch_init): Likewise.
10166 * microblaze-tdep.c (microblaze_gdbarch_init): Likewise.
10167 * mn10300-tdep.c (mn10300_gdbarch_init): Likewise.
10168 * moxie-tdep.c (moxie_gdbarch_init): Likewise.
10169 * msp430-tdep.c (msp430_gdbarch_init): Likewise.
10170 * mt-tdep.c (mt_gdbarch_init): Likewise.
10171 * nds32-tdep.c (nds32_gdbarch_init): Likewise.
10172 * nios2-tdep.c (nios2_print_insn): Remove.
10173 (nios2_gdbarch_init): Don't call set_gdbarch_print_insn.
10174 * rx-tdep.c (rx_gdbarch_init): Likewise.
10175 * s390-linux-tdep.c (s390_gdbarch_init): Likewise.
10176 * score-tdep.c (score_print_insn): Remove.
10177 (score_gdbarch_init): Don't call set_gdbarch_print_insn.
10178 * sh-tdep.c (sh_gdbarch_init): Likewise.
10179 * sh64-tdep.c (sh64_gdbarch_init): Likewise.
10180 * sparc-tdep.c (sparc32_gdbarch_init): Likewise.
10181 * tic6x-tdep.c (tic6x_print_insn): Remove.
10182 (tic6x_gdbarch_init): Don't call set_gdbarch_print_insn.
10183 * tilegx-tdep.c (tilegx_gdbarch_init): Likewise.
10184 * v850-tdep.c (v850_gdbarch_init): Likewise.
10185 * vax-tdep.c (vax_gdbarch_init): Likewise.
10186 * xstormy16-tdep.c (xstormy16_gdbarch_init): Likewise.
10187 * xtensa-tdep.c (xtensa_gdbarch_init): Likewise.
10188
10189 2017-05-23 John Baldwin <jhb@FreeBSD.org>
10190
10191 * mips-fbsd-tdep.c (MIPS_PC_REGNUM): Remove.
10192 (MIPS_FP0_REGNUM): Remove.
10193 (MIPS_FSR_REGNUM): Remove.
10194 (mips_fbsd_supply_fpregs): Use mips_regnum.
10195 (mips_fbsd_supply_gregs): Likewise.
10196 (mips_fbsd_collect_fpregs): Likewise.
10197 (mips_fbsd_collect_gregs): Likewise.
10198
10199 2017-05-23 John Baldwin <jhb@FreeBSD.org>
10200
10201 * mips-fbsd-nat.c (getregs_supplies): Fix upper bound comparison.
10202 (getpfpregs_supplies): New function.
10203 (mips_fbsd_fetch_inferior_registers): Remove early exit and use
10204 getfpregs_supplies.
10205 (mips_fbsd_store_inferior_registers): Likewise.
10206
10207 2017-05-22 Pedro Alves <palves@redhat.com>
10208
10209 * MAINTAINERS (Host/Native): Add John Baldwin as FreeBSD
10210 maintainer.
10211
10212 2017-05-22 Alan Hayward <alan.hayward@arm.com>
10213
10214 * ppc-linux-nat.c (fetch_register): Use PPC_MAX_REGISTER_SIZE.
10215 (store_register): Likewise.
10216 * ppc-sysv-tdep.c (ppc_sysv_abi_push_dummy_call): Likewise.
10217 (get_decimal_float_return_value): Likewise.
10218 (do_ppc_sysv_return_value): Likewise.
10219 (ppc64_sysv_abi_push_integer): Likewise.
10220 (ppc64_sysv_abi_push_freg): Likewise.
10221 (ppc64_sysv_abi_return_value_base): Likewise.
10222 (ppc64_sysv_abi_return_value): Likewise.
10223 * rs6000-aix-tdep.c (rs6000_push_dummy_call): Likewise.
10224 * rs6000-lynx178-tdep.c (rs6000_lynx178_push_dummy_call): Likewise.
10225 * rs6000-nat.c: Likewise.
10226 * rs6000-tdep.c (rs6000_register_to_value): Likewise.
10227 (rs6000_value_to_register): Likewise.
10228 * ppc-tdep.h (PPC_MAX_REGISTER_SIZE): Add.
10229
10230 2017-05-21 Tom Tromey <tom@tromey.com>
10231
10232 PR rust/21466:
10233 * rust-lang.c (rust_print_type) <TYPE_CODE_ARRAY>: Print unsized
10234 arrays as "[T]", not "[T; ]".
10235
10236 2017-05-19 Tom Tromey <tom@tromey.com>
10237
10238 PR rust/21484:
10239 * rust-lang.c (exp_descriptor_rust): New function.
10240 (rust_language_defn): Use it.
10241 * p-lang.c (pascal_language_defn): Update.
10242 * opencl-lang.c (opencl_language_defn): Update.
10243 * objc-lang.c (objc_language_defn): Update.
10244 * m2-lang.c (m2_language_defn): Update.
10245 * language.h (struct language_defn)
10246 <la_watch_location_expression>: New member.
10247 * language.c (unknown_language_defn, auto_language_defn)
10248 (local_language_defn): Update.
10249 * go-lang.c (go_language_defn): Update.
10250 * f-lang.c (f_language_defn): Update.
10251 * d-lang.c (d_language_defn): Update.
10252 * c-lang.h (c_watch_location_expression): Declare.
10253 * c-lang.c (c_watch_location_expression): New function.
10254 (c_language_defn, cplus_language_defn, asm_language_defn)
10255 (minimal_language_defn): Use it.
10256 * breakpoint.c (watch_command_1): Call
10257 la_watch_location_expression.
10258 * ada-lang.c (ada_language_defn): Update.
10259
10260 2017-05-19 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
10261
10262 PR tui/21482
10263 * gdb_curses.h (NOMACROS): Define.
10264 (NCURSES_NOMACROS): Define.
10265
10266 2017-05-19 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
10267
10268 PR tui/21482
10269 * tui/tui-windata.c (tui_erase_data_content): Cast last mvwaddstr
10270 arg to char *.
10271 * tui/tui-wingeneral.c (box_win): Likewise.
10272 * tui/tui-winsource.c (tui_erase_source_content): Likewise.
10273 (tui_show_source_line): Likewise.
10274 (tui_show_exec_info_content): Likewise.
10275
10276 2017-05-19 Vladimir Mezentsev <vladimir.mezentsev@oracle.com>
10277
10278 * sparc-tdep.c (sparc_structure_return_p)
10279 (sparc_arg_on_registers_p): New functions.
10280 (sparc32_store_arguments): Use them.
10281 * sparc64-tdep.c (sparc64_16_byte_align_p)
10282 (sparc64_store_floating_fields, sparc64_extract_floating_fields):
10283 Handle TYPE_CODE_ARRAY.
10284
10285 2017-05-17 Yao Qi <yao.qi@linaro.org>
10286
10287 * cli/cli-decode.c (add_alias_cmd): New function.
10288 * command.h (add_alias_cmd): Declare.
10289 * infcmd.c (_initialize_infcmd): Don't call add_com_alias,
10290 instead call add_alias_cmd.
10291
10292 2017-05-17 Pedro Alves <palves@redhat.com>
10293
10294 * Makefile.in (nat_extra_makefile_frag): Rename to ...
10295 (nat_makefile_frag): ... this. All references updated.
10296 * configure.ac: Likewise.
10297 * configure.nat: Likewise. Enhance comments.
10298 * configure: Regenerate.
10299
10300 2017-05-15 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
10301
10302 * procfs.c (procfs_create_inferior): Change prototype to match
10303 definition.
10304
10305 2017-05-13 Eli Zaretskii <eliz@gnu.org>
10306
10307 * tui/tui.c (tui_enable): Cast "unknown" to 'char *' to avoid a
10308 C++ compiler warning.
10309
10310 2017-05-12 Tom Tromey <tom@tromey.com>
10311
10312 PR rust/21483:
10313 * rust-lang.c (rust_evaluate_subexp) <STRUCTOP_STRUCT>: Don't
10314 recurse, just call value_struct_elt directly.
10315
10316 2017-05-12 Tom Tromey <tom@tromey.com>
10317
10318 * rust-lang.c (rust_dump_subexp_body) <STRUCTOP_ANONYMOUS,
10319 OP_RUST_ARRAY>: Fix.
10320
10321 2017-05-12 Tom Tromey <tom@tromey.com>
10322
10323 * rust-lang.c (rust_print_subexp): Replace "return" with "break".
10324
10325 2017-05-09 Yao Qi <yao.qi@linaro.org>
10326
10327 * regcache.c: Include <forward_list>.
10328 (struct regcache_list): Remove.
10329 (current_regcache): Update.
10330 (get_thread_arch_aspace_regcache): Update for std::forward_list.
10331 (regcache_thread_ptid_changed): Likewise.
10332 (registers_changed_ptid): Likewise.
10333 (current_regcache_size): Likewise.
10334
10335 2017-05-09 Yao Qi <yao.qi@linaro.org>
10336
10337 * regcache.c [GDB_SELF_TEST]: Include selftest.h.
10338 (current_regcache_size): New function.
10339 (current_regcache_test): New function.
10340 (_initialize_regcache) [GDB_SELF_TEST]: Register the unit test.
10341
10342 2017-05-08 Alan Hayward <alan.hayward@arm.com>
10343
10344 * mips-tdep.c (mips_o32_return_value): Remove unused buffer.
10345 (print_gp_register_row): Use get_frame_register_value.
10346
10347 2017-05-08 Alan Hayward <alan.hayward@arm.com>
10348
10349 * mips-linux-tdep.c (mips_supply_gregset): Use raw_supply_zeroed.
10350 (mips_supply_fpregset): Likewise.
10351 (mips64_supply_gregset): Likewise.
10352
10353 2017-05-08 Alan Hayward <alan.hayward@arm.com>
10354
10355 * mn10300-linux-tdep.c (am33_supply_gregset_method): Use
10356 regcache->raw_supply_zeroed.
10357
10358 2017-05-06 Sergio Durigan Junior <sergiodj@redhat.com>
10359
10360 * configure.nat: Rearrange 'case' statements to match
10361 host before cpu.
10362
10363 2017-05-06 Sergio Durigan Junior <sergiodj@redhat.com>
10364
10365 * Makefile.in: Remove "@host_makefile_frag@". Add variables
10366 NAT_FILE, NATDEPFILES, NAT_CDEPS, LOADLIBES, MH_CFLAGS, XM_CLIBS,
10367 NAT_GENERATED_FILES, HAVE_NATIVE_GCORE_HOST. Add
10368 "@nat_extra_makefile_frag@".
10369 (Makefile): Remove dependency on "@frags@".
10370 ($(GNULIB_BUILDDIR)/Makefile): Likewise.
10371 (data-directory/Makefile): Likewise.
10372 * config/aarch64/linux.mh: Deleted; moved contents to
10373 "gdb/configure.nat".
10374 * config/alpha/alpha-linux.mh: Likewise.
10375 * config/alpha/nbsd.mh: Likewise.
10376 * config/arm/linux.mh: Likewise.
10377 * config/arm/nbsdelf.mh: Likewise.
10378 * config/i386/cygwin.mh: Likewise.
10379 * config/i386/cygwin64.mh: Likewise.
10380 * config/i386/darwin.mh: Likewise.
10381 * config/i386/fbsd.mh: Likewise.
10382 * config/i386/fbsd64.mh: Likewise.
10383 * config/i386/go32.mh: Likewise.
10384 * config/i386/i386gnu.mh: Likewise.
10385 * config/i386/i386sol2.mh: Likewise.
10386 * config/i386/linux.mh: Likewise.
10387 * config/i386/linux64.mh: Likewise.
10388 * config/i386/mingw.mh: Likewise.
10389 * config/i386/mingw64.mh: Likewise.
10390 * config/i386/nbsd64.mh: Likewise.
10391 * config/i386/nbsdelf.mh: Likewise.
10392 * config/i386/nto.mh: Likewise.
10393 * config/i386/obsd.mh: Likewise.
10394 * config/i386/obsd64.mh: Likewise.
10395 * config/i386/sol2-64.mh: Likewise.
10396 * config/ia64/linux.mh: Likewise.
10397 * config/m32r/linux.mh: Likewise.
10398 * config/m68k/linux.mh: Likewise.
10399 * config/m68k/nbsdelf.mh: Likewise.
10400 * config/m68k/obsd.mh: Likewise.
10401 * config/m88k/obsd.mh: Likewise.
10402 * config/mips/fbsd.mh: Likewise.
10403 * config/mips/linux.mh: Likewise.
10404 * config/mips/nbsd.mh: Likewise.
10405 * config/mips/obsd64.mh: Likewise.
10406 * config/pa/linux.mh: Likewise.
10407 * config/pa/nbsd.mh: Likewise.
10408 * config/pa/obsd.mh: Likewise.
10409 * config/powerpc/aix.mh: Likewise.
10410 * config/powerpc/fbsd.mh: Likewise.
10411 * config/powerpc/linux.mh: Likewise.
10412 * config/powerpc/nbsd.mh: Likewise.
10413 * config/powerpc/obsd.mh: Likewise.
10414 * config/powerpc/ppc64-linux.mh: Likewise.
10415 * config/powerpc/spu-linux.mh: Likewise.
10416 * config/s390/linux.mh: Likewise.
10417 * config/sh/nbsd.mh: Likewise.
10418 * config/sparc/fbsd.mh: Likewise.
10419 * config/sparc/linux.mh: Likewise.
10420 * config/sparc/linux64.mh: Likewise.
10421 * config/sparc/nbsd64.mh: Likewise.
10422 * config/sparc/nbsdelf.mh: Likewise.
10423 * config/sparc/obsd64.mh: Likewise.
10424 * config/sparc/sol2.mh: Likewise.
10425 * config/tilegx/linux.mh: Likewise.
10426 * config/vax/nbsdelf.mh: Likewise.
10427 * config/vax/obsd.mh: Likewise.
10428 * config/xtensa/linux.mh: Likewise.
10429 * config/i386/i386gnu.mn: New file, with excerpts from
10430 "config/i386/i386gnu.mh".
10431 * configure: Regenerate.
10432 * configure.ac: Rewrite code to use "gdb/configure.nat" instead of
10433 *.mh files under "gdb/config".
10434 * configure.nat: New file, with contents from the
10435 "gdb/config/*/*.mh" files.
10436
10437 2017-05-05 Tim Wiederhake <tim.wiederhake@intel.com>
10438
10439 * btrace.c (btrace_clear): Free insn vector.
10440
10441 2017-05-05 Pedro Alves <palves@redhat.com>
10442
10443 * warning.m4 (build_warnings): Add -Wno-error=maybe-uninitialized.
10444 * configure: Regenerate.
10445
10446 2017-05-04 Pedro Alves <palves@redhat.com>
10447
10448 * Makefile.in (SFILES): Add progspace-and-thread.c.
10449 (HFILES_NO_SRCDIR): Add progspace-and-thread.h.
10450 (COMMON_OBS): Add progspace-and-thread.o.
10451 * breakpoint.c: Include "progspace-and-thread.h".
10452 (update_inserted_breakpoint_locations)
10453 (insert_breakpoint_locations, create_longjmp_master_breakpoint):
10454 Use scoped_restore_current_pspace_and_thread.
10455 (create_std_terminate_master_breakpoint): Use
10456 scoped_restore_current_program_space.
10457 (remove_breakpoint): Use scoped_restore_current_pspace_and_thread.
10458 (print_breakpoint_location): Use
10459 scoped_restore_current_program_space.
10460 (bp_loc_is_permanent): Use
10461 scoped_restore_current_pspace_and_thread.
10462 (resolve_sal_pc): Use scoped_restore_current_pspace_and_thread.
10463 (download_tracepoint_locations): Use
10464 scoped_restore_current_pspace_and_thread.
10465 (breakpoint_re_set): Use scoped_restore_current_pspace_and_thread.
10466 * exec.c (exec_close_1): Use scoped_restore_current_program_space.
10467 (enum step_over_calls_kind): Moved from inferior.h.
10468 (class scoped_restore_current_thread): New class.
10469 * gdbthread.h (make_cleanup_restore_current_thread): Delete
10470 declaration.
10471 (scoped_restore_current_thread): New class.
10472 * infcmd.c: Include "common/gdb_optional.h".
10473 (continue_1, proceed_after_attach): Use
10474 scoped_restore_current_thread.
10475 (notice_new_inferior): Use scoped_restore_current_thread.
10476 * inferior.c: Include "progspace-and-thread.h".
10477 (restore_inferior, save_current_inferior): Delete.
10478 (add_inferior_command, clone_inferior_command): Use
10479 scoped_restore_current_pspace_and_thread.
10480 * inferior.h (scoped_restore_current_inferior): New class.
10481 * infrun.c: Include "progspace-and-thread.h" and
10482 "common/gdb_optional.h".
10483 (follow_fork_inferior): Use
10484 scoped_restore_current_pspace_and_thread.
10485 (scoped_restore_exited_inferior): New class.
10486 (handle_vfork_child_exec_or_exit): Use
10487 scoped_restore_exited_inferior,
10488 scoped_restore_current_pspace_and_thread,
10489 scoped_restore_current_thread and scoped_restore.
10490 (fetch_inferior_event): Use scoped_restore_current_thread.
10491 * linespec.c (decode_line_full, decode_line_1): Use
10492 scoped_restore_current_program_space.
10493 * mi/mi-main.c: Include "progspace-and-thread.h".
10494 (exec_continue): Use scoped_restore_current_thread.
10495 (mi_cmd_exec_run): Use scoped_restore_current_pspace_and_thread.
10496 (mi_cmd_trace_frame_collected): Use scoped_restore_current_thread.
10497 * proc-service.c (ps_pglobal_lookup): Use
10498 scoped_restore_current_program_space.
10499 * progspace-and-thread.c: New file.
10500 * progspace-and-thread.h: New file.
10501 * progspace.c (release_program_space, clone_program_space): Use
10502 scoped_restore_current_program_space.
10503 (restore_program_space, save_current_program_space)
10504 (save_current_space_and_thread): Delete.
10505 (switch_to_program_space_and_thread): Moved to
10506 progspace-and-thread.c.
10507 * progspace.h (save_current_program_space)
10508 (save_current_space_and_thread): Delete declarations.
10509 (scoped_restore_current_program_space): New class.
10510 * remote.c (remote_btrace_maybe_reopen): Use
10511 scoped_restore_current_thread.
10512 * symtab.c: Include "progspace-and-thread.h".
10513 (skip_prologue_sal): Use scoped_restore_current_pspace_and_thread.
10514 * thread.c (print_thread_info_1): Use
10515 scoped_restore_current_thread.
10516 (struct current_thread_cleanup): Delete.
10517 (do_restore_current_thread_cleanup)
10518 (restore_current_thread_cleanup_dtor): Rename/convert both to ...
10519 (scoped_restore_current_thread::~scoped_restore_current_thread):
10520 ... this new dtor.
10521 (make_cleanup_restore_current_thread): Rename/convert to ...
10522 (scoped_restore_current_thread::scoped_restore_current_thread):
10523 ... this new ctor.
10524 (thread_apply_all_command): Use scoped_restore_current_thread.
10525 (thread_apply_command): Use scoped_restore_current_thread.
10526 * tracepoint.c (tdump_command): Use scoped_restore_current_thread.
10527 * varobj.c (value_of_root_1): Use scoped_restore_current_thread.
10528
10529 2017-05-04 Pedro Alves <palves@redhat.com>
10530
10531 * thread.c (make_cleanup_restore_current_thread): Move
10532 find_thread_ptid call before the is_stopped call. Assert that the
10533 thread is found. Replace is_stopped call by checking the thread's
10534 state directly. Remove unnecessary NULL-thread check.
10535
10536 2017-05-04 Pedro Alves <palves@redhat.com>
10537
10538 * corelow.c (thread_section_name): New class.
10539 (get_core_register_section, get_core_siginfo): Use it.
10540
10541 2017-05-04 Andreas Arnez <arnez@linux.vnet.ibm.com>
10542
10543 * corelow.c (sniff_core_bfd): Remove extra semicolon.
10544 (get_core_register_section): Remove xfree of NULL pointer.
10545
10546 2017-05-03 Alan Hayward <alan.hayward@arm.com>
10547
10548 * frv-linux-tdep.c (frv_linux_supply_gregset): Use raw_supply_zeroed.
10549 * regcache.c (regcache::raw_supply_zeroed): New function.
10550 * regcache.h (regcache::raw_supply_zeroed): New declaration.
10551
10552 2017-05-03 Simon Marchi <simon.marchi@ericsson.com>
10553
10554 * gdbarch.sh: Remove commented out definition of
10555 TARGET_CHAR_BIT.
10556 * gdbarch.h: Re-generate.
10557
10558 2017-05-03 Sergio Durigan Junior <sergiodj@redhat.com>
10559
10560 * configure: Regenerate.
10561
10562 2017-05-02 Simon Marchi <simon.marchi@ericsson.com>
10563
10564 * solib-target.c (solib_target_relocate_section_addresses):
10565 Remove num_section_bases, num_bases, segment_bases variables.
10566
10567 2017-05-02 Simon Marchi <simon.marchi@polymtl.ca>
10568
10569 * common/gdb_vecs.h (DEF_VEC_I (CORE_ADDR)): Remove.
10570
10571 2017-05-02 Simon Marchi <simon.marchi@polymtl.ca>
10572
10573 * solib-target.c: Include <vector>
10574 (struct lm_info_target) <~lm_info_target>: Remove.
10575 <segment_bases, section_bases>: Change type to
10576 std::vector<CORE_ADDR>.
10577 (library_list_start_segment, library_list_start_section,
10578 library_list_end_library,
10579 solib_target_relocate_section_addresses): Adjust.
10580
10581 2017-05-02 Simon Marchi <simon.marchi@polymtl.ca>
10582
10583 * gdbarch.sh (software_single_step): Change return type to
10584 std::vector<CORE_ADDR>.
10585 * gdbarch.c, gdbarch.h: Re-generate.
10586 * arch/arm-get-next-pcs.c (thumb_deal_with_atomic_sequence_raw):
10587 Adjust.
10588 (arm_deal_with_atomic_sequence_raw): Adjust.
10589 (thumb_get_next_pcs_raw): Adjust.
10590 (arm_get_next_pcs_raw): Adjust.
10591 (arm_get_next_pcs): Adjust.
10592 * arch/arm-get-next-pcs.h (arm_get_next_pcs): Adjust.
10593 * aarch64-tdep.c (aarch64_software_single_step): Adjust.
10594 * alpha-tdep.c (alpha_deal_with_atomic_sequence): Adjust.
10595 (alpha_software_single_step): Adjust.
10596 * alpha-tdep.h (alpha_software_single_step): Adjust.
10597 * arm-linux-tdep.c (arm_linux_software_single_step): Adjust.
10598 * arm-tdep.c (arm_software_single_step): Adjust.
10599 (arm_breakpoint_kind_from_current_state): Adjust.
10600 * arm-tdep.h (arm_software_single_step): Adjust.
10601 * breakpoint.c (insert_single_step_breakpoint): Adjust.
10602 * cris-tdep.c (cris_software_single_step): Adjust.
10603 * mips-tdep.c (mips_deal_with_atomic_sequence): Adjust.
10604 (micromips_deal_with_atomic_sequence): Adjust.
10605 (deal_with_atomic_sequence): Adjust.
10606 (mips_software_single_step): Adjust.
10607 * mips-tdep.h (mips_software_single_step): Adjust.
10608 * moxie-tdep.c (moxie_software_single_step): Adjust.
10609 * nios2-tdep.c (nios2_software_single_step): Adjust.
10610 * ppc-tdep.h (ppc_deal_with_atomic_sequence): Adjust.
10611 * rs6000-aix-tdep.c (rs6000_software_single_step): Adjust.
10612 * rs6000-tdep.c (ppc_deal_with_atomic_sequence): Adjust.
10613 * s390-linux-tdep.c (s390_software_single_step): Adjust.
10614 * sparc-tdep.c (sparc_software_single_step): Adjust.
10615 * spu-tdep.c (spu_software_single_step): Adjust.
10616 * tic6x-tdep.c (tic6x_software_single_step): Adjust.
10617
10618 2017-05-02 Simon Marchi <simon.marchi@polymtl.ca>
10619
10620 * gdbarch.sh: Use semi-colon as field separator instead of colon.
10621 * gdbarch.h: Re-generate.
10622
10623 2017-05-01 Tim Wiederhake <tim.wiederhake@intel.com>
10624
10625 * Makefile.in (SUBDIR_PYTHON_OBS): Add py-instruction.o.
10626 (SUBDIR_PYTHON_SRCS): Add py-instruction.c.
10627 * python/py-instruction.c, python/py-instruction.h: New file.
10628 * python/py-record.c: Add py-instruction.h include.
10629 (gdbpy_initialize_record): Make gdb.Instruction a super class of
10630 gdb.RecordInstruction.
10631 * python/python-internal.h: Add gdbpy_initialize_instruction
10632 declaration.
10633 * python/python.c (do_start_initialization): Add
10634 gdbpy_initialize_instruction.
10635
10636 2017-05-01 Tim Wiederhake <tim.wiederhake@intel.com>
10637
10638 * python/py-record-btrace.c (BTPY_REQUIRE_VALID_CALL, btpy_call_type):
10639 Remove.
10640 (btrace_func_from_recpy_func): New function.
10641 (btpy_call_new, btpy_number, btpy_hash, btpy_richcompare): Remove.
10642 (btpy_call_level, btpy_call_symbol, btpy_call_instructions,
10643 btpy_call_up, btpy_call_prev_sibling, btpy_call_next_sibling): Rename to ...
10644 (recpy_bt_func_level, recpy_bt_func_symbol, recpy_bt_func_instructions,
10645 recpy_bt_func_up, recpy_bt_func_prev, recpy_bt_func_next): This.
10646 Also, use new helper functions.
10647 (btpy_list_item): Use new helper functions.
10648 (recpy_bt_function_call_history): Use new type name.
10649 (btpy_call_getset): Remove.
10650 (gdbpy_initialize_btrace): Remove code to initialize
10651 gdb.BtraceFunctionCall.
10652 * python/py-record-btrace.h (recpy_bt_func_number, recpy_btb_func_level,
10653 recpy_btb_func_symbol, recpy_bt_func_instructions, recpy_bt_func_up,
10654 recpy_bt_func_prev, recpy_bt_func_next): New export.
10655 * python/py-record.c (recpy_func_type): New static object.
10656 (recpy_func_new, recpy_func_level, recpy_func_symbol,
10657 recpy_func_instructions, recpy_func_up, recpy_func_prev,
10658 recpy_func_next): New function.
10659 (recpy_element_hash, recpy_element_richcompare): Updated comment.
10660 (recpy_func_getset): New static object.
10661 (gdbpy_initialize_record): Add code to initialize gdb.RecordInstruction.
10662 * python/py-record.h (recpy_func_type, recpy_func_new): New export.
10663
10664 2017-05-01 Tim Wiederhake <tim.wiederhake@intel.com>
10665
10666 * python/py-record-btrace.c (BTPY_REQUIRE_VALID_INSN): Remove.
10667 (btpy_object, btpy_insn_type, btpy_new): Remove.
10668 (btpy_list_object): Use gdb.RecordInstruction type instead of
10669 gdb.BtraceInstruction type.
10670 (btrace_insn_from_recpy_insn): New function.
10671 (btpy_insn_or_gap_new): Adjust comment. Use recpy_insn_new instead of
10672 btpy_new.
10673 (btpy_call_new, btpy_list_item): Do not use btpy_new anymore.
10674 (btpy_number, btpy_hash, btpy_call_level, btpy_call_symbol,
10675 btpy_call_instructions, btpy_call_up, btpy_call_prev_sibling,
10676 btpy_call_next_sibling, btpy_richcompare): Use recpy_element_object
10677 instead of btpy_object.
10678 (btpy_insn_sal, btpy_insn_pc, btpy_insn_size, btpy_insn_is_speculative,
10679 btpy_insn_data, btpy_insn_decode): Rename to ...
10680 (recpy_bt_insn_sal, recpy_bt_insn_pc, recpy_bt_insn_size,
10681 recpy_bt_insn_is_speculative, recpy_bt_insn_data,
10682 recpy_bt_insn_decode): This. Also, use new helper functions.
10683 (btpy_list_position, recpy_bt_goto): Use recpy_element_object and
10684 recpy_insn_type.
10685 (btpy_insn_getset): Remove.
10686 (gdbpy_initialize_btrace): Remove code to initialize
10687 gdb.BtraceInstruction. Use recpy_element_object.
10688 * python/py-record-btrace.h (recpy_bt_insn_number, recpy_bt_insn_sal,
10689 recpy_bt_insn_pc, recpy_bt_insn_data, recpy_bt_insn_decoded,
10690 recpy_bt_insn_size, recpy_bt_insn_is_speculative): New export.
10691 * python/py-record.c (recpy_insn_type): New static object.
10692 (recpy_insn_new, recpy_insn_sal, recpy_insn_pc, recpy_insn_data,
10693 recpy_insn_decoded, recpy_insn_size, recpy_insn_is_speculative,
10694 recpy_element_number, recpy_element_hash, recpy_element_richcompare):
10695 New function.
10696 (recpy_insn_getset): New static object.
10697 (gdbpy_initialize_record): Initialize gdb.RecordInstruction.
10698 * python/py-record.h (recpy_element_object): New typedef.
10699 (recpy_insn_type, recpy_insn_new): New export.
10700
10701 2017-05-01 Tim Wiederhake <tim.wiederhake@intel.com>
10702
10703 * py-record-btrace.c (btpy_insn_new): Removed.
10704 (btpy_insn_or_gap_new): New function.
10705 (btpy_insn_error): Removed.
10706 (btpy_insn_sal, btpy_insn_pc, btpy_insn_size, btpy_insn_is_speculative,
10707 btpy_insn_data, btpy_insn_decode): Remove code path for gaps.
10708 (recpy_bt_replay_position, recpy_bt_begin, recpy_bt_end): Call
10709 btpy_insn_or_gap_new instead of btpy_insn_new.
10710 (btpy_insn_getset): Remove btpy_insn_error.
10711 * py-record.c (recpy_gap_type): New static object.
10712 (recpy_gap_object): New typedef.
10713 (recpy_gap_new, recpy_gap_number, recpy_gap_reason_code,
10714 recpy_gap_reason_string): New function.
10715 (recpy_gap_getset): New static object.
10716 (gdbpy_initialize_record): Initialize gdb.RecordGap type.
10717 * py-record.h (recpy_gap_new): New export.
10718
10719 2017-05-01 Tim Wiederhake <tim.wiederhake@intel.com>
10720
10721 * python/py-record.c (recpy_ptid): Remove.
10722 (recpy_record_getset): Remove recpy_ptid.
10723
10724 2017-05-01 Tim Wiederhake <tim.wiederhake@intel.com>
10725
10726 * btrace.c (btrace_fetch): Set inferior_ptid.
10727 * python/py-record-btrace.c: Add "py-record.h" include.
10728 (recpy_bt_format, recpy_bt_replay_position, recpy_bt_begin,
10729 recpy_bt_end, recpy_bt_instruction_history,
10730 recpy_bt_function_call_history, recpy_bt_goto): Use ptid stored
10731 in gdb.Record object instead of current ptid.
10732 * python/py-record.c: Include new "py-record.h" file.
10733 (recpy_record_object): Moved to py-record.h.
10734 * python/py-record.h: New file.
10735
10736 2017-05-01 Tim Wiederhake <tim.wiederhake@intel.com>
10737
10738 * python/py-record-btrace.c (BTPY_REQUIRE_VALID_INSN,
10739 BTPY_REQUIRE_VALID_CALL, recpy_bt_function_call_history): Fix
10740 indentation.
10741
10742 2017-05-01 Joel Brobecker <brobecker@adacore.com>
10743
10744 * MAINTAINERS: Move Daniel Jacobowitz and Mark Kettenis to
10745 the past maintainers section.
10746
10747 2017-04-28 Yao Qi <yao.qi@linaro.org>
10748
10749 * infcmd.c (get_return_value): Use regcache ctor, and remove
10750 cleanup.
10751
10752 2017-04-28 Yao Qi <yao.qi@linaro.org>
10753 Pedro Alves <palves@redhat.com>
10754
10755 * regcache.c (regcache::regcache): New tag dispatch ctor.
10756 (do_cooked_read): Moved above.
10757 (regcache_dup): Use the tag dispatch ctor..
10758 * regcache.h (regcache): Declare ctor, delete copy ctor and
10759 assignment operator, remove friend regcache_dup.
10760
10761 2017-04-28 Yao Qi <yao.qi@linaro.org>
10762
10763 * regcache.c (regcache_dup): Assert !src->m_readonly_p and
10764 call method save instead of regcache_cpy.
10765 * regcache.h (struct regcache): Make regcache_dup a friend.
10766
10767 2017-04-28 Yao Qi <yao.qi@linaro.org>
10768
10769 * regcache.c (struct regcache): Move to regcache.h
10770 (regcache::arch): New method.
10771 (regcache_get_ptid): Update.
10772 (get_regcache_arch): Call arch method.
10773 (get_regcache_aspace): Call method aspace.
10774 (register_buffer): Change it to method.
10775 (regcache_save): Change it to regcache::save.
10776 (regcache_restore): Likewise.
10777 (regcache_cpy_no_passthrough): Remove the declaration.
10778 (regcache_cpy): Call methods restore and cpy_no_passthrough.
10779 (regcache_cpy_no_passthrough): Change it to method
10780 cpy_no_passthrough.
10781 (regcache_register_status): Change it to method
10782 get_register_status.
10783 (regcache_invalidate): Change it to method invalidate.
10784 (regcache_thread_ptid_changed): Use methods ptid and set_ptid.
10785 (regcache_raw_update): Change it to method raw_update.
10786 (regcache_raw_read): Likewise.
10787 (regcache_raw_read_signed): Likewise.
10788 (regcache_raw_read_unsigned): Likewise.
10789 (regcache_raw_write_signed): Likewise.
10790 (regcache_raw_write_unsigned): Likewise.
10791 (regcache_cooked_read): Likewise.
10792 (regcache_cooked_read_value): Likewise.
10793 (regcache_cooked_read_signed): Likewise.
10794 (regcache_cooked_read_unsigned): Likewise.
10795 (regcache_cooked_write_signed): Likewise.
10796 (regcache_cooked_write_unsigned): Likewise.
10797 (regcache_raw_set_cached_value): Likewise.
10798 (regcache_raw_write): Likewise.
10799 (regcache_cooked_write): Likewise.
10800 (regcache_xfer_part): Likewise.
10801 (regcache_raw_read_part): Likewise.
10802 (regcache_raw_write_part): Likewise.
10803 (regcache_cooked_read_part): Likewise.
10804 (regcache_cooked_write_part): Likewise.
10805 (regcache_raw_supply): Likewise.
10806 (regcache_raw_collect): Likewise.
10807 (regcache_transfer_regset): Likewise.
10808 (regcache_supply_regset): Likewise.
10809 (regcache_collect_regset): Likewise.
10810 (regcache_debug_print_register): Likewise.
10811 (enum regcache_dump_what): Move it to regcache.h.
10812 (regcache_dump): Change it to method dump.
10813 * regcache.h (enum regcache_dump_what): New.
10814 (class regcache): New.
10815 * target.c (target_fetch_registers): Call method
10816 debug_print_register.
10817 (target_store_registers): Likewise.
10818
10819 2017-04-28 Simon Marchi <simon.marchi@ericsson.com>
10820
10821 * windows-nat.c (struct lm_info_windows): Initialize field.
10822 (windows_make_so): Allocate lm_info_windows with new.
10823 (windows_free_so): Free lm_info_windows with delete.
10824
10825 2017-04-28 Simon Marchi <simon.marchi@ericsson.com>
10826
10827 * solib-darwin.c (struct lm_info_darwin): Initialize field.
10828 (darwin_current_sos): Allocate lm_info_darwin with new, remove
10829 cleanup.
10830 (darwin_free_so): Free lm_info_darwin with delete.
10831
10832 2017-04-28 Simon Marchi <simon.marchi@ericsson.com>
10833
10834 * solib-svr4.h (struct lm_info_svr4): Initialize fields.
10835 <l_addr_p>: Change type to bool.
10836 * solib-svr4.c (lm_info_read): Allocate lm_info_svr4 with new.
10837 (svr4_free_so): Free lm_info_svr4 with delete.
10838 (svr4_copy_library_list): Replace memcpy with call to copy
10839 constructor.
10840 (library_list_start_library, svr4_default_sos): Allocate
10841 lm_info_svr4 with new.
10842
10843 2017-04-28 Simon Marchi <simon.marchi@ericsson.com>
10844
10845 * solib-target.c (struct lm_info_target): Add destructor,
10846 initialize fields.
10847 <name>: Change type to std::string.
10848 (library_list_start_library): Allocate lm_info_target with new.
10849 (solib_target_free_library_list): Free lm_info_target with
10850 delete.
10851 (solib_target_current_sos): Adapt to std::string.
10852 (solib_target_free_so): Free lm_info_target with delete.
10853
10854 2017-04-28 Simon Marchi <simon.marchi@ericsson.com>
10855
10856 * solib-frv.c (struct lm_info_frv): Add destructor, initialize
10857 fields.
10858 (frv_current_sos): Allocate lm_info_frv with new.
10859 (frv_relocate_main_executable): Free lm_info_frv with delete,
10860 allocate with new.
10861 (frv_clear_solib, frv_free_so): Free lm_info_frv with delete.
10862
10863 2017-04-28 Simon Marchi <simon.marchi@ericsson.com>
10864
10865 * solib-frv.c (struct lm_info_frv): Fix indentation.
10866
10867 2017-04-28 Simon Marchi <simon.marchi@ericsson.com>
10868
10869 * solib-dsbt.c (struct lm_info_dsbt): Add destructor, initialize
10870 map field.
10871 (dsbt_current_sos): Allocate lm_info_dsbt with new.
10872 (dsbt_relocate_main_executable): Free lm_info_dsbt with delete
10873 and allocate with new.
10874 (dsbt_clear_solib, dsbt_free_so): Free lm_info_dsbt with delete.
10875
10876 2017-04-28 Simon Marchi <simon.marchi@ericsson.com>
10877
10878 * solib-aix.c (struct lm_info_aix): Initialize fields in-class.
10879 <filename, member_name>: Change type to std::string.
10880 (solib_aix_new_lm_info, solib_aix_xfree_lm_info): Remove.
10881 (library_list_start_library): Allocate lm_info_aix with new.
10882 (solib_aix_free_library_list, solib_aix_free_so): Free with delete.
10883 (solib_aix_current_sos): Adapt to std::string, copy lm_info_aix
10884 with copy constructor.
10885
10886 2017-04-28 Simon Marchi <simon.marchi@ericsson.com>
10887
10888 * solist.h (struct lm_info): Remove.
10889 (struct lm_info_base): New class.
10890 (struct so_list) <lm_info>: Change type to lm_info_base *.
10891 * nto-tdep.c (struct lm_info): Remove.
10892 (lm_addr): Adjust.
10893 * solib-aix.c (struct lm_info): Rename to ...
10894 (struct lm_info_aix): ... this. Extend lm_info_base.
10895 (lm_info_p): Rename to ...
10896 (lm_info_aix_p): ... this, and adjust.
10897 (solib_aix_new_lm_info, solib_aix_xfree_lm_info,
10898 solib_aix_parse_libraries, library_list_start_library,
10899 solib_aix_free_library_list, solib_aix_parse_libraries,
10900 solib_aix_get_library_list,
10901 solib_aix_relocate_section_addresses, solib_aix_free_so,
10902 solib_aix_get_section_offsets,
10903 solib_aix_solib_create_inferior_hook, solib_aix_current_sos):
10904 Adjust.
10905 (struct solib_aix_inferior_data) <library_list>: Adjust.
10906 * solib-darwin.c (struct lm_info): Rename to ...
10907 (struct lm_info_darwin): ... this. Extend lm_info_base.
10908 (darwin_current_sos, darwin_relocate_section_addresses): Adjust.
10909 * solib-dsbt.c (struct lm_info): Rename to ...
10910 (struct lm_info_dsbt): ... this. Extend lm_info_base.
10911 (struct dsbt_info) <main_executable_lm_info): Adjust.
10912 (dsbt_current_sos, dsbt_relocate_main_executable, dsbt_free_so,
10913 dsbt_relocate_section_addresses): Adjust.
10914 * solib-frv.c (struct lm_info): Rename to ...
10915 (struct lm_info_frv): ... this. Extend lm_info_base.
10916 (main_executable_lm_info): Adjust.
10917 (frv_current_sos, frv_relocate_main_executable, frv_free_so,
10918 frv_relocate_section_addresses, frv_fdpic_find_global_pointer,
10919 find_canonical_descriptor_in_load_object,
10920 frv_fdpic_find_canonical_descriptor): Adjust.
10921 * solib-svr4.c (struct lm_info): Move to solib-svr4.h, renamed
10922 to lm_info_svr4.
10923 (lm_info_read, lm_addr_check, svr4_keep_data_in_core,
10924 svr4_clear_so, svr4_copy_library_list,
10925 library_list_start_library, svr4_default_sos, svr4_read_so_list,
10926 svr4_current_sos, svr4_fetch_objfile_link_map,
10927 solist_update_incremental): Adjust.
10928 * solib-svr4.h (struct lm_info_svr4): Move here from
10929 solib-svr4.c.
10930 * solib-target.c (struct lm_info): Rename to ...
10931 (struct lm_info_target): ... this. Extend lm_info_base.
10932 (lm_info_p): Rename to ...
10933 (lm_info_target_p): ... this.
10934 (solib_target_parse_libraries, library_list_start_segment,
10935 library_list_start_section, library_list_start_library,
10936 library_list_end_library, solib_target_free_library_list,
10937 solib_target_current_sos, solib_target_free_so,
10938 solib_target_relocate_section_addresses): Adjust.
10939 * windows-nat.c (struct lm_info): Rename to ...
10940 (struct lm_info_windows): ... this. Extend lm_info_base.
10941 (windows_make_so, handle_load_dll, handle_unload_dll,
10942 windows_xfer_shared_libraries): Adjust.
10943
10944 2017-04-28 Simon Marchi <simon.marchi@ericsson.com>
10945
10946 * solib-darwin.c (struct darwin_so_list): Remove.
10947 (darwin_current_sos): Allocate an so_list object instead of a
10948 darwin_so_list, separately allocate an lm_info object.
10949 (darwin_free_so): Free lm_info.
10950
10951 2017-04-28 John Baldwin <jhb@FreeBSD.org>
10952
10953 * mips-tdep.c (print_gp_register_row): Replace printf_filtered
10954 with fprintf_filtered.
10955
10956 2017-04-28 Yao Qi <yao.qi@linaro.org>
10957
10958 * regcache.c (regcache::regcache): New function.
10959 (regcache::~regcache): New function.
10960 (regcache_xmalloc_1): Remove.
10961 (regcache_xmalloc): Call new regcache.
10962 (regcache_xfree): Call delete regcache.
10963 (get_thread_arch_aspace_regcache): Call new regcache.
10964
10965 2017-04-28 Yao Qi <yao.qi@linaro.org>
10966
10967 * mips-linux-nat.c (mips_linux_new_thread): Use ptid method
10968 lwp instead of ptid_get_lwp.
10969
10970 2017-04-28 Yao Qi <yao.qi@linaro.org>
10971
10972 * mips-linux-nat.c (mips_linux_new_thread): Get lwpid from
10973 lwp_info instead of getting from inferior_ptid.
10974
10975 2017-04-27 Keith Seitz <keiths@redhat.com>
10976
10977 * gdbtypes.c (LVALUE_REFERENCE_TO_RVALUE_BINDING_BADNESS)
10978 DIFFERENT_REFERENCE_TYPE_BADNESS): Remove.
10979 (CV_CONVERSION_BADNESS): Define.
10980 (rank_one_type): Remove overly restrictive rvalue reference
10981 rank checks.
10982 Add cv-qualifier checks and subranks for type equality.
10983 * gdbtypes.h (REFERENCE_CONVERSION_RVALUE,
10984 REFERENCE_CONVERSION_CONST_LVALUE, CV_CONVERSION_BADNESS,
10985 CV_CONVERSION_CONST, CV_CONVERSION_VOLATILE): Declare.
10986
10987 2017-04-27 Simon Marchi <simon.marchi@ericsson.com>
10988
10989 * python/py-inferior.c (inferior_to_inferior_object): Increment reference
10990 count when creating the object.
10991
10992 2017-04-27 Sangamesh Mallayya <sangamesh.swamy@in.ibm.com>
10993 Ulrich Weigand <uweigand@de.ibm.com>
10994
10995 * xcoffread.c (read_xcoff_symtab): Read correct function auxiliary
10996 entry if xlc -qfuncsect or gcc -ffunction-sections compiler option
10997 is used in AIX.
10998 (read_xcoff_symtab): Handle C_WEAKEXT storage class.
10999 (process_xcoff_symbol): Likewise.
11000 (scan_xcoff_symtab): Likewise.
11001
11002 2017-04-26 Alan Hayward <alan.hayward@arm.com>
11003
11004 * ia64-tdep.c (examine_prologue): Use get_frame_register_unsigned.
11005 (ia64_sigtramp_frame_prev_register): Use read_memory_unsigned_integer.
11006 (ia64_access_reg): Use get_frame_register_unsigned.
11007 (ia64_access_rse_reg): Likewise.
11008 (ia64_libunwind_frame_prev_register): Likewise.
11009
11010 2017-04-26 Jiong Wang <jiong.wang@arm.com>
11011
11012 * gdbarch.sh: New gdbarch method execute_dwarf_cfa_vendor_op.
11013 * gdbarch.c: Regenerated.
11014 * gdbarch.h: Regenerated.
11015 * dwarf2-frame.c (dwarf2_frame_state_alloc_regs): Made the
11016 visibility external.
11017 (execute_cfa_program): Call execute_dwarf_cfa_vendor_op for CFI
11018 between DW_CFA_lo_user and DW_CFA_high_user inclusive.
11019 (enum cfa_how_kind): Move to ...
11020 (struct dwarf2_frame_state_reg_info): Likewise.
11021 (struct dwarf2_frame_state): Likewise.
11022 * dwarf2-frame.h: ... here.
11023 (dwarf2_frame_state_alloc_regs): New declaration.
11024 * sparc-tdep.c (sparc_execute_dwarf_cfa_vendor_op): New function.
11025 (sparc32_gdbarch_init): Register execute_dwarf_cfa_vendor_op hook.
11026
11027 2017-04-26 Alan Hayward <alan.hayward@arm.com>
11028
11029 * xtensa-tdep.c (xtensa_pseudo_register_read): Use
11030 regcache_raw_read_unsigned.
11031 (xtensa_pseudo_register_write): Likewise.
11032
11033 2017-04-26 Alan Hayward <alan.hayward@arm.com>
11034
11035 * nds32-tdep.c (nds32_pseudo_register_read): Abort on errors.
11036 (nds32_pseudo_register_write): Likewise.
11037
11038 2017-04-25 Yao Qi <yao.qi@linaro.org>
11039
11040 * regcache.c (struct regcache) <readonly_p>: Change its type
11041 to bool.
11042 (regcache_xmalloc_1): Update parameter type and callers update.
11043
11044 2017-04-25 Yao Qi <yao.qi@linaro.org>
11045
11046 * aarch64-tdep.c (aarch64_gdbarch_init): Don't call
11047 set_gdbarch_wchar_bit.
11048 * arm-tdep.c (arm_gdbarch_init): Likewise.
11049
11050 2017-04-25 Pedro Alves <palves@redhat.com>
11051
11052 * common/poison.h [!HAVE_IS_TRIVIALLY_COPYABLE] (IsRelocatable)
11053 (BothAreRelocatable, memcopy, memmove): Don't define.
11054 * common/traits.h (__has_feature, HAVE_IS_TRIVIALLY_COPYABLE): New
11055 macros.
11056
11057 2017-04-25 Pedro Alves <palves@redhat.com>
11058
11059 * common/common-defs.h: Include "common/poison.h".
11060 * common/function-view.h: (Not, Or, Requires): Move to traits.h
11061 and adjust.
11062 * common/poison.h: New file.
11063 * common/traits.h: Include <type_traits>.
11064 (Not, Or, Requires): New, moved from common/function-view.h.
11065
11066 2017-04-25 Pedro Alves <palves@redhat.com>
11067
11068 * breakpoint.h (struct breakpoint): In-class initialize all
11069 fields. Make boolean fields "bool".
11070 * breakpoint.c (init_raw_breakpoint_without_location): Remove
11071 memset call and initializations no longer necessary.
11072
11073 2017-04-25 Pedro Alves <palves@redhat.com>
11074
11075 * btrace.c (pt_btrace_insn_flags): Change parameter type to
11076 reference.
11077 (pt_btrace_insn): New function.
11078 (ftrace_add_pt): Remove memset call and use pt_btrace_insn.
11079
11080 2017-04-25 Pedro Alves <palves@redhat.com>
11081
11082 * ada-lang.c (ada_catchpoint_location): Now a "class". Remove
11083 "base" field and inherit from "bp_location" instead. Add
11084 non-default ctor.
11085 (allocate_location_exception): Use new non-default ctor.
11086 * breakpoint.c (get_first_locp_gte_addr): Remove memset call.
11087 (init_bp_location): Convert to ...
11088 (bp_location::bp_location): ... this new ctor, and remove memset
11089 call.
11090 (base_breakpoint_allocate_location): Use the new non-default ctor.
11091 * breakpoint.h (bp_location): Now a class. Declare default and
11092 non-default ctors. In-class initialize all members.
11093 (init_bp_location): Remove declaration.
11094
11095 2017-04-25 Pedro Alves <palves@redhat.com>
11096
11097 * common/enum-flags.h (enum_flags): Don't implement copy ctor and
11098 assignment operator.
11099
11100 2017-04-24 Yao Qi <yao.qi@linaro.org>
11101
11102 * doublest.c (convert_doublest_to_floatformat): Call
11103 floatformat_totalsize_bytes.
11104
11105 2017-04-22 Tom Tromey <tom@tromey.com>
11106
11107 * mi/mi-cmd-file.c (mi_cmd_file_list_shared_libraries): Use
11108 ui_out_emit_list.
11109 * stack.c (print_frame): Use ui_out_emit_list.
11110 * mi/mi-symbol-cmds.c (mi_cmd_symbol_list_lines): Use
11111 ui_out_emit_list.
11112 * mi/mi-main.c (print_one_inferior)
11113 (mi_cmd_data_list_register_names)
11114 (mi_cmd_data_list_register_values, mi_cmd_list_features)
11115 (mi_cmd_list_target_features, mi_cmd_trace_frame_collected): Use
11116 ui_out_emit_list.
11117 * mi/mi-interp.c (mi_on_normal_stop_1): Use ui_out_emit_list.
11118 (mi_output_solib_attribs): Use ui_out_emit_list,
11119 ui_out_emit_tuple.
11120 * mi/mi-cmd-var.c (varobj_update_one): Use ui_out_emit_list.
11121 * mi/mi-cmd-stack.c (mi_cmd_stack_list_frames)
11122 (mi_cmd_stack_list_args, list_args_or_locals): Use
11123 ui_out_emit_list.
11124 * disasm.c (do_assembly_only): Use ui_out_emit_list.
11125 * breakpoint.c (print_solib_event, output_thread_groups): Use
11126 ui_out_emit_list.
11127
11128 2017-04-22 Tom Tromey <tom@tromey.com>
11129
11130 * mi/mi-main.c (print_variable_or_computed): Use ui_out_emit_tuple.
11131 * mi/mi-cmd-var.c (varobj_update_one): Use ui_out_emit_tuple.
11132 * mi/mi-cmd-stack.c (list_arg_or_local): Use ui_out_emit_tuple.
11133
11134 2017-04-22 Tom Tromey <tom@tromey.com>
11135
11136 * tracepoint.c (tvariables_info_1)
11137 (print_one_static_tracepoint_marker): Use ui_out_emit_tuple.
11138
11139 2017-04-22 Tom Tromey <tom@tromey.com>
11140
11141 * stack.c (print_frame_arg): Use ui_out_emit_tuple,
11142 annotate_arg_emitter.
11143 * breakpoint.c (print_mention_watchpoint)
11144 (print_mention_masked_watchpoint): Use ui_out_emit_tuple.
11145 * annotate.h (struct annotate_arg_emitter): New.
11146
11147 2017-04-22 Tom Tromey <tom@tromey.com>
11148
11149 * record-btrace.c (record_btrace_insn_history)
11150 (record_btrace_insn_history_range, record_btrace_call_history)
11151 (record_btrace_call_history_range): Use ui_out_emit_tuple.
11152 * thread.c (do_captured_list_thread_ids, print_thread_info_1): Use
11153 ui_out_emit_tuple.
11154 * stack.c (print_frame_info): Use ui_out_emit_tuple.
11155 * solib.c (info_sharedlibrary_command): Use ui_out_emit_tuple.
11156 * skip.c (skip_info): Use ui_out_emit_tuple.
11157 * remote.c (show_remote_cmd): Use ui_out_emit_tuple.
11158 * progspace.c (print_program_space): Use ui_out_emit_tuple.
11159 * probe.c (info_probes_for_ops): Use ui_out_emit_tuple.
11160 * osdata.c (info_osdata): Use ui_out_emit_tuple.
11161 * mi/mi-symbol-cmds.c (mi_cmd_symbol_list_lines): Use
11162 ui_out_emit_tuple.
11163 * mi/mi-main.c (print_one_inferior, list_available_thread_groups)
11164 (output_register, mi_cmd_data_read_memory)
11165 (mi_cmd_data_read_memory_bytes, mi_load_progress)
11166 (mi_cmd_trace_frame_collected): Use ui_out_emit_tuple.
11167 * mi/mi-cmd-var.c (mi_cmd_var_list_children, varobj_update_one):
11168 Use ui_out_emit_tuple.
11169 * mi/mi-cmd-stack.c (mi_cmd_stack_list_args): Use
11170 ui_out_emit_tuple.
11171 * mi/mi-cmd-info.c (mi_cmd_info_ada_exceptions)
11172 (mi_cmd_info_gdb_mi_command): Use ui_out_emit_tuple.
11173 * linux-thread-db.c (info_auto_load_libthread_db): Use
11174 ui_out_emit_tuple.
11175 * inferior.c (print_inferior): Use ui_out_emit_tuple.
11176 * gdb_bfd.c (print_one_bfd): Use ui_out_emit_tuple.
11177 * disasm.c (do_mixed_source_and_assembly_deprecated)
11178 (do_mixed_source_and_assembly): Use ui_out_emit_tuple.
11179 * cp-abi.c (list_cp_abis): Use ui_out_emit_tuple.
11180 * cli/cli-setshow.c (cmd_show_list): Use ui_out_emit_tuple.
11181 * breakpoint.c (print_one_breakpoint_location)
11182 (print_one_breakpoint): Use ui_out_emit_tuple.
11183 * auto-load.c (print_script, info_auto_load_cmd): Use
11184 ui_out_emit_tuple.
11185 * ada-tasks.c (print_ada_task_info): Use ui_out_emit_tuple.
11186
11187 2017-04-21 Simon Marchi <simon.marchi@ericsson.com>
11188
11189 * thread.c (print_thread_info_1): Remove dead code.
11190
11191 2017-04-21 Jan Kratochvil <jan.kratochvil@redhat.com>
11192
11193 * aarch64-tdep.c (selftests::aarch64_process_record_test): Make it #if
11194 GDB_SELF_TEST.
11195 * arm-tdep.c (selftests::arm_record_test): Likewise.
11196
11197 2017-04-21 Yao Qi <yao.qi@linaro.org>
11198
11199 * regcache.c (regcache_restore): Remove argument 2. Replace
11200 argument 3 with regcache. Get register status from
11201 src->register_status and get register contents from
11202 register_buffer (src, regnum).
11203 (regcache_cpy): Update.
11204
11205 2017-04-19 Pedro Alves <palves@redhat.com>
11206
11207 * gdbthread.h (thread): Add missing closing parenthesis in
11208 comment.
11209
11210 2017-04-19 Pedro Alves <palves@redhat.com>
11211
11212 * common/refcounted-object.h: New file.
11213 * gdbthread.h: Include "common/refcounted-object.h".
11214 (thread_info): Inherit from refcounted_object and add comments.
11215 (thread_info::incref, thread_info::decref)
11216 (thread_info::m_refcount): Delete.
11217 (thread_info::deletable): Use the refcounted_object::refcount()
11218 method.
11219 * inferior.c (current_inferior_): Add comment.
11220 (set_current_inferior): Increment/decrement refcounts.
11221 (prune_inferiors, remove_inferior_command): Skip inferiors marked
11222 not-deletable instead of comparing with the current inferior.
11223 (initialize_inferiors): Increment the initial inferior's refcount.
11224 * inferior.h (struct inferior): Forward declare.
11225 Include "common/refcounted-object.h".
11226 (current_inferior, set_current_inferior): Move declaration to
11227 before struct inferior's definition, and fix comment.
11228 (inferior): Inherit from refcounted_object. Add comments.
11229 * thread.c (switch_to_thread_no_regs): Reference the thread's
11230 inferior pointer directly instead of doing a ptid lookup.
11231 (switch_to_no_thread): New function.
11232 (switch_to_thread(thread_info *)): New function, factored out
11233 from ...
11234 (switch_to_thread(ptid_t)): ... this.
11235 (restore_current_thread): Delete.
11236 (current_thread_cleanup): Remove 'inf_id' and 'was_removable'
11237 fields, and add 'inf' field.
11238 (do_restore_current_thread_cleanup): Check whether old->inf is
11239 alive instead of looking up an inferior by ptid. Use
11240 switch_to_thread and switch_to_no_thread.
11241 (restore_current_thread_cleanup_dtor): Use old->inf directly
11242 instead of lookup up an inferior by id. Decref the inferior.
11243 Don't restore 'removable'.
11244 (make_cleanup_restore_current_thread): Same the inferior pointer
11245 in old, instead of the inferior number. Incref the inferior.
11246 Don't save/clear 'removable'.
11247
11248 2017-04-19 Pedro Alves <palves@redhat.com>
11249
11250 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
11251 unittests/scoped_restore-selftests.c.
11252 (SUBDIR_UNITTESTS_OBS): Add scoped_restore-selftests.o.
11253 * common/scoped_restore.h (scoped_restore_base): Make "class".
11254 (scoped_restore_base::release): New public method.
11255 (scoped_restore_base::scoped_restore_base): New protected ctor.
11256 (scoped_restore_base::m_saved_var): New protected field.
11257 (scoped_restore_tmpl::scoped_restore_tmpl(T*)): Initialize the
11258 scoped_restore_base base class instead of m_saved_var directly.
11259 (scoped_restore_tmpl::scoped_restore_tmpl(T*, T2)): Likewise.
11260 (scoped_restore_tmpl::scoped_restore_tmpl(const
11261 scoped_restore_tmpl<T>&)): Likewise.
11262 (scoped_restore_tmpl::~scoped_restore_tmpl): Use the saved_var
11263 method.
11264 (scoped_restore_tmpl::saved_var): New method.
11265 (scoped_restore_tmpl::m_saved_var): Delete.
11266 * inferior.h (inferior::detaching): Now a bool.
11267 * infrun.c (prepare_for_detach): Use a scoped_restore instead of a
11268 cleanup.
11269 * unittests/scoped_restore-selftests.c: New file.
11270
11271 2017-04-19 Pedro Alves <palves@redhat.com>
11272
11273 * Makefile.in (SUBDIR_UNITTESTS_SRCS, SUBDIR_UNITTESTS_OBS):
11274 Re-sort in alphabetic order.
11275
11276 2017-04-18 Pedro Alves <palves@redhat.com>
11277
11278 * xml-support.c (obstack_xml_printf): Delete.
11279 * xml-support.h (obstack_xml_printf): Delete.
11280
11281 2017-04-18 Pedro Alves <palves@redhat.com>
11282
11283 * xml-support.c (gdb_xml_parser) <use_dtd, dtd_name, parse,
11284 vdebug, verror, body_text, start_element, end_element, name,
11285 user_data, set_is_xinclude, set_error, expat_parser>: New methods.
11286 <name, user_data, expat_parser, scopes, error, last_line, dtd_name,
11287 is_xinclude>: Make private and add m_ prefix.
11288 (gdb_xml_parser::body_text): New method, based on ...
11289 (gdb_xml_body_text): ... this. Adjust.
11290 (gdb_xml_parser::vdebug): New method, based on ...
11291 (gdb_xml_debug): ... this. Adjust.
11292 (gdb_xml_parser::verror): New method, based on ...
11293 (gdb_xml_error): ... this. Adjust.
11294 (gdb_xml_parser::start_element): New method, based on ...
11295 (gdb_xml_start_element): ... this. Adjust.
11296 (gdb_xml_start_element_wrapper): Defer to
11297 gdb_xml_parser::start_element and gdb_xml_parser::set_error.
11298 (gdb_xml_parser::end_element): New method, based on ...
11299 (gdb_xml_end_element_wrapper): ... this. Adjust.
11300 (gdb_xml_parser::~gdb_xml_parser): Adjust.
11301 (gdb_xml_parser::gdb_xml_parser): Adjust to field renames.
11302 (gdb_xml_parser::use_dtd): New method, based on ...
11303 (gdb_xml_use_dtd): ... this. Adjust.
11304 (gdb_xml_parser::parse): New method, based on ...
11305 (gdb_xml_parse): ... this. Adjust.
11306 (gdb_xml_parse_quick): Adjust to call the parser's parse method.
11307 (xinclude_start_include): Adjust to call the parser's name method.
11308 (xml_xinclude_default, xml_xinclude_start_doctype)
11309 (xml_xinclude_end_doctype): Adjust to call the parser's user_data
11310 method.
11311 (xml_process_xincludes): Adjust to call parser methods.
11312 * xml-support.h (gdb_xml_use_dtd, gdb_xml_parse): Delete
11313 declarations.
11314
11315 2017-04-18 Pedro Alves <palves@redhat.com>
11316
11317 * tracefile-tfile.c (tfile_write_tdesc): Adjust to use
11318 gdb::optional<std::string>.
11319 * xml-support.c: Include <string>.
11320 (scope_level::scope_level(scope_level &&))
11321 (scope_level::~scope_level): Delete.
11322 (scope_level::body): Now a std::string.
11323 (gdb_xml_body_text, gdb_xml_end_element): Adjust.
11324 (xinclude_parsing_data::xinclude_parsing_data): Add 'output'
11325 parameter.
11326 (xinclude_parsing_data::~xinclude_parsing_data): Delete.
11327 (xinclude_parsing_data::output): Now a std::string reference.
11328 (xinclude_start_include): Adjust.
11329 (xml_xinclude_default): Adjust.
11330 (xml_process_xincludes): Add 'output' parameter, and return bool.
11331 * xml-support.h (xml_process_xincludes): Add 'output' parameter,
11332 and return bool.
11333 * xml-tdesc.c: Include <unordered_map> and <string>.
11334 (tdesc_xml_cache): Delete.
11335 (tdesc_xml_cache_s): Delete.
11336 (xml_cache): Now an std::unordered_map.
11337 (tdesc_parse_xml): Adjust to use std::string and unordered_map.
11338 (target_fetch_description_xml): Change return type to
11339 gdb::optional<std::string>, and adjust.
11340 * xml-tdesc.h: Include "common/gdb_optional.h" and <string>.
11341 (target_fetch_description_xml): Change return type to
11342 gdb::optional<std::string>.
11343
11344 2017-04-18 Pedro Alves <palves@redhat.com>
11345
11346 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
11347 unittests/optional-selftests.c.
11348 (SUBDIR_UNITTESTS_OBS): Add optional-selftests.o.
11349 * unittests/optional-selftests.c: New file.
11350 * unittests/optional/assignment/1.cc: New file.
11351 * unittests/optional/assignment/2.cc: New file.
11352 * unittests/optional/assignment/3.cc: New file.
11353 * unittests/optional/assignment/4.cc: New file.
11354 * unittests/optional/assignment/5.cc: New file.
11355 * unittests/optional/assignment/6.cc: New file.
11356 * unittests/optional/assignment/7.cc: New file.
11357 * unittests/optional/cons/copy.cc: New file.
11358 * unittests/optional/cons/default.cc: New file.
11359 * unittests/optional/cons/move.cc: New file.
11360 * unittests/optional/cons/value.cc: New file.
11361 * unittests/optional/in_place.cc: New file.
11362 * unittests/optional/observers/1.cc: New file.
11363 * unittests/optional/observers/2.cc: New file.
11364
11365 2017-04-18 Pedro Alves <palves@redhat.com>
11366
11367 * common/gdb_optional.h: Include common/traits.h.
11368 (in_place_t): New type.
11369 (in_place): New constexpr variable.
11370 (optional::optional): Remove member initialization of
11371 m_instantiated.
11372 (optional::optional(in_place_t...)): New constructor.
11373 (optional::~optional): Use reset.
11374 (optional::optional(const optional&)): New.
11375 (optional::optional(const optional&&)): New.
11376 (optional::optional(T &)): New.
11377 (optional::optional(T &&)): New.
11378 (operator::operator=(const optional &)): New.
11379 (operator::operator=(optional &&)): New.
11380 (operator::operator= (const T &))
11381 (operator::operator= (T &&))
11382 (operator::emplace (Args &&... args)): Return a T&. Use reset.
11383 (operator::reset): New.
11384 (operator::m_instantiated):: Add in-class initializer.
11385 * common/traits.h: Include <type_traits>.
11386 (struct And): New types.
11387
11388 2017-04-18 Pedro Alves <palves@redhat.com>
11389
11390 * xml-support.c: Include <vector>.
11391 (scope_level::scope_level(const gdb_xml_element *))
11392 (scope_level::scope_level(scope_level&&)): New.
11393 (scope_level::~scope_level): New.
11394 (scope_level_s): Delete.
11395 (gdb_xml_parser::scopes): Now a std::vector.
11396 (gdb_xml_body_text, gdb_xml_start_element, gdb_xml_end_element):
11397 Use std::vector.
11398 (gdb_xml_parser::~gdb_xml_parser): Remove now unnecessary
11399 scope cleanup code.
11400 (gdb_xml_parser::gdb_xml_parser): Remove explicit initialization
11401 of the scopes member. Use std::vector::emplace_back.
11402
11403 2017-04-18 Pedro Alves <palves@redhat.com>
11404
11405 * xml-support.c (gdb_xml_parser): Add ctor/dtor. Make is_xinclude
11406 a bool.
11407 (gdb_xml_end_element): Change type of first parameter.
11408 (gdb_xml_cleanup): Rename to ...
11409 (gdb_xml_parser::~gdb_xml_parser): ... this.
11410 (gdb_xml_create_parser_and_cleanup): Delete with ...
11411 (gdb_xml_parser::gdb_xml_parser): ... creation parts factored out
11412 to this new ctor.
11413 (gdb_xml_parse_quick): Create a local gdb_xml_parser instead of
11414 using gdb_xml_create_parser_and_cleanup.
11415 (xinclude_parsing_data): Add ctor/dtor.
11416 (xml_xinclude_cleanup): Delete.
11417 (xml_process_xincludes): Create a local xinclude_parsing_data
11418 instead of heap-allocating one. Create a local gdb_xml_parser
11419 instead of heap-allocating one with
11420 gdb_xml_create_parser_and_cleanup.
11421
11422 2017-04-18 John Baldwin <jhb@FreeBSD.org>
11423
11424 PR threads/20743
11425 * fbsd-nat.c (resume_one_thread_cb): Remove.
11426 (resume_all_threads_cb): Remove.
11427 (fbsd_resume): Use ALL_NON_EXITED_THREADS instead of
11428 iterate_over_threads.
11429
11430 2017-04-17 Joel Brobecker <brobecker@adacore.com>
11431
11432 * NEWS: Create a new section for the next release branch.
11433 Rename the section of the current branch, now that it has
11434 been cut.
11435
11436 2017-04-17 Joel Brobecker <brobecker@adacore.com>
11437
11438 GDB 8.0 branch created (725bf5cf125783c2a7ca4ab63d3768e220bab2db):
11439 * version.in: Bump version to 8.0.50.DATE-git.
11440
11441 2017-04-13 Sergio Durigan Junior <sergiodj@redhat.com>
11442
11443 PR gdb/21385
11444 * windows-nat.c (windows_create_inferior): Declare 'allargs'
11445 independently of the host, and fix build breakage on Cygwin.
11446
11447 2017-04-13 Pedro Alves <palves@redhat.com>
11448
11449 * inferior.c (free_inferior): Convert to ...
11450 (inferior::~inferior): ... this dtor.
11451 (inferior::inferior): New ctor, factored out from ...
11452 (add_inferior_silent): ... here. Allocate the inferior with a new
11453 expression.
11454 (delete_inferior): Call delete instead of free_inferior.
11455 * inferior.h (gdb_environ, continuation): Forward declare.
11456 (inferior): Now a class. Add in-class initialization to all
11457 members. Make boolean fields bool, except 'detaching'.
11458 (inferior::inferior): New explicit ctor.
11459 (inferior::~inferior): New.
11460
11461 2017-04-13 Pedro Alves <palves@redhat.com>
11462
11463 * inferior.c (init_inferior_list): Delete.
11464 * inferior.h (init_inferior_list): Delete.
11465
11466 2017-04-13 Pedro Alves <palves@redhat.com>
11467
11468 PR threads/13217
11469 * gdb.threads/threadapply.exp (thr_apply_detach): New procedure.
11470 (top level): Call it twice, with different thread sets.
11471
11472 2017-04-13 Pedro Alves <palves@redhat.com>
11473
11474 * thread.c: Include <algorithm>.
11475 (thread_array_cleanup): Delete.
11476 (scoped_inc_dec_ref): New class.
11477 (live_threads_count): New function.
11478 (set_thread_refcount): Delete.
11479 (tp_array_compar_ascending): Now a bool.
11480 (tp_array_compar): Convert to a std::sort comparison function.
11481 (thread_apply_all_command): Use std::vector and scoped_inc_dec_ref
11482 and live_threads_count.
11483
11484 2017-04-13 Pedro Alves <palves@redhat.com>
11485
11486 * infrun.c (follow_fork_inferior): Also switch the current
11487 inferior.
11488
11489 2017-04-13 Pedro Alves <palves@redhat.com>
11490
11491 * breakpoint.c (watch_command_1): Save watchpoint-frame info
11492 before calling create_internal_breakpoint.
11493
11494 2017-04-13 Pedro Alves <palves@redhat.com>
11495
11496 * fork-child.c (execv_argv): New class.
11497 (breakup_args): Refactored as ...
11498 (execv_argv::init_for_no_shell): .. this method of execv_argv.
11499 Copy arguments to storage and replace separators with NULL
11500 terminators in place.
11501 (escape_bang_in_quoted_argument): Adjust to return bool.
11502 (execv_argv::execv_argv): New ctor.
11503 (execv_argv::init_for_shell): New method, factored out from
11504 fork_inferior. Don't strdup strings into the vector.
11505 (fork_inferior): Eliminate "shell" local and use execv_argv. Use
11506 Remove free_vector_argv call.
11507
11508 2017-04-13 Yao Qi <yao.qi@linaro.org>
11509
11510 * rx-tdep.c (rx_fpsw_type): Check tdep->rx_fpsw_type instead of
11511 tdep->rx_psw_type.
11512
11513 2017-04-13 Yao Qi <yao.qi@linaro.org>
11514
11515 * rl78-tdep.c (rl78_gdbarch_init): Use XCNEW instead of XNEW.
11516 * rx-tdep.c (rx_gdbarch_init): Likewise.
11517
11518 2017-04-13 Pedro Alves <palves@redhat.com>
11519
11520 * breakpoint.h (struct breakpoint): Reindent.
11521
11522 2017-04-13 Pedro Alves <palves@redhat.com>
11523
11524 * breakpoint.c (bp_location): Rename to ...
11525 (bp_locations): ... this. All references updated.
11526 (bp_location_count): Rename to ...
11527 (bp_locations_count): ... this. All references updated.
11528 (bp_location_placed_address_before_address_max): Rename to ...
11529 (bp_locations_placed_address_before_address_max): ... this. All
11530 references updated.
11531 (bp_location_shadow_len_after_address_max): Rename to ...
11532 (bp_locations_shadow_len_after_address_max): ... this. All
11533 references updated.
11534 (bp_location_compare_addrs): Rename to ...
11535 (bp_locations_compare_addrs): ... this. All references updated.
11536 (bp_location_compare):Rename to ...
11537 (bp_locations_compare): ... this. All references updated.
11538 (bp_location_target_extensions_update): Rename to ...
11539 (bp_locations_target_extensions_update): ... this. All references
11540 updated.
11541
11542 2017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
11543
11544 * Makefile.in (HFILES_NO_SRCDIR): Add "common/gdb_termios.h".
11545 * common/common.m4: Check headers 'termios.h', 'termio.h' and
11546 'sgtty.h'.
11547 * common/gdb_termios.h: New file, with parts of "terminal.h".
11548 * inflow.c: Include "gdb_termios.h".
11549 * ser-unix.c: Include "gdb_termios.h".
11550 * terminal.h: Move terminal-related defines to
11551 "common/gdb_termios.h".
11552
11553 2017-04-12 Tom Tromey <tom@tromey.com>
11554
11555 * probe.c (parse_probes): Update.
11556 * location.h (delete_event_location): Don't declare.
11557 (event_location_deleter::operator()): Update.
11558 * location.c (event_location_deleter::operator()): Rename from
11559 delete_event_location.
11560 * linespec.h (linespec_result) <location>: Change type to
11561 event_location_up.
11562 * linespec.c (canonicalize_linespec, event_location_to_sals)
11563 (decode_objc): Update.
11564 (linespec_result): Don't call delete_event_location.
11565 * breakpoint.c (create_breakpoints_sal)
11566 (bkpt_probe_create_sals_from_location)
11567 (strace_marker_create_sals_from_location): Update.
11568
11569 2017-04-12 Tom Tromey <tom@tromey.com>
11570
11571 * linespec.h (struct linespec_result): Add constructor and
11572 destructor.
11573 (init_linespec_result, destroy_linespec_result)
11574 (make_cleanup_destroy_linespec_result): Don't declare.
11575 * linespec.c (init_linespec_result): Remove.
11576 (linespec_result::~linespec_result): Rename from
11577 destroy_linespec_result. Update.
11578 (cleanup_linespec_result, make_cleanup_destroy_linespec_result):
11579 Remove.
11580 * breakpoint.c (create_breakpoint, break_range_command)
11581 (decode_location_default): Update.
11582 * ax-gdb.c (agent_command_1): Update.
11583
11584 2017-04-12 Tom Tromey <tom@tromey.com>
11585
11586 * remote.c (remote_download_tracepoint): Update.
11587 * python/py-breakpoint.c (bppy_get_location): Update.
11588 * guile/scm-breakpoint.c (bpscm_print_breakpoint_smob)
11589 (gdbscm_breakpoint_location): Update.
11590 * elfread.c (elf_gnu_ifunc_resolver_return_stop): Update.
11591 * breakpoint.h (struct breakpoint) <location, location_range_end>:
11592 Change type to event_location_up.
11593 * breakpoint.c (create_overlay_event_breakpoint)
11594 (create_longjmp_master_breakpoint)
11595 (create_std_terminate_master_breakpoint)
11596 (create_exception_master_breakpoint)
11597 (breakpoint_event_location_empty_p, print_breakpoint_location)
11598 (print_one_breakpoint_location, create_thread_event_breakpoint)
11599 (init_breakpoint_sal, create_breakpoint)
11600 (print_recreate_ranged_breakpoint, break_range_command)
11601 (init_ada_exception_breakpoint, say_where): Update.
11602 (base_breakpoint_dtor): Don't call delete_event_location.
11603 (bkpt_print_recreate, tracepoint_print_recreate)
11604 (dprintf_print_recreate, update_static_tracepoint)
11605 (breakpoint_re_set_default): Update.
11606
11607 2017-04-12 Tom Tromey <tom@tromey.com>
11608
11609 * compile/compile-loc2c.c (compute_stack_depth_worker): Change
11610 type of "to_do". Update.
11611 (compute_stack_depth): Use std::vector.
11612
11613 2017-04-12 Tom Tromey <tom@tromey.com>
11614
11615 * printcmd.c (find_instruction_backward): Use std::vector.
11616
11617 2017-04-12 Tom Tromey <tom@tromey.com>
11618
11619 * symfile.c (objfilep): Remove typedef.
11620 (reread_symbols): Use a std::vector.
11621
11622 2017-04-12 Tom Tromey <tom@tromey.com>
11623
11624 * mi/mi-main.c (exec_direction_forward): Remove.
11625 (exec_reverse_continue, mi_execute_command): Use scoped_restore.
11626 * guile/scm-ports.c (ioscm_with_output_to_port_worker): Use
11627 scoped_restore.
11628 * guile/guile.c (guile_repl_command, guile_command)
11629 (gdbscm_execute_gdb_command): Use scoped_restore.
11630 * go-exp.y (go_parse): Use scoped_restore.
11631 * d-exp.y (d_parse): Use scoped_restore.
11632 * cli/cli-decode.c (cmd_func): Use scoped_restore.
11633 * c-exp.y (c_parse): Use scoped_restore.
11634
11635 2017-04-12 Tom Tromey <tom@tromey.com>
11636
11637 * mi/mi-parse.h (struct mi_parse): Add constructor, destructor.
11638 (mi_parse): Update return type.
11639 (mi_parse_free): Remove.
11640 * mi/mi-parse.c (mi_parse::mi_parse): New constructor.
11641 (mi_parse::~mi_parse): Rename from mi_parse_free.
11642 (mi_parse_cleanup): Remove.
11643 (mi_parse): Return a unique_ptr. Use new.
11644 * mi/mi-main.c (mi_execute_command): Update.
11645
11646 2017-04-12 Tom Tromey <tom@tromey.com>
11647
11648 * location.c (explicit_location_lex_one): Return a
11649 unique_xmalloc_ptr.
11650 (string_to_explicit_location): Update. Remove cleanups.
11651
11652 2017-04-12 Tom Tromey <tom@tromey.com>
11653
11654 * gnu-v3-abi.c (value_and_voffset_p): Remove typedef.
11655 (compare_value_and_voffset): Change type. Update.
11656 (compute_vtable_size): Change type of "offset_vec".
11657 (gnuv3_print_vtable): Use std::vector. Remove cleanups.
11658 (gnuv3_get_typeid): Remove extraneous declaration.
11659
11660 2017-04-12 Tom Tromey <tom@tromey.com>
11661
11662 * charset.h (wchar_iterator): Fix comment.
11663
11664 2017-04-12 Tom Tromey <tom@tromey.com>
11665
11666 * charset.c (iconv_wrapper): New class.
11667 (cleanup_iconv): Remove.
11668 (convert_between_encodings): Use it.
11669
11670 2017-04-12 Tom Tromey <tom@tromey.com>
11671
11672 * symfile.h (increment_reading_symtab): Update type.
11673 * symfile.c (decrement_reading_symtab): Remove.
11674 (increment_reading_symtab): Return a scoped_restore_tmpl<int>.
11675 * psymtab.c (psymtab_to_symtab): Update.
11676 * dwarf2read.c (dw2_instantiate_symtab): Update.
11677
11678 2017-04-12 Tom Tromey <tom@tromey.com>
11679
11680 * jit.c (struct jit_reader): Declare separately. Add constructor
11681 and destructor. Change type of "handle".
11682 (loaded_jit_reader): Define separately.
11683 (jit_reader_load): Update. New "new".
11684 (jit_reader_unload_command): Use "delete".
11685 * gdb-dlfcn.h (struct dlclose_deleter): New.
11686 (gdb_dlhandle_up): New typedef.
11687 (gdb_dlopen, gdb_dlsym): Update types.
11688 (gdb_dlclose): Remove.
11689 * gdb-dlfcn.c (gdb_dlopen): Return a gdb_dlhandle_up.
11690 (gdb_dlsym): Change type of "handle".
11691 (make_cleanup_dlclose): Remove.
11692 (dlclose_deleter::operator()): Rename from gdb_dlclose.
11693 * compile/compile-c-support.c (load_libcc): Update.
11694
11695 2017-04-12 Tom Tromey <tom@tromey.com>
11696
11697 * symtab.h (find_pcs_for_symtab_line): Change return type.
11698 * symtab.c (find_pcs_for_symtab_line): Change return type.
11699 * python/py-linetable.c (build_line_table_tuple_from_pcs): Change
11700 type of "vec". Update.
11701 (ltpy_get_pcs_for_line): Update.
11702 * linespec.c (decode_digits_ordinary): Update.
11703
11704 2017-04-12 Tom Tromey <tom@tromey.com>
11705
11706 * tracepoint.c (actions_command): Update.
11707 * python/python.c (python_command, python_interactive_command):
11708 Update.
11709 * mi/mi-cmd-break.c (mi_cmd_break_commands): Update.
11710 * guile/guile.c (guile_command): Update.
11711 * defs.h (read_command_lines, read_command_lines_1): Return
11712 command_line_up.
11713 (command_lines_deleter): New struct.
11714 (command_line_up): New typedef.
11715 * compile/compile.c (compile_code_command)
11716 (compile_print_command): Update.
11717 * cli/cli-script.h (get_command_line, copy_command_lines): Return
11718 command_line_up.
11719 (make_cleanup_free_command_lines): Remove.
11720 * cli/cli-script.c (get_command_line, read_command_lines_1)
11721 (copy_command_lines): Return command_line_up.
11722 (while_command, if_command, read_command_lines, define_command)
11723 (document_command): Update.
11724 (do_free_command_lines_cleanup, make_cleanup_free_command_lines):
11725 Remove.
11726 * breakpoint.h (breakpoint_set_commands): Change type of
11727 "commands".
11728 * breakpoint.c (breakpoint_set_commands): Change type of
11729 "commands". Update.
11730 (do_map_commands_command, update_dprintf_command_list)
11731 (create_tracepoint_from_upload): Update.
11732
11733 2017-04-12 Tom Tromey <tom@tromey.com>
11734
11735 * tracepoint.c (scope_info): Update.
11736 * spu-tdep.c (spu_catch_start): Update.
11737 * python/python.c (gdbpy_decode_line): Update.
11738 * python/py-finishbreakpoint.c (bpfinishpy_init): Update.
11739 * python/py-breakpoint.c (bppy_init): Update.
11740 * probe.c (parse_probes): Update.
11741 * mi/mi-cmd-break.c (mi_cmd_break_insert_1): Update.
11742 * location.h (event_location_deleter): New struct.
11743 (event_location_up): New typedef.
11744 (new_linespec_location, new_address_location, new_probe_location)
11745 (new_explicit_location, copy_event_location)
11746 (string_to_event_location, string_to_event_location_basic)
11747 (string_to_explicit_location): Update return type.
11748 (make_cleanup_delete_event_location): Remove.
11749 * location.c (new_linespec_location, new_address_location)
11750 (new_probe_location, new_explicit_location, copy_event_location):
11751 Return event_location_up.
11752 (delete_event_location_cleanup)
11753 (make_cleanup_delete_event_location): Remove.
11754 (string_to_explicit_location, string_to_event_location_basic)
11755 (string_to_event_location): Return event_location_up.
11756 * linespec.c (canonicalize_linespec, event_location_to_sals)
11757 (decode_line_with_current_source)
11758 (decode_line_with_last_displayed, decode_objc): Update.
11759 * guile/scm-breakpoint.c (gdbscm_register_breakpoint_x): Update.
11760 * completer.c (location_completer): Update.
11761 * cli/cli-cmds.c (edit_command, list_command): Update.
11762 * breakpoint.c (create_overlay_event_breakpoint)
11763 (create_longjmp_master_breakpoint)
11764 (create_std_terminate_master_breakpoint)
11765 (create_exception_master_breakpoint)
11766 (create_thread_event_breakpoint): Update.
11767 (init_breakpoint_sal): Update. Remove some dead code.
11768 (create_breakpoint_sal): Change type of "location". Update.
11769 (create_breakpoints_sal, create_breakpoint, break_command_1)
11770 (dprintf_command, break_range_command, until_break_command)
11771 (init_ada_exception_breakpoint)
11772 (strace_marker_create_sals_from_location)
11773 (update_static_tracepoint, trace_command, ftrace_command)
11774 (strace_command, create_tracepoint_from_upload): Update.
11775 * break-catch-throw.c (re_set_exception_catchpoint): Update.
11776 * ax-gdb.c (agent_command_1): Update.
11777
11778 2017-04-12 Pedro Alves <palves@redhat.com>
11779
11780 * Makefile.in (ALL_TARGET_OBS): Add i386-go32-tdep.o.
11781 * configure.tgt: Handle i[34567]86-*-go32* and
11782 i[34567]86-*-msdosdjgpp*.
11783 * i386-tdep.c (i386_svr4_reg_to_regnum):
11784 Make extern.
11785 (i386_go32_init_abi, i386_coff_osabi_sniffer): Moved to
11786 i386-go32-tdep.c.
11787 (_initialize_i386_tdep): DJGPP bits moved to i386-go32-tdep.c.
11788 * i386-go32-tdep.c: New file.
11789 * i386-tdep.h (tdesc_i386_mmx, i386_svr4_reg_to_regnum): New
11790 declarations.
11791
11792 2017-04-12 Simon Marchi <simon.marchi@ericsson.com>
11793
11794 * aix-thread.c (pd_status2str): Change return type to const char *.
11795
11796 2017-04-12 Pedro Alves <palves@redhat.com>
11797
11798 * i386-tdep.c (i386_elf_init_abi, i386_go32_init_abi): Remove
11799 calls to set_gdbarch_gnu_triplet_regexp.
11800
11801 2017-04-12 Pedro Alves <palves@redhat.com>
11802
11803 PR gdb/21323
11804 * c-lang.c (cplus_primitive_types) <cplus_primitive_type_wchar_t>:
11805 New enum value.
11806 (cplus_language_arch_info): Register cplus_primitive_type_wchar_t.
11807 * gdbtypes.h (struct builtin_type) <builtin_wchar>: New field.
11808 * gdbtypes.c (gdbtypes_post_init): Create the "wchar_t" type.
11809 * gdbarch.sh (wchar_bit, wchar_signed): New per-arch values.
11810 * gdbarch.h, gdbarch.c: Regenerate.
11811 * aarch64-tdep.c (aarch64_gdbarch_init): Override
11812 gdbarch_wchar_bit and gdbarch_wchar_signed.
11813 * alpha-tdep.c (alpha_gdbarch_init): Likewise.
11814 * arm-tdep.c (arm_gdbarch_init): Likewise.
11815 * avr-tdep.c (avr_gdbarch_init): Likewise.
11816 * h8300-tdep.c (h8300_gdbarch_init): Likewise.
11817 * i386-nto-tdep.c (i386nto_init_abi): Likewise.
11818 * i386-tdep.c (i386_go32_init_abi): Likewise.
11819 * m32r-tdep.c (m32r_gdbarch_init): Likewise.
11820 * moxie-tdep.c (moxie_gdbarch_init): Likewise.
11821 * nds32-tdep.c (nds32_gdbarch_init): Likewise.
11822 * rs6000-aix-tdep.c (rs6000_aix_init_osabi): Likewise.
11823 * sh-tdep.c (sh_gdbarch_init): Likewise.
11824 * sparc-tdep.c (sparc32_gdbarch_init): Likewise.
11825 * sparc64-tdep.c (sparc64_init_abi): Likewise.
11826 * windows-tdep.c (windows_init_abi): Likewise.
11827 * xstormy16-tdep.c (xstormy16_gdbarch_init): Likewise.
11828
11829 2017-04-12 Pedro Alves <palves@redhat.com>
11830
11831 PR c++/21323
11832 * c-lang.c (cplus_primitive_types) <cplus_primitive_type_char16_t,
11833 cplus_primitive_type_char32_t>: New enum values.
11834 (cplus_language_arch_info): Register cplus_primitive_type_char16_t
11835 and cplus_primitive_type_char32_t.
11836 * dwarf2read.c (read_base_type) <DW_ATE_UTF>: If bit size is 16 or
11837 32, use the archtecture's built-in type for char16_t and char32_t,
11838 respectively. Otherwise, fallback to init_integer_type as before,
11839 but make the type unsigned, and issue a complaint.
11840 * gdbtypes.c (gdbtypes_post_init): Make char16_t and char32_t unsigned.
11841
11842 2017-04-12 Alan Hayward <alan.hayward@arm.com>
11843
11844 * m32r-tdep.c (M32R_ARG_REGISTER_SIZE): Added.
11845 (m32r_push_dummy_call): Use M32R_ARG_REGISTER_SIZE.
11846
11847 2017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
11848
11849 * windows-nat.c (windows_create_inferior): Declare 'toexec' as
11850 'const char *'.
11851
11852 2017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
11853
11854 * common/common-utils.c (free_vector_argv): New function.
11855 * common/common-utils.h: Include <vector>.
11856 (free_vector_argv): New prototype.
11857 * darwin-nat.c (darwin_create_inferior): Rewrite function
11858 prototype in order to constify "exec_file" and accept a
11859 "std::string" for "allargs".
11860 * fork-child.c: Include <vector>.
11861 (breakup_args): Rewrite function, using C++.
11862 (fork_inferior): Rewrite function header, constify "exec_file_arg"
11863 and accept "std::string" for "allargs". Update the code to
11864 calculate "argv" based on "allargs". Update calls to "exec_fun"
11865 and "execvp".
11866 * gnu-nat.c (gnu_create_inferior): Rewrite function prototype in
11867 order to constify "exec_file" and accept a "std::string" for
11868 "allargs".
11869 * go32-nat.c (go32_create_inferior): Likewise.
11870 * inf-ptrace.c (inf_ptrace_create_inferior): Likewise.
11871 * infcmd.c (run_command_1): Constify "exec_file". Use
11872 "std::string" for inferior arguments.
11873 * inferior.h (fork_inferior): Update prototype.
11874 * linux-nat.c (linux_nat_create_inferior): Rewrite function
11875 prototype in order to constify "exec_file" and accept a
11876 "std::string" for "allargs".
11877 * nto-procfs.c (procfs_create_inferior): Likewise.
11878 * procfs.c (procfs_create_inferior): Likewise.
11879 * remote-sim.c (gdbsim_create_inferior): Likewise.
11880 * remote.c (extended_remote_run): Update code to accept
11881 "std::string" as argument.
11882 (extended_remote_create_inferior): Rewrite function prototype in
11883 order to constify "exec_file" and accept a "std::string" for
11884 "allargs".
11885 * rs6000-nat.c (super_create_inferior): Likewise.
11886 (rs6000_create_inferior): Likewise.
11887 * target.h (struct target_ops) <to_create_inferior>: Likewise.
11888 * windows-nat.c (windows_create_inferior): Likewise.
11889
11890 2017-04-11 Pedro Alves <palves@redhat.com>
11891
11892 * thread.c: Fix whitespace throughout.
11893
11894 2017-04-11 Philipp Rudo <prudo@linux.vnet.ibm.com>
11895
11896 * linux-nat.c (linux_nat_detach): Remove delete_lwp call.
11897
11898 2017-04-11 Alan Hayward <alan.hayward@arm.com>
11899
11900 * arm-tdep.c (arm_store_return_value): Use FP_REGISTER_SIZE
11901
11902 2017-04-10 Sergio Durigan Junior <sergiodj@redhat.com>
11903
11904 PR gdb/21364
11905 * osdata.c (info_osdata): Check if 'type' is an empty string
11906 instead of NULL.
11907
11908 2017-04-10 Pedro Alves <palves@redhat.com>
11909
11910 * thread.c (add_thread_silent, delete_thread_1, find_thread_ptid)
11911 (ptid_to_global_thread_id, in_thread_list)
11912 (do_captured_list_thread_ids, set_resumed, set_running)
11913 (set_executing, set_stop_requested, finish_thread_state)
11914 (validate_registers_access, can_access_registers_ptid)
11915 (print_thread_info_1, switch_to_thread)
11916 (do_restore_current_thread_cleanup)
11917 (make_cleanup_restore_current_thread, thread_command)
11918 (thread_name_command): Use operator== instead of ptid_equal.
11919
11920 2017-04-10 Pedro Alves <palves@redhat.com>
11921
11922 * thread.c (struct current_thread_cleanup) <next>: Delete field.
11923 (current_thread_cleanup_chain): Delete.
11924 (restore_current_thread_cleanup_dtor)
11925 (make_cleanup_restore_current_thread): Remove references to
11926 current_thread_cleanup_chain.
11927
11928 2017-04-10 Alan Hayward <alan.hayward@arm.com>
11929
11930 * msp430-tdep.c (msp430_pseudo_register_read): Never return
11931 REG_UNKNOWN.
11932
11933 2017-04-10 Yao Qi <yao.qi@linaro.org>
11934
11935 PR gdb/19942
11936 * gdbthread.h (thread_info::deletable): New method.
11937 (thread_info::incref): New method.
11938 (thread_info::decref): New method.
11939 (thread_info::refcount): Move it to private.
11940 * infrun.c (save_stop_context): Call inc_refcount.
11941 (release_stop_context_cleanup): Likewise.
11942 * thread.c (set_thread_exited): New function.
11943 (init_thread_list): Delete "tp" only it is deletable, otherwise
11944 call set_thread_exited.
11945 (delete_thread_1): Call set_thread_exited.
11946 (current_thread_cleanup) <inferior_pid>: Remove.
11947 <thread>: New field.
11948 (restore_current_thread_ptid_changed): Removed.
11949 (do_restore_current_thread_cleanup): Adjust.
11950 (restore_current_thread_cleanup_dtor): Don't call
11951 find_thread_ptid.
11952 (set_thread_refcount): Use dec_refcount.
11953 (make_cleanup_restore_current_thread): Adjust.
11954 (thread_apply_all_command): Call inc_refcount.
11955 (_initialize_thread): Don't call
11956 observer_attach_thread_ptid_changed.
11957
11958 2017-04-10 Yao Qi <yao.qi@linaro.org>
11959
11960 * thread.c (delete_thread_1): Hoist code on marking thread as
11961 exited.
11962
11963 2017-04-09 Simon Marchi <simon.marchi@polymtl.ca>
11964
11965 * windows-nat.c (windows_detach): Initialize ptid with
11966 minus_one_ptid.
11967
11968 2017-04-07 Simon Marchi <simon.marchi@ericsson.com>
11969
11970 * unittests/ptid-selftests.c: Fix erroneous assert messages.
11971
11972 2017-04-07 Alan Hayward <alan.hayward@arm.com>
11973
11974 * bfin-tdep.c (BFIN_MAX_REGISTER_SIZE): Add.
11975 (bfin_pseudo_register_read): Use BFIN_MAX_REGISTER_SIZE.
11976 (bfin_pseudo_register_write): Likewise
11977
11978 2017-04-06 Simon Marchi <simon.marchi@ericsson.com>
11979
11980 * common/ptid.h (struct ptid): Change to...
11981 (class ptid_t): ... this.
11982 <ptid_t>: New constructors.
11983 <pid, lwp_p, lwp, tid_p, tid, is_pid, operator==, operator!=,
11984 matches>: New methods.
11985 <make_null, make_minus_one>: New static methods.
11986 <pid>: Rename to...
11987 <m_pid>: ...this.
11988 <lwp>: Rename to...
11989 <m_lwp>: ...this.
11990 <tid>: Rename to...
11991 <m_tid>: ...this.
11992 (ptid_build, ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal,
11993 ptid_is_pid, ptid_lwp_p, ptid_tid_p, ptid_match): Take ptid arguments
11994 as references, move comment to class ptid_t.
11995 * common/ptid.c (null_ptid, minus_one_ptid): Initialize with
11996 ptid_t static methods.
11997 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_tid,
11998 ptid_equal, ptid_is_pid, ptid_lwp_p, ptid_tid_p, ptid_match):
11999 Take ptid arguments as references, implement using ptid_t methods.
12000 * unittests/ptid-selftests.c: New file.
12001 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
12002 unittests/ptid-selftests.c.
12003 (SUBDIR_UNITTESTS_OBS): Add unittests/ptid-selftests.o.
12004
12005 2017-04-06 Thomas Preud'homme <thomas.preudhomme@arm.com>
12006
12007 * python/python.c (python_run_simple_file): Cast mode literal to
12008 non-const char pointer as expected by PyFile_FromString.
12009
12010 2017-04-05 Simon Marchi <simon.marchi@ericsson.com>
12011
12012 * common/ptid.c (ptid_lwp_p, ptid_tid_p): Remove comparison with
12013 minus_one_ptid and null_ptid.
12014
12015 2017-04-05 Pedro Alves <palves@redhat.com>
12016
12017 * warning.m4 (build_warnings): Remove -Wno-write-strings.
12018 * configure: Regenerate.
12019
12020 2017-04-05 Pedro Alves <palves@redhat.com>
12021
12022 * ada-exp.y (yyerror): Constify.
12023 * ada-lang.c (bound_name, get_selections)
12024 (ada_variant_discrim_type)
12025 (ada_variant_discrim_name, ada_value_struct_elt)
12026 (ada_lookup_struct_elt_type, is_unchecked_variant)
12027 (ada_which_variant_applies, standard_exc, ada_get_next_arg)
12028 (catch_ada_exception_command_split)
12029 (catch_ada_assert_command_split, catch_assert_command)
12030 (ada_op_name): Constify.
12031 * ada-lang.h (ada_yyerror, get_selections)
12032 (ada_variant_discrim_name, ada_value_struct_elt): Constify.
12033 * arc-tdep.c (arc_print_frame_cache): Constify.
12034 * arm-tdep.c (arm_skip_stub): Constify.
12035 * ax-gdb.c (gen_binop, gen_struct_ref_recursive, gen_struct_ref)
12036 (gen_aggregate_elt_ref): Constify.
12037 * bcache.c (print_bcache_statistics): Constify.
12038 * bcache.h (print_bcache_statistics): Constify.
12039 * break-catch-throw.c (catch_exception_command_1):
12040 * breakpoint.c (struct ep_type_description::description):
12041 Constify.
12042 (add_solib_catchpoint): Constify.
12043 (catch_fork_command_1): Add cast.
12044 (add_catch_command): Constify.
12045 * breakpoint.h (add_catch_command, add_solib_catchpoint):
12046 Constify.
12047 * bsd-uthread.c (bsd_uthread_state): Constify.
12048 * buildsym.c (patch_subfile_names): Constify.
12049 * buildsym.h (next_symbol_text_func, patch_subfile_names):
12050 Constify.
12051 * c-exp.y (yyerror): Constify.
12052 (token::oper): Constify.
12053 * c-lang.h (c_yyerror, cp_print_class_member): Constify.
12054 * c-varobj.c (cplus_describe_child): Constify.
12055 * charset.c (find_charset_names): Add cast.
12056 (find_charset_names): Constify array and add const_cast.
12057 * cli/cli-cmds.c (complete_command, cd_command): Constify.
12058 (edit_command): Constify.
12059 * cli/cli-decode.c (lookup_cmd): Constify.
12060 * cli/cli-dump.c (dump_memory_command, dump_value_command):
12061 Constify.
12062 (struct dump_context): Constify.
12063 (add_dump_command, restore_command): Constify.
12064 * cli/cli-script.c (get_command_line): Constify.
12065 * cli/cli-script.h (get_command_line): Constify.
12066 * cli/cli-utils.c (check_for_argument): Constify.
12067 * cli/cli-utils.h (check_for_argument): Constify.
12068 * coff-pe-read.c (struct read_pe_section_data): Constify.
12069 * command.h (lookup_cmd): Constify.
12070 * common/print-utils.c (decimal2str): Constify.
12071 * completer.c (gdb_print_filename): Constify.
12072 * corefile.c (set_gnutarget): Constify.
12073 * cp-name-parser.y (yyerror): Constify.
12074 * cp-valprint.c (cp_print_class_member): Constify.
12075 * cris-tdep.c (cris_register_name, crisv32_register_name):
12076 Constify.
12077 * d-exp.y (yyerror): Constify.
12078 (struct token::oper): Constify.
12079 * d-lang.h (d_yyerror): Constify.
12080 * dbxread.c (struct header_file_location::name): Constify.
12081 (add_old_header_file, add_new_header_file, last_function_name)
12082 (dbx_next_symbol_text, add_bincl_to_list)
12083 (find_corresponding_bincl_psymtab, set_namestring)
12084 (find_stab_function_addr, read_dbx_symtab, start_psymtab)
12085 (dbx_end_psymtab, read_ofile_symtab, process_one_symbol):
12086 * defs.h (command_line_input, print_address_symbolic)
12087 (deprecated_readline_begin_hook): Constify.
12088 * dwarf2read.c (anonymous_struct_prefix, dwarf_bool_name):
12089 Constify.
12090 * event-top.c (handle_line_of_input): Constify and add cast.
12091 * exceptions.c (catch_errors): Constify.
12092 * exceptions.h (catch_errors): Constify.
12093 * expprint.c (print_subexp_standard, op_string, op_name)
12094 (op_name_standard, dump_raw_expression, dump_raw_expression):
12095 * expression.h (op_name, op_string, dump_raw_expression):
12096 Constify.
12097 * f-exp.y (yyerror): Constify.
12098 (struct token::oper): Constify.
12099 (struct f77_boolean_val::name): Constify.
12100 * f-lang.c (f_word_break_characters): Constify.
12101 * f-lang.h (f_yyerror): Constify.
12102 * fork-child.c (fork_inferior): Add cast.
12103 * frv-tdep.c (struct gdbarch_tdep::register_names): Constify.
12104 (new_variant): Constify.
12105 * gdbarch.sh (pstring_ptr, pstring_list): Constify.
12106 * gdbarch.c: Regenerate.
12107 * gdbcore.h (set_gnutarget): Constify.
12108 * go-exp.y (yyerror): Constify.
12109 (token::oper): Constify.
12110 * go-lang.h (go_yyerror): Constify.
12111 * go32-nat.c (go32_sysinfo): Constify.
12112 * guile/scm-breakpoint.c (gdbscm_breakpoint_expression): Constify.
12113 * guile/scm-cmd.c (cmdscm_function): Constify.
12114 * guile/scm-param.c (pascm_param_value): Constify.
12115 * h8300-tdep.c (h8300_register_name, h8300s_register_name)
12116 (h8300sx_register_name): Constify.
12117 * hppa-tdep.c (hppa32_register_name, hppa64_register_name):
12118 Constify.
12119 * ia64-tdep.c (ia64_register_names): Constify.
12120 * infcmd.c (construct_inferior_arguments): Constify.
12121 (path_command, attach_post_wait): Constify.
12122 * language.c (show_range_command, show_case_command)
12123 (unk_lang_error): Constify.
12124 * language.h (language_defn::la_error)
12125 (language_defn::la_name_of_this): Constify.
12126 * linespec.c (decode_line_2): Constify.
12127 * linux-thread-db.c (thread_db_err_str): Constify.
12128 * lm32-tdep.c (lm32_register_name): Constify.
12129 * m2-exp.y (yyerror): Constify.
12130 * m2-lang.h (m2_yyerror): Constify.
12131 * m32r-tdep.c (m32r_register_names): Constify and make static.
12132 * m68hc11-tdep.c (m68hc11_register_names): Constify.
12133 * m88k-tdep.c (m88k_register_name): Constify.
12134 * macroexp.c (appendmem): Constify.
12135 * mdebugread.c (fdr_name, add_data_symbol, parse_type)
12136 (upgrade_type, parse_external, parse_partial_symbols)
12137 (mdebug_next_symbol_text, cross_ref, mylookup_symbol, new_psymtab)
12138 (new_symbol): Constify.
12139 * memattr.c (mem_info_command): Constify.
12140 * mep-tdep.c (register_name_from_keyword): Constify.
12141 * mi/mi-cmd-env.c (mi_cmd_env_path, _initialize_mi_cmd_env):
12142 Constify.
12143 * mi/mi-cmd-stack.c (list_args_or_locals): Constify.
12144 * mi/mi-cmd-var.c (mi_cmd_var_show_attributes): Constify.
12145 * mi/mi-main.c (captured_mi_execute_command): Constify and add
12146 cast.
12147 (mi_execute_async_cli_command): Constify.
12148 * mips-tdep.c (mips_register_name): Constify.
12149 * mn10300-tdep.c (register_name, mn10300_generic_register_name)
12150 (am33_register_name, am33_2_register_name)
12151 * moxie-tdep.c (moxie_register_names): Constify.
12152 * nat/linux-osdata.c (osdata_type): Constify fields.
12153 * nto-tdep.c (nto_parse_redirection): Constify.
12154 * objc-lang.c (lookup_struct_typedef, lookup_objc_class)
12155 (lookup_child_selector): Constify.
12156 (objc_methcall::name): Constify.
12157 * objc-lang.h (lookup_objc_class, lookup_child_selector)
12158 (lookup_struct_typedef): Constify.
12159 * objfiles.c (pc_in_section): Constify.
12160 * objfiles.h (pc_in_section): Constify.
12161 * p-exp.y (struct token::oper): Constify.
12162 (yyerror): Constify.
12163 * p-lang.h (pascal_yyerror): Constify.
12164 * parser-defs.h (op_name_standard): Constify.
12165 (op_print::string): Constify.
12166 (exp_descriptor::op_name): Constify.
12167 * printcmd.c (print_address_symbolic): Constify.
12168 * psymtab.c (print_partial_symbols): Constify.
12169 * python/py-breakpoint.c (stop_func): Constify.
12170 (bppy_get_expression): Constify.
12171 * python/py-cmd.c (cmdpy_completer::name): Constify.
12172 (cmdpy_function): Constify.
12173 * python/py-event.c (evpy_add_attribute)
12174 (gdbpy_initialize_event_generic): Constify.
12175 * python/py-event.h (evpy_add_attribute)
12176 (gdbpy_initialize_event_generic): Constify.
12177 * python/py-evts.c (add_new_registry): Constify.
12178 * python/py-finishbreakpoint.c (outofscope_func): Constify.
12179 * python/py-framefilter.c (get_py_iter_from_func): Constify.
12180 * python/py-inferior.c (get_buffer): Add cast.
12181 * python/py-param.c (parm_constant::name): Constify.
12182 * python/py-unwind.c (fprint_frame_id): Constify.
12183 * python/python.c (gdbpy_parameter_value): Constify.
12184 * remote-fileio.c (remote_fio_func_map): Make 'name' const.
12185 * remote.c (memory_packet_config::name): Constify.
12186 (show_packet_config_cmd, remote_write_bytes)
12187 (remote_buffer_add_string):
12188 * reverse.c (exec_reverse_once): Constify.
12189 * rs6000-tdep.c (variant::name, variant::description): Constify.
12190 * rust-exp.y (rustyyerror): Constify.
12191 * rust-lang.c (rust_op_name): Constify.
12192 * rust-lang.h (rustyyerror): Constify.
12193 * serial.h (serial_ops::name): Constify.
12194 * sh-tdep.c (sh_sh_register_name, sh_sh3_register_name)
12195 (sh_sh3e_register_name, sh_sh2e_register_name)
12196 (sh_sh2a_register_name, sh_sh2a_nofpu_register_name)
12197 (sh_sh_dsp_register_name, sh_sh3_dsp_register_name)
12198 (sh_sh4_register_name, sh_sh4_nofpu_register_name)
12199 (sh_sh4al_dsp_register_name): Constify.
12200 * sh64-tdep.c (sh64_register_name): Constify.
12201 * solib-darwin.c (lookup_symbol_from_bfd): Constify.
12202 * spu-tdep.c (spu_register_name, info_spu_dma_cmdlist): Constify.
12203 * stabsread.c (patch_block_stabs, read_type_number)
12204 (ref_map::stabs, ref_add, process_reference)
12205 (symbol_reference_defined, define_symbol, define_symbol)
12206 (error_type, read_type, read_member_functions, read_cpp_abbrev)
12207 (read_one_struct_field, read_struct_fields, read_baseclasses)
12208 (read_tilde_fields, read_struct_type, read_array_type)
12209 (read_enum_type, read_sun_builtin_type, read_sun_floating_type)
12210 (read_huge_number, read_range_type, read_args, common_block_start)
12211 (find_name_end): Constify.
12212 * stabsread.h (common_block_start, define_symbol)
12213 (process_one_symbol, symbol_reference_defined, ref_add):
12214 * symfile.c (get_section_index, add_symbol_file_command):
12215 * symfile.h (get_section_index): Constify.
12216 * target-descriptions.c (tdesc_type::name): Constify.
12217 (tdesc_free_type): Add cast.
12218 * target.c (find_default_run_target):
12219 (add_deprecated_target_alias, find_default_run_target)
12220 (target_announce_detach): Constify.
12221 (do_option): Constify.
12222 * target.h (add_deprecated_target_alias): Constify.
12223 * thread.c (print_thread_info_1): Constify.
12224 * top.c (deprecated_readline_begin_hook, command_line_input):
12225 Constify.
12226 (init_main): Add casts.
12227 * top.h (handle_line_of_input): Constify.
12228 * tracefile-tfile.c (tfile_write_uploaded_tsv): Constify.
12229 * tracepoint.c (tvariables_info_1, trace_status_mi): Constify.
12230 (tfind_command): Rename to ...
12231 (tfind_command_1): ... this and constify.
12232 (tfind_command): New function.
12233 (tfind_end_command, tfind_start_command): Adjust.
12234 (encode_source_string): Constify.
12235 * tracepoint.h (encode_source_string): Constify.
12236 * tui/tui-data.c (tui_partial_win_by_name): Constify.
12237 * tui/tui-data.h (tui_partial_win_by_name): Constify.
12238 * tui/tui-source.c (tui_set_source_content_nil): Constify.
12239 * tui/tui-source.h (tui_set_source_content_nil): Constify.
12240 * tui/tui-win.c (parse_scrolling_args): Constify.
12241 * tui/tui-windata.c (tui_erase_data_content): Constify.
12242 * tui/tui-windata.h (tui_erase_data_content): Constify.
12243 * tui/tui-winsource.c (tui_erase_source_content): Constify.
12244 * tui/tui.c (tui_enable): Add cast.
12245 * utils.c (defaulted_query): Constify.
12246 (init_page_info): Add cast.
12247 (puts_debug, subset_compare): Constify.
12248 * utils.h (subset_compare): Constify.
12249 * varobj.c (varobj_format_string): Constify.
12250 * varobj.h (varobj_format_string): Constify.
12251 * vax-tdep.c (vax_register_name): Constify.
12252 * windows-nat.c (windows_detach): Constify.
12253 * xcoffread.c (process_linenos, xcoff_next_symbol_text): Constify.
12254 * xml-support.c (gdb_xml_end_element): Constify.
12255 * xml-tdesc.c (tdesc_start_reg): Constify.
12256 * xstormy16-tdep.c (xstormy16_register_name): Constify.
12257 * xtensa-tdep.c (xtensa_find_register_by_name): Constify.
12258 * xtensa-tdep.h (xtensa_register_t::name): Constify.
12259
12260 2017-04-05 Pedro Alves <palves@redhat.com>
12261
12262 * proc-api.c (struct trans): Constify.
12263 (procfs_note): Constify.
12264 * proc-events.c (struct trans, syscall_table):
12265 * proc-flags.c (struct trans): Constify.
12266 * proc-utils.h (procfs_note): Constify.
12267 * proc-why.c (struct trans): Constify.
12268 * procfs.c (dead_procinfo, find_syscall, proc_warn, proc_error)
12269 (procfs_detach): Constify.
12270 * sol-thread.c (struct string_map): Constify.
12271 (td_err_string, td_state_string): Constify.
12272
12273 2017-04-05 Pedro Alves <palves@redhat.com>
12274
12275 * proc-api.c (procfs_filename): Don't initialize
12276 procfs_filename.
12277 (prepare_to_trace): Assume procfs_filename is non-NULL.
12278 (_initialize_proc_api): Give procfs_filename a default value here.
12279
12280 2017-04-05 Pedro Alves <palves@redhat.com>
12281
12282 * break-catch-throw.c (handle_gnu_v3_exceptions): Constify
12283 'cond_string' parameter.
12284 (extract_exception_regexp): Constify 'string' parameter.
12285 (catch_exception_command_1): Constify.
12286 * breakpoint.c (init_catchpoint)
12287 (create_fork_vfork_event_catchpoint): Constify 'cond_string'
12288 parameter.
12289 (ep_parse_optional_if_clause, catch_fork_command_1)
12290 (catch_exec_command_1): Constify.
12291 * breakpoint.h (init_catchpoint): Constify 'cond_string'
12292 parameter.
12293 (ep_parse_optional_if_clause): Constify.
12294 * cli/cli-utils.c (remove_trailing_whitespace)
12295 (check_for_argument): Constify.
12296 * cli/cli-utils.h (remove_trailing_whitespace): Constify and add
12297 non-const overload.
12298 (check_for_argument): Likewise.
12299
12300 2017-04-05 Pedro Alves <palves@redhat.com>
12301
12302 * event-top.c (command_line_handler): Add cast to execute_command
12303 call.
12304 * record-btrace.c (cmd_record_btrace_bts_start)
12305 (cmd_record_btrace_pt_start, cmd_record_btrace_start)
12306 (cmd_record_btrace_start): Add cast to execute_command call.
12307 * record-full.c (record_full_goto_insn):
12308 * record.c (record_start, record_stop): Add cast to
12309 execute_command_to_string calls.
12310 (cmd_record_start): Add cast to execute_command calls.
12311
12312 2017-04-05 Pedro Alves <palves@redhat.com>
12313
12314 * python/python-internal.h (gdb_PyArg_ParseTupleAndKeywords): New
12315 static inline function.
12316 * python/py-arch.c (archpy_disassemble): Constify 'keywords'
12317 array and use gdb_PyArg_ParseTupleAndKeywords.
12318 * python/py-cmd.c (cmdpy_init): Likewise.
12319 * python/py-finishbreakpoint.c (bpfinishpy_init): Likewise.
12320 * python/py-inferior.c (infpy_read_memory, infpy_write_memory)
12321 (infpy_search_memory): Likewise.
12322 * python/py-objfile.c (objfpy_add_separate_debug_file)
12323 (gdbpy_lookup_objfile): Likewise.
12324 * python/py-symbol.c (gdbpy_lookup_symbol)
12325 (gdbpy_lookup_global_symbol): Likewise.
12326 * python/py-type.c (gdbpy_lookup_type): Likewise.
12327 * python/py-value.c (valpy_lazy_string, valpy_string): Likewise.
12328 * python/python.c (execute_gdb_command, gdbpy_write, gdbpy_flush):
12329 Likewise.
12330
12331 2017-04-05 Pedro Alves <palves@redhat.com>
12332
12333 * python/python-internal.h (gdb_PyGetSetDef): New type.
12334 * python/py-block.c (block_object_getset)
12335 (breakpoint_object_getset): Now a gdb_PyGetSetDef array.
12336 * python/py-event.c (event_object_getset)
12337 (finish_breakpoint_object_getset): Likewise.
12338 * python/py-inferior.c (inferior_object_getset): Likewise.
12339 * python/py-infthread.c (thread_object_getset): Likewise.
12340 * python/py-lazy-string.c (lazy_string_object_getset): Likewise.
12341 * python/py-linetable.c (linetable_entry_object_getset): Likewise.
12342 * python/py-objfile.c (objfile_getset): Likewise.
12343 * python/py-progspace.c (pspace_getset): Likewise.
12344 * python/py-record-btrace.c (btpy_insn_getset, btpy_call_getset):
12345 Likewise.
12346 * python/py-record.c (recpy_record_getset): Likewise.
12347 * python/py-symbol.c (symbol_object_getset): Likewise.
12348 * python/py-symtab.c (symtab_object_getset, sal_object_getset):
12349 Likewise.
12350 * python/py-type.c (type_object_getset, field_object_getset):
12351 Likewise.
12352 * python/py-value.c (value_object_getset): Likewise.
12353
12354 2017-04-05 Pedro Alves <palves@redhat.com>
12355
12356 * python/python-internal.h (gdb_PyObject_CallMethod)
12357 (gdb_PyErr_NewException, gdb_PySys_GetObject, gdb_PySys_SetPath):
12358 New functions.
12359 (GDB_PYSYS_SETPATH_CHAR, PyObject_CallMethod, PyErr_NewException)
12360 (PySys_GetObject, PySys_SetPath): New macros.
12361
12362 2017-04-05 Pedro Alves <palves@redhat.com>
12363
12364 * mi/mi-cmd-info.c (mi_cmd_info_os): Call info_osdata instead of
12365 info_osdata_command.
12366 * osdata.c (info_osdata_command): Rename to ...
12367 (info_osdata): ... this. Constify 'type' parameter, and remove
12368 the 'from_tty' parameter. Accept NULL TYPE.
12369 (info_osdata_command): New function.
12370 * osdata.h (info_osdata_command): Remove declaration.
12371 (info_osdata): New declaration.
12372
12373 2017-04-05 Pedro Alves <palves@redhat.com>
12374
12375 * mi/mi-cmd-break.c (mi_cmd_break_insert_1, mi_cmd_break_insert)
12376 (mi_cmd_dprintf_insert, mi_cmd_break_passcount)
12377 (mi_cmd_break_watch, mi_cmd_break_commands): Constify 'command'
12378 parameter.
12379 * mi/mi-cmd-catch.c (mi_cmd_catch_assert, mi_cmd_catch_exception)
12380 (mi_cmd_catch_load, mi_cmd_catch_unload): Constify cmd' parameter.
12381 * mi/mi-cmd-disas.c (mi_cmd_disassemble): Constify 'command'
12382 parameter.
12383 * mi/mi-cmd-env.c (mi_cmd_env_pwd, mi_cmd_env_cd, mi_cmd_env_path)
12384 (mi_cmd_env_dir, mi_cmd_inferior_tty_set, _cmd_inferior_tty_show)
12385 * mi/mi-cmd-file.c (mi_cmd_file_list_exec_source_file)
12386 (mi_cmd_file_list_exec_source_files)
12387 (mi_cmd_file_list_shared_libraries): Constify 'command' parameter.
12388 * mi/mi-cmd-info.c (mi_cmd_info_ada_exceptions)
12389 (mi_cmd_info_gdb_mi_command, mi_cmd_info_os): Constify 'command'
12390 parameter.
12391 * mi/mi-cmd-stack.c (mi_cmd_enable_frame_filters)
12392 (mi_cmd_stack_list_frames, mi_cmd_stack_info_depth)
12393 (mi_cmd_stack_list_locals, mi_cmd_stack_list_args)
12394 (mi_cmd_stack_list_variables, mi_cmd_stack_select_frame)
12395 (mi_cmd_stack_info_frame): Constify 'command' parameter.
12396 * mi/mi-cmd-target.c (mi_cmd_target_file_get)
12397 (mi_cmd_target_file_put, mi_cmd_target_file_delete): Constify
12398 'command' parameter.
12399 * mi/mi-cmd-var.c (mi_cmd_var_create, mi_cmd_var_delete)
12400 (mi_cmd_var_set_format, mi_cmd_var_set_visualizer)
12401 (mi_cmd_var_set_frozen, mi_cmd_var_show_format)
12402 (mi_cmd_var_info_num_children, mi_cmd_var_list_children)
12403 (mi_cmd_var_info_type, mi_cmd_var_info_path_expression)
12404 (mi_cmd_var_info_expression, mi_cmd_var_show_attributes)
12405 (mi_cmd_var_evaluate_expression, mi_cmd_var_assign)
12406 (mi_cmd_var_update, mi_cmd_enable_pretty_printing)
12407 (mi_cmd_var_set_update_range): Constify 'command' parameter.
12408 * mi/mi-cmds.h (mi_cmd_argv_ftype): Constify 'command' parameter.
12409 * mi/mi-interp.c (mi_cmd_interpreter_exec): Constify 'command'
12410 parameter.
12411 * mi/mi-main.c (mi_cmd_gdb_exit, mi_cmd_exec_next)
12412 (mi_cmd_exec_next_instruction, mi_cmd_exec_step)
12413 (mi_cmd_exec_step_instruction, mi_cmd_exec_finish)
12414 (mi_cmd_exec_return ,mi_cmd_exec_jump, mi_cmd_exec_continue)
12415 (mi_cmd_exec_interrupt, mi_cmd_exec_run, mi_cmd_target_detach)
12416 (mi_cmd_target_flash_erase, mi_cmd_thread_select)
12417 (mi_cmd_thread_list_ids, mi_cmd_thread_info)
12418 (mi_cmd_list_thread_groups, mi_cmd_data_list_register_names)
12419 (mi_cmd_data_list_changed_registers)
12420 (mi_cmd_data_write_register_values)
12421 (mi_cmd_data_evaluate_expression, mi_cmd_data_read_memory)
12422 (mi_cmd_data_read_memory_bytes, mi_cmd_data_write_memory)
12423 (mi_cmd_data_write_memory_bytes, mi_cmd_enable_timings)
12424 (mi_cmd_list_features, mi_cmd_list_target_features)
12425 (mi_cmd_add_inferior, mi_cmd_remove_inferior)
12426 (mi_cmd_trace_define_variable, mi_cmd_trace_list_variables)
12427 (mi_cmd_trace_find, mi_cmd_trace_save, mi_cmd_trace_start)
12428 (mi_cmd_trace_status, mi_cmd_trace_stop, mi_cmd_ada_task_info)
12429 (mi_cmd_trace_frame_collected): Constify 'command'
12430 parameter.
12431 * mi/mi-symbol-cmds.c (mi_cmd_symbol_list_lines): Constify
12432 'command' parameter.
12433
12434 2017-04-05 Pedro Alves <palves@redhat.com>
12435
12436 * ada-lang.c (ada_completer_word_break_characters): Now a const
12437 array.
12438 (ada_get_gdb_completer_word_break_characters): Constify.
12439 * completer.c (gdb_completer_command_word_break_characters)
12440 (gdb_completer_file_name_break_characters)
12441 (gdb_completer_quote_characters): Now const arrays.
12442 (get_gdb_completer_quote_characters): Constify.
12443 (set_rl_completer_word_break_characters): New function.
12444 (set_gdb_completion_word_break_characters)
12445 (complete_line_internal): Use it.
12446 * completer.h (get_gdb_completer_quote_characters): Constify.
12447 (set_rl_completer_word_break_characters): Declare.
12448 * f-lang.c (f_word_break_characters): Constify.
12449 * language.c (default_word_break_characters): Constify.
12450 * language.h (language_defn::la_word_break_characters): Constify.
12451 (default_word_break_characters): Constify.
12452 * top.c (init_main): Use set_rl_completer_word_break_characters.
12453
12454 2017-04-05 Pedro Alves <palves@redhat.com>
12455
12456 * aix-thread.c (aix_thread_pid_to_str)
12457 (aix_thread_extra_thread_info): Constify.
12458 * bsd-kvm.c (bsd_kvm_pid_to_str): Constify.
12459 * bsd-uthread.c (bsd_uthread_extra_thread_info)
12460 (bsd_uthread_pid_to_str): Constify.
12461 * corelow.c (core_pid_to_str): Constify.
12462 * darwin-nat.c (darwin_pid_to_str): Constify.
12463 * fbsd-nat.c (fbsd_pid_to_str): Constify.
12464 * fbsd-tdep.c (fbsd_core_pid_to_str, gdbarch_core_pid_to_str):
12465 Constify.
12466 * gnu-nat.c (gnu_pid_to_str): Constify.
12467 * go32-nat.c (go32_pid_to_str): Constify.
12468 * i386-cygwin-tdep.c (i386_windows_core_pid_to_str): Constify.
12469 * inf-ptrace.c (inf_ptrace_pid_to_str): Constify.
12470 * inferior.c (inferior_pid_to_str): Constify.
12471 * linux-nat.c (linux_nat_pid_to_str): Constify.
12472 * linux-tdep.c (linux_core_pid_to_str): Constify.
12473 * linux-thread-db.c (thread_db_pid_to_str)
12474 (thread_db_extra_thread_info): Constify.
12475 * nto-tdep.c (nto_extra_thread_info): Constify.
12476 * nto-tdep.h (nto_extra_thread_info): Constify.
12477 * obsd-nat.c (obsd_pid_to_str): Constify.
12478 * procfs.c (procfs_pid_to_str): Constify.
12479 * ravenscar-thread.c (ravenscar_extra_thread_info)
12480 (ravenscar_pid_to_str): Constify.
12481 * remote-sim.c (gdbsim_pid_to_str): Constify.
12482 * remote.c (remote_threads_extra_info, remote_pid_to_str):
12483 Constify.
12484 * sol-thread.c (solaris_pid_to_str): Constify.
12485 * sol2-tdep.c (sol2_core_pid_to_str): Constify.
12486 * sol2-tdep.h (sol2_core_pid_to_str): Constify.
12487 * target.c (default_pid_to_str, target_pid_to_str)
12488 (normal_pid_to_str, default_pid_to_str): Constify.
12489 * target.h (target_ops::to_pid_to_str)
12490 (target_ops::to_extra_thread_info): Constify.
12491 (target_pid_to_str, normal_pid_to_str): Constify.
12492 * windows-nat.c (windows_pid_to_str): Constify.
12493 * gdbarch.sh (core_pid_to_str): Constify.
12494 * target-delegates.c: Regenerate.
12495 * gdbarch.h, gdbarch.c: Regenerate.
12496
12497 2017-04-05 Pedro Alves <palves@redhat.com>
12498
12499 * main.c (captured_main_1): Use gdb::unique_xmalloc_ptr to manage
12500 the memory of the temporary warning_pre_print override.
12501 * utils.c (warning_pre_print): Constify.
12502 * utils.h (warning_pre_print): Constify.
12503
12504 2017-04-05 Pedro Alves <palves@redhat.com>
12505
12506 * cli/cli-cmds.c (shell_escape): Constify 'arg' parameter.
12507 (shell_command): New function.
12508 (make_command): Use std::string.
12509 (init_cli_cmds): Register shell_command instead of shell_escape.
12510
12511 2017-04-05 Pedro Alves <palves@redhat.com>
12512
12513 * breakpoint.c (dprintf_function, dprintf_channel): Don't initialize.
12514 * tracepoint.c (default_collect): Don't initialize.
12515
12516 2017-04-05 Pedro Alves <palves@redhat.com>
12517
12518 * macroexp.c (macro_buffer::shared): Now a bool.
12519 (init_buffer): Update.
12520 (init_shared_buffer): Constify 'addr' parameter.
12521 (substitute_args, expand, macro_expand, macro_expand_next): Remove
12522 casts.
12523
12524 2017-04-05 Pedro Alves <palves@redhat.com>
12525
12526 * arm-tdep.c (show_disassembly_style_sfunc): Constify local.
12527 * disasm.c (set_disassembler_options): Constify local.
12528 * i386-tdep.c (i386_print_insn): Remove cast and FIXME comment.
12529
12530 2017-04-05 Sergio Durigan Junior <sergiodj@redhat.com>
12531
12532 PR gdb/21352
12533 * tracefile.c (tsave_command): Fix argument parsing for '-r'
12534 option.
12535
12536 2017-04-05 Yao Qi <yao.qi@linaro.org>
12537
12538 * frame.c (frame_unwind_register_unsigned): Call
12539 frame_unwind_register_value.
12540
12541 2017-04-05 Yao Qi <yao.qi@linaro.org>
12542
12543 * gdb.threads/thread-specific-bp.exp (check_thread_specific_breakpoint):
12544 Use gdb_test_multiple, and don't match anchor.
12545
12546 2017-04-05 Pedro Alves <palves@redhat.com>
12547
12548 * MAINTAINERS (Global Maintainers): Add Simon Marchi.
12549 (Write After Approval): Remove Simon Marchi.
12550
12551 2017-04-05 Pedro Alves <palves@redhat.com>
12552
12553 * common/gdb_optional.h (optional::optional): Make constexpr and
12554 initialize m_dummy.
12555
12556 2017-04-04 John Baldwin <jhb@FreeBSD.org>
12557
12558 * amd64-fbsd-tdep.c: Remove "bsd-uthread.h" include.
12559 (amd64fbsd_jmp_buf_reg_offset): Remove.
12560 (amd64fbsd_supply_uthread): Remove function.
12561 (amd64fbsd_collect_uthread): Remove function.
12562 (amd64fbsd_init_abi): Don't set bsd-uthread callbacks.
12563 * configure.tgt (i[34567]86-*-freebsd*): Remove bsd-uthread.o.
12564 (x86_64-*-freebsd*): Remove bsd-uthread.o.
12565 (fbsd-nat.c): Update comment.
12566 * i386-fbsd-tdep.c: Remove "bsd-uthread.h" include.
12567 (i386fbsd_jmp_buf_reg_offset): Remove.
12568 (i386fbsd_supply_uthread): Remove function.
12569 (i386fbsd_collect_uthread): Remove function.
12570 (i386fbsd_init_abi): Don't set bsd-uthread callbacks.
12571
12572 2017-04-04 John Baldwin <jhb@FreeBSD.org>
12573
12574 * Makefile.in (ALL_64_TARGET_OBS): Remove alpha-fbsd-tdep.o.
12575 (ALLDEPFILES): Remove alpha-fbsd-tdep.c
12576 * NEWS: Mention that support for FreeBSD/alpha was removed.
12577 * alpha-fbsd-tdep.c: Delete file.
12578 * config/alpha/fbsd.mh: Delete file.
12579 * configure.host: Delete alpha*-*-freebsd* and
12580 alpha*-*-kfreebsd*-gnu.
12581 * configure.tgt: Delete alpha*-*-freebsd* and
12582 alpha*-*-kfreebsd*-gnu.
12583
12584 2017-04-04 John Baldwin <jhb@FreeBSD.org>
12585
12586 * amd64-bsd-nat.c (amd64bsd_fetch_inferior_registers,
12587 amd64bsd_store_inferior_registers): Use ptid from regcache.
12588
12589 2017-04-04 Pedro Alves <palves@redhat.com>
12590
12591 * dwarf2read.c (lnp_state_machine): Now a class. Initialize all
12592 data fields, make them private and add "m_" prefixes.
12593 (lnp_state_machine::lnp_state_machine): New ctor.
12594 (record_line, check_line_address, handle_set_discriminator)
12595 (handle_set_address, handle_advance_pc, handle_special_opcode)
12596 (handle_advance_line, handle_set_file, handle_negate_stmt)
12597 (handle_const_add_pc, handle_fixed_advance_pc, handle_copy)
12598 (end_sequence, advance_line): New methods.
12599 (m_gdbarch, m_record_lines_p): New fields.
12600 (lnp_reader_state): Delete.
12601 (dwarf_record_line): Rename to ...
12602 (lnp_state_machine::record_line): ... adjust.
12603 (init_lnp_state_machine): Delete.
12604 (lnp_state_machine::lnp_state_machine): New.
12605 (check_line_address): Rename to ...
12606 (lnp_state_machine::check_line_address): This.
12607 (dwarf_decode_lines_1): Remove reference to "reader_state".
12608 Adjust lnp_state_machine having a non-default ctor. Use bool.
12609 State machine internal state manipulation moved to
12610 lnp_state_machine methods.
12611
12612 2017-04-04 Pedro Alves <palves@redhat.com>
12613
12614 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
12615 unittests/offset-type-selftests.c.
12616 (SUBDIR_UNITTESTS_OBS): Add offset-type-selftests.o.
12617 * common/offset-type.h: New file.
12618 * common/preprocessor.h: New file.
12619 * common/traits.h: New file.
12620 * common/valid-expr.h: New file.
12621 * dwarf2expr.c: Include "common/underlying.h". Adjust to use
12622 sect_offset and cu_offset strong typedefs throughout.
12623 * dwarf2expr.h: Adjust to use sect_offset and cu_offset strong
12624 typedefs throughout.
12625 * dwarf2loc.c: Include "common/underlying.h". Adjust to use
12626 sect_offset and cu_offset strong typedefs throughout.
12627 * dwarf2read.c: Adjust to use sect_offset and cu_offset strong
12628 typedefs throughout.
12629 * gdbtypes.h: Include "common/offset-type.h".
12630 (cu_offset): Now an offset type (strong typedef) instead of a
12631 struct.
12632 (sect_offset): Likewise.
12633 (union call_site_parameter_u): Rename "param_offset" field to
12634 "param_cu_off".
12635 * unittests/offset-type-selftests.c: New file.
12636
12637 2017-04-04 Pedro Alves <palves@redhat.com>
12638
12639 * common/underlying.h: New file.
12640 * dwarf2read.c: Include "common/gdb_optional.h" and
12641 "common/underlying.h".
12642 (dir_index, file_name_index): New types.
12643 (file_entry): Use them.
12644 (file_entry::include): Use to_underlying.
12645 (line_header::add_file_name): Use dir_index.
12646 (read_formatted_entries): Use gdb::optional. Read form before
12647 writting to file_entry.
12648 (dwarf_decode_line_header): Use dir_index.
12649 (lnp_state_machine::current_file): Use to_underlying.
12650 (lnp_state_machine::file): Change type to file_name_index.
12651 (dwarf_record_line): Use to_underlying.
12652 (init_lnp_state_machine): Use file_name_index.
12653 (dwarf_decode_lines_1): Use dir_index and file_name_index.
12654
12655 2017-04-04 Pedro Alves <palves@redhat.com>
12656
12657 * common/gdb_optional.h (gdb::optiona): Add operator->, operator*,
12658 operator bool, has_value and get methods.
12659
12660 2017-04-04 Pedro Alves <palves@redhat.com>
12661
12662 * dwarf2read.c (struct file_entry): Add ctors, and initialize all
12663 fields.
12664 (line_header): Initialize all data fields. Change type of
12665 standard_opcode_lengths to std::unique_ptr<unsigned char[]>.
12666 Change type of include_dirs to std::vector<const char *>. Remove
12667 num_include_dirs, include_dirs_size. Change type of file_names to
12668 std::vector<file_entry>. Remove num_file_names, file_names_size.
12669 (line_header::line_header): New.
12670 (line_header::add_include_dir, line_header::add_file_name): New
12671 methods.
12672 (line_header::include_dir_at): Remove NULL check.
12673 (line_header::file_name_at): Add const overload.
12674 (line_header_up): New unique_ptr typedef.
12675 (dw2_get_file_names_reader): Use line_header_up. Adjust to use
12676 std::vector. Remove free_line_header call.
12677 (dwarf2_build_include_psymtabs): Use line_header_up. Remove
12678 free_line_header call.
12679 (free_cu_line_header): Delete.
12680 (handle_DW_AT_stmt_list, handle_DW_AT_stmt_list)
12681 (setup_type_unit_groups): Use line_header_up instead of cleanups.
12682 Adjust to use std::vector.
12683 (free_line_header): Delete.
12684 (free_line_header_voidp): Use delete.
12685 (add_include_dir): Replace with ...
12686 (line_header::add_include_dir): ... this method. Use std::vector.
12687 (add_file_name): Replace with ...
12688 (line_header::add_file_name): ... this method. Use std::vector.
12689 (add_include_dir_stub): Delete.
12690 (read_formatted_entries): Remove memset.
12691 (dwarf_decode_line_header): Return a line_header_up instead of a
12692 raw pointer. Remove cleanup handling. Pass lambdas to
12693 read_formatted_entries. Adjust to use line_header methods.
12694 (dwarf_decode_lines_1): Adjust to use line_header methods.
12695 (dwarf_decode_lines, file_file_name, file_full_name): Adjust to
12696 use std::vector.
12697
12698 2017-04-04 Simon Marchi <simon.marchi@polymtl.ca>
12699
12700 * remote.c (set_general_thread, set_continue_thread): Use ptid_t
12701 instead of struct ptid.
12702
12703 2017-05-04 Alan Hayward <alan.hayward@arm.com>
12704
12705 * frame.c (get_frame_register_bytes): Unwind using value.
12706 (put_frame_register_bytes): Likewise.
12707
12708 2017-03-30 Iain Buclaw <ibuclaw@gdcproject.org>
12709
12710 * d-exp.y (type_aggregate_p): Treat TYPE_CODE_MODULE as being
12711 aggregate-like.
12712
12713 2017-03-29 Jan Kratochvil <jan.kratochvil@redhat.com>
12714
12715 * auto-load.c (auto_load_section_scripts): Check SEC_HAS_CONTENTS.
12716
12717 2017-03-29 Yao Qi <yao.qi@linaro.org>
12718
12719 * gdbthread.h (struct thread_info): Declare constructor and
12720 destructor. Add some in-class member initializers.
12721 * thread.c (free_thread): Remove.
12722 (init_thread_list): Call delete instead of free_thread.
12723 (new_thread): Call thread_info constructor.
12724 (thread_info::thread_info): New function.
12725 (thread_info::~thread_info): New function.
12726 (delete_thread_1): Call delete instead of free_thread.
12727 (make_cleanup_restore_current_thread): Move tp and frame to
12728 inner block.
12729
12730 2017-03-28 Anton Kolesov <anton.kolesov@synopsys.com>
12731
12732 * arc-tdep.c (arc_frame_cache): Add support for prologue analysis.
12733 (arc_skip_prologue): Likewise.
12734 (arc_make_frame_cache): Likewise.
12735 (arc_pv_get_operand): New function.
12736 (arc_is_in_prologue): Likewise.
12737 (arc_analyze_prologue): Likewise.
12738 (arc_print_frame_cache): Likewise.
12739 (MAX_PROLOGUE_LENGTH): New constant.
12740
12741 2017-03-28 Anton Kolesov <anton.kolesov@synopsys.com>
12742
12743 * configure.tgt: Add arc-insn.o.
12744 * arc-tdep.c (arc_delayed_print_insn): Make non-static.
12745 (dump_arc_instruction_command): New function.
12746 (arc_fprintf_disasm): Likewise.
12747 (arc_disassemble_info): Likewise.
12748 (arc_insn_get_operand_value): Likewise.
12749 (arc_insn_get_operand_value_signed): Likewise.
12750 (arc_insn_get_memory_base_reg): Likewise.
12751 (arc_insn_get_memory_offset): Likewise.
12752 (arc_insn_get_branch_target): Likewise.
12753 (arc_insn_dump): Likewise.
12754 (arc_insn_get_linear_next_pc): Likewise.
12755 * arc-tdep.h (arc_delayed_print_insn): Add function declaration.
12756 (arc_disassemble_info): Likewise.
12757 (arc_insn_get_branch_target): Likewise.
12758 (arc_insn_get_linear_next_pc): Likewise.
12759 * NEWS: Mention new "maint print arc arc-instruction".
12760
12761 2017-03-28 Anton Kolesov <anton.kolesov@synopsys.com>
12762
12763 * arc-tdep (maintenance_print_arc_list): New variable.
12764 (maintenance_print_arc_command): New function.
12765
12766 2017-03-28 Anton Kolesov <anton.kolesov@synopsys.com>
12767
12768 * arc-tdep.c (core_v2_register_names, core_arcompact_register_names)
12769 Add "limm" and "reserved".
12770 (arc_cannot_fetch_register, arc_cannot_store_register): Add
12771 ARC_RESERVED_REGNUM and ARC_LIMM_REGNUM.
12772 * arc-tdep.h (arc_regnum): Likewise.
12773
12774 2017-03-27 Max Filippov <jcmvbkbc@gmail.com>
12775
12776 * xtensa-linux-nat.c (fill_gregset): Call regcache_raw_collect
12777 for THREADPTR register.
12778 (supply_gregset_reg): Call regcache_raw_supply for THREADPTR
12779 register.
12780 * xtensa-tdep.c (XTENSA_DBREGN_UREG): New definition.
12781 (xtensa_derive_tdep): Initialize tdep->threadptr_regnum.
12782 * xtensa-tdep.h (gdbarch_tdep::threadptr_regnum): New field.
12783
12784 2017-03-27 Max Filippov <jcmvbkbc@gmail.com>
12785
12786 * xtensa-tdep.c (xtensa_pseudo_register_read): Treat all
12787 registers above gdbarch_num_regs (gdbarch) as privileged in
12788 call0 ABI.
12789
12790 2017-03-27 Max Filippov <jcmvbkbc@gmail.com>
12791
12792 * xtensa-linux-nat.c (fill_gregset): Call regcache_raw_collect
12793 for a single specified register or for all registers in
12794 a0_base..a0_base + C0_NREGS range.
12795 (supply_gregset_reg): Call regcache_raw_supply for a single
12796 specified register or for all registers in a0_base..a0_base +
12797 C0_NREGS range.
12798
12799 2017-03-27 Max Filippov <jcmvbkbc@gmail.com>
12800
12801 * arch/xtensa.h (C0_NREGS): Add definition.
12802 * xtensa-tdep.c (C0_NREGS): Remove definition.
12803
12804 2017-03-27 Max Filippov <jcmvbkbc@gmail.com>
12805
12806 * xtensa-tdep.c (xtensa_scan_prologue, call0_analyze_prologue):
12807 Drop xtensa_default_isa initialization.
12808 (xtensa_gdbarch_init): Initialize xtensa_default_isa.
12809
12810 2017-03-27 Pedro Alves <palves@redhat.com>
12811
12812 * dwarf2read.c (file_entry) <dir_index>: Add comment.
12813 (file_entry::include_dir): New method.
12814 (line_header::include_dir_at, line_header::file_name_at): New
12815 methods.
12816 (setup_type_unit_groups, setup_type_unit_groups)
12817 (psymtab_include_file_name): Simplify using the new methods.
12818 (lnp_state_machine) <the_line_header>: New field.
12819 <file>: Add comment.
12820 (lnp_state_machine::current_file): New method.
12821 (dwarf_record_line): Simplify using the new methods.
12822 (init_lnp_state_machine): Initialize the "the_line_header" field.
12823 (dwarf_decode_lines_1, dwarf_decode_lines, file_file_name):
12824 Simplify using the new methods.
12825
12826 2017-03-27 Pedro Alves <palves@redhat.com>
12827
12828 * cp-name-parser.y (make_empty): Delete.
12829 (demangler_special, nested_name, ptr_operator, array_indicator)
12830 (direct_declarator, declarator_1): Use fill_comp instead of
12831 make_empty.
12832
12833 2017-03-27 Pedro Alves <palves@redhat.com>
12834
12835 * xml-support.h (gdb_xml_debug): Pass a "first-to-check" argument
12836 to ATTRIBUTE_PRINTF.
12837 * solib-target.c (library_list_start_list): Print "string" not
12838 "version".
12839 * xml-tdesc.c (tdesc_start_field): Pass "field_name" to
12840 gdb_xml_error call.
12841
12842 2017-03-27 Pedro Alves <palves@redhat.com>
12843
12844 * dwarf2read.c (struct file_and_directory): New.
12845 (dwarf2_get_dwz_file): Adjust to use std::string.
12846 (dw2_get_file_names_reader): Adjust to use file_and_directory.
12847 (find_file_and_directory): Adjust to return a file_and_directory
12848 object.
12849 (read_file_scope): Adjust to use file_and_directory. Remove
12850 make_cleanup/do_cleanups calls.
12851 (open_and_init_dwp_file): Adjust to use std::string. Remove
12852 make_cleanup/do_cleanups calls.
12853 * python/python.c (do_start_initialization): Adjust to ldirname
12854 returning a std::string.
12855 * utils.c (ldirname): Now returns a std::string.
12856 * utils.h (ldirname): Change return type to std::string.
12857 * xml-syscall.c (xml_init_syscalls_info): Adjust to ldirname
12858 returning a std::string.
12859 * xml-tdesc.c (file_read_description_xml): Likewise.
12860
12861 2017-03-24 Alan Hayward <alan.hayward@arm.com>
12862
12863 * regcache.c (regcache_debug_print_register): New function.
12864 * regcache.h (regcache_debug_print_register): New declaration.
12865 * target.c (debug_print_register): Remove.
12866 (target_fetch_registers): Call regcache_debug_print_register.
12867 (target_store_registers): Likewise.
12868
12869 2017-03-24 Pádraig Brady <pbrady@fb.com>
12870
12871 * dwarf2read.c (setup_type_unit_groups): Ensure dir_index doesn't
12872 reference beyond the 'lh->include_dirs' array before accessing to
12873 it.
12874 (psymtab_include_file_name): Likewise.
12875 (dwarf_decode_lines_1): Likewise.
12876 (dwarf_decode_lines): Likewise.
12877 (file_file_name): Likewise.
12878
12879 2017-03-23 Simon Marchi <simon.marchi@ericsson.com>
12880
12881 * fbsd-tdep.c (fbsd_corefile_thread): Don't set/restore
12882 inferior_ptid.
12883 * proc-service.c (ps_lgetregs, ps_lsetregs, ps_lgetfpregs,
12884 ps_lsetfpregs): Likewise.
12885 * regcache.c (regcache_raw_update, regcache_raw_write): Likewise.
12886 * sol-thread.c (ps_lgetregs, ps_lsetregs, ps_lgetfpregs,
12887 ps_lsetfpregs): Likewise.
12888 * target.c (target_fetch_registers, target_store_registers):
12889 Remove asserts.
12890
12891 2017-03-23 Alan Hayward <alan.hayward@arm.com>
12892
12893 * sol-thread.c (sol_thread_store_registers): Remove regcache calls.
12894
12895 2017-03-23 Yao Qi <yao.qi@linaro.org>
12896
12897 * aarch64-tdep.c (aarch64_process_record_test): Declare.
12898 (_initialize_aarch64_tdep): Register it.
12899 (aarch64_record_load_store): Handle PRFM instruction.
12900 (aarch64_process_record_test): New function.
12901
12902 2017-03-23 Yao Qi <yao.qi@linaro.org>
12903
12904 * aarch64-tdep.c (aarch64_record_load_store): Fix code
12905 indentation.
12906
12907 2017-03-23 Yao Qi <yao.qi@linaro.org>
12908
12909 * aarch64-tdep.c: Remove AARCH64_RECORD_FAILURE.
12910
12911 2017-03-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
12912
12913 python/python.c (do_start_initialization): Fix memory leak.
12914
12915 2017-03-22 Simon Marchi <simon.marchi@polymtl.ca>
12916
12917 * inf-ptrace.c (inf_ptrace_xfer_partial): Get pid from ptid
12918 using get_ptrace_pid.
12919 * linux-nat.c (linux_nat_xfer_partial): Don't set/restore
12920 inferior_ptid.
12921 (linux_proc_xfer_partial, linux_proc_xfer_spu): Use lwp of
12922 inferior_ptid instead of pid.
12923
12924 2017-03-22 Yao Qi <yao.qi@linaro.org>
12925
12926 * aarch64-tdep.c: Wrap locally used classes in anonymous
12927 namespace.
12928 * arm-tdep.c: Likewise.
12929 * linespec.c: Likewise.
12930 * ui-out.c: Likewise.
12931
12932 2017-03-22 Jonah Graham <jonah@kichwacoders.com>
12933
12934 PR gdb/19637
12935 * python/lib/gdb/printer/bound_registers.py: Import sys.
12936
12937 2017-03-21 Simon Marchi <simon.marchi@ericsson.com>
12938
12939 * windows-nat.c (do_windows_fetch_inferior_registers): Add
12940 windows_thread_info parameter and use it instead of
12941 current_thread.
12942 (windows_fetch_inferior_registers): Don't set current_thread,
12943 pass the thread to do_windows_fetch_inferior_registers. Use
12944 ptid from regcache instead of inferior_ptid.
12945 (do_windows_store_inferior_registers): Add windows_thread_info
12946 parameter and use it instead of current_thread.
12947 (windows_store_inferior_registers): Don't set current_thread,
12948 pass the thread to do_windows_store_inferior_registers. Use
12949 ptid from regcache instead of inferior_ptid.
12950
12951 2017-03-21 Simon Marchi <simon.marchi@ericsson.com>
12952
12953 * ser-mingw.c (ser_windows_raw): Remove reference to
12954 struct serial::current_timeout.
12955
12956 2017-03-21 Ivo Raisr <ivo.raisr@oracle.com>
12957
12958 PR tdep/20928
12959 * gdb/sparc-tdep.h (gdbarch_tdep) <sparc64_ccr_type>: New field.
12960 * gdb/sparc64-tdep.c (sparc64_ccr_type): New function.
12961 (sparc64_fsr_type): Fix %fsr decoding.
12962
12963 2017-03-21 Tim Wiederhake <tim.wiederhake@intel.com>
12964
12965 * python/py-record-btrace.c (btpy_insn_data): Change return type
12966 for Python 2.
12967
12968 2017-03-20 Simon Marchi <simon.marchi@polymtl.ca>
12969
12970 * spu-linux-nat.c (spu_fetch_inferior_registers,
12971 spu_store_inferior_registers): Use ptid from regcache, set and
12972 restore inferior_ptid.
12973 * spu-multiarch.c (spu_fetch_registers, spu_store_registers):
12974 Likewise.
12975
12976 2017-03-20 Simon Marchi <simon.marchi@polymtl.ca>
12977
12978 * i386-linux-nat.c (fetch_register, store_register,
12979 i386_linux_fetch_inferior_registers,
12980 i386_linux_store_inferior_registers): Use ptid from regcache.
12981 * ia64-linux-nat.c (ia64_linux_fetch_register,
12982 ia64_linux_store_register): Likewise.
12983 * inf-ptrace.c (inf_ptrace_fetch_register,
12984 inf_ptrace_store_register): Likewise.
12985 * m32r-linux-nat.c (m32r_linux_fetch_inferior_registers,
12986 m32r_linux_store_inferior_registers): Likewise.
12987 * m68k-bsd-nat.c (m68kbsd_fetch_inferior_registers,
12988 m68kbsd_store_inferior_registers): Likewise.
12989 * m68k-linux-nat.c (fetch_register, store_register,
12990 m68k_linux_fetch_inferior_registers,
12991 m68k_linux_store_inferior_registers): Likewise.
12992 * m88k-bsd-nat.c (m88kbsd_fetch_inferior_registers,
12993 m88kbsd_store_inferior_registers): Likewise.
12994 * mips-fbsd-nat.c (mips_fbsd_fetch_inferior_registers,
12995 mips_fbsd_store_inferior_registers): Likewise.
12996 * mips-linux-nat.c (mips64_linux_regsets_fetch_registers,
12997 mips64_linux_regsets_store_registers): Likewise.
12998 * mips-nbsd-nat.c (mipsnbsd_fetch_inferior_registers,
12999 mipsnbsd_store_inferior_registers): Likewise.
13000 * mips-obsd-nat.c (mips64obsd_fetch_inferior_registers,
13001 mips64obsd_store_inferior_registers): Likewise.
13002 * nto-procfs.c (procfs_fetch_registers, procfs_store_registers):
13003 Likewise.
13004 * ppc-fbsd-nat.c (ppcfbsd_fetch_inferior_registers,
13005 ppcfbsd_store_inferior_registers): Likewise.
13006 * ppc-linux-nat.c (ppc_linux_fetch_inferior_registers,
13007 ppc_linux_store_inferior_registers): Likewise.
13008 * ppc-nbsd-nat.c (ppcnbsd_fetch_inferior_registers,
13009 ppcnbsd_store_inferior_registers): Likewise.
13010 * ppc-obsd-nat.c (ppcobsd_fetch_registers,
13011 ppcobsd_store_registers): Likewise.
13012 * procfs.c (procfs_fetch_registers, procfs_store_registers):
13013 Likewise.
13014 * ravenscar-thread.c (ravenscar_fetch_registers,
13015 ravenscar_store_registers, ravenscar_prepare_to_store):
13016 Likewise.
13017 * record-btrace.c (record_btrace_fetch_registers,
13018 record_btrace_store_registers, record_btrace_prepare_to_store):
13019 Likewise.
13020 * remote-sim.c (gdbsim_fetch_register, gdbsim_store_register):
13021 Lookup inferior using ptid from regcache, instead of
13022 current_inferior.
13023 * remote.c (remote_fetch_registers, remote_store_registers): Use
13024 ptid from regcache.
13025 * rs6000-nat.c (fetch_register, store_register): Likewise.
13026 * s390-linux-nat.c (s390_linux_fetch_inferior_registers,
13027 s390_linux_store_inferior_registers): Likewise.
13028 * sh-nbsd-nat.c (shnbsd_fetch_inferior_registers,
13029 shnbsd_store_inferior_registers): Likewise.
13030 * sol-thread.c (sol_thread_fetch_registers,
13031 sol_thread_store_registers): Likewise.
13032 * sparc-nat.c (sparc_fetch_inferior_registers,
13033 sparc_store_inferior_registers): Likewise.
13034 * tilegx-linux-nat.c (fetch_inferior_registers,
13035 store_inferior_registers): Likewise.
13036 * vax-bsd-nat.c (vaxbsd_fetch_inferior_registers,
13037 vaxbsd_store_inferior_registers): Likewise.
13038 * xtensa-linux-nat.c (fetch_gregs, store_gregs, fetch_xtregs,
13039 store_xtregs): Likewise.
13040
13041 2017-03-20 Artemiy Volkov <artemiyv@acm.org>
13042
13043 PR gdb/14441
13044 * NEWS: Mention support for rvalue references in GDB and python.
13045 * doc/gdb.texinfo (C Plus Plus Expressions): Mention that GDB
13046 supports both lvalue and rvalue references.
13047
13048 2017-03-20 Artemiy Volkov <artemiyv@acm.org>
13049
13050 PR gdb/14441
13051 * gdbtypes.c (rank_one_type): Implement overloading
13052 resolution rules regarding rvalue references.
13053
13054 2017-03-20 Artemiy Volkov <artemiyv@acm.org>
13055
13056 PR gdb/14441
13057 * aarch64-tdep.c (aarch64_type_align)
13058 (aarch64_extract_return_value, aarch64_store_return_value): Change
13059 lvalue reference type checks to general reference type checks.
13060 * amd64-tdep.c (amd64_classify): Likewise.
13061 * amd64-windows-tdep.c (amd64_windows_passed_by_integer_register):
13062 Likewise.
13063 * arm-tdep.c (arm_type_align, arm_extract_return_value)
13064 (arm_store_return_value): Likewise.
13065 * ax-gdb.c (gen_fetch, gen_cast): Likewise.
13066 * c-typeprint.c (c_print_type): Likewise.
13067 * c-varobj.c (adjust_value_for_child_access, c_value_of_variable)
13068 (cplus_number_of_children, cplus_describe_child): Likewise.
13069 * compile/compile-c-symbols.c (generate_vla_size): Likewise.
13070 * completer.c (expression_completer): Likewise.
13071 * cp-support.c (make_symbol_overload_list_adl_namespace):
13072 Likewise.
13073 * darwin-nat-info.c (info_mach_region_command): Likewise.
13074 * dwarf2loc.c (entry_data_value_coerce_ref)
13075 (value_of_dwarf_reg_entry): Likewise.
13076 * eval.c (ptrmath_type_p, evaluate_subexp_standard)
13077 (evaluate_subexp_for_address, evaluate_subexp_for_sizeof):
13078 Likewise.
13079 * findvar.c (extract_typed_address, store_typed_address):
13080 Likewise.
13081 * gdbtypes.c (rank_one_type): Likewise.
13082 * hppa-tdep.c (hppa64_integral_or_pointer_p): Likewise.
13083 * infcall.c (value_arg_coerce): Likewise.
13084 * language.c (pointer_type): Likewise.
13085 * m32c-tdep.c (m32c_reg_arg_type, m32c_m16c_address_to_pointer):
13086 Likewise.
13087 * m88k-tdep.c (m88k_integral_or_pointer_p): Likewise.
13088 * mn10300-tdep.c (mn10300_type_align): Likewise.
13089 * msp430-tdep.c (msp430_push_dummy_call): Likewise.
13090 * ppc-sysv-tdep.c (do_ppc_sysv_return_value)
13091 (ppc64_sysv_abi_push_param, ppc64_sysv_abi_return_value):
13092 Likewise.
13093 * printcmd.c (print_formatted, x_command): Likewise.
13094 * python/py-type.c (typy_get_composite, typy_template_argument):
13095 Likewise.
13096 * python/py-value.c (valpy_referenced_value)
13097 (valpy_get_dynamic_type, value_has_field): Likewise.
13098 * s390-linux-tdep.c (s390_function_arg_integer): Likewise.
13099 * sparc-tdep.c (sparc_integral_or_pointer_p): Likewise.
13100 * sparc64-tdep.c (sparc64_integral_or_pointer_p): Likewise.
13101 * spu-tdep.c (spu_scalar_value_p): Likewise.
13102 * symtab.c (lookup_symbol_aux): Likewise.
13103 * typeprint.c (whatis_exp, print_type_scalar): Likewise.
13104 * valarith.c (binop_types_user_defined_p, unop_user_defined_p):
13105 Likewise.
13106 * valops.c (value_cast_pointers, value_cast)
13107 (value_reinterpret_cast, value_dynamic_cast, value_addr, typecmp)
13108 (value_struct_elt, value_struct_elt_bitpos)
13109 (value_find_oload_method_list, find_overload_match)
13110 (value_rtti_indirect_type): Likewise.
13111 * valprint.c (val_print_scalar_type_p, generic_val_print):
13112 Likewise.
13113 * value.c (value_actual_type, value_as_address, unpack_long)
13114 (pack_long, pack_unsigned_long, coerce_ref_if_computed)
13115 (coerce_ref): Likewise.
13116 * varobj.c (varobj_get_value_type): Likewise.
13117
13118 2017-03-20 Artemiy Volkov <artemiyv@acm.org>
13119
13120 PR gdb/14441
13121 * doc/python.texi (Types in Python): Add TYPE_CODE_RVALUE_REF to
13122 table of constants.
13123 * python/lib/gdb/command/explore.py: Support exploring values
13124 of rvalue reference types.
13125 * python/lib/gdb/types.py: Implement get_basic_type() for
13126 rvalue reference types.
13127 * python/py-type.c (pyty_codes) <TYPE_CODE_RVALUE_REF>: New
13128 constant.
13129 * python/py-value.c (valpy_getitem): Add an rvalue reference
13130 check.
13131 (valpy_reference_value): Add new parameter "refcode".
13132 (valpy_lvalue_reference_value, valpy_rvalue_reference_value):
13133 New wrappers for valpy_reference_value().
13134 * python/py-xmethods.c (gdbpy_get_xmethod_result_type)
13135 (gdbpy_invoke_xmethod): Likewise.
13136
13137 2017-03-20 Artemiy Volkov <artemiyv@acm.org>
13138
13139 PR gdb/14441
13140 * dwarf2read.c (process_die, read_type_die_1): Handle the
13141 DW_TAG_rvalue_reference_type DIE.
13142 (read_tag_reference_type): Add new parameter "refcode".
13143
13144 2017-03-20 Artemiy Volkov <artemiyv@acm.org>
13145
13146 PR gdb/14441
13147 * c-typeprint.c (c_print_type, c_type_print_varspec_prefix)
13148 (c_type_print_modifier, c_type_print_varspec_suffix)
13149 (c_type_print_base): Support printing rvalue reference types.
13150 * c-valprint.c (c_val_print, c_value_print): Support printing
13151 rvalue reference values.
13152
13153 2017-03-20 Artemiy Volkov <artemiyv@acm.org>
13154
13155 PR gdb/14441
13156 * cp-name-parser.y (ptr_operator): Handle the '&&' token in
13157 typename.
13158 * cp-support.c (replace_typedefs): Handle
13159 DEMANGLE_COMPONENT_RVALUE_REFERENCE.
13160 * python/py-type.c (typy_lookup_type): Likewise.
13161
13162 2017-03-20 Artemiy Volkov <artemiyv@acm.org>
13163
13164 PR gdb/14441
13165 * c-exp.y (ptr_operator): Handle the '&&' token in the typename.
13166 * parse.c (insert_type): Change assert statement.
13167 (follow_types): Handle rvalue reference types.
13168 * parser-defs.h (enum type_pieces) <tp_rvalue_reference>: New
13169 constant.
13170
13171 2017-03-20 Artemiy Volkov <artemiyv@acm.org>
13172
13173 PR gdb/14441
13174 * ada-lang.c (ada_evaluate_subexp): Adhere to the new
13175 value_ref() interface.
13176 * c-valprint.c (c_value_print): Likewise.
13177 * infcall.c (value_arg_coerce): Likewise.
13178 * python/py-value.c (valpy_reference_value): Likewise.
13179 * valops.c (value_cast, value_reinterpret_cast)
13180 (value_dynamic_cast, typecmp): Likewise.
13181 (value_ref): Parameterize by kind of return value reference type.
13182 * value.h (value_ref): Add new parameter "refcode".
13183
13184 2017-03-20 Artemiy Volkov <artemiyv@acm.org>
13185
13186 PR gdb/14441
13187 * dwarf2read.c (read_tag_reference_type): Use
13188 lookup_lvalue_reference_type() instead of lookup_reference_type().
13189 * eval.c (evaluate_subexp_standard): Likewise.
13190 * f-exp.y: Likewise.
13191 * gdbtypes.c (make_reference_type, lookup_reference_type):
13192 Generalize with rvalue reference types.
13193 (lookup_lvalue_reference_type, lookup_rvalue_reference_type): New
13194 convenience wrappers for lookup_reference_type().
13195 * gdbtypes.h (make_reference_type, lookup_reference_type): Add a
13196 reference kind parameter.
13197 (lookup_lvalue_reference_type, lookup_rvalue_reference_type): Add
13198 wrappers for lookup_reference_type().
13199 * guile/scm-type.c (gdbscm_type_reference): Use
13200 lookup_lvalue_reference_type() instead of lookup_reference_type().
13201 * guile/scm-value.c (gdbscm_value_dynamic_type): Likewise.
13202 * parse.c (follow_types): Likewise.
13203 * python/py-type.c (typy_reference, typy_lookup_type): Likewise.
13204 * python/py-value.c (valpy_get_dynamic_type, valpy_getitem):
13205 Likewise.
13206 * python/py-xmethods.c (gdbpy_get_xmethod_result_type)
13207 (gdbpy_invoke_xmethod): Likewise.
13208 * stabsread.c: Provide extra argument to make_reference_type()
13209 call.
13210 * valops.c (value_ref, value_rtti_indirect_type): Use
13211 lookup_lvalue_reference_type() instead of lookup_reference_type().
13212
13213 2017-03-20 Artemiy Volkov <artemiyv@acm.org>
13214
13215 PR gdb/14441
13216 * gdbtypes.h (enum type_code) <TYPE_CODE_RVALUE_REF>: New constant.
13217 (TYPE_IS_REFERENCE): New macro.
13218 (struct type): Add rvalue_reference_type field.
13219 (TYPE_RVALUE_REFERENCE_TYPE): New macro.
13220
13221 2017-03-20 Marc-Andre Laperle <marc-andre.laperle@ericsson.com>
13222
13223 * NEWS: Add an entry about new '-file-list-shared-libraries' command.
13224 * mi/mi-cmd-file.c (mi_cmd_file_list_shared_libraries):
13225 New function definition.
13226 * mi/mi-cmds.c (mi_cmds): Add -file-list-shared-libraries command.
13227 * mi/mi-cmds.h (mi_cmd_file_list_shared_libraries):
13228 New function declaration.
13229 * mi/mi-interp.c (mi_output_solib_attribs): New Function.
13230 * mi/mi-interp.h: New file.
13231 * solib.c (info_sharedlibrary_command): Replace for loop with
13232 ALL_SO_LIBS macro
13233 * solib.h (update_solib_list): New function declaration.
13234 (so_list_head): Move macro.
13235 * solist.h (ALL_SO_LIBS): New macro.
13236
13237 2017-03-20 Marc-Andre Laperle <marc-andre.laperle@ericsson.com>
13238
13239 * infcmd.c (post_create_inferior): Remove unused argument in
13240 call to solib_add.
13241 * remote.c (remote_start_remote): Likewise.
13242 * solib-frv.c (frv_fetch_objfile_link_map): Likewise.
13243 * solib-svr4.c: (svr4_fetch_objfile_link_map): Likewise.
13244 (enable_break): Likewise.
13245 * solib.c (update_solib_list): Remove unused target argument
13246 and its documentation.
13247 (solib_add): Remove unused target argument. Remove unused
13248 argument in call to update_solib_list.
13249 (info_sharedlibrary_command): Remove unused argument in call
13250 to update_solib_list.
13251 (sharedlibrary_command): Remove unused argument in call to
13252 solib_add.
13253 (handle_solib_event): Likewise.
13254 (reload_shared_libraries): Likewise.
13255 * solib.h (solib_add): Remove unused target argument.
13256
13257 2017-03-20 Andreas Arnez <arnez@linux.vnet.ibm.com>
13258
13259 * s390-linux-tdep.c (is_rsi, is_rie): Remove functions.
13260 (s390_displaced_step_fixup): Cover relative branches with the
13261 default fixup handling. This fixes lack of support for some
13262 relative branch instructions.
13263
13264 2017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
13265
13266 * i386-gnu-nat.c (gnu_fetch_registers, gnu_store_registers): Use
13267 ptid from regcache.
13268
13269 2017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
13270
13271 * i386-darwin-nat.c (i386_darwin_fetch_inferior_registers,
13272 i386_darwin_store_inferior_registers): Use ptid from regcache.
13273
13274 2017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
13275
13276 * i386-bsd-nat.c (i386bsd_fetch_inferior_registers,
13277 i386bsd_store_inferior_registers): Use ptid from regcache.
13278
13279 2017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
13280
13281 * hppa-obsd-nat.c (hppaobsd_fetch_registers,
13282 hppaobsd_store_registers): Use ptid from regcache.
13283
13284 2017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
13285
13286 * hppa-nbsd-nat.c (hppanbsd_fetch_registers,
13287 hppanbsd_store_registers): Use ptid from regcache.
13288
13289 2017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
13290
13291 * hppa-linux-nat.c (fetch_register, store_register): Use ptid
13292 from regcache. Use get_ptrace_pid.
13293
13294 2017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
13295
13296 * corelow.c (get_core_register_section): Use ptid from regcache,
13297 update doc.
13298
13299 2017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
13300
13301 * bsd-uthread.c (bsd_uthread_fetch_registers,
13302 bsd_uthread_store_registers): Use ptid from regcache, set and
13303 restore inferior_ptid.
13304
13305 2017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
13306
13307 * arm-nbsd-nat.c (fetch_register, fetch_regs, fetch_fp_register,
13308 fetch_fp_regs, store_register, store_regs, store_fp_register,
13309 store_fp_regs): Use ptid from regcache.
13310
13311 2017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
13312
13313 * arm-linux-nat.c (fetch_fpregs, store_fpregs, fetch_regs,
13314 store_regs, fetch_wmmx_regs, store_wmmx_regs, fetch_vfp_regs,
13315 store_vfp_regs): Use ptid from regcache.
13316
13317 2017-03-17 Pedro Alves <palves@redhat.com>
13318
13319 PR remote/21188
13320 * ser-base.c (ser_base_wait_for): Add comment.
13321 (do_ser_base_readchar): Improve comment based on the ser-unix.c's
13322 version.
13323 * ser-unix.c (hardwire_raw): Remove reference to
13324 scb->current_timeout.
13325 (wait_for, do_hardwire_readchar, hardwire_readchar): Delete.
13326 (hardwire_ops): Install ser_base_readchar instead of
13327 hardwire_readchar.
13328 * serial.h (struct serial) <current_timeout, timeout_remaining>:
13329 Remove fields.
13330
13331 2017-03-17 Jonah Graham <jonah@kichwacoders.com>
13332
13333 PR gdb/19637
13334 * python/lib/gdb/printer/bound_registers.py: Add support for
13335 Python 3.
13336
13337 2017-03-16 Andreas Arnez <arnez@linux.vnet.ibm.com>
13338
13339 * dwarf2loc.c (indirect_synthetic_pointer): Get data type of
13340 pointed-to DIE and pass it to dwarf2_evaluate_loc_desc_full.
13341 (dwarf2_evaluate_loc_desc_full): New parameter subobj_type; rename
13342 byte_offset to subobj_byte_offset. Fix the handling of
13343 DWARF_VALUE_STACK on big-endian targets when coming via an
13344 implicit pointer.
13345 (dwarf2_evaluate_loc_desc): Adjust call to
13346 dwarf2_evaluate_loc_desc_full.
13347 * dwarf2loc.h (dwarf2_fetch_die_type_sect_off): New declaration.
13348 * dwarf2read.c (dwarf2_fetch_die_type_sect_off): New function.
13349
13350 2017-03-16 Yao Qi <yao.qi@linaro.org>
13351
13352 * arm-tdep.c (thumb_record_misc): Decode CBNZ, CBZ, REV16,
13353 and REVSH instructions.
13354
13355 2017-03-16 Yao Qi <yao.qi@linaro.org>
13356
13357 * arm-tdep.c [GDB_SELF_TEST]: include "selftests.h".
13358 (arm_record_test): Declare.
13359 (_initialize_arm_tdep) [GDB_SELF_TEST]: call register_self_test.
13360 (thumb_record_ld_st_reg_offset): Rewrite the opcode matching to
13361 align with the manual.
13362 (thumb_record_misc): Adjust the code order to align with the
13363 manual.
13364 (thumb2_record_decode_insn_handler): Fix instruction matching.
13365 (instruction_reader_thumb): New class.
13366 (arm_record_test): New function.
13367
13368 2017-03-16 Yao Qi <yao.qi@linaro.org>
13369
13370 * arm-tdep.c (abstract_memory_reader): New class.
13371 (instruction_reader): New class.
13372 (extract_arm_insn): Add argument 'reader'. Callers updated.
13373 (decode_insn): Likewise.
13374
13375 2017-03-16 Doug Evans <dje@google.com>
13376
13377 * guile/scm-lazy-string.c (lazy_string_smob): Clarify use of LENGTH
13378 member. Change type of TYPE member to SCM. All uses updated.
13379 (lsscm_make_lazy_string_smob): Add assert.
13380 (lsscm_make_lazy_string): Flag bad length values.
13381 (lsscm_elt_type): New function.
13382 (gdbscm_lazy_string_to_value): Rewrite to use
13383 lsscm_safe_lazy_string_to_value.
13384 (lsscm_safe_lazy_string_to_value): Fix handling of TYPE_CODE_PTR.
13385 * guile/scm-value.c (gdbscm_value_to_lazy_string): Flag bad length
13386 values. Fix TYPE_CODE_PTR. Handle TYPE_CODE_ARRAY. Handle typedefs
13387 in incoming type.
13388 * guile/guile-internal.h (tyscm_scm_to_type): Declare.
13389 * guile/scm-type.c (tyscm_scm_to_type): New function.
13390
13391 2017-03-15 Doug Evans <dje@google.com>
13392
13393 PR python/17728, python/18439, python/18779
13394 * python/py-lazy-string.c (lazy_string_object): Clarify use of LENGTH
13395 member. Change type of TYPE member to PyObject *. All uses updated.
13396 (stpy_convert_to_value): Fix handling of TYPE_CODE_PTR.
13397 (gdbpy_create_lazy_string_object): Flag bad length values.
13398 Handle TYPE_CODE_ARRAY with possibly different user-provided length.
13399 Handle typedefs in incoming type.
13400 (stpy_lazy_string_elt_type): New function.
13401 (gdbpy_extract_lazy_string): Call it.
13402 * python/py-value.c (valpy_lazy_string): Flag bad length values.
13403 Fix handling of TYPE_CODE_PTR. Handle TYPE_CODE_ARRAY. Handle
13404 typedefs in incoming type.
13405
13406 2017-03-16 Doug Evans <dje@google.com>
13407
13408 * guile/guile-internal.h (tyscm_scm_to_type): Declare.
13409 * guile/scm-type.c (tyscm_scm_to_type): New function.
13410
13411 2017-03-16 Jiong Wang <jiong.wang@arm.com>
13412
13413 * inf-ptrace.c (inf_ptrace_peek_poke): Change the type to
13414 "ULONGEST" for "skip".
13415
13416 2017-03-14 Andreas Arnez <arnez@linux.vnet.ibm.com>
13417
13418 PR gdb/21220
13419 * inf-ptrace.c (inf_ptrace_xfer_partial): In "case
13420 TARGET_OBJECT_MEMORY", extract the logic for ptrace peek/poke...
13421 (inf_ptrace_peek_poke): ...here. New function. Now also loop
13422 over ptrace peek/poke until end of buffer or error.
13423
13424 2017-03-14 Simon Marchi <simon.marchi@ericsson.com>
13425
13426 * parse.c (length_of_subexp): Make static.
13427 * parser-defs.h (length_of_subexp): Remove.
13428
13429 2017-03-14 Andreas Arnez <arnez@linux.vnet.ibm.com>
13430
13431 * linux-nat.c (linux_proc_xfer_partial): Handle write operations
13432 as well.
13433
13434 2017-03-14 Pedro Alves <palves@redhat.com>
13435
13436 * cp-name-parser.y (cp_demangled_name_to_comp): Update comment.
13437 (main): Use std::unique_ptr. Remove calls to
13438 cp_demangled_name_parse_free.
13439
13440 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
13441
13442 * alpha-bsd-nat.c (alphabsd_fetch_inferior_registers,
13443 alphabsd_store_inferior_registers): Use regcache->ptid instead
13444 of inferior_ptid.
13445
13446 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
13447
13448 * aix-thread.c (aix_thread_fetch_registers,
13449 aix_thread_store_registers): Use regcache->ptid instead of
13450 inferior_ptid.
13451
13452 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
13453
13454 * aarch64-linux-nat.c (fetch_gregs_from_thread,
13455 store_gregs_to_thread, fetch_fpregs_from_thread,
13456 store_fpregs_to_thread): Use regcache->ptid instead of
13457 inferior_ptid.
13458
13459 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
13460
13461 * amd64-linux-nat.c (amd64_linux_fetch_inferior_registers,
13462 amd64_linux_fetch_inferior_registers): Use regcache->ptid
13463 instead of inferior_ptid.
13464
13465 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
13466
13467 * target.c (target_fetch_registers, target_store_registers): Add
13468 assert.
13469
13470 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
13471
13472 * regcache.h (regcache_get_ptid): New function.
13473 * regcache.c (regcache_get_ptid): New function.
13474
13475 2017-03-13 Mark Wielaard <mark@klomp.org>
13476
13477 * cp-name-parser.y (make_empty): Initialize d_printing to zero.
13478
13479 2017-03-10 Keith Seitz <keiths@redhat.com>
13480
13481 PR c++/8218
13482 * c-typeprint.c (cp_type_print_method_args): Skip artificial arguments.
13483
13484 2017-03-08 Pedro Alves <palves@redhat.com>
13485
13486 PR gdb/18360
13487 * infrun.c (start_step_over, do_target_resume, resume)
13488 (restart_threads): Assert we're not resuming a thread that is
13489 meant to be stopped.
13490 (infrun_thread_stop_requested_callback): Delete.
13491 (infrun_thread_stop_requested): If the thread is internally
13492 stopped, queue a pending stop event and clear the thread's
13493 inline-frame state.
13494 (handle_stop_requested): New function.
13495 (handle_syscall_event, handle_inferior_event_1): Use
13496 handle_stop_requested.
13497 (handle_stop_requested): New function.
13498 (handle_signal_stop): Set the thread's stop_signal here instead of
13499 at caller.
13500 (finish_step_over): Clear step over info unconditionally.
13501 (handle_signal_stop): If the user had interrupted the event
13502 thread, consider the stop a random signal.
13503 (handle_signal_stop) <signal arrived while stepping over
13504 breakpoint>: Don't restart threads here.
13505 (stop_waiting): Don't clear step-over info here.
13506
13507 2017-03-08 Pedro Alves <palves@redhat.com>
13508
13509 PR 21206
13510 * common/gdb_unlinker.h (unlinker::unlinker): Attribute nonnull
13511 goes to argument 2, not 1.
13512
13513 2017-03-08 Pedro Alves <palves@redhat.com>
13514
13515 PR cli/21218
13516 * top.c (gdb_readline_wrapper): Avoid passing NULL to
13517 display_gdb_prompt.
13518 (command_line_input): Add comment.
13519
13520 2017-03-08 Pedro Alves <palves@redhat.com>
13521
13522 PR tui/21216
13523 * tui/tui-file.c (tui_file::write): New.
13524 * tui/tui-file.h (tui_file): Override "write".
13525 * tui/tui-io.c (do_tui_putc, update_start_line): New functions,
13526 factored out from ...
13527 (tui_puts): ... here.
13528 (tui_putc): Use them.
13529 (tui_write): New function.
13530 * tui/tui-io.h (tui_write): Declare.
13531
13532 2017-03-07 Sergio Durigan Junior <sergiodj@redhat.com>
13533
13534 * Makefile.in (SFILES): Replace "environ.c" with
13535 "common/environ.c".
13536 (HFILES_NO_SRCDIR): Likewise, for "environ.h".
13537 * environ.c: Include "common-defs.h" instead of "defs.h. Moved
13538 to...
13539 * common/environ.c: ... here.
13540 * environ.h: Moved to...
13541 * common/environ.h: ... here.
13542
13543 2017-03-07 Peter Bergner <bergner@vnet.ibm.com>
13544
13545 * gdbarch.sh (pstring_ptr): New static function.
13546 (gdbarch_disassembler_options): Use it.
13547 (gdbarch_verify_disassembler_options): Print valid_disassembler_options,
13548 not valid_disassembler_option->name.
13549 * gdbarch.c: Regenerate.
13550
13551 2017-03-07 Peter Bergner <bergner@vnet.ibm.com>
13552
13553 * config/powerpc/ppc64-linux.mh (MH_CFLAGS): Delete.
13554
13555 2017-03-07 Pedro Alves <palves@redhat.com>
13556
13557 * tui/tui-regs.c (tui_restore_gdbout): Don't delete gdb_stdout.
13558
13559 2017-03-07 Walfred Tedeschi <walfred.tedeschi@intel.com>
13560
13561 * i387-tdep.h (i387_reset_bnd_regs): Add function definition.
13562 * i387-tdep.c (i387_reset_bnd_regs): Add function implementation.
13563 * i386-tdep.c (i386_push_dummy_call): Call i387_reset_bnd_regs.
13564 * amd64-tdep.c (amd64_push_dummy_call): Call i387_reset_bnd_regs.
13565
13566 2017-03-06 Simon Marchi <simon.marchi@ericsson.com>
13567
13568 * xtensa-linux-nat.c (fetch_gregs): Remove const.
13569
13570 2017-03-03 Simon Marchi <simon.marchi@ericsson.com>
13571
13572 * remote.c (remote_add_target_side_commands): Use range-based
13573 for loop.
13574
13575 2017-03-03 Yao Qi <yao.qi@linaro.org>
13576
13577 PR gdb/21165
13578 * ada-valprint.c (ada_val_print_ref): Call value_fetch_lazy if
13579 value is lazy.
13580 * valprint.c (common_val_print): Likewise.
13581
13582 2017-02-28 Peter Bergner <bergner@vnet.ibm.com>
13583
13584 * NEWS: Mention new set/show disassembler-options commands.
13585 * doc/gdb.texinfo: Document new set/show disassembler-options commands.
13586 * disasm.c: Include "arch-utils.h", "gdbcmd.h" and "safe-ctype.h".
13587 (prospective_options): New static variable.
13588 (gdb_disassembler::gdb_disassembler): Initialize
13589 m_di.disassembler_options.
13590 (gdb_buffered_insn_length_init_dis): Initilize di->disassembler_options.
13591 (get_disassembler_options): New function.
13592 (set_disassembler_options): Likewise.
13593 (set_disassembler_options_sfunc): Likewise.
13594 (show_disassembler_options_sfunc): Likewise.
13595 (disassembler_options_completer): Likewise.
13596 (_initialize_disasm): Likewise.
13597 * disasm.h (get_disassembler_options): New prototype.
13598 (set_disassembler_options): Likewise.
13599 * gdbarch.sh (gdbarch_disassembler_options): New variable.
13600 (gdbarch_verify_disassembler_options): Likewise.
13601 * gdbarch.c: Regenerate.
13602 * gdbarch.h: Likewise.
13603 * arm-tdep.c (num_disassembly_options): Delete.
13604 (set_disassembly_style): Likewise.
13605 (arm_disassembler_options): New static variable.
13606 (set_disassembly_style_sfunc): Convert short style name into long
13607 option name. Call set_disassembler_options.
13608 (show_disassembly_style_sfunc): New function.
13609 (arm_gdbarch_init): Call set_gdbarch_disassembler_options and
13610 set_gdbarch_verify_disassembler_options.
13611 (_initialize_arm_tdep): Delete regnames variable and update callers.
13612 (arm_disassembler_options): Initialize.
13613 (disasm_options): New variable.
13614 (num_disassembly_options): Rename from this...
13615 (num_disassembly_styles): ...to this. Compute by scanning through
13616 disasm_options.
13617 (valid_disassembly_styles): Initialize using disasm_options.
13618 Remove calls to parse_arm_disassembler_option, get_arm_regnames and
13619 set_arm_regname_option.
13620 Pass show_disassembly_style_sfunc to the "disassembler" setshow command.
13621 * rs6000-tdep.c (powerpc_disassembler_options): New static variable.
13622 (rs6000_gdbarch_init): Call set_gdbarch_disassembler_options and
13623 set_gdbarch_verify_disassembler_options.
13624 * s390-tdep.c (s390_disassembler_options): New static variable.
13625 (s390_gdbarch_init):all set_gdbarch_disassembler_options and
13626 set_gdbarch_verify_disassembler_options.
13627
13628 2017-02-27 Simon Marchi <simon.marchi@ericsson.com>
13629
13630 * remote.c (remote_add_target_side_condition): Remove "struct"
13631 keyword from range-based for loop.
13632
13633 2017-02-27 Simon Marchi <simon.marchi@ericsson.com>
13634
13635 * remote.c (remote_add_target_side_condition): Use range-based
13636 for loop. Update comment.
13637
13638 2017-02-27 Yao Qi <yao.qi@linaro.org>
13639
13640 * f-typeprint.c (f_print_type): Check "varstring" is empty first.
13641
13642 2017-02-26 Alan Hayward <alan.hayward@arm.com>
13643
13644 * regcache.c (regcache_raw_update): New function.
13645 (regcache_raw_read): Move code to regcache_raw_update.
13646 * regcache.h (regcache_raw_update): New declaration.
13647 * remote.c (remote_prepare_to_store): Call regcache_raw_update.
13648
13649 2017-02-26 Jan Kratochvil <jan.kratochvil@redhat.com>
13650
13651 * dwarf2read.c (create_debug_type_hash_table): Initialize
13652 header.signature and header.type_offset_in_tu.
13653
13654 2017-02-24 Pedro Alves <palves@redhat.com>
13655
13656 * symtab.c (make_file_symbol_completion_list_1): Use
13657 add_symtab_completions.
13658
13659 2017-02-24 Alan Hayward <alan.hayward@arm.com>
13660
13661 * stack.c (frame_info): Use frame_unwind_register_value to avoid buf.
13662
13663 2017-02-24 Alan Hayward <alan.hayward@arm.com>
13664
13665 * i386-tdep.c (i386_pseudo_register_read_into_value): Use
13666 I386_MAX_REGISTER_SIZE.
13667 (i386_pseudo_register_write): Likewise.
13668 (i386_process_record): Likewise.
13669 * i387-tdep.c (i387_supply_xsave): Likewise.
13670 * m68k-linux-nat.c (fetch_register): Use M68K_MAX_REGISTER_SIZE.
13671 (store_register): Likewise.
13672
13673 2017-02-23 Pedro Alves <palves@redhat.com>
13674
13675 * ada-lang.c: Include "common/function-view.h".
13676 (ada_iterate_over_symbols): Adjust to use function_view as
13677 callback type.
13678 (struct add_partial_datum, ada_complete_symbol_matcher): Delete.
13679 (ada_make_symbol_completion_list): Use a lambda.
13680 (ada_exc_search_name_matches): Delete.
13681 (name_matches_regex): New.
13682 (ada_add_global_exceptions): Use a lambda and name_matches_regex.
13683 * compile/compile-c-support.c: Include "common/function-view.h".
13684 (print_one_macro): Change prototype to accept a ui_file pointer.
13685 (write_macro_definitions): Use a lambda.
13686 * dwarf2read.c: Include "common/function-view.h".
13687 (dw2_map_expand_apply, dw2_map_symtabs_matching_filename)
13688 (dw2_expand_symtabs_matching): Adjust to use function_view as
13689 callback type.
13690 * language.h: Include "common/function-view.h".
13691 (struct language_defn) <la_iterate_over_symbols>: Adjust to use
13692 function_view as callback type.
13693 (LA_ITERATE_OVER_SYMBOLS): Remove DATA parameter.
13694 * linespec.c: Include "common/function-view.h".
13695 (collect_info::add_symbol): New method.
13696 (struct symbol_and_data_callback, iterate_inline_only, struct
13697 symbol_matcher_data, iterate_name_matcher): Delete.
13698 (iterate_over_all_matching_symtabs): Adjust to use function_view
13699 as callback type and lambdas.
13700 (iterate_over_file_blocks): Adjust to use function_view as
13701 callback type.
13702 (decode_compound_collector): Now a class with private fields.
13703 (decode_compound_collector::release_symbols): New method.
13704 (collect_one_symbol): Rename to...
13705 (decode_compound_collector::operator()): ... this and adjust.
13706 (lookup_prefix_sym): decode_compound_collector construction bits
13707 move to decode_compound_collector ctor. Pass the
13708 decode_compound_collector object directly as callback. Remove
13709 cleanups and use decode_compound_collector::release_symbols
13710 instead.
13711 (symtab_collector): Now a class with private fields.
13712 (symtab_collector::release_symtabs): New method.
13713 (add_symtabs_to_list): Rename to...
13714 (symtab_collector::operator()): ... this and adjust.
13715 (collect_symtabs_from_filename): symtab_collector construction
13716 bits move to symtab_collector ctor. Pass the symtab_collector
13717 object directly as callback. Remove cleanups and use
13718 symtab_collector::release_symtabs instead.
13719 (collect_symbols): Delete.
13720 (add_matching_symbols_to_info): Use lambdas.
13721 * macrocmd.c (print_macro_callback): Delete.
13722 (info_macro_command): Use a lambda.
13723 (info_macros_command): Pass print_macro_definition as callable
13724 directly.
13725 (print_one_macro): Remove 'ignore' parameter.
13726 (macro_list_command): Adjust.
13727 * macrotab.c (macro_for_each_data::fn): Now a function_view.
13728 (macro_for_each_data::user_data): Delete field.
13729 (foreach_macro): Adjust to call the function_view.
13730 (macro_for_each): Adjust to use function_view as callback type.
13731 (foreach_macro_in_scope): Adjust to call the function_view.
13732 (macro_for_each_in_scope): Adjust to use function_view as callback
13733 type.
13734 * macrotab.h: Include "common/function-view.h".
13735 (macro_callback_fn): Declare a prototype instead of a pointer.
13736 Remove "user_data" parameter.
13737 (macro_for_each, macro_for_each_in_scope): Adjust to use
13738 function_view as callback type.
13739 * psymtab.c (partial_map_expand_apply)
13740 (psym_map_symtabs_matching_filename, recursively_search_psymtabs):
13741 Adjust to use function_view as callback type and to return bool.
13742 (psym_expand_symtabs_matching): Adjust to use function_view as
13743 callback types.
13744 * symfile-debug.c (debug_qf_map_symtabs_matching_filename): Adjust
13745 to use function_view as callback type and to return bool.
13746 (debug_qf_expand_symtabs_matching): Adjust to use function_view as
13747 callback types.
13748 * symfile.c (expand_symtabs_matching): Adjust to use function_view
13749 as callback types.
13750 * symfile.h: Include "common/function-view.h".
13751 (expand_symtabs_file_matcher_ftype)
13752 (expand_symtabs_symbol_matcher_ftype)
13753 (expand_symtabs_exp_notify_ftype): Remove "data" parameter and
13754 return bool.
13755 (quick_symbol_functions::map_symtabs_matching_filename)
13756 (quick_symbol_functions::expand_symtabs_matching): Adjust to use
13757 function_view as callback type and return bool.
13758 (expand_symtabs_matching): Adjust to use function_view as callback
13759 type.
13760 (maintenance_expand_name_matcher)
13761 (maintenance_expand_file_matcher): Delete.
13762 (maintenance_expand_symtabs): Use lambdas.
13763 * symtab.c (iterate_over_some_symtabs): Adjust to use
13764 function_view as callback types and return bool.
13765 (iterate_over_symtabs): Likewise. Use unique_xmalloc_ptr instead
13766 of a cleanup.
13767 (lookup_symtab_callback): Delete.
13768 (lookup_symtab): Use a lambda.
13769 (iterate_over_symbols): Adjust to use function_view as callback
13770 type.
13771 (struct search_symbols_data, search_symbols_file_matches)
13772 (search_symbols_name_matches): Delete.
13773 (search_symbols): Use a pair of lambdas.
13774 (struct add_name_data, add_macro_name, symbol_completion_matcher)
13775 (symtab_expansion_callback): Delete.
13776 (default_make_symbol_completion_list_break_on_1): Use lambdas.
13777 * symtab.h: Include "common/function-view.h".
13778 (iterate_over_some_symtabs): Adjust to use function_view as
13779 callback type and return bool.
13780 (iterate_over_symtabs): Adjust to use function_view as callback
13781 type.
13782 (symbol_found_callback_ftype): Remove 'data' parameter and return
13783 bool.
13784 (iterate_over_symbols): Adjust to use function_view as callback
13785 type.
13786
13787 2017-02-23 Pedro Alves <palves@redhat.com>
13788
13789 * Makefile.in (SUBDIR_UNITTESTS_SRCS, SUBDIR_UNITTESTS_OBS): New.
13790 (%.o) <unittests/%.c>: New pattern.
13791 * configure.ac ($development): Add $(SUBDIR_UNITTESTS_OBS) to
13792 CONFIG_OBS, and $(SUBDIR_UNITTESTS_SRCS) to CONFIG_SRCS.
13793 * common/function-view.h: New file.
13794 * unittests/function-view-selftests.c: New file.
13795 * configure: Regenerate.
13796
13797 2017-02-23 Simon Marchi <simon.marchi@ericsson.com>
13798
13799 * bsd-uthread.c (bsd_uthread_thread_alive): Use ptid instead of
13800 inferior_ptid.
13801 * go32-nat.c (go32_thread_alive): Likewise.
13802
13803 2017-02-23 Yao Qi <yao.qi@linaro.org>
13804
13805 * varobj-iter.h (varobj_iter_delete): Call xfree instead of
13806 delete.
13807
13808 2017-02-23 Yao Qi <yao.qi@linaro.org>
13809
13810 * varobj.c (varobj_clear_saved_item): Use delete instead of
13811 xfree.
13812 (update_dynamic_varobj_children): Likewise.
13813
13814 2017-02-21 Jan Kratochvil <jan.kratochvil@redhat.com>
13815
13816 * dwarf2read.c (dwarf2_record_block_ranges): Add forgotten BASEADDR.
13817
13818 2017-02-21 Simon Marchi <simon.marchi@ericsson.com>
13819
13820 * common/enum-flags.h (enum_flags::enum_flags): Initialize
13821 m_enum_value to 0 in default constructor.
13822
13823 2017-02-21 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
13824
13825 * rs6000-tdep.c (LOAD_AND_RESERVE_MASK): Rename from LWARX_MASK.
13826 (STORE_CONDITIONAL_MASK): Rename from STWCX_MASK.
13827 (LBARX_INSTRUCTION, LHARX_INSTRUCTION, LQARX_INSTRUCTION,
13828 STBCX_INSTRUCTION, STHCX_INSTRUCTION, STQCX_INSTRUCTION): New defines.
13829 (IS_LOAD_AND_RESERVE_INSN, IS_STORE_CONDITIONAL_INSN): New macros.
13830 (ppc_displaced_step_copy_insn): Use IS_LOAD_AND_RESERVE_INSN.
13831 (ppc_deal_with_atomic_sequence): Use IS_LOAD_AND_RESERVE_INSN and
13832 IS_STORE_CONDITIONAL_INSN.
13833
13834 2017-02-21 Jan Kratochvil <jan.kratochvil@redhat.com>
13835
13836 * dwarf2_rnglists_process: Initialize range_beginning and range_end.
13837
13838 2017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
13839
13840 * NEWS (Changes since GDB 7.12): Add DWARF-5.
13841
13842 2017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
13843
13844 * dwarf2read.c (skip_one_die, read_attribute_value)
13845 (dwarf2_const_value_attr, dump_die_shallow)
13846 (dwarf2_get_attr_constant_value, dwarf2_fetch_constant_bytes)
13847 (skip_form_bytes, attr_form_is_constant): Handle DW_FORM_data16.
13848
13849 2017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
13850
13851 * dwarf2read.c (read_file_scope): Rename DW_MACRO_GNU_*.
13852 (dwarf_parse_macro_header): Accept DWARF version 5.
13853 (dwarf_decode_macro_bytes, dwarf_decode_macros): Rename DW_MACRO_GNU_*.
13854
13855 2017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
13856
13857 * block.c (call_site_for_pc): Rename DW_OP_GNU_*, DW_TAG_GNU_* and
13858 DW_AT_GNU_*.
13859 * common/common-exceptions.h (enum errors): Likewise.
13860 * dwarf2-frame.c (class dwarf_expr_executor): Likewise.
13861 * dwarf2expr.c (dwarf_block_to_dwarf_reg)
13862 (dwarf_expr_context::execute_stack_op): Likewise.
13863 * dwarf2expr.h (struct dwarf_expr_context, struct dwarf_expr_piece):
13864 Likewise.
13865 * dwarf2loc.c (dwarf_evaluate_loc_desc::get_base_type)
13866 (dwarf_evaluate_loc_desc::push_dwarf_reg_entry_value)
13867 (show_entry_values_debug, call_site_to_target_addr)
13868 (func_addr_to_tail_call_list, func_verify_no_selftailcall)
13869 (dwarf_expr_reg_to_entry_parameter, dwarf_entry_parameter_to_value)
13870 (entry_data_value_free_closure, value_of_dwarf_reg_entry)
13871 (value_of_dwarf_block_entry, indirect_pieced_value)
13872 (symbol_needs_eval_context::push_dwarf_reg_entry_value):
13873 (disassemble_dwarf_expression): Likewise.
13874 * dwarf2read.c (process_die, inherit_abstract_dies)
13875 (read_call_site_scope): Likewise.
13876 * gdbtypes.h (struct func_type, struct call_site_parameter)
13877 (struct call_site): Likewise.
13878 * stack.c (read_frame_arg): Likewise.
13879 * std-operator.def (OP_VAR_ENTRY_VALUE): Likewise.
13880
13881 2017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
13882
13883 * defs.h (read_unsigned_leb128): New declaration.
13884 * dwarf2loc.c (decode_debug_loclists_addresses): New function.
13885 (decode_debug_loc_dwo_addresses): Update DEBUG_LOC_* to DW_LLE_*.
13886 (dwarf2_find_location_expression): Call also
13887 decode_debug_loclists_addresses. Handle DWARF-5 ULEB128 length.
13888 * dwarf2loc.h (dwarf2_version): New declaration.
13889 * dwarf2read.c (struct dwarf2_per_objfile): Add loclists, line_str,
13890 rnglists.
13891 (dwarf2_elf_names): Add .debug_loclists, .debug_line_str,
13892 .debug_rnglists.
13893 (struct dwop_section_names): Add loclists_dwo.
13894 (dwop_section_names): Add .debug_loclists.dwo.
13895 (struct comp_unit_head): Add unit_type, signature, type_offset_in_tu.
13896 (struct dwarf2_per_cu_data): Add dwarf_version.
13897 (struct dwo_sections): Add loclists.
13898 (struct attr_abbrev): Add implicit_const.
13899 (read_indirect_line_string): New declaration.
13900 (read_unsigned_leb128): Delete declaration.
13901 (rcuh_kind): New definition.
13902 (read_and_check_comp_unit_head): Change parameter
13903 is_debug_types_section to section_kind.
13904 (dwarf2_locate_sections): Handle loclists, line_str and rnglists.
13905 (read_comp_unit_head): Change parameter abfd to section, add parameter
13906 section_kind. Handle DWARF-5.
13907 (error_check_comp_unit_head): Accept also DWARF version 5.
13908 (read_and_check_comp_unit_head): Change parameter
13909 is_debug_types_section to section_kind.
13910 (read_and_check_type_unit_head): Delete function.
13911 (read_abbrev_offset): Handle DWARF-5.
13912 (create_debug_type_hash_table): Add parameter section_kind. Process
13913 only DW_UT_type. Use signature and type_offset_in_tu from struct
13914 comp_unit_head.
13915 (create_debug_types_hash_table): Update create_debug_type_hash_table
13916 caller.
13917 (create_all_type_units): Call create_debug_type_hash_table.
13918 (read_cutu_die_from_dwo, init_cutu_and_read_dies): Change
13919 read_and_check_type_unit_head caller to read_and_check_comp_unit_head
13920 caller.
13921 (skip_one_die): Handle DW_FORM_implicit_const.
13922 (dwarf2_rnglists_process): New function.
13923 (dwarf2_ranges_process): Call dwarf2_rnglists_process for DWARF-5.
13924 (abbrev_table_read_table): Handle DW_FORM_implicit_const.
13925 (read_attribute_value): Handle DW_FORM_implicit_const,
13926 DW_FORM_line_strp.
13927 (read_attribute): Handle DW_FORM_implicit_const.
13928 (read_indirect_string_at_offset_from): New function from
13929 read_indirect_string_at_offset.
13930 (read_indirect_string_at_offset): Call
13931 read_indirect_string_at_offset_from.
13932 (read_indirect_line_string_at_offset): New function.
13933 (read_indirect_string): New function comment.
13934 (read_indirect_line_string): New function.
13935 (read_unsigned_leb128): Make it global.
13936 (dwarf2_string_attr): Handle DWARF-5.
13937 (add_include_dir_stub, read_formatted_entries): New functions.
13938 (dwarf_decode_line_header, dump_die_shallow, cu_debug_loc_section):
13939 Handle DWARF-5.
13940 (per_cu_header_read_in): Update read_comp_unit_head caller.
13941 (dwarf2_version): New function.
13942 * symfile.h (struct dwarf2_debug_sections): Add loclists, line_str and
13943 rnglists.
13944 * xcoffread.c (dwarf2_xcoff_names): Update struct dwarf2_debug_sections
13945 fields.
13946
13947 2017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
13948
13949 * dwarf2read.c (abbrev_table_read_table): Read the data only once.
13950
13951 2017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
13952
13953 * dwarf2read.c (dwarf2_ranges_process): New function from
13954 dwarf2_ranges_read.
13955 (dwarf2_ranges_read, dwarf2_record_block_ranges): Use
13956 dwarf2_ranges_process.
13957
13958 2017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
13959
13960 * dwarf2read.c (create_debug_type_hash_table): New function from
13961 create_debug_types_hash_table.
13962 (create_debug_types_hash_table): Call create_debug_type_hash_table.
13963 (create_all_type_units, open_and_init_dwo_file): Update
13964 create_debug_types_hash_table callers.
13965
13966 2017-02-20 Sergio Durigan Junior <sergiodj@redhat.com>
13967
13968 PR gdb/16188
13969 * fork-child.c (trace_start_error): Fix thinko. va_end should
13970 refer to 'ap', not 'args'.
13971
13972 2017-02-20 Sergio Durigan Junior <sergiodj@redhat.com>
13973 Pedro Alves <palves@redhat.com>
13974
13975 PR gdb/16188
13976 * darwin-nat.c (darwin_ptrace_me): Check if calls to system
13977 calls succeeded.
13978 * fork-child.c (trace_start_error): New function.
13979 (trace_start_error_with_name): Likewise.
13980 * gnu-nat.c (gnu_ptrace_me): Check if call to PTRACE succeeded.
13981 * inf-ptrace.c (inf_ptrace_me): Likewise.
13982 * inferior.h (trace_start_error): New prototype.
13983 (trace_start_error_with_name): Likewise.
13984
13985 2017-02-15 Sergio Durigan Junior <sergiodj@redhat.com>
13986
13987 PR gdb/21164
13988 * psymtab.c (maintenance_print_psymbols): Verify if 'argv' is not
13989 NULL before using it.
13990 * symmisc.c (maintenance_print_symbols): Likewise.
13991 (maintenance_print_msymbols): Likewise.
13992
13993 2017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
13994
13995 * NEWS: Add record Python bindings entry.
13996
13997 2017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
13998
13999 * Makefile.in (SUBDIR_PYTHON_OBS): Add py-record-btrace.o,
14000 py-record-full.o.
14001 (SUBDIR_PYTHON_SRCS): Add py-record-btrace.c, py-record-full.c.
14002 * python/py-record-btrace.c, python/py-record-btrace.h,
14003 python/py-record-full.c, python/py-record-full.h: New file.
14004 * python/py-record.c: Add include for py-record-btrace.h and
14005 py-record-full.h.
14006 (recpy_method, recpy_format, recpy_goto, recpy_replay_position,
14007 recpy_instruction_history, recpy_function_call_history, recpy_begin,
14008 recpy_end): Use functions from py-record-btrace.c and py-record-full.c.
14009 * python/python-internal.h (PyInt_FromSsize_t, PyInt_AsSsize_t):
14010 New definition.
14011 (gdbpy_initialize_btrace): New export.
14012 * python/python.c (_initialize_python): Add gdbpy_initialize_btrace.
14013
14014 2017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
14015
14016 * Makefile.in (SUBDIR_PYTHON_OBS): Add python/py-record.o.
14017 (SUBDIR_PYTHON_SRCS): Add python/py-record.c.
14018 * python/py-record.c: New file.
14019 * python/python-internal.h (gdbpy_start_recording,
14020 gdbpy_current_recording, gdpy_stop_recording,
14021 gdbpy_initialize_record): New export.
14022 * python/python.c (_initialize_python): Add gdbpy_initialize_record.
14023 (python_GdbMethods): Add gdbpy_start_recording,
14024 gdbpy_current_recording and gdbpy_stop_recording.
14025
14026 2017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
14027
14028 * record-btrace.c (record_btrace_record_method): New function.
14029 (init_record_btrace_ops): Initialize to_record_method.
14030 * record-full.c (record_full_record_method): New function.
14031 (init_record_full_ops, init_record_full_core_ops): Add
14032 record_full_record_method.
14033 * record.h (enum record_method): New enum.
14034 * target-debug.h (target_debug_print_enum_record_method: New define.
14035 * target-delegates.c: Regenerate.
14036 * target.c (target_record_method): New function.
14037 * target.h: Include record.h.
14038 (struct target_ops) <to_record_method>: New field.
14039 (target_record_method): New export.
14040
14041 2017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
14042
14043 * record.h (record_start, record_stop): New export.
14044 * record.c (record_start, record_stop): New function.
14045
14046 2017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
14047
14048 * btrace.c (btrace_fetch): Copy function call segments pointer
14049 into a vector.
14050 (btrace_clear): Clear the vector.
14051 (btrace_find_insn_by_number): Use binary search to find the correct
14052 function call segment.
14053 * btrace.h (brace_fun_p): New typedef.
14054 (struct btrace_thread_info) <functions>: New field.
14055
14056 2017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
14057
14058 * record-btrace.c (btrace_ui_out_decode_error): Move most of it ...
14059 * btrace.c (btrace_decode_error): ... here. New function.
14060 * btrace.h (btrace_decode_error): New export.
14061
14062 2017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
14063
14064 * btrace.c (ftrace_call_num_insn, btrace_insn_get_error): New function.
14065 (ftrace_new_function, btrace_insn_number, btrace_insn_cmp,
14066 btrace_find_insn_by_number): Remove special case for gaps.
14067 * btrace.h (btrace_insn_get_error): New export.
14068 (btrace_insn_number, btrace_find_insn_by_number): Adjust comment.
14069 * record-btrace.c (btrace_insn_history): Print number for gaps.
14070 (record_btrace_info, record_btrace_goto): Handle gaps.
14071
14072 2017-02-14 Tom Tromey <tom@tromey.com>
14073
14074 PR python/13598:
14075 * python/python.c (gdbpy_before_prompt_hook): Emit before_prompt
14076 event.
14077 * python/py-evts.c (gdbpy_initialize_py_events): Add
14078 before_prompt registry.
14079 * python/py-events.h (events_object) <before_prompt>: New field.
14080
14081 2017-02-14 Markus Metzger <markus.t.metzger@intel.com>
14082
14083 * btrace.c (ftrace_new_switch): Preserve up link and flags.
14084
14085 2017-02-13 Luis Machado <lgustavo@codesourcery.com>
14086
14087 * symfile (_initialize_symfile): Add usage text to the load command's
14088 help text.
14089
14090 2017-02-10 Simon Marchi <simon.marchi@ericsson.com>
14091
14092 * utils.c (defaulted_query): Don't query on secondary UIs.
14093
14094 2017-02-10 Tom Tromey <tom@tromey.com>
14095
14096 * rust-lang.c (rust_get_disr_info): Remove unused variable.
14097
14098 2017-02-10 Tom Tromey <tom@tromey.com>
14099
14100 * python/py-value.c (valpy_richcompare_throw): Remove unnecessary
14101 "cleanup" local.
14102 * python/py-type.c (typy_legacy_template_argument): Remove
14103 unnecessary "cleanup" local.
14104
14105 2017-02-10 Tom Tromey <tom@tromey.com>
14106
14107 * python/python.c (do_start_initialization): New function, from
14108 _initialize_python.
14109 (_initialize_python): Call do_start_initialization.
14110 * python/py-linetable.c (ltpy_iternext): Use explicit returns, not
14111 goto.
14112
14113 2017-02-10 Tom Tromey <tom@tromey.com>
14114
14115 * python/py-prettyprint.c (pretty_print_one_value): Use
14116 gdbpy_ref.
14117
14118 2017-02-10 Tom Tromey <tom@tromey.com>
14119
14120 * python/py-cmd.c (cmdpy_destroyer): Use gdbpy_ref.
14121 * python/py-breakpoint.c (gdbpy_breakpoint_deleted): Use
14122 gdbpy_ref.
14123 * python/py-type.c (field_new): Use gdbpy_ref.
14124 * python/py-symtab.c (symtab_and_line_to_sal_object): Use
14125 gdbpy_ref.
14126 * python/py-progspace.c (pspy_new): Use gdbpy_ref.
14127 (py_free_pspace): Likewise.
14128 (pspace_to_pspace_object): Likewise.
14129 * python/py-objfile.c (objfpy_new): Use gdbpy_ref.
14130 (py_free_objfile): Likewise.
14131 (objfile_to_objfile_object): Likewise.
14132 * python/py-inferior.c (delete_thread_object): Use
14133 gdbpy_ref.
14134 (infpy_read_memory): Likewise.
14135 (py_free_inferior): Likewise.
14136 * python/py-evtregistry.c (create_eventregistry_object): Use
14137 gdbpy_ref.
14138 * python/py-event.c (create_event_object): Use gdbpy_ref.
14139
14140 2017-02-10 Tom Tromey <tom@tromey.com>
14141
14142 * python/py-ref.h (gdbpy_ref_policy): Now a template.
14143 (gdbpy_ref): Now a template; allow subclasses of PyObject to be
14144 used.
14145 * python/py-arch.c, python/py-bpevent.c, python/py-breakpoint.c,
14146 python/py-cmd.c, python/py-continueevent.c, python/py-event.c,
14147 python/py-exitedevent.c, python/py-finishbreakpoint.c,
14148 python/py-framefilter.c, python/py-function.c,
14149 python/py-inferior.c, python/py-infevents.c,
14150 python/py-linetable.c, python/py-newobjfileevent.c,
14151 python/py-param.c, python/py-prettyprint.c, python/py-ref.h,
14152 python/py-signalevent.c, python/py-stopevent.c,
14153 python/py-symbol.c, python/py-threadevent.c, python/py-type.c,
14154 python/py-unwind.c, python/py-utils.c, python/py-value.c,
14155 python/py-varobj.c, python/py-xmethods.c, python/python.c,
14156 varobj.c: Change gdbpy_ref to gdbpy_ref<>.
14157
14158 2017-02-10 Tom Tromey <tom@tromey.com>
14159
14160 * ui-out.h (ui_out_emit_type): New class.
14161 (ui_out_emit_tuple, ui_out_emit_list): New typedefs.
14162 * python/py-framefilter.c (py_print_single_arg): Use gdb::optional
14163 and ui_out_emit_tuple.
14164 (enumerate_locals): Likewise.
14165 (py_mi_print_variables, py_print_locals, py_print_args): Use
14166 ui_out_emit_list.
14167 (py_print_frame): Use gdb::optional, ui_out_emit_tuple,
14168 ui_out_emit_list.
14169 * common/gdb_optional.h: New file.
14170
14171 2017-02-10 Martin Galvan <martingalvan@sourceware.org>
14172
14173 * MAINTAINERS (Write After Approval): Update my e-mail address.
14174
14175 2017-02-10 Martin Galvan <martingalvan@sourceware.org>
14176
14177 PR gdb/21122
14178 * breakpoint.c (_initialize_breakpoint): Update the help description
14179 of the 'commands' command to indicate that it takes a list argument.
14180
14181 2017-02-09 Simon Marchi <simon.marchi@ericsson.com>
14182
14183 * interps.c (current_interp_set_logging): Remove "return".
14184
14185 2017-02-09 Gary Benson <gbenson@redhat.com>
14186
14187 * symtab.c (add_symtab_completions): Prevent NULL pointer
14188 dereference.
14189
14190 2017-02-08 Pedro Alves <palves@redhat.com>
14191
14192 * interps.c (interp::interp): Remove reference to quiet_p.
14193 (interp_set): Make static. Remove dead "Switching to" output
14194 code.
14195 (interp_quiet_p, interp_set_quiet): Delete.
14196 (interpreter_exec_cmd): Don't set the interpreter quiet.
14197 * interps.h (interp_quiet_p): Make static.
14198 (class interp) <quiet_p>: Remove field
14199
14200 2017-02-08 Jerome Guitton <guitton@adacore.com>
14201
14202 * cli/cli-decode.c (find_command_name_length): Make it extern.
14203 * cli/cli-decode.h (find_command_name_length): Declare.
14204 * cli/cli-script.c (command_name_equals, line_first_arg):
14205 New functions.
14206 (process_next_line): Use cli-decode to parse command names.
14207 (build_command_line): Make args a constant pointer.
14208
14209 2017-02-08 Jerome Guitton <guitton@adacore.com>
14210
14211 * cli-decode.c (lookup_cmd_1, lookup_cmd_composition):
14212 Remove case-insensitive search.
14213
14214 2017-02-07 Jose E. Marchesi <jose.marchesi@oracle.com>
14215
14216 * sparc-tdep.c (sparc32_gdbarch_init): Do not place a + operator
14217 at the end of the line. Avoids an ARI warning.
14218
14219 2017-02-06 Luis Machado <lgustavo@codesourcery.com>
14220
14221 * NEWS: Mention support for record/replay of Intel 64 rdrand and
14222 rdseed instructions.
14223 i386-tdep.c (i386_process_record): Handle Intel 64 rdrand and rseed.
14224
14225 2017-02-06 Ivo Raisr <ivo.raisr@oracle.com>
14226
14227 PR tdep/20936
14228 Provide and use sparc32 and sparc64 target description XML files.
14229 * features/sparc/sparc32-cp0.xml, features/sparc/sparc32-cpu.xml,
14230 features/sparc/sparc32-fpu.xml: New files for sparc 32-bit.
14231 * features/sparc/sparc64-cp0.xml, features/sparc/sparc64-cpu.xml,
14232 features/sparc/sparc64-fpu.xml: New files for sparc 64-bit.
14233 * features/sparc/sparc32-solaris.xml: New file.
14234 * features/sparc/sparc64-solaris.xml: New file.
14235 * features/sparc/sparc32-solaris.c: Generated.
14236 * features/sparc/sparc64-solaris.c: Generated.
14237 * sparc-tdep.h: Account for differences in target descriptions.
14238 * sparc-tdep.c (sparc32_register_name): Use target provided registers.
14239 (sparc32_register_type): Use target provided registers.
14240 (validate_tdesc_registers): New function.
14241 (sparc32_gdbarch_init): Use tdesc_has_registers.
14242 Set pseudoregister functions.
14243 * sparc64-tdep.c (sparc64_register_name): Use target provided registers.
14244 (sparc64_register_type): Use target provided registers.
14245 (sparc64_init_abi): Set pseudoregister functions.
14246
14247 2017-02-03 Tom Tromey <tom@tromey.com>
14248
14249 PR rust/21097:
14250 * rust-lang.c (rust_print_type) <TYPE_CODE_UNION>: Handle enums
14251 with a single member.
14252
14253 2017-02-03 Pedro Alves <palves@redhat.com>
14254
14255 * cli/cli-interp.c (cli_interp_base::cli_interp_base)
14256 (cli_interp_base::~cli_interp_base): New.
14257 (cli_interp): New struct.
14258 (as_cli_interp): Cast the interp itself to cli_interp.
14259 (cli_interpreter_pre_command_loop): Rename to ...
14260 (cli_interp_base::pre_command_loop): ... this. Remove 'self'
14261 parameter.
14262 (cli_interpreter_init): Rename to ...
14263 (cli_interp::init): ... this. Remove 'self' parameter. Use
14264 boolean. Make extern.
14265 (cli_interpreter_resume): Rename to ...
14266 (cli_interp::resume): ... this. Remove 'data' parameter. Make
14267 extern.
14268 (cli_interpreter_suspend): Rename to ...
14269 (cli_interp::suspend): ... this. Remove 'data' parameter. Make
14270 extern.
14271 (cli_interpreter_exec): Rename to ...
14272 (cli_interp::exec): ... this. Remove 'data' parameter. Make
14273 extern.
14274 (cli_interpreter_supports_command_editing): Rename to ...
14275 (cli_interp_base::supports_command_editing): ... this. Remove
14276 'interp' parameter. Make extern.
14277 (cli_ui_out): Rename to ...
14278 (cli_interp::interp_ui_out): ... this. Remove 'interp' parameter.
14279 Make extern.
14280 (cli_set_logging): Rename to ...
14281 (cli_interp_base::set_logging): ... this. Remove 'interp'
14282 parameter. Make extern.
14283 (cli_interp_procs): Delete.
14284 (cli_interp_factory): Adjust to use "new".
14285 * cli/cli-interp.h: Include "interps.h".
14286 (struct cli_interp_base): New struct.
14287 * interps.c (struct interp): Delete. Fields moved to interps.h.
14288 (interp_new): Delete.
14289 (interp::interp, interp::~interp): New.
14290 (interp_set): Use bool, and return void. Assume the interpreter
14291 has suspend, init and resume methods, and that the all return
14292 void.
14293 (set_top_level_interpreter): interp_set returns void.
14294 (interp_ui_out): Adapt.
14295 (current_interp_set_logging): Adapt.
14296 (interp_data): Delete.
14297 (interp_pre_command_loop, interp_supports_command_editing): Adapt.
14298 (interp_exec): Adapt.
14299 (top_level_interpreter_data): Delete.
14300 * interps.h (interp_init_ftype, interp_resume_ftype)
14301 (interp_suspend_ftype, interp_exec_ftype)
14302 (interp_pre_command_loop_ftype, interp_ui_out_ftype): Delete.
14303 (class interp): New.
14304 (interp_new): Delete.
14305 (interp_set): Now returns void. Use bool.
14306 (interp_data, top_level_interpreter_data): Delete.
14307 * mi/mi-common.h: Include interps.h.
14308 (class mi_interp): Inherit from interp. Define a ctor. Declare
14309 init, resume, suspect, exec, interp_ui_out, set_logging and
14310 pre_command_loop methods.
14311 * mi/mi-interp.c (as_mi_interp): Cast the interp itself.
14312 (mi_interpreter_init): Rename to ...
14313 (mi_interp::init): ... this. Remove the 'interp' parameter, use
14314 bool, return void and make extern. Adjust.
14315 (mi_interpreter_resume): ... Rename to ...
14316 (mi_interp::resume): ... this. Remove the 'data' parameter,
14317 return void and make extern. Adjust.
14318 (mi_interpreter_suspend): ... Rename to ...
14319 (mi_interp::suspend): ... this. Remove the 'data' parameter,
14320 return void and make extern. Adjust.
14321 (mi_interpreter_exec): ... Rename to ...
14322 (mi_interp::exec): ... this. Remove the 'data' parameter and make
14323 extern. Adjust.
14324 (mi_interpreter_pre_command_loop): ... Rename to ...
14325 (mi_interp::pre_command_loop): ... this. Remove the 'self'
14326 parameter and make extern.
14327 (mi_on_normal_stop_1): Adjust.
14328 (mi_ui_out): Rename to ...
14329 (mi_interp::interp_ui_out): ... this. Remove the 'interp'
14330 parameter and make extern. Adjust.
14331 (mi_set_logging): Rename to ...
14332 (mi_interp::set_logging): ... this. Remove the 'interp'
14333 parameter and make extern. Adjust.
14334 (mi_interp_procs): Delete.
14335 (mi_interp_factory): Adjust to use 'new'.
14336 * mi/mi-main.c (mi_cmd_gdb_exit, captured_mi_execute_command)
14337 (mi_print_exception, mi_execute_command, mi_load_progress):
14338 Adjust.
14339 * tui/tui-interp.c (tui_interp): New class.
14340 (as_tui_interp): Return a tui_interp pointer.
14341 (tui_on_normal_stop, tui_on_signal_received)
14342 (tui_on_end_stepping_range, tui_on_signal_exited, tui_on_exited)
14343 (tui_on_no_history, tui_on_user_selected_context_changed): Adjust
14344 to use interp::interp_ui_out.
14345 (tui_init): Rename to ...
14346 (tui_interp::init): ... this. Remove the 'self' parameter, use
14347 bool, return void and make extern. Adjust.
14348 (tui_resume): Rename to ...
14349 (tui_interp::resume): ... this. Remove the 'data' parameter,
14350 return void and make extern. Adjust.
14351 (tui_suspend): Rename to ...
14352 (tui_interp::suspend): ... this. Remove the 'data' parameter,
14353 return void and make extern. Adjust.
14354 (tui_ui_out): Rename to ...
14355 (tui_interp::interp_ui_out): ... this. Remove the 'self'
14356 parameter, and make extern. Adjust.
14357 (tui_exec): Rename to ...
14358 (tui_interp::exec): ... this. Remove the 'data' parameter and
14359 make extern.
14360 (tui_interp_procs): Delete.
14361 (tui_interp_factory): Use "new".
14362
14363 2017-02-02 Tom Tromey <tom@tromey.com>
14364
14365 * rust-exp.y (ends_raw_string, space_then_number)
14366 (rust_identifier_start_p): Return bool.
14367 * rust-lang.c (rust_tuple_type_p, rust_underscore_fields)
14368 (rust_tuple_struct_type_p, rust_tuple_variant_type_p)
14369 (rust_slice_type_p, rust_range_type_p, rust_u8_type_p)
14370 (rust_chartype_p): Return bool.
14371 (val_print_struct, rust_print_struct_def, rust_print_type):
14372 Update.
14373 * rust-lang.h (rust_tuple_type_p, rust_tuple_struct_type_p):
14374 Return bool.
14375
14376 2017-02-02 Tom Tromey <tom@tromey.com>
14377
14378 * rust-lang.c: Reindent.
14379
14380 2017-02-02 Tom Tromey <tom@tromey.com>
14381
14382 * rust-lang.h (rust_crate_for_block): Update.
14383 * rust-lang.c (rust_crate_for_block): Return std::string.
14384 (rust_get_disr_info): Use std:;string, not
14385 gdb::unique_xmalloc_ptr.
14386 * rust-exp.y (crate_name): Update.
14387
14388 2017-02-02 Pedro Alves <palves@redhat.com>
14389
14390 * disasm-selftests.c (print_one_insn_test): Move the "verbose"
14391 field out of gdb_disassembler_test and make it static.
14392
14393 2017-02-02 Pedro Alves <palves@redhat.com>
14394
14395 * mi/mi-common.h (struct mi_interp): Delete the mi2_interp,
14396 mi1_interp and mi_interp fields.
14397
14398 2017-02-02 Pedro Alves <palves@redhat.com>
14399
14400 * cli/cli-interp.c (struct saved_output_files, saved_output):
14401 Moved from cli/cli-logging.c.
14402 (cli_set_logging): New function.
14403 (cli_interp_procs): Install cli_set_logging.
14404 * cli/cli-interp.h (make_logging_output, cli_set_logging):
14405 Declare.
14406 * cli/cli-logging.c (struct saved_output_files, saved_output):
14407 Moved to cli/cli-interp.c.
14408 (pop_output_files): Don't save outputs here.
14409 (make_logging_output): New function.
14410 (handle_redirections): Don't build tee nor save previous outputs
14411 here.
14412 * interps.c (current_interp_set_logging): Change prototype.
14413 Assume there's always a set_logging_proc method installed.
14414 * interps.h (interp_set_logging_ftype): Change prototype.
14415 (current_interp_set_logging): Change prototype and adjust comment.
14416 * mi/mi-interp.c (mi_set_logging): Change protototype. Adjust to
14417 use make_logging_output.
14418 * tui/tui-interp.c (tui_interp_procs): Install cli_set_logging.
14419 2017-02-02 Pedro Alves <palves@redhat.com>
14420
14421 * cli/cli-logging.c (maybe_warn_already_logging): New factored out
14422 from ...
14423 (set_logging_overwrite): ... here.
14424 (logging_no_redirect_file): Delete.
14425 (set_logging_redirect): Don't handle redirection on the fly.
14426 Instead warn that "logging off" / "logging on" is necessary.
14427 (pop_output_files): Delete references to logging_no_redirect_file.
14428 (show_logging_command): Always speak in terms of what will happen
14429 once logging is reenabled.
14430
14431 2017-02-02 Pedro Alves <palves@redhat.com>
14432
14433 * disasm.h (gdb_pretty_print_disassembler): Tweak intro comment.
14434
14435 2017-02-02 Pedro Alves <palves@redhat.com>
14436
14437 * disasm.c (gdb_pretty_print_insn): Rename to ...
14438 (gdb_pretty_print_disassembler::pretty_print_insn): ... this.
14439 Remove gdbarch parameter. Adapt to clear the object's buffers
14440 instead of allocating new buffers, and to print using the object's
14441 gdb_disassembler instead of calling gdb_print_insn.
14442 (dump_insns): Use gdb_pretty_print_disassembler.
14443 * disasm.h (gdb_pretty_print_insn): Delete declaration.
14444 (gdb_pretty_print_disassembler): New class.
14445 * record-btrace.c (btrace_insn_history): Use
14446 gdb_pretty_print_disassembler.
14447
14448 2017-02-02 Pedro Alves <palves@redhat.com>
14449
14450 * ada-lang.c (type_as_string): Use string_file.
14451 * ada-valprint.c (ada_print_floating): Use string_file.
14452 * ada-varobj.c (ada_varobj_scalar_image)
14453 (ada_varobj_get_value_image): Use string_file.
14454 * aix-thread.c (aix_thread_extra_thread_info): Use string_file.
14455 * arm-tdep.c (_initialize_arm_tdep): Use string_printf.
14456 * breakpoint.c (update_inserted_breakpoint_locations)
14457 (insert_breakpoint_locations, reattach_breakpoints)
14458 (print_breakpoint_location, print_one_detail_ranged_breakpoint)
14459 (print_it_watchpoint): Use string_file.
14460 (save_breakpoints): Use stdio_file.
14461 * c-exp.y (oper): Use string_file.
14462 * cli/cli-logging.c (set_logging_redirect): Use ui_file_up and
14463 tee_file.
14464 (pop_output_files): Use delete.
14465 (handle_redirections): Use stdio_file and tee_file.
14466 * cli/cli-setshow.c (do_show_command): Use string_file.
14467 * compile/compile-c-support.c (c_compute_program): Use
14468 string_file.
14469 * compile/compile-c-symbols.c (generate_vla_size): Take a
14470 'string_file &' instead of a 'ui_file *'.
14471 (generate_c_for_for_one_variable): Take a 'string_file &' instead
14472 of a 'ui_file *'. Use string_file.
14473 (generate_c_for_variable_locations): Take a 'string_file &'
14474 instead of a 'ui_file *'.
14475 * compile/compile-internal.h (generate_c_for_for_one_variable):
14476 Take a 'string_file &' instead of a 'ui_file *'.
14477 * compile/compile-loc2c.c (push, pushf, unary, binary)
14478 (print_label, pushf_register_address, pushf_register)
14479 (do_compile_dwarf_expr_to_c): Take a 'string_file &' instead of a
14480 'ui_file *'. Adjust.
14481 * compile/compile.c (compile_to_object): Use string_file.
14482 * compile/compile.h (compile_dwarf_expr_to_c)
14483 (compile_dwarf_bounds_to_c): Take a 'string_file &' instead of a
14484 'ui_file *'.
14485 * cp-support.c (inspect_type): Use string_file and obstack_copy0.
14486 (replace_typedefs_qualified_name): Use string_file and
14487 obstack_copy0.
14488 * disasm.c (gdb_pretty_print_insn): Use string_file.
14489 (gdb_disassembly): Adjust reference the null_stream global.
14490 (do_ui_file_delete): Delete.
14491 (gdb_insn_length): Use null_stream.
14492 * dummy-frame.c (maintenance_print_dummy_frames): Use stdio_file.
14493 * dwarf2loc.c (dwarf2_compile_property_to_c)
14494 (locexpr_generate_c_location, loclist_generate_c_location): Take a
14495 'string_file &' instead of a 'ui_file *'.
14496 * dwarf2loc.h (dwarf2_compile_property_to_c): Likewise.
14497 * dwarf2read.c (do_ui_file_peek_last): Delete.
14498 (dwarf2_compute_name): Use string_file.
14499 * event-top.c (gdb_setup_readline): Use stdio_file.
14500 * gdbarch.sh (verify_gdbarch): Use string_file.
14501 * gdbtypes.c (safe_parse_type): Use null_stream.
14502 * guile/scm-breakpoint.c (gdbscm_breakpoint_commands): Use
14503 string_file.
14504 * guile/scm-disasm.c (gdbscm_print_insn_from_port): Take a
14505 'string_file *' instead of a 'ui_file *'.
14506 (gdbscm_arch_disassemble): Use string_file.
14507 * guile/scm-frame.c (frscm_print_frame_smob): Use string_file.
14508 * guile/scm-ports.c (class ioscm_file_port): Now a class that
14509 inherits from ui_file.
14510 (ioscm_file_port_delete, ioscm_file_port_rewind)
14511 (ioscm_file_port_put): Delete.
14512 (ioscm_file_port_write): Rename to ...
14513 (ioscm_file_port::write): ... this. Remove file_port_magic
14514 checks.
14515 (ioscm_file_port_new): Delete.
14516 (ioscm_with_output_to_port_worker): Use ioscm_file_port and
14517 ui_file_up.
14518 * guile/scm-type.c (tyscm_type_name): Use string_file.
14519 * guile/scm-value.c (vlscm_print_value_smob, gdbscm_value_print):
14520 Use string_file.
14521 * infcmd.c (print_return_value_1): Use string_file.
14522 * infrun.c (print_target_wait_results): Use string_file.
14523 * language.c (add_language): Use string_file.
14524 * location.c (explicit_to_string_internal): Use string_file.
14525 * main.c (captured_main_1): Use null_file.
14526 * maint.c (maintenance_print_architecture): Use stdio_file.
14527 * mi/mi-cmd-stack.c (list_arg_or_local): Use string_file.
14528 * mi/mi-common.h (struct mi_interp) <out, err, log, targ,
14529 event_channel>: Change type to mi_console_file pointer.
14530 * mi/mi-console.c (mi_console_file_fputs, mi_console_file_flush)
14531 (mi_console_file_delete): Delete.
14532 (struct mi_console_file): Delete.
14533 (mi_console_file_magic): Delete.
14534 (mi_console_file_new): Delete.
14535 (mi_console_file::mi_console_file): New.
14536 (mi_console_file_delete): Delete.
14537 (mi_console_file_fputs): Delete.
14538 (mi_console_file::write): New.
14539 (mi_console_raw_packet): Delete.
14540 (mi_console_file::flush): New.
14541 (mi_console_file_flush): Delete.
14542 (mi_console_set_raw): Rename to ...
14543 (mi_console_file::set_raw): ... this.
14544 * mi/mi-console.h (class mi_console_file): New class.
14545 (mi_console_file_new, mi_console_set_raw): Delete.
14546 * mi/mi-interp.c (mi_interpreter_init): Use mi_console_file.
14547 (mi_set_logging): Use delete and tee_file. Adjust.
14548 * mi/mi-main.c (output_register): Use string_file.
14549 (mi_cmd_data_evaluate_expression): Use string_file.
14550 (mi_cmd_data_read_memory): Use string_file.
14551 (mi_cmd_execute, print_variable_or_computed): Use string_file.
14552 * mi/mi-out.c (mi_ui_out::main_stream): New.
14553 (mi_ui_out::rewind): Use main_stream and
14554 string_file.
14555 (mi_ui_out::put): Use main_stream and string_file.
14556 (mi_ui_out::mi_ui_out): Remove 'stream' parameter.
14557 Allocate a 'string_file' instead.
14558 (mi_out_new): Don't allocate a mem_fileopen stream here.
14559 * mi/mi-out.h (mi_ui_out::mi_ui_out): Remove 'stream' parameter.
14560 (mi_ui_out::main_stream): Declare method.
14561 * printcmd.c (eval_command): Use string_file.
14562 * psymtab.c (maintenance_print_psymbols): Use stdio_file.
14563 * python/py-arch.c (archpy_disassemble): Use string_file.
14564 * python/py-breakpoint.c (bppy_get_commands): Use string_file.
14565 * python/py-frame.c (frapy_str): Use string_file.
14566 * python/py-framefilter.c (py_print_type, py_print_single_arg):
14567 Use string_file.
14568 * python/py-type.c (typy_str): Use string_file.
14569 * python/py-unwind.c (unwind_infopy_str): Use string_file.
14570 * python/py-value.c (valpy_str): Use string_file.
14571 * record-btrace.c (btrace_insn_history): Use string_file.
14572 * regcache.c (regcache_print): Use stdio_file.
14573 * reggroups.c (maintenance_print_reggroups): Use stdio_file.
14574 * remote.c (escape_buffer): Use string_file.
14575 * rust-lang.c (rust_get_disr_info): Use string_file.
14576 * serial.c (serial_open_ops_1): Use stdio_file.
14577 (do_serial_close): Use delete.
14578 * stack.c (print_frame_arg): Use string_file.
14579 (print_frame_args): Remove local mem_fileopen stream, not used.
14580 (print_frame): Use string_file.
14581 * symmisc.c (maintenance_print_symbols): Use stdio_file.
14582 * symtab.h (struct symbol_computed_ops) <generate_c_location>:
14583 Take a 'string_file *' instead of a 'ui_file *'.
14584 * top.c (new_ui): Use stdio_file and stderr_file.
14585 (free_ui): Use delete.
14586 (execute_command_to_string): Use string_file.
14587 (quit_confirm): Use string_file.
14588 * tracepoint.c (collection_list::append_exp): Use string_file.
14589 * tui/tui-disasm.c (tui_disassemble): Use string_file.
14590 * tui/tui-file.c: Don't include "ui-file.h".
14591 (enum streamtype, struct tui_stream): Delete.
14592 (tui_file_new, tui_file_delete, tui_fileopen, tui_sfileopen)
14593 (tui_file_isatty, tui_file_rewind, tui_file_put): Delete.
14594 (tui_file::tui_file): New method.
14595 (tui_file_fputs): Delete.
14596 (tui_file_get_strbuf): Delete.
14597 (tui_file::puts): New method.
14598 (tui_file_adjust_strbuf): Delete.
14599 (tui_file_flush): Delete.
14600 (tui_file::flush): New method.
14601 * tui/tui-file.h: Tweak intro comment.
14602 Include ui-file.h.
14603 (tui_fileopen, tui_sfileopen, tui_file_get_strbuf)
14604 (tui_file_adjust_strbuf): Delete declarations.
14605 (class tui_file): New class.
14606 * tui/tui-io.c (tui_initialize_io): Use tui_file.
14607 * tui/tui-regs.c (tui_restore_gdbout): Use delete.
14608 (tui_register_format): Use string_stream.
14609 * tui/tui-stack.c (tui_make_status_line): Use string_file.
14610 (tui_get_function_from_frame): Use string_file.
14611 * typeprint.c (type_to_string): Use string_file.
14612 * ui-file.c (struct ui_file, ui_file_magic, ui_file_new): Delete.
14613 (null_stream): New global.
14614 (ui_file_delete): Delete.
14615 (ui_file::ui_file): New.
14616 (null_file_isatty): Delete.
14617 (ui_file::~ui_file): New.
14618 (null_file_rewind): Delete.
14619 (ui_file::printf): New.
14620 (null_file_put): Delete.
14621 (null_file_flush): Delete.
14622 (ui_file::putstr): New.
14623 (null_file_write): Delete.
14624 (ui_file::putstrn): New.
14625 (null_file_read): Delete.
14626 (ui_file::putc): New.
14627 (null_file_fputs): Delete.
14628 (null_file_write_async_safe): Delete.
14629 (ui_file::vprintf): New.
14630 (null_file_delete): Delete.
14631 (null_file::write): New.
14632 (null_file_fseek): Delete.
14633 (null_file::puts): New.
14634 (ui_file_data): Delete.
14635 (null_file::write_async_safe): New.
14636 (gdb_flush, ui_file_isatty): Adjust.
14637 (ui_file_put, ui_file_rewind): Delete.
14638 (ui_file_write): Adjust.
14639 (ui_file_write_for_put): Delete.
14640 (ui_file_write_async_safe, ui_file_read): Adjust.
14641 (ui_file_fseek): Delete.
14642 (fputs_unfiltered): Adjust.
14643 (set_ui_file_flush, set_ui_file_isatty, set_ui_file_rewind)
14644 (set_ui_file_put, set_ui_file_write, set_ui_file_write_async_safe)
14645 (set_ui_file_read, set_ui_file_fputs, set_ui_file_fseek)
14646 (set_ui_file_data): Delete.
14647 (string_file::~string_file, string_file::write)
14648 (struct accumulated_ui_file, do_ui_file_xstrdup, ui_file_xstrdup)
14649 (do_ui_file_as_string, ui_file_as_string): Delete.
14650 (do_ui_file_obsavestring, ui_file_obsavestring): Delete.
14651 (struct mem_file): Delete.
14652 (mem_file_new): Delete.
14653 (stdio_file::stdio_file): New.
14654 (mem_file_delete): Delete.
14655 (stdio_file::stdio_file): New.
14656 (mem_fileopen): Delete.
14657 (stdio_file::~stdio_file): New.
14658 (mem_file_rewind): Delete.
14659 (stdio_file::set_stream): New.
14660 (mem_file_put): Delete.
14661 (stdio_file::open): New.
14662 (mem_file_write): Delete.
14663 (stdio_file_magic, struct stdio_file): Delete.
14664 (stdio_file_new, stdio_file_delete, stdio_file_flush): Delete.
14665 (stdio_file::flush): New.
14666 (stdio_file_read): Rename to ...
14667 (stdio_file::read): ... this. Adjust.
14668 (stdio_file_write): Rename to ...
14669 (stdio_file::write): ... this. Adjust.
14670 (stdio_file_write_async_safe): Rename to ...
14671 (stdio_file::write_async_safe) ... this. Adjust.
14672 (stdio_file_fputs): Rename to ...
14673 (stdio_file::puts) ... this. Adjust.
14674 (stdio_file_isatty): Delete.
14675 (stdio_file_fseek): Delete.
14676 (stdio_file::isatty): New.
14677 (stderr_file_write): Rename to ...
14678 (stderr_file::write) ... this. Adjust.
14679 (stderr_file_fputs): Rename to ...
14680 (stderr_file::puts) ... this. Adjust.
14681 (stderr_fileopen, stdio_fileopen, gdb_fopen): Delete.
14682 (stderr_file::stderr_file): New.
14683 (tee_file_magic): Delete.
14684 (struct tee_file): Delete.
14685 (tee_file::tee_file): New.
14686 (tee_file_new): Delete.
14687 (tee_file::~tee_file): New.
14688 (tee_file_delete): Delete.
14689 (tee_file_flush): Rename to ...
14690 (tee_file::flush): ... this. Adjust.
14691 (tee_file_write): Rename to ...
14692 (tee_file::write): ... this. Adjust.
14693 (tee_file::write_async_safe): New.
14694 (tee_file_fputs): Rename to ...
14695 (tee_file::puts): ... this. Adjust.
14696 (tee_file_isatty): Rename to ...
14697 (tee_file::isatty): ... this. Adjust.
14698 * ui-file.h (struct obstack, struct ui_file): Don't
14699 forward-declare.
14700 (ui_file_new, ui_file_flush_ftype, set_ui_file_flush)
14701 (ui_file_write_ftype)
14702 (set_ui_file_write, ui_file_fputs_ftype, set_ui_file_fputs)
14703 (ui_file_write_async_safe_ftype, set_ui_file_write_async_safe)
14704 (ui_file_read_ftype, set_ui_file_read, ui_file_isatty_ftype)
14705 (set_ui_file_isatty, ui_file_rewind_ftype, set_ui_file_rewind)
14706 (ui_file_put_method_ftype, ui_file_put_ftype, set_ui_file_put)
14707 (ui_file_delete_ftype, set_ui_file_data, ui_file_fseek_ftype)
14708 (set_ui_file_fseek): Delete.
14709 (ui_file_data, ui_file_delete, ui_file_rewind)
14710 (struct ui_file): New.
14711 (ui_file_up): New.
14712 (class null_file): New.
14713 (null_stream): Declare.
14714 (ui_file_write_for_put, ui_file_put): Delete.
14715 (ui_file_xstrdup, ui_file_as_string, ui_file_obsavestring):
14716 Delete.
14717 (ui_file_fseek, mem_fileopen, stdio_fileopen, stderr_fileopen)
14718 (gdb_fopen, tee_file_new): Delete.
14719 (struct string_file): New.
14720 (struct stdio_file): New.
14721 (stdio_file_up): New.
14722 (struct stderr_file): New.
14723 (class tee_file): New.
14724 * ui-out.c (ui_out::field_stream): Take a 'string_file &' instead
14725 of a 'ui_file *'. Adjust.
14726 * ui-out.h (class ui_out) <field_stream>: Likewise.
14727 * utils.c (do_ui_file_delete, make_cleanup_ui_file_delete)
14728 (null_stream): Delete.
14729 (error_stream): Take a 'string_file &' instead of a 'ui_file *'.
14730 Adjust.
14731 * utils.h (struct ui_file): Delete forward declaration..
14732 (make_cleanup_ui_file_delete, null_stream): Delete declarations.
14733 (error_stream): Take a 'string_file &' instead of a
14734 'ui_file *'.
14735 * varobj.c (varobj_value_get_print_value): Use string_file.
14736 * xtensa-tdep.c (xtensa_verify_config): Use string_file.
14737 * gdbarch.c: Regenerate.
14738
14739 2017-02-02 Pedro Alves <palves@redhat.com>
14740
14741 * disasm.c (gdb_disassembler::pretty_print_insn): Rename to...
14742 (gdb_pretty_print_insn): ... this. Now a free function. Add back
14743 a 'gdbarch' parameter. Allocate a mem_fileopen stream here.
14744 Adjust to call gdb_print_insn instead of
14745 gdb_disassembler::print_insn.
14746 (dump_insns, do_mixed_source_and_assembly_deprecated)
14747 (do_mixed_source_and_assembly, do_assembly_only): Add back a
14748 'gdbarch' parameter. Remove gdb_disassembler parameter.
14749 (gdb_disassembly): Don't allocate a gdb_disassembler here.
14750 * disasm.h (gdb_disassembler::pretty_print_insn): Delete
14751 declaration.
14752 (gdb_pretty_print_insn): Re-add declaration.
14753 * record-btrace.c (btrace_insn_history): Don't allocate a
14754 gdb_disassembler here. Adjust to call gdb_pretty_print_insn.
14755
14756 2017-02-01 Simon Marchi <simon.marchi@polymtl.ca>
14757
14758 * disasm.h (gdb_disassembly): Remove file_string parameter.
14759 * disasm.c (gdb_disassembly): Likewise.
14760 * cli/cli-cmds.c (print_disassembly): Adapt.
14761 * mi/mi-cmd-disas.c (mi_cmd_disassemble): Likewise.
14762 * stack.c (do_gdb_disassembly): Likewise.
14763
14764 2017-02-01 Andreas Arnez <arnez@linux.vnet.ibm.com>
14765
14766 * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): For
14767 DWARF_VALUE_LITERAL, no longer ignore the offset on big-endian
14768 targets. And if the implicit value is longer than needed, extract
14769 the first bytes instead of the "least significant" ones.
14770
14771 2017-02-01 Markus Metzger <markus.t.metzger@intel.com>
14772
14773 * btrace.c (btrace_enable): Do not call btrace_add_pc for
14774 BTRACE_FORMAT_PT or if can_access_registers_ptid returns false.
14775 (btrace_fetch): Assert can_access_registers_ptid.
14776 * record-btrace.c (require_btrace_thread, record_btrace_info): Call
14777 validate_registers_access.
14778
14779 2017-02-01 Markus Metzger <markus.t.metzger@intel.com>
14780
14781 * gdbthread.h (can_access_registers_ptid): New.
14782 * thread.c (can_access_registers_ptid): New.
14783
14784 2017-02-01 Pedro Alves <palves@redhat.com>
14785
14786 * i386-tdep.c (i386_fast_tracepoint_valid_at): Use gdb_insn_length.
14787
14788 2017-01-31 Pedro Alves <palves@redhat.com>
14789
14790 * mi/mi-interp.c (mi_breakpoint_created, mi_breakpoint_modified):
14791 Fix typos.
14792
14793 2017-01-31 Pedro Alves <palves@redhat.com>
14794
14795 * stack.c (print_frame_args): Remove local mem_fileopen stream,
14796 not used.
14797
14798 2017-01-31 Pedro Alves <palves@redhat.com>
14799
14800 * varobj.c (varobj_value_get_print_value): Remove xstrdup call.
14801
14802 2017-01-31 Pedro Alves <palves@redhat.com>
14803
14804 * common/scoped_restore.h
14805 (scoped_restore_tmpl::scoped_restore_tmpl): Template on T2, and
14806 change the value's parameter type to T2.
14807 (make_scoped_restore): Likewise.
14808
14809 2017-01-27 Walfred Tedeschi <walfred.tedeschi@intel.com>
14810 Richard Henderson <rth@redhat.com>
14811
14812 * amd64-linux-nat.c (PTRACE_ARCH_PRCTL): New define.
14813 (amd64_linux_fetch_inferior_registers): Add case to fetch FS_BASE
14814 GS_BASE for older kernels.
14815 (amd64_linux_store_inferior_registers): Add case to store FS_BASE
14816 GS_BASE for older kernels.
14817 * amd64-linux-tdep.c (amd64_linux_gregset_reg_offset): Add FS_BASE
14818 and GS_BASE to the offset table.
14819 (amd64_linux_register_reggroup_p): Add FS_BASE and GS_BASE to the
14820 system register group.
14821 * amd64-nat.c (amd64_native_gregset_reg_offset): Implements case
14822 for older kernels.
14823 * amd64-tdep.c (amd64_init_abi): Add segment registers for the
14824 amd64 ABI.
14825 * amd64-tdep.h (amd64_regnum): Add AMD64_FSBASE_REGNUM and
14826 AMD64_GSBASE_REGNUM.
14827 (AMD64_NUM_REGS): Set to AMD64_GSBASE_REGNUM + 1.
14828 * features/Makefile (amd64-linux.dat, amd64-avx-linux.dat)
14829 (amd64-mpx-linux.dat, amd64-avx512-linux.dat, x32-linux.dat)
14830 (x32-avx-linux.dat, x32-avx512-linux.dat): Add
14831 i386/64bit-segments.xml in those rules.
14832 * features/i386/64bit-segments.xml: New file.
14833 * features/i386/amd64-avx-mpx-linux.xml: Add 64bit-segments.xml.
14834 * features/i386/amd64-avx-linux.xml: Add 64bit-segments.xml.
14835 * features/i386/amd64-avx512-linux.xml: Add 64bit-segments.xml.
14836 * features/i386/amd64-mpx-linux.xml: Add 64bit-segments.xml.
14837 * features/i386/x32-avx512-linux.xml: Add 64bit-segments.xml.
14838 * features/i386/x32-avx-linux.xml: Add 64bit-segments.xml.
14839 * features/i386/amd64-linux.xml: Add 64bit-segments.xml.
14840 * features/i386/amd64-avx-linux.c: Regenerated.
14841 * features/i386/amd64-avx-mpx-linux.c: Regenerated.
14842 * features/i386/amd64-avx-mpx.c: Regenerated.
14843 * features/i386/amd64-avx512-linux.c: Regenerated.
14844 * features/i386/amd64-linux.c: Regenerated.
14845 * features/i386/amd64-mpx-linux.c: Regenerated.
14846 * features/i386/i386-avx-mpx-linux.c: Regenerated.
14847 * features/i386/i386-avx-mpx.c: Regenerated.
14848 * features/i386/x32-avx-linux.c: Regenerated.
14849 * features/i386/x32-avx512-linux.c: Regenerated.
14850 * regformats/i386/amd64-avx-linux.dat: Regenerated.
14851 * regformats/i386/amd64-avx-mpx-linux.dat: Regenerated.
14852 * regformats/i386/amd64-avx512-linux.dat: Regenerated.
14853 * regformats/i386/amd64-linux.dat: Regenerated.
14854 * regformats/i386/amd64-mpx-linux.dat: Regenerated.
14855 * regformats/i386/x32-avx-linux.dat: Regenerated.
14856 * regformats/i386/x32-avx512-linux.dat: Regenerated.
14857 * regformats/i386/x32-linux.dat: Regenerated.
14858
14859 2017-01-27 Walfred Tedeschi <walfred.tedeschi@intel.com>
14860
14861 * amd64-linux-tdep.h (AMD64_LINUX_ORIG_RAX_REGNUM):
14862 Set to AMD64_NUM_REGS.
14863
14864 2017-01-27 Walfred Tedeschi <walfred.tedeschi@intel.com>
14865
14866 * amd64-nat.c (amd64_native_gregset_reg_offset): Simplify logic
14867 that checks validity of a register number.
14868
14869 2017-01-27 Kees Cook <keescook@google.com>
14870
14871 * gdb/arm-linux-nat.c (arm_linux_fetch_inferior_registers): Call
14872 fetch_fpregs if target has fpa registers.
14873 (arm_linux_store_inferior_registers): Call store_fpregs if target
14874 has fpa registers.
14875
14876 2017-01-26 Andreas Arnez <arnez@linux.vnet.ibm.com>
14877
14878 * cris-tdep.c (cris_gdbarch_init): Remove check for
14879 info.byte_order and force it to BFD_ENDIAN_LITTLE.
14880
14881 2017-01-26 Antoine Tremblay <antoine.tremblay@ericsson.com>
14882
14883 * corelow.c (get_core_register_section): Check for regset
14884 existence before checking for REGSET_VARIABLE_SIZE.
14885
14886 2017-01-26 Yao Qi <yao.qi@linaro.org>
14887 Pedro Alves <palves@redhat.com>
14888
14889 PR gdb/20939
14890 * disasm.c (gdb_disassembler::dis_asm_memory_error): Don't
14891 call memory_error, save memaddr instead.
14892 (gdb_disassembler::print_insn): If gdbarch_print_insn returns
14893 negative, cal memory_error.
14894 * disasm.h (gdb_disassembler) <m_err_memaddr>: New field.
14895
14896 2017-01-26 Yao Qi <yao.qi@linaro.org>
14897
14898 * disasm-selftests.c (memory_error_test): New function.
14899 (_initialize_disasm_selftests): Register memory_error_test.
14900
14901 2017-01-26 Yao Qi <yao.qi@linaro.org>
14902
14903 * Makefile.in (SFILES): Add disasm-selftests.c and
14904 selftest-arch.c.
14905 (COMMON_OBS): Add disasm-selftests.o and selftest-arch.o.
14906 * disasm-selftests.c: New file.
14907 * selftest-arch.c: New file.
14908 * selftest-arch.h: New file.
14909
14910 2017-01-26 Yao Qi <yao.qi@linaro.org>
14911
14912 * mep-tdep.c (mep_gdb_print_insn): Set info->arch
14913 to bfd_arch_mep. Don't return 0 if section is not
14914 found. Call print_insn_mep.
14915
14916 2017-01-26 Pedro Alves <palves@redhat.com>
14917 Yao Qi <yao.qi@linaro.org>
14918
14919 * arm-tdep.c: Include "disasm.h".
14920 (gdb_print_insn_arm): Update code to get gdbarch.
14921 * disasm.c (dis_asm_read_memory): Change it to
14922 gdb_disassembler::dis_asm_read_memory.
14923 (dis_asm_memory_error): Likewise.
14924 (dis_asm_print_address): Likewise.
14925 (gdb_pretty_print_insn): Change it to
14926 gdb_disassembler::pretty_print_insn.
14927 (dump_insns): Add one argument gdb_disassemlber. All
14928 callers updated.
14929 (do_mixed_source_and_assembly_deprecated): Likewise.
14930 (do_mixed_source_and_assembly): Likewise.
14931 (do_assembly_only): Likewise.
14932 (gdb_disassembler::gdb_disassembler): New.
14933 (gdb_disassembler::print_insn): New.
14934 * disasm.h (class gdb_disassembler): New.
14935 (gdb_pretty_print_insn): Remove declaration.
14936 (gdb_disassemble_info): Likewise.
14937 * guile/scm-disasm.c (class gdbscm_disassembler): New.
14938 (gdbscm_disasm_read_memory_worker): Update.
14939 (gdbscm_disasm_read_memory): Update.
14940 (gdbscm_disasm_memory_error): Remove.
14941 (gdbscm_disasm_print_address): Remove.
14942 (gdbscm_disassembler::gdbscm_disassembler): New.
14943 (gdbscm_print_insn_from_port): Update.
14944 * mips-tdep.c: Include disasm.h.
14945 (gdb_print_insn_mips): Update code to get gdbarch.
14946 * record-btrace.c (btrace_insn_history): Update.
14947 * spu-tdep.c: Include disasm.h.
14948 (struct spu_dis_asm_data): Remove.
14949 (struct spu_dis_asm_info): New.
14950 (spu_dis_asm_print_address): Use spu_dis_asm_info to get
14951 SPU id.
14952 (gdb_print_insn_spu): Cast disassemble_info to
14953 spu_dis_asm_info.
14954
14955 2017-01-26 Yao Qi <yao.qi@linaro.org>
14956
14957 * disasm.c (do_ui_file_delete): Delete.
14958 (gdb_insn_length): Move code creating stream to ...
14959 * utils.c (null_stream): ... here. New function.
14960 * utils.h (null_stream): Declare.
14961
14962 2017-01-23 Simon Marchi <simon.marchi@polymtl.ca>
14963
14964 * python/py-inferior.c (find_thread_object): Return directly
14965 from the loop. Remove "found" variable.
14966
14967 2017-01-21 Joel Brobecker <brobecker@adacore.com>
14968
14969 GDB 7.12.1 released.
14970
14971 2017-01-20 Simon Marchi <simon.marchi@ericsson.com>
14972
14973 * python/py-function.c (fnpy_call): Reorder declarations to have
14974 the gdbpy_enter object declared first.
14975 * python/py-xmethods.c (gdbpy_get_xmethod_arg_types): Likewise.
14976
14977 2017-01-20 Simon Marchi <simon.marchi@ericsson.com>
14978
14979 PR python/21068
14980 * python/python-internal.h (PyMem_RawMalloc): Define for
14981 Python < 3.4.
14982 * python/py-gdb-readline.c (gdbpy_readline_wrapper): Use
14983 PyMem_RawMalloc instead of PyMem_Malloc.
14984
14985 2017-01-20 Mike Wrighton <mike_wrighton@codesourcery.com>
14986 Luis Machado <lgustavo@codesourcery.com>
14987
14988 * NEWS (New commands): Mention flash-erase.
14989 (New MI commands): Mention target-flash-erase.
14990 * mi/mi-cmds.c (mi_cmd_target_flash_erase): Add target-flash-erase MI
14991 command.
14992 * mi/mi-cmds.h (mi_cmd_target_flash_erase): New declaration.
14993 * mi/mi-main.c (mi_cmd_target_flash_erase): New function.
14994 * target.c (flash_erase_command): New function.
14995 (initialize_targets): Add new flash-erase command.
14996 * target.h (flash_erase_command): New declaration.
14997
14998 2017-01-20 Joel Brobecker <brobecker@adacore.com>
14999
15000 * nat/linux-ptrace.c: Only include <sys/procfs.h> if
15001 HAVE_SYS_PROCFS_H is defined.
15002
15003 2017-01-18 Alan Hayward <alan.hayward@arm.com>
15004
15005 * remote.c (struct cached_reg): Change data into a pointer.
15006 * (stop_reply_dtr): Free data pointers before deleting vector.
15007 (process_stop_reply): Likewise.
15008 (remote_parse_stop_reply): Allocate space for data
15009
15010 2017-01-18 Alan Hayward <alan.hayward@arm.com>
15011
15012 * amd64-tdep.c (amd64_pseudo_register_read_value): remove
15013 MAX_REGISTER_SIZE.
15014 (amd64_pseudo_register_read_value): Likewise.
15015 * remote.c (fetch_register_using_p): Remove MAX_REGISTER_SIZE.
15016 (store_register_using_P): Likewise.
15017 * regcache.c (regcache_xfer_part): Likewise.
15018
15019 2017-01-16 Ivo Raisr <ivo.raisr@oracle.com>
15020
15021 Split real and pseudo registers.
15022 * sparc-tdep.h (SPARC_CORE_REGISTERS): New macro.
15023 (sparc32_pseudo_regnum): New enum.
15024 * sparc64-tdep.h (sparc64_pseudo_regnum): New enum.
15025 * sparc-tdep.c (SPARC32_FPU_REGISTERS): New macro.
15026 (SPARC32_CP0_REGISTERS): New macro.
15027 (sparc32_pseudo_register_name): New function.
15028 (sparc32_register_name): Use sparc32_pseudo_register_name.
15029 (sparc32_pseudo_register_type): New function.
15030 (sparc32_register_type): Use sparc32_pseudo_register_type.
15031 (sparc32_pseudo_register_read, sparc32_pseudo_register_write): Handle
15032 pseudo register numbers.
15033 * sparc64-tdep.c SPARC64_FPU_REGISTERS): New macro.
15034 (SPARC64_CP0_REGISTERS): New macro.
15035 (sparc64_pseudo_register_name): New function.
15036 (sparc64_register_name): Use sparc64_pseudo_register_name.
15037 (sparc64_pseudo_register_type): New function.
15038 (sparc64_register_type): Use sparc64_pseudo_register_type.
15039 (sparc64_pseudo_register_read, sparc64_pseudo_register_write): Handle
15040 pseudo register numbers.
15041 (sparc64_store_floating_fields, sparc64_extract_floating_fields,
15042 sparc64_store_arguments): Handle pseudo register numbers.
15043
15044 2017-01-13 Yao Qi <yao.qi@linaro.org>
15045
15046 * remote.c (REMOTE_DEBUG_MAX_CHAR): New macro.
15047 (putpkt_binary): Print only REMOTE_DEBUG_MAX_CHAR chars in debug
15048 output.
15049 (getpkt_or_notif_sane_1): Likewise.
15050
15051 2017-01-13 Yao Qi <yao.qi@linaro.org>
15052
15053 * Makefile.in (checker-headers): Use CXX and CXX_DIALET instead
15054 of CC. Pass "-x c++-header" instead of "-x c".
15055
15056 2017-01-12 Simon Marchi <simon.marchi@ericsson.com>
15057
15058 * remote.c (remote_can_async_p): Update comment.
15059
15060 2017-01-12 Simon Marchi <simon.marchi@ericsson.com>
15061
15062 * linux-nat.c (linux_nat_can_async_p): Update comment.
15063
15064 2017-01-12 Simon Marchi <simon.marchi@ericsson.com>
15065
15066 * serial.c (serial_open): Forget about "pc" and "lpt" serial interface.
15067
15068 2017-01-11 Simon Marchi <simon.marchi@ericsson.com>
15069
15070 * cli/cli-decode.c (lookup_cmd_1): Fix typo in comment.
15071
15072 2017-01-10 Tom Tromey <tom@tromey.com>
15073
15074 * python/py-type.c (typy_legacy_template_argument): Update.
15075 * cp-support.h (struct demangle_parse_info) (demangle_parse_info,
15076 ~demangle_parse_info): Declare new members.
15077 (cp_demangled_name_to_comp): Return unique_ptr.
15078 (cp_demangled_name_parse_free)
15079 (make_cleanup_cp_demangled_name_parse_free)
15080 (cp_new_demangle_parse_info): Remove.
15081 * cp-support.c (do_demangled_name_parse_free_cleanup)
15082 (make_cleanup_cp_demangled_name_parse_free): Remove.
15083 (inspect_type, cp_canonicalize_string_full)
15084 (cp_canonicalize_string): Update.
15085 (mangled_name_to_comp): Change return type.
15086 (cp_class_name_from_physname, method_name_from_physname)
15087 (cp_func_name, cp_remove_params): Update.
15088 * cp-name-parser.y (demangle_parse_info): New constructor, from
15089 cp_new_demangle_parse_info.
15090 (~demangle_parse_info): New destructor, from
15091 cp_demangled_name_parse_free.
15092 (cp_merge_demangle_parse_infos): Update.
15093 (cp_demangled_name_to_comp): Change return type.
15094
15095 2017-01-10 Tom Tromey <tom@tromey.com>
15096
15097 * top.c (prevent_dont_repeat): Change return type.
15098 * python/python.c (execute_gdb_command): Use std::string.
15099 Update.
15100 * guile/guile.c (gdbscm_execute_gdb_command): Update.
15101 * command.h (prevent_dont_repeat): Change return type.
15102 * breakpoint.c (bpstat_do_actions_1): Update.
15103
15104 2017-01-10 Tom Tromey <tom@tromey.com>
15105
15106 * value.h (scoped_value_mark::~scoped_value_mark): Call
15107 free_to_mark.
15108 (scoped_value_mark::free_to_mark): New method.
15109 * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Use
15110 scoped_value_mark.
15111
15112 2017-01-10 Tom Tromey <tom@tromey.com>
15113
15114 * python/py-value.c (valpy_dereference, valpy_referenced_value)
15115 (valpy_reference_value, valpy_const_value, valpy_get_address)
15116 (valpy_get_dynamic_type, valpy_lazy_string, valpy_do_cast)
15117 (valpy_getitem, valpy_call, valpy_binop_throw, valpy_negative)
15118 (valpy_absolute, valpy_richcompare_throw): Use scoped_value_mark.
15119 * dwarf2loc.c (dwarf2_loc_desc_get_symbol_read_needs): Use
15120 scoped_value_mark.
15121 * dwarf2-frame.c (execute_stack_op): Use scoped_value_mark.
15122 * value.h (scoped_value_mark): New class.
15123
15124 2017-01-10 Tom Tromey <tom@tromey.com>
15125
15126 * dwarf2read.c (dwarf2_build_psymtabs): Use psymtab_discarder.
15127 * psympriv.h (make_cleanup_discard_psymtabs): Don't declare.
15128 * psymtab.c (discard_psymtabs_upto): Remove.
15129 (make_cleanup_discard_psymtabs): Remove.
15130 (struct psymtab_state): Remove.
15131
15132 2017-01-10 Tom Tromey <tom@tromey.com>
15133
15134 * record-full.c (record_full_save_cleanups): Remove.
15135 (record_full_save): Use gdb::unlinker.
15136 * gcore.c (do_bfd_delete_cleanup): Remove.
15137 (gcore_command): Use gdb::unlinker, unique_xmalloc_ptr. Remove
15138 cleanups.
15139 * dwarf2read.c (unlink_if_set): Remove.
15140 (write_psymtabs_to_index): Use gdb::unlinker.
15141 * common/gdb_unlinker.h: New file.
15142
15143 2017-01-10 Tom Tromey <tom@tromey.com>
15144
15145 * windows-tdep.c (windows_xfer_shared_library): Update.
15146 * windows-nat.c (windows_make_so): Update.
15147 * utils.h (make_cleanup_bfd_unref): Remove.
15148 * utils.c (do_bfd_close_cleanup, make_cleanup_bfd_unref): Remove.
15149 * symfile.h (symfile_bfd_open)
15150 (find_separate_debug_file_in_section): Return gdb_bfd_ref_ptr.
15151 * symfile.c (read_symbols, symbol_file_add)
15152 (separate_debug_file_exists): Update.
15153 (symfile_bfd_open): Return gdb_bfd_ref_ptr.
15154 (generic_load, reread_symbols): Update.
15155 * symfile-mem.c (symbol_file_add_from_memory): Update.
15156 * spu-linux-nat.c (spu_bfd_open): Return gdb_bfd_ref_ptr.
15157 (spu_symbol_file_add_from_memory): Update.
15158 * solist.h (struct target_so_ops) <bfd_open>: Return
15159 gdb_bfd_ref_ptr.
15160 (solib_bfd_fopen, solib_bfd_open): Return gdb_bfd_ref_ptr.
15161 * solib.c (solib_bfd_fopen, solib_bfd_open): Return
15162 gdb_bfd_ref_ptr.
15163 (solib_map_sections, reload_shared_libraries_1): Update.
15164 * solib-svr4.c (enable_break): Update.
15165 * solib-spu.c (spu_bfd_fopen): Return gdb_bfd_ref_ptr.
15166 * solib-frv.c (enable_break2): Update.
15167 * solib-dsbt.c (enable_break): Update.
15168 * solib-darwin.c (gdb_bfd_mach_o_fat_extract): Return
15169 gdb_bfd_ref_ptr.
15170 (darwin_solib_get_all_image_info_addr_at_init): Update.
15171 (darwin_bfd_open): Return gdb_bfd_ref_ptr.
15172 * solib-aix.c (solib_aix_bfd_open): Return gdb_bfd_ref_ptr.
15173 * record-full.c (record_full_save): Update.
15174 * python/py-objfile.c (objfpy_add_separate_debug_file): Update.
15175 * procfs.c (insert_dbx_link_bpt_in_file): Update.
15176 * minidebug.c (find_separate_debug_file_in_section): Return
15177 gdb_bfd_ref_ptr.
15178 * machoread.c (macho_add_oso_symfile): Change abfd to
15179 gdb_bfd_ref_ptr.
15180 (macho_symfile_read_all_oso): Update.
15181 (macho_check_dsym): Return gdb_bfd_ref_ptr.
15182 (macho_symfile_read): Update.
15183 * jit.c (bfd_open_from_target_memory): Return gdb_bfd_ref_ptr.
15184 (jit_bfd_try_read_symtab): Update.
15185 * gdb_bfd.h (gdb_bfd_open, gdb_bfd_fopen, gdb_bfd_openr)
15186 (gdb_bfd_openw, gdb_bfd_openr_iovec)
15187 (gdb_bfd_openr_next_archived_file, gdb_bfd_fdopenr): Return
15188 gdb_bfd_ref_ptr.
15189 (gdb_bfd_ref_policy): New struct.
15190 (gdb_bfd_ref_ptr): New typedef.
15191 * gdb_bfd.c (gdb_bfd_open, gdb_bfd_fopen, gdb_bfd_openr)
15192 (gdb_bfd_openw, gdb_bfd_openr_iovec)
15193 (gdb_bfd_openr_next_archived_file, gdb_bfd_fdopenr): Return
15194 gdb_bfd_ref_ptr.
15195 * gcore.h (create_gcore_bfd): Return gdb_bfd_ref_ptr.
15196 * gcore.c (create_gcore_bfd): Return gdb_bfd_ref_ptr.
15197 (gcore_command): Update.
15198 * exec.c (exec_file_attach): Update.
15199 * elfread.c (elf_symfile_read): Update.
15200 * dwarf2read.c (dwarf2_get_dwz_file): Update.
15201 (try_open_dwop_file, open_dwo_file): Return gdb_bfd_ref_ptr.
15202 (open_and_init_dwo_file): Update.
15203 (open_dwp_file): Return gdb_bfd_ref_ptr.
15204 (open_and_init_dwp_file): Update.
15205 * corelow.c (core_open): Update.
15206 * compile/compile-object-load.c (compile_object_load): Update.
15207 * common/gdb_ref_ptr.h (ref_ptr::operator->): New operator.
15208 * coffread.c (coff_symfile_read): Update.
15209 * cli/cli-dump.c (bfd_openr_or_error, bfd_openw_or_error): Return
15210 gdb_bfd_ref_ptr. Rename.
15211 (dump_bfd_file, restore_command): Update.
15212 * build-id.h (build_id_to_debug_bfd): Return gdb_bfd_ref_ptr.
15213 * build-id.c (build_id_to_debug_bfd): Return gdb_bfd_ref_ptr.
15214 (find_separate_debug_file_by_buildid): Update.
15215
15216 2017-01-10 Tom Tromey <tom@tromey.com>
15217
15218 * common/gdb_ref_ptr.h: New file.
15219 * python/py-ref.h (struct gdbpy_ref_policy): New.
15220 (gdbpy_ref): Now a typedef.
15221
15222 2017-01-10 Tom Tromey <tom@tromey.com>
15223
15224 * utils.h (make_cleanup_htab_delete): Don't declare.
15225 * utils.c (do_htab_delete_cleanup, make_cleanup_htab_delete):
15226 Remove.
15227 * linespec.c (decode_compound_collector): Add constructor,
15228 destructor.
15229 (lookup_prefix_sym): Remove cleanup.
15230 (symtab_collector): Add constructor, destructor.
15231 (collect_symtabs_from_filename): Remove cleanup.
15232 * disasm.c (do_mixed_source_and_assembly): Use htab_up.
15233 * compile/compile-c-symbols.c (generate_c_for_variable_locations):
15234 Use htab_up.
15235 * gnu-v3-abi.c (gnuv3_print_vtable): Use htab_up.
15236 * dwarf2read.c (dw2_expand_symtabs_matching)
15237 (dw2_map_symbol_filenames, dwarf_decode_macros)
15238 (write_psymtabs_to_index): Use htab_up.
15239 * dwarf2loc.c (func_verify_no_selftailcall)
15240 (call_site_find_chain_1, func_verify_no_selftailcall)
15241 (chain_candidate, call_site_find_chain_1): Use std::unordered_set,
15242 std::vector, gdb::unique_xmalloc_ptr.
15243 (call_sitep): Remove typedef.
15244 (dwarf2_locexpr_baton_eval): Remove unused variable.
15245
15246 2017-01-10 Tom Tromey <tom@tromey.com>
15247
15248 * python/python-internal.h (make_cleanup_py_decref)
15249 (make_cleanup_py_xdecref): Don't declare.
15250 * python/py-utils.c (py_decref, make_cleanup_py_decref)
15251 (py_xdecref, make_cleanup_py_xdecref): Remove.
15252
15253 2017-01-10 Tom Tromey <tom@tromey.com>
15254
15255 * python/py-framefilter.c (py_mi_print_variables): Use gdbpy_ref.
15256 (py_print_locals, enumerate_locals, py_print_args): Use gdbpy_ref.
15257
15258 2017-01-10 Tom Tromey <tom@tromey.com>
15259
15260 * python/py-framefilter.c (enumerate_args): Use gdbpy_ref.
15261
15262 2017-01-10 Tom Tromey <tom@tromey.com>
15263
15264 * python/py-utils.c (unicode_to_encoded_string)
15265 (python_string_to_target_string)
15266 (python_string_to_target_python_string)
15267 (python_string_to_host_string, gdbpy_obj_to_string)
15268 (get_addr_from_python): Use gdbpy_ref.
15269
15270 2017-01-10 Tom Tromey <tom@tromey.com>
15271
15272 * python/py-unwind.c (pyuw_object_attribute_to_pointer): Use
15273 gdbpy_ref.
15274
15275 2017-01-10 Tom Tromey <tom@tromey.com>
15276
15277 * python/python.c (eval_python_command, gdbpy_decode_line)
15278 (gdbpy_run_events, gdbpy_start_type_printers)
15279 (gdbpy_apply_type_printers): Use gdbpy_ref.
15280
15281 2017-01-10 Tom Tromey <tom@tromey.com>
15282
15283 * python/py-param.c (get_doc_string, compute_enum_values): Use
15284 gdbpy_ref.
15285
15286 2017-01-10 Tom Tromey <tom@tromey.com>
15287
15288 * python/py-inferior.c (find_thread_object, build_inferior_list):
15289 Use gdbpy_ref.
15290
15291 2017-01-10 Tom Tromey <tom@tromey.com>
15292
15293 * python/py-framefilter.c (py_print_frame): Use gdbpy_ref.
15294
15295 2017-01-10 Tom Tromey <tom@tromey.com>
15296
15297 * python/py-finishbreakpoint.c (bpfinishpy_out_of_scope): Use
15298 gdbpy_ref.
15299
15300 2017-01-10 Tom Tromey <tom@tromey.com>
15301
15302 * python/py-cmd.c (cmdpy_completer_helper): Use gdbpy_ref. Remove
15303 extra incref.
15304 (cmdpy_completer_handle_brkchars, cmdpy_completer, cmdpy_init):
15305 Use gdbpy_ref.
15306
15307 2017-01-10 Tom Tromey <tom@tromey.com>
15308
15309 * python/py-breakpoint.c (gdbpy_breakpoint_cond_says_stop): Use
15310 gdbpy_ref.
15311
15312 2017-01-10 Tom Tromey <tom@tromey.com>
15313
15314 * python/py-arch.c (archpy_disassemble): Use gdbpy_ref. Don't
15315 decref results of PyArg_ParseTupleAndKeywords.
15316
15317 2017-01-10 Tom Tromey <tom@tromey.com>
15318
15319 * python/python.c (python_run_simple_file): Use
15320 unique_xmalloc_ptr, gdbpy_ref.
15321
15322 2017-01-10 Tom Tromey <tom@tromey.com>
15323
15324 * python/py-prettyprint.c (print_stack_unless_memory_error)
15325 (print_string_repr, print_children): Use gdbpy_ref.
15326 (dummy_python_frame): New class.
15327 (dummy_python_frame::dummy_python_frame): Rename from
15328 push_dummy_python_frame.
15329 (py_restore_tstate): Remove.
15330
15331 2017-01-10 Tom Tromey <tom@tromey.com>
15332
15333 * python/py-framefilter.c (py_print_frame): Use gdbpy_ref.
15334
15335 2017-01-10 Tom Tromey <tom@tromey.com>
15336
15337 * python/python.c (ensure_python_env, restore_python_env):
15338 Remove.
15339 * python/python-internal.h (ensure_python_env): Don't declare.
15340 * varobj.h (varobj_ensure_python_env): Don't declare.
15341 * varobj.c (varobj_ensure_python_env): Remove.
15342
15343 2017-01-10 Tom Tromey <tom@tromey.com>
15344
15345 * varobj.c (varobj_value_get_print_value): Use
15346 gdbpy_enter_varobj.
15347
15348 2017-01-10 Tom Tromey <tom@tromey.com>
15349
15350 * python/py-prettyprint.c (print_string_repr, print_children):
15351 Update.
15352 * python/py-lazy-string.c (gdbpy_extract_lazy_string): Change type
15353 of "encoding".
15354 * varobj.c (varobj_value_get_print_value): Update.
15355 * python/python-internal.h (gdbpy_extract_lazy_string): Update.
15356
15357 2017-01-10 Tom Tromey <tom@tromey.com>
15358
15359 * varobj.c (varobj_get_display_hint)
15360 (dynamic_varobj_has_child_method, install_new_value_visualizer)
15361 (varobj_set_visualizer, free_variable): Use
15362 gdbpy_enter_varobj.
15363
15364 2017-01-10 Tom Tromey <tom@tromey.com>
15365
15366 * python/python.c (python_command): Use gdbpy_enter, gdbpy_ref.
15367 (do_finish_initialization): New function. Use gdbpy_ref.
15368 (gdbpy_finish_initialization): Use gdbpy_enter. Call
15369 do_finish_initialization.
15370
15371 2017-01-10 Tom Tromey <tom@tromey.com>
15372
15373 * python/py-param.c (get_set_value, get_show_value): Use
15374 gdbpy_enter, gdbpy_ref.
15375
15376 2017-01-10 Tom Tromey <tom@tromey.com>
15377
15378 * python/py-function.c (fnpy_call): Use gdbpy_enter, gdbpy_ref.
15379
15380 2017-01-10 Tom Tromey <tom@tromey.com>
15381
15382 * python/py-cmd.c (cmdpy_function): Use gdbpy_enter, gdbpy_ref.
15383
15384 2017-01-10 Tom Tromey <tom@tromey.com>
15385
15386 * python/py-varobj.c (py_varobj_iter_dtor, py_varobj_iter_next):
15387 Use gdbpy_enter_varobj.
15388
15389 2017-01-10 Tom Tromey <tom@tromey.com>
15390
15391 * varobj.c (gdbpy_enter_varobj): New constructor.
15392 * python/python-internal.h (gdbpy_enter_varobj): New class.
15393 * python/py-varobj.c (py_varobj_get_iterator): Use
15394 gdbpy_enter_varobj.
15395
15396 2017-01-10 Tom Tromey <tom@tromey.com>
15397
15398 * python/py-xmethods.c (gdbpy_get_xmethod_result_type): Use
15399 gdbpy_enter, gdbpy_ref, unique_xmalloc_ptr.
15400 (gdbpy_invoke_xmethod): Use gdbpy_ref, gdbpy_enter.
15401 (gdbpy_get_xmethod_arg_types): Use gdbpy_ref,
15402 unique_xmalloc_ptr.
15403 (gdbpy_get_xmethod_arg_types): Use gdbpy_ref, gdbpy_enter.
15404
15405 2017-01-10 Tom Tromey <tom@tromey.com>
15406
15407 * python/py-xmethods.c (invoke_match_method): Use
15408 gdbpy_ref.
15409
15410 2017-01-10 Tom Tromey <tom@tromey.com>
15411
15412 * python/py-xmethods.c (gdbpy_get_matching_xmethod_workers): use
15413 gdbpy_enter, gdbpy_ref.
15414
15415 2017-01-10 Tom Tromey <tom@tromey.com>
15416
15417 * python/python.c (python_interactive_command): Use gdbpy_enter.
15418
15419 2017-01-10 Tom Tromey <tom@tromey.com>
15420
15421 * python/python.c (gdbpy_before_prompt_hook): Use gdbpy_enter,
15422 gdbpy_ref.
15423
15424 2017-01-10 Tom Tromey <tom@tromey.com>
15425
15426 * python/py-prettyprint.c (gdbpy_apply_val_pretty_printer): Use
15427 gdbpy_enter, gdbpy_ref, unique_xmalloc_ptr.
15428
15429 2017-01-10 Tom Tromey <tom@tromey.com>
15430
15431 * utils.h (htab_deleter): New struct.
15432 (htab_up): New typedef.
15433 * python/py-framefilter.c (gdbpy_apply_frame_filter): Use
15434 gdbpy_enter, gdbpy_ref, htab_up.
15435
15436 2017-01-10 Tom Tromey <tom@tromey.com>
15437
15438 * python/py-unwind.c (pending_frame_invalidate): Remove.
15439 (pyuw_sniffer): Use gdbpy_enter and gdbpy_ref.
15440
15441 2017-01-10 Tom Tromey <tom@tromey.com>
15442
15443 * python/py-xmethods.c (gdbpy_free_xmethod_worker_data)
15444 (gdbpy_clone_xmethod_worker_data): Use gdbpy_enter.
15445
15446 2017-01-10 Tom Tromey <tom@tromey.com>
15447
15448 * python/py-type.c (save_objfile_types): Use gdbpy_enter.
15449
15450 2017-01-10 Tom Tromey <tom@tromey.com>
15451
15452 * python/python.c (gdbpy_eval_from_control_command)
15453 (gdbpy_source_script, gdbpy_run_events)
15454 (gdbpy_source_objfile_script, gdbpy_execute_objfile_script)
15455 (gdbpy_free_type_printers, gdbpy_finish_initialization): Use
15456 gdbpy_enter.
15457
15458 2017-01-10 Tom Tromey <tom@tromey.com>
15459
15460 * python/py-progspace.c (py_free_pspace): Use gdbpy_enter.
15461
15462 2017-01-10 Tom Tromey <tom@tromey.com>
15463
15464 * python/py-objfile.c (py_free_objfile): Use gdbpy_enter.
15465
15466 2017-01-10 Tom Tromey <tom@tromey.com>
15467
15468 * python/py-inferior.c (python_on_normal_stop, python_on_resume)
15469 (python_on_inferior_call_pre, python_on_inferior_call_post)
15470 (python_on_memory_change, python_on_register_change)
15471 (python_inferior_exit, python_new_objfile, add_thread_object)
15472 (delete_thread_object, py_free_inferior): Use gdbpy_enter.
15473
15474 2017-01-10 Tom Tromey <tom@tromey.com>
15475
15476 * python/py-finishbreakpoint.c (bpfinishpy_handle_stop)
15477 (bpfinishpy_handle_exit): Use gdbpy_enter.
15478
15479 2017-01-10 Tom Tromey <tom@tromey.com>
15480
15481 * python/py-cmd.c (cmdpy_destroyer)
15482 (cmdpy_completer_handle_brkchars, cmdpy_completer): Use
15483 gdbpy_enter.
15484
15485 2017-01-10 Tom Tromey <tom@tromey.com>
15486
15487 * python/py-breakpoint.c (gdbpy_breakpoint_cond_says_stop): Use
15488 gdbpy_enter.
15489 (gdbpy_breakpoint_has_cond): Likewise.
15490
15491 2017-01-10 Tom Tromey <tom@tromey.com>
15492
15493 * python/python.c (gdbpy_enter): New constructor.
15494 (~gdbpy_enter): New destructor.
15495 (restore_python_env, ensure_python_env): Rewrite.
15496 * python/python-internal.h (gdbpy_enter): New class.
15497
15498 2017-01-10 Tom Tromey <tom@tromey.com>
15499
15500 * python/py-symbol.c (gdbpy_lookup_symbol): Use gdbpy_ref.
15501
15502 2017-01-10 Tom Tromey <tom@tromey.com>
15503
15504 * python/py-value.c (value_has_field, get_field_flag)
15505 (get_field_type, valpy_getitem, convert_value_from_python): Use
15506 gdbpy_ref.
15507
15508 2017-01-10 Tom Tromey <tom@tromey.com>
15509
15510 * python/python.c (gdbpy_progspaces, gdbpy_objfiles): Use
15511 gdbpy_ref.
15512
15513 2017-01-10 Tom Tromey <tom@tromey.com>
15514
15515 * python/py-prettyprint.c (search_pp_list)
15516 (find_pretty_printer_from_objfiles)
15517 (find_pretty_printer_from_progspace)
15518 (find_pretty_printer_from_gdb, find_pretty_printer)
15519 (gdbpy_get_display_hint, gdbpy_get_varobj_pretty_printer): Use
15520 gdbpy_ref.
15521
15522 2017-01-10 Tom Tromey <tom@tromey.com>
15523
15524 * python/py-param.c (call_doc_function): Use gdbpy_ref.
15525
15526 2017-01-10 Tom Tromey <tom@tromey.com>
15527
15528 * python/py-linetable.c (build_line_table_tuple_from_pcs)
15529 (ltpy_get_all_source_lines): Use gdbpy_ref.
15530
15531 2017-01-10 Tom Tromey <tom@tromey.com>
15532
15533 * python/py-framefilter.c (extract_sym, extract_value)
15534 (get_py_iter_from_func, bootstrap_python_frame_filters): Use
15535 gdbpy_ref.
15536
15537 2017-01-10 Tom Tromey <tom@tromey.com>
15538
15539 * python/py-breakpoint.c (gdbpy_breakpoints): Use gdbpy_ref.
15540
15541 2017-01-10 Tom Tromey <tom@tromey.com>
15542
15543 * python/py-inferior.c (gdbpy_inferiors): Use gdbpy_ref.
15544
15545 2017-01-10 Tom Tromey <tom@tromey.com>
15546
15547 * python/py-function.c (convert_values_to_python, fnpy_init): Use
15548 gdbpy_ref.
15549
15550 2017-01-10 Tom Tromey <tom@tromey.com>
15551
15552 * python/py-cmd.c (gdbpy_string_to_argv): Use gdbpy_ref.
15553
15554 2017-01-10 Tom Tromey <tom@tromey.com>
15555
15556 * python/py-type.c (convert_field, make_fielditem, typy_fields)
15557 (typy_range): Use gdbpy_ref.
15558
15559 2017-01-10 Tom Tromey <tom@tromey.com>
15560
15561 * python/py-threadevent.c (create_thread_event_object): Use
15562 gdbpy_ref.
15563 * python/py-stopevent.c (create_stop_event_object): Simplify.
15564 (emit_stop_event): Use gdbpy_ref.
15565 * python/py-signalevent.c (create_signal_event_object): Use
15566 gdbpy_ref.
15567 * python/py-newobjfileevent.c (create_new_objfile_event_object)
15568 (emit_new_objfile_event, create_clear_objfiles_event_object)
15569 (emit_clear_objfiles_event): Use gdbpy_ref.
15570 * python/py-infevents.c (create_inferior_call_event_object)
15571 (create_register_changed_event_object)
15572 (create_memory_changed_event_object, emit_inferior_call_event)
15573 (emit_memory_changed_event, emit_register_changed_event): Use
15574 gdbpy_ref.
15575 * python/py-exitedevent.c (create_exited_event_object)
15576 (emit_exited_event): Use gdbpy_ref.
15577 * python/py-event.h (evpy_emit_event): Remove
15578 CPYCHECKER_STEALS_REFERENCE_TO_ARG annotation.
15579 * python/py-event.c (evpy_emit_event): Use gdbpy_ref.
15580 * python/py-continueevent.c (emit_continue_event): Use
15581 gdbpy_ref.
15582 * python/py-breakpoint.c (gdbpy_breakpoint_created)
15583 (gdbpy_breakpoint_deleted, gdbpy_breakpoint_modified): Use
15584 gdbpy_ref.
15585 * python/py-bpevent.c (create_breakpoint_event_object): Use
15586 gdbpy_ref.
15587
15588 2017-01-10 Tom Tromey <tom@tromey.com>
15589
15590 * python/py-ref.h: New file.
15591
15592 2017-01-10 Simon Marchi <simon.marchi@ericsson.com>
15593
15594 * cli-out.c (cli_ui_out::do_redirect): Change return type to
15595 void.
15596 * cli-out.h (cli_ui_out::do_redirect): Likewise.
15597 * mi/mi-out.c (mi_ui_out::do_redirect): Likewise.
15598 * mi/mi-out.h (mi_ui_out::do_redirect): Likewise.
15599 * ui-out.c (ui_out::redirect): Likewise.
15600 * ui-out.h (ui_out::redirect, ui_out::do_redirect): Likewise.
15601 * cli/cli-logging.c (set_logging_redirect): Update call site of
15602 ui_out::redirect.
15603 (handle_redirections): Likewise.
15604 * scm-ports.c (ioscm_with_output_to_port_worker): Likewise.
15605 * top.c (execute_command_to_string): Likewise.
15606 * utils.c (do_ui_out_redirect_pop): Likewise.
15607
15608 2017-01-10 Simon Marchi <simon.marchi@ericsson.com>
15609
15610 * stack.c (_initialize_stack): Update "frame" command help message.
15611
15612 2017-01-08 Iain Buclaw <ibuclaw@gdcproject.org>
15613
15614 * d-exp.y (CastExpression): Emit UNOP_CAST_TYPE.
15615
15616 2017-01-06 Yao Qi <yao.qi@linaro.org>
15617
15618 * x86-linux-nat.h: Include gdb_proc_service.h.
15619
15620 2017-01-06 Yao Qi <yao.qi@linaro.org>
15621
15622 * ser-base.h: Include serial.h.
15623
15624 2017-01-06 Yao Qi <yao.qi@linaro.org>
15625
15626 * ppc-linux-tdep.h: Include ppc-tdep.h.
15627
15628 2017-01-06 Yao Qi <yao.qi@linaro.org>
15629
15630 * nat/amd64-linux-siginfo.h: Include signal.h.
15631
15632 2017-01-06 Yao Qi <yao.qi@linaro.org>
15633
15634 * nat/aarch64-linux-hw-point.h: Include break-common.h.
15635
15636 2017-01-06 Yao Qi <yao.qi@linaro.org>
15637
15638 * mi/mi-parse.h: Include mi-cmds.h.
15639
15640 2017-01-06 Yao Qi <yao.qi@linaro.org>
15641
15642 * inf-loop.c: Don't include "target.h".
15643 * inf-loop.h: Include it here.
15644
15645 2017-01-06 Yao Qi <yao.qi@linaro.org>
15646
15647 * dfp.h: Include "dboulest.h" and "expression.h".
15648
15649 2017-01-06 Yao Qi <yao.qi@linaro.org>
15650
15651 * ax-gdb.h: Include "ax.h".
15652
15653 2017-01-06 Yao Qi <yao.qi@linaro.org>
15654
15655 * Makefile.in (HFILES_NO_SRCDIR): Replace gdb_ptrace.h
15656 with nat/gdb_ptrace.h.
15657
15658 2017-01-05 Yao Qi <yao.qi@linaro.org>
15659
15660 * mips-fbsd-tdep.c (mips_fbsd_sigframe_init): Move && to
15661 new line.
15662 (mips64_fbsd_sigframe_init): Likewise.
15663
15664 2017-01-04 John Baldwin <jhb@FreeBSD.org>
15665
15666 * mips-fbsd-tdep.c (_initialize_mips_fbsd_tdep): Use
15667 GDB_OSABI_FREEBSD instead of GDB_OSABI_FREEBSD_ELF.
15668
15669 2017-01-04 John Baldwin <jhb@FreeBSD.org>
15670
15671 * Makefile.in (ALLDEPFILES): Add mips-fbsd-nat.c.
15672 * NEWS: Mention new FreeBSD/mips native configuration.
15673 * config/mips/fbsd.mh: New file.
15674 * configure.host: Add mips*-*-freebsd*.
15675 * mips-fbsd-nat.c: New file.
15676
15677 2017-01-04 John Baldwin <jhb@FreeBSD.org>
15678
15679 * Makefile.in (ALL_TARGET_OBS): Add mips-fbsd-tdep.o.
15680 (ALLDEPFILES): Add mips-fbsd-tdep.c.
15681 * NEWS: Mention new FreeBSD/mips target.
15682 * configure.tgt: Add mips*-*-freebsd*.
15683 * mips-fbsd-tdep.c: New file.
15684 * mips-fbsd-tdep.h: New file.
15685
15686 2017-01-04 Yao Qi <yao.qi@linaro.org>
15687
15688 * dwarf2loc.c (write_pieced_value): Don't use VALUE_FRAME_ID (to),
15689 use c->frame_id when the piece location is DWARF_VALUE_REGISTER.
15690
15691 2017-01-01 Joel Brobecker <brobecker@adacore.com>
15692
15693 Update copyright year range in all GDB files.
15694
15695 2017-01-01 Joel Brobecker <brobecker@adacore.com>
15696
15697 * config/djgpp/fnchange.lst: Add entry for gdb/ChangeLog-2016.
15698
15699 For older changes see ChangeLog-2016.
15700 \f
15701 Local Variables:
15702 mode: change-log
15703 left-margin: 8
15704 fill-column: 74
15705 version-control: never
15706 coding: utf-8
15707 End: