]> git.ipfire.org Git - thirdparty/binutils-gdb.git/blob - gdb/ChangeLog
88c760313a525a47719f7187ba5ce9ab750685a2
[thirdparty/binutils-gdb.git] / gdb / ChangeLog
1 2017-11-20 Simon Marchi <simon.marchi@polymtl.ca>
2
3 * darwin-nat.c (set_enable_mach_exceptions): Constify parameter.
4
5 2017-11-21 Pedro Alves <palves@redhat.com>
6
7 * dwarf2read.c (mapped_index::find_name_components_bounds)
8 <completion mode, upper bound>: Use std::lower_bound instead of
9 std::upper_bound.
10 (test_mapped_index_find_name_component_bounds): Remove incorrect
11 "t1_fund" from expected symbols.
12
13 2017-11-21 Pedro Alves <palves@redhat.com>
14
15 * dwarf2read.c (mapped_index::name_components_casing): New field.
16 (mapped_index) <build_name_components,
17 find_name_components_bounds): Declare new methods.
18 (mapped_index::find_name_components_bounds)
19 (mapped_index::build_name_components): New methods, factored out
20 from dw2_expand_symtabs_matching_symbol.
21 (check_find_bounds_finds)
22 (test_mapped_index_find_name_component_bounds): New.
23 (run_test): Rename to ...
24 (test_dw2_expand_symtabs_matching_symbol): ... this.
25 (run_test): Reimplement.
26
27 2017-11-21 Pedro Alves <palves@redhat.com>
28
29 * cp-name-parser.y (cp_ident_is_alpha, cp_ident_is_alnum): New.
30 (symbol_end): Use cp_ident_is_alnum.
31 (yylex): Use cp_ident_is_alpha and cp_ident_is_alnum.
32 * dwarf2read.c (make_sort_after_prefix_name): New function.
33 (dw2_expand_symtabs_matching_symbol): Use it.
34 (test_symbols): Add more symbols.
35 (run_test): Add tests.
36
37 2017-11-17 Tom Tromey <tom@tromey.com>
38
39 * symtab.h (enum symbol_subclass_kind): New.
40 (struct symbol) <is_cplus_template_function, is_rust_vtable>:
41 Remove.
42 <subclass>: New member.
43 (SYMBOL_IS_CPLUS_TEMPLATE_FUNCTION): Update.
44 * rust-lang.c (rust_get_trait_object_pointer): Update.
45 * dwarf2read.c (read_func_scope): Update.
46 (read_variable): Update.
47
48 2017-11-17 Tom Tromey <tom@tromey.com>
49
50 * dwarf2read.c (read_func_scope): Update.
51 * symtab.h (struct template_symbol): Derive from symbol.
52 <base>: Remove.
53
54 2017-11-17 Tom Tromey <tom@tromey.com>
55
56 * symtab.h (struct symbol) <is_rust_vtable>: New member.
57 (struct rust_vtable_symbol): New.
58 (find_symbol_at_address): Declare.
59 * symtab.c (find_symbol_at_address): New function.
60 * symfile.h (struct quick_symbol_functions)
61 <find_compunit_symtab_by_address>: New member.
62 * symfile-debug.c (debug_qf_find_compunit_symtab_by_address): New
63 function.
64 (debug_sym_quick_functions): Link to
65 debug_qf_find_compunit_symtab_by_address.
66 * rust-lang.c (rust_get_trait_object_pointer): New function.
67 (rust_evaluate_subexp) <case UNOP_IND>: New case. Call
68 rust_get_trait_object_pointer.
69 * psymtab.c (psym_relocate): Clear psymbol_map.
70 (psym_fill_psymbol_map, psym_find_compunit_symtab_by_address): New
71 functions.
72 (psym_functions): Link to psym_find_compunit_symtab_by_address.
73 * objfiles.h (struct objfile) <psymbol_map>: New member.
74 * dwarf2read.c (dwarf2_gdb_index_functions): Update.
75 (process_die) <DW_TAG_variable>: New case. Call read_variable.
76 (rust_containing_type, read_variable): New functions.
77
78 2017-11-17 Simon Marchi <simon.marchi@polymtl.ca>
79
80 * common/gdb_vecs.h (DEF_VEC_I (int)): Remove.
81
82 2017-11-17 Simon Marchi <simon.marchi@polymtl.ca>
83
84 * common/filestuff.c: Include <algorithm>.
85 (open_fds): Change type to std::vector<int>.
86 (do_mark_open_fd): Adjust.
87 (unmark_fd_no_cloexec): Adjust.
88 (do_close): Adjust.
89
90 2017-11-17 Simon Marchi <simon.marchi@polymtl.ca>
91
92 * breakpoint.c (output_thread_groups): Take an std::vector.
93 (print_one_breakpoint_location): Adjust.
94
95 2017-11-17 Joel Brobecker <brobecker@adacore.com>
96
97 * ada-lang.c (resolve_subexp): Add handling of OP_VAR_MSYM_VALUE.
98 (ada_evaluate_subexp_for_cast): New function.
99 (ada_evaluate_subexp) <UNOP_CAST>: Replace code by call to
100 ada_evaluate_subexp_for_cast.
101 (ada_evaluate_subexp) <nosideret>: Replace code by call to
102 eval_skip_value.
103 * eval.c (evaluate_var_value): Make non-static.
104 (evaluate_var_msym_value, eval_skip_value): Likewise.
105 * value.h (evaluate_var_value, evaluate_var_msym_value)
106 (eval_skip_value): Declare.
107
108 2017-11-16 Joel Brobecker <brobecker@adacore.com>
109
110 * ada-lang.c (ada_value_cast): Remove parameter "noside".
111 Update all callers.
112
113 2017-11-16 Pedro Alves <palves@redhat.com>
114
115 * python/py-unwind.c (pyuw_sniffer): Translate
116 PyExc_KeyboardInterrupt to a GDB Quit exception.
117
118 2017-11-16 Pedro Alves <palves@redhat.com>
119
120 * infrun.c (resume_cleanups): Delete.
121 (resume): No longer install a resume_cleanups cleanup nor call
122 QUIT.
123 (proceed): Pass the terminal to the inferior.
124 (keep_going_pass_signal): No longer install a resume_cleanups
125 cleanup.
126
127 2017-11-16 Pedro Alves <palves@redhat.com>
128
129 * inf-loop.c (inferior_event_handler): Don't swallow the exception
130 if the prompt is blocked.
131
132 2017-11-16 Pedro Alves <palves@redhat.com>
133
134 * breakpoint.c (insert_bp_location): Replace bp_err and
135 bp_err_message locals by a gdb_exception local.
136
137 2017-11-16 Pedro Alves <palves@redhat.com>
138
139 * inflow.c (scoped_ignore_sigttou): New class.
140 (child_terminal_ours_1, new_tty): Use it.
141
142 2017-11-16 Ulrich Weigand <uweigand@de.ibm.com>
143
144 * target-float.c (decimal_from_number): Add byte_order argument and
145 call match_endianness. Error if unknown floating-point type.
146 (decimal_to_number): Add byte_order argument and call match_endianness.
147 (decimal_from_longest): Update call. Do not call match_endianness.
148 (decimal_from_ulongest): Likewise.
149 (decimal_binop): Likewise.
150 (decimal_is_zero): Likewise.
151 (decimal_compare): Likewise.
152 (decimal_convert): Likewise.
153
154 2017-11-16 Phil Muldoon <pmuldoon@redhat.com>
155
156 * python/python.c (gdbpy_rbreak): New function.
157 * NEWS: Document Python rbreak feature.
158
159 2017-11-16 Yao Qi <yao.qi@linaro.org>
160
161 * features/tic6x-c62x.xml: Remove.
162 * features/tic6x-c64x.xml: Remove.
163 * features/tic6x-c64xp.xml: Remove.
164
165 2017-11-15 John Baldwin <jhb@FreeBSD.org>
166
167 * symtab.h: Include <array>.
168
169 2017-11-15 John Baldwin <jhb@FreeBSD.org>
170
171 * bsd-kvm.c (bsd_kvm_cmd): Constify 'arg'.
172 (bsd_kvm_proc_cmd): Likewise.
173
174 2017-11-15 Simon Marchi <simon.marchi@ericsson.com>
175
176 * tui/tui-win.c (window_name_completer): Replace VEC with
177 std::vector.
178
179 2017-11-15 Andrew Cagney <cagney@gnu.org>
180
181 * MAINTAINERS: Remove no-longer applicable entries.
182
183 2017-11-15 Andrew Cagney <cagney@gnu.org>
184
185 * MAINTAINERS: Move self to Past Maintainers.
186
187 2017-11-15 Yao Qi <yao.qi@linaro.org>
188
189 * features/Makefile (XMLTOC): Remove nios2-linux.xml.
190 * features/nios2-linux.c: Remove.
191 * nios2-linux-tdep.c (_initialize_nios2_linux_tdep): Don't call
192 initialize_tdesc_nios2_linux.
193
194 2017-11-15 Yao Qi <yao.qi@linaro.org>
195
196 * m68hc11-tdep.c (M68HC11_NUM_REGS): Change it to
197 M68HC11_LAST_HARD_REG + 1.
198
199 2017-11-14 Paul Carroll <pcarroll@codesourcery.com>
200
201 PR gdb/22388
202 * remote.c (remote_write_bytes_aux, remote_read_bytes_1,
203 remote_read_bytes, remote_write_qxfer, remote_xfer_partial):
204 Return TARGET_XFER_EOF if size of returned data is 0.
205
206 2017-11-14 Simon Marchi <simon.marchi@ericsson.com>
207
208 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
209 memory-map-selftests.c.
210 (SUBDIR_UNITTESTS_OBS): Add memory-map-selftests.o.
211 * memory-map.c (memory_map_start_memory): Fix computation of hi
212 address.
213 * unittests/memory-map-selftests.c: New file.
214
215 2017-11-09 Joel Brobecker <brobecker@adacore.com>
216
217 * ada-lang.c: Fix some typos in the general command documenting
218 how Ada expressions are being evaluated and how their result
219 is printed.
220
221 2017-11-09 Tom Tromey <tom@tromey.com>
222
223 * psymtab.c (psymbol_hash): Do not hash string contents.
224 (psymbol_compare): Add comment.
225
226 2017-11-09 Tom Tromey <tom@tromey.com>
227
228 * dictionary.c (dict_hash): Move "TKB" check into the "switch".
229
230 2017-11-08 Joel Brobecker <brobecker@adacore.com>
231
232 * ada-exp.y (write_var_from_sym): Remove parameter
233 "orig_left_context". Update all callers.
234
235 2017-11-08 Simon Marchi <simon.marchi@ericsson.com>
236
237 * tracepoint.h (class collection_list) <stringify>: Return
238 std::vector<std::string>.
239 (encode_actions_rsp): Change parameters to
240 std::vector<std::string> *.
241 * tracepoint.c (collection_list::stringify): Return
242 std::vector<std::string> and adjust accordingly.
243 (encode_actions_rsp): Changee parameters to
244 std::vector<std::string> and adjust accordingly.
245 * remote.c (free_actions_list),
246 free_actions_list_cleanup_wrapper): Remove.
247 (remote_download_tracepoint): Adjust to std::vector.
248
249 2017-11-08 Tom Tromey <tom@tromey.com>
250
251 * dwarf2read.c (symbolp): Remove typedef.
252 (read_func_scope): Use std::vector.
253 (process_structure_scope): Use std::vector.
254
255 2017-11-08 Pedro Alves <palves@redhat.com>
256
257 * ada-lang.c (ada_make_symbol_completion_list): Use
258 completion_skip_symbol.
259 * symtab.c (symbol_is_function_or_method(minimal_symbol*)): New.
260 (symbol_is_function_or_method(symbol*)): New.
261 (add_symtab_completions): Add complete_symbol_mode parameter. Use
262 completion_skip_symbol.
263 (default_collect_symbol_completion_matches_break_on): Use
264 completion_skip_symbol. Pass down mode.
265 (collect_file_symbol_completion_matches): Pass down mode.
266 * symtab.h (symbol_is_function_or_method): New declarations.
267 (completion_skip_symbol): New template function.
268
269 2017-11-08 Pedro Alves <palves@redhat.com>
270
271 * linespec.c (iterate_over_all_matching_symtabs): Add
272 search_domain parameter. Pass it down to expand_symtabs_matching.
273 (decode_objc): Request FUNCTIONS_DOMAIN symbols only.
274 (lookup_prefix_sym): Adjust by passing ALL_DOMAIN as
275 search_domain.
276 (add_all_symbol_names_from_pspace): Add search_domain parameter.
277 Pass it down.
278 (find_method, find_function_symbols): Request FUNCTIONS_DOMAIN
279 symbols.
280 (add_matching_symbols_to_info): Add search_domain parameter. Pass
281 it down.
282
283 2017-11-08 Pedro Alves <palves@redhat.com>
284
285 * ada-lang.c (ada_make_symbol_completion_list): Remove text and
286 text_len locals and don't pass them down.
287 * symtab.c (completion_list_add_name): Remove
288 sym_text/sym_text_len parameters and adjust.
289 (completion_list_add_symbol, completion_list_add_msymbol)
290 (completion_list_objc_symbol, completion_list_add_fields)
291 (add_symtab_completions): Likewise.
292 (default_collect_symbol_completion_matches_break_on)
293 (collect_file_symbol_completion_matches): Remove sym_text_len
294 local and don't pass it down.
295 * symtab.h (completion_list_add_name): Remove
296 sym_text/sym_text_len parameters.
297
298 2017-11-08 Pedro Alves <palves@redhat.com>
299
300 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
301 unittests/lookup_name_info-selftests.c.
302 (SUBDIR_UNITTESTS_OBS): Add lookup_name_info-selftests.o.
303 * cp-support.c: Include "selftest.h".
304 (cp_remove_params_1): Rename from cp_remove_params. Add
305 'require_param' parameter, and handle it.
306 (cp_remove_params): Reimplement.
307 (cp_remove_params_if_any): New.
308 (selftests::quote): New.
309 (selftests::check_remove_params): New.
310 (selftests::test_cp_remove_params): New.
311 (_initialize_cp_support): Install
312 selftests::test_cp_remove_params.
313 * cp-support.h (cp_remove_params_if_any): Declare.
314 * dwarf2read.c :Include "selftest.h".
315 (dw2_expand_symtabs_matching_symbol): Use
316 lookup_name_info::make_ignore_params.
317 (selftests::dw2_expand_symtabs_matching::mock_mapped_index)
318 (selftests::dw2_expand_symtabs_matching::string_or_null)
319 (selftests::dw2_expand_symtabs_matching::check_match)
320 (selftests::dw2_expand_symtabs_matching::test_symbols)
321 (selftests::dw2_expand_symtabs_matching::run_test): New.
322 (_initialize_dwarf2_read): Register
323 selftests::dw2_expand_symtabs_matching::run_test.
324 * psymtab.c (psym_expand_symtabs_matching): Use
325 lookup_name_info::make_ignore_params.
326 * symtab.c (demangle_for_lookup_info::demangle_for_lookup_info):
327 If the lookup name wants to ignore parameters, strip them.
328 (compare_symbol_name): Remove sym_text/sym_text_len parameters and
329 code handling '('.
330 (completion_list_add_name): Don't pass down sym_text/sym_text_len.
331 (default_collect_symbol_completion_matches_break_on): Don't try to
332 strip parameters.
333 * symtab.h (lookup_name_info::lookup_name_info): Add
334 'ignore_parameters' parameter.
335 (lookup_name_info::ignore_parameters)
336 (lookup_name_info::make_ignore_params): New methods.
337 (lookup_name_info::m_ignore_parameters): New field.
338 * unittests/lookup_name_info-selftests.c: New file.
339
340 2017-11-08 Pedro Alves <palves@redhat.com>
341
342 * dwarf2read.c (dw2_expand_marked_cus)
343 (dw2_expand_symtabs_matching_symbol): Remove forward declarations.
344 (dw2_expand_symtabs_matching): Move further below.
345 (dw2_expand_marked_cus): Reindent.
346
347 2017-11-08 Pedro Alves <palves@redhat.com>
348
349 * dwarf2read.c (byte_swap, MAYBE_SWAP): Move higher up in file.
350 (struct name_component): New.
351 (mapped_index::name_components): New field.
352 (mapped_index::symbol_name_at): New method.
353 (dwarf2_read_index): Call mapped_index ctor.
354 (dw2_map_matching_symbols): Add comment about name_components
355 table.
356 (dw2_expand_symtabs_matching): Factor part to...
357 (dw2_expand_symtabs_matching_symbol): ... this new function.
358 Build name components table, and lookup symbols in it before
359 calling the name matcher.
360 (dw2_expand_marked_cus): New, factored out from
361 dw2_expand_symtabs_matching.
362 (dwarf2_per_objfile_free): Call the mapped_index's dtor.
363
364 2017-11-08 Pedro Alves <palves@redhat.com>
365
366 * ada-lang.c (ada_encode): Rename to ..
367 (ada_encode_1): ... this. Add throw_errors parameter and handle
368 it.
369 (ada_encode): Reimplement.
370 (match_name): Delete, folded into full_name.
371 (resolve_subexp): No longer pass the encoded name to
372 ada_lookup_symbol_list.
373 (should_use_wild_match): Delete.
374 (name_match_type_from_name): New.
375 (ada_lookup_simple_minsym): Use lookup_name_info and the
376 language's symbol_name_matcher_ftype.
377 (add_symbols_from_enclosing_procs, ada_add_local_symbols)
378 (ada_add_block_renamings): Adjust to use lookup_name_info.
379 (ada_lookup_name): New.
380 (add_nonlocal_symbols, ada_add_all_symbols)
381 (ada_lookup_symbol_list_worker, ada_lookup_symbol_list)
382 (ada_iterate_over_symbols): Adjust to use lookup_name_info.
383 (ada_name_for_lookup): Delete.
384 (ada_lookup_encoded_symbol): Construct a verbatim name.
385 (wild_match): Reverse sense of return type. Use bool.
386 (full_match): Reverse sense of return type. Inline bits of old
387 match_name here.
388 (ada_add_block_symbols): Adjust to use lookup_name_info.
389 (symbol_completion_match): Delete, folded into...
390 (ada_lookup_name_info::matches): ... .this new method.
391 (symbol_completion_add): Delete.
392 (ada_collect_symbol_completion_matches): Add name_match_type
393 parameter. Adjust to use lookup_name_info and
394 completion_list_add_name.
395 (get_var_value, ada_add_global_exceptions): Adjust to use
396 lookup_name_info.
397 (ada_get_symbol_name_cmp): Delete.
398 (do_wild_match, do_full_match): New functions.
399 (ada_lookup_name_info::ada_lookup_name_info): New method.
400 (ada_symbol_name_matches, ada_get_symbol_name_matcher): New
401 functions.
402 (ada_language_defn): Install ada_get_symbol_name_matcher.
403 * ada-lex.l (processId): If name starts with '<', copy it
404 verbatim.
405 * block.c (block_iter_match_step, block_iter_match_first)
406 (block_iter_match_next, block_lookup_symbol)
407 (block_lookup_symbol_primary, block_find_symbol): Adjust to use
408 lookup_name_info.
409 * block.h (block_iter_match_first, block_iter_match_next)
410 (ALL_BLOCK_SYMBOLS_WITH_NAME): Adjust to use lookup_name_info.
411 * c-lang.c (c_language_defn, cplus_language_defn)
412 (asm_language_defn, minimal_language_defn): Adjust comments to
413 refer to la_get_symbol_name_matcher.
414 * completer.c (complete_files_symbols)
415 (collect_explicit_location_matches, symbol_completer): Pass a
416 symbol_name_match_type down.
417 * completer.h (class completion_match, completion_match_result):
418 New classes.
419 (completion_tracker::reset_completion_match_result): New method.
420 (completion_tracker::m_completion_match_result): New field.
421 * cp-support.c (make_symbol_overload_list_block): Adjust to use
422 lookup_name_info.
423 (cp_fq_symbol_name_matches, cp_get_symbol_name_matcher): New
424 functions.
425 * cp-support.h (cp_get_symbol_name_matcher): New declaration.
426 * d-lang.c: Adjust comments to refer to
427 la_get_symbol_name_matcher.
428 * dictionary.c (dict_vector) <iter_match_first, iter_match_next>:
429 Adjust to use lookup_name_info.
430 (dict_iter_match_first, dict_iter_match_next)
431 (iter_match_first_hashed, iter_match_next_hashed)
432 (iter_match_first_linear, iter_match_next_linear): Adjust to work
433 with a lookup_name_info.
434 * dictionary.h (dict_iter_match_first, dict_iter_match_next):
435 Likewise.
436 * dwarf2read.c (dw2_lookup_symbol): Adjust to use lookup_name_info.
437 (dw2_map_matching_symbols): Adjust to use symbol_name_match_type.
438 (gdb_index_symbol_name_matcher): New class.
439 (dw2_expand_symtabs_matching) Adjust to use lookup_name_info and
440 gdb_index_symbol_name_matcher. Accept a NULL symbol_matcher.
441 * f-lang.c (f_collect_symbol_completion_matches): Adjust to work
442 with a symbol_name_match_type.
443 (f_language_defn): Adjust comments to refer to
444 la_get_symbol_name_matcher.
445 * go-lang.c (go_language_defn): Adjust comments to refer to
446 la_get_symbol_name_matcher.
447 * language.c (default_symbol_name_matcher)
448 (language_get_symbol_name_matcher): New functions.
449 (unknown_language_defn, auto_language_defn): Adjust comments to
450 refer to la_get_symbol_name_matcher.
451 * language.h (symbol_name_cmp_ftype): Delete.
452 (language_defn) <la_collect_symbol_completion_matches>: Add match
453 type parameter.
454 <la_get_symbol_name_cmp>: Delete field.
455 <la_get_symbol_name_matcher>: New field.
456 <la_iterate_over_symbols>: Adjust to use lookup_name_info.
457 (default_symbol_name_matcher, language_get_symbol_name_matcher):
458 Declare.
459 * linespec.c (iterate_over_all_matching_symtabs)
460 (iterate_over_file_blocks): Adjust to use lookup_name_info.
461 (find_methods): Add language parameter, and use lookup_name_info
462 and the language's symbol_name_matcher_ftype.
463 (linespec_complete_function): Adjust.
464 (lookup_prefix_sym): Use lookup_name_info.
465 (add_all_symbol_names_from_pspace): Adjust.
466 (find_superclass_methods): Add language parameter and pass it
467 down.
468 (find_method): Pass symbol language down.
469 (find_linespec_symbols): Don't demangle or Ada encode here.
470 (search_minsyms_for_name): Add lookup_name_info parameter.
471 (add_matching_symbols_to_info): Add name_match_type parameter.
472 Use lookup_name_info.
473 * m2-lang.c (m2_language_defn): Adjust comments to refer to
474 la_get_symbol_name_matcher.
475 * minsyms.c: Include <algorithm>.
476 (add_minsym_to_demangled_hash_table): Remove table parameter and
477 add objfile parameter. Use search_name_hash, and add language to
478 demangled languages vector.
479 (struct found_minimal_symbols): New struct.
480 (lookup_minimal_symbol_mangled, lookup_minimal_symbol_demangled):
481 New functions.
482 (lookup_minimal_symbol): Adjust to use them. Don't canonicalize
483 input names here. Use lookup_name_info instead. Lookup up
484 demangled names once for each language in the demangled names
485 vector.
486 (iterate_over_minimal_symbols): Use lookup_name_info. Lookup up
487 demangled names once for each language in the demangled names
488 vector.
489 (build_minimal_symbol_hash_tables): Adjust.
490 * minsyms.h (iterate_over_minimal_symbols): Adjust to pass down a
491 lookup_name_info.
492 * objc-lang.c (objc_language_defn): Adjust comment to refer to
493 la_get_symbol_name_matcher.
494 * objfiles.h: Include <vector>.
495 (objfile_per_bfd_storage) <demangled_hash_languages>: New field.
496 * opencl-lang.c (opencl_language_defn): Adjust comment to refer to
497 la_get_symbol_name_matcher.
498 * p-lang.c (pascal_language_defn): Adjust comment to refer to
499 la_get_symbol_name_matcher.
500 * psymtab.c (psym_lookup_symbol): Use lookup_name_info.
501 (match_partial_symbol): Use symbol_name_match_type,
502 lookup_name_info and psymbol_name_matches.
503 (lookup_partial_symbol): Use lookup_name_info.
504 (map_block): Use symbol_name_match_type and lookup_name_info.
505 (psym_map_matching_symbols): Use symbol_name_match_type.
506 (psymbol_name_matches): New.
507 (recursively_search_psymtabs): Use lookup_name_info and
508 psymbol_name_matches. Rename 'kind' parameter to 'domain'.
509 (psym_expand_symtabs_matching): Use lookup_name_info. Rename
510 'kind' parameter to 'domain'.
511 * rust-lang.c (rust_language_defn): Adjust comment to refer to
512 la_get_symbol_name_matcher.
513 * symfile-debug.c (debug_qf_map_matching_symbols)
514 (debug_qf_map_matching_symbols): Use symbol_name_match_type.
515 (debug_qf_expand_symtabs_matching): Use lookup_name_info.
516 * symfile.c (expand_symtabs_matching): Use lookup_name_info.
517 * symfile.h (quick_symbol_functions) <map_matching_symbols>:
518 Adjust to use symbol_name_match_type.
519 <expand_symtabs_matching>: Adjust to use lookup_name_info.
520 (expand_symtabs_matching): Adjust to use lookup_name_info.
521 * symmisc.c (maintenance_expand_symtabs): Use
522 lookup_name_info::match_any ().
523 * symtab.c (symbol_matches_search_name): New.
524 (eq_symbol_entry): Adjust to use lookup_name_info and the
525 language's matcher.
526 (demangle_for_lookup_info::demangle_for_lookup_info): New.
527 (lookup_name_info::match_any): New.
528 (iterate_over_symbols, search_symbols): Use lookup_name_info.
529 (compare_symbol_name): Add language, lookup_name_info and
530 completion_match_result parameters, and use them.
531 (completion_list_add_name): Make extern. Add language and
532 lookup_name_info parameters. Use them.
533 (completion_list_add_symbol, completion_list_add_msymbol)
534 (completion_list_objc_symbol): Add lookup_name_info parameters and
535 adjust. Pass down language.
536 (completion_list_add_fields): Add lookup_name_info parameters and
537 adjust. Pass down language.
538 (add_symtab_completions): Add lookup_name_info parameters and
539 adjust.
540 (default_collect_symbol_completion_matches_break_on): Add
541 name_match_type parameter, and use it. Use lookup_name_info.
542 (default_collect_symbol_completion_matches)
543 (collect_symbol_completion_matches): Add name_match_type
544 parameter, and pass it down.
545 (collect_symbol_completion_matches_type): Adjust.
546 (collect_file_symbol_completion_matches): Add name_match_type
547 parameter, and use lookup_name_info.
548 * symtab.h: Include <string> and "common/gdb_optional.h".
549 (enum class symbol_name_match_type): New.
550 (class ada_lookup_name_info): New.
551 (struct demangle_for_lookup_info): New.
552 (class lookup_name_info): New.
553 (symbol_name_matcher_ftype): New.
554 (SYMBOL_MATCHES_SEARCH_NAME): Use symbol_matches_search_name.
555 (symbol_matches_search_name): Declare.
556 (MSYMBOL_MATCHES_SEARCH_NAME): Delete.
557 (default_collect_symbol_completion_matches)
558 (collect_symbol_completion_matches)
559 (collect_file_symbol_completion_matches): Add name_match_type
560 parameter.
561 (iterate_over_symbols): Use lookup_name_info.
562 (completion_list_add_name): Declare.
563 * utils.c (enum class strncmp_iw_mode): Moved to utils.h.
564 (strncmp_iw_with_mode): Now extern.
565 * utils.h (enum class strncmp_iw_mode): Moved from utils.c.
566 (strncmp_iw_with_mode): Declare.
567
568 2017-11-08 Keith Seitz <keiths@redhat.com>
569 Pedro Alves <palves@redhat.com>
570
571 * ada-lang.c (ada_language_defn): Install
572 default_search_name_hash.
573 * buildsym.c (struct buildsym_compunit): <language>: New field.
574 (finish_block_internal): Pass language when creating dictionaries.
575 (start_buildsym_compunit, start_symtab): New language parameters.
576 Use them.
577 (restart_symtab): Pass down compilation unit's language.
578 * buildsym.h (enum language): Forward declare.
579 (start_symtab): New 'language' parameter.
580 * c-lang.c (c_language_defn, cplus_language_defn)
581 (asm_language_defn, minimal_language_defn): Install
582 default_search_name_hash.
583 * coffread.c (coff_start_symtab): Adjust.
584 * d-lang.c (d_language_defn): Install default_search_name_hash.
585 * dbxread.c (struct symloc): Add 'pst_language' field.
586 (PST_LANGUAGE): Define.
587 (start_psymtab, read_ofile_symtab): Use it.
588 (process_one_symbol): New 'language' parameter. Pass it down.
589 * dictionary.c (struct dictionary) <language>: New field.
590 (DICT_LANGUAGE): Define.
591 (dict_create_hashed, dict_create_hashed_expandable)
592 (dict_create_linear, dict_create_linear_expandable): New parameter
593 'language'. Set the dictionary's language.
594 (iter_match_first_hashed): Adjust to rename.
595 (insert_symbol_hashed): Assert we don't see mismatching
596 languages. Adjust to rename.
597 (dict_hash): Rename to ...
598 (default_search_name_hash): ... this and make extern.
599 * dictionary.h (struct language_defn): Forward declare.
600 (dict_create_hashed): New parameter 'language'.
601 * dwarf2read.c (dwarf2_start_symtab): Pass down language.
602 * f-lang.c (f_language_defn): Install default_search_name_hash.
603 * go-lang.c (go_language_defn): Install default_search_name_hash.
604 * jit.c (finalize_symtab): Pass compunit's language to dictionary
605 creation.
606 * language.c (unknown_language_defn, auto_language_defn):
607 * language.h (language_defn::la_search_name_hash): New field.
608 (default_search_name_hash): Declare.
609 * m2-lang.c (m2_language_defn): Install default_search_name_hash.
610 * mdebugread.c (new_block): New parameter 'language'.
611 * mdebugread.c (parse_symbol): Pass symbol language to block
612 allocation.
613 (psymtab_to_symtab_1): Pass down language.
614 (new_symtab): Pass compunit's language to block allocation.
615 * objc-lang.c (objc_language_defn): Install
616 default_search_name_hash.
617 * opencl-lang.c (opencl_language_defn):
618 * p-lang.c (pascal_language_defn): Install
619 default_search_name_hash.
620 * rust-lang.c (rust_language_defn): Install
621 default_search_name_hash.
622 * stabsread.h (enum language): Forward declare.
623 (process_one_symbol): Add 'language' parameter.
624 * symtab.c (search_name_hash): New function.
625 * symtab.h (search_name_hash): Declare.
626 * xcoffread.c (read_xcoff_symtab): Pass language to start_symtab.
627
628 2017-11-08 Pedro Alves <palves@redhat.com>
629
630 * cp-name-parser.y (main): Don't initialize extra_chars.
631
632 2017-11-07 Tom Tromey <tom@tromey.com>
633
634 * event-top.h (command_handler): Constify.
635 * record-full.c (cmd_record_full_start): Update.
636 * thread.c (thread_apply_all_command): Update.
637 * printcmd.c (eval_command): Update.
638 * mi/mi-main.c (mi_execute_cli_command): Update.
639 (mi_execute_async_cli_command): Update.
640 * tui/tui-stack.c (tui_update_command): Update.
641 * cli/cli-interp.c (safe_execute_command): Constify.
642 * record.c (record_start): Update.
643 (record_start, record_stop, cmd_record_start): Update.
644 * record-btrace.c (cmd_record_btrace_bts_start): Update.
645 (cmd_record_btrace_pt_start): Update.
646 (cmd_record_btrace_start): Update.
647 (cmd_record_btrace_start): Update.
648 * reverse.c (exec_reverse_once): Update.
649 * python/python.c (execute_gdb_command): Don't copy the command.
650 * event-top.c (command_line_handler): Update.
651 (command_handler): Constify.
652 * defs.h (deprecated_call_command_hook): Constify.
653 * cli/cli-script.h (execute_user_command): Constify.
654 * cli/cli-script.c (execute_user_command): Constify.
655 (execute_cmd_pre_hook, execute_cmd_post_hook): Constify.
656 (enum command_control_type): Update.
657 * main.c (catch_command_errors): Remove non-const overload.
658 (catch_command_errors_ftype): Remove.
659 * python/py-cmd.c (cmdpy_function): Constify.
660 * guile/scm-cmd.c (cmdscm_function): Constify.
661 * cli/cli-dump.c (call_dump_func): Constify.
662 * cli/cli-decode.c (do_const_cfunc): Constify.
663 (do_sfunc): Constify.
664 (cmd_func): Constify.
665 * gdbcmd.h (execute_command, execute_command_to_string): Constify.
666 * top.h (execute_command): Constify.
667 * top.c (execute_command): Constify.
668 (execute_command_to_string): Constify.
669 (deprecated_call_command_hook): Constify.
670 * command.h (cmd_func): Constify.
671 * cli/cli-decode.h (struct cmd_list_element) <func>: Constify.
672
673 2017-11-07 Tom Tromey <tom@tromey.com>
674
675 * ada-lang.c (catch_ada_exception_command): Constify.
676 (catch_assert_command): Constify.
677 * break-catch-throw.c (catch_catch_command, catch_throw_command)
678 (catch_rethrow_command): Constify.
679 (catch_exception_command_1): Constify.
680 * breakpoint.h (add_catch_command): Constify.
681 * break-catch-syscall.c (catch_syscall_command_1): Constify.
682 (catch_syscall_split_args): Constify.
683 * break-catch-sig.c (catch_signal_command): Constify.
684 (catch_signal_split_args): Constify.
685 * cli/cli-decode.h (struct cmd_list_element) <function>: Use
686 cmd_const_sfunc_ftype.
687 * cli/cli-decode.c (add_setshow_cmd_full): Constify.
688 (add_setshow_enum_cmd, add_setshow_auto_boolean_cmd)
689 (add_setshow_boolean_cmd, add_setshow_filename_cmd)
690 (add_setshow_string_cmd, struct cmd_list_element)
691 (add_setshow_optional_filename_cmd, add_setshow_integer_cmd)
692 (add_setshow_uinteger_cmd, add_setshow_zinteger_cmd)
693 (add_setshow_zuinteger_unlimited_cmd, add_setshow_zuinteger_cmd):
694 Constify.
695 (set_cmd_sfunc): Constify.
696 (empty_sfunc): Constify.
697 * command.h (add_setshow_enum_cmd, add_setshow_auto_boolean_cmd)
698 (add_setshow_boolean_cmd, add_setshow_filename_cmd)
699 (add_setshow_string_cmd, add_setshow_string_noescape_cmd)
700 (add_setshow_optional_filename_cmd, add_setshow_integer_cmd)
701 (add_setshow_uinteger_cmd, add_setshow_zinteger_cmd)
702 (add_setshow_zuinteger_cmd, add_setshow_zuinteger_unlimited_cmd):
703 Constify.
704 (set_cmd_sfunc): Constify.
705 (cmd_sfunc_ftype): Remove.
706 * compile/compile.c (set_compile_args): Constify.
707 * infrun.c (set_disable_randomization): Constify.
708 * infcmd.c (set_args_command, set_cwd_command): Constify.
709 * breakpoint.c (set_condition_evaluation_mode): Constify.
710 (add_catch_command): Constify.
711 (catch_fork_command_1, catch_exec_command_1)
712 (catch_load_command_1, catch_unload_command_1): Constify.
713 (catch_load_or_unload): Constify.
714 * guile/scm-param.c (pascm_set_func): Constify.
715 (add_setshow_generic): Constify.
716 * python/py-param.c (get_set_value): Constify.
717 * top.h (set_verbose): Constify.
718 * tui/tui-win.c (tui_set_var_cmd): Constify.
719 * mi/mi-main.c (set_mi_async_command): Constify.
720 * cli/cli-logging.c (set_logging_overwrite)
721 (set_logging_redirect): Constify.
722 * value.c (set_max_value_size): Constify.
723 * valprint.c (set_input_radix, set_output_radix): Constify.
724 * utils.c (set_width_command, set_height_command): Constify.
725 * typeprint.c (set_print_type_methods, set_print_type_typedefs): Constify.
726 * tracepoint.c (set_disconnected_tracing)
727 (set_circular_trace_buffer, set_trace_buffer_size)
728 (set_trace_user, set_trace_notes, set_trace_stop_notes): Constify.
729 * top.c (set_history_size_command, set_verbose, set_editing)
730 (set_gdb_datadir, set_history_filename): Constify.
731 * target.c (set_targetdebug, maint_set_target_async_command)
732 (maint_set_target_non_stop_command, set_target_permissions)
733 (set_write_memory_permission): Constify.
734 (open_target): Constify.
735 * target-descriptions.c (set_tdesc_filename_cmd): Constify.
736 * target-dcache.c (set_stack_cache, set_code_cache): Constify.
737 * symtab.c (set_symbol_cache_size_handler): Constify.
738 * symfile.c (set_ext_lang_command): Constify.
739 * symfile-debug.c (set_debug_symfile): Constify.
740 * source.c (set_directories_command): Constify.
741 * solib.c (reload_shared_libraries, gdb_sysroot_changed): Constify.
742 * serial.c (set_parity): Constify.
743 * rs6000-tdep.c (powerpc_set_soft_float, powerpc_set_vector_abi): Constify.
744 * remote.c (set_remote_exec_file, set_remotebreak)
745 (set_remote_protocol_Z_packet_cmd, set_range_stepping): Constify.
746 * record.c (set_record_insn_history_size)
747 (set_record_call_history_size): Constify.
748 * record-full.c (set_record_full_insn_max_num): Constify.
749 * proc-api.c (set_procfs_trace_cmd, set_procfs_file_cmd): Constify.
750 * osabi.c (set_osabi): Constify.
751 * mips-tdep.c (set_mips64_transfers_32bit_regs)
752 (reinit_frame_cache_sfunc, mips_abi_update): Constify.
753 * maint.c (maintenance_set_profile_cmd): Constify.
754 * linux-thread-db.c (set_libthread_db_search_path): Constify.
755 * language.c (set_language_command, set_range_command)
756 (set_case_command): Constify.
757 * infrun.c (set_non_stop, set_observer_mode)
758 (set_stop_on_solib_events, set_schedlock_func)
759 (set_exec_direction_func): Constify.
760 * infcmd.c (set_inferior_tty_command): Constify.
761 * disasm.c (set_disassembler_options_sfunc): Constify.
762 * demangle.c (set_demangling_command): Constify.
763 * dcache.c (set_dcache_size, set_dcache_line_size): Constify.
764 * cris-tdep.c (set_cris_version, set_cris_mode)
765 (set_cris_dwarf2_cfi): Constify.
766 * corefile.c (set_gnutarget_command): Constify.
767 * charset.c (set_host_charset_sfunc, set_target_charset_sfunc)
768 (set_target_wide_charset_sfunc): Constify.
769 * breakpoint.c (update_dprintf_commands): Constify.
770 * auto-load.c (set_auto_load_dir, set_auto_load_safe_path): Constify.
771 * arm-tdep.c (set_fp_model_sfunc, arm_set_abi)
772 (set_disassembly_style_sfunc): Constify.
773 * arch-utils.c (set_endian, set_architecture): Constify.
774 * alpha-tdep.c (reinit_frame_cache_sfunc): Constify.
775 * agent.c (set_can_use_agent): Constify.
776
777 2017-11-07 Tom Tromey <tom@tromey.com>
778
779 * go32-nat.c (go32_sysinfo, go32_sldt, go32_sgdt, go32_sidt)
780 (go32_pde, go32_pte, go32_pte_for_address): Constify.
781 * gnu-nat.c (_parse_bool_arg, show_thread_default_pause_cmd)
782 (set_thread_default_pause_cmd, set_thread_default_run_cmd)
783 (show_thread_default_run_cmd, set_thread_default_detach_sc_cmd)
784 (parse_int_arg, show_thread_default_detach_sc_cmd)
785 (set_signals_cmd, show_signals_cmd, set_sig_thread_cmd)
786 (show_sig_thread_cmd, set_stopped_cmd, show_stopped_cmd)
787 (set_exceptions_cmd, show_exceptions_cmd, set_task_pause_cmd)
788 (show_task_pause_cmd, set_task_detach_sc_cmd)
789 (show_task_detach_sc_cmd, set_task_exc_port_cmd)
790 (set_noninvasive_cmd, set_thread_pause_cmd)
791 (show_thread_pause_cmd, set_thread_run_cmd, show_thread_run_cmd)
792 (set_thread_detach_sc_cmd, show_thread_detach_sc_cmd)
793 (set_thread_exc_port_cmd, thread_takeover_sc_cmd): Constify.
794 * windows-nat.c (display_selectors): Constify.
795 * cli/cli-decode.h (struct cmd_list_element) <function>: Remove
796 non-const "cfunc".
797 * cli/cli-decode.c (set_cmd_cfunc): Remove non-const overload.
798 (cmd_cfunc_eq): Likewise.
799 (struct cmd_list_element): Likewise.
800 (do_cfunc): Remove.
801 (cli_user_command_p): Update.
802 * command.h (add_cmd): Remove non-const overload.
803 (cmd_cfunc_ftype): Remove typedef.
804 (cmd_cfunc_eq): Remove non-const overload.
805 * value.c (show_values): Constify.
806 * thread.c (thread_apply_all_command): Constify.
807 * symfile.c (load_command): Constify.
808 * source.c (directory_command): Constify.
809 * maint.c (maintenance_internal_error)
810 (maintenance_demangler_warning, maintenance_space_display)
811 (maintenance_print_architecture, maintenance_translate_address)
812 (maintenance_info_selftests, maintenance_internal_warning):
813 Constify.
814 * breakpoint.c (disable_trace_command, enable_trace_command):
815 Constify.
816 * auto-load.c (info_auto_load_local_gdbinit, add_auto_load_dir):
817 Constify.
818 (add_auto_load_safe_path): Constify.
819 * guile/scm-auto-load.c (info_auto_load_guile_scripts): Constify.
820 * top.h (show_commands): Constify.
821 * linux-thread-db.c (info_auto_load_libthread_db): Constify.
822 * sparc64-tdep.c (adi_examine_command): Constify.
823 (adi_assign_command): Constify.
824
825 2017-11-07 Tom Tromey <tom@tromey.com>
826
827 * frame.h (info_locals_command, info_args_command): Constify.
828 * auto-load.h (auto_load_info_scripts): Constify.
829 * inferior.h (registers_info): Constify.
830 * copying.c: Rebuild.
831 * copying.awk: Constify generated commands.
832 * auto-load.c (auto_load_info_scripts)
833 (info_auto_load_gdb_scripts): Constify.
834 * cli/cli-decode.c (struct cmd_list_element): Take a
835 cmd_const_cfunc_ftype.
836 * command.h (add_info): Take a cmd_const_cfunc_ftype.
837 * tui/tui-win.c (tui_all_windows_info): Constify.
838 * python/py-auto-load.c (info_auto_load_python_scripts):
839 Constify.
840 * cli/cli-cmds.c (show_command): Remove non-const overload.
841 * tracepoint.c (info_tvariables_command, info_scope_command):
842 Constify.
843 (info_static_tracepoint_markers_command): Constify.
844 * thread.c (info_threads_command): Constify.
845 (print_thread_info_1): Constify.
846 * target.c (info_target_command): Constify.
847 * symtab.c (info_sources_command, info_functions_command)
848 (info_types_command): Constify.
849 (info_variables_command): Remove non-const overload.
850 * symfile.c (info_ext_lang_command): Constify.
851 * stack.c (info_frame_command, info_locals_command)
852 (info_args_command): Constify.
853 (backtrace_command): Remove non-const overload.
854 * source.c (info_source_command, info_line_command): Constify.
855 * solib.c (info_sharedlibrary_command): Constify.
856 * skip.c (info_skip_command): Constify.
857 * ser-go32.c (info_serial_command): Constify.
858 * reverse.c (info_bookmarks_command): Constify.
859 * printcmd.c (info_symbol_command, info_address_command)
860 (info_display_command): Constify.
861 * osdata.c (info_osdata_command): Constify.
862 * objc-lang.c (info_selectors_command, info_classes_command):
863 Constify.
864 * nto-procfs.c (procfs_pidlist, procfs_meminfo): Constify.
865 * memattr.c (info_mem_command): Constify.
866 * macrocmd.c (info_macro_command, info_macros_command): Constify.
867 * linux-fork.c (info_checkpoints_command): Constify.
868 * infrun.c (info_signals_command): Constify.
869 * inflow.c (info_terminal_command): Constify.
870 * inferior.c (info_inferiors_command): Constify.
871 (print_inferior): Constify.
872 * infcmd.c (info_program_command, info_all_registers_command)
873 (info_registers_command, info_vector_command)
874 (info_float_command): Constify.
875 (registers_info): Constify.
876 * gnu-nat.c (info_send_rights_cmd, info_recv_rights_cmd)
877 (info_port_sets_cmd, info_dead_names_cmd, info_port_rights_cmd):
878 Constify.
879 * f-valprint.c (info_common_command): Constify.
880 * dcache.c (info_dcache_command): Constify.
881 (dcache_info_1): Constify.
882 * darwin-nat-info.c (info_mach_tasks_command)
883 (info_mach_task_command, info_mach_ports_command)
884 (info_mach_port_command, info_mach_threads_command)
885 (info_mach_thread_command, info_mach_regions_command)
886 (info_mach_regions_recurse_command, info_mach_region_command)
887 (info_mach_exceptions_command): Constify.
888 (get_task_from_args): Constify.
889 * cp-support.c (info_vtbl_command): Constify.
890 * breakpoint.c (info_watchpoints_command)
891 (info_tracepoints_command): Constify.
892 (info_breakpoints_command): Remove non-const overload.
893 * avr-tdep.c (avr_io_reg_read_command): Constify.
894 * auxv.c (info_auxv_command): Constify.
895 * ada-tasks.c (info_tasks_command): Constify.
896 (info_task): Constify.
897 * ada-lang.c (info_exceptions_command): Constify.
898
899 2017-11-07 Tom Tromey <tom@tromey.com>
900
901 * solib.h (no_shared_libraries): Constify.
902 * frame.h (return_command): Constify.
903 * cli/cli-cmds.h (quit_command): Constify.
904 * top.h (quit_command, execute_command): Constify.
905 * target.h (flash_erase_command): Constify.
906 * inferior.h (set_inferior_args, attach_command): Constify.
907 * tracepoint.h (start_tracing, stop_tracing): Constify.
908 * breakpoint.h (break_command, tbreak_command)
909 (hbreak_command_wrapper, thbreak_command_wrapper)
910 (rbreak_command_wrapper, watch_command_wrapper)
911 (awatch_command_wrapper, rwatch_command_wrapper)
912 (get_tracepoint_by_number): Constify.
913 * symtab.c (info_variables_command, rbreak_command)
914 (symtab_symbol_info): Constify.
915 (info_variables_command): Add non-const overload.
916 * top.c (dont_repeat_command): Constify.
917 * breakpoint.c (ignore_command, commands_command)
918 (condition_command, tbreak_command, hbreak_command)
919 (thbreak_command, clear_command, break_command)
920 (info_breakpoints_command, watch_command, rwatch_command)
921 (awatch_command, trace_command, ftrace_command, strace_command)
922 (trace_pass_command, break_range_command, dprintf_command)
923 (agent_printf_command, get_tracepoint_by_number)
924 (watch_maybe_just_location, trace_pass_command): Constify.
925 (info_breakpoints_command): Add non-const overload.
926 * tracefile.c (tsave_command): Constify.
927 * infcmd.c (attach_command, disconnect_command, signal_command)
928 (queue_signal_command, stepi_command, nexti_command)
929 (finish_command, next_command, step_command, until_command)
930 (advance_command, jump_command, continue_command, run_command)
931 (start_command, starti_command, interrupt_command)
932 (run_command_1, set_inferior_args, step_1): Constify.
933 * inferior.c (add_inferior_command, remove_inferior_command)
934 (clone_inferior_command): Constify.
935 * linux-fork.c (checkpoint_command, restart_command): Constify.
936 * windows-nat.c (signal_event_command): Constify.
937 * guile/guile.c (guile_repl_command, guile_command): Constify.
938 * printcmd.c (x_command, display_command, printf_command)
939 (output_command, set_command, call_command, print_command)
940 (eval_command): Constify.
941 (non_const_set_command): Remove.
942 (_initialize_printcmd): Update.
943 * source.c (forward_search_command, reverse_search_command):
944 Constify.
945 * jit.c (jit_reader_load_command, jit_reader_unload_command):
946 Constify.
947 * infrun.c (handle_command): Constify.
948 * memattr.c (mem_command): Constify.
949 * stack.c (return_command, up_command, up_silently_command)
950 (down_command, down_silently_command, frame_command)
951 (backtrace_command, func_command, backtrace_command_1): Constify.
952 (backtrace_command): Add non-const overload.
953 * remote-sim.c (simulator_command): Constify.
954 * exec.c (set_section_command): Constify.
955 * tracepoint.c (tdump_command, trace_variable_command)
956 (tstatus_command, tstop_command, tstart_command)
957 (end_actions_pseudocommand, while_stepping_pseudocommand)
958 (collect_pseudocommand, teval_pseudocommand, actions_command)
959 (start_tracing, stop_tracing): Constify.
960 * value.c (init_if_undefined_command): Constify.
961 * tui/tui-stack.c (tui_update_command): Constify.
962 * tui/tui-win.c (tui_refresh_all_command)
963 (tui_set_tab_width_command, tui_set_win_height_command)
964 (tui_set_focus_command, tui_scroll_forward_command)
965 (tui_scroll_backward_command, tui_scroll_left_command)
966 (tui_scroll_right_command, parse_scrolling_args, tui_set_focus)
967 (tui_set_win_height): Constify.
968 * tui/tui-layout.c (tui_layout_command): Constify.
969 * procfs.c (proc_trace_syscalls, proc_trace_sysentry_cmd)
970 (proc_trace_sysexit_cmd, proc_untrace_sysentry_cmd)
971 (proc_untrace_sysexit_cmd): Constify.
972 * remote.c (threadlist_test_cmd, threadinfo_test_cmd)
973 (threadset_test_cmd, threadlist_update_test_cmd)
974 (threadalive_test): Constify.
975 * objc-lang.c (print_object_command): Constify.
976 * command.h (add_com): Constify.
977 * cli/cli-dump.c (restore_command): Constify.
978 * cli/cli-cmds.c (pwd_command, echo_command, quit_command)
979 (help_command, complete_command, shell_command, edit_command)
980 (list_command, disassemble_command, make_command)
981 (apropos_command, alias_command): Constify.
982 * cli/cli-script.c (document_command, define_command)
983 (while_command, if_command, validate_comname): Constify.
984 * cli/cli-decode.c (struct cmd_list_element): Change type of
985 "fun".
986 * target.c (do_monitor_command, flash_erase_command): Constify.
987 * regcache.c (reg_flush_command): Constify.
988 * reverse.c (reverse_step, reverse_next, reverse_stepi)
989 (reverse_nexti, reverse_continue, reverse_finish)
990 (save_bookmark_command, goto_bookmark_command)
991 (exec_reverse_once): Constify.
992 * python/python.c (python_interactive_command, python_command):
993 Constify.
994 * typeprint.c (ptype_command, whatis_command, whatis_exp):
995 Constify.
996 * solib.c (sharedlibrary_command, no_shared_libraries): Constify.
997 * gcore.c (gcore_command): Constify.
998
999 2017-11-07 Tom Tromey <tom@tromey.com>
1000
1001 * printcmd.c (x_command): Call set_repeat_arguments.
1002 * cli/cli-cmds.c (list_command): Call set_repeat_arguments.
1003 * top.c (repeat_arguments): New global.
1004 (set_repeat_arguments): New function.
1005 (execute_command): Handle repeat_arguments.
1006 (show_commands): Calls set_repeat_arguments.
1007 * command.h (set_repeat_arguments): Declare.
1008
1009 2017-11-07 Tom Tromey <tom@tromey.com>
1010
1011 * stack.c (backtrace_command): Use std::string.
1012 (backtrace_command_1): Make "count_exp" const.
1013
1014 2017-11-07 Tom Tromey <tom@tromey.com>
1015
1016 * source.c (directory_switch, mod_path, add_path): Constify.
1017 * defs.h (add_path, mod_path, directory_switch): Constify.
1018 * mi/mi-cmd-env.c (env_mod_path): Constify.
1019
1020 2017-11-07 Tom Tromey <tom@tromey.com>
1021
1022 * infcmd.c (strip_bg_char): Return gdb::unique_xmalloc_ptr.
1023 (run_command_1, continue_command, step_1, jump_command)
1024 (signal_command, until_command, advance_command, finish_command)
1025 (attach_command): Update.
1026
1027 2017-11-07 Tom Tromey <tom@tromey.com>
1028
1029 * command.h (set_cmd_cfunc): Don't declare.
1030 * cli/cli-decode.c (set_cmd_cfunc): Now static.
1031
1032 2017-11-07 Tom Tromey <tom@tromey.com>
1033
1034 * stack.c (select_frame_command): Constify.
1035 * cli/cli-decode.c (add_com_suppress_notification): Constify.
1036 * command.h (add_com_suppress_notification): Constify.
1037
1038 2017-11-07 Tom Tromey <tom@tromey.com>
1039
1040 * breakpoint.c (stop_command): Constify.
1041 * cli/cli-decode.c (struct cmd_list_element): Constify.
1042 * command.h (add_abbrev_prefix_cmd): Constify.
1043
1044 2017-11-07 Pedro Alves <palves@redhat.com>
1045
1046 * breakpoint.c (extract_bp_kind): New enum.
1047 (extract_bp_num, extract_bp_or_bp_range): New functions, partially
1048 factored out from ...
1049 (extract_bp_number_and_location): ... here.
1050 * cli/cli-utils.c (get_number_trailer): Handle '-$variable'.
1051
1052 2017-11-07 Pedro Alves <palves@redhat.com>
1053
1054 * breakpoint.c (extract_bp_number_and_location): Change return
1055 type to void. Throw error instead of warning.
1056 (enable_disable_command): Adjust.
1057
1058 2017-11-07 Xavier Roirand <roirand@adacore.com>
1059 Pedro Alves <palves@redhat.com>
1060
1061 * breakpoint.c (map_breakpoint_number_range): New, factored out
1062 from ...
1063 (map_breakpoint_numbers): ... here.
1064 (find_location_by_number): Change parameters from string to
1065 breakpoint number and location.
1066 (extract_bp_number_and_location): New function.
1067 (enable_disable_bp_num_loc)
1068 (enable_disable_breakpoint_location_range)
1069 (enable_disable_command): New functions, factored out ...
1070 (enable_command, disable_command): ... these functions, and
1071 adjusted to support ranges.
1072 * NEWS: Document enable/disable breakpoint location range feature.
1073
1074 2017-11-06 Luis Machado <luis.machado@linaro.org>
1075
1076 * MAINTAINERS (Write After Approval): Update my e-mail address.
1077
1078 2017-11-06 Pedro Alves <palves@redhat.com>
1079
1080 * gnu-nat.c (gnu_terminal_init): Delete.
1081 (gnu_target): Don't install gnu_terminal_init.
1082 * inflow.c (child_terminal_init_with_pgrp): Delete, merged with ...
1083 (child_terminal_init): ... this function.
1084
1085 2017-11-06 Pedro Alves <palves@redhat.com>
1086
1087 * common/common.m4 (GDB_AC_COMMON): No longer check termio.h nor
1088 sgtty.h.
1089 * config.in, configure: Regenerate.
1090
1091 2017-11-06 Pedro Alves <palves@redhat.com>
1092
1093 * event-top.c: Check SIGTSTP instead of STOP_SIGNAL thoughout.
1094 (async_init_signals): Adjust.
1095 (handle_stop_sig): Rename to ...
1096 (handle_sigtstp): ... this.
1097 (async_stop_sig): Rename to ...
1098 (async_sigtstp_handler): ... this, and delete STOP_SIGNAL !=
1099 SIGTSTP path.
1100 * event-top.h: Move signal.h include to the top. Check SIGTSTP
1101 instead of STOP_SIGNAL thoughout.
1102 (handle_stop_sig): Rename to ...
1103 (handle_sigtstp): ... this.
1104 * top.c (command_line_input): Replace STOP_SIGNAL -> SIGTSTP.
1105
1106 2017-11-06 Pedro Alves <palves@redhat.com>
1107
1108 * inflow.c (child_terminal_inferior, child_terminal_ours_1): No
1109 longer set flags twice in row.
1110
1111 2017-11-06 Pedro Alves <palves@redhat.com>
1112
1113 * Makefile.in (SER_HARDWIRE): Update comment.
1114 (HFILES_NO_SRCDIR): Remove gdb_termios.h.
1115 * common/gdb_termios.h: Delete file.
1116 * common/job-control.c: Include termios.h and unistd.h instead of
1117 gdb_termios.h.
1118 (gdb_setpgid): Remove HAVE_TERMIOS || TIOCGPGRP preprocessor
1119 check.
1120 (have_job_control): Check HAVE_TERMIOS_H instead of HAVE_TERMIOS.
1121 Remove sgtty code.
1122 * configure.ac: No longer check for termio.h and sgtty.h.
1123 * configure: Regenerate.
1124 * inflow.c: Include termios.h instead of gdb_termios.h. Replace
1125 PROCESS_GROUP_TYPE checks with HAVE_TERMIOS_H checks throughout.
1126 Replace PROCESS_GROUP_TYPE references with pid_t references
1127 throughout.
1128 (gdb_getpgrp): Delete.
1129 (set_initial_gdb_ttystate): Use tcgetpgrp instead of gdb_getpgrp.
1130 (child_terminal_inferior): Remove comment. Remove sgtty code.
1131 (child_terminal_ours_1): Use tcgetpgrp directly instead of
1132 gdb_getpgrp. Use serial_set_tty_state instead aof
1133 serial_noflush_set_tty_state. Remove sgtty code.
1134 * inflow.h: Include unistd.h instead of gdb_termios.h. Replace
1135 PROCESS_GROUP_TYPE check with HAVE_TERMIOS_H check.
1136 (inferior_process_group): Now returns pid_t.
1137 * ser-base.c (ser_base_noflush_set_tty_state): Delete.
1138 * ser-base.h (ser_base_noflush_set_tty_state): Delete.
1139 * ser-event.c (serial_event_ops): Update.
1140 * ser-go32.c (dos_noflush_set_tty_state): Delete.
1141 (dos_ops): Update.
1142 * ser-mingw.c (hardwire_ops, tty_ops, pipe_ops, tcp_ops): Update.
1143 * ser-pipe.c (pipe_ops): Update.
1144 * ser-tcp.c (tcp_ops): Update.
1145 * ser-unix.c: Include termios.h instead of gdb_termios.h. Remove
1146 HAVE_TERMIOS checks.
1147 [HAVE_TERMIO] (struct hardwire_ttystate): Delete.
1148 [HAVE_SGTTY] (struct hardwire_ttystate): Delete.
1149 (get_tty_state, set_tty_state): Drop termio and sgtty code, and
1150 assume termios.
1151 (hardwire_noflush_set_tty_state): Delete.
1152 (hardwire_print_tty_state, hardwire_drain_output)
1153 (hardwire_flush_output, hardwire_flush_input)
1154 (hardwire_send_break, hardwire_raw, hardwire_setbaudrate)
1155 (hardwire_setstopbits, hardwire_setparity): Drop termio and sgtty
1156 code, and assume termios.
1157 (hardwire_ops): Update.
1158 (_initialize_ser_hardwire): Remove HAVE_TERMIOS check.
1159 * serial.c (serial_noflush_set_tty_state): Delete.
1160 * serial.h (serial_noflush_set_tty_state): Delete.
1161 (serial_ops::noflush_set_tty_state): Delete.
1162
1163 2017-11-06 Ulrich Weigand <uweigand@de.ibm.com>
1164
1165 * Makefile.in (SFILES): Remove doublest.c and dfp.c.
1166 (HFILES_NO_SRCDIR): Remove doublest.h and dfp.h.
1167 (COMMON_OBS): Remove doublest.o and dfp.o.
1168 Do not build target-float.c (instead of doublest.c)
1169 with -Wformat-nonliteral.
1170
1171 * doublest.c: Remove file.
1172 * doublest.h: Remove file.
1173 * dfp.c: Remove file.
1174 * dfp.h: Remove file.
1175
1176 * target-float.c: Do not include "doublest.h" and "dfp.h".
1177 (DOUBLEST): Move here from doublest.h.
1178 (enum float_kind): Likewise.
1179 (FLOATFORMAT_CHAR_BIT): Likewise.
1180 (FLOATFORMAT_LARGEST_BYTES): Likewise.
1181 (floatformat_totalsize_bytes): Move here from doublest.c. Make static.
1182 (floatformat_precision): Likewise.
1183 (floatformat_normalize_byteorder, get_field, put_field): Likewise.
1184 (floatformat_is_negative, floatformat_classify, floatformat_mantissa):
1185 Likewise.
1186 (host_float_format, host_double_format, host_long_double_format):
1187 Likewise.
1188 (floatformat_to_string, floatformat_from_string): Likewise.
1189 (floatformat_to_doublest): Likewise. Also, inline the original
1190 convert_floatformat_to_doublest.
1191 (floatformat_from_doublest): Likewise. Also, inline the original
1192 convert_floatformat_from_doublest.
1193
1194 Include "dpd/decimal128.h", "dpd/decimal64.h", and "dpd/decimal32.h".
1195 (MAX_DECIMAL_STRING): Move here from dfp.c.
1196 (match_endianness): Likewise.
1197 (set_decnumber_context, decimal_check_errors): Likewise.
1198 (decimal_from_number, decimal_to_number): Likewise.
1199 (decimal_to_string, decimal_from_string): Likewise. Make static.
1200 (decimal_from_longest, decimal_from_ulongest): Likewise.
1201 (decimal_to_longest): Likewise.
1202 (decimal_binop, decimal_is_zero, decimal_compare): Likewise.
1203 (decimal_convert): Likewise.
1204
1205 2017-11-06 Ulrich Weigand <uweigand@de.ibm.com>
1206
1207 * doublest.c: Do not include "gdbtypes.h".
1208 (extract_typed_floating): Remove.
1209 (store_typed_floating): Remove.
1210 (convert_typed_floating): Remove.
1211 * doublest.h (struct type): Remove.
1212 (DOUBLEST_PRINT_FORMAT): Remove.
1213 (DOUBLEST_SCAN_FORMAT): Remove.
1214 (extract_typed_floating): Remove.
1215 (store_typed_floating): Remove.
1216 (convert_typed_floating): Remove.
1217
1218 * dfp.c (decimal_from_doublest): Remove.
1219 (decimal_to_doublest): Remove.
1220 * dfp.h: Do not include "doublest.h".
1221 (decimal_from_doublest): Remove.
1222 (decimal_to_doublest): Remove.
1223
1224 * value.c: Do not include "doublest.h" and "dfp.h".
1225 (value_as_double): Remove.
1226 (unpack_double): Remove.
1227 (value_from_double): Remove.
1228 (value_from_decfloat): Remove.
1229 * value.h: Do not include "doublest.h".
1230 (value_as_double): Remove.
1231 (unpack_double): Remove.
1232 (value_from_double): Remove.
1233 (value_from_decfloat): Remove.
1234
1235 2017-11-06 Ulrich Weigand <uweigand@de.ibm.com>
1236
1237 * i386-tdep.c: Include "target-float.h". Do not include "doublest.h".
1238 (i386_extract_return_value): Use target_float_convert.
1239 (i386_store_return_value): Likewise.
1240 * i387-tdep.c (i387_register_to_value): Use target_float_convert.
1241 (i387_value_to_register): Likewise.
1242 * ia64-tdep.c: Include "target-float.h". Do not include "doublest.h".
1243 (ia64_register_to_value): Use target_float_convert.
1244 (ia64_value_to_register): Likewise.
1245 (ia64_extract_return_value): Likewise.
1246 (ia64_store_return_value): Likewise.
1247 (ia64_push_dummy_call): Likewise.
1248 * m68k-tdep.c: Include "target-float.h".
1249 (m68k_register_to_value): Use target_float_convert.
1250 (m68k_value_to_register): Likewise.
1251 (m68k_svr4_extract_return_value): Likewise.
1252 (m68k_svr4_store_return_value): Likewise.
1253 * ppc-sysv-tdep.c: Include "target-float.h".
1254 (ppc_sysv_abi_push_dummy_call): Use target_float_convert.
1255 (do_ppc_sysv_return_value): Likewise.
1256 (ppc64_sysv_abi_push_freg): Likewise.
1257 (ppc64_sysv_abi_return_value_base): Likewise.
1258 * rs6000-aix-tdep.c: Include "target-float.h".
1259 (rs6000_push_dummy_call): Use target_float_convert.
1260 (rs6000_return_value): Likewise.
1261 * rs6000-lynx178-tdep.c: Include "target-float.h".
1262 (rs6000_lynx178_push_dummy_call): Use target_float_convert.
1263 (rs6000_lynx178_return_value): Likewise.
1264 * rs6000-tdep.c: Include "target-float.h". Do not include "doublest.h".
1265 (rs6000_register_to_value): Use target_float_convert.
1266 (rs6000_value_to_register): Likewise.
1267 * arm-tdep.c: Include "target-float.h". Do not include "doublest.h".
1268 (arm_extract_return_value): Use target_float_convert.
1269 (arm_store_return_value): Likewise.
1270 * sh-tdep.c: Include "target-float.h". Do not include "doublest.h".
1271 (sh_register_convert_to_virtual): Use target_float_convert.
1272 (sh_register_convert_to_raw): Likewise.
1273 * sh64-tdep.c: Include "target-float.h".
1274 (sh64_extract_return_value): Use target_float_convert.
1275 (sh64_register_convert_to_virtual): Likewise.
1276 (sh64_register_convert_to_raw): Likewise. Fix argument types.
1277
1278 2017-11-06 Ulrich Weigand <uweigand@de.ibm.com>
1279
1280 * target-float.c (floatformat_to_host_double): New function.
1281 (floatformat_from_host_double): Likewise.
1282 (target_float_to_host_double): Likewise.
1283 (target_float_from_host_double): Likewise.
1284 * target-float.h (target_float_to_host_double): Add prototype.
1285 (target_float_from_host_double): Likewise.
1286
1287 * guile/scm-value.c: Include "target-float.h".
1288 (gdbscm_value_to_real): Use target_float_to_host_double.
1289 Handle integer source values via value_as_long.
1290 * guile/scm-math.c: Include "target-float.h". Do not include
1291 "doublest.h", "dfp.h", and "expression.h".
1292 (vlscm_convert_typed_number): Use target_float_from_host_double.
1293 (vlscm_convert_number): Likewise.
1294
1295 * python/py-value.c (valpy_float): Use target_float_to_host_double.
1296 (convert_value_from_python): Use target_float_from_host_double.
1297
1298 2017-11-06 Ulrich Weigand <uweigand@de.ibm.com>
1299
1300 * ada-lang.c (cast_to_fixed): Reimplement in target arithmetic.
1301 (cast_from_fixed): Likewise.
1302 (ada_scaling_type): New function.
1303 (ada_delta): Return value instead of DOUBLEST. Perform target
1304 arithmetic instead of host arithmetic.
1305 (scaling_factor): Rename to ...
1306 (ada_scaling_factor) ... this. Make non-static. Return value instead
1307 of DOUBLEST. Perform target arithmetic instead of host arithmetic.
1308 (ada_fixed_to_float): Remove.
1309 (ada_float_to_fixed): Remove.
1310 * ada-lang.h (ada_fixed_to_float): Remove.
1311 (ada_float_to_fixed): Remove.
1312 (ada_delta): Return value instead of DOUBLEST.
1313 (ada_scaling_factor): Add prototype.
1314
1315 * ada-typeprint.c: Include "target-float.h".
1316 (print_fixed_point_type): Perform target arithmetic instead of
1317 host arithmetic.
1318 * ada-valprint.c: Include "target-float.h".
1319 (ada_val_print_num): Perform target arithmetic instead of
1320 host arithmetic for fixed-point types.
1321
1322 2017-11-06 Ulrich Weigand <uweigand@de.ibm.com>
1323
1324 * target-float.c: Include <math.h>.
1325 (floatformat_binop): New function.
1326 (floatformat_compare): Likewise.
1327 (target_float_binop): Likewise.
1328 (target_float_compare): Likewise.
1329 * target-float.h: Include "expression.h".
1330 (target_float_binop): Add prototype.
1331 (target_float_compare): Likewise.
1332
1333 * valarith.c: Do not include "doublest.h" and "dfp.h".
1334 Include "common/byte-vector.h".
1335 (value_args_as_decimal): Remove, replace by ...
1336 (value_args_as_target_float): ... this function. Handle both
1337 binary and decimal target floating-point formats.
1338 (scalar_binop): Handle both binary and decimal FP using
1339 value_args_as_target_float and target_float_binop.
1340 (value_equal): Handle both binary and decimal FP using
1341 value_args_as_target_float and target_float_compare.
1342 (value_less): Likewise.
1343 (value_pos): Handle all scalar types as simple copy.
1344 (value_neg): Handle all scalar types via BINOP_SUB from 0.
1345 * dfp.c (decimal_binop): Throw error instead of internal_error
1346 when called with an unsupported operation code.
1347
1348 2017-11-06 Ulrich Weigand <uweigand@de.ibm.com>
1349
1350 * target-float.c (target_float_to_string): New function.
1351 (target_float_from_string): New function.
1352 * target-float.h (target_float_to_string): Add prototype.
1353 (target_float_from_string): Add prototype.
1354
1355 * valprint.c: Include "target-float.h". Do not include
1356 "doublest.h" and "dfp.h".
1357 (print_floating): Use target_float_to_string.
1358 * printcmd.c: Include "target-float.h". Do not include "dfp.h".
1359 (printf_floating): Use target_float_to_string.
1360 * i387-tdep.c: Include "target-float.h". Do not include "doublest.h".
1361 (print_i387_value): Use target_float_to_string.
1362 * mips-tdep.c: Include "target-float.h".
1363 (mips_print_fp_register): Use target_float_to_string.
1364 * sh64-tdep.c: Include "target-float.h".
1365 (sh64_do_fp_register): Use target_float_to_string.
1366
1367 * parse.c: Include "target-float.h". Do not include
1368 "doublest.h" and "dfp.h".
1369 (parse_float): Use target_float_from_string.
1370 * stabsread.c: Include "target-float.h". Do not include "doublest.h".
1371 (define_symbol): Use target_float_from_string.
1372 * gdbarch-selftests.c: Include "target-float.h".
1373 (register_to_value_test): Use target_float_from_string.
1374
1375 2017-11-06 Ulrich Weigand <uweigand@de.ibm.com>
1376
1377 * Makefile.c (SFILES): Add target-float.c.
1378 (HFILES_NO_SRCDIR): Add target-float.h.
1379 (COMMON_OBS): Add target-float.o.
1380 * target-float.h: New file.
1381 * target-float.c: New file.
1382
1383 * doublest.c (floatformat_classify): Fix detection of float_zero.
1384
1385 * gdbtypes.c (is_floating_type): New function.
1386 * gdbtypes.h (is_floating_type): Add prototype.
1387
1388 * value.c: Do not include "floatformat.h".
1389 (unpack_double): Use target_float_is_valid.
1390 (is_floating_value): New function.
1391 * value.h (is_floating_value): Add prototype-
1392
1393 * valarith.c: Include "target-float.h".
1394 (value_logical_not): Use target_float_is_zero.
1395
1396 * python/py-value.c: Include "target-float.h".
1397 (valpy_nonzero): Use target_float_is_zero.
1398
1399 2017-11-04 Tom Tromey <tom@tromey.com>
1400
1401 * h8300-tdep.c (h8300_push_dummy_call): Use std::vector.
1402
1403 2017-11-04 Tom Tromey <tom@tromey.com>
1404
1405 * breakpoint.c (set_momentary_breakpoint): Return
1406 breakpoint_up.
1407 (until_break_command): Update.
1408 (new_until_break_fsm): Change argument types to
1409 breakpoint_up.
1410 (set_momentary_breakpoint_at_pc): Return breakpoint_up.
1411 (do_delete_breakpoint_cleanup, make_cleanup_delete_breakpoint):
1412 Remove.
1413 * infcmd.c (finish_forward): Update.
1414 * breakpoint.h (set_momentary_breakpoint)
1415 (set_momentary_breakpoint_at_pc): Return breakpoint_up.
1416 (make_cleanup_delete_breakpoint): Remove.
1417 (struct breakpoint_deleter): New.
1418 (breakpoint_up): New typedef.
1419 * infrun.c (insert_step_resume_breakpoint_at_sal_1): Update.
1420 (insert_exception_resume_breakpoint): Update.
1421 (insert_exception_resume_from_probe): Update.
1422 (insert_longjmp_resume_breakpoint): Update.
1423 * arm-linux-tdep.c (arm_linux_copy_svc): Update.
1424 * elfread.c (elf_gnu_ifunc_resolver_stop): Update.
1425 * infcall.c (call_function_by_hand_dummy): Update
1426
1427 2017-11-04 Tom Tromey <tom@tromey.com>
1428
1429 * c-typeprint.c (c_type_print_base): Use gdb::unique_xmalloc_ptr.
1430
1431 2017-11-04 Tom Tromey <tom@tromey.com>
1432
1433 * linux-tdep.c (linux_core_info_proc_mappings): Use
1434 gdb::def_vector.
1435 (linux_get_siginfo_data): Return gdb::byte_vector. Remove
1436 "size" argument.
1437 (linux_corefile_thread): Update.
1438 (linux_make_corefile_notes): Remove unused variable.
1439
1440 2017-11-04 Tom Tromey <tom@tromey.com>
1441
1442 * ppc-linux-tdep.c (ppc_linux_get_syscall_number): Use
1443 gdb::byte_vector.
1444
1445 2017-11-04 Tom Tromey <tom@tromey.com>
1446
1447 * objfiles.c (do_free_objfile_cleanup): Remove.
1448 * compile/compile-object-load.c (compile_object_load): Update.
1449 * objfiles.h (make_cleanup_free_objfile): Remove.
1450
1451 2017-11-04 Tom Tromey <tom@tromey.com>
1452
1453 * sparc64-tdep.c (do_examine): Use gdb::def_vector.
1454 (adi_read_versions): Change "tags" to "gdb_byte *".
1455 (adi_print_versions): Likewise.
1456
1457 2017-11-04 Tom Tromey <tom@tromey.com>
1458
1459 * breakpoint.c
1460 (scoped_rbreak_breakpoints::scoped_rbreak_breakpoints): Rename
1461 from start_rbreak_breakpoints.
1462 (scoped_rbreak_breakpoints): Rename from end_rbreak_breakpoints.
1463 * breakpoint.h (class scoped_rbreak_breakpoints): New.
1464 (start_rbreak_breakpoints, end_rbreak_breakpoints): Remove.
1465 * symtab.c (do_end_rbreak_breakpoints): Remove.
1466 (rbreak_command): Use scoped_rbreak_breakpoints, std::string.
1467
1468 2017-11-04 Tom Tromey <tom@tromey.com>
1469
1470 * cp-namespace.c (reset_directive_searched): Remove.
1471 (cp_lookup_symbol_via_imports): Use scoped_restore.
1472 * cp-support.c (reset_directive_searched): Remove.
1473 (make_symbol_overload_list_using): Use scoped_restore.
1474 * d-namespace.c (d_lookup_symbol_imports): Use scoped_restore.
1475 (reset_directive_searched): Remove.
1476
1477 2017-11-04 Tom Tromey <tom@tromey.com>
1478
1479 * symfile.c (find_separate_debug_file_by_debuglink): Use
1480 unique_xmalloc_ptr.
1481
1482 2017-11-04 Tom Tromey <tom@tromey.com>
1483
1484 * compile/compile-loc2c.c (compute_stack_depth_worker): Change
1485 type of "info".
1486 (compute_stack_depth): Likewise.
1487 (do_compile_dwarf_expr_to_c): Use std::vector.
1488
1489 2017-11-04 Tom Tromey <tom@tromey.com>
1490
1491 * compile/compile-object-load.c (link_callbacks_einfo): Use
1492 std::string.
1493
1494 2017-11-04 Tom Tromey <tom@tromey.com>
1495
1496 * dwarf2read.c (process_full_comp_unit, process_full_type_unit):
1497 Use scoped_free_pendings.
1498 * dbxread.c (dbx_symfile_read, dbx_psymtab_to_symtab_1): Use
1499 scoped_free_pendings.
1500 * xcoffread.c (xcoff_psymtab_to_symtab_1): Use scoped_free_pendings.
1501 (xcoff_initial_scan): Likewise.
1502 * buildsym.c (reset_symtab_globals): Update comment.
1503 (scoped_free_pendings): Rename from really_free_pendings.
1504 (prepare_for_building): Update comment.
1505 (buildsym_init): Likewise.
1506 * buildsym.h (class scoped_free_pendings): New class.
1507 (really_free_pendings): Don't declare.
1508
1509 2017-11-03 Ulrich Weigand <uweigand@de.ibm.com>
1510
1511 * doublest.c (convert_doublest_to_floatformat): Fix uninitialized
1512 output when converting a zero value to a special byteorder format.
1513
1514 2017-11-02 Yao Qi <yao.qi@linaro.org>
1515
1516 * frame.c (do_frame_register_read): Remove aspace.
1517 * jit.c (jit_frame_sniffer): Likwise.
1518 * ppc-linux-tdep.c (ppu2spu_sniffer): Likewise.
1519 * regcache.c (regcache::regcache): Pass nullptr.
1520 (regcache_print): Caller updated.
1521 * regcache.h (regcache::regcache): Remove one constructor
1522 parameter aspace.
1523
1524 2017-11-02 Yao Qi <yao.qi@linaro.org>
1525
1526 * regcache.h (regcache) <m_readonly_p>: Change it to const bool.
1527
1528 2017-11-02 Yao Qi <yao.qi@linaro.org>
1529
1530 * breakpoint.c (insert_single_step_breakpoints): Update.
1531 * frame.c (struct frame_info) <aspace>: Add const.
1532 (frame_save_as_regcache): Add const.
1533 (get_frame_address_space): Return const address_space *.
1534 * frame.h (get_frame_address_space): Update declaration.
1535 * infrun.c (struct step_over_info) <aspace>: Add const.
1536 (set_step_over_info): Make aspace const.
1537 (displaced_step_prepare_throw): Change variable const.
1538 (resume): Likewise.
1539 (proceed): Likewise.
1540 (adjust_pc_after_break): Likewise.
1541 (save_waitstatus): Likewise.
1542 (handle_signal_stop): Likewise.
1543 (keep_going_pass_signal): Likewise.
1544 * jit.c (jit_frame_sniffer): Add const.
1545 * mips-tdep.c (mips_single_step_through_delay): Likewise.
1546 * ppc-linux-tdep.c (ppu2spu_sniffer): Likewise.
1547 * record-full.c (record_full_wait_1): Likewise.
1548 * regcache.c (regcache::regcache): Change parameter to const.
1549 * regcache.h (regcache::regcache): Likewise.
1550 (regcache::aspace): Return const address_space *.
1551 (regcache) <m_aspace>: Add const.
1552
1553 2017-11-02 Yao Qi <yao.qi@linaro.org>
1554
1555 * darwin-nat.c (cancel_breakpoint): Use regcache->aspace ().
1556 * frame.c (create_sentinel_frame): Likewise.
1557 * infrun.c (displaced_step_prepare_throw): Likewise.
1558 (resume): Likewise.
1559 (thread_still_needs_step_over_bp): Likewise.
1560 (proceed): Likewise.
1561 (do_target_wait): Likewise.
1562 (adjust_pc_after_break): Likewise.
1563 (handle_syscall_event): Likewise.
1564 (save_waitstatus): Likewise.
1565 (handle_inferior_event_1): Likewise.
1566 (handle_signal_stop): Likewise.
1567 (keep_going_pass_signal): Likewise.
1568 * linux-nat.c (status_callback): Likewise.
1569 (save_stop_reason): Likewise.
1570 (resume_stopped_resumed_lwps): Likewise.
1571 * record-full.c (record_full_exec_insn): Likewise.
1572 (record_full_wait_1): Likewise.
1573 * regcache.c (get_regcache_aspace): Remove.
1574 * regcache.h (get_regcache_aspace): Remove.
1575
1576 2017-11-02 Yao Qi <yao.qi@linaro.org>
1577
1578 * regcache.c (struct regcache_descr) <nr_raw_registers>: Remove.
1579 (init_regcache_descr): Use gdbarch_num_regs.
1580 (regcache::regcache): Likewise.
1581 (regcache::get_register_status): Likewise.
1582 (regcache::assert_raw_regnum): Likewise.
1583 (regcache::cooked_read): Likewise.
1584 (regcache::cooked_read_value): Likewise.
1585 (regcache::cooked_write): Likewise.
1586 (regcache::dump): Likewise.
1587 (regcache::num_raw_registers): New method.
1588 * regcache.h (class regcache) <num_raw_registers>: New.
1589
1590 2017-11-02 Yao Qi <yao.qi@linaro.org>
1591
1592 * regcache.c (regcache::assert_regnum): New method.
1593 (regcache::invalidate): Call assert_regnum.
1594 (regcache::raw_update): Likewise.
1595 (regcache::raw_write): Likewise.
1596 (regcache::raw_read_part): Likewise.
1597 (regcache::raw_write_part): Likewise.
1598 (regcache::raw_supply): Likewise.
1599 (regcache::raw_supply_integer): Likewise.
1600 (regcache::raw_supply_zeroed): Likewise.
1601 (regcache::raw_collect): Likewise.
1602 (regcache::raw_collect_integer): Likewise.
1603 * regcache.h (regcache::assert_regnum): Declare.
1604
1605 2017-11-02 Yao Qi <yao.qi@linaro.org>
1606
1607 * regcache.c (regcache::dump): Remove code.
1608
1609 2017-11-02 Yao Qi <yao.qi@linaro.org>
1610
1611 * regcache.c (struct regcache_descr) <sizeof_raw_register_status>:
1612 Remove.
1613 <sizeof_cooked_register_status>: Remove.
1614 (init_regcache_descr): Update.
1615 (regcache::regcache): Use nr_cooked_registers and nr_raw_registers.
1616 (regcache::save): Likewise.
1617 (regcache::dump): Likewise.
1618
1619 2017-11-01 James Bowman <james.bowman@ftdichip.com>
1620
1621 * ft32-tdep.c (ft32_fetch_instruction): New function.
1622 (ft32_analyze_prologue): Use ft32_fetch_instruction().
1623
1624 2017-10-31 Simon Marchi <simon.marchi@polymtl.ca>
1625
1626 * cli/cli-script.c (execute_control_command): Rename to ...
1627 (execute_control_command_1): ... this.
1628 (execute_control_command): New function.
1629
1630 2017-10-31 Simon Marchi <simon.marchi@ericsson.com>
1631
1632 * tracepoint.c (tfind_command): Remove const_cast.
1633
1634 2017-10-30 Mike Gulick <mgulick@mathworks.com>
1635
1636 * Makefile.in (HFILES_NO_SRCDIR): Remove reference to gdb.h.
1637
1638 2017-10-30 Simon Marchi <simon.marchi@ericsson.com>
1639
1640 * common/common-utils.h (in_inclusive_range): New function.
1641 * arm-tdep.c (arm_record_extension_space): Use
1642 in_inclusive_range.
1643 (thumb_record_ld_st_reg_offset): Use in_inclusive_range.
1644 * cris-tdep.c (cris_spec_reg_applicable): Use
1645 in_inclusive_range.
1646
1647 2017-10-30 Pedro Alves <palves@redhat.com>
1648 Simon Marchi <simon.marchi@ericsson.com>
1649
1650 * remote.c (remote_set_syscall_catchpoint): Build a std::string
1651 instead of a gdb::unique_xmalloc_ptr, using string_appendf.
1652
1653 2017-10-30 Pedro Alves <palves@redhat.com>
1654
1655 * common/common-utils.c (string_appendf, string_vappendf): New
1656 functions.
1657 * common/common-utils.h (string_appendf, string_vappendf): New
1658 declarations.
1659 * unittests/common-utils-selftests.c (string_appendf_func)
1660 (test_appendf_func, string_vappendf_wrapper, string_appendf_tests)
1661 (string_vappendf_tests): New functions.
1662 (_initialize_common_utils_selftests): Register "string_appendf" and
1663 "string_vappendf tests".
1664
1665 2017-10-30 Pedro Alves <palves@redhat.com>
1666
1667 * unittests/common-utils-selftests.c (format_func): New typedef.
1668 (string_printf_tests, string_vprintf_tests): Tests factored out
1669 and merged to ...
1670 (test_format_func): ... this new function.
1671 (string_printf_tests, string_vprintf_tests): Reimplement on top of
1672 test_format_func.
1673
1674 2017-10-29 Simon Marchi <simon.marchi@ericsson.com>
1675
1676 * darwin-nat.c: Remove include of gdb.h.
1677
1678 2017-10-29 Simon Marchi <simon.marchi@ericsson.com>
1679
1680 * xtensa-xtregs.c: Fix formatting issues.
1681
1682 2017-10-29 Simon Marchi <simon.marchi@ericsson.com>
1683
1684 * xtensa-xtregs.c (xtensa_regtable_t) <name>: Constify.
1685
1686 2017-10-28 Maksim Dzabraev <dzabraew@gmail.com>
1687
1688 PR python/21213
1689 * python/py-infthread.c (thpy_get_inferior): Increment reference
1690 of inferior before returning it.
1691
1692 2017-10-27 Simon Marchi <simon.marchi@ericsson.com>
1693
1694 * unittests/common-utils-selftests.c (format): Add
1695 ATTRIBUTE_PRINTF.
1696
1697 2017-10-27 Simon Marchi <simon.marchi@polymtl.ca>
1698
1699 * xml-syscall.c (struct syscall_desc): Add constructor.
1700 <name>: Change type to std::string.
1701 (syscall_desc_up): New typedef.
1702 (syscall_desc_p): Remove typeder.
1703 (DEF_VEC_P(syscall_desc_p)): Remove.
1704 (struct syscall_group_desc): Add constructor.
1705 <name>: Change type to std::string.
1706 <syscalls>: Change type to std::vector.
1707 (syscall_group_desc_up): New typedef.
1708 (syscall_group_desc_p): Remove typedef.
1709 (DEF_VEC_P(syscall_group_desc_p)): Remove.
1710 (struct syscalls_info) <syscalls>: Change type to std::vector of
1711 unique_ptr.
1712 <groups>: Likewise.
1713 <my_gdb_datadir>: Change type to std::string.
1714 (syscalls_info_up): New typedef.
1715 (allocate_syscalls_info): Remove.
1716 (syscalls_info_free_syscalls_desc): Remove.
1717 (syscalls_info_free_syscall_group_desc): Remove.
1718 (free_syscalls_info): Remove.
1719 (make_cleanup_free_syscalls_info): Remove.
1720 (syscall_group_create_syscall_group_desc): Adjust.
1721 (syscall_group_add_syscall): Adjust.
1722 (syscall_create_syscall_desc): Adjust.
1723 (syscall_parse_xml): Adjust, use unique_ptr instead of cleanup.
1724 (init_syscalls_info): Adjust.
1725 (syscall_group_get_group_by_name): Adjust.
1726 (xml_get_syscall_number): Adjust.
1727 (xml_get_syscall_name): Adjust.
1728 (xml_list_of_syscalls): Adjust.
1729 (xml_list_syscalls_by_group): Adjust.
1730 (xml_list_of_groups): Adjust.
1731
1732 2017-10-27 Simon Marchi <simon.marchi@ericsson.com>
1733
1734 * probe.h: Don't include gdb_vecs.h.
1735 (DEF_VEC_P (probe_p)): Remove.
1736 (find_probes_in_objfile): Return an std::vector.
1737 * probe.c (find_probes_in_objfile): Likewise.
1738 * breakpoint.c (breakpoint_objfile_data)
1739 <longjmp_probes>: Change type to std::vector.
1740 <exception_probes>: Likewise.
1741 (free_breakpoint_probes): Don't manually free vectors.
1742 (create_longjmp_master_breakpoint): Adjust.
1743 (create_exception_master_breakpoint): Adjust.
1744 * solib-svr4.c (svr4_create_probe_breakpoints): Change
1745 parameter type, adjust.
1746 (svr4_create_solib_event_breakpoints): Adjust.
1747
1748 2017-10-27 Simon Marchi <simon.marchi@ericsson.com>
1749
1750 * breakpoint.c (breakpoint_objfile_data): Initialize fields.
1751 (get_breakpoint_objfile_data): Allocate breakpoint_objfile_data
1752 with new.
1753 (free_breakpoint_probes): Rename to ...
1754 (free_breakpoint_objfile_data): ... this, and call delete on
1755 bp_objfile_data..
1756
1757 2017-10-27 Simon Marchi <simon.marchi@polymtl.ca>
1758
1759 * auto-load.c: Don't include gdb_vecs.h, include algorithm.
1760 (loaded_script_ptr): Remove typedef.
1761 (DEF_VEC_P (loaded_script_ptr)): Remove.
1762 (struct collect_matching_scripts_data): Add constructor.
1763 <scripts_p>: Change type to (pointer to) std::vector.
1764 (collect_matching_scripts_data): Adjust.
1765 (sort_scripts_by_name): Make suitable for std::sort.
1766 (print_scripts): Don't sort vector, adjust to std::vector.
1767 (auto_load_info_scripts): Sort vectors, adjust to std::vector.
1768
1769 2017-10-27 Simon Marchi <simon.marchi@ericsson.com>
1770
1771 * symfile.c (filename_language): Make struct, not typedef. Add
1772 constructor.
1773 <ext>: Change type to std::string.
1774 (DEF_VEC_O (filename_language)): Remove.
1775 (filename_language_table): Change type to std::vector.
1776 (add_filename_language): Adjust.
1777 (set_ext_lang_command): Adjust.
1778 (info_ext_lang_command): Adjust.
1779 (deduce_language_from_filename): Adjust.
1780 (class scoped_restore_filename_language_table): Remove.
1781 (test_filename_language): Use scoped_restore.
1782 (test_set_ext_lang_command): Use scoped_restore, adjust to
1783 std::vector change.
1784
1785 2017-10-27 Simon Marchi <simon.marchi@ericsson.com>
1786
1787 * symfile.c: Include selftest.h.
1788 (class scoped_restore_filename_language_table): New.
1789 (test_filename_language): New test.
1790 (test_set_ext_lang_command): New test.
1791 (_initialize_symfile): Register tests.
1792
1793 2017-10-27 Keith Seitz <keiths@redhat.com>
1794
1795 * breakpoint.c (print_breakpoint_location): Use the symbol saved
1796 in the bp_location, falling back to find_pc_sect_function when
1797 needed.
1798 (add_location_to_breakpoint): Save sal->symbol.
1799 * breakpoint.h (struct bp_location) <symbol>: New field.
1800 * symtab.c (find_function_start_sal): Save the symbol into the SaL.
1801 * symtab.h (struct symtab_and_line) <symbol>: New field.
1802
1803 2017-10-26 Patrick Frants <osscontribute@gmail.com>
1804
1805 PR gdb/13669
1806 * cp-valprint.c (cp_print_value_fields): Use obstack_blank_fast
1807 to rewind obstack.
1808
1809 2017-10-26 Pedro Alves <palves@redhat.com>
1810
1811 * remote.c (remote_async_terminal_ours_p): Delete.
1812 (remote_open_1, remote_terminal_inferior, remote_terminal_ours):
1813 Remove references to 'remote_async_terminal_ours_p'.
1814
1815 2017-10-26 Yao Qi <yao.qi@linaro.org>
1816
1817 * breakpoint.h (regular_breakpoint_inserted_here_p): Remove.
1818
1819 2017-10-26 Yao Qi <yao.qi@linaro.org>
1820
1821 * break-catch-sig.c (signal_catchpoint_breakpoint_hit): Make
1822 aspace const.
1823 * break-catch-syscall.c (breakpoint_hit_catch_syscall):
1824 Likewise.
1825 * breakpoint.c (bpstat_check_location): Remove cast.
1826 (breakpoint_hit_catch_fork): Make aspce const.
1827 (breakpoint_hit_catch_solib): Likewise.
1828 (breakpoint_hit_catch_exec): Likewise.
1829 (breakpoint_hit_ranged_breakpoint): Likewise.
1830 (breakpoint_hit_watchpoint): Likewise.
1831 (base_breakpoint_breakpoint_hit): Likewise.
1832 (bkpt_breakpoint_hit): Likewise.
1833 (dprintf_breakpoint_hit): Likewise.
1834 (tracepoint_breakpoint_hit): Likewise.
1835 * breakpoint.h (breakpoint_ops) <breakpoint_hit>: Likewise.
1836
1837 2017-10-26 Yao Qi <yao.qi@linaro.org>
1838
1839 * breakpoint.c (breakpoint_location_address_match): Change
1840 "struct address_space *" to "const address_space".
1841 (breakpoint_location_address_range_overlap): Likewise.
1842 (breakpoint_here_p): Likewise.
1843 (breakpoint_in_range_p): Likewise.
1844 (moribund_breakpoint_here_p): Likewise.
1845 (bp_location_inserted_here_p): Likewise.
1846 (software_breakpoint_inserted_here_p): Likewise.
1847 (hardware_breakpoint_inserted_here_p): Likewise.
1848 (hardware_watchpoint_inserted_in_range): Likewise.
1849 (bpstat_check_location): Likewise.
1850 (bpstat_stop_status): Likewise.
1851 (breakpoint_address_match): Likewise.
1852 (breakpoint_address_match_range): Likewise.
1853 (breakpoint_location_address_match): Likewise.
1854 (breakpoint_location_address_range_overlap): Likewise.
1855 (insert_single_step_breakpoint): Likewise.
1856 (breakpoint_has_location_inserted_here): Likewise.
1857 (single_step_breakpoint_inserted_here_p): Likewise.
1858 (pc_at_non_inline_function): Likewise.
1859 * breakpoint.h (bpstat_stop_status): Update declaration.
1860 (breakpoint_here_p): Likewise.
1861 (breakpoint_in_range_p): Likewise.
1862 (moribund_breakpoint_here_p): Likewise.
1863 (breakpoint_inserted_here_p): Likewise.
1864 (software_breakpoint_inserted_here_p): Likewise.
1865 (hardware_breakpoint_inserted_here_p): Likewise.
1866 (breakpoint_has_location_inserted_here): Likewise.
1867 (single_step_breakpoint_inserted_here_p): Likewise.
1868 (hardware_watchpoint_inserted_in_range): Likewise.
1869 (breakpoint_address_match): Likewise.
1870 (insert_single_step_breakpoint): Likewise.
1871 (pc_at_non_inline_function): Likewise.
1872 * gdbthread.h (thread_has_single_step_breakpoint_here): Likewise.
1873 * record.c (record_check_stopped_by_breakpoint): Likewise.
1874 * record.h (record_check_stopped_by_breakpoint): Likewise.
1875 * thread.c (thread_has_single_step_breakpoint_here): Likewise.
1876
1877 2017-10-25 Yao Qi <yao.qi@linaro.org>
1878
1879 * aarch32-linux-nat.c (aarch32_gp_regcache_supply): Use
1880 regcache->arch () instead get_regcache_arch.
1881 * aarch64-fbsd-nat.c (aarch64_fbsd_fetch_inferior_registers):
1882 Likewise.
1883 (aarch64_fbsd_store_inferior_registers): Likewise.
1884 * aarch64-linux-nat.c (fetch_gregs_from_thread): Likewise.
1885 (store_gregs_to_thread): Likewise.
1886 (fetch_fpregs_from_thread): Likewise.
1887 (store_fpregs_to_thread): Likewise.
1888 * aarch64-tdep.c (aarch64_extract_return_value): Likewise.
1889 (aarch64_store_return_value): Likewise.
1890 (aarch64_software_single_step): Likewise.
1891 * aix-thread.c (aix_thread_wait): Likewise.
1892 (supply_reg32): Likewise.
1893 (supply_sprs64): Likewise.
1894 (supply_sprs32): Likewise.
1895 (fill_gprs64): Likewise.
1896 (fill_gprs32): Likewise.
1897 (fill_sprs64): Likewise.
1898 (fill_sprs32): Likewise.
1899 (store_regs_user_thread): Likewise.
1900 (store_regs_kernel_thread): Likewise.
1901 * alpha-bsd-nat.c (alphabsd_fetch_inferior_registers): Likewise.
1902 (alphabsd_store_inferior_registers): Likewise.
1903 * alpha-tdep.c (alpha_extract_return_value): Likewise.
1904 (alpha_store_return_value): Likewise.
1905 (alpha_deal_with_atomic_sequence): Likewise.
1906 (alpha_next_pc): Likewise.
1907 (alpha_software_single_step): Likewise.
1908 * amd64-bsd-nat.c (amd64bsd_fetch_inferior_registers): Likewise.
1909 (amd64bsd_store_inferior_registers): Likewise.
1910 * amd64-linux-nat.c (amd64_linux_fetch_inferior_registers):
1911 Likewise.
1912 (amd64_linux_store_inferior_registers): Likewise.
1913 * amd64-nat.c (amd64_supply_native_gregset): Likewise.
1914 (amd64_collect_native_gregset): Likewise.
1915 * amd64-obsd-tdep.c (amd64obsd_supply_uthread): Likewise.
1916 (amd64obsd_collect_uthread): Likewise.
1917 * amd64-tdep.c (amd64_supply_fpregset): Likewise.
1918 (amd64_collect_fpregset): Likewise.
1919 (amd64_supply_fxsave): Likewise.
1920 (amd64_supply_xsave): Likewise.
1921 (amd64_collect_fxsave): Likewise.
1922 (amd64_collect_xsave): Likewise.
1923 * arc-tdep.c (arc_write_pc): Likewise.
1924 * arch-utils.c (default_skip_permanent_breakpoint): Likewise.
1925 * arm-fbsd-nat.c (arm_fbsd_fetch_inferior_registers): Likewise.
1926 (arm_fbsd_store_inferior_registers): Likewise.
1927 * arm-linux-nat.c (fetch_vfp_regs): Likewise.
1928 (store_vfp_regs): Likewise.
1929 (arm_linux_fetch_inferior_registers): Likewise.
1930 (arm_linux_store_inferior_registers): Likewise.
1931 * arm-linux-tdep.c (arm_linux_supply_gregset): Likewise.
1932 (arm_linux_sigreturn_next_pc): Likewise.
1933 (arm_linux_get_next_pcs_syscall_next_pc): Likewise.
1934 * arm-nbsd-nat.c (arm_supply_gregset): Likewise.
1935 (fetch_register): Likewise.
1936 (store_register): Likewise.
1937 * arm-tdep.c (arm_is_thumb): Likewise.
1938 (displaced_in_arm_mode): Likewise.
1939 (bx_write_pc): Likewise.
1940 (arm_get_next_pcs_addr_bits_remove): Likewise.
1941 (arm_software_single_step): Likewise.
1942 (arm_extract_return_value): Likewise.
1943 (arm_store_return_value): Likewise.
1944 (arm_write_pc): Likewise.
1945 * bfin-tdep.c (bfin_extract_return_value): Likewise.
1946 * bsd-uthread.c (bsd_uthread_fetch_registers): Likewise.
1947 (bsd_uthread_store_registers): Likewise.
1948 * core-regset.c (fetch_core_registers): Likewise.
1949 * corelow.c (get_core_registers): Likewise.
1950 * cris-tdep.c (cris_store_return_value): Likewise.
1951 (cris_extract_return_value): Likewise.
1952 (find_step_target): Likewise.
1953 (find_step_target): Likewise.
1954 (cris_software_single_step): Likewise.
1955 * ctf.c (ctf_fetch_registers): Likewise.
1956 * darwin-nat.c (cancel_breakpoint): Likewise.
1957 * fbsd-tdep.c (fbsd_collect_thread_registers): Likewise.
1958 * frv-tdep.c (frv_extract_return_value): Likewise.
1959 * ft32-tdep.c (ft32_store_return_value): Likewise.
1960 (ft32_extract_return_value): Likewise.
1961 * go32-nat.c (fetch_register): Likewise.
1962 (go32_fetch_registers): Likewise.
1963 (go32_store_registers): Likewise.
1964 (store_register): Likewise.
1965 * h8300-tdep.c (h8300_extract_return_value): Likewise.
1966 (h8300_store_return_value): Likewise.
1967 * hppa-linux-nat.c (fetch_register): Likewise.
1968 (store_register): Likewise.
1969 (hppa_linux_fetch_inferior_registers): Likewise.
1970 (hppa_linux_store_inferior_registers): Likewise.
1971 * i386-darwin-nat.c (i386_darwin_fetch_inferior_registers): Likewise.
1972 (i386_darwin_store_inferior_registers): Likewise.
1973 * i386-gnu-nat.c (gnu_fetch_registers): Likewise.
1974 (gnu_store_registers): Likewise.
1975 * i386-linux-nat.c (fetch_register): Likewise.
1976 (store_register): Likewise.
1977 (supply_gregset): Likewise.
1978 (fill_gregset): Likewise.
1979 (i386_linux_fetch_inferior_registers): Likewise.
1980 (i386_linux_store_inferior_registers): Likewise.
1981 (i386_linux_resume): Likewise.
1982 * i386-linux-tdep.c (i386_linux_get_syscall_number_from_regcache):
1983 Likewise.
1984 * i386-nto-tdep.c (i386nto_supply_gregset): Likewise.
1985 * i386-obsd-nat.c (i386obsd_supply_pcb): Likewise.
1986 * i386-obsd-tdep.c (i386obsd_supply_uthread): Likewise.
1987 (i386obsd_collect_uthread): Likewise.
1988 * i386-tdep.c (i386_mmx_regnum_to_fp_regnum): Likewise.
1989 (i386_supply_gregset): Likewise.
1990 (i386_collect_gregset): Likewise.
1991 (i386_supply_fpregset): Likewise.
1992 (i386_collect_fpregset): Likewise.
1993 (i386_mpx_bd_base): Likewise.
1994 * i386-v4-nat.c (supply_fpregset): Likewise.
1995 (fill_fpregset): Likewise.
1996 * i387-tdep.c (i387_supply_fsave): Likewise.
1997 (i387_collect_fsave): Likewise.
1998 (i387_supply_fxsave): Likewise.
1999 (i387_collect_fxsave): Likewise.
2000 (i387_supply_xsave): Likewise.
2001 (i387_collect_xsave): Likewise.
2002 * ia64-linux-nat.c (ia64_linux_fetch_registers): Likewise.
2003 (ia64_linux_store_registers): Likewise.
2004 * ia64-tdep.c (ia64_access_rse_reg): Likewise.
2005 (ia64_extract_return_value): Likewise.
2006 (ia64_store_return_value): Likewise.
2007 (find_func_descr): Likewise.
2008 * inf-child.c (inf_child_fetch_inferior_registers): Likewise.
2009 * inf-ptrace.c (inf_ptrace_fetch_registers): Likewise.
2010 (inf_ptrace_store_registers): Likewise.
2011 * infrun.c (use_displaced_stepping): Likewise.
2012 (displaced_step_prepare_throw): Likewise.
2013 (resume): Likewise.
2014 (proceed): Likewise.
2015 (do_target_wait): Likewise.
2016 (adjust_pc_after_break): Likewise.
2017 (handle_inferior_event_1): Likewise.
2018 (handle_signal_stop): Likewise.
2019 (save_infcall_suspend_state): Likewise.
2020 (restore_infcall_suspend_state): Likewise.
2021 * iq2000-tdep.c (iq2000_extract_return_value): Likewise.
2022 * jit.c (jit_frame_prev_register): Likewise.
2023 * linux-nat.c (save_stop_reason): Likewise.
2024 (linux_nat_wait_1): Likewise.
2025 (resume_stopped_resumed_lwps): Likewise.
2026 * linux-record.c (record_linux_sockaddr): Likewise.
2027 (record_linux_msghdr): Likewise.
2028 (record_linux_system_call): Likewise.
2029 * linux-tdep.c (linux_collect_thread_registers): Likewise.
2030 * lm32-tdep.c (lm32_extract_return_value): Likewise.
2031 (lm32_store_return_value): Likewise.
2032 * m32c-tdep.c (m32c_read_flg): Likewise.
2033 (m32c_pseudo_register_read): Likewise.
2034 (m32c_pseudo_register_write): Likewise.
2035 * m32r-linux-tdep.c (m32r_linux_supply_gregset): Likewise.
2036 (m32r_linux_collect_gregset): Likewise.
2037 * m32r-tdep.c (m32r_store_return_value): Likewise.
2038 (m32r_extract_return_value): Likewise.
2039 * m68k-bsd-nat.c (m68kbsd_supply_fpregset): Likewise.
2040 (m68kbsd_collect_fpregset): Likewise.
2041 * m68k-bsd-tdep.c (m68kbsd_supply_fpregset): Likewise.
2042 * m68k-linux-nat.c (fetch_register): Likewise.
2043 (old_fetch_inferior_registers): Likewise.
2044 (old_store_inferior_registers): Likewise.
2045 (store_regs): Likewise.
2046 * m68k-tdep.c (m68k_svr4_extract_return_value): Likewise.
2047 (m68k_svr4_store_return_value): Likewise.
2048 * m88k-tdep.c (m88k_store_arguments): Likewise.
2049 * mi/mi-main.c (mi_cmd_data_list_changed_registers): Likewise.
2050 (mi_cmd_data_write_register_values): Likewise.
2051 * mips-fbsd-nat.c (mips_fbsd_fetch_inferior_registers): Likewise.
2052 (mips_fbsd_store_inferior_registers): Likewise.
2053 * mips-fbsd-tdep.c (mips_fbsd_supply_fpregs): Likewise.
2054 (mips_fbsd_supply_gregs): Likewise.
2055 (mips_fbsd_collect_fpregs): Likewise.
2056 (mips_fbsd_collect_gregs): Likewise.
2057 (mips_fbsd_supply_fpregset): Likewise.
2058 (mips_fbsd_collect_fpregset): Likewise.
2059 (mips_fbsd_supply_gregset): Likewise.
2060 (mips_fbsd_collect_gregset): Likewise.
2061 * mips-linux-nat.c (supply_gregset): Likewise.
2062 (fill_gregset): Likewise.
2063 (supply_fpregset): Likewise.
2064 (fill_fpregset): Likewise.
2065 * mips-linux-tdep.c (mips_supply_gregset): Likewise.
2066 (mips_fill_gregset): Likewise.
2067 (mips_supply_fpregset): Likewise.
2068 (mips_fill_fpregset): Likewise.
2069 (mips64_supply_gregset): Likewise.
2070 (micromips_linux_sigframe_validate): Likewise.
2071 * mips-nbsd-nat.c (mipsnbsd_fetch_inferior_registers): Likewise.
2072 (mipsnbsd_fetch_inferior_registers): Likewise.
2073 (mipsnbsd_store_inferior_registers): Likewise.
2074 * mips-nbsd-tdep.c (mipsnbsd_supply_fpregset): Likewise.
2075 (mipsnbsd_supply_gregset): Likewise.
2076 (mipsnbsd_iterate_over_regset_sections): Likewise.
2077 (mipsnbsd_supply_reg): Likewise.
2078 (mipsnbsd_supply_fpreg): Likewise.
2079 * mips-tdep.c (mips_in_frame_stub): Likewise.
2080 (mips_dummy_id): Likewise.
2081 (is_octeon_bbit_op): Likewise.
2082 (micromips_bc1_pc): Likewise.
2083 (extended_mips16_next_pc): Likewise.
2084 (mips16_next_pc): Likewise.
2085 (deal_with_atomic_sequence): Likewise.
2086 * moxie-tdep.c (moxie_process_readu): Likewise.
2087 * nios2-tdep.c (nios2_get_next_pc): Likewise.
2088 * nto-procfs.c (procfs_store_registers): Likewise.
2089 * ppc-fbsd-nat.c (ppcfbsd_fetch_inferior_registers): Likewise.
2090 (ppcfbsd_store_inferior_registers): Likewise.
2091 * ppc-linux-nat.c (fetch_vsx_register): Likewise.
2092 (fetch_altivec_register): Likewise.
2093 (get_spe_registers): Likewise.
2094 (fetch_spe_register): Likewise.
2095 (fetch_altivec_registers): Likewise.
2096 (fetch_all_gp_regs): Likewise.
2097 (fetch_all_fp_regs): Likewise.
2098 (store_vsx_register): Likewise.
2099 (store_altivec_register): Likewise.
2100 (set_spe_registers): Likewise.
2101 (store_spe_register): Likewise.
2102 (store_altivec_registers): Likewise.
2103 (store_all_gp_regs): Likewise.
2104 (store_all_fp_regs): Likewise.
2105 * ppc-linux-tdep.c (ppc_linux_supply_gregset): Likewise.
2106 (ppc_linux_collect_gregset): Likewise.
2107 (ppc_canonicalize_syscall): Likewise.
2108 (ppc_linux_record_signal): Likewise.
2109 (ppu2spu_prev_register): Likewise.
2110 * ppc-nbsd-nat.c (ppcnbsd_supply_pcb): Likewise.
2111 * ppc-obsd-nat.c (ppcobsd_fetch_registers): Likewise.
2112 (ppcobsd_store_registers): Likewise.
2113 * ppc-ravenscar-thread.c (ppc_ravenscar_generic_fetch_registers):
2114 Likewise.
2115 (ppc_ravenscar_generic_store_registers): Likewise.
2116 * procfs.c (procfs_fetch_registers): Likewise.
2117 (procfs_store_registers): Likewise.
2118 * ravenscar-thread.c (ravenscar_fetch_registers): Likewise.
2119 (ravenscar_store_registers): Likewise.
2120 (ravenscar_prepare_to_store): Likewise.
2121 * record-btrace.c (record_btrace_fetch_registers): Likewise.
2122 * record-full.c (record_full_wait_1): Likewise.
2123 (record_full_registers_change): Likewise.
2124 (record_full_store_registers): Likewise.
2125 (record_full_core_fetch_registers): Likewise.
2126 (record_full_save): Likewise.
2127 (record_full_goto_insn): Likewise.
2128 * regcache.c (regcache_register_size): Likewise.
2129 (get_regcache_arch): Remove.
2130 (regcache_read_pc): Likewise.
2131 * regcache.h (get_regcache_arch): Remove.
2132 * remote-sim.c (gdbsim_fetch_register): Likewise.
2133 (gdbsim_store_register): Likewise.
2134 * remote.c (fetch_register_using_p): Likewise.
2135 (send_g_packet): Likewise.
2136 (remote_prepare_to_store): Likewise.
2137 (store_registers_using_G): Likewise.
2138 * reverse.c (save_bookmark_command): Likewise.
2139 (goto_bookmark_command): Likewise.
2140 * rs6000-aix-tdep.c (branch_dest): Likewise.
2141 * rs6000-nat.c (rs6000_ptrace64): Likewise.
2142 (fetch_register): Likewise.
2143 * rs6000-tdep.c (ppc_supply_reg): Likewise.
2144 (ppc_collect_reg): Likewise.
2145 (ppc_collect_gregset): Likewise.
2146 (ppc_collect_fpregset): Likewise.
2147 (ppc_collect_vsxregset): Likewise.
2148 (ppc_collect_vrregset): Likewise.
2149 (ppc_displaced_step_hw_singlestep): Likewise.
2150 (rs6000_pseudo_register_read): Likewise.
2151 (rs6000_pseudo_register_write): Likewise.
2152 * s390-linux-nat.c (supply_gregset): Likewise.
2153 (fill_gregset): Likewise.
2154 (s390_linux_fetch_inferior_registers): Likewise.
2155 * s390-linux-tdep.c (s390_write_pc): Likewise.
2156 (s390_software_single_step): Likewise.
2157 (s390_all_but_pc_registers_record): Likewise.
2158 (s390_linux_syscall_record): Likewise.
2159 * sentinel-frame.c (sentinel_frame_prev_arch): Likewise.
2160 * sh-nbsd-nat.c (shnbsd_fetch_inferior_registers): Likewise.
2161 (shnbsd_store_inferior_registers): Likewise.
2162 * sh-tdep.c (sh_extract_return_value_nofpu): Likewise.
2163 (sh_extract_return_value_fpu): Likewise.
2164 (sh_store_return_value_nofpu): Likewise.
2165 (sh_corefile_supply_regset): Likewise.
2166 (sh_corefile_collect_regset): Likewise.
2167 * sh64-tdep.c (sh64_extract_return_value): Likewise.
2168 (sh64_store_return_value): Likewise.
2169 * sparc-linux-tdep.c (sparc32_linux_collect_core_fpregset): Likewise.
2170 * sparc-nat.c (sparc_fetch_inferior_registers): Likewise.
2171 (sparc_store_inferior_registers): Likewise.
2172 * sparc-ravenscar-thread.c (register_in_thread_descriptor_p): Likewise.
2173 (sparc_ravenscar_prepare_to_store): Likewise.
2174 * sparc-tdep.c (sparc32_store_arguments): Likewise.
2175 (sparc_analyze_control_transfer): Likewise.
2176 (sparc_step_trap): Likewise.
2177 (sparc_software_single_step): Likewise.
2178 (sparc32_gdbarch_init): Likewise.
2179 (sparc_supply_rwindow): Likewise.
2180 (sparc_collect_rwindow): Likewise.
2181 * sparc64-linux-tdep.c (sparc64_linux_collect_core_fpregset): Likewise.
2182 * sparc64-nbsd-nat.c (sparc64nbsd_supply_gregset): Likewise.
2183 (sparc64nbsd_collect_gregset): Likewise.
2184 (sparc64nbsd_supply_fpregset): Likewise.
2185 (sparc64nbsd_collect_fpregset): Likewise.
2186 * sparc64-tdep.c (sparc64_store_arguments): Likewise.
2187 (sparc64_supply_gregset): Likewise.
2188 (sparc64_collect_gregset): Likewise.
2189 (sparc64_supply_fpregset): Likewise.
2190 (sparc64_collect_fpregset): Likewise.
2191 * spu-linux-nat.c (spu_fetch_inferior_registers): Likewise.
2192 * spu-tdep.c (spu_unwind_sp): Likewise.
2193 (spu2ppu_prev_register): Likewise.
2194 (spu_memory_remove_breakpoint): Likewise.
2195 * stack.c (return_command): Likewise.
2196 * tic6x-tdep.c (tic6x_extract_signed_field): Likewise.
2197 * tracefile-tfile.c (tfile_fetch_registers): Likewise.
2198 * tracefile.c (trace_save_ctf): Likewise.
2199 * windows-nat.c (do_windows_fetch_inferior_registers): Likewise.
2200 (do_windows_store_inferior_registers): Likewise.
2201 (windows_resume): Likewise.
2202 * xtensa-linux-nat.c (fill_gregset): Likewise.
2203 (supply_gregset_reg): Likewise.
2204 * xtensa-tdep.c (xtensa_register_write_masked): Likewise.
2205 (xtensa_register_read_masked): Likewise.
2206 (xtensa_supply_gregset): Likewise.
2207 (xtensa_extract_return_value): Likewise.
2208 (xtensa_store_return_value): Likewise.
2209
2210 2017-10-25 Ulrich Weigand <uweigand@de.ibm.com>
2211
2212 * doublest.c (floatformat_from_string): New function.
2213 * doublest.h (floatformat_from_string): Add prototype.
2214
2215 * std-operator.def (OP_DOUBLE, OP_DECFLOAT): Remove, replace by ...
2216 (OP_FLOAT): ... this.
2217 * expression.h: Do not include "doublest.h".
2218 (union exp_element): Replace doubleconst and decfloatconst by
2219 new element floatconst.
2220 * ada-lang.c (resolve_subexp): Handle OP_FLOAT instead of OP_DOUBLE.
2221 (ada_evaluate_subexp): Likewise.
2222 * eval.c (evaluate_subexp_standard): Handle OP_FLOAT instead of
2223 OP_DOUBLE and OP_DECFLOAT.
2224 * expprint.c (print_subexp_standard): Likewise.
2225 (dump_subexp_body_standard): Likewise.
2226 * breakpoint.c (watchpoint_exp_is_const): Likewise.
2227
2228 * parse.c: Include "dfp.h".
2229 (write_exp_elt_dblcst, write_exp_elt_decfloatcst): Remove.
2230 (write_exp_elt_floatcst): New function.
2231 (operator_length_standard): Handle OP_FLOAT instead of OP_DOUBLE
2232 and OP_DECFLOAT.
2233 (operator_check_standard): Likewise.
2234 (parse_float): Do not accept suffix. Take type as input. Return bool.
2235 Return target format buffer instead of host DOUBLEST.
2236 Use floatformat_from_string and decimal_from_string to parse
2237 either binary or decimal floating-point types.
2238 (parse_c_float): Remove.
2239 * parser-defs.h: Do not include "doublest.h".
2240 (write_exp_elt_dblcst, write_exp_elt_decfloatcst): Remove.
2241 (write_exp_elt_floatcst): Add prototype.
2242 (parse_float): Update prototype.
2243 (parse_c_float): Remove.
2244
2245 * c-exp.y: Do not include "dfp.h".
2246 (typed_val_float): Use byte buffer instead of DOUBLEST.
2247 (typed_val_decfloat): Remove.
2248 (DECFLOAT): Remove.
2249 (FLOAT): Use OP_FLOAT and write_exp_elt_floatcst.
2250 (parse_number): Update to new parse_float interface.
2251 Parse suffixes and determine type before calling parse_float.
2252 Handle decimal and binary FP types the same way.
2253
2254 * d-exp.y (typed_val_float): Use byte buffer instead of DOUBLEST.
2255 (FLOAT_LITERAL): Use OP_FLOAT and write_exp_elt_floatcst.
2256 (parse_number): Update to new parse_float interface.
2257 Parse suffixes and determine type before calling parse_float.
2258
2259 * f-exp.y: Replace dval by typed_val_float.
2260 (FLOAT): Use OP_FLOAT and write_exp_elt_floatcst.
2261 (parse_number): Use parse_float instead of atof.
2262
2263 * go-exp.y (typed_val_float): Use byte buffer instead of DOUBLEST.
2264 (parse_go_float): Remove.
2265 (FLOAT): Use OP_FLOAT and write_exp_elt_floatcst.
2266 (parse_number): Call parse_float instead of parse_go_float.
2267 Parse suffixes and determine type before calling parse_float.
2268
2269 * p-exp.y (typed_val_float): Use byte buffer instead of DOUBLEST.
2270 (FLOAT): Use OP_FLOAT and write_exp_elt_floatcst.
2271 (parse_number): Update to new parse_float interface.
2272 Parse suffixes and determine type before calling parse_float.
2273
2274 * m2-exp.y: Replace dval by byte buffer val.
2275 (FLOAT): Use OP_FLOAT and write_exp_elt_floatcst.
2276 (parse_number): Call parse_float instead of atof.
2277
2278 * rust-exp.y (typed_val_float): Use byte buffer instead of DOUBLEST.
2279 (lex_number): Call parse_float instead of strtod.
2280 (ast_dliteral): Use OP_FLOAT instead of OP_DOUBLE.
2281 (convert_ast_to_expression): Handle OP_FLOAT instead of OP_DOUBLE.
2282 Use write_exp_elt_floatcst.
2283 (unit_testing): Remove static variable.
2284 (rust_type): Do not check unit_testing.
2285 (rust_lex_tests): Do not set uint_testing. Set up dummy rust_parser.
2286
2287 * ada-exp.y (type_float, type_double): Remove.
2288 (typed_val_float): Use byte buffer instead of DOUBLEST.
2289 (FLOAT): Use OP_FLOAT and write_exp_elt_floatcst.
2290 * ada-lex.l (processReal): Use parse_float instead of sscanf.
2291
2292 2017-10-25 Alan Hayward <alan.hayward@arm.com>
2293
2294 * aarch64-tdep.h (enum aarch64_regnum): Remove.
2295 * arch/aarch64.h: New file.
2296
2297 2017-10-24 Ulrich Weigand <uweigand@de.ibm.com>
2298
2299 * dfp.h (decimal_from_string): Use const reference for argument.
2300 * dfp.c (decimal_from_string): Likewise.
2301
2302 2017-10-24 Ulrich Weigand <uweigand@de.ibm.com>
2303
2304 * i387-tdep.c (print_i387_value): Use floatformat_to_string.
2305 * sh64-tdep.c (sh64_do_fp_register): Likewise.
2306 * mips-tdep.c (mips_print_fp_register): Likewise.
2307
2308 2017-10-24 Ulrich Weigand <uweigand@de.ibm.com>
2309
2310 * common/format.h (enum argclass): Replace decfloat_arg by
2311 dec32float_arg, dec64float_arg, and dec128float_arg.
2312 * common/format.c (parse_format_string): Update to return
2313 new decimal float argument classes.
2314
2315 * printcmd.c (printf_decfloat): Rename to ...
2316 (printf_floating): ... this. Add argclass argument, and use it
2317 instead of parsing the format string again. Add support for
2318 binary floating-point values, using floatformat_to_string.
2319 Convert value to the target format if it doesn't already match.
2320 (ui_printf): Call printf_floating instead of printf_decfloat,
2321 also for double_arg / long_double_arg. Pass argclass.
2322
2323 * dfp.c (decimal_to_string): Add format string argument.
2324 * dfp.h (decimal_to_string): Likewise.
2325
2326 * doublest.c (floatformat_to_string): Add format string argument.
2327 * doublest.h (floatformat_to_string): Likewise.
2328
2329 2017-10-24 Ulrich Weigand <uweigand@de.ibm.com>
2330
2331 * doublest.c (floatformat_precision): New routine.
2332 (floatformat_to_string): Likewise.
2333 * doublest.c (floatformat_to_string): Add prototype.
2334
2335 * printcmd.c (print_scalar_formatted): Only call print_floating
2336 on floating-point types.
2337 * valprint.c: Do not include "floatformat.h".
2338 (generic_val_print_decfloat): Remove.
2339 (generic_val_print): Call generic_val_print_float for both
2340 TYPE_CODE_FLT and TYPE_CODE_DECFLOAT.
2341 (print_floating): Use floatformat_to_string. Handle decimal float.
2342 (print_decimal_floating): Remove, merge into floatformat_to_string.
2343 * value.h (print_decimal_floating): Remove.
2344
2345 * Makefile.in: Do not build doublest.c with -Wformat-nonliteral.
2346
2347 2017-10-24 Ulrich Weigand <uweigand@de.ibm.com>
2348
2349 * buildsym.c (end_symtab_get_static_block): Use std::stable_sort.
2350
2351 2017-10-21 Simon Marchi <simon.marchi@ericsson.com>
2352
2353 * memattr.h: Don't include vec.h.
2354 (struct mem_attrib): Initialize fields.
2355 <unknown>: New static method.
2356 (struct mem_region): Add constructors, operator<, initialize
2357 fields.
2358 * memattr.c: Include algorithm.
2359 (default_mem_attrib, unknown_mem_attrib): Remove.
2360 (user_mem_region_list): New global.
2361 (target_mem_region_list, mem_region_list): Change type to
2362 std::vector<mem_region>.
2363 (mem_use_target): Now a function.
2364 (target_mem_regions_valid): Change type to bool.
2365 (mem_region_lessthan, mem_region_cmp, mem_region_init): Remove.
2366 (require_user_regions): Adjust.
2367 (require_target_regions): Adjust.
2368 (create_mem_region): Adjust.
2369 (lookup_mem_region): Adjust.
2370 (invalidate_target_mem_regions): Adjust.
2371 (mem_clear): Rename to...
2372 (user_mem_clear): ... this, and adjust.
2373 (mem_command): Adjust.
2374 (info_mem_command): Adjust.
2375 (mem_enable, enable_mem_command, mem_disable,
2376 disable_mem_command): Adjust.
2377 (mem_delete): Adjust.
2378 (delete_mem_command): Adjust.
2379 * memory-map.h (parse_memory_map): Return an std::vector.
2380 * memory-map.c (parse_memory_map): Likewise.
2381 (struct memory_map_parsing_data): Add constructor.
2382 <memory_map>: Point to std::vector.
2383 (memory_map_start_memory): Adjust.
2384 (memory_map_end_memory): Adjust.
2385 (memory_map_end_property): Adjust.
2386 (clear_result): Remove.
2387 * remote.c (remote_memory_map): Return an std::vector.
2388 * target-debug.h (target_debug_print_VEC_mem_region_s__p):
2389 Remove.
2390 (target_debug_print_mem_region_vector): New.
2391 * target-delegates.c: Regenerate.
2392 * target.h (mem_region_vector): New typedef.
2393 (to_memory_map): Return mem_region_vector.
2394 (target_memory_map): Return an std::vector.
2395 * target.c (target_memory_map): Return an std::vector.
2396 (flash_erase_command): Adjust.
2397
2398 2017-10-21 Simon Marchi <simon.marchi@ericsson.com>
2399
2400 * memory-map.c (struct memory_map_parsing_data) <property_name>:
2401 Change type to std::string.
2402 (memory_map_start_property): Adjust.
2403 (memory_map_end_property): Adjust.
2404
2405 2017-10-21 Simon Marchi <simon.marchi@polymtl.ca>
2406
2407 * infrun.h: Include common/byte-vector.h.
2408 (struct displaced_step_closure): New struct.
2409 (struct buf_displaced_step_closure): New struct.
2410 * infrun.c (displaced_step_closure::~displaced_step_closure):
2411 Provide default implementation.
2412 (displaced_step_clear): Deallocate step closure with delete.
2413 * aarch64-tdep.c (displaced_step_closure): Rename to ...
2414 (aarch64_displaced_step_closure): ... this, extend
2415 displaced_step_closure.
2416 (aarch64_displaced_step_data) <dsc>: Change type to
2417 aarch64_displaced_step_closure.
2418 (aarch64_displaced_step_copy_insn): Adjust to type change, use
2419 unique_ptr.
2420 (aarch64_displaced_step_fixup): Add cast for displaced step
2421 closure.
2422 * amd64-tdep.c (displaced_step_closure): Rename to ...
2423 (amd64_displaced_step_closure): ... this, extend
2424 displaced_step_closure.
2425 <insn_buf>: Change type to std::vector<gdb_byte>.
2426 <max_len>: Remove.
2427 (fixup_riprel): Change type of DSC parameter, adjust to type
2428 change of insn_buf.
2429 (fixup_displaced_copy): Change type of DSC parameter.
2430 (amd64_displaced_step_copy_insn): Instantiate
2431 amd64_displaced_step_closure.
2432 (amd64_displaced_step_fixup): Add cast for closure type, adjust
2433 to type change of insn_buf.
2434 * arm-linux-tdep.c (arm_linux_cleanup_svc): Change type of
2435 parameter DSC.
2436 (arm_linux_copy_svc): Likewise.
2437 (cleanup_kernel_helper_return): Likewise.
2438 (arm_catch_kernel_helper_return): Likewise.
2439 (arm_linux_displaced_step_copy_insn): Instantiate
2440 arm_displaced_step_closure.
2441 * arm-tdep.c (arm_pc_is_thumb): Add cast for closure.
2442 (displaced_read_reg): Change type of parameter DSC.
2443 (branch_write_pc): Likewise.
2444 (load_write_pc): Likewise.
2445 (alu_write_pc): Likewise.
2446 (displaced_write_reg): Likewise.
2447 (arm_copy_unmodified): Likewise.
2448 (thumb_copy_unmodified_32bit): Likewise.
2449 (thumb_copy_unmodified_16bit): Likewise.
2450 (cleanup_preload): Likewise.
2451 (install_preload): Likewise.
2452 (arm_copy_preload): Likewise.
2453 (thumb2_copy_preload): Likewise.
2454 (install_preload_reg): Likewise.
2455 (arm_copy_preload_reg): Likewise.
2456 (cleanup_copro_load_store): Likewise.
2457 (install_copro_load_store): Likewise.
2458 (arm_copy_copro_load_store) Likewise.
2459 (thumb2_copy_copro_load_store): Likewise.
2460 (cleanup_branch): Likewise.
2461 (install_b_bl_blx): Likewise.
2462 (arm_copy_b_bl_blx): Likewise.
2463 (thumb2_copy_b_bl_blx): Likewise.
2464 (thumb_copy_b): Likewise.
2465 (install_bx_blx_reg): Likewise.
2466 (arm_copy_bx_blx_reg): Likewise.
2467 (thumb_copy_bx_blx_reg): Likewise.
2468 (cleanup_alu_imm): Likewise.
2469 (arm_copy_alu_imm): Likewise.
2470 (thumb2_copy_alu_imm): Likewise.
2471 (cleanup_alu_reg): Likewise.
2472 (install_alu_reg): Likewise.
2473 (arm_copy_alu_reg): Likewise.
2474 (thumb_copy_alu_reg): Likewise.
2475 (cleanup_alu_shifted_reg): Likewise.
2476 (install_alu_shifted_reg): Likewise.
2477 (arm_copy_alu_shifted_reg): Likewise.
2478 (cleanup_load): Likewise.
2479 (cleanup_store): Likewise.
2480 (arm_copy_extra_ld_st): Likewise.
2481 (install_load_store): Likewise.
2482 (thumb2_copy_load_literal): Likewise.
2483 (thumb2_copy_load_reg_imm): Likewise.
2484 (arm_copy_ldr_str_ldrb_strb): Likewise.
2485 (cleanup_block_load_all): Likewise.
2486 (cleanup_block_store_pc): Likewise.
2487 (cleanup_block_load_pc): Likewise.
2488 (arm_copy_block_xfer): Likewise.
2489 (thumb2_copy_block_xfer): Likewise.
2490 (cleanup_svc): Likewise.
2491 (install_svc): Likewise.
2492 (arm_copy_svc): Likewise.
2493 (thumb_copy_svc): Likewise.
2494 (arm_copy_undef): Likewise.
2495 (thumb_32bit_copy_undef): Likewise.
2496 (arm_copy_unpred): Likewise.
2497 (arm_decode_misc_memhint_neon): Likewise.
2498 (arm_decode_unconditional): Likewise.
2499 (arm_decode_miscellaneous): Likewise.
2500 (arm_decode_dp_misc): Likewise.
2501 (arm_decode_ld_st_word_ubyte): Likewise.
2502 (arm_decode_media): Likewise.
2503 (arm_decode_b_bl_ldmstm): Likewise.
2504 (arm_decode_ext_reg_ld_st): Likewise.
2505 (thumb2_decode_dp_shift_reg): Likewise.
2506 (thumb2_decode_ext_reg_ld_st): Likewise.
2507 (arm_decode_svc_copro): Likewise.
2508 (thumb2_decode_svc_copro): Likewise.
2509 (install_pc_relative): Likewise.
2510 (thumb_copy_pc_relative_16bit): Likewise.
2511 (thumb_decode_pc_relative_16bit): Likewise.
2512 (thumb_copy_pc_relative_32bit): Likewise.
2513 (thumb_copy_16bit_ldr_literal): Likewise.
2514 (thumb_copy_cbnz_cbz): Likewise.
2515 (thumb2_copy_table_branch): Likewise.
2516 (cleanup_pop_pc_16bit_all): Likewise.
2517 (thumb_copy_pop_pc_16bit): Likewise.
2518 (thumb_process_displaced_16bit_insn): Likewise.
2519 (decode_thumb_32bit_ld_mem_hints): Likewise.
2520 (thumb_process_displaced_32bit_insn): Likewise.
2521 (thumb_process_displaced_insn): Likewise.
2522 (arm_process_displaced_insn): Likewise.
2523 (arm_displaced_init_closure): Likewise.
2524 (arm_displaced_step_fixup): Add cast for closure.
2525 * arm-tdep.h: Include infrun.h.
2526 (displaced_step_closure): Rename to ...
2527 (arm_displaced_step_closure): ... this, extend
2528 displaced_step_closure.
2529 <u::svc::copy_svc_os>: Change type of parameter DSC.
2530 <cleanup>: Likewise.
2531 (arm_process_displaced_insn): Likewise.
2532 (arm_displaced_init_closure): Likewise.
2533 (displaced_read_reg): Likewise.
2534 (displaced_write_reg): Likewise.
2535 * i386-linux-tdep.c (i386_linux_displaced_step_copy_insn):
2536 Adjust.
2537 * i386-tdep.h: Include infrun.h.
2538 (i386_displaced_step_closure): New typedef.
2539 * i386-tdep.c (i386_displaced_step_copy_insn): Use
2540 i386_displaced_step_closure.
2541 (i386_displaced_step_fixup): Adjust.
2542 * rs6000-tdep.c (ppc_displaced_step_closure): New typedef.
2543 (ppc_displaced_step_copy_insn): Use ppc_displaced_step_closure
2544 and unique_ptr.
2545 (ppc_displaced_step_fixup): Adjust.
2546 * s390-linux-tdep.c (s390_displaced_step_closure): New typedef.
2547 (s390_displaced_step_copy_insn): Use s390_displaced_step_closure
2548 and unique_ptr.
2549 (s390_displaced_step_fixup): Adjust.
2550
2551 2017-10-21 Simon Marchi <simon.marchi@polymtl.ca>
2552
2553 * interps.h (interp_resume, interp_suspend, interp_set_temp):
2554 Remove declarations.
2555
2556 2017-10-20 Tom Tromey <tom@tromey.com>
2557
2558 * gdb_bfd.c (struct gdb_bfd_data) <included_bfds>: Now a
2559 std::vector.
2560 (gdb_bfd_record_inclusion): Update.
2561 (bfdp): Remove typedef.
2562
2563 2017-10-20 Tom Tromey <tom@tromey.com>
2564
2565 * gdb_bfd.c (gdb_bfd_ref): Use new.
2566 (struct gdb_bfd_data): Add constructor, destructor, and member
2567 initializers.
2568 (gdb_bfd_unref): Use delete.
2569
2570 2017-10-20 Tom Tromey <tom@tromey.com>
2571
2572 * exec.c (exec_file_attach): Use new_bfd_ref.
2573 * symfile-mem.c (symbol_file_add_from_memory): Use new_bfd_ref.
2574 * gdb_bfd.c (gdb_bfd_open, gdb_bfd_fopen, gdb_bfd_openr)
2575 (gdb_bfd_openw, gdb_bfd_openr_iovec, gdb_bfd_fdopenr): Use
2576 new_bfd_ref.
2577 * gdb_bfd.h (new_bfd_ref): New function.
2578
2579 2017-10-20 Pedro Alves <palves@redhat.com>
2580
2581 * main.c (captured_command_loop): Add attribute noinline.
2582
2583 2017-10-19 Simon Marchi <simon.marchi@ericsson.com>
2584
2585 * interps.c (struct interp_factory): Add constructor.
2586 (interp_factory_p): Remove typedef.
2587 (DEF_VEC_P(interp_factory_p)): Remove.
2588 (interpreter_factories): Change type to std::vector.
2589 (interp_factory_register): Adjust.
2590 (interp_lookup): Adjust.
2591 (interpreter_completer): Adjust.
2592
2593 2017-10-19 Tom Tromey <tom@tromey.com>
2594
2595 * break-catch-syscall.c (catch_syscall_completer): Use
2596 std::string, gdb::unique_xmalloc_ptr.
2597
2598 2017-10-19 Tom Tromey <tom@tromey.com>
2599
2600 * infcall.c (call_function_by_hand_dummy): Use std::string.
2601
2602 2017-10-19 Tom Tromey <tom@tromey.com>
2603
2604 * mi/mi-main.c (mi_cmd_execute): Update.
2605 * top.h (prepare_execute_command): Return scoped_value_mark.
2606 * value.h (class scoped_value_mark): Use DISABLE_COPY_AND_ASSIGN.
2607 Add move constructor.
2608 * top.c (prepare_execute_command): Return scoped_value_mark.
2609 (execute_command): Update.
2610
2611 2017-10-19 Pedro Alves <palves@redhat.com>
2612
2613 * xml-support.c (xml_fetch_content_from_file): Check fread's
2614 return.
2615
2616 2017-10-19 Pedro Alves <palves@redhat.com>
2617
2618 * ser-base.c (ser_base_read_error_fd): Delete the file handler if
2619 async.
2620 (handle_error_fd): New function.
2621 (ser_base_async): Add/delete an event loop file handler for
2622 error_fd.
2623
2624 2017-10-19 Pedro Alves <palves@redhat.com>
2625
2626 * xml-support.c (xml_fetch_content_from_file): Don't read in
2627 chunks. Instead use fseek to determine the file's size, and read
2628 it in one go.
2629
2630 2017-11-18 Keith Seitz <keiths@redhat.com>
2631
2632 * c-exp.y (oper): Canonicalize conversion operators of user-defined
2633 types.
2634 Add whitespace to front of type name.
2635
2636 2017-10-18 Keith Seitz <keiths@redhat.com>
2637
2638 * dwarf2read.c (dwarf2_add_typedef): Issue a complaint on unhandled
2639 DW_AT_accessibility.
2640
2641 2017-10-18 Yao Qi <yao.qi@linaro.org>
2642
2643 * features/tic6x-c62x-linux.c: Remove.
2644
2645 2017-10-17 Tom Tromey <tom@tromey.com>
2646
2647 * disasm.c (do_mixed_source_and_assembly_deprecated): Use
2648 gdb::optional, ui_out_emit_list, ui_out_emit_tuple.
2649 (do_mixed_source_and_assembly): Likewise.
2650
2651 2017-10-17 Tom Tromey <tom@tromey.com>
2652
2653 * regcache.c (regcache::xfer_part): Remove assertion.
2654
2655 2017-10-17 Pedro Alves <palves@redhat.com>
2656
2657 * xml-support.c (xml_fetch_content_from_file): Call
2658 unique_ptr::release() instead unique_ptr::get() when passing
2659 through xrealloc.
2660
2661 2017-10-17 Yao Qi <yao.qi@linaro.org>
2662
2663 * regcache.c (regcache::xfer_part): Remove parameters read and
2664 write, add parameter is_raw. All callers are updated.
2665
2666 2017-10-16 Keith Seitz <keiths@redhat.com>
2667
2668 * c-typeprint.c (enum access_specifier): Moved here from
2669 c_type_print_base.
2670 (output_access_specifier): New function.
2671 (c_type_print_base): Consider typedefs when assessing
2672 whether access labels are needed.
2673 Use output_access_specifier as needed.
2674 Output access specifier for typedefs, if needed.
2675 * dwarf2read.c (dwarf2_add_typedef): Record DW_AT_accessibility.
2676 * gdbtypes.h (struct typedef_field) <is_protected, is_private>: New
2677 fields.
2678 (TYPE_TYPEDEF_FIELD_PROTECTED, TYPE_TYPEDEF_FIELD_PRIVATE): New
2679 accessor macros.
2680
2681 2017-10-16 Tom Tromey <tom@tromey.com>
2682
2683 * linux-tdep.c (linux_info_proc, linux_find_memory_regions_full)
2684 (linux_fill_prpsinfo, linux_vsyscall_range_raw): Update.
2685 * target.c (target_fileio_read_stralloc): Update.
2686 * sparc64-tdep.c (adi_is_addr_mapped): Update.
2687 * target.h (target_fileio_read_stralloc): Return
2688 unique_xmalloc_ptr.
2689
2690 2017-10-16 Tom Tromey <tom@tromey.com>
2691
2692 * xml-syscall.c (xml_init_syscalls_info): Update.
2693 * xml-support.c (xinclude_start_include): Update.
2694 (xml_fetch_content_from_file): Return unique_xmalloc_ptr.
2695 * xml-support.h (xml_fetch_another): Return unique_xmalloc_ptr.
2696 (xml_fetch_content_from_file): Likewise.
2697 * osdata.c (get_osdata): Update.
2698 * target.h (target_read_stralloc, target_get_osdata): Return
2699 unique_xmalloc_ptr.
2700 * solib-aix.c (solib_aix_get_library_list): Update.
2701 * solib-target.c (solib_target_current_sos): Update.
2702 * solib-svr4.c (svr4_current_sos_via_xfer_libraries): Update.
2703 * xml-tdesc.c (fetch_available_features_from_target): Update.
2704 (target_fetch_description_xml): Update.
2705 (file_read_description_xml): Update.
2706 * remote.c (remote_get_threads_with_qxfer, remote_memory_map)
2707 (remote_traceframe_info, btrace_read_config, remote_read_btrace)
2708 (remote_pid_to_exec_file): Update.
2709 * target.c (target_read_stralloc): Return unique_xmalloc_ptr.
2710 (target_get_osdata): Likewise.
2711
2712 2017-10-16 Tom Tromey <tom@tromey.com>
2713
2714 * remote.c (remote_register_number_and_offset): Use std::vector.
2715 (remote_set_syscall_catchpoint): Use gdb::unique_xmalloc_ptr.
2716 (putpkt_binary): Use gdb::def_vector.
2717 (compare_sections_command): Use gdb::byte_vector.
2718
2719 2017-10-16 Tom Tromey <tom@tromey.com>
2720
2721 * ppc-linux-nat.c (hwdebug_insert_point): Use
2722 gdb::unique_xmalloc_ptr, XDUP.
2723
2724 2017-10-16 Tom Tromey <tom@tromey.com>
2725
2726 * probe.c (parse_probes): Use std::string.
2727 (info_probes_for_ops, enable_probes_command)
2728 (disable_probes_command): Remove cleanups.
2729
2730 2017-10-16 Tom Tromey <tom@tromey.com>
2731
2732 * buildsym.c (block_compar): Remove.
2733 (end_symtab_get_static_block): Use std::vector.
2734
2735 2017-10-16 Simon Marchi <simon.marchi@ericsson.com>
2736
2737 * memrange.h (struct mem_range): Define operator< and operator==.
2738 (mem_range_s): Remove.
2739 (DEF_VEC_O (mem_range_s)): Remove.
2740 (normalize_mem_ranges): Change parameter type to std::vector.
2741 * memrange.c (compare_mem_ranges): Remove.
2742 (normalize_mem_ranges): Change parameter type to std::vector,
2743 adjust to vector change.
2744 * exec.c (section_table_available_memory): Return vector, remove
2745 parameter.
2746 (section_table_read_available_memory): Adjust to std::vector
2747 change.
2748 * remote.c (remote_read_bytes): Adjust to std::vector
2749 change.
2750 * tracepoint.h (traceframe_available_memory): Change parameter
2751 type to std::vector.
2752 * tracepoint.c (traceframe_available_memory): Change parameter
2753 type to std::vector, adjust.
2754 * gdb/mi/mi-main.c (mi_cmd_trace_frame_collected): Adjust to
2755 std::vector change.
2756 * gdb/Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
2757 unittests/memrange-selftests.c.
2758 (SUBDIR_UNITTESTS_OBS): Add memrange-selftests.o.
2759 * gdb/unittests/memrange-selftests.c: New file.
2760
2761 2017-10-16 Pedro Alves <palves@redhat.com>
2762
2763 * elfread.c (probe_key_free): Rename range-for variable.
2764 * probe.c (parse_probes_in_pspace, find_probes_in_objfile)
2765 (find_probe_by_pc, collect_probes): Rename range-for variable.
2766
2767 2017-10-16 Yao Qi <yao.qi@linaro.org>
2768
2769 * features/Makefile (XMLTOC): Remove tic6x-*.xml.
2770 * features/tic6x-c62x.c: Remove.
2771 * features/tic6x-c64x-linux.c: Remove.
2772 * features/tic6x-c64x.c: Remove.
2773 * features/tic6x-c64xp-linux.c: Remove.
2774 * features/tic6x-c64xp.c: Remove.
2775 * tic6x-linux-tdep.c (_initialize_tic6x_linux_tdep): Don't call
2776 initialize_tdesc_tic6x_*_linux functions.
2777 * tic6x-tdep.c (_initialize_tic6x_tdep): Don't call
2778 initialize_tdesc_tic6x_* functions.
2779
2780 2017-10-16 Yao Qi <yao.qi@linaro.org>
2781
2782 * features/Makefile (WHICH): Remove tic6x-c64xp, tic6x-c64x
2783 tic6x-c62x.
2784 * regformats/tic6x-c62x.dat: Remove.
2785 * regformats/tic6x-c64x.dat: Remove.
2786 * regformats/tic6x-c64xp.dat: Remove.
2787
2788 2017-10-15 Simon Marchi <simon.marchi@ericsson.com>
2789
2790 * tracepoint.c (parse_traceframe_info): Return a unique_ptr
2791 (the !HAVE_LIBEXPAT version).
2792
2793 2017-10-14 Simon Marchi <simon.marchi@ericsson.com>
2794
2795 * nat/linux-osdata.c (struct pid_pgid_entry) <operator<>: Make
2796 const.
2797
2798 2017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
2799
2800 * target.h: Include tracepoint.h.
2801 (enum trace_find_type): Move to tracepoint.h.
2802 (struct target_ops) <to_traceframe_info>: Return a unique ptr.
2803 * tracepoint.h: Don't include target.h
2804 (enum trace_find_type): Move from target.h.
2805 (parse_traceframe_info): Return a unique ptr.
2806 * tracepoint.c (current_traceframe_info): Change type to unique
2807 ptr.
2808 (free_traceframe_info): Remove.
2809 (clear_traceframe_info): Don't manually free
2810 current_traceframe_info.
2811 (free_result): Remove.
2812 (parse_traceframe_info): Return a unique ptr.
2813 (get_traceframe_info): Adjust to unique ptr.
2814 * ctf.c (ctf_traceframe_info): Return a unique ptr.
2815 * remote.c (remote_traceframe_info): Return a unique ptr.
2816 * tracefile-tfile.c (tfile_traceframe_info): Return a unique
2817 ptr.
2818 * target-debug.h (target_debug_print_traceframe_info_up): New
2819 macro.
2820 * target-delegates.c: Regenerate.
2821
2822 2017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
2823
2824 * memrange.h (struct mem_range): Add constructors.
2825 * tracepoint.h (struct traceframe_info) <memory>: Change type to
2826 std::vector<mem_range>.
2827 * tracepoint.c (free_traceframe_info): Don't manually free
2828 vector.
2829 (traceframe_info_start_memory): Adjust to vector change.
2830 (traceframe_available_memory): Likewise.
2831 * tracefile-tfile.c (build_traceframe_info): Likewise.
2832 * ctf.c (ctf_traceframe_info): Likewise.
2833
2834 2017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
2835
2836 * tracepoint.h (struct traceframe_info) <tvars>: Change type to
2837 std::vector<int>.
2838 * tracepoint.c (free_traceframe_info): Deallocate with delete.
2839 (traceframe_info_start_tvar): Adjust to vector change.
2840 (parse_traceframe_info): Allocate with new.
2841 * ctf.c (ctf_traceframe_info): Allocate with new, adjust to
2842 vector change.
2843 * tracefile-tfile.c (build_traceframe_info): Adjust to vector
2844 change.
2845 tfile_traceframe_info): Allocate with new.
2846 * mi/mi-main.c (mi_cmd_trace_frame_collected): Adjust to vector
2847 change.
2848
2849 2017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
2850
2851 * tracepoint.c (traceframe_info): Rename to...
2852 (current_traceframe_info): ...this.
2853 (clear_traceframe_info): Adjust.
2854 (get_traceframe_info): Adjust.
2855
2856 2017-10-14 Simon Marchi <simon.marchi@ericsson.com>
2857
2858 * nat/linux-osdata.c: Include algorithm.
2859 (compare_processes): Remove.
2860 (struct pid_pgid_entry): New struct.
2861 (linux_xfer_osdata_processgroups): Use std::vector instead of
2862 XNEWVEC.
2863
2864 2017-10-14 Simon Marchi <simon.marchi@ericsson.com>
2865
2866 * objfiles.h: Don't include symfile.h.
2867 (struct partial_symbol): Remove forward-declaration.
2868 (struct objfile) <global_psymbols, static_psymbols>: Change type
2869 to std::vector<partial_symbol *>.
2870 * objfiles.c (objfile::objfile): Don't memset those fields.
2871 (objfile::~objfile): Don't free those fields.
2872 * psympriv.h (struct psymbol_allocation_list): Remove
2873 forward-declaration.
2874 (add_psymbol_to_list): Change psymbol_allocation_list parameter
2875 to std::vector.
2876 (start_psymtab_common): Change parameters to std::vector.
2877 * psymtab.c: Include algorithm.
2878 (require_partial_symbols): Call shrink_to_fit.
2879 (find_pc_sect_psymbol): Adjust to vector change.
2880 (match_partial_symbol): Likewise.
2881 (lookup_partial_symbol): Likewise.
2882 (psym_relocate): Likewise.
2883 (dump_psymtab): Likewise.
2884 (recursively_search_psymtabs): Likewise.
2885 (compare_psymbols): Remove.
2886 (sort_pst_symbols): Adjust to vector change.
2887 (start_psymtab_common): Likewise.
2888 (end_psymtab_common): Likewise.
2889 (psymbol_bcache_full): De-constify return value.
2890 (add_psymbol_to_bcache): Likewise.
2891 (extend_psymbol_list): Remove.
2892 (append_psymbol_to_list): Adjust to vector change.
2893 (add_psymbol_to_list): Likewise.
2894 (init_psymbol_list): Likewise.
2895 (maintenance_info_psymtabs): Likewise.
2896 (maintenance_check_psymtabs): Likewise.
2897 * symfile.h (struct psymbol_allocation_list): Remove.
2898 * symfile.c (reread_symbols): Adjust to vector change.
2899 * dbxread.c (start_psymtab): Change type of parameters.
2900 (dbx_symfile_read): Adjust to vector change.
2901 (read_dbx_symtab): Likewise.
2902 (start_psymtab): Change type of parameters.
2903 * dwarf2read.c (dwarf2_build_psymtabs): Adjust to vector change.
2904 (create_partial_symtab): Likewise.
2905 (add_partial_symbol): Likewise.
2906 (write_one_signatured_type): Likewise.
2907 (recursively_write_psymbols): Likewise.
2908 * mdebugread.c (parse_partial_symbols): Likewise.
2909 * xcoffread.c (xcoff_start_psymtab): Change type of parameters.
2910 (scan_xcoff_symtab): Adjust to vector change.
2911 (xcoff_initial_scan): Likewise.
2912
2913 2017-10-13 Simon Marchi <simon.marchi@ericsson.com>
2914
2915 * ada-typeprint.c (print_dynamic_range_bound): Use std::string.
2916
2917 2017-10-13 Yao Qi <yao.qi@linaro.org>
2918
2919 * features/Makefile: Remove tic6x-*-expedite, add tic6x-expedite.
2920 Remove s390x-*-expedite, add s390x-expedite.
2921
2922 2017-10-13 Yao Qi <yao.qi@linaro.org>
2923
2924 * features/s390-gs-linux64.c: Regenerated.
2925 * features/s390x-gs-linux64.c: Regenerated.
2926
2927 2017-10-13 Tom Tromey <tom@tromey.com>
2928
2929 * compile/compile-object-run.c (do_module_cleanup): Use delete.
2930 * solib.c (update_solib_list, reload_shared_libraries_1): Use
2931 delete.
2932 * symfile.c (symbol_file_add_with_addrs): Use new.
2933 (symbol_file_add_separate): Update comment.
2934 (syms_from_objfile_1, remove_symbol_file_command): Use delete.
2935 * jit.c (jit_object_close_impl): Use new.
2936 (jit_unregister_code): Use delete.
2937 * objfiles.c (objfile::objfile): Rename from allocate_objfile.
2938 (~objfile): Rename from free_objfile.
2939 (free_objfile_separate_debug, do_free_objfile_cleanup)
2940 (free_all_objfiles, objfile_purge_solibs): Use delete.
2941 * objfiles.h (struct objfile): Add constructor and destructor.
2942 Use DISABLE_COPY_AND_ASSIGN. Add initializers to data members.
2943 (allocate_objfile, free_objfile): Don't declare.
2944 (struct objstats): Add initializers.
2945
2946 2017-10-12 Simon Marchi <simon.marchi@ericsson.com>
2947
2948 * arch-utils.h (simple_displaced_step_copy_insn): Remove.
2949 * arch-utils.c (simple_displaced_step_copy_insn): Remove.
2950 * gdbarch.sh (displaced_step_copy_insn): Adjust comment.
2951 * gdbarch.h: Regenerate.
2952 * i386-linux-tdep.c (i386_linux_displaced_step_copy_insn):
2953 Adjust comment.
2954 * i386-tdep.c (i386_displaced_step_copy_insn): Adjust comment.
2955 (i386_displaced_step_fixup): Adjust comment.
2956 * rs6000-tdep.c (ppc_displaced_step_copy_insn): Adjust comment.
2957
2958 2017-10-12 Tom Tromey <tom@tromey.com>
2959
2960 * prologue-value.h (pv_area::store_would_trash): Return bool.
2961 (pv_area::find_reg): Likewise.
2962 * prologue-value.c (pv_area::store_would_trash): Return bool.
2963 (pv_area::find_reg): Likewise.
2964
2965 2017-10-12 Tom Tromey <tom@tromey.com>
2966
2967 * s390-linux-tdep.c (s390_store, s390_load)
2968 (s390_check_for_saved, s390_analyze_prologue): Update.
2969 * rx-tdep.c (check_for_saved, rx_analyze_prologue): Update.
2970 * rl78-tdep.c (rl78_analyze_prologue, check_for_saved): Update.
2971 * prologue-value.h (class pv_area): Move from prologue-value.c.
2972 Change names of members. Add constructor, destructor, member
2973 functions.
2974 (make_pv_area, free_pv_area, make_cleanup_free_pv_area)
2975 (pv_area_store, pv_area_fetch, pv_area_store_would_trash)
2976 (pv_area_fetch, pv_area_scan): Don't declare.
2977 * prologue-value.c (struct pv_area::area_entry): Now member of
2978 pv_area.
2979 (struct pv_area): Move to prologue-value.h.
2980 (pv_area::pv_area): Rename from make_pv_area.
2981 (pv_area::~pv_area): Rename from free_pv_area.
2982 (do_free_pv_area_cleanup, make_cleanup_free_pv_area): Remove.
2983 (clear_entries, find_entry, overlaps, store_would_trash, store)
2984 (fetch, find_reg, scan): Now member of pv_area.
2985 Remove "area" argument. Update.
2986 * msp430-tdep.c (check_for_saved, msp430_analyze_prologue):
2987 Update.
2988 * mn10300-tdep.c (push_reg, check_for_saved)
2989 (mn10300_analyze_prologue): Update.
2990 * mep-tdep.c (is_arg_spill, check_for_saved)
2991 (mep_analyze_prologue): Update.
2992 * m32c-tdep.c (m32c_pv_push, m32c_srcdest_fetch)
2993 (m32c_srcdest_store, m32c_pv_enter, m32c_is_arg_spill)
2994 (m32c_is_struct_return, m32c_analyze_prologue): Update.
2995 * arm-tdep.c (thumb_analyze_prologue, arm_analyze_prologue):
2996 Update.
2997 * arc-tdep.c (arc_is_in_prologue, arc_analyze_prologue): Update.
2998 * aarch64-tdep.c (aarch64_analyze_prologue): Update.
2999
3000 2017-10-12 Simon Marchi <simon.marchi@ericsson.com>
3001
3002 * linux-nat.h (linux_nat_set_delete_thread): New declaration.
3003 * linux-nat.c (linux_nat_delete_thread): New variable.
3004 (lwp_free): Invoke linux_nat_delete_thread if set.
3005 (linux_nat_set_delete_thread): New function.
3006 * aarch64-linux-nat.c (_initialize_aarch64_linux_nat): Assign
3007 thread delete callback.
3008 * arm-linux-nat.c (arm_linux_delete_thread): New function.
3009 (_initialize_arm_linux_nat): Assign thread delete callback.
3010 * s390-linux-nat.c (s390_delete_thread): New function.
3011 (_initialize_s390_nat): Assign thread delete callback.
3012 * x86-linux-nat.c (x86_linux_add_target): Likewise.
3013 * nat/aarch64-linux.c (aarch64_linux_delete_thread): New
3014 function.
3015 * nat/aarch64-linux.h (aarch64_linux_delete_thread): New
3016 declaration.
3017 * nat/x86-linux.c (x86_linux_delete_thread): New function.
3018 * nat/x86-linux.h (x86_linux_delete_thread): New declaration.
3019
3020 2017-10-09 Tom Tromey <tom@tromey.com>
3021
3022 * tui/tui-win.c (tui_set_win_height, parse_scrolling_args): Use
3023 std::string.
3024 * tui/tui-layout.c (enum tui_status): Use std::string.
3025
3026 2017-10-11 Tom Tromey <tom@tromey.com>
3027
3028 * gdbthread.h (thread_command): Constify.
3029 * inferior.h (detach_command): Constify.
3030 * top.h (set_history, show_history): Constify.
3031 * arm-tdep.c (set_arm_command, show_arm_command): Constify.
3032 * serial.c (serial_set_cmd, serial_show_cmd): Constify.
3033 * bsd-kvm.c (bsd_kvm_cmd): Constify.
3034 * printcmd.c (set_command): Constify.
3035 (non_const_set_command): New function.
3036 * dcache.c (set_dcache_command, show_dcache_command): Constify.
3037 * breakpoint.c (enable_command, disable_command, delete_command)
3038 (catch_command, tcatch_command, set_breakpoint_cmd)
3039 (show_breakpoint_cmd): Constify.
3040 * macrocmd.c (macro_command): Constify.
3041 * infcmd.c (unset_command, kill_command, detach_command)
3042 (info_proc_cmd): Constify.
3043 * i386-tdep.c (set_mpx_cmd, show_mpx_cmd): Constify.
3044 * auto-load.c (show_auto_load_cmd, set_auto_load_cmd)
3045 (info_auto_load_cmd): Constify.
3046 * target-descriptions.c (set_tdesc_cmd, show_tdesc_cmd)
3047 (unset_tdesc_cmd): Constify.
3048 * ada-lang.c (set_ada_command, show_ada_command)
3049 (maint_set_ada_cmd, maint_show_ada_cmd): Constify.
3050 * guile/guile.c (set_guile_command, show_guile_command)
3051 (info_guile_command): Constify.
3052 * tui/tui-win.c (tui_command, set_tui_cmd, show_tui_cmd):
3053 Constify.
3054 * skip.c (skip_command): Constify.
3055 * compile/compile.c (_initialize_compile): Constify.
3056 * dwarf2read.c (set_dwarf_cmd, show_dwarf_cmd): Constify.
3057 * btrace.c (maint_btrace_cmd, maint_btrace_set_cmd)
3058 (maint_btrace_show_cmd, maint_btrace_pt_set_cmd)
3059 (maint_btrace_pt_show_cmd): Constify.
3060 * remote.c (set_remote_cmd, show_remote_cmd, remote_command):
3061 Constify.
3062 * python/python.c (user_show_python, user_set_python): Constify.
3063 * mips-tdep.c (set_mips_command, show_mips_command)
3064 (set_mipsfpu_command): Constify.
3065 * record-btrace.c (cmd_record_btrace_start)
3066 (cmd_set_record_btrace, cmd_show_record_btrace)
3067 (cmd_set_record_btrace_bts, cmd_show_record_btrace_bts)
3068 (cmd_set_record_btrace_pt, cmd_show_record_btrace_pt): Constify.
3069 * rs6000-tdep.c (set_powerpc_command, show_powerpc_command):
3070 Constify.
3071 * symfile.c (overlay_command): Constify.
3072 * spu-tdep.c (set_spu_command, show_spu_command): Constify.
3073 * cli/cli-logging.c (set_logging_command, show_logging_command):
3074 Constify.
3075 * cli/cli-dump.c (dump_command, append_command)
3076 (srec_dump_command, ihex_dump_command, verilog_dump_command)
3077 (tekhex_dump_command, binary_dump_command)
3078 (binary_append_command): Constify.
3079 * cli/cli-decode.c (struct cmd_list_element): Change type of
3080 "fun".
3081 * cli/cli-cmds.c (info_command, show_command, set_debug)
3082 (show_debug): Constify.
3083 (show_command): Add non-const overload.
3084 * top.c (set_history, show_history): Constify.
3085 * sh-tdep.c (set_sh_command, show_sh_command): Constify.
3086 * command.h (add_prefix_cmd): Accept a cmd_const_cfunc_ftype.
3087 * target.c (target_command): Constify.
3088 * sparc64-tdep.c (info_adi_command): Constify.
3089 * record-full.c (cmd_record_full_start): Constify.
3090 (set_record_full_command): Constify. Fix typo.
3091 (show_record_full_command): Constify.
3092 * thread.c (thread_command, thread_apply_command): Constify.
3093 * memattr.c (dummy_cmd): Constify.
3094 * value.c (function_command): Constify.
3095 * frame.c (set_backtrace_cmd, show_backtrace_cmd): Constify.
3096 * probe.c (info_probes_command): Constify.
3097 * ser-tcp.c (set_tcp_cmd, show_tcp_cmd): Constify.
3098 * gnu-nat.c (set_task_cmd, show_task_cmd, set_thread_cmd)
3099 (show_thread_cmd, set_thread_default_cmd)
3100 (show_thread_default_cmd): Constify.
3101 (check_empty): Constify.
3102 * tracepoint.c (tfind_command): Constify.
3103 * cp-support.c (maint_cplus_command): Constify.
3104 * windows-tdep.c (info_w32_command): Constify.
3105 * record.c (cmd_record_start, set_record_command)
3106 (show_record_command, info_record_command, cmd_record_goto):
3107 Constify.
3108 * ravenscar-thread.c (set_ravenscar_command)
3109 (show_ravenscar_command): Constify.
3110 * utils.c (set_internal_problem_cmd, show_internal_problem_cmd):
3111 Constify.
3112 (add_internal_problem_command): Remove casts.
3113 * arc-tdep.c (maintenance_print_arc_command): Constify.
3114 * valprint.c (set_print, show_print, set_print_raw)
3115 (show_print_raw): Constify.
3116 * maint.c (maintenance_command, maintenance_info_command)
3117 (maintenance_print_command, maintenance_set_cmd)
3118 (maintenance_show_cmd, set_per_command_cmd)
3119 (show_per_command_cmd, maintenance_check_command): Constify.
3120 * language.c (set_check, show_check): Constify.
3121 * typeprint.c (show_print_type, set_print_type): Constify.
3122 * go32-nat.c (go32_info_dos_command): Constify.
3123
3124 2017-10-11 Tom Tromey <tom@tromey.com>
3125
3126 * breakpoint.c (prepare_re_set_context): Remove.
3127 (breakpoint_re_set_one): Update. Don't use cleanups.
3128 (breakpoint_re_set): Use scoped_restore, std::string, and
3129 scoped_restore_current_language.
3130
3131 2017-10-11 Tom Tromey <tom@tromey.com>
3132
3133 * breakpoint.c (commands_command_1): Use std::string.
3134 (cleanup_executing_breakpoints): Remove.
3135 (bpstat_do_actions_1): Use scoped_restore.
3136 (bpstat_check_watchpoint): Use std::string.
3137 (decode_static_tracepoint_spec): Likewise.
3138 (break_range_command): Likewise.
3139 (watch_command_1): Likewise.
3140 (compare_breakpoints): Change argument types.
3141 (clear_command): Use std::vector.
3142 (cleanup_executing_breakpoints): Remove.
3143 (update_global_location_list): Use unique_xmalloc_ptr.
3144 (strace_command): Remove unused declaration.
3145
3146 2017-10-11 John Baldwin <jhb@FreeBSD.org>
3147
3148 * Makefile.in (ALLDEPFILES): Add arm-fbsd-nat.c.
3149 * NEWS: Mention new FreeBSD/arm native configuration.
3150 * configure.host: Add arm*-*-freebsd*.
3151 * configure.nat: Likewise.
3152 * arm-fbsd-nat.c: New file.
3153
3154 2017-10-11 John Baldwin <jhb@FreeBSD.org>
3155
3156 * Makefile.in (ALL_TARGET_OBS): Add arm-fbsd-tdep.o.
3157 (ALLDEPFILES): Add arm-fbsd-tdep.c.
3158 * NEWS: Mention new FreeBSD/arm target.
3159 * configure.tgt: Add arm*-*-freebsd*.
3160 * arm-fbsd-tdep.c: New file.
3161 * arm-fbsd-tdep.h: New file.
3162
3163 2017-10-11 Maciej W. Rozycki <macro@imgtec.com>
3164
3165 * linux-tdep.c (linux_make_corefile_notes): Remove call to
3166 `gdbarch_elfcore_write_linux_prpsinfo'.
3167 * gdbarch.sh (elfcore_write_linux_prpsinfo): Remove architecture
3168 method.
3169 (elf_internal_linux_prpsinfo): Remove declaration.
3170 * gdbarch.h: Regenerate.
3171 * gdbarch.c: Regenerate.
3172
3173 2017-10-11 Maciej W. Rozycki <macro@imgtec.com>
3174
3175 * ppc-linux-tdep.c (ppc_linux_init_abi): Remove call to
3176 `set_gdbarch_elfcore_write_linux_prpsinfo'.
3177
3178 2017-10-11 Pedro Alves <palves@redhat.com>
3179
3180 * breakpoint.c (reattach_breakpoints): Delete.
3181 * breakpoint.h (reattach_breakpoints): Delete.
3182
3183 2017-10-11 Simon Marchi <simon.marchi@ericsson.com>
3184
3185 * symfile.c (registered_sym_fns): Make struct, not typedef.
3186 (DEF_VEC_O (registered_sym_fns)): Remove.
3187 (symtab_fns): Change type to std::vector.
3188 (add_symtab_fns): Adjust.
3189 (find_sym_fns): Adjust.
3190
3191 2017-10-11 Anton Kolesov <Anton.Kolesov@synopsys.com>
3192
3193 * arc-tdep.c (arc_gdbarch_init): Pass proper cpu value to disassembler.
3194 * arc-tdep.h (arc_arch_is_em): New function.
3195 (arc_arch_is_hs): Likewise.
3196
3197 2017-10-11 Egeyar Bagcioglu <egeyar.bagcioglu@oracle.com>
3198
3199 * macrotab.h (macro_lookup_inclusion): Remove unnecessary
3200 parentheses in the declaration.
3201 (macro_lookup_inclusion): Likewise.
3202 (macro_lookup_definition): Likewise.
3203 * p-lang.h (pascal_builtin_types): Likewise.
3204 * tui/tui-data.c (tui_win_list): Likewise.
3205 * tui/tui-data.h (tui_win_list): Likewise.
3206 * utils.h (make_cleanup_free_section_addr_info): Likewise.
3207
3208 2017-10-11 Mark Rages <markrages@gmail.com>
3209
3210 * target-memory.c (block_boundaries): Fix for block address not
3211 aligned on block size.
3212
3213 2017-10-10 Pedro Alves <palves@redhat.com>
3214 Tom Tromey <tom@tromey.com>
3215
3216 * breakpoint.c (struct captured_breakpoint_query_args)
3217 (do_captured_breakpoint_query, gdb_breakpoint_query): Delete.
3218 (print_breakpoint): New.
3219 * breakpoint.h (print_breakpoint): Declare.
3220 * common/common-exceptions.h (enum return_reason): Remove
3221 references to catch_exceptions.
3222 * exceptions.c (catch_exceptions, catch_exceptions_with_msg):
3223 Delete.
3224 * exceptions.h (catch_exceptions_ftype, catch_exceptions)
3225 (catch_exception_ftype, catch_exceptions_with_msg): Delete.
3226 * gdb.h: Delete.
3227 * gdbthread.h (thread_select): Declare.
3228 * mi/mi-cmd-break.c: Don't include gdb.h.
3229 (breakpoint_notify): Use print_breakpoint.
3230 * mi/mi-cmd-catch.c: Don't include gdb.h.
3231 * mi/mi-interp.c: Don't include gdb.h.
3232 (mi_print_breakpoint_for_event): New.
3233 (mi_breakpoint_created, mi_breakpoint_modified): Use
3234 mi_print_breakpoint_for_event.
3235 * mi/mi-main.c: Don't include gdb.h.
3236 (mi_cmd_thread_select): Parse the global thread ID here. Use
3237 thread_select instead of gdb_thread_select.
3238 (mi_cmd_thread_list_ids): Output "thread-ids" tuple here instead
3239 of using gdb_list_thread_ids.
3240 * remote-fileio.c (do_remote_fileio_request): Change type. Reply
3241 FILEIO_ENOSYS here.
3242 (remote_fileio_request): Use TRY/CATCH instead of
3243 catch_exceptions.
3244 * symfile-mem.c (struct symbol_file_add_from_memory_args)
3245 (symbol_file_add_from_memory_wrapper): Delete.
3246 (add_vsyscall_page): Use TRY/CATCH instead of catch_exceptions.
3247 * thread.c: Don't include gdb.h.
3248 (do_captured_list_thread_ids, gdb_list_thread_ids): Delete.
3249 (thread_alive): Use thread_select.
3250 (do_captured_thread_select): Delete, parts salvaged as ...
3251 (thread_select): ... this new function.
3252 (gdb_thread_select): Delete.
3253
3254 2017-10-10 Pedro Alves <palves@redhat.com>
3255 Tom Tromey <tom@tromey.com>
3256
3257 * breakpoint.c (breakpoint_cond_eval): Change return type to bool
3258 and reverse logic.
3259 (WP_DELETED, WP_VALUE_CHANGED, WP_VALUE_NOT_CHANGED, WP_IGNORE):
3260 No longer macros. Instead ...
3261 (enum wp_check_result): They're now values of this new
3262 enumeration.
3263 (watchpoint_check): Change return type to wp_check_result and
3264 parameter type to bpstat.
3265 (bpstat_check_watchpoint): Use TRY/CATCH instead of catch_errors.
3266 (bpstat_check_breakpoint_conditions): Use TRY/CATCH instead of
3267 catch_errors. Reverse logic of watchpoint_check call.
3268 (breakpoint_re_set_one): Now returns void and takes a breakpoint
3269 pointer as parameter.
3270 (breakpoint_re_set): Use TRY/CATCH instead of catch_errors.
3271 * common/common-exceptions.c (throw_exception_sjlj): Update
3272 comments to avoid mentioning catch_errors.
3273 * exceptions.c (catch_errors): Delete.
3274 * exceptions.h: Update comments to avoid mentioning catch_errors.
3275 (catch_errors_ftype, catch_errors): Delete.
3276 * infrun.c (normal_stop): Use TRY/CATCH instead of catch_errors.
3277 (hook_stop_stub): Delete.
3278 (restore_selected_frame): Change return type to void, and
3279 parameter type to const frame_id &.
3280 (restore_infcall_control_state): Use TRY/CATCH instead of
3281 catch_errors.
3282 * main.c (captured_command_loop): Return void and remove
3283 parameter. Remove references to catch_errors.
3284 (captured_main): Use TRY/CATCH instead of catch_errors.
3285 * objc-lang.c (objc_submethod_helper_data)
3286 (find_objc_msgcall_submethod_helper): Delete.
3287 (find_objc_msgcall_submethod): Use TRY/CATCH instead of
3288 catch_errors.
3289 * record-full.c (record_full_message): Return void.
3290 (record_full_message_args, record_full_message_wrapper): Delete.
3291 (record_full_message_wrapper_safe): Return bool and use TRY/CATCH
3292 instead of catch_errors.
3293 * solib-aix.c (solib_aix_open_symbol_file_object): Change
3294 parameter type to int.
3295 * solib-darwin.c (open_symbol_file_object): Ditto.
3296 * solib-dsbt.c (open_symbol_file_object): Ditto.
3297 * solib-frv.c (open_symbol_file_object): Ditto.
3298 * solib-svr4.c (open_symbol_file_object): Ditto.
3299 * solib-target.c (solib_target_open_symbol_file_object): Ditto.
3300 * solib.c (update_solib_list): Use TRY/CATCH instead of
3301 catch_errors.
3302 * solist.h (struct target_so_ops) <open_symbol_file_object>:
3303 Change type.
3304 * symmisc.c (struct print_symbol_args): Remove.
3305 (dump_symtab_1): Use TRY/CATCH instead of catch_errors.
3306 (print_symbol): Change type.
3307 * windows-nat.c (handle_load_dll, handle_unload_dll): Return void
3308 and remove parameters.
3309 (catch_errors): New.
3310 (get_windows_debug_event): Adjust.
3311
3312 2017-10-09 Tom Tromey <tom@tromey.com>
3313
3314 * mi/mi-main.c (free_splay_tree): Remove.
3315 (list_available_thread_groups): Use splay_tree_up.
3316 * common/gdb_splay_tree.h: New file.
3317
3318 2017-10-09 Tom Tromey <tom@tromey.com>
3319
3320 * mi/mi-main.c (do_nothing): Remove.
3321 (list_available_thread_groups): Update.
3322
3323 2017-10-09 Pedro Alves <palves@redhat.com>
3324
3325 * infrun.c (handle_inferior_event_1) <TARGET_WAITKIND_EXECD>: Skip
3326 reading registers when switching context.
3327
3328 2017-10-09 John Baldwin <jhb@FreeBSD.org>
3329
3330 * fbsd-nat.c (fbsd_siginfo_size): Use gdbarch_long_bit.
3331 (fbsd_convert_siginfo): Likewise.
3332 * fbsd-tdep.c (fbsd_core_xfer_siginfo): Likewise.
3333
3334 2017-10-09 Simon Marchi <simon.marchi@polymtl.ca>
3335
3336 * configure.ac (try_guile_versions): Remove guile-2.2.
3337 * configure: Regenerate.
3338
3339 2017-10-09 Tom Tromey <tom@tromey.com>
3340
3341 * Makefile.in (COMPILE.post, POSTCOMPILE): Restore $(basename).
3342 (COMPILE.pre): Use $(CXX).
3343
3344 2017-10-09 Pedro Alves <palves@redhat.com>
3345
3346 * cp-support.c (cp_remove_params): Return a gdb::unique_xmalloc_ptr.
3347 Use bool.
3348 (overload_list_add_symbol): Adjust to use gdb::unique_xmalloc_ptr.
3349 * cp-support.h (cp_remove_params): Now returns a
3350 gdb::unique_xmalloc_ptr.
3351 * dwarf2read.c (find_slot_in_mapped_hash): Now returns bool.
3352 Adjust to cp_remove_params returning a gdb::unique_xmalloc_ptr.
3353 * psymtab.c (psymtab_search_name): Adjust to cp_remove_params
3354 returning a gdb::unique_xmalloc_ptr.
3355 (lookup_partial_symbol): Adjust to use gdb::unique_xmalloc_ptr.
3356 * stack.c (find_frame_funname): Adjust to cp_remove_params
3357 returning a gdb::unique_xmalloc_ptr.
3358
3359 2017-10-08 Tom Tromey <tom@tromey.com>
3360
3361 * dwarf2read.c (dwarf2_get_dwz_file): Use
3362 gdb::unique_xmalloc_ptr.
3363 (find_slot_in_mapped_hash): Likewise.
3364 (dwarf2_physname): Likewise.
3365 (create_dwo_unit_in_dwp_v1): Use std::string.
3366 (create_dwo_unit_in_dwp_v2): Likewise.
3367 (lookup_dwo_cutu): Likewise.
3368 (inherit_abstract_dies): Use std::vector.
3369 (read_array_type): Likewise.
3370 (dwarf_decode_macros): Remove unused declaration.
3371 (unsigned_int_compar): Remove.
3372 (dwarf2_build_psymtabs_hard): Use scoped_restore.
3373 (psymtabs_addrmap_cleanup): Remove.
3374
3375 2017-10-08 Tom Tromey <tom@tromey.com>
3376
3377 * frame-unwind.c (frame_unwind_try_unwinder): Update.
3378 * frame.h (frame_cleanup_after_sniffer): Declare.
3379 (frame_prepare_for_sniffer): Return void.
3380 * frame.c (frame_cleanup_after_sniffer): No longer static. Change
3381 type of argument.
3382 (frame_prepare_for_sniffer): Return void.
3383
3384 2017-10-08 Tom Tromey <tom@tromey.com>
3385
3386 * utils.h (make_cleanup_value_free): Remove.
3387 * utils.c (do_value_free, struct cleanup): Remove.
3388 * dwarf2loc.c (dwarf2_evaluate_loc_desc_full) <DWARF_VALUE_STACK>:
3389 Use gdb_value_up.
3390 * value.h (struct value_deleter): New.
3391 (gdb_value_up): New typedef.
3392
3393 2017-10-08 Tom Tromey <tom@tromey.com>
3394
3395 * symtab.c (free_search_symbols, do_free_search_symbols_cleanup)
3396 (make_cleanup_free_search_symbols): Remove.
3397 (search_symbols): Return std::vector.
3398 (symbol_search::compare_search_syms): Now member of
3399 symbol_search. Change arguments.
3400 (sort_search_symbols_remove_dups): Change arguments. Rewrite.
3401 (symtab_symbol_info, rbreak_command): Update.
3402 * symtab.h (struct symbol_search) <next>: Remove.
3403 Add constructors.
3404 (symbol_search::operator<): New function.
3405 (symbol_search::operator==): New function.
3406 (search_symbols): Remove std::vector.
3407 (free_search_symbols, make_cleanup_free_search_symbols): Remove.
3408 (symbol_search::compare_search_syms): Declare.
3409
3410 2017-10-06 Yao Qi <yao.qi@linaro.org>
3411
3412 * Makefile.in (ALL_64_TARGET_OBS): Replace aarch64-insn.o with
3413 arch/aarch64-insn.o.
3414 Remove one rule.
3415 * configure.tgt: Replace aarch64-insn.o with arch/aarch64-insn.o.
3416
3417 2017-10-06 Yao Qi <yao.qi@linaro.org>
3418
3419 * Makefile.in (ALL_TARGET_OBS): Replace arm.o, arm-get-next-pcs.o,
3420 and arm-linux.o with arch/arm.o, arch/arm-get-next-pcs.o and
3421 arch/arm-linux.o respectively.
3422 * configure.tgt: Likewise.
3423
3424 2017-10-06 Yao Qi <yao.qi@linaro.org>
3425
3426 * Makefile.in (ALL_TARGET_OBS): Rename i386.o to arch/i386.o.
3427 * configure.tgt (i386_tobjs): Replace i386.o with arch/i386.o.
3428
3429 2017-10-06 Pedro Alves <palves@redhat.com>
3430
3431 * windows-nat.c: Include <algorithm>.
3432
3433 2017-10-06 Yao Qi <yao.qi@linaro.org>
3434
3435 * configure.tgt (i386_tobjs): New variable.
3436 (amd64_tobjs): New variable.
3437 Set $cpu_obs and $os_obs.
3438
3439 2017-10-06 Yao Qi <yao.qi@linaro.org>
3440
3441 * Makefile.in (CONFIG_SRC_SUBDIR): New.
3442 (ALL_64_TARGET_OBS): Replace amd64.o with arch/amd64.o.
3443 (clean): Remove object files and dependency files.
3444 (distclean): Remove the directory.
3445 * configure.ac: Invoke AC_CONFIG_COMMANDS.
3446 * configure: Re-generated.
3447 * configure.tgt: Replace amd64.o with arch/amd64.o.
3448
3449 2017-10-05 Jose E. Marchesi <jose.marchesi@oracle.com>
3450
3451 PR build/22188
3452 * arm-tdep.c (arm_decode_misc_memhint_neon): Fix decoding of CPS
3453 and SETEND.
3454
3455 2017-10-05 Pedro Alves <palves@redhat.com>
3456
3457 * linux-nat.c (linux_child_follow_fork): When following the parent
3458 and detaching the child, consult the parent thread's architecture
3459 instead of the child's.
3460
3461 2017-10-05 Ulrich Weigand <uweigand@de.ibm.com>
3462
3463 * ax.h: Do not include "doublest.h".
3464 (union agent_val): Remove.
3465
3466 2017-10-05 Ulrich Weigand <uweigand@de.ibm.com>
3467
3468 * dfp.h (MAX_DECIMAL_STRING): Move to dfp.c.
3469 (decimal_to_string): Return std::string object.
3470 (decimal_from_string): Accept std::string object. Return bool.
3471 (decimal_from_integral, decimal_from_doublest): Remove.
3472 (decimal_from_longest): Add prototype.
3473 (decimal_from_ulongest): Likewise.
3474 (decimal_to_longest): Likewise.
3475 (decimal_from_doublest): Likewise.
3476 * dfp.c: Do not include "gdbtypes.h" or "value.h".
3477 (MAX_DECIMAL_STRING): Move here.
3478 (decimal_to_string): Return std::string object.
3479 (decimal_from_string): Accept std::string object. Return bool.
3480 (decimal_from_integral): Remove, replace by ...
3481 (decimal_from_longest, decimal_from_ulongest): ... these new functions.
3482 (decimal_to_longest): New function.
3483 (decimal_from_floating): Remove, replace by ...
3484 (decimal_from_doublest): ... this new function.
3485 (decimal_to_doublest): Update to new decimal_to_string interface.
3486
3487 * value.c (unpack_long): Use decimal_to_longest.
3488 * valops.c (value_cast): Use decimal_from_doublest instead of
3489 decimal_from_floating. Use decimal_from_[u]longest isntead of
3490 decimal_from_integral.
3491 * valarith.c (value_args_as_decimal): Likewise.
3492 * valprint.c (print_decimal_floating): Update to new
3493 decimal_to_string interface.
3494 * printcmd.c (printf_decfloat): Likewise.
3495 * c-exp.y (parse_number): Update to new decimal_from_string interface.
3496
3497 2017-10-05 Ulrich Weigand <uweigand@de.ibm.com>
3498
3499 * doublest.h: Do not include "floatformat.h". Remove stale comments.
3500 * gdbtypes.c: Include "floatformat.h".
3501 * value.c: Likewise.
3502 * m68k-tdep.c: Likewise.
3503
3504 * findvar.c: Do not include "floatformat.h".
3505 * amd64-darwin-tdep.c: Likewise.
3506 * arm-linux-tdep.c: Likewise.
3507 * i386-darwin-tdep.c: Likewise.
3508 * i387-tdep.c: Likewise.
3509 * m68k-linux-tdep.c: Likewise.
3510 * mep-tdep.c: Likewise.
3511 * mips-tdep.c: Likewise.
3512 * nios2-tdep.c: Likewise.
3513 * s390-linux-tdep.c: Likewise.
3514 * sparc-obsd-tdep.c: Likewise.
3515 * sparc-tdep.c: Likewise.
3516 * sparc64-tdep.c: Likewise.
3517 * spu-tdep.c: Likewise.
3518 * tic6x-tdep.c: Likewise.
3519 * tilegx-tdep.c: Likewise.
3520 * vax-tdep.c: Likewise.
3521 * xstormy16-tdep.c: Likewise.
3522 * xtensa-tdep.c: Likewise.
3523
3524 * top.c: Do not include "doublest.h".
3525 * aarch64-tdep.c: Likewise.
3526 * alpha-tdep.c: Likewise.
3527 * arm-linux-tdep.c: Likewise.
3528 * m68k-linux-tdep.c: Likewise.
3529 * tilegx-tdep.c: Likewise.
3530 * xstormy16-tdep.c: Likewise.
3531
3532 2017-10-05 John Baldwin <jhb@FreeBSD.org>
3533
3534 * mips-fbsd-tdep.c (MIPS_INST_ADDIU_A0_SP_N32): Define.
3535 (mipsn32_fbsd_sigframe): Define.
3536 (mips_fbsd_init_abi): Install mipsn32_fbsd_sigframe unwinder
3537 for FreeBSD/mipsn32.
3538
3539 2017-10-05 John Baldwin <jhb@FreeBSD.org>
3540
3541 * fbsd-tdep.c (fbsd_print_auxv_entry): Handle AT_EHDRFLAGS and
3542 AT_HWCAP.
3543
3544 2017-10-05 Tristan Gingold <tgingold@free.fr>
3545
3546 * MAINTAINERS (Misc): Update my email address.
3547
3548 2017-10-04 Pedro Alves <palves@redhat.com>
3549
3550 * remote.c (get_remote_arch_state): New 'gdbarch' parameter. Use
3551 it instead of target_gdbarch.
3552 (get_remote_state, get_remote_packet_size): Adjust
3553 get_remote_arch_state calls, passing down target_gdbarch
3554 explicitly.
3555 (packet_reg_from_regnum, packet_reg_from_pnum): New parameter
3556 'gdbarch' and use it instead of target_gdbarch.
3557 (get_memory_packet_size): Adjust get_remote_arch_state calls,
3558 passing down target_gdbarch explicitly.
3559 (struct stop_reply) <arch>: New field.
3560 (remote_parse_stop_reply): Use the stopped thread's architecture,
3561 not the current inferior's. Save the architecture in the
3562 stop_reply.
3563 (process_stop_reply): Use the stop reply's architecture.
3564 (process_g_packet, remote_fetch_registers)
3565 (remote_prepare_to_store, store_registers_using_G)
3566 (remote_store_registers): Adjust get_remote_arch_state calls,
3567 using the regcache's architecture.
3568 (remote_get_trace_status): Adjust get_remote_arch_state calls,
3569 passing down target_gdbarch explicitly.
3570 * spu-multiarch.c (spu_thread_architecture): Defer to the target
3571 beneath instead of calling target_gdbarch.
3572 * target.c (default_thread_architecture): Use the specified
3573 inferior's architecture, instead of the current inferior's
3574 architecture (via target_gdbarch).
3575
3576 2017-10-04 Pedro Alves <palves@redhat.com>
3577
3578 * regcache.c (get_thread_arch_regcache): Remove null_ptid special
3579 case.
3580 (regcache_print): Handle !target_has_registers here instead.
3581
3582 2017-10-04 Pedro Alves <palves@redhat.com>
3583
3584 * frame.c (create_test_frame): Delete.
3585 * frame.h (create_test_frame): Delete.
3586 * gdbarch-selftests.c: Include gdbthread.h and target.h.
3587 (class regcache_test): Delete.
3588 (test_target_has_registers, test_target_has_stack)
3589 (test_target_has_memory, test_target_prepare_to_store)
3590 (test_target_store_registers): New functions.
3591 (test_target_ops): New class.
3592 (register_to_value_test): Error out if there's already a
3593 process_stratum (or higher) target pushed. Create a fuller mock
3594 environment, with mock target_ops, inferior, address space, thread
3595 and inferior_ptid.
3596 * progspace.c (struct address_space): Move to ...
3597 * progspace.h (struct address_space): ... here.
3598 * regcache.h (regcache::~regcache, regcache::raw_write)
3599 [GDB_SELF_TEST]: No longer virtual.
3600
3601 2017-10-04 Simon Marchi <simon.marchi@ericsson.com>
3602
3603 * mi/mi-main.c (list_available_thread_groups): Reverse filter logic.
3604
3605 2017-10-04 Pedro Alves <palves@redhat.com>
3606
3607 * guile/scm-breakpoint.c (gdbscm_breakpoint_commands): Move code
3608 out of 'between TRY and CATCH'.
3609
3610 2017-10-04 Pedro Alves <palves@redhat.com>
3611
3612 * cli/cli-cmds.c (complete_command): Add missing END_CATCH.
3613 * common/common-exceptions.h (TRY): Open an outermost scope.
3614 Expand intro comment.
3615 (CATCH): Reindent.
3616 (END_CATCH): Close the outermost scope.
3617 * completer.c (complete_line_internal): Add missing END_CATCH.
3618
3619 2017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
3620
3621 * NEWS (Changes since GDB 8.0): Add entry about new
3622 'set-cwd-on-gdbserver' feature.
3623 (New remote packets): Add entry for QSetWorkingDir.
3624 * common/common-inferior.h (set_inferior_cwd): New prototype.
3625 * infcmd.c (set_inferior_cwd): Remove "static".
3626 (show_cwd_command): Expand text to include remote debugging.
3627 * remote.c: Add PACKET_QSetWorkingDir.
3628 (remote_protocol_features) <QSetWorkingDir>: New entry for
3629 PACKET_QSetWorkingDir.
3630 (extended_remote_set_inferior_cwd): New function.
3631 (extended_remote_create_inferior): Call
3632 "extended_remote_set_inferior_cwd".
3633 (_initialize_remote): Call "add_packet_config_cmd" for
3634 QSetWorkingDir.
3635
3636 2017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
3637
3638 * NEWS (New commands): Mention "set/show cwd".
3639 * cli/cli-cmds.c (_initialize_cli_cmds): Mention "set cwd" on
3640 "cd" command's help text.
3641 * common/common-inferior.h (get_inferior_cwd): New prototype.
3642 * infcmd.c (inferior_cwd_scratch): New global variable.
3643 (set_inferior_cwd): New function.
3644 (get_inferior_cwd): Likewise.
3645 (set_cwd_command): Likewise.
3646 (show_cwd_command): Likewise.
3647 (_initialize_infcmd): Add "set/show cwd" commands.
3648 * inferior.h (class inferior) <cwd>: New field.
3649 * nat/fork-inferior.c: Include "gdb_tilde_expand.h".
3650 (fork_inferior): Change inferior's cwd before its execution.
3651 * windows-nat.c (windows_create_inferior): Pass inferior's cwd
3652 to CreateProcess.
3653
3654 2017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
3655
3656 * Makefile.in (SFILES): Add gdb_tilde_expand.c.
3657 (HFILES_NO_SRCDIR): Add gdb_tilde_expand.h.
3658 (COMMON_OBS): Add gdb_tilde_expand.o.
3659 * common/gdb_tilde_expand.c: New file.
3660 * common/gdb_tilde_expand.h: Likewise.
3661
3662 2017-10-03 Maciej W. Rozycki <macro@imgtec.com>
3663
3664 * gdbarch.sh (objfile): Remove duplicate declaration.
3665 * gdbarch.h: Regenerate.
3666
3667 2017-10-03 Tom Tromey <tom@tromey.com>
3668
3669 * utils.c (internal_vproblem): Use string_vprintf.
3670
3671 2017-10-03 Tom Tromey <tom@tromey.com>
3672
3673 * printcmd.c (info_symbol_command): Use std::string.
3674
3675 2017-10-03 Tom Tromey <tom@tromey.com>
3676
3677 * top.c (gdb_safe_append_history): Use std::string.
3678
3679 2017-10-03 Tom Tromey <tom@tromey.com>
3680
3681 * event-top.c (stdin_event_handler): Update.
3682 * main.c (captured_main_1): Update.
3683 * top.h (make_delete_ui_cleanup): Remove.
3684 (struct ui): Add constructor and destructor.
3685 (new_ui, delete_ui): Remove.
3686 * top.c (make_delete_ui_cleanup): Remove.
3687 (new_ui_command): Use std::unique_ptr.
3688 (delete_ui_cleanup): Remove.
3689 (ui::ui): Rename from new_ui. Update.
3690 (free_ui): Remove.
3691 (ui::~ui): Rename from delete_ui. Update.
3692
3693 2017-10-03 Tom Tromey <tom@tromey.com>
3694
3695 * symfile.c (load_progress): Use gdb::byte_vector.
3696
3697 2017-10-03 Tom Tromey <tom@tromey.com>
3698
3699 * mi/mi-main.c (mi_cmd_trace_frame_collected): Remove unused
3700 declaration.
3701 * printcmd.c (x_command): Remove unused declaration.
3702 * symfile.c (symbol_file_command): Remove unused declaration.
3703
3704 2017-10-03 Tom Tromey <tom@tromey.com>
3705
3706 * utils.c (internal_vproblem): Use std::string.
3707 (defaulted_query): Likewise.
3708
3709 2017-10-03 Tom Tromey <tom@tromey.com>
3710
3711 * guile/scm-ports.c (ioscm_with_output_to_port_worker): Update.
3712 * top.c (execute_command_to_string): Update.
3713 * utils.c (make_cleanup_restore_page_info): Remove.
3714 (do_restore_page_info_cleanup): Remove.
3715 (set_batch_flag_and_restore_page_info):
3716 New.
3717 (make_cleanup_restore_page_info): Remove.
3718 (set_batch_flag_and_make_cleanup_restore_page_info): Remove.
3719 (~set_batch_flag_and_restore_page_info): New
3720 (make_cleanup_restore_uinteger): Remove.
3721 (make_cleanup_restore_integer): Remove.
3722 (struct restore_integer_closure): Remove.
3723 (restore_integer): Remove.
3724 * utils.h (struct set_batch_flag_and_restore_page_info): New
3725 class.
3726 (set_batch_flag_and_make_cleanup_restore_page_info): Remove.
3727 (make_cleanup_restore_page_info): Remove.
3728 (make_cleanup_restore_uinteger) Remove.
3729 (make_cleanup_restore_integer) Remove.
3730
3731 2017-10-03 Tom Tromey <tom@tromey.com>
3732
3733 * record-full.h (record_full_gdb_operation_disable_set): Return
3734 scoped_restore_tmpl<int>.
3735 * infrun.c (adjust_pc_after_break): Update.
3736 (handle_signal_stop): Update.
3737 * record-full.c (record_full_gdb_operation_disable_set): Return
3738 scoped_restore_tmpl<int>.
3739 (record_full_wait_1, record_full_insert_breakpoint)
3740 (record_full_remove_breakpoint, record_full_save)
3741 (record_full_goto_insn): Update.
3742
3743 2017-10-02 Tom Tromey <tom@tromey.com>
3744
3745 PR rust/22236:
3746 * rust-lang.c (rust_val_print_str): New function.
3747 (val_print_struct): Call it.
3748 (rust_subscript): Preserve name of slice type.
3749
3750 2017-10-02 Tom Tromey <tom@tromey.com>
3751
3752 * rust-lang.c (rust_subscript): Handle slices in
3753 EVAL_AVOID_SIDE_EFFECTS case.
3754
3755 2017-10-02 Tom Tromey <tom@tromey.com>
3756
3757 * rust-lang.c (rust_slice_type_p): Recognize &str as a slice type.
3758
3759 2017-10-02 Tom Tromey <tom@tromey.com>
3760
3761 * rust-lang.h (rust_slice_type): Add "extern".
3762
3763 2017-10-02 Tom Tromey <tom@tromey.com>
3764 Pedro Alves <palves@redhat.com>
3765
3766 * ada-lang.h (ada_exc_info::operator<): Make const.
3767 (ada_exc_info::operator==): Make const.
3768 * ada-lang.c (ada_exc_info::operator<, ada_exc_info::operator==):
3769 Make const.
3770
3771 2017-09-29 Tom Tromey <tom@tromey.com>
3772
3773 * target.c (read_whatever_is_readable): Change type of "result".
3774 Update.
3775 (free_memory_read_result_vector): Remove.
3776 (read_memory_robust): Change return type. Update.
3777 * mi/mi-main.c (mi_cmd_data_read_memory_bytes): Update. Use
3778 bin2hex, std::string.
3779 * target.h (memory_read_result_s): Remove typedef.
3780 (free_memory_read_result_vector): Remove.
3781 (read_memory_robust): Return std::vector.
3782
3783 2017-09-29 Tom Tromey <tom@tromey.com>
3784
3785 * mi/mi-main.c (captured_mi_execute_command): Use scope_restore.
3786
3787 2017-09-29 Tom Tromey <tom@tromey.com>
3788
3789 * mi/mi-cmd-info.c (mi_cmd_info_ada_exceptions): Update.
3790 * ada-lang.h (struct ada_exc_info): Remove typedef. Declare
3791 operator< and operator==.
3792 (ada_exceptions_list): Return a std::vector.
3793 * ada-lang.c (ada_exc_info::operator<): Rename from
3794 compare_ada_exception_info.
3795 (ada_exc_info::operator==): New.
3796 (sort_remove_dups_ada_exceptions_list): Change type of
3797 "exceptions".
3798 (ada_add_standard_exceptions, ada_add_exceptions_from_frame)
3799 (ada_add_global_exceptions): Likewise.
3800 (ada_exceptions_list_1): Return a std::vector.
3801 (ada_exceptions_list): Likewise.
3802
3803 2017-09-29 Tom Tromey <tom@tromey.com>
3804
3805 * mi/mi-main.c (struct print_one_inferior_data) <inferiors>: Now a
3806 'std::set *'.
3807 (print_one_inferior): Update.
3808 (free_vector_of_ints): Remove.
3809 (list_available_thread_groups): Change "ids" to std::set.
3810 (mi_cmd_list_thread_groups): Update.
3811 (struct collect_cores_data) <core>: Now a std::set.
3812 (collect_cores): Update.
3813 (unique): Remove.
3814 (print_one_inferior): Update.
3815
3816 2017-09-29 Tom Tromey <tom@tromey.com>
3817
3818 * mi/mi-main.c (mi_execute_cli_command): Use std::string.
3819 (mi_execute_async_cli_command): Likewise.
3820 (mi_cmd_trace_frame_collected): Use field_fmt.
3821
3822 2017-09-29 Tom Tromey <tom@tromey.com>
3823
3824 * mi/mi-main.c (mi_cmd_data_write_memory_bytes): Use
3825 gdb::byte_vector.
3826
3827 2017-09-29 Tom Tromey <tom@tromey.com>
3828
3829 * mi/mi-parse.c (mi_parse): Remove unused declaration.
3830
3831 2017-09-29 Tom Tromey <tom@tromey.com>
3832
3833 * mi/mi-cmd-disas.c (mi_cmd_disassemble): Don't copy "oarg".
3834
3835 2017-09-29 Tom Tromey <tom@tromey.com>
3836
3837 * varobj.h (varobj_gen_name): Return std::string.
3838 * varobj.c (varobj_gen_name): Return std::string.
3839 * mi/mi-cmd-var.c (mi_cmd_var_create): Use std::string.
3840 (mi_cmd_var_delete): Don't copy "name".
3841
3842 2017-09-29 Tom Tromey <tom@tromey.com>
3843
3844 * mi/mi-cmd-break.c (mi_argv_to_format): Return std::string.
3845 (mi_cmd_break_insert_1): Update.
3846
3847 2017-09-29 Tom Tromey <tom@tromey.com>
3848
3849 * target.h (make_scoped_defer_target_commit_resume): Update.
3850 * target.c (make_scoped_defer_target_commit_resume): Rename from
3851 make_cleanup_defer_target_commit_resume. Return a
3852 scoped_restore.
3853 * infrun.c (proceed): Use make_scoped_defer_target_commit_resume.
3854
3855 2017-09-29 Tom Tromey <tom@tromey.com>
3856
3857 * main.c (captured_main_1): Remove unused declaration.
3858 * spu-multiarch.c (parse_spufs_run): Remove unused declaration.
3859
3860 2017-09-29 Tom Tromey <tom@tromey.com>
3861
3862 * symtab.c (search_symbols): Remove unused outer cleanup.
3863 (make_source_files_completion_list): Remove unused declaration.
3864
3865 2017-09-29 Tom Tromey <tom@tromey.com>
3866
3867 * mt-tdep.c (mt_push_dummy_call): Use gdb::byte_vector.
3868
3869 2017-09-29 Tom Tromey <tom@tromey.com>
3870
3871 * xstormy16-tdep.c (xstormy16_push_dummy_call): Use
3872 gdb::byte_vector.
3873
3874 2017-09-29 Tom Tromey <tom@tromey.com>
3875
3876 * complaints.c (vcomplaint): Use std::string.
3877
3878 2017-09-29 Tom Tromey <tom@tromey.com>
3879
3880 * tracepoint.c (trace_variable_command): Use std::string.
3881 (encode_actions_1): Remove unused declarations.
3882 (create_tsv_from_upload): Use std::string.
3883
3884 2017-09-29 Tom Tromey <tom@tromey.com>
3885
3886 * cp-support.c (gdb_demangle): Use std::string.
3887
3888 2017-09-29 Tom Tromey <tom@tromey.com>
3889
3890 * stack.c (parse_frame_specification): Use std::string
3891 (info_frame_command): Use gdb::unique_xmalloc_ptr.
3892
3893 2017-09-29 Tom Tromey <tom@tromey.com>
3894
3895 * tilegx-tdep.c (tilegx_push_dummy_call): Use gdb::byte_vector.
3896
3897 2017-09-29 Tom Tromey <tom@tromey.com>
3898
3899 * utils.c (vfprintf_maybe_filtered): Use std::string.
3900 (vfprintf_unfiltered): Likewise.
3901
3902 2017-09-29 Tom Tromey <tom@tromey.com>
3903
3904 * event-top.c (top_level_prompt): Return std::string.
3905 (display_gdb_prompt): Update.
3906
3907 2017-09-29 Tom Tromey <tom@tromey.com>
3908
3909 * unittests/common-utils-selftests.c (format): New function.
3910 (string_vprintf_tests): New function.
3911 (_initialize_common_utils_selftests): Register new tests.
3912 * common/common-utils.c (string_vprintf): New function.
3913 * common/common-utils.h (string_vprintf): Declare.
3914
3915 2017-09-29 Pedro Alves <palves@redhat.com>
3916
3917 * common/rsp-low.c (unpack_varlen_hex): Constify.
3918 * common/rsp-low.h (unpack_varlen_hex): Constify.
3919 * linux-nat.c (linux_child_static_tracepoint_markers_by_strid):
3920 Constify.
3921 * remote.c (remote_set_permissions, read_ptid)
3922 (remote_current_thread, remote_get_threads_with_qthreadinfo)
3923 (remote_static_tracepoint_marker_at)
3924 (remote_static_tracepoint_markers_by_strid)
3925 (stop_reply_extract_thread, remote_parse_stop_reply): Constify.
3926 * tracepoint.c (parse_trace_status, parse_tracepoint_status)
3927 (parse_tracepoint_definition, parse_tsv_definition)
3928 (parse_static_tracepoint_marker_definition): Constify.
3929 * tracepoint.h (parse_static_tracepoint_marker_definition)
3930 (parse_trace_status, parse_tracepoint_status)
3931 (parse_tracepoint_definition, parse_tsv_definition): Constify.
3932
3933 2017-09-29 Pedro Alves <palves@redhat.com>
3934
3935 * remote.c (target_buf, target_buf_size): Delete.
3936 (remote_get_noisy_reply): Remove buf_p and sizeof_buf parameters.
3937 Use the connection's packet buffer instead.
3938 All callers adjusted.
3939 (_initialize_remote): Remove references to target_buf and
3940 target_buf_size.
3941
3942 2017-09-28 Pedro Alves <palves@redhat.com>
3943
3944 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
3945 unittests/common-utils-selftests.c.
3946 (SUBDIR_UNITTESTS_OBS): Add common-utils-selftests.o.
3947 (COMMON_OBS): Remove utils-selftests.o.
3948 * utils-selftests.c: Move to ...
3949 * unittests/common-utils-selftests.c: ... here and rename self
3950 test to "string_printf".
3951
3952 2017-09-28 Alexander Shaposhnikov <alexander.v.shaposhnikov@gmail.com> (tiny patch)
3953
3954 * dwarf2read.c (open_and_init_dwp_file): Protect against dwp_file
3955 having NULL cus or tus.
3956
3957 2017-09-27 Ulrich Weigand <uweigand@de.ibm.com>
3958
3959 * arm-tdep.c: (convert_from_extended): Remove.
3960 (convert_to_extended): Likewise.
3961 (arm_extract_return_value): Use convert_typed_floating.
3962 (arm_store_return_value): Likewise.
3963
3964 * sh-tdep.h (struct gdbarch_tdep): Add sh_littlebyte_bigword_type.
3965 * sh-tdep.c: Do not include "floatformat.h".
3966 (sh_littlebyte_bigword_type): New function.
3967 (sh_register_convert_to_virtual): Use convert_typed_floating.
3968 (sh_register_convert_to_raw): Likewise.
3969 * sh64-tdep.c: (struct gdbarch_tdep): Add sh_littlebyte_bigword_type.
3970 (sh64_littlebyte_bigword_type): New function.
3971 (sh64_extract_return_value): Use convert_typed_floating.
3972 (sh64_register_convert_to_virtual): Likewise.
3973 (sh64_register_convert_to_raw): Likewise.
3974
3975 2017-09-27 Ulrich Weigand <uweigand@de.ibm.com>
3976
3977 * doublest.h (floatformat_from_type): Move to gdbtypes.h.
3978 * doublest.c (floatformat_from_type): Move to gdbtypes.c.
3979
3980 * gdbtypes.h (union type_specific): Make field floatformat hold
3981 just a single struct floatformat, not an array.
3982 (floatformat_from_type): Move here.
3983 * gdbtypes.c (floatformat_from_type): Move here. Update to
3984 changed TYPE_FLOATFORMAT definition.
3985 (verify_floatformat): Update to changed TYPE_FLOATFORMAT.
3986 (recursive_dump_type): Likewise.
3987 (init_float_type): Install correct floatformat for byte order.
3988 (arch_float_type): Likewise.
3989
3990 2017-09-27 Ulrich Weigand <uweigand@de.ibm.com>
3991
3992 * gdbtypes.c (init_type): Change incoming argument from
3993 length-in-bytes to length-in-bits. Assert length is a
3994 multiple of TARGET_CHAR_BITS.
3995 (arch_type, arch_flags_type): Likewise.
3996 (init_integer_type): Update call to init_type.
3997 (init_character_type): Likewise.
3998 (init_boolean_type): Likewise.
3999 (init_float_type): Likewise.
4000 (init_decfloat_type): Likewise.
4001 (init_complex_type): Likewise.
4002 (init_pointer_type): Likewise.
4003 (objfile_type): Likewise.
4004 (arch_integer_type): Update call to arch_type.
4005 (arch_character_type): Likewise.
4006 (arch_boolean_type): Likewise.
4007 (arch_float_type): Likewise.
4008 (arch_decfloat_type): Likewise.
4009 (arch_complex_type): Likewise.
4010 (arch_pointer_type): Likewise.
4011 (gdbtypes_post_init): Likewise.
4012
4013 * dwarf2read.c (dwarf2_init_float_type): Update call to init_type.
4014 (read_base_type): Likewise.
4015 * mdebugread.c (basic_type): Likewise.
4016 * stabsread.c (dbx_init_float_type): Likewise.
4017 (rs6000_builtin_type): Likewise.
4018 (read_range_type): Likewise. Also, fix call to init_integer_type
4019 with erroneous length argument.
4020
4021 * ada-lang.c (ada_language_arch_info): Update call to arch_type.
4022 * d-lang.c (build_d_types): Likewise.
4023 * f-lang.c (build_fortran_types): Likewise.
4024 * go-lang.c (build_go_types): Likewise.
4025 * opencl-lang.c (build_opencl_types): Likewise.
4026 * jit.c (finalize_symtab): Likewise.
4027 * gnu-v3-abi.c (build_gdb_vtable_type): Likewise.
4028 (build_std_type_info_type): Likewise.
4029 * target-descriptions.c (tdesc_gdb_type): Likewise. Also,
4030 update call to arch_flags_type.
4031
4032 * linux-tdep.c (linux_get_siginfo_type_with_fields): Update call to
4033 arch_type.
4034 * fbsd-tdep.c (fbsd_get_siginfo_type): Likewise.
4035 * windows-tdep.c (windows_get_tlb_type): Likewise.
4036
4037 * avr-tdep.c (avr_gdbarch_init): Update call to arch_type.
4038 * ft32-tdep.c (ft32_gdbarch_init): Likewise.
4039 * m32c-tdep.c (make_types): Likewise.
4040 * rl78-tdep.c (rl78_gdbarch_init): Likewise.
4041 (rl78_psw_type): Update call to arch_flags_type.
4042 * m68k-tdep.c (m68k_ps_type): Update call to arch_flags_type.
4043 * rx-tdep.c (rx_psw_type): Likewise.
4044 (rx_fpsw_type): Likewise.
4045 * sparc-tdep.c (sparc_psr_type): Likewise.
4046 (sparc_fsr_type): Likewise.
4047 * sparc64-tdep.c (sparc64_pstate_type): Likewise.
4048 (sparc64_ccr_type): Likewise.
4049 (sparc64_fsr_type): Likewise.
4050 (sparc64_fprs_type): Likewise.
4051
4052 2017-09-27 Tom Tromey <tom@tromey.com>
4053
4054 * findcmd.c (find_command): Constify.
4055
4056 2017-09-27 Tom Tromey <tom@tromey.com>
4057
4058 * ada-tasks.c (task_command_1, task_command): Constify.
4059
4060 2017-09-27 Tom Tromey <tom@tromey.com>
4061
4062 * symtab.c (maintenance_print_symbol_cache)
4063 (maintenance_flush_symbol_cache)
4064 (maintenance_print_symbol_cache_statistics): Constify.
4065
4066 2017-09-27 Tom Tromey <tom@tromey.com>
4067
4068 * inferior.c (detach_inferior_command, kill_inferior_command)
4069 (inferior_command): Constify.
4070
4071 2017-09-27 Tom Tromey <tom@tromey.com>
4072
4073 * regcache.c (regcache_print, maintenance_print_registers)
4074 (maintenance_print_raw_registers)
4075 (maintenance_print_cooked_registers)
4076 (maintenance_print_register_groups)
4077 (maintenance_print_remote_registers): Constify.
4078
4079 2017-09-27 Tom Tromey <tom@tromey.com>
4080
4081 * printcmd.c (map_display_numbers, undisplay_command)
4082 (enable_disable_display_command, enable_display_command)
4083 (disable_display_command): Constify.
4084
4085 2017-09-27 Tom Tromey <tom@tromey.com>
4086
4087 * breakpoint.h (delete_command): Don't declare.
4088 * breakpoint.c (delete_command, enable_once_command)
4089 (enable_count_command, enable_delete_command, breakpoint_1)
4090 (maintenance_info_breakpoints, stopin_command, stopat_command)
4091 (delete_command, delete_trace_command, save_breakpoints)
4092 (save_breakpoints_command, save_tracepoints_command): Constify.
4093
4094 2017-09-27 Tom Tromey <tom@tromey.com>
4095
4096 * macrocmd.c (macro_expand_command, macro_expand_once_command)
4097 (skip_ws, extract_identifier, macro_define_command)
4098 (macro_undef_command, macro_list_command): Constify.
4099
4100 2017-09-27 Tom Tromey <tom@tromey.com>
4101
4102 * infcmd.c (environment_info, set_environment_command)
4103 (unset_environment_command, path_info, info_proc_cmd_1)
4104 (info_proc_cmd_mappings, info_proc_cmd_stat)
4105 (info_proc_cmd_status, info_proc_cmd_cwd, info_proc_cmd_cmdline)
4106 (info_proc_cmd_exe, info_proc_cmd_all): Constify.
4107
4108 2017-09-27 Tom Tromey <tom@tromey.com>
4109
4110 * i386-tdep.c (i386_mpx_info_bounds, i386_mpx_set_bounds):
4111 Constify.
4112
4113 2017-09-27 Tom Tromey <tom@tromey.com>
4114
4115 * symfile-mem.c (add_symbol_file_from_memory_command): Constify.
4116
4117 2017-09-27 Tom Tromey <tom@tromey.com>
4118
4119 * demangle.c (demangle_command): Constify.
4120
4121 2017-09-27 Tom Tromey <tom@tromey.com>
4122
4123 * progspace.c (maintenance_info_program_spaces_command):
4124 Constify.
4125
4126 2017-09-27 Tom Tromey <tom@tromey.com>
4127
4128 * compile/compile.c (check_raw_argument, compile_file_command)
4129 (compile_code_command, compile_print_command): Constify.
4130
4131 2017-09-27 Tom Tromey <tom@tromey.com>
4132
4133 * reggroups.c (maintenance_print_reggroups): Constify.
4134
4135 2017-09-27 Tom Tromey <tom@tromey.com>
4136
4137 * dwarf2read.c (save_gdb_index_command): Constify.
4138
4139 2017-09-27 Tom Tromey <tom@tromey.com>
4140
4141 * stap-probe.c (info_probes_stap_command): Constify.
4142
4143 2017-09-27 Tom Tromey <tom@tromey.com>
4144
4145 * fork-child.c (unset_exec_wrapper_command): Constify.
4146
4147 2017-09-27 Tom Tromey <tom@tromey.com>
4148
4149 * btrace.c (get_uint, get_context_size, no_chunk)
4150 (maint_btrace_packet_history_cmd)
4151 (maint_btrace_clear_packet_history_cmd, maint_btrace_clear_cmd)
4152 (maint_info_btrace_cmd): Constify.
4153
4154 2017-09-27 Tom Tromey <tom@tromey.com>
4155
4156 * reverse.c (delete_bookmark_command): Constify.
4157
4158 2017-09-27 Tom Tromey <tom@tromey.com>
4159
4160 * remote.c (set_memory_packet_size)
4161 (set_memory_write_packet_size, show_memory_write_packet_size)
4162 (set_memory_read_packet_size, show_memory_read_packet_size)
4163 (compare_sections_command, packet_command, remote_put_command)
4164 (remote_get_command, remote_delete_command): Constify.
4165
4166 2017-09-27 Tom Tromey <tom@tromey.com>
4167
4168 * mips-tdep.c (show_mipsfpu_command, set_mipsfpu_single_command)
4169 (set_mipsfpu_double_command, set_mipsfpu_none_command)
4170 (set_mipsfpu_auto_command): Constify.
4171
4172 2017-09-27 Tom Tromey <tom@tromey.com>
4173
4174 * cli/cli-cmds.h (cd_command): Constify.
4175 * cli/cli-cmds.c (cd_command): Constify.
4176
4177 2017-09-27 Tom Tromey <tom@tromey.com>
4178
4179 * thread.c (thread_name_command, thread_find_command): Constify.
4180
4181 2017-09-27 Tom Tromey <tom@tromey.com>
4182
4183 * probe.c (enable_probes_command, disable_probes_command):
4184 Constify.
4185
4186 2017-09-27 Tom Tromey <tom@tromey.com>
4187
4188 * symfile.c (symbol_file_command): Constify.
4189 * gdbcore.h (deprecated_file_changed_hook): Constify.
4190 * exec.c (deprecated_file_changed_hook, exec_file_command)
4191 (file_command): Constify.
4192 * defs.h (symbol_file_command): Constify.
4193
4194 2017-09-27 Tom Tromey <tom@tromey.com>
4195
4196 * remote-fileio.c (set_system_call_allowed)
4197 (show_system_call_allowed): Constify.
4198
4199 2017-09-27 Tom Tromey <tom@tromey.com>
4200
4201 * tracepoint.c (delete_trace_variable_command)
4202 (tfind_end_command, tfind_start_command, tfind_pc_command)
4203 (tfind_tracepoint_command, tfind_line_command)
4204 (tfind_range_command, tfind_outside_command): Constify.
4205
4206 2017-09-27 Tom Tromey <tom@tromey.com>
4207
4208 * ax-gdb.c (maint_agent_printf_command, agent_command)
4209 (agent_eval_command): Constify.
4210
4211 2017-09-27 Tom Tromey <tom@tromey.com>
4212
4213 * tracepoint.c (info_scope_command): Constify.
4214 * python/python.c (gdbpy_decode_line): Constify.
4215 * python/py-breakpoint.c (bppy_init): Constify.
4216 * mi/mi-cmd-break.c (mi_cmd_break_insert_1): Constify.
4217 * location.h: (new_linespec_location)
4218 (string_to_event_location_basic, string_to_event_location):
4219 Constify.
4220 * location.c (new_linespec_location)
4221 (string_to_event_location_basic, string_to_event_location):
4222 Constify.
4223 * linespec.h (decode_line_with_current_source)
4224 (decode_line_with_last_displayed, linespec_lex_to_end): Constify.
4225 * linespec.c (linespec_lex_to_end)
4226 (decode_line_with_current_source)
4227 (decode_line_with_last_displayed): Constify.
4228 * guile/scm-breakpoint.c (gdbscm_register_breakpoint_x):
4229 Constify.
4230 * cli/cli-cmds.c (edit_command, list_command): Constify.
4231 * breakpoint.h (until_break_command, watch_command_wrapper)
4232 (awatch_command_wrapper, rwatch_command_wrapper)
4233 (init_ada_exception_breakpoint): Constify.
4234 * breakpoint.c (break_command_1, dprintf_command)
4235 (break_range_command, watch_command_wrapper)
4236 (rwatch_command_wrapper, awatch_command_wrapper)
4237 (until_break_command, init_ada_exception_breakpoint)
4238 (strace_marker_create_sals_from_location, trace_command)
4239 (ftrace_command, strace_command, struct tracepoint): Constify.
4240 * ax-gdb.c (agent_command_1): Constify.
4241 * ada-lang.c (ada_exception_sal): Constify.
4242
4243 2017-09-27 Tom Tromey <tom@tromey.com>
4244
4245 * record.c (cmd_record_delete, cmd_record_stop, cmd_record_save)
4246 (cmd_record_goto_begin, cmd_record_goto_end, get_insn_number)
4247 (get_context_size, no_chunk, get_insn_history_modifiers)
4248 (cmd_record_insn_history, get_call_history_modifiers)
4249 (cmd_record_call_history): Constify.
4250
4251 2017-09-27 Tom Tromey <tom@tromey.com>
4252
4253 * source.c (show_substitute_path_command)
4254 (unset_substitute_path_command, set_substitute_path_command):
4255 Constify.
4256
4257 2017-09-27 Tom Tromey <tom@tromey.com>
4258
4259 * typeprint.c (maintenance_print_type): Constify.
4260 * maint.c (maintenance_dump_me, maintenance_demangle)
4261 (maintenance_time_display, maintenance_info_sections)
4262 (maintenance_print_statistics, maintenance_deprecate)
4263 (maintenance_undeprecate): Constify.
4264 (maintenance_do_deprecate): Constify. Use std::string.
4265 (maintenance_selftest): Constify.
4266 * gdbtypes.h (maintenance_print_type): Constify.
4267
4268 2017-09-27 Tom Tromey <tom@tromey.com>
4269
4270 * hppa-tdep.c (unwind_command): Constify.
4271
4272 2017-09-27 Tom Tromey <tom@tromey.com>
4273
4274 * target-descriptions.c (unset_tdesc_filename_cmd)
4275 (maint_print_c_tdesc_cmd, maintenance_check_xml_descriptions):
4276 Constify.
4277
4278 2017-09-27 Tom Tromey <tom@tromey.com>
4279
4280 * dummy-frame.c (maintenance_print_dummy_frames): Constify.
4281
4282 2017-09-27 Tom Tromey <tom@tromey.com>
4283
4284 * tui/tui.c (tui_enable_command, tui_disable_command): Constify.
4285
4286 2017-09-27 Tom Tromey <tom@tromey.com>
4287
4288 * tui/tui-regs.c (tui_reg_command): Constify.
4289
4290 2017-09-27 Tom Tromey <tom@tromey.com>
4291
4292 * skip.c (skip_file_command, skip_function_command)
4293 (skip_enable_command, skip_disable_command, skip_delete_command):
4294 Constify.
4295
4296 2017-09-27 Tom Tromey <tom@tromey.com>
4297
4298 * record-btrace.c (cmd_record_btrace_bts_start)
4299 (cmd_record_btrace_pt_start): Constify.
4300
4301 2017-09-27 Tom Tromey <tom@tromey.com>
4302
4303 * symmisc.c (maintenance_print_symbols)
4304 (maintenance_print_msymbols, maintenance_print_objfiles)
4305 (maintenance_info_symtabs, maintenance_check_symtabs)
4306 (maintenance_expand_symtabs, maintenance_info_line_tables):
4307 Constify.
4308
4309 2017-09-27 Tom Tromey <tom@tromey.com>
4310
4311 * top.c (new_ui_command): Constify.
4312
4313 2017-09-27 Tom Tromey <tom@tromey.com>
4314
4315 * symfile.c (add_symbol_file_command)
4316 (remove_symbol_file_command, list_overlays_command)
4317 (map_overlay_command, unmap_overlay_command)
4318 (overlay_auto_command, overlay_manual_command)
4319 (overlay_off_command, overlay_load_command): Constify.
4320
4321 2017-09-27 Tom Tromey <tom@tromey.com>
4322
4323 * spu-tdep.c (info_spu_event_command, info_spu_signal_command)
4324 (info_spu_mailbox_command, info_spu_dma_command)
4325 (info_spu_proxydma_command): Constify.
4326
4327 2017-09-27 Tom Tromey <tom@tromey.com>
4328
4329 * cli/cli-logging.c (set_logging_on, set_logging_off): Constify.
4330
4331 2017-09-27 Tom Tromey <tom@tromey.com>
4332
4333 * cli/cli-script.c (user_defined_command): Constify.
4334
4335 2017-09-27 Tom Tromey <tom@tromey.com>
4336
4337 * cli/cli-dump.c (dump_memory_command, dump_value_command)
4338 (dump_srec_memory, dump_srec_value, dump_ihex_memory)
4339 (dump_ihex_value, dump_verilog_memory, dump_verilog_value)
4340 (dump_tekhex_memory, dump_tekhex_value, dump_binary_memory)
4341 (dump_binary_value, append_binary_memory, append_binary_value):
4342 Constify.
4343 (struct dump_context) <func>: Constify.
4344 (add_dump_command): Update.
4345
4346 2017-09-27 Tom Tromey <tom@tromey.com>
4347
4348 * cli/cli-cmds.c (show_version, show_configuration)
4349 (source_command, show_user): Constify.
4350
4351 2017-09-27 Tom Tromey <tom@tromey.com>
4352
4353 * target.c (maintenance_print_target_stack): Constify.
4354
4355 2017-09-27 Tom Tromey <tom@tromey.com>
4356
4357 * interps.c (interpreter_exec_cmd): Constify.
4358
4359 2017-09-27 Tom Tromey <tom@tromey.com>
4360
4361 * record-full.c (cmd_record_full_restore): Constify.
4362
4363 2017-09-27 Tom Tromey <tom@tromey.com>
4364
4365 * memattr.c (enable_mem_command, disable_mem_command)
4366 (delete_mem_command): Constify.
4367
4368 2017-09-27 Tom Tromey <tom@tromey.com>
4369
4370 * value.c (show_convenience): Constify.
4371
4372 2017-09-27 Tom Tromey <tom@tromey.com>
4373
4374 * gdbcore.h (core_file_command): Update.
4375 * corefile.c (core_file_command): Constify.
4376
4377 2017-09-27 Tom Tromey <tom@tromey.com>
4378
4379 * user-regs.c (maintenance_print_user_registers): Constify.
4380
4381 2017-09-27 Tom Tromey <tom@tromey.com>
4382
4383 * cp-namespace.c (maintenance_cplus_namespace): Constify.
4384
4385 2017-09-27 Tom Tromey <tom@tromey.com>
4386
4387 * cp-support.c (first_component_command): Constify.
4388
4389 2017-09-27 Tom Tromey <tom@tromey.com>
4390
4391 * psymtab.c (maintenance_print_psymbols)
4392 (maintenance_info_psymtabs, maintenance_check_psymtabs):
4393 Constify.
4394
4395 2017-09-27 Tom Tromey <tom@tromey.com>
4396
4397 * windows-tdep.c (display_tib): Constify.
4398
4399 2017-09-27 Tom Tromey <tom@tromey.com>
4400
4401 * linux-fork.c (delete_checkpoint_command)
4402 (detach_checkpoint_command): Constify.
4403
4404 2017-09-27 Tom Tromey <tom@tromey.com>
4405
4406 * cp-abi.c (set_cp_abi_cmd, show_cp_abi_cmd): Constify.
4407
4408 2017-09-27 Tom Tromey <tom@tromey.com>
4409
4410 * arc-tdep.c (dump_arc_instruction_command): Constify.
4411
4412 2017-09-27 Tom Tromey <tom@tromey.com>
4413
4414 * valprint.c (set_radix, show_radix): Constify.
4415
4416 2017-09-27 Tom Tromey <tom@tromey.com>
4417
4418 * dtrace-probe.c (info_probes_dtrace_command): Constify.
4419
4420 2017-09-27 Tom Tromey <tom@tromey.com>
4421
4422 * command.h (not_just_help_class_command): Update.
4423 * cli/cli-decode.h (not_just_help_class_command): Update.
4424 * cli/cli-decode.c (not_just_help_class_command): Constify.
4425
4426 2017-09-27 Tom Tromey <tom@tromey.com>
4427
4428 * gdb_bfd.c (maintenance_info_bfds): Constify.
4429
4430 2017-09-27 Tom Tromey <tom@tromey.com>
4431
4432 * cli/cli-decode.c (add_cmd, set_cmd_cfunc): New function
4433 overloads.
4434 (do_add_cmd): Rename from add_cmd. Don't call set_cmd_cfunc.
4435 (do_const_cfunc): New function.
4436 (cmd_cfunc_eq): New overload.
4437 (cli_user_command_p): Check do_const_cfunc.
4438 * cli/cli-decode.h (struct cmd_list_element) <function>: New field
4439 const_cfunc.
4440 * command.h (add_cmd): Add const overload and no-function
4441 overload.
4442 (set_cmd_cfunc): Add const overload.
4443 (cmd_const_cfunc_ftype): Declare.
4444 (cmd_cfunc_eq): Add const overload.
4445 * breakpoint.c, cli-cmds.c, cli-dump.c, guile/scm-cmd.c,
4446 python/py-cmd.c, target.c, tracepoint.c: Use no-function add_cmd
4447 overload.
4448
4449 2017-09-27 Tom Tromey <tom@tromey.com>
4450
4451 * macroexp.c (get_next_token_for_substitution): New function.
4452 (substitute_args): Call it. Check for __VA_OPT__.
4453
4454 2017-09-26 Walfred Tedeschi <walfred.tedeschi@intel.com>
4455 Pedro Alves <palves@redhat.com>
4456
4457 * dwarf2read.c (dwarf2_cu): Remove field producer_is_icc and add
4458 producer_is_icc_lt_14.
4459 (producer_is_icc_lt_14): New function.
4460 (check_producer): Add code for checking version of ICC.
4461 (producer_is_icc): Move to producer.c.
4462 (read_structure_type): Restrict ICC workaround to ICC<14.
4463 * producer.c: Include selftest.h.
4464 (producer_is_icc, producer_parsing_tests, _initialize_producer):
4465 New functions.
4466 * producer.h (producer_is_icc): New declaration.
4467
4468 2017-09-26 Walfred Tedeschi <walfred.tedeschi@intel.com>
4469
4470 * Makefile.in (SFILES): Add producer.c.
4471 (COMMON_OBS): Add producer.o
4472 * amd64-tdep.c (producer.h): Add new include.
4473 * dwarf2read.c (producer.h): Add new include.
4474 * producer.c: New file.
4475 * producer.h: New file.
4476 * utils.c (producer_is_gcc, producer_is_gcc_ge_4): Move to
4477 producer.c.
4478 * utils.h (producer_is_gcc, producer_is_gcc_ge_4): Move to
4479 producer.h.
4480
4481 2017-09-26 Matthias Klose <doko@ubuntu.com>
4482
4483 * configure.ac: Search ncursesw before ncurses.
4484 Check ncursesw/ncurses.h before ncurses/ncurses.h.
4485 * gdb_curses.h: Include <ncursesw/ncurses.h>
4486 * config.in, configure: Regenerate.
4487
4488 2017-09-26 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
4489
4490 PR gdb/22185
4491 * configure.host <*-*-solaris2.[01], *-*-solaris2.[2-9]*>: Mark as
4492 obsolete.
4493 Use gdb_host sol2 for i[34567]86-*-solaris2*, x86_64-*-solaris2*.
4494 Remove i386sol2 support.
4495 * configure.nat <i386sol2>: Remove.
4496 <sol2-64>: Fold into ...
4497 <sol2>: ... this.
4498 Move common settings to default section.
4499 Add sol-thread.o.
4500 * configure.tgt <i[34567]86-*-solaris2.1[0-9]*,
4501 x86_64-*-solaris2.1[0-9]*>: Rename to ...
4502 <i[34567]86-*-solaris2*, x86_64-*-solaris2*>: ... this.
4503 <i[34567]86-*-solaris*>: Remove.
4504 <sparc-*-solaris2.[0-6], sparc-*-solaris2.[0-6].*>: Remove.
4505
4506 * configure.ac: Remove wctype in libw check.
4507 (_MSE_INT_H): Don't define on Solaris 7-9.
4508 <solaris*>: Remove libthread_db.so.1 check.
4509 * configure: Regenerate.
4510 * config.in: Regenerate.
4511
4512 * proc-service.c: Remove PROC_SERVICE_IS_OLD handling.
4513 (gdb_ps_prochandle_t, gdb_ps_read_buf_t, gdb_ps_write_buf_t)
4514 (gdb_ps_size_t): Remove.
4515 Use base types in users.
4516 * sol-thread.c: Likewise, also for gdb_ps_addr_t.
4517
4518 * NEWS (Changes since GDB 8.0): Document Solaris 2.0-9 removal.
4519
4520 2017-09-26 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
4521
4522 PR build/22206
4523 * sparc64-tdep.c (adi_tag_fd): Print pid as long.
4524 (adi_is_addr_mapped): Likewise.
4525 (PSR_ICC): Don't redefine.
4526 (PSR_IMPL): Likewise.
4527
4528 2017-09-25 Tom Tromey <tom@tromey.com>
4529
4530 * regcache.c (regcache::dump): Use string_printf.
4531
4532 2017-09-25 Tom Tromey <tom@tromey.com>
4533
4534 * regcache.c (class regcache_invalidator): New.
4535 (struct register_to_invalidate): Remove.
4536 (make_cleanup_regcache_invalidate): Remove.
4537 (regcache::raw_write): Use regcache_invalidator.
4538
4539 2017-09-25 Tom Tromey <tom@tromey.com>
4540
4541 * spu-tdep.c (spu2ppu_sniffer): Update.
4542 * regcache.h (make_cleanup_regcache_xfree): Don't declare.
4543 * regcache.c (do_regcache_xfree, make_cleanup_regcache_xfree):
4544 Remove.
4545 * ppc-linux-tdep.c (ppu2spu_sniffer): Update.
4546 * mi/mi-main.c (mi_cmd_data_list_changed_registers): Update.
4547 * frame.h (frame_save_as_regcache): Return std::unique_ptr.
4548 * frame.c (frame_save_as_regcache): Return std::unique_ptr.
4549 (frame_pop): Update.
4550
4551 2017-09-25 Tom Tromey <tom@tromey.com>
4552
4553 * spu-tdep.c (spu2ppu_dealloc_cache): Use delete.
4554 * regcache.h (regcache_xfree): Don't declare.
4555 * regcache.c (regcache_xfree): Remove.
4556 (do_regcache_xfree): Use delete.
4557 * ppc-linux-tdep.c (ppu2spu_dealloc_cache): Use delete.
4558 * linux-fork.c (free_fork): Use delete.
4559 (fork_save_infrun_state): Likewise.
4560 * jit.c (jit_dealloc_cache): Use delete.
4561 * infrun.c (discard_infcall_suspend_state): Use delete.
4562
4563 2017-09-25 Tom Tromey <tom@tromey.com>
4564
4565 * regcache.h (regcache_xmalloc): Don't declare.
4566 (regcache_raw_set_cached_value): Update comment.
4567 * regcache.c (regcache_xmalloc): Remove.
4568 * ppc-linux-tdep.c (ppu2spu_sniffer): Use new.
4569 * jit.c (jit_frame_sniffer): Use new.
4570 * frame.c (frame_save_as_regcache): Use new.
4571
4572 2017-09-25 Andreas Arnez <arnez@linux.vnet.ibm.com>
4573
4574 * NEWS: Advertise support for guarded-storage registers on IBM z.
4575
4576 2017-09-25 Andreas Arnez <arnez@linux.vnet.ibm.com>
4577
4578 * s390-linux-nat.c (have_regset_gs): New static variable.
4579 (s390_linux_fetch_inferior_registers): Handle guarded-storage
4580 control block and guarded-storage broadcast control regsets.
4581 (s390_read_description): Detect whether the target has
4582 guarded-storage support, return appropriate tdesc.
4583 * s390-linux-tdep.c (features/s390-gs-linux64.c): New include.
4584 (features/s390x-gs-linux64.c): Likewise.
4585 (struct gdbarch_tdep) <have_gs>: New field.
4586 (s390_regmap_gs, s390_regmap_gsbc, s390_gs_regset)
4587 (s390_gsbc_regset): New variables.
4588 (s390_iterate_over_regset_sections): Iterate over s390_gs_regset
4589 and s390_gsbc_regset, if applicable.
4590 (s390_core_read_description): Check whether core file was from a
4591 target with guarded-storage support; include appropriate regsets.
4592 (s390_gdbarch_init): Add registers for guarded-storage support.
4593 (_initialize_s390_tdep): Initialize new target descriptions that
4594 include registers for guarded-storage support.
4595 * s390-linux-tdep.h (HWCAP_S390_GS, S390_GSD_REGNUM)
4596 (S390_GSSM_REGNUM, S390_GSEPLA_REGNUM)
4597 (S390_BC_GSD_REGNUM, S390_BC_GSSM_REGNUM): New defines.
4598 (S390_NUM_REGS): Adjust macro definition.
4599 (s390_gs_regset, s390_gsbc_regset, tdesc_s390_gs_linux64)
4600 (tdesc_s390x_gs_linux64): New declarations.
4601
4602 2017-09-25 Andreas Arnez <arnez@linux.vnet.ibm.com>
4603
4604 * features/s390-gs-linux64.xml: New file.
4605 * features/s390-gs.xml: New file.
4606 * features/s390-gsbc.xml: New file.
4607 * features/s390x-gs-linux64.xml: New file.
4608 * features/Makefile (WHICH): Add s390-gs-linux64 and
4609 s390x-gs-linux64.
4610 (s390-gs-linux64-expedite, s390x-gs-linux64-expedite): New macros.
4611 (XMLTOC): Add s390-gs-linux64.xml and s390x-linux64.xml.
4612 * features/s390-gs-linux64.c: New generated file.
4613 * features/s390x-gs-linux64.c: New file.
4614 * regformats/s390-gs-linux64.dat: New file.
4615 * regformats/s390x-gs-linux64.dat: New file.
4616
4617 2017-09-23 Tom Tromey <tom@tromey.com>
4618
4619 * defs.h (make_cleanup_override_quit_handler): Don't declare.
4620
4621 2017-09-22 Tom Tromey <tom@tromey.com>
4622
4623 * utils.c (class scoped_input_handler) <m_quit_handler>: Change
4624 type to scoped_restore_tmpl.
4625 <scoped_input_handler>: Initialize m_quit_handler directly.
4626
4627 2017-09-22 Sergio Durigan Junior <sergiodj@redhat.com>
4628
4629 * cli/cli-cmds.c (pwd_command): Use "getcwd (NULL, 0)".
4630 (cd_command): Likewise. Free "current_directory" before
4631 assigning to it.
4632 * main.c (captured_main_1): Use "getcwd (NULL, 0)".
4633 * mi/mi-cmd-env.c (mi_cmd_env_pwd): Likewise.
4634 * top.c (gdb_dirbuf): Remove global declaration.
4635 * top.h (gdb_dirbuf): Likewise.
4636
4637 2017-09-22 Sergio Durigan Junior <sergiodj@redhat.com>
4638
4639 * gnulib/aclocal.m4: Regenerate.
4640 * gnulib/config.in: Regenerate.
4641 * gnulib/configure: Regenerate.
4642 * gnulib/import/Makefile.am: Regenerate.
4643 * gnulib/import/Makefile.in: Regenerate.
4644 * gnulib/import/assure.h: New file.
4645 * gnulib/import/at-func.c: Likewise
4646 * gnulib/import/chdir-long.c: New file.
4647 * gnulib/import/chdir-long.h: New file.
4648 * gnulib/import/cloexec.c: New file.
4649 * gnulib/import/cloexec.h: New file.
4650 * gnulib/import/close.c: New file.
4651 * gnulib/import/closedir.c: New file.
4652 * gnulib/import/dirent-private.h: New file.
4653 * gnulib/import/dup-safer.c: New file.
4654 * gnulib/import/dup.c: New file.
4655 * gnulib/import/dup2.c: New file.
4656 * gnulib/import/error.c: New file.
4657 * gnulib/import/error.h: New file.
4658 * gnulib/import/exitfail.c: New file.
4659 * gnulib/import/exitfail.h: New file.
4660 * gnulib/import/fchdir.c: New file.
4661 * gnulib/import/fcntl.c: New file.
4662 * gnulib/import/fcntl.in.h: New file.
4663 * gnulib/import/fd-hook.c: New file.
4664 * gnulib/import/fd-hook.h: New file.
4665 * gnulib/import/fd-safer.c: New file.
4666 * gnulib/import/fdopendir.c: New file.
4667 * gnulib/import/filename.h: New file.
4668 * gnulib/import/filenamecat-lgpl.c: New file.
4669 * gnulib/import/filenamecat.h: New file.
4670 * gnulib/import/fstat.c: New file.
4671 * gnulib/import/fstatat.c: New file.
4672 * gnulib/import/getcwd-lgpl.c: New file.
4673 * gnulib/import/getcwd.c: New file.
4674 * gnulib/import/getdtablesize.c: New file.
4675 * gnulib/import/getlogin_r.c: New file.
4676 * gnulib/import/getprogname.c: New file.
4677 * gnulib/import/getprogname.h: New file.
4678 * gnulib/import/gettext.h: New file.
4679 * gnulib/import/glob-libc.h: New file.
4680 * gnulib/import/glob.c: New file.
4681 * gnulib/import/glob.in.h: New file.
4682 * gnulib/import/intprops.h: New file.
4683 * gnulib/import/m4/chdir-long.m4: New file.
4684 * gnulib/import/m4/close.m4: New file.
4685 * gnulib/import/m4/closedir.m4: New file.
4686 * gnulib/import/m4/d-ino.m4: New file.
4687 * gnulib/import/m4/d-type.m4: New file.
4688 * gnulib/import/m4/dup.m4: New file.
4689 * gnulib/import/m4/dup2.m4: New file.
4690 * gnulib/import/m4/error.m4: New file.
4691 * gnulib/import/m4/fchdir.m4: New file.
4692 * gnulib/import/m4/fcntl.m4: New file.
4693 * gnulib/import/m4/fcntl_h.m4: New file.
4694 * gnulib/import/m4/fdopendir.m4: New file.
4695 * gnulib/import/m4/filenamecat.m4: New file.
4696 * gnulib/import/m4/fstat.m4: New file.
4697 * gnulib/import/m4/fstatat.m4: New file.
4698 * gnulib/import/m4/getcwd-abort-bug.m4: New file.
4699 * gnulib/import/m4/getcwd-path-max.m4: New file.
4700 * gnulib/import/m4/getcwd.m4: New file.
4701 * gnulib/import/m4/getdtablesize.m4: New file.
4702 * gnulib/import/m4/getlogin_r.m4: New file.
4703 * gnulib/import/m4/getprogname.m4: New file.
4704 * gnulib/import/m4/glob.m4: New file.
4705 * gnulib/import/m4/gnulib-cache.m4: Regenerate.
4706 * gnulib/import/m4/gnulib-comp.m4: Regenerate.
4707 * gnulib/import/m4/mempcpy.m4: New file.
4708 * gnulib/import/m4/memrchr.m4: New file.
4709 * gnulib/import/m4/mode_t.m4: New file.
4710 * gnulib/import/m4/msvc-inval.m4: New file.
4711 * gnulib/import/m4/msvc-nothrow.m4: New file.
4712 * gnulib/import/m4/open.m4: New file.
4713 * gnulib/import/m4/openat.m4: New file.
4714 * gnulib/import/m4/opendir.m4: New file.
4715 * gnulib/import/m4/readdir.m4: New file.
4716 * gnulib/import/m4/realloc.m4: New file.
4717 * gnulib/import/m4/rewinddir.m4: New file.
4718 * gnulib/import/m4/save-cwd.m4: New file.
4719 * gnulib/import/m4/strdup.m4: New file.
4720 * gnulib/import/m4/strerror.m4: New file.
4721 * gnulib/import/m4/unistd-safer.m4: New file.
4722 * gnulib/import/mempcpy.c: New file.
4723 * gnulib/import/memrchr.c: New file.
4724 * gnulib/import/msvc-inval.c: New file.
4725 * gnulib/import/msvc-inval.h: New file.
4726 * gnulib/import/msvc-nothrow.c: New file.
4727 * gnulib/import/msvc-nothrow.h: New file.
4728 * gnulib/import/open.c: New file.
4729 * gnulib/import/openat-die.c: New file.
4730 * gnulib/import/openat-priv.h: New file.
4731 * gnulib/import/openat-proc.c: New file.
4732 * gnulib/import/openat.c: New file.
4733 * gnulib/import/openat.h: New file.
4734 * gnulib/import/opendir.c: New file.
4735 * gnulib/import/pipe-safer.c: New file.
4736 * gnulib/import/readdir.c: New file.
4737 * gnulib/import/realloc.c: New file.
4738 * gnulib/import/rewinddir.c: New file.
4739 * gnulib/import/save-cwd.c: New file.
4740 * gnulib/import/save-cwd.h: New file.
4741 * gnulib/import/strdup.c: New file.
4742 * gnulib/import/strerror-override.c: New file.
4743 * gnulib/import/strerror-override.h: New file.
4744 * gnulib/import/strerror.c: New file.
4745 * gnulib/import/unistd--.h: New file.
4746 * gnulib/import/unistd-safer.h: New file.
4747 * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add
4748 "getcwd" and "glob".
4749 * ser-tcp.c: Undefine "close" before redefining it.
4750
4751 2017-09-21 Simon Marchi <simon.marchi@ericsson.com>
4752
4753 * guile/scm-value.c (gdbscm_value_address): Initialize address,
4754 get rid of res_val.
4755
4756 2017-09-22 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
4757
4758 * configure.nat <i386sol2,i386>: Add fork-inferior.o to NATDEPFILES.
4759 <sol2,sparc>: Likewise.
4760 <sol2-64,i386>: Likewise.
4761
4762 * warning.m4 (AM_GDB_WARNINGS): Disable -Wunknown-pragmas,
4763 -Wdeprecated-declarations on *-*-solaris*.
4764 * configure: Regenerate.
4765
4766 * procfs.c: Include "nat/inferior.h".
4767 (procfs_info_proc): Fix typo.
4768
4769 2017-09-21 Kevin Buettner <kevinb@redhat.com>
4770
4771 * remote.c (vector): Include.
4772 (struct private_thread_info): Add field, thread_handle.
4773 (free_private_thread_info): Deallocate storage associated with
4774 thread handle.
4775 (get_private_info_thread): Initialize `thread_handle' field.
4776 (struct thread_item): Add field, thread_handle.
4777 (clear_threads_listing_context): Deallocate storage associated
4778 with thread handle.
4779 (start_thread): Add support for "handle" attribute.
4780 (thread_attributes): Add "handle".
4781 (remote_get_threads_with_qthreadinfo): Initialize thread_handle
4782 field.
4783 (remote_update_thread_list): Update thread_handle.
4784 (remote_thread_handle_to_thread_info): New function.
4785 (init_remote_ops): Initialize to_thread_handle_to_thread_info.
4786
4787 2017-09-21 Kevin Buettner <kevinb@redhat.com>
4788
4789 * python/py-inferior.c (gdbpy_thread_from_thread_handle): New
4790 function.
4791 (inferior_object_methods): Add gdbpy_thread_from_thread_handle.
4792 * python/python-internal.h (thread_object_type): Declare.
4793
4794 2017-09-21 Kevin Buettner <kevinb@redhat.com>
4795
4796 * target.h (struct target_ops): Add to_thread_handle_to_thread_info.
4797 (target_thread_handle_to_thread_info): Declare.
4798 * target.c (target_thread_handle_to_thread_info): New function.
4799 * target-delegates.c: Regenerate.
4800 * gdbthread.h (find_thread_by_handle): Declare.
4801 * thread.c (find_thread_by_handle): New function.
4802 * linux-thread-db.c (thread_db_thread_handle_to_thread_info): New
4803 function.
4804 (init_thread_db_ops): Register thread_db_thread_handle_to_thread_info.
4805
4806 2017-09-21 Simon Marchi <simon.marchi@ericsson.com>
4807
4808 * nat/linux-waitpid.c (linux_debug): Add ATTRIBUTE_PRINTF.
4809
4810 2017-09-21 Simon Marchi <simon.marchi@ericsson.com>
4811
4812 * microblaze-tdep.c (microblaze_debug): Add ATTRIBUTE_PRINTF.
4813
4814 2017-09-21 Yao Qi <yao.qi@linaro.org>
4815
4816 * configure.tgt (aarch64*-*-freebsd*): Add fbsd-tdep.o solib-svr4.o
4817 to gdb_target_obs.
4818
4819 2017-09-20 Tom Tromey <tom@tromey.com>
4820
4821 * breakpoint.c (struct counted_command_line): Remove.
4822 (breakpoint_commands): Update.
4823 (alloc_counted_command_line, incref_counted_command_line)
4824 (decref_counted_command_line, do_cleanup_counted_command_line)
4825 (make_cleanup_decref_counted_command_line): Remove.
4826 (breakpoint_set_commands, commands_command_1, ~bpstats, bpstats)
4827 (bpstat_clear_actions, bpstat_do_actions_1, watchpoint_check)
4828 (bpstat_stop_status, print_one_breakpoint_location, ~breakpoint)
4829 (save_breakpoints): Update.
4830 * breakpoint.h (counted_command_line): Now a typedef to
4831 shared_ptr.
4832 (struct breakpoint) <commands>: Now a counted_command_line.
4833 (struct bpstats) <command>: Likewise.
4834
4835 2017-09-20 Tom Tromey <tom@tromey.com>
4836
4837 * breakpoint.c (struct commands_info, do_map_commands_command):
4838 Remove.
4839 (commands_command_1): Update.
4840 (iterate_over_related_breakpoints): Take a function_view.
4841 (do_delete_breakpoint, do_map_delete_breakpoint): Remove.
4842 (delete_command): Update.
4843 (map_breakpoint_numbers): Take a function_view.
4844 (do_disable_breakpoint, do_map_delete_breakpoint): Remove.
4845 (disable_command): Update.
4846 (do_enable_breakpoint, do_map_enable_breakpoint): Remove.
4847 (enable_command): Update.
4848 (struct disp_data, do_enable_breakpoint_disp)
4849 (do_map_enable_once_breakpoint, do_map_enable_count_breakpoint)
4850 (do_map_enable_delete_breakpoint): Remove.
4851 (enable_once_command, enable_count_command, enable_delete_command)
4852 (delete_trace_variable_command): Update.
4853
4854 2017-09-20 Tom Tromey <tom@tromey.com>
4855
4856 * breakpoint.c (~bpstats): Rename from bpstat_free. Update.
4857 (bpstat_clear): Use delete.
4858 (bpstats): New constructors.
4859 (bpstat_copy, bpstat_stop_status): Use new.
4860 (dprintf_after_condition_true): Update.
4861 * breakpoint.h (bpstats::bpstats): Add constructors.
4862 (bpstats::~bpstats): Add destructor.
4863
4864 2017-09-20 Pedro Alves <palves@redhat.com>
4865
4866 * eval.c (make_params): Delete, refactored as ...
4867 (class fake_method): ... this new type's ctor.
4868 (fake_method::~fake_method): New.
4869 (evaluate_subexp_standard): Use 'fake_method'.
4870
4871 2017-09-20 Tom Tromey <tom@tromey.com>
4872
4873 * windows-nat.c (get_windows_debug_event, windows_wait)
4874 (do_initial_windows_stuff, windows_attach): Update.
4875 * utils.c (vwarning, internal_vproblem): Update.
4876 (ui_unregister_input_event_handler_cleanup)
4877 (prepare_to_handle_input): Remove.
4878 (class scoped_input_handler): New.
4879 (defaulted_query, prompt_for_continue): Update.
4880 * tui/tui-hooks.c (tui_refresh_frame_and_register_information):
4881 Update.
4882 * top.c (undo_terminal_modifications_before_exit): Update.
4883 * target/target.h (target_terminal_init, target_terminal_inferior)
4884 (target_terminal_ours): Don't declare.
4885 (class target_terminal): New.
4886 * target.h (target_terminal_is_inferior, target_terminal_is_ours)
4887 (target_terminal_ours_for_output)
4888 (make_cleanup_restore_target_terminal): Don't declare.
4889 (target_terminal_info): Remove.
4890 * target.c (enum terminal_state, terminal_state): Remove.
4891 (target_terminal::terminal_state): Define.
4892 (target_terminal::init): Rename from target_terminal_init.
4893 (target_terminal::inferior): Rename from
4894 target_terminal_inferior.
4895 (target_terminal::ours): Rename from target_terminal_ours.
4896 (target_terminal::ours_for_output): Rename from
4897 target_terminal_ours_for_output.
4898 (target_terminal::info): New method.
4899 (cleanup_restore_target_terminal)
4900 (make_cleanup_restore_target_terminal): Remove.
4901 * solib.c (handle_solib_event): Update.
4902 * remote.c (remote_serial_quit_handler): Update.
4903 (remote_terminal_inferior, remote_wait_as): Update.
4904 * record-full.c (record_full_wait_1): Update.
4905 * nto-procfs.c (procfs_create_inferior): Update.
4906 * nat/fork-inferior.c (startup_inferior): Update.
4907 * mi/mi-interp.c (mi_new_thread, mi_thread_exit)
4908 (mi_record_changed, mi_inferior_added, mi_inferior_appeared)
4909 (mi_inferior_exit, mi_inferior_removed, mi_traceframe_changed)
4910 (mi_tsv_created, mi_tsv_deleted, mi_tsv_modified)
4911 (mi_breakpoint_created, mi_breakpoint_deleted)
4912 (mi_breakpoint_modified, mi_on_resume, mi_solib_loaded)
4913 (mi_solib_unloaded, mi_command_param_changed, mi_memory_changed)
4914 (mi_user_selected_context_changed, report_initial_inferior):
4915 Update.
4916 * linux-nat.c (linux_nat_attach, linux_nat_terminal_ours)
4917 (linux_nat_terminal_inferior): Update.
4918 * infrun.c (follow_fork_inferior)
4919 (handle_vfork_child_exec_or_exit, do_target_resume)
4920 (check_curr_ui_sync_execution_done, handle_inferior_event_1)
4921 (handle_signal_stop, maybe_remove_breakpoints, normal_stop):
4922 Update.
4923 * inflow.c (child_terminal_init, info_terminal_command): Update.
4924 * infcmd.c (post_create_inferior, continue_1, prepare_one_step)
4925 (attach_command): Update.
4926 * infcall.c (call_thread_fsm_should_stop): Update.
4927 * gnu-nat.c (gnu_attach): Update.
4928 * extension.c (struct active_ext_lang_state)
4929 (restore_active_ext_lang): Update.
4930 * exceptions.c (print_flush): Update.
4931 * event-top.c (async_enable_stdin, default_quit_handler): Update.
4932 (struct quit_handler_cleanup_data, restore_quit_handler)
4933 (restore_quit_handler_dtor, make_cleanup_override_quit_handler):
4934 Remove.
4935 * cp-support.c (gdb_demangle): Update.
4936 * breakpoint.c (update_inserted_breakpoint_locations)
4937 (insert_breakpoint_locations, handle_jit_event)
4938 (disable_breakpoints_in_unloaded_shlib): Update.
4939 * annotate.c (annotate_breakpoints_invalid)
4940 (annotate_frames_invalid): Update.
4941
4942 2017-09-20 Tom Tromey <tom@tromey.com>
4943
4944 * main.c (catch_command_errors): Rename from
4945 catch_command_errors_const.
4946 (captured_main_1): Update.
4947
4948 2017-09-20 Pedro Alves <palves@redhat.com>
4949
4950 * cli/cli-cmds.c (list_command): Use print_sal_location.
4951 (print_sal_location): New function.
4952 (ambiguous_line_spec): Use print_sal_location.
4953 * linespec.c (symbol_to_sal): Record the symbol in the sal.
4954 * symtab.c (find_function_start_sal): Likewise.
4955 * symtab.h (symtab_and_line::symbol): New field.
4956
4957 2017-09-20 Pedro Alves <palves@redhat.com>
4958
4959 * linespec.c (minsym_found): Handle non-text minsyms.
4960 (symbol_to_sal): Record a sal.pc for non-block, non-label symbols.
4961
4962 2017-09-20 Walfred Tedeschi <walfred.tedeschi@intel.com>
4963
4964 * features/Makefile (i386-avx-mpx-avx512-pku.dat): Add missing
4965 backslash.
4966
4967 2017-09-20 Walfred Tedeschi <walfred.tedeschi@intel.com>
4968
4969 * gdb.arch/i386-avx512.c (move_zmm_data_to_reg): Use
4970 vmovups instead vmovaps.
4971 (move_zmm_data_to_memory): Use vmovups instead vmovaps.
4972
4973 2017-09-19 John Baldwin <jhb@FreeBSD.org>
4974
4975 * NEWS (Changes since GDB 8.0): Add starti.
4976 * infcmd.c (enum run_break): New.
4977 (run_command_1): Queue pending event for RUN_STOP_AT_FIRST_INSN
4978 case.
4979 (run_command): Use enum run_how.
4980 (start_command): Likewise.
4981 (starti_command): New function.
4982 (RUN_ARGS_HELP): New macro.
4983 (_initialize_infcmd): Use RUN_ARGS_HELP for run and start
4984 commands. Add starti command.
4985
4986 2017-09-19 Yao Qi <yao.qi@linaro.org>
4987
4988 * Makefile.in (monitor.o): Remove the rule.
4989
4990 2017-09-19 Yao Qi <yao.qi@linaro.org>
4991
4992 * annotate.h (struct annotate_arg_emitter): Use
4993 DISABLE_COPY_AND_ASSIGN.
4994 * common/refcounted-object.h (refcounted_object): Likewise.
4995 * completer.h (struct completion_result): Likewise.
4996 * dwarf2read.c (struct dwarf2_per_objfile): Likewise.
4997 * filename-seen-cache.h (filename_seen_cache): Likewise.
4998 * gdbcore.h (thread_section_name): Likewise.
4999 * gdb_regex.h (compiled_regex): Likewise.
5000 * gdbthread.h (scoped_restore_current_thread): Likewise.
5001 * inferior.h (scoped_restore_current_inferior): Likewise.
5002 * jit.c (jit_reader): Likewise.
5003 * linespec.h (struct linespec_result): Likewise.
5004 * mi/mi-parse.h (struct mi_parse): Likewise.
5005 * nat/fork-inferior.c (execv_argv): Likewise.
5006 * progspace.h (scoped_restore_current_program_space): Likewise.
5007 * python/python-internal.h (class gdbpy_enter): Likewise.
5008 * regcache.h (regcache): Likewise.
5009 * target-descriptions.c (struct tdesc_reg): Likewise.
5010 (struct tdesc_type): Likewise.
5011 (struct tdesc_feature): Likewise.
5012 * ui-out.h (ui_out_emit_type): Likewise.
5013
5014 2017-09-18 Simon Marchi <simon.marchi@ericsson.com>
5015
5016 * dwarf2expr.c (dwarf_expr_context::execute_stack_op): Remove
5017 label abort_expression.
5018
5019 2017-09-16 Simon Marchi <simon.marchi@ericsson.com>
5020
5021 * common/buffer.c (buffer_xml_printf): Adjust.
5022 * common/xml-utils.c (xml_escape_text): Change return type to
5023 std::string, update code accordingly.
5024 * common/xml-utils.h (xml_escape_text): Change return type to
5025 std::string.
5026 * rs6000-aix-tdep.c (rs6000_aix_shared_library_to_xml): Adjust.
5027 * windows-tdep.c (windows_xfer_shared_library): Adjust.
5028 * unittests/xml-utils-selftests.c (test_xml_escape_text):
5029 Adjust.
5030
5031 2017-09-16 Simon Marchi <simon.marchi@ericsson.com>
5032
5033 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add new source file.
5034 (SUBDIR_UNITTESTS_OBS): Add new object file.
5035 * unittests/xml-utils-selftests.c: New file.
5036
5037 2017-09-16 Simon Marchi <simon.marchi@ericsson.com>
5038
5039 * common/selftest.h (selftest): New struct/interface.
5040 (register_test): Add name parameter, add new overload.
5041 (run_tests): Add filter parameter.
5042 (for_each_selftest_ftype): New typedef.
5043 (for_each_selftest): New declaration.
5044 * common/selftest.c (tests): Change type to
5045 map<string, unique_ptr<selftest>>.
5046 (simple_selftest): New struct.
5047 (register_test): New function.
5048 (register_test): Add name parameter and use it.
5049 (run_tests): Add filter parameter and use it. Add prints.
5050 Adjust to vector -> map change.
5051 * aarch64-tdep.c (_initialize_aarch64_tdep): Add names when
5052 registering selftests.
5053 * arm-tdep.c (_initialize_arm_tdep): Likewise.
5054 * disasm-selftests.c (_initialize_disasm_selftests): Likewise.
5055 * dwarf2-frame.c (_initialize_dwarf2_frame): Likewise.
5056 * dwarf2loc.c (_initialize_dwarf2loc): Likewise.
5057 * findvar.c (_initialize_findvar): Likewise.
5058 * gdbarch-selftests.c (_initialize_gdbarch_selftests): Likewise.
5059 * maint.c (maintenance_selftest): Update call to run_tests.
5060 (maintenance_info_selftests): New function.
5061 (_initialize_maint_cmds): Register "maintenance info selftests"
5062 command. Update "maintenance selftest" doc.
5063 * regcache.c (_initialize_regcache): Add names when registering
5064 selftests.
5065 * rust-exp.y (_initialize_rust_exp): Likewise.
5066 * selftest-arch.c (gdbarch_selftest): New struct.
5067 (gdbarch_tests): Remove.
5068 (register_test_foreach_arch): Add name parameter. Call
5069 register_test.
5070 (tests_with_arch): Remove, move most content to
5071 gdbarch_selftest::operator().
5072 (_initialize_selftests_foreach_arch): Remove.
5073 * selftest-arch.h (register_test_foreach_arch): Add name
5074 parameter.
5075 (run_tests_with_arch): New declaration.
5076 * utils-selftests.c (_initialize_utils_selftests): Add names
5077 when registering selftests.
5078 * utils.c (_initialize_utils): Likewise.
5079 * unittests/array-view-selftests.c
5080 (_initialize_array_view_selftests): Likewise.
5081 * unittests/environ-selftests.c (_initialize_environ_selftests):
5082 Likewise.
5083 * unittests/function-view-selftests.c
5084 (_initialize_function_view_selftests): Likewise.
5085 * unittests/offset-type-selftests.c
5086 (_initialize_offset_type_selftests): Likewise.
5087 * unittests/optional-selftests.c
5088 (_initialize_optional_selftests): Likewise.
5089 * unittests/scoped_restore-selftests.c
5090 (_initialize_scoped_restore_selftests): Likewise.
5091 * NEWS: Document "maintenance selftest" and "maint info
5092 selftests".
5093
5094 2017-09-16 Simon Marchi <simon.marchi@ericsson.com>
5095
5096 * mi/mi-main.c (mi_load_progress): Restore current_uiout using a
5097 scoped_restore.
5098
5099 2017-09-16 Simon Marchi <simon.marchi@ericsson.com>
5100
5101 * mi/mi-main.c (mi_load_progress): Make uiout variable
5102 a unique_ptr.
5103
5104 2017-09-15 Pedro Alves <palves@redhat.com>
5105
5106 * compile/compile-c-types.c (convert_enum, convert_int)
5107 (convert_float): Adjust to refer to int_type_v0 and float_type_v0.
5108
5109 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
5110
5111 * dwarf2read.c (copy_string): Remove.
5112 (parse_macro_definition): Replace copy_string with savestring.
5113
5114 2017-09-15 Yao Qi <yao.qi@linaro.org>
5115
5116 * configure.tgt (i[34567]86-*-darwin*): Append amd64.o to
5117 gdb_target_obs.
5118 (i[34567]86-*-solaris2.1[0-9]* | x86_64-*-solaris2.1[0-9]*):
5119 Likewise.
5120 (i[34567]86-*-linux*): Likewise.
5121
5122 2017-09-14 Simon Marchi <simon.marchi@ericsson.com>
5123
5124 * dwarf2expr.h (dwarf_stack_value): Add constructor.
5125 (dwarf_expr_context) <~dwarf_expr_context>: Define as default.
5126 <stack>: Change type to std::vector.
5127 <stack_len, stack_allocated>: Remove.
5128 <grow_stack>: Remove.
5129 * dwarf2expr.c (dwarf_expr_context::dwarf_expr_context): Adjust.
5130 (dwarf_expr_context::~dwarf_expr_context): Remove.
5131 (dwarf_expr_context::grow_stack): Remove.
5132 (dwarf_expr_context::push): Adjust.
5133 (dwarf_expr_context::pop): Adjust.
5134 (dwarf_expr_context::fetch): Adjust.
5135 (dwarf_expr_context::fetch_in_stack_memory): Adjust.
5136 (dwarf_expr_context::stack_empty_p): Adjust.
5137 (dwarf_expr_context::execute_stack_op): Adjust.
5138
5139 2017-09-14 Simon Marchi <simon.marchi@ericsson.com>
5140
5141 * dwarf2expr.h (dwarf_expr_context) <stack_empty_p>: Change
5142 return type to bool.
5143 * dwarf2expr.c (dwarf_expr_context::stack_empty_p): Likewise.
5144
5145 2017-09-14 Simon Marchi <simon.marchi@ericsson.com>
5146
5147 * dwarf2expr.h (dwarf_expr_piece) <v.mem.in_stack_memory>:
5148 Change type to bool.
5149 (dwarf_stack_value) <in_stack_memory>: Likewise.
5150 (dwarf_expr_context) <push_address>: Change parameter type to
5151 bool.
5152 <fetch_in_stack_memory>: Change return type to bool.
5153 <push>: Change parameter type to bool.
5154 * dwarf2expr.c (dwarf_expr_context::push): Change parameter type
5155 to bool.
5156 (dwarf_expr_context::push_address): Likewise.
5157 (dwarf_expr_context::fetch_in_stack_memory): Change return type
5158 to bool.
5159 (dwarf_expr_context::execute_stack_op): Adjust.
5160 * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Adjust.
5161
5162 2017-09-14 Simon Marchi <simon.marchi@ericsson.com>
5163
5164 * dwarf2expr.h (struct dwarf_expr_piece): Move up.
5165 (struct dwarf_expr_context) <n_pieces>: Remove.
5166 <pieces>: Change type to std::vector.
5167 * dwarf2expr.c (dwarf_expr_context::dwarf_expr_context): Adjust.
5168 (dwarf_expr_context::~dwarf_expr_context): Don't manually free
5169 pieces.
5170 (dwarf_expr_context::add_piece): Adjust.
5171 * dwarf2loc.c (struct piece_closure): Initialize fields.
5172 <n_pieces>: Remove.
5173 <pieces>: Change type to std::vector.
5174 (allocate_piece_closure): Adjust, change parameter to
5175 std::vector rvalue and std::move it to piece_closure.
5176 (rw_pieced_value): Adjust.
5177 (check_pieced_synthetic_pointer): Adjust.
5178 (indirect_synthetic_pointer): Adjust.
5179 (coerce_pieced_ref): Adjust.
5180 (free_pieced_value_closure): Adjust. Use delete to free
5181 piece_closure.
5182 (dwarf2_evaluate_loc_desc_full): Adjust. std::move ctx.pieces
5183 to allocate_piece_closure.
5184 (dwarf2_loc_desc_get_symbol_read_needs): Adjust.
5185
5186 2017-09-12 Simon Marchi <simon.marchi@ericsson.com>
5187
5188 * probe.h (probe_ops_cp): Remove typedef.
5189 (DEF_VEC_P (probe_ops_cp)): Remove.
5190 (all_probe_ops): Change type to std::vector.
5191 * probe.c (info_probes_for_ops): Adjust to vector change.
5192 (probe_linespec_to_ops): Likewise.
5193 (all_probe_ops): Change type to std::vector.
5194 (_initialize_probe): Adjust to vector change.
5195 * dtrace-probe.c (_initialize_dtrace_probe): Likewise.
5196 * elfread.c (elf_get_probes): Likewise.
5197 * stap-probe.c (_initialize_stap_probe): Likewise.
5198
5199 2017-09-12 Simon Marchi <simon.marchi@ericsson.com>
5200
5201 * probe.h (struct bound_probe): Define constructors.
5202 * probe.c (bound_probe_s): Remove typedef.
5203 (DEF_VEC_O (bound_probe_s)): Remove VEC.
5204 (collect_probes): Change return type to std::vector, remove
5205 cleanup.
5206 (compare_probes): Return bool, change parameter type. Change
5207 semantic to "less than".
5208 (gen_ui_out_table_header_info): Change parameter to std::vector
5209 and update.
5210 (exists_probe_with_pops): Likewise.
5211 (info_probes_for_ops): Update to std::vector change.
5212 (enable_probes_command): Likewise.
5213 (disable_probes_command): Likewise.
5214
5215 2017-09-12 Simon Marchi <simon.marchi@ericsson.com>
5216
5217 * probe.h (struct probe_ops) <get_probes>: Change parameter from
5218 vec to std::vector.
5219 * probe.c (parse_probes_in_pspace): Update.
5220 (find_probes_in_objfile): Update.
5221 (find_probe_by_pc): Update.
5222 (collect_probes): Update.
5223 (probe_any_get_probes): Update.
5224 * symfile.h (struct sym_probe_fns) <sym_get_probes> Change
5225 return type to reference to std::vector.
5226 * dtrace-probe.c (dtrace_process_dof_probe): Change parameter to
5227 std::vector and update.
5228 (dtrace_process_dof): Likewise.
5229 (dtrace_get_probes): Likewise.
5230 * elfread.c (elf_get_probes): Change return type to std::vector,
5231 store an std::vector in bfd_data.
5232 (probe_key_free): Update to std::vector.
5233 * stap-probe.c (handle_stap_probe): Change parameter to
5234 std::vector and update.
5235 (stap_get_probes): Likewise.
5236 * symfile-debug.c (debug_sym_get_probes): Change return type to
5237 std::vector and update.
5238
5239 2017-09-11 Tom Tromey <tom@tromey.com>
5240
5241 * breakpoint.c (program_breakpoint_here_p): Update.
5242 * target.c (make_scoped_restore_show_memory_breakpoints): Rename
5243 from make_show_memory_breakpoints_cleanup. Return a
5244 scoped_restore_tmpl<int>.
5245 (restore_show_memory_breakpoints): Remove.
5246 * ppc-linux-tdep.c (ppc_linux_memory_remove_breakpoint): Update.
5247 * mem-break.c (memory_validate_breakpoint): Update.
5248 * ia64-tdep.c (ia64_memory_insert_breakpoint): Update.
5249 (ia64_memory_remove_breakpoint): Update.
5250 (ia64_breakpoint_from_pc): Update.
5251 * target.h (make_scoped_restore_show_memory_breakpoints): Rename
5252 from make_show_memory_breakpoints_cleanup.
5253
5254 2017-09-11 Tom Tromey <tom@tromey.com>
5255
5256 * d-namespace.c (d_lookup_symbol): Use std::string.
5257 (find_symbol_in_baseclass): Likewise.
5258
5259 2017-09-11 Tom Tromey <tom@tromey.com>
5260
5261 * ctf.c (ctf_start): Use std::string.
5262
5263 2017-09-11 Tom Tromey <tom@tromey.com>
5264
5265 * ada-lang.c (is_known_support_routine): Update.
5266 (ada_unhandled_exception_name_addr_from_raise): Update.
5267 * guile/scm-frame.c (gdbscm_frame_name): Update.
5268 * python/py-frame.c (frapy_name): Update.
5269 (frapy_function): Update.
5270 * stack.h (find_frame_funname): Update.
5271 * stack.c (find_frame_funname): Return unique_xmalloc_ptr.
5272 (print_frame): Update.
5273
5274 2017-09-11 Tom Tromey <tom@tromey.com>
5275
5276 * findcmd.c (put_bits): Take a gdb::byte_vector.
5277 (parse_find_args): Return gdb::byte_vector. "args" now const.
5278 Remove "pattern_bufp" and "pattern_lenp" parameters. Remove
5279 cleanups.
5280 (find_command): Update.
5281
5282 2017-09-11 Tom Tromey <tom@tromey.com>
5283
5284 * cli/cli-script.c (class scoped_restore_hook_in): New.
5285 (clear_hook_in_cleanup): Remove.
5286 (execute_cmd_pre_hook, execute_cmd_post_hook): Use
5287 scoped_restore_hook_in.
5288
5289 2017-09-11 Tom Tromey <tom@tromey.com>
5290
5291 * cli/cli-script.c (restore_interp): Remove.
5292 (read_command_lines): Use scoped_restore_interp.
5293 * interps.c (scoped_restore_interp::set_temp): Rename from
5294 interp_set_temp.
5295 * interps.h (class scoped_restore_interp): New.
5296 (interp_set_temp): Remove.
5297
5298 2017-09-11 Tom Tromey <tom@tromey.com>
5299
5300 * mi/mi-cmd-catch.c (mi_cmd_catch_assert)
5301 (mi_cmd_catch_exception, mi_catch_load_unload): Update.
5302 * mi/mi-cmd-break.c (setup_breakpoint_reporting): Return a
5303 scoped_restore.
5304 (mi_cmd_break_insert_1): Update.
5305 * mi/mi-cmd-break.h (setup_breakpoint_reporting): Return a
5306 scoped_restore.
5307
5308 2017-09-11 Tom Tromey <tom@tromey.com>
5309
5310 * demangle.c (demangle_command): Update.
5311 * breakpoint.c (disable_command): Update.
5312 (enable_command): Update.
5313 (find_location_by_number): Make "number" const. Use
5314 get_number_trailer.
5315 * cli/cli-utils.c (extract_arg): Return std::string.
5316 * probe.c (parse_probe_linespec): Update. Change types.
5317 (collect_probes): Take string arguments.
5318 (parse_probe_linespec): Likewise.
5319 (info_probes_for_ops): Update.
5320 (enable_probes_command): Update.
5321 (disable_probes_command): Update.
5322 * break-catch-sig.c (catch_signal_split_args): Update.
5323 * mi/mi-parse.c (mi_parse): Update.
5324
5325 2017-09-11 Tom Tromey <tom@tromey.com>
5326
5327 * language.h (language_enum): Make argument const.
5328 * language.c (language_enum): Make argument const.
5329
5330 2017-09-11 Tom Tromey <tom@tromey.com>
5331
5332 * common/common-utils.h (skip_to_space): Remove macro, redeclare
5333 as function.
5334 (skip_to_space): Rename from skip_to_space_const.
5335 * common/common-utils.c (skip_to_space): New function.
5336 (skip_to_space): Rename from skip_to_space_const.
5337 * cli/cli-utils.h (get_number): Rename from get_number_const.
5338 (extract_arg): Rename from extract_arg_const.
5339 * cli/cli-utils.c (get_number): Rename from get_number_const.
5340 (extract_arg): Rename from extract_arg_const.
5341 (number_or_range_parser::get_number): Use ::get_number.
5342 * aarch64-linux-tdep.c, ada-lang.c, arm-linux-tdep.c, ax-gdb.c,
5343 break-catch-throw.c, breakpoint.c, cli/cli-cmds.c, cli/cli-dump.c,
5344 cli/cli-script.c, cli/cli-setshow.c, compile/compile.c,
5345 completer.c, demangle.c, disasm.c, findcmd.c, linespec.c,
5346 linux-tdep.c, linux-thread-db.c, location.c, mi/mi-parse.c,
5347 minsyms.c, nat/linux-procfs.c, printcmd.c, probe.c,
5348 python/py-breakpoint.c, record.c, rust-exp.y, serial.c, stack.c,
5349 stap-probe.c, tid-parse.c, tracepoint.c: Update all callers.
5350
5351 2017-09-11 Tom Tromey <tom@tromey.com>
5352
5353 * python/python.c (do_start_initialization): Use
5354 py-event-types.def to initialize types.
5355 Define all object type structures.
5356 * python/python-internal.h: Don't declare event initialization
5357 functions.
5358 * python/py-threadevent.c (thread_event_object_type): Don't
5359 define.
5360 * python/py-stopevent.c (stop_event_object_type): Don't define.
5361 * python/py-signalevent.c (signal_event_object_type): Don't
5362 declare or define.
5363 * python/py-newobjfileevent.c (new_objfile_event_object_type)
5364 (clear_objfiles_event_object_type): Don't declare or define.
5365 * python/py-infevents.c (inferior_call_pre_event_object_type)
5366 (inferior_call_post_event_object_type)
5367 (register_changed_event_object_type)
5368 (memory_changed_event_object_type): Don't declare or define.
5369 * python/py-inferior.c (new_thread_event_object_type)
5370 (new_inferior_event_object_type)
5371 (inferior_deleted_event_object_type): Don't declare or define.
5372 * python/py-exitedevent.c (exited_event_object_type): Don't
5373 declare or define.
5374 * python/py-evts.c (gdbpy_initialize_py_events): Use
5375 py-all-events.def.
5376 * python/py-events.h (thread_event_object_type): Don't declare.
5377 (events_object): Use py-all-events.def.
5378 * python/py-event.h (GDBPY_NEW_EVENT_TYPE): Remove. Use
5379 py-event-types.def.
5380 * python/py-event-types.def: New file.
5381 * python/py-continueevent.c (create_continue_event_object): Don't
5382 declare or define.
5383 * python/py-bpevent.c (breakpoint_event_object_type): Don't
5384 declare or define.
5385 * python/py-all-events.def: New file.
5386
5387 2017-09-11 Tom Tromey <tom@tromey.com>
5388
5389 * python/py-threadevent.c (create_thread_event_object): Return
5390 gdbpy_ref.
5391 * python/py-stopevent.h (create_stop_event_object)
5392 (create_breakpoint_event_object, create_signal_event_object):
5393 Update.
5394 * python/py-stopevent.c (create_stop_event_object): Return
5395 gdbpy_ref.
5396 (emit_stop_event): Update.
5397 * python/py-signalevent.c (create_signal_event_object): Return
5398 gdbpy_ref.
5399 * python/py-infevents.c (create_inferior_call_event_object):
5400 Update.
5401 * python/py-event.h (create_event_object)
5402 (create_thread_event_object): Update.
5403 * python/py-event.c (create_event_object): Return gdbpy_ref.
5404 * python/py-continueevent.c: Return gdbpy_ref.
5405 * python/py-bpevent.c (create_breakpoint_event_object): Return
5406 gdbpy_ref.
5407
5408 2017-09-11 Tom Tromey <tom@tromey.com>
5409
5410 PR python/15622:
5411 * NEWS: Add entry.
5412 * python/python.c (do_start_initialization): Initialize new event
5413 types.
5414 * python/python-internal.h (gdbpy_initialize_new_inferior_event)
5415 (gdbpy_initialize_inferior_deleted_event)
5416 (gdbpy_initialize_new_thread_event): Declare.
5417 * python/py-threadevent.c (create_thread_event_object): Add option
5418 "thread" parameter.
5419 * python/py-inferior.c (new_thread_event_object_type)
5420 (new_inferior_event_object_type)
5421 (inferior_deleted_event_object_type): Declare.
5422 (python_new_inferior, python_inferior_deleted): New functions.
5423 (add_thread_object): Emit new_thread event.
5424 (gdbpy_initialize_inferior): Attach new functions to corresponding
5425 observers.
5426 (new_thread, new_inferior, inferior_deleted): Define new event
5427 types.
5428 * python/py-evts.c (gdbpy_initialize_py_events): Add new
5429 registries.
5430 * python/py-events.h (events_object) <new_inferior,
5431 inferior_deleted, new_thread>: New fields.
5432 * python/py-event.h (create_thread_event_breakpoint): Add optional
5433 "thread" parameter.
5434
5435 2017-09-10 Andrew Burgess <andrew.burgess@embecosm.com>
5436
5437 * utils.c (abort_with_message): Don't compare gdb_stderr to NULL,
5438 check current_ui instead.
5439 (internal_vproblem): Likewise.
5440
5441 2017-09-09 Simon Marchi <simon.marchi@ericsson.com>
5442
5443 * thread.c (print_thread_info_1): Remove unnecessary calls to
5444 uiout->is_mi_like_p.
5445
5446 2017-09-09 Tom Tromey <tom@tromey.com>
5447
5448 * namespace.h (add_using_directive): Update.
5449 * namespace.c (add_using_directive): Change type of excludes to
5450 std::vector.
5451 * dwarf2read.c (read_import_statement): Use std::vector.
5452 (read_namespace): Update.
5453 * cp-namespace.c (cp_scan_for_anonymous_namespaces): Update.
5454
5455 2017-09-09 Tom Tromey <tom@tromey.com>
5456
5457 * linespec.c (create_sals_line_offset): Use gdb::def_vector.
5458
5459 2017-09-09 Tom Tromey <tom@tromey.com>
5460
5461 * p-valprint.c (pascal_object_print_value): Use gdb::byte_vector.
5462
5463 2017-09-09 Tom Tromey <tom@tromey.com>
5464
5465 * stack.c (func_command): Use gdb::def_vector.
5466
5467 2017-09-09 Tom Tromey <tom@tromey.com>
5468
5469 * mi/mi-cmd-var.c (mi_cmd_var_list_children): Use gdb::optional,
5470 ui_out_emit_list, ui_out_emit_tuple.
5471 (mi_cmd_var_update): Likewise.
5472
5473 2017-09-09 Tom Tromey <tom@tromey.com>
5474
5475 * mi/mi-interp.c (mi_user_selected_context_changed): Use
5476 ui_out_redirect_pop.
5477 * guile/scm-ports.c (ioscm_with_output_to_port_worker): Use
5478 ui_out_redirect_pop.
5479 * utils.c (do_ui_out_redirect_pop)
5480 (make_cleanup_ui_out_redirect_pop): Remove.
5481 * top.c (execute_command_to_string): Use ui_out_redirect_pop.
5482 * utils.h (make_cleanup_ui_out_redirect_pop): Remove.
5483 * ui-out.h (ui_out_redirect_pop): New class.
5484
5485 2017-09-09 Tom Tromey <tom@tromey.com>
5486
5487 * mi/mi-main.c (output_cores): Use ui_out_emit_list.
5488 (list_available_thread_groups, mi_cmd_list_thread_groups)
5489 (mi_cmd_data_list_changed_registers, mi_cmd_data_read_memory)
5490 (mi_cmd_data_read_memory_bytes, mi_cmd_trace_frame_collected):
5491 Likewise.
5492
5493 2017-09-09 Tom Tromey <tom@tromey.com>
5494
5495 * disasm.c (gdb_pretty_print_disassembler::pretty_print_insn): Use
5496 ui_out_emit_tuple.
5497
5498 2017-09-09 Tom Tromey <tom@tromey.com>
5499
5500 * target.c (flash_erase_command): Use ui_out_emit_tuple.
5501 * stack.c (print_frame): Use ui_out_emit_tuple.
5502 * spu-tdep.c (info_spu_event_command): Use ui_out_emit_tuple.
5503 (info_spu_mailbox_command, info_spu_dma_command)
5504 (info_spu_proxydma_command): Likewise.
5505 * mi/mi-main.c (mi_cmd_trace_frame_collected): Use
5506 ui_out_emit_tuple, gdb::byte_vector, bin2hex.
5507 * mi/mi-cmd-file.c (mi_cmd_file_list_shared_libraries): Use
5508 ui_out_emit_tuple.
5509 * breakpoint.c (print_it_watchpoint): Use ui_out_emit_tuple.
5510
5511 2017-09-09 Tom Tromey <tom@tromey.com>
5512
5513 * ui-out.h (make_cleanup_ui_out_table_begin_end): Remove.
5514 (class ui_out_emit_table): Update comment.
5515 * ui-out.c (do_cleanup_table_end)
5516 (make_cleanup_ui_out_table_begin_end): Remove.
5517 * spu-tdep.c (info_spu_mailbox_list): Use ui_out_emit_table.
5518 (info_spu_dma_cmdlist): Likewise.
5519 * probe.c (info_probes_for_ops): Use ui_out_emit_table.
5520 * darwin-nat-info.c (darwin_debug_regions_recurse): Use
5521 ui_out_emit_table.
5522
5523 2017-09-09 Tom Tromey <tom@tromey.com>
5524
5525 * thread.c (print_thread_info_1): Use ui_out_emit_table,
5526 ui_out_emit_list, gdb::optional.
5527
5528 2017-09-09 John Baldwin <jhb@FreeBSD.org>
5529
5530 * aarch64-linux-nat.c: Remove _initialize_aarch64_linux_nat
5531 prototype.
5532 * aarch64-linux-tdep.c: Remove _initialize_aarch64_linux_tdep
5533 prototype.
5534 * aarch64-newlib-tdep.c: Remove _initialize_aarch64_newlib_tdep
5535 prototype.
5536 * aarch64-tdep.c: Remove _initialize_aarch64_tdep prototype.
5537 * ada-exp.y: Remove _initialize_ada_exp prototype.
5538 * ada-lang.c: Remove _initialize_ada_language prototype.
5539 * ada-tasks.c: Remove _initialize_tasks prototype.
5540 * addrmap.c: Remove _initialize_addrmap prototype.
5541 * agent.c: Remove _initialize_agent prototype.
5542 * aix-thread.c: Remove _initialize_aix_thread prototype.
5543 * alpha-bsd-nat.c: Remove _initialize_alphabsd_nat prototype.
5544 * alpha-linux-nat.c: Remove _initialize_alpha_linux_nat prototype.
5545 * alpha-linux-tdep.c: Remove _initialize_alpha_linux_tdep
5546 prototype.
5547 * alpha-nbsd-tdep.c: Remove _initialize_alphanbsd_tdep prototype.
5548 * alpha-obsd-tdep.c: Remove _initialize_alphaobsd_tdep prototype.
5549 * alpha-tdep.c: Remove _initialize_alpha_tdep prototype.
5550 * amd64-darwin-tdep.c: Remove _initialize_amd64_darwin_tdep
5551 prototype.
5552 * amd64-dicos-tdep.c: Remove _initialize_amd64_dicos_tdep
5553 prototype.
5554 * amd64-fbsd-nat.c: Remove _initialize_amd64fbsd_nat prototype.
5555 * amd64-fbsd-tdep.c: Remove _initialize_amd64fbsd_tdep prototype.
5556 * amd64-linux-nat.c: Remove _initialize_amd64_linux_nat prototype.
5557 * amd64-linux-tdep.c: Remove _initialize_amd64_linux_tdep
5558 prototype.
5559 * amd64-nbsd-nat.c: Remove _initialize_amd64nbsd_nat prototype.
5560 * amd64-nbsd-tdep.c: Remove _initialize_amd64nbsd_tdep prototype.
5561 * amd64-obsd-nat.c: Remove _initialize_amd64obsd_nat prototype.
5562 * amd64-obsd-tdep.c: Remove _initialize_amd64obsd_tdep prototype.
5563 * amd64-sol2-tdep.c: Remove _initialize_amd64_sol2_tdep prototype.
5564 * amd64-tdep.c: Remove _initialize_amd64_tdep prototype.
5565 * amd64-windows-nat.c: Remove _initialize_amd64_windows_nat
5566 prototype.
5567 * amd64-windows-tdep.c: Remove _initialize_amd64_windows_tdep
5568 prototype.
5569 * annotate.c: Remove _initialize_annotate prototype.
5570 * arc-newlib-tdep.c: Remove _initialize_arc_newlib_tdep prototype.
5571 * arc-tdep.c: Remove _initialize_arc_tdep prototype.
5572 * arch-utils.c: Remove _initialize_gdbarch_utils prototype.
5573 * arm-linux-nat.c: Remove _initialize_arm_linux_nat prototype.
5574 * arm-linux-tdep.c: Remove _initialize_arm_linux_tdep prototype.
5575 * arm-nbsd-tdep.c: Remove _initialize_arm_netbsd_tdep prototype.
5576 * arm-obsd-tdep.c: Remove _initialize_armobsd_tdep prototype.
5577 * arm-symbian-tdep.c: Remove _initialize_arm_symbian_tdep
5578 prototype.
5579 * arm-tdep.c: Remove _initialize_arm_tdep prototype.
5580 * arm-wince-tdep.c: Remove _initialize_arm_wince_tdep prototype.
5581 * auto-load.c: Remove _initialize_auto_load prototype.
5582 * auxv.c: Remove _initialize_auxv prototype.
5583 * avr-tdep.c: Remove _initialize_avr_tdep prototype.
5584 * ax-gdb.c: Remove _initialize_ax_gdb prototype.
5585 * bfin-linux-tdep.c: Remove _initialize_bfin_linux_tdep prototype.
5586 * bfin-tdep.c: Remove _initialize_bfin_tdep prototype.
5587 * break-catch-sig.c: Remove _initialize_break_catch_sig prototype.
5588 * break-catch-syscall.c: Remove _initialize_break_catch_syscall
5589 prototype.
5590 * break-catch-throw.c: Remove _initialize_break_catch_throw
5591 prototype.
5592 * breakpoint.c: Remove _initialize_breakpoint prototype.
5593 * bsd-uthread.c: Remove _initialize_bsd_uthread prototype.
5594 * btrace.c: Remove _initialize_btrace prototype.
5595 * charset.c: Remove _initialize_charset prototype.
5596 * cli/cli-cmds.c: Remove _initialize_cli_cmds prototype.
5597 * cli/cli-dump.c: Remove _initialize_cli_dump prototype.
5598 * cli/cli-interp.c: Remove _initialize_cli_interp prototype.
5599 * cli/cli-logging.c: Remove _initialize_cli_logging prototype.
5600 * cli/cli-script.c: Remove _initialize_cli_script prototype.
5601 * coff-pe-read.c: Remove _initialize_coff_pe_read prototype.
5602 * coffread.c: Remove _initialize_coffread prototype.
5603 * compile/compile.c: Remove _initialize_compile prototype.
5604 * complaints.c: Remove _initialize_complaints prototype.
5605 * completer.c: Remove _initialize_completer prototype.
5606 * copying.awk: Remove _initialize_copying prototype.
5607 * copying.c: Regenerate.
5608 * core-regset.c: Remove _initialize_core_regset prototype.
5609 * corefile.c: Remove _initialize_core prototype.
5610 * corelow.c: Remove _initialize_corelow prototype.
5611 * cp-abi.c: Remove _initialize_cp_abi prototype.
5612 * cp-namespace.c: Remove _initialize_cp_namespace prototype.
5613 * cp-support.c: Remove _initialize_cp_support prototype.
5614 * cp-valprint.c: Remove _initialize_cp_valprint prototype.
5615 * cris-linux-tdep.c: Remove _initialize_cris_linux_tdep prototype.
5616 * cris-tdep.c: Remove _initialize_cris_tdep prototype.
5617 * ctf.c: Remove _initialize_ctf prototype.
5618 * d-lang.c: Remove _initialize_d_language prototype.
5619 * darwin-nat-info.c: Remove _initialize_darwin_info_commands
5620 prototype.
5621 * darwin-nat.c: Remove _initialize_darwin_inferior prototype.
5622 * dbxread.c: Remove _initialize_dbxread prototype.
5623 * dcache.c: Remove _initialize_dcache prototype.
5624 * demangle.c: Remove _initialize_demangler prototype.
5625 * disasm-selftests.c: Remove _initialize_disasm_selftests
5626 prototype.
5627 * disasm.c: Remove _initialize_disasm prototype.
5628 * dtrace-probe.c: Remove _initialize_dtrace_probe prototype.
5629 * dummy-frame.c: Remove _initialize_dummy_frame prototype.
5630 * dwarf2-frame-tailcall.c: Remove _initialize_tailcall_frame
5631 prototype.
5632 * dwarf2-frame.c: Remove _initialize_dwarf2_frame prototype.
5633 * dwarf2expr.c: Remove _initialize_dwarf2expr prototype.
5634 * dwarf2loc.c: Remove _initialize_dwarf2loc prototype.
5635 * dwarf2read.c: Remove _initialize_dwarf2_read prototype.
5636 * elfread.c: Remove _initialize_elfread prototype.
5637 * exec.c: Remove _initialize_exec prototype.
5638 * extension.c: Remove _initialize_extension prototype.
5639 * f-lang.c: Remove _initialize_f_language prototype.
5640 * f-valprint.c: Remove _initialize_f_valprint prototype.
5641 * fbsd-nat.c: Remove _initialize_fbsd_nat prototype.
5642 * fbsd-tdep.c: Remove _initialize_fbsd_tdep prototype.
5643 * filesystem.c: Remove _initialize_filesystem prototype.
5644 * findcmd.c: Remove _initialize_mem_search prototype.
5645 * fork-child.c: Remove _initialize_fork_child prototype.
5646 * frame-base.c: Remove _initialize_frame_base prototype.
5647 * frame-unwind.c: Remove _initialize_frame_unwind prototype.
5648 * frame.c: Remove _initialize_frame prototype.
5649 * frv-linux-tdep.c: Remove _initialize_frv_linux_tdep prototype.
5650 * frv-tdep.c: Remove _initialize_frv_tdep prototype.
5651 * ft32-tdep.c: Remove _initialize_ft32_tdep prototype.
5652 * gcore.c: Remove _initialize_gcore prototype.
5653 * gdb_bfd.c: Remove _initialize_gdb_bfd prototype.
5654 * gdbarch.c: Regenerate.
5655 * gdbarch.sh: Remove _initialize_gdbarch prototype.
5656 * gdbtypes.c: Remove _initialize_gdbtypes prototype.
5657 * gnu-nat.c: Remove _initialize_gnu_nat prototype.
5658 * gnu-v2-abi.c: Remove _initialize_gnu_v2_abi prototype.
5659 * gnu-v3-abi.c: Remove _initialize_gnu_v3_abi prototype.
5660 * go-lang.c: Remove _initialize_go_language prototype.
5661 * go32-nat.c: Remove _initialize_go32_nat prototype.
5662 * guile/guile.c: Remove _initialize_guile prototype.
5663 * h8300-tdep.c: Remove _initialize_h8300_tdep prototype.
5664 * hppa-linux-nat.c: Remove _initialize_hppa_linux_nat prototype.
5665 * hppa-linux-tdep.c: Remove _initialize_hppa_linux_tdep prototype.
5666 * hppa-nbsd-nat.c: Remove _initialize_hppanbsd_nat prototype.
5667 * hppa-nbsd-tdep.c: Remove _initialize_hppanbsd_tdep prototype.
5668 * hppa-obsd-nat.c: Remove _initialize_hppaobsd_nat prototype.
5669 * hppa-obsd-tdep.c: Remove _initialize_hppaobsd_tdep prototype.
5670 * hppa-tdep.c: Remove _initialize_hppa_tdep prototype.
5671 * i386-bsd-nat.c: Remove _initialize_i386bsd_nat prototype.
5672 * i386-cygwin-tdep.c: Remove _initialize_i386_cygwin_tdep
5673 prototype.
5674 * i386-darwin-tdep.c: Remove _initialize_i386_darwin_tdep
5675 prototype.
5676 * i386-dicos-tdep.c: Remove _initialize_i386_dicos_tdep prototype.
5677 * i386-fbsd-nat.c: Remove _initialize_i386fbsd_nat prototype.
5678 * i386-fbsd-tdep.c: Remove _initialize_i386fbsd_tdep prototype.
5679 * i386-gnu-nat.c: Remove _initialize_i386gnu_nat prototype.
5680 * i386-gnu-tdep.c: Remove _initialize_i386gnu_tdep prototype.
5681 * i386-linux-nat.c: Remove _initialize_i386_linux_nat prototype.
5682 * i386-linux-tdep.c: Remove _initialize_i386_linux_tdep prototype.
5683 * i386-nbsd-nat.c: Remove _initialize_i386nbsd_nat prototype.
5684 * i386-nbsd-tdep.c: Remove _initialize_i386nbsd_tdep prototype.
5685 * i386-nto-tdep.c: Remove _initialize_i386nto_tdep prototype.
5686 * i386-obsd-nat.c: Remove _initialize_i386obsd_nat prototype.
5687 * i386-obsd-tdep.c: Remove _initialize_i386obsd_tdep prototype.
5688 * i386-sol2-nat.c: Remove _initialize_amd64_sol2_nat prototype.
5689 * i386-sol2-tdep.c: Remove _initialize_amd64_sol2_tdep prototype.
5690 * i386-tdep.c: Remove _initialize_i386_tdep prototype.
5691 * i386-windows-nat.c: Remove _initialize_i386_windows_nat
5692 prototype.
5693 * ia64-libunwind-tdep.c: Remove _initialize_libunwind_frame
5694 prototype.
5695 * ia64-linux-nat.c: Remove _initialize_ia64_linux_nat prototype.
5696 * ia64-linux-tdep.c: Remove _initialize_ia64_linux_tdep prototype.
5697 * ia64-tdep.c: Remove _initialize_ia64_tdep prototype.
5698 * ia64-vms-tdep.c: Remove _initialize_ia64_vms_tdep prototype.
5699 * infcall.c: Remove _initialize_infcall prototype.
5700 * infcmd.c: Remove _initialize_infcmd prototype.
5701 * inferior.c: Remove _initialize_inferiors prototype.
5702 * inflow.c: Remove _initialize_inflow prototype.
5703 * infrun.c: Remove _initialize_infrun prototype.
5704 * interps.c: Remove _initialize_interpreter prototype.
5705 * iq2000-tdep.c: Remove _initialize_iq2000_tdep prototype.
5706 * jit.c: Remove _initialize_jit prototype.
5707 * language.c: Remove _initialize_language prototype.
5708 * linux-fork.c: Remove _initialize_linux_fork prototype.
5709 * linux-nat.c: Remove _initialize_linux_nat prototype.
5710 * linux-tdep.c: Remove _initialize_linux_tdep prototype.
5711 * linux-thread-db.c: Remove _initialize_thread_db prototype.
5712 * lm32-tdep.c: Remove _initialize_lm32_tdep prototype.
5713 * m2-lang.c: Remove _initialize_m2_language prototype.
5714 * m32c-tdep.c: Remove _initialize_m32c_tdep prototype.
5715 * m32r-linux-nat.c: Remove _initialize_m32r_linux_nat prototype.
5716 * m32r-linux-tdep.c: Remove _initialize_m32r_linux_tdep prototype.
5717 * m32r-tdep.c: Remove _initialize_m32r_tdep prototype.
5718 * m68hc11-tdep.c: Remove _initialize_m68hc11_tdep prototype.
5719 * m68k-bsd-nat.c: Remove _initialize_m68kbsd_nat prototype.
5720 * m68k-bsd-tdep.c: Remove _initialize_m68kbsd_tdep prototype.
5721 * m68k-linux-nat.c: Remove _initialize_m68k_linux_tdep prototype.
5722 * m68k-linux-tdep.c: Remove _initialize_m68k_linux_tdep prototype.
5723 * m68k-tdep.c: Remove _initialize_m68k_tdep prototype.
5724 * m88k-bsd-nat.c: Remove _initialize_m68kbsd_nat prototype.
5725 * m88k-tdep.c: Remove _initialize_m68kbsd_tdep prototype.
5726 * machoread.c: Remove _initialize_machoread prototype.
5727 * macrocmd.c: Remove _initialize_macrocmd prototype.
5728 * macroscope.c: Remove _initialize_macroscope prototype.
5729 * maint.c: Remove _initialize_maint_cmds prototype.
5730 * mdebugread.c: Remove _initialize_mdebugread prototype.
5731 * memattr.c: Remove _initialize_mem prototype.
5732 * mep-tdep.c: Remove _initialize_mep_tdep prototype.
5733 * mi/mi-cmd-env.c: Remove _initialize_mi_cmd_env prototype.
5734 * mi/mi-cmds.c: Remove _initialize_mi_cmds prototype.
5735 * mi/mi-interp.c: Remove _initialize_mi_interp prototype.
5736 * mi/mi-main.c: Remove _initialize_mi_main prototype.
5737 * microblaze-linux-tdep.c: Remove
5738 _initialize_microblaze_linux_tdep prototype.
5739 * microblaze-tdep.c: Remove _initialize_microblaze_tdep prototype.
5740 * mips-fbsd-nat.c: Remove _initialize_mips_fbsd_nat prototype.
5741 * mips-fbsd-tdep.c: Remove _initialize_mips_fbsd_tdep prototype.
5742 * mips-linux-nat.c: Remove _initialize_mips_linux_nat prototype.
5743 * mips-linux-tdep.c: Remove _initialize_mips_linux_tdep prototype.
5744 * mips-nbsd-nat.c: Remove _initialize_mipsnbsd_nat prototype.
5745 * mips-nbsd-tdep.c: Remove _initialize_mipsnbsd_tdep prototype.
5746 * mips-sde-tdep.c: Remove _initialize_mips_sde_tdep prototype.
5747 * mips-tdep.c: Remove _initialize_mips_tdep prototype.
5748 * mips64-obsd-nat.c: Remove _initialize_mips64obsd_nat prototype.
5749 * mips64-obsd-tdep.c: Remove _initialize_mips64obsd_tdep
5750 prototype.
5751 * mipsread.c: Remove _initialize_mipsread prototype.
5752 * mn10300-linux-tdep.c: Remove _initialize_mn10300_linux_tdep
5753 prototype.
5754 * mn10300-tdep.c: Remove _initialize_mn10300_tdep prototype.
5755 * moxie-tdep.c: Remove _initialize_moxie_tdep prototype.
5756 * msp430-tdep.c: Remove _initialize_msp430_tdep prototype.
5757 * mt-tdep.c: Remove _initialize_mt_tdep prototype.
5758 * nds32-tdep.c: Remove _initialize_nds32_tdep prototype.
5759 * nios2-linux-tdep.c: Remove _initialize_nios2_linux_tdep
5760 prototype.
5761 * nios2-tdep.c: Remove _initialize_nios2_tdep prototype.
5762 * nto-procfs.c: Remove _initialize_procfs prototype.
5763 * nto-tdep.c: Remove _initialize_nto_tdep prototype.
5764 * objc-lang.c: Remove _initialize_objc_language prototype.
5765 * objfiles.c: Remove _initialize_objfiles prototype.
5766 * observer.c: Remove observer_test_first_notification_function,
5767 observer_test_second_notification_function,
5768 observer_test_third_notification_function, and
5769 _initialize_observer prototypes.
5770 * opencl-lang.c: Remove _initialize_opencl_language prototypes.
5771 * osabi.c: Remove _initialize_gdb_osabi prototype.
5772 * osdata.c: Remove _initialize_osdata prototype.
5773 * p-valprint.c: Remove _initialize_pascal_valprint prototype.
5774 * parse.c: Remove _initialize_parse prototype.
5775 * ppc-fbsd-nat.c: Remove _initialize_ppcfbsd_nat prototype.
5776 * ppc-fbsd-tdep.c: Remove _initialize_ppcfbsd_tdep prototype.
5777 * ppc-linux-nat.c: Remove _initialize_ppc_linux_nat prototype.
5778 * ppc-linux-tdep.c: Remove _initialize_ppc_linux_tdep prototype.
5779 * ppc-nbsd-nat.c: Remove _initialize_ppcnbsd_nat prototype.
5780 * ppc-nbsd-tdep.c: Remove _initialize_ppcnbsd_tdep prototype.
5781 * ppc-obsd-nat.c: Remove _initialize_ppcobsd_nat prototype.
5782 * ppc-obsd-tdep.c: Remove _initialize_ppcobsd_tdep prototype.
5783 * printcmd.c: Remove _initialize_printcmd prototype.
5784 * probe.c: Remove _initialize_probe prototype.
5785 * proc-api.c: Remove _initialize_proc_api prototype.
5786 * proc-events.c: Remove _initialize_proc_events prototype.
5787 * proc-service.c: Remove _initialize_proc_service prototype.
5788 * procfs.c: Remove _initialize_procfs prototype.
5789 * psymtab.c: Remove _initialize_psymtab prototype.
5790 * python/python.c: Remove _initialize_python prototype.
5791 * ravenscar-thread.c: Remove _initialize_ravenscar prototype.
5792 * record-btrace.c: Remove _initialize_record_btrace prototype.
5793 * record-full.c: Remove _initialize_record_full prototype.
5794 * record.c: Remove _initialize_record prototype.
5795 * regcache.c: Remove _initialize_regcache prototype.
5796 * reggroups.c: Remove _initialize_reggroup prototype.
5797 * remote-notif.c: Remove _initialize_notif prototype.
5798 * remote-sim.c: Remove _initialize_remote_sim prototype.
5799 * remote.c: Remove _initialize_remote prototype.
5800 * reverse.c: Remove _initialize_reverse prototype.
5801 * rl78-tdep.c: Remove _initialize_rl78_tdep prototype.
5802 * rs6000-aix-tdep.c: Remove _initialize_rs6000_aix_tdep prototype.
5803 * rs6000-lynx178-tdep.c: Remove _initialize_rs6000_lynx178_tdep
5804 prototype.
5805 * rs6000-nat.c: Remove _initialize_rs6000_nat prototype.
5806 * rs6000-tdep.c: Remove _initialize_rs6000_tdep prototype.
5807 * rust-exp.y: Remove _initialize_rust_exp prototype.
5808 * rx-tdep.c: Remove _initialize_rx_tdep prototype.
5809 * s390-linux-nat.c: Remove _initialize_s390_nat prototype.
5810 * s390-linux-tdep.c: Remove _initialize_s390_tdep prototype.
5811 * score-tdep.c: Remove _initialize_score_tdep prototype.
5812 * selftest-arch.c: Remove _initialize_selftests_foreach_arch
5813 prototype.
5814 * ser-go32.c: Remove _initialize_ser_dos prototype.
5815 * ser-mingw.c: Remove _initialize_ser_windows prototype.
5816 * ser-pipe.c: Remove _initialize_ser_pipe prototype.
5817 * ser-tcp.c: Remove _initialize_ser_tcp prototype.
5818 * ser-unix.c: Remove _initialize_ser_hardwire prototype.
5819 * serial.c: Remove _initialize_serial prototype.
5820 * sh-linux-tdep.c: Remove _initialize_sh_linux_tdep prototype.
5821 * sh-nbsd-nat.c: Remove _initialize_shnbsd_nat prototype.
5822 * sh-nbsd-tdep.c: Remove _initialize_shnbsd_tdep prototype.
5823 * sh-tdep.c: Remove _initialize_sh_tdep prototype.
5824 * skip.c: Remove _initialize_step_skip prototype.
5825 * sol-thread.c: Remove _initialize_sol_thread prototype.
5826 * solib-aix.c: Remove _initialize_solib_aix prototype.
5827 * solib-darwin.c: Remove _initialize_darwin_solib prototype.
5828 * solib-dsbt.c: Remove _initialize_dsbt_solib prototype.
5829 * solib-frv.c: Remove _initialize_frv_solib prototype.
5830 * solib-spu.c: Remove _initialize_spu_solib prototype.
5831 * solib-svr4.c: Remove _initialize_svr4_solib prototype.
5832 * solib-target.c: Remove _initialize_solib_target prototype.
5833 * solib.c: Remove _initialize_solib prototype.
5834 * source.c: Remove _initialize_source prototype.
5835 * sparc-linux-nat.c: Remove _initialize_sparc_linux_nat prototype.
5836 * sparc-linux-tdep.c: Remove _initialize_sparc_linux_tdep
5837 prototype.
5838 * sparc-nat.c: Remove _initialize_sparc_nat prototype.
5839 * sparc-nbsd-nat.c: Remove _initialize_sparcnbsd_nat prototype.
5840 * sparc-nbsd-tdep.c: Remove _initialize_sparcnbsd_tdep prototype.
5841 * sparc-obsd-tdep.c: Remove _initialize_sparc32obsd_tdep
5842 prototype.
5843 * sparc-sol2-nat.c: Remove _initialize_sparc_sol2_nat prototype.
5844 * sparc-sol2-tdep.c: Remove _initialize_sparc_sol2_tdep prototype.
5845 * sparc-tdep.c: Remove _initialize_sparc_tdep prototype.
5846 * sparc64-fbsd-nat.c: Remove _initialize_sparc64fbsd_nat
5847 prototype.
5848 * sparc64-fbsd-tdep.c: Remove _initialize_sparc64fbsd_tdep
5849 prototype.
5850 * sparc64-linux-nat.c: Remove _initialize_sparc64_linux_nat
5851 prototype.
5852 * sparc64-linux-tdep.c: Remove _initialize_sparc64_linux_tdep
5853 prototype.
5854 * sparc64-nat.c: Remove _initialize_sparc64_nat prototype.
5855 * sparc64-nbsd-nat.c: Remove _initialize_sparc64nbsd_nat
5856 prototype.
5857 * sparc64-nbsd-tdep.c: Remove _initialize_sparc64nbsd_tdep
5858 prototype.
5859 * sparc64-obsd-nat.c: Remove _initialize_sparc64obsd_nat
5860 prototype.
5861 * sparc64-obsd-tdep.c: Remove _initialize_sparc64obsd_tdep
5862 prototype.
5863 * sparc64-sol2-tdep.c: Remove _initialize_sparc64_sol2_tdep
5864 prototype.
5865 * spu-linux-nat.c: Remove _initialize_spu_nat prototype.
5866 * spu-multiarch.c: Remove _initialize_spu_multiarch prototype.
5867 * spu-tdep.c: Remove _initialize_spu_tdep prototype.
5868 * stabsread.c: Remove _initialize_stabsread prototype.
5869 * stack.c: Remove _initialize_stack prototype.
5870 * stap-probe.c: Remove _initialize_stap_probe prototype.
5871 * std-regs.c: Remove _initialize_frame_reg prototype.
5872 * symfile-debug.c: Remove _initialize_symfile_debug prototype.
5873 * symfile-mem.c: Remove _initialize_symfile_mem prototype.
5874 * symfile.c: Remove _initialize_symfile prototype.
5875 * symmisc.c: Remove _initialize_symmisc prototype.
5876 * symtab.c: Remove _initialize_symtab prototype.
5877 * target-dcache.c: Remove _initialize_target_dcache prototype.
5878 * target-descriptions.c: Remove _initialize_target_descriptions
5879 prototype.
5880 * thread.c: Remove _initialize_thread prototype.
5881 * tic6x-linux-tdep.c: Remove _initialize_tic6x_linux_tdep
5882 prototype.
5883 * tic6x-tdep.c: Remove _initialize_tic6x_tdep prototype.
5884 * tilegx-linux-nat.c: Remove _initialize_tile_linux_nat prototype.
5885 * tilegx-linux-tdep.c: Remove _initialize_tilegx_linux_tdep
5886 prototype.
5887 * tilegx-tdep.c: Remove _initialize_tilegx_tdep prototype.
5888 * tracefile-tfile.c: Remove _initialize_tracefile_tfile prototype.
5889 * tracefile.c: Remove _initialize_tracefile prototype.
5890 * tracepoint.c: Remove _initialize_tracepoint prototype.
5891 * tui/tui-hooks.c: Remove _initialize_tui_hooks prototype.
5892 * tui/tui-interp.c: Remove _initialize_tui_interp prototype.
5893 * tui/tui-layout.c: Remove _initialize_tui_layout prototype.
5894 * tui/tui-regs.c: Remove _initialize_tui_regs prototype.
5895 * tui/tui-stack.c: Remove _initialize_tui_stack prototype.
5896 * tui/tui-win.c: Remove _initialize_tui_win prototype.
5897 * tui/tui.c: Remove _initialize_tui prototype.
5898 * typeprint.c: Remove _initialize_typeprint prototype.
5899 * user-regs.c: Remove _initialize_user_regs prototype.
5900 * utils.c: Remove _initialize_utils prototype.
5901 * v850-tdep.c: Remove _initialize_v850_tdep prototype.
5902 * valarith.c: Remove _initialize_valarith prototype.
5903 * valops.c: Remove _initialize_valops prototype.
5904 * valprint.c: Remove _initialize_valprint prototype.
5905 * value.c: Remove _initialize_values prototype.
5906 * varobj.c: Remove _initialize_varobj prototype.
5907 * vax-bsd-nat.c: Remove _initialize_vaxbsd_nat prototype.
5908 * vax-nbsd-tdep.c: Remove _initialize_vaxnbsd_tdep prototype.
5909 * vax-tdep.c: Remove _initialize_vax_tdep prototype.
5910 * windows-nat.c: Remove _initialize_windows_nat,
5911 _initialize_check_for_gdb_ini, and _initialize_loadable
5912 prototypes.
5913 * windows-tdep.c: Remove _initialize_windows_tdep prototype.
5914 * xcoffread.c: Remove _initialize_xcoffread prototype.
5915 * xml-support.c: Remove _initialize_xml_support prototype.
5916 * xstormy16-tdep.c: Remove _initialize_xstormy16_tdep prototype.
5917 * xtensa-linux-nat.c: Remove _initialize_xtensa_linux_nat
5918 prototype.
5919 * xtensa-linux-tdep.c: Remove _initialize_xtensa_linux_tdep
5920 prototype.
5921 * xtensa-tdep.c: Remove _initialize_xtensa_tdep prototype.
5922
5923 2017-09-08 Keith Seitz <keiths@redhat.com>
5924
5925 * dwarf2read.c (struct field_info) <fnfields>: Remove unused
5926 field.
5927
5928 2017-09-08 Christoph Weinmann <christoph.t.weinmann@intel.com>
5929
5930 * f-valprint.c (f_val_print): Remove check for one byte
5931 sized integers. Remove printing of character type.
5932
5933 2017-09-08 Frank Penczek <frank.penczek@intel.com>
5934 Christoph Weinmann <christoph.t.weinmann@intel.com>
5935 Bernhard Heckel <bernhard.heckel@intel.com>
5936
5937 * f-typeprint.c (f_type_print_base): Use fprintfi_filtered
5938 to maintain proper indentation when printing pointers/refs.
5939
5940 2017-09-07 Joel Brobecker <brobecker@adacore.com>
5941
5942 GDB 8.0.1 released.
5943
5944 2017-09-07 Joel Brobecker <brobecker@adacore.com>
5945
5946 * NEWS (Changes in GDB 7.11): Remove entry for QStartupWithShell.
5947
5948 2017-09-05 Tom Tromey <tom@tromey.com>
5949
5950 * parse.c (funcall_chain): Now a std::vector.
5951 (start_arglist, end_arglist): Simplify.
5952 (free_funcalls): Remove.
5953 (parse_exp_in_context_1): Remove cleanup.
5954
5955 2017-09-05 Tom Tromey <tom@tromey.com>
5956
5957 * go-exp.y (go_parse): Don't create a cleanup.
5958
5959 2017-09-05 Tom Tromey <tom@tromey.com>
5960
5961 * d-exp.y (PrimaryExpression): Use std::string.
5962 (d_parse): Don't create a cleanup.
5963
5964 2017-09-05 Tom Tromey <tom@tromey.com>
5965
5966 * utils.c (do_clear_parser_state): Remove.
5967 (make_cleanup_clear_parser_state): Remove.
5968 * p-exp.y (pascal_parse): Use scoped_restore.
5969 * m2-exp.y (m2_parse): Use scoped_restore.
5970 * f-exp.y (f_parse): Use scoped_restore.
5971 * d-exp.y (d_parse): Use scoped_restore.
5972 * c-exp.y (c_parse): Use scoped_restore.
5973 * ada-exp.y (ada_parse): Use scoped_restore.
5974 * utils.h (make_cleanup_clear_parser_state): Remove.
5975
5976 2017-09-06 Keith Seitz <keiths@redhat.com>
5977
5978 * dwarf2read.c (dw2_linkage_name_attr): New function.
5979 (dw2_linkage_name): New function.
5980 (dwarf2_compute_name, dwarf2_physname, read_call_site_scope)
5981 (guess_full_die_structure_name, dwarf2_name): Use dw2_linkage_name.
5982 (anonymous_struct_prefix, dwarf2_name): Use dw2_linkage_name_attr.
5983
5984 2017-09-06 Kamil Rytarowski <n54@gmx.com>
5985
5986 * config/djgpp/djconfig.sh: Correct shell portability issue.
5987
5988 2017-09-06 Kamil Rytarowski <n54@gmx.com>
5989
5990 * configure.nat: Define HAVE_NATIVE_GCORE_HOST on NetBSD.
5991
5992 2017-09-06 John Baldwin <jhb@FreeBSD.org>
5993
5994 * Makefile.in (ALLDEPFILES): Add mips-fbsd-nat.c.
5995 * NEWS: Mention new FreeBSD/mips native configuration.
5996 * configure.host: Add aarch64*-*-freebsd*.
5997 * configure.nat: Likewise.
5998 * aarch64-fbsd-nat.c: New file.
5999
6000 2017-09-06 John Baldwin <jhb@FreeBSD.org>
6001
6002 * Makefile.in (ALL_64_TARGET_OBS): Add aarch64-fbsd-tdep.o.
6003 (ALLDEPFILES): Add aarch64-fbsd-tdep.c.
6004 * NEWS: Mention new FreeBSD/aarch64 target.
6005 * configure.tgt: Add aarch64*-*-freebsd*.
6006 * aarch64-fbsd-tdep.c: New file.
6007 * aarch64-fbsd-tdep.h: New file.
6008
6009 2017-09-06 Kamil Rytarowski <n54@gmx.com>
6010
6011 * MAINTAINERS (Write After Approval): Add Kamil Rytarowski.
6012
6013 2017-09-06 Jan Kratochvil <jan.kratochvil@redhat.com>
6014
6015 * parse.c (find_minsym_type_and_address): Don't relocate addresses
6016 of TLS symbols.
6017
6018 2017-09-05 Philippe Waroquiers <philippe.waroquiers@skynet.be>
6019
6020 * objfiles.c (get_objfile_bfd_data): Remove useless obstack_init
6021 call.
6022
6023 2017-09-05 Simon Marchi <simon.marchi@ericsson.com>
6024
6025 * infrun.c (follow_exec): Call add_thread after
6026 target_find_description.
6027
6028 2017-09-05 Simon Marchi <simon.marchi@ericsson.com>
6029
6030 * infrun.c (handle_inferior_event_1): When exec'ing, read
6031 stop_pc after follow_exec.
6032
6033 2017-09-05 Simon Marchi <simon.marchi@ericsson.com>
6034
6035 * remote.c (process_g_packet): Update error message.
6036
6037 2017-09-05 Yao Qi <yao.qi@linaro.org>
6038
6039 * configure.tgt (gdb_target_obs): Add i386.o for x86_64-*
6040 targets.
6041
6042 2017-09-05 Pedro Alves <palves@redhat.com>
6043
6044 * eval.c (eval_call, evaluate_funcall): New functions, factored
6045 out from ...
6046 (evaluate_subexp_standard): ... this.
6047
6048 2017-09-05 Yao Qi <yao.qi@linaro.org>
6049
6050 * amd64-tdep.c (amd64_target_description): Create target
6051 descriptions.
6052 (_initialize_amd64_tdep): Don't call functions
6053 initialize_tdesc_amd64_*. Add self tests.
6054 * arch/amd64.c (amd64_create_target_description): Add parameter
6055 is_linux. Call set_tdesc_osabi if is_linux is true.
6056 * arch/amd64.h (amd64_create_target_description): Update the
6057 declaration.
6058 * arch/i386.c (i386_create_target_description): Add parameter
6059 is_linux. Call set_tdesc_osabi if is_linux is true.
6060 * arch/i386.h (i386_create_target_description): Update
6061 declaration.
6062 * configure.tgt: Add i386.o to gdb_target_obs.
6063 * features/Makefile (XMLTOC): Remove i386/*.xml.
6064 * features/i386/amd64-avx-avx512.c: Remove.
6065 * features/i386/amd64-avx-mpx-avx512-pku.c: Remove.
6066 * features/i386/amd64-avx-mpx.c: Remove.
6067 * features/i386/amd64-avx.c: Remove.
6068 * features/i386/amd64-mpx.c: Remove.
6069 * features/i386/amd64.c: Remove.
6070 * features/i386/i386-avx-avx512.c: Remove.
6071 * features/i386/i386-avx-mpx-avx512-pku.c: Remove.
6072 * features/i386/i386-avx-mpx.c: Remove.
6073 * features/i386/i386-avx.c: Remove.
6074 * features/i386/i386-mmx.c: Remove.
6075 * features/i386/i386-mpx.c: Remove.
6076 * features/i386/i386.c: Remove.
6077 * i386-tdep.c: Don't include features/i386/i386*.c., include
6078 target-descriptions.h and arch/i386.h.
6079 (i386_target_description): Create target descriptions.
6080 (i386_gdbarch_init): Don't call initialize_tdesc_i386_*
6081 functions. Do self tests.
6082
6083 2017-09-05 Yao Qi <yao.qi@linaro.org>
6084
6085 * features/Makefile (XMLTOC): Remove i386/amd64XXX-linux.xml.
6086 * features/i386/amd64-avx-avx512-linux.c: Removed.
6087 * features/i386/amd64-avx-linux.c: Removed.
6088 * features/i386/amd64-avx-mpx-avx512-pku-linux.c: Removed.
6089 * features/i386/amd64-avx-mpx-linux.c: Removed.
6090 * features/i386/amd64-linux.c: Removed.
6091 * features/i386/amd64-mpx-linux.c: Removed.
6092 * features/i386/x32-avx-avx512-linux.c: Removed.
6093 * features/i386/x32-avx-linux.c: Removed.
6094 * features/i386/x32-linux.c: Removed.
6095
6096 2017-09-05 Yao Qi <yao.qi@linaro.org>
6097
6098 * amd64-linux-tdep.c: Include arch/amd64.h. Don't include
6099 features/i386/*.c.
6100 (amd64_linux_read_description): Call
6101 amd64_create_target_description.
6102 * arch/amd64.c: New file.
6103 * arch/amd64.h: New file.
6104 * configure.tgt (x86_64-*-linux*): Append amd64.o.
6105 * Makefile.in (ALL_64_TARGET_OBS): Append amd64.o.
6106
6107 2017-09-05 Yao Qi <yao.qi@linaro.org>
6108
6109 * amd64-linux-tdep.c: Don't include amd64-XXX-linux and
6110 x32-XXX-linux.c. Include 64bit-XX.c and x32-XX.c.
6111 (amd64_linux_read_description): Create target descriptions.
6112 (_initialize_amd64_linux_tdep): Don't call initialize_tdesc_XXX
6113 functions. Add unit tests.
6114 * features/Makefile (FEATURE_XMLFILES): Append 64bit-XXX.xml and
6115 x32-core.xml.
6116 * features/i386/64bit-avx.c: Generated.
6117 * features/i386/64bit-avx512.c: Generated.
6118 * features/i386/64bit-core.c: Generated.
6119 * features/i386/64bit-linux.c: Generated.
6120 * features/i386/64bit-mpx.c: Generated.
6121 * features/i386/64bit-pkeys.c: Generated.
6122 * features/i386/64bit-segments.c: Generated.
6123 * features/i386/64bit-sse.c: Generated.
6124 * features/i386/x32-core.c: Generated.
6125 * target-descriptions.c (maint_print_c_tdesc_cmd): Print feature
6126 c files for amd64-linux and x32-linux.
6127
6128 2017-09-05 Yao Qi <yao.qi@linaro.org>
6129
6130 * amd64-linux-tdep.c (amd64_linux_read_description): New
6131 function.
6132 (amd64_linux_core_read_description): Call
6133 amd64_linux_read_description.
6134 (amd64_linux_init_abi): Likewise.
6135 (amd64_x32_linux_init_abi): Likewise.
6136 * amd64-linux-tdep.h (amd64_linux_read_description): Declare.
6137 * x86-linux-nat.c (x86_linux_read_description): Call
6138 amd64_linux_read_description.
6139
6140 2017-09-05 Yao Qi <yao.qi@linaro.org>
6141
6142 * amd64-linux-tdep.c (amd64_linux_core_read_description): Update
6143 comments.
6144
6145 2017-09-05 Yao Qi <yao.qi@linaro.org>
6146
6147 * features/Makefile (XMLTOC): Remove i386/i386-XX-linux.xml.
6148 * features/i386/i386-avx-avx512-linux.c: Remove.
6149 * features/i386/i386-avx-linux.c: Remove.
6150 * features/i386/i386-avx-mpx-avx512-pku-linux.c: Remove.
6151 * features/i386/i386-avx-mpx-linux.c: Remove.
6152 * features/i386/i386-linux.c: Remove.
6153 * features/i386/i386-mmx-linux.c: Remove.
6154 * features/i386/i386-mpx-linux.c: Remove.
6155
6156 2017-09-05 Yao Qi <yao.qi@linaro.org>
6157
6158 * Makefile.in (ALL_TARGET_OBS): Add i386.o.
6159 (SFILES): Add arch/i386.c.
6160 (HFILES_NO_SRCDIR): Add arch/i386.h.
6161 * arch/i386.c: New file.
6162 * arch/i386.h: New file.
6163 * arch/tdesc.h (allocate_target_description): Declare.
6164 (set_tdesc_architecture): Declare.
6165 (set_tdesc_osabi): Declare.
6166 * configure.tgt (i[34567]86-*-linux*): Add i386.o.
6167 * i386-linux-tdep.c: Don't include ../features/i386/32bit-XXX.c.
6168 include arch/i386.h.
6169 (i386_linux_read_description): Remove code and call
6170 i386_create_target_description.
6171 (set_tdesc_architecture): New function.
6172 (set_tdesc_osabi): New function.
6173 * target-descriptions.h (allocate_target_description): Remove.
6174
6175 2017-09-05 Yao Qi <yao.qi@linaro.org>
6176
6177 * arch/tdesc.h (tdesc_create_feature): Add an argument xml.
6178 * target-descriptions.c (tdesc_create_feature): Likewise, and
6179 adjust code.
6180 * features/i386/32bit-avx.c: Re-generated.
6181 * features/i386/32bit-avx512.c: Re-generated.
6182 * features/i386/32bit-core.c: Re-generated.
6183 * features/i386/32bit-linux.c: Re-generated.
6184 * features/i386/32bit-mpx.c: Re-generated.
6185 * features/i386/32bit-pkeys.c: Re-generated.
6186 * features/i386/32bit-sse.c: Re-generated.
6187
6188 2017-09-05 Yao Qi <yao.qi@linaro.org>
6189
6190 * regformats/regdef.h (struct reg): Override operator == and !=.
6191
6192 2017-09-05 Yao Qi <yao.qi@linaro.org>
6193
6194 * arch/tdesc.h: New file.
6195 * regformats/regdat.sh: Generate code using tdesc_create_reg.
6196 * target-descriptions.c: Update comments.
6197 * target-descriptions.h: Include "arch/tdesc.h". Remove the
6198 declarations.
6199 * features/i386/32bit-avx.c: Re-generated.
6200 * features/i386/32bit-avx512.c: Re-generated.
6201 * features/i386/32bit-core.c: Re-generated.
6202 * features/i386/32bit-linux.c: Re-generated.
6203 * features/i386/32bit-mpx.c: Re-generated.
6204 * features/i386/32bit-pkeys.c: Re-generated.
6205 * features/i386/32bit-sse.c: Re-generated.
6206
6207 2017-09-05 Yao Qi <yao.qi@linaro.org>
6208
6209 * regformats/regdat.sh: Update generated code.
6210
6211 2017-09-05 Yao Qi <yao.qi@linaro.org>
6212
6213 * regformats/regdat.sh: Adjust code order.
6214
6215 2017-09-05 Simon Marchi <simon.marchi@ericsson.com>
6216
6217 * expprint.c (dump_subexp_body_standard): Use constant format
6218 string in fprintf_filtered call.
6219
6220 2017-09-04 John Baldwin <jhb@FreeBSD.org>
6221
6222 * configure.nat: Add "x86-nat.o x86-dregs.o" for NetBSD/amd64 and
6223 NetBSD/i386.
6224 * x86-bsd-nat.c [!DBREG_DRX && __NetBSD__]: Define DBREG_DRX.
6225
6226 2017-09-04 John Baldwin <jhb@FreeBSD.org>
6227
6228 * bsd-kvm.o: Make <sys/user.h> conditional on HAVE_SYS_USER_H.
6229
6230 2017-09-04 John Baldwin <jhb@FreeBSD.org>
6231
6232 * bsd-kvm.o: Define _KMEMUSER.
6233 * configure.ac: Define _KMEMUSER when checking for "struct lwp".
6234 * configure: Regenerate.
6235
6236 2017-09-04 John Baldwin <jhb@FreeBSD.org>
6237
6238 * amd64-fbsd-nat.c: Add include of "x86-xstate.h".
6239 * i386-fbsd-nat.c: Likewise.
6240
6241 2017-09-04 John Baldwin <jhb@FreeBSD.org>
6242
6243 * unittests/array-view-selftests.c: Add include of <array>.
6244
6245 2017-09-04 John Baldwin <jhb@FreeBSD.org>
6246
6247 * spu-tdep.c (flush_ea_cache): Add missing argument to
6248 call_function_by_hand.
6249
6250 2017-09-04 Pedro Alves <palves@redhat.com>
6251
6252 * NEWS (Safer support for debugging with no debug info): New.
6253
6254 2017-09-04 Pedro Alves <palves@redhat.com>
6255
6256 * c-exp.y (function_method, function_method_void): Add current
6257 instance flags to TYPE_INSTANCE.
6258 * dwarf2read.c (check_modifier): New.
6259 (compute_delayed_physnames): Assert that only C++ adds delayed
6260 physnames. Mark fn_fields as const/volatile depending on
6261 physname.
6262 * eval.c (make_params): New type_instance_flags parameter. Use
6263 it as the new type's instance flags.
6264 (evaluate_subexp_standard) <TYPE_INSTANCE>: Extract the instance
6265 flags element and pass it to make_params.
6266 * expprint.c (print_subexp_standard) <TYPE_INSTANCE>: Handle
6267 instance flags element.
6268 (dump_subexp_body_standard) <TYPE_INSTANCE>: Likewise.
6269 * gdbtypes.h: Include "enum-flags.h".
6270 (type_instance_flags): New enum-flags type.
6271 (TYPE_CONST, TYPE_VOLATILE, TYPE_RESTRICT, TYPE_ATOMIC)
6272 (TYPE_CODE_SPACE, TYPE_DATA_SPACE): Return boolean.
6273 * parse.c (operator_length_standard) <TYPE_INSTANCE>: Adjust.
6274 (follow_type_instance_flags): New function.
6275 (operator_check_standard) <TYPE_INSTANCE>: Adjust.
6276 * parser-defs.h (follow_type_instance_flags): Declare.
6277 * valops.c (value_struct_elt_for_reference): const/volatile must
6278 match too.
6279
6280 2017-09-04 Pedro Alves <palves@redhat.com>
6281
6282 * cp-namespace.c (cp_search_static_and_baseclasses): Handle
6283 function/method scopes; lookup the nested name as a function local
6284 static variable.
6285
6286 2017-09-04 Pedro Alves <palves@redhat.com>
6287
6288 (%type <voidval>): Add function_method.
6289 * c-exp.y (exp): New production for calls with no arguments.
6290 (function_method, function_method_void_or_typelist): New
6291 productions.
6292 (exp): New production for "method()::static_var".
6293 * eval.c (evaluate_subexp_standard): Handle OP_FUNC_STATIC_VAR.
6294 * expprint.c (print_subexp_standard, dump_subexp_body_standard):
6295 Handle OP_FUNC_STATIC_VAR.
6296 * parse.c (operator_length_standard):
6297 Handle OP_FUNC_STATIC_VAR.
6298
6299 2017-09-04 Pedro Alves <palves@redhat.com>
6300
6301 * eval.c (evaluate_subexp_standard): Remove UNOP_MEMVAL_TLS
6302 handling.
6303 * expprint.c (print_subexp_standard, dump_subexp_body_standard):
6304 Ditto.
6305 * parse.c (operator_length_standard, operator_check_standard):
6306 Ditto.
6307 * std-operator.def (UNOP_MEMVAL_TLS): Delete.
6308
6309 2017-09-04 Pedro Alves <palves@redhat.com>
6310
6311 * ax-gdb.c: Include "typeprint.h".
6312 (gen_expr_for_cast): New function.
6313 (gen_expr) <OP_CAST, OP_CAST_TYPE>: Use it.
6314 <OP_VAR_VALUE, OP_MSYM_VAR_VALUE>: Error out if the variable's
6315 type is unknown.
6316 * dwarf2read.c (new_symbol_full): Fallback to int instead of
6317 nodebug_data_symbol.
6318 * eval.c: Include "typeprint.h".
6319 (evaluate_subexp_standard) <OP_VAR_VALUE, OP_VAR_MSYM_VALUE>:
6320 Error out if symbol has unknown type.
6321 <UNOP_CAST, UNOP_CAST_TYPE>: Common bits factored out to
6322 evaluate_subexp_for_cast.
6323 (evaluate_subexp_for_address, evaluate_subexp_for_sizeof): Handle
6324 OP_VAR_MSYM_VALUE.
6325 (evaluate_subexp_for_cast): New function.
6326 * gdbtypes.c (init_nodebug_var_type): New function.
6327 (objfile_type): Use it to initialize types of variables with no
6328 debug info.
6329 * typeprint.c (error_unknown_type): New.
6330 * typeprint.h (error_unknown_type): New declaration.
6331 * compile/compile-c-types.c (convert_type_basic): Handle
6332 TYPE_CODE_ERROR; warn and fallback to int for variables with
6333 unknown type.
6334
6335 2017-09-04 Pedro Alves <palves@redhat.com>
6336
6337 * eval.c (evaluate_var_value): New function, factored out from ...
6338 (evaluate_subexp_standard): ... here.
6339
6340 2017-09-04 Pedro Alves <palves@redhat.com>
6341
6342 * eval.c (evaluate_subexp_standard) <UNOP_COMPLEMENT, UNOP_ADDR>:
6343 Remove useless assignments to 'op'.
6344
6345 2017-09-04 Pedro Alves <palves@redhat.com>
6346
6347 * eval.c (eval_skip_value): New function.
6348 (evaluate_subexp_standard): Use it.
6349
6350 2017-09-04 Pedro Alves <palves@redhat.com>
6351
6352 * eval.c (evaluate_subexp_standard): <OP_FUNCALL>: Extract
6353 function name from symbol/minsym and pass it to
6354 error_call_unknown_return_type.
6355
6356 2017-09-04 Pedro Alves <palves@redhat.com>
6357
6358 * ada-lang.c (resolve_subexp): Handle OP_VAR_MSYM_VALUE.
6359 * ax-gdb.c (gen_msym_var_ref): New function.
6360 (gen_expr): Handle OP_VAR_MSYM_VALUE.
6361 * eval.c (evaluate_var_msym_value): New function.
6362 * eval.c (evaluate_subexp_standard): Handle OP_VAR_MSYM_VALUE.
6363 <OP_FUNCALL>: Extract function name from symbol/minsym and pass it
6364 to call_function_by_hand.
6365 * expprint.c (print_subexp_standard, dump_subexp_body_standard):
6366 Handle OP_VAR_MSYM_VALUE.
6367 (union exp_element) <msymbol>: New field.
6368 * minsyms.h (struct type): Forward declare.
6369 (find_minsym_type_and_address): Declare.
6370 * parse.c (write_exp_elt_msym): New function.
6371 (write_exp_msymbol): Delete, refactored as ...
6372 (find_minsym_type_and_address): ... this new function.
6373 (write_exp_msymbol): Reimplement using OP_VAR_MSYM_VALUE.
6374 (operator_length_standard, operator_check_standard): Handle
6375 OP_VAR_MSYM_VALUE.
6376 * std-operator.def (OP_VAR_MSYM_VALUE): New.
6377
6378 2017-09-04 Pedro Alves <palves@redhat.com>
6379
6380 * ada-lang.c (ada_evaluate_subexp) <TYPE_CODE_FUNC>: Don't handle
6381 TYPE_GNU_IFUNC specially here. Throw error if return type is
6382 unknown.
6383 * ada-typeprint.c (print_func_type): Handle functions with unknown
6384 return type.
6385 * c-typeprint.c (c_type_print_base): Handle functions and methods
6386 with unknown return type.
6387 * compile/compile-c-symbols.c (convert_symbol_bmsym)
6388 <mst_text_gnu_ifunc>: Use nodebug_text_gnu_ifunc_symbol.
6389 * compile/compile-c-types.c: Include "objfiles.h".
6390 (convert_func): For functions with unknown return type, warn and
6391 default to int.
6392 * compile/compile-object-run.c (compile_object_run): Adjust call
6393 to call_function_by_hand_dummy.
6394 * elfread.c (elf_gnu_ifunc_resolve_addr): Adjust call to
6395 call_function_by_hand.
6396 * eval.c (evaluate_subexp_standard): Adjust calls to
6397 call_function_by_hand. Handle functions and methods with unknown
6398 return type. Pass expect_type to call_function_by_hand.
6399 * f-typeprint.c (f_type_print_base): Handle functions with unknown
6400 return type.
6401 * gcore.c (call_target_sbrk): Adjust call to
6402 call_function_by_hand.
6403 * gdbtypes.c (objfile_type): Leave nodebug text symbol with NULL
6404 return type instead of int. Make nodebug_text_gnu_ifunc_symbol be
6405 an integer address type instead of nodebug.
6406 * guile/scm-value.c (gdbscm_value_call): Adjust call to
6407 call_function_by_hand.
6408 * infcall.c (error_call_unknown_return_type): New function.
6409 (call_function_by_hand): New "default_return_type" parameter.
6410 Pass it down.
6411 (call_function_by_hand_dummy): New "default_return_type"
6412 parameter. Use it instead of defaulting to int. If there's no
6413 default and the return type is unknown, throw an error. If
6414 there's a default return type, and the called function has no
6415 debug info, then assume the function is prototyped.
6416 * infcall.h (call_function_by_hand, call_function_by_hand_dummy):
6417 New "default_return_type" parameter.
6418 (error_call_unknown_return_type): New declaration.
6419 * linux-fork.c (call_lseek): Cast return type of lseek.
6420 (inferior_call_waitpid, checkpoint_command): Adjust calls to
6421 call_function_by_hand.
6422 * linux-tdep.c (linux_infcall_mmap, linux_infcall_munmap): Adjust
6423 calls to call_function_by_hand.
6424 * m2-typeprint.c (m2_procedure): Handle functions with unknown
6425 return type.
6426 * objc-lang.c (lookup_objc_class, lookup_child_selector)
6427 (value_nsstring, print_object_command): Adjust calls to
6428 call_function_by_hand.
6429 * p-typeprint.c (pascal_type_print_varspec_prefix): Handle
6430 functions with unknown return type.
6431 (pascal_type_print_func_varspec_suffix): New function.
6432 (pascal_type_print_varspec_suffix) <TYPE_CODE_FUNC,
6433 TYPE_CODE_METHOD>: Use it.
6434 * python/py-value.c (valpy_call): Adjust call to
6435 call_function_by_hand.
6436 * rust-lang.c (rust_evaluate_funcall): Adjust call to
6437 call_function_by_hand.
6438 * valarith.c (value_x_binop, value_x_unop): Adjust calls to
6439 call_function_by_hand.
6440 * valops.c (value_allocate_space_in_inferior): Adjust call to
6441 call_function_by_hand.
6442 * typeprint.c (type_print_unknown_return_type): New function.
6443 * typeprint.h (type_print_unknown_return_type): New declaration.
6444
6445 2017-09-04 Pedro Alves <palves@redhat.com>
6446
6447 * gdbtypes.c (lookup_function_type_with_arguments): Mark function
6448 types with more than one parameter as prototyped.
6449
6450 2017-09-04 Pedro Alves <palves@redhat.com>
6451
6452 * cli/cli-cmds.c (print_disassembly, disassemble_current_function)
6453 (disassemble_command): Use gdb_disassembly_flags instead of bare
6454 int.
6455 * disasm.c (gdb_pretty_print_disassembler::pretty_print_insn)
6456 (dump_insns, do_mixed_source_and_assembly_deprecated)
6457 (do_mixed_source_and_assembly, do_assembly_only, gdb_disassembly):
6458 Use gdb_disassembly_flags instead of bare int.
6459 * disasm.h (DISASSEMBLY_SOURCE_DEPRECATED, DISASSEMBLY_RAW_INSN)
6460 (DISASSEMBLY_OMIT_FNAME, DISASSEMBLY_FILENAME)
6461 (DISASSEMBLY_OMIT_PC, DISASSEMBLY_SOURCE)
6462 (DISASSEMBLY_SPECULATIVE): No longer macros. Instead they're...
6463 (enum gdb_disassembly_flag): ... values of this new enumeration.
6464 (gdb_disassembly_flags): Define.
6465 (gdb_disassembly)
6466 (gdb_pretty_print_disassembler::pretty_print_insn): Use it.
6467 * mi/mi-cmd-disas.c (mi_cmd_disassemble): Use
6468 gdb_disassembly_flags instead of bare int.
6469 * record-btrace.c (btrace_insn_history)
6470 (record_btrace_insn_history, record_btrace_insn_history_range)
6471 (record_btrace_insn_history_from): Use gdb_disassembly_flags
6472 instead of bare int.
6473 * record.c (get_insn_history_modifiers, cmd_record_insn_history):
6474 Use gdb_disassembly_flags instead of bare int.
6475 * target-debug.h (target_debug_print_gdb_disassembly_flags):
6476 Define.
6477 * target-delegates.c: Regenerate.
6478 * target.c (target_insn_history, target_insn_history_from)
6479 (target_insn_history_range): Use gdb_disassembly_flags instead of
6480 bare int.
6481 * target.h: Include "disasm.h".
6482 (struct target_ops) <to_insn_history, to_insn_history_from,
6483 to_insn_history_range>: Use gdb_disassembly_flags instead of bare
6484 int.
6485 (target_insn_history, target_insn_history_from)
6486 (target_insn_history_range): Use gdb_disassembly_flags instead of
6487 bare int.
6488
6489 2017-09-04 Simon Marchi <simon.marchi@ericsson.com>
6490
6491 * cli/cli-script.c (build_command_line): For if/while commands,
6492 check whether args is empty.
6493
6494 2017-09-04 Simon Marchi <simon.marchi@ericsson.com>
6495
6496 * cli/cli-script.h (enum misc_command_type): Move from defs.h.
6497 (enum command_control_type): Likewise.
6498 (struct command_line): Likewise.
6499 (free_command_lines): Likewise.
6500 (struct command_lines_deleter): Likewise.
6501 (command_line_up): Likewise.
6502 (read_command_lines): Likewise.
6503 (read_command_lines_1): Likewise.
6504 * defs.h (enum misc_command_type): Move to cli/cli-script.h.
6505 (enum command_control_type): Likewise.
6506 (struct command_line): Likewise.
6507 (free_command_lines): Likewise.
6508 (struct command_lines_deleter): Likewise.
6509 (command_line_up): Likewise.
6510 (read_command_lines): Likewise.
6511 (read_command_lines_1): Likewise.
6512 * breakpoint.h: Include cli/cli-script.h.
6513 * extension-priv.h: Likewise.
6514 * gdbcmd.h: Likewise.
6515
6516 2017-09-04 Pedro Alves <palves@redhat.com>
6517
6518 * ada-lang.c (is_known_support_routine): Move sal declaration to
6519 where it is initialized.
6520 * breakpoint.c (create_internal_breakpoint, init_catchpoint)
6521 (parse_breakpoint_sals, decode_static_tracepoint_spec)
6522 (clear_command, update_static_tracepoint): Remove init_sal
6523 references. Move declarations closer to initializations.
6524 * cli/cli-cmds.c (list_command): Move sal declarations closer to
6525 initializations.
6526 * elfread.c (elf_gnu_ifunc_resolver_stop): Remove init_sal
6527 references. Move sal declarations closer to initializations.
6528 * frame.c (find_frame_sal): Return a symtab_and_line via function
6529 return instead of output parameter. Remove init_sal references.
6530 * frame.h (find_frame_sal): Return a symtab_and_line via function
6531 return instead of output parameter.
6532 * guile/scm-frame.c (gdbscm_frame_sal): Adjust.
6533 * guile/scm-symtab.c (stscm_make_sal_smob): Use in-place new
6534 instead of memset.
6535 (gdbscm_find_pc_line): Remove init_sal reference.
6536 * infcall.c (call_function_by_hand_dummy): Remove init_sal
6537 references. Move declarations closer to initializations.
6538 * infcmd.c (set_step_frame): Update. Move declarations closer to
6539 initializations.
6540 (finish_backward): Remove init_sal references. Move declarations
6541 closer to initializations.
6542 * infrun.c (process_event_stop_test, handle_step_into_function)
6543 (insert_hp_step_resume_breakpoint_at_frame)
6544 (insert_step_resume_breakpoint_at_caller): Likewise.
6545 * linespec.c (create_sals_line_offset, decode_digits_ordinary)
6546 (symbol_to_sal): Likewise.
6547 * probe.c (parse_probes_in_pspace): Remove init_sal reference.
6548 * python/py-frame.c (frapy_find_sal): Move sal declaration closer
6549 to its initialization.
6550 * reverse.c (save_bookmark_command): Use new/delete. Remove
6551 init_sal references. Move declarations closer to initializations.
6552 * source.c (get_current_source_symtab_and_line): Remove brace
6553 initialization.
6554 (set_current_source_symtab_and_line): Now takes the sal by const
6555 reference. Remove brace initialization.
6556 (line_info): Remove init_sal reference.
6557 * source.h (set_current_source_symtab_and_line): Now takes a
6558 symtab_and_line via const reference.
6559 * stack.c (set_current_sal_from_frame): Adjust.
6560 (print_frame_info): Adjust.
6561 (get_last_displayed_sal): Return the sal via function return
6562 instead of via output parameter. Simplify.
6563 (frame_info): Adjust.
6564 * stack.h (get_last_displayed_sal): Return the sal via function
6565 return instead of via output parameter.
6566 * symtab.c (init_sal): Delete.
6567 (find_pc_sect_line): Remove init_sal references. Move
6568 declarations closer to initializations.
6569 (find_function_start_sal): Remove init_sal references. Move
6570 declarations closer to initializations.
6571 * symtab.h (struct symtab_and_line): In-class initialize all
6572 fields.
6573 * tracepoint.c (set_traceframe_context)
6574 (print_one_static_tracepoint_marker): Remove init_sal references.
6575 Move declarations closer to initializations.
6576 * tui/tui-disasm.c (tui_show_disassem_and_update_source): Adjust.
6577 * tui/tui-stack.c (tui_show_frame_info): Adjust. Move
6578 declarations closer to initializations.
6579 * tui/tui-winsource.c (tui_update_source_window_as_is): Remove
6580 init_sal references. Adjust.
6581
6582 2017-09-04 Pedro Alves <palves@redhat.com>
6583
6584 * ax-gdb.c (agent_command_1): Use range-for.
6585 * break-catch-throw.c (re_set_exception_catchpoint): Update.
6586 * breakpoint.c: Include "common/array-view.h".
6587 (init_breakpoint_sal, create_breakpoint_sal): Change sals
6588 parameter from struct symtabs_and_lines to
6589 array_view<symtab_and_line>. Adjust. Use range-for. Update.
6590 (breakpoint_sals_to_pc): Change sals parameter from struct
6591 symtabs_and_lines to std::vector reference.
6592 (check_fast_tracepoint_sals): Change sals parameter from struct
6593 symtabs_and_lines to std::array_view. Use range-for.
6594 (decode_static_tracepoint_spec): Return a std::vector instead of
6595 symtabs_and_lines. Update.
6596 (create_breakpoint): Update.
6597 (break_range_command, until_break_command, clear_command): Update.
6598 (base_breakpoint_decode_location, bkpt_decode_location)
6599 (bkpt_probe_create_sals_from_location)
6600 (bkpt_probe_decode_location, tracepoint_decode_location)
6601 (tracepoint_probe_decode_location)
6602 (strace_marker_create_sals_from_location): Return a std::vector
6603 instead of symtabs_and_lines.
6604 (strace_marker_create_breakpoints_sal): Update.
6605 (strace_marker_decode_location): Return a std::vector instead of
6606 symtabs_and_lines. Update.
6607 (update_breakpoint_locations): Change struct symtabs_and_lines
6608 parameters to gdb::array_view. Adjust.
6609 (location_to_sals): Return a std::vector instead of
6610 symtabs_and_lines. Update.
6611 (breakpoint_re_set_default): Use std::vector instead of struct
6612 symtabs_and_lines.
6613 (decode_location_default): Return a std::vector instead of
6614 symtabs_and_lines. Update.
6615 * breakpoint.h: Include "common/array-view.h".
6616 (struct breakpoint_ops) <decode_location>: Now returns a
6617 std::vector instead of returning a symtabs_and_lines via output
6618 parameter.
6619 (update_breakpoint_locations): Change sals parameters to use
6620 gdb::array_view.
6621 * cli/cli-cmds.c (edit_command, list_command): Update to use
6622 std::vector and gdb::array_view.
6623 (ambiguous_line_spec): Adjust to use gdb::array_view and
6624 range-for.
6625 (compare_symtabs): Rename to ...
6626 (cmp_symtabs): ... this. Change parameters to symtab_and_line
6627 const reference and adjust.
6628 (filter_sals): Rewrite using std::vector and standard algorithms.
6629 * elfread.c (elf_gnu_ifunc_resolver_return_stop): Simplify.
6630 (jump_command): Update to use std::vector.
6631 * linespec.c (struct linespec_state) <canonical_names>: Update
6632 comment.
6633 (add_sal_to_sals_basic): Delete.
6634 (add_sal_to_sals, filter_results, convert_results_to_lsals)
6635 (decode_line_2, create_sals_line_offset)
6636 (convert_address_location_to_sals, convert_linespec_to_sals)
6637 (convert_explicit_location_to_sals, parse_linespec)
6638 (event_location_to_sals, decode_line_full, decode_line_1)
6639 (decode_line_with_current_source)
6640 (decode_line_with_last_displayed, decode_objc)
6641 (decode_digits_list_mode, decode_digits_ordinary, minsym_found)
6642 (linespec_result::~linespec_result): Adjust to use std::vector
6643 instead of symtabs_and_lines.
6644 * linespec.h (linespec_sals::sals): Now a std::vector.
6645 (struct linespec_result): Use std::vector, bool, and in-class
6646 initialization.
6647 (decode_line_1, decode_line_with_current_source)
6648 (decode_line_with_last_displayed): Return std::vector.
6649 * macrocmd.c (info_macros_command): Use std::vector.
6650 * mi/mi-main.c (mi_cmd_trace_find): Use std::vector.
6651 * probe.c (parse_probes_in_pspace, parse_probes): Adjust to use
6652 std::vector.
6653 * probe.h (parse_probes): Return a std::vector.
6654 * python/python.c (gdbpy_decode_line): Use std::vector and
6655 gdb::array_view.
6656 * source.c (select_source_symtab, line_info): Use std::vector.
6657 * stack.c (func_command): Use std::vector.
6658 * symtab.h (struct symtabs_and_lines): Delete.
6659 * tracepoint.c (tfind_line_command, scope_info): Use std::vector.
6660
6661 2017-09-04 Pedro Alves <palves@redhat.com>
6662
6663 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
6664 unittests/array-view-selftests.c.
6665 (SUBDIR_UNITTESTS_OBS): Add array-view-selftests.o.
6666 * common/array-view.h: New file.
6667 * unittests/array-view-selftests.c: New file.
6668
6669 2017-09-04 Pedro Alves <palves@redhat.com>
6670
6671 * cli/cli-cmds.c (edit_command): Pass message to
6672 ambiguous_line_spec.
6673 (list_command): Pass message to ambiguous_line_spec. Say
6674 "first"/"last" instead of "start" and "end" to be consistent with
6675 the manual.
6676 (ambiguous_line_spec): Add 'format' and vararg parameters. Use
6677 them to print formatted message.
6678
6679 2017-09-04 Pedro Alves <palves@redhat.com>
6680
6681 * btrace.c (ftrace_add_pt): Pass btrace_insn to
6682 ftrace_update_insns by reference instead of pointer.
6683
6684 2017-09-04 Yao Qi <yao.qi@linaro.org>
6685
6686 * i386-go32-tdep.c: Include x86-xstate.h.
6687 (i386_go32_init_abi): Call i386_target_description.
6688 * i386-tdep.c (i386_target_description): Return tdesc_i386_mmx
6689 if xcr0 is X86_XSTATE_X87_MASK.
6690 * i386-tdep.h (tdesc_i386): Remove the declaration.
6691 (tdesc_i386_mmx): Likewise.
6692
6693 2017-09-04 Yao Qi <yao.qi@linaro.org>
6694
6695 * i386-fbsd-tdep.c (i386fbsd_core_read_xcr0): Return
6696 X86_XSTATE_SSE_MASK instead of 0.
6697
6698 2017-09-04 Yao Qi <yao.qi@linaro.org>
6699
6700 * amd64-fbsd-nat.c (amd64fbsd_read_description): Call
6701 i386_target_description.
6702 * i386-fbsd-nat.c (i386fbsd_read_description): Call
6703 i386_target_description.
6704 * i386-tdep.c (i386_gdbarch_init): Likewise.
6705
6706 2017-09-04 Yao Qi <yao.qi@linaro.org>
6707
6708 * amd64-darwin-tdep.c: Include "x86-xstate.h".
6709 (x86_darwin_init_abi_64): Call amd64_target_description.
6710 * amd64-dicos-tdep.c: Likewise.
6711 * amd64-fbsd-nat.c: Likewise.
6712 * amd64-fbsd-tdep.c: Likewise.
6713 * amd64-nbsd-tdep.c: Likewise.
6714 * amd64-obsd-tdep.c: Likewise.
6715 * amd64-sol2-tdep.c: Likewise.
6716 * amd64-windows-tdep.c: Likewise.
6717 * amd64-tdep.h (tdesc_amd64): Remove the declaration.
6718
6719 2017-09-04 Simon Marchi <simon.marchi@ericsson.com>
6720
6721 * btrace.h (btrace_insn_s, DEF_VEC_O (btrace_insn_s)): Remove.
6722 (btrace_function) <insn>: Change type to use std::vector.
6723 * btrace.c (ftrace_debug, ftrace_call_num_insn,
6724 ftrace_find_call, ftrace_new_gap, ftrace_update_function,
6725 ftrace_update_insns, ftrace_compute_global_level_offset,
6726 btrace_stitch_bts, btrace_clear, btrace_insn_get,
6727 btrace_insn_end, btrace_insn_next, btrace_insn_prev): Adjust to
6728 change to std::vector.
6729 (ftrace_update_insns): Adjust to change to std::vector, change
6730 type of INSN parameter.
6731 (btrace_compute_ftrace_bts): Adjust call to ftrace_update_insns.
6732 * record-btrace.c (btrace_call_history_insn_range,
6733 btrace_compute_src_line_range,
6734 record_btrace_frame_prev_register): Adjust to change to
6735 std::vector.
6736 * python/py-record-btrace.c (recpy_bt_func_instructions): Adjust
6737 to change to std::vector.
6738
6739 2017-09-03 Tom Tromey <tom@tromey.com>
6740
6741 * corefile.c (reopen_exec_file): Use std::string.
6742
6743 2017-09-03 Tom Tromey <tom@tromey.com>
6744
6745 * compile/compile.c (compile_register_name_mangled): Return
6746 std::string.
6747 * compile/compile-loc2c.c (pushf_register_address): Update.
6748 (pushf_register): Update.
6749 * compile/compile-c-types.c (convert_array): Update.
6750 * compile/compile-c-symbols.c (generate_vla_size): Update.
6751 (error_symbol_once): Use a gdb::unique_xmalloc_ptr.
6752 (symbol_substitution_name): Return a gdb::unique_xmalloc_ptr.
6753 (convert_one_symbol): Update.
6754 (generate_c_for_for_one_variable): Update.
6755 * compile/compile-c-support.c (c_get_range_decl_name): Return a
6756 std::string.
6757 (generate_register_struct): Update.
6758 * compile/compile-internal.h (c_get_range_decl_name): Return a
6759 std::string.
6760 (compile_register_name_mangled): Return std::string.
6761
6762 2017-09-03 Tom Tromey <tom@tromey.com>
6763
6764 * utils.c (perror_string): Return a std::string.
6765 (throw_perror_with_name, perror_warning_with_name): Update.
6766
6767 2017-09-03 Tom Tromey <tom@tromey.com>
6768
6769 * demangle.c (demangle_command): Use std::string,
6770 unique_xmalloc_ptr.
6771
6772 2017-09-03 Tom Tromey <tom@tromey.com>
6773
6774 * cli/cli-setshow.c (do_set_command): Use std::string.
6775
6776 2017-09-03 Tom Tromey <tom@tromey.com>
6777
6778 * cli/cli-cmds.c (cd_command): Use gdb::unique_xmalloc_ptr.
6779
6780 2017-09-03 Tom Tromey <tom@tromey.com>
6781
6782 * mi/mi-interp.c (mi_cmd_interpreter_exec): Use std::string.
6783
6784 2017-09-03 Tom Tromey <tom@tromey.com>
6785
6786 * mi/mi-cmd-env.c (env_execute_cli_command): Use
6787 gdb::unique_xmalloc_ptr.
6788
6789 2017-09-03 Tom Tromey <tom@tromey.com>
6790
6791 * thread.c (print_thread_info_1): Use string_printf.
6792 (thread_apply_command, thread_apply_all_command): Use
6793 std::string.
6794
6795 2017-09-03 Tom Tromey <tom@tromey.com>
6796
6797 * valprint.c (val_print_string): Update.
6798 * gdbcore.h (memory_error_message): Return std::string.
6799 * corefile.c (memory_error_message): Return std::string.
6800 (memory_error): Update.
6801 * breakpoint.c (insert_bp_location): Update.
6802
6803 2017-09-03 Simon Marchi <simon.marchi@ericsson.com>
6804
6805 * target/waitstatus.h (target_waitstatus_to_string): Change
6806 return type to std::string.
6807 * target/waitstatus.c (target_waitstatus_to_string): Return
6808 std::string.
6809 * target.h (target_waitstatus_to_string): Remove declaration.
6810 * infrun.c (resume, clear_proceed_status_thread,
6811 print_target_wait_results, do_target_wait, save_waitstatus,
6812 stop_all_threads): Adjust.
6813 * record-btrace.c (record_btrace_wait): Adjust.
6814 * target-debug.h
6815 (target_debug_print_struct_target_waitstatus_p): Adjust.
6816
6817 2017-09-01 Jan Kratochvil <jan.kratochvil@redhat.com>
6818
6819 PR gdb/22046
6820 * nat/linux-procfs.c (parse_proc_status_state): Fix PROC_STATE_STOPPED
6821 detection.
6822
6823 2017-08-31 Sergio Durigan Junior <sergiodj@redhat.com>
6824
6825 * NEWS (Changes since GDB 8.0): Add entry mentioning new support
6826 for setting/unsetting environment variables on the remote target.
6827 (New remote packets): Add entries for QEnvironmentHexEncoded,
6828 QEnvironmentUnset and QEnvironmentReset.
6829 * common/environ.c (gdb_environ::operator=): Extend method to
6830 handle m_user_set_env_list and m_user_unset_env_list.
6831 (gdb_environ::clear): Likewise.
6832 (match_var_in_string): Change type of first parameter from 'char
6833 *' to 'const char *'.
6834 (gdb_environ::set): Extend method to handle
6835 m_user_set_env_list and m_user_unset_env_list.
6836 (gdb_environ::unset): Likewise.
6837 (gdb_environ::clear_user_set_env): New method.
6838 (gdb_environ::user_set_envp): Likewise.
6839 (gdb_environ::user_unset_envp): Likewise.
6840 * common/environ.h (gdb_environ): Handle m_user_set_env_list and
6841 m_user_unset_env_list on move constructor/assignment.
6842 (unset): Add new default parameter 'update_unset_list = true'.
6843 (clear_user_set_env): New method.
6844 (user_set_envp): Likewise.
6845 (user_unset_envp): Likewise.
6846 (m_user_set_env_list): New std::set.
6847 (m_user_unset_env_list): Likewise.
6848 * common/rsp-low.c (hex2str): New function.
6849 (bin2hex): New overload for bin2hex function.
6850 * common/rsp-low.c (hex2str): New prototype.
6851 (str2hex): New overload prototype.
6852 * remote.c: Include "environ.h". Add QEnvironmentHexEncoded,
6853 QEnvironmentUnset and QEnvironmentReset.
6854 (remote_protocol_features): Add QEnvironmentHexEncoded,
6855 QEnvironmentUnset and QEnvironmentReset packets.
6856 (send_environment_packet): New function.
6857 (extended_remote_environment_support): Likewise.
6858 (extended_remote_create_inferior): Call
6859 extended_remote_environment_support.
6860 (_initialize_remote): Add QEnvironmentHexEncoded,
6861 QEnvironmentUnset and QEnvironmentReset packet configs.
6862 * unittests/environ-selftests.c (gdb_selftest_env_var):
6863 New variable.
6864 (test_vector_initialization): New function.
6865 (test_init_from_host_environ): Likewise.
6866 (test_reinit_from_host_environ): Likewise.
6867 (test_set_A_unset_B_unset_A_cannot_find_A_can_find_B):
6868 Likewise.
6869 (test_unset_set_empty_vector): Likewise.
6870 (test_vector_clear): Likewise.
6871 (test_std_move): Likewise.
6872 (test_move_constructor):
6873 (test_self_move): Likewise.
6874 (test_set_unset_reset): Likewise.
6875 (run_tests): Rewrite in terms of the functions above.
6876
6877 2017-08-31 Weimin Pan <weimin.pan@oracle.com>
6878
6879 * sparc64-tdep.c (adi_stat_t): Fix comment formatting.
6880 (adi_available): Use a temp variable of type CORE_ADDR as argument
6881 3 when calling target_auxv_search.
6882 (adi_normalize_address): Use masks and xor operators to calculate
6883 normalized address.
6884 (adi_read_versions, adi_write_versions, adi_print_versions)
6885 (do_examine, do_assign): Use paddress.
6886
6887 2017-08-29 John Baldwin <jhb@FreeBSD.org>
6888
6889 * mips-fbsd-nat.c (getfpregs_supplies): Return true for FIR.
6890 * mips-fbsd-tdep.c (mips_fbsd_supply_fpregs): Split supply of FSR
6891 out of loop and add supply of FIR.
6892 (mips_fbsd_collect_fpregs): Split collect of FSR out of loop and
6893 add collect of FIR.
6894
6895 2017-08-28 Simon Marchi <simon.marchi@ericsson.com>
6896
6897 PR gdb/21827
6898 * cli/cli-script.c (define_command): Don't convert command name
6899 to lower case.
6900
6901 2017-08-25 Joel Brobecker <brobecker@adacore.com>
6902
6903 * ada-lang.c (ada_lookup_struct_elt_type): Remove parameter "dispp".
6904 Update all callers accordingly. Remove all code blocks handling
6905 the case where DISPP is not NULL.
6906
6907 2017-08-24 Jan Kratochvil <jan.kratochvil@redhat.com>
6908
6909 PR symtab/22003
6910 * dwarf2read.c (dwarf2_const_value_attr, dump_die_shallow)
6911 (dwarf2_get_attr_constant_value, dwarf2_fetch_constant_bytes)
6912 (skip_form_bytes, attr_form_is_constant): Handle DW_FORM_implicit_const.
6913
6914 2017-08-24 Jan Kratochvil <jan.kratochvil@redhat.com>
6915
6916 * dwarf2read.c (build_type_psymtabs_reader): New prototype.
6917 (process_psymtab_comp_unit): Accept IS_DEBUG_TYPES.
6918 (read_comp_units_from_section): New parameter abbrev_section, use
6919 read_and_check_comp_unit_head, allocate signatured_type if needed.
6920 (create_all_comp_units): Update read_comp_units_from_section caller.
6921
6922 2017-08-23 Pedro Alves <palves@redhat.com>
6923
6924 PR remote/21852
6925 * remote.c (add_current_inferior_and_thread): Set inferior_ptid
6926 to null_ptid and switch to thread without reading the registers
6927 after adding the inferior.
6928
6929 2017-08-23 Jan Kratochvil <jan.kratochvil@redhat.com>
6930
6931 * NEWS (Changes since GDB 8.0): Add set compile-gcc and show
6932 compile-gcc.
6933 * compile/compile.c (compile_gcc, show_compile_gcc): New.
6934 (compile_to_object): Implement compile_gcc.
6935 (_initialize_compile): Install "set compile-gcc". Initialize
6936 compile_gcc.
6937
6938 2017-08-23 Jan Kratochvil <jan.kratochvil@redhat.com>
6939
6940 * compile/compile.c (compile_to_object): Conditionally call
6941 set_verbose. Conditionally call compile or compile_v0.
6942
6943 2017-08-07 Weimin Pan <weimin.pan@oracle.com>
6944
6945 * sparc64-tdep.h: (adi_normalize_address): New export.
6946 * sparc-nat.h: (open_adi_tag_fd): New export.
6947 * sparc64-linux-nat.c: (open_adi_tag_fd): New function.
6948 * sparc64-linux-tdep.c:
6949 (SEGV_ACCADI, SEGV_ADIDERR, SEGV_ADIPERR) New defines.
6950 (sparc64_linux_handle_segmentation_fault): New function.
6951 (sparc64_linux_init_abi): Register
6952 sparc64_linux_handle_segmentation_fault
6953 * sparc64-tdep.c: Include cli-utils.h,gdbcmd.h,auxv.h.
6954 (sparc64_addr_bits_remove): New function.
6955 (sparc64_init_abi): Register sparc64_addr_bits_remove.
6956 (MAX_PROC_NAME_SIZE): New macro.
6957 (AT_ADI_BLKSZ, AT_ADI_NBITS, AT_ADI_UEONADI) New defines.
6958 (sparc64adilist): New variable.
6959 (adi_proc_list): New variable.
6960 (find_adi_info): New function.
6961 (add_adi_info): New function.
6962 (get_adi_info_proc): New function.
6963 (get_adi_info): New function.
6964 (info_adi_command): New function.
6965 (read_maps_entry): New function.
6966 (adi_available): New function.
6967 (adi_normalize_address): New function.
6968 (adi_align_address): New function.
6969 (adi_convert_byte_count): New function.
6970 (adi_tag_fd): New function.
6971 (adi_is_addr_mapped): New function.
6972 (adi_read_versions): New function.
6973 (adi_write_versions): New function.
6974 (adi_print_versions): New function.
6975 (do_examine): New function.
6976 (do_assign): New function.
6977 (adi_examine_command): New function.
6978 (adi_assign_command): New function.
6979 (_initialize_sparc64_adi_tdep): New function.
6980
6981 2017-08-22 Simon Marchi <simon.marchi@ericsson.com>
6982
6983 * breakpoint.c (breakpoints_info): Rename to ...
6984 (info_breakpoints_command): ... this.
6985 (watchpoints_info): Rename to ...
6986 (info_watchpoints_command): ... this.
6987 (tracepoints_info): Rename to ...
6988 (info_tracepoints_command): ... this.
6989 (_initialize_breakpoint): Adjust.
6990 * dcache.c (dcache_info): Rename to ...
6991 (info_display_command): ... this.
6992 (_initialize_dcache): Adjust.
6993 * frame.h (args_info): Rename to ...
6994 (info_args_command): ... this.
6995 (locals_info): Rename to ...
6996 (info_locals_command): ... this.
6997 * infcmd.c (nofp_registers_info): Rename to ...
6998 (info_registers_command): ... this.
6999 (float_info): Rename to ...
7000 (info_float_command): ... this.
7001 (program_info): Rename to ...
7002 (info_program_command): ... this.
7003 (all_registers_info): Rename to ...
7004 (info_all_registers_command): ... this.
7005 (vector_info): Rename to ...
7006 (info_vector_command): ... this.
7007 (float_info): Rename to ...
7008 (info_float_command): ... this.
7009 (_initialize_infcmd): Adjust.
7010 * inferior.h (term_info): Rename to ...
7011 (info_terminal_command): ... this.
7012 * inflow.c (term_info): Rename to ...
7013 (info_terminal_command): ... this.
7014 (_initialize_inflow): Adjust.
7015 * infrun.c (signals_info): Rename to ...
7016 (info_signals_command): ... this.
7017 (_initialize_infrun): Adjust.
7018 * objc-lang.c (classes_info): Rename to ...
7019 (info_classes_command): ... this.
7020 (selectors_info): Rename to ...
7021 (info_selectors_command): ... this.
7022 (_initialize_objc_language): Adjust.
7023 * printcmd.c (sym_info): Rename to ...
7024 (info_symbol_command): ... this.
7025 (address_info): Rename to ...
7026 (info_address_command): ... this.
7027 (display_info): Rename to ...
7028 (info_display_command): ... this.
7029 (_initialize_printcmd): Adjust.
7030 * reverse.c (bookmarks_info): Rename to ...
7031 (info_breakpoints_command): ... this.
7032 (_initialize_reverse): Adjust.
7033 * ser-go32.c (dos_info): Rename to ...
7034 (info_serial_command): ... this.
7035 (_initialize_ser_dos): Adjust.
7036 * skip.c (skip_info): Rename to ...
7037 (info_skip_command): ... this.
7038 (_initialize_step_skip): Adjust.
7039 * source.c (line_info): Rename to ...
7040 (info_line_command): ... this.
7041 (source_info): Rename to ...
7042 (info_source_command)
7043 * stack.c (frame_info): Rename to ...
7044 (info_frame_command): ... this.
7045 (locals_info): Rename to ...
7046 (info_locals_command): ... this.
7047 (args_info): Rename to ...
7048 (info_args_command): ... this.
7049 (_initialize_stack): Adjust.
7050 * symtab.c (sources_info): Rename to ...
7051 (info_sources_command): ... this.
7052 (variables_info): Rename to ...
7053 (info_variables_command): ... this.
7054 (functions_info): Rename to ...
7055 (info_functions_command): ... this.
7056 (types_info): Rename to ...
7057 (info_types_command): ... this.
7058 (_initialize_symtab): Adjust.
7059 * target.c (target_info): Rename to ...
7060 (info_target_command): ... this.
7061 (initialize_targets): Adjust.
7062 * tracepoint.c (tvariables_info): Rename to ...
7063 (info_tvariables_command): ... this.
7064 (scope_info): Rename to ...
7065 (info_scope_command): ... this.
7066 (trace_dump_actions): Adjust.
7067 (_initialize_tracepoint): Adjust.
7068
7069 2017-08-22 Tom Tromey <tom@tromey.com>
7070
7071 * breakpoint.h (install_breakpoint): Update.
7072 * breakpoint.c (add_solib_catchpoint): Update.
7073 (install_breakpoint): Change argument to a std::unique_ptr.
7074 (create_fork_vfork_event_catchpoint): Use std::unique_ptr.
7075 (create_breakpoint_sal, create_breakpoint): Update.
7076 (watch_command_1, catch_exec_command_1)
7077 (strace_marker_create_breakpoints_sal): Use std::unique_ptr.
7078 (add_to_breakpoint_chain): Change argument to a std::unique_ptr.
7079 Return the breakpoint.
7080 (set_raw_breakpoint_without_location, set_raw_breakpoint)
7081 (new_single_step_breakpoint): Update.
7082 * break-catch-throw.c (handle_gnu_v3_exceptions): Use
7083 std::unique_ptr.
7084 * break-catch-syscall.c (create_syscall_event_catchpoint): Use
7085 std::unique_ptr.
7086 * break-catch-sig.c (create_signal_catchpoint): Use
7087 std::unique_ptr.
7088 * ada-lang.c (create_ada_exception_catchpoint): Use
7089 std::unique_ptr.
7090
7091 2017-08-22 Tom Tromey <tom@tromey.com>
7092
7093 * breakpoint.c (add_solib_catchpoint): Use std::unique_ptr.
7094
7095 2017-08-22 Tom Tromey <tom@tromey.com>
7096
7097 * psymtab.c (psymtab_search_name): Return a unique_xmalloc_ptr.
7098 (lookup_partial_symbol): Update.
7099
7100 2017-08-22 Tom Tromey <tom@tromey.com>
7101
7102 * source.h (rewrite_source_path): Return a unique_xmalloc_ptr.
7103 * source.c (rewrite_source_path): Return a unique_xmalloc_ptr.
7104 (find_and_open_source, symtab_to_fullname): Update.
7105 * psymtab.c (psymtab_to_fullname): Update.
7106
7107 2017-08-22 Tom Tromey <tom@tromey.com>
7108
7109 * exec.c (exec_file_attach): Update.
7110 * linux-thread-db.c (try_thread_db_load): Update.
7111 * guile/scm-safe-call.c (gdbscm_safe_source_script): Update.
7112 * utils.c (gdb_realpath): Change return type.
7113 (gdb_realpath_keepfile): Update.
7114 (gdb_realpath_check_trailer, gdb_realpath_tests): New functions.
7115 (_initialize_utils): Register the new self test.
7116 * source.c (openp): Update.
7117 (find_and_open_source): Update.
7118 * nto-tdep.c (nto_find_and_open_solib): Update.
7119 * main.c (set_gdb_data_directory): Update.
7120 (captured_main_1): Update.
7121 * dwarf2read.c (dwarf2_get_dwz_file): Update
7122 (dw2_map_symbol_filenames): Update.
7123 * auto-load.c (auto_load_safe_path_vec_update): Update.
7124 (filename_is_in_auto_load_safe_path_vec): Change type of
7125 "filename_realp".
7126 (auto_load_objfile_script): Update.
7127 (file_is_auto_load_safe): Update. Use std::string.
7128 * utils.h (gdb_realpath): Return a gdb::unique_xmalloc_ptr.
7129
7130 2017-08-22 Tom Tromey <tom@tromey.com>
7131
7132 * utils.c (gdb_realpath_keepfile): Return a
7133 gdb::unique_xmalloc_ptr.
7134 * exec.c (exec_file_attach): Update.
7135 * utils.h (gdb_realpath_keepfile): Return a
7136 gdb::unique_xmalloc_ptr.
7137
7138 2017-08-22 Tom Tromey <tom@tromey.com>
7139
7140 * compile/compile.c (compile_file_command): Use
7141 gdb::unique_xmalloc_ptr, std::string.
7142 * utils.c (gdb_abspath): Change return type.
7143 * source.c (openp): Update.
7144 * objfiles.c (allocate_objfile): Update.
7145 * main.c (set_gdb_data_directory): Update.
7146 * utils.h (gdb_abspath): Return a gdb::unique_xmalloc_ptr.
7147
7148 2017-08-22 Zhouyi Zhou <zhouzhouyi@gmail.com>
7149
7150 * cli-cmds.c (list_commands): List actual code around more than
7151 one location.
7152
7153 2017-08-21 John Baldwin <jhb@FreeBSD.org>
7154
7155 * fbsd-nat.c (fbsd_add_threads): Use array type for `lwps'.
7156
7157 2017-08-21 Pedro Alves <palves@redhat.com>
7158
7159 PR gdb/19487
7160 * c-exp.y (variable production): Handle function aliases.
7161 * minsyms.c (msymbol_is_text): New function.
7162 * minsyms.h (msymbol_is_text): Declare.
7163 * symtab.c (find_function_alias_target): New function.
7164 * symtab.h (find_function_alias_target): Declare.
7165
7166 2017-08-21 Pedro Alves <palves@redhat.com>
7167
7168 * eval.c (evaluate_subexp_standard) <OP_TYPE>: Don't dig past
7169 typedefs.
7170 * typeprint.c (whatis_exp): If handling "whatis", and expression
7171 is OP_TYPE, strip one typedef level. Otherwise don't strip
7172 typedefs here.
7173 * valops.c (value_cast): Save "to" type before resolving
7174 stubs/typedefs. Use that type as resulting value's type.
7175
7176 2017-08-18 Tom Tromey <tom@tromey.com>
7177 Pedro Alves <palves@redhat.com>
7178
7179 * spu-multiarch.c (parse_spufs_run): Use scoped_restore.
7180 * sol-thread.c (sol_thread_resume, sol_thread_wait)
7181 (sol_thread_xfer_partial, rw_common): Use scoped_restore.
7182 * procfs.c (procfs_do_thread_registers): Use scoped_restore.
7183 * proc-service.c (ps_xfer_memory): Use scoped_restore.
7184 * linux-tdep.c (linux_corefile_thread): Remove a cleanup.
7185 (linux_get_siginfo_data): Add "thread" argument. Use
7186 scoped_restore.
7187 * linux-nat.c (linux_child_follow_fork)
7188 (check_stopped_by_watchpoint): Use scoped_restore.
7189 * infrun.c (displaced_step_prepare_throw, write_memory_ptid)
7190 (THREAD_STOPPED_BY, handle_signal_stop): Use scoped_restore.
7191 (restore_inferior_ptid, save_inferior_ptid): Remove.
7192 * btrace.c (btrace_fetch): Use scoped_restore.
7193 * bsd-uthread.c (bsd_uthread_fetch_registers)
7194 (bsd_uthread_store_registers): Use scoped_restore.
7195 * breakpoint.c (reattach_breakpoints, detach_breakpoints): Use
7196 scoped_restore.
7197 * aix-thread.c (aix_thread_resume, aix_thread_wait)
7198 (aix_thread_xfer_partial): Use scoped_restore.
7199 * inferior.h (save_inferior_ptid): Remove.
7200
7201 2017-08-18 Yao Qi <yao.qi@linaro.org>
7202
7203 PR tdep/21818
7204 * arm-tdep.c (gdb_print_insn_arm): Mark
7205 USER_SPECIFIED_MACHINE_TYPE if exec_bfd isn't NULL.
7206
7207 2017-08-18 Yao Qi <yao.qi@linaro.org>
7208
7209 * NEWS: Mention GDBserver's new option "--selftest".
7210 * Makefile.in (SFILES): Remove selftest.c, add common/selftest.c.
7211 * selftest.c: Move it to common/selftest.c.
7212 * selftest.h: Move it to common/selftest.h.
7213 * selftest-arch.c (reset): New function.
7214 (tests_with_arch): Call reset.
7215
7216 2017-08-18 Yao Qi <yao.qi@linaro.org>
7217
7218 * selftest.c (run_tests): Don't call QUIT. Call debug_printf
7219 instead of exception_fprintf and printf_filtered.
7220
7221 2017-08-18 Yao Qi <yao.qi@linaro.org>
7222
7223 * selftest.c (register_self_test): Rename it to
7224 selftests::register_test.
7225 (run_self_tests): selftest::run_tests.
7226 * selftest.h: Update declarations.
7227 * selftest-arch.c (register_self_test_foreach_arch): Rename it to
7228 selftests::register_test_foreach_arch.
7229 * selftest-arch.h: Update declaration.
7230 * aarch64-tdep.c: Update.
7231 * arm-tdep.c: Likewise.
7232 * disasm-selftests.c: Likewise.
7233 * dwarf2loc.c: Likewise.
7234 * dwarf2-frame.c: Likewise.
7235 * findvar.c: Likewise.
7236 * gdbarch-selftests.c: Likewise.
7237 * maint.c (maintenance_selftest): Likewise.
7238 * regcache.c: Likewise.
7239 * rust-exp.y: Likewise.
7240 * selftest-arch.c: Likewise.
7241 * unittests/environ-selftests.c: Likewise.
7242 * unittests/function-view-selftests.c: Likewise.
7243 * unittests/offset-type-selftests.c: Likewise.
7244 * unittests/optional-selftests.c: Likewise.
7245 * unittests/scoped_restore-selftests.c: Likewise.
7246 * utils-selftests.c: Likewise.
7247
7248 2017-08-17 Pedro Alves <palves@redhat.com>
7249
7250 * cli/cli-cmds.c (source_command): Delete 'old_source_verbose'
7251 local.
7252
7253 2017-08-17 Pedro Alves <palves@redhat.com>
7254
7255 * dwarf2read.c (struct dwarf2_cu) <line_header_die_owner>: New
7256 field.
7257 (reset_die_in_process): Delete, replaced by ...
7258 (process_die_scope): ... this new class. Make it responsible for
7259 freeing cu->line_header too.
7260 (process_die): Use process_die_scope.
7261 (handle_DW_AT_stmt_list): Record the line header's owner CU/DIE in
7262 cu->line_header_die_owner. Don't release the line header if it's
7263 owned by the CU.
7264 (setup_type_unit_groups): Make the CU/DIE own the line header.
7265 Don't release the line header here.
7266
7267 2017-08-17 Alex Lindsay <alexlindsay239@gmail.com> (tiny change)
7268
7269 * elfread.c (elf_read_minimal_symbols): xfree synthsyms.
7270
7271 2017-08-17 Ruslan Kabatsayev <b7.10110111@gmail.com>
7272
7273 * NEWS: Mention new shortcuts for nexti and stepi in TUI
7274 Single-Key mode
7275
7276 2017-08-16 Ruslan Kabatsayev <b7.10110111@gmail.com>
7277
7278 * tui/tui.c (tui_commands): Add "nexti" and "stepi" to the Single-Key
7279 mode command list.
7280
7281 2017-08-15 Stafford Horne <shorne@gmail.com>
7282
7283 * MAINTAINERS (Write After Approval): Add Stafford Horne.
7284
7285 2017-08-15 Stafford Horne <shorne@gmail.com>
7286
7287 * xtensa-tdep.c (xtensa_init_reggroups): Use xstrdup for cpname.
7288
7289 2017-08-15 Sergio Durigan Junior <sergiodj@redhat.com>
7290
7291 PR gdb/21954
7292 * infcmd.c (unset_environment_command): Use the 'clear' method on
7293 the environment instead of resetting it.
7294
7295 2017-08-15 John Baldwin <jhb@FreeBSD.org>
7296
7297 * fbsd-nat.c (fbsd_convert_siginfo): Fix compile on big-endian
7298 platforms.
7299
7300 2017-08-14 Tom Tromey <tom@tromey.com>
7301
7302 * valprint.c (print_octal_chars): Use HOST_CHAR_BIT.
7303 (print_binary_chars): Likewise.
7304 (BITS_IN_BYTES): Remove.
7305
7306 2017-08-14 Tom Tromey <tom@tromey.com>
7307
7308 PR gdb/21675
7309 * valprint.c (LOW_ZERO): Change value to 034.
7310 (print_octal_chars): Add static_asserts for octal constants.
7311 * printcmd.c (print_scalar_formatted): Add 'd' case.
7312
7313 2017-08-11 Tom Tromey <tom@tromey.com>
7314
7315 * symfile.c (add_symbol_file_command): Use std::vector.
7316
7317 2017-08-14 Tom Tromey <tom@tromey.com>
7318
7319 * break-catch-throw.c (handle_gnu_v3_exceptions): Use std::move.
7320 * break-catch-syscall.c (create_syscall_event_catchpoint): Use
7321 std::move.
7322 * break-catch-sig.c (create_signal_catchpoint): Use std::move.
7323
7324 2017-08-11 Pedro Alves <palves@redhat.com>
7325
7326 * infrun.c (process_event_stop_test): Adjust
7327 function_name_is_marked_for_skip call.
7328 * skip.c: Include <list>.
7329 (skiplist_entry): Make it a class with private fields, and
7330 getters/setters.
7331 (skiplist_entry_chain): Delete.
7332 (skiplist_entries): New.
7333 (skiplist_entry_count): Delete.
7334 (highest_skiplist_entry_num): New.
7335 (ALL_SKIPLIST_ENTRIES, ALL_SKIPLIST_ENTRIES_SAFE): Delete.
7336 (add_skiplist_entry): Delete.
7337 (skiplist_entry::skiplist_entry): New.
7338 (skiplist_entry::add_entry): New.
7339 (skip_file_command, skip_function): Adjust.
7340 (compile_skip_regexp): Delete.
7341 (skip_command): Don't compile regexp here. Adjust to use
7342 skiplist_entry::add_entry.
7343 (skip_info): Adjust to use range-for and getters.
7344 (skip_enable_command, skip_disable_command): Adjust to use
7345 range-for and setters.
7346 (skip_delete_command): Adjust to use std::list.
7347 (add_skiplist_entry): Delete.
7348 (skip_file_p): Delete, refactored as ...
7349 (skiplist_entry::do_skip_file_p): ... this new method.
7350 (skip_gfile_p): Delete, refactored as ...
7351 (skiplist_entry::do_gskip_file_p): ... this new method.
7352 (skip_function_p, skip_rfunction_p): Delete, refactored as ...
7353 (skiplist_entry::skip_function_p): ... this new method.
7354 (function_name_is_marked_for_skip): Now returns bool, and takes
7355 the function sal by const reference. Adjust to use range-for and
7356 skiplist_entry methods.
7357 (_initialize_step_skip): Remove references to
7358 skiplist_entry_chain, skiplist_entry_count.
7359 * skip.h (function_name_is_marked_for_skip): Now returns bool, and
7360 takes the function sal by const reference.
7361
7362 2017-08-11 Yao Qi <yao.qi@linaro.org>
7363
7364 * dwarf2-frame.c (clear_pointer_cleanup): Remove.
7365 (dwarf2_frame_cache): Remove reset_cache_cleanup.
7366 (dwarf2_frame_cache):
7367 * frame-unwind.c (frame_unwind_try_unwinder): Catch
7368 RETURN_MASK_ALL and set *this_case to NULL.
7369 * frame-unwind.h: Update comments.
7370
7371 2017-08-11 Yao Qi <yao.qi@linaro.org>
7372
7373 * dwarf2-frame.c (dwarf2_frame_state_alloc_regs): Remove.
7374 (dwarf2_frame_state_copy_regs): Remove.
7375 (dwarf2_frame_state_free_regs): Remove.
7376 (dwarf2_frame_state::~dwarf2_frame_state): Remove.
7377 (dwarf2_restore_rule): Call method .alloc_regs instead of
7378 dwarf2_frame_state_alloc_regs.
7379 (execute_cfa_program): Likewise. Call dwarf2_frame_state_reg_info
7380 constructor. Call std::move.
7381 (dwarf2_fetch_cfa_info): Don't call dwarf2_frame_state_copy_regs.
7382 (dwarf2_frame_cache): Likewise.
7383
7384 [GDB_SELF_TEST]: Include selftest.h and
7385 selftest-arch.h.
7386 [GDB_SELF_TEST] (execute_cfa_program_test): New function.
7387 (_initialize_dwarf2_frame) [GDB_SELF_TEST]: Register
7388 execute_cfa_program_test.
7389
7390 * dwarf2-frame.h (dwarf2_frame_state_reg_info): Add ctor, dtor,
7391 copy ctor, assignment operator, move assignment.
7392 <alloc_regs>: New method.
7393 <swap>: New method.
7394 (struct dwarf2_frame_state): Delete dtor.
7395 (dwarf2_frame_state_alloc_regs): Remove declaration.
7396 * sparc-tdep.c (sparc_execute_dwarf_cfa_vendor_op): Don't call
7397 dwarf2_frame_state_alloc_regs, use .alloc_regs instead.
7398
7399 2017-08-11 Yao Qi <yao.qi@linaro.org>
7400
7401 * dwarf2-frame.c (dwarf2_frame_state_free): Remove.
7402 (dwarf2_frame_state::dwarf2_frame_state): New.
7403 (dwarf2_frame_state::~dwarf2_frame_state): New.
7404 (dwarf2_fetch_cfa_info): Update.
7405 (dwarf2_frame_cache): Remove old_chain. Change 'fs' to an object
7406 rather than a pointer. Update code.
7407 * dwarf2-frame.h (struct dwarf2_frame_state): Declare ctor and
7408 dtor.
7409 <data_align, code_align, retaddr_column>: Change them to const.
7410 <armcc_cfa_offsets_sf, armcc_cfa_offsets_reversed>: Change them
7411 to bool.
7412
7413 2017-08-11 Yao Qi <yao.qi@linaro.org>
7414
7415 * dwarf2-frame.h (struct dwarf2_frame_state_reg) <exp_len>: Remove.
7416 <loc.exp>: New field.
7417 * dwarf2-frame.c (execute_cfa_program): Update.
7418 (dwarf2_frame_prev_register): Update.
7419
7420 2017-08-10 Pedro Alves <palves@redhat.com>
7421
7422 * common/gdb_unique_ptr.h (xfree_deleter<T[]>): Define.
7423
7424 2017-08-09 John Baldwin <jhb@FreeBSD.org>
7425
7426 * fbsd-nat.c (struct fbsd_fork_info): Remove.
7427 (fbsd_pending_children): Use std::list.
7428 (fbsd_remember_child): Likewise.
7429 (fbsd_is_child_pending): Likewise.
7430 (fbsd_pending_vfork_done): Use std::forward_list.
7431 (fbsd_add_vfork_done): Likewise.
7432 (fbsd_is_vfork_done_pending): Likewise.
7433 (fbsd_next_vfork_done): Likewise.
7434
7435 2017-08-09 John Baldwin <jhb@FreeBSD.org>
7436
7437 * fbsd-nat.c [HAVE_KINFO_GETVMMAP] (struct free_deleter): New.
7438 (fbsd_find_memory_regions): Use free_deleter with std::unique_ptr.
7439 [!HAVE_KINFO_GETVMMAP] (fbsd_find_memory_regions): Use std::string
7440 for `mapfilename'.
7441 (fbsd_xfer_partial): Use gdb::byte_vector.
7442 (fbsd_add_threads): Use gdb::unique_xmalloc_ptr.
7443
7444 2017-08-09 John Baldwin <jhb@FreeBSD.org>
7445
7446 * fbsd-nat.c: [!HAVE_KINFO_GETVMMAP]: Include <sys/user.h> and
7447 "filestuff.h".
7448 (fbsd_find_memory_regions): Fix `mapfile' initialization.
7449
7450 2017-08-09 Tom Tromey <tom@tromey.com>
7451
7452 * skip.c (skiplist_entry): New constructor.
7453 (skiplist_entry::enabled, skiplist_entry::function_is_regexp)
7454 (skiplist_entry::file_is_glob): Now bool.
7455 (skiplist_entry::file, skiplist_entry::function): Now
7456 std::string.
7457 (make_skip_entry): Return a unique_ptr. Use new.
7458 (free_skiplist_entry, free_skiplist_entry_cleanup)
7459 (make_free_skiplist_entry_cleanup): Remove.
7460 (skip_command, skip_disable_command, add_skiplist_entry)
7461 (skip_form_bytes, compile_skip_regexp, skip_command, skip_info)
7462 (skip_file_p, skip_gfile_p, skip_function_p, skip_rfunction_p)
7463 (function_name_is_marked_for_skip): Update.
7464 (skip_delete_command): Update. Use delete.
7465
7466 2017-08-09 Jiong Wang <jiong.wang@arm.com>
7467
7468 * aarch64-linux-tdep.c: Include "auxv.h" and "elf/common.h".
7469 (aarch64_linux_core_read_description): New function.
7470 (aarch64_linux_init_abi): Register gdbarch_core_read_description.
7471
7472 2017-08-09 Pedro Alves <palves@redhat.com>
7473
7474 * cp-name-parser.y (cp_comp_to_string): Return a
7475 gdb::unique_xmalloc_ptr<char>.
7476 * cp-support.c (replace_typedefs_qualified_name)
7477 (replace_typedefs): Adjust to use gdb::unique_xmalloc_ptr<char>.
7478 (cp_canonicalize_string_full): Use op= instead of explicit
7479 convertion.
7480 (cp_class_name_from_physname, method_name_from_physname)
7481 (cp_func_name, cp_remove_params): Adjust to use
7482 gdb::unique_xmalloc_ptr<char>.
7483 * cp-support.h (cp_comp_to_string): Return a
7484 gdb::unique_xmalloc_ptr<char>.
7485 * python/py-type.c (typy_lookup_type): Adjust to use
7486 gdb::unique_xmalloc_ptr<char>.
7487
7488 2017-08-09 H.J. Lu <hongjiu.lu@intel.com>
7489
7490 * dwarf2read.c (dwarf2_string_attr): Fix a typo.
7491
7492 2017-08-09 Alex Lindsay <alexlindsay239@gmail.com>
7493 Yao Qi <yao.qi@linaro.org>
7494
7495 * cp-support.c (cp_canonicalize_string_full): Use
7496 gdb::unique_xmalloc_ptr<char>.
7497 (cp_canonicalize_string): Likewise.
7498
7499 2017-08-09 Yao Qi <yao.qi@linaro.org>
7500
7501 * features/Makefile (WHICH): Remove i386/ non-linux stuff.
7502 * regformats/i386/amd64-avx-avx512.dat: Remove.
7503 * regformats/i386/amd64-avx-mpx-avx512-pku.dat: Remove.
7504 * regformats/i386/amd64-avx-mpx.dat:Remove.
7505 * regformats/i386/amd64-avx.dat: Remove.
7506 * regformats/i386/amd64-mpx.dat: Remove.
7507 * regformats/i386/i386-avx-avx512.dat: Remove.
7508 * regformats/i386/i386-avx-mpx-avx512-pku.dat: Remove.
7509 * regformats/i386/i386-avx-mpx.dat: Remove.
7510 * regformats/i386/i386-mmx.dat: Remove.
7511 * regformats/i386/i386-mpx.dat: Remove.
7512
7513 2017-08-09 Yao Qi <yao.qi@linaro.org>
7514
7515 * amd64-tdep.h (tdesc_x32): Remove the declaration.
7516 * amd64-tdep.c: Don't include features/i386/x32*.c.
7517 (_initialize_amd64_tdep): Don't call initialize_tdesc_x32*
7518 functions.
7519 * features/Makefile (WHICH): Remove i386/x32, i386/x32-avx,
7520 and i386/x32-avx-avx512.
7521 (XMLTOC): Remove i386/x32-avx.xml, i386/x32-avx-avx512.xml,
7522 and i386/x32.xml.
7523 * features/i386/x32-avx-avx512.c: Removed.
7524 * features/i386/x32-avx-avx512.xml: Removed.
7525 * features/i386/x32-avx.c: Removed.
7526 * features/i386/x32-avx.xml: Removed.
7527 * features/i386/x32.c: Removed.
7528 * features/i386/x32.xml: Removed.
7529 * regformats/i386/x32-avx-avx512.dat: Removed.
7530 * regformats/i386/x32-avx.dat: Removed.
7531 * regformats/i386/x32.dat: Removed.
7532
7533 2017-08-07 Maciej W. Rozycki <macro@imgtec.com>
7534
7535 PR breakpoints/21886
7536 * mem-break.c (default_memory_insert_breakpoint): Use
7537 `->placed_address' rather than `->reqstd_address' for the
7538 breakpoint location.
7539
7540 2017-08-07 Maciej W. Rozycki <macro@imgtec.com>
7541
7542 * arch-utils.c (default_print_insn): Remove arch/mach/endian
7543 assertions.
7544
7545 2017-08-07 Maciej W. Rozycki <macro@imgtec.com>
7546
7547 * gdbarch.sh (gdbarch_info): Replace the `tdep_info' member with
7548 a union of `tdep_info', `tdesc_data' and `id'.
7549 * aarch64-tdep.c (aarch64_gdbarch_init): Use `info.tdesc_data'
7550 rather than `info.tdep_info'.
7551 * amd64-linux-tdep.c (amd64_linux_init_abi): Likewise.
7552 * i386-linux-tdep.c (i386_linux_init_abi): Likewise.
7553 * i386-tdep.c (i386_gdbarch_init): Likewise.
7554 * mips-linux-tdep.c (mips_linux_init_abi): Likewise.
7555 * mips-tdep.c (mips_gdbarch_init): Likewise.
7556 * nds32-tdep.c (nds32_gdbarch_init): Likewise.
7557 * rs6000-tdep.c (rs6000_gdbarch_init): Likewise.
7558 * ppc-linux-tdep.c (ppu2spu_sniffer): Use `info.id' rather than
7559 `info.tdep_info'.
7560 (ppc_linux_init_abi): Use `info.tdesc_data' rather than
7561 `info.tdep_info'.
7562 * sparc-tdep.c (sparc32_gdbarch_init): Likewise.
7563 * spu-multiarch.c (spu_gdbarch): Use `info.id' rather than
7564 `info.tdep_info'.
7565 * spu-tdep.c (spu_gdbarch_init): Likewise.
7566 * gdbarch.h: Regenerate.
7567
7568 2017-08-07 Leszek Swirski <leszeks@google.com>
7569
7570 PR symtab/20899
7571 * dwarf2read.c (dwarf2_string_attr): Allow DW_FORM_GNU_strp_alt.
7572
7573 2017-08-07 Simon Marchi <simon.marchi@ericsson.com>
7574
7575 * remote-sim.c (gdbsim_load): Remove char **argv local variable.
7576 (gdbsim_open): Rename gdb_argv args object to argv.
7577
7578 2017-08-05 Tom Tromey <tom@tromey.com>
7579
7580 * compile/compile-object-load.c (compile_object_load): Use
7581 gdb::unique_xmalloc_ptr.
7582 * cli/cli-dump.c (scan_filename): Rename from
7583 scan_filename_with_cleanup. Change return type.
7584 (scan_expression): Rename from scan_expression_with_cleanup.
7585 Change return type.
7586 (dump_memory_to_file, dump_value_to_file, restore_command):
7587 Use gdb::unique_xmalloc_ptr. Update.
7588 * cli/cli-cmds.c (find_and_open_script): Use
7589 gdb::unique_xmalloc_ptr.
7590 * tracefile-tfile.c (tfile_open): Use gdb::unique_xmalloc_ptr.
7591 * symmisc.c (maintenance_print_symbols)
7592 (maintenance_print_msymbols): Use gdb::unique_xmalloc_ptr.
7593 * symfile.c (symfile_bfd_open, generic_load)
7594 (add_symbol_file_command, remove_symbol_file_command): Use
7595 gdb::unique_xmalloc_ptr.
7596 * source.c (openp): Use gdb::unique_xmalloc_ptr.
7597 * psymtab.c (maintenance_print_psymbols): Use
7598 gdb::unique_xmalloc_ptr.
7599 * corelow.c (core_open): Use gdb::unique_xmalloc_ptr.
7600 * breakpoint.c (save_breakpoints): Use gdb::unique_xmalloc_ptr.
7601 * solib.c (solib_map_sections): Use gdb::unique_xmalloc_ptr.
7602 (reload_shared_libraries_1): Likewise.
7603
7604 2017-08-05 Tom Tromey <tom@tromey.com>
7605
7606 * rust-exp.y (rust_op_ptr, set_field): Remove typedefs.
7607 (rust_op_vector, rust_set_vector): New typedefs.
7608 (current_parser): New global.
7609 (work_obstack): Change to pointer type. Update all users.
7610 (rust_ast, pstate): Remove globals.
7611 (struct rust_parser): New.
7612 (%union) <params, field_inits>: Change type.
7613 (start, tuple_expr, unit_expr, struct_expr_list, literal)
7614 (field_expr, expr_list, maybe_expr_list, type_list): Update.
7615 (ast_call_ish, ast_path, ast_function_type, ast_tuple_type)
7616 (convert_params_to_types, convert_params_to_expression): Change
7617 type of "params".
7618 (ast_string): Change type of "fields".
7619 (rust_parse): Make a rust_parser. Remove cleanups.
7620 (rust_lex_tests): Make and install an auto_obstack.
7621
7622 2017-08-04 Yao Qi <yao.qi@linaro.org>
7623
7624 * configure.srv (ipa_x32_linux_regobj): New.
7625 * linux-amd64-ipa.c (get_ipa_tdesc): Use X86_TDESC_AVX_AVX512
7626 instead of X86_TDESC_AVX512.
7627 (initialize_low_tracepoint): Call
7628 init_registers_x32_avx_avx512_linux.
7629
7630 2017-08-04 Yao Qi <yao.qi@linaro.org>
7631
7632 * utils.h (gdb_argv): Add namespace std for nullptr_t.
7633
7634 2017-08-03 Ruslan Kabatsayev <b7.10110111@gmail.com>
7635
7636 * MAINTAINERS (Write After Approval): Add Ruslan Kabatsayev.
7637
7638 2017-08-03 Tom Tromey <tom@tromey.com>
7639
7640 * utils.c (make_cleanup_freeargv, do_freeargv, gdb_buildargv):
7641 Remove.
7642 * utils.h (make_cleanup_freeargv, gdb_buildargv): Remove.
7643
7644 2017-08-03 Tom Tromey <tom@tromey.com>
7645
7646 * python/py-param.c (compute_enum_values): Use gdb_argv.
7647
7648 2017-08-03 Tom Tromey <tom@tromey.com>
7649
7650 * utils.h (struct gdb_argv_deleter): New.
7651 (gdb_argv): New class.
7652 * utils.c (gdb_argv::reset): New method.
7653 * tracepoint.c (delete_trace_variable_command): Use gdb_argv.
7654 * tracefile.c (tsave_command): Use gdb_argv.
7655 * top.c (new_ui_command): Use gdb_argv.
7656 * symmisc.c (maintenance_print_symbols)
7657 (maintenance_print_msymbols, maintenance_expand_symtabs): Use gdb_argv.
7658 * symfile.c (symbol_file_command, generic_load)
7659 (remove_symbol_file_command): Use gdb_argv.
7660 * stack.c (backtrace_command): Use gdb_argv.
7661 * source.c (add_path, show_substitute_path_command)
7662 (unset_substitute_path_command, set_substitute_path_command):
7663 Use gdb_argv.
7664 * skip.c (skip_command): Use gdb_argv. Use gdb_buildargv.
7665 * ser-mingw.c (pipe_windows_open): Use gdb_argv.
7666 * remote.c (extended_remote_run, remote_put_command)
7667 (remote_get_command, remote_delete_command): Use gdb_argv.
7668 * remote-sim.c (gdbsim_load, gdbsim_create_inferior)
7669 (gdbsim_open): Use gdb_argv.
7670 * python/py-cmd.c (gdbpy_string_to_argv): Use gdb_argv.
7671 * psymtab.c (maintenance_print_psymbols): Use gdb_argv.
7672 * procfs.c (procfs_info_proc): Use gdb_argv.
7673 * interps.c (interpreter_exec_cmd): Use gdb_argv.
7674 * infrun.c (handle_command): Use gdb_argv.
7675 * inferior.c (add_inferior_command, clone_inferior_command):
7676 Use gdb_argv.
7677 * guile/scm-string.c (gdbscm_string_to_argv): Use gdb_argv.
7678 * exec.c (exec_file_command): Use gdb_argv.
7679 * cli/cli-cmds.c (alias_command): Use gdb_argv.
7680 * compile/compile.c (build_argc_argv): Use gdb_argv.
7681
7682 2017-08-03 Tom Tromey <tom@tromey.com>
7683
7684 * python/python.c (gdbpy_decode_line): Use unique_xmalloc_ptr.
7685
7686 2017-08-03 Tom Tromey <tom@tromey.com>
7687
7688 * python/python.c (compute_python_string): Return std::string.
7689 (gdbpy_eval_from_control_command): Update.
7690 (do_start_initialization): Use std::string.
7691 * python/py-varobj.c (py_varobj_iter_next): Use string_printf, not
7692 xstrprintf.
7693 * python/py-breakpoint.c (local_setattro): Use string_printf, not
7694 xstrprintf.
7695
7696 2017-08-03 Tom Tromey <tom@tromey.com>
7697
7698 * top.h (do_restore_instream_cleanup): Remove.
7699 * top.c (do_restore_instream_cleanup): Remove.
7700 (read_command_file): Use scoped_restore.
7701 * cli/cli-script.c (execute_user_command): Use scoped_restore.
7702
7703 2017-08-03 Tom Tromey <tom@tromey.com>
7704
7705 * cli/cli-script.c (execute_user_command)
7706 (execute_control_command): Use scoped_restore.
7707
7708 2017-08-03 Tom Tromey <tom@tromey.com>
7709
7710 * cli/cli-script.c (do_restore_user_call_depth): Remove.
7711 (execute_user_command): Remove user_call_depth; use
7712 user_args_stack's size instead.
7713
7714 2017-08-03 Tom Tromey <tom@tromey.com>
7715
7716 * top.h (in_user_command): Remove.
7717 * top.c (in_user_command): Remove.
7718 * cli/cli-script.c (do_restore_user_call_depth)
7719 (execute_user_command): Update.
7720
7721 2017-08-03 Tom Tromey <tom@tromey.com>
7722
7723 * valops.c (search_struct_method): Use gdb::byte_vector.
7724 * valarith.c (value_concat): Use std::vector.
7725 * target.c (memory_xfer_partial): Use gdb::byte_vector.
7726 (simple_search_memory): Likewise.
7727 * printcmd.c (find_string_backward): Use gdb::byte_vector.
7728 * mi/mi-main.c (mi_cmd_data_write_memory): Use gdb::byte_vector.
7729 * gcore.c (gcore_copy_callback): Use gdb::byte_vector.
7730 * elfread.c (elf_rel_plt_read): Use std::string.
7731 * cp-valprint.c (cp_print_value): Use gdb::byte_vector.
7732 * cli/cli-dump.c (restore_section_callback): Use
7733 gdb::byte_vector.
7734
7735 2017-08-03 Tom Tromey <tom@tromey.com>
7736
7737 * jit.c (jit_reader_load_command): Use unique_xmalloc_ptr.
7738
7739 2017-08-03 Tom Tromey <tom@tromey.com>
7740
7741 * tui/tui-regs.c (tui_restore_gdbout): Remove.
7742 (tui_register_format): Use scoped_restore.
7743
7744 2017-08-03 Tom Tromey <tom@tromey.com>
7745
7746 * reverse.c (exec_direction_default): Remove.
7747 (exec_reverse_once): Use scoped_restore.
7748 * remote.c (restore_remote_timeout): Remove.
7749 (remote_flash_erase, remote_flash_write, remote_flash_done)
7750 (readchar, remote_serial_write): Use scoped_restore.
7751 * cli/cli-script.c (struct source_cleanup_lines_args)
7752 (source_cleanup_lines): Remove.
7753 (script_from_file): Use scoped_restore.
7754 * cli/cli-cmds.c (source_verbose_cleanup): Remove.
7755 (source_command): Use scoped_restore.
7756
7757 2017-08-03 Tom Tromey <tom@tromey.com>
7758
7759 * utils.h (make_cleanup_free_so): Remove.
7760 * utils.c (do_free_so, make_cleanup_free_so): Remove.
7761 * solist.h (struct so_deleter): New.
7762 (so_list_up): New typedef.
7763 * solib-svr4.c (svr4_read_so_list): Use so_list_up.
7764
7765 2017-08-03 Tom Tromey <tom@tromey.com>
7766
7767 * utils.h (make_cleanup_restore_current_language): Remove.
7768 * utils.c (do_restore_current_language)
7769 (make_cleanup_restore_current_language): Remove.
7770 * parse.c (parse_exp_in_context_1)
7771 (parse_expression_with_language): Use
7772 scoped_restore_current_language.
7773 * mi/mi-main.c (mi_cmd_execute): Use
7774 scoped_restore_current_language.
7775 * language.h (scoped_restore_current_language): New class.
7776
7777 2017-08-03 Tom Tromey <tom@tromey.com>
7778
7779 * compile/compile.c (cleanup_unlink_file): Remove.
7780 (compile_to_object): Use gdb::unlinker.
7781 (eval_compile_command): Likewise.
7782
7783 2017-08-03 Tom Tromey <tom@tromey.com>
7784
7785 * utils.h (make_cleanup_fclose): Remove.
7786 * utils.c (do_fclose_cleanup, make_cleanup_fclose): Remove.
7787
7788 2017-08-03 Tom Tromey <tom@tromey.com>
7789
7790 * top.c (open_terminal_stream): Return gdb_file_up.
7791 (new_ui_command): Update.
7792
7793 2017-08-03 Tom Tromey <tom@tromey.com>
7794
7795 * source.c (print_source_lines_base, forward_search_command)
7796 (reverse_search_command): Use gdb_file_up.
7797
7798 2017-08-03 Tom Tromey <tom@tromey.com>
7799
7800 * fbsd-nat.c (fbsd_find_memory_regions): Update.
7801
7802 2017-08-03 Tom Tromey <tom@tromey.com>
7803
7804 * cli/cli-cmds.c (find_and_open_script): Change return type.
7805 Remove "streamp" and "full_path" parameters.
7806 (source_script_with_search): Update.
7807 * auto-load.c (source_script_file): Update.
7808 * cli/cli-cmds.h (find_and_open_script): Change type.
7809 (open_script): New struct.
7810
7811 2017-08-03 Tom Tromey <tom@tromey.com>
7812
7813 * xml-support.c (xml_fetch_content_from_file): Update.
7814 * ui-file.c (stdio_file::open): Update.
7815 * tracefile-tfile.c (tfile_start): Update.
7816 * remote.c (remote_file_put, remote_file_get): Update.
7817 * nat/linux-procfs.c (linux_proc_get_int)
7818 (linux_proc_pid_get_state, linux_proc_tid_get_name): Update.
7819 * nat/linux-osdata.c (linux_common_core_of_thread): Update.
7820 (command_from_pid, commandline_from_pid, linux_xfer_osdata_cpus)
7821 (print_sockets, linux_xfer_osdata_shm, linux_xfer_osdata_sem)
7822 (linux_xfer_osdata_msg, linux_xfer_osdata_modules): Update.
7823 * nat/linux-btrace.c (linux_determine_kernel_start): Update.
7824 * linux-nat.c (linux_proc_pending_signals): Update.
7825 * dwarf2read.c (write_psymtabs_to_index): Use gdb_file_up.
7826 (file_closer): Remove.
7827 * compile/compile.c (compile_to_object): Update.
7828 * common/filestuff.h (struct gdb_file_deleter): New.
7829 (gdb_file_up): New typedef.
7830 (gdb_fopen_cloexec): Change return type.
7831 * common/filestuff.c (gdb_fopen_cloexec): Return gdb_file_up.
7832 * cli/cli-dump.c (fopen_with_cleanup): Remove.
7833 (dump_binary_file, restore_binary_file): Update.
7834 * auto-load.c (auto_load_objfile_script_1): Update.
7835
7836 2017-08-03 Tom Tromey <tom@tromey.com>
7837
7838 * tracepoint.c (tvariables_info_1): Use ui_out_emit_table.
7839 (info_static_tracepoint_markers_command): Likewise.
7840 * solib.c (info_sharedlibrary_command): Use ui_out_emit_table.
7841 * skip.c (skip_info): Use ui_out_emit_table.
7842 * progspace.c (print_program_space): Use ui_out_emit_table.
7843 * osdata.c (info_osdata): Use ui_out_emit_table.
7844 * mi/mi-cmd-info.c (mi_cmd_info_ada_exceptions): Use
7845 ui_out_emit_table.
7846 * linux-thread-db.c (info_auto_load_libthread_db): Use
7847 ui_out_emit_table.
7848 * inferior.c (print_inferior): Use ui_out_emit_table.
7849 * gdb_bfd.c (maintenance_info_bfds): Use ui_out_emit_table.
7850 * breakpoint.c (breakpoint_1): Use ui_out_emit_table.
7851 * auto-load.c (auto_load_info_scripts): Use ui_out_emit_table.
7852 * ada-tasks.c (print_ada_task_info): Use ui_out_emit_table.
7853 * ui-out.h (class ui_out_emit_table): New.
7854
7855 2017-08-02 Maciej W. Rozycki <macro@imgtec.com>
7856
7857 * mips-tdep.c (mips_fpu_type_str): New function.
7858 (mips_dump_tdep): Call it.
7859
7860 2017-08-01 Maciej W. Rozycki <macro@imgtec.com>
7861
7862 * mips-tdep.c (mips_gdbarch_init): Use MIPS_FPU_TYPE to access
7863 `->mips_fpu_type'.
7864
7865 2017-07-31 Xavier Roirand <roirand@adacore.com>
7866
7867 * solib-darwin.c (DYLD_VERSION_MAX): Increase value.
7868
7869 2017-07-27 Xavier Roirand <roirand@adacore.com>
7870
7871 * MAINTAINERS (Write After Approval): Add Xavier Roirand.
7872
7873 2017-07-26 Yao Qi <yao.qi@linaro.org>
7874
7875 * cli/cli-cmds.c (maintenancechecklist): New variable.
7876 * gdbcmd.h (maintenancechecklist): Declare it.
7877 * i386-linux-tdep.c (_initialize_i386_linux_tdep) [GDB_SELF_TEST]:
7878 Call i386_linux_read_description with different masks.
7879 * maint.c (maintenance_check_command): New function.
7880 (_initialize_maint_cmds): Call add_prefix_cmd.
7881 * target-descriptions.c (tdesc_reg): override operator != and ==.
7882 (tdesc_type): Likewise.
7883 (tdesc_feature): Likewise.
7884 (target_desc): Likewise.
7885 [GDB_SELF_TEST] (selftests::record_xml_tdesc): New function.
7886 (maintenance_check_xml_descriptions): New function.
7887 (_initialize_target_descriptions) Add command "xml-descriptions".
7888 * target-descriptions.h (selftests::record_xml_tdesc): Declare.
7889
7890 2017-07-26 Yao Qi <yao.qi@linaro.org>
7891
7892 * i386-linux-tdep.c: Don't include features/i386/i386-*linux.c.
7893 Include features/i386/32bit-*.c.
7894 (i386_linux_read_description): Generate target description if it
7895 doesn't exist.
7896 (_initialize_i386_linux_tdep): Don't call _initialize_tdesc_i386
7897 functions.
7898 * features/i386/32bit-linux.c: Re-generated.
7899 * features/i386/32bit-sse.c: Likewise.
7900 * target-descriptions.c (print_c_feature::visit): Print code to
7901 set register number if needed.
7902 (print_c_feature) <m_next_regnum>: New field.
7903
7904 2017-07-26 Yao Qi <yao.qi@linaro.org>
7905
7906 * features/Makefile (CFILES): Rename with TDESC_CFILES.
7907 (FEATURE_XMLFILES): New.
7908 (FEATURE_CFILES): New.
7909 New rules.
7910 (clean-cfiles): Remove generated c files.
7911 * features/i386/32bit-avx.c: Generated.
7912 * features/i386/32bit-avx512.c: Generated.
7913 * features/i386/32bit-core.c: Generated.
7914 * features/i386/32bit-linux.c: Generated.
7915 * features/i386/32bit-mpx.c: Generated.
7916 * features/i386/32bit-pkeys.c: Generated.
7917 * features/i386/32bit-sse.c: Generated.
7918 * target-descriptions.c: Include algorithm.
7919 (tdesc_element_visitor): Add method visit_end.
7920 (print_c_tdesc): Implement visit_end.
7921 (print_c_tdesc:: m_filename_after_features): Move it to
7922 protected.
7923 (print_c_feature): New class.
7924 (maint_print_c_tdesc_cmd): Use print_c_feature if XML file
7925 name starts with "i386/32bit-".
7926
7927 2017-07-26 Yao Qi <yao.qi@linaro.org>
7928
7929 * target-descriptions.c (tdesc_element_visitor): New class.
7930 (tdesc_element): New class.
7931 (tdesc_reg): Inherit from tdesc_element.
7932 (tdesc_reg::accept): New function.
7933 (tdesc_type): Inherit from tdesc_element.
7934 (tdesc_type::accept): New function.
7935 (tdesc_feature): Inherit from tdesc_element.
7936 (tdesc_feature::accept): New function.
7937 (target_desc): Inherit from tdesc_element.
7938 (target_desc::target_desc): New.
7939 (target_desc::~target_desc): New.
7940 (target_desc::accept): New.
7941 (allocate_target_description): Use new.
7942 (free_target_description): Use delete.
7943 (print_c_tdesc): New class.
7944 (maint_print_c_tdesc_cmd): Adjust.
7945
7946 * features/aarch64.c: Re-generated.
7947 * features/arc-arcompact.c: Re-generated.
7948 * features/arc-v2.c: Re-generated.
7949 * features/arm/arm-with-iwmmxt.c: Re-generated.
7950 * features/arm/arm-with-m.c: Re-generated.
7951 * features/arm/arm-with-m-fpa-layout.c: Re-generated.
7952 * features/arm/arm-with-m-vfp-d16.c: Re-generated.
7953 * features/arm/arm-with-neon.c: Re-generated.
7954 * features/arm/arm-with-vfpv2.c: Re-generated.
7955 * features/arm/arm-with-vfpv3.c: Re-generated.
7956 * features/i386/amd64-avx-avx512.c: Re-generated.
7957 * features/i386/amd64-avx-avx512-linux.c: Re-generated.
7958 * features/i386/amd64-avx.c: Re-generated.
7959 * features/i386/amd64-avx-linux.c: Re-generated.
7960 * features/i386/amd64-avx-mpx-avx512-pku.c: Re-generated.
7961 * features/i386/amd64-avx-mpx-avx512-pku-linux.c: Re-generated.
7962 * features/i386/amd64-avx-mpx.c: Re-generated.
7963 * features/i386/amd64-avx-mpx-linux.c: Re-generated.
7964 * features/i386/amd64.c: Re-generated.
7965 * features/i386/amd64-linux.c: Re-generated.
7966 * features/i386/amd64-mpx.c: Re-generated.
7967 * features/i386/amd64-mpx-linux.c: Re-generated.
7968 * features/i386/i386-avx-avx512.c: Re-generated.
7969 * features/i386/i386-avx-avx512-linux.c: Re-generated.
7970 * features/i386/i386-avx.c: Re-generated.
7971 * features/i386/i386-avx-linux.c: Re-generated.
7972 * features/i386/i386-avx-mpx-avx512-pku.c: Re-generated.
7973 * features/i386/i386-avx-mpx-avx512-pku-linux.c: Re-generated.
7974 * features/i386/i386-avx-mpx.c: Re-generated.
7975 * features/i386/i386-avx-mpx-linux.c: Re-generated.
7976 * features/i386/i386.c: Re-generated.
7977 * features/i386/i386-linux.c: Re-generated.
7978 * features/i386/i386-mmx.c: Re-generated.
7979 * features/i386/i386-mmx-linux.c: Re-generated.
7980 * features/i386/i386-mpx.c: Re-generated.
7981 * features/i386/i386-mpx-linux.c: Re-generated.
7982 * features/i386/x32-avx-avx512.c: Re-generated.
7983 * features/i386/x32-avx-avx512-linux.c: Re-generated.
7984 * features/i386/x32-avx.c: Re-generated.
7985 * features/i386/x32-avx-linux.c: Re-generated.
7986 * features/i386/x32.c: Re-generated.
7987 * features/i386/x32-linux.c: Re-generated.
7988 * features/microblaze.c: Re-generated.
7989 * features/microblaze-with-stack-protect.c: Re-generated.
7990 * features/mips64-dsp-linux.c: Re-generated.
7991 * features/mips64-linux.c: Re-generated.
7992 * features/mips-dsp-linux.c: Re-generated.
7993 * features/mips-linux.c: Re-generated.
7994 * features/nds32.c: Re-generated.
7995 * features/nios2.c: Re-generated.
7996 * features/nios2-linux.c: Re-generated.
7997 * features/rs6000/powerpc-32.c: Re-generated.
7998 * features/rs6000/powerpc-32l.c: Re-generated.
7999 * features/rs6000/powerpc-403.c: Re-generated.
8000 * features/rs6000/powerpc-403gc.c : Re-generated.
8001 * features/rs6000/powerpc-405.c: Re-generated.
8002 * features/rs6000/powerpc-505.c: Re-generated.
8003 * features/rs6000/powerpc-601.c: Re-generated.
8004 * features/rs6000/powerpc-602.c: Re-generated.
8005 * features/rs6000/powerpc-603.c: Re-generated.
8006 * features/rs6000/powerpc-604.c: Re-generated.
8007 * features/rs6000/powerpc-64.c: Re-generated.
8008 * features/rs6000/powerpc-64l.c: Re-generated.
8009 * features/rs6000/powerpc-7400.c: Re-generated.
8010 * features/rs6000/powerpc-750.c: Re-generated.
8011 * features/rs6000/powerpc-860.c: Re-generated.
8012 * features/rs6000/powerpc-altivec32.c: Re-generated.
8013 * features/rs6000/powerpc-altivec32l.c: Re-generated.
8014 * features/rs6000/powerpc-altivec64.c: Re-generated.
8015 * features/rs6000/powerpc-altivec64l.c: Re-generated.
8016 * features/rs6000/powerpc-cell32l.c: Re-generated.
8017 * features/rs6000/powerpc-cell64l.c: Re-generated.
8018 * features/rs6000/powerpc-e500.c: Re-generated.
8019 * features/rs6000/powerpc-e500l.c: Re-generated.
8020 * features/rs6000/powerpc-isa205-32l.c: Re-generated.
8021 * features/rs6000/powerpc-isa205-64l.c: Re-generated.
8022 * features/rs6000/powerpc-isa205-altivec32l.c: Re-generated.
8023 * features/rs6000/powerpc-isa205-altivec64l.c: Re-generated.
8024 * features/rs6000/powerpc-isa205-vsx32l.c: Re-generated.
8025 * features/rs6000/powerpc-isa205-vsx64l.c: Re-generated.
8026 * features/rs6000/powerpc-vsx32.c: Re-generated.
8027 * features/rs6000/powerpc-vsx32l.c: Re-generated.
8028 * features/rs6000/powerpc-vsx64.c: Re-generated.
8029 * features/rs6000/powerpc-vsx64l.c: Re-generated.
8030 * features/rs6000/rs6000.c: Re-generated.
8031 * features/s390-linux32.c: Re-generated.
8032 * features/s390-linux32v1.c: Re-generated.
8033 * features/s390-linux32v2.c: Re-generated.
8034 * features/s390-linux64.c: Re-generated.
8035 * features/s390-linux64v1.c: Re-generated.
8036 * features/s390-linux64v2.c: Re-generated.
8037 * features/s390-te-linux64.c: Re-generated.
8038 * features/s390-tevx-linux64.c: Re-generated.
8039 * features/s390-vx-linux64.c: Re-generated.
8040 * features/s390x-linux64.c: Re-generated.
8041 * features/s390x-linux64v1.c: Re-generated.
8042 * features/s390x-linux64v2.c: Re-generated.
8043 * features/s390x-te-linux64.c: Re-generated.
8044 * features/s390x-tevx-linux64.c: Re-generated.
8045 * features/s390x-vx-linux64.c: Re-generated.
8046 * features/sparc/sparc32-solaris.c: Re-generated.
8047 * features/sparc/sparc64-solaris.c: Re-generated.
8048 * features/tic6x-c62x.c: Re-generated.
8049 * features/tic6x-c62x-linux.c: Re-generated.
8050 * features/tic6x-c64x.c: Re-generated.
8051 * features/tic6x-c64x-linux.c: Re-generated.
8052 * features/tic6x-c64xp.c: Re-generated.
8053 * features/tic6x-c64xp-linux.c: Re-generated.
8054
8055 2017-07-26 Yao Qi <yao.qi@linaro.org>
8056
8057 * i386-linux-tdep.c (i386_linux_read_description): New function.
8058 (i386_linux_core_read_description): Call
8059 i386_linux_read_description.
8060 * i386-linux-tdep.h (i386_linux_read_description): Declare.
8061 (tdesc_i386_linux, tdesc_i386_mmx_linux): Remove declarations.
8062 (tdesc_i386_avx_linux, tdesc_i386_mpx_linux): Likewise
8063 (tdesc_i386_avx_mpx_linux, tdesc_i386_avx_avx512_linux): Likewise.
8064 (tdesc_i386_avx_mpx_avx512_pku_linux): Likewise.
8065 * x86-linux-nat.c (x86_linux_read_description): Call
8066 i386_linux_read_description.
8067
8068 2017-07-26 Yao Qi <yao.qi@linaro.org>
8069
8070 * NEWS: Mention it.
8071 * features/Makefile (%.c: %.xml): Pass the xml file name to
8072 command "maint print c-tdesc".
8073 * target-descriptions.c (maint_print_c_tdesc_cmd): Get file
8074 name from 'arg'.
8075
8076 2017-07-26 Yao Qi <yao.qi@linaro.org>
8077
8078 * target-descriptions.c (target_desc): Add ctor and dtor. Do
8079 in-class initialization.
8080 (tdesc_create_feature): Call new instead of XCNEW.
8081 (free_target_description): Ue delete.
8082
8083 2017-07-25 John Baldwin <jhb@FreeBSD.org>
8084
8085 * configure.nat: Add "-lkvm" for NetBSD/sparc64 and fix typo.
8086
8087 2017-07-25 Yao Qi <yao.qi@linaro.org>
8088
8089 * amd64-tdep.c (amd64_init_abi): Make argument default_tdesc
8090 constant.
8091 (amd64_x32_init_abi): Likewise.
8092 * amd64-tdep.h (amd64_init_abi): Update declaration.
8093 (amd64_x32_init_abi): Likewise.
8094
8095 2017-07-25 Yao Qi <yao.qi@linaro.org>
8096
8097 PR tdep/21717
8098 * arm-linux-nat.c (arm_linux_fetch_inferior_registers): Update
8099 condition for FPSCR.
8100 (arm_linux_store_inferior_registers): Likewise.
8101
8102 2017-07-22 Tom Tromey <tom@tromey.com>
8103
8104 * break-catch-syscall.c (struct catch_syscall_inferior_data)
8105 <syscalls_counts>: Now a std::vector.
8106 (get_catch_syscall_inferior_data): Use "new".
8107 (catch_syscall_inferior_data_cleanup): Use "delete".
8108 (insert_catch_syscall, remove_catch_syscall)
8109 (clear_syscall_counts): Update.
8110
8111 2017-07-22 Tom Tromey <tom@tromey.com>
8112
8113 * break-catch-syscall.c (syscall_catchpoint)
8114 <syscalls_to_be_caught>: Now a std::vector<int>
8115 (~syscall_catchpoint): Remove.
8116 (insert_catch_syscall, remove_catch_syscall)
8117 (breakpoint_hit_catch_syscall, print_one_catch_syscall)
8118 (print_mention_catch_syscall, print_recreate_catch_syscall):
8119 Update.
8120 (create_syscall_event_catchpoint): Change type of "filter"
8121 parameter.
8122 (catch_syscall_split_args): Return a std::vector.
8123 (catch_syscall_command_1, catching_syscall_number_1): Update.
8124
8125 2017-07-22 Tom Tromey <tom@tromey.com>
8126
8127 * break-catch-throw.c (struct exception_catchpoint)
8128 <exception_rx>: Now a std::string.
8129 (~exception_catchpoint): Remove.
8130 (print_one_detail_exception_catchpoint): Update.
8131 (handle_gnu_v3_exceptions): Change type of except_rx.
8132 (extract_exception_regexp): Return a std::string.
8133 (catch_exception_command_1): Update.
8134
8135 2017-07-22 Tom Tromey <tom@tromey.com>
8136
8137 * break-catch-sig.c (gdb_signal_type): Remove typedef.
8138 (struct signal_catchpoint) <signals_to_be_caught>: Now a
8139 std::vector.
8140 <catch_all>: Now a bool.
8141 (~signal_catchpoint): Remove.
8142 (signal_catchpoint_insert_location)
8143 (signal_catchpoint_remove_location)
8144 (signal_catchpoint_breakpoint_hit, signal_catchpoint_print_one)
8145 (signal_catchpoint_print_mention)
8146 (signal_catchpoint_print_recreate)
8147 (signal_catchpoint_explains_signal): Update.
8148 (create_signal_catchpoint): Change type of "filter" and
8149 "catch_all".
8150 (catch_signal_split_args): Return a std::vector. Change type of
8151 "catch_all".
8152 (catch_signal_command): Update.
8153
8154 2017-07-20 Pedro Alves <palves@redhat.com>
8155
8156 * ada-lang.c (ada_language_defn): Make extern.
8157 (_initialize_ada_language): Remove add_language call.
8158 * c-lang.c (c_language_defn, cplus_language_defn)
8159 (asm_language_defn, minimal_language_defn): Make extern.
8160 (_initialize_c_language): Delete.
8161 * completer.c (compare_cstrings): Delete, moved to utils.h.
8162 * d-lang.c (d_language_defn): Make extern.
8163 (_initialize_d_language): Remove add_language calls.
8164 * defs.h (enum language): Add comment.
8165 * f-lang.c (f_language_defn): Make extern.
8166 (_initialize_f_language): Remove add_language call.
8167 * go-lang.c (go_language_defn): Make extern.
8168 (_initialize_go_language): Remove add_language call.
8169 * language.c: Include <algorithm>.
8170 (languages): Redefine as const array.
8171 (languages_size, languages_allocsize, DEFAULT_ALLOCSIZE): Delete.
8172 (set_language_command): Handle "local". Use for-range loop.
8173 (set_language): Remove loop.
8174 (language_enum): Rewrite.
8175 (language_def, language_str): Remove loops.
8176 (add_language): Delete.
8177 (add_set_language_command): New, based on add_languages.
8178 (skip_language_trampoline): Adjust.
8179 (local_language_defn): Delete.
8180 (language_gdbarch_post_init): Adjust.
8181 (_initialize_language): Remove add_language calls. Call
8182 add_set_language_command.
8183 * language.h (add_language): Delete.
8184 (auto_language_defn)
8185 (unknown_language_defn, minimal_language_defn, ada_language_defn)
8186 (asm_language_defn, c_language_defn, cplus_language_defn)
8187 (d_language_defn, f_language_defn, go_language_defn)
8188 (m2_language_defn, objc_language_defn, opencl_language_defn)
8189 (pascal_language_defn, rust_language_defn): Declare.
8190 * m2-lang.c (m2_language_defn): Make extern.
8191 (_initialize_m2_language): Remove add_language call.
8192 * objc-lang.c (objc_language_defn): Make extern.
8193 (_initialize_objc_language): Remove add_language call.
8194 * opencl-lang.c (opencl_language_defn): Make extern.
8195 (_initialize_opencl_language): Remove add_language call.
8196 * p-lang.c (pascal_language_defn): Make extern.
8197 (_initialize_pascal_language): Delete.
8198 * rust-lang.c (rust_language_defn): Make extern.
8199 (_initialize_rust_language): Delete.
8200 * utils.h (compare_cstrings): New static inline function.
8201
8202 2017-07-20 Pedro Alves <palves@redhat.com>
8203
8204 * ada-lang.c (ada_to_fixed_type_1): Adjust.
8205 (get_var_value): Constify parameters.
8206 (get_int_var_value): Change prototype.
8207 (to_fixed_range_type): Adjust.
8208 * ada-lang.h (get_int_var_value): Change prototype.
8209
8210 2017-07-20 Pedro Alves <palves@redhat.com>
8211
8212 * dwarf2read.c (dw2_lookup_symbol): Use
8213 SYMBOL_MATCHES_SEARCH_NAME.
8214 * psymtab.c (psym_lookup_symbol): Use SYMBOL_MATCHES_SEARCH_NAME.
8215
8216 2017-07-20 Pedro Alves <palves@redhat.com>
8217
8218 * block.c (block_iter_name_step, block_iter_name_first)
8219 (block_iter_name_next): Delete.
8220 (block_lookup_symbol_primary): Adjust to use
8221 dict_iter_match_first/dict_iter_match_next.
8222 * block.h (block_iter_name_first, block_iter_name_next): Delete
8223 declarations.
8224 (ALL_BLOCK_SYMBOLS_WITH_NAME): Adjust to use
8225 dict_iter_match_first/dict_iter_match_next.
8226
8227 2017-07-20 Pedro Alves <palves@redhat.com>
8228
8229 * cp-support.c (cp_find_first_component_aux): Add missing case for
8230 end of string.
8231
8232 2017-07-18 David Blaikie <dblaikie@gmail.com>
8233
8234 * dwarf2read.c (create_cus_hash_table): Re-add lost initialization
8235 of dwo_cu's dwo_file.
8236
8237 2017-07-18 Yao Qi <yao.qi@linaro.org>
8238
8239 * remote.c (store_registers_using_G): Remove one line comment.
8240
8241 2017-07-18 Yao Qi <yao.qi@linaro.org>
8242
8243 * regcache.c (regcache_cpy): Simplify it.
8244 (regcache::cpy_no_passthrough): Remove it.
8245 * regcache.h (cpy_no_passthrough): Remove it.
8246 (regcache_dup, regcache_cpy): Update comments.
8247
8248 2017-07-18 Pedro Alves <palves@redhat.com>
8249
8250 * remote-sim.c (sim_command_completer): Adjust to work with a
8251 completion_tracker instead of a VEC.
8252
8253 2017-07-17 Pedro Alves <palves@redhat.com>
8254
8255 * completer.c (complete_source_filenames): New function.
8256 (complete_address_and_linespec_locations): New function.
8257 (location_completer): Use complete_address_and_linespec_locations.
8258 (completion_tracker::build_completion_result): Honor the tracker's
8259 request to suppress append.
8260 * completer.h (completion_tracker::suppress_append_ws)
8261 (completion_tracker::set_suppress_append_ws): New methods.
8262 (completion_tracker::m_suppress_append_ws): New field.
8263 (complete_source_filenames): New declaration.
8264 * linespec.c (linespec_complete_what): New.
8265 (struct ls_parser) <complete_what, completion_word,
8266 completion_quote_char, completion_quote_end, completion_tracker>:
8267 New fields.
8268 (string_find_incomplete_keyword_at_end): New.
8269 (linespec_lexer_lex_string): Record quote char. If in completion
8270 mode, don't throw.
8271 (linespec_lexer_consume_token): Advance the completion word point.
8272 (linespec_lexer_peek_token): Save/restore completion info.
8273 (save_stream_and_consume_token): New.
8274 (set_completion_after_number): New.
8275 (linespec_parse_basic): Set what to complete next depending on
8276 token. Handle function and label completions specially.
8277 (parse_linespec): Disable objc shortcut in completion mode. Set
8278 what to complete next depending on token type. Skip keyword if in
8279 completion mode.
8280 (complete_linespec_component, linespec_complete): New.
8281 * linespec.h (linespec_complete): Declare.
8282
8283 2017-07-17 Pedro Alves <palves@redhat.com>
8284
8285 * linespec.c (linespec_lexer_lex_string, find_toplevel_char):
8286 Handle 'operator<' / 'operator<<'.
8287
8288 2017-07-17 Pedro Alves <palves@redhat.com>
8289
8290 * completer.c (collect_explicit_location_matches): Handle
8291 MATCH_LABEL.
8292 (convert_explicit_location_to_linespec): New, factored out from
8293 ...
8294 (convert_explicit_location_to_sals): ... this.
8295 (complete_label): New.
8296 (linespec_complete_label, find_label_symbols_in_block): New.
8297 (find_label_symbols): Add completion_mode parameter and adjust to
8298 call find_label_symbols_in_block.
8299 * linespec.h (linespec_complete_label): Declare.
8300
8301 2017-07-17 Pedro Alves <palves@redhat.com>
8302
8303 * ada-lang.c (ada_collect_symbol_completion_matches): Add
8304 complete_symbol_mode parameter.
8305 * cli/cli-cmds.c (complete_command): Get the completion result out
8306 of the handle_brkchars tracker if used a custom word point.
8307 * completer.c: Include "linespec.h".
8308 (enum explicit_location_match_type) <MATCH_LINE>: New enumerator.
8309 (advance_to_expression_complete_word_point): New.
8310 (completion_tracker::completes_to_completion_word): New.
8311 (complete_files_symbols): Pass down
8312 complete_symbol_mode::EXPRESSION.
8313 (explicit_options, probe_options): New.
8314 (collect_explicit_location_matches): Complete on the
8315 explictit_loc->foo instead of word. Use
8316 linespec_complete_function. Handle MATCH_LINE. Handle offering
8317 keyword and options completions.
8318 (backup_text_ptr): Delete.
8319 (skip_keyword): New.
8320 (complete_explicit_location): Remove 'word' parameter. Add
8321 language, quoted_arg_start and quoted_arg_end parameters.
8322 Rewrite, parsing left to right.
8323 (location_completer): Rewrite.
8324 (location_completer_handle_brkchars): New function.
8325 (symbol_completer): Pass down complete_symbol_mode::EXPRESSION.
8326 (enum complete_line_internal_reason): Adjust comments.
8327 (completion_tracker::discard_completions): New.
8328 (completer_handle_brkchars_func_for_completer): Handle
8329 location_completer.
8330 (gdb_custom_word_point_brkchars)
8331 (gdb_org_rl_basic_quote_characters): New.
8332 (gdb_completion_word_break_characters_throw)
8333 (completion_find_completion_word): Handle trackers that use a
8334 custom word point.
8335 (completion_tracker::advance_custom_word_point_by): New.
8336 (completion_tracker::build_completion_result): Don't rely on
8337 readline appending the quote char.
8338 (gdb_rl_attempted_completion_function_throw): Handle trackers that
8339 use a custom word point.
8340 (gdb_rl_attempted_completion_function): Restore
8341 rl_basic_quote_characters.
8342 * completer.h (class completion_tracker): Extend intro comment.
8343 (completion_tracker::set_quote_char)
8344 (completion_tracker::quote_char)
8345 (completion_tracker::set_use_custom_word_point)
8346 (completion_tracker::use_custom_word_point)
8347 (completion_tracker::custom_word_point)
8348 (completion_tracker::set_custom_word_point)
8349 (completion_tracker::advance_custom_word_point_by)
8350 (completion_tracker::completes_to_completion_word)
8351 (completion_tracker::discard_completions): New methods.
8352 (completion_tracker::m_quote_char)
8353 (completion_tracker::m_use_custom_word_point)
8354 (completion_tracker::m_custom_word_point): New fields.
8355 (advance_to_expression_complete_word_point): Declare.
8356 * f-lang.c (f_collect_symbol_completion_matches): Add
8357 complete_symbol_mode parameter.
8358 * language.h (struct language_defn)
8359 <la_collect_symbol_completion_matches>: Add complete_symbol_mode
8360 parameter.
8361 * linespec.c (linespec_keywords): Add NULL terminator. Make extern.
8362 (linespec_complete_function): New function.
8363 (linespec_lexer_lex_keyword): Adjust.
8364 * linespec.h (linespec_keywords, linespec_complete_function): New
8365 declarations.
8366 * location.c (find_end_quote): New function.
8367 (explicit_location_lex_one): Add explicit_completion_info
8368 parameter. Save quoting info. Don't throw if being called for
8369 completion. Don't handle Ada operators here.
8370 (is_cp_operator, skip_op_false_positives, first_of)
8371 (explicit_location_lex_one_function): New function.
8372 (string_to_explicit_location): Replace 'dont_throw' parameter with
8373 an explicit_completion_info pointer parameter. Handle it. Don't
8374 use explicit_location_lex_one to lex function names. Use
8375 explicit_location_lex_one_function instead.
8376 * location.h (struct explicit_completion_info): New.
8377 (string_to_explicit_location): Replace 'dont_throw' parameter with
8378 an explicit_completion_info pointer parameter.
8379 * symtab.c (default_collect_symbol_completion_matches_break_on):
8380 Add complete_symbol_mode parameter. Handle LINESPEC mode.
8381 (default_collect_symbol_completion_matches)
8382 (collect_symbol_completion_matches): Add complete_symbol_mode
8383 parameter.
8384 (collect_symbol_completion_matches_type): Pass down
8385 complete_symbol_mode::EXPRESSION.
8386 (collect_file_symbol_completion_matches): Add complete_symbol_mode
8387 parameter. Handle LINESPEC mode.
8388 * symtab.h (complete_symbol_mode): New.
8389 (default_collect_symbol_completion_matches_break_on)
8390 (default_collect_symbol_completion_matches)
8391 (collect_symbol_completion_matches)
8392 (collect_file_symbol_completion_matches): Add complete_symbol_mode
8393 parameter.
8394
8395 2017-07-17 Pedro Alves <palves@redhat.com>
8396
8397 * utils.c (enum class strncmp_iw_mode): New.
8398 (strcmp_iw): Rename to ...
8399 (strncmp_iw_with_mode): ... this. Add string2_len and mode
8400 parameters. Handle them.
8401 (strncmp_iw): New.
8402 (strcmp_iw): Reimplement as wrapper around strncmp_iw_with_mode.
8403 * utils.h (strncmp_iw): Declare.
8404 (strcmp_iw): Move describing comments here.
8405
8406 2017-07-17 Pedro Alves <palves@redhat.com>
8407
8408 * c-exp.y (operator_stoken): Use CP_OPERATOR_LEN and
8409 CP_OPERATOR_STR.
8410 * c-typeprint.c (is_type_conversion_operator): Use
8411 CP_OPERATOR_STR.
8412 * cp-support.c (LENGTH_OF_OPERATOR): Delete.
8413 (cp_find_first_component_aux): Use CP_OPERATOR_STR and
8414 CP_OPERATOR_LEN.
8415 * cp-support.h (CP_OPERATOR_STR, CP_OPERATOR_LEN): New.
8416 * gnu-v2-abi.c (gnuv2_is_operator_name): Use CP_OPERATOR_STR.
8417 * gnu-v3-abi.c (gnuv3_is_operator_name): Use CP_OPERATOR_STR.
8418 * linespec.c (linespec_lexer_lex_string): Use CP_OPERATOR_LEN and
8419 CP_OPERATOR_STR.
8420 * location.c: Include "cp-support.h".
8421 (explicit_location_lex_one): Use CP_OPERATOR_LEN and
8422 CP_OPERATOR_STR.
8423 * symtab.c (operator_chars): Use CP_OPERATOR_STR and
8424 CP_OPERATOR_LEN.
8425
8426 2017-07-17 Pedro Alves <palves@redhat.com>
8427
8428 * cli/cli-cmds.c (complete_command): Use a completion tracker
8429 along with completion_find_completion_word for handle_brkchars
8430 phase.
8431 * completer.c (RL_QF_SINGLE_QUOTE, RL_QF_DOUBLE_QUOTE)
8432 (RL_QF_BACKSLASH, RL_QF_OTHER_QUOTE): New.
8433 (struct gdb_rl_completion_word_info): New.
8434 (gdb_rl_find_completion_word): New.
8435 (completion_find_completion_word): New.
8436 * completer.h (completion_find_completion_word): Declare.
8437
8438 2017-07-17 Pedro Alves <palves@redhat.com>
8439
8440 * ada-lang.c (symbol_completion_match): Adjust comments.
8441 (symbol_completion_add): Replace vector parameter with
8442 completion_tracker parameter. Use it.
8443 (ada_make_symbol_completion_list): Rename to...
8444 (ada_collect_symbol_completion_matches): ... this. Add
8445 completion_tracker parameter and use it.
8446 (ada_language_defn): Adjust.
8447 * break-catch-syscall.c (catch_syscall_completer): Adjust
8448 prototype and work with completion_tracker instead of VEC.
8449 * breakpoint.c (condition_completer): Adjust prototype and work
8450 with completion_tracker instead of VEC.
8451 * c-lang.c (c_language_defn, cplus_language_defn)
8452 (asm_language_defn, minimal_language_defn): Adjust to renames.
8453 * cli/cli-cmds.c (complete_command): Rework using
8454 completion_tracker. Catch exceptions when completing.
8455 * cli/cli-decode.c (integer_unlimited_completer)
8456 (complete_on_cmdlist, complete_on_enum): Adjust prototype and work
8457 with completion_tracker instead of VEC.
8458 * command.h (struct completion_tracker): Forward declare.
8459 (completer_ftype, completer_handle_brkchars_ftype): Change
8460 types.
8461 (complete_on_cmdlist, complete_on_enum): Adjust.
8462 * completer.c: Include <algorithm>.
8463 (struct gdb_completer_state): New.
8464 (current_completion): New global.
8465 (readline_line_completion_function): Delete.
8466 (noop_completer, filename_completer)
8467 (filename_completer_handle_brkchars, complete_files_symbols)
8468 (linespec_location_completer): Adjust to work with a
8469 completion_tracker instead of a VEC.
8470 (string_or_empty): New.
8471 (collect_explicit_location_matches): Adjust to work with a
8472 completion_tracker instead of a VEC.
8473 (explicit_location_completer): Rename to ...
8474 (complete_explicit_location): ... this and adjust to work with a
8475 completion_tracker instead of a VEC.
8476 (location_completer): Adjust to work with a completion_tracker
8477 instead of a VEC.
8478 (add_struct_fields): Adjust to work with a completion_list instead
8479 of VEC.
8480 (expression_completer): Rename to ...
8481 (complete_expression): ... this and adjust to work with a
8482 completion_tracker instead of a VEC. Use complete_files_symbols.
8483 (expression_completer): Reimplement on top of complete_expression.
8484 (symbol_completer): Adjust to work with a completion_tracker
8485 instead of a VEC.
8486 (enum complete_line_internal_reason): Add describing comments.
8487 (complete_line_internal_normal_command): Adjust to work with a
8488 completion_tracker instead of a VEC.
8489 (complete_line_internal): Rename to ...
8490 (complete_line_internal_1): ... this and adjust to work with a
8491 completion_tracker instead of a VEC. Assert TEXT is NULL in the
8492 handle_brkchars phase.
8493 (new_completion_tracker): Delete.
8494 (complete_line_internal): Reimplement as TRY/CATCH wrapper around
8495 complete_line_internal_1.
8496 (free_completion_tracker): Delete.
8497 (INITIAL_COMPLETION_HTAB_SIZE): New.
8498 (completion_tracker::completion_tracker)
8499 (completion_tracker::~completion_tracker): New.
8500 (maybe_add_completion): Delete.
8501 (completion_tracker::maybe_add_completion)
8502 (completion_tracker::add_completion)
8503 (completion_tracker::add_completions): New.
8504 (throw_max_completions_reached_error): Delete.
8505 (complete_line): Adjust to work with a completion_tracker instead
8506 of a VEC. Don't create a completion_tracker_t or check for max
8507 completions here.
8508 (command_completer, command_completer_handle_brkchars)
8509 (signal_completer, reg_or_group_completer_1)
8510 (reg_or_group_completer, default_completer_handle_brkchars):
8511 Adjust to work with a completion_tracker.
8512 (gdb_completion_word_break_characters_throw): New.
8513 (gdb_completion_word_break_characters): Reimplement.
8514 (line_completion_function): Delete.
8515 (completion_tracker::recompute_lowest_common_denominator)
8516 (expand_preserving_ws)
8517 (completion_tracker::build_completion_result)
8518 (completion_result::completion_result)
8519 (completion_result::completion_result)
8520 (completion_result::~completion_result)
8521 (completion_result::completion_result)
8522 (completion_result::release_match_list, compare_cstrings)
8523 (completion_result::sort_match_list)
8524 (completion_result::reset_match_list)
8525 (gdb_rl_attempted_completion_function_throw)
8526 (gdb_rl_attempted_completion_function): New.
8527 * completer.h (completion_list, struct completion_result)
8528 (class completion_tracker): New.
8529 (complete_line): Add completion_tracker parameter.
8530 (readline_line_completion_function): Delete.
8531 (gdb_rl_attempted_completion_function): New.
8532 (noop_completer, filename_completer, expression_completer)
8533 (location_completer, symbol_completer, command_completer)
8534 (signal_completer, reg_or_group_completer): Update prototypes.
8535 (completion_tracker_t, new_completion_tracker)
8536 (make_cleanup_free_completion_tracker): Delete.
8537 (enum maybe_add_completion_enum): Delete.
8538 (maybe_add_completion): Delete.
8539 (throw_max_completions_reached_error): Delete.
8540 * corefile.c (complete_set_gnutarget): Adjust to work with a
8541 completion_tracker instead of a VEC.
8542 * cp-abi.c (cp_abi_completer): Adjust to work with a
8543 completion_tracker instead of a VEC.
8544 * d-lang.c (d_language_defn): Adjust.
8545 * disasm.c (disassembler_options_completer): Adjust to work with a
8546 completion_tracker instead of a VEC.
8547 * f-lang.c (f_make_symbol_completion_list): Rename to ...
8548 (f_collect_symbol_completion_matches): ... this. Adjust to work
8549 with a completion_tracker instead of a VEC.
8550 (f_language_defn): Adjust.
8551 * go-lang.c (go_language_defn): Adjust.
8552 * guile/scm-cmd.c (cmdscm_add_completion, cmdscm_completer):
8553 Adjust to work with a completion_tracker instead of a VEC.
8554 * infrun.c (handle_completer): Likewise.
8555 * interps.c (interpreter_completer): Likewise.
8556 * interps.h (interpreter_completer): Likewise.
8557 * language.c (unknown_language_defn, auto_language_defn)
8558 (local_language_defn): Adjust.
8559 * language.h (language_defn::la_make_symbol_completion_list):
8560 Rename to ...
8561 (language_defn::la_collect_symbol_completion_matches): ... this
8562 and adjust to work with a completion_tracker instead of a VEC.
8563 * m2-lang.c (m2_language_defn): Adjust.
8564 * objc-lang.c (objc_language_defn): Adjust.
8565 * opencl-lang.c (opencl_language_defn): Adjust.
8566 * p-lang.c (pascal_language_defn): Adjust.
8567 * python/py-cmd.c (cmdpy_completer_helper): Handle NULL word.
8568 (cmdpy_completer_handle_brkchars, cmdpy_completer): Adjust to work
8569 with a completion_tracker.
8570 * rust-lang.c (rust_language_defn): Adjust.
8571 * symtab.c (free_completion_list, do_free_completion_list)
8572 (return_val, completion_tracker): Delete.
8573 (completion_list_add_name, completion_list_add_symbol)
8574 (completion_list_add_msymbol, completion_list_objc_symbol)
8575 (completion_list_add_fields, add_symtab_completions): Add
8576 completion_tracker parameter and use it.
8577 (default_make_symbol_completion_list_break_on_1): Rename to...
8578 (default_collect_symbol_completion_matches_break_on): ... this.
8579 Add completion_tracker parameter and use it instead of allocating
8580 a completion tracker here.
8581 (default_make_symbol_completion_list_break_on): Delete old
8582 implementation.
8583 (default_make_symbol_completion_list): Delete.
8584 (default_collect_symbol_completion_matches): New.
8585 (make_symbol_completion_list): Delete.
8586 (collect_symbol_completion_matches): New.
8587 (make_symbol_completion_type): Rename to ...
8588 (collect_symbol_completion_matches_type): ... this. Add
8589 completion_tracker parameter and use it instead of VEC.
8590 (make_file_symbol_completion_list_1): Rename to...
8591 (collect_file_symbol_completion_matches): ... this. Add
8592 completion_tracker parameter and use it instead of VEC.
8593 (make_file_symbol_completion_list): Delete.
8594 (add_filename_to_list): Use completion_list instead of a VEC.
8595 (add_partial_filename_data::list): Now a completion_list.
8596 (make_source_files_completion_list): Work with a completion_list
8597 instead of a VEC.
8598 * symtab.h: Include "completer.h".
8599 (default_make_symbol_completion_list_break_on)
8600 (default_make_symbol_completion_list, make_symbol_completion_list)
8601 (make_symbol_completion_type, make_file_symbol_completion_list)
8602 (make_source_files_completion_list): Delete.
8603 (default_collect_symbol_completion_matches_break_on)
8604 (default_collect_symbol_completion_matches)
8605 (collect_symbol_completion_matches)
8606 (collect_symbol_completion_matches_type)
8607 (collect_file_symbol_completion_matches)
8608 (make_source_files_completion_list): New.
8609 * top.c (init_main): Don't install a rl_completion_entry_function
8610 hook. Install a rl_attempted_completion_function hook instead.
8611 * tui/tui-layout.c (layout_completer): Adjust to work with a
8612 completion_tracker.
8613 * tui/tui-regs.c (tui_reggroup_completer):
8614 * tui/tui-win.c (window_name_completer, focus_completer)
8615 (winheight_completer): Adjust to work with a completion_tracker.
8616 * value.c: Include "completer.h".
8617 (complete_internalvar): Adjust to work with a completion_tracker.
8618 * value.h (complete_internalvar): Likewise.
8619
8620 2017-07-17 Pedro Alves <palves@redhat.com>
8621
8622 * cli/cli-decode.c (set_cmd_completer_handle_brkchars): Adjust to
8623 renames.
8624 * cli/cli-decode.h (struct cmd_list_element) <completer>: Move
8625 comments to completer_ftype's declaration.
8626 <completer_handle_brkchars>: Change type to
8627 completer_handle_brkchars_ftype.
8628 * command.h (completer_ftype): Add describing comment and give
8629 names to parameters.
8630 (completer_ftype_void): Rename to ...
8631 (completer_handle_brkchars_ftype) ... this. Add describing comment.
8632 (set_cmd_completer_handle_brkchars): Adjust.
8633 * completer.c (filename_completer_handle_brkchars): New function.
8634 (complete_line_internal_normal_command): New function, factored
8635 out from ...
8636 (complete_line_internal): ... here.
8637 (command_completer_handle_brkchars)
8638 (default_completer_handle_brkchars)
8639 (completer_handle_brkchars_func_for_completer): New functions.
8640 * completer.h (set_gdb_completion_word_break_characters): Delete
8641 declaration.
8642 (completer_handle_brkchars_func_for_completer): New declaration.
8643 * python/py-cmd.c (cmdpy_completer_handle_brkchars): Adjust to use
8644 completer_handle_brkchars_func_for_completer.
8645
8646 2017-07-17 Pedro Alves <palves@redhat.com>
8647
8648 * completer.c (symbol_completer): New function, based on
8649 make_symbol_completion_list_fn.
8650 * completer.h (symbol_completer): New declaration.
8651 * guile/scm-cmd.c (cmdscm_completers): Adjust.
8652 * python/py-cmd.c (completers): Adjust.
8653 * symtab.c (make_symbol_completion_list_fn): Delete.
8654 * symtab.h (make_symbol_completion_list_fn): Delete.
8655 * cli/cli-decode.c (add_cmd): Adjust.
8656
8657 2017-07-17 Pedro Alves <palves@redhat.com>
8658
8659 * Makefile.in (COMMON_OBS): Add filename-seen-cache.o.
8660 * dwarf2read.c: Include "filename-seen-cache.h".
8661 * dwarf2read.c (dwarf2_per_objfile) <filenames_cache>: New field.
8662 (dw2_map_symbol_filenames): Build and use a filenames_seen_cache.
8663 * filename-seen-cache.c: New file.
8664 * filename-seen-cache.h: New file.
8665 * symtab.c: Include "filename-seen-cache.h".
8666 (struct filename_seen_cache, INITIAL_FILENAME_SEEN_CACHE_SIZE)
8667 (create_filename_seen_cache, clear_filename_seen_cache)
8668 (delete_filename_seen_cache, filename_seen): Delete, parts moved
8669 to filename-seen-cache.h/filename-seen-cache.c.
8670 (output_source_filename, sources_info)
8671 (maybe_add_partial_symtab_filename)
8672 (make_source_files_completion_list): Adjust to use
8673 filename_seen_cache.
8674
8675 2017-07-17 Pedro Alves <palves@redhat.com>
8676
8677 * dwarf2read.c (dwarf2_per_objfile): In-class initialize all
8678 fields.
8679 (dwarf2_per_objfile::dwarf2_per_objfile(objfile*, const
8680 dwarf2_debug_sections*)): New.
8681 (dwarf2_per_objfile::dwarf2_per_objfile(const
8682 dwarf2_per_objfile&)): Declare as deleted.
8683 (dwarf2_per_objfile::operator=): Declare as deleted.
8684 (dwarf2_per_objfile::dwarf2_per_objfile)
8685 (dwarf2_per_objfile::~dwarf2_per_objfile)
8686 (dwarf2_per_objfile::free_cached_comp_units): New.
8687 (dwarf2_has_info): dwarf2_per_objfile initialization code moved to
8688 ctor. Call dwarf2_per_objfile's ctor manually.
8689 (dwarf2_locate_sections): Deleted/refactored as ...
8690 (dwarf2_per_objfile::locate_sections): ... this new method.
8691 (free_cached_comp_units): Defer to
8692 dwarf2_per_objfile::free_cached_comp_units.
8693 (dwarf2_free_objfile): Call dwarf2_per_objfile's dtor manually.
8694
8695 2017-07-14 Tom Tromey <tom@tromey.com>
8696
8697 PR rust/21764:
8698 * rust-exp.y (convert_ast_to_expression): Add "want_type"
8699 parameter.
8700 <UNOP_SIZEOF>: Split into separate case.
8701 <UNOP_VAR_VALUE>: Handle want_type. Add error case.
8702
8703 2017-07-14 Tom Tromey <tom@tromey.com>
8704
8705 PR rust/21763:
8706 * symtab.c (symbol_matches_domain): Add language_rust to special
8707 case.
8708 * rust-exp.y (convert_ast_to_expression) <OP_VAR_VALUE>: Don't
8709 treat LOC_TYPEDEF symbols as variables.
8710
8711 2017-07-14 Pedro Alves <palves@redhat.com>
8712
8713 * symtab.c (make_file_symbol_completion_list_1): Iterate over
8714 symtabs matching all symtabs with SRCFILE as file name instead of
8715 only considering the first hit, with lookup_symtab.
8716
8717 2017-07-14 Simon Marchi <simon.marchi@ericsson.com>
8718
8719 * ax-gdb.c (gen_aggregate_elt_ref): Remove operand_name and
8720 operator_name parameters.
8721 (gen_expr): Update function call.
8722
8723 2017-07-14 Simon Marchi <simon.marchi@ericsson.com>
8724
8725 * dwarf2loc.h (dwarf2_compile_expr_to_ax): Remove gdbarch
8726 parameter.
8727 * symtab.h (struct symbol_computed_ops::tracepoint_var_ref):
8728 Likewise.
8729 * dwarf2loc.c (dwarf2_compile_expr_to_ax): Remove gdbarch
8730 parameter, use agent_expr::gdbarch instead, update function
8731 calls.
8732 (locexpr_tracepoint_var_ref): Likewise.
8733 (loclist_tracepoint_var_ref): Likewise.
8734 * ax-gdb.c (gen_trace_static_fields): Likewise.
8735 (gen_traced_pop): Likewise.
8736 (gen_frame_args_address): Likewise.
8737 (gen_frame_locals_address): Likewise.
8738 (gen_var_ref): Likewise.
8739 (gen_struct_ref_recursive): Likewise.
8740 (gen_static_field): Likewise.
8741 (gen_maybe_namespace_elt): Likewise.
8742 (gen_expr): Likewise.
8743 (gen_trace_for_var): Likewise.
8744 (gen_trace_for_expr): Likewise.
8745 (gen_trace_for_return_address): Likewise.
8746
8747 2017-07-14 Simon Marchi <simon.marchi@ericsson.com>
8748
8749 * ax-gdb.c (gen_deref, gen_address_of): Remove unused ax
8750 parameter.
8751 (gen_struct_ref, gen_expr, gen_expr_binop_rest): Update call.
8752
8753 2017-07-14 Simon Marchi <simon.marchi@ericsson.com>
8754
8755 * ax-gdb.c (gen_usual_unary): Remove exp parameter, get gdbarch
8756 from ax, update calls.
8757 (gen_usual_arithmetic): Likewise.
8758 (gen_integral_promotions): Likewise.
8759 (gen_bitfield_ref): Likewise.
8760 (gen_primitive_field): Likewise.
8761 (gen_struct_ref_recursive): Likewise.
8762 (gen_struct_ref): Likewise.
8763 (gen_maybe_namespace_elt): Likewise.
8764 (gen_struct_elt_for_reference): Likewise.
8765 (gen_namespace_elt): Likewise.
8766 (gen_aggregate_elt_ref): Likewise.
8767 (gen_expr): Get gdbarch from ax, update calls.
8768 (gen_expr_binop_rest): Likewise.
8769
8770 2017-07-13 Pedro Alves <palves@redhat.com>
8771
8772 * amd64-darwin-tdep.c (x86_darwin_init_abi_64): Pass tdesc_amd64
8773 as default tdesc.
8774 * amd64-dicos-tdep.c (amd64_dicos_init_abi):
8775 * amd64-fbsd-tdep.c (amd64fbsd_init_abi):
8776 * amd64-linux-tdep.c (amd64_linux_init_abi): Pass
8777 tdesc_amd64_linux as default tdesc. Get final tdesc from the
8778 tdep.
8779 (amd64_x32_linux_init_abi): Pass tdesc_x32_linux as default tdesc.
8780 Get final tdesc from the tdep.
8781 * amd64-nbsd-tdep.c (amd64nbsd_init_abi): Pass tdesc_amd64 as
8782 default tdesc.
8783 * amd64-obsd-tdep.c (amd64obsd_init_abi): Likewise.
8784 * amd64-sol2-tdep.c (amd64_sol2_init_abi): Likewise.
8785 * amd64-tdep.c (amd64_init_abi): Add 'default_tdesc' parameter.
8786 Use it as default tdesc.
8787 (amd64_x32_init_abi): Add 'default_tdesc' parameter, and pass it
8788 down to amd_init_abi. No longer handle fallback tdesc here.
8789 * amd64-tdep.h (tdesc_x32): Declare.
8790 (amd64_init_abi, amd64_x32_init_abi): Add 'default_tdesc'
8791 parameter.
8792 * amd64-windows-tdep.c (amd64_windows_init_abi): Pass tdesc_amd64
8793 as default tdesc.
8794
8795 2017-07-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
8796
8797 * s390-linux-tdep.c (s390_process_record): Add support for
8798 instructions new in arch12.
8799
8800 2017-07-11 John Baldwin <jhb@FreeBSD.org>
8801
8802 * amd64-bsd-nat.c (amd64bsd_fetch_inferior_registers): Use
8803 PT_GETFSBASE and PT_GETGSBASE.
8804 (amd64bsd_store_inferior_registers): Use PT_SETFSBASE and
8805 PT_SETGSBASE.
8806
8807 2017-07-11 John Baldwin <jhb@FreeBSD.org>
8808
8809 * features/Makefile (amd64.dat, amd64-avx.dat, amd64-mpx.dat)
8810 (amd64-avx-mpx.dat, amd64-avx-avx512.dat)
8811 (amd64-avx-mpx-avx512-pku.dat): Add i386/64bit-segments.xml in
8812 those rules.
8813 * features/i386/amd64-avx-avx512.xml: Add 64bit-segments.xml.
8814 * features/i386/amd64-avx-mpx-avx512-pku.xml: Add 64bit-segments.xml.
8815 * features/i386/amd64-avx-mpx.xml: Add 64bit-segments.xml.
8816 * features/i386/amd64-avx.xml: Add 64bit-segments.xml.
8817 * features/i386/amd64-mpx.xml: Add 64bit-segments.xml.
8818 * features/i386/amd64.xml: Add 64bit-segments.xml.
8819 * features/i386/amd64-avx-avx512.c: Regenerated.
8820 * features/i386/amd64-avx-mpx-avx512-pku.c: Regenerated.
8821 * features/i386/amd64-avx-mpx.c: Regenerated.
8822 * features/i386/amd64-avx.c: Regenerated.
8823 * features/i386/amd64-mpx.c: Regenerated.
8824 * features/i386/amd64.c: Regenerated.
8825 * regformats/i386/amd64-avx-avx512.dat: Regenerated.
8826 * regformats/i386/amd64-avx-mpx-avx512-pku.dat: Regenerated.
8827 * regformats/i386/amd64-avx-mpx.dat: Regenerated.
8828 * regformats/i386/amd64-avx.dat: Regenerated.
8829 * regformats/i386/amd64-mpx.dat: Regenerated.
8830 * regformats/i386/amd64.dat: Regenerated.
8831
8832 2017-07-10 Yao Qi <yao.qi@linaro.org>
8833
8834 * features/i386/amd64-avx-avx512-linux.c: Re-generated.
8835 * features/i386/amd64-avx-mpx-avx512-pku-linux.c: Re-generated.
8836
8837 2017-07-10 Anton Kolesov <Anton.Kolesov@synopsys.com>
8838
8839 * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add setenv and
8840 unsetenv.
8841 * gnulib/aclocal.m4: Regenerate.
8842 * gnulib/config.in: Regenerate.
8843 * gnulib/configure: Regenerate.
8844 * gnulib/import/Makefile.am: Regenerate.
8845 * gnulib/import/Makefile.in: Regenerate.
8846 * gnulib/import/m4/gnulib-cache.m4: Regenerate.
8847 * gnulib/import/m4/gnulib-comp.m4: Regenerate.
8848 * gnulib/import/m4/environ.m4: New file.
8849 * gnulib/import/m4/setenv.m4: New file.
8850 * gnulib/import/setenv.c: New file.
8851 * gnulib/import/unsetenv.c: New file.
8852
8853 2017-07-09 Simon Marchi <simon.marchi@ericsson.com>
8854
8855 * compile/compile-loc2c.c (do_compile_dwarf_expr_to_c): Read
8856 address when op is DW_OP_addr.
8857
8858 2017-07-09 Tom Tromey <tom@tromey.com>
8859
8860 * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Reverse size
8861 check and apply to outer type.
8862
8863 2017-07-07 John Baldwin <jhb@FreeBSD.org>
8864
8865 * fbsd-tdep.c (LWPINFO_OFFSET, LWPINFO_PL_FLAGS)
8866 (LWPINFO64_PL_SIGINFO, LWPINFO32_PL_SIGINFO, PL_FLAG_SI)
8867 (SIZE64_SIGINFO_T, SIZE32_SIGINFO_T, fbsd_core_xfer_siginfo): New.
8868 (fbsd_init_abi): Install gdbarch "core_xfer_siginfo" method.
8869
8870 2017-07-07 John Baldwin <jhb@FreeBSD.org>
8871
8872 * fbsd-tdep.c (fbsd_core_thread_name): Use thread_section_name.
8873
8874 2017-07-07 John Baldwin <jhb@FreeBSD.org>
8875
8876 * corelow.c (get_core_siginfo): Remove.
8877 (core_xfer_partial): Use the gdbarch "core_xfer_siginfo" method
8878 instead of get_core_siginfo.
8879 * gdbarch.sh (core_xfer_siginfo): New gdbarch callback.
8880 * gdbarch.h: Re-generate.
8881 * gdbarch.c: Re-generate.
8882 * linux-tdep.c (linux_core_xfer_siginfo): New.
8883 (linux_init_abi): Install gdbarch "core_xfer_siginfo" method.
8884
8885 2017-07-07 John Baldwin <jhb@FreeBSD.org>
8886
8887 * corelow.c (thread_section_name): Move to ...
8888 * gdbcore.h (thread_section_name): ... here.
8889
8890 2017-07-07 John Baldwin <jhb@FreeBSD.org>
8891
8892 * fbsd-nat.c [PT_LWPINFO && __LP64__] (union sigval32)
8893 (struct siginfo32): New.
8894 [PT_LWPINFO] (fbsd_siginfo_size, fbsd_convert_siginfo): New.
8895 (fbsd_xfer_partial) [PT_LWPINFO]: Handle TARGET_OBJECT_SIGNAL_INFO
8896 via ptrace(PT_LWPINFO).
8897
8898 2017-07-07 John Baldwin <jhb@FreeBSD.org>
8899
8900 * fbsd-tdep.c (fbsd_gdbarch_data_handle, struct fbsd_gdbarch_data)
8901 (init_fbsd_gdbarch_data, get_fbsd_gdbarch_data)
8902 (fbsd_get_siginfo_type): New.
8903 (fbsd_init_abi): Install gdbarch "get_siginfo_type" method.
8904 (_initialize_fbsd_tdep): New.
8905
8906 2017-07-06 David Blaikie <dblaikie@gmail.com>
8907
8908 * dwarf2read.c (struct dwo_file): Use a htab of dwo_unit* (rather than
8909 a singular dwo_unit*) to support multiple CUs in the same way that
8910 multiple TUs are supported.
8911 (create_cus_hash_table): Replace create_dwo_cu with a function for
8912 parsing multiple CUs from a DWO file.
8913 (open_and_init_dwo_file): Use create_cus_hash_table rather than
8914 create_dwo_cu.
8915 (lookup_dwo_cutu): Lookup CU in the hash table in the dwo_file with
8916 htab_find, rather than comparing the signature to a singleton CU in
8917 the dwo_file.
8918
8919 2017-07-06 Pedro Alves <palves@redhat.com>
8920
8921 * python/py-unwind.c (pyuw_dealloc_cache): Fix for loop condition.
8922
8923 2017-07-04 Pedro Alves <palves@redhat.com>
8924
8925 * gdbtypes.c (recursive_dump_type): Don't reference TYPE_STATIC.
8926 * gdbtypes.h (TYPE_STATIC): Delete.
8927 (struct fn_field) <is_public, is_abstract, is_static, is_final,
8928 is_synchronized, is_native>: Delete.
8929 <dummy>: Bump.
8930 (TYPE_FN_FIELD_PUBLIC, TYPE_FN_FIELD_STATIC, TYPE_FN_FIELD_FINAL)
8931 (TYPE_FN_FIELD_SYNCHRONIZED, TYPE_FN_FIELD_NATIVE)
8932 (TYPE_FN_FIELD_ABSTRACT): Delete.
8933
8934 2017-07-03 Simon Marchi <simon.marchi@ericsson.com>
8935
8936 * buffer.h (buffer_finish): Fix spelling mistakes.
8937
8938 2017-07-01 Eli Zaretskii <eliz@gnu.org>
8939
8940 * .dir-locals.el: Automatically switch to C-style comments in
8941 versions of Emacs that support the feature.
8942
8943 2017-06-30 Sergio Durigan Junior <sergiodj@redhat.com>
8944 Pedro Alves <palves@redhat.com>
8945
8946 PR cli/21688
8947 * cli/cli-script.c (command_name_equals_not_inline): Remove function.
8948 (process_next_line): New variable 'inline_cmd'.
8949 Adjust 'if' clauses for "python", "compile" and "guile" to use
8950 'command_name_equals' and check for '!inline_cmd'.
8951
8952 2017-06-30 Sergio Durigan Junior <sergiodj@redhat.com>
8953
8954 PR cli/21688
8955 * cli/cli-script.c (command_name_equals_not_inline): New function.
8956 (process_next_line): Adjust 'if' clauses for "python", "compile"
8957 and "guile" to use command_name_equals_not_inline.
8958
8959 2017-06-29 Pedro Alves <palves@redhat.com>
8960
8961 * completer.c (expression_completer): Call
8962 linespec_location_completer instead of location_completer.
8963
8964 2017-06-29 Pedro Alves <palves@redhat.com>
8965
8966 * completer.c (expression_completer): Remove code that recomputes
8967 'text' from 'word'.
8968
8969 2017-06-29 Yao Qi <yao.qi@linaro.org>
8970
8971 * regformats/regdat.sh: Generate code with
8972 "ifndef IN_PROCESS_AGENT".
8973
8974 2017-06-28 Pedro Alves <palves@redhat.com>
8975
8976 * command.h: Include "common/scoped_restore.h".
8977
8978 2017-06-28 Yao Qi <yao.qi@linaro.org>
8979
8980 * mi/mi-cmd-break.c (mi_argv_to_format): Use obstack_grow_str
8981 instead of obstack_grow.
8982
8983 2017-06-28 Doug Gilmore <Doug.Gilmore@imgtec.com>
8984
8985 PR gdb/21337
8986 * symfile.c (reread_symbols): Call objfiles_changed just before
8987 read_symbols.
8988
8989 2017-06-27 Pedro Alves <palves@redhat.com>
8990
8991 * symtab.c (COMPLETION_LIST_ADD_SYMBOL)
8992 (MCOMPLETION_LIST_ADD_SYMBOL): Delete macros, replace with ...
8993 (completion_list_add_symbol, completion_list_add_msymbol):
8994 ... these new functions.
8995 (add_symtab_completions)
8996 (default_make_symbol_completion_list_break_on_1): Adjust.
8997
8998 2017-06-27 Pedro Alves <palves@redhat.com>
8999
9000 * objfiles.c (get_objfile_bfd_data): Call bfd_alloc instead of
9001 bfd_zalloc. Call objfile_per_bfd_storage's ctor.
9002 (free_objfile_per_bfd_storage): Call objfile_per_bfd_storage's
9003 dtor.
9004 * objfiles.h (objfile_per_bfd_storage): Add ctor. Make
9005 'storage_obstack' field an auto_obstack. In-class initialize all
9006 non-bitfield fields. Make minsyms_read bool.
9007 * symfile.c (read_symbols): Adjust.
9008
9009 2017-06-27 Alan Hayward <alan.hayward@arm.com>
9010
9011 * remote-sim.c (gdbsim_fetch_register): Use byte_vector.
9012 (gdbsim_store_register): Likewise.
9013
9014 2017-06-27 Pedro Alves <palves@redhat.com>
9015
9016 * c-exp.y (name_obstack): Now an auto_obstack.
9017 (yylex): Use auto_obstack::clear.
9018 (c_parse): Use auto_obstack::clear instead of reinitializing and
9019 freeing the obstack.
9020 * c-lang.c (evaluate_subexp_c): Use auto_obstack.
9021 * d-exp.y (name_obstack): Now an auto_obstack.
9022 (yylex): Use auto_obstack::clear.
9023 (d_parse): Use auto_obstack::clear instead of reinitializing and
9024 freeing the obstack.
9025 * dwarf2loc.c (fetch_const_value_from_synthetic_pointer): Use
9026 auto_obstack.
9027 * dwarf2read.c (create_addrmap_from_index)
9028 (dwarf2_build_psymtabs_hard)
9029 (update_enumeration_type_from_children): Likewise.
9030 * gdb_obstack.h (auto_obstack): New type.
9031 * go-exp.y (name_obstack): Now an auto_obstack.
9032 (build_packaged_name): Use auto_obstack::clear.
9033 (go_parse): Use auto_obstack::clear instead of reinitializing and
9034 freeing the obstack.
9035 * linux-tdep.c (linux_make_mappings_corefile_notes): Use
9036 auto_obstack.
9037 * printcmd.c (printf_wide_c_string, ui_printf): Use auto_obstack.
9038 * rust-exp.y (work_obstack): Now an auto_obstack.
9039 (rust_parse, rust_lex_tests): Use auto_obstack::clear instead of
9040 reinitializing and freeing the obstack.
9041 * utils.c (do_obstack_free, make_cleanup_obstack_free): Delete.
9042 (host_char_to_target): Use auto_obstack.
9043 * utils.h (make_cleanup_obstack_free): Delete declaration.
9044 * valprint.c (generic_emit_char, generic_printstr): Use
9045 auto_obstack.
9046
9047 2017-06-27 Simon Marchi <simon.marchi@ericsson.com>
9048
9049 * darwin-nat.c (darwin_check_new_threads): Don't handle dummy
9050 thread.
9051 (darwin_init_thread_list): Don't update dummy thread.
9052 (darwin_create_inferior, darwin_attach): Don't add a dummy thread.
9053
9054 2017-06-26 Simon Marchi <simon.marchi@ericsson.com>
9055
9056 * record-full.c (netorder16): Remove.
9057
9058 2017-06-26 Simon Marchi <simon.marchi@ericsson.com>
9059
9060 * common/diagnostics.h: Define macros for GCC.
9061 (DIAGNOSTIC_IGNORE_UNUSED_FUNCTION): New macro.
9062 * common/vec.h: Include diagnostics.h.
9063 (DIAGNOSTIC_IGNORE_UNUSED_VEC_FUNCTION): New macro.
9064 (DEF_VEC_I, DEF_VEC_P, DEF_VEC_O): Ignore -Wunused-function
9065 warning.
9066
9067 2017-06-26 Simon Marchi <simon.marchi@ericsson.com>
9068
9069 * common/diagnostics.h (DIAGNOSTIC_IGNORE_DEPRECATED_REGISTER):
9070 New macro.
9071 * ada-lex.l: Ignore deprecated register warnings.
9072
9073 2017-06-25 Simon Marchi <simon.marchi@ericsson.com>
9074
9075 * main.c (get_init_files): Replace "SYSTEM_GDBINIT +
9076 datadir_len" with "&SYSTEM_GDBINIT[datadir_len]".
9077
9078 2017-06-25 Simon Marchi <simon.marchi@ericsson.com>
9079
9080 * dtrace-probe.c (dtrace_process_dof_probe): Put semi-colon on
9081 its own line.
9082
9083 2017-06-25 Simon Marchi <simon.marchi@ericsson.com>
9084
9085 * nat/x86-dregs.c (x86_show_dr): Print registers one per line.
9086
9087 2017-06-23 Alan Hayward <alan.hayward@arm.com>
9088
9089 * xtensa-tdep.c (XTENSA_MAX_REGISTER_SIZE): Add.
9090 (xtensa_register_write_masked): Use XTENSA_MAX_REGISTER_SIZE.
9091 (xtensa_register_read_masked): Likewise.
9092
9093 2017-06-22 Sergio Durigan Junior <sergiodj@redhat.com>
9094
9095 * common/environ.c (gdb_environ::unset): Update comment.
9096
9097 2017-06-22 Alan Hayward <alan.hayward@arm.com>
9098
9099 * python/py-unwind.c (pyuw_sniffer): Allocate space for
9100 registers.
9101
9102 2017-06-22 Alan Hayward <alan.hayward@arm.com>
9103
9104 * record-full.c (record_full_exec_insn): Use byte_vector.
9105
9106 2017-06-22 Yao Qi <yao.qi@linaro.org>
9107
9108 * regformats/i386/amd64-avx-mpx-avx512-pku-linux.dat: Regenerated.
9109 * regformats/i386/amd64-avx-mpx-avx512-pku.dat: Regenerated.
9110
9111 2017-06-22 Alan Hayward <alan.hayward@arm.com>
9112
9113 * remote.c (cached_reg): Move from here...
9114 * regcache.h (cached_reg): ...to here.
9115 * python/py-unwind.c (struct reg_info): Remove.
9116 (cached_frame_info): Use cached_reg_t.
9117 (pyuw_prev_register): Likewise.
9118 (pyuw_sniffer): Use cached_reg_t and allocate registers.
9119 (pyuw_dealloc_cache): Free all registers.
9120
9121 2017-06-22 Pedro Alves <palves@redhat.com>
9122 Simon Marchi <simon.marchi@ericsson.com>
9123
9124 * unittests/environ-selftests.c (run_tests): Ignore -Wself-move
9125 warning.
9126 * common/diagnostics.h: New file.
9127
9128 2017-06-22 Pedro Alves <palves@redhat.com>
9129
9130 * common/agent.h: Add include guards.
9131
9132 2017-06-21 Simon Marchi <simon.marchi@ericsson.com>
9133
9134 * target.h (struct target_ops) <to_xfer_partial>: Update doc to
9135 talk about addressable units instead of bytes.
9136
9137 2017-06-20 Sergio Durigan Junior <sergiodj@redhat.com>
9138
9139 * common/environ.c (gdb_environ::unset): Use '::iterator' instead
9140 of '::const_iterator'.
9141
9142 2017-06-20 Sergio Durigan Junior <sergiodj@redhat.com>
9143
9144 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
9145 'unittests/environ-selftests.c'.
9146 (SUBDIR_UNITTESTS_OBS): Add 'environ-selftests.o'.
9147 * charset.c (find_charset_names): Declare object 'iconv_env'.
9148 Update code to use 'iconv_env' object. Remove call to
9149 'free_environ'.
9150 * common/environ.c: Include <utility>.
9151 (make_environ): Delete function.
9152 (free_environ): Delete function.
9153 (gdb_environ::clear): New function.
9154 (gdb_environ::operator=): New function.
9155 (gdb_environ::get): Likewise.
9156 (environ_vector): Delete function.
9157 (set_in_environ): Delete function.
9158 (gdb_environ::set): New function.
9159 (unset_in_environ): Delete function.
9160 (gdb_environ::unset): New function.
9161 (gdb_environ::envp): Likewise.
9162 * common/environ.h: Include <vector>.
9163 (struct gdb_environ): Delete; transform into...
9164 (class gdb_environ): ... this class.
9165 (free_environ): Delete prototype.
9166 (init_environ, get_in_environ, set_in_environ, unset_in_environ,
9167 environ_vector): Likewise.
9168 * infcmd.c (run_command_1): Update code to call
9169 'envp' from 'gdb_environ' class.
9170 (environment_info): Update code to call methods from 'gdb_environ'
9171 class.
9172 (unset_environment_command): Likewise.
9173 (path_info): Likewise.
9174 (path_command): Likewise.
9175 * inferior.c (inferior::~inferior): Delete call to 'free_environ'.
9176 (inferior::inferior): Initialize 'environment' using the host's
9177 information.
9178 * inferior.h: Remove forward declaration of 'struct gdb_environ'.
9179 Include "environ.h".
9180 (class inferior) <environment>: Change type from 'struct
9181 gdb_environ' to 'gdb_environ'.
9182 * mi/mi-cmd-env.c (mi_cmd_env_path): Update code to call
9183 methods from 'gdb_environ' class.
9184 * solib.c (solib_find_1): Likewise
9185 * unittests/environ-selftests.c: New file.
9186
9187 2017-06-20 Yao Qi <yao.qi@linaro.org>
9188
9189 * features/i386/i386-linux.xml: Exchange the order of including
9190 32bit-linux.xml and 32bit-sse.xml.
9191 * features/i386/i386-linux.c: Regenerated.
9192
9193 2017-06-20 Yao Qi <yao.qi@linaro.org>
9194
9195 * target-descriptions.c (tdesc_reg): Add ctor, dtor.
9196 Delete copy ctor and assignment operator.
9197 (tdesc_type): Likewise.
9198 (tdesc_feature): Likewise.
9199 (tdesc_free_reg): Remove.
9200 (tdesc_create_reg): Use new.
9201 (tdesc_free_type): Remove.
9202 (tdesc_create_vector): Use new.
9203 (tdesc_create_union): Likewise.
9204 (tdesc_create_flags): Likewise.
9205 (tdesc_create_enum): Likewise.
9206 (tdesc_free_feature): Delete.
9207 (free_target_description): Use delete.
9208
9209 2017-06-19 John Baldwin <jhb@FreeBSD.org>
9210
9211 * mips-tdep.c (print_gp_register_row): Don't error for unavailable
9212 registers.
9213
9214 2017-06-19 Pedro Alves <palves@redhat.com>
9215
9216 * dwarf2read.c (write_psymtabs_to_index): Construct file_closer
9217 after gdb::unlinker.
9218
9219 2017-06-19 Sergio Durigan Junior <sergiodj@redhat.com>
9220
9221 * mi/mi-cm-env.c (_initialize_mi_cmd_env): Use getenv instead of
9222 gdb_environ to access an environment variable.
9223
9224 2017-06-18 Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
9225
9226 * nat/linux-ptrace.c (linux_fork_to_function): Add cast to
9227 gdb_byte*.
9228
9229 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
9230
9231 * nat/fork-inferior.h (trace_start_error): Add ATTRIBUTE_PRINTF.
9232
9233 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
9234
9235 * configure: Re-generate.
9236 * warning.m4 (build_warnings): Add -Wno-mismatched-tags.
9237
9238 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
9239
9240 * configure: Re-generate.
9241 * warning.m4: Pass -Werror to compiler when checking for
9242 supported warning flags.
9243
9244 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
9245
9246 * Makefile.in (COMPILE.pre): Add "-x c++".
9247
9248 2017-06-16 Alan Hayward <alan.hayward@arm.com>
9249 Pedro Alves <palves@redhat.com>
9250 Yao Qi <yao.qi@linaro.org>
9251
9252 * defs.h (RequireLongest): New.
9253 (extract_integer): Declare function template.
9254 (extract_signed_integer): Remove the declaration, but define it
9255 static inline.
9256 (extract_unsigned_integer): Likewise.
9257 (store_integer): Declare function template.
9258 (store_signed_integer): Remove the declaration, but define it
9259 static inline.
9260 (store_unsigned_integer): Likewise.
9261 * findvar.c (extract_integer): New function template.
9262 (extract_signed_integer): Remove.
9263 (extract_unsigned_integer): Remove.
9264 (extract_integer<LONGEST>, extract_integer<ULONGEST>): Explicit
9265 instantiations.
9266 (store_integer): New function template.
9267 (store_signed_integer): Remove.
9268 (store_unsigned_integer): Remove.
9269 (store_integer): Explicit instantiations.
9270 * regcache.c (regcache_raw_read_signed): Update.
9271 (regcache::raw_read): New function.
9272 (regcache::raw_read_signed): Remove.
9273 (regcache::raw_read_unsigned): Remove.
9274 (regcache_raw_read_unsigned): Update.
9275 (regcache_raw_write_unsigned): Update.
9276 (regcache::raw_write_signed): Remove.
9277 (regcache::raw_write): New function.
9278 (regcache_cooked_read_signed): Update.
9279 (regcache::raw_write_unsigned): Remove.
9280 (regcache::cooked_read_signed): Remove.
9281 (regcache_cooked_read_unsigned): Update.
9282 (regcache::cooked_read_unsigned): Remove.
9283 (regcache_cooked_write_signed): Update.
9284 (regcache_cooked_write_unsigned): Update.
9285 * regcache.h (regcache) <raw_read_signed>: Remove.
9286 <raw_write_signed, raw_read_unsigned, raw_write_unsigned>: Remove.
9287 <raw_read, raw_write>: New.
9288 <cooked_read_signed, cooked_write_signed>: Remove.
9289 <cooked_write_unsigned, cooked_read_unsigned>: Remove.
9290 <cooked_read, cooked_write>: New.
9291 * sh64-tdep.c (sh64_pseudo_register_read): Update.
9292 (sh64_pseudo_register_write): Update.
9293
9294 2017-06-16 Anton Kolesov <anton.kolesov@synopsys.com>
9295
9296 * arc-tdep.c (arc_disassembler_options): New variable.
9297 (arc_gdbarch_init): Set and use it. Use arc_delayed_print_insn instead
9298 of default_print_insn.
9299 (arc_delayed_print_insn): Set info->section when needed,
9300 use default_print_insn to retrieve a disassembler.
9301
9302 2017-06-14 Sergio Durigan Junior <sergiodj@redhat.com>
9303
9304 PR gdb/21574
9305 * infcmd.c (_initialize_infcmd): Expand "help run" documentation
9306 to mention $SHELL and startup-with-shell.
9307
9308 2017-06-14 Max Filippov <jcmvbkbc@gmail.com>
9309
9310 * MAINTAINERS: Move Maxim Grigoriev to the Past Maintainers.
9311
9312 2017-06-14 Yao Qi <yao.qi@linaro.org>
9313
9314 * aarch64-tdep.c (aarch64_gdb_print_insn): Call
9315 default_print_insn instead of print_insn_aarch64.
9316 * arm-tdep.c (gdb_print_insn_arm): Call
9317 default_print_insn instead of print_insn_big_arm
9318 and print_insn_little_arm.
9319 * i386-tdep.c (i386_print_insn): Call default_print_insn
9320 instead of print_insn_i386.
9321 * ia64-tdep.c (ia64_print_insn): Call
9322 default_print_insn instead of print_insn_ia64.
9323 * mips-tdep.c (gdb_print_insn_mips): Call
9324 default_print_insn instead of print_insn_big_mips
9325 and print_insn_little_mips.
9326 * spu-tdep.c (gdb_print_insn_spu): Call default_print_insn
9327 instead of print_insn_spu.
9328
9329 2017-06-14 Pedro Alves <palves@redhat.com>
9330
9331 * ada-lang.c: Include "common/byte-vector.h".
9332 (ada_value_primitive_packed_val): Use gdb::byte_vector.
9333 * charset.c (wchar_iterator::iterate): Resize the vector instead
9334 of reserving it.
9335 * common/byte-vector.h: Include "common/def-vector.h".
9336 (wchar_iterator::m_out): Now a gdb::def_vector<gdb_wchar_t>.
9337 * cli/cli-dump.c: Include "common/byte-vector.h".
9338 (dump_memory_to_file, restore_binary_file): Use gdb::byte_vector.
9339 * common/byte-vector.h: New file.
9340 * common/def-vector.h: New file.
9341 * common/default-init-alloc.h: New file.
9342 * dwarf2loc.c: Include "common/byte-vector.h".
9343 (rw_pieced_value): Use gdb::byte_vector, and resize the vector
9344 instead of reserving it.
9345 * dwarf2read.c: Include "common/byte-vector.h".
9346 (data_buf::m_vec): Now a gdb::byte_vector.
9347 * gdb_regex.c: Include "common/def-vector.h".
9348 (compiled_regex::compiled_regex): Use gdb::def_vector<char>.
9349 * mi/mi-main.c: Include "common/byte-vector.h".
9350 (mi_cmd_data_read_memory): Use gdb::byte_vector.
9351 * printcmd.c: Include "common/byte-vector.h".
9352 (print_scalar_formatted): Use gdb::byte_vector.
9353 * valprint.c: Include "common/byte-vector.h".
9354 (maybe_negate_by_bytes, print_decimal_chars): Use
9355 gdb::byte_vector.
9356
9357 2017-06-13 Simon Marchi <simon.marchi@ericsson.com>
9358
9359 * darwin-nat.c: Include "nat/fork-inferior.h".
9360
9361 2017-06-13 Simon Marchi <simon.marchi@ericsson.com>
9362
9363 * configure.nat: Factor out Darwin bits that are not
9364 architecture-specific. Add fork-inferior.o.
9365
9366 2017-06-13 Simon Marchi <simon.marchi@ericsson.com>
9367
9368 * configure.nat: Factor out AIX bits that are not
9369 architecture-specific. Add fork-inferior.o.
9370
9371 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
9372
9373 * dwarf2loc.c (rw_pieced_value): New. Merge logic from...
9374 (read_pieced_value, write_pieced_value): ...here. Reduce to
9375 wrappers that just call rw_pieced_value.
9376
9377 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
9378
9379 * dwarf2loc.c (write_pieced_value): When writing the data for a
9380 memory piece, use write_memory_with_notification instead of
9381 write_memory.
9382
9383 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
9384
9385 * valops.c (read_value_memory): Change embedded_offset to
9386 represent a bit offset instead of a byte offset.
9387 * value.h (read_value_memory): Adjust comment.
9388
9389 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
9390
9391 * dwarf2loc.c (read_pieced_value): Remove unnecessary variables
9392 dest_offset_bits and source_offset_bits.
9393 (write_pieced_value): Likewise.
9394
9395 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
9396
9397 * dwarf2loc.c (read_pieced_value): Respect the piece offset, as
9398 given by DW_OP_bit_piece.
9399 (write_pieced_value): Likewise.
9400
9401 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
9402
9403 * dwarf2loc.c (read_pieced_value): Move the buffer allocation and
9404 some other preparations to the places where sufficient information
9405 is available.
9406 (write_pieced_value): Likewise.
9407
9408 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
9409
9410 * dwarf2loc.c (bits_to_bytes): New function.
9411 (read_pieced_value): Fix offset calculations for register pieces
9412 on big-endian targets.
9413 (write_pieced_value): Likewise.
9414
9415 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
9416
9417 * dwarf2loc.c (read_pieced_value): Remove buffer_size variable.
9418 (write_pieced_value): Likewise.
9419
9420 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
9421
9422 * dwarf2loc.c (write_pieced_value): When writing to a bit-field,
9423 transfer the source value's least significant bits, instead of its
9424 lowest-addressed ones. Rename type_len to max_offset.
9425 (read_pieced_value): Mirror above changes to write_pieced_value as
9426 applicable.
9427
9428 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
9429
9430 * dwarf2loc.c (write_pieced_value): In DWARF_VALUE_MEMORY,
9431 truncate full bytes from dest_offset_bits before using it as an
9432 offset into the buffer.
9433
9434 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
9435
9436 * dwarf2loc.c (write_pieced_value): Include transfer size in
9437 byte-wise check.
9438
9439 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
9440
9441 * dwarf2loc.c (write_pieced_value): Fix copy/paste error in the
9442 calculation of this_size.
9443
9444 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
9445
9446 * dwarf2loc.c (read_pieced_value): Respect parent value's offset
9447 when targeting a bit-field.
9448 (write_pieced_value): Likewise.
9449
9450 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
9451
9452 * dwarf2loc.c (struct piece_closure) <addr_size>: Remove field.
9453 (allocate_piece_closure): Drop addr_size parameter.
9454 (dwarf2_evaluate_loc_desc_full): Adjust call to
9455 allocate_piece_closure.
9456
9457 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
9458
9459 PR gdb/21226
9460 * dwarf2loc.c (read_pieced_value): Anchor stack value pieces at
9461 the LSB end, independent of endianness.
9462
9463 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
9464
9465 * dwarf2loc.c (write_pieced_value): Fix order of calculations for
9466 size capping.
9467
9468 2017-06-13 Yao Qi <yao.qi@linaro.org>
9469
9470 * mips-linux-nat.c: Move include features/mips*-linux.c to
9471 mips-linux-tdep.c.
9472 (_initialize_mips_linux_nat): Move initialize_tdesc_mips* calls
9473 to mips-linux-tdep.c.
9474 * mips-linux-tdep.c: Include features/mips*-linux.c
9475 (_initialize_mips_linux_tdep): Call initialize_tdesc_mips*
9476 functions.
9477 * mips-linux-tdep.h (tdesc_mips_linux): Declare.
9478 (tdesc_mips_dsp_linux, tdesc_mips64_linux): Declare.
9479 (tdesc_mips64_dsp_linux): Declare.
9480
9481 2017-06-12 Tom Tromey <tom@tromey.com>
9482
9483 * valprint.h (val_print_type_code_int): Remove.
9484 * valprint.c (generic_val_print_int): Always call
9485 val_print_scalar_formatted.
9486 (val_print_type_code_int): Remove.
9487 * printcmd.c (print_scalar_formatted): Handle options->format==0.
9488 * f-valprint.c (f_val_print): Use val_print_scalar_formatted.
9489 * c-valprint.c (c_val_print_int): Use val_print_scalar_formatted.
9490 * ada-valprint.c (ada_val_print_num): Use
9491 val_print_scalar_formatted.
9492
9493 2017-06-12 Tom Tromey <tom@tromey.com>
9494
9495 * printcmd.c (print_scalar_formatted): Unify the two switches.
9496 Don't convert scalars to LONGEST.
9497
9498 2017-06-12 Tom Tromey <tom@tromey.com>
9499
9500 PR exp/16225:
9501 * valprint.h (print_decimal_chars): Update.
9502 * valprint.c (maybe_negate_by_bytes): New function.
9503 (print_decimal_chars): Add "is_signed" argument.
9504 * printcmd.c (print_scalar_formatted): Update.
9505
9506 2017-06-12 Tom Tromey <tom@tromey.com>
9507
9508 PR exp/16225:
9509 * valprint.h (print_binary_chars, print_hex_chars): Update.
9510 * valprint.c (val_print_type_code_int): Update.
9511 (print_binary_chars): Add "zero_pad" argument.
9512 (emit_octal_digit): New function.
9513 (print_octal_chars): Don't zero-pad.
9514 (print_decimal_chars): Likewise.
9515 (print_hex_chars): Add "zero_pad" argument.
9516 * sh64-tdep.c (sh64_do_fp_register): Update.
9517 * regcache.c (regcache::dump): Update.
9518 * printcmd.c (print_scalar_formatted): Update.
9519 * infcmd.c (default_print_one_register_info): Update.
9520
9521 2017-06-12 Pedro Alves <palves@redhat.com>
9522 Alan Hayward <alan.hayward@arm.com>
9523
9524 * mips-tdep.c (MAX_MIPS_ABI_REGSIZE): New.
9525 (mips_eabi_push_dummy_call): Rename local 'regsize' to
9526 'abi_regsize'. Rename local array 'valbuf' to 'ref_valbuf', and
9527 use MAX_MIPS_ABI_REGSIZE instead of MAX_REGISTER_SIZE to size it.
9528 Assert that abi_regsize bytes fit in 'ref_valbuf'.
9529
9530 2017-06-12 Pedro Alves <palves@redhat.com>
9531
9532 * dwarf2read.c (mapped_symtab::data): Now a vector of
9533 symtab_index_entry instead of vector of
9534 std::unique_ptr<symtab_index_entry>. All users adjusted to check
9535 whether an element's name is NULL instead of checking whether the
9536 element itself is NULL.
9537 (find_slot): Change return type. Adjust.
9538 (hash_expand, , add_index_entry, uniquify_cu_indices)
9539 (write_hash_table): Adjust.
9540
9541 2017-06-12 Pedro Alves <palves@redhat.com>
9542
9543 * dwarf2read.c (recursively_count_psymbols): New function.
9544 (write_psymtabs_to_index): Call it to compute number of psyms and
9545 pass estimate size of psyms_seen to unordered_set's ctor.
9546
9547 2017-06-12 Pedro Alves <palves@redhat.com>
9548
9549 * dwarf2read.c (write_hash_table): Check if key already exists
9550 before emplacing.
9551
9552 2017-06-12 Pedro Alves <palves@redhat.com>
9553
9554 * dwarf2read.c (data_buf::append_space): Rename to...
9555 (data_buf::grow): ... this, and make private. Adjust all callers.
9556 (data_buf::append_uint): New method.
9557 (add_address_entry, write_one_signatured_type)
9558 (write_psymtabs_to_index): Use it.
9559
9560 2017-06-12 Pedro Alves <palves@redhat.com>
9561
9562 * dwarf2read.c (file_write(FILE *, const void *, size_t)): Delete.
9563 (file_write (FILE *, const std::vector<Elem>&)): Delete.
9564 (data_buf::file_write): Call ::fwrite directly.
9565
9566 2017-06-12 Pedro Alves <palves@redhat.com>
9567
9568 * dwarf2read.c (uniquify_cu_indices): Use std::unique and
9569 std::vector::erase.
9570
9571 2017-06-12 Jan Kratochvil <jan.kratochvil@redhat.com>
9572
9573 Code cleanup: C++ify .gdb_index producer.
9574 * dwarf2read.c: Include <unordered_set> and <unordered_map>.
9575 (MAYBE_SWAP) [WORDS_BIGENDIAN]: Cast to offset_type.
9576 (struct strtab_entry, hash_strtab_entry, eq_strtab_entry)
9577 (create_strtab, add_string): Remove.
9578 (file_write, data_buf): New.
9579 (struct symtab_index_entry): Use std::vector for cu_indices.
9580 (struct mapped_symtab): Use std::vector for data.
9581 (hash_symtab_entry, eq_symtab_entry, delete_symtab_entry)
9582 (create_symbol_hash_table, create_mapped_symtab, cleanup_mapped_symtab):
9583 Remove.
9584 (find_slot): Change return type. Update it to the new data structures.
9585 (hash_expand, add_index_entry): Update it to the new data structures.
9586 (offset_type_compare): Remove.
9587 (uniquify_cu_indices): Update it to the new data structures.
9588 (c_str_view, c_str_view_hasher, vector_hasher): New.
9589 (add_indices_to_cpool): Remove.
9590 (write_hash_table): Update it to the new data structures.
9591 (struct psymtab_cu_index_map, hash_psymtab_cu_index)
9592 (eq_psymtab_cu_index): Remove.
9593 (psym_index_map): New typedef.
9594 (struct addrmap_index_data): Change addr_obstack pointer to data_buf
9595 reference and std::unordered_map for cu_index_htab.
9596 (add_address_entry, add_address_entry_worker, write_address_map)
9597 (write_psymbols): Update it to the new data structures.
9598 (write_obstack): Remove.
9599 (struct signatured_type_index_data): Change types_list to a data_buf
9600 reference and psyms_seen to a std::unordered_set reference.
9601 (write_one_signatured_type, recursively_write_psymbols)
9602 (write_psymtabs_to_index): Update it to the new data structures.
9603
9604 2017-06-11 Simon Marchi <simon.marchi@ericsson.com>
9605
9606 * NEWS (Changes since GDB 8.0): Announce {set,show} debug
9607 separate-debug-file commands.
9608 * symfile.h (separate_debug_file_debug): New global.
9609 * symfile.c (separate_debug_file_debug): New global.
9610 (separate_debug_file_exists, find_separate_debug_file): Add
9611 debug output.
9612 (_initialize_symfile): Add "set debug separate-debug-file"
9613 command.
9614 * build-id.c (build_id_to_debug_bfd,
9615 find_separate_debug_file_by_buildid): Add debug output.
9616
9617 2017-06-10 Simon Marchi <simon.marchi@polymtl.ca>
9618
9619 * gdbarch.sh (displaced_step_free_closure): Remove.
9620 * gdbarch.h, gdbarch.c: Re-generate.
9621 * aarch64-linux-tdep.c (aarch64_linux_init_abi): Don't set
9622 displaced_step_free_closure.
9623 * amd64-linux-tdep.c (amd64_linux_init_abi_common): Likewise.
9624 * arm-linux-tdep.c (arm_linux_init_abi): Likewise.
9625 * i386-linux-tdep.c (i386_linux_init_abi): Likewise.
9626 * rs6000-aix-tdep.c (rs6000_aix_init_osabi): Likewise.
9627 * rs6000-tdep.c (rs6000_gdbarch_init): Likewise.
9628 * s390-linux-tdep.c (s390_gdbarch_init): Likewise.
9629 * arch-utils.h (simple_displaced_step_free_closure): Remove.
9630 * arch-utils.c (simple_displaced_step_free_closure): Remove.
9631 * infrun.c (displaced_step_clear): Call xfree instead of
9632 gdbarch_displaced_step_free_closure.
9633
9634 2017-06-08 Sergio Durigan Junior <sergiodj@redhat.com>
9635
9636 * common/common-utils.c (stringify_argv): Check for "arg[0] !=
9637 NULL".
9638
9639 2017-06-08 Alan Hayward <alan.hayward@arm.com>
9640
9641 * mn10300-tdep.c (MN10300_MAX_REGISTER_SIZE): Add.
9642 (mn10300_extract_return_value): Use MN10300_MAX_REGISTER_SIZE.
9643 (mn10300_push_dummy_call): Likewise.
9644
9645 2017-06-08 Alan Hayward <alan.hayward@arm.com>
9646
9647 * mi/mi-main.c (register_changed_p): Use value_contents_eq.
9648
9649 2017-06-08 Alan Hayward <alan.hayward@arm.com>
9650
9651 * mi/mi-main.c (register_changed_p): Use cooked_read_value.
9652
9653 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
9654
9655 * NEWS (Changes since GDB 8.0): Announce that GDBserver is now
9656 able to start inferiors using a shell.
9657 (New remote packets): Announce new packet "QStartupWithShell".
9658 * remote.c: Add PACKET_QStartupWithShell.
9659 (extended_remote_create_inferior): Handle new
9660 PACKET_QStartupWithShell.
9661 (remote_protocol_features) <QStartupWithShell>: New entry for
9662 PACKET_QStartupWithShell.
9663 (_initialize_remote): Call "add_packet_config_cmd" for
9664 QStartupShell.
9665
9666 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
9667 Pedro Alves <palves@redhat.com>
9668
9669 * Makefile.in (HFILES_NO_SRCDIR): Add "common/common-inferior.h"
9670 and "nat/fork-inferior.h".
9671 * common/common-inferior.h: New file, with contents from
9672 "gdb/inferior.h".
9673 * commom/common-utils.c: Include "common-utils.h".
9674 (stringify_argv): New function.
9675 * common/common-utils.h (stringify_argv): New prototype.
9676 * configure.nat: Add "fork-inferior.o" as a dependency for
9677 "*linux*", "fbsd*" and "nbsd*" hosts.
9678 * corefile.c (get_exec_file): Update comment.
9679 * darwin-nat.c (darwin_ptrace_him): Call "gdb_startup_inferior"
9680 instead of "startup_inferior".
9681 (darwin_create_inferior): Call "add_thread_silent" after
9682 "fork_inferior".
9683 * fork-child.c: Cleanup unnecessary includes.
9684 (SHELL_FILE): Move to "common/common-fork-child.c".
9685 (environ): Likewise.
9686 (exec_wrapper): Initialize.
9687 (get_exec_wrapper): New function.
9688 (breakup_args): Move to "common/common-fork-child.c"; rename to
9689 "breakup_args_for_exec".
9690 (escape_bang_in_quoted_argument): Move to
9691 "common/common-fork-child.c".
9692 (saved_ui): New variable.
9693 (prefork_hook): New function.
9694 (postfork_hook): Likewise.
9695 (postfork_child_hook): Likewise.
9696 (gdb_startup_inferior): Likewise.
9697 (fork_inferior): Move to "common/common-fork-child.c". Update
9698 function to support gdbserver.
9699 (startup_inferior): Likewise.
9700 * gdbcore.h (get_exec_file): Remove declaration.
9701 * gnu-nat.c (gnu_create_inferior): Call "gdb_startup_inferior"
9702 instead of "startup_inferior". Call "add_thread_silent" after
9703 "fork_inferior".
9704 * inf-ptrace.c: Include "nat/fork-inferior.h" and "utils.h".
9705 (inf_ptrace_create_inferior): Call "gdb_startup_inferior"
9706 instead of "startup_inferior". Call "add_thread_silent" after
9707 "fork_inferior".
9708 * inferior.h: Include "common-inferior.h".
9709 (trace_start_error): Move to "common/common-utils.h".
9710 (trace_start_error_with_name): Likewise.
9711 (fork_inferior): Move prototype to "nat/fork-inferior.h".
9712 (startup_inferior): Likewise.
9713 (gdb_startup_inferior): New prototype.
9714 * nat/fork-inferior.c: New file, with contents from "fork-child.c".
9715 * nat/fork-inferior.h: New file.
9716 * procfs.c (procfs_init_inferior): Call "gdb_startup_inferior"
9717 instead of "startup_inferior". Call "add_thread_silent" after
9718 "fork_inferior".
9719 * target.h (target_terminal_init): Move prototype to
9720 "target/target.h".
9721 (target_terminal_inferior): Likewise.
9722 (target_terminal_ours): Likewise.
9723 * target/target.h (target_terminal_init): New prototype, moved
9724 from "target.h".
9725 (target_terminal_inferior): Likewise.
9726 (target_terminal_ours): Likewise.
9727 * utils.c (gdb_flush_out_err): New function.
9728
9729 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
9730
9731 * Makefile.in (HFILES_NO_SRCDIR): Add "common/common-gdbthread.h".
9732 * common/common-gdbthread.h: New file, with parts from
9733 "gdb/gdbthread.h".
9734 * gdbthread.h: Include "common-gdbthread.h".
9735 (switch_to_thread): Moved to "common/common-gdbthread.h".
9736
9737 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
9738
9739 * Makefile.in (SFILES): Add "common/job-control.c".
9740 (HFILES_NO_SRCDIR): Add "common/job-control.h".
9741 (COMMON_OBS): Add "job-control.o".
9742 * common/job-control.c: New file, with contents from
9743 "gdb/inflow.c".
9744 * common/job-control.h: New file, with contents from "terminal.h".
9745 * fork-child.c: Include "job-control.h".
9746 * inflow.c: Include "job-control.h".
9747 (gdb_setpgid): Move to "common/common-inflow.c".
9748 (_initialize_inflow): Move setting of "job_control" to
9749 "handle_job_control".
9750 * terminal.h (job_control): Moved to "common/common-terminal.h".
9751 (gdb_setpgid): Likewise.
9752 * top.c: Include "job_control.h".
9753 * utils.c: Likewise.
9754 (job_control): Moved to "job-control.c".
9755
9756 2017-06-07 Pedro Alves <palves@redhat.com>
9757
9758 * Makefile.in (SFILES): Add gdb_regex.c.
9759 (COMMON_OBS): Add gdb_regex.o.
9760 * ada-lang.c (ada_add_standard_exceptions)
9761 (ada_add_exceptions_from_frame, name_matches_regex)
9762 (ada_add_global_exceptions, ada_exceptions_list_1): Change regex
9763 parameter type to compiled_regex. Adjust.
9764 (ada_exceptions_list): Use compiled_regex.
9765 * break-catch-throw.c (exception_catchpoint::pattern): Now a
9766 std::unique_ptr<compiled_regex>.
9767 (exception_catchpoint::~exception_catchpoint): Remove regfree
9768 call.
9769 (check_status_exception_catchpoint): Adjust to use compiled_regex.
9770 (handle_gnu_v3_exceptions): Adjust to use compiled_regex.
9771 * breakpoint.c (solib_catchpoint::compiled): Now a
9772 std::unique_ptr<compiled_regex>.
9773 (solib_catchpoint::~solib_catchpoint): Remove regfree call.
9774 (check_status_catch_solib): Adjust to use compiled_regex.
9775 (add_solib_catchpoint): Adjust to use compiled_regex.
9776 * cli/cli-cmds.c (apropos_command): Use compiled_regex.
9777 * cli/cli-decode.c (apropos_cmd): Change regex parameter to
9778 compiled_regex reference. Adjust to use it.
9779 * cli/cli-decode.h: Remove struct re_pattern_buffer forward
9780 declaration. Include "gdb_regex.h".
9781 (apropos_cmd): Change regex parameter to compiled_regex reference.
9782 * gdb_regex.c: New file.
9783 * gdb_regex.h (make_regfree_cleanup, get_regcomp_error): Delete
9784 declarations.
9785 (class compiled_regex): New.
9786 * linux-tdep.c: Include "common/gdb_optional.h".
9787 (struct mapping_regexes): New, factored out from
9788 mapping_is_anonymous_p, and adjusted to use compiled_regex.
9789 (mapping_is_anonymous_p): Use mapping_regexes wrapped in a
9790 gdb::optional and remove cleanups. Adjust to compiled_regex.
9791 * probe.c: Include "common/gdb_optional.h".
9792 (collect_probes): Use compiled_regex and gdb::optional and remove
9793 cleanups.
9794 * skip.c: Include "common/gdb_optional.h".
9795 (skiplist_entry::compiled_function_regexp): Now a
9796 gdb::optional<compiled_regex>.
9797 (skiplist_entry::compiled_function_regexp_is_valid): Delete field.
9798 (free_skiplist_entry): Remove regfree call.
9799 (compile_skip_regexp, skip_rfunction_p): Adjust to use
9800 compiled_regex and gdb::optional.
9801 * symtab.c: Include "common/gdb_optional.h".
9802 (search_symbols): Use compiled_regex and gdb::optional.
9803 * utils.c (do_regfree_cleanup, make_regfree_cleanup)
9804 (get_regcomp_error, compile_rx_or_error): Delete. Some bits moved
9805 to gdb_regex.c.
9806
9807 2017-06-07 Alan Hayward <alan.hayward@arm.com>
9808
9809 * regcache.c (regcache::save): Avoid buffer use.
9810 (regcache::dump): Likewise.
9811
9812 2017-06-07 Alan Hayward <alan.hayward@arm.com>
9813
9814 * sh-tdep.c (sh_pseudo_register_read): Remove
9815 MAX_REGISTER_SIZE.
9816 (sh_pseudo_register_write): Likewise.
9817 * sh64-tdep.c (sh64_pseudo_register_read): Likewise.
9818 (sh64_pseudo_register_write): Likewise
9819
9820 2017-06-07 Alan Hayward <alan.hayward@arm.com>
9821
9822 * aarch64-tdep.c (aarch64_store_return_value): Use
9823 V_REGISTER_SIZE.
9824 (aarch64_pseudo_read_value): Likewise.
9825 (aarch64_pseudo_write): Likewise.
9826
9827 2017-06-06 Yao Qi <yao.qi@linaro.org>
9828
9829 * regformats/regdef.h (set_register_cache): Remove the
9830 declaration.
9831
9832 2017-06-06 Alan Hayward <alan.hayward@arm.com>
9833
9834 * frame.c (frame_unwind_register_signed): Use
9835 frame_unwind_register_value.
9836
9837 2017-06-06 Pedro Alves <palves@redhat.com>
9838
9839 PR breakpoints/21553
9840 * breakpoint.c (create_breakpoints_sal_default)
9841 (init_breakpoint_sal, create_breakpoint_sal): Use
9842 gdb::unique_xmalloc_ptr for string parameters.
9843 (create_breakpoint): Constify 'extra_string' and 'cond_string'
9844 parameters. Replace cleanups with gdb::unique_xmalloc_ptr.
9845 (base_breakpoint_create_breakpoints_sal)
9846 (bkpt_create_breakpoints_sal, tracepoint_create_breakpoints_sal)
9847 (strace_marker_create_breakpoints_sal)
9848 (create_breakpoints_sal_default): Use gdb::unique_xmalloc_ptr for
9849 string parameters.
9850 * breakpoint.h (breakpoint_ops::create_breakpoints_sal): Use
9851 gdb::unique_xmalloc_ptr for string parameters.
9852 (create_breakpoint): Constify 'extra_string' and 'cond_string'
9853 parameters.
9854
9855 2017-06-06 Alan Hayward <alan.hayward@arm.com>
9856
9857 * alpha-tdep.c (alpha_register_to_value): Use
9858 get_frame_register_value.
9859 (alpha_value_to_register): Use ALPHA_REGISTER_SIZE.
9860
9861 2017-06-06 Alan Hayward <alan.hayward@arm.com>
9862
9863 * ia64-tdep.c (IA64_MAX_FP_REGISTER_SIZE) Add.
9864 (ia64_register_to_value): Use IA64_MAX_FP_REGISTER_SIZE.
9865 (ia64_value_to_register): Likewise.
9866 (ia64_extract_return_value): Likewise.
9867 (ia64_store_return_value): Likewise.
9868 (ia64_push_dummy_call): Likewise.
9869
9870 2017-06-04 Joel Brobecker <brobecker@adacore.com>
9871
9872 GDB 8.0 released.
9873
9874 2017-06-03 Simon Marchi <simon.marchi@ericsson.com>
9875
9876 * x86-linux-nat.c (struct arch_lwp_info): Remove.
9877
9878 2017-06-03 Simon Marchi <simon.marchi@polymtl.ca>
9879
9880 * linux-nat.c (linux_nat_post_attach_wait): Remove FIRST
9881 parameter.
9882 (linux_nat_attach): Adjust call to linux_nat_post_attach_wait.
9883
9884 2017-06-02 Simon Marchi <simon.marchi@ericsson.com>
9885
9886 * event-loop.c (poll_timers): Unallocate timer using delete
9887 instead of xfree.
9888
9889 2017-06-02 Simon Marchi <simon.marchi@polymtl.ca>
9890
9891 * breakpoint.h (struct breakpoint_ops) <dtor>: Remove.
9892 (struct breakpoint) <~breakpoint>: New.
9893 (struct watchpoint): Inherit from breakpoint.
9894 <~watchpoint>: New.
9895 <base>: Remove.
9896 (struct tracepoint): Inherit from breakpoint.
9897 <base>: Remove.
9898 * breakpoint.c (longjmp_breakpoint_ops): Remove.
9899 (struct longjmp_breakpoint): Inherit from breakpoint.
9900 <~longjmp_breakpoint>: New.
9901 <base>: Remove.
9902 (new_breakpoint_from_type): Remove casts.
9903 (watchpoint_in_thread_scope): Remove reference to base field.
9904 (watchpoint_del_at_next_stop): Likewise.
9905 (update_watchpoint): Likewise.
9906 (watchpoint_check): Likewise.
9907 (bpstat_check_watchpoint): Likewise.
9908 (set_longjmp_breakpoint): Likewise.
9909 (struct fork_catchpoint): Inherit from breakpoint.
9910 <base>: Remove.
9911 (struct solib_catchpoint): Inherit from breakpoint.
9912 <~solib_catchpoint>: New.
9913 <base>: Remove.
9914 (dtor_catch_solib): Change to ...
9915 (solib_catchpoint::~solib_catchpoint): ... this.
9916 (breakpoint_hit_catch_solib): Remove reference to base field.
9917 (add_solib_catchpoint): Likewise.
9918 (create_fork_vfork_event_catchpoint): Likewise.
9919 (struct exec_catchpoint): Inherit from breakpoint.
9920 <~exec_catchpoint>: New.
9921 <base>: Remove.
9922 (dtor_catch_exec): Change to ...
9923 (exec_catchpoint::~exec_catchpoint): ... this.
9924 (dtor_watchpoint): Change to ...
9925 (watchpoint::~watchpoint): ... this.
9926 (watch_command_1): Remove reference to base field.
9927 (catch_exec_command_1): Likewise.
9928 (base_breakpoint_dtor): Change to ...
9929 (breakpoint::~breakpoint): ... this.
9930 (base_breakpoint_ops): Remove dtor field value.
9931 (longjmp_bkpt_dtor): Change to ...
9932 (longjmp_breakpoint::~longjmp_breakpoint): ... this.
9933 (strace_marker_create_breakpoints_sal): Remove reference to base
9934 field.
9935 (delete_breakpoint): Don't manually call breakpoint destructor.
9936 (create_tracepoint_from_upload): Remove reference to base field.
9937 (trace_pass_set_count): Likewise.
9938 (initialize_breakpoint_ops): Don't initialize
9939 momentary_breakpoint_ops, don't set dtors.
9940 * ada-lang.c (struct ada_catchpoint): Inherit from breakpoint.
9941 <~ada_catchpoint>: New.
9942 <base>: Remove.
9943 (create_excep_cond_exprs): Remove reference to base field.
9944 (dtor_exception): Change to ...
9945 (ada_catchpoint::~ada_catchpoint): ... this.
9946 (dtor_catch_exception): Remove.
9947 (dtor_catch_exception_unhandled): Remove.
9948 (dtor_catch_assert): Remove.
9949 (create_ada_exception_catchpoint): Remove reference to base
9950 field.
9951 (initialize_ada_catchpoint_ops): Don't set dtors.
9952 * break-catch-sig.c (struct signal_catchpoint): Inherit from
9953 breakpoint.
9954 <~signal_catchpoint>: New.
9955 <base>: Remove.
9956 (signal_catchpoint_dtor): Change to ...
9957 (signal_catchpoint::~signal_catchpoint): ... this.
9958 (create_signal_catchpoint): Remove reference to base field.
9959 (initialize_signal_catchpoint_ops): Don't set dtor.
9960 * break-catch-syscall.c (struct syscall_catchpoint): Inherit
9961 from breakpoint.
9962 <~syscall_catchpoint>: New.
9963 <base>: Remove.
9964 (dtor_catch_syscall): Change to ...
9965 (syscall_catchpoint::~syscall_catchpoint): ... this.
9966 (create_syscall_event_catchpoint): Remove reference to base
9967 field.
9968 (initialize_syscall_catchpoint_ops): Don't set dtor.
9969 * break-catch-throw.c (struct exception_catchpoint): Inherit
9970 from breakpoint.
9971 <~exception_catchpoint>: New.
9972 <base>: Remove.
9973 (dtor_exception_catchpoint): Change to ...
9974 (exception_catchpoint::~exception_catchpoint): ... this.
9975 (handle_gnu_v3_exceptions): Remove reference to base field.
9976 (initialize_throw_catchpoint_ops): Don't set dtor.
9977 * ctf.c (ctf_get_traceframe_address): Remove reference to base
9978 field.
9979 * remote.c (remote_get_tracepoint_status): Likewise.
9980 * tracefile-tfile.c (tfile_get_traceframe_address): Likewise.
9981 * tracefile.c (tracefile_fetch_registers): Likewise.
9982 * tracepoint.c (actions_command): Likewise.
9983 (validate_actionline): Likewise.
9984 (tfind_1): Likewise.
9985 (get_traceframe_location): Likewise.
9986 (find_matching_tracepoint_location): Likewise.
9987 (parse_tracepoint_status): Likewise.
9988 * mi/mi-cmd-break.c (mi_cmd_break_passcount): Likewise.
9989
9990 2017-06-02 Simon Marchi <simon.marchi@polymtl.ca>
9991
9992 * breakpoint.c (struct longjmp_breakpoint): New struct.
9993 (is_tracepoint_type): Change return type to bool.
9994 (is_longjmp_type): New function.
9995 (new_breakpoint_from_type): Handle longjmp kinds of breakpoints.
9996 (set_raw_breakpoint_without_location): Use
9997 new_breakpoint_from_type.
9998 (set_raw_breakpoint): Likewise.
9999
10000 2017-06-02 Simon Marchi <simon.marchi@polymtl.ca>
10001
10002 * breakpoint.c (new_breakpoint_from_type): New function.
10003 (create_breakpoint_sal): Use new_breakpoint_from_type and
10004 unique_ptr.
10005 (create_breakpoint): Likewise.
10006
10007 2017-05-31 Simon Marchi <simon.marchi@ericsson.com>
10008
10009 * memattr.c (mem_info_command): Rename to ...
10010 (info_mem_command): ... this.
10011 (mem_enable_command): Rename to ...
10012 (enable_mem_command): ... this.
10013 (mem_disable_command): Rename to ...
10014 (disable_mem_command): ... this.
10015 (mem_delete_command): Rename to ...
10016 (delete_mem_command): ... this.
10017 (_initialize_mem): Adjust function names.
10018
10019 2017-05-31 Markus Metzger <markus.t.metzger@intel.com>
10020
10021 * btrace.c (handle_pt_insn_events): New.
10022 (ftrace_add_pt): Call handle_pt_insn_events. Rename ERRCODE into
10023 STATUS. Split into this and ...
10024 (handle_pt_insn_event_flags): ... this.
10025
10026 2017-05-31 Markus Metzger <markus.t.metzger@intel.com>
10027
10028 * configure.ac: Check for pt_insn_event, struct pt_insn.enabled,
10029 and struct pt_insn.resynced.
10030 * configure: Regenerated.
10031 * config.in: Regenerated.
10032
10033 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
10034
10035 * btrace.c (ftrace_find_call_by_number): New function.
10036 (ftrace_new_function): Store objects, not pointers.
10037 (ftrace_find_call_by_number, ftrace_new_return, ftrace_new_switch,
10038 ftrace_new_gap, ftrace_update_function,
10039 ftrace_compute_global_level_offset, btrace_stich_bts, btrace_clear,
10040 btrace_insn_get, btrace_insn_get_error, btrace_insn_end,
10041 btrace_insn_next, btrace_insn_prev, ptrace_find_insn_by_number,
10042 btrace_ends_with_single_insn, btrace_call_get): Account for
10043 btrace_thread_info::functions now storing objects.
10044 * btrace.h (struct btrace_thread_info): Add constructor.
10045 (struct btrace_thread_info) <functions>: Make std::vector.
10046 (struct btrace_thread_info) <prev, next, up, insn, errcode, flags):
10047 Initialize with default values.
10048 * record-btrace.c (record_btrace_frame_sniffer): Account for
10049 btrace_thread_info::functions now storing objects.
10050
10051 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
10052
10053 * btrace.c: Remove typedef bfun_s.
10054 (ftrace_new_gap): Directly add gaps to the list of gaps.
10055 (btrace_bridge_gaps, btrace_compute_ftrace_bts, pt_btrace_insn_flags,
10056 ftrace_add_pt, btrace_compute_ftrace_pt, btrace_compute_ftrace_1,
10057 btrace_finalize_ftrace, btrace_compute_ftrace): Use std::vector
10058 instead of gdb VEC.
10059
10060 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
10061
10062 * btrace.c (ftrace_fixup_caller, ftrace_new_return, ftrace_connect_bfun,
10063 ftrace_bridge_gap): Replace references to btrace_thread_info::segment
10064 with btrace_thread_info::next_segment and
10065 btrace_thread_info::prev_segment.
10066 * btrace.h: Remove struct btrace_func_link.
10067 (struct btrace_function): Replace pair of function segment pointers
10068 with pair of indices.
10069 * python/py-record-btrace.c (btpy_call_prev_sibling,
10070 btpy_call_next_sibling): Replace references to
10071 btrace_thread_info::segment with btrace_thread_info::next_segment and
10072 btrace_thread_info::prev_segment.
10073 * record-btrace.c (record_btrace_frame_this_id): Use
10074 btrace_find_call_by_number.
10075
10076 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
10077
10078 * btrace.c (ftrace_new_function, ftrace_fixup_level,
10079 ftrace_connect_bfun, ftrace_bridge_gap, btrace_bridge_gaps,
10080 btrace_insn_next, btrace_insn_prev): Remove references to
10081 btrace_thread_info::flow.
10082 * btrace.h (struct btrace_function): Remove FLOW.
10083
10084 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
10085
10086 * btrace.c (ftrace_find_call_by_number): New function.
10087 (ftrace_update_caller, ftrace_new_call, ftrace_new_tailcall,
10088 ftrace_get_caller, ftrace_find_call, ftrace_new_return,
10089 ftrace_match_backtrace, ftrace_connect_bfun, ftrace_connect_backtrace,
10090 ftrace_bridge_gap, btrace_bridge_gaps): Use btrace_function::up as an
10091 index.
10092 * btrace.h (struct btrace_function): Turn UP into an index.
10093 * python/py-record-btrace.c (btpy_call_up): Use btrace_function::up
10094 as an index.
10095 * record-btrace.c (record_btrace_frame_unwind_stop_reason,
10096 record_btrace_frame_prev_register, record_btrace_frame_sniffer,
10097 record_btrace_tailcall_frame_sniffe): Use btrace_find_call_by_number.
10098
10099 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
10100
10101 * btrace.c (ftrace_new_function, ftrace_new_call, ftrace_new_tailcall,
10102 ftrace_new_return, ftrace_new_switch, ftrace_new_gap,
10103 ftrace_update_function, ftrace_compute_global_level_offset,
10104 btrace_compute_ftrace_bts, ftrace_add_pt, btrace_compute_ftrace_pt,
10105 btrace_stitch_bts, btrace_fetch, btrace_clear, btrace_insn_number,
10106 btrace_insn_end, btrace_is_empty): Remove references to
10107 btrace_thread_info::begin and btrace_thread_info::end.
10108 * btrace.h (struct btrace_thread_info): Remove BEGIN and END.
10109 (struct btrace_thread_info) <functions>: Adjust comment.
10110 * record-btrace.c (record_btrace_start_replaying): Remove reference to
10111 btrace_thread_info::begin.
10112
10113 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
10114
10115 * btrace.c (ftrace_new_function, ftrace_new_call, ftrace_new_tailcall,
10116 ftrace_new_return, ftrace_new_switch, ftrace_new_gap,
10117 ftrace_update_function): Remove arguments that implicitly were always
10118 BTINFO->END.
10119 (btrace_compute_ftrace_bts, ftrace_add_pt, btrace_compute_ftrace_pt):
10120 Don't pass BTINFO->END.
10121
10122 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
10123
10124 * btrace.c: (btrace_insn_get, btrace_insn_get_error, btrace_insn_number,
10125 btrace_insn_begin, btrace_insn_end, btrace_insn_next, btrace_insn_prev,
10126 btrace_find_insn_by_number): Replace function segment pointer with
10127 index.
10128 (btrace_insn_cmp): Simplify.
10129 * btrace.h: (struct btrace_insn_iterator) Rename index to
10130 insn_index. Replace function segment pointer with index into function
10131 segment vector.
10132 * record-btrace.c (record_btrace_call_history): Replace function
10133 segment pointer use with index.
10134 (record_btrace_frame_sniffer): Retrieve function call segment through
10135 vector.
10136 (record_btrace_set_replay): Remove defunc't safety check.
10137
10138 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
10139
10140 * btrace.c (btrace_ends_with_single_insn): New function.
10141 (btrace_call_get, btrace_call_number, btrace_call_begin,
10142 btrace_call_end, btrace_call_next, btrace_call_prev,
10143 btrace_find_call_by_number): Use index into call segment vector
10144 instead of pointer.
10145 (btrace_call_cmp): Simplify.
10146 * btrace.h (struct btrace_call_iterator): Replace function call segment
10147 pointer with index into vector.
10148 * record-btrace.c (record_btrace_call_history): Use index instead of
10149 pointer.
10150
10151 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
10152
10153 * btrace.c (btrace_insn_begin, btrace_insn_end,
10154 btrace_find_insn_by_number): Add btinfo to iterator.
10155 * btrace.h (struct btrace_insn_iterator): Add btinfo.
10156
10157 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
10158
10159 * btrace.c (ftrace_new_function): Add btrace_thread_info to arguments
10160 and save pointers directly.
10161 (ftrace_new_call, ftrace_new_tailcall, ftrace_new_return,
10162 ftrace_new_switch, ftrace_new_gap, ftrace_update_function,
10163 ftrace_add_pt): Add btrace_thread_info to arguments. Adjust for
10164 changed signature of functions.
10165 (btrace_compute_ftrace_pt): Adjust for changed signature of functions.
10166 (btrace_fetch): Remove code that adds btrace_function pointers to
10167 vector of btrace_functions.
10168 (btrace_clear): Simplify freeing vector of btrace_functions.
10169
10170 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
10171
10172 * btrace.c (btrace_fetch, btrace_clear, btrace_find_insn_by_number):
10173 Replace VEC_* with std::vector functions.
10174 * btrace.h: Add include: vector. Remove typedef for DEF_VEC_P.
10175 (struct btrace_thread_info)<functions>: Change type to std::vector.
10176
10177 2017-05-30 Simon Marchi <simon.marchi@ericsson.com>
10178
10179 * NEWS (Changes in GDB 8.0): Remove extra empty line. Move
10180 "Removed targets and native configurations" up. Merge duplicate
10181 "New commands" sub-sections. Add "New options" sub-sections.
10182
10183 2017-05-26 Alan Hayward <alan.hayward@arm.com>
10184
10185 * defs.h (copy_integer_to_size): New declaration.
10186 * findvar.c (copy_integer_to_size): New function.
10187 (do_cint_test): New selftest function.
10188 (copy_integer_to_size_test): Likewise.
10189 (_initialize_findvar): Likewise.
10190 * mips-fbsd-tdep.c (mips_fbsd_supply_reg): Use raw_supply_integer.
10191 (mips_fbsd_collect_reg): Use raw_collect_integer.
10192 * mips-linux-tdep.c (supply_32bit_reg): Use raw_supply_integer.
10193 (mips64_fill_gregset): Use raw_collect_integer
10194 (mips64_fill_fpregset): Use raw_supply_integer.
10195 * regcache.c (regcache::raw_supply_integer): New function.
10196 (regcache::raw_collect_integer): Likewise.
10197 * regcache.h: (regcache::raw_supply_integer): New declaration.
10198 (regcache::raw_collect_integer): Likewise.
10199
10200 2017-05-24 Yao Qi <yao.qi@linaro.org>
10201
10202 * Makefile.in (SFILES): Add gdbarch-selftests.c.
10203 (COMMON_OBS): Add gdbarch-selftests.o.
10204 * frame.c [GDB_SELF_TESTS] (create_new_frame): New function.
10205 * frame.h [GDB_SELF_TESTS] (create_new_frame): Declare.
10206 * gdbarch-selftests.c: New file.
10207 * regcache.h (regcache) <~regcache>: Mark it virtual if
10208 GDB_SELF_TEST.
10209 <raw_write>: Likewise.
10210
10211 2017-05-24 Yao Qi <yao.qi@linaro.org>
10212
10213 * regcache.c (current_regcache): Change it to
10214 regcache::current_regcache.
10215 (regcache_observer_target_changed): Update.
10216 (regcache_thread_ptid_changed): Make it a regcache static
10217 method.
10218 (regcache_thread_ptid_changed): Update.
10219 (class regcache_access): New.
10220 (current_regcache_test): Update.
10221 (_initialize_regcache): Update.
10222 * regcache.h: Include forward_list.
10223 (regcache): Declare regcache_thread_ptid_changed and declare
10224 registers_changed_ptid as friend.
10225
10226 2017-05-24 Yao Qi <yao.qi@linaro.org>
10227
10228 * i387-tdep.c (i387_register_to_value): Use register_size
10229 instead of TYPE_LENGTH.
10230 * m68k-tdep.c (m68k_register_to_value): Likewise.
10231
10232 2017-05-24 Yao Qi <yao.qi@linaro.org>
10233
10234 * i387-tdep.c (i387_convert_register_p): Return false if type
10235 code isn't TYPE_CODE_FLT.
10236
10237 2017-05-24 Yao Qi <yao.qi@linaro.org>
10238
10239 * alpha-tdep.c (alpha_convert_register_p): Return true if type
10240 length is 4.
10241 (alpha_register_to_value): Remove type length check.
10242 (alpha_value_to_register): Likewise.
10243
10244 2017-05-24 Yao Qi <yao.qi@linaro.org>
10245
10246 * ia64-tdep.c (ia64_convert_register_p): Check type's code is
10247 TYPE_CODE_FLT.
10248
10249 2017-05-24 Yao Qi <yao.qi@linaro.org>
10250
10251 * m68k-tdep.c (m68k_convert_register_p): Check type's code is
10252 TYPE_CODE_FLT or not.
10253
10254 2017-05-24 Yao Qi <yao.qi@linaro.org>
10255
10256 * alpha-tdep.c (alpha_gdbarch_init): Use XCNEW instead of XNEW.
10257 * avr-tdep.c (avr_gdbarch_init): Likewise.
10258 * bfin-tdep.c (bfin_gdbarch_init): Likewise.
10259 * cris-tdep.c (cris_gdbarch_init): Likewise.
10260 * ft32-tdep.c (ft32_gdbarch_init): Likewise.
10261 * lm32-tdep.c (lm32_gdbarch_init): Likewise.
10262 * m32r-tdep.c (m32r_gdbarch_init): Likewise.
10263 * m68hc11-tdep.c (m68hc11_gdbarch_init): Likewise.
10264 * mep-tdep.c (mep_gdbarch_init): Likewise.
10265 * microblaze-tdep.c (microblaze_gdbarch_init): Likewise.
10266 * mips-tdep.c (mips_gdbarch_init): Likewise.
10267 * mn10300-tdep.c (mn10300_gdbarch_init): Likewise.
10268 * moxie-tdep.c (moxie_gdbarch_init): Likewise.
10269 * msp430-tdep.c (msp430_gdbarch_init): Likewise.
10270 * sh64-tdep.c (sh64_gdbarch_init): Likewise.
10271 * v850-tdep.c (v850_gdbarch_init): Likewise.
10272
10273 2017-05-24 Yao Qi <yao.qi@linaro.org>
10274
10275 * selftest-arch.c (tests_with_arch): Call registers_changed
10276 and reinit_frame_cache.
10277 * selftest.c (run_self_tests): Likewise.
10278
10279 2017-05-24 Yao Qi <yao.qi@linaro.org>
10280
10281 * rs6000-tdep.c (gdb_print_insn_powerpc): Remove.
10282 (rs6000_gdbarch_init): Don't call set_gdbarch_print_insn.
10283
10284 2017-05-24 Yao Qi <yao.qi@linaro.org>
10285
10286 * rl78-tdep.c (rl78_gdbarch_init): Don't call
10287 set_gdbarch_print_insn.
10288
10289 2017-05-24 Yao Qi <yao.qi@linaro.org>
10290
10291 * h8300-tdep.c (h8300_gdbarch_init): Don't call
10292 set_gdbarch_print_insn.
10293
10294 2017-05-24 Yao Qi <yao.qi@linaro.org>
10295
10296 * alpha-tdep.c (alpha_gdbarch_init): Don't call
10297 set_gdbarch_print_insn.
10298 * arc-tdep.c (arc_gdbarch_init): Likewise.
10299 * arch-utils.c: include dis-asm.h.
10300 (default_print_insn): New function.
10301 * arch-utils.h (default_print_insn): Declare.
10302 * avr-tdep.c (avr_gdbarch_init): Don't call set_gdbarch_print_insn.
10303 * bfin-tdep.c (bfin_gdbarch_init): Likewise.
10304 * cris-tdep.c (cris_delayed_get_disassembler): Remove.
10305 (cris_gdbarch_init): Don't call set_gdbarch_print_insn.
10306 * frv-tdep.c (frv_gdbarch_init): Likewise.
10307 * ft32-tdep.c (ft32_gdbarch_init): Likewise.
10308 * gdbarch.sh (print_insn): Use default_print_insn.
10309 * gdbarch.c: Regenerated.
10310 * hppa-tdep.c (hppa_gdbarch_init): Likewise.
10311 * iq2000-tdep.c (iq2000_gdbarch_init): Likewise.
10312 * lm32-tdep.c (lm32_gdbarch_init): Likewise.
10313 * m32c-tdep.c (m32c_gdbarch_init): Likewise.
10314 * m32r-tdep.c (m32r_gdbarch_init): Likewise.
10315 * m68hc11-tdep.c (gdb_print_insn_m68hc11): Remove.
10316 (m68hc11_gdbarch_init): Don't call set_gdbarch_print_insn.
10317 * m68k-tdep.c (m68k_gdbarch_init): Likewise.
10318 * m88k-tdep.c (m88k_gdbarch_init): Likewise.
10319 * microblaze-tdep.c (microblaze_gdbarch_init): Likewise.
10320 * mn10300-tdep.c (mn10300_gdbarch_init): Likewise.
10321 * moxie-tdep.c (moxie_gdbarch_init): Likewise.
10322 * msp430-tdep.c (msp430_gdbarch_init): Likewise.
10323 * mt-tdep.c (mt_gdbarch_init): Likewise.
10324 * nds32-tdep.c (nds32_gdbarch_init): Likewise.
10325 * nios2-tdep.c (nios2_print_insn): Remove.
10326 (nios2_gdbarch_init): Don't call set_gdbarch_print_insn.
10327 * rx-tdep.c (rx_gdbarch_init): Likewise.
10328 * s390-linux-tdep.c (s390_gdbarch_init): Likewise.
10329 * score-tdep.c (score_print_insn): Remove.
10330 (score_gdbarch_init): Don't call set_gdbarch_print_insn.
10331 * sh-tdep.c (sh_gdbarch_init): Likewise.
10332 * sh64-tdep.c (sh64_gdbarch_init): Likewise.
10333 * sparc-tdep.c (sparc32_gdbarch_init): Likewise.
10334 * tic6x-tdep.c (tic6x_print_insn): Remove.
10335 (tic6x_gdbarch_init): Don't call set_gdbarch_print_insn.
10336 * tilegx-tdep.c (tilegx_gdbarch_init): Likewise.
10337 * v850-tdep.c (v850_gdbarch_init): Likewise.
10338 * vax-tdep.c (vax_gdbarch_init): Likewise.
10339 * xstormy16-tdep.c (xstormy16_gdbarch_init): Likewise.
10340 * xtensa-tdep.c (xtensa_gdbarch_init): Likewise.
10341
10342 2017-05-23 John Baldwin <jhb@FreeBSD.org>
10343
10344 * mips-fbsd-tdep.c (MIPS_PC_REGNUM): Remove.
10345 (MIPS_FP0_REGNUM): Remove.
10346 (MIPS_FSR_REGNUM): Remove.
10347 (mips_fbsd_supply_fpregs): Use mips_regnum.
10348 (mips_fbsd_supply_gregs): Likewise.
10349 (mips_fbsd_collect_fpregs): Likewise.
10350 (mips_fbsd_collect_gregs): Likewise.
10351
10352 2017-05-23 John Baldwin <jhb@FreeBSD.org>
10353
10354 * mips-fbsd-nat.c (getregs_supplies): Fix upper bound comparison.
10355 (getpfpregs_supplies): New function.
10356 (mips_fbsd_fetch_inferior_registers): Remove early exit and use
10357 getfpregs_supplies.
10358 (mips_fbsd_store_inferior_registers): Likewise.
10359
10360 2017-05-22 Pedro Alves <palves@redhat.com>
10361
10362 * MAINTAINERS (Host/Native): Add John Baldwin as FreeBSD
10363 maintainer.
10364
10365 2017-05-22 Alan Hayward <alan.hayward@arm.com>
10366
10367 * ppc-linux-nat.c (fetch_register): Use PPC_MAX_REGISTER_SIZE.
10368 (store_register): Likewise.
10369 * ppc-sysv-tdep.c (ppc_sysv_abi_push_dummy_call): Likewise.
10370 (get_decimal_float_return_value): Likewise.
10371 (do_ppc_sysv_return_value): Likewise.
10372 (ppc64_sysv_abi_push_integer): Likewise.
10373 (ppc64_sysv_abi_push_freg): Likewise.
10374 (ppc64_sysv_abi_return_value_base): Likewise.
10375 (ppc64_sysv_abi_return_value): Likewise.
10376 * rs6000-aix-tdep.c (rs6000_push_dummy_call): Likewise.
10377 * rs6000-lynx178-tdep.c (rs6000_lynx178_push_dummy_call): Likewise.
10378 * rs6000-nat.c: Likewise.
10379 * rs6000-tdep.c (rs6000_register_to_value): Likewise.
10380 (rs6000_value_to_register): Likewise.
10381 * ppc-tdep.h (PPC_MAX_REGISTER_SIZE): Add.
10382
10383 2017-05-21 Tom Tromey <tom@tromey.com>
10384
10385 PR rust/21466:
10386 * rust-lang.c (rust_print_type) <TYPE_CODE_ARRAY>: Print unsized
10387 arrays as "[T]", not "[T; ]".
10388
10389 2017-05-19 Tom Tromey <tom@tromey.com>
10390
10391 PR rust/21484:
10392 * rust-lang.c (exp_descriptor_rust): New function.
10393 (rust_language_defn): Use it.
10394 * p-lang.c (pascal_language_defn): Update.
10395 * opencl-lang.c (opencl_language_defn): Update.
10396 * objc-lang.c (objc_language_defn): Update.
10397 * m2-lang.c (m2_language_defn): Update.
10398 * language.h (struct language_defn)
10399 <la_watch_location_expression>: New member.
10400 * language.c (unknown_language_defn, auto_language_defn)
10401 (local_language_defn): Update.
10402 * go-lang.c (go_language_defn): Update.
10403 * f-lang.c (f_language_defn): Update.
10404 * d-lang.c (d_language_defn): Update.
10405 * c-lang.h (c_watch_location_expression): Declare.
10406 * c-lang.c (c_watch_location_expression): New function.
10407 (c_language_defn, cplus_language_defn, asm_language_defn)
10408 (minimal_language_defn): Use it.
10409 * breakpoint.c (watch_command_1): Call
10410 la_watch_location_expression.
10411 * ada-lang.c (ada_language_defn): Update.
10412
10413 2017-05-19 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
10414
10415 PR tui/21482
10416 * gdb_curses.h (NOMACROS): Define.
10417 (NCURSES_NOMACROS): Define.
10418
10419 2017-05-19 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
10420
10421 PR tui/21482
10422 * tui/tui-windata.c (tui_erase_data_content): Cast last mvwaddstr
10423 arg to char *.
10424 * tui/tui-wingeneral.c (box_win): Likewise.
10425 * tui/tui-winsource.c (tui_erase_source_content): Likewise.
10426 (tui_show_source_line): Likewise.
10427 (tui_show_exec_info_content): Likewise.
10428
10429 2017-05-19 Vladimir Mezentsev <vladimir.mezentsev@oracle.com>
10430
10431 * sparc-tdep.c (sparc_structure_return_p)
10432 (sparc_arg_on_registers_p): New functions.
10433 (sparc32_store_arguments): Use them.
10434 * sparc64-tdep.c (sparc64_16_byte_align_p)
10435 (sparc64_store_floating_fields, sparc64_extract_floating_fields):
10436 Handle TYPE_CODE_ARRAY.
10437
10438 2017-05-17 Yao Qi <yao.qi@linaro.org>
10439
10440 * cli/cli-decode.c (add_alias_cmd): New function.
10441 * command.h (add_alias_cmd): Declare.
10442 * infcmd.c (_initialize_infcmd): Don't call add_com_alias,
10443 instead call add_alias_cmd.
10444
10445 2017-05-17 Pedro Alves <palves@redhat.com>
10446
10447 * Makefile.in (nat_extra_makefile_frag): Rename to ...
10448 (nat_makefile_frag): ... this. All references updated.
10449 * configure.ac: Likewise.
10450 * configure.nat: Likewise. Enhance comments.
10451 * configure: Regenerate.
10452
10453 2017-05-15 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
10454
10455 * procfs.c (procfs_create_inferior): Change prototype to match
10456 definition.
10457
10458 2017-05-13 Eli Zaretskii <eliz@gnu.org>
10459
10460 * tui/tui.c (tui_enable): Cast "unknown" to 'char *' to avoid a
10461 C++ compiler warning.
10462
10463 2017-05-12 Tom Tromey <tom@tromey.com>
10464
10465 PR rust/21483:
10466 * rust-lang.c (rust_evaluate_subexp) <STRUCTOP_STRUCT>: Don't
10467 recurse, just call value_struct_elt directly.
10468
10469 2017-05-12 Tom Tromey <tom@tromey.com>
10470
10471 * rust-lang.c (rust_dump_subexp_body) <STRUCTOP_ANONYMOUS,
10472 OP_RUST_ARRAY>: Fix.
10473
10474 2017-05-12 Tom Tromey <tom@tromey.com>
10475
10476 * rust-lang.c (rust_print_subexp): Replace "return" with "break".
10477
10478 2017-05-09 Yao Qi <yao.qi@linaro.org>
10479
10480 * regcache.c: Include <forward_list>.
10481 (struct regcache_list): Remove.
10482 (current_regcache): Update.
10483 (get_thread_arch_aspace_regcache): Update for std::forward_list.
10484 (regcache_thread_ptid_changed): Likewise.
10485 (registers_changed_ptid): Likewise.
10486 (current_regcache_size): Likewise.
10487
10488 2017-05-09 Yao Qi <yao.qi@linaro.org>
10489
10490 * regcache.c [GDB_SELF_TEST]: Include selftest.h.
10491 (current_regcache_size): New function.
10492 (current_regcache_test): New function.
10493 (_initialize_regcache) [GDB_SELF_TEST]: Register the unit test.
10494
10495 2017-05-08 Alan Hayward <alan.hayward@arm.com>
10496
10497 * mips-tdep.c (mips_o32_return_value): Remove unused buffer.
10498 (print_gp_register_row): Use get_frame_register_value.
10499
10500 2017-05-08 Alan Hayward <alan.hayward@arm.com>
10501
10502 * mips-linux-tdep.c (mips_supply_gregset): Use raw_supply_zeroed.
10503 (mips_supply_fpregset): Likewise.
10504 (mips64_supply_gregset): Likewise.
10505
10506 2017-05-08 Alan Hayward <alan.hayward@arm.com>
10507
10508 * mn10300-linux-tdep.c (am33_supply_gregset_method): Use
10509 regcache->raw_supply_zeroed.
10510
10511 2017-05-06 Sergio Durigan Junior <sergiodj@redhat.com>
10512
10513 * configure.nat: Rearrange 'case' statements to match
10514 host before cpu.
10515
10516 2017-05-06 Sergio Durigan Junior <sergiodj@redhat.com>
10517
10518 * Makefile.in: Remove "@host_makefile_frag@". Add variables
10519 NAT_FILE, NATDEPFILES, NAT_CDEPS, LOADLIBES, MH_CFLAGS, XM_CLIBS,
10520 NAT_GENERATED_FILES, HAVE_NATIVE_GCORE_HOST. Add
10521 "@nat_extra_makefile_frag@".
10522 (Makefile): Remove dependency on "@frags@".
10523 ($(GNULIB_BUILDDIR)/Makefile): Likewise.
10524 (data-directory/Makefile): Likewise.
10525 * config/aarch64/linux.mh: Deleted; moved contents to
10526 "gdb/configure.nat".
10527 * config/alpha/alpha-linux.mh: Likewise.
10528 * config/alpha/nbsd.mh: Likewise.
10529 * config/arm/linux.mh: Likewise.
10530 * config/arm/nbsdelf.mh: Likewise.
10531 * config/i386/cygwin.mh: Likewise.
10532 * config/i386/cygwin64.mh: Likewise.
10533 * config/i386/darwin.mh: Likewise.
10534 * config/i386/fbsd.mh: Likewise.
10535 * config/i386/fbsd64.mh: Likewise.
10536 * config/i386/go32.mh: Likewise.
10537 * config/i386/i386gnu.mh: Likewise.
10538 * config/i386/i386sol2.mh: Likewise.
10539 * config/i386/linux.mh: Likewise.
10540 * config/i386/linux64.mh: Likewise.
10541 * config/i386/mingw.mh: Likewise.
10542 * config/i386/mingw64.mh: Likewise.
10543 * config/i386/nbsd64.mh: Likewise.
10544 * config/i386/nbsdelf.mh: Likewise.
10545 * config/i386/nto.mh: Likewise.
10546 * config/i386/obsd.mh: Likewise.
10547 * config/i386/obsd64.mh: Likewise.
10548 * config/i386/sol2-64.mh: Likewise.
10549 * config/ia64/linux.mh: Likewise.
10550 * config/m32r/linux.mh: Likewise.
10551 * config/m68k/linux.mh: Likewise.
10552 * config/m68k/nbsdelf.mh: Likewise.
10553 * config/m68k/obsd.mh: Likewise.
10554 * config/m88k/obsd.mh: Likewise.
10555 * config/mips/fbsd.mh: Likewise.
10556 * config/mips/linux.mh: Likewise.
10557 * config/mips/nbsd.mh: Likewise.
10558 * config/mips/obsd64.mh: Likewise.
10559 * config/pa/linux.mh: Likewise.
10560 * config/pa/nbsd.mh: Likewise.
10561 * config/pa/obsd.mh: Likewise.
10562 * config/powerpc/aix.mh: Likewise.
10563 * config/powerpc/fbsd.mh: Likewise.
10564 * config/powerpc/linux.mh: Likewise.
10565 * config/powerpc/nbsd.mh: Likewise.
10566 * config/powerpc/obsd.mh: Likewise.
10567 * config/powerpc/ppc64-linux.mh: Likewise.
10568 * config/powerpc/spu-linux.mh: Likewise.
10569 * config/s390/linux.mh: Likewise.
10570 * config/sh/nbsd.mh: Likewise.
10571 * config/sparc/fbsd.mh: Likewise.
10572 * config/sparc/linux.mh: Likewise.
10573 * config/sparc/linux64.mh: Likewise.
10574 * config/sparc/nbsd64.mh: Likewise.
10575 * config/sparc/nbsdelf.mh: Likewise.
10576 * config/sparc/obsd64.mh: Likewise.
10577 * config/sparc/sol2.mh: Likewise.
10578 * config/tilegx/linux.mh: Likewise.
10579 * config/vax/nbsdelf.mh: Likewise.
10580 * config/vax/obsd.mh: Likewise.
10581 * config/xtensa/linux.mh: Likewise.
10582 * config/i386/i386gnu.mn: New file, with excerpts from
10583 "config/i386/i386gnu.mh".
10584 * configure: Regenerate.
10585 * configure.ac: Rewrite code to use "gdb/configure.nat" instead of
10586 *.mh files under "gdb/config".
10587 * configure.nat: New file, with contents from the
10588 "gdb/config/*/*.mh" files.
10589
10590 2017-05-05 Tim Wiederhake <tim.wiederhake@intel.com>
10591
10592 * btrace.c (btrace_clear): Free insn vector.
10593
10594 2017-05-05 Pedro Alves <palves@redhat.com>
10595
10596 * warning.m4 (build_warnings): Add -Wno-error=maybe-uninitialized.
10597 * configure: Regenerate.
10598
10599 2017-05-04 Pedro Alves <palves@redhat.com>
10600
10601 * Makefile.in (SFILES): Add progspace-and-thread.c.
10602 (HFILES_NO_SRCDIR): Add progspace-and-thread.h.
10603 (COMMON_OBS): Add progspace-and-thread.o.
10604 * breakpoint.c: Include "progspace-and-thread.h".
10605 (update_inserted_breakpoint_locations)
10606 (insert_breakpoint_locations, create_longjmp_master_breakpoint):
10607 Use scoped_restore_current_pspace_and_thread.
10608 (create_std_terminate_master_breakpoint): Use
10609 scoped_restore_current_program_space.
10610 (remove_breakpoint): Use scoped_restore_current_pspace_and_thread.
10611 (print_breakpoint_location): Use
10612 scoped_restore_current_program_space.
10613 (bp_loc_is_permanent): Use
10614 scoped_restore_current_pspace_and_thread.
10615 (resolve_sal_pc): Use scoped_restore_current_pspace_and_thread.
10616 (download_tracepoint_locations): Use
10617 scoped_restore_current_pspace_and_thread.
10618 (breakpoint_re_set): Use scoped_restore_current_pspace_and_thread.
10619 * exec.c (exec_close_1): Use scoped_restore_current_program_space.
10620 (enum step_over_calls_kind): Moved from inferior.h.
10621 (class scoped_restore_current_thread): New class.
10622 * gdbthread.h (make_cleanup_restore_current_thread): Delete
10623 declaration.
10624 (scoped_restore_current_thread): New class.
10625 * infcmd.c: Include "common/gdb_optional.h".
10626 (continue_1, proceed_after_attach): Use
10627 scoped_restore_current_thread.
10628 (notice_new_inferior): Use scoped_restore_current_thread.
10629 * inferior.c: Include "progspace-and-thread.h".
10630 (restore_inferior, save_current_inferior): Delete.
10631 (add_inferior_command, clone_inferior_command): Use
10632 scoped_restore_current_pspace_and_thread.
10633 * inferior.h (scoped_restore_current_inferior): New class.
10634 * infrun.c: Include "progspace-and-thread.h" and
10635 "common/gdb_optional.h".
10636 (follow_fork_inferior): Use
10637 scoped_restore_current_pspace_and_thread.
10638 (scoped_restore_exited_inferior): New class.
10639 (handle_vfork_child_exec_or_exit): Use
10640 scoped_restore_exited_inferior,
10641 scoped_restore_current_pspace_and_thread,
10642 scoped_restore_current_thread and scoped_restore.
10643 (fetch_inferior_event): Use scoped_restore_current_thread.
10644 * linespec.c (decode_line_full, decode_line_1): Use
10645 scoped_restore_current_program_space.
10646 * mi/mi-main.c: Include "progspace-and-thread.h".
10647 (exec_continue): Use scoped_restore_current_thread.
10648 (mi_cmd_exec_run): Use scoped_restore_current_pspace_and_thread.
10649 (mi_cmd_trace_frame_collected): Use scoped_restore_current_thread.
10650 * proc-service.c (ps_pglobal_lookup): Use
10651 scoped_restore_current_program_space.
10652 * progspace-and-thread.c: New file.
10653 * progspace-and-thread.h: New file.
10654 * progspace.c (release_program_space, clone_program_space): Use
10655 scoped_restore_current_program_space.
10656 (restore_program_space, save_current_program_space)
10657 (save_current_space_and_thread): Delete.
10658 (switch_to_program_space_and_thread): Moved to
10659 progspace-and-thread.c.
10660 * progspace.h (save_current_program_space)
10661 (save_current_space_and_thread): Delete declarations.
10662 (scoped_restore_current_program_space): New class.
10663 * remote.c (remote_btrace_maybe_reopen): Use
10664 scoped_restore_current_thread.
10665 * symtab.c: Include "progspace-and-thread.h".
10666 (skip_prologue_sal): Use scoped_restore_current_pspace_and_thread.
10667 * thread.c (print_thread_info_1): Use
10668 scoped_restore_current_thread.
10669 (struct current_thread_cleanup): Delete.
10670 (do_restore_current_thread_cleanup)
10671 (restore_current_thread_cleanup_dtor): Rename/convert both to ...
10672 (scoped_restore_current_thread::~scoped_restore_current_thread):
10673 ... this new dtor.
10674 (make_cleanup_restore_current_thread): Rename/convert to ...
10675 (scoped_restore_current_thread::scoped_restore_current_thread):
10676 ... this new ctor.
10677 (thread_apply_all_command): Use scoped_restore_current_thread.
10678 (thread_apply_command): Use scoped_restore_current_thread.
10679 * tracepoint.c (tdump_command): Use scoped_restore_current_thread.
10680 * varobj.c (value_of_root_1): Use scoped_restore_current_thread.
10681
10682 2017-05-04 Pedro Alves <palves@redhat.com>
10683
10684 * thread.c (make_cleanup_restore_current_thread): Move
10685 find_thread_ptid call before the is_stopped call. Assert that the
10686 thread is found. Replace is_stopped call by checking the thread's
10687 state directly. Remove unnecessary NULL-thread check.
10688
10689 2017-05-04 Pedro Alves <palves@redhat.com>
10690
10691 * corelow.c (thread_section_name): New class.
10692 (get_core_register_section, get_core_siginfo): Use it.
10693
10694 2017-05-04 Andreas Arnez <arnez@linux.vnet.ibm.com>
10695
10696 * corelow.c (sniff_core_bfd): Remove extra semicolon.
10697 (get_core_register_section): Remove xfree of NULL pointer.
10698
10699 2017-05-03 Alan Hayward <alan.hayward@arm.com>
10700
10701 * frv-linux-tdep.c (frv_linux_supply_gregset): Use raw_supply_zeroed.
10702 * regcache.c (regcache::raw_supply_zeroed): New function.
10703 * regcache.h (regcache::raw_supply_zeroed): New declaration.
10704
10705 2017-05-03 Simon Marchi <simon.marchi@ericsson.com>
10706
10707 * gdbarch.sh: Remove commented out definition of
10708 TARGET_CHAR_BIT.
10709 * gdbarch.h: Re-generate.
10710
10711 2017-05-03 Sergio Durigan Junior <sergiodj@redhat.com>
10712
10713 * configure: Regenerate.
10714
10715 2017-05-02 Simon Marchi <simon.marchi@ericsson.com>
10716
10717 * solib-target.c (solib_target_relocate_section_addresses):
10718 Remove num_section_bases, num_bases, segment_bases variables.
10719
10720 2017-05-02 Simon Marchi <simon.marchi@polymtl.ca>
10721
10722 * common/gdb_vecs.h (DEF_VEC_I (CORE_ADDR)): Remove.
10723
10724 2017-05-02 Simon Marchi <simon.marchi@polymtl.ca>
10725
10726 * solib-target.c: Include <vector>
10727 (struct lm_info_target) <~lm_info_target>: Remove.
10728 <segment_bases, section_bases>: Change type to
10729 std::vector<CORE_ADDR>.
10730 (library_list_start_segment, library_list_start_section,
10731 library_list_end_library,
10732 solib_target_relocate_section_addresses): Adjust.
10733
10734 2017-05-02 Simon Marchi <simon.marchi@polymtl.ca>
10735
10736 * gdbarch.sh (software_single_step): Change return type to
10737 std::vector<CORE_ADDR>.
10738 * gdbarch.c, gdbarch.h: Re-generate.
10739 * arch/arm-get-next-pcs.c (thumb_deal_with_atomic_sequence_raw):
10740 Adjust.
10741 (arm_deal_with_atomic_sequence_raw): Adjust.
10742 (thumb_get_next_pcs_raw): Adjust.
10743 (arm_get_next_pcs_raw): Adjust.
10744 (arm_get_next_pcs): Adjust.
10745 * arch/arm-get-next-pcs.h (arm_get_next_pcs): Adjust.
10746 * aarch64-tdep.c (aarch64_software_single_step): Adjust.
10747 * alpha-tdep.c (alpha_deal_with_atomic_sequence): Adjust.
10748 (alpha_software_single_step): Adjust.
10749 * alpha-tdep.h (alpha_software_single_step): Adjust.
10750 * arm-linux-tdep.c (arm_linux_software_single_step): Adjust.
10751 * arm-tdep.c (arm_software_single_step): Adjust.
10752 (arm_breakpoint_kind_from_current_state): Adjust.
10753 * arm-tdep.h (arm_software_single_step): Adjust.
10754 * breakpoint.c (insert_single_step_breakpoint): Adjust.
10755 * cris-tdep.c (cris_software_single_step): Adjust.
10756 * mips-tdep.c (mips_deal_with_atomic_sequence): Adjust.
10757 (micromips_deal_with_atomic_sequence): Adjust.
10758 (deal_with_atomic_sequence): Adjust.
10759 (mips_software_single_step): Adjust.
10760 * mips-tdep.h (mips_software_single_step): Adjust.
10761 * moxie-tdep.c (moxie_software_single_step): Adjust.
10762 * nios2-tdep.c (nios2_software_single_step): Adjust.
10763 * ppc-tdep.h (ppc_deal_with_atomic_sequence): Adjust.
10764 * rs6000-aix-tdep.c (rs6000_software_single_step): Adjust.
10765 * rs6000-tdep.c (ppc_deal_with_atomic_sequence): Adjust.
10766 * s390-linux-tdep.c (s390_software_single_step): Adjust.
10767 * sparc-tdep.c (sparc_software_single_step): Adjust.
10768 * spu-tdep.c (spu_software_single_step): Adjust.
10769 * tic6x-tdep.c (tic6x_software_single_step): Adjust.
10770
10771 2017-05-02 Simon Marchi <simon.marchi@polymtl.ca>
10772
10773 * gdbarch.sh: Use semi-colon as field separator instead of colon.
10774 * gdbarch.h: Re-generate.
10775
10776 2017-05-01 Tim Wiederhake <tim.wiederhake@intel.com>
10777
10778 * Makefile.in (SUBDIR_PYTHON_OBS): Add py-instruction.o.
10779 (SUBDIR_PYTHON_SRCS): Add py-instruction.c.
10780 * python/py-instruction.c, python/py-instruction.h: New file.
10781 * python/py-record.c: Add py-instruction.h include.
10782 (gdbpy_initialize_record): Make gdb.Instruction a super class of
10783 gdb.RecordInstruction.
10784 * python/python-internal.h: Add gdbpy_initialize_instruction
10785 declaration.
10786 * python/python.c (do_start_initialization): Add
10787 gdbpy_initialize_instruction.
10788
10789 2017-05-01 Tim Wiederhake <tim.wiederhake@intel.com>
10790
10791 * python/py-record-btrace.c (BTPY_REQUIRE_VALID_CALL, btpy_call_type):
10792 Remove.
10793 (btrace_func_from_recpy_func): New function.
10794 (btpy_call_new, btpy_number, btpy_hash, btpy_richcompare): Remove.
10795 (btpy_call_level, btpy_call_symbol, btpy_call_instructions,
10796 btpy_call_up, btpy_call_prev_sibling, btpy_call_next_sibling): Rename to ...
10797 (recpy_bt_func_level, recpy_bt_func_symbol, recpy_bt_func_instructions,
10798 recpy_bt_func_up, recpy_bt_func_prev, recpy_bt_func_next): This.
10799 Also, use new helper functions.
10800 (btpy_list_item): Use new helper functions.
10801 (recpy_bt_function_call_history): Use new type name.
10802 (btpy_call_getset): Remove.
10803 (gdbpy_initialize_btrace): Remove code to initialize
10804 gdb.BtraceFunctionCall.
10805 * python/py-record-btrace.h (recpy_bt_func_number, recpy_btb_func_level,
10806 recpy_btb_func_symbol, recpy_bt_func_instructions, recpy_bt_func_up,
10807 recpy_bt_func_prev, recpy_bt_func_next): New export.
10808 * python/py-record.c (recpy_func_type): New static object.
10809 (recpy_func_new, recpy_func_level, recpy_func_symbol,
10810 recpy_func_instructions, recpy_func_up, recpy_func_prev,
10811 recpy_func_next): New function.
10812 (recpy_element_hash, recpy_element_richcompare): Updated comment.
10813 (recpy_func_getset): New static object.
10814 (gdbpy_initialize_record): Add code to initialize gdb.RecordInstruction.
10815 * python/py-record.h (recpy_func_type, recpy_func_new): New export.
10816
10817 2017-05-01 Tim Wiederhake <tim.wiederhake@intel.com>
10818
10819 * python/py-record-btrace.c (BTPY_REQUIRE_VALID_INSN): Remove.
10820 (btpy_object, btpy_insn_type, btpy_new): Remove.
10821 (btpy_list_object): Use gdb.RecordInstruction type instead of
10822 gdb.BtraceInstruction type.
10823 (btrace_insn_from_recpy_insn): New function.
10824 (btpy_insn_or_gap_new): Adjust comment. Use recpy_insn_new instead of
10825 btpy_new.
10826 (btpy_call_new, btpy_list_item): Do not use btpy_new anymore.
10827 (btpy_number, btpy_hash, btpy_call_level, btpy_call_symbol,
10828 btpy_call_instructions, btpy_call_up, btpy_call_prev_sibling,
10829 btpy_call_next_sibling, btpy_richcompare): Use recpy_element_object
10830 instead of btpy_object.
10831 (btpy_insn_sal, btpy_insn_pc, btpy_insn_size, btpy_insn_is_speculative,
10832 btpy_insn_data, btpy_insn_decode): Rename to ...
10833 (recpy_bt_insn_sal, recpy_bt_insn_pc, recpy_bt_insn_size,
10834 recpy_bt_insn_is_speculative, recpy_bt_insn_data,
10835 recpy_bt_insn_decode): This. Also, use new helper functions.
10836 (btpy_list_position, recpy_bt_goto): Use recpy_element_object and
10837 recpy_insn_type.
10838 (btpy_insn_getset): Remove.
10839 (gdbpy_initialize_btrace): Remove code to initialize
10840 gdb.BtraceInstruction. Use recpy_element_object.
10841 * python/py-record-btrace.h (recpy_bt_insn_number, recpy_bt_insn_sal,
10842 recpy_bt_insn_pc, recpy_bt_insn_data, recpy_bt_insn_decoded,
10843 recpy_bt_insn_size, recpy_bt_insn_is_speculative): New export.
10844 * python/py-record.c (recpy_insn_type): New static object.
10845 (recpy_insn_new, recpy_insn_sal, recpy_insn_pc, recpy_insn_data,
10846 recpy_insn_decoded, recpy_insn_size, recpy_insn_is_speculative,
10847 recpy_element_number, recpy_element_hash, recpy_element_richcompare):
10848 New function.
10849 (recpy_insn_getset): New static object.
10850 (gdbpy_initialize_record): Initialize gdb.RecordInstruction.
10851 * python/py-record.h (recpy_element_object): New typedef.
10852 (recpy_insn_type, recpy_insn_new): New export.
10853
10854 2017-05-01 Tim Wiederhake <tim.wiederhake@intel.com>
10855
10856 * py-record-btrace.c (btpy_insn_new): Removed.
10857 (btpy_insn_or_gap_new): New function.
10858 (btpy_insn_error): Removed.
10859 (btpy_insn_sal, btpy_insn_pc, btpy_insn_size, btpy_insn_is_speculative,
10860 btpy_insn_data, btpy_insn_decode): Remove code path for gaps.
10861 (recpy_bt_replay_position, recpy_bt_begin, recpy_bt_end): Call
10862 btpy_insn_or_gap_new instead of btpy_insn_new.
10863 (btpy_insn_getset): Remove btpy_insn_error.
10864 * py-record.c (recpy_gap_type): New static object.
10865 (recpy_gap_object): New typedef.
10866 (recpy_gap_new, recpy_gap_number, recpy_gap_reason_code,
10867 recpy_gap_reason_string): New function.
10868 (recpy_gap_getset): New static object.
10869 (gdbpy_initialize_record): Initialize gdb.RecordGap type.
10870 * py-record.h (recpy_gap_new): New export.
10871
10872 2017-05-01 Tim Wiederhake <tim.wiederhake@intel.com>
10873
10874 * python/py-record.c (recpy_ptid): Remove.
10875 (recpy_record_getset): Remove recpy_ptid.
10876
10877 2017-05-01 Tim Wiederhake <tim.wiederhake@intel.com>
10878
10879 * btrace.c (btrace_fetch): Set inferior_ptid.
10880 * python/py-record-btrace.c: Add "py-record.h" include.
10881 (recpy_bt_format, recpy_bt_replay_position, recpy_bt_begin,
10882 recpy_bt_end, recpy_bt_instruction_history,
10883 recpy_bt_function_call_history, recpy_bt_goto): Use ptid stored
10884 in gdb.Record object instead of current ptid.
10885 * python/py-record.c: Include new "py-record.h" file.
10886 (recpy_record_object): Moved to py-record.h.
10887 * python/py-record.h: New file.
10888
10889 2017-05-01 Tim Wiederhake <tim.wiederhake@intel.com>
10890
10891 * python/py-record-btrace.c (BTPY_REQUIRE_VALID_INSN,
10892 BTPY_REQUIRE_VALID_CALL, recpy_bt_function_call_history): Fix
10893 indentation.
10894
10895 2017-05-01 Joel Brobecker <brobecker@adacore.com>
10896
10897 * MAINTAINERS: Move Daniel Jacobowitz and Mark Kettenis to
10898 the past maintainers section.
10899
10900 2017-04-28 Yao Qi <yao.qi@linaro.org>
10901
10902 * infcmd.c (get_return_value): Use regcache ctor, and remove
10903 cleanup.
10904
10905 2017-04-28 Yao Qi <yao.qi@linaro.org>
10906 Pedro Alves <palves@redhat.com>
10907
10908 * regcache.c (regcache::regcache): New tag dispatch ctor.
10909 (do_cooked_read): Moved above.
10910 (regcache_dup): Use the tag dispatch ctor..
10911 * regcache.h (regcache): Declare ctor, delete copy ctor and
10912 assignment operator, remove friend regcache_dup.
10913
10914 2017-04-28 Yao Qi <yao.qi@linaro.org>
10915
10916 * regcache.c (regcache_dup): Assert !src->m_readonly_p and
10917 call method save instead of regcache_cpy.
10918 * regcache.h (struct regcache): Make regcache_dup a friend.
10919
10920 2017-04-28 Yao Qi <yao.qi@linaro.org>
10921
10922 * regcache.c (struct regcache): Move to regcache.h
10923 (regcache::arch): New method.
10924 (regcache_get_ptid): Update.
10925 (get_regcache_arch): Call arch method.
10926 (get_regcache_aspace): Call method aspace.
10927 (register_buffer): Change it to method.
10928 (regcache_save): Change it to regcache::save.
10929 (regcache_restore): Likewise.
10930 (regcache_cpy_no_passthrough): Remove the declaration.
10931 (regcache_cpy): Call methods restore and cpy_no_passthrough.
10932 (regcache_cpy_no_passthrough): Change it to method
10933 cpy_no_passthrough.
10934 (regcache_register_status): Change it to method
10935 get_register_status.
10936 (regcache_invalidate): Change it to method invalidate.
10937 (regcache_thread_ptid_changed): Use methods ptid and set_ptid.
10938 (regcache_raw_update): Change it to method raw_update.
10939 (regcache_raw_read): Likewise.
10940 (regcache_raw_read_signed): Likewise.
10941 (regcache_raw_read_unsigned): Likewise.
10942 (regcache_raw_write_signed): Likewise.
10943 (regcache_raw_write_unsigned): Likewise.
10944 (regcache_cooked_read): Likewise.
10945 (regcache_cooked_read_value): Likewise.
10946 (regcache_cooked_read_signed): Likewise.
10947 (regcache_cooked_read_unsigned): Likewise.
10948 (regcache_cooked_write_signed): Likewise.
10949 (regcache_cooked_write_unsigned): Likewise.
10950 (regcache_raw_set_cached_value): Likewise.
10951 (regcache_raw_write): Likewise.
10952 (regcache_cooked_write): Likewise.
10953 (regcache_xfer_part): Likewise.
10954 (regcache_raw_read_part): Likewise.
10955 (regcache_raw_write_part): Likewise.
10956 (regcache_cooked_read_part): Likewise.
10957 (regcache_cooked_write_part): Likewise.
10958 (regcache_raw_supply): Likewise.
10959 (regcache_raw_collect): Likewise.
10960 (regcache_transfer_regset): Likewise.
10961 (regcache_supply_regset): Likewise.
10962 (regcache_collect_regset): Likewise.
10963 (regcache_debug_print_register): Likewise.
10964 (enum regcache_dump_what): Move it to regcache.h.
10965 (regcache_dump): Change it to method dump.
10966 * regcache.h (enum regcache_dump_what): New.
10967 (class regcache): New.
10968 * target.c (target_fetch_registers): Call method
10969 debug_print_register.
10970 (target_store_registers): Likewise.
10971
10972 2017-04-28 Simon Marchi <simon.marchi@ericsson.com>
10973
10974 * windows-nat.c (struct lm_info_windows): Initialize field.
10975 (windows_make_so): Allocate lm_info_windows with new.
10976 (windows_free_so): Free lm_info_windows with delete.
10977
10978 2017-04-28 Simon Marchi <simon.marchi@ericsson.com>
10979
10980 * solib-darwin.c (struct lm_info_darwin): Initialize field.
10981 (darwin_current_sos): Allocate lm_info_darwin with new, remove
10982 cleanup.
10983 (darwin_free_so): Free lm_info_darwin with delete.
10984
10985 2017-04-28 Simon Marchi <simon.marchi@ericsson.com>
10986
10987 * solib-svr4.h (struct lm_info_svr4): Initialize fields.
10988 <l_addr_p>: Change type to bool.
10989 * solib-svr4.c (lm_info_read): Allocate lm_info_svr4 with new.
10990 (svr4_free_so): Free lm_info_svr4 with delete.
10991 (svr4_copy_library_list): Replace memcpy with call to copy
10992 constructor.
10993 (library_list_start_library, svr4_default_sos): Allocate
10994 lm_info_svr4 with new.
10995
10996 2017-04-28 Simon Marchi <simon.marchi@ericsson.com>
10997
10998 * solib-target.c (struct lm_info_target): Add destructor,
10999 initialize fields.
11000 <name>: Change type to std::string.
11001 (library_list_start_library): Allocate lm_info_target with new.
11002 (solib_target_free_library_list): Free lm_info_target with
11003 delete.
11004 (solib_target_current_sos): Adapt to std::string.
11005 (solib_target_free_so): Free lm_info_target with delete.
11006
11007 2017-04-28 Simon Marchi <simon.marchi@ericsson.com>
11008
11009 * solib-frv.c (struct lm_info_frv): Add destructor, initialize
11010 fields.
11011 (frv_current_sos): Allocate lm_info_frv with new.
11012 (frv_relocate_main_executable): Free lm_info_frv with delete,
11013 allocate with new.
11014 (frv_clear_solib, frv_free_so): Free lm_info_frv with delete.
11015
11016 2017-04-28 Simon Marchi <simon.marchi@ericsson.com>
11017
11018 * solib-frv.c (struct lm_info_frv): Fix indentation.
11019
11020 2017-04-28 Simon Marchi <simon.marchi@ericsson.com>
11021
11022 * solib-dsbt.c (struct lm_info_dsbt): Add destructor, initialize
11023 map field.
11024 (dsbt_current_sos): Allocate lm_info_dsbt with new.
11025 (dsbt_relocate_main_executable): Free lm_info_dsbt with delete
11026 and allocate with new.
11027 (dsbt_clear_solib, dsbt_free_so): Free lm_info_dsbt with delete.
11028
11029 2017-04-28 Simon Marchi <simon.marchi@ericsson.com>
11030
11031 * solib-aix.c (struct lm_info_aix): Initialize fields in-class.
11032 <filename, member_name>: Change type to std::string.
11033 (solib_aix_new_lm_info, solib_aix_xfree_lm_info): Remove.
11034 (library_list_start_library): Allocate lm_info_aix with new.
11035 (solib_aix_free_library_list, solib_aix_free_so): Free with delete.
11036 (solib_aix_current_sos): Adapt to std::string, copy lm_info_aix
11037 with copy constructor.
11038
11039 2017-04-28 Simon Marchi <simon.marchi@ericsson.com>
11040
11041 * solist.h (struct lm_info): Remove.
11042 (struct lm_info_base): New class.
11043 (struct so_list) <lm_info>: Change type to lm_info_base *.
11044 * nto-tdep.c (struct lm_info): Remove.
11045 (lm_addr): Adjust.
11046 * solib-aix.c (struct lm_info): Rename to ...
11047 (struct lm_info_aix): ... this. Extend lm_info_base.
11048 (lm_info_p): Rename to ...
11049 (lm_info_aix_p): ... this, and adjust.
11050 (solib_aix_new_lm_info, solib_aix_xfree_lm_info,
11051 solib_aix_parse_libraries, library_list_start_library,
11052 solib_aix_free_library_list, solib_aix_parse_libraries,
11053 solib_aix_get_library_list,
11054 solib_aix_relocate_section_addresses, solib_aix_free_so,
11055 solib_aix_get_section_offsets,
11056 solib_aix_solib_create_inferior_hook, solib_aix_current_sos):
11057 Adjust.
11058 (struct solib_aix_inferior_data) <library_list>: Adjust.
11059 * solib-darwin.c (struct lm_info): Rename to ...
11060 (struct lm_info_darwin): ... this. Extend lm_info_base.
11061 (darwin_current_sos, darwin_relocate_section_addresses): Adjust.
11062 * solib-dsbt.c (struct lm_info): Rename to ...
11063 (struct lm_info_dsbt): ... this. Extend lm_info_base.
11064 (struct dsbt_info) <main_executable_lm_info): Adjust.
11065 (dsbt_current_sos, dsbt_relocate_main_executable, dsbt_free_so,
11066 dsbt_relocate_section_addresses): Adjust.
11067 * solib-frv.c (struct lm_info): Rename to ...
11068 (struct lm_info_frv): ... this. Extend lm_info_base.
11069 (main_executable_lm_info): Adjust.
11070 (frv_current_sos, frv_relocate_main_executable, frv_free_so,
11071 frv_relocate_section_addresses, frv_fdpic_find_global_pointer,
11072 find_canonical_descriptor_in_load_object,
11073 frv_fdpic_find_canonical_descriptor): Adjust.
11074 * solib-svr4.c (struct lm_info): Move to solib-svr4.h, renamed
11075 to lm_info_svr4.
11076 (lm_info_read, lm_addr_check, svr4_keep_data_in_core,
11077 svr4_clear_so, svr4_copy_library_list,
11078 library_list_start_library, svr4_default_sos, svr4_read_so_list,
11079 svr4_current_sos, svr4_fetch_objfile_link_map,
11080 solist_update_incremental): Adjust.
11081 * solib-svr4.h (struct lm_info_svr4): Move here from
11082 solib-svr4.c.
11083 * solib-target.c (struct lm_info): Rename to ...
11084 (struct lm_info_target): ... this. Extend lm_info_base.
11085 (lm_info_p): Rename to ...
11086 (lm_info_target_p): ... this.
11087 (solib_target_parse_libraries, library_list_start_segment,
11088 library_list_start_section, library_list_start_library,
11089 library_list_end_library, solib_target_free_library_list,
11090 solib_target_current_sos, solib_target_free_so,
11091 solib_target_relocate_section_addresses): Adjust.
11092 * windows-nat.c (struct lm_info): Rename to ...
11093 (struct lm_info_windows): ... this. Extend lm_info_base.
11094 (windows_make_so, handle_load_dll, handle_unload_dll,
11095 windows_xfer_shared_libraries): Adjust.
11096
11097 2017-04-28 Simon Marchi <simon.marchi@ericsson.com>
11098
11099 * solib-darwin.c (struct darwin_so_list): Remove.
11100 (darwin_current_sos): Allocate an so_list object instead of a
11101 darwin_so_list, separately allocate an lm_info object.
11102 (darwin_free_so): Free lm_info.
11103
11104 2017-04-28 John Baldwin <jhb@FreeBSD.org>
11105
11106 * mips-tdep.c (print_gp_register_row): Replace printf_filtered
11107 with fprintf_filtered.
11108
11109 2017-04-28 Yao Qi <yao.qi@linaro.org>
11110
11111 * regcache.c (regcache::regcache): New function.
11112 (regcache::~regcache): New function.
11113 (regcache_xmalloc_1): Remove.
11114 (regcache_xmalloc): Call new regcache.
11115 (regcache_xfree): Call delete regcache.
11116 (get_thread_arch_aspace_regcache): Call new regcache.
11117
11118 2017-04-28 Yao Qi <yao.qi@linaro.org>
11119
11120 * mips-linux-nat.c (mips_linux_new_thread): Use ptid method
11121 lwp instead of ptid_get_lwp.
11122
11123 2017-04-28 Yao Qi <yao.qi@linaro.org>
11124
11125 * mips-linux-nat.c (mips_linux_new_thread): Get lwpid from
11126 lwp_info instead of getting from inferior_ptid.
11127
11128 2017-04-27 Keith Seitz <keiths@redhat.com>
11129
11130 * gdbtypes.c (LVALUE_REFERENCE_TO_RVALUE_BINDING_BADNESS)
11131 DIFFERENT_REFERENCE_TYPE_BADNESS): Remove.
11132 (CV_CONVERSION_BADNESS): Define.
11133 (rank_one_type): Remove overly restrictive rvalue reference
11134 rank checks.
11135 Add cv-qualifier checks and subranks for type equality.
11136 * gdbtypes.h (REFERENCE_CONVERSION_RVALUE,
11137 REFERENCE_CONVERSION_CONST_LVALUE, CV_CONVERSION_BADNESS,
11138 CV_CONVERSION_CONST, CV_CONVERSION_VOLATILE): Declare.
11139
11140 2017-04-27 Simon Marchi <simon.marchi@ericsson.com>
11141
11142 * python/py-inferior.c (inferior_to_inferior_object): Increment reference
11143 count when creating the object.
11144
11145 2017-04-27 Sangamesh Mallayya <sangamesh.swamy@in.ibm.com>
11146 Ulrich Weigand <uweigand@de.ibm.com>
11147
11148 * xcoffread.c (read_xcoff_symtab): Read correct function auxiliary
11149 entry if xlc -qfuncsect or gcc -ffunction-sections compiler option
11150 is used in AIX.
11151 (read_xcoff_symtab): Handle C_WEAKEXT storage class.
11152 (process_xcoff_symbol): Likewise.
11153 (scan_xcoff_symtab): Likewise.
11154
11155 2017-04-26 Alan Hayward <alan.hayward@arm.com>
11156
11157 * ia64-tdep.c (examine_prologue): Use get_frame_register_unsigned.
11158 (ia64_sigtramp_frame_prev_register): Use read_memory_unsigned_integer.
11159 (ia64_access_reg): Use get_frame_register_unsigned.
11160 (ia64_access_rse_reg): Likewise.
11161 (ia64_libunwind_frame_prev_register): Likewise.
11162
11163 2017-04-26 Jiong Wang <jiong.wang@arm.com>
11164
11165 * gdbarch.sh: New gdbarch method execute_dwarf_cfa_vendor_op.
11166 * gdbarch.c: Regenerated.
11167 * gdbarch.h: Regenerated.
11168 * dwarf2-frame.c (dwarf2_frame_state_alloc_regs): Made the
11169 visibility external.
11170 (execute_cfa_program): Call execute_dwarf_cfa_vendor_op for CFI
11171 between DW_CFA_lo_user and DW_CFA_high_user inclusive.
11172 (enum cfa_how_kind): Move to ...
11173 (struct dwarf2_frame_state_reg_info): Likewise.
11174 (struct dwarf2_frame_state): Likewise.
11175 * dwarf2-frame.h: ... here.
11176 (dwarf2_frame_state_alloc_regs): New declaration.
11177 * sparc-tdep.c (sparc_execute_dwarf_cfa_vendor_op): New function.
11178 (sparc32_gdbarch_init): Register execute_dwarf_cfa_vendor_op hook.
11179
11180 2017-04-26 Alan Hayward <alan.hayward@arm.com>
11181
11182 * xtensa-tdep.c (xtensa_pseudo_register_read): Use
11183 regcache_raw_read_unsigned.
11184 (xtensa_pseudo_register_write): Likewise.
11185
11186 2017-04-26 Alan Hayward <alan.hayward@arm.com>
11187
11188 * nds32-tdep.c (nds32_pseudo_register_read): Abort on errors.
11189 (nds32_pseudo_register_write): Likewise.
11190
11191 2017-04-25 Yao Qi <yao.qi@linaro.org>
11192
11193 * regcache.c (struct regcache) <readonly_p>: Change its type
11194 to bool.
11195 (regcache_xmalloc_1): Update parameter type and callers update.
11196
11197 2017-04-25 Yao Qi <yao.qi@linaro.org>
11198
11199 * aarch64-tdep.c (aarch64_gdbarch_init): Don't call
11200 set_gdbarch_wchar_bit.
11201 * arm-tdep.c (arm_gdbarch_init): Likewise.
11202
11203 2017-04-25 Pedro Alves <palves@redhat.com>
11204
11205 * common/poison.h [!HAVE_IS_TRIVIALLY_COPYABLE] (IsRelocatable)
11206 (BothAreRelocatable, memcopy, memmove): Don't define.
11207 * common/traits.h (__has_feature, HAVE_IS_TRIVIALLY_COPYABLE): New
11208 macros.
11209
11210 2017-04-25 Pedro Alves <palves@redhat.com>
11211
11212 * common/common-defs.h: Include "common/poison.h".
11213 * common/function-view.h: (Not, Or, Requires): Move to traits.h
11214 and adjust.
11215 * common/poison.h: New file.
11216 * common/traits.h: Include <type_traits>.
11217 (Not, Or, Requires): New, moved from common/function-view.h.
11218
11219 2017-04-25 Pedro Alves <palves@redhat.com>
11220
11221 * breakpoint.h (struct breakpoint): In-class initialize all
11222 fields. Make boolean fields "bool".
11223 * breakpoint.c (init_raw_breakpoint_without_location): Remove
11224 memset call and initializations no longer necessary.
11225
11226 2017-04-25 Pedro Alves <palves@redhat.com>
11227
11228 * btrace.c (pt_btrace_insn_flags): Change parameter type to
11229 reference.
11230 (pt_btrace_insn): New function.
11231 (ftrace_add_pt): Remove memset call and use pt_btrace_insn.
11232
11233 2017-04-25 Pedro Alves <palves@redhat.com>
11234
11235 * ada-lang.c (ada_catchpoint_location): Now a "class". Remove
11236 "base" field and inherit from "bp_location" instead. Add
11237 non-default ctor.
11238 (allocate_location_exception): Use new non-default ctor.
11239 * breakpoint.c (get_first_locp_gte_addr): Remove memset call.
11240 (init_bp_location): Convert to ...
11241 (bp_location::bp_location): ... this new ctor, and remove memset
11242 call.
11243 (base_breakpoint_allocate_location): Use the new non-default ctor.
11244 * breakpoint.h (bp_location): Now a class. Declare default and
11245 non-default ctors. In-class initialize all members.
11246 (init_bp_location): Remove declaration.
11247
11248 2017-04-25 Pedro Alves <palves@redhat.com>
11249
11250 * common/enum-flags.h (enum_flags): Don't implement copy ctor and
11251 assignment operator.
11252
11253 2017-04-24 Yao Qi <yao.qi@linaro.org>
11254
11255 * doublest.c (convert_doublest_to_floatformat): Call
11256 floatformat_totalsize_bytes.
11257
11258 2017-04-22 Tom Tromey <tom@tromey.com>
11259
11260 * mi/mi-cmd-file.c (mi_cmd_file_list_shared_libraries): Use
11261 ui_out_emit_list.
11262 * stack.c (print_frame): Use ui_out_emit_list.
11263 * mi/mi-symbol-cmds.c (mi_cmd_symbol_list_lines): Use
11264 ui_out_emit_list.
11265 * mi/mi-main.c (print_one_inferior)
11266 (mi_cmd_data_list_register_names)
11267 (mi_cmd_data_list_register_values, mi_cmd_list_features)
11268 (mi_cmd_list_target_features, mi_cmd_trace_frame_collected): Use
11269 ui_out_emit_list.
11270 * mi/mi-interp.c (mi_on_normal_stop_1): Use ui_out_emit_list.
11271 (mi_output_solib_attribs): Use ui_out_emit_list,
11272 ui_out_emit_tuple.
11273 * mi/mi-cmd-var.c (varobj_update_one): Use ui_out_emit_list.
11274 * mi/mi-cmd-stack.c (mi_cmd_stack_list_frames)
11275 (mi_cmd_stack_list_args, list_args_or_locals): Use
11276 ui_out_emit_list.
11277 * disasm.c (do_assembly_only): Use ui_out_emit_list.
11278 * breakpoint.c (print_solib_event, output_thread_groups): Use
11279 ui_out_emit_list.
11280
11281 2017-04-22 Tom Tromey <tom@tromey.com>
11282
11283 * mi/mi-main.c (print_variable_or_computed): Use ui_out_emit_tuple.
11284 * mi/mi-cmd-var.c (varobj_update_one): Use ui_out_emit_tuple.
11285 * mi/mi-cmd-stack.c (list_arg_or_local): Use ui_out_emit_tuple.
11286
11287 2017-04-22 Tom Tromey <tom@tromey.com>
11288
11289 * tracepoint.c (tvariables_info_1)
11290 (print_one_static_tracepoint_marker): Use ui_out_emit_tuple.
11291
11292 2017-04-22 Tom Tromey <tom@tromey.com>
11293
11294 * stack.c (print_frame_arg): Use ui_out_emit_tuple,
11295 annotate_arg_emitter.
11296 * breakpoint.c (print_mention_watchpoint)
11297 (print_mention_masked_watchpoint): Use ui_out_emit_tuple.
11298 * annotate.h (struct annotate_arg_emitter): New.
11299
11300 2017-04-22 Tom Tromey <tom@tromey.com>
11301
11302 * record-btrace.c (record_btrace_insn_history)
11303 (record_btrace_insn_history_range, record_btrace_call_history)
11304 (record_btrace_call_history_range): Use ui_out_emit_tuple.
11305 * thread.c (do_captured_list_thread_ids, print_thread_info_1): Use
11306 ui_out_emit_tuple.
11307 * stack.c (print_frame_info): Use ui_out_emit_tuple.
11308 * solib.c (info_sharedlibrary_command): Use ui_out_emit_tuple.
11309 * skip.c (skip_info): Use ui_out_emit_tuple.
11310 * remote.c (show_remote_cmd): Use ui_out_emit_tuple.
11311 * progspace.c (print_program_space): Use ui_out_emit_tuple.
11312 * probe.c (info_probes_for_ops): Use ui_out_emit_tuple.
11313 * osdata.c (info_osdata): Use ui_out_emit_tuple.
11314 * mi/mi-symbol-cmds.c (mi_cmd_symbol_list_lines): Use
11315 ui_out_emit_tuple.
11316 * mi/mi-main.c (print_one_inferior, list_available_thread_groups)
11317 (output_register, mi_cmd_data_read_memory)
11318 (mi_cmd_data_read_memory_bytes, mi_load_progress)
11319 (mi_cmd_trace_frame_collected): Use ui_out_emit_tuple.
11320 * mi/mi-cmd-var.c (mi_cmd_var_list_children, varobj_update_one):
11321 Use ui_out_emit_tuple.
11322 * mi/mi-cmd-stack.c (mi_cmd_stack_list_args): Use
11323 ui_out_emit_tuple.
11324 * mi/mi-cmd-info.c (mi_cmd_info_ada_exceptions)
11325 (mi_cmd_info_gdb_mi_command): Use ui_out_emit_tuple.
11326 * linux-thread-db.c (info_auto_load_libthread_db): Use
11327 ui_out_emit_tuple.
11328 * inferior.c (print_inferior): Use ui_out_emit_tuple.
11329 * gdb_bfd.c (print_one_bfd): Use ui_out_emit_tuple.
11330 * disasm.c (do_mixed_source_and_assembly_deprecated)
11331 (do_mixed_source_and_assembly): Use ui_out_emit_tuple.
11332 * cp-abi.c (list_cp_abis): Use ui_out_emit_tuple.
11333 * cli/cli-setshow.c (cmd_show_list): Use ui_out_emit_tuple.
11334 * breakpoint.c (print_one_breakpoint_location)
11335 (print_one_breakpoint): Use ui_out_emit_tuple.
11336 * auto-load.c (print_script, info_auto_load_cmd): Use
11337 ui_out_emit_tuple.
11338 * ada-tasks.c (print_ada_task_info): Use ui_out_emit_tuple.
11339
11340 2017-04-21 Simon Marchi <simon.marchi@ericsson.com>
11341
11342 * thread.c (print_thread_info_1): Remove dead code.
11343
11344 2017-04-21 Jan Kratochvil <jan.kratochvil@redhat.com>
11345
11346 * aarch64-tdep.c (selftests::aarch64_process_record_test): Make it #if
11347 GDB_SELF_TEST.
11348 * arm-tdep.c (selftests::arm_record_test): Likewise.
11349
11350 2017-04-21 Yao Qi <yao.qi@linaro.org>
11351
11352 * regcache.c (regcache_restore): Remove argument 2. Replace
11353 argument 3 with regcache. Get register status from
11354 src->register_status and get register contents from
11355 register_buffer (src, regnum).
11356 (regcache_cpy): Update.
11357
11358 2017-04-19 Pedro Alves <palves@redhat.com>
11359
11360 * gdbthread.h (thread): Add missing closing parenthesis in
11361 comment.
11362
11363 2017-04-19 Pedro Alves <palves@redhat.com>
11364
11365 * common/refcounted-object.h: New file.
11366 * gdbthread.h: Include "common/refcounted-object.h".
11367 (thread_info): Inherit from refcounted_object and add comments.
11368 (thread_info::incref, thread_info::decref)
11369 (thread_info::m_refcount): Delete.
11370 (thread_info::deletable): Use the refcounted_object::refcount()
11371 method.
11372 * inferior.c (current_inferior_): Add comment.
11373 (set_current_inferior): Increment/decrement refcounts.
11374 (prune_inferiors, remove_inferior_command): Skip inferiors marked
11375 not-deletable instead of comparing with the current inferior.
11376 (initialize_inferiors): Increment the initial inferior's refcount.
11377 * inferior.h (struct inferior): Forward declare.
11378 Include "common/refcounted-object.h".
11379 (current_inferior, set_current_inferior): Move declaration to
11380 before struct inferior's definition, and fix comment.
11381 (inferior): Inherit from refcounted_object. Add comments.
11382 * thread.c (switch_to_thread_no_regs): Reference the thread's
11383 inferior pointer directly instead of doing a ptid lookup.
11384 (switch_to_no_thread): New function.
11385 (switch_to_thread(thread_info *)): New function, factored out
11386 from ...
11387 (switch_to_thread(ptid_t)): ... this.
11388 (restore_current_thread): Delete.
11389 (current_thread_cleanup): Remove 'inf_id' and 'was_removable'
11390 fields, and add 'inf' field.
11391 (do_restore_current_thread_cleanup): Check whether old->inf is
11392 alive instead of looking up an inferior by ptid. Use
11393 switch_to_thread and switch_to_no_thread.
11394 (restore_current_thread_cleanup_dtor): Use old->inf directly
11395 instead of lookup up an inferior by id. Decref the inferior.
11396 Don't restore 'removable'.
11397 (make_cleanup_restore_current_thread): Same the inferior pointer
11398 in old, instead of the inferior number. Incref the inferior.
11399 Don't save/clear 'removable'.
11400
11401 2017-04-19 Pedro Alves <palves@redhat.com>
11402
11403 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
11404 unittests/scoped_restore-selftests.c.
11405 (SUBDIR_UNITTESTS_OBS): Add scoped_restore-selftests.o.
11406 * common/scoped_restore.h (scoped_restore_base): Make "class".
11407 (scoped_restore_base::release): New public method.
11408 (scoped_restore_base::scoped_restore_base): New protected ctor.
11409 (scoped_restore_base::m_saved_var): New protected field.
11410 (scoped_restore_tmpl::scoped_restore_tmpl(T*)): Initialize the
11411 scoped_restore_base base class instead of m_saved_var directly.
11412 (scoped_restore_tmpl::scoped_restore_tmpl(T*, T2)): Likewise.
11413 (scoped_restore_tmpl::scoped_restore_tmpl(const
11414 scoped_restore_tmpl<T>&)): Likewise.
11415 (scoped_restore_tmpl::~scoped_restore_tmpl): Use the saved_var
11416 method.
11417 (scoped_restore_tmpl::saved_var): New method.
11418 (scoped_restore_tmpl::m_saved_var): Delete.
11419 * inferior.h (inferior::detaching): Now a bool.
11420 * infrun.c (prepare_for_detach): Use a scoped_restore instead of a
11421 cleanup.
11422 * unittests/scoped_restore-selftests.c: New file.
11423
11424 2017-04-19 Pedro Alves <palves@redhat.com>
11425
11426 * Makefile.in (SUBDIR_UNITTESTS_SRCS, SUBDIR_UNITTESTS_OBS):
11427 Re-sort in alphabetic order.
11428
11429 2017-04-18 Pedro Alves <palves@redhat.com>
11430
11431 * xml-support.c (obstack_xml_printf): Delete.
11432 * xml-support.h (obstack_xml_printf): Delete.
11433
11434 2017-04-18 Pedro Alves <palves@redhat.com>
11435
11436 * xml-support.c (gdb_xml_parser) <use_dtd, dtd_name, parse,
11437 vdebug, verror, body_text, start_element, end_element, name,
11438 user_data, set_is_xinclude, set_error, expat_parser>: New methods.
11439 <name, user_data, expat_parser, scopes, error, last_line, dtd_name,
11440 is_xinclude>: Make private and add m_ prefix.
11441 (gdb_xml_parser::body_text): New method, based on ...
11442 (gdb_xml_body_text): ... this. Adjust.
11443 (gdb_xml_parser::vdebug): New method, based on ...
11444 (gdb_xml_debug): ... this. Adjust.
11445 (gdb_xml_parser::verror): New method, based on ...
11446 (gdb_xml_error): ... this. Adjust.
11447 (gdb_xml_parser::start_element): New method, based on ...
11448 (gdb_xml_start_element): ... this. Adjust.
11449 (gdb_xml_start_element_wrapper): Defer to
11450 gdb_xml_parser::start_element and gdb_xml_parser::set_error.
11451 (gdb_xml_parser::end_element): New method, based on ...
11452 (gdb_xml_end_element_wrapper): ... this. Adjust.
11453 (gdb_xml_parser::~gdb_xml_parser): Adjust.
11454 (gdb_xml_parser::gdb_xml_parser): Adjust to field renames.
11455 (gdb_xml_parser::use_dtd): New method, based on ...
11456 (gdb_xml_use_dtd): ... this. Adjust.
11457 (gdb_xml_parser::parse): New method, based on ...
11458 (gdb_xml_parse): ... this. Adjust.
11459 (gdb_xml_parse_quick): Adjust to call the parser's parse method.
11460 (xinclude_start_include): Adjust to call the parser's name method.
11461 (xml_xinclude_default, xml_xinclude_start_doctype)
11462 (xml_xinclude_end_doctype): Adjust to call the parser's user_data
11463 method.
11464 (xml_process_xincludes): Adjust to call parser methods.
11465 * xml-support.h (gdb_xml_use_dtd, gdb_xml_parse): Delete
11466 declarations.
11467
11468 2017-04-18 Pedro Alves <palves@redhat.com>
11469
11470 * tracefile-tfile.c (tfile_write_tdesc): Adjust to use
11471 gdb::optional<std::string>.
11472 * xml-support.c: Include <string>.
11473 (scope_level::scope_level(scope_level &&))
11474 (scope_level::~scope_level): Delete.
11475 (scope_level::body): Now a std::string.
11476 (gdb_xml_body_text, gdb_xml_end_element): Adjust.
11477 (xinclude_parsing_data::xinclude_parsing_data): Add 'output'
11478 parameter.
11479 (xinclude_parsing_data::~xinclude_parsing_data): Delete.
11480 (xinclude_parsing_data::output): Now a std::string reference.
11481 (xinclude_start_include): Adjust.
11482 (xml_xinclude_default): Adjust.
11483 (xml_process_xincludes): Add 'output' parameter, and return bool.
11484 * xml-support.h (xml_process_xincludes): Add 'output' parameter,
11485 and return bool.
11486 * xml-tdesc.c: Include <unordered_map> and <string>.
11487 (tdesc_xml_cache): Delete.
11488 (tdesc_xml_cache_s): Delete.
11489 (xml_cache): Now an std::unordered_map.
11490 (tdesc_parse_xml): Adjust to use std::string and unordered_map.
11491 (target_fetch_description_xml): Change return type to
11492 gdb::optional<std::string>, and adjust.
11493 * xml-tdesc.h: Include "common/gdb_optional.h" and <string>.
11494 (target_fetch_description_xml): Change return type to
11495 gdb::optional<std::string>.
11496
11497 2017-04-18 Pedro Alves <palves@redhat.com>
11498
11499 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
11500 unittests/optional-selftests.c.
11501 (SUBDIR_UNITTESTS_OBS): Add optional-selftests.o.
11502 * unittests/optional-selftests.c: New file.
11503 * unittests/optional/assignment/1.cc: New file.
11504 * unittests/optional/assignment/2.cc: New file.
11505 * unittests/optional/assignment/3.cc: New file.
11506 * unittests/optional/assignment/4.cc: New file.
11507 * unittests/optional/assignment/5.cc: New file.
11508 * unittests/optional/assignment/6.cc: New file.
11509 * unittests/optional/assignment/7.cc: New file.
11510 * unittests/optional/cons/copy.cc: New file.
11511 * unittests/optional/cons/default.cc: New file.
11512 * unittests/optional/cons/move.cc: New file.
11513 * unittests/optional/cons/value.cc: New file.
11514 * unittests/optional/in_place.cc: New file.
11515 * unittests/optional/observers/1.cc: New file.
11516 * unittests/optional/observers/2.cc: New file.
11517
11518 2017-04-18 Pedro Alves <palves@redhat.com>
11519
11520 * common/gdb_optional.h: Include common/traits.h.
11521 (in_place_t): New type.
11522 (in_place): New constexpr variable.
11523 (optional::optional): Remove member initialization of
11524 m_instantiated.
11525 (optional::optional(in_place_t...)): New constructor.
11526 (optional::~optional): Use reset.
11527 (optional::optional(const optional&)): New.
11528 (optional::optional(const optional&&)): New.
11529 (optional::optional(T &)): New.
11530 (optional::optional(T &&)): New.
11531 (operator::operator=(const optional &)): New.
11532 (operator::operator=(optional &&)): New.
11533 (operator::operator= (const T &))
11534 (operator::operator= (T &&))
11535 (operator::emplace (Args &&... args)): Return a T&. Use reset.
11536 (operator::reset): New.
11537 (operator::m_instantiated):: Add in-class initializer.
11538 * common/traits.h: Include <type_traits>.
11539 (struct And): New types.
11540
11541 2017-04-18 Pedro Alves <palves@redhat.com>
11542
11543 * xml-support.c: Include <vector>.
11544 (scope_level::scope_level(const gdb_xml_element *))
11545 (scope_level::scope_level(scope_level&&)): New.
11546 (scope_level::~scope_level): New.
11547 (scope_level_s): Delete.
11548 (gdb_xml_parser::scopes): Now a std::vector.
11549 (gdb_xml_body_text, gdb_xml_start_element, gdb_xml_end_element):
11550 Use std::vector.
11551 (gdb_xml_parser::~gdb_xml_parser): Remove now unnecessary
11552 scope cleanup code.
11553 (gdb_xml_parser::gdb_xml_parser): Remove explicit initialization
11554 of the scopes member. Use std::vector::emplace_back.
11555
11556 2017-04-18 Pedro Alves <palves@redhat.com>
11557
11558 * xml-support.c (gdb_xml_parser): Add ctor/dtor. Make is_xinclude
11559 a bool.
11560 (gdb_xml_end_element): Change type of first parameter.
11561 (gdb_xml_cleanup): Rename to ...
11562 (gdb_xml_parser::~gdb_xml_parser): ... this.
11563 (gdb_xml_create_parser_and_cleanup): Delete with ...
11564 (gdb_xml_parser::gdb_xml_parser): ... creation parts factored out
11565 to this new ctor.
11566 (gdb_xml_parse_quick): Create a local gdb_xml_parser instead of
11567 using gdb_xml_create_parser_and_cleanup.
11568 (xinclude_parsing_data): Add ctor/dtor.
11569 (xml_xinclude_cleanup): Delete.
11570 (xml_process_xincludes): Create a local xinclude_parsing_data
11571 instead of heap-allocating one. Create a local gdb_xml_parser
11572 instead of heap-allocating one with
11573 gdb_xml_create_parser_and_cleanup.
11574
11575 2017-04-18 John Baldwin <jhb@FreeBSD.org>
11576
11577 PR threads/20743
11578 * fbsd-nat.c (resume_one_thread_cb): Remove.
11579 (resume_all_threads_cb): Remove.
11580 (fbsd_resume): Use ALL_NON_EXITED_THREADS instead of
11581 iterate_over_threads.
11582
11583 2017-04-17 Joel Brobecker <brobecker@adacore.com>
11584
11585 * NEWS: Create a new section for the next release branch.
11586 Rename the section of the current branch, now that it has
11587 been cut.
11588
11589 2017-04-17 Joel Brobecker <brobecker@adacore.com>
11590
11591 GDB 8.0 branch created (725bf5cf125783c2a7ca4ab63d3768e220bab2db):
11592 * version.in: Bump version to 8.0.50.DATE-git.
11593
11594 2017-04-13 Sergio Durigan Junior <sergiodj@redhat.com>
11595
11596 PR gdb/21385
11597 * windows-nat.c (windows_create_inferior): Declare 'allargs'
11598 independently of the host, and fix build breakage on Cygwin.
11599
11600 2017-04-13 Pedro Alves <palves@redhat.com>
11601
11602 * inferior.c (free_inferior): Convert to ...
11603 (inferior::~inferior): ... this dtor.
11604 (inferior::inferior): New ctor, factored out from ...
11605 (add_inferior_silent): ... here. Allocate the inferior with a new
11606 expression.
11607 (delete_inferior): Call delete instead of free_inferior.
11608 * inferior.h (gdb_environ, continuation): Forward declare.
11609 (inferior): Now a class. Add in-class initialization to all
11610 members. Make boolean fields bool, except 'detaching'.
11611 (inferior::inferior): New explicit ctor.
11612 (inferior::~inferior): New.
11613
11614 2017-04-13 Pedro Alves <palves@redhat.com>
11615
11616 * inferior.c (init_inferior_list): Delete.
11617 * inferior.h (init_inferior_list): Delete.
11618
11619 2017-04-13 Pedro Alves <palves@redhat.com>
11620
11621 PR threads/13217
11622 * gdb.threads/threadapply.exp (thr_apply_detach): New procedure.
11623 (top level): Call it twice, with different thread sets.
11624
11625 2017-04-13 Pedro Alves <palves@redhat.com>
11626
11627 * thread.c: Include <algorithm>.
11628 (thread_array_cleanup): Delete.
11629 (scoped_inc_dec_ref): New class.
11630 (live_threads_count): New function.
11631 (set_thread_refcount): Delete.
11632 (tp_array_compar_ascending): Now a bool.
11633 (tp_array_compar): Convert to a std::sort comparison function.
11634 (thread_apply_all_command): Use std::vector and scoped_inc_dec_ref
11635 and live_threads_count.
11636
11637 2017-04-13 Pedro Alves <palves@redhat.com>
11638
11639 * infrun.c (follow_fork_inferior): Also switch the current
11640 inferior.
11641
11642 2017-04-13 Pedro Alves <palves@redhat.com>
11643
11644 * breakpoint.c (watch_command_1): Save watchpoint-frame info
11645 before calling create_internal_breakpoint.
11646
11647 2017-04-13 Pedro Alves <palves@redhat.com>
11648
11649 * fork-child.c (execv_argv): New class.
11650 (breakup_args): Refactored as ...
11651 (execv_argv::init_for_no_shell): .. this method of execv_argv.
11652 Copy arguments to storage and replace separators with NULL
11653 terminators in place.
11654 (escape_bang_in_quoted_argument): Adjust to return bool.
11655 (execv_argv::execv_argv): New ctor.
11656 (execv_argv::init_for_shell): New method, factored out from
11657 fork_inferior. Don't strdup strings into the vector.
11658 (fork_inferior): Eliminate "shell" local and use execv_argv. Use
11659 Remove free_vector_argv call.
11660
11661 2017-04-13 Yao Qi <yao.qi@linaro.org>
11662
11663 * rx-tdep.c (rx_fpsw_type): Check tdep->rx_fpsw_type instead of
11664 tdep->rx_psw_type.
11665
11666 2017-04-13 Yao Qi <yao.qi@linaro.org>
11667
11668 * rl78-tdep.c (rl78_gdbarch_init): Use XCNEW instead of XNEW.
11669 * rx-tdep.c (rx_gdbarch_init): Likewise.
11670
11671 2017-04-13 Pedro Alves <palves@redhat.com>
11672
11673 * breakpoint.h (struct breakpoint): Reindent.
11674
11675 2017-04-13 Pedro Alves <palves@redhat.com>
11676
11677 * breakpoint.c (bp_location): Rename to ...
11678 (bp_locations): ... this. All references updated.
11679 (bp_location_count): Rename to ...
11680 (bp_locations_count): ... this. All references updated.
11681 (bp_location_placed_address_before_address_max): Rename to ...
11682 (bp_locations_placed_address_before_address_max): ... this. All
11683 references updated.
11684 (bp_location_shadow_len_after_address_max): Rename to ...
11685 (bp_locations_shadow_len_after_address_max): ... this. All
11686 references updated.
11687 (bp_location_compare_addrs): Rename to ...
11688 (bp_locations_compare_addrs): ... this. All references updated.
11689 (bp_location_compare):Rename to ...
11690 (bp_locations_compare): ... this. All references updated.
11691 (bp_location_target_extensions_update): Rename to ...
11692 (bp_locations_target_extensions_update): ... this. All references
11693 updated.
11694
11695 2017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
11696
11697 * Makefile.in (HFILES_NO_SRCDIR): Add "common/gdb_termios.h".
11698 * common/common.m4: Check headers 'termios.h', 'termio.h' and
11699 'sgtty.h'.
11700 * common/gdb_termios.h: New file, with parts of "terminal.h".
11701 * inflow.c: Include "gdb_termios.h".
11702 * ser-unix.c: Include "gdb_termios.h".
11703 * terminal.h: Move terminal-related defines to
11704 "common/gdb_termios.h".
11705
11706 2017-04-12 Tom Tromey <tom@tromey.com>
11707
11708 * probe.c (parse_probes): Update.
11709 * location.h (delete_event_location): Don't declare.
11710 (event_location_deleter::operator()): Update.
11711 * location.c (event_location_deleter::operator()): Rename from
11712 delete_event_location.
11713 * linespec.h (linespec_result) <location>: Change type to
11714 event_location_up.
11715 * linespec.c (canonicalize_linespec, event_location_to_sals)
11716 (decode_objc): Update.
11717 (linespec_result): Don't call delete_event_location.
11718 * breakpoint.c (create_breakpoints_sal)
11719 (bkpt_probe_create_sals_from_location)
11720 (strace_marker_create_sals_from_location): Update.
11721
11722 2017-04-12 Tom Tromey <tom@tromey.com>
11723
11724 * linespec.h (struct linespec_result): Add constructor and
11725 destructor.
11726 (init_linespec_result, destroy_linespec_result)
11727 (make_cleanup_destroy_linespec_result): Don't declare.
11728 * linespec.c (init_linespec_result): Remove.
11729 (linespec_result::~linespec_result): Rename from
11730 destroy_linespec_result. Update.
11731 (cleanup_linespec_result, make_cleanup_destroy_linespec_result):
11732 Remove.
11733 * breakpoint.c (create_breakpoint, break_range_command)
11734 (decode_location_default): Update.
11735 * ax-gdb.c (agent_command_1): Update.
11736
11737 2017-04-12 Tom Tromey <tom@tromey.com>
11738
11739 * remote.c (remote_download_tracepoint): Update.
11740 * python/py-breakpoint.c (bppy_get_location): Update.
11741 * guile/scm-breakpoint.c (bpscm_print_breakpoint_smob)
11742 (gdbscm_breakpoint_location): Update.
11743 * elfread.c (elf_gnu_ifunc_resolver_return_stop): Update.
11744 * breakpoint.h (struct breakpoint) <location, location_range_end>:
11745 Change type to event_location_up.
11746 * breakpoint.c (create_overlay_event_breakpoint)
11747 (create_longjmp_master_breakpoint)
11748 (create_std_terminate_master_breakpoint)
11749 (create_exception_master_breakpoint)
11750 (breakpoint_event_location_empty_p, print_breakpoint_location)
11751 (print_one_breakpoint_location, create_thread_event_breakpoint)
11752 (init_breakpoint_sal, create_breakpoint)
11753 (print_recreate_ranged_breakpoint, break_range_command)
11754 (init_ada_exception_breakpoint, say_where): Update.
11755 (base_breakpoint_dtor): Don't call delete_event_location.
11756 (bkpt_print_recreate, tracepoint_print_recreate)
11757 (dprintf_print_recreate, update_static_tracepoint)
11758 (breakpoint_re_set_default): Update.
11759
11760 2017-04-12 Tom Tromey <tom@tromey.com>
11761
11762 * compile/compile-loc2c.c (compute_stack_depth_worker): Change
11763 type of "to_do". Update.
11764 (compute_stack_depth): Use std::vector.
11765
11766 2017-04-12 Tom Tromey <tom@tromey.com>
11767
11768 * printcmd.c (find_instruction_backward): Use std::vector.
11769
11770 2017-04-12 Tom Tromey <tom@tromey.com>
11771
11772 * symfile.c (objfilep): Remove typedef.
11773 (reread_symbols): Use a std::vector.
11774
11775 2017-04-12 Tom Tromey <tom@tromey.com>
11776
11777 * mi/mi-main.c (exec_direction_forward): Remove.
11778 (exec_reverse_continue, mi_execute_command): Use scoped_restore.
11779 * guile/scm-ports.c (ioscm_with_output_to_port_worker): Use
11780 scoped_restore.
11781 * guile/guile.c (guile_repl_command, guile_command)
11782 (gdbscm_execute_gdb_command): Use scoped_restore.
11783 * go-exp.y (go_parse): Use scoped_restore.
11784 * d-exp.y (d_parse): Use scoped_restore.
11785 * cli/cli-decode.c (cmd_func): Use scoped_restore.
11786 * c-exp.y (c_parse): Use scoped_restore.
11787
11788 2017-04-12 Tom Tromey <tom@tromey.com>
11789
11790 * mi/mi-parse.h (struct mi_parse): Add constructor, destructor.
11791 (mi_parse): Update return type.
11792 (mi_parse_free): Remove.
11793 * mi/mi-parse.c (mi_parse::mi_parse): New constructor.
11794 (mi_parse::~mi_parse): Rename from mi_parse_free.
11795 (mi_parse_cleanup): Remove.
11796 (mi_parse): Return a unique_ptr. Use new.
11797 * mi/mi-main.c (mi_execute_command): Update.
11798
11799 2017-04-12 Tom Tromey <tom@tromey.com>
11800
11801 * location.c (explicit_location_lex_one): Return a
11802 unique_xmalloc_ptr.
11803 (string_to_explicit_location): Update. Remove cleanups.
11804
11805 2017-04-12 Tom Tromey <tom@tromey.com>
11806
11807 * gnu-v3-abi.c (value_and_voffset_p): Remove typedef.
11808 (compare_value_and_voffset): Change type. Update.
11809 (compute_vtable_size): Change type of "offset_vec".
11810 (gnuv3_print_vtable): Use std::vector. Remove cleanups.
11811 (gnuv3_get_typeid): Remove extraneous declaration.
11812
11813 2017-04-12 Tom Tromey <tom@tromey.com>
11814
11815 * charset.h (wchar_iterator): Fix comment.
11816
11817 2017-04-12 Tom Tromey <tom@tromey.com>
11818
11819 * charset.c (iconv_wrapper): New class.
11820 (cleanup_iconv): Remove.
11821 (convert_between_encodings): Use it.
11822
11823 2017-04-12 Tom Tromey <tom@tromey.com>
11824
11825 * symfile.h (increment_reading_symtab): Update type.
11826 * symfile.c (decrement_reading_symtab): Remove.
11827 (increment_reading_symtab): Return a scoped_restore_tmpl<int>.
11828 * psymtab.c (psymtab_to_symtab): Update.
11829 * dwarf2read.c (dw2_instantiate_symtab): Update.
11830
11831 2017-04-12 Tom Tromey <tom@tromey.com>
11832
11833 * jit.c (struct jit_reader): Declare separately. Add constructor
11834 and destructor. Change type of "handle".
11835 (loaded_jit_reader): Define separately.
11836 (jit_reader_load): Update. New "new".
11837 (jit_reader_unload_command): Use "delete".
11838 * gdb-dlfcn.h (struct dlclose_deleter): New.
11839 (gdb_dlhandle_up): New typedef.
11840 (gdb_dlopen, gdb_dlsym): Update types.
11841 (gdb_dlclose): Remove.
11842 * gdb-dlfcn.c (gdb_dlopen): Return a gdb_dlhandle_up.
11843 (gdb_dlsym): Change type of "handle".
11844 (make_cleanup_dlclose): Remove.
11845 (dlclose_deleter::operator()): Rename from gdb_dlclose.
11846 * compile/compile-c-support.c (load_libcc): Update.
11847
11848 2017-04-12 Tom Tromey <tom@tromey.com>
11849
11850 * symtab.h (find_pcs_for_symtab_line): Change return type.
11851 * symtab.c (find_pcs_for_symtab_line): Change return type.
11852 * python/py-linetable.c (build_line_table_tuple_from_pcs): Change
11853 type of "vec". Update.
11854 (ltpy_get_pcs_for_line): Update.
11855 * linespec.c (decode_digits_ordinary): Update.
11856
11857 2017-04-12 Tom Tromey <tom@tromey.com>
11858
11859 * tracepoint.c (actions_command): Update.
11860 * python/python.c (python_command, python_interactive_command):
11861 Update.
11862 * mi/mi-cmd-break.c (mi_cmd_break_commands): Update.
11863 * guile/guile.c (guile_command): Update.
11864 * defs.h (read_command_lines, read_command_lines_1): Return
11865 command_line_up.
11866 (command_lines_deleter): New struct.
11867 (command_line_up): New typedef.
11868 * compile/compile.c (compile_code_command)
11869 (compile_print_command): Update.
11870 * cli/cli-script.h (get_command_line, copy_command_lines): Return
11871 command_line_up.
11872 (make_cleanup_free_command_lines): Remove.
11873 * cli/cli-script.c (get_command_line, read_command_lines_1)
11874 (copy_command_lines): Return command_line_up.
11875 (while_command, if_command, read_command_lines, define_command)
11876 (document_command): Update.
11877 (do_free_command_lines_cleanup, make_cleanup_free_command_lines):
11878 Remove.
11879 * breakpoint.h (breakpoint_set_commands): Change type of
11880 "commands".
11881 * breakpoint.c (breakpoint_set_commands): Change type of
11882 "commands". Update.
11883 (do_map_commands_command, update_dprintf_command_list)
11884 (create_tracepoint_from_upload): Update.
11885
11886 2017-04-12 Tom Tromey <tom@tromey.com>
11887
11888 * tracepoint.c (scope_info): Update.
11889 * spu-tdep.c (spu_catch_start): Update.
11890 * python/python.c (gdbpy_decode_line): Update.
11891 * python/py-finishbreakpoint.c (bpfinishpy_init): Update.
11892 * python/py-breakpoint.c (bppy_init): Update.
11893 * probe.c (parse_probes): Update.
11894 * mi/mi-cmd-break.c (mi_cmd_break_insert_1): Update.
11895 * location.h (event_location_deleter): New struct.
11896 (event_location_up): New typedef.
11897 (new_linespec_location, new_address_location, new_probe_location)
11898 (new_explicit_location, copy_event_location)
11899 (string_to_event_location, string_to_event_location_basic)
11900 (string_to_explicit_location): Update return type.
11901 (make_cleanup_delete_event_location): Remove.
11902 * location.c (new_linespec_location, new_address_location)
11903 (new_probe_location, new_explicit_location, copy_event_location):
11904 Return event_location_up.
11905 (delete_event_location_cleanup)
11906 (make_cleanup_delete_event_location): Remove.
11907 (string_to_explicit_location, string_to_event_location_basic)
11908 (string_to_event_location): Return event_location_up.
11909 * linespec.c (canonicalize_linespec, event_location_to_sals)
11910 (decode_line_with_current_source)
11911 (decode_line_with_last_displayed, decode_objc): Update.
11912 * guile/scm-breakpoint.c (gdbscm_register_breakpoint_x): Update.
11913 * completer.c (location_completer): Update.
11914 * cli/cli-cmds.c (edit_command, list_command): Update.
11915 * breakpoint.c (create_overlay_event_breakpoint)
11916 (create_longjmp_master_breakpoint)
11917 (create_std_terminate_master_breakpoint)
11918 (create_exception_master_breakpoint)
11919 (create_thread_event_breakpoint): Update.
11920 (init_breakpoint_sal): Update. Remove some dead code.
11921 (create_breakpoint_sal): Change type of "location". Update.
11922 (create_breakpoints_sal, create_breakpoint, break_command_1)
11923 (dprintf_command, break_range_command, until_break_command)
11924 (init_ada_exception_breakpoint)
11925 (strace_marker_create_sals_from_location)
11926 (update_static_tracepoint, trace_command, ftrace_command)
11927 (strace_command, create_tracepoint_from_upload): Update.
11928 * break-catch-throw.c (re_set_exception_catchpoint): Update.
11929 * ax-gdb.c (agent_command_1): Update.
11930
11931 2017-04-12 Pedro Alves <palves@redhat.com>
11932
11933 * Makefile.in (ALL_TARGET_OBS): Add i386-go32-tdep.o.
11934 * configure.tgt: Handle i[34567]86-*-go32* and
11935 i[34567]86-*-msdosdjgpp*.
11936 * i386-tdep.c (i386_svr4_reg_to_regnum):
11937 Make extern.
11938 (i386_go32_init_abi, i386_coff_osabi_sniffer): Moved to
11939 i386-go32-tdep.c.
11940 (_initialize_i386_tdep): DJGPP bits moved to i386-go32-tdep.c.
11941 * i386-go32-tdep.c: New file.
11942 * i386-tdep.h (tdesc_i386_mmx, i386_svr4_reg_to_regnum): New
11943 declarations.
11944
11945 2017-04-12 Simon Marchi <simon.marchi@ericsson.com>
11946
11947 * aix-thread.c (pd_status2str): Change return type to const char *.
11948
11949 2017-04-12 Pedro Alves <palves@redhat.com>
11950
11951 * i386-tdep.c (i386_elf_init_abi, i386_go32_init_abi): Remove
11952 calls to set_gdbarch_gnu_triplet_regexp.
11953
11954 2017-04-12 Pedro Alves <palves@redhat.com>
11955
11956 PR gdb/21323
11957 * c-lang.c (cplus_primitive_types) <cplus_primitive_type_wchar_t>:
11958 New enum value.
11959 (cplus_language_arch_info): Register cplus_primitive_type_wchar_t.
11960 * gdbtypes.h (struct builtin_type) <builtin_wchar>: New field.
11961 * gdbtypes.c (gdbtypes_post_init): Create the "wchar_t" type.
11962 * gdbarch.sh (wchar_bit, wchar_signed): New per-arch values.
11963 * gdbarch.h, gdbarch.c: Regenerate.
11964 * aarch64-tdep.c (aarch64_gdbarch_init): Override
11965 gdbarch_wchar_bit and gdbarch_wchar_signed.
11966 * alpha-tdep.c (alpha_gdbarch_init): Likewise.
11967 * arm-tdep.c (arm_gdbarch_init): Likewise.
11968 * avr-tdep.c (avr_gdbarch_init): Likewise.
11969 * h8300-tdep.c (h8300_gdbarch_init): Likewise.
11970 * i386-nto-tdep.c (i386nto_init_abi): Likewise.
11971 * i386-tdep.c (i386_go32_init_abi): Likewise.
11972 * m32r-tdep.c (m32r_gdbarch_init): Likewise.
11973 * moxie-tdep.c (moxie_gdbarch_init): Likewise.
11974 * nds32-tdep.c (nds32_gdbarch_init): Likewise.
11975 * rs6000-aix-tdep.c (rs6000_aix_init_osabi): Likewise.
11976 * sh-tdep.c (sh_gdbarch_init): Likewise.
11977 * sparc-tdep.c (sparc32_gdbarch_init): Likewise.
11978 * sparc64-tdep.c (sparc64_init_abi): Likewise.
11979 * windows-tdep.c (windows_init_abi): Likewise.
11980 * xstormy16-tdep.c (xstormy16_gdbarch_init): Likewise.
11981
11982 2017-04-12 Pedro Alves <palves@redhat.com>
11983
11984 PR c++/21323
11985 * c-lang.c (cplus_primitive_types) <cplus_primitive_type_char16_t,
11986 cplus_primitive_type_char32_t>: New enum values.
11987 (cplus_language_arch_info): Register cplus_primitive_type_char16_t
11988 and cplus_primitive_type_char32_t.
11989 * dwarf2read.c (read_base_type) <DW_ATE_UTF>: If bit size is 16 or
11990 32, use the archtecture's built-in type for char16_t and char32_t,
11991 respectively. Otherwise, fallback to init_integer_type as before,
11992 but make the type unsigned, and issue a complaint.
11993 * gdbtypes.c (gdbtypes_post_init): Make char16_t and char32_t unsigned.
11994
11995 2017-04-12 Alan Hayward <alan.hayward@arm.com>
11996
11997 * m32r-tdep.c (M32R_ARG_REGISTER_SIZE): Added.
11998 (m32r_push_dummy_call): Use M32R_ARG_REGISTER_SIZE.
11999
12000 2017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
12001
12002 * windows-nat.c (windows_create_inferior): Declare 'toexec' as
12003 'const char *'.
12004
12005 2017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
12006
12007 * common/common-utils.c (free_vector_argv): New function.
12008 * common/common-utils.h: Include <vector>.
12009 (free_vector_argv): New prototype.
12010 * darwin-nat.c (darwin_create_inferior): Rewrite function
12011 prototype in order to constify "exec_file" and accept a
12012 "std::string" for "allargs".
12013 * fork-child.c: Include <vector>.
12014 (breakup_args): Rewrite function, using C++.
12015 (fork_inferior): Rewrite function header, constify "exec_file_arg"
12016 and accept "std::string" for "allargs". Update the code to
12017 calculate "argv" based on "allargs". Update calls to "exec_fun"
12018 and "execvp".
12019 * gnu-nat.c (gnu_create_inferior): Rewrite function prototype in
12020 order to constify "exec_file" and accept a "std::string" for
12021 "allargs".
12022 * go32-nat.c (go32_create_inferior): Likewise.
12023 * inf-ptrace.c (inf_ptrace_create_inferior): Likewise.
12024 * infcmd.c (run_command_1): Constify "exec_file". Use
12025 "std::string" for inferior arguments.
12026 * inferior.h (fork_inferior): Update prototype.
12027 * linux-nat.c (linux_nat_create_inferior): Rewrite function
12028 prototype in order to constify "exec_file" and accept a
12029 "std::string" for "allargs".
12030 * nto-procfs.c (procfs_create_inferior): Likewise.
12031 * procfs.c (procfs_create_inferior): Likewise.
12032 * remote-sim.c (gdbsim_create_inferior): Likewise.
12033 * remote.c (extended_remote_run): Update code to accept
12034 "std::string" as argument.
12035 (extended_remote_create_inferior): Rewrite function prototype in
12036 order to constify "exec_file" and accept a "std::string" for
12037 "allargs".
12038 * rs6000-nat.c (super_create_inferior): Likewise.
12039 (rs6000_create_inferior): Likewise.
12040 * target.h (struct target_ops) <to_create_inferior>: Likewise.
12041 * windows-nat.c (windows_create_inferior): Likewise.
12042
12043 2017-04-11 Pedro Alves <palves@redhat.com>
12044
12045 * thread.c: Fix whitespace throughout.
12046
12047 2017-04-11 Philipp Rudo <prudo@linux.vnet.ibm.com>
12048
12049 * linux-nat.c (linux_nat_detach): Remove delete_lwp call.
12050
12051 2017-04-11 Alan Hayward <alan.hayward@arm.com>
12052
12053 * arm-tdep.c (arm_store_return_value): Use FP_REGISTER_SIZE
12054
12055 2017-04-10 Sergio Durigan Junior <sergiodj@redhat.com>
12056
12057 PR gdb/21364
12058 * osdata.c (info_osdata): Check if 'type' is an empty string
12059 instead of NULL.
12060
12061 2017-04-10 Pedro Alves <palves@redhat.com>
12062
12063 * thread.c (add_thread_silent, delete_thread_1, find_thread_ptid)
12064 (ptid_to_global_thread_id, in_thread_list)
12065 (do_captured_list_thread_ids, set_resumed, set_running)
12066 (set_executing, set_stop_requested, finish_thread_state)
12067 (validate_registers_access, can_access_registers_ptid)
12068 (print_thread_info_1, switch_to_thread)
12069 (do_restore_current_thread_cleanup)
12070 (make_cleanup_restore_current_thread, thread_command)
12071 (thread_name_command): Use operator== instead of ptid_equal.
12072
12073 2017-04-10 Pedro Alves <palves@redhat.com>
12074
12075 * thread.c (struct current_thread_cleanup) <next>: Delete field.
12076 (current_thread_cleanup_chain): Delete.
12077 (restore_current_thread_cleanup_dtor)
12078 (make_cleanup_restore_current_thread): Remove references to
12079 current_thread_cleanup_chain.
12080
12081 2017-04-10 Alan Hayward <alan.hayward@arm.com>
12082
12083 * msp430-tdep.c (msp430_pseudo_register_read): Never return
12084 REG_UNKNOWN.
12085
12086 2017-04-10 Yao Qi <yao.qi@linaro.org>
12087
12088 PR gdb/19942
12089 * gdbthread.h (thread_info::deletable): New method.
12090 (thread_info::incref): New method.
12091 (thread_info::decref): New method.
12092 (thread_info::refcount): Move it to private.
12093 * infrun.c (save_stop_context): Call inc_refcount.
12094 (release_stop_context_cleanup): Likewise.
12095 * thread.c (set_thread_exited): New function.
12096 (init_thread_list): Delete "tp" only it is deletable, otherwise
12097 call set_thread_exited.
12098 (delete_thread_1): Call set_thread_exited.
12099 (current_thread_cleanup) <inferior_pid>: Remove.
12100 <thread>: New field.
12101 (restore_current_thread_ptid_changed): Removed.
12102 (do_restore_current_thread_cleanup): Adjust.
12103 (restore_current_thread_cleanup_dtor): Don't call
12104 find_thread_ptid.
12105 (set_thread_refcount): Use dec_refcount.
12106 (make_cleanup_restore_current_thread): Adjust.
12107 (thread_apply_all_command): Call inc_refcount.
12108 (_initialize_thread): Don't call
12109 observer_attach_thread_ptid_changed.
12110
12111 2017-04-10 Yao Qi <yao.qi@linaro.org>
12112
12113 * thread.c (delete_thread_1): Hoist code on marking thread as
12114 exited.
12115
12116 2017-04-09 Simon Marchi <simon.marchi@polymtl.ca>
12117
12118 * windows-nat.c (windows_detach): Initialize ptid with
12119 minus_one_ptid.
12120
12121 2017-04-07 Simon Marchi <simon.marchi@ericsson.com>
12122
12123 * unittests/ptid-selftests.c: Fix erroneous assert messages.
12124
12125 2017-04-07 Alan Hayward <alan.hayward@arm.com>
12126
12127 * bfin-tdep.c (BFIN_MAX_REGISTER_SIZE): Add.
12128 (bfin_pseudo_register_read): Use BFIN_MAX_REGISTER_SIZE.
12129 (bfin_pseudo_register_write): Likewise
12130
12131 2017-04-06 Simon Marchi <simon.marchi@ericsson.com>
12132
12133 * common/ptid.h (struct ptid): Change to...
12134 (class ptid_t): ... this.
12135 <ptid_t>: New constructors.
12136 <pid, lwp_p, lwp, tid_p, tid, is_pid, operator==, operator!=,
12137 matches>: New methods.
12138 <make_null, make_minus_one>: New static methods.
12139 <pid>: Rename to...
12140 <m_pid>: ...this.
12141 <lwp>: Rename to...
12142 <m_lwp>: ...this.
12143 <tid>: Rename to...
12144 <m_tid>: ...this.
12145 (ptid_build, ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal,
12146 ptid_is_pid, ptid_lwp_p, ptid_tid_p, ptid_match): Take ptid arguments
12147 as references, move comment to class ptid_t.
12148 * common/ptid.c (null_ptid, minus_one_ptid): Initialize with
12149 ptid_t static methods.
12150 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_tid,
12151 ptid_equal, ptid_is_pid, ptid_lwp_p, ptid_tid_p, ptid_match):
12152 Take ptid arguments as references, implement using ptid_t methods.
12153 * unittests/ptid-selftests.c: New file.
12154 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
12155 unittests/ptid-selftests.c.
12156 (SUBDIR_UNITTESTS_OBS): Add unittests/ptid-selftests.o.
12157
12158 2017-04-06 Thomas Preud'homme <thomas.preudhomme@arm.com>
12159
12160 * python/python.c (python_run_simple_file): Cast mode literal to
12161 non-const char pointer as expected by PyFile_FromString.
12162
12163 2017-04-05 Simon Marchi <simon.marchi@ericsson.com>
12164
12165 * common/ptid.c (ptid_lwp_p, ptid_tid_p): Remove comparison with
12166 minus_one_ptid and null_ptid.
12167
12168 2017-04-05 Pedro Alves <palves@redhat.com>
12169
12170 * warning.m4 (build_warnings): Remove -Wno-write-strings.
12171 * configure: Regenerate.
12172
12173 2017-04-05 Pedro Alves <palves@redhat.com>
12174
12175 * ada-exp.y (yyerror): Constify.
12176 * ada-lang.c (bound_name, get_selections)
12177 (ada_variant_discrim_type)
12178 (ada_variant_discrim_name, ada_value_struct_elt)
12179 (ada_lookup_struct_elt_type, is_unchecked_variant)
12180 (ada_which_variant_applies, standard_exc, ada_get_next_arg)
12181 (catch_ada_exception_command_split)
12182 (catch_ada_assert_command_split, catch_assert_command)
12183 (ada_op_name): Constify.
12184 * ada-lang.h (ada_yyerror, get_selections)
12185 (ada_variant_discrim_name, ada_value_struct_elt): Constify.
12186 * arc-tdep.c (arc_print_frame_cache): Constify.
12187 * arm-tdep.c (arm_skip_stub): Constify.
12188 * ax-gdb.c (gen_binop, gen_struct_ref_recursive, gen_struct_ref)
12189 (gen_aggregate_elt_ref): Constify.
12190 * bcache.c (print_bcache_statistics): Constify.
12191 * bcache.h (print_bcache_statistics): Constify.
12192 * break-catch-throw.c (catch_exception_command_1):
12193 * breakpoint.c (struct ep_type_description::description):
12194 Constify.
12195 (add_solib_catchpoint): Constify.
12196 (catch_fork_command_1): Add cast.
12197 (add_catch_command): Constify.
12198 * breakpoint.h (add_catch_command, add_solib_catchpoint):
12199 Constify.
12200 * bsd-uthread.c (bsd_uthread_state): Constify.
12201 * buildsym.c (patch_subfile_names): Constify.
12202 * buildsym.h (next_symbol_text_func, patch_subfile_names):
12203 Constify.
12204 * c-exp.y (yyerror): Constify.
12205 (token::oper): Constify.
12206 * c-lang.h (c_yyerror, cp_print_class_member): Constify.
12207 * c-varobj.c (cplus_describe_child): Constify.
12208 * charset.c (find_charset_names): Add cast.
12209 (find_charset_names): Constify array and add const_cast.
12210 * cli/cli-cmds.c (complete_command, cd_command): Constify.
12211 (edit_command): Constify.
12212 * cli/cli-decode.c (lookup_cmd): Constify.
12213 * cli/cli-dump.c (dump_memory_command, dump_value_command):
12214 Constify.
12215 (struct dump_context): Constify.
12216 (add_dump_command, restore_command): Constify.
12217 * cli/cli-script.c (get_command_line): Constify.
12218 * cli/cli-script.h (get_command_line): Constify.
12219 * cli/cli-utils.c (check_for_argument): Constify.
12220 * cli/cli-utils.h (check_for_argument): Constify.
12221 * coff-pe-read.c (struct read_pe_section_data): Constify.
12222 * command.h (lookup_cmd): Constify.
12223 * common/print-utils.c (decimal2str): Constify.
12224 * completer.c (gdb_print_filename): Constify.
12225 * corefile.c (set_gnutarget): Constify.
12226 * cp-name-parser.y (yyerror): Constify.
12227 * cp-valprint.c (cp_print_class_member): Constify.
12228 * cris-tdep.c (cris_register_name, crisv32_register_name):
12229 Constify.
12230 * d-exp.y (yyerror): Constify.
12231 (struct token::oper): Constify.
12232 * d-lang.h (d_yyerror): Constify.
12233 * dbxread.c (struct header_file_location::name): Constify.
12234 (add_old_header_file, add_new_header_file, last_function_name)
12235 (dbx_next_symbol_text, add_bincl_to_list)
12236 (find_corresponding_bincl_psymtab, set_namestring)
12237 (find_stab_function_addr, read_dbx_symtab, start_psymtab)
12238 (dbx_end_psymtab, read_ofile_symtab, process_one_symbol):
12239 * defs.h (command_line_input, print_address_symbolic)
12240 (deprecated_readline_begin_hook): Constify.
12241 * dwarf2read.c (anonymous_struct_prefix, dwarf_bool_name):
12242 Constify.
12243 * event-top.c (handle_line_of_input): Constify and add cast.
12244 * exceptions.c (catch_errors): Constify.
12245 * exceptions.h (catch_errors): Constify.
12246 * expprint.c (print_subexp_standard, op_string, op_name)
12247 (op_name_standard, dump_raw_expression, dump_raw_expression):
12248 * expression.h (op_name, op_string, dump_raw_expression):
12249 Constify.
12250 * f-exp.y (yyerror): Constify.
12251 (struct token::oper): Constify.
12252 (struct f77_boolean_val::name): Constify.
12253 * f-lang.c (f_word_break_characters): Constify.
12254 * f-lang.h (f_yyerror): Constify.
12255 * fork-child.c (fork_inferior): Add cast.
12256 * frv-tdep.c (struct gdbarch_tdep::register_names): Constify.
12257 (new_variant): Constify.
12258 * gdbarch.sh (pstring_ptr, pstring_list): Constify.
12259 * gdbarch.c: Regenerate.
12260 * gdbcore.h (set_gnutarget): Constify.
12261 * go-exp.y (yyerror): Constify.
12262 (token::oper): Constify.
12263 * go-lang.h (go_yyerror): Constify.
12264 * go32-nat.c (go32_sysinfo): Constify.
12265 * guile/scm-breakpoint.c (gdbscm_breakpoint_expression): Constify.
12266 * guile/scm-cmd.c (cmdscm_function): Constify.
12267 * guile/scm-param.c (pascm_param_value): Constify.
12268 * h8300-tdep.c (h8300_register_name, h8300s_register_name)
12269 (h8300sx_register_name): Constify.
12270 * hppa-tdep.c (hppa32_register_name, hppa64_register_name):
12271 Constify.
12272 * ia64-tdep.c (ia64_register_names): Constify.
12273 * infcmd.c (construct_inferior_arguments): Constify.
12274 (path_command, attach_post_wait): Constify.
12275 * language.c (show_range_command, show_case_command)
12276 (unk_lang_error): Constify.
12277 * language.h (language_defn::la_error)
12278 (language_defn::la_name_of_this): Constify.
12279 * linespec.c (decode_line_2): Constify.
12280 * linux-thread-db.c (thread_db_err_str): Constify.
12281 * lm32-tdep.c (lm32_register_name): Constify.
12282 * m2-exp.y (yyerror): Constify.
12283 * m2-lang.h (m2_yyerror): Constify.
12284 * m32r-tdep.c (m32r_register_names): Constify and make static.
12285 * m68hc11-tdep.c (m68hc11_register_names): Constify.
12286 * m88k-tdep.c (m88k_register_name): Constify.
12287 * macroexp.c (appendmem): Constify.
12288 * mdebugread.c (fdr_name, add_data_symbol, parse_type)
12289 (upgrade_type, parse_external, parse_partial_symbols)
12290 (mdebug_next_symbol_text, cross_ref, mylookup_symbol, new_psymtab)
12291 (new_symbol): Constify.
12292 * memattr.c (mem_info_command): Constify.
12293 * mep-tdep.c (register_name_from_keyword): Constify.
12294 * mi/mi-cmd-env.c (mi_cmd_env_path, _initialize_mi_cmd_env):
12295 Constify.
12296 * mi/mi-cmd-stack.c (list_args_or_locals): Constify.
12297 * mi/mi-cmd-var.c (mi_cmd_var_show_attributes): Constify.
12298 * mi/mi-main.c (captured_mi_execute_command): Constify and add
12299 cast.
12300 (mi_execute_async_cli_command): Constify.
12301 * mips-tdep.c (mips_register_name): Constify.
12302 * mn10300-tdep.c (register_name, mn10300_generic_register_name)
12303 (am33_register_name, am33_2_register_name)
12304 * moxie-tdep.c (moxie_register_names): Constify.
12305 * nat/linux-osdata.c (osdata_type): Constify fields.
12306 * nto-tdep.c (nto_parse_redirection): Constify.
12307 * objc-lang.c (lookup_struct_typedef, lookup_objc_class)
12308 (lookup_child_selector): Constify.
12309 (objc_methcall::name): Constify.
12310 * objc-lang.h (lookup_objc_class, lookup_child_selector)
12311 (lookup_struct_typedef): Constify.
12312 * objfiles.c (pc_in_section): Constify.
12313 * objfiles.h (pc_in_section): Constify.
12314 * p-exp.y (struct token::oper): Constify.
12315 (yyerror): Constify.
12316 * p-lang.h (pascal_yyerror): Constify.
12317 * parser-defs.h (op_name_standard): Constify.
12318 (op_print::string): Constify.
12319 (exp_descriptor::op_name): Constify.
12320 * printcmd.c (print_address_symbolic): Constify.
12321 * psymtab.c (print_partial_symbols): Constify.
12322 * python/py-breakpoint.c (stop_func): Constify.
12323 (bppy_get_expression): Constify.
12324 * python/py-cmd.c (cmdpy_completer::name): Constify.
12325 (cmdpy_function): Constify.
12326 * python/py-event.c (evpy_add_attribute)
12327 (gdbpy_initialize_event_generic): Constify.
12328 * python/py-event.h (evpy_add_attribute)
12329 (gdbpy_initialize_event_generic): Constify.
12330 * python/py-evts.c (add_new_registry): Constify.
12331 * python/py-finishbreakpoint.c (outofscope_func): Constify.
12332 * python/py-framefilter.c (get_py_iter_from_func): Constify.
12333 * python/py-inferior.c (get_buffer): Add cast.
12334 * python/py-param.c (parm_constant::name): Constify.
12335 * python/py-unwind.c (fprint_frame_id): Constify.
12336 * python/python.c (gdbpy_parameter_value): Constify.
12337 * remote-fileio.c (remote_fio_func_map): Make 'name' const.
12338 * remote.c (memory_packet_config::name): Constify.
12339 (show_packet_config_cmd, remote_write_bytes)
12340 (remote_buffer_add_string):
12341 * reverse.c (exec_reverse_once): Constify.
12342 * rs6000-tdep.c (variant::name, variant::description): Constify.
12343 * rust-exp.y (rustyyerror): Constify.
12344 * rust-lang.c (rust_op_name): Constify.
12345 * rust-lang.h (rustyyerror): Constify.
12346 * serial.h (serial_ops::name): Constify.
12347 * sh-tdep.c (sh_sh_register_name, sh_sh3_register_name)
12348 (sh_sh3e_register_name, sh_sh2e_register_name)
12349 (sh_sh2a_register_name, sh_sh2a_nofpu_register_name)
12350 (sh_sh_dsp_register_name, sh_sh3_dsp_register_name)
12351 (sh_sh4_register_name, sh_sh4_nofpu_register_name)
12352 (sh_sh4al_dsp_register_name): Constify.
12353 * sh64-tdep.c (sh64_register_name): Constify.
12354 * solib-darwin.c (lookup_symbol_from_bfd): Constify.
12355 * spu-tdep.c (spu_register_name, info_spu_dma_cmdlist): Constify.
12356 * stabsread.c (patch_block_stabs, read_type_number)
12357 (ref_map::stabs, ref_add, process_reference)
12358 (symbol_reference_defined, define_symbol, define_symbol)
12359 (error_type, read_type, read_member_functions, read_cpp_abbrev)
12360 (read_one_struct_field, read_struct_fields, read_baseclasses)
12361 (read_tilde_fields, read_struct_type, read_array_type)
12362 (read_enum_type, read_sun_builtin_type, read_sun_floating_type)
12363 (read_huge_number, read_range_type, read_args, common_block_start)
12364 (find_name_end): Constify.
12365 * stabsread.h (common_block_start, define_symbol)
12366 (process_one_symbol, symbol_reference_defined, ref_add):
12367 * symfile.c (get_section_index, add_symbol_file_command):
12368 * symfile.h (get_section_index): Constify.
12369 * target-descriptions.c (tdesc_type::name): Constify.
12370 (tdesc_free_type): Add cast.
12371 * target.c (find_default_run_target):
12372 (add_deprecated_target_alias, find_default_run_target)
12373 (target_announce_detach): Constify.
12374 (do_option): Constify.
12375 * target.h (add_deprecated_target_alias): Constify.
12376 * thread.c (print_thread_info_1): Constify.
12377 * top.c (deprecated_readline_begin_hook, command_line_input):
12378 Constify.
12379 (init_main): Add casts.
12380 * top.h (handle_line_of_input): Constify.
12381 * tracefile-tfile.c (tfile_write_uploaded_tsv): Constify.
12382 * tracepoint.c (tvariables_info_1, trace_status_mi): Constify.
12383 (tfind_command): Rename to ...
12384 (tfind_command_1): ... this and constify.
12385 (tfind_command): New function.
12386 (tfind_end_command, tfind_start_command): Adjust.
12387 (encode_source_string): Constify.
12388 * tracepoint.h (encode_source_string): Constify.
12389 * tui/tui-data.c (tui_partial_win_by_name): Constify.
12390 * tui/tui-data.h (tui_partial_win_by_name): Constify.
12391 * tui/tui-source.c (tui_set_source_content_nil): Constify.
12392 * tui/tui-source.h (tui_set_source_content_nil): Constify.
12393 * tui/tui-win.c (parse_scrolling_args): Constify.
12394 * tui/tui-windata.c (tui_erase_data_content): Constify.
12395 * tui/tui-windata.h (tui_erase_data_content): Constify.
12396 * tui/tui-winsource.c (tui_erase_source_content): Constify.
12397 * tui/tui.c (tui_enable): Add cast.
12398 * utils.c (defaulted_query): Constify.
12399 (init_page_info): Add cast.
12400 (puts_debug, subset_compare): Constify.
12401 * utils.h (subset_compare): Constify.
12402 * varobj.c (varobj_format_string): Constify.
12403 * varobj.h (varobj_format_string): Constify.
12404 * vax-tdep.c (vax_register_name): Constify.
12405 * windows-nat.c (windows_detach): Constify.
12406 * xcoffread.c (process_linenos, xcoff_next_symbol_text): Constify.
12407 * xml-support.c (gdb_xml_end_element): Constify.
12408 * xml-tdesc.c (tdesc_start_reg): Constify.
12409 * xstormy16-tdep.c (xstormy16_register_name): Constify.
12410 * xtensa-tdep.c (xtensa_find_register_by_name): Constify.
12411 * xtensa-tdep.h (xtensa_register_t::name): Constify.
12412
12413 2017-04-05 Pedro Alves <palves@redhat.com>
12414
12415 * proc-api.c (struct trans): Constify.
12416 (procfs_note): Constify.
12417 * proc-events.c (struct trans, syscall_table):
12418 * proc-flags.c (struct trans): Constify.
12419 * proc-utils.h (procfs_note): Constify.
12420 * proc-why.c (struct trans): Constify.
12421 * procfs.c (dead_procinfo, find_syscall, proc_warn, proc_error)
12422 (procfs_detach): Constify.
12423 * sol-thread.c (struct string_map): Constify.
12424 (td_err_string, td_state_string): Constify.
12425
12426 2017-04-05 Pedro Alves <palves@redhat.com>
12427
12428 * proc-api.c (procfs_filename): Don't initialize
12429 procfs_filename.
12430 (prepare_to_trace): Assume procfs_filename is non-NULL.
12431 (_initialize_proc_api): Give procfs_filename a default value here.
12432
12433 2017-04-05 Pedro Alves <palves@redhat.com>
12434
12435 * break-catch-throw.c (handle_gnu_v3_exceptions): Constify
12436 'cond_string' parameter.
12437 (extract_exception_regexp): Constify 'string' parameter.
12438 (catch_exception_command_1): Constify.
12439 * breakpoint.c (init_catchpoint)
12440 (create_fork_vfork_event_catchpoint): Constify 'cond_string'
12441 parameter.
12442 (ep_parse_optional_if_clause, catch_fork_command_1)
12443 (catch_exec_command_1): Constify.
12444 * breakpoint.h (init_catchpoint): Constify 'cond_string'
12445 parameter.
12446 (ep_parse_optional_if_clause): Constify.
12447 * cli/cli-utils.c (remove_trailing_whitespace)
12448 (check_for_argument): Constify.
12449 * cli/cli-utils.h (remove_trailing_whitespace): Constify and add
12450 non-const overload.
12451 (check_for_argument): Likewise.
12452
12453 2017-04-05 Pedro Alves <palves@redhat.com>
12454
12455 * event-top.c (command_line_handler): Add cast to execute_command
12456 call.
12457 * record-btrace.c (cmd_record_btrace_bts_start)
12458 (cmd_record_btrace_pt_start, cmd_record_btrace_start)
12459 (cmd_record_btrace_start): Add cast to execute_command call.
12460 * record-full.c (record_full_goto_insn):
12461 * record.c (record_start, record_stop): Add cast to
12462 execute_command_to_string calls.
12463 (cmd_record_start): Add cast to execute_command calls.
12464
12465 2017-04-05 Pedro Alves <palves@redhat.com>
12466
12467 * python/python-internal.h (gdb_PyArg_ParseTupleAndKeywords): New
12468 static inline function.
12469 * python/py-arch.c (archpy_disassemble): Constify 'keywords'
12470 array and use gdb_PyArg_ParseTupleAndKeywords.
12471 * python/py-cmd.c (cmdpy_init): Likewise.
12472 * python/py-finishbreakpoint.c (bpfinishpy_init): Likewise.
12473 * python/py-inferior.c (infpy_read_memory, infpy_write_memory)
12474 (infpy_search_memory): Likewise.
12475 * python/py-objfile.c (objfpy_add_separate_debug_file)
12476 (gdbpy_lookup_objfile): Likewise.
12477 * python/py-symbol.c (gdbpy_lookup_symbol)
12478 (gdbpy_lookup_global_symbol): Likewise.
12479 * python/py-type.c (gdbpy_lookup_type): Likewise.
12480 * python/py-value.c (valpy_lazy_string, valpy_string): Likewise.
12481 * python/python.c (execute_gdb_command, gdbpy_write, gdbpy_flush):
12482 Likewise.
12483
12484 2017-04-05 Pedro Alves <palves@redhat.com>
12485
12486 * python/python-internal.h (gdb_PyGetSetDef): New type.
12487 * python/py-block.c (block_object_getset)
12488 (breakpoint_object_getset): Now a gdb_PyGetSetDef array.
12489 * python/py-event.c (event_object_getset)
12490 (finish_breakpoint_object_getset): Likewise.
12491 * python/py-inferior.c (inferior_object_getset): Likewise.
12492 * python/py-infthread.c (thread_object_getset): Likewise.
12493 * python/py-lazy-string.c (lazy_string_object_getset): Likewise.
12494 * python/py-linetable.c (linetable_entry_object_getset): Likewise.
12495 * python/py-objfile.c (objfile_getset): Likewise.
12496 * python/py-progspace.c (pspace_getset): Likewise.
12497 * python/py-record-btrace.c (btpy_insn_getset, btpy_call_getset):
12498 Likewise.
12499 * python/py-record.c (recpy_record_getset): Likewise.
12500 * python/py-symbol.c (symbol_object_getset): Likewise.
12501 * python/py-symtab.c (symtab_object_getset, sal_object_getset):
12502 Likewise.
12503 * python/py-type.c (type_object_getset, field_object_getset):
12504 Likewise.
12505 * python/py-value.c (value_object_getset): Likewise.
12506
12507 2017-04-05 Pedro Alves <palves@redhat.com>
12508
12509 * python/python-internal.h (gdb_PyObject_CallMethod)
12510 (gdb_PyErr_NewException, gdb_PySys_GetObject, gdb_PySys_SetPath):
12511 New functions.
12512 (GDB_PYSYS_SETPATH_CHAR, PyObject_CallMethod, PyErr_NewException)
12513 (PySys_GetObject, PySys_SetPath): New macros.
12514
12515 2017-04-05 Pedro Alves <palves@redhat.com>
12516
12517 * mi/mi-cmd-info.c (mi_cmd_info_os): Call info_osdata instead of
12518 info_osdata_command.
12519 * osdata.c (info_osdata_command): Rename to ...
12520 (info_osdata): ... this. Constify 'type' parameter, and remove
12521 the 'from_tty' parameter. Accept NULL TYPE.
12522 (info_osdata_command): New function.
12523 * osdata.h (info_osdata_command): Remove declaration.
12524 (info_osdata): New declaration.
12525
12526 2017-04-05 Pedro Alves <palves@redhat.com>
12527
12528 * mi/mi-cmd-break.c (mi_cmd_break_insert_1, mi_cmd_break_insert)
12529 (mi_cmd_dprintf_insert, mi_cmd_break_passcount)
12530 (mi_cmd_break_watch, mi_cmd_break_commands): Constify 'command'
12531 parameter.
12532 * mi/mi-cmd-catch.c (mi_cmd_catch_assert, mi_cmd_catch_exception)
12533 (mi_cmd_catch_load, mi_cmd_catch_unload): Constify cmd' parameter.
12534 * mi/mi-cmd-disas.c (mi_cmd_disassemble): Constify 'command'
12535 parameter.
12536 * mi/mi-cmd-env.c (mi_cmd_env_pwd, mi_cmd_env_cd, mi_cmd_env_path)
12537 (mi_cmd_env_dir, mi_cmd_inferior_tty_set, _cmd_inferior_tty_show)
12538 * mi/mi-cmd-file.c (mi_cmd_file_list_exec_source_file)
12539 (mi_cmd_file_list_exec_source_files)
12540 (mi_cmd_file_list_shared_libraries): Constify 'command' parameter.
12541 * mi/mi-cmd-info.c (mi_cmd_info_ada_exceptions)
12542 (mi_cmd_info_gdb_mi_command, mi_cmd_info_os): Constify 'command'
12543 parameter.
12544 * mi/mi-cmd-stack.c (mi_cmd_enable_frame_filters)
12545 (mi_cmd_stack_list_frames, mi_cmd_stack_info_depth)
12546 (mi_cmd_stack_list_locals, mi_cmd_stack_list_args)
12547 (mi_cmd_stack_list_variables, mi_cmd_stack_select_frame)
12548 (mi_cmd_stack_info_frame): Constify 'command' parameter.
12549 * mi/mi-cmd-target.c (mi_cmd_target_file_get)
12550 (mi_cmd_target_file_put, mi_cmd_target_file_delete): Constify
12551 'command' parameter.
12552 * mi/mi-cmd-var.c (mi_cmd_var_create, mi_cmd_var_delete)
12553 (mi_cmd_var_set_format, mi_cmd_var_set_visualizer)
12554 (mi_cmd_var_set_frozen, mi_cmd_var_show_format)
12555 (mi_cmd_var_info_num_children, mi_cmd_var_list_children)
12556 (mi_cmd_var_info_type, mi_cmd_var_info_path_expression)
12557 (mi_cmd_var_info_expression, mi_cmd_var_show_attributes)
12558 (mi_cmd_var_evaluate_expression, mi_cmd_var_assign)
12559 (mi_cmd_var_update, mi_cmd_enable_pretty_printing)
12560 (mi_cmd_var_set_update_range): Constify 'command' parameter.
12561 * mi/mi-cmds.h (mi_cmd_argv_ftype): Constify 'command' parameter.
12562 * mi/mi-interp.c (mi_cmd_interpreter_exec): Constify 'command'
12563 parameter.
12564 * mi/mi-main.c (mi_cmd_gdb_exit, mi_cmd_exec_next)
12565 (mi_cmd_exec_next_instruction, mi_cmd_exec_step)
12566 (mi_cmd_exec_step_instruction, mi_cmd_exec_finish)
12567 (mi_cmd_exec_return ,mi_cmd_exec_jump, mi_cmd_exec_continue)
12568 (mi_cmd_exec_interrupt, mi_cmd_exec_run, mi_cmd_target_detach)
12569 (mi_cmd_target_flash_erase, mi_cmd_thread_select)
12570 (mi_cmd_thread_list_ids, mi_cmd_thread_info)
12571 (mi_cmd_list_thread_groups, mi_cmd_data_list_register_names)
12572 (mi_cmd_data_list_changed_registers)
12573 (mi_cmd_data_write_register_values)
12574 (mi_cmd_data_evaluate_expression, mi_cmd_data_read_memory)
12575 (mi_cmd_data_read_memory_bytes, mi_cmd_data_write_memory)
12576 (mi_cmd_data_write_memory_bytes, mi_cmd_enable_timings)
12577 (mi_cmd_list_features, mi_cmd_list_target_features)
12578 (mi_cmd_add_inferior, mi_cmd_remove_inferior)
12579 (mi_cmd_trace_define_variable, mi_cmd_trace_list_variables)
12580 (mi_cmd_trace_find, mi_cmd_trace_save, mi_cmd_trace_start)
12581 (mi_cmd_trace_status, mi_cmd_trace_stop, mi_cmd_ada_task_info)
12582 (mi_cmd_trace_frame_collected): Constify 'command'
12583 parameter.
12584 * mi/mi-symbol-cmds.c (mi_cmd_symbol_list_lines): Constify
12585 'command' parameter.
12586
12587 2017-04-05 Pedro Alves <palves@redhat.com>
12588
12589 * ada-lang.c (ada_completer_word_break_characters): Now a const
12590 array.
12591 (ada_get_gdb_completer_word_break_characters): Constify.
12592 * completer.c (gdb_completer_command_word_break_characters)
12593 (gdb_completer_file_name_break_characters)
12594 (gdb_completer_quote_characters): Now const arrays.
12595 (get_gdb_completer_quote_characters): Constify.
12596 (set_rl_completer_word_break_characters): New function.
12597 (set_gdb_completion_word_break_characters)
12598 (complete_line_internal): Use it.
12599 * completer.h (get_gdb_completer_quote_characters): Constify.
12600 (set_rl_completer_word_break_characters): Declare.
12601 * f-lang.c (f_word_break_characters): Constify.
12602 * language.c (default_word_break_characters): Constify.
12603 * language.h (language_defn::la_word_break_characters): Constify.
12604 (default_word_break_characters): Constify.
12605 * top.c (init_main): Use set_rl_completer_word_break_characters.
12606
12607 2017-04-05 Pedro Alves <palves@redhat.com>
12608
12609 * aix-thread.c (aix_thread_pid_to_str)
12610 (aix_thread_extra_thread_info): Constify.
12611 * bsd-kvm.c (bsd_kvm_pid_to_str): Constify.
12612 * bsd-uthread.c (bsd_uthread_extra_thread_info)
12613 (bsd_uthread_pid_to_str): Constify.
12614 * corelow.c (core_pid_to_str): Constify.
12615 * darwin-nat.c (darwin_pid_to_str): Constify.
12616 * fbsd-nat.c (fbsd_pid_to_str): Constify.
12617 * fbsd-tdep.c (fbsd_core_pid_to_str, gdbarch_core_pid_to_str):
12618 Constify.
12619 * gnu-nat.c (gnu_pid_to_str): Constify.
12620 * go32-nat.c (go32_pid_to_str): Constify.
12621 * i386-cygwin-tdep.c (i386_windows_core_pid_to_str): Constify.
12622 * inf-ptrace.c (inf_ptrace_pid_to_str): Constify.
12623 * inferior.c (inferior_pid_to_str): Constify.
12624 * linux-nat.c (linux_nat_pid_to_str): Constify.
12625 * linux-tdep.c (linux_core_pid_to_str): Constify.
12626 * linux-thread-db.c (thread_db_pid_to_str)
12627 (thread_db_extra_thread_info): Constify.
12628 * nto-tdep.c (nto_extra_thread_info): Constify.
12629 * nto-tdep.h (nto_extra_thread_info): Constify.
12630 * obsd-nat.c (obsd_pid_to_str): Constify.
12631 * procfs.c (procfs_pid_to_str): Constify.
12632 * ravenscar-thread.c (ravenscar_extra_thread_info)
12633 (ravenscar_pid_to_str): Constify.
12634 * remote-sim.c (gdbsim_pid_to_str): Constify.
12635 * remote.c (remote_threads_extra_info, remote_pid_to_str):
12636 Constify.
12637 * sol-thread.c (solaris_pid_to_str): Constify.
12638 * sol2-tdep.c (sol2_core_pid_to_str): Constify.
12639 * sol2-tdep.h (sol2_core_pid_to_str): Constify.
12640 * target.c (default_pid_to_str, target_pid_to_str)
12641 (normal_pid_to_str, default_pid_to_str): Constify.
12642 * target.h (target_ops::to_pid_to_str)
12643 (target_ops::to_extra_thread_info): Constify.
12644 (target_pid_to_str, normal_pid_to_str): Constify.
12645 * windows-nat.c (windows_pid_to_str): Constify.
12646 * gdbarch.sh (core_pid_to_str): Constify.
12647 * target-delegates.c: Regenerate.
12648 * gdbarch.h, gdbarch.c: Regenerate.
12649
12650 2017-04-05 Pedro Alves <palves@redhat.com>
12651
12652 * main.c (captured_main_1): Use gdb::unique_xmalloc_ptr to manage
12653 the memory of the temporary warning_pre_print override.
12654 * utils.c (warning_pre_print): Constify.
12655 * utils.h (warning_pre_print): Constify.
12656
12657 2017-04-05 Pedro Alves <palves@redhat.com>
12658
12659 * cli/cli-cmds.c (shell_escape): Constify 'arg' parameter.
12660 (shell_command): New function.
12661 (make_command): Use std::string.
12662 (init_cli_cmds): Register shell_command instead of shell_escape.
12663
12664 2017-04-05 Pedro Alves <palves@redhat.com>
12665
12666 * breakpoint.c (dprintf_function, dprintf_channel): Don't initialize.
12667 * tracepoint.c (default_collect): Don't initialize.
12668
12669 2017-04-05 Pedro Alves <palves@redhat.com>
12670
12671 * macroexp.c (macro_buffer::shared): Now a bool.
12672 (init_buffer): Update.
12673 (init_shared_buffer): Constify 'addr' parameter.
12674 (substitute_args, expand, macro_expand, macro_expand_next): Remove
12675 casts.
12676
12677 2017-04-05 Pedro Alves <palves@redhat.com>
12678
12679 * arm-tdep.c (show_disassembly_style_sfunc): Constify local.
12680 * disasm.c (set_disassembler_options): Constify local.
12681 * i386-tdep.c (i386_print_insn): Remove cast and FIXME comment.
12682
12683 2017-04-05 Sergio Durigan Junior <sergiodj@redhat.com>
12684
12685 PR gdb/21352
12686 * tracefile.c (tsave_command): Fix argument parsing for '-r'
12687 option.
12688
12689 2017-04-05 Yao Qi <yao.qi@linaro.org>
12690
12691 * frame.c (frame_unwind_register_unsigned): Call
12692 frame_unwind_register_value.
12693
12694 2017-04-05 Yao Qi <yao.qi@linaro.org>
12695
12696 * gdb.threads/thread-specific-bp.exp (check_thread_specific_breakpoint):
12697 Use gdb_test_multiple, and don't match anchor.
12698
12699 2017-04-05 Pedro Alves <palves@redhat.com>
12700
12701 * MAINTAINERS (Global Maintainers): Add Simon Marchi.
12702 (Write After Approval): Remove Simon Marchi.
12703
12704 2017-04-05 Pedro Alves <palves@redhat.com>
12705
12706 * common/gdb_optional.h (optional::optional): Make constexpr and
12707 initialize m_dummy.
12708
12709 2017-04-04 John Baldwin <jhb@FreeBSD.org>
12710
12711 * amd64-fbsd-tdep.c: Remove "bsd-uthread.h" include.
12712 (amd64fbsd_jmp_buf_reg_offset): Remove.
12713 (amd64fbsd_supply_uthread): Remove function.
12714 (amd64fbsd_collect_uthread): Remove function.
12715 (amd64fbsd_init_abi): Don't set bsd-uthread callbacks.
12716 * configure.tgt (i[34567]86-*-freebsd*): Remove bsd-uthread.o.
12717 (x86_64-*-freebsd*): Remove bsd-uthread.o.
12718 (fbsd-nat.c): Update comment.
12719 * i386-fbsd-tdep.c: Remove "bsd-uthread.h" include.
12720 (i386fbsd_jmp_buf_reg_offset): Remove.
12721 (i386fbsd_supply_uthread): Remove function.
12722 (i386fbsd_collect_uthread): Remove function.
12723 (i386fbsd_init_abi): Don't set bsd-uthread callbacks.
12724
12725 2017-04-04 John Baldwin <jhb@FreeBSD.org>
12726
12727 * Makefile.in (ALL_64_TARGET_OBS): Remove alpha-fbsd-tdep.o.
12728 (ALLDEPFILES): Remove alpha-fbsd-tdep.c
12729 * NEWS: Mention that support for FreeBSD/alpha was removed.
12730 * alpha-fbsd-tdep.c: Delete file.
12731 * config/alpha/fbsd.mh: Delete file.
12732 * configure.host: Delete alpha*-*-freebsd* and
12733 alpha*-*-kfreebsd*-gnu.
12734 * configure.tgt: Delete alpha*-*-freebsd* and
12735 alpha*-*-kfreebsd*-gnu.
12736
12737 2017-04-04 John Baldwin <jhb@FreeBSD.org>
12738
12739 * amd64-bsd-nat.c (amd64bsd_fetch_inferior_registers,
12740 amd64bsd_store_inferior_registers): Use ptid from regcache.
12741
12742 2017-04-04 Pedro Alves <palves@redhat.com>
12743
12744 * dwarf2read.c (lnp_state_machine): Now a class. Initialize all
12745 data fields, make them private and add "m_" prefixes.
12746 (lnp_state_machine::lnp_state_machine): New ctor.
12747 (record_line, check_line_address, handle_set_discriminator)
12748 (handle_set_address, handle_advance_pc, handle_special_opcode)
12749 (handle_advance_line, handle_set_file, handle_negate_stmt)
12750 (handle_const_add_pc, handle_fixed_advance_pc, handle_copy)
12751 (end_sequence, advance_line): New methods.
12752 (m_gdbarch, m_record_lines_p): New fields.
12753 (lnp_reader_state): Delete.
12754 (dwarf_record_line): Rename to ...
12755 (lnp_state_machine::record_line): ... adjust.
12756 (init_lnp_state_machine): Delete.
12757 (lnp_state_machine::lnp_state_machine): New.
12758 (check_line_address): Rename to ...
12759 (lnp_state_machine::check_line_address): This.
12760 (dwarf_decode_lines_1): Remove reference to "reader_state".
12761 Adjust lnp_state_machine having a non-default ctor. Use bool.
12762 State machine internal state manipulation moved to
12763 lnp_state_machine methods.
12764
12765 2017-04-04 Pedro Alves <palves@redhat.com>
12766
12767 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
12768 unittests/offset-type-selftests.c.
12769 (SUBDIR_UNITTESTS_OBS): Add offset-type-selftests.o.
12770 * common/offset-type.h: New file.
12771 * common/preprocessor.h: New file.
12772 * common/traits.h: New file.
12773 * common/valid-expr.h: New file.
12774 * dwarf2expr.c: Include "common/underlying.h". Adjust to use
12775 sect_offset and cu_offset strong typedefs throughout.
12776 * dwarf2expr.h: Adjust to use sect_offset and cu_offset strong
12777 typedefs throughout.
12778 * dwarf2loc.c: Include "common/underlying.h". Adjust to use
12779 sect_offset and cu_offset strong typedefs throughout.
12780 * dwarf2read.c: Adjust to use sect_offset and cu_offset strong
12781 typedefs throughout.
12782 * gdbtypes.h: Include "common/offset-type.h".
12783 (cu_offset): Now an offset type (strong typedef) instead of a
12784 struct.
12785 (sect_offset): Likewise.
12786 (union call_site_parameter_u): Rename "param_offset" field to
12787 "param_cu_off".
12788 * unittests/offset-type-selftests.c: New file.
12789
12790 2017-04-04 Pedro Alves <palves@redhat.com>
12791
12792 * common/underlying.h: New file.
12793 * dwarf2read.c: Include "common/gdb_optional.h" and
12794 "common/underlying.h".
12795 (dir_index, file_name_index): New types.
12796 (file_entry): Use them.
12797 (file_entry::include): Use to_underlying.
12798 (line_header::add_file_name): Use dir_index.
12799 (read_formatted_entries): Use gdb::optional. Read form before
12800 writting to file_entry.
12801 (dwarf_decode_line_header): Use dir_index.
12802 (lnp_state_machine::current_file): Use to_underlying.
12803 (lnp_state_machine::file): Change type to file_name_index.
12804 (dwarf_record_line): Use to_underlying.
12805 (init_lnp_state_machine): Use file_name_index.
12806 (dwarf_decode_lines_1): Use dir_index and file_name_index.
12807
12808 2017-04-04 Pedro Alves <palves@redhat.com>
12809
12810 * common/gdb_optional.h (gdb::optiona): Add operator->, operator*,
12811 operator bool, has_value and get methods.
12812
12813 2017-04-04 Pedro Alves <palves@redhat.com>
12814
12815 * dwarf2read.c (struct file_entry): Add ctors, and initialize all
12816 fields.
12817 (line_header): Initialize all data fields. Change type of
12818 standard_opcode_lengths to std::unique_ptr<unsigned char[]>.
12819 Change type of include_dirs to std::vector<const char *>. Remove
12820 num_include_dirs, include_dirs_size. Change type of file_names to
12821 std::vector<file_entry>. Remove num_file_names, file_names_size.
12822 (line_header::line_header): New.
12823 (line_header::add_include_dir, line_header::add_file_name): New
12824 methods.
12825 (line_header::include_dir_at): Remove NULL check.
12826 (line_header::file_name_at): Add const overload.
12827 (line_header_up): New unique_ptr typedef.
12828 (dw2_get_file_names_reader): Use line_header_up. Adjust to use
12829 std::vector. Remove free_line_header call.
12830 (dwarf2_build_include_psymtabs): Use line_header_up. Remove
12831 free_line_header call.
12832 (free_cu_line_header): Delete.
12833 (handle_DW_AT_stmt_list, handle_DW_AT_stmt_list)
12834 (setup_type_unit_groups): Use line_header_up instead of cleanups.
12835 Adjust to use std::vector.
12836 (free_line_header): Delete.
12837 (free_line_header_voidp): Use delete.
12838 (add_include_dir): Replace with ...
12839 (line_header::add_include_dir): ... this method. Use std::vector.
12840 (add_file_name): Replace with ...
12841 (line_header::add_file_name): ... this method. Use std::vector.
12842 (add_include_dir_stub): Delete.
12843 (read_formatted_entries): Remove memset.
12844 (dwarf_decode_line_header): Return a line_header_up instead of a
12845 raw pointer. Remove cleanup handling. Pass lambdas to
12846 read_formatted_entries. Adjust to use line_header methods.
12847 (dwarf_decode_lines_1): Adjust to use line_header methods.
12848 (dwarf_decode_lines, file_file_name, file_full_name): Adjust to
12849 use std::vector.
12850
12851 2017-04-04 Simon Marchi <simon.marchi@polymtl.ca>
12852
12853 * remote.c (set_general_thread, set_continue_thread): Use ptid_t
12854 instead of struct ptid.
12855
12856 2017-05-04 Alan Hayward <alan.hayward@arm.com>
12857
12858 * frame.c (get_frame_register_bytes): Unwind using value.
12859 (put_frame_register_bytes): Likewise.
12860
12861 2017-03-30 Iain Buclaw <ibuclaw@gdcproject.org>
12862
12863 * d-exp.y (type_aggregate_p): Treat TYPE_CODE_MODULE as being
12864 aggregate-like.
12865
12866 2017-03-29 Jan Kratochvil <jan.kratochvil@redhat.com>
12867
12868 * auto-load.c (auto_load_section_scripts): Check SEC_HAS_CONTENTS.
12869
12870 2017-03-29 Yao Qi <yao.qi@linaro.org>
12871
12872 * gdbthread.h (struct thread_info): Declare constructor and
12873 destructor. Add some in-class member initializers.
12874 * thread.c (free_thread): Remove.
12875 (init_thread_list): Call delete instead of free_thread.
12876 (new_thread): Call thread_info constructor.
12877 (thread_info::thread_info): New function.
12878 (thread_info::~thread_info): New function.
12879 (delete_thread_1): Call delete instead of free_thread.
12880 (make_cleanup_restore_current_thread): Move tp and frame to
12881 inner block.
12882
12883 2017-03-28 Anton Kolesov <anton.kolesov@synopsys.com>
12884
12885 * arc-tdep.c (arc_frame_cache): Add support for prologue analysis.
12886 (arc_skip_prologue): Likewise.
12887 (arc_make_frame_cache): Likewise.
12888 (arc_pv_get_operand): New function.
12889 (arc_is_in_prologue): Likewise.
12890 (arc_analyze_prologue): Likewise.
12891 (arc_print_frame_cache): Likewise.
12892 (MAX_PROLOGUE_LENGTH): New constant.
12893
12894 2017-03-28 Anton Kolesov <anton.kolesov@synopsys.com>
12895
12896 * configure.tgt: Add arc-insn.o.
12897 * arc-tdep.c (arc_delayed_print_insn): Make non-static.
12898 (dump_arc_instruction_command): New function.
12899 (arc_fprintf_disasm): Likewise.
12900 (arc_disassemble_info): Likewise.
12901 (arc_insn_get_operand_value): Likewise.
12902 (arc_insn_get_operand_value_signed): Likewise.
12903 (arc_insn_get_memory_base_reg): Likewise.
12904 (arc_insn_get_memory_offset): Likewise.
12905 (arc_insn_get_branch_target): Likewise.
12906 (arc_insn_dump): Likewise.
12907 (arc_insn_get_linear_next_pc): Likewise.
12908 * arc-tdep.h (arc_delayed_print_insn): Add function declaration.
12909 (arc_disassemble_info): Likewise.
12910 (arc_insn_get_branch_target): Likewise.
12911 (arc_insn_get_linear_next_pc): Likewise.
12912 * NEWS: Mention new "maint print arc arc-instruction".
12913
12914 2017-03-28 Anton Kolesov <anton.kolesov@synopsys.com>
12915
12916 * arc-tdep (maintenance_print_arc_list): New variable.
12917 (maintenance_print_arc_command): New function.
12918
12919 2017-03-28 Anton Kolesov <anton.kolesov@synopsys.com>
12920
12921 * arc-tdep.c (core_v2_register_names, core_arcompact_register_names)
12922 Add "limm" and "reserved".
12923 (arc_cannot_fetch_register, arc_cannot_store_register): Add
12924 ARC_RESERVED_REGNUM and ARC_LIMM_REGNUM.
12925 * arc-tdep.h (arc_regnum): Likewise.
12926
12927 2017-03-27 Max Filippov <jcmvbkbc@gmail.com>
12928
12929 * xtensa-linux-nat.c (fill_gregset): Call regcache_raw_collect
12930 for THREADPTR register.
12931 (supply_gregset_reg): Call regcache_raw_supply for THREADPTR
12932 register.
12933 * xtensa-tdep.c (XTENSA_DBREGN_UREG): New definition.
12934 (xtensa_derive_tdep): Initialize tdep->threadptr_regnum.
12935 * xtensa-tdep.h (gdbarch_tdep::threadptr_regnum): New field.
12936
12937 2017-03-27 Max Filippov <jcmvbkbc@gmail.com>
12938
12939 * xtensa-tdep.c (xtensa_pseudo_register_read): Treat all
12940 registers above gdbarch_num_regs (gdbarch) as privileged in
12941 call0 ABI.
12942
12943 2017-03-27 Max Filippov <jcmvbkbc@gmail.com>
12944
12945 * xtensa-linux-nat.c (fill_gregset): Call regcache_raw_collect
12946 for a single specified register or for all registers in
12947 a0_base..a0_base + C0_NREGS range.
12948 (supply_gregset_reg): Call regcache_raw_supply for a single
12949 specified register or for all registers in a0_base..a0_base +
12950 C0_NREGS range.
12951
12952 2017-03-27 Max Filippov <jcmvbkbc@gmail.com>
12953
12954 * arch/xtensa.h (C0_NREGS): Add definition.
12955 * xtensa-tdep.c (C0_NREGS): Remove definition.
12956
12957 2017-03-27 Max Filippov <jcmvbkbc@gmail.com>
12958
12959 * xtensa-tdep.c (xtensa_scan_prologue, call0_analyze_prologue):
12960 Drop xtensa_default_isa initialization.
12961 (xtensa_gdbarch_init): Initialize xtensa_default_isa.
12962
12963 2017-03-27 Pedro Alves <palves@redhat.com>
12964
12965 * dwarf2read.c (file_entry) <dir_index>: Add comment.
12966 (file_entry::include_dir): New method.
12967 (line_header::include_dir_at, line_header::file_name_at): New
12968 methods.
12969 (setup_type_unit_groups, setup_type_unit_groups)
12970 (psymtab_include_file_name): Simplify using the new methods.
12971 (lnp_state_machine) <the_line_header>: New field.
12972 <file>: Add comment.
12973 (lnp_state_machine::current_file): New method.
12974 (dwarf_record_line): Simplify using the new methods.
12975 (init_lnp_state_machine): Initialize the "the_line_header" field.
12976 (dwarf_decode_lines_1, dwarf_decode_lines, file_file_name):
12977 Simplify using the new methods.
12978
12979 2017-03-27 Pedro Alves <palves@redhat.com>
12980
12981 * cp-name-parser.y (make_empty): Delete.
12982 (demangler_special, nested_name, ptr_operator, array_indicator)
12983 (direct_declarator, declarator_1): Use fill_comp instead of
12984 make_empty.
12985
12986 2017-03-27 Pedro Alves <palves@redhat.com>
12987
12988 * xml-support.h (gdb_xml_debug): Pass a "first-to-check" argument
12989 to ATTRIBUTE_PRINTF.
12990 * solib-target.c (library_list_start_list): Print "string" not
12991 "version".
12992 * xml-tdesc.c (tdesc_start_field): Pass "field_name" to
12993 gdb_xml_error call.
12994
12995 2017-03-27 Pedro Alves <palves@redhat.com>
12996
12997 * dwarf2read.c (struct file_and_directory): New.
12998 (dwarf2_get_dwz_file): Adjust to use std::string.
12999 (dw2_get_file_names_reader): Adjust to use file_and_directory.
13000 (find_file_and_directory): Adjust to return a file_and_directory
13001 object.
13002 (read_file_scope): Adjust to use file_and_directory. Remove
13003 make_cleanup/do_cleanups calls.
13004 (open_and_init_dwp_file): Adjust to use std::string. Remove
13005 make_cleanup/do_cleanups calls.
13006 * python/python.c (do_start_initialization): Adjust to ldirname
13007 returning a std::string.
13008 * utils.c (ldirname): Now returns a std::string.
13009 * utils.h (ldirname): Change return type to std::string.
13010 * xml-syscall.c (xml_init_syscalls_info): Adjust to ldirname
13011 returning a std::string.
13012 * xml-tdesc.c (file_read_description_xml): Likewise.
13013
13014 2017-03-24 Alan Hayward <alan.hayward@arm.com>
13015
13016 * regcache.c (regcache_debug_print_register): New function.
13017 * regcache.h (regcache_debug_print_register): New declaration.
13018 * target.c (debug_print_register): Remove.
13019 (target_fetch_registers): Call regcache_debug_print_register.
13020 (target_store_registers): Likewise.
13021
13022 2017-03-24 Pádraig Brady <pbrady@fb.com>
13023
13024 * dwarf2read.c (setup_type_unit_groups): Ensure dir_index doesn't
13025 reference beyond the 'lh->include_dirs' array before accessing to
13026 it.
13027 (psymtab_include_file_name): Likewise.
13028 (dwarf_decode_lines_1): Likewise.
13029 (dwarf_decode_lines): Likewise.
13030 (file_file_name): Likewise.
13031
13032 2017-03-23 Simon Marchi <simon.marchi@ericsson.com>
13033
13034 * fbsd-tdep.c (fbsd_corefile_thread): Don't set/restore
13035 inferior_ptid.
13036 * proc-service.c (ps_lgetregs, ps_lsetregs, ps_lgetfpregs,
13037 ps_lsetfpregs): Likewise.
13038 * regcache.c (regcache_raw_update, regcache_raw_write): Likewise.
13039 * sol-thread.c (ps_lgetregs, ps_lsetregs, ps_lgetfpregs,
13040 ps_lsetfpregs): Likewise.
13041 * target.c (target_fetch_registers, target_store_registers):
13042 Remove asserts.
13043
13044 2017-03-23 Alan Hayward <alan.hayward@arm.com>
13045
13046 * sol-thread.c (sol_thread_store_registers): Remove regcache calls.
13047
13048 2017-03-23 Yao Qi <yao.qi@linaro.org>
13049
13050 * aarch64-tdep.c (aarch64_process_record_test): Declare.
13051 (_initialize_aarch64_tdep): Register it.
13052 (aarch64_record_load_store): Handle PRFM instruction.
13053 (aarch64_process_record_test): New function.
13054
13055 2017-03-23 Yao Qi <yao.qi@linaro.org>
13056
13057 * aarch64-tdep.c (aarch64_record_load_store): Fix code
13058 indentation.
13059
13060 2017-03-23 Yao Qi <yao.qi@linaro.org>
13061
13062 * aarch64-tdep.c: Remove AARCH64_RECORD_FAILURE.
13063
13064 2017-03-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
13065
13066 python/python.c (do_start_initialization): Fix memory leak.
13067
13068 2017-03-22 Simon Marchi <simon.marchi@polymtl.ca>
13069
13070 * inf-ptrace.c (inf_ptrace_xfer_partial): Get pid from ptid
13071 using get_ptrace_pid.
13072 * linux-nat.c (linux_nat_xfer_partial): Don't set/restore
13073 inferior_ptid.
13074 (linux_proc_xfer_partial, linux_proc_xfer_spu): Use lwp of
13075 inferior_ptid instead of pid.
13076
13077 2017-03-22 Yao Qi <yao.qi@linaro.org>
13078
13079 * aarch64-tdep.c: Wrap locally used classes in anonymous
13080 namespace.
13081 * arm-tdep.c: Likewise.
13082 * linespec.c: Likewise.
13083 * ui-out.c: Likewise.
13084
13085 2017-03-22 Jonah Graham <jonah@kichwacoders.com>
13086
13087 PR gdb/19637
13088 * python/lib/gdb/printer/bound_registers.py: Import sys.
13089
13090 2017-03-21 Simon Marchi <simon.marchi@ericsson.com>
13091
13092 * windows-nat.c (do_windows_fetch_inferior_registers): Add
13093 windows_thread_info parameter and use it instead of
13094 current_thread.
13095 (windows_fetch_inferior_registers): Don't set current_thread,
13096 pass the thread to do_windows_fetch_inferior_registers. Use
13097 ptid from regcache instead of inferior_ptid.
13098 (do_windows_store_inferior_registers): Add windows_thread_info
13099 parameter and use it instead of current_thread.
13100 (windows_store_inferior_registers): Don't set current_thread,
13101 pass the thread to do_windows_store_inferior_registers. Use
13102 ptid from regcache instead of inferior_ptid.
13103
13104 2017-03-21 Simon Marchi <simon.marchi@ericsson.com>
13105
13106 * ser-mingw.c (ser_windows_raw): Remove reference to
13107 struct serial::current_timeout.
13108
13109 2017-03-21 Ivo Raisr <ivo.raisr@oracle.com>
13110
13111 PR tdep/20928
13112 * gdb/sparc-tdep.h (gdbarch_tdep) <sparc64_ccr_type>: New field.
13113 * gdb/sparc64-tdep.c (sparc64_ccr_type): New function.
13114 (sparc64_fsr_type): Fix %fsr decoding.
13115
13116 2017-03-21 Tim Wiederhake <tim.wiederhake@intel.com>
13117
13118 * python/py-record-btrace.c (btpy_insn_data): Change return type
13119 for Python 2.
13120
13121 2017-03-20 Simon Marchi <simon.marchi@polymtl.ca>
13122
13123 * spu-linux-nat.c (spu_fetch_inferior_registers,
13124 spu_store_inferior_registers): Use ptid from regcache, set and
13125 restore inferior_ptid.
13126 * spu-multiarch.c (spu_fetch_registers, spu_store_registers):
13127 Likewise.
13128
13129 2017-03-20 Simon Marchi <simon.marchi@polymtl.ca>
13130
13131 * i386-linux-nat.c (fetch_register, store_register,
13132 i386_linux_fetch_inferior_registers,
13133 i386_linux_store_inferior_registers): Use ptid from regcache.
13134 * ia64-linux-nat.c (ia64_linux_fetch_register,
13135 ia64_linux_store_register): Likewise.
13136 * inf-ptrace.c (inf_ptrace_fetch_register,
13137 inf_ptrace_store_register): Likewise.
13138 * m32r-linux-nat.c (m32r_linux_fetch_inferior_registers,
13139 m32r_linux_store_inferior_registers): Likewise.
13140 * m68k-bsd-nat.c (m68kbsd_fetch_inferior_registers,
13141 m68kbsd_store_inferior_registers): Likewise.
13142 * m68k-linux-nat.c (fetch_register, store_register,
13143 m68k_linux_fetch_inferior_registers,
13144 m68k_linux_store_inferior_registers): Likewise.
13145 * m88k-bsd-nat.c (m88kbsd_fetch_inferior_registers,
13146 m88kbsd_store_inferior_registers): Likewise.
13147 * mips-fbsd-nat.c (mips_fbsd_fetch_inferior_registers,
13148 mips_fbsd_store_inferior_registers): Likewise.
13149 * mips-linux-nat.c (mips64_linux_regsets_fetch_registers,
13150 mips64_linux_regsets_store_registers): Likewise.
13151 * mips-nbsd-nat.c (mipsnbsd_fetch_inferior_registers,
13152 mipsnbsd_store_inferior_registers): Likewise.
13153 * mips-obsd-nat.c (mips64obsd_fetch_inferior_registers,
13154 mips64obsd_store_inferior_registers): Likewise.
13155 * nto-procfs.c (procfs_fetch_registers, procfs_store_registers):
13156 Likewise.
13157 * ppc-fbsd-nat.c (ppcfbsd_fetch_inferior_registers,
13158 ppcfbsd_store_inferior_registers): Likewise.
13159 * ppc-linux-nat.c (ppc_linux_fetch_inferior_registers,
13160 ppc_linux_store_inferior_registers): Likewise.
13161 * ppc-nbsd-nat.c (ppcnbsd_fetch_inferior_registers,
13162 ppcnbsd_store_inferior_registers): Likewise.
13163 * ppc-obsd-nat.c (ppcobsd_fetch_registers,
13164 ppcobsd_store_registers): Likewise.
13165 * procfs.c (procfs_fetch_registers, procfs_store_registers):
13166 Likewise.
13167 * ravenscar-thread.c (ravenscar_fetch_registers,
13168 ravenscar_store_registers, ravenscar_prepare_to_store):
13169 Likewise.
13170 * record-btrace.c (record_btrace_fetch_registers,
13171 record_btrace_store_registers, record_btrace_prepare_to_store):
13172 Likewise.
13173 * remote-sim.c (gdbsim_fetch_register, gdbsim_store_register):
13174 Lookup inferior using ptid from regcache, instead of
13175 current_inferior.
13176 * remote.c (remote_fetch_registers, remote_store_registers): Use
13177 ptid from regcache.
13178 * rs6000-nat.c (fetch_register, store_register): Likewise.
13179 * s390-linux-nat.c (s390_linux_fetch_inferior_registers,
13180 s390_linux_store_inferior_registers): Likewise.
13181 * sh-nbsd-nat.c (shnbsd_fetch_inferior_registers,
13182 shnbsd_store_inferior_registers): Likewise.
13183 * sol-thread.c (sol_thread_fetch_registers,
13184 sol_thread_store_registers): Likewise.
13185 * sparc-nat.c (sparc_fetch_inferior_registers,
13186 sparc_store_inferior_registers): Likewise.
13187 * tilegx-linux-nat.c (fetch_inferior_registers,
13188 store_inferior_registers): Likewise.
13189 * vax-bsd-nat.c (vaxbsd_fetch_inferior_registers,
13190 vaxbsd_store_inferior_registers): Likewise.
13191 * xtensa-linux-nat.c (fetch_gregs, store_gregs, fetch_xtregs,
13192 store_xtregs): Likewise.
13193
13194 2017-03-20 Artemiy Volkov <artemiyv@acm.org>
13195
13196 PR gdb/14441
13197 * NEWS: Mention support for rvalue references in GDB and python.
13198 * doc/gdb.texinfo (C Plus Plus Expressions): Mention that GDB
13199 supports both lvalue and rvalue references.
13200
13201 2017-03-20 Artemiy Volkov <artemiyv@acm.org>
13202
13203 PR gdb/14441
13204 * gdbtypes.c (rank_one_type): Implement overloading
13205 resolution rules regarding rvalue references.
13206
13207 2017-03-20 Artemiy Volkov <artemiyv@acm.org>
13208
13209 PR gdb/14441
13210 * aarch64-tdep.c (aarch64_type_align)
13211 (aarch64_extract_return_value, aarch64_store_return_value): Change
13212 lvalue reference type checks to general reference type checks.
13213 * amd64-tdep.c (amd64_classify): Likewise.
13214 * amd64-windows-tdep.c (amd64_windows_passed_by_integer_register):
13215 Likewise.
13216 * arm-tdep.c (arm_type_align, arm_extract_return_value)
13217 (arm_store_return_value): Likewise.
13218 * ax-gdb.c (gen_fetch, gen_cast): Likewise.
13219 * c-typeprint.c (c_print_type): Likewise.
13220 * c-varobj.c (adjust_value_for_child_access, c_value_of_variable)
13221 (cplus_number_of_children, cplus_describe_child): Likewise.
13222 * compile/compile-c-symbols.c (generate_vla_size): Likewise.
13223 * completer.c (expression_completer): Likewise.
13224 * cp-support.c (make_symbol_overload_list_adl_namespace):
13225 Likewise.
13226 * darwin-nat-info.c (info_mach_region_command): Likewise.
13227 * dwarf2loc.c (entry_data_value_coerce_ref)
13228 (value_of_dwarf_reg_entry): Likewise.
13229 * eval.c (ptrmath_type_p, evaluate_subexp_standard)
13230 (evaluate_subexp_for_address, evaluate_subexp_for_sizeof):
13231 Likewise.
13232 * findvar.c (extract_typed_address, store_typed_address):
13233 Likewise.
13234 * gdbtypes.c (rank_one_type): Likewise.
13235 * hppa-tdep.c (hppa64_integral_or_pointer_p): Likewise.
13236 * infcall.c (value_arg_coerce): Likewise.
13237 * language.c (pointer_type): Likewise.
13238 * m32c-tdep.c (m32c_reg_arg_type, m32c_m16c_address_to_pointer):
13239 Likewise.
13240 * m88k-tdep.c (m88k_integral_or_pointer_p): Likewise.
13241 * mn10300-tdep.c (mn10300_type_align): Likewise.
13242 * msp430-tdep.c (msp430_push_dummy_call): Likewise.
13243 * ppc-sysv-tdep.c (do_ppc_sysv_return_value)
13244 (ppc64_sysv_abi_push_param, ppc64_sysv_abi_return_value):
13245 Likewise.
13246 * printcmd.c (print_formatted, x_command): Likewise.
13247 * python/py-type.c (typy_get_composite, typy_template_argument):
13248 Likewise.
13249 * python/py-value.c (valpy_referenced_value)
13250 (valpy_get_dynamic_type, value_has_field): Likewise.
13251 * s390-linux-tdep.c (s390_function_arg_integer): Likewise.
13252 * sparc-tdep.c (sparc_integral_or_pointer_p): Likewise.
13253 * sparc64-tdep.c (sparc64_integral_or_pointer_p): Likewise.
13254 * spu-tdep.c (spu_scalar_value_p): Likewise.
13255 * symtab.c (lookup_symbol_aux): Likewise.
13256 * typeprint.c (whatis_exp, print_type_scalar): Likewise.
13257 * valarith.c (binop_types_user_defined_p, unop_user_defined_p):
13258 Likewise.
13259 * valops.c (value_cast_pointers, value_cast)
13260 (value_reinterpret_cast, value_dynamic_cast, value_addr, typecmp)
13261 (value_struct_elt, value_struct_elt_bitpos)
13262 (value_find_oload_method_list, find_overload_match)
13263 (value_rtti_indirect_type): Likewise.
13264 * valprint.c (val_print_scalar_type_p, generic_val_print):
13265 Likewise.
13266 * value.c (value_actual_type, value_as_address, unpack_long)
13267 (pack_long, pack_unsigned_long, coerce_ref_if_computed)
13268 (coerce_ref): Likewise.
13269 * varobj.c (varobj_get_value_type): Likewise.
13270
13271 2017-03-20 Artemiy Volkov <artemiyv@acm.org>
13272
13273 PR gdb/14441
13274 * doc/python.texi (Types in Python): Add TYPE_CODE_RVALUE_REF to
13275 table of constants.
13276 * python/lib/gdb/command/explore.py: Support exploring values
13277 of rvalue reference types.
13278 * python/lib/gdb/types.py: Implement get_basic_type() for
13279 rvalue reference types.
13280 * python/py-type.c (pyty_codes) <TYPE_CODE_RVALUE_REF>: New
13281 constant.
13282 * python/py-value.c (valpy_getitem): Add an rvalue reference
13283 check.
13284 (valpy_reference_value): Add new parameter "refcode".
13285 (valpy_lvalue_reference_value, valpy_rvalue_reference_value):
13286 New wrappers for valpy_reference_value().
13287 * python/py-xmethods.c (gdbpy_get_xmethod_result_type)
13288 (gdbpy_invoke_xmethod): Likewise.
13289
13290 2017-03-20 Artemiy Volkov <artemiyv@acm.org>
13291
13292 PR gdb/14441
13293 * dwarf2read.c (process_die, read_type_die_1): Handle the
13294 DW_TAG_rvalue_reference_type DIE.
13295 (read_tag_reference_type): Add new parameter "refcode".
13296
13297 2017-03-20 Artemiy Volkov <artemiyv@acm.org>
13298
13299 PR gdb/14441
13300 * c-typeprint.c (c_print_type, c_type_print_varspec_prefix)
13301 (c_type_print_modifier, c_type_print_varspec_suffix)
13302 (c_type_print_base): Support printing rvalue reference types.
13303 * c-valprint.c (c_val_print, c_value_print): Support printing
13304 rvalue reference values.
13305
13306 2017-03-20 Artemiy Volkov <artemiyv@acm.org>
13307
13308 PR gdb/14441
13309 * cp-name-parser.y (ptr_operator): Handle the '&&' token in
13310 typename.
13311 * cp-support.c (replace_typedefs): Handle
13312 DEMANGLE_COMPONENT_RVALUE_REFERENCE.
13313 * python/py-type.c (typy_lookup_type): Likewise.
13314
13315 2017-03-20 Artemiy Volkov <artemiyv@acm.org>
13316
13317 PR gdb/14441
13318 * c-exp.y (ptr_operator): Handle the '&&' token in the typename.
13319 * parse.c (insert_type): Change assert statement.
13320 (follow_types): Handle rvalue reference types.
13321 * parser-defs.h (enum type_pieces) <tp_rvalue_reference>: New
13322 constant.
13323
13324 2017-03-20 Artemiy Volkov <artemiyv@acm.org>
13325
13326 PR gdb/14441
13327 * ada-lang.c (ada_evaluate_subexp): Adhere to the new
13328 value_ref() interface.
13329 * c-valprint.c (c_value_print): Likewise.
13330 * infcall.c (value_arg_coerce): Likewise.
13331 * python/py-value.c (valpy_reference_value): Likewise.
13332 * valops.c (value_cast, value_reinterpret_cast)
13333 (value_dynamic_cast, typecmp): Likewise.
13334 (value_ref): Parameterize by kind of return value reference type.
13335 * value.h (value_ref): Add new parameter "refcode".
13336
13337 2017-03-20 Artemiy Volkov <artemiyv@acm.org>
13338
13339 PR gdb/14441
13340 * dwarf2read.c (read_tag_reference_type): Use
13341 lookup_lvalue_reference_type() instead of lookup_reference_type().
13342 * eval.c (evaluate_subexp_standard): Likewise.
13343 * f-exp.y: Likewise.
13344 * gdbtypes.c (make_reference_type, lookup_reference_type):
13345 Generalize with rvalue reference types.
13346 (lookup_lvalue_reference_type, lookup_rvalue_reference_type): New
13347 convenience wrappers for lookup_reference_type().
13348 * gdbtypes.h (make_reference_type, lookup_reference_type): Add a
13349 reference kind parameter.
13350 (lookup_lvalue_reference_type, lookup_rvalue_reference_type): Add
13351 wrappers for lookup_reference_type().
13352 * guile/scm-type.c (gdbscm_type_reference): Use
13353 lookup_lvalue_reference_type() instead of lookup_reference_type().
13354 * guile/scm-value.c (gdbscm_value_dynamic_type): Likewise.
13355 * parse.c (follow_types): Likewise.
13356 * python/py-type.c (typy_reference, typy_lookup_type): Likewise.
13357 * python/py-value.c (valpy_get_dynamic_type, valpy_getitem):
13358 Likewise.
13359 * python/py-xmethods.c (gdbpy_get_xmethod_result_type)
13360 (gdbpy_invoke_xmethod): Likewise.
13361 * stabsread.c: Provide extra argument to make_reference_type()
13362 call.
13363 * valops.c (value_ref, value_rtti_indirect_type): Use
13364 lookup_lvalue_reference_type() instead of lookup_reference_type().
13365
13366 2017-03-20 Artemiy Volkov <artemiyv@acm.org>
13367
13368 PR gdb/14441
13369 * gdbtypes.h (enum type_code) <TYPE_CODE_RVALUE_REF>: New constant.
13370 (TYPE_IS_REFERENCE): New macro.
13371 (struct type): Add rvalue_reference_type field.
13372 (TYPE_RVALUE_REFERENCE_TYPE): New macro.
13373
13374 2017-03-20 Marc-Andre Laperle <marc-andre.laperle@ericsson.com>
13375
13376 * NEWS: Add an entry about new '-file-list-shared-libraries' command.
13377 * mi/mi-cmd-file.c (mi_cmd_file_list_shared_libraries):
13378 New function definition.
13379 * mi/mi-cmds.c (mi_cmds): Add -file-list-shared-libraries command.
13380 * mi/mi-cmds.h (mi_cmd_file_list_shared_libraries):
13381 New function declaration.
13382 * mi/mi-interp.c (mi_output_solib_attribs): New Function.
13383 * mi/mi-interp.h: New file.
13384 * solib.c (info_sharedlibrary_command): Replace for loop with
13385 ALL_SO_LIBS macro
13386 * solib.h (update_solib_list): New function declaration.
13387 (so_list_head): Move macro.
13388 * solist.h (ALL_SO_LIBS): New macro.
13389
13390 2017-03-20 Marc-Andre Laperle <marc-andre.laperle@ericsson.com>
13391
13392 * infcmd.c (post_create_inferior): Remove unused argument in
13393 call to solib_add.
13394 * remote.c (remote_start_remote): Likewise.
13395 * solib-frv.c (frv_fetch_objfile_link_map): Likewise.
13396 * solib-svr4.c: (svr4_fetch_objfile_link_map): Likewise.
13397 (enable_break): Likewise.
13398 * solib.c (update_solib_list): Remove unused target argument
13399 and its documentation.
13400 (solib_add): Remove unused target argument. Remove unused
13401 argument in call to update_solib_list.
13402 (info_sharedlibrary_command): Remove unused argument in call
13403 to update_solib_list.
13404 (sharedlibrary_command): Remove unused argument in call to
13405 solib_add.
13406 (handle_solib_event): Likewise.
13407 (reload_shared_libraries): Likewise.
13408 * solib.h (solib_add): Remove unused target argument.
13409
13410 2017-03-20 Andreas Arnez <arnez@linux.vnet.ibm.com>
13411
13412 * s390-linux-tdep.c (is_rsi, is_rie): Remove functions.
13413 (s390_displaced_step_fixup): Cover relative branches with the
13414 default fixup handling. This fixes lack of support for some
13415 relative branch instructions.
13416
13417 2017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
13418
13419 * i386-gnu-nat.c (gnu_fetch_registers, gnu_store_registers): Use
13420 ptid from regcache.
13421
13422 2017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
13423
13424 * i386-darwin-nat.c (i386_darwin_fetch_inferior_registers,
13425 i386_darwin_store_inferior_registers): Use ptid from regcache.
13426
13427 2017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
13428
13429 * i386-bsd-nat.c (i386bsd_fetch_inferior_registers,
13430 i386bsd_store_inferior_registers): Use ptid from regcache.
13431
13432 2017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
13433
13434 * hppa-obsd-nat.c (hppaobsd_fetch_registers,
13435 hppaobsd_store_registers): Use ptid from regcache.
13436
13437 2017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
13438
13439 * hppa-nbsd-nat.c (hppanbsd_fetch_registers,
13440 hppanbsd_store_registers): Use ptid from regcache.
13441
13442 2017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
13443
13444 * hppa-linux-nat.c (fetch_register, store_register): Use ptid
13445 from regcache. Use get_ptrace_pid.
13446
13447 2017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
13448
13449 * corelow.c (get_core_register_section): Use ptid from regcache,
13450 update doc.
13451
13452 2017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
13453
13454 * bsd-uthread.c (bsd_uthread_fetch_registers,
13455 bsd_uthread_store_registers): Use ptid from regcache, set and
13456 restore inferior_ptid.
13457
13458 2017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
13459
13460 * arm-nbsd-nat.c (fetch_register, fetch_regs, fetch_fp_register,
13461 fetch_fp_regs, store_register, store_regs, store_fp_register,
13462 store_fp_regs): Use ptid from regcache.
13463
13464 2017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
13465
13466 * arm-linux-nat.c (fetch_fpregs, store_fpregs, fetch_regs,
13467 store_regs, fetch_wmmx_regs, store_wmmx_regs, fetch_vfp_regs,
13468 store_vfp_regs): Use ptid from regcache.
13469
13470 2017-03-17 Pedro Alves <palves@redhat.com>
13471
13472 PR remote/21188
13473 * ser-base.c (ser_base_wait_for): Add comment.
13474 (do_ser_base_readchar): Improve comment based on the ser-unix.c's
13475 version.
13476 * ser-unix.c (hardwire_raw): Remove reference to
13477 scb->current_timeout.
13478 (wait_for, do_hardwire_readchar, hardwire_readchar): Delete.
13479 (hardwire_ops): Install ser_base_readchar instead of
13480 hardwire_readchar.
13481 * serial.h (struct serial) <current_timeout, timeout_remaining>:
13482 Remove fields.
13483
13484 2017-03-17 Jonah Graham <jonah@kichwacoders.com>
13485
13486 PR gdb/19637
13487 * python/lib/gdb/printer/bound_registers.py: Add support for
13488 Python 3.
13489
13490 2017-03-16 Andreas Arnez <arnez@linux.vnet.ibm.com>
13491
13492 * dwarf2loc.c (indirect_synthetic_pointer): Get data type of
13493 pointed-to DIE and pass it to dwarf2_evaluate_loc_desc_full.
13494 (dwarf2_evaluate_loc_desc_full): New parameter subobj_type; rename
13495 byte_offset to subobj_byte_offset. Fix the handling of
13496 DWARF_VALUE_STACK on big-endian targets when coming via an
13497 implicit pointer.
13498 (dwarf2_evaluate_loc_desc): Adjust call to
13499 dwarf2_evaluate_loc_desc_full.
13500 * dwarf2loc.h (dwarf2_fetch_die_type_sect_off): New declaration.
13501 * dwarf2read.c (dwarf2_fetch_die_type_sect_off): New function.
13502
13503 2017-03-16 Yao Qi <yao.qi@linaro.org>
13504
13505 * arm-tdep.c (thumb_record_misc): Decode CBNZ, CBZ, REV16,
13506 and REVSH instructions.
13507
13508 2017-03-16 Yao Qi <yao.qi@linaro.org>
13509
13510 * arm-tdep.c [GDB_SELF_TEST]: include "selftests.h".
13511 (arm_record_test): Declare.
13512 (_initialize_arm_tdep) [GDB_SELF_TEST]: call register_self_test.
13513 (thumb_record_ld_st_reg_offset): Rewrite the opcode matching to
13514 align with the manual.
13515 (thumb_record_misc): Adjust the code order to align with the
13516 manual.
13517 (thumb2_record_decode_insn_handler): Fix instruction matching.
13518 (instruction_reader_thumb): New class.
13519 (arm_record_test): New function.
13520
13521 2017-03-16 Yao Qi <yao.qi@linaro.org>
13522
13523 * arm-tdep.c (abstract_memory_reader): New class.
13524 (instruction_reader): New class.
13525 (extract_arm_insn): Add argument 'reader'. Callers updated.
13526 (decode_insn): Likewise.
13527
13528 2017-03-16 Doug Evans <dje@google.com>
13529
13530 * guile/scm-lazy-string.c (lazy_string_smob): Clarify use of LENGTH
13531 member. Change type of TYPE member to SCM. All uses updated.
13532 (lsscm_make_lazy_string_smob): Add assert.
13533 (lsscm_make_lazy_string): Flag bad length values.
13534 (lsscm_elt_type): New function.
13535 (gdbscm_lazy_string_to_value): Rewrite to use
13536 lsscm_safe_lazy_string_to_value.
13537 (lsscm_safe_lazy_string_to_value): Fix handling of TYPE_CODE_PTR.
13538 * guile/scm-value.c (gdbscm_value_to_lazy_string): Flag bad length
13539 values. Fix TYPE_CODE_PTR. Handle TYPE_CODE_ARRAY. Handle typedefs
13540 in incoming type.
13541 * guile/guile-internal.h (tyscm_scm_to_type): Declare.
13542 * guile/scm-type.c (tyscm_scm_to_type): New function.
13543
13544 2017-03-15 Doug Evans <dje@google.com>
13545
13546 PR python/17728, python/18439, python/18779
13547 * python/py-lazy-string.c (lazy_string_object): Clarify use of LENGTH
13548 member. Change type of TYPE member to PyObject *. All uses updated.
13549 (stpy_convert_to_value): Fix handling of TYPE_CODE_PTR.
13550 (gdbpy_create_lazy_string_object): Flag bad length values.
13551 Handle TYPE_CODE_ARRAY with possibly different user-provided length.
13552 Handle typedefs in incoming type.
13553 (stpy_lazy_string_elt_type): New function.
13554 (gdbpy_extract_lazy_string): Call it.
13555 * python/py-value.c (valpy_lazy_string): Flag bad length values.
13556 Fix handling of TYPE_CODE_PTR. Handle TYPE_CODE_ARRAY. Handle
13557 typedefs in incoming type.
13558
13559 2017-03-16 Doug Evans <dje@google.com>
13560
13561 * guile/guile-internal.h (tyscm_scm_to_type): Declare.
13562 * guile/scm-type.c (tyscm_scm_to_type): New function.
13563
13564 2017-03-16 Jiong Wang <jiong.wang@arm.com>
13565
13566 * inf-ptrace.c (inf_ptrace_peek_poke): Change the type to
13567 "ULONGEST" for "skip".
13568
13569 2017-03-14 Andreas Arnez <arnez@linux.vnet.ibm.com>
13570
13571 PR gdb/21220
13572 * inf-ptrace.c (inf_ptrace_xfer_partial): In "case
13573 TARGET_OBJECT_MEMORY", extract the logic for ptrace peek/poke...
13574 (inf_ptrace_peek_poke): ...here. New function. Now also loop
13575 over ptrace peek/poke until end of buffer or error.
13576
13577 2017-03-14 Simon Marchi <simon.marchi@ericsson.com>
13578
13579 * parse.c (length_of_subexp): Make static.
13580 * parser-defs.h (length_of_subexp): Remove.
13581
13582 2017-03-14 Andreas Arnez <arnez@linux.vnet.ibm.com>
13583
13584 * linux-nat.c (linux_proc_xfer_partial): Handle write operations
13585 as well.
13586
13587 2017-03-14 Pedro Alves <palves@redhat.com>
13588
13589 * cp-name-parser.y (cp_demangled_name_to_comp): Update comment.
13590 (main): Use std::unique_ptr. Remove calls to
13591 cp_demangled_name_parse_free.
13592
13593 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
13594
13595 * alpha-bsd-nat.c (alphabsd_fetch_inferior_registers,
13596 alphabsd_store_inferior_registers): Use regcache->ptid instead
13597 of inferior_ptid.
13598
13599 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
13600
13601 * aix-thread.c (aix_thread_fetch_registers,
13602 aix_thread_store_registers): Use regcache->ptid instead of
13603 inferior_ptid.
13604
13605 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
13606
13607 * aarch64-linux-nat.c (fetch_gregs_from_thread,
13608 store_gregs_to_thread, fetch_fpregs_from_thread,
13609 store_fpregs_to_thread): Use regcache->ptid instead of
13610 inferior_ptid.
13611
13612 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
13613
13614 * amd64-linux-nat.c (amd64_linux_fetch_inferior_registers,
13615 amd64_linux_fetch_inferior_registers): Use regcache->ptid
13616 instead of inferior_ptid.
13617
13618 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
13619
13620 * target.c (target_fetch_registers, target_store_registers): Add
13621 assert.
13622
13623 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
13624
13625 * regcache.h (regcache_get_ptid): New function.
13626 * regcache.c (regcache_get_ptid): New function.
13627
13628 2017-03-13 Mark Wielaard <mark@klomp.org>
13629
13630 * cp-name-parser.y (make_empty): Initialize d_printing to zero.
13631
13632 2017-03-10 Keith Seitz <keiths@redhat.com>
13633
13634 PR c++/8218
13635 * c-typeprint.c (cp_type_print_method_args): Skip artificial arguments.
13636
13637 2017-03-08 Pedro Alves <palves@redhat.com>
13638
13639 PR gdb/18360
13640 * infrun.c (start_step_over, do_target_resume, resume)
13641 (restart_threads): Assert we're not resuming a thread that is
13642 meant to be stopped.
13643 (infrun_thread_stop_requested_callback): Delete.
13644 (infrun_thread_stop_requested): If the thread is internally
13645 stopped, queue a pending stop event and clear the thread's
13646 inline-frame state.
13647 (handle_stop_requested): New function.
13648 (handle_syscall_event, handle_inferior_event_1): Use
13649 handle_stop_requested.
13650 (handle_stop_requested): New function.
13651 (handle_signal_stop): Set the thread's stop_signal here instead of
13652 at caller.
13653 (finish_step_over): Clear step over info unconditionally.
13654 (handle_signal_stop): If the user had interrupted the event
13655 thread, consider the stop a random signal.
13656 (handle_signal_stop) <signal arrived while stepping over
13657 breakpoint>: Don't restart threads here.
13658 (stop_waiting): Don't clear step-over info here.
13659
13660 2017-03-08 Pedro Alves <palves@redhat.com>
13661
13662 PR 21206
13663 * common/gdb_unlinker.h (unlinker::unlinker): Attribute nonnull
13664 goes to argument 2, not 1.
13665
13666 2017-03-08 Pedro Alves <palves@redhat.com>
13667
13668 PR cli/21218
13669 * top.c (gdb_readline_wrapper): Avoid passing NULL to
13670 display_gdb_prompt.
13671 (command_line_input): Add comment.
13672
13673 2017-03-08 Pedro Alves <palves@redhat.com>
13674
13675 PR tui/21216
13676 * tui/tui-file.c (tui_file::write): New.
13677 * tui/tui-file.h (tui_file): Override "write".
13678 * tui/tui-io.c (do_tui_putc, update_start_line): New functions,
13679 factored out from ...
13680 (tui_puts): ... here.
13681 (tui_putc): Use them.
13682 (tui_write): New function.
13683 * tui/tui-io.h (tui_write): Declare.
13684
13685 2017-03-07 Sergio Durigan Junior <sergiodj@redhat.com>
13686
13687 * Makefile.in (SFILES): Replace "environ.c" with
13688 "common/environ.c".
13689 (HFILES_NO_SRCDIR): Likewise, for "environ.h".
13690 * environ.c: Include "common-defs.h" instead of "defs.h. Moved
13691 to...
13692 * common/environ.c: ... here.
13693 * environ.h: Moved to...
13694 * common/environ.h: ... here.
13695
13696 2017-03-07 Peter Bergner <bergner@vnet.ibm.com>
13697
13698 * gdbarch.sh (pstring_ptr): New static function.
13699 (gdbarch_disassembler_options): Use it.
13700 (gdbarch_verify_disassembler_options): Print valid_disassembler_options,
13701 not valid_disassembler_option->name.
13702 * gdbarch.c: Regenerate.
13703
13704 2017-03-07 Peter Bergner <bergner@vnet.ibm.com>
13705
13706 * config/powerpc/ppc64-linux.mh (MH_CFLAGS): Delete.
13707
13708 2017-03-07 Pedro Alves <palves@redhat.com>
13709
13710 * tui/tui-regs.c (tui_restore_gdbout): Don't delete gdb_stdout.
13711
13712 2017-03-07 Walfred Tedeschi <walfred.tedeschi@intel.com>
13713
13714 * i387-tdep.h (i387_reset_bnd_regs): Add function definition.
13715 * i387-tdep.c (i387_reset_bnd_regs): Add function implementation.
13716 * i386-tdep.c (i386_push_dummy_call): Call i387_reset_bnd_regs.
13717 * amd64-tdep.c (amd64_push_dummy_call): Call i387_reset_bnd_regs.
13718
13719 2017-03-06 Simon Marchi <simon.marchi@ericsson.com>
13720
13721 * xtensa-linux-nat.c (fetch_gregs): Remove const.
13722
13723 2017-03-03 Simon Marchi <simon.marchi@ericsson.com>
13724
13725 * remote.c (remote_add_target_side_commands): Use range-based
13726 for loop.
13727
13728 2017-03-03 Yao Qi <yao.qi@linaro.org>
13729
13730 PR gdb/21165
13731 * ada-valprint.c (ada_val_print_ref): Call value_fetch_lazy if
13732 value is lazy.
13733 * valprint.c (common_val_print): Likewise.
13734
13735 2017-02-28 Peter Bergner <bergner@vnet.ibm.com>
13736
13737 * NEWS: Mention new set/show disassembler-options commands.
13738 * doc/gdb.texinfo: Document new set/show disassembler-options commands.
13739 * disasm.c: Include "arch-utils.h", "gdbcmd.h" and "safe-ctype.h".
13740 (prospective_options): New static variable.
13741 (gdb_disassembler::gdb_disassembler): Initialize
13742 m_di.disassembler_options.
13743 (gdb_buffered_insn_length_init_dis): Initilize di->disassembler_options.
13744 (get_disassembler_options): New function.
13745 (set_disassembler_options): Likewise.
13746 (set_disassembler_options_sfunc): Likewise.
13747 (show_disassembler_options_sfunc): Likewise.
13748 (disassembler_options_completer): Likewise.
13749 (_initialize_disasm): Likewise.
13750 * disasm.h (get_disassembler_options): New prototype.
13751 (set_disassembler_options): Likewise.
13752 * gdbarch.sh (gdbarch_disassembler_options): New variable.
13753 (gdbarch_verify_disassembler_options): Likewise.
13754 * gdbarch.c: Regenerate.
13755 * gdbarch.h: Likewise.
13756 * arm-tdep.c (num_disassembly_options): Delete.
13757 (set_disassembly_style): Likewise.
13758 (arm_disassembler_options): New static variable.
13759 (set_disassembly_style_sfunc): Convert short style name into long
13760 option name. Call set_disassembler_options.
13761 (show_disassembly_style_sfunc): New function.
13762 (arm_gdbarch_init): Call set_gdbarch_disassembler_options and
13763 set_gdbarch_verify_disassembler_options.
13764 (_initialize_arm_tdep): Delete regnames variable and update callers.
13765 (arm_disassembler_options): Initialize.
13766 (disasm_options): New variable.
13767 (num_disassembly_options): Rename from this...
13768 (num_disassembly_styles): ...to this. Compute by scanning through
13769 disasm_options.
13770 (valid_disassembly_styles): Initialize using disasm_options.
13771 Remove calls to parse_arm_disassembler_option, get_arm_regnames and
13772 set_arm_regname_option.
13773 Pass show_disassembly_style_sfunc to the "disassembler" setshow command.
13774 * rs6000-tdep.c (powerpc_disassembler_options): New static variable.
13775 (rs6000_gdbarch_init): Call set_gdbarch_disassembler_options and
13776 set_gdbarch_verify_disassembler_options.
13777 * s390-tdep.c (s390_disassembler_options): New static variable.
13778 (s390_gdbarch_init):all set_gdbarch_disassembler_options and
13779 set_gdbarch_verify_disassembler_options.
13780
13781 2017-02-27 Simon Marchi <simon.marchi@ericsson.com>
13782
13783 * remote.c (remote_add_target_side_condition): Remove "struct"
13784 keyword from range-based for loop.
13785
13786 2017-02-27 Simon Marchi <simon.marchi@ericsson.com>
13787
13788 * remote.c (remote_add_target_side_condition): Use range-based
13789 for loop. Update comment.
13790
13791 2017-02-27 Yao Qi <yao.qi@linaro.org>
13792
13793 * f-typeprint.c (f_print_type): Check "varstring" is empty first.
13794
13795 2017-02-26 Alan Hayward <alan.hayward@arm.com>
13796
13797 * regcache.c (regcache_raw_update): New function.
13798 (regcache_raw_read): Move code to regcache_raw_update.
13799 * regcache.h (regcache_raw_update): New declaration.
13800 * remote.c (remote_prepare_to_store): Call regcache_raw_update.
13801
13802 2017-02-26 Jan Kratochvil <jan.kratochvil@redhat.com>
13803
13804 * dwarf2read.c (create_debug_type_hash_table): Initialize
13805 header.signature and header.type_offset_in_tu.
13806
13807 2017-02-24 Pedro Alves <palves@redhat.com>
13808
13809 * symtab.c (make_file_symbol_completion_list_1): Use
13810 add_symtab_completions.
13811
13812 2017-02-24 Alan Hayward <alan.hayward@arm.com>
13813
13814 * stack.c (frame_info): Use frame_unwind_register_value to avoid buf.
13815
13816 2017-02-24 Alan Hayward <alan.hayward@arm.com>
13817
13818 * i386-tdep.c (i386_pseudo_register_read_into_value): Use
13819 I386_MAX_REGISTER_SIZE.
13820 (i386_pseudo_register_write): Likewise.
13821 (i386_process_record): Likewise.
13822 * i387-tdep.c (i387_supply_xsave): Likewise.
13823 * m68k-linux-nat.c (fetch_register): Use M68K_MAX_REGISTER_SIZE.
13824 (store_register): Likewise.
13825
13826 2017-02-23 Pedro Alves <palves@redhat.com>
13827
13828 * ada-lang.c: Include "common/function-view.h".
13829 (ada_iterate_over_symbols): Adjust to use function_view as
13830 callback type.
13831 (struct add_partial_datum, ada_complete_symbol_matcher): Delete.
13832 (ada_make_symbol_completion_list): Use a lambda.
13833 (ada_exc_search_name_matches): Delete.
13834 (name_matches_regex): New.
13835 (ada_add_global_exceptions): Use a lambda and name_matches_regex.
13836 * compile/compile-c-support.c: Include "common/function-view.h".
13837 (print_one_macro): Change prototype to accept a ui_file pointer.
13838 (write_macro_definitions): Use a lambda.
13839 * dwarf2read.c: Include "common/function-view.h".
13840 (dw2_map_expand_apply, dw2_map_symtabs_matching_filename)
13841 (dw2_expand_symtabs_matching): Adjust to use function_view as
13842 callback type.
13843 * language.h: Include "common/function-view.h".
13844 (struct language_defn) <la_iterate_over_symbols>: Adjust to use
13845 function_view as callback type.
13846 (LA_ITERATE_OVER_SYMBOLS): Remove DATA parameter.
13847 * linespec.c: Include "common/function-view.h".
13848 (collect_info::add_symbol): New method.
13849 (struct symbol_and_data_callback, iterate_inline_only, struct
13850 symbol_matcher_data, iterate_name_matcher): Delete.
13851 (iterate_over_all_matching_symtabs): Adjust to use function_view
13852 as callback type and lambdas.
13853 (iterate_over_file_blocks): Adjust to use function_view as
13854 callback type.
13855 (decode_compound_collector): Now a class with private fields.
13856 (decode_compound_collector::release_symbols): New method.
13857 (collect_one_symbol): Rename to...
13858 (decode_compound_collector::operator()): ... this and adjust.
13859 (lookup_prefix_sym): decode_compound_collector construction bits
13860 move to decode_compound_collector ctor. Pass the
13861 decode_compound_collector object directly as callback. Remove
13862 cleanups and use decode_compound_collector::release_symbols
13863 instead.
13864 (symtab_collector): Now a class with private fields.
13865 (symtab_collector::release_symtabs): New method.
13866 (add_symtabs_to_list): Rename to...
13867 (symtab_collector::operator()): ... this and adjust.
13868 (collect_symtabs_from_filename): symtab_collector construction
13869 bits move to symtab_collector ctor. Pass the symtab_collector
13870 object directly as callback. Remove cleanups and use
13871 symtab_collector::release_symtabs instead.
13872 (collect_symbols): Delete.
13873 (add_matching_symbols_to_info): Use lambdas.
13874 * macrocmd.c (print_macro_callback): Delete.
13875 (info_macro_command): Use a lambda.
13876 (info_macros_command): Pass print_macro_definition as callable
13877 directly.
13878 (print_one_macro): Remove 'ignore' parameter.
13879 (macro_list_command): Adjust.
13880 * macrotab.c (macro_for_each_data::fn): Now a function_view.
13881 (macro_for_each_data::user_data): Delete field.
13882 (foreach_macro): Adjust to call the function_view.
13883 (macro_for_each): Adjust to use function_view as callback type.
13884 (foreach_macro_in_scope): Adjust to call the function_view.
13885 (macro_for_each_in_scope): Adjust to use function_view as callback
13886 type.
13887 * macrotab.h: Include "common/function-view.h".
13888 (macro_callback_fn): Declare a prototype instead of a pointer.
13889 Remove "user_data" parameter.
13890 (macro_for_each, macro_for_each_in_scope): Adjust to use
13891 function_view as callback type.
13892 * psymtab.c (partial_map_expand_apply)
13893 (psym_map_symtabs_matching_filename, recursively_search_psymtabs):
13894 Adjust to use function_view as callback type and to return bool.
13895 (psym_expand_symtabs_matching): Adjust to use function_view as
13896 callback types.
13897 * symfile-debug.c (debug_qf_map_symtabs_matching_filename): Adjust
13898 to use function_view as callback type and to return bool.
13899 (debug_qf_expand_symtabs_matching): Adjust to use function_view as
13900 callback types.
13901 * symfile.c (expand_symtabs_matching): Adjust to use function_view
13902 as callback types.
13903 * symfile.h: Include "common/function-view.h".
13904 (expand_symtabs_file_matcher_ftype)
13905 (expand_symtabs_symbol_matcher_ftype)
13906 (expand_symtabs_exp_notify_ftype): Remove "data" parameter and
13907 return bool.
13908 (quick_symbol_functions::map_symtabs_matching_filename)
13909 (quick_symbol_functions::expand_symtabs_matching): Adjust to use
13910 function_view as callback type and return bool.
13911 (expand_symtabs_matching): Adjust to use function_view as callback
13912 type.
13913 (maintenance_expand_name_matcher)
13914 (maintenance_expand_file_matcher): Delete.
13915 (maintenance_expand_symtabs): Use lambdas.
13916 * symtab.c (iterate_over_some_symtabs): Adjust to use
13917 function_view as callback types and return bool.
13918 (iterate_over_symtabs): Likewise. Use unique_xmalloc_ptr instead
13919 of a cleanup.
13920 (lookup_symtab_callback): Delete.
13921 (lookup_symtab): Use a lambda.
13922 (iterate_over_symbols): Adjust to use function_view as callback
13923 type.
13924 (struct search_symbols_data, search_symbols_file_matches)
13925 (search_symbols_name_matches): Delete.
13926 (search_symbols): Use a pair of lambdas.
13927 (struct add_name_data, add_macro_name, symbol_completion_matcher)
13928 (symtab_expansion_callback): Delete.
13929 (default_make_symbol_completion_list_break_on_1): Use lambdas.
13930 * symtab.h: Include "common/function-view.h".
13931 (iterate_over_some_symtabs): Adjust to use function_view as
13932 callback type and return bool.
13933 (iterate_over_symtabs): Adjust to use function_view as callback
13934 type.
13935 (symbol_found_callback_ftype): Remove 'data' parameter and return
13936 bool.
13937 (iterate_over_symbols): Adjust to use function_view as callback
13938 type.
13939
13940 2017-02-23 Pedro Alves <palves@redhat.com>
13941
13942 * Makefile.in (SUBDIR_UNITTESTS_SRCS, SUBDIR_UNITTESTS_OBS): New.
13943 (%.o) <unittests/%.c>: New pattern.
13944 * configure.ac ($development): Add $(SUBDIR_UNITTESTS_OBS) to
13945 CONFIG_OBS, and $(SUBDIR_UNITTESTS_SRCS) to CONFIG_SRCS.
13946 * common/function-view.h: New file.
13947 * unittests/function-view-selftests.c: New file.
13948 * configure: Regenerate.
13949
13950 2017-02-23 Simon Marchi <simon.marchi@ericsson.com>
13951
13952 * bsd-uthread.c (bsd_uthread_thread_alive): Use ptid instead of
13953 inferior_ptid.
13954 * go32-nat.c (go32_thread_alive): Likewise.
13955
13956 2017-02-23 Yao Qi <yao.qi@linaro.org>
13957
13958 * varobj-iter.h (varobj_iter_delete): Call xfree instead of
13959 delete.
13960
13961 2017-02-23 Yao Qi <yao.qi@linaro.org>
13962
13963 * varobj.c (varobj_clear_saved_item): Use delete instead of
13964 xfree.
13965 (update_dynamic_varobj_children): Likewise.
13966
13967 2017-02-21 Jan Kratochvil <jan.kratochvil@redhat.com>
13968
13969 * dwarf2read.c (dwarf2_record_block_ranges): Add forgotten BASEADDR.
13970
13971 2017-02-21 Simon Marchi <simon.marchi@ericsson.com>
13972
13973 * common/enum-flags.h (enum_flags::enum_flags): Initialize
13974 m_enum_value to 0 in default constructor.
13975
13976 2017-02-21 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
13977
13978 * rs6000-tdep.c (LOAD_AND_RESERVE_MASK): Rename from LWARX_MASK.
13979 (STORE_CONDITIONAL_MASK): Rename from STWCX_MASK.
13980 (LBARX_INSTRUCTION, LHARX_INSTRUCTION, LQARX_INSTRUCTION,
13981 STBCX_INSTRUCTION, STHCX_INSTRUCTION, STQCX_INSTRUCTION): New defines.
13982 (IS_LOAD_AND_RESERVE_INSN, IS_STORE_CONDITIONAL_INSN): New macros.
13983 (ppc_displaced_step_copy_insn): Use IS_LOAD_AND_RESERVE_INSN.
13984 (ppc_deal_with_atomic_sequence): Use IS_LOAD_AND_RESERVE_INSN and
13985 IS_STORE_CONDITIONAL_INSN.
13986
13987 2017-02-21 Jan Kratochvil <jan.kratochvil@redhat.com>
13988
13989 * dwarf2_rnglists_process: Initialize range_beginning and range_end.
13990
13991 2017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
13992
13993 * NEWS (Changes since GDB 7.12): Add DWARF-5.
13994
13995 2017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
13996
13997 * dwarf2read.c (skip_one_die, read_attribute_value)
13998 (dwarf2_const_value_attr, dump_die_shallow)
13999 (dwarf2_get_attr_constant_value, dwarf2_fetch_constant_bytes)
14000 (skip_form_bytes, attr_form_is_constant): Handle DW_FORM_data16.
14001
14002 2017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
14003
14004 * dwarf2read.c (read_file_scope): Rename DW_MACRO_GNU_*.
14005 (dwarf_parse_macro_header): Accept DWARF version 5.
14006 (dwarf_decode_macro_bytes, dwarf_decode_macros): Rename DW_MACRO_GNU_*.
14007
14008 2017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
14009
14010 * block.c (call_site_for_pc): Rename DW_OP_GNU_*, DW_TAG_GNU_* and
14011 DW_AT_GNU_*.
14012 * common/common-exceptions.h (enum errors): Likewise.
14013 * dwarf2-frame.c (class dwarf_expr_executor): Likewise.
14014 * dwarf2expr.c (dwarf_block_to_dwarf_reg)
14015 (dwarf_expr_context::execute_stack_op): Likewise.
14016 * dwarf2expr.h (struct dwarf_expr_context, struct dwarf_expr_piece):
14017 Likewise.
14018 * dwarf2loc.c (dwarf_evaluate_loc_desc::get_base_type)
14019 (dwarf_evaluate_loc_desc::push_dwarf_reg_entry_value)
14020 (show_entry_values_debug, call_site_to_target_addr)
14021 (func_addr_to_tail_call_list, func_verify_no_selftailcall)
14022 (dwarf_expr_reg_to_entry_parameter, dwarf_entry_parameter_to_value)
14023 (entry_data_value_free_closure, value_of_dwarf_reg_entry)
14024 (value_of_dwarf_block_entry, indirect_pieced_value)
14025 (symbol_needs_eval_context::push_dwarf_reg_entry_value):
14026 (disassemble_dwarf_expression): Likewise.
14027 * dwarf2read.c (process_die, inherit_abstract_dies)
14028 (read_call_site_scope): Likewise.
14029 * gdbtypes.h (struct func_type, struct call_site_parameter)
14030 (struct call_site): Likewise.
14031 * stack.c (read_frame_arg): Likewise.
14032 * std-operator.def (OP_VAR_ENTRY_VALUE): Likewise.
14033
14034 2017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
14035
14036 * defs.h (read_unsigned_leb128): New declaration.
14037 * dwarf2loc.c (decode_debug_loclists_addresses): New function.
14038 (decode_debug_loc_dwo_addresses): Update DEBUG_LOC_* to DW_LLE_*.
14039 (dwarf2_find_location_expression): Call also
14040 decode_debug_loclists_addresses. Handle DWARF-5 ULEB128 length.
14041 * dwarf2loc.h (dwarf2_version): New declaration.
14042 * dwarf2read.c (struct dwarf2_per_objfile): Add loclists, line_str,
14043 rnglists.
14044 (dwarf2_elf_names): Add .debug_loclists, .debug_line_str,
14045 .debug_rnglists.
14046 (struct dwop_section_names): Add loclists_dwo.
14047 (dwop_section_names): Add .debug_loclists.dwo.
14048 (struct comp_unit_head): Add unit_type, signature, type_offset_in_tu.
14049 (struct dwarf2_per_cu_data): Add dwarf_version.
14050 (struct dwo_sections): Add loclists.
14051 (struct attr_abbrev): Add implicit_const.
14052 (read_indirect_line_string): New declaration.
14053 (read_unsigned_leb128): Delete declaration.
14054 (rcuh_kind): New definition.
14055 (read_and_check_comp_unit_head): Change parameter
14056 is_debug_types_section to section_kind.
14057 (dwarf2_locate_sections): Handle loclists, line_str and rnglists.
14058 (read_comp_unit_head): Change parameter abfd to section, add parameter
14059 section_kind. Handle DWARF-5.
14060 (error_check_comp_unit_head): Accept also DWARF version 5.
14061 (read_and_check_comp_unit_head): Change parameter
14062 is_debug_types_section to section_kind.
14063 (read_and_check_type_unit_head): Delete function.
14064 (read_abbrev_offset): Handle DWARF-5.
14065 (create_debug_type_hash_table): Add parameter section_kind. Process
14066 only DW_UT_type. Use signature and type_offset_in_tu from struct
14067 comp_unit_head.
14068 (create_debug_types_hash_table): Update create_debug_type_hash_table
14069 caller.
14070 (create_all_type_units): Call create_debug_type_hash_table.
14071 (read_cutu_die_from_dwo, init_cutu_and_read_dies): Change
14072 read_and_check_type_unit_head caller to read_and_check_comp_unit_head
14073 caller.
14074 (skip_one_die): Handle DW_FORM_implicit_const.
14075 (dwarf2_rnglists_process): New function.
14076 (dwarf2_ranges_process): Call dwarf2_rnglists_process for DWARF-5.
14077 (abbrev_table_read_table): Handle DW_FORM_implicit_const.
14078 (read_attribute_value): Handle DW_FORM_implicit_const,
14079 DW_FORM_line_strp.
14080 (read_attribute): Handle DW_FORM_implicit_const.
14081 (read_indirect_string_at_offset_from): New function from
14082 read_indirect_string_at_offset.
14083 (read_indirect_string_at_offset): Call
14084 read_indirect_string_at_offset_from.
14085 (read_indirect_line_string_at_offset): New function.
14086 (read_indirect_string): New function comment.
14087 (read_indirect_line_string): New function.
14088 (read_unsigned_leb128): Make it global.
14089 (dwarf2_string_attr): Handle DWARF-5.
14090 (add_include_dir_stub, read_formatted_entries): New functions.
14091 (dwarf_decode_line_header, dump_die_shallow, cu_debug_loc_section):
14092 Handle DWARF-5.
14093 (per_cu_header_read_in): Update read_comp_unit_head caller.
14094 (dwarf2_version): New function.
14095 * symfile.h (struct dwarf2_debug_sections): Add loclists, line_str and
14096 rnglists.
14097 * xcoffread.c (dwarf2_xcoff_names): Update struct dwarf2_debug_sections
14098 fields.
14099
14100 2017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
14101
14102 * dwarf2read.c (abbrev_table_read_table): Read the data only once.
14103
14104 2017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
14105
14106 * dwarf2read.c (dwarf2_ranges_process): New function from
14107 dwarf2_ranges_read.
14108 (dwarf2_ranges_read, dwarf2_record_block_ranges): Use
14109 dwarf2_ranges_process.
14110
14111 2017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
14112
14113 * dwarf2read.c (create_debug_type_hash_table): New function from
14114 create_debug_types_hash_table.
14115 (create_debug_types_hash_table): Call create_debug_type_hash_table.
14116 (create_all_type_units, open_and_init_dwo_file): Update
14117 create_debug_types_hash_table callers.
14118
14119 2017-02-20 Sergio Durigan Junior <sergiodj@redhat.com>
14120
14121 PR gdb/16188
14122 * fork-child.c (trace_start_error): Fix thinko. va_end should
14123 refer to 'ap', not 'args'.
14124
14125 2017-02-20 Sergio Durigan Junior <sergiodj@redhat.com>
14126 Pedro Alves <palves@redhat.com>
14127
14128 PR gdb/16188
14129 * darwin-nat.c (darwin_ptrace_me): Check if calls to system
14130 calls succeeded.
14131 * fork-child.c (trace_start_error): New function.
14132 (trace_start_error_with_name): Likewise.
14133 * gnu-nat.c (gnu_ptrace_me): Check if call to PTRACE succeeded.
14134 * inf-ptrace.c (inf_ptrace_me): Likewise.
14135 * inferior.h (trace_start_error): New prototype.
14136 (trace_start_error_with_name): Likewise.
14137
14138 2017-02-15 Sergio Durigan Junior <sergiodj@redhat.com>
14139
14140 PR gdb/21164
14141 * psymtab.c (maintenance_print_psymbols): Verify if 'argv' is not
14142 NULL before using it.
14143 * symmisc.c (maintenance_print_symbols): Likewise.
14144 (maintenance_print_msymbols): Likewise.
14145
14146 2017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
14147
14148 * NEWS: Add record Python bindings entry.
14149
14150 2017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
14151
14152 * Makefile.in (SUBDIR_PYTHON_OBS): Add py-record-btrace.o,
14153 py-record-full.o.
14154 (SUBDIR_PYTHON_SRCS): Add py-record-btrace.c, py-record-full.c.
14155 * python/py-record-btrace.c, python/py-record-btrace.h,
14156 python/py-record-full.c, python/py-record-full.h: New file.
14157 * python/py-record.c: Add include for py-record-btrace.h and
14158 py-record-full.h.
14159 (recpy_method, recpy_format, recpy_goto, recpy_replay_position,
14160 recpy_instruction_history, recpy_function_call_history, recpy_begin,
14161 recpy_end): Use functions from py-record-btrace.c and py-record-full.c.
14162 * python/python-internal.h (PyInt_FromSsize_t, PyInt_AsSsize_t):
14163 New definition.
14164 (gdbpy_initialize_btrace): New export.
14165 * python/python.c (_initialize_python): Add gdbpy_initialize_btrace.
14166
14167 2017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
14168
14169 * Makefile.in (SUBDIR_PYTHON_OBS): Add python/py-record.o.
14170 (SUBDIR_PYTHON_SRCS): Add python/py-record.c.
14171 * python/py-record.c: New file.
14172 * python/python-internal.h (gdbpy_start_recording,
14173 gdbpy_current_recording, gdpy_stop_recording,
14174 gdbpy_initialize_record): New export.
14175 * python/python.c (_initialize_python): Add gdbpy_initialize_record.
14176 (python_GdbMethods): Add gdbpy_start_recording,
14177 gdbpy_current_recording and gdbpy_stop_recording.
14178
14179 2017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
14180
14181 * record-btrace.c (record_btrace_record_method): New function.
14182 (init_record_btrace_ops): Initialize to_record_method.
14183 * record-full.c (record_full_record_method): New function.
14184 (init_record_full_ops, init_record_full_core_ops): Add
14185 record_full_record_method.
14186 * record.h (enum record_method): New enum.
14187 * target-debug.h (target_debug_print_enum_record_method: New define.
14188 * target-delegates.c: Regenerate.
14189 * target.c (target_record_method): New function.
14190 * target.h: Include record.h.
14191 (struct target_ops) <to_record_method>: New field.
14192 (target_record_method): New export.
14193
14194 2017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
14195
14196 * record.h (record_start, record_stop): New export.
14197 * record.c (record_start, record_stop): New function.
14198
14199 2017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
14200
14201 * btrace.c (btrace_fetch): Copy function call segments pointer
14202 into a vector.
14203 (btrace_clear): Clear the vector.
14204 (btrace_find_insn_by_number): Use binary search to find the correct
14205 function call segment.
14206 * btrace.h (brace_fun_p): New typedef.
14207 (struct btrace_thread_info) <functions>: New field.
14208
14209 2017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
14210
14211 * record-btrace.c (btrace_ui_out_decode_error): Move most of it ...
14212 * btrace.c (btrace_decode_error): ... here. New function.
14213 * btrace.h (btrace_decode_error): New export.
14214
14215 2017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
14216
14217 * btrace.c (ftrace_call_num_insn, btrace_insn_get_error): New function.
14218 (ftrace_new_function, btrace_insn_number, btrace_insn_cmp,
14219 btrace_find_insn_by_number): Remove special case for gaps.
14220 * btrace.h (btrace_insn_get_error): New export.
14221 (btrace_insn_number, btrace_find_insn_by_number): Adjust comment.
14222 * record-btrace.c (btrace_insn_history): Print number for gaps.
14223 (record_btrace_info, record_btrace_goto): Handle gaps.
14224
14225 2017-02-14 Tom Tromey <tom@tromey.com>
14226
14227 PR python/13598:
14228 * python/python.c (gdbpy_before_prompt_hook): Emit before_prompt
14229 event.
14230 * python/py-evts.c (gdbpy_initialize_py_events): Add
14231 before_prompt registry.
14232 * python/py-events.h (events_object) <before_prompt>: New field.
14233
14234 2017-02-14 Markus Metzger <markus.t.metzger@intel.com>
14235
14236 * btrace.c (ftrace_new_switch): Preserve up link and flags.
14237
14238 2017-02-13 Luis Machado <lgustavo@codesourcery.com>
14239
14240 * symfile (_initialize_symfile): Add usage text to the load command's
14241 help text.
14242
14243 2017-02-10 Simon Marchi <simon.marchi@ericsson.com>
14244
14245 * utils.c (defaulted_query): Don't query on secondary UIs.
14246
14247 2017-02-10 Tom Tromey <tom@tromey.com>
14248
14249 * rust-lang.c (rust_get_disr_info): Remove unused variable.
14250
14251 2017-02-10 Tom Tromey <tom@tromey.com>
14252
14253 * python/py-value.c (valpy_richcompare_throw): Remove unnecessary
14254 "cleanup" local.
14255 * python/py-type.c (typy_legacy_template_argument): Remove
14256 unnecessary "cleanup" local.
14257
14258 2017-02-10 Tom Tromey <tom@tromey.com>
14259
14260 * python/python.c (do_start_initialization): New function, from
14261 _initialize_python.
14262 (_initialize_python): Call do_start_initialization.
14263 * python/py-linetable.c (ltpy_iternext): Use explicit returns, not
14264 goto.
14265
14266 2017-02-10 Tom Tromey <tom@tromey.com>
14267
14268 * python/py-prettyprint.c (pretty_print_one_value): Use
14269 gdbpy_ref.
14270
14271 2017-02-10 Tom Tromey <tom@tromey.com>
14272
14273 * python/py-cmd.c (cmdpy_destroyer): Use gdbpy_ref.
14274 * python/py-breakpoint.c (gdbpy_breakpoint_deleted): Use
14275 gdbpy_ref.
14276 * python/py-type.c (field_new): Use gdbpy_ref.
14277 * python/py-symtab.c (symtab_and_line_to_sal_object): Use
14278 gdbpy_ref.
14279 * python/py-progspace.c (pspy_new): Use gdbpy_ref.
14280 (py_free_pspace): Likewise.
14281 (pspace_to_pspace_object): Likewise.
14282 * python/py-objfile.c (objfpy_new): Use gdbpy_ref.
14283 (py_free_objfile): Likewise.
14284 (objfile_to_objfile_object): Likewise.
14285 * python/py-inferior.c (delete_thread_object): Use
14286 gdbpy_ref.
14287 (infpy_read_memory): Likewise.
14288 (py_free_inferior): Likewise.
14289 * python/py-evtregistry.c (create_eventregistry_object): Use
14290 gdbpy_ref.
14291 * python/py-event.c (create_event_object): Use gdbpy_ref.
14292
14293 2017-02-10 Tom Tromey <tom@tromey.com>
14294
14295 * python/py-ref.h (gdbpy_ref_policy): Now a template.
14296 (gdbpy_ref): Now a template; allow subclasses of PyObject to be
14297 used.
14298 * python/py-arch.c, python/py-bpevent.c, python/py-breakpoint.c,
14299 python/py-cmd.c, python/py-continueevent.c, python/py-event.c,
14300 python/py-exitedevent.c, python/py-finishbreakpoint.c,
14301 python/py-framefilter.c, python/py-function.c,
14302 python/py-inferior.c, python/py-infevents.c,
14303 python/py-linetable.c, python/py-newobjfileevent.c,
14304 python/py-param.c, python/py-prettyprint.c, python/py-ref.h,
14305 python/py-signalevent.c, python/py-stopevent.c,
14306 python/py-symbol.c, python/py-threadevent.c, python/py-type.c,
14307 python/py-unwind.c, python/py-utils.c, python/py-value.c,
14308 python/py-varobj.c, python/py-xmethods.c, python/python.c,
14309 varobj.c: Change gdbpy_ref to gdbpy_ref<>.
14310
14311 2017-02-10 Tom Tromey <tom@tromey.com>
14312
14313 * ui-out.h (ui_out_emit_type): New class.
14314 (ui_out_emit_tuple, ui_out_emit_list): New typedefs.
14315 * python/py-framefilter.c (py_print_single_arg): Use gdb::optional
14316 and ui_out_emit_tuple.
14317 (enumerate_locals): Likewise.
14318 (py_mi_print_variables, py_print_locals, py_print_args): Use
14319 ui_out_emit_list.
14320 (py_print_frame): Use gdb::optional, ui_out_emit_tuple,
14321 ui_out_emit_list.
14322 * common/gdb_optional.h: New file.
14323
14324 2017-02-10 Martin Galvan <martingalvan@sourceware.org>
14325
14326 * MAINTAINERS (Write After Approval): Update my e-mail address.
14327
14328 2017-02-10 Martin Galvan <martingalvan@sourceware.org>
14329
14330 PR gdb/21122
14331 * breakpoint.c (_initialize_breakpoint): Update the help description
14332 of the 'commands' command to indicate that it takes a list argument.
14333
14334 2017-02-09 Simon Marchi <simon.marchi@ericsson.com>
14335
14336 * interps.c (current_interp_set_logging): Remove "return".
14337
14338 2017-02-09 Gary Benson <gbenson@redhat.com>
14339
14340 * symtab.c (add_symtab_completions): Prevent NULL pointer
14341 dereference.
14342
14343 2017-02-08 Pedro Alves <palves@redhat.com>
14344
14345 * interps.c (interp::interp): Remove reference to quiet_p.
14346 (interp_set): Make static. Remove dead "Switching to" output
14347 code.
14348 (interp_quiet_p, interp_set_quiet): Delete.
14349 (interpreter_exec_cmd): Don't set the interpreter quiet.
14350 * interps.h (interp_quiet_p): Make static.
14351 (class interp) <quiet_p>: Remove field
14352
14353 2017-02-08 Jerome Guitton <guitton@adacore.com>
14354
14355 * cli/cli-decode.c (find_command_name_length): Make it extern.
14356 * cli/cli-decode.h (find_command_name_length): Declare.
14357 * cli/cli-script.c (command_name_equals, line_first_arg):
14358 New functions.
14359 (process_next_line): Use cli-decode to parse command names.
14360 (build_command_line): Make args a constant pointer.
14361
14362 2017-02-08 Jerome Guitton <guitton@adacore.com>
14363
14364 * cli-decode.c (lookup_cmd_1, lookup_cmd_composition):
14365 Remove case-insensitive search.
14366
14367 2017-02-07 Jose E. Marchesi <jose.marchesi@oracle.com>
14368
14369 * sparc-tdep.c (sparc32_gdbarch_init): Do not place a + operator
14370 at the end of the line. Avoids an ARI warning.
14371
14372 2017-02-06 Luis Machado <lgustavo@codesourcery.com>
14373
14374 * NEWS: Mention support for record/replay of Intel 64 rdrand and
14375 rdseed instructions.
14376 i386-tdep.c (i386_process_record): Handle Intel 64 rdrand and rseed.
14377
14378 2017-02-06 Ivo Raisr <ivo.raisr@oracle.com>
14379
14380 PR tdep/20936
14381 Provide and use sparc32 and sparc64 target description XML files.
14382 * features/sparc/sparc32-cp0.xml, features/sparc/sparc32-cpu.xml,
14383 features/sparc/sparc32-fpu.xml: New files for sparc 32-bit.
14384 * features/sparc/sparc64-cp0.xml, features/sparc/sparc64-cpu.xml,
14385 features/sparc/sparc64-fpu.xml: New files for sparc 64-bit.
14386 * features/sparc/sparc32-solaris.xml: New file.
14387 * features/sparc/sparc64-solaris.xml: New file.
14388 * features/sparc/sparc32-solaris.c: Generated.
14389 * features/sparc/sparc64-solaris.c: Generated.
14390 * sparc-tdep.h: Account for differences in target descriptions.
14391 * sparc-tdep.c (sparc32_register_name): Use target provided registers.
14392 (sparc32_register_type): Use target provided registers.
14393 (validate_tdesc_registers): New function.
14394 (sparc32_gdbarch_init): Use tdesc_has_registers.
14395 Set pseudoregister functions.
14396 * sparc64-tdep.c (sparc64_register_name): Use target provided registers.
14397 (sparc64_register_type): Use target provided registers.
14398 (sparc64_init_abi): Set pseudoregister functions.
14399
14400 2017-02-03 Tom Tromey <tom@tromey.com>
14401
14402 PR rust/21097:
14403 * rust-lang.c (rust_print_type) <TYPE_CODE_UNION>: Handle enums
14404 with a single member.
14405
14406 2017-02-03 Pedro Alves <palves@redhat.com>
14407
14408 * cli/cli-interp.c (cli_interp_base::cli_interp_base)
14409 (cli_interp_base::~cli_interp_base): New.
14410 (cli_interp): New struct.
14411 (as_cli_interp): Cast the interp itself to cli_interp.
14412 (cli_interpreter_pre_command_loop): Rename to ...
14413 (cli_interp_base::pre_command_loop): ... this. Remove 'self'
14414 parameter.
14415 (cli_interpreter_init): Rename to ...
14416 (cli_interp::init): ... this. Remove 'self' parameter. Use
14417 boolean. Make extern.
14418 (cli_interpreter_resume): Rename to ...
14419 (cli_interp::resume): ... this. Remove 'data' parameter. Make
14420 extern.
14421 (cli_interpreter_suspend): Rename to ...
14422 (cli_interp::suspend): ... this. Remove 'data' parameter. Make
14423 extern.
14424 (cli_interpreter_exec): Rename to ...
14425 (cli_interp::exec): ... this. Remove 'data' parameter. Make
14426 extern.
14427 (cli_interpreter_supports_command_editing): Rename to ...
14428 (cli_interp_base::supports_command_editing): ... this. Remove
14429 'interp' parameter. Make extern.
14430 (cli_ui_out): Rename to ...
14431 (cli_interp::interp_ui_out): ... this. Remove 'interp' parameter.
14432 Make extern.
14433 (cli_set_logging): Rename to ...
14434 (cli_interp_base::set_logging): ... this. Remove 'interp'
14435 parameter. Make extern.
14436 (cli_interp_procs): Delete.
14437 (cli_interp_factory): Adjust to use "new".
14438 * cli/cli-interp.h: Include "interps.h".
14439 (struct cli_interp_base): New struct.
14440 * interps.c (struct interp): Delete. Fields moved to interps.h.
14441 (interp_new): Delete.
14442 (interp::interp, interp::~interp): New.
14443 (interp_set): Use bool, and return void. Assume the interpreter
14444 has suspend, init and resume methods, and that the all return
14445 void.
14446 (set_top_level_interpreter): interp_set returns void.
14447 (interp_ui_out): Adapt.
14448 (current_interp_set_logging): Adapt.
14449 (interp_data): Delete.
14450 (interp_pre_command_loop, interp_supports_command_editing): Adapt.
14451 (interp_exec): Adapt.
14452 (top_level_interpreter_data): Delete.
14453 * interps.h (interp_init_ftype, interp_resume_ftype)
14454 (interp_suspend_ftype, interp_exec_ftype)
14455 (interp_pre_command_loop_ftype, interp_ui_out_ftype): Delete.
14456 (class interp): New.
14457 (interp_new): Delete.
14458 (interp_set): Now returns void. Use bool.
14459 (interp_data, top_level_interpreter_data): Delete.
14460 * mi/mi-common.h: Include interps.h.
14461 (class mi_interp): Inherit from interp. Define a ctor. Declare
14462 init, resume, suspect, exec, interp_ui_out, set_logging and
14463 pre_command_loop methods.
14464 * mi/mi-interp.c (as_mi_interp): Cast the interp itself.
14465 (mi_interpreter_init): Rename to ...
14466 (mi_interp::init): ... this. Remove the 'interp' parameter, use
14467 bool, return void and make extern. Adjust.
14468 (mi_interpreter_resume): ... Rename to ...
14469 (mi_interp::resume): ... this. Remove the 'data' parameter,
14470 return void and make extern. Adjust.
14471 (mi_interpreter_suspend): ... Rename to ...
14472 (mi_interp::suspend): ... this. Remove the 'data' parameter,
14473 return void and make extern. Adjust.
14474 (mi_interpreter_exec): ... Rename to ...
14475 (mi_interp::exec): ... this. Remove the 'data' parameter and make
14476 extern. Adjust.
14477 (mi_interpreter_pre_command_loop): ... Rename to ...
14478 (mi_interp::pre_command_loop): ... this. Remove the 'self'
14479 parameter and make extern.
14480 (mi_on_normal_stop_1): Adjust.
14481 (mi_ui_out): Rename to ...
14482 (mi_interp::interp_ui_out): ... this. Remove the 'interp'
14483 parameter and make extern. Adjust.
14484 (mi_set_logging): Rename to ...
14485 (mi_interp::set_logging): ... this. Remove the 'interp'
14486 parameter and make extern. Adjust.
14487 (mi_interp_procs): Delete.
14488 (mi_interp_factory): Adjust to use 'new'.
14489 * mi/mi-main.c (mi_cmd_gdb_exit, captured_mi_execute_command)
14490 (mi_print_exception, mi_execute_command, mi_load_progress):
14491 Adjust.
14492 * tui/tui-interp.c (tui_interp): New class.
14493 (as_tui_interp): Return a tui_interp pointer.
14494 (tui_on_normal_stop, tui_on_signal_received)
14495 (tui_on_end_stepping_range, tui_on_signal_exited, tui_on_exited)
14496 (tui_on_no_history, tui_on_user_selected_context_changed): Adjust
14497 to use interp::interp_ui_out.
14498 (tui_init): Rename to ...
14499 (tui_interp::init): ... this. Remove the 'self' parameter, use
14500 bool, return void and make extern. Adjust.
14501 (tui_resume): Rename to ...
14502 (tui_interp::resume): ... this. Remove the 'data' parameter,
14503 return void and make extern. Adjust.
14504 (tui_suspend): Rename to ...
14505 (tui_interp::suspend): ... this. Remove the 'data' parameter,
14506 return void and make extern. Adjust.
14507 (tui_ui_out): Rename to ...
14508 (tui_interp::interp_ui_out): ... this. Remove the 'self'
14509 parameter, and make extern. Adjust.
14510 (tui_exec): Rename to ...
14511 (tui_interp::exec): ... this. Remove the 'data' parameter and
14512 make extern.
14513 (tui_interp_procs): Delete.
14514 (tui_interp_factory): Use "new".
14515
14516 2017-02-02 Tom Tromey <tom@tromey.com>
14517
14518 * rust-exp.y (ends_raw_string, space_then_number)
14519 (rust_identifier_start_p): Return bool.
14520 * rust-lang.c (rust_tuple_type_p, rust_underscore_fields)
14521 (rust_tuple_struct_type_p, rust_tuple_variant_type_p)
14522 (rust_slice_type_p, rust_range_type_p, rust_u8_type_p)
14523 (rust_chartype_p): Return bool.
14524 (val_print_struct, rust_print_struct_def, rust_print_type):
14525 Update.
14526 * rust-lang.h (rust_tuple_type_p, rust_tuple_struct_type_p):
14527 Return bool.
14528
14529 2017-02-02 Tom Tromey <tom@tromey.com>
14530
14531 * rust-lang.c: Reindent.
14532
14533 2017-02-02 Tom Tromey <tom@tromey.com>
14534
14535 * rust-lang.h (rust_crate_for_block): Update.
14536 * rust-lang.c (rust_crate_for_block): Return std::string.
14537 (rust_get_disr_info): Use std:;string, not
14538 gdb::unique_xmalloc_ptr.
14539 * rust-exp.y (crate_name): Update.
14540
14541 2017-02-02 Pedro Alves <palves@redhat.com>
14542
14543 * disasm-selftests.c (print_one_insn_test): Move the "verbose"
14544 field out of gdb_disassembler_test and make it static.
14545
14546 2017-02-02 Pedro Alves <palves@redhat.com>
14547
14548 * mi/mi-common.h (struct mi_interp): Delete the mi2_interp,
14549 mi1_interp and mi_interp fields.
14550
14551 2017-02-02 Pedro Alves <palves@redhat.com>
14552
14553 * cli/cli-interp.c (struct saved_output_files, saved_output):
14554 Moved from cli/cli-logging.c.
14555 (cli_set_logging): New function.
14556 (cli_interp_procs): Install cli_set_logging.
14557 * cli/cli-interp.h (make_logging_output, cli_set_logging):
14558 Declare.
14559 * cli/cli-logging.c (struct saved_output_files, saved_output):
14560 Moved to cli/cli-interp.c.
14561 (pop_output_files): Don't save outputs here.
14562 (make_logging_output): New function.
14563 (handle_redirections): Don't build tee nor save previous outputs
14564 here.
14565 * interps.c (current_interp_set_logging): Change prototype.
14566 Assume there's always a set_logging_proc method installed.
14567 * interps.h (interp_set_logging_ftype): Change prototype.
14568 (current_interp_set_logging): Change prototype and adjust comment.
14569 * mi/mi-interp.c (mi_set_logging): Change protototype. Adjust to
14570 use make_logging_output.
14571 * tui/tui-interp.c (tui_interp_procs): Install cli_set_logging.
14572 2017-02-02 Pedro Alves <palves@redhat.com>
14573
14574 * cli/cli-logging.c (maybe_warn_already_logging): New factored out
14575 from ...
14576 (set_logging_overwrite): ... here.
14577 (logging_no_redirect_file): Delete.
14578 (set_logging_redirect): Don't handle redirection on the fly.
14579 Instead warn that "logging off" / "logging on" is necessary.
14580 (pop_output_files): Delete references to logging_no_redirect_file.
14581 (show_logging_command): Always speak in terms of what will happen
14582 once logging is reenabled.
14583
14584 2017-02-02 Pedro Alves <palves@redhat.com>
14585
14586 * disasm.h (gdb_pretty_print_disassembler): Tweak intro comment.
14587
14588 2017-02-02 Pedro Alves <palves@redhat.com>
14589
14590 * disasm.c (gdb_pretty_print_insn): Rename to ...
14591 (gdb_pretty_print_disassembler::pretty_print_insn): ... this.
14592 Remove gdbarch parameter. Adapt to clear the object's buffers
14593 instead of allocating new buffers, and to print using the object's
14594 gdb_disassembler instead of calling gdb_print_insn.
14595 (dump_insns): Use gdb_pretty_print_disassembler.
14596 * disasm.h (gdb_pretty_print_insn): Delete declaration.
14597 (gdb_pretty_print_disassembler): New class.
14598 * record-btrace.c (btrace_insn_history): Use
14599 gdb_pretty_print_disassembler.
14600
14601 2017-02-02 Pedro Alves <palves@redhat.com>
14602
14603 * ada-lang.c (type_as_string): Use string_file.
14604 * ada-valprint.c (ada_print_floating): Use string_file.
14605 * ada-varobj.c (ada_varobj_scalar_image)
14606 (ada_varobj_get_value_image): Use string_file.
14607 * aix-thread.c (aix_thread_extra_thread_info): Use string_file.
14608 * arm-tdep.c (_initialize_arm_tdep): Use string_printf.
14609 * breakpoint.c (update_inserted_breakpoint_locations)
14610 (insert_breakpoint_locations, reattach_breakpoints)
14611 (print_breakpoint_location, print_one_detail_ranged_breakpoint)
14612 (print_it_watchpoint): Use string_file.
14613 (save_breakpoints): Use stdio_file.
14614 * c-exp.y (oper): Use string_file.
14615 * cli/cli-logging.c (set_logging_redirect): Use ui_file_up and
14616 tee_file.
14617 (pop_output_files): Use delete.
14618 (handle_redirections): Use stdio_file and tee_file.
14619 * cli/cli-setshow.c (do_show_command): Use string_file.
14620 * compile/compile-c-support.c (c_compute_program): Use
14621 string_file.
14622 * compile/compile-c-symbols.c (generate_vla_size): Take a
14623 'string_file &' instead of a 'ui_file *'.
14624 (generate_c_for_for_one_variable): Take a 'string_file &' instead
14625 of a 'ui_file *'. Use string_file.
14626 (generate_c_for_variable_locations): Take a 'string_file &'
14627 instead of a 'ui_file *'.
14628 * compile/compile-internal.h (generate_c_for_for_one_variable):
14629 Take a 'string_file &' instead of a 'ui_file *'.
14630 * compile/compile-loc2c.c (push, pushf, unary, binary)
14631 (print_label, pushf_register_address, pushf_register)
14632 (do_compile_dwarf_expr_to_c): Take a 'string_file &' instead of a
14633 'ui_file *'. Adjust.
14634 * compile/compile.c (compile_to_object): Use string_file.
14635 * compile/compile.h (compile_dwarf_expr_to_c)
14636 (compile_dwarf_bounds_to_c): Take a 'string_file &' instead of a
14637 'ui_file *'.
14638 * cp-support.c (inspect_type): Use string_file and obstack_copy0.
14639 (replace_typedefs_qualified_name): Use string_file and
14640 obstack_copy0.
14641 * disasm.c (gdb_pretty_print_insn): Use string_file.
14642 (gdb_disassembly): Adjust reference the null_stream global.
14643 (do_ui_file_delete): Delete.
14644 (gdb_insn_length): Use null_stream.
14645 * dummy-frame.c (maintenance_print_dummy_frames): Use stdio_file.
14646 * dwarf2loc.c (dwarf2_compile_property_to_c)
14647 (locexpr_generate_c_location, loclist_generate_c_location): Take a
14648 'string_file &' instead of a 'ui_file *'.
14649 * dwarf2loc.h (dwarf2_compile_property_to_c): Likewise.
14650 * dwarf2read.c (do_ui_file_peek_last): Delete.
14651 (dwarf2_compute_name): Use string_file.
14652 * event-top.c (gdb_setup_readline): Use stdio_file.
14653 * gdbarch.sh (verify_gdbarch): Use string_file.
14654 * gdbtypes.c (safe_parse_type): Use null_stream.
14655 * guile/scm-breakpoint.c (gdbscm_breakpoint_commands): Use
14656 string_file.
14657 * guile/scm-disasm.c (gdbscm_print_insn_from_port): Take a
14658 'string_file *' instead of a 'ui_file *'.
14659 (gdbscm_arch_disassemble): Use string_file.
14660 * guile/scm-frame.c (frscm_print_frame_smob): Use string_file.
14661 * guile/scm-ports.c (class ioscm_file_port): Now a class that
14662 inherits from ui_file.
14663 (ioscm_file_port_delete, ioscm_file_port_rewind)
14664 (ioscm_file_port_put): Delete.
14665 (ioscm_file_port_write): Rename to ...
14666 (ioscm_file_port::write): ... this. Remove file_port_magic
14667 checks.
14668 (ioscm_file_port_new): Delete.
14669 (ioscm_with_output_to_port_worker): Use ioscm_file_port and
14670 ui_file_up.
14671 * guile/scm-type.c (tyscm_type_name): Use string_file.
14672 * guile/scm-value.c (vlscm_print_value_smob, gdbscm_value_print):
14673 Use string_file.
14674 * infcmd.c (print_return_value_1): Use string_file.
14675 * infrun.c (print_target_wait_results): Use string_file.
14676 * language.c (add_language): Use string_file.
14677 * location.c (explicit_to_string_internal): Use string_file.
14678 * main.c (captured_main_1): Use null_file.
14679 * maint.c (maintenance_print_architecture): Use stdio_file.
14680 * mi/mi-cmd-stack.c (list_arg_or_local): Use string_file.
14681 * mi/mi-common.h (struct mi_interp) <out, err, log, targ,
14682 event_channel>: Change type to mi_console_file pointer.
14683 * mi/mi-console.c (mi_console_file_fputs, mi_console_file_flush)
14684 (mi_console_file_delete): Delete.
14685 (struct mi_console_file): Delete.
14686 (mi_console_file_magic): Delete.
14687 (mi_console_file_new): Delete.
14688 (mi_console_file::mi_console_file): New.
14689 (mi_console_file_delete): Delete.
14690 (mi_console_file_fputs): Delete.
14691 (mi_console_file::write): New.
14692 (mi_console_raw_packet): Delete.
14693 (mi_console_file::flush): New.
14694 (mi_console_file_flush): Delete.
14695 (mi_console_set_raw): Rename to ...
14696 (mi_console_file::set_raw): ... this.
14697 * mi/mi-console.h (class mi_console_file): New class.
14698 (mi_console_file_new, mi_console_set_raw): Delete.
14699 * mi/mi-interp.c (mi_interpreter_init): Use mi_console_file.
14700 (mi_set_logging): Use delete and tee_file. Adjust.
14701 * mi/mi-main.c (output_register): Use string_file.
14702 (mi_cmd_data_evaluate_expression): Use string_file.
14703 (mi_cmd_data_read_memory): Use string_file.
14704 (mi_cmd_execute, print_variable_or_computed): Use string_file.
14705 * mi/mi-out.c (mi_ui_out::main_stream): New.
14706 (mi_ui_out::rewind): Use main_stream and
14707 string_file.
14708 (mi_ui_out::put): Use main_stream and string_file.
14709 (mi_ui_out::mi_ui_out): Remove 'stream' parameter.
14710 Allocate a 'string_file' instead.
14711 (mi_out_new): Don't allocate a mem_fileopen stream here.
14712 * mi/mi-out.h (mi_ui_out::mi_ui_out): Remove 'stream' parameter.
14713 (mi_ui_out::main_stream): Declare method.
14714 * printcmd.c (eval_command): Use string_file.
14715 * psymtab.c (maintenance_print_psymbols): Use stdio_file.
14716 * python/py-arch.c (archpy_disassemble): Use string_file.
14717 * python/py-breakpoint.c (bppy_get_commands): Use string_file.
14718 * python/py-frame.c (frapy_str): Use string_file.
14719 * python/py-framefilter.c (py_print_type, py_print_single_arg):
14720 Use string_file.
14721 * python/py-type.c (typy_str): Use string_file.
14722 * python/py-unwind.c (unwind_infopy_str): Use string_file.
14723 * python/py-value.c (valpy_str): Use string_file.
14724 * record-btrace.c (btrace_insn_history): Use string_file.
14725 * regcache.c (regcache_print): Use stdio_file.
14726 * reggroups.c (maintenance_print_reggroups): Use stdio_file.
14727 * remote.c (escape_buffer): Use string_file.
14728 * rust-lang.c (rust_get_disr_info): Use string_file.
14729 * serial.c (serial_open_ops_1): Use stdio_file.
14730 (do_serial_close): Use delete.
14731 * stack.c (print_frame_arg): Use string_file.
14732 (print_frame_args): Remove local mem_fileopen stream, not used.
14733 (print_frame): Use string_file.
14734 * symmisc.c (maintenance_print_symbols): Use stdio_file.
14735 * symtab.h (struct symbol_computed_ops) <generate_c_location>:
14736 Take a 'string_file *' instead of a 'ui_file *'.
14737 * top.c (new_ui): Use stdio_file and stderr_file.
14738 (free_ui): Use delete.
14739 (execute_command_to_string): Use string_file.
14740 (quit_confirm): Use string_file.
14741 * tracepoint.c (collection_list::append_exp): Use string_file.
14742 * tui/tui-disasm.c (tui_disassemble): Use string_file.
14743 * tui/tui-file.c: Don't include "ui-file.h".
14744 (enum streamtype, struct tui_stream): Delete.
14745 (tui_file_new, tui_file_delete, tui_fileopen, tui_sfileopen)
14746 (tui_file_isatty, tui_file_rewind, tui_file_put): Delete.
14747 (tui_file::tui_file): New method.
14748 (tui_file_fputs): Delete.
14749 (tui_file_get_strbuf): Delete.
14750 (tui_file::puts): New method.
14751 (tui_file_adjust_strbuf): Delete.
14752 (tui_file_flush): Delete.
14753 (tui_file::flush): New method.
14754 * tui/tui-file.h: Tweak intro comment.
14755 Include ui-file.h.
14756 (tui_fileopen, tui_sfileopen, tui_file_get_strbuf)
14757 (tui_file_adjust_strbuf): Delete declarations.
14758 (class tui_file): New class.
14759 * tui/tui-io.c (tui_initialize_io): Use tui_file.
14760 * tui/tui-regs.c (tui_restore_gdbout): Use delete.
14761 (tui_register_format): Use string_stream.
14762 * tui/tui-stack.c (tui_make_status_line): Use string_file.
14763 (tui_get_function_from_frame): Use string_file.
14764 * typeprint.c (type_to_string): Use string_file.
14765 * ui-file.c (struct ui_file, ui_file_magic, ui_file_new): Delete.
14766 (null_stream): New global.
14767 (ui_file_delete): Delete.
14768 (ui_file::ui_file): New.
14769 (null_file_isatty): Delete.
14770 (ui_file::~ui_file): New.
14771 (null_file_rewind): Delete.
14772 (ui_file::printf): New.
14773 (null_file_put): Delete.
14774 (null_file_flush): Delete.
14775 (ui_file::putstr): New.
14776 (null_file_write): Delete.
14777 (ui_file::putstrn): New.
14778 (null_file_read): Delete.
14779 (ui_file::putc): New.
14780 (null_file_fputs): Delete.
14781 (null_file_write_async_safe): Delete.
14782 (ui_file::vprintf): New.
14783 (null_file_delete): Delete.
14784 (null_file::write): New.
14785 (null_file_fseek): Delete.
14786 (null_file::puts): New.
14787 (ui_file_data): Delete.
14788 (null_file::write_async_safe): New.
14789 (gdb_flush, ui_file_isatty): Adjust.
14790 (ui_file_put, ui_file_rewind): Delete.
14791 (ui_file_write): Adjust.
14792 (ui_file_write_for_put): Delete.
14793 (ui_file_write_async_safe, ui_file_read): Adjust.
14794 (ui_file_fseek): Delete.
14795 (fputs_unfiltered): Adjust.
14796 (set_ui_file_flush, set_ui_file_isatty, set_ui_file_rewind)
14797 (set_ui_file_put, set_ui_file_write, set_ui_file_write_async_safe)
14798 (set_ui_file_read, set_ui_file_fputs, set_ui_file_fseek)
14799 (set_ui_file_data): Delete.
14800 (string_file::~string_file, string_file::write)
14801 (struct accumulated_ui_file, do_ui_file_xstrdup, ui_file_xstrdup)
14802 (do_ui_file_as_string, ui_file_as_string): Delete.
14803 (do_ui_file_obsavestring, ui_file_obsavestring): Delete.
14804 (struct mem_file): Delete.
14805 (mem_file_new): Delete.
14806 (stdio_file::stdio_file): New.
14807 (mem_file_delete): Delete.
14808 (stdio_file::stdio_file): New.
14809 (mem_fileopen): Delete.
14810 (stdio_file::~stdio_file): New.
14811 (mem_file_rewind): Delete.
14812 (stdio_file::set_stream): New.
14813 (mem_file_put): Delete.
14814 (stdio_file::open): New.
14815 (mem_file_write): Delete.
14816 (stdio_file_magic, struct stdio_file): Delete.
14817 (stdio_file_new, stdio_file_delete, stdio_file_flush): Delete.
14818 (stdio_file::flush): New.
14819 (stdio_file_read): Rename to ...
14820 (stdio_file::read): ... this. Adjust.
14821 (stdio_file_write): Rename to ...
14822 (stdio_file::write): ... this. Adjust.
14823 (stdio_file_write_async_safe): Rename to ...
14824 (stdio_file::write_async_safe) ... this. Adjust.
14825 (stdio_file_fputs): Rename to ...
14826 (stdio_file::puts) ... this. Adjust.
14827 (stdio_file_isatty): Delete.
14828 (stdio_file_fseek): Delete.
14829 (stdio_file::isatty): New.
14830 (stderr_file_write): Rename to ...
14831 (stderr_file::write) ... this. Adjust.
14832 (stderr_file_fputs): Rename to ...
14833 (stderr_file::puts) ... this. Adjust.
14834 (stderr_fileopen, stdio_fileopen, gdb_fopen): Delete.
14835 (stderr_file::stderr_file): New.
14836 (tee_file_magic): Delete.
14837 (struct tee_file): Delete.
14838 (tee_file::tee_file): New.
14839 (tee_file_new): Delete.
14840 (tee_file::~tee_file): New.
14841 (tee_file_delete): Delete.
14842 (tee_file_flush): Rename to ...
14843 (tee_file::flush): ... this. Adjust.
14844 (tee_file_write): Rename to ...
14845 (tee_file::write): ... this. Adjust.
14846 (tee_file::write_async_safe): New.
14847 (tee_file_fputs): Rename to ...
14848 (tee_file::puts): ... this. Adjust.
14849 (tee_file_isatty): Rename to ...
14850 (tee_file::isatty): ... this. Adjust.
14851 * ui-file.h (struct obstack, struct ui_file): Don't
14852 forward-declare.
14853 (ui_file_new, ui_file_flush_ftype, set_ui_file_flush)
14854 (ui_file_write_ftype)
14855 (set_ui_file_write, ui_file_fputs_ftype, set_ui_file_fputs)
14856 (ui_file_write_async_safe_ftype, set_ui_file_write_async_safe)
14857 (ui_file_read_ftype, set_ui_file_read, ui_file_isatty_ftype)
14858 (set_ui_file_isatty, ui_file_rewind_ftype, set_ui_file_rewind)
14859 (ui_file_put_method_ftype, ui_file_put_ftype, set_ui_file_put)
14860 (ui_file_delete_ftype, set_ui_file_data, ui_file_fseek_ftype)
14861 (set_ui_file_fseek): Delete.
14862 (ui_file_data, ui_file_delete, ui_file_rewind)
14863 (struct ui_file): New.
14864 (ui_file_up): New.
14865 (class null_file): New.
14866 (null_stream): Declare.
14867 (ui_file_write_for_put, ui_file_put): Delete.
14868 (ui_file_xstrdup, ui_file_as_string, ui_file_obsavestring):
14869 Delete.
14870 (ui_file_fseek, mem_fileopen, stdio_fileopen, stderr_fileopen)
14871 (gdb_fopen, tee_file_new): Delete.
14872 (struct string_file): New.
14873 (struct stdio_file): New.
14874 (stdio_file_up): New.
14875 (struct stderr_file): New.
14876 (class tee_file): New.
14877 * ui-out.c (ui_out::field_stream): Take a 'string_file &' instead
14878 of a 'ui_file *'. Adjust.
14879 * ui-out.h (class ui_out) <field_stream>: Likewise.
14880 * utils.c (do_ui_file_delete, make_cleanup_ui_file_delete)
14881 (null_stream): Delete.
14882 (error_stream): Take a 'string_file &' instead of a 'ui_file *'.
14883 Adjust.
14884 * utils.h (struct ui_file): Delete forward declaration..
14885 (make_cleanup_ui_file_delete, null_stream): Delete declarations.
14886 (error_stream): Take a 'string_file &' instead of a
14887 'ui_file *'.
14888 * varobj.c (varobj_value_get_print_value): Use string_file.
14889 * xtensa-tdep.c (xtensa_verify_config): Use string_file.
14890 * gdbarch.c: Regenerate.
14891
14892 2017-02-02 Pedro Alves <palves@redhat.com>
14893
14894 * disasm.c (gdb_disassembler::pretty_print_insn): Rename to...
14895 (gdb_pretty_print_insn): ... this. Now a free function. Add back
14896 a 'gdbarch' parameter. Allocate a mem_fileopen stream here.
14897 Adjust to call gdb_print_insn instead of
14898 gdb_disassembler::print_insn.
14899 (dump_insns, do_mixed_source_and_assembly_deprecated)
14900 (do_mixed_source_and_assembly, do_assembly_only): Add back a
14901 'gdbarch' parameter. Remove gdb_disassembler parameter.
14902 (gdb_disassembly): Don't allocate a gdb_disassembler here.
14903 * disasm.h (gdb_disassembler::pretty_print_insn): Delete
14904 declaration.
14905 (gdb_pretty_print_insn): Re-add declaration.
14906 * record-btrace.c (btrace_insn_history): Don't allocate a
14907 gdb_disassembler here. Adjust to call gdb_pretty_print_insn.
14908
14909 2017-02-01 Simon Marchi <simon.marchi@polymtl.ca>
14910
14911 * disasm.h (gdb_disassembly): Remove file_string parameter.
14912 * disasm.c (gdb_disassembly): Likewise.
14913 * cli/cli-cmds.c (print_disassembly): Adapt.
14914 * mi/mi-cmd-disas.c (mi_cmd_disassemble): Likewise.
14915 * stack.c (do_gdb_disassembly): Likewise.
14916
14917 2017-02-01 Andreas Arnez <arnez@linux.vnet.ibm.com>
14918
14919 * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): For
14920 DWARF_VALUE_LITERAL, no longer ignore the offset on big-endian
14921 targets. And if the implicit value is longer than needed, extract
14922 the first bytes instead of the "least significant" ones.
14923
14924 2017-02-01 Markus Metzger <markus.t.metzger@intel.com>
14925
14926 * btrace.c (btrace_enable): Do not call btrace_add_pc for
14927 BTRACE_FORMAT_PT or if can_access_registers_ptid returns false.
14928 (btrace_fetch): Assert can_access_registers_ptid.
14929 * record-btrace.c (require_btrace_thread, record_btrace_info): Call
14930 validate_registers_access.
14931
14932 2017-02-01 Markus Metzger <markus.t.metzger@intel.com>
14933
14934 * gdbthread.h (can_access_registers_ptid): New.
14935 * thread.c (can_access_registers_ptid): New.
14936
14937 2017-02-01 Pedro Alves <palves@redhat.com>
14938
14939 * i386-tdep.c (i386_fast_tracepoint_valid_at): Use gdb_insn_length.
14940
14941 2017-01-31 Pedro Alves <palves@redhat.com>
14942
14943 * mi/mi-interp.c (mi_breakpoint_created, mi_breakpoint_modified):
14944 Fix typos.
14945
14946 2017-01-31 Pedro Alves <palves@redhat.com>
14947
14948 * stack.c (print_frame_args): Remove local mem_fileopen stream,
14949 not used.
14950
14951 2017-01-31 Pedro Alves <palves@redhat.com>
14952
14953 * varobj.c (varobj_value_get_print_value): Remove xstrdup call.
14954
14955 2017-01-31 Pedro Alves <palves@redhat.com>
14956
14957 * common/scoped_restore.h
14958 (scoped_restore_tmpl::scoped_restore_tmpl): Template on T2, and
14959 change the value's parameter type to T2.
14960 (make_scoped_restore): Likewise.
14961
14962 2017-01-27 Walfred Tedeschi <walfred.tedeschi@intel.com>
14963 Richard Henderson <rth@redhat.com>
14964
14965 * amd64-linux-nat.c (PTRACE_ARCH_PRCTL): New define.
14966 (amd64_linux_fetch_inferior_registers): Add case to fetch FS_BASE
14967 GS_BASE for older kernels.
14968 (amd64_linux_store_inferior_registers): Add case to store FS_BASE
14969 GS_BASE for older kernels.
14970 * amd64-linux-tdep.c (amd64_linux_gregset_reg_offset): Add FS_BASE
14971 and GS_BASE to the offset table.
14972 (amd64_linux_register_reggroup_p): Add FS_BASE and GS_BASE to the
14973 system register group.
14974 * amd64-nat.c (amd64_native_gregset_reg_offset): Implements case
14975 for older kernels.
14976 * amd64-tdep.c (amd64_init_abi): Add segment registers for the
14977 amd64 ABI.
14978 * amd64-tdep.h (amd64_regnum): Add AMD64_FSBASE_REGNUM and
14979 AMD64_GSBASE_REGNUM.
14980 (AMD64_NUM_REGS): Set to AMD64_GSBASE_REGNUM + 1.
14981 * features/Makefile (amd64-linux.dat, amd64-avx-linux.dat)
14982 (amd64-mpx-linux.dat, amd64-avx512-linux.dat, x32-linux.dat)
14983 (x32-avx-linux.dat, x32-avx512-linux.dat): Add
14984 i386/64bit-segments.xml in those rules.
14985 * features/i386/64bit-segments.xml: New file.
14986 * features/i386/amd64-avx-mpx-linux.xml: Add 64bit-segments.xml.
14987 * features/i386/amd64-avx-linux.xml: Add 64bit-segments.xml.
14988 * features/i386/amd64-avx512-linux.xml: Add 64bit-segments.xml.
14989 * features/i386/amd64-mpx-linux.xml: Add 64bit-segments.xml.
14990 * features/i386/x32-avx512-linux.xml: Add 64bit-segments.xml.
14991 * features/i386/x32-avx-linux.xml: Add 64bit-segments.xml.
14992 * features/i386/amd64-linux.xml: Add 64bit-segments.xml.
14993 * features/i386/amd64-avx-linux.c: Regenerated.
14994 * features/i386/amd64-avx-mpx-linux.c: Regenerated.
14995 * features/i386/amd64-avx-mpx.c: Regenerated.
14996 * features/i386/amd64-avx512-linux.c: Regenerated.
14997 * features/i386/amd64-linux.c: Regenerated.
14998 * features/i386/amd64-mpx-linux.c: Regenerated.
14999 * features/i386/i386-avx-mpx-linux.c: Regenerated.
15000 * features/i386/i386-avx-mpx.c: Regenerated.
15001 * features/i386/x32-avx-linux.c: Regenerated.
15002 * features/i386/x32-avx512-linux.c: Regenerated.
15003 * regformats/i386/amd64-avx-linux.dat: Regenerated.
15004 * regformats/i386/amd64-avx-mpx-linux.dat: Regenerated.
15005 * regformats/i386/amd64-avx512-linux.dat: Regenerated.
15006 * regformats/i386/amd64-linux.dat: Regenerated.
15007 * regformats/i386/amd64-mpx-linux.dat: Regenerated.
15008 * regformats/i386/x32-avx-linux.dat: Regenerated.
15009 * regformats/i386/x32-avx512-linux.dat: Regenerated.
15010 * regformats/i386/x32-linux.dat: Regenerated.
15011
15012 2017-01-27 Walfred Tedeschi <walfred.tedeschi@intel.com>
15013
15014 * amd64-linux-tdep.h (AMD64_LINUX_ORIG_RAX_REGNUM):
15015 Set to AMD64_NUM_REGS.
15016
15017 2017-01-27 Walfred Tedeschi <walfred.tedeschi@intel.com>
15018
15019 * amd64-nat.c (amd64_native_gregset_reg_offset): Simplify logic
15020 that checks validity of a register number.
15021
15022 2017-01-27 Kees Cook <keescook@google.com>
15023
15024 * gdb/arm-linux-nat.c (arm_linux_fetch_inferior_registers): Call
15025 fetch_fpregs if target has fpa registers.
15026 (arm_linux_store_inferior_registers): Call store_fpregs if target
15027 has fpa registers.
15028
15029 2017-01-26 Andreas Arnez <arnez@linux.vnet.ibm.com>
15030
15031 * cris-tdep.c (cris_gdbarch_init): Remove check for
15032 info.byte_order and force it to BFD_ENDIAN_LITTLE.
15033
15034 2017-01-26 Antoine Tremblay <antoine.tremblay@ericsson.com>
15035
15036 * corelow.c (get_core_register_section): Check for regset
15037 existence before checking for REGSET_VARIABLE_SIZE.
15038
15039 2017-01-26 Yao Qi <yao.qi@linaro.org>
15040 Pedro Alves <palves@redhat.com>
15041
15042 PR gdb/20939
15043 * disasm.c (gdb_disassembler::dis_asm_memory_error): Don't
15044 call memory_error, save memaddr instead.
15045 (gdb_disassembler::print_insn): If gdbarch_print_insn returns
15046 negative, cal memory_error.
15047 * disasm.h (gdb_disassembler) <m_err_memaddr>: New field.
15048
15049 2017-01-26 Yao Qi <yao.qi@linaro.org>
15050
15051 * disasm-selftests.c (memory_error_test): New function.
15052 (_initialize_disasm_selftests): Register memory_error_test.
15053
15054 2017-01-26 Yao Qi <yao.qi@linaro.org>
15055
15056 * Makefile.in (SFILES): Add disasm-selftests.c and
15057 selftest-arch.c.
15058 (COMMON_OBS): Add disasm-selftests.o and selftest-arch.o.
15059 * disasm-selftests.c: New file.
15060 * selftest-arch.c: New file.
15061 * selftest-arch.h: New file.
15062
15063 2017-01-26 Yao Qi <yao.qi@linaro.org>
15064
15065 * mep-tdep.c (mep_gdb_print_insn): Set info->arch
15066 to bfd_arch_mep. Don't return 0 if section is not
15067 found. Call print_insn_mep.
15068
15069 2017-01-26 Pedro Alves <palves@redhat.com>
15070 Yao Qi <yao.qi@linaro.org>
15071
15072 * arm-tdep.c: Include "disasm.h".
15073 (gdb_print_insn_arm): Update code to get gdbarch.
15074 * disasm.c (dis_asm_read_memory): Change it to
15075 gdb_disassembler::dis_asm_read_memory.
15076 (dis_asm_memory_error): Likewise.
15077 (dis_asm_print_address): Likewise.
15078 (gdb_pretty_print_insn): Change it to
15079 gdb_disassembler::pretty_print_insn.
15080 (dump_insns): Add one argument gdb_disassemlber. All
15081 callers updated.
15082 (do_mixed_source_and_assembly_deprecated): Likewise.
15083 (do_mixed_source_and_assembly): Likewise.
15084 (do_assembly_only): Likewise.
15085 (gdb_disassembler::gdb_disassembler): New.
15086 (gdb_disassembler::print_insn): New.
15087 * disasm.h (class gdb_disassembler): New.
15088 (gdb_pretty_print_insn): Remove declaration.
15089 (gdb_disassemble_info): Likewise.
15090 * guile/scm-disasm.c (class gdbscm_disassembler): New.
15091 (gdbscm_disasm_read_memory_worker): Update.
15092 (gdbscm_disasm_read_memory): Update.
15093 (gdbscm_disasm_memory_error): Remove.
15094 (gdbscm_disasm_print_address): Remove.
15095 (gdbscm_disassembler::gdbscm_disassembler): New.
15096 (gdbscm_print_insn_from_port): Update.
15097 * mips-tdep.c: Include disasm.h.
15098 (gdb_print_insn_mips): Update code to get gdbarch.
15099 * record-btrace.c (btrace_insn_history): Update.
15100 * spu-tdep.c: Include disasm.h.
15101 (struct spu_dis_asm_data): Remove.
15102 (struct spu_dis_asm_info): New.
15103 (spu_dis_asm_print_address): Use spu_dis_asm_info to get
15104 SPU id.
15105 (gdb_print_insn_spu): Cast disassemble_info to
15106 spu_dis_asm_info.
15107
15108 2017-01-26 Yao Qi <yao.qi@linaro.org>
15109
15110 * disasm.c (do_ui_file_delete): Delete.
15111 (gdb_insn_length): Move code creating stream to ...
15112 * utils.c (null_stream): ... here. New function.
15113 * utils.h (null_stream): Declare.
15114
15115 2017-01-23 Simon Marchi <simon.marchi@polymtl.ca>
15116
15117 * python/py-inferior.c (find_thread_object): Return directly
15118 from the loop. Remove "found" variable.
15119
15120 2017-01-21 Joel Brobecker <brobecker@adacore.com>
15121
15122 GDB 7.12.1 released.
15123
15124 2017-01-20 Simon Marchi <simon.marchi@ericsson.com>
15125
15126 * python/py-function.c (fnpy_call): Reorder declarations to have
15127 the gdbpy_enter object declared first.
15128 * python/py-xmethods.c (gdbpy_get_xmethod_arg_types): Likewise.
15129
15130 2017-01-20 Simon Marchi <simon.marchi@ericsson.com>
15131
15132 PR python/21068
15133 * python/python-internal.h (PyMem_RawMalloc): Define for
15134 Python < 3.4.
15135 * python/py-gdb-readline.c (gdbpy_readline_wrapper): Use
15136 PyMem_RawMalloc instead of PyMem_Malloc.
15137
15138 2017-01-20 Mike Wrighton <mike_wrighton@codesourcery.com>
15139 Luis Machado <lgustavo@codesourcery.com>
15140
15141 * NEWS (New commands): Mention flash-erase.
15142 (New MI commands): Mention target-flash-erase.
15143 * mi/mi-cmds.c (mi_cmd_target_flash_erase): Add target-flash-erase MI
15144 command.
15145 * mi/mi-cmds.h (mi_cmd_target_flash_erase): New declaration.
15146 * mi/mi-main.c (mi_cmd_target_flash_erase): New function.
15147 * target.c (flash_erase_command): New function.
15148 (initialize_targets): Add new flash-erase command.
15149 * target.h (flash_erase_command): New declaration.
15150
15151 2017-01-20 Joel Brobecker <brobecker@adacore.com>
15152
15153 * nat/linux-ptrace.c: Only include <sys/procfs.h> if
15154 HAVE_SYS_PROCFS_H is defined.
15155
15156 2017-01-18 Alan Hayward <alan.hayward@arm.com>
15157
15158 * remote.c (struct cached_reg): Change data into a pointer.
15159 * (stop_reply_dtr): Free data pointers before deleting vector.
15160 (process_stop_reply): Likewise.
15161 (remote_parse_stop_reply): Allocate space for data
15162
15163 2017-01-18 Alan Hayward <alan.hayward@arm.com>
15164
15165 * amd64-tdep.c (amd64_pseudo_register_read_value): remove
15166 MAX_REGISTER_SIZE.
15167 (amd64_pseudo_register_read_value): Likewise.
15168 * remote.c (fetch_register_using_p): Remove MAX_REGISTER_SIZE.
15169 (store_register_using_P): Likewise.
15170 * regcache.c (regcache_xfer_part): Likewise.
15171
15172 2017-01-16 Ivo Raisr <ivo.raisr@oracle.com>
15173
15174 Split real and pseudo registers.
15175 * sparc-tdep.h (SPARC_CORE_REGISTERS): New macro.
15176 (sparc32_pseudo_regnum): New enum.
15177 * sparc64-tdep.h (sparc64_pseudo_regnum): New enum.
15178 * sparc-tdep.c (SPARC32_FPU_REGISTERS): New macro.
15179 (SPARC32_CP0_REGISTERS): New macro.
15180 (sparc32_pseudo_register_name): New function.
15181 (sparc32_register_name): Use sparc32_pseudo_register_name.
15182 (sparc32_pseudo_register_type): New function.
15183 (sparc32_register_type): Use sparc32_pseudo_register_type.
15184 (sparc32_pseudo_register_read, sparc32_pseudo_register_write): Handle
15185 pseudo register numbers.
15186 * sparc64-tdep.c SPARC64_FPU_REGISTERS): New macro.
15187 (SPARC64_CP0_REGISTERS): New macro.
15188 (sparc64_pseudo_register_name): New function.
15189 (sparc64_register_name): Use sparc64_pseudo_register_name.
15190 (sparc64_pseudo_register_type): New function.
15191 (sparc64_register_type): Use sparc64_pseudo_register_type.
15192 (sparc64_pseudo_register_read, sparc64_pseudo_register_write): Handle
15193 pseudo register numbers.
15194 (sparc64_store_floating_fields, sparc64_extract_floating_fields,
15195 sparc64_store_arguments): Handle pseudo register numbers.
15196
15197 2017-01-13 Yao Qi <yao.qi@linaro.org>
15198
15199 * remote.c (REMOTE_DEBUG_MAX_CHAR): New macro.
15200 (putpkt_binary): Print only REMOTE_DEBUG_MAX_CHAR chars in debug
15201 output.
15202 (getpkt_or_notif_sane_1): Likewise.
15203
15204 2017-01-13 Yao Qi <yao.qi@linaro.org>
15205
15206 * Makefile.in (checker-headers): Use CXX and CXX_DIALET instead
15207 of CC. Pass "-x c++-header" instead of "-x c".
15208
15209 2017-01-12 Simon Marchi <simon.marchi@ericsson.com>
15210
15211 * remote.c (remote_can_async_p): Update comment.
15212
15213 2017-01-12 Simon Marchi <simon.marchi@ericsson.com>
15214
15215 * linux-nat.c (linux_nat_can_async_p): Update comment.
15216
15217 2017-01-12 Simon Marchi <simon.marchi@ericsson.com>
15218
15219 * serial.c (serial_open): Forget about "pc" and "lpt" serial interface.
15220
15221 2017-01-11 Simon Marchi <simon.marchi@ericsson.com>
15222
15223 * cli/cli-decode.c (lookup_cmd_1): Fix typo in comment.
15224
15225 2017-01-10 Tom Tromey <tom@tromey.com>
15226
15227 * python/py-type.c (typy_legacy_template_argument): Update.
15228 * cp-support.h (struct demangle_parse_info) (demangle_parse_info,
15229 ~demangle_parse_info): Declare new members.
15230 (cp_demangled_name_to_comp): Return unique_ptr.
15231 (cp_demangled_name_parse_free)
15232 (make_cleanup_cp_demangled_name_parse_free)
15233 (cp_new_demangle_parse_info): Remove.
15234 * cp-support.c (do_demangled_name_parse_free_cleanup)
15235 (make_cleanup_cp_demangled_name_parse_free): Remove.
15236 (inspect_type, cp_canonicalize_string_full)
15237 (cp_canonicalize_string): Update.
15238 (mangled_name_to_comp): Change return type.
15239 (cp_class_name_from_physname, method_name_from_physname)
15240 (cp_func_name, cp_remove_params): Update.
15241 * cp-name-parser.y (demangle_parse_info): New constructor, from
15242 cp_new_demangle_parse_info.
15243 (~demangle_parse_info): New destructor, from
15244 cp_demangled_name_parse_free.
15245 (cp_merge_demangle_parse_infos): Update.
15246 (cp_demangled_name_to_comp): Change return type.
15247
15248 2017-01-10 Tom Tromey <tom@tromey.com>
15249
15250 * top.c (prevent_dont_repeat): Change return type.
15251 * python/python.c (execute_gdb_command): Use std::string.
15252 Update.
15253 * guile/guile.c (gdbscm_execute_gdb_command): Update.
15254 * command.h (prevent_dont_repeat): Change return type.
15255 * breakpoint.c (bpstat_do_actions_1): Update.
15256
15257 2017-01-10 Tom Tromey <tom@tromey.com>
15258
15259 * value.h (scoped_value_mark::~scoped_value_mark): Call
15260 free_to_mark.
15261 (scoped_value_mark::free_to_mark): New method.
15262 * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Use
15263 scoped_value_mark.
15264
15265 2017-01-10 Tom Tromey <tom@tromey.com>
15266
15267 * python/py-value.c (valpy_dereference, valpy_referenced_value)
15268 (valpy_reference_value, valpy_const_value, valpy_get_address)
15269 (valpy_get_dynamic_type, valpy_lazy_string, valpy_do_cast)
15270 (valpy_getitem, valpy_call, valpy_binop_throw, valpy_negative)
15271 (valpy_absolute, valpy_richcompare_throw): Use scoped_value_mark.
15272 * dwarf2loc.c (dwarf2_loc_desc_get_symbol_read_needs): Use
15273 scoped_value_mark.
15274 * dwarf2-frame.c (execute_stack_op): Use scoped_value_mark.
15275 * value.h (scoped_value_mark): New class.
15276
15277 2017-01-10 Tom Tromey <tom@tromey.com>
15278
15279 * dwarf2read.c (dwarf2_build_psymtabs): Use psymtab_discarder.
15280 * psympriv.h (make_cleanup_discard_psymtabs): Don't declare.
15281 * psymtab.c (discard_psymtabs_upto): Remove.
15282 (make_cleanup_discard_psymtabs): Remove.
15283 (struct psymtab_state): Remove.
15284
15285 2017-01-10 Tom Tromey <tom@tromey.com>
15286
15287 * record-full.c (record_full_save_cleanups): Remove.
15288 (record_full_save): Use gdb::unlinker.
15289 * gcore.c (do_bfd_delete_cleanup): Remove.
15290 (gcore_command): Use gdb::unlinker, unique_xmalloc_ptr. Remove
15291 cleanups.
15292 * dwarf2read.c (unlink_if_set): Remove.
15293 (write_psymtabs_to_index): Use gdb::unlinker.
15294 * common/gdb_unlinker.h: New file.
15295
15296 2017-01-10 Tom Tromey <tom@tromey.com>
15297
15298 * windows-tdep.c (windows_xfer_shared_library): Update.
15299 * windows-nat.c (windows_make_so): Update.
15300 * utils.h (make_cleanup_bfd_unref): Remove.
15301 * utils.c (do_bfd_close_cleanup, make_cleanup_bfd_unref): Remove.
15302 * symfile.h (symfile_bfd_open)
15303 (find_separate_debug_file_in_section): Return gdb_bfd_ref_ptr.
15304 * symfile.c (read_symbols, symbol_file_add)
15305 (separate_debug_file_exists): Update.
15306 (symfile_bfd_open): Return gdb_bfd_ref_ptr.
15307 (generic_load, reread_symbols): Update.
15308 * symfile-mem.c (symbol_file_add_from_memory): Update.
15309 * spu-linux-nat.c (spu_bfd_open): Return gdb_bfd_ref_ptr.
15310 (spu_symbol_file_add_from_memory): Update.
15311 * solist.h (struct target_so_ops) <bfd_open>: Return
15312 gdb_bfd_ref_ptr.
15313 (solib_bfd_fopen, solib_bfd_open): Return gdb_bfd_ref_ptr.
15314 * solib.c (solib_bfd_fopen, solib_bfd_open): Return
15315 gdb_bfd_ref_ptr.
15316 (solib_map_sections, reload_shared_libraries_1): Update.
15317 * solib-svr4.c (enable_break): Update.
15318 * solib-spu.c (spu_bfd_fopen): Return gdb_bfd_ref_ptr.
15319 * solib-frv.c (enable_break2): Update.
15320 * solib-dsbt.c (enable_break): Update.
15321 * solib-darwin.c (gdb_bfd_mach_o_fat_extract): Return
15322 gdb_bfd_ref_ptr.
15323 (darwin_solib_get_all_image_info_addr_at_init): Update.
15324 (darwin_bfd_open): Return gdb_bfd_ref_ptr.
15325 * solib-aix.c (solib_aix_bfd_open): Return gdb_bfd_ref_ptr.
15326 * record-full.c (record_full_save): Update.
15327 * python/py-objfile.c (objfpy_add_separate_debug_file): Update.
15328 * procfs.c (insert_dbx_link_bpt_in_file): Update.
15329 * minidebug.c (find_separate_debug_file_in_section): Return
15330 gdb_bfd_ref_ptr.
15331 * machoread.c (macho_add_oso_symfile): Change abfd to
15332 gdb_bfd_ref_ptr.
15333 (macho_symfile_read_all_oso): Update.
15334 (macho_check_dsym): Return gdb_bfd_ref_ptr.
15335 (macho_symfile_read): Update.
15336 * jit.c (bfd_open_from_target_memory): Return gdb_bfd_ref_ptr.
15337 (jit_bfd_try_read_symtab): Update.
15338 * gdb_bfd.h (gdb_bfd_open, gdb_bfd_fopen, gdb_bfd_openr)
15339 (gdb_bfd_openw, gdb_bfd_openr_iovec)
15340 (gdb_bfd_openr_next_archived_file, gdb_bfd_fdopenr): Return
15341 gdb_bfd_ref_ptr.
15342 (gdb_bfd_ref_policy): New struct.
15343 (gdb_bfd_ref_ptr): New typedef.
15344 * gdb_bfd.c (gdb_bfd_open, gdb_bfd_fopen, gdb_bfd_openr)
15345 (gdb_bfd_openw, gdb_bfd_openr_iovec)
15346 (gdb_bfd_openr_next_archived_file, gdb_bfd_fdopenr): Return
15347 gdb_bfd_ref_ptr.
15348 * gcore.h (create_gcore_bfd): Return gdb_bfd_ref_ptr.
15349 * gcore.c (create_gcore_bfd): Return gdb_bfd_ref_ptr.
15350 (gcore_command): Update.
15351 * exec.c (exec_file_attach): Update.
15352 * elfread.c (elf_symfile_read): Update.
15353 * dwarf2read.c (dwarf2_get_dwz_file): Update.
15354 (try_open_dwop_file, open_dwo_file): Return gdb_bfd_ref_ptr.
15355 (open_and_init_dwo_file): Update.
15356 (open_dwp_file): Return gdb_bfd_ref_ptr.
15357 (open_and_init_dwp_file): Update.
15358 * corelow.c (core_open): Update.
15359 * compile/compile-object-load.c (compile_object_load): Update.
15360 * common/gdb_ref_ptr.h (ref_ptr::operator->): New operator.
15361 * coffread.c (coff_symfile_read): Update.
15362 * cli/cli-dump.c (bfd_openr_or_error, bfd_openw_or_error): Return
15363 gdb_bfd_ref_ptr. Rename.
15364 (dump_bfd_file, restore_command): Update.
15365 * build-id.h (build_id_to_debug_bfd): Return gdb_bfd_ref_ptr.
15366 * build-id.c (build_id_to_debug_bfd): Return gdb_bfd_ref_ptr.
15367 (find_separate_debug_file_by_buildid): Update.
15368
15369 2017-01-10 Tom Tromey <tom@tromey.com>
15370
15371 * common/gdb_ref_ptr.h: New file.
15372 * python/py-ref.h (struct gdbpy_ref_policy): New.
15373 (gdbpy_ref): Now a typedef.
15374
15375 2017-01-10 Tom Tromey <tom@tromey.com>
15376
15377 * utils.h (make_cleanup_htab_delete): Don't declare.
15378 * utils.c (do_htab_delete_cleanup, make_cleanup_htab_delete):
15379 Remove.
15380 * linespec.c (decode_compound_collector): Add constructor,
15381 destructor.
15382 (lookup_prefix_sym): Remove cleanup.
15383 (symtab_collector): Add constructor, destructor.
15384 (collect_symtabs_from_filename): Remove cleanup.
15385 * disasm.c (do_mixed_source_and_assembly): Use htab_up.
15386 * compile/compile-c-symbols.c (generate_c_for_variable_locations):
15387 Use htab_up.
15388 * gnu-v3-abi.c (gnuv3_print_vtable): Use htab_up.
15389 * dwarf2read.c (dw2_expand_symtabs_matching)
15390 (dw2_map_symbol_filenames, dwarf_decode_macros)
15391 (write_psymtabs_to_index): Use htab_up.
15392 * dwarf2loc.c (func_verify_no_selftailcall)
15393 (call_site_find_chain_1, func_verify_no_selftailcall)
15394 (chain_candidate, call_site_find_chain_1): Use std::unordered_set,
15395 std::vector, gdb::unique_xmalloc_ptr.
15396 (call_sitep): Remove typedef.
15397 (dwarf2_locexpr_baton_eval): Remove unused variable.
15398
15399 2017-01-10 Tom Tromey <tom@tromey.com>
15400
15401 * python/python-internal.h (make_cleanup_py_decref)
15402 (make_cleanup_py_xdecref): Don't declare.
15403 * python/py-utils.c (py_decref, make_cleanup_py_decref)
15404 (py_xdecref, make_cleanup_py_xdecref): Remove.
15405
15406 2017-01-10 Tom Tromey <tom@tromey.com>
15407
15408 * python/py-framefilter.c (py_mi_print_variables): Use gdbpy_ref.
15409 (py_print_locals, enumerate_locals, py_print_args): Use gdbpy_ref.
15410
15411 2017-01-10 Tom Tromey <tom@tromey.com>
15412
15413 * python/py-framefilter.c (enumerate_args): Use gdbpy_ref.
15414
15415 2017-01-10 Tom Tromey <tom@tromey.com>
15416
15417 * python/py-utils.c (unicode_to_encoded_string)
15418 (python_string_to_target_string)
15419 (python_string_to_target_python_string)
15420 (python_string_to_host_string, gdbpy_obj_to_string)
15421 (get_addr_from_python): Use gdbpy_ref.
15422
15423 2017-01-10 Tom Tromey <tom@tromey.com>
15424
15425 * python/py-unwind.c (pyuw_object_attribute_to_pointer): Use
15426 gdbpy_ref.
15427
15428 2017-01-10 Tom Tromey <tom@tromey.com>
15429
15430 * python/python.c (eval_python_command, gdbpy_decode_line)
15431 (gdbpy_run_events, gdbpy_start_type_printers)
15432 (gdbpy_apply_type_printers): Use gdbpy_ref.
15433
15434 2017-01-10 Tom Tromey <tom@tromey.com>
15435
15436 * python/py-param.c (get_doc_string, compute_enum_values): Use
15437 gdbpy_ref.
15438
15439 2017-01-10 Tom Tromey <tom@tromey.com>
15440
15441 * python/py-inferior.c (find_thread_object, build_inferior_list):
15442 Use gdbpy_ref.
15443
15444 2017-01-10 Tom Tromey <tom@tromey.com>
15445
15446 * python/py-framefilter.c (py_print_frame): Use gdbpy_ref.
15447
15448 2017-01-10 Tom Tromey <tom@tromey.com>
15449
15450 * python/py-finishbreakpoint.c (bpfinishpy_out_of_scope): Use
15451 gdbpy_ref.
15452
15453 2017-01-10 Tom Tromey <tom@tromey.com>
15454
15455 * python/py-cmd.c (cmdpy_completer_helper): Use gdbpy_ref. Remove
15456 extra incref.
15457 (cmdpy_completer_handle_brkchars, cmdpy_completer, cmdpy_init):
15458 Use gdbpy_ref.
15459
15460 2017-01-10 Tom Tromey <tom@tromey.com>
15461
15462 * python/py-breakpoint.c (gdbpy_breakpoint_cond_says_stop): Use
15463 gdbpy_ref.
15464
15465 2017-01-10 Tom Tromey <tom@tromey.com>
15466
15467 * python/py-arch.c (archpy_disassemble): Use gdbpy_ref. Don't
15468 decref results of PyArg_ParseTupleAndKeywords.
15469
15470 2017-01-10 Tom Tromey <tom@tromey.com>
15471
15472 * python/python.c (python_run_simple_file): Use
15473 unique_xmalloc_ptr, gdbpy_ref.
15474
15475 2017-01-10 Tom Tromey <tom@tromey.com>
15476
15477 * python/py-prettyprint.c (print_stack_unless_memory_error)
15478 (print_string_repr, print_children): Use gdbpy_ref.
15479 (dummy_python_frame): New class.
15480 (dummy_python_frame::dummy_python_frame): Rename from
15481 push_dummy_python_frame.
15482 (py_restore_tstate): Remove.
15483
15484 2017-01-10 Tom Tromey <tom@tromey.com>
15485
15486 * python/py-framefilter.c (py_print_frame): Use gdbpy_ref.
15487
15488 2017-01-10 Tom Tromey <tom@tromey.com>
15489
15490 * python/python.c (ensure_python_env, restore_python_env):
15491 Remove.
15492 * python/python-internal.h (ensure_python_env): Don't declare.
15493 * varobj.h (varobj_ensure_python_env): Don't declare.
15494 * varobj.c (varobj_ensure_python_env): Remove.
15495
15496 2017-01-10 Tom Tromey <tom@tromey.com>
15497
15498 * varobj.c (varobj_value_get_print_value): Use
15499 gdbpy_enter_varobj.
15500
15501 2017-01-10 Tom Tromey <tom@tromey.com>
15502
15503 * python/py-prettyprint.c (print_string_repr, print_children):
15504 Update.
15505 * python/py-lazy-string.c (gdbpy_extract_lazy_string): Change type
15506 of "encoding".
15507 * varobj.c (varobj_value_get_print_value): Update.
15508 * python/python-internal.h (gdbpy_extract_lazy_string): Update.
15509
15510 2017-01-10 Tom Tromey <tom@tromey.com>
15511
15512 * varobj.c (varobj_get_display_hint)
15513 (dynamic_varobj_has_child_method, install_new_value_visualizer)
15514 (varobj_set_visualizer, free_variable): Use
15515 gdbpy_enter_varobj.
15516
15517 2017-01-10 Tom Tromey <tom@tromey.com>
15518
15519 * python/python.c (python_command): Use gdbpy_enter, gdbpy_ref.
15520 (do_finish_initialization): New function. Use gdbpy_ref.
15521 (gdbpy_finish_initialization): Use gdbpy_enter. Call
15522 do_finish_initialization.
15523
15524 2017-01-10 Tom Tromey <tom@tromey.com>
15525
15526 * python/py-param.c (get_set_value, get_show_value): Use
15527 gdbpy_enter, gdbpy_ref.
15528
15529 2017-01-10 Tom Tromey <tom@tromey.com>
15530
15531 * python/py-function.c (fnpy_call): Use gdbpy_enter, gdbpy_ref.
15532
15533 2017-01-10 Tom Tromey <tom@tromey.com>
15534
15535 * python/py-cmd.c (cmdpy_function): Use gdbpy_enter, gdbpy_ref.
15536
15537 2017-01-10 Tom Tromey <tom@tromey.com>
15538
15539 * python/py-varobj.c (py_varobj_iter_dtor, py_varobj_iter_next):
15540 Use gdbpy_enter_varobj.
15541
15542 2017-01-10 Tom Tromey <tom@tromey.com>
15543
15544 * varobj.c (gdbpy_enter_varobj): New constructor.
15545 * python/python-internal.h (gdbpy_enter_varobj): New class.
15546 * python/py-varobj.c (py_varobj_get_iterator): Use
15547 gdbpy_enter_varobj.
15548
15549 2017-01-10 Tom Tromey <tom@tromey.com>
15550
15551 * python/py-xmethods.c (gdbpy_get_xmethod_result_type): Use
15552 gdbpy_enter, gdbpy_ref, unique_xmalloc_ptr.
15553 (gdbpy_invoke_xmethod): Use gdbpy_ref, gdbpy_enter.
15554 (gdbpy_get_xmethod_arg_types): Use gdbpy_ref,
15555 unique_xmalloc_ptr.
15556 (gdbpy_get_xmethod_arg_types): Use gdbpy_ref, gdbpy_enter.
15557
15558 2017-01-10 Tom Tromey <tom@tromey.com>
15559
15560 * python/py-xmethods.c (invoke_match_method): Use
15561 gdbpy_ref.
15562
15563 2017-01-10 Tom Tromey <tom@tromey.com>
15564
15565 * python/py-xmethods.c (gdbpy_get_matching_xmethod_workers): use
15566 gdbpy_enter, gdbpy_ref.
15567
15568 2017-01-10 Tom Tromey <tom@tromey.com>
15569
15570 * python/python.c (python_interactive_command): Use gdbpy_enter.
15571
15572 2017-01-10 Tom Tromey <tom@tromey.com>
15573
15574 * python/python.c (gdbpy_before_prompt_hook): Use gdbpy_enter,
15575 gdbpy_ref.
15576
15577 2017-01-10 Tom Tromey <tom@tromey.com>
15578
15579 * python/py-prettyprint.c (gdbpy_apply_val_pretty_printer): Use
15580 gdbpy_enter, gdbpy_ref, unique_xmalloc_ptr.
15581
15582 2017-01-10 Tom Tromey <tom@tromey.com>
15583
15584 * utils.h (htab_deleter): New struct.
15585 (htab_up): New typedef.
15586 * python/py-framefilter.c (gdbpy_apply_frame_filter): Use
15587 gdbpy_enter, gdbpy_ref, htab_up.
15588
15589 2017-01-10 Tom Tromey <tom@tromey.com>
15590
15591 * python/py-unwind.c (pending_frame_invalidate): Remove.
15592 (pyuw_sniffer): Use gdbpy_enter and gdbpy_ref.
15593
15594 2017-01-10 Tom Tromey <tom@tromey.com>
15595
15596 * python/py-xmethods.c (gdbpy_free_xmethod_worker_data)
15597 (gdbpy_clone_xmethod_worker_data): Use gdbpy_enter.
15598
15599 2017-01-10 Tom Tromey <tom@tromey.com>
15600
15601 * python/py-type.c (save_objfile_types): Use gdbpy_enter.
15602
15603 2017-01-10 Tom Tromey <tom@tromey.com>
15604
15605 * python/python.c (gdbpy_eval_from_control_command)
15606 (gdbpy_source_script, gdbpy_run_events)
15607 (gdbpy_source_objfile_script, gdbpy_execute_objfile_script)
15608 (gdbpy_free_type_printers, gdbpy_finish_initialization): Use
15609 gdbpy_enter.
15610
15611 2017-01-10 Tom Tromey <tom@tromey.com>
15612
15613 * python/py-progspace.c (py_free_pspace): Use gdbpy_enter.
15614
15615 2017-01-10 Tom Tromey <tom@tromey.com>
15616
15617 * python/py-objfile.c (py_free_objfile): Use gdbpy_enter.
15618
15619 2017-01-10 Tom Tromey <tom@tromey.com>
15620
15621 * python/py-inferior.c (python_on_normal_stop, python_on_resume)
15622 (python_on_inferior_call_pre, python_on_inferior_call_post)
15623 (python_on_memory_change, python_on_register_change)
15624 (python_inferior_exit, python_new_objfile, add_thread_object)
15625 (delete_thread_object, py_free_inferior): Use gdbpy_enter.
15626
15627 2017-01-10 Tom Tromey <tom@tromey.com>
15628
15629 * python/py-finishbreakpoint.c (bpfinishpy_handle_stop)
15630 (bpfinishpy_handle_exit): Use gdbpy_enter.
15631
15632 2017-01-10 Tom Tromey <tom@tromey.com>
15633
15634 * python/py-cmd.c (cmdpy_destroyer)
15635 (cmdpy_completer_handle_brkchars, cmdpy_completer): Use
15636 gdbpy_enter.
15637
15638 2017-01-10 Tom Tromey <tom@tromey.com>
15639
15640 * python/py-breakpoint.c (gdbpy_breakpoint_cond_says_stop): Use
15641 gdbpy_enter.
15642 (gdbpy_breakpoint_has_cond): Likewise.
15643
15644 2017-01-10 Tom Tromey <tom@tromey.com>
15645
15646 * python/python.c (gdbpy_enter): New constructor.
15647 (~gdbpy_enter): New destructor.
15648 (restore_python_env, ensure_python_env): Rewrite.
15649 * python/python-internal.h (gdbpy_enter): New class.
15650
15651 2017-01-10 Tom Tromey <tom@tromey.com>
15652
15653 * python/py-symbol.c (gdbpy_lookup_symbol): Use gdbpy_ref.
15654
15655 2017-01-10 Tom Tromey <tom@tromey.com>
15656
15657 * python/py-value.c (value_has_field, get_field_flag)
15658 (get_field_type, valpy_getitem, convert_value_from_python): Use
15659 gdbpy_ref.
15660
15661 2017-01-10 Tom Tromey <tom@tromey.com>
15662
15663 * python/python.c (gdbpy_progspaces, gdbpy_objfiles): Use
15664 gdbpy_ref.
15665
15666 2017-01-10 Tom Tromey <tom@tromey.com>
15667
15668 * python/py-prettyprint.c (search_pp_list)
15669 (find_pretty_printer_from_objfiles)
15670 (find_pretty_printer_from_progspace)
15671 (find_pretty_printer_from_gdb, find_pretty_printer)
15672 (gdbpy_get_display_hint, gdbpy_get_varobj_pretty_printer): Use
15673 gdbpy_ref.
15674
15675 2017-01-10 Tom Tromey <tom@tromey.com>
15676
15677 * python/py-param.c (call_doc_function): Use gdbpy_ref.
15678
15679 2017-01-10 Tom Tromey <tom@tromey.com>
15680
15681 * python/py-linetable.c (build_line_table_tuple_from_pcs)
15682 (ltpy_get_all_source_lines): Use gdbpy_ref.
15683
15684 2017-01-10 Tom Tromey <tom@tromey.com>
15685
15686 * python/py-framefilter.c (extract_sym, extract_value)
15687 (get_py_iter_from_func, bootstrap_python_frame_filters): Use
15688 gdbpy_ref.
15689
15690 2017-01-10 Tom Tromey <tom@tromey.com>
15691
15692 * python/py-breakpoint.c (gdbpy_breakpoints): Use gdbpy_ref.
15693
15694 2017-01-10 Tom Tromey <tom@tromey.com>
15695
15696 * python/py-inferior.c (gdbpy_inferiors): Use gdbpy_ref.
15697
15698 2017-01-10 Tom Tromey <tom@tromey.com>
15699
15700 * python/py-function.c (convert_values_to_python, fnpy_init): Use
15701 gdbpy_ref.
15702
15703 2017-01-10 Tom Tromey <tom@tromey.com>
15704
15705 * python/py-cmd.c (gdbpy_string_to_argv): Use gdbpy_ref.
15706
15707 2017-01-10 Tom Tromey <tom@tromey.com>
15708
15709 * python/py-type.c (convert_field, make_fielditem, typy_fields)
15710 (typy_range): Use gdbpy_ref.
15711
15712 2017-01-10 Tom Tromey <tom@tromey.com>
15713
15714 * python/py-threadevent.c (create_thread_event_object): Use
15715 gdbpy_ref.
15716 * python/py-stopevent.c (create_stop_event_object): Simplify.
15717 (emit_stop_event): Use gdbpy_ref.
15718 * python/py-signalevent.c (create_signal_event_object): Use
15719 gdbpy_ref.
15720 * python/py-newobjfileevent.c (create_new_objfile_event_object)
15721 (emit_new_objfile_event, create_clear_objfiles_event_object)
15722 (emit_clear_objfiles_event): Use gdbpy_ref.
15723 * python/py-infevents.c (create_inferior_call_event_object)
15724 (create_register_changed_event_object)
15725 (create_memory_changed_event_object, emit_inferior_call_event)
15726 (emit_memory_changed_event, emit_register_changed_event): Use
15727 gdbpy_ref.
15728 * python/py-exitedevent.c (create_exited_event_object)
15729 (emit_exited_event): Use gdbpy_ref.
15730 * python/py-event.h (evpy_emit_event): Remove
15731 CPYCHECKER_STEALS_REFERENCE_TO_ARG annotation.
15732 * python/py-event.c (evpy_emit_event): Use gdbpy_ref.
15733 * python/py-continueevent.c (emit_continue_event): Use
15734 gdbpy_ref.
15735 * python/py-breakpoint.c (gdbpy_breakpoint_created)
15736 (gdbpy_breakpoint_deleted, gdbpy_breakpoint_modified): Use
15737 gdbpy_ref.
15738 * python/py-bpevent.c (create_breakpoint_event_object): Use
15739 gdbpy_ref.
15740
15741 2017-01-10 Tom Tromey <tom@tromey.com>
15742
15743 * python/py-ref.h: New file.
15744
15745 2017-01-10 Simon Marchi <simon.marchi@ericsson.com>
15746
15747 * cli-out.c (cli_ui_out::do_redirect): Change return type to
15748 void.
15749 * cli-out.h (cli_ui_out::do_redirect): Likewise.
15750 * mi/mi-out.c (mi_ui_out::do_redirect): Likewise.
15751 * mi/mi-out.h (mi_ui_out::do_redirect): Likewise.
15752 * ui-out.c (ui_out::redirect): Likewise.
15753 * ui-out.h (ui_out::redirect, ui_out::do_redirect): Likewise.
15754 * cli/cli-logging.c (set_logging_redirect): Update call site of
15755 ui_out::redirect.
15756 (handle_redirections): Likewise.
15757 * scm-ports.c (ioscm_with_output_to_port_worker): Likewise.
15758 * top.c (execute_command_to_string): Likewise.
15759 * utils.c (do_ui_out_redirect_pop): Likewise.
15760
15761 2017-01-10 Simon Marchi <simon.marchi@ericsson.com>
15762
15763 * stack.c (_initialize_stack): Update "frame" command help message.
15764
15765 2017-01-08 Iain Buclaw <ibuclaw@gdcproject.org>
15766
15767 * d-exp.y (CastExpression): Emit UNOP_CAST_TYPE.
15768
15769 2017-01-06 Yao Qi <yao.qi@linaro.org>
15770
15771 * x86-linux-nat.h: Include gdb_proc_service.h.
15772
15773 2017-01-06 Yao Qi <yao.qi@linaro.org>
15774
15775 * ser-base.h: Include serial.h.
15776
15777 2017-01-06 Yao Qi <yao.qi@linaro.org>
15778
15779 * ppc-linux-tdep.h: Include ppc-tdep.h.
15780
15781 2017-01-06 Yao Qi <yao.qi@linaro.org>
15782
15783 * nat/amd64-linux-siginfo.h: Include signal.h.
15784
15785 2017-01-06 Yao Qi <yao.qi@linaro.org>
15786
15787 * nat/aarch64-linux-hw-point.h: Include break-common.h.
15788
15789 2017-01-06 Yao Qi <yao.qi@linaro.org>
15790
15791 * mi/mi-parse.h: Include mi-cmds.h.
15792
15793 2017-01-06 Yao Qi <yao.qi@linaro.org>
15794
15795 * inf-loop.c: Don't include "target.h".
15796 * inf-loop.h: Include it here.
15797
15798 2017-01-06 Yao Qi <yao.qi@linaro.org>
15799
15800 * dfp.h: Include "dboulest.h" and "expression.h".
15801
15802 2017-01-06 Yao Qi <yao.qi@linaro.org>
15803
15804 * ax-gdb.h: Include "ax.h".
15805
15806 2017-01-06 Yao Qi <yao.qi@linaro.org>
15807
15808 * Makefile.in (HFILES_NO_SRCDIR): Replace gdb_ptrace.h
15809 with nat/gdb_ptrace.h.
15810
15811 2017-01-05 Yao Qi <yao.qi@linaro.org>
15812
15813 * mips-fbsd-tdep.c (mips_fbsd_sigframe_init): Move && to
15814 new line.
15815 (mips64_fbsd_sigframe_init): Likewise.
15816
15817 2017-01-04 John Baldwin <jhb@FreeBSD.org>
15818
15819 * mips-fbsd-tdep.c (_initialize_mips_fbsd_tdep): Use
15820 GDB_OSABI_FREEBSD instead of GDB_OSABI_FREEBSD_ELF.
15821
15822 2017-01-04 John Baldwin <jhb@FreeBSD.org>
15823
15824 * Makefile.in (ALLDEPFILES): Add mips-fbsd-nat.c.
15825 * NEWS: Mention new FreeBSD/mips native configuration.
15826 * config/mips/fbsd.mh: New file.
15827 * configure.host: Add mips*-*-freebsd*.
15828 * mips-fbsd-nat.c: New file.
15829
15830 2017-01-04 John Baldwin <jhb@FreeBSD.org>
15831
15832 * Makefile.in (ALL_TARGET_OBS): Add mips-fbsd-tdep.o.
15833 (ALLDEPFILES): Add mips-fbsd-tdep.c.
15834 * NEWS: Mention new FreeBSD/mips target.
15835 * configure.tgt: Add mips*-*-freebsd*.
15836 * mips-fbsd-tdep.c: New file.
15837 * mips-fbsd-tdep.h: New file.
15838
15839 2017-01-04 Yao Qi <yao.qi@linaro.org>
15840
15841 * dwarf2loc.c (write_pieced_value): Don't use VALUE_FRAME_ID (to),
15842 use c->frame_id when the piece location is DWARF_VALUE_REGISTER.
15843
15844 2017-01-01 Joel Brobecker <brobecker@adacore.com>
15845
15846 Update copyright year range in all GDB files.
15847
15848 2017-01-01 Joel Brobecker <brobecker@adacore.com>
15849
15850 * config/djgpp/fnchange.lst: Add entry for gdb/ChangeLog-2016.
15851
15852 For older changes see ChangeLog-2016.
15853 \f
15854 Local Variables:
15855 mode: change-log
15856 left-margin: 8
15857 fill-column: 74
15858 version-control: never
15859 coding: utf-8
15860 End: