]> git.ipfire.org Git - thirdparty/binutils-gdb.git/blob - gdb/ChangeLog
[PowerPC] Detect different long double floating-point formats
[thirdparty/binutils-gdb.git] / gdb / ChangeLog
1 2017-11-21 Ulrich Weigand <uweigand@de.ibm.com>
2
3 * ppc-tdep.h (enum powerpc_long_double_abi): New data type.
4 (struct gdbarch_tdep): New member long_double_abi.
5 * rs6000-tdep.c (rs6000_gdbarch_init): Initialize long_double_abi
6 member of tdep struct based on Tag_GNU_Power_ABI_FP attribute.
7 * ppc-linux-tdep.c (ppc_linux_init_abi): Install long double data
8 format depending on long_double_abi tdep member.
9 (ppc_floatformat_for_type): Handle __ibm128 type.
10
11 2017-11-20 Simon Marchi <simon.marchi@polymtl.ca>
12
13 * darwin-nat.c (set_enable_mach_exceptions): Constify parameter.
14
15 2017-11-21 Pedro Alves <palves@redhat.com>
16
17 * dwarf2read.c (mapped_index::find_name_components_bounds)
18 <completion mode, upper bound>: Use std::lower_bound instead of
19 std::upper_bound.
20 (test_mapped_index_find_name_component_bounds): Remove incorrect
21 "t1_fund" from expected symbols.
22
23 2017-11-21 Pedro Alves <palves@redhat.com>
24
25 * dwarf2read.c (mapped_index::name_components_casing): New field.
26 (mapped_index) <build_name_components,
27 find_name_components_bounds): Declare new methods.
28 (mapped_index::find_name_components_bounds)
29 (mapped_index::build_name_components): New methods, factored out
30 from dw2_expand_symtabs_matching_symbol.
31 (check_find_bounds_finds)
32 (test_mapped_index_find_name_component_bounds): New.
33 (run_test): Rename to ...
34 (test_dw2_expand_symtabs_matching_symbol): ... this.
35 (run_test): Reimplement.
36
37 2017-11-21 Pedro Alves <palves@redhat.com>
38
39 * cp-name-parser.y (cp_ident_is_alpha, cp_ident_is_alnum): New.
40 (symbol_end): Use cp_ident_is_alnum.
41 (yylex): Use cp_ident_is_alpha and cp_ident_is_alnum.
42 * dwarf2read.c (make_sort_after_prefix_name): New function.
43 (dw2_expand_symtabs_matching_symbol): Use it.
44 (test_symbols): Add more symbols.
45 (run_test): Add tests.
46
47 2017-11-17 Tom Tromey <tom@tromey.com>
48
49 * symtab.h (enum symbol_subclass_kind): New.
50 (struct symbol) <is_cplus_template_function, is_rust_vtable>:
51 Remove.
52 <subclass>: New member.
53 (SYMBOL_IS_CPLUS_TEMPLATE_FUNCTION): Update.
54 * rust-lang.c (rust_get_trait_object_pointer): Update.
55 * dwarf2read.c (read_func_scope): Update.
56 (read_variable): Update.
57
58 2017-11-17 Tom Tromey <tom@tromey.com>
59
60 * dwarf2read.c (read_func_scope): Update.
61 * symtab.h (struct template_symbol): Derive from symbol.
62 <base>: Remove.
63
64 2017-11-17 Tom Tromey <tom@tromey.com>
65
66 * symtab.h (struct symbol) <is_rust_vtable>: New member.
67 (struct rust_vtable_symbol): New.
68 (find_symbol_at_address): Declare.
69 * symtab.c (find_symbol_at_address): New function.
70 * symfile.h (struct quick_symbol_functions)
71 <find_compunit_symtab_by_address>: New member.
72 * symfile-debug.c (debug_qf_find_compunit_symtab_by_address): New
73 function.
74 (debug_sym_quick_functions): Link to
75 debug_qf_find_compunit_symtab_by_address.
76 * rust-lang.c (rust_get_trait_object_pointer): New function.
77 (rust_evaluate_subexp) <case UNOP_IND>: New case. Call
78 rust_get_trait_object_pointer.
79 * psymtab.c (psym_relocate): Clear psymbol_map.
80 (psym_fill_psymbol_map, psym_find_compunit_symtab_by_address): New
81 functions.
82 (psym_functions): Link to psym_find_compunit_symtab_by_address.
83 * objfiles.h (struct objfile) <psymbol_map>: New member.
84 * dwarf2read.c (dwarf2_gdb_index_functions): Update.
85 (process_die) <DW_TAG_variable>: New case. Call read_variable.
86 (rust_containing_type, read_variable): New functions.
87
88 2017-11-17 Simon Marchi <simon.marchi@polymtl.ca>
89
90 * common/gdb_vecs.h (DEF_VEC_I (int)): Remove.
91
92 2017-11-17 Simon Marchi <simon.marchi@polymtl.ca>
93
94 * common/filestuff.c: Include <algorithm>.
95 (open_fds): Change type to std::vector<int>.
96 (do_mark_open_fd): Adjust.
97 (unmark_fd_no_cloexec): Adjust.
98 (do_close): Adjust.
99
100 2017-11-17 Simon Marchi <simon.marchi@polymtl.ca>
101
102 * breakpoint.c (output_thread_groups): Take an std::vector.
103 (print_one_breakpoint_location): Adjust.
104
105 2017-11-17 Joel Brobecker <brobecker@adacore.com>
106
107 * ada-lang.c (resolve_subexp): Add handling of OP_VAR_MSYM_VALUE.
108 (ada_evaluate_subexp_for_cast): New function.
109 (ada_evaluate_subexp) <UNOP_CAST>: Replace code by call to
110 ada_evaluate_subexp_for_cast.
111 (ada_evaluate_subexp) <nosideret>: Replace code by call to
112 eval_skip_value.
113 * eval.c (evaluate_var_value): Make non-static.
114 (evaluate_var_msym_value, eval_skip_value): Likewise.
115 * value.h (evaluate_var_value, evaluate_var_msym_value)
116 (eval_skip_value): Declare.
117
118 2017-11-16 Joel Brobecker <brobecker@adacore.com>
119
120 * ada-lang.c (ada_value_cast): Remove parameter "noside".
121 Update all callers.
122
123 2017-11-16 Pedro Alves <palves@redhat.com>
124
125 * python/py-unwind.c (pyuw_sniffer): Translate
126 PyExc_KeyboardInterrupt to a GDB Quit exception.
127
128 2017-11-16 Pedro Alves <palves@redhat.com>
129
130 * infrun.c (resume_cleanups): Delete.
131 (resume): No longer install a resume_cleanups cleanup nor call
132 QUIT.
133 (proceed): Pass the terminal to the inferior.
134 (keep_going_pass_signal): No longer install a resume_cleanups
135 cleanup.
136
137 2017-11-16 Pedro Alves <palves@redhat.com>
138
139 * inf-loop.c (inferior_event_handler): Don't swallow the exception
140 if the prompt is blocked.
141
142 2017-11-16 Pedro Alves <palves@redhat.com>
143
144 * breakpoint.c (insert_bp_location): Replace bp_err and
145 bp_err_message locals by a gdb_exception local.
146
147 2017-11-16 Pedro Alves <palves@redhat.com>
148
149 * inflow.c (scoped_ignore_sigttou): New class.
150 (child_terminal_ours_1, new_tty): Use it.
151
152 2017-11-16 Ulrich Weigand <uweigand@de.ibm.com>
153
154 * target-float.c (decimal_from_number): Add byte_order argument and
155 call match_endianness. Error if unknown floating-point type.
156 (decimal_to_number): Add byte_order argument and call match_endianness.
157 (decimal_from_longest): Update call. Do not call match_endianness.
158 (decimal_from_ulongest): Likewise.
159 (decimal_binop): Likewise.
160 (decimal_is_zero): Likewise.
161 (decimal_compare): Likewise.
162 (decimal_convert): Likewise.
163
164 2017-11-16 Phil Muldoon <pmuldoon@redhat.com>
165
166 * python/python.c (gdbpy_rbreak): New function.
167 * NEWS: Document Python rbreak feature.
168
169 2017-11-16 Yao Qi <yao.qi@linaro.org>
170
171 * features/tic6x-c62x.xml: Remove.
172 * features/tic6x-c64x.xml: Remove.
173 * features/tic6x-c64xp.xml: Remove.
174
175 2017-11-15 John Baldwin <jhb@FreeBSD.org>
176
177 * symtab.h: Include <array>.
178
179 2017-11-15 John Baldwin <jhb@FreeBSD.org>
180
181 * bsd-kvm.c (bsd_kvm_cmd): Constify 'arg'.
182 (bsd_kvm_proc_cmd): Likewise.
183
184 2017-11-15 Simon Marchi <simon.marchi@ericsson.com>
185
186 * tui/tui-win.c (window_name_completer): Replace VEC with
187 std::vector.
188
189 2017-11-15 Andrew Cagney <cagney@gnu.org>
190
191 * MAINTAINERS: Remove no-longer applicable entries.
192
193 2017-11-15 Andrew Cagney <cagney@gnu.org>
194
195 * MAINTAINERS: Move self to Past Maintainers.
196
197 2017-11-15 Yao Qi <yao.qi@linaro.org>
198
199 * features/Makefile (XMLTOC): Remove nios2-linux.xml.
200 * features/nios2-linux.c: Remove.
201 * nios2-linux-tdep.c (_initialize_nios2_linux_tdep): Don't call
202 initialize_tdesc_nios2_linux.
203
204 2017-11-15 Yao Qi <yao.qi@linaro.org>
205
206 * m68hc11-tdep.c (M68HC11_NUM_REGS): Change it to
207 M68HC11_LAST_HARD_REG + 1.
208
209 2017-11-14 Paul Carroll <pcarroll@codesourcery.com>
210
211 PR gdb/22388
212 * remote.c (remote_write_bytes_aux, remote_read_bytes_1,
213 remote_read_bytes, remote_write_qxfer, remote_xfer_partial):
214 Return TARGET_XFER_EOF if size of returned data is 0.
215
216 2017-11-14 Simon Marchi <simon.marchi@ericsson.com>
217
218 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
219 memory-map-selftests.c.
220 (SUBDIR_UNITTESTS_OBS): Add memory-map-selftests.o.
221 * memory-map.c (memory_map_start_memory): Fix computation of hi
222 address.
223 * unittests/memory-map-selftests.c: New file.
224
225 2017-11-09 Joel Brobecker <brobecker@adacore.com>
226
227 * ada-lang.c: Fix some typos in the general command documenting
228 how Ada expressions are being evaluated and how their result
229 is printed.
230
231 2017-11-09 Tom Tromey <tom@tromey.com>
232
233 * psymtab.c (psymbol_hash): Do not hash string contents.
234 (psymbol_compare): Add comment.
235
236 2017-11-09 Tom Tromey <tom@tromey.com>
237
238 * dictionary.c (dict_hash): Move "TKB" check into the "switch".
239
240 2017-11-08 Joel Brobecker <brobecker@adacore.com>
241
242 * ada-exp.y (write_var_from_sym): Remove parameter
243 "orig_left_context". Update all callers.
244
245 2017-11-08 Simon Marchi <simon.marchi@ericsson.com>
246
247 * tracepoint.h (class collection_list) <stringify>: Return
248 std::vector<std::string>.
249 (encode_actions_rsp): Change parameters to
250 std::vector<std::string> *.
251 * tracepoint.c (collection_list::stringify): Return
252 std::vector<std::string> and adjust accordingly.
253 (encode_actions_rsp): Changee parameters to
254 std::vector<std::string> and adjust accordingly.
255 * remote.c (free_actions_list),
256 free_actions_list_cleanup_wrapper): Remove.
257 (remote_download_tracepoint): Adjust to std::vector.
258
259 2017-11-08 Tom Tromey <tom@tromey.com>
260
261 * dwarf2read.c (symbolp): Remove typedef.
262 (read_func_scope): Use std::vector.
263 (process_structure_scope): Use std::vector.
264
265 2017-11-08 Pedro Alves <palves@redhat.com>
266
267 * ada-lang.c (ada_make_symbol_completion_list): Use
268 completion_skip_symbol.
269 * symtab.c (symbol_is_function_or_method(minimal_symbol*)): New.
270 (symbol_is_function_or_method(symbol*)): New.
271 (add_symtab_completions): Add complete_symbol_mode parameter. Use
272 completion_skip_symbol.
273 (default_collect_symbol_completion_matches_break_on): Use
274 completion_skip_symbol. Pass down mode.
275 (collect_file_symbol_completion_matches): Pass down mode.
276 * symtab.h (symbol_is_function_or_method): New declarations.
277 (completion_skip_symbol): New template function.
278
279 2017-11-08 Pedro Alves <palves@redhat.com>
280
281 * linespec.c (iterate_over_all_matching_symtabs): Add
282 search_domain parameter. Pass it down to expand_symtabs_matching.
283 (decode_objc): Request FUNCTIONS_DOMAIN symbols only.
284 (lookup_prefix_sym): Adjust by passing ALL_DOMAIN as
285 search_domain.
286 (add_all_symbol_names_from_pspace): Add search_domain parameter.
287 Pass it down.
288 (find_method, find_function_symbols): Request FUNCTIONS_DOMAIN
289 symbols.
290 (add_matching_symbols_to_info): Add search_domain parameter. Pass
291 it down.
292
293 2017-11-08 Pedro Alves <palves@redhat.com>
294
295 * ada-lang.c (ada_make_symbol_completion_list): Remove text and
296 text_len locals and don't pass them down.
297 * symtab.c (completion_list_add_name): Remove
298 sym_text/sym_text_len parameters and adjust.
299 (completion_list_add_symbol, completion_list_add_msymbol)
300 (completion_list_objc_symbol, completion_list_add_fields)
301 (add_symtab_completions): Likewise.
302 (default_collect_symbol_completion_matches_break_on)
303 (collect_file_symbol_completion_matches): Remove sym_text_len
304 local and don't pass it down.
305 * symtab.h (completion_list_add_name): Remove
306 sym_text/sym_text_len parameters.
307
308 2017-11-08 Pedro Alves <palves@redhat.com>
309
310 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
311 unittests/lookup_name_info-selftests.c.
312 (SUBDIR_UNITTESTS_OBS): Add lookup_name_info-selftests.o.
313 * cp-support.c: Include "selftest.h".
314 (cp_remove_params_1): Rename from cp_remove_params. Add
315 'require_param' parameter, and handle it.
316 (cp_remove_params): Reimplement.
317 (cp_remove_params_if_any): New.
318 (selftests::quote): New.
319 (selftests::check_remove_params): New.
320 (selftests::test_cp_remove_params): New.
321 (_initialize_cp_support): Install
322 selftests::test_cp_remove_params.
323 * cp-support.h (cp_remove_params_if_any): Declare.
324 * dwarf2read.c :Include "selftest.h".
325 (dw2_expand_symtabs_matching_symbol): Use
326 lookup_name_info::make_ignore_params.
327 (selftests::dw2_expand_symtabs_matching::mock_mapped_index)
328 (selftests::dw2_expand_symtabs_matching::string_or_null)
329 (selftests::dw2_expand_symtabs_matching::check_match)
330 (selftests::dw2_expand_symtabs_matching::test_symbols)
331 (selftests::dw2_expand_symtabs_matching::run_test): New.
332 (_initialize_dwarf2_read): Register
333 selftests::dw2_expand_symtabs_matching::run_test.
334 * psymtab.c (psym_expand_symtabs_matching): Use
335 lookup_name_info::make_ignore_params.
336 * symtab.c (demangle_for_lookup_info::demangle_for_lookup_info):
337 If the lookup name wants to ignore parameters, strip them.
338 (compare_symbol_name): Remove sym_text/sym_text_len parameters and
339 code handling '('.
340 (completion_list_add_name): Don't pass down sym_text/sym_text_len.
341 (default_collect_symbol_completion_matches_break_on): Don't try to
342 strip parameters.
343 * symtab.h (lookup_name_info::lookup_name_info): Add
344 'ignore_parameters' parameter.
345 (lookup_name_info::ignore_parameters)
346 (lookup_name_info::make_ignore_params): New methods.
347 (lookup_name_info::m_ignore_parameters): New field.
348 * unittests/lookup_name_info-selftests.c: New file.
349
350 2017-11-08 Pedro Alves <palves@redhat.com>
351
352 * dwarf2read.c (dw2_expand_marked_cus)
353 (dw2_expand_symtabs_matching_symbol): Remove forward declarations.
354 (dw2_expand_symtabs_matching): Move further below.
355 (dw2_expand_marked_cus): Reindent.
356
357 2017-11-08 Pedro Alves <palves@redhat.com>
358
359 * dwarf2read.c (byte_swap, MAYBE_SWAP): Move higher up in file.
360 (struct name_component): New.
361 (mapped_index::name_components): New field.
362 (mapped_index::symbol_name_at): New method.
363 (dwarf2_read_index): Call mapped_index ctor.
364 (dw2_map_matching_symbols): Add comment about name_components
365 table.
366 (dw2_expand_symtabs_matching): Factor part to...
367 (dw2_expand_symtabs_matching_symbol): ... this new function.
368 Build name components table, and lookup symbols in it before
369 calling the name matcher.
370 (dw2_expand_marked_cus): New, factored out from
371 dw2_expand_symtabs_matching.
372 (dwarf2_per_objfile_free): Call the mapped_index's dtor.
373
374 2017-11-08 Pedro Alves <palves@redhat.com>
375
376 * ada-lang.c (ada_encode): Rename to ..
377 (ada_encode_1): ... this. Add throw_errors parameter and handle
378 it.
379 (ada_encode): Reimplement.
380 (match_name): Delete, folded into full_name.
381 (resolve_subexp): No longer pass the encoded name to
382 ada_lookup_symbol_list.
383 (should_use_wild_match): Delete.
384 (name_match_type_from_name): New.
385 (ada_lookup_simple_minsym): Use lookup_name_info and the
386 language's symbol_name_matcher_ftype.
387 (add_symbols_from_enclosing_procs, ada_add_local_symbols)
388 (ada_add_block_renamings): Adjust to use lookup_name_info.
389 (ada_lookup_name): New.
390 (add_nonlocal_symbols, ada_add_all_symbols)
391 (ada_lookup_symbol_list_worker, ada_lookup_symbol_list)
392 (ada_iterate_over_symbols): Adjust to use lookup_name_info.
393 (ada_name_for_lookup): Delete.
394 (ada_lookup_encoded_symbol): Construct a verbatim name.
395 (wild_match): Reverse sense of return type. Use bool.
396 (full_match): Reverse sense of return type. Inline bits of old
397 match_name here.
398 (ada_add_block_symbols): Adjust to use lookup_name_info.
399 (symbol_completion_match): Delete, folded into...
400 (ada_lookup_name_info::matches): ... .this new method.
401 (symbol_completion_add): Delete.
402 (ada_collect_symbol_completion_matches): Add name_match_type
403 parameter. Adjust to use lookup_name_info and
404 completion_list_add_name.
405 (get_var_value, ada_add_global_exceptions): Adjust to use
406 lookup_name_info.
407 (ada_get_symbol_name_cmp): Delete.
408 (do_wild_match, do_full_match): New functions.
409 (ada_lookup_name_info::ada_lookup_name_info): New method.
410 (ada_symbol_name_matches, ada_get_symbol_name_matcher): New
411 functions.
412 (ada_language_defn): Install ada_get_symbol_name_matcher.
413 * ada-lex.l (processId): If name starts with '<', copy it
414 verbatim.
415 * block.c (block_iter_match_step, block_iter_match_first)
416 (block_iter_match_next, block_lookup_symbol)
417 (block_lookup_symbol_primary, block_find_symbol): Adjust to use
418 lookup_name_info.
419 * block.h (block_iter_match_first, block_iter_match_next)
420 (ALL_BLOCK_SYMBOLS_WITH_NAME): Adjust to use lookup_name_info.
421 * c-lang.c (c_language_defn, cplus_language_defn)
422 (asm_language_defn, minimal_language_defn): Adjust comments to
423 refer to la_get_symbol_name_matcher.
424 * completer.c (complete_files_symbols)
425 (collect_explicit_location_matches, symbol_completer): Pass a
426 symbol_name_match_type down.
427 * completer.h (class completion_match, completion_match_result):
428 New classes.
429 (completion_tracker::reset_completion_match_result): New method.
430 (completion_tracker::m_completion_match_result): New field.
431 * cp-support.c (make_symbol_overload_list_block): Adjust to use
432 lookup_name_info.
433 (cp_fq_symbol_name_matches, cp_get_symbol_name_matcher): New
434 functions.
435 * cp-support.h (cp_get_symbol_name_matcher): New declaration.
436 * d-lang.c: Adjust comments to refer to
437 la_get_symbol_name_matcher.
438 * dictionary.c (dict_vector) <iter_match_first, iter_match_next>:
439 Adjust to use lookup_name_info.
440 (dict_iter_match_first, dict_iter_match_next)
441 (iter_match_first_hashed, iter_match_next_hashed)
442 (iter_match_first_linear, iter_match_next_linear): Adjust to work
443 with a lookup_name_info.
444 * dictionary.h (dict_iter_match_first, dict_iter_match_next):
445 Likewise.
446 * dwarf2read.c (dw2_lookup_symbol): Adjust to use lookup_name_info.
447 (dw2_map_matching_symbols): Adjust to use symbol_name_match_type.
448 (gdb_index_symbol_name_matcher): New class.
449 (dw2_expand_symtabs_matching) Adjust to use lookup_name_info and
450 gdb_index_symbol_name_matcher. Accept a NULL symbol_matcher.
451 * f-lang.c (f_collect_symbol_completion_matches): Adjust to work
452 with a symbol_name_match_type.
453 (f_language_defn): Adjust comments to refer to
454 la_get_symbol_name_matcher.
455 * go-lang.c (go_language_defn): Adjust comments to refer to
456 la_get_symbol_name_matcher.
457 * language.c (default_symbol_name_matcher)
458 (language_get_symbol_name_matcher): New functions.
459 (unknown_language_defn, auto_language_defn): Adjust comments to
460 refer to la_get_symbol_name_matcher.
461 * language.h (symbol_name_cmp_ftype): Delete.
462 (language_defn) <la_collect_symbol_completion_matches>: Add match
463 type parameter.
464 <la_get_symbol_name_cmp>: Delete field.
465 <la_get_symbol_name_matcher>: New field.
466 <la_iterate_over_symbols>: Adjust to use lookup_name_info.
467 (default_symbol_name_matcher, language_get_symbol_name_matcher):
468 Declare.
469 * linespec.c (iterate_over_all_matching_symtabs)
470 (iterate_over_file_blocks): Adjust to use lookup_name_info.
471 (find_methods): Add language parameter, and use lookup_name_info
472 and the language's symbol_name_matcher_ftype.
473 (linespec_complete_function): Adjust.
474 (lookup_prefix_sym): Use lookup_name_info.
475 (add_all_symbol_names_from_pspace): Adjust.
476 (find_superclass_methods): Add language parameter and pass it
477 down.
478 (find_method): Pass symbol language down.
479 (find_linespec_symbols): Don't demangle or Ada encode here.
480 (search_minsyms_for_name): Add lookup_name_info parameter.
481 (add_matching_symbols_to_info): Add name_match_type parameter.
482 Use lookup_name_info.
483 * m2-lang.c (m2_language_defn): Adjust comments to refer to
484 la_get_symbol_name_matcher.
485 * minsyms.c: Include <algorithm>.
486 (add_minsym_to_demangled_hash_table): Remove table parameter and
487 add objfile parameter. Use search_name_hash, and add language to
488 demangled languages vector.
489 (struct found_minimal_symbols): New struct.
490 (lookup_minimal_symbol_mangled, lookup_minimal_symbol_demangled):
491 New functions.
492 (lookup_minimal_symbol): Adjust to use them. Don't canonicalize
493 input names here. Use lookup_name_info instead. Lookup up
494 demangled names once for each language in the demangled names
495 vector.
496 (iterate_over_minimal_symbols): Use lookup_name_info. Lookup up
497 demangled names once for each language in the demangled names
498 vector.
499 (build_minimal_symbol_hash_tables): Adjust.
500 * minsyms.h (iterate_over_minimal_symbols): Adjust to pass down a
501 lookup_name_info.
502 * objc-lang.c (objc_language_defn): Adjust comment to refer to
503 la_get_symbol_name_matcher.
504 * objfiles.h: Include <vector>.
505 (objfile_per_bfd_storage) <demangled_hash_languages>: New field.
506 * opencl-lang.c (opencl_language_defn): Adjust comment to refer to
507 la_get_symbol_name_matcher.
508 * p-lang.c (pascal_language_defn): Adjust comment to refer to
509 la_get_symbol_name_matcher.
510 * psymtab.c (psym_lookup_symbol): Use lookup_name_info.
511 (match_partial_symbol): Use symbol_name_match_type,
512 lookup_name_info and psymbol_name_matches.
513 (lookup_partial_symbol): Use lookup_name_info.
514 (map_block): Use symbol_name_match_type and lookup_name_info.
515 (psym_map_matching_symbols): Use symbol_name_match_type.
516 (psymbol_name_matches): New.
517 (recursively_search_psymtabs): Use lookup_name_info and
518 psymbol_name_matches. Rename 'kind' parameter to 'domain'.
519 (psym_expand_symtabs_matching): Use lookup_name_info. Rename
520 'kind' parameter to 'domain'.
521 * rust-lang.c (rust_language_defn): Adjust comment to refer to
522 la_get_symbol_name_matcher.
523 * symfile-debug.c (debug_qf_map_matching_symbols)
524 (debug_qf_map_matching_symbols): Use symbol_name_match_type.
525 (debug_qf_expand_symtabs_matching): Use lookup_name_info.
526 * symfile.c (expand_symtabs_matching): Use lookup_name_info.
527 * symfile.h (quick_symbol_functions) <map_matching_symbols>:
528 Adjust to use symbol_name_match_type.
529 <expand_symtabs_matching>: Adjust to use lookup_name_info.
530 (expand_symtabs_matching): Adjust to use lookup_name_info.
531 * symmisc.c (maintenance_expand_symtabs): Use
532 lookup_name_info::match_any ().
533 * symtab.c (symbol_matches_search_name): New.
534 (eq_symbol_entry): Adjust to use lookup_name_info and the
535 language's matcher.
536 (demangle_for_lookup_info::demangle_for_lookup_info): New.
537 (lookup_name_info::match_any): New.
538 (iterate_over_symbols, search_symbols): Use lookup_name_info.
539 (compare_symbol_name): Add language, lookup_name_info and
540 completion_match_result parameters, and use them.
541 (completion_list_add_name): Make extern. Add language and
542 lookup_name_info parameters. Use them.
543 (completion_list_add_symbol, completion_list_add_msymbol)
544 (completion_list_objc_symbol): Add lookup_name_info parameters and
545 adjust. Pass down language.
546 (completion_list_add_fields): Add lookup_name_info parameters and
547 adjust. Pass down language.
548 (add_symtab_completions): Add lookup_name_info parameters and
549 adjust.
550 (default_collect_symbol_completion_matches_break_on): Add
551 name_match_type parameter, and use it. Use lookup_name_info.
552 (default_collect_symbol_completion_matches)
553 (collect_symbol_completion_matches): Add name_match_type
554 parameter, and pass it down.
555 (collect_symbol_completion_matches_type): Adjust.
556 (collect_file_symbol_completion_matches): Add name_match_type
557 parameter, and use lookup_name_info.
558 * symtab.h: Include <string> and "common/gdb_optional.h".
559 (enum class symbol_name_match_type): New.
560 (class ada_lookup_name_info): New.
561 (struct demangle_for_lookup_info): New.
562 (class lookup_name_info): New.
563 (symbol_name_matcher_ftype): New.
564 (SYMBOL_MATCHES_SEARCH_NAME): Use symbol_matches_search_name.
565 (symbol_matches_search_name): Declare.
566 (MSYMBOL_MATCHES_SEARCH_NAME): Delete.
567 (default_collect_symbol_completion_matches)
568 (collect_symbol_completion_matches)
569 (collect_file_symbol_completion_matches): Add name_match_type
570 parameter.
571 (iterate_over_symbols): Use lookup_name_info.
572 (completion_list_add_name): Declare.
573 * utils.c (enum class strncmp_iw_mode): Moved to utils.h.
574 (strncmp_iw_with_mode): Now extern.
575 * utils.h (enum class strncmp_iw_mode): Moved from utils.c.
576 (strncmp_iw_with_mode): Declare.
577
578 2017-11-08 Keith Seitz <keiths@redhat.com>
579 Pedro Alves <palves@redhat.com>
580
581 * ada-lang.c (ada_language_defn): Install
582 default_search_name_hash.
583 * buildsym.c (struct buildsym_compunit): <language>: New field.
584 (finish_block_internal): Pass language when creating dictionaries.
585 (start_buildsym_compunit, start_symtab): New language parameters.
586 Use them.
587 (restart_symtab): Pass down compilation unit's language.
588 * buildsym.h (enum language): Forward declare.
589 (start_symtab): New 'language' parameter.
590 * c-lang.c (c_language_defn, cplus_language_defn)
591 (asm_language_defn, minimal_language_defn): Install
592 default_search_name_hash.
593 * coffread.c (coff_start_symtab): Adjust.
594 * d-lang.c (d_language_defn): Install default_search_name_hash.
595 * dbxread.c (struct symloc): Add 'pst_language' field.
596 (PST_LANGUAGE): Define.
597 (start_psymtab, read_ofile_symtab): Use it.
598 (process_one_symbol): New 'language' parameter. Pass it down.
599 * dictionary.c (struct dictionary) <language>: New field.
600 (DICT_LANGUAGE): Define.
601 (dict_create_hashed, dict_create_hashed_expandable)
602 (dict_create_linear, dict_create_linear_expandable): New parameter
603 'language'. Set the dictionary's language.
604 (iter_match_first_hashed): Adjust to rename.
605 (insert_symbol_hashed): Assert we don't see mismatching
606 languages. Adjust to rename.
607 (dict_hash): Rename to ...
608 (default_search_name_hash): ... this and make extern.
609 * dictionary.h (struct language_defn): Forward declare.
610 (dict_create_hashed): New parameter 'language'.
611 * dwarf2read.c (dwarf2_start_symtab): Pass down language.
612 * f-lang.c (f_language_defn): Install default_search_name_hash.
613 * go-lang.c (go_language_defn): Install default_search_name_hash.
614 * jit.c (finalize_symtab): Pass compunit's language to dictionary
615 creation.
616 * language.c (unknown_language_defn, auto_language_defn):
617 * language.h (language_defn::la_search_name_hash): New field.
618 (default_search_name_hash): Declare.
619 * m2-lang.c (m2_language_defn): Install default_search_name_hash.
620 * mdebugread.c (new_block): New parameter 'language'.
621 * mdebugread.c (parse_symbol): Pass symbol language to block
622 allocation.
623 (psymtab_to_symtab_1): Pass down language.
624 (new_symtab): Pass compunit's language to block allocation.
625 * objc-lang.c (objc_language_defn): Install
626 default_search_name_hash.
627 * opencl-lang.c (opencl_language_defn):
628 * p-lang.c (pascal_language_defn): Install
629 default_search_name_hash.
630 * rust-lang.c (rust_language_defn): Install
631 default_search_name_hash.
632 * stabsread.h (enum language): Forward declare.
633 (process_one_symbol): Add 'language' parameter.
634 * symtab.c (search_name_hash): New function.
635 * symtab.h (search_name_hash): Declare.
636 * xcoffread.c (read_xcoff_symtab): Pass language to start_symtab.
637
638 2017-11-08 Pedro Alves <palves@redhat.com>
639
640 * cp-name-parser.y (main): Don't initialize extra_chars.
641
642 2017-11-07 Tom Tromey <tom@tromey.com>
643
644 * event-top.h (command_handler): Constify.
645 * record-full.c (cmd_record_full_start): Update.
646 * thread.c (thread_apply_all_command): Update.
647 * printcmd.c (eval_command): Update.
648 * mi/mi-main.c (mi_execute_cli_command): Update.
649 (mi_execute_async_cli_command): Update.
650 * tui/tui-stack.c (tui_update_command): Update.
651 * cli/cli-interp.c (safe_execute_command): Constify.
652 * record.c (record_start): Update.
653 (record_start, record_stop, cmd_record_start): Update.
654 * record-btrace.c (cmd_record_btrace_bts_start): Update.
655 (cmd_record_btrace_pt_start): Update.
656 (cmd_record_btrace_start): Update.
657 (cmd_record_btrace_start): Update.
658 * reverse.c (exec_reverse_once): Update.
659 * python/python.c (execute_gdb_command): Don't copy the command.
660 * event-top.c (command_line_handler): Update.
661 (command_handler): Constify.
662 * defs.h (deprecated_call_command_hook): Constify.
663 * cli/cli-script.h (execute_user_command): Constify.
664 * cli/cli-script.c (execute_user_command): Constify.
665 (execute_cmd_pre_hook, execute_cmd_post_hook): Constify.
666 (enum command_control_type): Update.
667 * main.c (catch_command_errors): Remove non-const overload.
668 (catch_command_errors_ftype): Remove.
669 * python/py-cmd.c (cmdpy_function): Constify.
670 * guile/scm-cmd.c (cmdscm_function): Constify.
671 * cli/cli-dump.c (call_dump_func): Constify.
672 * cli/cli-decode.c (do_const_cfunc): Constify.
673 (do_sfunc): Constify.
674 (cmd_func): Constify.
675 * gdbcmd.h (execute_command, execute_command_to_string): Constify.
676 * top.h (execute_command): Constify.
677 * top.c (execute_command): Constify.
678 (execute_command_to_string): Constify.
679 (deprecated_call_command_hook): Constify.
680 * command.h (cmd_func): Constify.
681 * cli/cli-decode.h (struct cmd_list_element) <func>: Constify.
682
683 2017-11-07 Tom Tromey <tom@tromey.com>
684
685 * ada-lang.c (catch_ada_exception_command): Constify.
686 (catch_assert_command): Constify.
687 * break-catch-throw.c (catch_catch_command, catch_throw_command)
688 (catch_rethrow_command): Constify.
689 (catch_exception_command_1): Constify.
690 * breakpoint.h (add_catch_command): Constify.
691 * break-catch-syscall.c (catch_syscall_command_1): Constify.
692 (catch_syscall_split_args): Constify.
693 * break-catch-sig.c (catch_signal_command): Constify.
694 (catch_signal_split_args): Constify.
695 * cli/cli-decode.h (struct cmd_list_element) <function>: Use
696 cmd_const_sfunc_ftype.
697 * cli/cli-decode.c (add_setshow_cmd_full): Constify.
698 (add_setshow_enum_cmd, add_setshow_auto_boolean_cmd)
699 (add_setshow_boolean_cmd, add_setshow_filename_cmd)
700 (add_setshow_string_cmd, struct cmd_list_element)
701 (add_setshow_optional_filename_cmd, add_setshow_integer_cmd)
702 (add_setshow_uinteger_cmd, add_setshow_zinteger_cmd)
703 (add_setshow_zuinteger_unlimited_cmd, add_setshow_zuinteger_cmd):
704 Constify.
705 (set_cmd_sfunc): Constify.
706 (empty_sfunc): Constify.
707 * command.h (add_setshow_enum_cmd, add_setshow_auto_boolean_cmd)
708 (add_setshow_boolean_cmd, add_setshow_filename_cmd)
709 (add_setshow_string_cmd, add_setshow_string_noescape_cmd)
710 (add_setshow_optional_filename_cmd, add_setshow_integer_cmd)
711 (add_setshow_uinteger_cmd, add_setshow_zinteger_cmd)
712 (add_setshow_zuinteger_cmd, add_setshow_zuinteger_unlimited_cmd):
713 Constify.
714 (set_cmd_sfunc): Constify.
715 (cmd_sfunc_ftype): Remove.
716 * compile/compile.c (set_compile_args): Constify.
717 * infrun.c (set_disable_randomization): Constify.
718 * infcmd.c (set_args_command, set_cwd_command): Constify.
719 * breakpoint.c (set_condition_evaluation_mode): Constify.
720 (add_catch_command): Constify.
721 (catch_fork_command_1, catch_exec_command_1)
722 (catch_load_command_1, catch_unload_command_1): Constify.
723 (catch_load_or_unload): Constify.
724 * guile/scm-param.c (pascm_set_func): Constify.
725 (add_setshow_generic): Constify.
726 * python/py-param.c (get_set_value): Constify.
727 * top.h (set_verbose): Constify.
728 * tui/tui-win.c (tui_set_var_cmd): Constify.
729 * mi/mi-main.c (set_mi_async_command): Constify.
730 * cli/cli-logging.c (set_logging_overwrite)
731 (set_logging_redirect): Constify.
732 * value.c (set_max_value_size): Constify.
733 * valprint.c (set_input_radix, set_output_radix): Constify.
734 * utils.c (set_width_command, set_height_command): Constify.
735 * typeprint.c (set_print_type_methods, set_print_type_typedefs): Constify.
736 * tracepoint.c (set_disconnected_tracing)
737 (set_circular_trace_buffer, set_trace_buffer_size)
738 (set_trace_user, set_trace_notes, set_trace_stop_notes): Constify.
739 * top.c (set_history_size_command, set_verbose, set_editing)
740 (set_gdb_datadir, set_history_filename): Constify.
741 * target.c (set_targetdebug, maint_set_target_async_command)
742 (maint_set_target_non_stop_command, set_target_permissions)
743 (set_write_memory_permission): Constify.
744 (open_target): Constify.
745 * target-descriptions.c (set_tdesc_filename_cmd): Constify.
746 * target-dcache.c (set_stack_cache, set_code_cache): Constify.
747 * symtab.c (set_symbol_cache_size_handler): Constify.
748 * symfile.c (set_ext_lang_command): Constify.
749 * symfile-debug.c (set_debug_symfile): Constify.
750 * source.c (set_directories_command): Constify.
751 * solib.c (reload_shared_libraries, gdb_sysroot_changed): Constify.
752 * serial.c (set_parity): Constify.
753 * rs6000-tdep.c (powerpc_set_soft_float, powerpc_set_vector_abi): Constify.
754 * remote.c (set_remote_exec_file, set_remotebreak)
755 (set_remote_protocol_Z_packet_cmd, set_range_stepping): Constify.
756 * record.c (set_record_insn_history_size)
757 (set_record_call_history_size): Constify.
758 * record-full.c (set_record_full_insn_max_num): Constify.
759 * proc-api.c (set_procfs_trace_cmd, set_procfs_file_cmd): Constify.
760 * osabi.c (set_osabi): Constify.
761 * mips-tdep.c (set_mips64_transfers_32bit_regs)
762 (reinit_frame_cache_sfunc, mips_abi_update): Constify.
763 * maint.c (maintenance_set_profile_cmd): Constify.
764 * linux-thread-db.c (set_libthread_db_search_path): Constify.
765 * language.c (set_language_command, set_range_command)
766 (set_case_command): Constify.
767 * infrun.c (set_non_stop, set_observer_mode)
768 (set_stop_on_solib_events, set_schedlock_func)
769 (set_exec_direction_func): Constify.
770 * infcmd.c (set_inferior_tty_command): Constify.
771 * disasm.c (set_disassembler_options_sfunc): Constify.
772 * demangle.c (set_demangling_command): Constify.
773 * dcache.c (set_dcache_size, set_dcache_line_size): Constify.
774 * cris-tdep.c (set_cris_version, set_cris_mode)
775 (set_cris_dwarf2_cfi): Constify.
776 * corefile.c (set_gnutarget_command): Constify.
777 * charset.c (set_host_charset_sfunc, set_target_charset_sfunc)
778 (set_target_wide_charset_sfunc): Constify.
779 * breakpoint.c (update_dprintf_commands): Constify.
780 * auto-load.c (set_auto_load_dir, set_auto_load_safe_path): Constify.
781 * arm-tdep.c (set_fp_model_sfunc, arm_set_abi)
782 (set_disassembly_style_sfunc): Constify.
783 * arch-utils.c (set_endian, set_architecture): Constify.
784 * alpha-tdep.c (reinit_frame_cache_sfunc): Constify.
785 * agent.c (set_can_use_agent): Constify.
786
787 2017-11-07 Tom Tromey <tom@tromey.com>
788
789 * go32-nat.c (go32_sysinfo, go32_sldt, go32_sgdt, go32_sidt)
790 (go32_pde, go32_pte, go32_pte_for_address): Constify.
791 * gnu-nat.c (_parse_bool_arg, show_thread_default_pause_cmd)
792 (set_thread_default_pause_cmd, set_thread_default_run_cmd)
793 (show_thread_default_run_cmd, set_thread_default_detach_sc_cmd)
794 (parse_int_arg, show_thread_default_detach_sc_cmd)
795 (set_signals_cmd, show_signals_cmd, set_sig_thread_cmd)
796 (show_sig_thread_cmd, set_stopped_cmd, show_stopped_cmd)
797 (set_exceptions_cmd, show_exceptions_cmd, set_task_pause_cmd)
798 (show_task_pause_cmd, set_task_detach_sc_cmd)
799 (show_task_detach_sc_cmd, set_task_exc_port_cmd)
800 (set_noninvasive_cmd, set_thread_pause_cmd)
801 (show_thread_pause_cmd, set_thread_run_cmd, show_thread_run_cmd)
802 (set_thread_detach_sc_cmd, show_thread_detach_sc_cmd)
803 (set_thread_exc_port_cmd, thread_takeover_sc_cmd): Constify.
804 * windows-nat.c (display_selectors): Constify.
805 * cli/cli-decode.h (struct cmd_list_element) <function>: Remove
806 non-const "cfunc".
807 * cli/cli-decode.c (set_cmd_cfunc): Remove non-const overload.
808 (cmd_cfunc_eq): Likewise.
809 (struct cmd_list_element): Likewise.
810 (do_cfunc): Remove.
811 (cli_user_command_p): Update.
812 * command.h (add_cmd): Remove non-const overload.
813 (cmd_cfunc_ftype): Remove typedef.
814 (cmd_cfunc_eq): Remove non-const overload.
815 * value.c (show_values): Constify.
816 * thread.c (thread_apply_all_command): Constify.
817 * symfile.c (load_command): Constify.
818 * source.c (directory_command): Constify.
819 * maint.c (maintenance_internal_error)
820 (maintenance_demangler_warning, maintenance_space_display)
821 (maintenance_print_architecture, maintenance_translate_address)
822 (maintenance_info_selftests, maintenance_internal_warning):
823 Constify.
824 * breakpoint.c (disable_trace_command, enable_trace_command):
825 Constify.
826 * auto-load.c (info_auto_load_local_gdbinit, add_auto_load_dir):
827 Constify.
828 (add_auto_load_safe_path): Constify.
829 * guile/scm-auto-load.c (info_auto_load_guile_scripts): Constify.
830 * top.h (show_commands): Constify.
831 * linux-thread-db.c (info_auto_load_libthread_db): Constify.
832 * sparc64-tdep.c (adi_examine_command): Constify.
833 (adi_assign_command): Constify.
834
835 2017-11-07 Tom Tromey <tom@tromey.com>
836
837 * frame.h (info_locals_command, info_args_command): Constify.
838 * auto-load.h (auto_load_info_scripts): Constify.
839 * inferior.h (registers_info): Constify.
840 * copying.c: Rebuild.
841 * copying.awk: Constify generated commands.
842 * auto-load.c (auto_load_info_scripts)
843 (info_auto_load_gdb_scripts): Constify.
844 * cli/cli-decode.c (struct cmd_list_element): Take a
845 cmd_const_cfunc_ftype.
846 * command.h (add_info): Take a cmd_const_cfunc_ftype.
847 * tui/tui-win.c (tui_all_windows_info): Constify.
848 * python/py-auto-load.c (info_auto_load_python_scripts):
849 Constify.
850 * cli/cli-cmds.c (show_command): Remove non-const overload.
851 * tracepoint.c (info_tvariables_command, info_scope_command):
852 Constify.
853 (info_static_tracepoint_markers_command): Constify.
854 * thread.c (info_threads_command): Constify.
855 (print_thread_info_1): Constify.
856 * target.c (info_target_command): Constify.
857 * symtab.c (info_sources_command, info_functions_command)
858 (info_types_command): Constify.
859 (info_variables_command): Remove non-const overload.
860 * symfile.c (info_ext_lang_command): Constify.
861 * stack.c (info_frame_command, info_locals_command)
862 (info_args_command): Constify.
863 (backtrace_command): Remove non-const overload.
864 * source.c (info_source_command, info_line_command): Constify.
865 * solib.c (info_sharedlibrary_command): Constify.
866 * skip.c (info_skip_command): Constify.
867 * ser-go32.c (info_serial_command): Constify.
868 * reverse.c (info_bookmarks_command): Constify.
869 * printcmd.c (info_symbol_command, info_address_command)
870 (info_display_command): Constify.
871 * osdata.c (info_osdata_command): Constify.
872 * objc-lang.c (info_selectors_command, info_classes_command):
873 Constify.
874 * nto-procfs.c (procfs_pidlist, procfs_meminfo): Constify.
875 * memattr.c (info_mem_command): Constify.
876 * macrocmd.c (info_macro_command, info_macros_command): Constify.
877 * linux-fork.c (info_checkpoints_command): Constify.
878 * infrun.c (info_signals_command): Constify.
879 * inflow.c (info_terminal_command): Constify.
880 * inferior.c (info_inferiors_command): Constify.
881 (print_inferior): Constify.
882 * infcmd.c (info_program_command, info_all_registers_command)
883 (info_registers_command, info_vector_command)
884 (info_float_command): Constify.
885 (registers_info): Constify.
886 * gnu-nat.c (info_send_rights_cmd, info_recv_rights_cmd)
887 (info_port_sets_cmd, info_dead_names_cmd, info_port_rights_cmd):
888 Constify.
889 * f-valprint.c (info_common_command): Constify.
890 * dcache.c (info_dcache_command): Constify.
891 (dcache_info_1): Constify.
892 * darwin-nat-info.c (info_mach_tasks_command)
893 (info_mach_task_command, info_mach_ports_command)
894 (info_mach_port_command, info_mach_threads_command)
895 (info_mach_thread_command, info_mach_regions_command)
896 (info_mach_regions_recurse_command, info_mach_region_command)
897 (info_mach_exceptions_command): Constify.
898 (get_task_from_args): Constify.
899 * cp-support.c (info_vtbl_command): Constify.
900 * breakpoint.c (info_watchpoints_command)
901 (info_tracepoints_command): Constify.
902 (info_breakpoints_command): Remove non-const overload.
903 * avr-tdep.c (avr_io_reg_read_command): Constify.
904 * auxv.c (info_auxv_command): Constify.
905 * ada-tasks.c (info_tasks_command): Constify.
906 (info_task): Constify.
907 * ada-lang.c (info_exceptions_command): Constify.
908
909 2017-11-07 Tom Tromey <tom@tromey.com>
910
911 * solib.h (no_shared_libraries): Constify.
912 * frame.h (return_command): Constify.
913 * cli/cli-cmds.h (quit_command): Constify.
914 * top.h (quit_command, execute_command): Constify.
915 * target.h (flash_erase_command): Constify.
916 * inferior.h (set_inferior_args, attach_command): Constify.
917 * tracepoint.h (start_tracing, stop_tracing): Constify.
918 * breakpoint.h (break_command, tbreak_command)
919 (hbreak_command_wrapper, thbreak_command_wrapper)
920 (rbreak_command_wrapper, watch_command_wrapper)
921 (awatch_command_wrapper, rwatch_command_wrapper)
922 (get_tracepoint_by_number): Constify.
923 * symtab.c (info_variables_command, rbreak_command)
924 (symtab_symbol_info): Constify.
925 (info_variables_command): Add non-const overload.
926 * top.c (dont_repeat_command): Constify.
927 * breakpoint.c (ignore_command, commands_command)
928 (condition_command, tbreak_command, hbreak_command)
929 (thbreak_command, clear_command, break_command)
930 (info_breakpoints_command, watch_command, rwatch_command)
931 (awatch_command, trace_command, ftrace_command, strace_command)
932 (trace_pass_command, break_range_command, dprintf_command)
933 (agent_printf_command, get_tracepoint_by_number)
934 (watch_maybe_just_location, trace_pass_command): Constify.
935 (info_breakpoints_command): Add non-const overload.
936 * tracefile.c (tsave_command): Constify.
937 * infcmd.c (attach_command, disconnect_command, signal_command)
938 (queue_signal_command, stepi_command, nexti_command)
939 (finish_command, next_command, step_command, until_command)
940 (advance_command, jump_command, continue_command, run_command)
941 (start_command, starti_command, interrupt_command)
942 (run_command_1, set_inferior_args, step_1): Constify.
943 * inferior.c (add_inferior_command, remove_inferior_command)
944 (clone_inferior_command): Constify.
945 * linux-fork.c (checkpoint_command, restart_command): Constify.
946 * windows-nat.c (signal_event_command): Constify.
947 * guile/guile.c (guile_repl_command, guile_command): Constify.
948 * printcmd.c (x_command, display_command, printf_command)
949 (output_command, set_command, call_command, print_command)
950 (eval_command): Constify.
951 (non_const_set_command): Remove.
952 (_initialize_printcmd): Update.
953 * source.c (forward_search_command, reverse_search_command):
954 Constify.
955 * jit.c (jit_reader_load_command, jit_reader_unload_command):
956 Constify.
957 * infrun.c (handle_command): Constify.
958 * memattr.c (mem_command): Constify.
959 * stack.c (return_command, up_command, up_silently_command)
960 (down_command, down_silently_command, frame_command)
961 (backtrace_command, func_command, backtrace_command_1): Constify.
962 (backtrace_command): Add non-const overload.
963 * remote-sim.c (simulator_command): Constify.
964 * exec.c (set_section_command): Constify.
965 * tracepoint.c (tdump_command, trace_variable_command)
966 (tstatus_command, tstop_command, tstart_command)
967 (end_actions_pseudocommand, while_stepping_pseudocommand)
968 (collect_pseudocommand, teval_pseudocommand, actions_command)
969 (start_tracing, stop_tracing): Constify.
970 * value.c (init_if_undefined_command): Constify.
971 * tui/tui-stack.c (tui_update_command): Constify.
972 * tui/tui-win.c (tui_refresh_all_command)
973 (tui_set_tab_width_command, tui_set_win_height_command)
974 (tui_set_focus_command, tui_scroll_forward_command)
975 (tui_scroll_backward_command, tui_scroll_left_command)
976 (tui_scroll_right_command, parse_scrolling_args, tui_set_focus)
977 (tui_set_win_height): Constify.
978 * tui/tui-layout.c (tui_layout_command): Constify.
979 * procfs.c (proc_trace_syscalls, proc_trace_sysentry_cmd)
980 (proc_trace_sysexit_cmd, proc_untrace_sysentry_cmd)
981 (proc_untrace_sysexit_cmd): Constify.
982 * remote.c (threadlist_test_cmd, threadinfo_test_cmd)
983 (threadset_test_cmd, threadlist_update_test_cmd)
984 (threadalive_test): Constify.
985 * objc-lang.c (print_object_command): Constify.
986 * command.h (add_com): Constify.
987 * cli/cli-dump.c (restore_command): Constify.
988 * cli/cli-cmds.c (pwd_command, echo_command, quit_command)
989 (help_command, complete_command, shell_command, edit_command)
990 (list_command, disassemble_command, make_command)
991 (apropos_command, alias_command): Constify.
992 * cli/cli-script.c (document_command, define_command)
993 (while_command, if_command, validate_comname): Constify.
994 * cli/cli-decode.c (struct cmd_list_element): Change type of
995 "fun".
996 * target.c (do_monitor_command, flash_erase_command): Constify.
997 * regcache.c (reg_flush_command): Constify.
998 * reverse.c (reverse_step, reverse_next, reverse_stepi)
999 (reverse_nexti, reverse_continue, reverse_finish)
1000 (save_bookmark_command, goto_bookmark_command)
1001 (exec_reverse_once): Constify.
1002 * python/python.c (python_interactive_command, python_command):
1003 Constify.
1004 * typeprint.c (ptype_command, whatis_command, whatis_exp):
1005 Constify.
1006 * solib.c (sharedlibrary_command, no_shared_libraries): Constify.
1007 * gcore.c (gcore_command): Constify.
1008
1009 2017-11-07 Tom Tromey <tom@tromey.com>
1010
1011 * printcmd.c (x_command): Call set_repeat_arguments.
1012 * cli/cli-cmds.c (list_command): Call set_repeat_arguments.
1013 * top.c (repeat_arguments): New global.
1014 (set_repeat_arguments): New function.
1015 (execute_command): Handle repeat_arguments.
1016 (show_commands): Calls set_repeat_arguments.
1017 * command.h (set_repeat_arguments): Declare.
1018
1019 2017-11-07 Tom Tromey <tom@tromey.com>
1020
1021 * stack.c (backtrace_command): Use std::string.
1022 (backtrace_command_1): Make "count_exp" const.
1023
1024 2017-11-07 Tom Tromey <tom@tromey.com>
1025
1026 * source.c (directory_switch, mod_path, add_path): Constify.
1027 * defs.h (add_path, mod_path, directory_switch): Constify.
1028 * mi/mi-cmd-env.c (env_mod_path): Constify.
1029
1030 2017-11-07 Tom Tromey <tom@tromey.com>
1031
1032 * infcmd.c (strip_bg_char): Return gdb::unique_xmalloc_ptr.
1033 (run_command_1, continue_command, step_1, jump_command)
1034 (signal_command, until_command, advance_command, finish_command)
1035 (attach_command): Update.
1036
1037 2017-11-07 Tom Tromey <tom@tromey.com>
1038
1039 * command.h (set_cmd_cfunc): Don't declare.
1040 * cli/cli-decode.c (set_cmd_cfunc): Now static.
1041
1042 2017-11-07 Tom Tromey <tom@tromey.com>
1043
1044 * stack.c (select_frame_command): Constify.
1045 * cli/cli-decode.c (add_com_suppress_notification): Constify.
1046 * command.h (add_com_suppress_notification): Constify.
1047
1048 2017-11-07 Tom Tromey <tom@tromey.com>
1049
1050 * breakpoint.c (stop_command): Constify.
1051 * cli/cli-decode.c (struct cmd_list_element): Constify.
1052 * command.h (add_abbrev_prefix_cmd): Constify.
1053
1054 2017-11-07 Pedro Alves <palves@redhat.com>
1055
1056 * breakpoint.c (extract_bp_kind): New enum.
1057 (extract_bp_num, extract_bp_or_bp_range): New functions, partially
1058 factored out from ...
1059 (extract_bp_number_and_location): ... here.
1060 * cli/cli-utils.c (get_number_trailer): Handle '-$variable'.
1061
1062 2017-11-07 Pedro Alves <palves@redhat.com>
1063
1064 * breakpoint.c (extract_bp_number_and_location): Change return
1065 type to void. Throw error instead of warning.
1066 (enable_disable_command): Adjust.
1067
1068 2017-11-07 Xavier Roirand <roirand@adacore.com>
1069 Pedro Alves <palves@redhat.com>
1070
1071 * breakpoint.c (map_breakpoint_number_range): New, factored out
1072 from ...
1073 (map_breakpoint_numbers): ... here.
1074 (find_location_by_number): Change parameters from string to
1075 breakpoint number and location.
1076 (extract_bp_number_and_location): New function.
1077 (enable_disable_bp_num_loc)
1078 (enable_disable_breakpoint_location_range)
1079 (enable_disable_command): New functions, factored out ...
1080 (enable_command, disable_command): ... these functions, and
1081 adjusted to support ranges.
1082 * NEWS: Document enable/disable breakpoint location range feature.
1083
1084 2017-11-06 Luis Machado <luis.machado@linaro.org>
1085
1086 * MAINTAINERS (Write After Approval): Update my e-mail address.
1087
1088 2017-11-06 Pedro Alves <palves@redhat.com>
1089
1090 * gnu-nat.c (gnu_terminal_init): Delete.
1091 (gnu_target): Don't install gnu_terminal_init.
1092 * inflow.c (child_terminal_init_with_pgrp): Delete, merged with ...
1093 (child_terminal_init): ... this function.
1094
1095 2017-11-06 Pedro Alves <palves@redhat.com>
1096
1097 * common/common.m4 (GDB_AC_COMMON): No longer check termio.h nor
1098 sgtty.h.
1099 * config.in, configure: Regenerate.
1100
1101 2017-11-06 Pedro Alves <palves@redhat.com>
1102
1103 * event-top.c: Check SIGTSTP instead of STOP_SIGNAL thoughout.
1104 (async_init_signals): Adjust.
1105 (handle_stop_sig): Rename to ...
1106 (handle_sigtstp): ... this.
1107 (async_stop_sig): Rename to ...
1108 (async_sigtstp_handler): ... this, and delete STOP_SIGNAL !=
1109 SIGTSTP path.
1110 * event-top.h: Move signal.h include to the top. Check SIGTSTP
1111 instead of STOP_SIGNAL thoughout.
1112 (handle_stop_sig): Rename to ...
1113 (handle_sigtstp): ... this.
1114 * top.c (command_line_input): Replace STOP_SIGNAL -> SIGTSTP.
1115
1116 2017-11-06 Pedro Alves <palves@redhat.com>
1117
1118 * inflow.c (child_terminal_inferior, child_terminal_ours_1): No
1119 longer set flags twice in row.
1120
1121 2017-11-06 Pedro Alves <palves@redhat.com>
1122
1123 * Makefile.in (SER_HARDWIRE): Update comment.
1124 (HFILES_NO_SRCDIR): Remove gdb_termios.h.
1125 * common/gdb_termios.h: Delete file.
1126 * common/job-control.c: Include termios.h and unistd.h instead of
1127 gdb_termios.h.
1128 (gdb_setpgid): Remove HAVE_TERMIOS || TIOCGPGRP preprocessor
1129 check.
1130 (have_job_control): Check HAVE_TERMIOS_H instead of HAVE_TERMIOS.
1131 Remove sgtty code.
1132 * configure.ac: No longer check for termio.h and sgtty.h.
1133 * configure: Regenerate.
1134 * inflow.c: Include termios.h instead of gdb_termios.h. Replace
1135 PROCESS_GROUP_TYPE checks with HAVE_TERMIOS_H checks throughout.
1136 Replace PROCESS_GROUP_TYPE references with pid_t references
1137 throughout.
1138 (gdb_getpgrp): Delete.
1139 (set_initial_gdb_ttystate): Use tcgetpgrp instead of gdb_getpgrp.
1140 (child_terminal_inferior): Remove comment. Remove sgtty code.
1141 (child_terminal_ours_1): Use tcgetpgrp directly instead of
1142 gdb_getpgrp. Use serial_set_tty_state instead aof
1143 serial_noflush_set_tty_state. Remove sgtty code.
1144 * inflow.h: Include unistd.h instead of gdb_termios.h. Replace
1145 PROCESS_GROUP_TYPE check with HAVE_TERMIOS_H check.
1146 (inferior_process_group): Now returns pid_t.
1147 * ser-base.c (ser_base_noflush_set_tty_state): Delete.
1148 * ser-base.h (ser_base_noflush_set_tty_state): Delete.
1149 * ser-event.c (serial_event_ops): Update.
1150 * ser-go32.c (dos_noflush_set_tty_state): Delete.
1151 (dos_ops): Update.
1152 * ser-mingw.c (hardwire_ops, tty_ops, pipe_ops, tcp_ops): Update.
1153 * ser-pipe.c (pipe_ops): Update.
1154 * ser-tcp.c (tcp_ops): Update.
1155 * ser-unix.c: Include termios.h instead of gdb_termios.h. Remove
1156 HAVE_TERMIOS checks.
1157 [HAVE_TERMIO] (struct hardwire_ttystate): Delete.
1158 [HAVE_SGTTY] (struct hardwire_ttystate): Delete.
1159 (get_tty_state, set_tty_state): Drop termio and sgtty code, and
1160 assume termios.
1161 (hardwire_noflush_set_tty_state): Delete.
1162 (hardwire_print_tty_state, hardwire_drain_output)
1163 (hardwire_flush_output, hardwire_flush_input)
1164 (hardwire_send_break, hardwire_raw, hardwire_setbaudrate)
1165 (hardwire_setstopbits, hardwire_setparity): Drop termio and sgtty
1166 code, and assume termios.
1167 (hardwire_ops): Update.
1168 (_initialize_ser_hardwire): Remove HAVE_TERMIOS check.
1169 * serial.c (serial_noflush_set_tty_state): Delete.
1170 * serial.h (serial_noflush_set_tty_state): Delete.
1171 (serial_ops::noflush_set_tty_state): Delete.
1172
1173 2017-11-06 Ulrich Weigand <uweigand@de.ibm.com>
1174
1175 * Makefile.in (SFILES): Remove doublest.c and dfp.c.
1176 (HFILES_NO_SRCDIR): Remove doublest.h and dfp.h.
1177 (COMMON_OBS): Remove doublest.o and dfp.o.
1178 Do not build target-float.c (instead of doublest.c)
1179 with -Wformat-nonliteral.
1180
1181 * doublest.c: Remove file.
1182 * doublest.h: Remove file.
1183 * dfp.c: Remove file.
1184 * dfp.h: Remove file.
1185
1186 * target-float.c: Do not include "doublest.h" and "dfp.h".
1187 (DOUBLEST): Move here from doublest.h.
1188 (enum float_kind): Likewise.
1189 (FLOATFORMAT_CHAR_BIT): Likewise.
1190 (FLOATFORMAT_LARGEST_BYTES): Likewise.
1191 (floatformat_totalsize_bytes): Move here from doublest.c. Make static.
1192 (floatformat_precision): Likewise.
1193 (floatformat_normalize_byteorder, get_field, put_field): Likewise.
1194 (floatformat_is_negative, floatformat_classify, floatformat_mantissa):
1195 Likewise.
1196 (host_float_format, host_double_format, host_long_double_format):
1197 Likewise.
1198 (floatformat_to_string, floatformat_from_string): Likewise.
1199 (floatformat_to_doublest): Likewise. Also, inline the original
1200 convert_floatformat_to_doublest.
1201 (floatformat_from_doublest): Likewise. Also, inline the original
1202 convert_floatformat_from_doublest.
1203
1204 Include "dpd/decimal128.h", "dpd/decimal64.h", and "dpd/decimal32.h".
1205 (MAX_DECIMAL_STRING): Move here from dfp.c.
1206 (match_endianness): Likewise.
1207 (set_decnumber_context, decimal_check_errors): Likewise.
1208 (decimal_from_number, decimal_to_number): Likewise.
1209 (decimal_to_string, decimal_from_string): Likewise. Make static.
1210 (decimal_from_longest, decimal_from_ulongest): Likewise.
1211 (decimal_to_longest): Likewise.
1212 (decimal_binop, decimal_is_zero, decimal_compare): Likewise.
1213 (decimal_convert): Likewise.
1214
1215 2017-11-06 Ulrich Weigand <uweigand@de.ibm.com>
1216
1217 * doublest.c: Do not include "gdbtypes.h".
1218 (extract_typed_floating): Remove.
1219 (store_typed_floating): Remove.
1220 (convert_typed_floating): Remove.
1221 * doublest.h (struct type): Remove.
1222 (DOUBLEST_PRINT_FORMAT): Remove.
1223 (DOUBLEST_SCAN_FORMAT): Remove.
1224 (extract_typed_floating): Remove.
1225 (store_typed_floating): Remove.
1226 (convert_typed_floating): Remove.
1227
1228 * dfp.c (decimal_from_doublest): Remove.
1229 (decimal_to_doublest): Remove.
1230 * dfp.h: Do not include "doublest.h".
1231 (decimal_from_doublest): Remove.
1232 (decimal_to_doublest): Remove.
1233
1234 * value.c: Do not include "doublest.h" and "dfp.h".
1235 (value_as_double): Remove.
1236 (unpack_double): Remove.
1237 (value_from_double): Remove.
1238 (value_from_decfloat): Remove.
1239 * value.h: Do not include "doublest.h".
1240 (value_as_double): Remove.
1241 (unpack_double): Remove.
1242 (value_from_double): Remove.
1243 (value_from_decfloat): Remove.
1244
1245 2017-11-06 Ulrich Weigand <uweigand@de.ibm.com>
1246
1247 * i386-tdep.c: Include "target-float.h". Do not include "doublest.h".
1248 (i386_extract_return_value): Use target_float_convert.
1249 (i386_store_return_value): Likewise.
1250 * i387-tdep.c (i387_register_to_value): Use target_float_convert.
1251 (i387_value_to_register): Likewise.
1252 * ia64-tdep.c: Include "target-float.h". Do not include "doublest.h".
1253 (ia64_register_to_value): Use target_float_convert.
1254 (ia64_value_to_register): Likewise.
1255 (ia64_extract_return_value): Likewise.
1256 (ia64_store_return_value): Likewise.
1257 (ia64_push_dummy_call): Likewise.
1258 * m68k-tdep.c: Include "target-float.h".
1259 (m68k_register_to_value): Use target_float_convert.
1260 (m68k_value_to_register): Likewise.
1261 (m68k_svr4_extract_return_value): Likewise.
1262 (m68k_svr4_store_return_value): Likewise.
1263 * ppc-sysv-tdep.c: Include "target-float.h".
1264 (ppc_sysv_abi_push_dummy_call): Use target_float_convert.
1265 (do_ppc_sysv_return_value): Likewise.
1266 (ppc64_sysv_abi_push_freg): Likewise.
1267 (ppc64_sysv_abi_return_value_base): Likewise.
1268 * rs6000-aix-tdep.c: Include "target-float.h".
1269 (rs6000_push_dummy_call): Use target_float_convert.
1270 (rs6000_return_value): Likewise.
1271 * rs6000-lynx178-tdep.c: Include "target-float.h".
1272 (rs6000_lynx178_push_dummy_call): Use target_float_convert.
1273 (rs6000_lynx178_return_value): Likewise.
1274 * rs6000-tdep.c: Include "target-float.h". Do not include "doublest.h".
1275 (rs6000_register_to_value): Use target_float_convert.
1276 (rs6000_value_to_register): Likewise.
1277 * arm-tdep.c: Include "target-float.h". Do not include "doublest.h".
1278 (arm_extract_return_value): Use target_float_convert.
1279 (arm_store_return_value): Likewise.
1280 * sh-tdep.c: Include "target-float.h". Do not include "doublest.h".
1281 (sh_register_convert_to_virtual): Use target_float_convert.
1282 (sh_register_convert_to_raw): Likewise.
1283 * sh64-tdep.c: Include "target-float.h".
1284 (sh64_extract_return_value): Use target_float_convert.
1285 (sh64_register_convert_to_virtual): Likewise.
1286 (sh64_register_convert_to_raw): Likewise. Fix argument types.
1287
1288 2017-11-06 Ulrich Weigand <uweigand@de.ibm.com>
1289
1290 * target-float.c (floatformat_to_host_double): New function.
1291 (floatformat_from_host_double): Likewise.
1292 (target_float_to_host_double): Likewise.
1293 (target_float_from_host_double): Likewise.
1294 * target-float.h (target_float_to_host_double): Add prototype.
1295 (target_float_from_host_double): Likewise.
1296
1297 * guile/scm-value.c: Include "target-float.h".
1298 (gdbscm_value_to_real): Use target_float_to_host_double.
1299 Handle integer source values via value_as_long.
1300 * guile/scm-math.c: Include "target-float.h". Do not include
1301 "doublest.h", "dfp.h", and "expression.h".
1302 (vlscm_convert_typed_number): Use target_float_from_host_double.
1303 (vlscm_convert_number): Likewise.
1304
1305 * python/py-value.c (valpy_float): Use target_float_to_host_double.
1306 (convert_value_from_python): Use target_float_from_host_double.
1307
1308 2017-11-06 Ulrich Weigand <uweigand@de.ibm.com>
1309
1310 * ada-lang.c (cast_to_fixed): Reimplement in target arithmetic.
1311 (cast_from_fixed): Likewise.
1312 (ada_scaling_type): New function.
1313 (ada_delta): Return value instead of DOUBLEST. Perform target
1314 arithmetic instead of host arithmetic.
1315 (scaling_factor): Rename to ...
1316 (ada_scaling_factor) ... this. Make non-static. Return value instead
1317 of DOUBLEST. Perform target arithmetic instead of host arithmetic.
1318 (ada_fixed_to_float): Remove.
1319 (ada_float_to_fixed): Remove.
1320 * ada-lang.h (ada_fixed_to_float): Remove.
1321 (ada_float_to_fixed): Remove.
1322 (ada_delta): Return value instead of DOUBLEST.
1323 (ada_scaling_factor): Add prototype.
1324
1325 * ada-typeprint.c: Include "target-float.h".
1326 (print_fixed_point_type): Perform target arithmetic instead of
1327 host arithmetic.
1328 * ada-valprint.c: Include "target-float.h".
1329 (ada_val_print_num): Perform target arithmetic instead of
1330 host arithmetic for fixed-point types.
1331
1332 2017-11-06 Ulrich Weigand <uweigand@de.ibm.com>
1333
1334 * target-float.c: Include <math.h>.
1335 (floatformat_binop): New function.
1336 (floatformat_compare): Likewise.
1337 (target_float_binop): Likewise.
1338 (target_float_compare): Likewise.
1339 * target-float.h: Include "expression.h".
1340 (target_float_binop): Add prototype.
1341 (target_float_compare): Likewise.
1342
1343 * valarith.c: Do not include "doublest.h" and "dfp.h".
1344 Include "common/byte-vector.h".
1345 (value_args_as_decimal): Remove, replace by ...
1346 (value_args_as_target_float): ... this function. Handle both
1347 binary and decimal target floating-point formats.
1348 (scalar_binop): Handle both binary and decimal FP using
1349 value_args_as_target_float and target_float_binop.
1350 (value_equal): Handle both binary and decimal FP using
1351 value_args_as_target_float and target_float_compare.
1352 (value_less): Likewise.
1353 (value_pos): Handle all scalar types as simple copy.
1354 (value_neg): Handle all scalar types via BINOP_SUB from 0.
1355 * dfp.c (decimal_binop): Throw error instead of internal_error
1356 when called with an unsupported operation code.
1357
1358 2017-11-06 Ulrich Weigand <uweigand@de.ibm.com>
1359
1360 * target-float.c (target_float_to_string): New function.
1361 (target_float_from_string): New function.
1362 * target-float.h (target_float_to_string): Add prototype.
1363 (target_float_from_string): Add prototype.
1364
1365 * valprint.c: Include "target-float.h". Do not include
1366 "doublest.h" and "dfp.h".
1367 (print_floating): Use target_float_to_string.
1368 * printcmd.c: Include "target-float.h". Do not include "dfp.h".
1369 (printf_floating): Use target_float_to_string.
1370 * i387-tdep.c: Include "target-float.h". Do not include "doublest.h".
1371 (print_i387_value): Use target_float_to_string.
1372 * mips-tdep.c: Include "target-float.h".
1373 (mips_print_fp_register): Use target_float_to_string.
1374 * sh64-tdep.c: Include "target-float.h".
1375 (sh64_do_fp_register): Use target_float_to_string.
1376
1377 * parse.c: Include "target-float.h". Do not include
1378 "doublest.h" and "dfp.h".
1379 (parse_float): Use target_float_from_string.
1380 * stabsread.c: Include "target-float.h". Do not include "doublest.h".
1381 (define_symbol): Use target_float_from_string.
1382 * gdbarch-selftests.c: Include "target-float.h".
1383 (register_to_value_test): Use target_float_from_string.
1384
1385 2017-11-06 Ulrich Weigand <uweigand@de.ibm.com>
1386
1387 * Makefile.c (SFILES): Add target-float.c.
1388 (HFILES_NO_SRCDIR): Add target-float.h.
1389 (COMMON_OBS): Add target-float.o.
1390 * target-float.h: New file.
1391 * target-float.c: New file.
1392
1393 * doublest.c (floatformat_classify): Fix detection of float_zero.
1394
1395 * gdbtypes.c (is_floating_type): New function.
1396 * gdbtypes.h (is_floating_type): Add prototype.
1397
1398 * value.c: Do not include "floatformat.h".
1399 (unpack_double): Use target_float_is_valid.
1400 (is_floating_value): New function.
1401 * value.h (is_floating_value): Add prototype-
1402
1403 * valarith.c: Include "target-float.h".
1404 (value_logical_not): Use target_float_is_zero.
1405
1406 * python/py-value.c: Include "target-float.h".
1407 (valpy_nonzero): Use target_float_is_zero.
1408
1409 2017-11-04 Tom Tromey <tom@tromey.com>
1410
1411 * h8300-tdep.c (h8300_push_dummy_call): Use std::vector.
1412
1413 2017-11-04 Tom Tromey <tom@tromey.com>
1414
1415 * breakpoint.c (set_momentary_breakpoint): Return
1416 breakpoint_up.
1417 (until_break_command): Update.
1418 (new_until_break_fsm): Change argument types to
1419 breakpoint_up.
1420 (set_momentary_breakpoint_at_pc): Return breakpoint_up.
1421 (do_delete_breakpoint_cleanup, make_cleanup_delete_breakpoint):
1422 Remove.
1423 * infcmd.c (finish_forward): Update.
1424 * breakpoint.h (set_momentary_breakpoint)
1425 (set_momentary_breakpoint_at_pc): Return breakpoint_up.
1426 (make_cleanup_delete_breakpoint): Remove.
1427 (struct breakpoint_deleter): New.
1428 (breakpoint_up): New typedef.
1429 * infrun.c (insert_step_resume_breakpoint_at_sal_1): Update.
1430 (insert_exception_resume_breakpoint): Update.
1431 (insert_exception_resume_from_probe): Update.
1432 (insert_longjmp_resume_breakpoint): Update.
1433 * arm-linux-tdep.c (arm_linux_copy_svc): Update.
1434 * elfread.c (elf_gnu_ifunc_resolver_stop): Update.
1435 * infcall.c (call_function_by_hand_dummy): Update
1436
1437 2017-11-04 Tom Tromey <tom@tromey.com>
1438
1439 * c-typeprint.c (c_type_print_base): Use gdb::unique_xmalloc_ptr.
1440
1441 2017-11-04 Tom Tromey <tom@tromey.com>
1442
1443 * linux-tdep.c (linux_core_info_proc_mappings): Use
1444 gdb::def_vector.
1445 (linux_get_siginfo_data): Return gdb::byte_vector. Remove
1446 "size" argument.
1447 (linux_corefile_thread): Update.
1448 (linux_make_corefile_notes): Remove unused variable.
1449
1450 2017-11-04 Tom Tromey <tom@tromey.com>
1451
1452 * ppc-linux-tdep.c (ppc_linux_get_syscall_number): Use
1453 gdb::byte_vector.
1454
1455 2017-11-04 Tom Tromey <tom@tromey.com>
1456
1457 * objfiles.c (do_free_objfile_cleanup): Remove.
1458 * compile/compile-object-load.c (compile_object_load): Update.
1459 * objfiles.h (make_cleanup_free_objfile): Remove.
1460
1461 2017-11-04 Tom Tromey <tom@tromey.com>
1462
1463 * sparc64-tdep.c (do_examine): Use gdb::def_vector.
1464 (adi_read_versions): Change "tags" to "gdb_byte *".
1465 (adi_print_versions): Likewise.
1466
1467 2017-11-04 Tom Tromey <tom@tromey.com>
1468
1469 * breakpoint.c
1470 (scoped_rbreak_breakpoints::scoped_rbreak_breakpoints): Rename
1471 from start_rbreak_breakpoints.
1472 (scoped_rbreak_breakpoints): Rename from end_rbreak_breakpoints.
1473 * breakpoint.h (class scoped_rbreak_breakpoints): New.
1474 (start_rbreak_breakpoints, end_rbreak_breakpoints): Remove.
1475 * symtab.c (do_end_rbreak_breakpoints): Remove.
1476 (rbreak_command): Use scoped_rbreak_breakpoints, std::string.
1477
1478 2017-11-04 Tom Tromey <tom@tromey.com>
1479
1480 * cp-namespace.c (reset_directive_searched): Remove.
1481 (cp_lookup_symbol_via_imports): Use scoped_restore.
1482 * cp-support.c (reset_directive_searched): Remove.
1483 (make_symbol_overload_list_using): Use scoped_restore.
1484 * d-namespace.c (d_lookup_symbol_imports): Use scoped_restore.
1485 (reset_directive_searched): Remove.
1486
1487 2017-11-04 Tom Tromey <tom@tromey.com>
1488
1489 * symfile.c (find_separate_debug_file_by_debuglink): Use
1490 unique_xmalloc_ptr.
1491
1492 2017-11-04 Tom Tromey <tom@tromey.com>
1493
1494 * compile/compile-loc2c.c (compute_stack_depth_worker): Change
1495 type of "info".
1496 (compute_stack_depth): Likewise.
1497 (do_compile_dwarf_expr_to_c): Use std::vector.
1498
1499 2017-11-04 Tom Tromey <tom@tromey.com>
1500
1501 * compile/compile-object-load.c (link_callbacks_einfo): Use
1502 std::string.
1503
1504 2017-11-04 Tom Tromey <tom@tromey.com>
1505
1506 * dwarf2read.c (process_full_comp_unit, process_full_type_unit):
1507 Use scoped_free_pendings.
1508 * dbxread.c (dbx_symfile_read, dbx_psymtab_to_symtab_1): Use
1509 scoped_free_pendings.
1510 * xcoffread.c (xcoff_psymtab_to_symtab_1): Use scoped_free_pendings.
1511 (xcoff_initial_scan): Likewise.
1512 * buildsym.c (reset_symtab_globals): Update comment.
1513 (scoped_free_pendings): Rename from really_free_pendings.
1514 (prepare_for_building): Update comment.
1515 (buildsym_init): Likewise.
1516 * buildsym.h (class scoped_free_pendings): New class.
1517 (really_free_pendings): Don't declare.
1518
1519 2017-11-03 Ulrich Weigand <uweigand@de.ibm.com>
1520
1521 * doublest.c (convert_doublest_to_floatformat): Fix uninitialized
1522 output when converting a zero value to a special byteorder format.
1523
1524 2017-11-02 Yao Qi <yao.qi@linaro.org>
1525
1526 * frame.c (do_frame_register_read): Remove aspace.
1527 * jit.c (jit_frame_sniffer): Likwise.
1528 * ppc-linux-tdep.c (ppu2spu_sniffer): Likewise.
1529 * regcache.c (regcache::regcache): Pass nullptr.
1530 (regcache_print): Caller updated.
1531 * regcache.h (regcache::regcache): Remove one constructor
1532 parameter aspace.
1533
1534 2017-11-02 Yao Qi <yao.qi@linaro.org>
1535
1536 * regcache.h (regcache) <m_readonly_p>: Change it to const bool.
1537
1538 2017-11-02 Yao Qi <yao.qi@linaro.org>
1539
1540 * breakpoint.c (insert_single_step_breakpoints): Update.
1541 * frame.c (struct frame_info) <aspace>: Add const.
1542 (frame_save_as_regcache): Add const.
1543 (get_frame_address_space): Return const address_space *.
1544 * frame.h (get_frame_address_space): Update declaration.
1545 * infrun.c (struct step_over_info) <aspace>: Add const.
1546 (set_step_over_info): Make aspace const.
1547 (displaced_step_prepare_throw): Change variable const.
1548 (resume): Likewise.
1549 (proceed): Likewise.
1550 (adjust_pc_after_break): Likewise.
1551 (save_waitstatus): Likewise.
1552 (handle_signal_stop): Likewise.
1553 (keep_going_pass_signal): Likewise.
1554 * jit.c (jit_frame_sniffer): Add const.
1555 * mips-tdep.c (mips_single_step_through_delay): Likewise.
1556 * ppc-linux-tdep.c (ppu2spu_sniffer): Likewise.
1557 * record-full.c (record_full_wait_1): Likewise.
1558 * regcache.c (regcache::regcache): Change parameter to const.
1559 * regcache.h (regcache::regcache): Likewise.
1560 (regcache::aspace): Return const address_space *.
1561 (regcache) <m_aspace>: Add const.
1562
1563 2017-11-02 Yao Qi <yao.qi@linaro.org>
1564
1565 * darwin-nat.c (cancel_breakpoint): Use regcache->aspace ().
1566 * frame.c (create_sentinel_frame): Likewise.
1567 * infrun.c (displaced_step_prepare_throw): Likewise.
1568 (resume): Likewise.
1569 (thread_still_needs_step_over_bp): Likewise.
1570 (proceed): Likewise.
1571 (do_target_wait): Likewise.
1572 (adjust_pc_after_break): Likewise.
1573 (handle_syscall_event): Likewise.
1574 (save_waitstatus): Likewise.
1575 (handle_inferior_event_1): Likewise.
1576 (handle_signal_stop): Likewise.
1577 (keep_going_pass_signal): Likewise.
1578 * linux-nat.c (status_callback): Likewise.
1579 (save_stop_reason): Likewise.
1580 (resume_stopped_resumed_lwps): Likewise.
1581 * record-full.c (record_full_exec_insn): Likewise.
1582 (record_full_wait_1): Likewise.
1583 * regcache.c (get_regcache_aspace): Remove.
1584 * regcache.h (get_regcache_aspace): Remove.
1585
1586 2017-11-02 Yao Qi <yao.qi@linaro.org>
1587
1588 * regcache.c (struct regcache_descr) <nr_raw_registers>: Remove.
1589 (init_regcache_descr): Use gdbarch_num_regs.
1590 (regcache::regcache): Likewise.
1591 (regcache::get_register_status): Likewise.
1592 (regcache::assert_raw_regnum): Likewise.
1593 (regcache::cooked_read): Likewise.
1594 (regcache::cooked_read_value): Likewise.
1595 (regcache::cooked_write): Likewise.
1596 (regcache::dump): Likewise.
1597 (regcache::num_raw_registers): New method.
1598 * regcache.h (class regcache) <num_raw_registers>: New.
1599
1600 2017-11-02 Yao Qi <yao.qi@linaro.org>
1601
1602 * regcache.c (regcache::assert_regnum): New method.
1603 (regcache::invalidate): Call assert_regnum.
1604 (regcache::raw_update): Likewise.
1605 (regcache::raw_write): Likewise.
1606 (regcache::raw_read_part): Likewise.
1607 (regcache::raw_write_part): Likewise.
1608 (regcache::raw_supply): Likewise.
1609 (regcache::raw_supply_integer): Likewise.
1610 (regcache::raw_supply_zeroed): Likewise.
1611 (regcache::raw_collect): Likewise.
1612 (regcache::raw_collect_integer): Likewise.
1613 * regcache.h (regcache::assert_regnum): Declare.
1614
1615 2017-11-02 Yao Qi <yao.qi@linaro.org>
1616
1617 * regcache.c (regcache::dump): Remove code.
1618
1619 2017-11-02 Yao Qi <yao.qi@linaro.org>
1620
1621 * regcache.c (struct regcache_descr) <sizeof_raw_register_status>:
1622 Remove.
1623 <sizeof_cooked_register_status>: Remove.
1624 (init_regcache_descr): Update.
1625 (regcache::regcache): Use nr_cooked_registers and nr_raw_registers.
1626 (regcache::save): Likewise.
1627 (regcache::dump): Likewise.
1628
1629 2017-11-01 James Bowman <james.bowman@ftdichip.com>
1630
1631 * ft32-tdep.c (ft32_fetch_instruction): New function.
1632 (ft32_analyze_prologue): Use ft32_fetch_instruction().
1633
1634 2017-10-31 Simon Marchi <simon.marchi@polymtl.ca>
1635
1636 * cli/cli-script.c (execute_control_command): Rename to ...
1637 (execute_control_command_1): ... this.
1638 (execute_control_command): New function.
1639
1640 2017-10-31 Simon Marchi <simon.marchi@ericsson.com>
1641
1642 * tracepoint.c (tfind_command): Remove const_cast.
1643
1644 2017-10-30 Mike Gulick <mgulick@mathworks.com>
1645
1646 * Makefile.in (HFILES_NO_SRCDIR): Remove reference to gdb.h.
1647
1648 2017-10-30 Simon Marchi <simon.marchi@ericsson.com>
1649
1650 * common/common-utils.h (in_inclusive_range): New function.
1651 * arm-tdep.c (arm_record_extension_space): Use
1652 in_inclusive_range.
1653 (thumb_record_ld_st_reg_offset): Use in_inclusive_range.
1654 * cris-tdep.c (cris_spec_reg_applicable): Use
1655 in_inclusive_range.
1656
1657 2017-10-30 Pedro Alves <palves@redhat.com>
1658 Simon Marchi <simon.marchi@ericsson.com>
1659
1660 * remote.c (remote_set_syscall_catchpoint): Build a std::string
1661 instead of a gdb::unique_xmalloc_ptr, using string_appendf.
1662
1663 2017-10-30 Pedro Alves <palves@redhat.com>
1664
1665 * common/common-utils.c (string_appendf, string_vappendf): New
1666 functions.
1667 * common/common-utils.h (string_appendf, string_vappendf): New
1668 declarations.
1669 * unittests/common-utils-selftests.c (string_appendf_func)
1670 (test_appendf_func, string_vappendf_wrapper, string_appendf_tests)
1671 (string_vappendf_tests): New functions.
1672 (_initialize_common_utils_selftests): Register "string_appendf" and
1673 "string_vappendf tests".
1674
1675 2017-10-30 Pedro Alves <palves@redhat.com>
1676
1677 * unittests/common-utils-selftests.c (format_func): New typedef.
1678 (string_printf_tests, string_vprintf_tests): Tests factored out
1679 and merged to ...
1680 (test_format_func): ... this new function.
1681 (string_printf_tests, string_vprintf_tests): Reimplement on top of
1682 test_format_func.
1683
1684 2017-10-29 Simon Marchi <simon.marchi@ericsson.com>
1685
1686 * darwin-nat.c: Remove include of gdb.h.
1687
1688 2017-10-29 Simon Marchi <simon.marchi@ericsson.com>
1689
1690 * xtensa-xtregs.c: Fix formatting issues.
1691
1692 2017-10-29 Simon Marchi <simon.marchi@ericsson.com>
1693
1694 * xtensa-xtregs.c (xtensa_regtable_t) <name>: Constify.
1695
1696 2017-10-28 Maksim Dzabraev <dzabraew@gmail.com>
1697
1698 PR python/21213
1699 * python/py-infthread.c (thpy_get_inferior): Increment reference
1700 of inferior before returning it.
1701
1702 2017-10-27 Simon Marchi <simon.marchi@ericsson.com>
1703
1704 * unittests/common-utils-selftests.c (format): Add
1705 ATTRIBUTE_PRINTF.
1706
1707 2017-10-27 Simon Marchi <simon.marchi@polymtl.ca>
1708
1709 * xml-syscall.c (struct syscall_desc): Add constructor.
1710 <name>: Change type to std::string.
1711 (syscall_desc_up): New typedef.
1712 (syscall_desc_p): Remove typeder.
1713 (DEF_VEC_P(syscall_desc_p)): Remove.
1714 (struct syscall_group_desc): Add constructor.
1715 <name>: Change type to std::string.
1716 <syscalls>: Change type to std::vector.
1717 (syscall_group_desc_up): New typedef.
1718 (syscall_group_desc_p): Remove typedef.
1719 (DEF_VEC_P(syscall_group_desc_p)): Remove.
1720 (struct syscalls_info) <syscalls>: Change type to std::vector of
1721 unique_ptr.
1722 <groups>: Likewise.
1723 <my_gdb_datadir>: Change type to std::string.
1724 (syscalls_info_up): New typedef.
1725 (allocate_syscalls_info): Remove.
1726 (syscalls_info_free_syscalls_desc): Remove.
1727 (syscalls_info_free_syscall_group_desc): Remove.
1728 (free_syscalls_info): Remove.
1729 (make_cleanup_free_syscalls_info): Remove.
1730 (syscall_group_create_syscall_group_desc): Adjust.
1731 (syscall_group_add_syscall): Adjust.
1732 (syscall_create_syscall_desc): Adjust.
1733 (syscall_parse_xml): Adjust, use unique_ptr instead of cleanup.
1734 (init_syscalls_info): Adjust.
1735 (syscall_group_get_group_by_name): Adjust.
1736 (xml_get_syscall_number): Adjust.
1737 (xml_get_syscall_name): Adjust.
1738 (xml_list_of_syscalls): Adjust.
1739 (xml_list_syscalls_by_group): Adjust.
1740 (xml_list_of_groups): Adjust.
1741
1742 2017-10-27 Simon Marchi <simon.marchi@ericsson.com>
1743
1744 * probe.h: Don't include gdb_vecs.h.
1745 (DEF_VEC_P (probe_p)): Remove.
1746 (find_probes_in_objfile): Return an std::vector.
1747 * probe.c (find_probes_in_objfile): Likewise.
1748 * breakpoint.c (breakpoint_objfile_data)
1749 <longjmp_probes>: Change type to std::vector.
1750 <exception_probes>: Likewise.
1751 (free_breakpoint_probes): Don't manually free vectors.
1752 (create_longjmp_master_breakpoint): Adjust.
1753 (create_exception_master_breakpoint): Adjust.
1754 * solib-svr4.c (svr4_create_probe_breakpoints): Change
1755 parameter type, adjust.
1756 (svr4_create_solib_event_breakpoints): Adjust.
1757
1758 2017-10-27 Simon Marchi <simon.marchi@ericsson.com>
1759
1760 * breakpoint.c (breakpoint_objfile_data): Initialize fields.
1761 (get_breakpoint_objfile_data): Allocate breakpoint_objfile_data
1762 with new.
1763 (free_breakpoint_probes): Rename to ...
1764 (free_breakpoint_objfile_data): ... this, and call delete on
1765 bp_objfile_data..
1766
1767 2017-10-27 Simon Marchi <simon.marchi@polymtl.ca>
1768
1769 * auto-load.c: Don't include gdb_vecs.h, include algorithm.
1770 (loaded_script_ptr): Remove typedef.
1771 (DEF_VEC_P (loaded_script_ptr)): Remove.
1772 (struct collect_matching_scripts_data): Add constructor.
1773 <scripts_p>: Change type to (pointer to) std::vector.
1774 (collect_matching_scripts_data): Adjust.
1775 (sort_scripts_by_name): Make suitable for std::sort.
1776 (print_scripts): Don't sort vector, adjust to std::vector.
1777 (auto_load_info_scripts): Sort vectors, adjust to std::vector.
1778
1779 2017-10-27 Simon Marchi <simon.marchi@ericsson.com>
1780
1781 * symfile.c (filename_language): Make struct, not typedef. Add
1782 constructor.
1783 <ext>: Change type to std::string.
1784 (DEF_VEC_O (filename_language)): Remove.
1785 (filename_language_table): Change type to std::vector.
1786 (add_filename_language): Adjust.
1787 (set_ext_lang_command): Adjust.
1788 (info_ext_lang_command): Adjust.
1789 (deduce_language_from_filename): Adjust.
1790 (class scoped_restore_filename_language_table): Remove.
1791 (test_filename_language): Use scoped_restore.
1792 (test_set_ext_lang_command): Use scoped_restore, adjust to
1793 std::vector change.
1794
1795 2017-10-27 Simon Marchi <simon.marchi@ericsson.com>
1796
1797 * symfile.c: Include selftest.h.
1798 (class scoped_restore_filename_language_table): New.
1799 (test_filename_language): New test.
1800 (test_set_ext_lang_command): New test.
1801 (_initialize_symfile): Register tests.
1802
1803 2017-10-27 Keith Seitz <keiths@redhat.com>
1804
1805 * breakpoint.c (print_breakpoint_location): Use the symbol saved
1806 in the bp_location, falling back to find_pc_sect_function when
1807 needed.
1808 (add_location_to_breakpoint): Save sal->symbol.
1809 * breakpoint.h (struct bp_location) <symbol>: New field.
1810 * symtab.c (find_function_start_sal): Save the symbol into the SaL.
1811 * symtab.h (struct symtab_and_line) <symbol>: New field.
1812
1813 2017-10-26 Patrick Frants <osscontribute@gmail.com>
1814
1815 PR gdb/13669
1816 * cp-valprint.c (cp_print_value_fields): Use obstack_blank_fast
1817 to rewind obstack.
1818
1819 2017-10-26 Pedro Alves <palves@redhat.com>
1820
1821 * remote.c (remote_async_terminal_ours_p): Delete.
1822 (remote_open_1, remote_terminal_inferior, remote_terminal_ours):
1823 Remove references to 'remote_async_terminal_ours_p'.
1824
1825 2017-10-26 Yao Qi <yao.qi@linaro.org>
1826
1827 * breakpoint.h (regular_breakpoint_inserted_here_p): Remove.
1828
1829 2017-10-26 Yao Qi <yao.qi@linaro.org>
1830
1831 * break-catch-sig.c (signal_catchpoint_breakpoint_hit): Make
1832 aspace const.
1833 * break-catch-syscall.c (breakpoint_hit_catch_syscall):
1834 Likewise.
1835 * breakpoint.c (bpstat_check_location): Remove cast.
1836 (breakpoint_hit_catch_fork): Make aspce const.
1837 (breakpoint_hit_catch_solib): Likewise.
1838 (breakpoint_hit_catch_exec): Likewise.
1839 (breakpoint_hit_ranged_breakpoint): Likewise.
1840 (breakpoint_hit_watchpoint): Likewise.
1841 (base_breakpoint_breakpoint_hit): Likewise.
1842 (bkpt_breakpoint_hit): Likewise.
1843 (dprintf_breakpoint_hit): Likewise.
1844 (tracepoint_breakpoint_hit): Likewise.
1845 * breakpoint.h (breakpoint_ops) <breakpoint_hit>: Likewise.
1846
1847 2017-10-26 Yao Qi <yao.qi@linaro.org>
1848
1849 * breakpoint.c (breakpoint_location_address_match): Change
1850 "struct address_space *" to "const address_space".
1851 (breakpoint_location_address_range_overlap): Likewise.
1852 (breakpoint_here_p): Likewise.
1853 (breakpoint_in_range_p): Likewise.
1854 (moribund_breakpoint_here_p): Likewise.
1855 (bp_location_inserted_here_p): Likewise.
1856 (software_breakpoint_inserted_here_p): Likewise.
1857 (hardware_breakpoint_inserted_here_p): Likewise.
1858 (hardware_watchpoint_inserted_in_range): Likewise.
1859 (bpstat_check_location): Likewise.
1860 (bpstat_stop_status): Likewise.
1861 (breakpoint_address_match): Likewise.
1862 (breakpoint_address_match_range): Likewise.
1863 (breakpoint_location_address_match): Likewise.
1864 (breakpoint_location_address_range_overlap): Likewise.
1865 (insert_single_step_breakpoint): Likewise.
1866 (breakpoint_has_location_inserted_here): Likewise.
1867 (single_step_breakpoint_inserted_here_p): Likewise.
1868 (pc_at_non_inline_function): Likewise.
1869 * breakpoint.h (bpstat_stop_status): Update declaration.
1870 (breakpoint_here_p): Likewise.
1871 (breakpoint_in_range_p): Likewise.
1872 (moribund_breakpoint_here_p): Likewise.
1873 (breakpoint_inserted_here_p): Likewise.
1874 (software_breakpoint_inserted_here_p): Likewise.
1875 (hardware_breakpoint_inserted_here_p): Likewise.
1876 (breakpoint_has_location_inserted_here): Likewise.
1877 (single_step_breakpoint_inserted_here_p): Likewise.
1878 (hardware_watchpoint_inserted_in_range): Likewise.
1879 (breakpoint_address_match): Likewise.
1880 (insert_single_step_breakpoint): Likewise.
1881 (pc_at_non_inline_function): Likewise.
1882 * gdbthread.h (thread_has_single_step_breakpoint_here): Likewise.
1883 * record.c (record_check_stopped_by_breakpoint): Likewise.
1884 * record.h (record_check_stopped_by_breakpoint): Likewise.
1885 * thread.c (thread_has_single_step_breakpoint_here): Likewise.
1886
1887 2017-10-25 Yao Qi <yao.qi@linaro.org>
1888
1889 * aarch32-linux-nat.c (aarch32_gp_regcache_supply): Use
1890 regcache->arch () instead get_regcache_arch.
1891 * aarch64-fbsd-nat.c (aarch64_fbsd_fetch_inferior_registers):
1892 Likewise.
1893 (aarch64_fbsd_store_inferior_registers): Likewise.
1894 * aarch64-linux-nat.c (fetch_gregs_from_thread): Likewise.
1895 (store_gregs_to_thread): Likewise.
1896 (fetch_fpregs_from_thread): Likewise.
1897 (store_fpregs_to_thread): Likewise.
1898 * aarch64-tdep.c (aarch64_extract_return_value): Likewise.
1899 (aarch64_store_return_value): Likewise.
1900 (aarch64_software_single_step): Likewise.
1901 * aix-thread.c (aix_thread_wait): Likewise.
1902 (supply_reg32): Likewise.
1903 (supply_sprs64): Likewise.
1904 (supply_sprs32): Likewise.
1905 (fill_gprs64): Likewise.
1906 (fill_gprs32): Likewise.
1907 (fill_sprs64): Likewise.
1908 (fill_sprs32): Likewise.
1909 (store_regs_user_thread): Likewise.
1910 (store_regs_kernel_thread): Likewise.
1911 * alpha-bsd-nat.c (alphabsd_fetch_inferior_registers): Likewise.
1912 (alphabsd_store_inferior_registers): Likewise.
1913 * alpha-tdep.c (alpha_extract_return_value): Likewise.
1914 (alpha_store_return_value): Likewise.
1915 (alpha_deal_with_atomic_sequence): Likewise.
1916 (alpha_next_pc): Likewise.
1917 (alpha_software_single_step): Likewise.
1918 * amd64-bsd-nat.c (amd64bsd_fetch_inferior_registers): Likewise.
1919 (amd64bsd_store_inferior_registers): Likewise.
1920 * amd64-linux-nat.c (amd64_linux_fetch_inferior_registers):
1921 Likewise.
1922 (amd64_linux_store_inferior_registers): Likewise.
1923 * amd64-nat.c (amd64_supply_native_gregset): Likewise.
1924 (amd64_collect_native_gregset): Likewise.
1925 * amd64-obsd-tdep.c (amd64obsd_supply_uthread): Likewise.
1926 (amd64obsd_collect_uthread): Likewise.
1927 * amd64-tdep.c (amd64_supply_fpregset): Likewise.
1928 (amd64_collect_fpregset): Likewise.
1929 (amd64_supply_fxsave): Likewise.
1930 (amd64_supply_xsave): Likewise.
1931 (amd64_collect_fxsave): Likewise.
1932 (amd64_collect_xsave): Likewise.
1933 * arc-tdep.c (arc_write_pc): Likewise.
1934 * arch-utils.c (default_skip_permanent_breakpoint): Likewise.
1935 * arm-fbsd-nat.c (arm_fbsd_fetch_inferior_registers): Likewise.
1936 (arm_fbsd_store_inferior_registers): Likewise.
1937 * arm-linux-nat.c (fetch_vfp_regs): Likewise.
1938 (store_vfp_regs): Likewise.
1939 (arm_linux_fetch_inferior_registers): Likewise.
1940 (arm_linux_store_inferior_registers): Likewise.
1941 * arm-linux-tdep.c (arm_linux_supply_gregset): Likewise.
1942 (arm_linux_sigreturn_next_pc): Likewise.
1943 (arm_linux_get_next_pcs_syscall_next_pc): Likewise.
1944 * arm-nbsd-nat.c (arm_supply_gregset): Likewise.
1945 (fetch_register): Likewise.
1946 (store_register): Likewise.
1947 * arm-tdep.c (arm_is_thumb): Likewise.
1948 (displaced_in_arm_mode): Likewise.
1949 (bx_write_pc): Likewise.
1950 (arm_get_next_pcs_addr_bits_remove): Likewise.
1951 (arm_software_single_step): Likewise.
1952 (arm_extract_return_value): Likewise.
1953 (arm_store_return_value): Likewise.
1954 (arm_write_pc): Likewise.
1955 * bfin-tdep.c (bfin_extract_return_value): Likewise.
1956 * bsd-uthread.c (bsd_uthread_fetch_registers): Likewise.
1957 (bsd_uthread_store_registers): Likewise.
1958 * core-regset.c (fetch_core_registers): Likewise.
1959 * corelow.c (get_core_registers): Likewise.
1960 * cris-tdep.c (cris_store_return_value): Likewise.
1961 (cris_extract_return_value): Likewise.
1962 (find_step_target): Likewise.
1963 (find_step_target): Likewise.
1964 (cris_software_single_step): Likewise.
1965 * ctf.c (ctf_fetch_registers): Likewise.
1966 * darwin-nat.c (cancel_breakpoint): Likewise.
1967 * fbsd-tdep.c (fbsd_collect_thread_registers): Likewise.
1968 * frv-tdep.c (frv_extract_return_value): Likewise.
1969 * ft32-tdep.c (ft32_store_return_value): Likewise.
1970 (ft32_extract_return_value): Likewise.
1971 * go32-nat.c (fetch_register): Likewise.
1972 (go32_fetch_registers): Likewise.
1973 (go32_store_registers): Likewise.
1974 (store_register): Likewise.
1975 * h8300-tdep.c (h8300_extract_return_value): Likewise.
1976 (h8300_store_return_value): Likewise.
1977 * hppa-linux-nat.c (fetch_register): Likewise.
1978 (store_register): Likewise.
1979 (hppa_linux_fetch_inferior_registers): Likewise.
1980 (hppa_linux_store_inferior_registers): Likewise.
1981 * i386-darwin-nat.c (i386_darwin_fetch_inferior_registers): Likewise.
1982 (i386_darwin_store_inferior_registers): Likewise.
1983 * i386-gnu-nat.c (gnu_fetch_registers): Likewise.
1984 (gnu_store_registers): Likewise.
1985 * i386-linux-nat.c (fetch_register): Likewise.
1986 (store_register): Likewise.
1987 (supply_gregset): Likewise.
1988 (fill_gregset): Likewise.
1989 (i386_linux_fetch_inferior_registers): Likewise.
1990 (i386_linux_store_inferior_registers): Likewise.
1991 (i386_linux_resume): Likewise.
1992 * i386-linux-tdep.c (i386_linux_get_syscall_number_from_regcache):
1993 Likewise.
1994 * i386-nto-tdep.c (i386nto_supply_gregset): Likewise.
1995 * i386-obsd-nat.c (i386obsd_supply_pcb): Likewise.
1996 * i386-obsd-tdep.c (i386obsd_supply_uthread): Likewise.
1997 (i386obsd_collect_uthread): Likewise.
1998 * i386-tdep.c (i386_mmx_regnum_to_fp_regnum): Likewise.
1999 (i386_supply_gregset): Likewise.
2000 (i386_collect_gregset): Likewise.
2001 (i386_supply_fpregset): Likewise.
2002 (i386_collect_fpregset): Likewise.
2003 (i386_mpx_bd_base): Likewise.
2004 * i386-v4-nat.c (supply_fpregset): Likewise.
2005 (fill_fpregset): Likewise.
2006 * i387-tdep.c (i387_supply_fsave): Likewise.
2007 (i387_collect_fsave): Likewise.
2008 (i387_supply_fxsave): Likewise.
2009 (i387_collect_fxsave): Likewise.
2010 (i387_supply_xsave): Likewise.
2011 (i387_collect_xsave): Likewise.
2012 * ia64-linux-nat.c (ia64_linux_fetch_registers): Likewise.
2013 (ia64_linux_store_registers): Likewise.
2014 * ia64-tdep.c (ia64_access_rse_reg): Likewise.
2015 (ia64_extract_return_value): Likewise.
2016 (ia64_store_return_value): Likewise.
2017 (find_func_descr): Likewise.
2018 * inf-child.c (inf_child_fetch_inferior_registers): Likewise.
2019 * inf-ptrace.c (inf_ptrace_fetch_registers): Likewise.
2020 (inf_ptrace_store_registers): Likewise.
2021 * infrun.c (use_displaced_stepping): Likewise.
2022 (displaced_step_prepare_throw): Likewise.
2023 (resume): Likewise.
2024 (proceed): Likewise.
2025 (do_target_wait): Likewise.
2026 (adjust_pc_after_break): Likewise.
2027 (handle_inferior_event_1): Likewise.
2028 (handle_signal_stop): Likewise.
2029 (save_infcall_suspend_state): Likewise.
2030 (restore_infcall_suspend_state): Likewise.
2031 * iq2000-tdep.c (iq2000_extract_return_value): Likewise.
2032 * jit.c (jit_frame_prev_register): Likewise.
2033 * linux-nat.c (save_stop_reason): Likewise.
2034 (linux_nat_wait_1): Likewise.
2035 (resume_stopped_resumed_lwps): Likewise.
2036 * linux-record.c (record_linux_sockaddr): Likewise.
2037 (record_linux_msghdr): Likewise.
2038 (record_linux_system_call): Likewise.
2039 * linux-tdep.c (linux_collect_thread_registers): Likewise.
2040 * lm32-tdep.c (lm32_extract_return_value): Likewise.
2041 (lm32_store_return_value): Likewise.
2042 * m32c-tdep.c (m32c_read_flg): Likewise.
2043 (m32c_pseudo_register_read): Likewise.
2044 (m32c_pseudo_register_write): Likewise.
2045 * m32r-linux-tdep.c (m32r_linux_supply_gregset): Likewise.
2046 (m32r_linux_collect_gregset): Likewise.
2047 * m32r-tdep.c (m32r_store_return_value): Likewise.
2048 (m32r_extract_return_value): Likewise.
2049 * m68k-bsd-nat.c (m68kbsd_supply_fpregset): Likewise.
2050 (m68kbsd_collect_fpregset): Likewise.
2051 * m68k-bsd-tdep.c (m68kbsd_supply_fpregset): Likewise.
2052 * m68k-linux-nat.c (fetch_register): Likewise.
2053 (old_fetch_inferior_registers): Likewise.
2054 (old_store_inferior_registers): Likewise.
2055 (store_regs): Likewise.
2056 * m68k-tdep.c (m68k_svr4_extract_return_value): Likewise.
2057 (m68k_svr4_store_return_value): Likewise.
2058 * m88k-tdep.c (m88k_store_arguments): Likewise.
2059 * mi/mi-main.c (mi_cmd_data_list_changed_registers): Likewise.
2060 (mi_cmd_data_write_register_values): Likewise.
2061 * mips-fbsd-nat.c (mips_fbsd_fetch_inferior_registers): Likewise.
2062 (mips_fbsd_store_inferior_registers): Likewise.
2063 * mips-fbsd-tdep.c (mips_fbsd_supply_fpregs): Likewise.
2064 (mips_fbsd_supply_gregs): Likewise.
2065 (mips_fbsd_collect_fpregs): Likewise.
2066 (mips_fbsd_collect_gregs): Likewise.
2067 (mips_fbsd_supply_fpregset): Likewise.
2068 (mips_fbsd_collect_fpregset): Likewise.
2069 (mips_fbsd_supply_gregset): Likewise.
2070 (mips_fbsd_collect_gregset): Likewise.
2071 * mips-linux-nat.c (supply_gregset): Likewise.
2072 (fill_gregset): Likewise.
2073 (supply_fpregset): Likewise.
2074 (fill_fpregset): Likewise.
2075 * mips-linux-tdep.c (mips_supply_gregset): Likewise.
2076 (mips_fill_gregset): Likewise.
2077 (mips_supply_fpregset): Likewise.
2078 (mips_fill_fpregset): Likewise.
2079 (mips64_supply_gregset): Likewise.
2080 (micromips_linux_sigframe_validate): Likewise.
2081 * mips-nbsd-nat.c (mipsnbsd_fetch_inferior_registers): Likewise.
2082 (mipsnbsd_fetch_inferior_registers): Likewise.
2083 (mipsnbsd_store_inferior_registers): Likewise.
2084 * mips-nbsd-tdep.c (mipsnbsd_supply_fpregset): Likewise.
2085 (mipsnbsd_supply_gregset): Likewise.
2086 (mipsnbsd_iterate_over_regset_sections): Likewise.
2087 (mipsnbsd_supply_reg): Likewise.
2088 (mipsnbsd_supply_fpreg): Likewise.
2089 * mips-tdep.c (mips_in_frame_stub): Likewise.
2090 (mips_dummy_id): Likewise.
2091 (is_octeon_bbit_op): Likewise.
2092 (micromips_bc1_pc): Likewise.
2093 (extended_mips16_next_pc): Likewise.
2094 (mips16_next_pc): Likewise.
2095 (deal_with_atomic_sequence): Likewise.
2096 * moxie-tdep.c (moxie_process_readu): Likewise.
2097 * nios2-tdep.c (nios2_get_next_pc): Likewise.
2098 * nto-procfs.c (procfs_store_registers): Likewise.
2099 * ppc-fbsd-nat.c (ppcfbsd_fetch_inferior_registers): Likewise.
2100 (ppcfbsd_store_inferior_registers): Likewise.
2101 * ppc-linux-nat.c (fetch_vsx_register): Likewise.
2102 (fetch_altivec_register): Likewise.
2103 (get_spe_registers): Likewise.
2104 (fetch_spe_register): Likewise.
2105 (fetch_altivec_registers): Likewise.
2106 (fetch_all_gp_regs): Likewise.
2107 (fetch_all_fp_regs): Likewise.
2108 (store_vsx_register): Likewise.
2109 (store_altivec_register): Likewise.
2110 (set_spe_registers): Likewise.
2111 (store_spe_register): Likewise.
2112 (store_altivec_registers): Likewise.
2113 (store_all_gp_regs): Likewise.
2114 (store_all_fp_regs): Likewise.
2115 * ppc-linux-tdep.c (ppc_linux_supply_gregset): Likewise.
2116 (ppc_linux_collect_gregset): Likewise.
2117 (ppc_canonicalize_syscall): Likewise.
2118 (ppc_linux_record_signal): Likewise.
2119 (ppu2spu_prev_register): Likewise.
2120 * ppc-nbsd-nat.c (ppcnbsd_supply_pcb): Likewise.
2121 * ppc-obsd-nat.c (ppcobsd_fetch_registers): Likewise.
2122 (ppcobsd_store_registers): Likewise.
2123 * ppc-ravenscar-thread.c (ppc_ravenscar_generic_fetch_registers):
2124 Likewise.
2125 (ppc_ravenscar_generic_store_registers): Likewise.
2126 * procfs.c (procfs_fetch_registers): Likewise.
2127 (procfs_store_registers): Likewise.
2128 * ravenscar-thread.c (ravenscar_fetch_registers): Likewise.
2129 (ravenscar_store_registers): Likewise.
2130 (ravenscar_prepare_to_store): Likewise.
2131 * record-btrace.c (record_btrace_fetch_registers): Likewise.
2132 * record-full.c (record_full_wait_1): Likewise.
2133 (record_full_registers_change): Likewise.
2134 (record_full_store_registers): Likewise.
2135 (record_full_core_fetch_registers): Likewise.
2136 (record_full_save): Likewise.
2137 (record_full_goto_insn): Likewise.
2138 * regcache.c (regcache_register_size): Likewise.
2139 (get_regcache_arch): Remove.
2140 (regcache_read_pc): Likewise.
2141 * regcache.h (get_regcache_arch): Remove.
2142 * remote-sim.c (gdbsim_fetch_register): Likewise.
2143 (gdbsim_store_register): Likewise.
2144 * remote.c (fetch_register_using_p): Likewise.
2145 (send_g_packet): Likewise.
2146 (remote_prepare_to_store): Likewise.
2147 (store_registers_using_G): Likewise.
2148 * reverse.c (save_bookmark_command): Likewise.
2149 (goto_bookmark_command): Likewise.
2150 * rs6000-aix-tdep.c (branch_dest): Likewise.
2151 * rs6000-nat.c (rs6000_ptrace64): Likewise.
2152 (fetch_register): Likewise.
2153 * rs6000-tdep.c (ppc_supply_reg): Likewise.
2154 (ppc_collect_reg): Likewise.
2155 (ppc_collect_gregset): Likewise.
2156 (ppc_collect_fpregset): Likewise.
2157 (ppc_collect_vsxregset): Likewise.
2158 (ppc_collect_vrregset): Likewise.
2159 (ppc_displaced_step_hw_singlestep): Likewise.
2160 (rs6000_pseudo_register_read): Likewise.
2161 (rs6000_pseudo_register_write): Likewise.
2162 * s390-linux-nat.c (supply_gregset): Likewise.
2163 (fill_gregset): Likewise.
2164 (s390_linux_fetch_inferior_registers): Likewise.
2165 * s390-linux-tdep.c (s390_write_pc): Likewise.
2166 (s390_software_single_step): Likewise.
2167 (s390_all_but_pc_registers_record): Likewise.
2168 (s390_linux_syscall_record): Likewise.
2169 * sentinel-frame.c (sentinel_frame_prev_arch): Likewise.
2170 * sh-nbsd-nat.c (shnbsd_fetch_inferior_registers): Likewise.
2171 (shnbsd_store_inferior_registers): Likewise.
2172 * sh-tdep.c (sh_extract_return_value_nofpu): Likewise.
2173 (sh_extract_return_value_fpu): Likewise.
2174 (sh_store_return_value_nofpu): Likewise.
2175 (sh_corefile_supply_regset): Likewise.
2176 (sh_corefile_collect_regset): Likewise.
2177 * sh64-tdep.c (sh64_extract_return_value): Likewise.
2178 (sh64_store_return_value): Likewise.
2179 * sparc-linux-tdep.c (sparc32_linux_collect_core_fpregset): Likewise.
2180 * sparc-nat.c (sparc_fetch_inferior_registers): Likewise.
2181 (sparc_store_inferior_registers): Likewise.
2182 * sparc-ravenscar-thread.c (register_in_thread_descriptor_p): Likewise.
2183 (sparc_ravenscar_prepare_to_store): Likewise.
2184 * sparc-tdep.c (sparc32_store_arguments): Likewise.
2185 (sparc_analyze_control_transfer): Likewise.
2186 (sparc_step_trap): Likewise.
2187 (sparc_software_single_step): Likewise.
2188 (sparc32_gdbarch_init): Likewise.
2189 (sparc_supply_rwindow): Likewise.
2190 (sparc_collect_rwindow): Likewise.
2191 * sparc64-linux-tdep.c (sparc64_linux_collect_core_fpregset): Likewise.
2192 * sparc64-nbsd-nat.c (sparc64nbsd_supply_gregset): Likewise.
2193 (sparc64nbsd_collect_gregset): Likewise.
2194 (sparc64nbsd_supply_fpregset): Likewise.
2195 (sparc64nbsd_collect_fpregset): Likewise.
2196 * sparc64-tdep.c (sparc64_store_arguments): Likewise.
2197 (sparc64_supply_gregset): Likewise.
2198 (sparc64_collect_gregset): Likewise.
2199 (sparc64_supply_fpregset): Likewise.
2200 (sparc64_collect_fpregset): Likewise.
2201 * spu-linux-nat.c (spu_fetch_inferior_registers): Likewise.
2202 * spu-tdep.c (spu_unwind_sp): Likewise.
2203 (spu2ppu_prev_register): Likewise.
2204 (spu_memory_remove_breakpoint): Likewise.
2205 * stack.c (return_command): Likewise.
2206 * tic6x-tdep.c (tic6x_extract_signed_field): Likewise.
2207 * tracefile-tfile.c (tfile_fetch_registers): Likewise.
2208 * tracefile.c (trace_save_ctf): Likewise.
2209 * windows-nat.c (do_windows_fetch_inferior_registers): Likewise.
2210 (do_windows_store_inferior_registers): Likewise.
2211 (windows_resume): Likewise.
2212 * xtensa-linux-nat.c (fill_gregset): Likewise.
2213 (supply_gregset_reg): Likewise.
2214 * xtensa-tdep.c (xtensa_register_write_masked): Likewise.
2215 (xtensa_register_read_masked): Likewise.
2216 (xtensa_supply_gregset): Likewise.
2217 (xtensa_extract_return_value): Likewise.
2218 (xtensa_store_return_value): Likewise.
2219
2220 2017-10-25 Ulrich Weigand <uweigand@de.ibm.com>
2221
2222 * doublest.c (floatformat_from_string): New function.
2223 * doublest.h (floatformat_from_string): Add prototype.
2224
2225 * std-operator.def (OP_DOUBLE, OP_DECFLOAT): Remove, replace by ...
2226 (OP_FLOAT): ... this.
2227 * expression.h: Do not include "doublest.h".
2228 (union exp_element): Replace doubleconst and decfloatconst by
2229 new element floatconst.
2230 * ada-lang.c (resolve_subexp): Handle OP_FLOAT instead of OP_DOUBLE.
2231 (ada_evaluate_subexp): Likewise.
2232 * eval.c (evaluate_subexp_standard): Handle OP_FLOAT instead of
2233 OP_DOUBLE and OP_DECFLOAT.
2234 * expprint.c (print_subexp_standard): Likewise.
2235 (dump_subexp_body_standard): Likewise.
2236 * breakpoint.c (watchpoint_exp_is_const): Likewise.
2237
2238 * parse.c: Include "dfp.h".
2239 (write_exp_elt_dblcst, write_exp_elt_decfloatcst): Remove.
2240 (write_exp_elt_floatcst): New function.
2241 (operator_length_standard): Handle OP_FLOAT instead of OP_DOUBLE
2242 and OP_DECFLOAT.
2243 (operator_check_standard): Likewise.
2244 (parse_float): Do not accept suffix. Take type as input. Return bool.
2245 Return target format buffer instead of host DOUBLEST.
2246 Use floatformat_from_string and decimal_from_string to parse
2247 either binary or decimal floating-point types.
2248 (parse_c_float): Remove.
2249 * parser-defs.h: Do not include "doublest.h".
2250 (write_exp_elt_dblcst, write_exp_elt_decfloatcst): Remove.
2251 (write_exp_elt_floatcst): Add prototype.
2252 (parse_float): Update prototype.
2253 (parse_c_float): Remove.
2254
2255 * c-exp.y: Do not include "dfp.h".
2256 (typed_val_float): Use byte buffer instead of DOUBLEST.
2257 (typed_val_decfloat): Remove.
2258 (DECFLOAT): Remove.
2259 (FLOAT): Use OP_FLOAT and write_exp_elt_floatcst.
2260 (parse_number): Update to new parse_float interface.
2261 Parse suffixes and determine type before calling parse_float.
2262 Handle decimal and binary FP types the same way.
2263
2264 * d-exp.y (typed_val_float): Use byte buffer instead of DOUBLEST.
2265 (FLOAT_LITERAL): Use OP_FLOAT and write_exp_elt_floatcst.
2266 (parse_number): Update to new parse_float interface.
2267 Parse suffixes and determine type before calling parse_float.
2268
2269 * f-exp.y: Replace dval by typed_val_float.
2270 (FLOAT): Use OP_FLOAT and write_exp_elt_floatcst.
2271 (parse_number): Use parse_float instead of atof.
2272
2273 * go-exp.y (typed_val_float): Use byte buffer instead of DOUBLEST.
2274 (parse_go_float): Remove.
2275 (FLOAT): Use OP_FLOAT and write_exp_elt_floatcst.
2276 (parse_number): Call parse_float instead of parse_go_float.
2277 Parse suffixes and determine type before calling parse_float.
2278
2279 * p-exp.y (typed_val_float): Use byte buffer instead of DOUBLEST.
2280 (FLOAT): Use OP_FLOAT and write_exp_elt_floatcst.
2281 (parse_number): Update to new parse_float interface.
2282 Parse suffixes and determine type before calling parse_float.
2283
2284 * m2-exp.y: Replace dval by byte buffer val.
2285 (FLOAT): Use OP_FLOAT and write_exp_elt_floatcst.
2286 (parse_number): Call parse_float instead of atof.
2287
2288 * rust-exp.y (typed_val_float): Use byte buffer instead of DOUBLEST.
2289 (lex_number): Call parse_float instead of strtod.
2290 (ast_dliteral): Use OP_FLOAT instead of OP_DOUBLE.
2291 (convert_ast_to_expression): Handle OP_FLOAT instead of OP_DOUBLE.
2292 Use write_exp_elt_floatcst.
2293 (unit_testing): Remove static variable.
2294 (rust_type): Do not check unit_testing.
2295 (rust_lex_tests): Do not set uint_testing. Set up dummy rust_parser.
2296
2297 * ada-exp.y (type_float, type_double): Remove.
2298 (typed_val_float): Use byte buffer instead of DOUBLEST.
2299 (FLOAT): Use OP_FLOAT and write_exp_elt_floatcst.
2300 * ada-lex.l (processReal): Use parse_float instead of sscanf.
2301
2302 2017-10-25 Alan Hayward <alan.hayward@arm.com>
2303
2304 * aarch64-tdep.h (enum aarch64_regnum): Remove.
2305 * arch/aarch64.h: New file.
2306
2307 2017-10-24 Ulrich Weigand <uweigand@de.ibm.com>
2308
2309 * dfp.h (decimal_from_string): Use const reference for argument.
2310 * dfp.c (decimal_from_string): Likewise.
2311
2312 2017-10-24 Ulrich Weigand <uweigand@de.ibm.com>
2313
2314 * i387-tdep.c (print_i387_value): Use floatformat_to_string.
2315 * sh64-tdep.c (sh64_do_fp_register): Likewise.
2316 * mips-tdep.c (mips_print_fp_register): Likewise.
2317
2318 2017-10-24 Ulrich Weigand <uweigand@de.ibm.com>
2319
2320 * common/format.h (enum argclass): Replace decfloat_arg by
2321 dec32float_arg, dec64float_arg, and dec128float_arg.
2322 * common/format.c (parse_format_string): Update to return
2323 new decimal float argument classes.
2324
2325 * printcmd.c (printf_decfloat): Rename to ...
2326 (printf_floating): ... this. Add argclass argument, and use it
2327 instead of parsing the format string again. Add support for
2328 binary floating-point values, using floatformat_to_string.
2329 Convert value to the target format if it doesn't already match.
2330 (ui_printf): Call printf_floating instead of printf_decfloat,
2331 also for double_arg / long_double_arg. Pass argclass.
2332
2333 * dfp.c (decimal_to_string): Add format string argument.
2334 * dfp.h (decimal_to_string): Likewise.
2335
2336 * doublest.c (floatformat_to_string): Add format string argument.
2337 * doublest.h (floatformat_to_string): Likewise.
2338
2339 2017-10-24 Ulrich Weigand <uweigand@de.ibm.com>
2340
2341 * doublest.c (floatformat_precision): New routine.
2342 (floatformat_to_string): Likewise.
2343 * doublest.c (floatformat_to_string): Add prototype.
2344
2345 * printcmd.c (print_scalar_formatted): Only call print_floating
2346 on floating-point types.
2347 * valprint.c: Do not include "floatformat.h".
2348 (generic_val_print_decfloat): Remove.
2349 (generic_val_print): Call generic_val_print_float for both
2350 TYPE_CODE_FLT and TYPE_CODE_DECFLOAT.
2351 (print_floating): Use floatformat_to_string. Handle decimal float.
2352 (print_decimal_floating): Remove, merge into floatformat_to_string.
2353 * value.h (print_decimal_floating): Remove.
2354
2355 * Makefile.in: Do not build doublest.c with -Wformat-nonliteral.
2356
2357 2017-10-24 Ulrich Weigand <uweigand@de.ibm.com>
2358
2359 * buildsym.c (end_symtab_get_static_block): Use std::stable_sort.
2360
2361 2017-10-21 Simon Marchi <simon.marchi@ericsson.com>
2362
2363 * memattr.h: Don't include vec.h.
2364 (struct mem_attrib): Initialize fields.
2365 <unknown>: New static method.
2366 (struct mem_region): Add constructors, operator<, initialize
2367 fields.
2368 * memattr.c: Include algorithm.
2369 (default_mem_attrib, unknown_mem_attrib): Remove.
2370 (user_mem_region_list): New global.
2371 (target_mem_region_list, mem_region_list): Change type to
2372 std::vector<mem_region>.
2373 (mem_use_target): Now a function.
2374 (target_mem_regions_valid): Change type to bool.
2375 (mem_region_lessthan, mem_region_cmp, mem_region_init): Remove.
2376 (require_user_regions): Adjust.
2377 (require_target_regions): Adjust.
2378 (create_mem_region): Adjust.
2379 (lookup_mem_region): Adjust.
2380 (invalidate_target_mem_regions): Adjust.
2381 (mem_clear): Rename to...
2382 (user_mem_clear): ... this, and adjust.
2383 (mem_command): Adjust.
2384 (info_mem_command): Adjust.
2385 (mem_enable, enable_mem_command, mem_disable,
2386 disable_mem_command): Adjust.
2387 (mem_delete): Adjust.
2388 (delete_mem_command): Adjust.
2389 * memory-map.h (parse_memory_map): Return an std::vector.
2390 * memory-map.c (parse_memory_map): Likewise.
2391 (struct memory_map_parsing_data): Add constructor.
2392 <memory_map>: Point to std::vector.
2393 (memory_map_start_memory): Adjust.
2394 (memory_map_end_memory): Adjust.
2395 (memory_map_end_property): Adjust.
2396 (clear_result): Remove.
2397 * remote.c (remote_memory_map): Return an std::vector.
2398 * target-debug.h (target_debug_print_VEC_mem_region_s__p):
2399 Remove.
2400 (target_debug_print_mem_region_vector): New.
2401 * target-delegates.c: Regenerate.
2402 * target.h (mem_region_vector): New typedef.
2403 (to_memory_map): Return mem_region_vector.
2404 (target_memory_map): Return an std::vector.
2405 * target.c (target_memory_map): Return an std::vector.
2406 (flash_erase_command): Adjust.
2407
2408 2017-10-21 Simon Marchi <simon.marchi@ericsson.com>
2409
2410 * memory-map.c (struct memory_map_parsing_data) <property_name>:
2411 Change type to std::string.
2412 (memory_map_start_property): Adjust.
2413 (memory_map_end_property): Adjust.
2414
2415 2017-10-21 Simon Marchi <simon.marchi@polymtl.ca>
2416
2417 * infrun.h: Include common/byte-vector.h.
2418 (struct displaced_step_closure): New struct.
2419 (struct buf_displaced_step_closure): New struct.
2420 * infrun.c (displaced_step_closure::~displaced_step_closure):
2421 Provide default implementation.
2422 (displaced_step_clear): Deallocate step closure with delete.
2423 * aarch64-tdep.c (displaced_step_closure): Rename to ...
2424 (aarch64_displaced_step_closure): ... this, extend
2425 displaced_step_closure.
2426 (aarch64_displaced_step_data) <dsc>: Change type to
2427 aarch64_displaced_step_closure.
2428 (aarch64_displaced_step_copy_insn): Adjust to type change, use
2429 unique_ptr.
2430 (aarch64_displaced_step_fixup): Add cast for displaced step
2431 closure.
2432 * amd64-tdep.c (displaced_step_closure): Rename to ...
2433 (amd64_displaced_step_closure): ... this, extend
2434 displaced_step_closure.
2435 <insn_buf>: Change type to std::vector<gdb_byte>.
2436 <max_len>: Remove.
2437 (fixup_riprel): Change type of DSC parameter, adjust to type
2438 change of insn_buf.
2439 (fixup_displaced_copy): Change type of DSC parameter.
2440 (amd64_displaced_step_copy_insn): Instantiate
2441 amd64_displaced_step_closure.
2442 (amd64_displaced_step_fixup): Add cast for closure type, adjust
2443 to type change of insn_buf.
2444 * arm-linux-tdep.c (arm_linux_cleanup_svc): Change type of
2445 parameter DSC.
2446 (arm_linux_copy_svc): Likewise.
2447 (cleanup_kernel_helper_return): Likewise.
2448 (arm_catch_kernel_helper_return): Likewise.
2449 (arm_linux_displaced_step_copy_insn): Instantiate
2450 arm_displaced_step_closure.
2451 * arm-tdep.c (arm_pc_is_thumb): Add cast for closure.
2452 (displaced_read_reg): Change type of parameter DSC.
2453 (branch_write_pc): Likewise.
2454 (load_write_pc): Likewise.
2455 (alu_write_pc): Likewise.
2456 (displaced_write_reg): Likewise.
2457 (arm_copy_unmodified): Likewise.
2458 (thumb_copy_unmodified_32bit): Likewise.
2459 (thumb_copy_unmodified_16bit): Likewise.
2460 (cleanup_preload): Likewise.
2461 (install_preload): Likewise.
2462 (arm_copy_preload): Likewise.
2463 (thumb2_copy_preload): Likewise.
2464 (install_preload_reg): Likewise.
2465 (arm_copy_preload_reg): Likewise.
2466 (cleanup_copro_load_store): Likewise.
2467 (install_copro_load_store): Likewise.
2468 (arm_copy_copro_load_store) Likewise.
2469 (thumb2_copy_copro_load_store): Likewise.
2470 (cleanup_branch): Likewise.
2471 (install_b_bl_blx): Likewise.
2472 (arm_copy_b_bl_blx): Likewise.
2473 (thumb2_copy_b_bl_blx): Likewise.
2474 (thumb_copy_b): Likewise.
2475 (install_bx_blx_reg): Likewise.
2476 (arm_copy_bx_blx_reg): Likewise.
2477 (thumb_copy_bx_blx_reg): Likewise.
2478 (cleanup_alu_imm): Likewise.
2479 (arm_copy_alu_imm): Likewise.
2480 (thumb2_copy_alu_imm): Likewise.
2481 (cleanup_alu_reg): Likewise.
2482 (install_alu_reg): Likewise.
2483 (arm_copy_alu_reg): Likewise.
2484 (thumb_copy_alu_reg): Likewise.
2485 (cleanup_alu_shifted_reg): Likewise.
2486 (install_alu_shifted_reg): Likewise.
2487 (arm_copy_alu_shifted_reg): Likewise.
2488 (cleanup_load): Likewise.
2489 (cleanup_store): Likewise.
2490 (arm_copy_extra_ld_st): Likewise.
2491 (install_load_store): Likewise.
2492 (thumb2_copy_load_literal): Likewise.
2493 (thumb2_copy_load_reg_imm): Likewise.
2494 (arm_copy_ldr_str_ldrb_strb): Likewise.
2495 (cleanup_block_load_all): Likewise.
2496 (cleanup_block_store_pc): Likewise.
2497 (cleanup_block_load_pc): Likewise.
2498 (arm_copy_block_xfer): Likewise.
2499 (thumb2_copy_block_xfer): Likewise.
2500 (cleanup_svc): Likewise.
2501 (install_svc): Likewise.
2502 (arm_copy_svc): Likewise.
2503 (thumb_copy_svc): Likewise.
2504 (arm_copy_undef): Likewise.
2505 (thumb_32bit_copy_undef): Likewise.
2506 (arm_copy_unpred): Likewise.
2507 (arm_decode_misc_memhint_neon): Likewise.
2508 (arm_decode_unconditional): Likewise.
2509 (arm_decode_miscellaneous): Likewise.
2510 (arm_decode_dp_misc): Likewise.
2511 (arm_decode_ld_st_word_ubyte): Likewise.
2512 (arm_decode_media): Likewise.
2513 (arm_decode_b_bl_ldmstm): Likewise.
2514 (arm_decode_ext_reg_ld_st): Likewise.
2515 (thumb2_decode_dp_shift_reg): Likewise.
2516 (thumb2_decode_ext_reg_ld_st): Likewise.
2517 (arm_decode_svc_copro): Likewise.
2518 (thumb2_decode_svc_copro): Likewise.
2519 (install_pc_relative): Likewise.
2520 (thumb_copy_pc_relative_16bit): Likewise.
2521 (thumb_decode_pc_relative_16bit): Likewise.
2522 (thumb_copy_pc_relative_32bit): Likewise.
2523 (thumb_copy_16bit_ldr_literal): Likewise.
2524 (thumb_copy_cbnz_cbz): Likewise.
2525 (thumb2_copy_table_branch): Likewise.
2526 (cleanup_pop_pc_16bit_all): Likewise.
2527 (thumb_copy_pop_pc_16bit): Likewise.
2528 (thumb_process_displaced_16bit_insn): Likewise.
2529 (decode_thumb_32bit_ld_mem_hints): Likewise.
2530 (thumb_process_displaced_32bit_insn): Likewise.
2531 (thumb_process_displaced_insn): Likewise.
2532 (arm_process_displaced_insn): Likewise.
2533 (arm_displaced_init_closure): Likewise.
2534 (arm_displaced_step_fixup): Add cast for closure.
2535 * arm-tdep.h: Include infrun.h.
2536 (displaced_step_closure): Rename to ...
2537 (arm_displaced_step_closure): ... this, extend
2538 displaced_step_closure.
2539 <u::svc::copy_svc_os>: Change type of parameter DSC.
2540 <cleanup>: Likewise.
2541 (arm_process_displaced_insn): Likewise.
2542 (arm_displaced_init_closure): Likewise.
2543 (displaced_read_reg): Likewise.
2544 (displaced_write_reg): Likewise.
2545 * i386-linux-tdep.c (i386_linux_displaced_step_copy_insn):
2546 Adjust.
2547 * i386-tdep.h: Include infrun.h.
2548 (i386_displaced_step_closure): New typedef.
2549 * i386-tdep.c (i386_displaced_step_copy_insn): Use
2550 i386_displaced_step_closure.
2551 (i386_displaced_step_fixup): Adjust.
2552 * rs6000-tdep.c (ppc_displaced_step_closure): New typedef.
2553 (ppc_displaced_step_copy_insn): Use ppc_displaced_step_closure
2554 and unique_ptr.
2555 (ppc_displaced_step_fixup): Adjust.
2556 * s390-linux-tdep.c (s390_displaced_step_closure): New typedef.
2557 (s390_displaced_step_copy_insn): Use s390_displaced_step_closure
2558 and unique_ptr.
2559 (s390_displaced_step_fixup): Adjust.
2560
2561 2017-10-21 Simon Marchi <simon.marchi@polymtl.ca>
2562
2563 * interps.h (interp_resume, interp_suspend, interp_set_temp):
2564 Remove declarations.
2565
2566 2017-10-20 Tom Tromey <tom@tromey.com>
2567
2568 * gdb_bfd.c (struct gdb_bfd_data) <included_bfds>: Now a
2569 std::vector.
2570 (gdb_bfd_record_inclusion): Update.
2571 (bfdp): Remove typedef.
2572
2573 2017-10-20 Tom Tromey <tom@tromey.com>
2574
2575 * gdb_bfd.c (gdb_bfd_ref): Use new.
2576 (struct gdb_bfd_data): Add constructor, destructor, and member
2577 initializers.
2578 (gdb_bfd_unref): Use delete.
2579
2580 2017-10-20 Tom Tromey <tom@tromey.com>
2581
2582 * exec.c (exec_file_attach): Use new_bfd_ref.
2583 * symfile-mem.c (symbol_file_add_from_memory): Use new_bfd_ref.
2584 * gdb_bfd.c (gdb_bfd_open, gdb_bfd_fopen, gdb_bfd_openr)
2585 (gdb_bfd_openw, gdb_bfd_openr_iovec, gdb_bfd_fdopenr): Use
2586 new_bfd_ref.
2587 * gdb_bfd.h (new_bfd_ref): New function.
2588
2589 2017-10-20 Pedro Alves <palves@redhat.com>
2590
2591 * main.c (captured_command_loop): Add attribute noinline.
2592
2593 2017-10-19 Simon Marchi <simon.marchi@ericsson.com>
2594
2595 * interps.c (struct interp_factory): Add constructor.
2596 (interp_factory_p): Remove typedef.
2597 (DEF_VEC_P(interp_factory_p)): Remove.
2598 (interpreter_factories): Change type to std::vector.
2599 (interp_factory_register): Adjust.
2600 (interp_lookup): Adjust.
2601 (interpreter_completer): Adjust.
2602
2603 2017-10-19 Tom Tromey <tom@tromey.com>
2604
2605 * break-catch-syscall.c (catch_syscall_completer): Use
2606 std::string, gdb::unique_xmalloc_ptr.
2607
2608 2017-10-19 Tom Tromey <tom@tromey.com>
2609
2610 * infcall.c (call_function_by_hand_dummy): Use std::string.
2611
2612 2017-10-19 Tom Tromey <tom@tromey.com>
2613
2614 * mi/mi-main.c (mi_cmd_execute): Update.
2615 * top.h (prepare_execute_command): Return scoped_value_mark.
2616 * value.h (class scoped_value_mark): Use DISABLE_COPY_AND_ASSIGN.
2617 Add move constructor.
2618 * top.c (prepare_execute_command): Return scoped_value_mark.
2619 (execute_command): Update.
2620
2621 2017-10-19 Pedro Alves <palves@redhat.com>
2622
2623 * xml-support.c (xml_fetch_content_from_file): Check fread's
2624 return.
2625
2626 2017-10-19 Pedro Alves <palves@redhat.com>
2627
2628 * ser-base.c (ser_base_read_error_fd): Delete the file handler if
2629 async.
2630 (handle_error_fd): New function.
2631 (ser_base_async): Add/delete an event loop file handler for
2632 error_fd.
2633
2634 2017-10-19 Pedro Alves <palves@redhat.com>
2635
2636 * xml-support.c (xml_fetch_content_from_file): Don't read in
2637 chunks. Instead use fseek to determine the file's size, and read
2638 it in one go.
2639
2640 2017-11-18 Keith Seitz <keiths@redhat.com>
2641
2642 * c-exp.y (oper): Canonicalize conversion operators of user-defined
2643 types.
2644 Add whitespace to front of type name.
2645
2646 2017-10-18 Keith Seitz <keiths@redhat.com>
2647
2648 * dwarf2read.c (dwarf2_add_typedef): Issue a complaint on unhandled
2649 DW_AT_accessibility.
2650
2651 2017-10-18 Yao Qi <yao.qi@linaro.org>
2652
2653 * features/tic6x-c62x-linux.c: Remove.
2654
2655 2017-10-17 Tom Tromey <tom@tromey.com>
2656
2657 * disasm.c (do_mixed_source_and_assembly_deprecated): Use
2658 gdb::optional, ui_out_emit_list, ui_out_emit_tuple.
2659 (do_mixed_source_and_assembly): Likewise.
2660
2661 2017-10-17 Tom Tromey <tom@tromey.com>
2662
2663 * regcache.c (regcache::xfer_part): Remove assertion.
2664
2665 2017-10-17 Pedro Alves <palves@redhat.com>
2666
2667 * xml-support.c (xml_fetch_content_from_file): Call
2668 unique_ptr::release() instead unique_ptr::get() when passing
2669 through xrealloc.
2670
2671 2017-10-17 Yao Qi <yao.qi@linaro.org>
2672
2673 * regcache.c (regcache::xfer_part): Remove parameters read and
2674 write, add parameter is_raw. All callers are updated.
2675
2676 2017-10-16 Keith Seitz <keiths@redhat.com>
2677
2678 * c-typeprint.c (enum access_specifier): Moved here from
2679 c_type_print_base.
2680 (output_access_specifier): New function.
2681 (c_type_print_base): Consider typedefs when assessing
2682 whether access labels are needed.
2683 Use output_access_specifier as needed.
2684 Output access specifier for typedefs, if needed.
2685 * dwarf2read.c (dwarf2_add_typedef): Record DW_AT_accessibility.
2686 * gdbtypes.h (struct typedef_field) <is_protected, is_private>: New
2687 fields.
2688 (TYPE_TYPEDEF_FIELD_PROTECTED, TYPE_TYPEDEF_FIELD_PRIVATE): New
2689 accessor macros.
2690
2691 2017-10-16 Tom Tromey <tom@tromey.com>
2692
2693 * linux-tdep.c (linux_info_proc, linux_find_memory_regions_full)
2694 (linux_fill_prpsinfo, linux_vsyscall_range_raw): Update.
2695 * target.c (target_fileio_read_stralloc): Update.
2696 * sparc64-tdep.c (adi_is_addr_mapped): Update.
2697 * target.h (target_fileio_read_stralloc): Return
2698 unique_xmalloc_ptr.
2699
2700 2017-10-16 Tom Tromey <tom@tromey.com>
2701
2702 * xml-syscall.c (xml_init_syscalls_info): Update.
2703 * xml-support.c (xinclude_start_include): Update.
2704 (xml_fetch_content_from_file): Return unique_xmalloc_ptr.
2705 * xml-support.h (xml_fetch_another): Return unique_xmalloc_ptr.
2706 (xml_fetch_content_from_file): Likewise.
2707 * osdata.c (get_osdata): Update.
2708 * target.h (target_read_stralloc, target_get_osdata): Return
2709 unique_xmalloc_ptr.
2710 * solib-aix.c (solib_aix_get_library_list): Update.
2711 * solib-target.c (solib_target_current_sos): Update.
2712 * solib-svr4.c (svr4_current_sos_via_xfer_libraries): Update.
2713 * xml-tdesc.c (fetch_available_features_from_target): Update.
2714 (target_fetch_description_xml): Update.
2715 (file_read_description_xml): Update.
2716 * remote.c (remote_get_threads_with_qxfer, remote_memory_map)
2717 (remote_traceframe_info, btrace_read_config, remote_read_btrace)
2718 (remote_pid_to_exec_file): Update.
2719 * target.c (target_read_stralloc): Return unique_xmalloc_ptr.
2720 (target_get_osdata): Likewise.
2721
2722 2017-10-16 Tom Tromey <tom@tromey.com>
2723
2724 * remote.c (remote_register_number_and_offset): Use std::vector.
2725 (remote_set_syscall_catchpoint): Use gdb::unique_xmalloc_ptr.
2726 (putpkt_binary): Use gdb::def_vector.
2727 (compare_sections_command): Use gdb::byte_vector.
2728
2729 2017-10-16 Tom Tromey <tom@tromey.com>
2730
2731 * ppc-linux-nat.c (hwdebug_insert_point): Use
2732 gdb::unique_xmalloc_ptr, XDUP.
2733
2734 2017-10-16 Tom Tromey <tom@tromey.com>
2735
2736 * probe.c (parse_probes): Use std::string.
2737 (info_probes_for_ops, enable_probes_command)
2738 (disable_probes_command): Remove cleanups.
2739
2740 2017-10-16 Tom Tromey <tom@tromey.com>
2741
2742 * buildsym.c (block_compar): Remove.
2743 (end_symtab_get_static_block): Use std::vector.
2744
2745 2017-10-16 Simon Marchi <simon.marchi@ericsson.com>
2746
2747 * memrange.h (struct mem_range): Define operator< and operator==.
2748 (mem_range_s): Remove.
2749 (DEF_VEC_O (mem_range_s)): Remove.
2750 (normalize_mem_ranges): Change parameter type to std::vector.
2751 * memrange.c (compare_mem_ranges): Remove.
2752 (normalize_mem_ranges): Change parameter type to std::vector,
2753 adjust to vector change.
2754 * exec.c (section_table_available_memory): Return vector, remove
2755 parameter.
2756 (section_table_read_available_memory): Adjust to std::vector
2757 change.
2758 * remote.c (remote_read_bytes): Adjust to std::vector
2759 change.
2760 * tracepoint.h (traceframe_available_memory): Change parameter
2761 type to std::vector.
2762 * tracepoint.c (traceframe_available_memory): Change parameter
2763 type to std::vector, adjust.
2764 * gdb/mi/mi-main.c (mi_cmd_trace_frame_collected): Adjust to
2765 std::vector change.
2766 * gdb/Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
2767 unittests/memrange-selftests.c.
2768 (SUBDIR_UNITTESTS_OBS): Add memrange-selftests.o.
2769 * gdb/unittests/memrange-selftests.c: New file.
2770
2771 2017-10-16 Pedro Alves <palves@redhat.com>
2772
2773 * elfread.c (probe_key_free): Rename range-for variable.
2774 * probe.c (parse_probes_in_pspace, find_probes_in_objfile)
2775 (find_probe_by_pc, collect_probes): Rename range-for variable.
2776
2777 2017-10-16 Yao Qi <yao.qi@linaro.org>
2778
2779 * features/Makefile (XMLTOC): Remove tic6x-*.xml.
2780 * features/tic6x-c62x.c: Remove.
2781 * features/tic6x-c64x-linux.c: Remove.
2782 * features/tic6x-c64x.c: Remove.
2783 * features/tic6x-c64xp-linux.c: Remove.
2784 * features/tic6x-c64xp.c: Remove.
2785 * tic6x-linux-tdep.c (_initialize_tic6x_linux_tdep): Don't call
2786 initialize_tdesc_tic6x_*_linux functions.
2787 * tic6x-tdep.c (_initialize_tic6x_tdep): Don't call
2788 initialize_tdesc_tic6x_* functions.
2789
2790 2017-10-16 Yao Qi <yao.qi@linaro.org>
2791
2792 * features/Makefile (WHICH): Remove tic6x-c64xp, tic6x-c64x
2793 tic6x-c62x.
2794 * regformats/tic6x-c62x.dat: Remove.
2795 * regformats/tic6x-c64x.dat: Remove.
2796 * regformats/tic6x-c64xp.dat: Remove.
2797
2798 2017-10-15 Simon Marchi <simon.marchi@ericsson.com>
2799
2800 * tracepoint.c (parse_traceframe_info): Return a unique_ptr
2801 (the !HAVE_LIBEXPAT version).
2802
2803 2017-10-14 Simon Marchi <simon.marchi@ericsson.com>
2804
2805 * nat/linux-osdata.c (struct pid_pgid_entry) <operator<>: Make
2806 const.
2807
2808 2017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
2809
2810 * target.h: Include tracepoint.h.
2811 (enum trace_find_type): Move to tracepoint.h.
2812 (struct target_ops) <to_traceframe_info>: Return a unique ptr.
2813 * tracepoint.h: Don't include target.h
2814 (enum trace_find_type): Move from target.h.
2815 (parse_traceframe_info): Return a unique ptr.
2816 * tracepoint.c (current_traceframe_info): Change type to unique
2817 ptr.
2818 (free_traceframe_info): Remove.
2819 (clear_traceframe_info): Don't manually free
2820 current_traceframe_info.
2821 (free_result): Remove.
2822 (parse_traceframe_info): Return a unique ptr.
2823 (get_traceframe_info): Adjust to unique ptr.
2824 * ctf.c (ctf_traceframe_info): Return a unique ptr.
2825 * remote.c (remote_traceframe_info): Return a unique ptr.
2826 * tracefile-tfile.c (tfile_traceframe_info): Return a unique
2827 ptr.
2828 * target-debug.h (target_debug_print_traceframe_info_up): New
2829 macro.
2830 * target-delegates.c: Regenerate.
2831
2832 2017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
2833
2834 * memrange.h (struct mem_range): Add constructors.
2835 * tracepoint.h (struct traceframe_info) <memory>: Change type to
2836 std::vector<mem_range>.
2837 * tracepoint.c (free_traceframe_info): Don't manually free
2838 vector.
2839 (traceframe_info_start_memory): Adjust to vector change.
2840 (traceframe_available_memory): Likewise.
2841 * tracefile-tfile.c (build_traceframe_info): Likewise.
2842 * ctf.c (ctf_traceframe_info): Likewise.
2843
2844 2017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
2845
2846 * tracepoint.h (struct traceframe_info) <tvars>: Change type to
2847 std::vector<int>.
2848 * tracepoint.c (free_traceframe_info): Deallocate with delete.
2849 (traceframe_info_start_tvar): Adjust to vector change.
2850 (parse_traceframe_info): Allocate with new.
2851 * ctf.c (ctf_traceframe_info): Allocate with new, adjust to
2852 vector change.
2853 * tracefile-tfile.c (build_traceframe_info): Adjust to vector
2854 change.
2855 tfile_traceframe_info): Allocate with new.
2856 * mi/mi-main.c (mi_cmd_trace_frame_collected): Adjust to vector
2857 change.
2858
2859 2017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
2860
2861 * tracepoint.c (traceframe_info): Rename to...
2862 (current_traceframe_info): ...this.
2863 (clear_traceframe_info): Adjust.
2864 (get_traceframe_info): Adjust.
2865
2866 2017-10-14 Simon Marchi <simon.marchi@ericsson.com>
2867
2868 * nat/linux-osdata.c: Include algorithm.
2869 (compare_processes): Remove.
2870 (struct pid_pgid_entry): New struct.
2871 (linux_xfer_osdata_processgroups): Use std::vector instead of
2872 XNEWVEC.
2873
2874 2017-10-14 Simon Marchi <simon.marchi@ericsson.com>
2875
2876 * objfiles.h: Don't include symfile.h.
2877 (struct partial_symbol): Remove forward-declaration.
2878 (struct objfile) <global_psymbols, static_psymbols>: Change type
2879 to std::vector<partial_symbol *>.
2880 * objfiles.c (objfile::objfile): Don't memset those fields.
2881 (objfile::~objfile): Don't free those fields.
2882 * psympriv.h (struct psymbol_allocation_list): Remove
2883 forward-declaration.
2884 (add_psymbol_to_list): Change psymbol_allocation_list parameter
2885 to std::vector.
2886 (start_psymtab_common): Change parameters to std::vector.
2887 * psymtab.c: Include algorithm.
2888 (require_partial_symbols): Call shrink_to_fit.
2889 (find_pc_sect_psymbol): Adjust to vector change.
2890 (match_partial_symbol): Likewise.
2891 (lookup_partial_symbol): Likewise.
2892 (psym_relocate): Likewise.
2893 (dump_psymtab): Likewise.
2894 (recursively_search_psymtabs): Likewise.
2895 (compare_psymbols): Remove.
2896 (sort_pst_symbols): Adjust to vector change.
2897 (start_psymtab_common): Likewise.
2898 (end_psymtab_common): Likewise.
2899 (psymbol_bcache_full): De-constify return value.
2900 (add_psymbol_to_bcache): Likewise.
2901 (extend_psymbol_list): Remove.
2902 (append_psymbol_to_list): Adjust to vector change.
2903 (add_psymbol_to_list): Likewise.
2904 (init_psymbol_list): Likewise.
2905 (maintenance_info_psymtabs): Likewise.
2906 (maintenance_check_psymtabs): Likewise.
2907 * symfile.h (struct psymbol_allocation_list): Remove.
2908 * symfile.c (reread_symbols): Adjust to vector change.
2909 * dbxread.c (start_psymtab): Change type of parameters.
2910 (dbx_symfile_read): Adjust to vector change.
2911 (read_dbx_symtab): Likewise.
2912 (start_psymtab): Change type of parameters.
2913 * dwarf2read.c (dwarf2_build_psymtabs): Adjust to vector change.
2914 (create_partial_symtab): Likewise.
2915 (add_partial_symbol): Likewise.
2916 (write_one_signatured_type): Likewise.
2917 (recursively_write_psymbols): Likewise.
2918 * mdebugread.c (parse_partial_symbols): Likewise.
2919 * xcoffread.c (xcoff_start_psymtab): Change type of parameters.
2920 (scan_xcoff_symtab): Adjust to vector change.
2921 (xcoff_initial_scan): Likewise.
2922
2923 2017-10-13 Simon Marchi <simon.marchi@ericsson.com>
2924
2925 * ada-typeprint.c (print_dynamic_range_bound): Use std::string.
2926
2927 2017-10-13 Yao Qi <yao.qi@linaro.org>
2928
2929 * features/Makefile: Remove tic6x-*-expedite, add tic6x-expedite.
2930 Remove s390x-*-expedite, add s390x-expedite.
2931
2932 2017-10-13 Yao Qi <yao.qi@linaro.org>
2933
2934 * features/s390-gs-linux64.c: Regenerated.
2935 * features/s390x-gs-linux64.c: Regenerated.
2936
2937 2017-10-13 Tom Tromey <tom@tromey.com>
2938
2939 * compile/compile-object-run.c (do_module_cleanup): Use delete.
2940 * solib.c (update_solib_list, reload_shared_libraries_1): Use
2941 delete.
2942 * symfile.c (symbol_file_add_with_addrs): Use new.
2943 (symbol_file_add_separate): Update comment.
2944 (syms_from_objfile_1, remove_symbol_file_command): Use delete.
2945 * jit.c (jit_object_close_impl): Use new.
2946 (jit_unregister_code): Use delete.
2947 * objfiles.c (objfile::objfile): Rename from allocate_objfile.
2948 (~objfile): Rename from free_objfile.
2949 (free_objfile_separate_debug, do_free_objfile_cleanup)
2950 (free_all_objfiles, objfile_purge_solibs): Use delete.
2951 * objfiles.h (struct objfile): Add constructor and destructor.
2952 Use DISABLE_COPY_AND_ASSIGN. Add initializers to data members.
2953 (allocate_objfile, free_objfile): Don't declare.
2954 (struct objstats): Add initializers.
2955
2956 2017-10-12 Simon Marchi <simon.marchi@ericsson.com>
2957
2958 * arch-utils.h (simple_displaced_step_copy_insn): Remove.
2959 * arch-utils.c (simple_displaced_step_copy_insn): Remove.
2960 * gdbarch.sh (displaced_step_copy_insn): Adjust comment.
2961 * gdbarch.h: Regenerate.
2962 * i386-linux-tdep.c (i386_linux_displaced_step_copy_insn):
2963 Adjust comment.
2964 * i386-tdep.c (i386_displaced_step_copy_insn): Adjust comment.
2965 (i386_displaced_step_fixup): Adjust comment.
2966 * rs6000-tdep.c (ppc_displaced_step_copy_insn): Adjust comment.
2967
2968 2017-10-12 Tom Tromey <tom@tromey.com>
2969
2970 * prologue-value.h (pv_area::store_would_trash): Return bool.
2971 (pv_area::find_reg): Likewise.
2972 * prologue-value.c (pv_area::store_would_trash): Return bool.
2973 (pv_area::find_reg): Likewise.
2974
2975 2017-10-12 Tom Tromey <tom@tromey.com>
2976
2977 * s390-linux-tdep.c (s390_store, s390_load)
2978 (s390_check_for_saved, s390_analyze_prologue): Update.
2979 * rx-tdep.c (check_for_saved, rx_analyze_prologue): Update.
2980 * rl78-tdep.c (rl78_analyze_prologue, check_for_saved): Update.
2981 * prologue-value.h (class pv_area): Move from prologue-value.c.
2982 Change names of members. Add constructor, destructor, member
2983 functions.
2984 (make_pv_area, free_pv_area, make_cleanup_free_pv_area)
2985 (pv_area_store, pv_area_fetch, pv_area_store_would_trash)
2986 (pv_area_fetch, pv_area_scan): Don't declare.
2987 * prologue-value.c (struct pv_area::area_entry): Now member of
2988 pv_area.
2989 (struct pv_area): Move to prologue-value.h.
2990 (pv_area::pv_area): Rename from make_pv_area.
2991 (pv_area::~pv_area): Rename from free_pv_area.
2992 (do_free_pv_area_cleanup, make_cleanup_free_pv_area): Remove.
2993 (clear_entries, find_entry, overlaps, store_would_trash, store)
2994 (fetch, find_reg, scan): Now member of pv_area.
2995 Remove "area" argument. Update.
2996 * msp430-tdep.c (check_for_saved, msp430_analyze_prologue):
2997 Update.
2998 * mn10300-tdep.c (push_reg, check_for_saved)
2999 (mn10300_analyze_prologue): Update.
3000 * mep-tdep.c (is_arg_spill, check_for_saved)
3001 (mep_analyze_prologue): Update.
3002 * m32c-tdep.c (m32c_pv_push, m32c_srcdest_fetch)
3003 (m32c_srcdest_store, m32c_pv_enter, m32c_is_arg_spill)
3004 (m32c_is_struct_return, m32c_analyze_prologue): Update.
3005 * arm-tdep.c (thumb_analyze_prologue, arm_analyze_prologue):
3006 Update.
3007 * arc-tdep.c (arc_is_in_prologue, arc_analyze_prologue): Update.
3008 * aarch64-tdep.c (aarch64_analyze_prologue): Update.
3009
3010 2017-10-12 Simon Marchi <simon.marchi@ericsson.com>
3011
3012 * linux-nat.h (linux_nat_set_delete_thread): New declaration.
3013 * linux-nat.c (linux_nat_delete_thread): New variable.
3014 (lwp_free): Invoke linux_nat_delete_thread if set.
3015 (linux_nat_set_delete_thread): New function.
3016 * aarch64-linux-nat.c (_initialize_aarch64_linux_nat): Assign
3017 thread delete callback.
3018 * arm-linux-nat.c (arm_linux_delete_thread): New function.
3019 (_initialize_arm_linux_nat): Assign thread delete callback.
3020 * s390-linux-nat.c (s390_delete_thread): New function.
3021 (_initialize_s390_nat): Assign thread delete callback.
3022 * x86-linux-nat.c (x86_linux_add_target): Likewise.
3023 * nat/aarch64-linux.c (aarch64_linux_delete_thread): New
3024 function.
3025 * nat/aarch64-linux.h (aarch64_linux_delete_thread): New
3026 declaration.
3027 * nat/x86-linux.c (x86_linux_delete_thread): New function.
3028 * nat/x86-linux.h (x86_linux_delete_thread): New declaration.
3029
3030 2017-10-09 Tom Tromey <tom@tromey.com>
3031
3032 * tui/tui-win.c (tui_set_win_height, parse_scrolling_args): Use
3033 std::string.
3034 * tui/tui-layout.c (enum tui_status): Use std::string.
3035
3036 2017-10-11 Tom Tromey <tom@tromey.com>
3037
3038 * gdbthread.h (thread_command): Constify.
3039 * inferior.h (detach_command): Constify.
3040 * top.h (set_history, show_history): Constify.
3041 * arm-tdep.c (set_arm_command, show_arm_command): Constify.
3042 * serial.c (serial_set_cmd, serial_show_cmd): Constify.
3043 * bsd-kvm.c (bsd_kvm_cmd): Constify.
3044 * printcmd.c (set_command): Constify.
3045 (non_const_set_command): New function.
3046 * dcache.c (set_dcache_command, show_dcache_command): Constify.
3047 * breakpoint.c (enable_command, disable_command, delete_command)
3048 (catch_command, tcatch_command, set_breakpoint_cmd)
3049 (show_breakpoint_cmd): Constify.
3050 * macrocmd.c (macro_command): Constify.
3051 * infcmd.c (unset_command, kill_command, detach_command)
3052 (info_proc_cmd): Constify.
3053 * i386-tdep.c (set_mpx_cmd, show_mpx_cmd): Constify.
3054 * auto-load.c (show_auto_load_cmd, set_auto_load_cmd)
3055 (info_auto_load_cmd): Constify.
3056 * target-descriptions.c (set_tdesc_cmd, show_tdesc_cmd)
3057 (unset_tdesc_cmd): Constify.
3058 * ada-lang.c (set_ada_command, show_ada_command)
3059 (maint_set_ada_cmd, maint_show_ada_cmd): Constify.
3060 * guile/guile.c (set_guile_command, show_guile_command)
3061 (info_guile_command): Constify.
3062 * tui/tui-win.c (tui_command, set_tui_cmd, show_tui_cmd):
3063 Constify.
3064 * skip.c (skip_command): Constify.
3065 * compile/compile.c (_initialize_compile): Constify.
3066 * dwarf2read.c (set_dwarf_cmd, show_dwarf_cmd): Constify.
3067 * btrace.c (maint_btrace_cmd, maint_btrace_set_cmd)
3068 (maint_btrace_show_cmd, maint_btrace_pt_set_cmd)
3069 (maint_btrace_pt_show_cmd): Constify.
3070 * remote.c (set_remote_cmd, show_remote_cmd, remote_command):
3071 Constify.
3072 * python/python.c (user_show_python, user_set_python): Constify.
3073 * mips-tdep.c (set_mips_command, show_mips_command)
3074 (set_mipsfpu_command): Constify.
3075 * record-btrace.c (cmd_record_btrace_start)
3076 (cmd_set_record_btrace, cmd_show_record_btrace)
3077 (cmd_set_record_btrace_bts, cmd_show_record_btrace_bts)
3078 (cmd_set_record_btrace_pt, cmd_show_record_btrace_pt): Constify.
3079 * rs6000-tdep.c (set_powerpc_command, show_powerpc_command):
3080 Constify.
3081 * symfile.c (overlay_command): Constify.
3082 * spu-tdep.c (set_spu_command, show_spu_command): Constify.
3083 * cli/cli-logging.c (set_logging_command, show_logging_command):
3084 Constify.
3085 * cli/cli-dump.c (dump_command, append_command)
3086 (srec_dump_command, ihex_dump_command, verilog_dump_command)
3087 (tekhex_dump_command, binary_dump_command)
3088 (binary_append_command): Constify.
3089 * cli/cli-decode.c (struct cmd_list_element): Change type of
3090 "fun".
3091 * cli/cli-cmds.c (info_command, show_command, set_debug)
3092 (show_debug): Constify.
3093 (show_command): Add non-const overload.
3094 * top.c (set_history, show_history): Constify.
3095 * sh-tdep.c (set_sh_command, show_sh_command): Constify.
3096 * command.h (add_prefix_cmd): Accept a cmd_const_cfunc_ftype.
3097 * target.c (target_command): Constify.
3098 * sparc64-tdep.c (info_adi_command): Constify.
3099 * record-full.c (cmd_record_full_start): Constify.
3100 (set_record_full_command): Constify. Fix typo.
3101 (show_record_full_command): Constify.
3102 * thread.c (thread_command, thread_apply_command): Constify.
3103 * memattr.c (dummy_cmd): Constify.
3104 * value.c (function_command): Constify.
3105 * frame.c (set_backtrace_cmd, show_backtrace_cmd): Constify.
3106 * probe.c (info_probes_command): Constify.
3107 * ser-tcp.c (set_tcp_cmd, show_tcp_cmd): Constify.
3108 * gnu-nat.c (set_task_cmd, show_task_cmd, set_thread_cmd)
3109 (show_thread_cmd, set_thread_default_cmd)
3110 (show_thread_default_cmd): Constify.
3111 (check_empty): Constify.
3112 * tracepoint.c (tfind_command): Constify.
3113 * cp-support.c (maint_cplus_command): Constify.
3114 * windows-tdep.c (info_w32_command): Constify.
3115 * record.c (cmd_record_start, set_record_command)
3116 (show_record_command, info_record_command, cmd_record_goto):
3117 Constify.
3118 * ravenscar-thread.c (set_ravenscar_command)
3119 (show_ravenscar_command): Constify.
3120 * utils.c (set_internal_problem_cmd, show_internal_problem_cmd):
3121 Constify.
3122 (add_internal_problem_command): Remove casts.
3123 * arc-tdep.c (maintenance_print_arc_command): Constify.
3124 * valprint.c (set_print, show_print, set_print_raw)
3125 (show_print_raw): Constify.
3126 * maint.c (maintenance_command, maintenance_info_command)
3127 (maintenance_print_command, maintenance_set_cmd)
3128 (maintenance_show_cmd, set_per_command_cmd)
3129 (show_per_command_cmd, maintenance_check_command): Constify.
3130 * language.c (set_check, show_check): Constify.
3131 * typeprint.c (show_print_type, set_print_type): Constify.
3132 * go32-nat.c (go32_info_dos_command): Constify.
3133
3134 2017-10-11 Tom Tromey <tom@tromey.com>
3135
3136 * breakpoint.c (prepare_re_set_context): Remove.
3137 (breakpoint_re_set_one): Update. Don't use cleanups.
3138 (breakpoint_re_set): Use scoped_restore, std::string, and
3139 scoped_restore_current_language.
3140
3141 2017-10-11 Tom Tromey <tom@tromey.com>
3142
3143 * breakpoint.c (commands_command_1): Use std::string.
3144 (cleanup_executing_breakpoints): Remove.
3145 (bpstat_do_actions_1): Use scoped_restore.
3146 (bpstat_check_watchpoint): Use std::string.
3147 (decode_static_tracepoint_spec): Likewise.
3148 (break_range_command): Likewise.
3149 (watch_command_1): Likewise.
3150 (compare_breakpoints): Change argument types.
3151 (clear_command): Use std::vector.
3152 (cleanup_executing_breakpoints): Remove.
3153 (update_global_location_list): Use unique_xmalloc_ptr.
3154 (strace_command): Remove unused declaration.
3155
3156 2017-10-11 John Baldwin <jhb@FreeBSD.org>
3157
3158 * Makefile.in (ALLDEPFILES): Add arm-fbsd-nat.c.
3159 * NEWS: Mention new FreeBSD/arm native configuration.
3160 * configure.host: Add arm*-*-freebsd*.
3161 * configure.nat: Likewise.
3162 * arm-fbsd-nat.c: New file.
3163
3164 2017-10-11 John Baldwin <jhb@FreeBSD.org>
3165
3166 * Makefile.in (ALL_TARGET_OBS): Add arm-fbsd-tdep.o.
3167 (ALLDEPFILES): Add arm-fbsd-tdep.c.
3168 * NEWS: Mention new FreeBSD/arm target.
3169 * configure.tgt: Add arm*-*-freebsd*.
3170 * arm-fbsd-tdep.c: New file.
3171 * arm-fbsd-tdep.h: New file.
3172
3173 2017-10-11 Maciej W. Rozycki <macro@imgtec.com>
3174
3175 * linux-tdep.c (linux_make_corefile_notes): Remove call to
3176 `gdbarch_elfcore_write_linux_prpsinfo'.
3177 * gdbarch.sh (elfcore_write_linux_prpsinfo): Remove architecture
3178 method.
3179 (elf_internal_linux_prpsinfo): Remove declaration.
3180 * gdbarch.h: Regenerate.
3181 * gdbarch.c: Regenerate.
3182
3183 2017-10-11 Maciej W. Rozycki <macro@imgtec.com>
3184
3185 * ppc-linux-tdep.c (ppc_linux_init_abi): Remove call to
3186 `set_gdbarch_elfcore_write_linux_prpsinfo'.
3187
3188 2017-10-11 Pedro Alves <palves@redhat.com>
3189
3190 * breakpoint.c (reattach_breakpoints): Delete.
3191 * breakpoint.h (reattach_breakpoints): Delete.
3192
3193 2017-10-11 Simon Marchi <simon.marchi@ericsson.com>
3194
3195 * symfile.c (registered_sym_fns): Make struct, not typedef.
3196 (DEF_VEC_O (registered_sym_fns)): Remove.
3197 (symtab_fns): Change type to std::vector.
3198 (add_symtab_fns): Adjust.
3199 (find_sym_fns): Adjust.
3200
3201 2017-10-11 Anton Kolesov <Anton.Kolesov@synopsys.com>
3202
3203 * arc-tdep.c (arc_gdbarch_init): Pass proper cpu value to disassembler.
3204 * arc-tdep.h (arc_arch_is_em): New function.
3205 (arc_arch_is_hs): Likewise.
3206
3207 2017-10-11 Egeyar Bagcioglu <egeyar.bagcioglu@oracle.com>
3208
3209 * macrotab.h (macro_lookup_inclusion): Remove unnecessary
3210 parentheses in the declaration.
3211 (macro_lookup_inclusion): Likewise.
3212 (macro_lookup_definition): Likewise.
3213 * p-lang.h (pascal_builtin_types): Likewise.
3214 * tui/tui-data.c (tui_win_list): Likewise.
3215 * tui/tui-data.h (tui_win_list): Likewise.
3216 * utils.h (make_cleanup_free_section_addr_info): Likewise.
3217
3218 2017-10-11 Mark Rages <markrages@gmail.com>
3219
3220 * target-memory.c (block_boundaries): Fix for block address not
3221 aligned on block size.
3222
3223 2017-10-10 Pedro Alves <palves@redhat.com>
3224 Tom Tromey <tom@tromey.com>
3225
3226 * breakpoint.c (struct captured_breakpoint_query_args)
3227 (do_captured_breakpoint_query, gdb_breakpoint_query): Delete.
3228 (print_breakpoint): New.
3229 * breakpoint.h (print_breakpoint): Declare.
3230 * common/common-exceptions.h (enum return_reason): Remove
3231 references to catch_exceptions.
3232 * exceptions.c (catch_exceptions, catch_exceptions_with_msg):
3233 Delete.
3234 * exceptions.h (catch_exceptions_ftype, catch_exceptions)
3235 (catch_exception_ftype, catch_exceptions_with_msg): Delete.
3236 * gdb.h: Delete.
3237 * gdbthread.h (thread_select): Declare.
3238 * mi/mi-cmd-break.c: Don't include gdb.h.
3239 (breakpoint_notify): Use print_breakpoint.
3240 * mi/mi-cmd-catch.c: Don't include gdb.h.
3241 * mi/mi-interp.c: Don't include gdb.h.
3242 (mi_print_breakpoint_for_event): New.
3243 (mi_breakpoint_created, mi_breakpoint_modified): Use
3244 mi_print_breakpoint_for_event.
3245 * mi/mi-main.c: Don't include gdb.h.
3246 (mi_cmd_thread_select): Parse the global thread ID here. Use
3247 thread_select instead of gdb_thread_select.
3248 (mi_cmd_thread_list_ids): Output "thread-ids" tuple here instead
3249 of using gdb_list_thread_ids.
3250 * remote-fileio.c (do_remote_fileio_request): Change type. Reply
3251 FILEIO_ENOSYS here.
3252 (remote_fileio_request): Use TRY/CATCH instead of
3253 catch_exceptions.
3254 * symfile-mem.c (struct symbol_file_add_from_memory_args)
3255 (symbol_file_add_from_memory_wrapper): Delete.
3256 (add_vsyscall_page): Use TRY/CATCH instead of catch_exceptions.
3257 * thread.c: Don't include gdb.h.
3258 (do_captured_list_thread_ids, gdb_list_thread_ids): Delete.
3259 (thread_alive): Use thread_select.
3260 (do_captured_thread_select): Delete, parts salvaged as ...
3261 (thread_select): ... this new function.
3262 (gdb_thread_select): Delete.
3263
3264 2017-10-10 Pedro Alves <palves@redhat.com>
3265 Tom Tromey <tom@tromey.com>
3266
3267 * breakpoint.c (breakpoint_cond_eval): Change return type to bool
3268 and reverse logic.
3269 (WP_DELETED, WP_VALUE_CHANGED, WP_VALUE_NOT_CHANGED, WP_IGNORE):
3270 No longer macros. Instead ...
3271 (enum wp_check_result): They're now values of this new
3272 enumeration.
3273 (watchpoint_check): Change return type to wp_check_result and
3274 parameter type to bpstat.
3275 (bpstat_check_watchpoint): Use TRY/CATCH instead of catch_errors.
3276 (bpstat_check_breakpoint_conditions): Use TRY/CATCH instead of
3277 catch_errors. Reverse logic of watchpoint_check call.
3278 (breakpoint_re_set_one): Now returns void and takes a breakpoint
3279 pointer as parameter.
3280 (breakpoint_re_set): Use TRY/CATCH instead of catch_errors.
3281 * common/common-exceptions.c (throw_exception_sjlj): Update
3282 comments to avoid mentioning catch_errors.
3283 * exceptions.c (catch_errors): Delete.
3284 * exceptions.h: Update comments to avoid mentioning catch_errors.
3285 (catch_errors_ftype, catch_errors): Delete.
3286 * infrun.c (normal_stop): Use TRY/CATCH instead of catch_errors.
3287 (hook_stop_stub): Delete.
3288 (restore_selected_frame): Change return type to void, and
3289 parameter type to const frame_id &.
3290 (restore_infcall_control_state): Use TRY/CATCH instead of
3291 catch_errors.
3292 * main.c (captured_command_loop): Return void and remove
3293 parameter. Remove references to catch_errors.
3294 (captured_main): Use TRY/CATCH instead of catch_errors.
3295 * objc-lang.c (objc_submethod_helper_data)
3296 (find_objc_msgcall_submethod_helper): Delete.
3297 (find_objc_msgcall_submethod): Use TRY/CATCH instead of
3298 catch_errors.
3299 * record-full.c (record_full_message): Return void.
3300 (record_full_message_args, record_full_message_wrapper): Delete.
3301 (record_full_message_wrapper_safe): Return bool and use TRY/CATCH
3302 instead of catch_errors.
3303 * solib-aix.c (solib_aix_open_symbol_file_object): Change
3304 parameter type to int.
3305 * solib-darwin.c (open_symbol_file_object): Ditto.
3306 * solib-dsbt.c (open_symbol_file_object): Ditto.
3307 * solib-frv.c (open_symbol_file_object): Ditto.
3308 * solib-svr4.c (open_symbol_file_object): Ditto.
3309 * solib-target.c (solib_target_open_symbol_file_object): Ditto.
3310 * solib.c (update_solib_list): Use TRY/CATCH instead of
3311 catch_errors.
3312 * solist.h (struct target_so_ops) <open_symbol_file_object>:
3313 Change type.
3314 * symmisc.c (struct print_symbol_args): Remove.
3315 (dump_symtab_1): Use TRY/CATCH instead of catch_errors.
3316 (print_symbol): Change type.
3317 * windows-nat.c (handle_load_dll, handle_unload_dll): Return void
3318 and remove parameters.
3319 (catch_errors): New.
3320 (get_windows_debug_event): Adjust.
3321
3322 2017-10-09 Tom Tromey <tom@tromey.com>
3323
3324 * mi/mi-main.c (free_splay_tree): Remove.
3325 (list_available_thread_groups): Use splay_tree_up.
3326 * common/gdb_splay_tree.h: New file.
3327
3328 2017-10-09 Tom Tromey <tom@tromey.com>
3329
3330 * mi/mi-main.c (do_nothing): Remove.
3331 (list_available_thread_groups): Update.
3332
3333 2017-10-09 Pedro Alves <palves@redhat.com>
3334
3335 * infrun.c (handle_inferior_event_1) <TARGET_WAITKIND_EXECD>: Skip
3336 reading registers when switching context.
3337
3338 2017-10-09 John Baldwin <jhb@FreeBSD.org>
3339
3340 * fbsd-nat.c (fbsd_siginfo_size): Use gdbarch_long_bit.
3341 (fbsd_convert_siginfo): Likewise.
3342 * fbsd-tdep.c (fbsd_core_xfer_siginfo): Likewise.
3343
3344 2017-10-09 Simon Marchi <simon.marchi@polymtl.ca>
3345
3346 * configure.ac (try_guile_versions): Remove guile-2.2.
3347 * configure: Regenerate.
3348
3349 2017-10-09 Tom Tromey <tom@tromey.com>
3350
3351 * Makefile.in (COMPILE.post, POSTCOMPILE): Restore $(basename).
3352 (COMPILE.pre): Use $(CXX).
3353
3354 2017-10-09 Pedro Alves <palves@redhat.com>
3355
3356 * cp-support.c (cp_remove_params): Return a gdb::unique_xmalloc_ptr.
3357 Use bool.
3358 (overload_list_add_symbol): Adjust to use gdb::unique_xmalloc_ptr.
3359 * cp-support.h (cp_remove_params): Now returns a
3360 gdb::unique_xmalloc_ptr.
3361 * dwarf2read.c (find_slot_in_mapped_hash): Now returns bool.
3362 Adjust to cp_remove_params returning a gdb::unique_xmalloc_ptr.
3363 * psymtab.c (psymtab_search_name): Adjust to cp_remove_params
3364 returning a gdb::unique_xmalloc_ptr.
3365 (lookup_partial_symbol): Adjust to use gdb::unique_xmalloc_ptr.
3366 * stack.c (find_frame_funname): Adjust to cp_remove_params
3367 returning a gdb::unique_xmalloc_ptr.
3368
3369 2017-10-08 Tom Tromey <tom@tromey.com>
3370
3371 * dwarf2read.c (dwarf2_get_dwz_file): Use
3372 gdb::unique_xmalloc_ptr.
3373 (find_slot_in_mapped_hash): Likewise.
3374 (dwarf2_physname): Likewise.
3375 (create_dwo_unit_in_dwp_v1): Use std::string.
3376 (create_dwo_unit_in_dwp_v2): Likewise.
3377 (lookup_dwo_cutu): Likewise.
3378 (inherit_abstract_dies): Use std::vector.
3379 (read_array_type): Likewise.
3380 (dwarf_decode_macros): Remove unused declaration.
3381 (unsigned_int_compar): Remove.
3382 (dwarf2_build_psymtabs_hard): Use scoped_restore.
3383 (psymtabs_addrmap_cleanup): Remove.
3384
3385 2017-10-08 Tom Tromey <tom@tromey.com>
3386
3387 * frame-unwind.c (frame_unwind_try_unwinder): Update.
3388 * frame.h (frame_cleanup_after_sniffer): Declare.
3389 (frame_prepare_for_sniffer): Return void.
3390 * frame.c (frame_cleanup_after_sniffer): No longer static. Change
3391 type of argument.
3392 (frame_prepare_for_sniffer): Return void.
3393
3394 2017-10-08 Tom Tromey <tom@tromey.com>
3395
3396 * utils.h (make_cleanup_value_free): Remove.
3397 * utils.c (do_value_free, struct cleanup): Remove.
3398 * dwarf2loc.c (dwarf2_evaluate_loc_desc_full) <DWARF_VALUE_STACK>:
3399 Use gdb_value_up.
3400 * value.h (struct value_deleter): New.
3401 (gdb_value_up): New typedef.
3402
3403 2017-10-08 Tom Tromey <tom@tromey.com>
3404
3405 * symtab.c (free_search_symbols, do_free_search_symbols_cleanup)
3406 (make_cleanup_free_search_symbols): Remove.
3407 (search_symbols): Return std::vector.
3408 (symbol_search::compare_search_syms): Now member of
3409 symbol_search. Change arguments.
3410 (sort_search_symbols_remove_dups): Change arguments. Rewrite.
3411 (symtab_symbol_info, rbreak_command): Update.
3412 * symtab.h (struct symbol_search) <next>: Remove.
3413 Add constructors.
3414 (symbol_search::operator<): New function.
3415 (symbol_search::operator==): New function.
3416 (search_symbols): Remove std::vector.
3417 (free_search_symbols, make_cleanup_free_search_symbols): Remove.
3418 (symbol_search::compare_search_syms): Declare.
3419
3420 2017-10-06 Yao Qi <yao.qi@linaro.org>
3421
3422 * Makefile.in (ALL_64_TARGET_OBS): Replace aarch64-insn.o with
3423 arch/aarch64-insn.o.
3424 Remove one rule.
3425 * configure.tgt: Replace aarch64-insn.o with arch/aarch64-insn.o.
3426
3427 2017-10-06 Yao Qi <yao.qi@linaro.org>
3428
3429 * Makefile.in (ALL_TARGET_OBS): Replace arm.o, arm-get-next-pcs.o,
3430 and arm-linux.o with arch/arm.o, arch/arm-get-next-pcs.o and
3431 arch/arm-linux.o respectively.
3432 * configure.tgt: Likewise.
3433
3434 2017-10-06 Yao Qi <yao.qi@linaro.org>
3435
3436 * Makefile.in (ALL_TARGET_OBS): Rename i386.o to arch/i386.o.
3437 * configure.tgt (i386_tobjs): Replace i386.o with arch/i386.o.
3438
3439 2017-10-06 Pedro Alves <palves@redhat.com>
3440
3441 * windows-nat.c: Include <algorithm>.
3442
3443 2017-10-06 Yao Qi <yao.qi@linaro.org>
3444
3445 * configure.tgt (i386_tobjs): New variable.
3446 (amd64_tobjs): New variable.
3447 Set $cpu_obs and $os_obs.
3448
3449 2017-10-06 Yao Qi <yao.qi@linaro.org>
3450
3451 * Makefile.in (CONFIG_SRC_SUBDIR): New.
3452 (ALL_64_TARGET_OBS): Replace amd64.o with arch/amd64.o.
3453 (clean): Remove object files and dependency files.
3454 (distclean): Remove the directory.
3455 * configure.ac: Invoke AC_CONFIG_COMMANDS.
3456 * configure: Re-generated.
3457 * configure.tgt: Replace amd64.o with arch/amd64.o.
3458
3459 2017-10-05 Jose E. Marchesi <jose.marchesi@oracle.com>
3460
3461 PR build/22188
3462 * arm-tdep.c (arm_decode_misc_memhint_neon): Fix decoding of CPS
3463 and SETEND.
3464
3465 2017-10-05 Pedro Alves <palves@redhat.com>
3466
3467 * linux-nat.c (linux_child_follow_fork): When following the parent
3468 and detaching the child, consult the parent thread's architecture
3469 instead of the child's.
3470
3471 2017-10-05 Ulrich Weigand <uweigand@de.ibm.com>
3472
3473 * ax.h: Do not include "doublest.h".
3474 (union agent_val): Remove.
3475
3476 2017-10-05 Ulrich Weigand <uweigand@de.ibm.com>
3477
3478 * dfp.h (MAX_DECIMAL_STRING): Move to dfp.c.
3479 (decimal_to_string): Return std::string object.
3480 (decimal_from_string): Accept std::string object. Return bool.
3481 (decimal_from_integral, decimal_from_doublest): Remove.
3482 (decimal_from_longest): Add prototype.
3483 (decimal_from_ulongest): Likewise.
3484 (decimal_to_longest): Likewise.
3485 (decimal_from_doublest): Likewise.
3486 * dfp.c: Do not include "gdbtypes.h" or "value.h".
3487 (MAX_DECIMAL_STRING): Move here.
3488 (decimal_to_string): Return std::string object.
3489 (decimal_from_string): Accept std::string object. Return bool.
3490 (decimal_from_integral): Remove, replace by ...
3491 (decimal_from_longest, decimal_from_ulongest): ... these new functions.
3492 (decimal_to_longest): New function.
3493 (decimal_from_floating): Remove, replace by ...
3494 (decimal_from_doublest): ... this new function.
3495 (decimal_to_doublest): Update to new decimal_to_string interface.
3496
3497 * value.c (unpack_long): Use decimal_to_longest.
3498 * valops.c (value_cast): Use decimal_from_doublest instead of
3499 decimal_from_floating. Use decimal_from_[u]longest isntead of
3500 decimal_from_integral.
3501 * valarith.c (value_args_as_decimal): Likewise.
3502 * valprint.c (print_decimal_floating): Update to new
3503 decimal_to_string interface.
3504 * printcmd.c (printf_decfloat): Likewise.
3505 * c-exp.y (parse_number): Update to new decimal_from_string interface.
3506
3507 2017-10-05 Ulrich Weigand <uweigand@de.ibm.com>
3508
3509 * doublest.h: Do not include "floatformat.h". Remove stale comments.
3510 * gdbtypes.c: Include "floatformat.h".
3511 * value.c: Likewise.
3512 * m68k-tdep.c: Likewise.
3513
3514 * findvar.c: Do not include "floatformat.h".
3515 * amd64-darwin-tdep.c: Likewise.
3516 * arm-linux-tdep.c: Likewise.
3517 * i386-darwin-tdep.c: Likewise.
3518 * i387-tdep.c: Likewise.
3519 * m68k-linux-tdep.c: Likewise.
3520 * mep-tdep.c: Likewise.
3521 * mips-tdep.c: Likewise.
3522 * nios2-tdep.c: Likewise.
3523 * s390-linux-tdep.c: Likewise.
3524 * sparc-obsd-tdep.c: Likewise.
3525 * sparc-tdep.c: Likewise.
3526 * sparc64-tdep.c: Likewise.
3527 * spu-tdep.c: Likewise.
3528 * tic6x-tdep.c: Likewise.
3529 * tilegx-tdep.c: Likewise.
3530 * vax-tdep.c: Likewise.
3531 * xstormy16-tdep.c: Likewise.
3532 * xtensa-tdep.c: Likewise.
3533
3534 * top.c: Do not include "doublest.h".
3535 * aarch64-tdep.c: Likewise.
3536 * alpha-tdep.c: Likewise.
3537 * arm-linux-tdep.c: Likewise.
3538 * m68k-linux-tdep.c: Likewise.
3539 * tilegx-tdep.c: Likewise.
3540 * xstormy16-tdep.c: Likewise.
3541
3542 2017-10-05 John Baldwin <jhb@FreeBSD.org>
3543
3544 * mips-fbsd-tdep.c (MIPS_INST_ADDIU_A0_SP_N32): Define.
3545 (mipsn32_fbsd_sigframe): Define.
3546 (mips_fbsd_init_abi): Install mipsn32_fbsd_sigframe unwinder
3547 for FreeBSD/mipsn32.
3548
3549 2017-10-05 John Baldwin <jhb@FreeBSD.org>
3550
3551 * fbsd-tdep.c (fbsd_print_auxv_entry): Handle AT_EHDRFLAGS and
3552 AT_HWCAP.
3553
3554 2017-10-05 Tristan Gingold <tgingold@free.fr>
3555
3556 * MAINTAINERS (Misc): Update my email address.
3557
3558 2017-10-04 Pedro Alves <palves@redhat.com>
3559
3560 * remote.c (get_remote_arch_state): New 'gdbarch' parameter. Use
3561 it instead of target_gdbarch.
3562 (get_remote_state, get_remote_packet_size): Adjust
3563 get_remote_arch_state calls, passing down target_gdbarch
3564 explicitly.
3565 (packet_reg_from_regnum, packet_reg_from_pnum): New parameter
3566 'gdbarch' and use it instead of target_gdbarch.
3567 (get_memory_packet_size): Adjust get_remote_arch_state calls,
3568 passing down target_gdbarch explicitly.
3569 (struct stop_reply) <arch>: New field.
3570 (remote_parse_stop_reply): Use the stopped thread's architecture,
3571 not the current inferior's. Save the architecture in the
3572 stop_reply.
3573 (process_stop_reply): Use the stop reply's architecture.
3574 (process_g_packet, remote_fetch_registers)
3575 (remote_prepare_to_store, store_registers_using_G)
3576 (remote_store_registers): Adjust get_remote_arch_state calls,
3577 using the regcache's architecture.
3578 (remote_get_trace_status): Adjust get_remote_arch_state calls,
3579 passing down target_gdbarch explicitly.
3580 * spu-multiarch.c (spu_thread_architecture): Defer to the target
3581 beneath instead of calling target_gdbarch.
3582 * target.c (default_thread_architecture): Use the specified
3583 inferior's architecture, instead of the current inferior's
3584 architecture (via target_gdbarch).
3585
3586 2017-10-04 Pedro Alves <palves@redhat.com>
3587
3588 * regcache.c (get_thread_arch_regcache): Remove null_ptid special
3589 case.
3590 (regcache_print): Handle !target_has_registers here instead.
3591
3592 2017-10-04 Pedro Alves <palves@redhat.com>
3593
3594 * frame.c (create_test_frame): Delete.
3595 * frame.h (create_test_frame): Delete.
3596 * gdbarch-selftests.c: Include gdbthread.h and target.h.
3597 (class regcache_test): Delete.
3598 (test_target_has_registers, test_target_has_stack)
3599 (test_target_has_memory, test_target_prepare_to_store)
3600 (test_target_store_registers): New functions.
3601 (test_target_ops): New class.
3602 (register_to_value_test): Error out if there's already a
3603 process_stratum (or higher) target pushed. Create a fuller mock
3604 environment, with mock target_ops, inferior, address space, thread
3605 and inferior_ptid.
3606 * progspace.c (struct address_space): Move to ...
3607 * progspace.h (struct address_space): ... here.
3608 * regcache.h (regcache::~regcache, regcache::raw_write)
3609 [GDB_SELF_TEST]: No longer virtual.
3610
3611 2017-10-04 Simon Marchi <simon.marchi@ericsson.com>
3612
3613 * mi/mi-main.c (list_available_thread_groups): Reverse filter logic.
3614
3615 2017-10-04 Pedro Alves <palves@redhat.com>
3616
3617 * guile/scm-breakpoint.c (gdbscm_breakpoint_commands): Move code
3618 out of 'between TRY and CATCH'.
3619
3620 2017-10-04 Pedro Alves <palves@redhat.com>
3621
3622 * cli/cli-cmds.c (complete_command): Add missing END_CATCH.
3623 * common/common-exceptions.h (TRY): Open an outermost scope.
3624 Expand intro comment.
3625 (CATCH): Reindent.
3626 (END_CATCH): Close the outermost scope.
3627 * completer.c (complete_line_internal): Add missing END_CATCH.
3628
3629 2017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
3630
3631 * NEWS (Changes since GDB 8.0): Add entry about new
3632 'set-cwd-on-gdbserver' feature.
3633 (New remote packets): Add entry for QSetWorkingDir.
3634 * common/common-inferior.h (set_inferior_cwd): New prototype.
3635 * infcmd.c (set_inferior_cwd): Remove "static".
3636 (show_cwd_command): Expand text to include remote debugging.
3637 * remote.c: Add PACKET_QSetWorkingDir.
3638 (remote_protocol_features) <QSetWorkingDir>: New entry for
3639 PACKET_QSetWorkingDir.
3640 (extended_remote_set_inferior_cwd): New function.
3641 (extended_remote_create_inferior): Call
3642 "extended_remote_set_inferior_cwd".
3643 (_initialize_remote): Call "add_packet_config_cmd" for
3644 QSetWorkingDir.
3645
3646 2017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
3647
3648 * NEWS (New commands): Mention "set/show cwd".
3649 * cli/cli-cmds.c (_initialize_cli_cmds): Mention "set cwd" on
3650 "cd" command's help text.
3651 * common/common-inferior.h (get_inferior_cwd): New prototype.
3652 * infcmd.c (inferior_cwd_scratch): New global variable.
3653 (set_inferior_cwd): New function.
3654 (get_inferior_cwd): Likewise.
3655 (set_cwd_command): Likewise.
3656 (show_cwd_command): Likewise.
3657 (_initialize_infcmd): Add "set/show cwd" commands.
3658 * inferior.h (class inferior) <cwd>: New field.
3659 * nat/fork-inferior.c: Include "gdb_tilde_expand.h".
3660 (fork_inferior): Change inferior's cwd before its execution.
3661 * windows-nat.c (windows_create_inferior): Pass inferior's cwd
3662 to CreateProcess.
3663
3664 2017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
3665
3666 * Makefile.in (SFILES): Add gdb_tilde_expand.c.
3667 (HFILES_NO_SRCDIR): Add gdb_tilde_expand.h.
3668 (COMMON_OBS): Add gdb_tilde_expand.o.
3669 * common/gdb_tilde_expand.c: New file.
3670 * common/gdb_tilde_expand.h: Likewise.
3671
3672 2017-10-03 Maciej W. Rozycki <macro@imgtec.com>
3673
3674 * gdbarch.sh (objfile): Remove duplicate declaration.
3675 * gdbarch.h: Regenerate.
3676
3677 2017-10-03 Tom Tromey <tom@tromey.com>
3678
3679 * utils.c (internal_vproblem): Use string_vprintf.
3680
3681 2017-10-03 Tom Tromey <tom@tromey.com>
3682
3683 * printcmd.c (info_symbol_command): Use std::string.
3684
3685 2017-10-03 Tom Tromey <tom@tromey.com>
3686
3687 * top.c (gdb_safe_append_history): Use std::string.
3688
3689 2017-10-03 Tom Tromey <tom@tromey.com>
3690
3691 * event-top.c (stdin_event_handler): Update.
3692 * main.c (captured_main_1): Update.
3693 * top.h (make_delete_ui_cleanup): Remove.
3694 (struct ui): Add constructor and destructor.
3695 (new_ui, delete_ui): Remove.
3696 * top.c (make_delete_ui_cleanup): Remove.
3697 (new_ui_command): Use std::unique_ptr.
3698 (delete_ui_cleanup): Remove.
3699 (ui::ui): Rename from new_ui. Update.
3700 (free_ui): Remove.
3701 (ui::~ui): Rename from delete_ui. Update.
3702
3703 2017-10-03 Tom Tromey <tom@tromey.com>
3704
3705 * symfile.c (load_progress): Use gdb::byte_vector.
3706
3707 2017-10-03 Tom Tromey <tom@tromey.com>
3708
3709 * mi/mi-main.c (mi_cmd_trace_frame_collected): Remove unused
3710 declaration.
3711 * printcmd.c (x_command): Remove unused declaration.
3712 * symfile.c (symbol_file_command): Remove unused declaration.
3713
3714 2017-10-03 Tom Tromey <tom@tromey.com>
3715
3716 * utils.c (internal_vproblem): Use std::string.
3717 (defaulted_query): Likewise.
3718
3719 2017-10-03 Tom Tromey <tom@tromey.com>
3720
3721 * guile/scm-ports.c (ioscm_with_output_to_port_worker): Update.
3722 * top.c (execute_command_to_string): Update.
3723 * utils.c (make_cleanup_restore_page_info): Remove.
3724 (do_restore_page_info_cleanup): Remove.
3725 (set_batch_flag_and_restore_page_info):
3726 New.
3727 (make_cleanup_restore_page_info): Remove.
3728 (set_batch_flag_and_make_cleanup_restore_page_info): Remove.
3729 (~set_batch_flag_and_restore_page_info): New
3730 (make_cleanup_restore_uinteger): Remove.
3731 (make_cleanup_restore_integer): Remove.
3732 (struct restore_integer_closure): Remove.
3733 (restore_integer): Remove.
3734 * utils.h (struct set_batch_flag_and_restore_page_info): New
3735 class.
3736 (set_batch_flag_and_make_cleanup_restore_page_info): Remove.
3737 (make_cleanup_restore_page_info): Remove.
3738 (make_cleanup_restore_uinteger) Remove.
3739 (make_cleanup_restore_integer) Remove.
3740
3741 2017-10-03 Tom Tromey <tom@tromey.com>
3742
3743 * record-full.h (record_full_gdb_operation_disable_set): Return
3744 scoped_restore_tmpl<int>.
3745 * infrun.c (adjust_pc_after_break): Update.
3746 (handle_signal_stop): Update.
3747 * record-full.c (record_full_gdb_operation_disable_set): Return
3748 scoped_restore_tmpl<int>.
3749 (record_full_wait_1, record_full_insert_breakpoint)
3750 (record_full_remove_breakpoint, record_full_save)
3751 (record_full_goto_insn): Update.
3752
3753 2017-10-02 Tom Tromey <tom@tromey.com>
3754
3755 PR rust/22236:
3756 * rust-lang.c (rust_val_print_str): New function.
3757 (val_print_struct): Call it.
3758 (rust_subscript): Preserve name of slice type.
3759
3760 2017-10-02 Tom Tromey <tom@tromey.com>
3761
3762 * rust-lang.c (rust_subscript): Handle slices in
3763 EVAL_AVOID_SIDE_EFFECTS case.
3764
3765 2017-10-02 Tom Tromey <tom@tromey.com>
3766
3767 * rust-lang.c (rust_slice_type_p): Recognize &str as a slice type.
3768
3769 2017-10-02 Tom Tromey <tom@tromey.com>
3770
3771 * rust-lang.h (rust_slice_type): Add "extern".
3772
3773 2017-10-02 Tom Tromey <tom@tromey.com>
3774 Pedro Alves <palves@redhat.com>
3775
3776 * ada-lang.h (ada_exc_info::operator<): Make const.
3777 (ada_exc_info::operator==): Make const.
3778 * ada-lang.c (ada_exc_info::operator<, ada_exc_info::operator==):
3779 Make const.
3780
3781 2017-09-29 Tom Tromey <tom@tromey.com>
3782
3783 * target.c (read_whatever_is_readable): Change type of "result".
3784 Update.
3785 (free_memory_read_result_vector): Remove.
3786 (read_memory_robust): Change return type. Update.
3787 * mi/mi-main.c (mi_cmd_data_read_memory_bytes): Update. Use
3788 bin2hex, std::string.
3789 * target.h (memory_read_result_s): Remove typedef.
3790 (free_memory_read_result_vector): Remove.
3791 (read_memory_robust): Return std::vector.
3792
3793 2017-09-29 Tom Tromey <tom@tromey.com>
3794
3795 * mi/mi-main.c (captured_mi_execute_command): Use scope_restore.
3796
3797 2017-09-29 Tom Tromey <tom@tromey.com>
3798
3799 * mi/mi-cmd-info.c (mi_cmd_info_ada_exceptions): Update.
3800 * ada-lang.h (struct ada_exc_info): Remove typedef. Declare
3801 operator< and operator==.
3802 (ada_exceptions_list): Return a std::vector.
3803 * ada-lang.c (ada_exc_info::operator<): Rename from
3804 compare_ada_exception_info.
3805 (ada_exc_info::operator==): New.
3806 (sort_remove_dups_ada_exceptions_list): Change type of
3807 "exceptions".
3808 (ada_add_standard_exceptions, ada_add_exceptions_from_frame)
3809 (ada_add_global_exceptions): Likewise.
3810 (ada_exceptions_list_1): Return a std::vector.
3811 (ada_exceptions_list): Likewise.
3812
3813 2017-09-29 Tom Tromey <tom@tromey.com>
3814
3815 * mi/mi-main.c (struct print_one_inferior_data) <inferiors>: Now a
3816 'std::set *'.
3817 (print_one_inferior): Update.
3818 (free_vector_of_ints): Remove.
3819 (list_available_thread_groups): Change "ids" to std::set.
3820 (mi_cmd_list_thread_groups): Update.
3821 (struct collect_cores_data) <core>: Now a std::set.
3822 (collect_cores): Update.
3823 (unique): Remove.
3824 (print_one_inferior): Update.
3825
3826 2017-09-29 Tom Tromey <tom@tromey.com>
3827
3828 * mi/mi-main.c (mi_execute_cli_command): Use std::string.
3829 (mi_execute_async_cli_command): Likewise.
3830 (mi_cmd_trace_frame_collected): Use field_fmt.
3831
3832 2017-09-29 Tom Tromey <tom@tromey.com>
3833
3834 * mi/mi-main.c (mi_cmd_data_write_memory_bytes): Use
3835 gdb::byte_vector.
3836
3837 2017-09-29 Tom Tromey <tom@tromey.com>
3838
3839 * mi/mi-parse.c (mi_parse): Remove unused declaration.
3840
3841 2017-09-29 Tom Tromey <tom@tromey.com>
3842
3843 * mi/mi-cmd-disas.c (mi_cmd_disassemble): Don't copy "oarg".
3844
3845 2017-09-29 Tom Tromey <tom@tromey.com>
3846
3847 * varobj.h (varobj_gen_name): Return std::string.
3848 * varobj.c (varobj_gen_name): Return std::string.
3849 * mi/mi-cmd-var.c (mi_cmd_var_create): Use std::string.
3850 (mi_cmd_var_delete): Don't copy "name".
3851
3852 2017-09-29 Tom Tromey <tom@tromey.com>
3853
3854 * mi/mi-cmd-break.c (mi_argv_to_format): Return std::string.
3855 (mi_cmd_break_insert_1): Update.
3856
3857 2017-09-29 Tom Tromey <tom@tromey.com>
3858
3859 * target.h (make_scoped_defer_target_commit_resume): Update.
3860 * target.c (make_scoped_defer_target_commit_resume): Rename from
3861 make_cleanup_defer_target_commit_resume. Return a
3862 scoped_restore.
3863 * infrun.c (proceed): Use make_scoped_defer_target_commit_resume.
3864
3865 2017-09-29 Tom Tromey <tom@tromey.com>
3866
3867 * main.c (captured_main_1): Remove unused declaration.
3868 * spu-multiarch.c (parse_spufs_run): Remove unused declaration.
3869
3870 2017-09-29 Tom Tromey <tom@tromey.com>
3871
3872 * symtab.c (search_symbols): Remove unused outer cleanup.
3873 (make_source_files_completion_list): Remove unused declaration.
3874
3875 2017-09-29 Tom Tromey <tom@tromey.com>
3876
3877 * mt-tdep.c (mt_push_dummy_call): Use gdb::byte_vector.
3878
3879 2017-09-29 Tom Tromey <tom@tromey.com>
3880
3881 * xstormy16-tdep.c (xstormy16_push_dummy_call): Use
3882 gdb::byte_vector.
3883
3884 2017-09-29 Tom Tromey <tom@tromey.com>
3885
3886 * complaints.c (vcomplaint): Use std::string.
3887
3888 2017-09-29 Tom Tromey <tom@tromey.com>
3889
3890 * tracepoint.c (trace_variable_command): Use std::string.
3891 (encode_actions_1): Remove unused declarations.
3892 (create_tsv_from_upload): Use std::string.
3893
3894 2017-09-29 Tom Tromey <tom@tromey.com>
3895
3896 * cp-support.c (gdb_demangle): Use std::string.
3897
3898 2017-09-29 Tom Tromey <tom@tromey.com>
3899
3900 * stack.c (parse_frame_specification): Use std::string
3901 (info_frame_command): Use gdb::unique_xmalloc_ptr.
3902
3903 2017-09-29 Tom Tromey <tom@tromey.com>
3904
3905 * tilegx-tdep.c (tilegx_push_dummy_call): Use gdb::byte_vector.
3906
3907 2017-09-29 Tom Tromey <tom@tromey.com>
3908
3909 * utils.c (vfprintf_maybe_filtered): Use std::string.
3910 (vfprintf_unfiltered): Likewise.
3911
3912 2017-09-29 Tom Tromey <tom@tromey.com>
3913
3914 * event-top.c (top_level_prompt): Return std::string.
3915 (display_gdb_prompt): Update.
3916
3917 2017-09-29 Tom Tromey <tom@tromey.com>
3918
3919 * unittests/common-utils-selftests.c (format): New function.
3920 (string_vprintf_tests): New function.
3921 (_initialize_common_utils_selftests): Register new tests.
3922 * common/common-utils.c (string_vprintf): New function.
3923 * common/common-utils.h (string_vprintf): Declare.
3924
3925 2017-09-29 Pedro Alves <palves@redhat.com>
3926
3927 * common/rsp-low.c (unpack_varlen_hex): Constify.
3928 * common/rsp-low.h (unpack_varlen_hex): Constify.
3929 * linux-nat.c (linux_child_static_tracepoint_markers_by_strid):
3930 Constify.
3931 * remote.c (remote_set_permissions, read_ptid)
3932 (remote_current_thread, remote_get_threads_with_qthreadinfo)
3933 (remote_static_tracepoint_marker_at)
3934 (remote_static_tracepoint_markers_by_strid)
3935 (stop_reply_extract_thread, remote_parse_stop_reply): Constify.
3936 * tracepoint.c (parse_trace_status, parse_tracepoint_status)
3937 (parse_tracepoint_definition, parse_tsv_definition)
3938 (parse_static_tracepoint_marker_definition): Constify.
3939 * tracepoint.h (parse_static_tracepoint_marker_definition)
3940 (parse_trace_status, parse_tracepoint_status)
3941 (parse_tracepoint_definition, parse_tsv_definition): Constify.
3942
3943 2017-09-29 Pedro Alves <palves@redhat.com>
3944
3945 * remote.c (target_buf, target_buf_size): Delete.
3946 (remote_get_noisy_reply): Remove buf_p and sizeof_buf parameters.
3947 Use the connection's packet buffer instead.
3948 All callers adjusted.
3949 (_initialize_remote): Remove references to target_buf and
3950 target_buf_size.
3951
3952 2017-09-28 Pedro Alves <palves@redhat.com>
3953
3954 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
3955 unittests/common-utils-selftests.c.
3956 (SUBDIR_UNITTESTS_OBS): Add common-utils-selftests.o.
3957 (COMMON_OBS): Remove utils-selftests.o.
3958 * utils-selftests.c: Move to ...
3959 * unittests/common-utils-selftests.c: ... here and rename self
3960 test to "string_printf".
3961
3962 2017-09-28 Alexander Shaposhnikov <alexander.v.shaposhnikov@gmail.com> (tiny patch)
3963
3964 * dwarf2read.c (open_and_init_dwp_file): Protect against dwp_file
3965 having NULL cus or tus.
3966
3967 2017-09-27 Ulrich Weigand <uweigand@de.ibm.com>
3968
3969 * arm-tdep.c: (convert_from_extended): Remove.
3970 (convert_to_extended): Likewise.
3971 (arm_extract_return_value): Use convert_typed_floating.
3972 (arm_store_return_value): Likewise.
3973
3974 * sh-tdep.h (struct gdbarch_tdep): Add sh_littlebyte_bigword_type.
3975 * sh-tdep.c: Do not include "floatformat.h".
3976 (sh_littlebyte_bigword_type): New function.
3977 (sh_register_convert_to_virtual): Use convert_typed_floating.
3978 (sh_register_convert_to_raw): Likewise.
3979 * sh64-tdep.c: (struct gdbarch_tdep): Add sh_littlebyte_bigword_type.
3980 (sh64_littlebyte_bigword_type): New function.
3981 (sh64_extract_return_value): Use convert_typed_floating.
3982 (sh64_register_convert_to_virtual): Likewise.
3983 (sh64_register_convert_to_raw): Likewise.
3984
3985 2017-09-27 Ulrich Weigand <uweigand@de.ibm.com>
3986
3987 * doublest.h (floatformat_from_type): Move to gdbtypes.h.
3988 * doublest.c (floatformat_from_type): Move to gdbtypes.c.
3989
3990 * gdbtypes.h (union type_specific): Make field floatformat hold
3991 just a single struct floatformat, not an array.
3992 (floatformat_from_type): Move here.
3993 * gdbtypes.c (floatformat_from_type): Move here. Update to
3994 changed TYPE_FLOATFORMAT definition.
3995 (verify_floatformat): Update to changed TYPE_FLOATFORMAT.
3996 (recursive_dump_type): Likewise.
3997 (init_float_type): Install correct floatformat for byte order.
3998 (arch_float_type): Likewise.
3999
4000 2017-09-27 Ulrich Weigand <uweigand@de.ibm.com>
4001
4002 * gdbtypes.c (init_type): Change incoming argument from
4003 length-in-bytes to length-in-bits. Assert length is a
4004 multiple of TARGET_CHAR_BITS.
4005 (arch_type, arch_flags_type): Likewise.
4006 (init_integer_type): Update call to init_type.
4007 (init_character_type): Likewise.
4008 (init_boolean_type): Likewise.
4009 (init_float_type): Likewise.
4010 (init_decfloat_type): Likewise.
4011 (init_complex_type): Likewise.
4012 (init_pointer_type): Likewise.
4013 (objfile_type): Likewise.
4014 (arch_integer_type): Update call to arch_type.
4015 (arch_character_type): Likewise.
4016 (arch_boolean_type): Likewise.
4017 (arch_float_type): Likewise.
4018 (arch_decfloat_type): Likewise.
4019 (arch_complex_type): Likewise.
4020 (arch_pointer_type): Likewise.
4021 (gdbtypes_post_init): Likewise.
4022
4023 * dwarf2read.c (dwarf2_init_float_type): Update call to init_type.
4024 (read_base_type): Likewise.
4025 * mdebugread.c (basic_type): Likewise.
4026 * stabsread.c (dbx_init_float_type): Likewise.
4027 (rs6000_builtin_type): Likewise.
4028 (read_range_type): Likewise. Also, fix call to init_integer_type
4029 with erroneous length argument.
4030
4031 * ada-lang.c (ada_language_arch_info): Update call to arch_type.
4032 * d-lang.c (build_d_types): Likewise.
4033 * f-lang.c (build_fortran_types): Likewise.
4034 * go-lang.c (build_go_types): Likewise.
4035 * opencl-lang.c (build_opencl_types): Likewise.
4036 * jit.c (finalize_symtab): Likewise.
4037 * gnu-v3-abi.c (build_gdb_vtable_type): Likewise.
4038 (build_std_type_info_type): Likewise.
4039 * target-descriptions.c (tdesc_gdb_type): Likewise. Also,
4040 update call to arch_flags_type.
4041
4042 * linux-tdep.c (linux_get_siginfo_type_with_fields): Update call to
4043 arch_type.
4044 * fbsd-tdep.c (fbsd_get_siginfo_type): Likewise.
4045 * windows-tdep.c (windows_get_tlb_type): Likewise.
4046
4047 * avr-tdep.c (avr_gdbarch_init): Update call to arch_type.
4048 * ft32-tdep.c (ft32_gdbarch_init): Likewise.
4049 * m32c-tdep.c (make_types): Likewise.
4050 * rl78-tdep.c (rl78_gdbarch_init): Likewise.
4051 (rl78_psw_type): Update call to arch_flags_type.
4052 * m68k-tdep.c (m68k_ps_type): Update call to arch_flags_type.
4053 * rx-tdep.c (rx_psw_type): Likewise.
4054 (rx_fpsw_type): Likewise.
4055 * sparc-tdep.c (sparc_psr_type): Likewise.
4056 (sparc_fsr_type): Likewise.
4057 * sparc64-tdep.c (sparc64_pstate_type): Likewise.
4058 (sparc64_ccr_type): Likewise.
4059 (sparc64_fsr_type): Likewise.
4060 (sparc64_fprs_type): Likewise.
4061
4062 2017-09-27 Tom Tromey <tom@tromey.com>
4063
4064 * findcmd.c (find_command): Constify.
4065
4066 2017-09-27 Tom Tromey <tom@tromey.com>
4067
4068 * ada-tasks.c (task_command_1, task_command): Constify.
4069
4070 2017-09-27 Tom Tromey <tom@tromey.com>
4071
4072 * symtab.c (maintenance_print_symbol_cache)
4073 (maintenance_flush_symbol_cache)
4074 (maintenance_print_symbol_cache_statistics): Constify.
4075
4076 2017-09-27 Tom Tromey <tom@tromey.com>
4077
4078 * inferior.c (detach_inferior_command, kill_inferior_command)
4079 (inferior_command): Constify.
4080
4081 2017-09-27 Tom Tromey <tom@tromey.com>
4082
4083 * regcache.c (regcache_print, maintenance_print_registers)
4084 (maintenance_print_raw_registers)
4085 (maintenance_print_cooked_registers)
4086 (maintenance_print_register_groups)
4087 (maintenance_print_remote_registers): Constify.
4088
4089 2017-09-27 Tom Tromey <tom@tromey.com>
4090
4091 * printcmd.c (map_display_numbers, undisplay_command)
4092 (enable_disable_display_command, enable_display_command)
4093 (disable_display_command): Constify.
4094
4095 2017-09-27 Tom Tromey <tom@tromey.com>
4096
4097 * breakpoint.h (delete_command): Don't declare.
4098 * breakpoint.c (delete_command, enable_once_command)
4099 (enable_count_command, enable_delete_command, breakpoint_1)
4100 (maintenance_info_breakpoints, stopin_command, stopat_command)
4101 (delete_command, delete_trace_command, save_breakpoints)
4102 (save_breakpoints_command, save_tracepoints_command): Constify.
4103
4104 2017-09-27 Tom Tromey <tom@tromey.com>
4105
4106 * macrocmd.c (macro_expand_command, macro_expand_once_command)
4107 (skip_ws, extract_identifier, macro_define_command)
4108 (macro_undef_command, macro_list_command): Constify.
4109
4110 2017-09-27 Tom Tromey <tom@tromey.com>
4111
4112 * infcmd.c (environment_info, set_environment_command)
4113 (unset_environment_command, path_info, info_proc_cmd_1)
4114 (info_proc_cmd_mappings, info_proc_cmd_stat)
4115 (info_proc_cmd_status, info_proc_cmd_cwd, info_proc_cmd_cmdline)
4116 (info_proc_cmd_exe, info_proc_cmd_all): Constify.
4117
4118 2017-09-27 Tom Tromey <tom@tromey.com>
4119
4120 * i386-tdep.c (i386_mpx_info_bounds, i386_mpx_set_bounds):
4121 Constify.
4122
4123 2017-09-27 Tom Tromey <tom@tromey.com>
4124
4125 * symfile-mem.c (add_symbol_file_from_memory_command): Constify.
4126
4127 2017-09-27 Tom Tromey <tom@tromey.com>
4128
4129 * demangle.c (demangle_command): Constify.
4130
4131 2017-09-27 Tom Tromey <tom@tromey.com>
4132
4133 * progspace.c (maintenance_info_program_spaces_command):
4134 Constify.
4135
4136 2017-09-27 Tom Tromey <tom@tromey.com>
4137
4138 * compile/compile.c (check_raw_argument, compile_file_command)
4139 (compile_code_command, compile_print_command): Constify.
4140
4141 2017-09-27 Tom Tromey <tom@tromey.com>
4142
4143 * reggroups.c (maintenance_print_reggroups): Constify.
4144
4145 2017-09-27 Tom Tromey <tom@tromey.com>
4146
4147 * dwarf2read.c (save_gdb_index_command): Constify.
4148
4149 2017-09-27 Tom Tromey <tom@tromey.com>
4150
4151 * stap-probe.c (info_probes_stap_command): Constify.
4152
4153 2017-09-27 Tom Tromey <tom@tromey.com>
4154
4155 * fork-child.c (unset_exec_wrapper_command): Constify.
4156
4157 2017-09-27 Tom Tromey <tom@tromey.com>
4158
4159 * btrace.c (get_uint, get_context_size, no_chunk)
4160 (maint_btrace_packet_history_cmd)
4161 (maint_btrace_clear_packet_history_cmd, maint_btrace_clear_cmd)
4162 (maint_info_btrace_cmd): Constify.
4163
4164 2017-09-27 Tom Tromey <tom@tromey.com>
4165
4166 * reverse.c (delete_bookmark_command): Constify.
4167
4168 2017-09-27 Tom Tromey <tom@tromey.com>
4169
4170 * remote.c (set_memory_packet_size)
4171 (set_memory_write_packet_size, show_memory_write_packet_size)
4172 (set_memory_read_packet_size, show_memory_read_packet_size)
4173 (compare_sections_command, packet_command, remote_put_command)
4174 (remote_get_command, remote_delete_command): Constify.
4175
4176 2017-09-27 Tom Tromey <tom@tromey.com>
4177
4178 * mips-tdep.c (show_mipsfpu_command, set_mipsfpu_single_command)
4179 (set_mipsfpu_double_command, set_mipsfpu_none_command)
4180 (set_mipsfpu_auto_command): Constify.
4181
4182 2017-09-27 Tom Tromey <tom@tromey.com>
4183
4184 * cli/cli-cmds.h (cd_command): Constify.
4185 * cli/cli-cmds.c (cd_command): Constify.
4186
4187 2017-09-27 Tom Tromey <tom@tromey.com>
4188
4189 * thread.c (thread_name_command, thread_find_command): Constify.
4190
4191 2017-09-27 Tom Tromey <tom@tromey.com>
4192
4193 * probe.c (enable_probes_command, disable_probes_command):
4194 Constify.
4195
4196 2017-09-27 Tom Tromey <tom@tromey.com>
4197
4198 * symfile.c (symbol_file_command): Constify.
4199 * gdbcore.h (deprecated_file_changed_hook): Constify.
4200 * exec.c (deprecated_file_changed_hook, exec_file_command)
4201 (file_command): Constify.
4202 * defs.h (symbol_file_command): Constify.
4203
4204 2017-09-27 Tom Tromey <tom@tromey.com>
4205
4206 * remote-fileio.c (set_system_call_allowed)
4207 (show_system_call_allowed): Constify.
4208
4209 2017-09-27 Tom Tromey <tom@tromey.com>
4210
4211 * tracepoint.c (delete_trace_variable_command)
4212 (tfind_end_command, tfind_start_command, tfind_pc_command)
4213 (tfind_tracepoint_command, tfind_line_command)
4214 (tfind_range_command, tfind_outside_command): Constify.
4215
4216 2017-09-27 Tom Tromey <tom@tromey.com>
4217
4218 * ax-gdb.c (maint_agent_printf_command, agent_command)
4219 (agent_eval_command): Constify.
4220
4221 2017-09-27 Tom Tromey <tom@tromey.com>
4222
4223 * tracepoint.c (info_scope_command): Constify.
4224 * python/python.c (gdbpy_decode_line): Constify.
4225 * python/py-breakpoint.c (bppy_init): Constify.
4226 * mi/mi-cmd-break.c (mi_cmd_break_insert_1): Constify.
4227 * location.h: (new_linespec_location)
4228 (string_to_event_location_basic, string_to_event_location):
4229 Constify.
4230 * location.c (new_linespec_location)
4231 (string_to_event_location_basic, string_to_event_location):
4232 Constify.
4233 * linespec.h (decode_line_with_current_source)
4234 (decode_line_with_last_displayed, linespec_lex_to_end): Constify.
4235 * linespec.c (linespec_lex_to_end)
4236 (decode_line_with_current_source)
4237 (decode_line_with_last_displayed): Constify.
4238 * guile/scm-breakpoint.c (gdbscm_register_breakpoint_x):
4239 Constify.
4240 * cli/cli-cmds.c (edit_command, list_command): Constify.
4241 * breakpoint.h (until_break_command, watch_command_wrapper)
4242 (awatch_command_wrapper, rwatch_command_wrapper)
4243 (init_ada_exception_breakpoint): Constify.
4244 * breakpoint.c (break_command_1, dprintf_command)
4245 (break_range_command, watch_command_wrapper)
4246 (rwatch_command_wrapper, awatch_command_wrapper)
4247 (until_break_command, init_ada_exception_breakpoint)
4248 (strace_marker_create_sals_from_location, trace_command)
4249 (ftrace_command, strace_command, struct tracepoint): Constify.
4250 * ax-gdb.c (agent_command_1): Constify.
4251 * ada-lang.c (ada_exception_sal): Constify.
4252
4253 2017-09-27 Tom Tromey <tom@tromey.com>
4254
4255 * record.c (cmd_record_delete, cmd_record_stop, cmd_record_save)
4256 (cmd_record_goto_begin, cmd_record_goto_end, get_insn_number)
4257 (get_context_size, no_chunk, get_insn_history_modifiers)
4258 (cmd_record_insn_history, get_call_history_modifiers)
4259 (cmd_record_call_history): Constify.
4260
4261 2017-09-27 Tom Tromey <tom@tromey.com>
4262
4263 * source.c (show_substitute_path_command)
4264 (unset_substitute_path_command, set_substitute_path_command):
4265 Constify.
4266
4267 2017-09-27 Tom Tromey <tom@tromey.com>
4268
4269 * typeprint.c (maintenance_print_type): Constify.
4270 * maint.c (maintenance_dump_me, maintenance_demangle)
4271 (maintenance_time_display, maintenance_info_sections)
4272 (maintenance_print_statistics, maintenance_deprecate)
4273 (maintenance_undeprecate): Constify.
4274 (maintenance_do_deprecate): Constify. Use std::string.
4275 (maintenance_selftest): Constify.
4276 * gdbtypes.h (maintenance_print_type): Constify.
4277
4278 2017-09-27 Tom Tromey <tom@tromey.com>
4279
4280 * hppa-tdep.c (unwind_command): Constify.
4281
4282 2017-09-27 Tom Tromey <tom@tromey.com>
4283
4284 * target-descriptions.c (unset_tdesc_filename_cmd)
4285 (maint_print_c_tdesc_cmd, maintenance_check_xml_descriptions):
4286 Constify.
4287
4288 2017-09-27 Tom Tromey <tom@tromey.com>
4289
4290 * dummy-frame.c (maintenance_print_dummy_frames): Constify.
4291
4292 2017-09-27 Tom Tromey <tom@tromey.com>
4293
4294 * tui/tui.c (tui_enable_command, tui_disable_command): Constify.
4295
4296 2017-09-27 Tom Tromey <tom@tromey.com>
4297
4298 * tui/tui-regs.c (tui_reg_command): Constify.
4299
4300 2017-09-27 Tom Tromey <tom@tromey.com>
4301
4302 * skip.c (skip_file_command, skip_function_command)
4303 (skip_enable_command, skip_disable_command, skip_delete_command):
4304 Constify.
4305
4306 2017-09-27 Tom Tromey <tom@tromey.com>
4307
4308 * record-btrace.c (cmd_record_btrace_bts_start)
4309 (cmd_record_btrace_pt_start): Constify.
4310
4311 2017-09-27 Tom Tromey <tom@tromey.com>
4312
4313 * symmisc.c (maintenance_print_symbols)
4314 (maintenance_print_msymbols, maintenance_print_objfiles)
4315 (maintenance_info_symtabs, maintenance_check_symtabs)
4316 (maintenance_expand_symtabs, maintenance_info_line_tables):
4317 Constify.
4318
4319 2017-09-27 Tom Tromey <tom@tromey.com>
4320
4321 * top.c (new_ui_command): Constify.
4322
4323 2017-09-27 Tom Tromey <tom@tromey.com>
4324
4325 * symfile.c (add_symbol_file_command)
4326 (remove_symbol_file_command, list_overlays_command)
4327 (map_overlay_command, unmap_overlay_command)
4328 (overlay_auto_command, overlay_manual_command)
4329 (overlay_off_command, overlay_load_command): Constify.
4330
4331 2017-09-27 Tom Tromey <tom@tromey.com>
4332
4333 * spu-tdep.c (info_spu_event_command, info_spu_signal_command)
4334 (info_spu_mailbox_command, info_spu_dma_command)
4335 (info_spu_proxydma_command): Constify.
4336
4337 2017-09-27 Tom Tromey <tom@tromey.com>
4338
4339 * cli/cli-logging.c (set_logging_on, set_logging_off): Constify.
4340
4341 2017-09-27 Tom Tromey <tom@tromey.com>
4342
4343 * cli/cli-script.c (user_defined_command): Constify.
4344
4345 2017-09-27 Tom Tromey <tom@tromey.com>
4346
4347 * cli/cli-dump.c (dump_memory_command, dump_value_command)
4348 (dump_srec_memory, dump_srec_value, dump_ihex_memory)
4349 (dump_ihex_value, dump_verilog_memory, dump_verilog_value)
4350 (dump_tekhex_memory, dump_tekhex_value, dump_binary_memory)
4351 (dump_binary_value, append_binary_memory, append_binary_value):
4352 Constify.
4353 (struct dump_context) <func>: Constify.
4354 (add_dump_command): Update.
4355
4356 2017-09-27 Tom Tromey <tom@tromey.com>
4357
4358 * cli/cli-cmds.c (show_version, show_configuration)
4359 (source_command, show_user): Constify.
4360
4361 2017-09-27 Tom Tromey <tom@tromey.com>
4362
4363 * target.c (maintenance_print_target_stack): Constify.
4364
4365 2017-09-27 Tom Tromey <tom@tromey.com>
4366
4367 * interps.c (interpreter_exec_cmd): Constify.
4368
4369 2017-09-27 Tom Tromey <tom@tromey.com>
4370
4371 * record-full.c (cmd_record_full_restore): Constify.
4372
4373 2017-09-27 Tom Tromey <tom@tromey.com>
4374
4375 * memattr.c (enable_mem_command, disable_mem_command)
4376 (delete_mem_command): Constify.
4377
4378 2017-09-27 Tom Tromey <tom@tromey.com>
4379
4380 * value.c (show_convenience): Constify.
4381
4382 2017-09-27 Tom Tromey <tom@tromey.com>
4383
4384 * gdbcore.h (core_file_command): Update.
4385 * corefile.c (core_file_command): Constify.
4386
4387 2017-09-27 Tom Tromey <tom@tromey.com>
4388
4389 * user-regs.c (maintenance_print_user_registers): Constify.
4390
4391 2017-09-27 Tom Tromey <tom@tromey.com>
4392
4393 * cp-namespace.c (maintenance_cplus_namespace): Constify.
4394
4395 2017-09-27 Tom Tromey <tom@tromey.com>
4396
4397 * cp-support.c (first_component_command): Constify.
4398
4399 2017-09-27 Tom Tromey <tom@tromey.com>
4400
4401 * psymtab.c (maintenance_print_psymbols)
4402 (maintenance_info_psymtabs, maintenance_check_psymtabs):
4403 Constify.
4404
4405 2017-09-27 Tom Tromey <tom@tromey.com>
4406
4407 * windows-tdep.c (display_tib): Constify.
4408
4409 2017-09-27 Tom Tromey <tom@tromey.com>
4410
4411 * linux-fork.c (delete_checkpoint_command)
4412 (detach_checkpoint_command): Constify.
4413
4414 2017-09-27 Tom Tromey <tom@tromey.com>
4415
4416 * cp-abi.c (set_cp_abi_cmd, show_cp_abi_cmd): Constify.
4417
4418 2017-09-27 Tom Tromey <tom@tromey.com>
4419
4420 * arc-tdep.c (dump_arc_instruction_command): Constify.
4421
4422 2017-09-27 Tom Tromey <tom@tromey.com>
4423
4424 * valprint.c (set_radix, show_radix): Constify.
4425
4426 2017-09-27 Tom Tromey <tom@tromey.com>
4427
4428 * dtrace-probe.c (info_probes_dtrace_command): Constify.
4429
4430 2017-09-27 Tom Tromey <tom@tromey.com>
4431
4432 * command.h (not_just_help_class_command): Update.
4433 * cli/cli-decode.h (not_just_help_class_command): Update.
4434 * cli/cli-decode.c (not_just_help_class_command): Constify.
4435
4436 2017-09-27 Tom Tromey <tom@tromey.com>
4437
4438 * gdb_bfd.c (maintenance_info_bfds): Constify.
4439
4440 2017-09-27 Tom Tromey <tom@tromey.com>
4441
4442 * cli/cli-decode.c (add_cmd, set_cmd_cfunc): New function
4443 overloads.
4444 (do_add_cmd): Rename from add_cmd. Don't call set_cmd_cfunc.
4445 (do_const_cfunc): New function.
4446 (cmd_cfunc_eq): New overload.
4447 (cli_user_command_p): Check do_const_cfunc.
4448 * cli/cli-decode.h (struct cmd_list_element) <function>: New field
4449 const_cfunc.
4450 * command.h (add_cmd): Add const overload and no-function
4451 overload.
4452 (set_cmd_cfunc): Add const overload.
4453 (cmd_const_cfunc_ftype): Declare.
4454 (cmd_cfunc_eq): Add const overload.
4455 * breakpoint.c, cli-cmds.c, cli-dump.c, guile/scm-cmd.c,
4456 python/py-cmd.c, target.c, tracepoint.c: Use no-function add_cmd
4457 overload.
4458
4459 2017-09-27 Tom Tromey <tom@tromey.com>
4460
4461 * macroexp.c (get_next_token_for_substitution): New function.
4462 (substitute_args): Call it. Check for __VA_OPT__.
4463
4464 2017-09-26 Walfred Tedeschi <walfred.tedeschi@intel.com>
4465 Pedro Alves <palves@redhat.com>
4466
4467 * dwarf2read.c (dwarf2_cu): Remove field producer_is_icc and add
4468 producer_is_icc_lt_14.
4469 (producer_is_icc_lt_14): New function.
4470 (check_producer): Add code for checking version of ICC.
4471 (producer_is_icc): Move to producer.c.
4472 (read_structure_type): Restrict ICC workaround to ICC<14.
4473 * producer.c: Include selftest.h.
4474 (producer_is_icc, producer_parsing_tests, _initialize_producer):
4475 New functions.
4476 * producer.h (producer_is_icc): New declaration.
4477
4478 2017-09-26 Walfred Tedeschi <walfred.tedeschi@intel.com>
4479
4480 * Makefile.in (SFILES): Add producer.c.
4481 (COMMON_OBS): Add producer.o
4482 * amd64-tdep.c (producer.h): Add new include.
4483 * dwarf2read.c (producer.h): Add new include.
4484 * producer.c: New file.
4485 * producer.h: New file.
4486 * utils.c (producer_is_gcc, producer_is_gcc_ge_4): Move to
4487 producer.c.
4488 * utils.h (producer_is_gcc, producer_is_gcc_ge_4): Move to
4489 producer.h.
4490
4491 2017-09-26 Matthias Klose <doko@ubuntu.com>
4492
4493 * configure.ac: Search ncursesw before ncurses.
4494 Check ncursesw/ncurses.h before ncurses/ncurses.h.
4495 * gdb_curses.h: Include <ncursesw/ncurses.h>
4496 * config.in, configure: Regenerate.
4497
4498 2017-09-26 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
4499
4500 PR gdb/22185
4501 * configure.host <*-*-solaris2.[01], *-*-solaris2.[2-9]*>: Mark as
4502 obsolete.
4503 Use gdb_host sol2 for i[34567]86-*-solaris2*, x86_64-*-solaris2*.
4504 Remove i386sol2 support.
4505 * configure.nat <i386sol2>: Remove.
4506 <sol2-64>: Fold into ...
4507 <sol2>: ... this.
4508 Move common settings to default section.
4509 Add sol-thread.o.
4510 * configure.tgt <i[34567]86-*-solaris2.1[0-9]*,
4511 x86_64-*-solaris2.1[0-9]*>: Rename to ...
4512 <i[34567]86-*-solaris2*, x86_64-*-solaris2*>: ... this.
4513 <i[34567]86-*-solaris*>: Remove.
4514 <sparc-*-solaris2.[0-6], sparc-*-solaris2.[0-6].*>: Remove.
4515
4516 * configure.ac: Remove wctype in libw check.
4517 (_MSE_INT_H): Don't define on Solaris 7-9.
4518 <solaris*>: Remove libthread_db.so.1 check.
4519 * configure: Regenerate.
4520 * config.in: Regenerate.
4521
4522 * proc-service.c: Remove PROC_SERVICE_IS_OLD handling.
4523 (gdb_ps_prochandle_t, gdb_ps_read_buf_t, gdb_ps_write_buf_t)
4524 (gdb_ps_size_t): Remove.
4525 Use base types in users.
4526 * sol-thread.c: Likewise, also for gdb_ps_addr_t.
4527
4528 * NEWS (Changes since GDB 8.0): Document Solaris 2.0-9 removal.
4529
4530 2017-09-26 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
4531
4532 PR build/22206
4533 * sparc64-tdep.c (adi_tag_fd): Print pid as long.
4534 (adi_is_addr_mapped): Likewise.
4535 (PSR_ICC): Don't redefine.
4536 (PSR_IMPL): Likewise.
4537
4538 2017-09-25 Tom Tromey <tom@tromey.com>
4539
4540 * regcache.c (regcache::dump): Use string_printf.
4541
4542 2017-09-25 Tom Tromey <tom@tromey.com>
4543
4544 * regcache.c (class regcache_invalidator): New.
4545 (struct register_to_invalidate): Remove.
4546 (make_cleanup_regcache_invalidate): Remove.
4547 (regcache::raw_write): Use regcache_invalidator.
4548
4549 2017-09-25 Tom Tromey <tom@tromey.com>
4550
4551 * spu-tdep.c (spu2ppu_sniffer): Update.
4552 * regcache.h (make_cleanup_regcache_xfree): Don't declare.
4553 * regcache.c (do_regcache_xfree, make_cleanup_regcache_xfree):
4554 Remove.
4555 * ppc-linux-tdep.c (ppu2spu_sniffer): Update.
4556 * mi/mi-main.c (mi_cmd_data_list_changed_registers): Update.
4557 * frame.h (frame_save_as_regcache): Return std::unique_ptr.
4558 * frame.c (frame_save_as_regcache): Return std::unique_ptr.
4559 (frame_pop): Update.
4560
4561 2017-09-25 Tom Tromey <tom@tromey.com>
4562
4563 * spu-tdep.c (spu2ppu_dealloc_cache): Use delete.
4564 * regcache.h (regcache_xfree): Don't declare.
4565 * regcache.c (regcache_xfree): Remove.
4566 (do_regcache_xfree): Use delete.
4567 * ppc-linux-tdep.c (ppu2spu_dealloc_cache): Use delete.
4568 * linux-fork.c (free_fork): Use delete.
4569 (fork_save_infrun_state): Likewise.
4570 * jit.c (jit_dealloc_cache): Use delete.
4571 * infrun.c (discard_infcall_suspend_state): Use delete.
4572
4573 2017-09-25 Tom Tromey <tom@tromey.com>
4574
4575 * regcache.h (regcache_xmalloc): Don't declare.
4576 (regcache_raw_set_cached_value): Update comment.
4577 * regcache.c (regcache_xmalloc): Remove.
4578 * ppc-linux-tdep.c (ppu2spu_sniffer): Use new.
4579 * jit.c (jit_frame_sniffer): Use new.
4580 * frame.c (frame_save_as_regcache): Use new.
4581
4582 2017-09-25 Andreas Arnez <arnez@linux.vnet.ibm.com>
4583
4584 * NEWS: Advertise support for guarded-storage registers on IBM z.
4585
4586 2017-09-25 Andreas Arnez <arnez@linux.vnet.ibm.com>
4587
4588 * s390-linux-nat.c (have_regset_gs): New static variable.
4589 (s390_linux_fetch_inferior_registers): Handle guarded-storage
4590 control block and guarded-storage broadcast control regsets.
4591 (s390_read_description): Detect whether the target has
4592 guarded-storage support, return appropriate tdesc.
4593 * s390-linux-tdep.c (features/s390-gs-linux64.c): New include.
4594 (features/s390x-gs-linux64.c): Likewise.
4595 (struct gdbarch_tdep) <have_gs>: New field.
4596 (s390_regmap_gs, s390_regmap_gsbc, s390_gs_regset)
4597 (s390_gsbc_regset): New variables.
4598 (s390_iterate_over_regset_sections): Iterate over s390_gs_regset
4599 and s390_gsbc_regset, if applicable.
4600 (s390_core_read_description): Check whether core file was from a
4601 target with guarded-storage support; include appropriate regsets.
4602 (s390_gdbarch_init): Add registers for guarded-storage support.
4603 (_initialize_s390_tdep): Initialize new target descriptions that
4604 include registers for guarded-storage support.
4605 * s390-linux-tdep.h (HWCAP_S390_GS, S390_GSD_REGNUM)
4606 (S390_GSSM_REGNUM, S390_GSEPLA_REGNUM)
4607 (S390_BC_GSD_REGNUM, S390_BC_GSSM_REGNUM): New defines.
4608 (S390_NUM_REGS): Adjust macro definition.
4609 (s390_gs_regset, s390_gsbc_regset, tdesc_s390_gs_linux64)
4610 (tdesc_s390x_gs_linux64): New declarations.
4611
4612 2017-09-25 Andreas Arnez <arnez@linux.vnet.ibm.com>
4613
4614 * features/s390-gs-linux64.xml: New file.
4615 * features/s390-gs.xml: New file.
4616 * features/s390-gsbc.xml: New file.
4617 * features/s390x-gs-linux64.xml: New file.
4618 * features/Makefile (WHICH): Add s390-gs-linux64 and
4619 s390x-gs-linux64.
4620 (s390-gs-linux64-expedite, s390x-gs-linux64-expedite): New macros.
4621 (XMLTOC): Add s390-gs-linux64.xml and s390x-linux64.xml.
4622 * features/s390-gs-linux64.c: New generated file.
4623 * features/s390x-gs-linux64.c: New file.
4624 * regformats/s390-gs-linux64.dat: New file.
4625 * regformats/s390x-gs-linux64.dat: New file.
4626
4627 2017-09-23 Tom Tromey <tom@tromey.com>
4628
4629 * defs.h (make_cleanup_override_quit_handler): Don't declare.
4630
4631 2017-09-22 Tom Tromey <tom@tromey.com>
4632
4633 * utils.c (class scoped_input_handler) <m_quit_handler>: Change
4634 type to scoped_restore_tmpl.
4635 <scoped_input_handler>: Initialize m_quit_handler directly.
4636
4637 2017-09-22 Sergio Durigan Junior <sergiodj@redhat.com>
4638
4639 * cli/cli-cmds.c (pwd_command): Use "getcwd (NULL, 0)".
4640 (cd_command): Likewise. Free "current_directory" before
4641 assigning to it.
4642 * main.c (captured_main_1): Use "getcwd (NULL, 0)".
4643 * mi/mi-cmd-env.c (mi_cmd_env_pwd): Likewise.
4644 * top.c (gdb_dirbuf): Remove global declaration.
4645 * top.h (gdb_dirbuf): Likewise.
4646
4647 2017-09-22 Sergio Durigan Junior <sergiodj@redhat.com>
4648
4649 * gnulib/aclocal.m4: Regenerate.
4650 * gnulib/config.in: Regenerate.
4651 * gnulib/configure: Regenerate.
4652 * gnulib/import/Makefile.am: Regenerate.
4653 * gnulib/import/Makefile.in: Regenerate.
4654 * gnulib/import/assure.h: New file.
4655 * gnulib/import/at-func.c: Likewise
4656 * gnulib/import/chdir-long.c: New file.
4657 * gnulib/import/chdir-long.h: New file.
4658 * gnulib/import/cloexec.c: New file.
4659 * gnulib/import/cloexec.h: New file.
4660 * gnulib/import/close.c: New file.
4661 * gnulib/import/closedir.c: New file.
4662 * gnulib/import/dirent-private.h: New file.
4663 * gnulib/import/dup-safer.c: New file.
4664 * gnulib/import/dup.c: New file.
4665 * gnulib/import/dup2.c: New file.
4666 * gnulib/import/error.c: New file.
4667 * gnulib/import/error.h: New file.
4668 * gnulib/import/exitfail.c: New file.
4669 * gnulib/import/exitfail.h: New file.
4670 * gnulib/import/fchdir.c: New file.
4671 * gnulib/import/fcntl.c: New file.
4672 * gnulib/import/fcntl.in.h: New file.
4673 * gnulib/import/fd-hook.c: New file.
4674 * gnulib/import/fd-hook.h: New file.
4675 * gnulib/import/fd-safer.c: New file.
4676 * gnulib/import/fdopendir.c: New file.
4677 * gnulib/import/filename.h: New file.
4678 * gnulib/import/filenamecat-lgpl.c: New file.
4679 * gnulib/import/filenamecat.h: New file.
4680 * gnulib/import/fstat.c: New file.
4681 * gnulib/import/fstatat.c: New file.
4682 * gnulib/import/getcwd-lgpl.c: New file.
4683 * gnulib/import/getcwd.c: New file.
4684 * gnulib/import/getdtablesize.c: New file.
4685 * gnulib/import/getlogin_r.c: New file.
4686 * gnulib/import/getprogname.c: New file.
4687 * gnulib/import/getprogname.h: New file.
4688 * gnulib/import/gettext.h: New file.
4689 * gnulib/import/glob-libc.h: New file.
4690 * gnulib/import/glob.c: New file.
4691 * gnulib/import/glob.in.h: New file.
4692 * gnulib/import/intprops.h: New file.
4693 * gnulib/import/m4/chdir-long.m4: New file.
4694 * gnulib/import/m4/close.m4: New file.
4695 * gnulib/import/m4/closedir.m4: New file.
4696 * gnulib/import/m4/d-ino.m4: New file.
4697 * gnulib/import/m4/d-type.m4: New file.
4698 * gnulib/import/m4/dup.m4: New file.
4699 * gnulib/import/m4/dup2.m4: New file.
4700 * gnulib/import/m4/error.m4: New file.
4701 * gnulib/import/m4/fchdir.m4: New file.
4702 * gnulib/import/m4/fcntl.m4: New file.
4703 * gnulib/import/m4/fcntl_h.m4: New file.
4704 * gnulib/import/m4/fdopendir.m4: New file.
4705 * gnulib/import/m4/filenamecat.m4: New file.
4706 * gnulib/import/m4/fstat.m4: New file.
4707 * gnulib/import/m4/fstatat.m4: New file.
4708 * gnulib/import/m4/getcwd-abort-bug.m4: New file.
4709 * gnulib/import/m4/getcwd-path-max.m4: New file.
4710 * gnulib/import/m4/getcwd.m4: New file.
4711 * gnulib/import/m4/getdtablesize.m4: New file.
4712 * gnulib/import/m4/getlogin_r.m4: New file.
4713 * gnulib/import/m4/getprogname.m4: New file.
4714 * gnulib/import/m4/glob.m4: New file.
4715 * gnulib/import/m4/gnulib-cache.m4: Regenerate.
4716 * gnulib/import/m4/gnulib-comp.m4: Regenerate.
4717 * gnulib/import/m4/mempcpy.m4: New file.
4718 * gnulib/import/m4/memrchr.m4: New file.
4719 * gnulib/import/m4/mode_t.m4: New file.
4720 * gnulib/import/m4/msvc-inval.m4: New file.
4721 * gnulib/import/m4/msvc-nothrow.m4: New file.
4722 * gnulib/import/m4/open.m4: New file.
4723 * gnulib/import/m4/openat.m4: New file.
4724 * gnulib/import/m4/opendir.m4: New file.
4725 * gnulib/import/m4/readdir.m4: New file.
4726 * gnulib/import/m4/realloc.m4: New file.
4727 * gnulib/import/m4/rewinddir.m4: New file.
4728 * gnulib/import/m4/save-cwd.m4: New file.
4729 * gnulib/import/m4/strdup.m4: New file.
4730 * gnulib/import/m4/strerror.m4: New file.
4731 * gnulib/import/m4/unistd-safer.m4: New file.
4732 * gnulib/import/mempcpy.c: New file.
4733 * gnulib/import/memrchr.c: New file.
4734 * gnulib/import/msvc-inval.c: New file.
4735 * gnulib/import/msvc-inval.h: New file.
4736 * gnulib/import/msvc-nothrow.c: New file.
4737 * gnulib/import/msvc-nothrow.h: New file.
4738 * gnulib/import/open.c: New file.
4739 * gnulib/import/openat-die.c: New file.
4740 * gnulib/import/openat-priv.h: New file.
4741 * gnulib/import/openat-proc.c: New file.
4742 * gnulib/import/openat.c: New file.
4743 * gnulib/import/openat.h: New file.
4744 * gnulib/import/opendir.c: New file.
4745 * gnulib/import/pipe-safer.c: New file.
4746 * gnulib/import/readdir.c: New file.
4747 * gnulib/import/realloc.c: New file.
4748 * gnulib/import/rewinddir.c: New file.
4749 * gnulib/import/save-cwd.c: New file.
4750 * gnulib/import/save-cwd.h: New file.
4751 * gnulib/import/strdup.c: New file.
4752 * gnulib/import/strerror-override.c: New file.
4753 * gnulib/import/strerror-override.h: New file.
4754 * gnulib/import/strerror.c: New file.
4755 * gnulib/import/unistd--.h: New file.
4756 * gnulib/import/unistd-safer.h: New file.
4757 * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add
4758 "getcwd" and "glob".
4759 * ser-tcp.c: Undefine "close" before redefining it.
4760
4761 2017-09-21 Simon Marchi <simon.marchi@ericsson.com>
4762
4763 * guile/scm-value.c (gdbscm_value_address): Initialize address,
4764 get rid of res_val.
4765
4766 2017-09-22 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
4767
4768 * configure.nat <i386sol2,i386>: Add fork-inferior.o to NATDEPFILES.
4769 <sol2,sparc>: Likewise.
4770 <sol2-64,i386>: Likewise.
4771
4772 * warning.m4 (AM_GDB_WARNINGS): Disable -Wunknown-pragmas,
4773 -Wdeprecated-declarations on *-*-solaris*.
4774 * configure: Regenerate.
4775
4776 * procfs.c: Include "nat/inferior.h".
4777 (procfs_info_proc): Fix typo.
4778
4779 2017-09-21 Kevin Buettner <kevinb@redhat.com>
4780
4781 * remote.c (vector): Include.
4782 (struct private_thread_info): Add field, thread_handle.
4783 (free_private_thread_info): Deallocate storage associated with
4784 thread handle.
4785 (get_private_info_thread): Initialize `thread_handle' field.
4786 (struct thread_item): Add field, thread_handle.
4787 (clear_threads_listing_context): Deallocate storage associated
4788 with thread handle.
4789 (start_thread): Add support for "handle" attribute.
4790 (thread_attributes): Add "handle".
4791 (remote_get_threads_with_qthreadinfo): Initialize thread_handle
4792 field.
4793 (remote_update_thread_list): Update thread_handle.
4794 (remote_thread_handle_to_thread_info): New function.
4795 (init_remote_ops): Initialize to_thread_handle_to_thread_info.
4796
4797 2017-09-21 Kevin Buettner <kevinb@redhat.com>
4798
4799 * python/py-inferior.c (gdbpy_thread_from_thread_handle): New
4800 function.
4801 (inferior_object_methods): Add gdbpy_thread_from_thread_handle.
4802 * python/python-internal.h (thread_object_type): Declare.
4803
4804 2017-09-21 Kevin Buettner <kevinb@redhat.com>
4805
4806 * target.h (struct target_ops): Add to_thread_handle_to_thread_info.
4807 (target_thread_handle_to_thread_info): Declare.
4808 * target.c (target_thread_handle_to_thread_info): New function.
4809 * target-delegates.c: Regenerate.
4810 * gdbthread.h (find_thread_by_handle): Declare.
4811 * thread.c (find_thread_by_handle): New function.
4812 * linux-thread-db.c (thread_db_thread_handle_to_thread_info): New
4813 function.
4814 (init_thread_db_ops): Register thread_db_thread_handle_to_thread_info.
4815
4816 2017-09-21 Simon Marchi <simon.marchi@ericsson.com>
4817
4818 * nat/linux-waitpid.c (linux_debug): Add ATTRIBUTE_PRINTF.
4819
4820 2017-09-21 Simon Marchi <simon.marchi@ericsson.com>
4821
4822 * microblaze-tdep.c (microblaze_debug): Add ATTRIBUTE_PRINTF.
4823
4824 2017-09-21 Yao Qi <yao.qi@linaro.org>
4825
4826 * configure.tgt (aarch64*-*-freebsd*): Add fbsd-tdep.o solib-svr4.o
4827 to gdb_target_obs.
4828
4829 2017-09-20 Tom Tromey <tom@tromey.com>
4830
4831 * breakpoint.c (struct counted_command_line): Remove.
4832 (breakpoint_commands): Update.
4833 (alloc_counted_command_line, incref_counted_command_line)
4834 (decref_counted_command_line, do_cleanup_counted_command_line)
4835 (make_cleanup_decref_counted_command_line): Remove.
4836 (breakpoint_set_commands, commands_command_1, ~bpstats, bpstats)
4837 (bpstat_clear_actions, bpstat_do_actions_1, watchpoint_check)
4838 (bpstat_stop_status, print_one_breakpoint_location, ~breakpoint)
4839 (save_breakpoints): Update.
4840 * breakpoint.h (counted_command_line): Now a typedef to
4841 shared_ptr.
4842 (struct breakpoint) <commands>: Now a counted_command_line.
4843 (struct bpstats) <command>: Likewise.
4844
4845 2017-09-20 Tom Tromey <tom@tromey.com>
4846
4847 * breakpoint.c (struct commands_info, do_map_commands_command):
4848 Remove.
4849 (commands_command_1): Update.
4850 (iterate_over_related_breakpoints): Take a function_view.
4851 (do_delete_breakpoint, do_map_delete_breakpoint): Remove.
4852 (delete_command): Update.
4853 (map_breakpoint_numbers): Take a function_view.
4854 (do_disable_breakpoint, do_map_delete_breakpoint): Remove.
4855 (disable_command): Update.
4856 (do_enable_breakpoint, do_map_enable_breakpoint): Remove.
4857 (enable_command): Update.
4858 (struct disp_data, do_enable_breakpoint_disp)
4859 (do_map_enable_once_breakpoint, do_map_enable_count_breakpoint)
4860 (do_map_enable_delete_breakpoint): Remove.
4861 (enable_once_command, enable_count_command, enable_delete_command)
4862 (delete_trace_variable_command): Update.
4863
4864 2017-09-20 Tom Tromey <tom@tromey.com>
4865
4866 * breakpoint.c (~bpstats): Rename from bpstat_free. Update.
4867 (bpstat_clear): Use delete.
4868 (bpstats): New constructors.
4869 (bpstat_copy, bpstat_stop_status): Use new.
4870 (dprintf_after_condition_true): Update.
4871 * breakpoint.h (bpstats::bpstats): Add constructors.
4872 (bpstats::~bpstats): Add destructor.
4873
4874 2017-09-20 Pedro Alves <palves@redhat.com>
4875
4876 * eval.c (make_params): Delete, refactored as ...
4877 (class fake_method): ... this new type's ctor.
4878 (fake_method::~fake_method): New.
4879 (evaluate_subexp_standard): Use 'fake_method'.
4880
4881 2017-09-20 Tom Tromey <tom@tromey.com>
4882
4883 * windows-nat.c (get_windows_debug_event, windows_wait)
4884 (do_initial_windows_stuff, windows_attach): Update.
4885 * utils.c (vwarning, internal_vproblem): Update.
4886 (ui_unregister_input_event_handler_cleanup)
4887 (prepare_to_handle_input): Remove.
4888 (class scoped_input_handler): New.
4889 (defaulted_query, prompt_for_continue): Update.
4890 * tui/tui-hooks.c (tui_refresh_frame_and_register_information):
4891 Update.
4892 * top.c (undo_terminal_modifications_before_exit): Update.
4893 * target/target.h (target_terminal_init, target_terminal_inferior)
4894 (target_terminal_ours): Don't declare.
4895 (class target_terminal): New.
4896 * target.h (target_terminal_is_inferior, target_terminal_is_ours)
4897 (target_terminal_ours_for_output)
4898 (make_cleanup_restore_target_terminal): Don't declare.
4899 (target_terminal_info): Remove.
4900 * target.c (enum terminal_state, terminal_state): Remove.
4901 (target_terminal::terminal_state): Define.
4902 (target_terminal::init): Rename from target_terminal_init.
4903 (target_terminal::inferior): Rename from
4904 target_terminal_inferior.
4905 (target_terminal::ours): Rename from target_terminal_ours.
4906 (target_terminal::ours_for_output): Rename from
4907 target_terminal_ours_for_output.
4908 (target_terminal::info): New method.
4909 (cleanup_restore_target_terminal)
4910 (make_cleanup_restore_target_terminal): Remove.
4911 * solib.c (handle_solib_event): Update.
4912 * remote.c (remote_serial_quit_handler): Update.
4913 (remote_terminal_inferior, remote_wait_as): Update.
4914 * record-full.c (record_full_wait_1): Update.
4915 * nto-procfs.c (procfs_create_inferior): Update.
4916 * nat/fork-inferior.c (startup_inferior): Update.
4917 * mi/mi-interp.c (mi_new_thread, mi_thread_exit)
4918 (mi_record_changed, mi_inferior_added, mi_inferior_appeared)
4919 (mi_inferior_exit, mi_inferior_removed, mi_traceframe_changed)
4920 (mi_tsv_created, mi_tsv_deleted, mi_tsv_modified)
4921 (mi_breakpoint_created, mi_breakpoint_deleted)
4922 (mi_breakpoint_modified, mi_on_resume, mi_solib_loaded)
4923 (mi_solib_unloaded, mi_command_param_changed, mi_memory_changed)
4924 (mi_user_selected_context_changed, report_initial_inferior):
4925 Update.
4926 * linux-nat.c (linux_nat_attach, linux_nat_terminal_ours)
4927 (linux_nat_terminal_inferior): Update.
4928 * infrun.c (follow_fork_inferior)
4929 (handle_vfork_child_exec_or_exit, do_target_resume)
4930 (check_curr_ui_sync_execution_done, handle_inferior_event_1)
4931 (handle_signal_stop, maybe_remove_breakpoints, normal_stop):
4932 Update.
4933 * inflow.c (child_terminal_init, info_terminal_command): Update.
4934 * infcmd.c (post_create_inferior, continue_1, prepare_one_step)
4935 (attach_command): Update.
4936 * infcall.c (call_thread_fsm_should_stop): Update.
4937 * gnu-nat.c (gnu_attach): Update.
4938 * extension.c (struct active_ext_lang_state)
4939 (restore_active_ext_lang): Update.
4940 * exceptions.c (print_flush): Update.
4941 * event-top.c (async_enable_stdin, default_quit_handler): Update.
4942 (struct quit_handler_cleanup_data, restore_quit_handler)
4943 (restore_quit_handler_dtor, make_cleanup_override_quit_handler):
4944 Remove.
4945 * cp-support.c (gdb_demangle): Update.
4946 * breakpoint.c (update_inserted_breakpoint_locations)
4947 (insert_breakpoint_locations, handle_jit_event)
4948 (disable_breakpoints_in_unloaded_shlib): Update.
4949 * annotate.c (annotate_breakpoints_invalid)
4950 (annotate_frames_invalid): Update.
4951
4952 2017-09-20 Tom Tromey <tom@tromey.com>
4953
4954 * main.c (catch_command_errors): Rename from
4955 catch_command_errors_const.
4956 (captured_main_1): Update.
4957
4958 2017-09-20 Pedro Alves <palves@redhat.com>
4959
4960 * cli/cli-cmds.c (list_command): Use print_sal_location.
4961 (print_sal_location): New function.
4962 (ambiguous_line_spec): Use print_sal_location.
4963 * linespec.c (symbol_to_sal): Record the symbol in the sal.
4964 * symtab.c (find_function_start_sal): Likewise.
4965 * symtab.h (symtab_and_line::symbol): New field.
4966
4967 2017-09-20 Pedro Alves <palves@redhat.com>
4968
4969 * linespec.c (minsym_found): Handle non-text minsyms.
4970 (symbol_to_sal): Record a sal.pc for non-block, non-label symbols.
4971
4972 2017-09-20 Walfred Tedeschi <walfred.tedeschi@intel.com>
4973
4974 * features/Makefile (i386-avx-mpx-avx512-pku.dat): Add missing
4975 backslash.
4976
4977 2017-09-20 Walfred Tedeschi <walfred.tedeschi@intel.com>
4978
4979 * gdb.arch/i386-avx512.c (move_zmm_data_to_reg): Use
4980 vmovups instead vmovaps.
4981 (move_zmm_data_to_memory): Use vmovups instead vmovaps.
4982
4983 2017-09-19 John Baldwin <jhb@FreeBSD.org>
4984
4985 * NEWS (Changes since GDB 8.0): Add starti.
4986 * infcmd.c (enum run_break): New.
4987 (run_command_1): Queue pending event for RUN_STOP_AT_FIRST_INSN
4988 case.
4989 (run_command): Use enum run_how.
4990 (start_command): Likewise.
4991 (starti_command): New function.
4992 (RUN_ARGS_HELP): New macro.
4993 (_initialize_infcmd): Use RUN_ARGS_HELP for run and start
4994 commands. Add starti command.
4995
4996 2017-09-19 Yao Qi <yao.qi@linaro.org>
4997
4998 * Makefile.in (monitor.o): Remove the rule.
4999
5000 2017-09-19 Yao Qi <yao.qi@linaro.org>
5001
5002 * annotate.h (struct annotate_arg_emitter): Use
5003 DISABLE_COPY_AND_ASSIGN.
5004 * common/refcounted-object.h (refcounted_object): Likewise.
5005 * completer.h (struct completion_result): Likewise.
5006 * dwarf2read.c (struct dwarf2_per_objfile): Likewise.
5007 * filename-seen-cache.h (filename_seen_cache): Likewise.
5008 * gdbcore.h (thread_section_name): Likewise.
5009 * gdb_regex.h (compiled_regex): Likewise.
5010 * gdbthread.h (scoped_restore_current_thread): Likewise.
5011 * inferior.h (scoped_restore_current_inferior): Likewise.
5012 * jit.c (jit_reader): Likewise.
5013 * linespec.h (struct linespec_result): Likewise.
5014 * mi/mi-parse.h (struct mi_parse): Likewise.
5015 * nat/fork-inferior.c (execv_argv): Likewise.
5016 * progspace.h (scoped_restore_current_program_space): Likewise.
5017 * python/python-internal.h (class gdbpy_enter): Likewise.
5018 * regcache.h (regcache): Likewise.
5019 * target-descriptions.c (struct tdesc_reg): Likewise.
5020 (struct tdesc_type): Likewise.
5021 (struct tdesc_feature): Likewise.
5022 * ui-out.h (ui_out_emit_type): Likewise.
5023
5024 2017-09-18 Simon Marchi <simon.marchi@ericsson.com>
5025
5026 * dwarf2expr.c (dwarf_expr_context::execute_stack_op): Remove
5027 label abort_expression.
5028
5029 2017-09-16 Simon Marchi <simon.marchi@ericsson.com>
5030
5031 * common/buffer.c (buffer_xml_printf): Adjust.
5032 * common/xml-utils.c (xml_escape_text): Change return type to
5033 std::string, update code accordingly.
5034 * common/xml-utils.h (xml_escape_text): Change return type to
5035 std::string.
5036 * rs6000-aix-tdep.c (rs6000_aix_shared_library_to_xml): Adjust.
5037 * windows-tdep.c (windows_xfer_shared_library): Adjust.
5038 * unittests/xml-utils-selftests.c (test_xml_escape_text):
5039 Adjust.
5040
5041 2017-09-16 Simon Marchi <simon.marchi@ericsson.com>
5042
5043 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add new source file.
5044 (SUBDIR_UNITTESTS_OBS): Add new object file.
5045 * unittests/xml-utils-selftests.c: New file.
5046
5047 2017-09-16 Simon Marchi <simon.marchi@ericsson.com>
5048
5049 * common/selftest.h (selftest): New struct/interface.
5050 (register_test): Add name parameter, add new overload.
5051 (run_tests): Add filter parameter.
5052 (for_each_selftest_ftype): New typedef.
5053 (for_each_selftest): New declaration.
5054 * common/selftest.c (tests): Change type to
5055 map<string, unique_ptr<selftest>>.
5056 (simple_selftest): New struct.
5057 (register_test): New function.
5058 (register_test): Add name parameter and use it.
5059 (run_tests): Add filter parameter and use it. Add prints.
5060 Adjust to vector -> map change.
5061 * aarch64-tdep.c (_initialize_aarch64_tdep): Add names when
5062 registering selftests.
5063 * arm-tdep.c (_initialize_arm_tdep): Likewise.
5064 * disasm-selftests.c (_initialize_disasm_selftests): Likewise.
5065 * dwarf2-frame.c (_initialize_dwarf2_frame): Likewise.
5066 * dwarf2loc.c (_initialize_dwarf2loc): Likewise.
5067 * findvar.c (_initialize_findvar): Likewise.
5068 * gdbarch-selftests.c (_initialize_gdbarch_selftests): Likewise.
5069 * maint.c (maintenance_selftest): Update call to run_tests.
5070 (maintenance_info_selftests): New function.
5071 (_initialize_maint_cmds): Register "maintenance info selftests"
5072 command. Update "maintenance selftest" doc.
5073 * regcache.c (_initialize_regcache): Add names when registering
5074 selftests.
5075 * rust-exp.y (_initialize_rust_exp): Likewise.
5076 * selftest-arch.c (gdbarch_selftest): New struct.
5077 (gdbarch_tests): Remove.
5078 (register_test_foreach_arch): Add name parameter. Call
5079 register_test.
5080 (tests_with_arch): Remove, move most content to
5081 gdbarch_selftest::operator().
5082 (_initialize_selftests_foreach_arch): Remove.
5083 * selftest-arch.h (register_test_foreach_arch): Add name
5084 parameter.
5085 (run_tests_with_arch): New declaration.
5086 * utils-selftests.c (_initialize_utils_selftests): Add names
5087 when registering selftests.
5088 * utils.c (_initialize_utils): Likewise.
5089 * unittests/array-view-selftests.c
5090 (_initialize_array_view_selftests): Likewise.
5091 * unittests/environ-selftests.c (_initialize_environ_selftests):
5092 Likewise.
5093 * unittests/function-view-selftests.c
5094 (_initialize_function_view_selftests): Likewise.
5095 * unittests/offset-type-selftests.c
5096 (_initialize_offset_type_selftests): Likewise.
5097 * unittests/optional-selftests.c
5098 (_initialize_optional_selftests): Likewise.
5099 * unittests/scoped_restore-selftests.c
5100 (_initialize_scoped_restore_selftests): Likewise.
5101 * NEWS: Document "maintenance selftest" and "maint info
5102 selftests".
5103
5104 2017-09-16 Simon Marchi <simon.marchi@ericsson.com>
5105
5106 * mi/mi-main.c (mi_load_progress): Restore current_uiout using a
5107 scoped_restore.
5108
5109 2017-09-16 Simon Marchi <simon.marchi@ericsson.com>
5110
5111 * mi/mi-main.c (mi_load_progress): Make uiout variable
5112 a unique_ptr.
5113
5114 2017-09-15 Pedro Alves <palves@redhat.com>
5115
5116 * compile/compile-c-types.c (convert_enum, convert_int)
5117 (convert_float): Adjust to refer to int_type_v0 and float_type_v0.
5118
5119 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
5120
5121 * dwarf2read.c (copy_string): Remove.
5122 (parse_macro_definition): Replace copy_string with savestring.
5123
5124 2017-09-15 Yao Qi <yao.qi@linaro.org>
5125
5126 * configure.tgt (i[34567]86-*-darwin*): Append amd64.o to
5127 gdb_target_obs.
5128 (i[34567]86-*-solaris2.1[0-9]* | x86_64-*-solaris2.1[0-9]*):
5129 Likewise.
5130 (i[34567]86-*-linux*): Likewise.
5131
5132 2017-09-14 Simon Marchi <simon.marchi@ericsson.com>
5133
5134 * dwarf2expr.h (dwarf_stack_value): Add constructor.
5135 (dwarf_expr_context) <~dwarf_expr_context>: Define as default.
5136 <stack>: Change type to std::vector.
5137 <stack_len, stack_allocated>: Remove.
5138 <grow_stack>: Remove.
5139 * dwarf2expr.c (dwarf_expr_context::dwarf_expr_context): Adjust.
5140 (dwarf_expr_context::~dwarf_expr_context): Remove.
5141 (dwarf_expr_context::grow_stack): Remove.
5142 (dwarf_expr_context::push): Adjust.
5143 (dwarf_expr_context::pop): Adjust.
5144 (dwarf_expr_context::fetch): Adjust.
5145 (dwarf_expr_context::fetch_in_stack_memory): Adjust.
5146 (dwarf_expr_context::stack_empty_p): Adjust.
5147 (dwarf_expr_context::execute_stack_op): Adjust.
5148
5149 2017-09-14 Simon Marchi <simon.marchi@ericsson.com>
5150
5151 * dwarf2expr.h (dwarf_expr_context) <stack_empty_p>: Change
5152 return type to bool.
5153 * dwarf2expr.c (dwarf_expr_context::stack_empty_p): Likewise.
5154
5155 2017-09-14 Simon Marchi <simon.marchi@ericsson.com>
5156
5157 * dwarf2expr.h (dwarf_expr_piece) <v.mem.in_stack_memory>:
5158 Change type to bool.
5159 (dwarf_stack_value) <in_stack_memory>: Likewise.
5160 (dwarf_expr_context) <push_address>: Change parameter type to
5161 bool.
5162 <fetch_in_stack_memory>: Change return type to bool.
5163 <push>: Change parameter type to bool.
5164 * dwarf2expr.c (dwarf_expr_context::push): Change parameter type
5165 to bool.
5166 (dwarf_expr_context::push_address): Likewise.
5167 (dwarf_expr_context::fetch_in_stack_memory): Change return type
5168 to bool.
5169 (dwarf_expr_context::execute_stack_op): Adjust.
5170 * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Adjust.
5171
5172 2017-09-14 Simon Marchi <simon.marchi@ericsson.com>
5173
5174 * dwarf2expr.h (struct dwarf_expr_piece): Move up.
5175 (struct dwarf_expr_context) <n_pieces>: Remove.
5176 <pieces>: Change type to std::vector.
5177 * dwarf2expr.c (dwarf_expr_context::dwarf_expr_context): Adjust.
5178 (dwarf_expr_context::~dwarf_expr_context): Don't manually free
5179 pieces.
5180 (dwarf_expr_context::add_piece): Adjust.
5181 * dwarf2loc.c (struct piece_closure): Initialize fields.
5182 <n_pieces>: Remove.
5183 <pieces>: Change type to std::vector.
5184 (allocate_piece_closure): Adjust, change parameter to
5185 std::vector rvalue and std::move it to piece_closure.
5186 (rw_pieced_value): Adjust.
5187 (check_pieced_synthetic_pointer): Adjust.
5188 (indirect_synthetic_pointer): Adjust.
5189 (coerce_pieced_ref): Adjust.
5190 (free_pieced_value_closure): Adjust. Use delete to free
5191 piece_closure.
5192 (dwarf2_evaluate_loc_desc_full): Adjust. std::move ctx.pieces
5193 to allocate_piece_closure.
5194 (dwarf2_loc_desc_get_symbol_read_needs): Adjust.
5195
5196 2017-09-12 Simon Marchi <simon.marchi@ericsson.com>
5197
5198 * probe.h (probe_ops_cp): Remove typedef.
5199 (DEF_VEC_P (probe_ops_cp)): Remove.
5200 (all_probe_ops): Change type to std::vector.
5201 * probe.c (info_probes_for_ops): Adjust to vector change.
5202 (probe_linespec_to_ops): Likewise.
5203 (all_probe_ops): Change type to std::vector.
5204 (_initialize_probe): Adjust to vector change.
5205 * dtrace-probe.c (_initialize_dtrace_probe): Likewise.
5206 * elfread.c (elf_get_probes): Likewise.
5207 * stap-probe.c (_initialize_stap_probe): Likewise.
5208
5209 2017-09-12 Simon Marchi <simon.marchi@ericsson.com>
5210
5211 * probe.h (struct bound_probe): Define constructors.
5212 * probe.c (bound_probe_s): Remove typedef.
5213 (DEF_VEC_O (bound_probe_s)): Remove VEC.
5214 (collect_probes): Change return type to std::vector, remove
5215 cleanup.
5216 (compare_probes): Return bool, change parameter type. Change
5217 semantic to "less than".
5218 (gen_ui_out_table_header_info): Change parameter to std::vector
5219 and update.
5220 (exists_probe_with_pops): Likewise.
5221 (info_probes_for_ops): Update to std::vector change.
5222 (enable_probes_command): Likewise.
5223 (disable_probes_command): Likewise.
5224
5225 2017-09-12 Simon Marchi <simon.marchi@ericsson.com>
5226
5227 * probe.h (struct probe_ops) <get_probes>: Change parameter from
5228 vec to std::vector.
5229 * probe.c (parse_probes_in_pspace): Update.
5230 (find_probes_in_objfile): Update.
5231 (find_probe_by_pc): Update.
5232 (collect_probes): Update.
5233 (probe_any_get_probes): Update.
5234 * symfile.h (struct sym_probe_fns) <sym_get_probes> Change
5235 return type to reference to std::vector.
5236 * dtrace-probe.c (dtrace_process_dof_probe): Change parameter to
5237 std::vector and update.
5238 (dtrace_process_dof): Likewise.
5239 (dtrace_get_probes): Likewise.
5240 * elfread.c (elf_get_probes): Change return type to std::vector,
5241 store an std::vector in bfd_data.
5242 (probe_key_free): Update to std::vector.
5243 * stap-probe.c (handle_stap_probe): Change parameter to
5244 std::vector and update.
5245 (stap_get_probes): Likewise.
5246 * symfile-debug.c (debug_sym_get_probes): Change return type to
5247 std::vector and update.
5248
5249 2017-09-11 Tom Tromey <tom@tromey.com>
5250
5251 * breakpoint.c (program_breakpoint_here_p): Update.
5252 * target.c (make_scoped_restore_show_memory_breakpoints): Rename
5253 from make_show_memory_breakpoints_cleanup. Return a
5254 scoped_restore_tmpl<int>.
5255 (restore_show_memory_breakpoints): Remove.
5256 * ppc-linux-tdep.c (ppc_linux_memory_remove_breakpoint): Update.
5257 * mem-break.c (memory_validate_breakpoint): Update.
5258 * ia64-tdep.c (ia64_memory_insert_breakpoint): Update.
5259 (ia64_memory_remove_breakpoint): Update.
5260 (ia64_breakpoint_from_pc): Update.
5261 * target.h (make_scoped_restore_show_memory_breakpoints): Rename
5262 from make_show_memory_breakpoints_cleanup.
5263
5264 2017-09-11 Tom Tromey <tom@tromey.com>
5265
5266 * d-namespace.c (d_lookup_symbol): Use std::string.
5267 (find_symbol_in_baseclass): Likewise.
5268
5269 2017-09-11 Tom Tromey <tom@tromey.com>
5270
5271 * ctf.c (ctf_start): Use std::string.
5272
5273 2017-09-11 Tom Tromey <tom@tromey.com>
5274
5275 * ada-lang.c (is_known_support_routine): Update.
5276 (ada_unhandled_exception_name_addr_from_raise): Update.
5277 * guile/scm-frame.c (gdbscm_frame_name): Update.
5278 * python/py-frame.c (frapy_name): Update.
5279 (frapy_function): Update.
5280 * stack.h (find_frame_funname): Update.
5281 * stack.c (find_frame_funname): Return unique_xmalloc_ptr.
5282 (print_frame): Update.
5283
5284 2017-09-11 Tom Tromey <tom@tromey.com>
5285
5286 * findcmd.c (put_bits): Take a gdb::byte_vector.
5287 (parse_find_args): Return gdb::byte_vector. "args" now const.
5288 Remove "pattern_bufp" and "pattern_lenp" parameters. Remove
5289 cleanups.
5290 (find_command): Update.
5291
5292 2017-09-11 Tom Tromey <tom@tromey.com>
5293
5294 * cli/cli-script.c (class scoped_restore_hook_in): New.
5295 (clear_hook_in_cleanup): Remove.
5296 (execute_cmd_pre_hook, execute_cmd_post_hook): Use
5297 scoped_restore_hook_in.
5298
5299 2017-09-11 Tom Tromey <tom@tromey.com>
5300
5301 * cli/cli-script.c (restore_interp): Remove.
5302 (read_command_lines): Use scoped_restore_interp.
5303 * interps.c (scoped_restore_interp::set_temp): Rename from
5304 interp_set_temp.
5305 * interps.h (class scoped_restore_interp): New.
5306 (interp_set_temp): Remove.
5307
5308 2017-09-11 Tom Tromey <tom@tromey.com>
5309
5310 * mi/mi-cmd-catch.c (mi_cmd_catch_assert)
5311 (mi_cmd_catch_exception, mi_catch_load_unload): Update.
5312 * mi/mi-cmd-break.c (setup_breakpoint_reporting): Return a
5313 scoped_restore.
5314 (mi_cmd_break_insert_1): Update.
5315 * mi/mi-cmd-break.h (setup_breakpoint_reporting): Return a
5316 scoped_restore.
5317
5318 2017-09-11 Tom Tromey <tom@tromey.com>
5319
5320 * demangle.c (demangle_command): Update.
5321 * breakpoint.c (disable_command): Update.
5322 (enable_command): Update.
5323 (find_location_by_number): Make "number" const. Use
5324 get_number_trailer.
5325 * cli/cli-utils.c (extract_arg): Return std::string.
5326 * probe.c (parse_probe_linespec): Update. Change types.
5327 (collect_probes): Take string arguments.
5328 (parse_probe_linespec): Likewise.
5329 (info_probes_for_ops): Update.
5330 (enable_probes_command): Update.
5331 (disable_probes_command): Update.
5332 * break-catch-sig.c (catch_signal_split_args): Update.
5333 * mi/mi-parse.c (mi_parse): Update.
5334
5335 2017-09-11 Tom Tromey <tom@tromey.com>
5336
5337 * language.h (language_enum): Make argument const.
5338 * language.c (language_enum): Make argument const.
5339
5340 2017-09-11 Tom Tromey <tom@tromey.com>
5341
5342 * common/common-utils.h (skip_to_space): Remove macro, redeclare
5343 as function.
5344 (skip_to_space): Rename from skip_to_space_const.
5345 * common/common-utils.c (skip_to_space): New function.
5346 (skip_to_space): Rename from skip_to_space_const.
5347 * cli/cli-utils.h (get_number): Rename from get_number_const.
5348 (extract_arg): Rename from extract_arg_const.
5349 * cli/cli-utils.c (get_number): Rename from get_number_const.
5350 (extract_arg): Rename from extract_arg_const.
5351 (number_or_range_parser::get_number): Use ::get_number.
5352 * aarch64-linux-tdep.c, ada-lang.c, arm-linux-tdep.c, ax-gdb.c,
5353 break-catch-throw.c, breakpoint.c, cli/cli-cmds.c, cli/cli-dump.c,
5354 cli/cli-script.c, cli/cli-setshow.c, compile/compile.c,
5355 completer.c, demangle.c, disasm.c, findcmd.c, linespec.c,
5356 linux-tdep.c, linux-thread-db.c, location.c, mi/mi-parse.c,
5357 minsyms.c, nat/linux-procfs.c, printcmd.c, probe.c,
5358 python/py-breakpoint.c, record.c, rust-exp.y, serial.c, stack.c,
5359 stap-probe.c, tid-parse.c, tracepoint.c: Update all callers.
5360
5361 2017-09-11 Tom Tromey <tom@tromey.com>
5362
5363 * python/python.c (do_start_initialization): Use
5364 py-event-types.def to initialize types.
5365 Define all object type structures.
5366 * python/python-internal.h: Don't declare event initialization
5367 functions.
5368 * python/py-threadevent.c (thread_event_object_type): Don't
5369 define.
5370 * python/py-stopevent.c (stop_event_object_type): Don't define.
5371 * python/py-signalevent.c (signal_event_object_type): Don't
5372 declare or define.
5373 * python/py-newobjfileevent.c (new_objfile_event_object_type)
5374 (clear_objfiles_event_object_type): Don't declare or define.
5375 * python/py-infevents.c (inferior_call_pre_event_object_type)
5376 (inferior_call_post_event_object_type)
5377 (register_changed_event_object_type)
5378 (memory_changed_event_object_type): Don't declare or define.
5379 * python/py-inferior.c (new_thread_event_object_type)
5380 (new_inferior_event_object_type)
5381 (inferior_deleted_event_object_type): Don't declare or define.
5382 * python/py-exitedevent.c (exited_event_object_type): Don't
5383 declare or define.
5384 * python/py-evts.c (gdbpy_initialize_py_events): Use
5385 py-all-events.def.
5386 * python/py-events.h (thread_event_object_type): Don't declare.
5387 (events_object): Use py-all-events.def.
5388 * python/py-event.h (GDBPY_NEW_EVENT_TYPE): Remove. Use
5389 py-event-types.def.
5390 * python/py-event-types.def: New file.
5391 * python/py-continueevent.c (create_continue_event_object): Don't
5392 declare or define.
5393 * python/py-bpevent.c (breakpoint_event_object_type): Don't
5394 declare or define.
5395 * python/py-all-events.def: New file.
5396
5397 2017-09-11 Tom Tromey <tom@tromey.com>
5398
5399 * python/py-threadevent.c (create_thread_event_object): Return
5400 gdbpy_ref.
5401 * python/py-stopevent.h (create_stop_event_object)
5402 (create_breakpoint_event_object, create_signal_event_object):
5403 Update.
5404 * python/py-stopevent.c (create_stop_event_object): Return
5405 gdbpy_ref.
5406 (emit_stop_event): Update.
5407 * python/py-signalevent.c (create_signal_event_object): Return
5408 gdbpy_ref.
5409 * python/py-infevents.c (create_inferior_call_event_object):
5410 Update.
5411 * python/py-event.h (create_event_object)
5412 (create_thread_event_object): Update.
5413 * python/py-event.c (create_event_object): Return gdbpy_ref.
5414 * python/py-continueevent.c: Return gdbpy_ref.
5415 * python/py-bpevent.c (create_breakpoint_event_object): Return
5416 gdbpy_ref.
5417
5418 2017-09-11 Tom Tromey <tom@tromey.com>
5419
5420 PR python/15622:
5421 * NEWS: Add entry.
5422 * python/python.c (do_start_initialization): Initialize new event
5423 types.
5424 * python/python-internal.h (gdbpy_initialize_new_inferior_event)
5425 (gdbpy_initialize_inferior_deleted_event)
5426 (gdbpy_initialize_new_thread_event): Declare.
5427 * python/py-threadevent.c (create_thread_event_object): Add option
5428 "thread" parameter.
5429 * python/py-inferior.c (new_thread_event_object_type)
5430 (new_inferior_event_object_type)
5431 (inferior_deleted_event_object_type): Declare.
5432 (python_new_inferior, python_inferior_deleted): New functions.
5433 (add_thread_object): Emit new_thread event.
5434 (gdbpy_initialize_inferior): Attach new functions to corresponding
5435 observers.
5436 (new_thread, new_inferior, inferior_deleted): Define new event
5437 types.
5438 * python/py-evts.c (gdbpy_initialize_py_events): Add new
5439 registries.
5440 * python/py-events.h (events_object) <new_inferior,
5441 inferior_deleted, new_thread>: New fields.
5442 * python/py-event.h (create_thread_event_breakpoint): Add optional
5443 "thread" parameter.
5444
5445 2017-09-10 Andrew Burgess <andrew.burgess@embecosm.com>
5446
5447 * utils.c (abort_with_message): Don't compare gdb_stderr to NULL,
5448 check current_ui instead.
5449 (internal_vproblem): Likewise.
5450
5451 2017-09-09 Simon Marchi <simon.marchi@ericsson.com>
5452
5453 * thread.c (print_thread_info_1): Remove unnecessary calls to
5454 uiout->is_mi_like_p.
5455
5456 2017-09-09 Tom Tromey <tom@tromey.com>
5457
5458 * namespace.h (add_using_directive): Update.
5459 * namespace.c (add_using_directive): Change type of excludes to
5460 std::vector.
5461 * dwarf2read.c (read_import_statement): Use std::vector.
5462 (read_namespace): Update.
5463 * cp-namespace.c (cp_scan_for_anonymous_namespaces): Update.
5464
5465 2017-09-09 Tom Tromey <tom@tromey.com>
5466
5467 * linespec.c (create_sals_line_offset): Use gdb::def_vector.
5468
5469 2017-09-09 Tom Tromey <tom@tromey.com>
5470
5471 * p-valprint.c (pascal_object_print_value): Use gdb::byte_vector.
5472
5473 2017-09-09 Tom Tromey <tom@tromey.com>
5474
5475 * stack.c (func_command): Use gdb::def_vector.
5476
5477 2017-09-09 Tom Tromey <tom@tromey.com>
5478
5479 * mi/mi-cmd-var.c (mi_cmd_var_list_children): Use gdb::optional,
5480 ui_out_emit_list, ui_out_emit_tuple.
5481 (mi_cmd_var_update): Likewise.
5482
5483 2017-09-09 Tom Tromey <tom@tromey.com>
5484
5485 * mi/mi-interp.c (mi_user_selected_context_changed): Use
5486 ui_out_redirect_pop.
5487 * guile/scm-ports.c (ioscm_with_output_to_port_worker): Use
5488 ui_out_redirect_pop.
5489 * utils.c (do_ui_out_redirect_pop)
5490 (make_cleanup_ui_out_redirect_pop): Remove.
5491 * top.c (execute_command_to_string): Use ui_out_redirect_pop.
5492 * utils.h (make_cleanup_ui_out_redirect_pop): Remove.
5493 * ui-out.h (ui_out_redirect_pop): New class.
5494
5495 2017-09-09 Tom Tromey <tom@tromey.com>
5496
5497 * mi/mi-main.c (output_cores): Use ui_out_emit_list.
5498 (list_available_thread_groups, mi_cmd_list_thread_groups)
5499 (mi_cmd_data_list_changed_registers, mi_cmd_data_read_memory)
5500 (mi_cmd_data_read_memory_bytes, mi_cmd_trace_frame_collected):
5501 Likewise.
5502
5503 2017-09-09 Tom Tromey <tom@tromey.com>
5504
5505 * disasm.c (gdb_pretty_print_disassembler::pretty_print_insn): Use
5506 ui_out_emit_tuple.
5507
5508 2017-09-09 Tom Tromey <tom@tromey.com>
5509
5510 * target.c (flash_erase_command): Use ui_out_emit_tuple.
5511 * stack.c (print_frame): Use ui_out_emit_tuple.
5512 * spu-tdep.c (info_spu_event_command): Use ui_out_emit_tuple.
5513 (info_spu_mailbox_command, info_spu_dma_command)
5514 (info_spu_proxydma_command): Likewise.
5515 * mi/mi-main.c (mi_cmd_trace_frame_collected): Use
5516 ui_out_emit_tuple, gdb::byte_vector, bin2hex.
5517 * mi/mi-cmd-file.c (mi_cmd_file_list_shared_libraries): Use
5518 ui_out_emit_tuple.
5519 * breakpoint.c (print_it_watchpoint): Use ui_out_emit_tuple.
5520
5521 2017-09-09 Tom Tromey <tom@tromey.com>
5522
5523 * ui-out.h (make_cleanup_ui_out_table_begin_end): Remove.
5524 (class ui_out_emit_table): Update comment.
5525 * ui-out.c (do_cleanup_table_end)
5526 (make_cleanup_ui_out_table_begin_end): Remove.
5527 * spu-tdep.c (info_spu_mailbox_list): Use ui_out_emit_table.
5528 (info_spu_dma_cmdlist): Likewise.
5529 * probe.c (info_probes_for_ops): Use ui_out_emit_table.
5530 * darwin-nat-info.c (darwin_debug_regions_recurse): Use
5531 ui_out_emit_table.
5532
5533 2017-09-09 Tom Tromey <tom@tromey.com>
5534
5535 * thread.c (print_thread_info_1): Use ui_out_emit_table,
5536 ui_out_emit_list, gdb::optional.
5537
5538 2017-09-09 John Baldwin <jhb@FreeBSD.org>
5539
5540 * aarch64-linux-nat.c: Remove _initialize_aarch64_linux_nat
5541 prototype.
5542 * aarch64-linux-tdep.c: Remove _initialize_aarch64_linux_tdep
5543 prototype.
5544 * aarch64-newlib-tdep.c: Remove _initialize_aarch64_newlib_tdep
5545 prototype.
5546 * aarch64-tdep.c: Remove _initialize_aarch64_tdep prototype.
5547 * ada-exp.y: Remove _initialize_ada_exp prototype.
5548 * ada-lang.c: Remove _initialize_ada_language prototype.
5549 * ada-tasks.c: Remove _initialize_tasks prototype.
5550 * addrmap.c: Remove _initialize_addrmap prototype.
5551 * agent.c: Remove _initialize_agent prototype.
5552 * aix-thread.c: Remove _initialize_aix_thread prototype.
5553 * alpha-bsd-nat.c: Remove _initialize_alphabsd_nat prototype.
5554 * alpha-linux-nat.c: Remove _initialize_alpha_linux_nat prototype.
5555 * alpha-linux-tdep.c: Remove _initialize_alpha_linux_tdep
5556 prototype.
5557 * alpha-nbsd-tdep.c: Remove _initialize_alphanbsd_tdep prototype.
5558 * alpha-obsd-tdep.c: Remove _initialize_alphaobsd_tdep prototype.
5559 * alpha-tdep.c: Remove _initialize_alpha_tdep prototype.
5560 * amd64-darwin-tdep.c: Remove _initialize_amd64_darwin_tdep
5561 prototype.
5562 * amd64-dicos-tdep.c: Remove _initialize_amd64_dicos_tdep
5563 prototype.
5564 * amd64-fbsd-nat.c: Remove _initialize_amd64fbsd_nat prototype.
5565 * amd64-fbsd-tdep.c: Remove _initialize_amd64fbsd_tdep prototype.
5566 * amd64-linux-nat.c: Remove _initialize_amd64_linux_nat prototype.
5567 * amd64-linux-tdep.c: Remove _initialize_amd64_linux_tdep
5568 prototype.
5569 * amd64-nbsd-nat.c: Remove _initialize_amd64nbsd_nat prototype.
5570 * amd64-nbsd-tdep.c: Remove _initialize_amd64nbsd_tdep prototype.
5571 * amd64-obsd-nat.c: Remove _initialize_amd64obsd_nat prototype.
5572 * amd64-obsd-tdep.c: Remove _initialize_amd64obsd_tdep prototype.
5573 * amd64-sol2-tdep.c: Remove _initialize_amd64_sol2_tdep prototype.
5574 * amd64-tdep.c: Remove _initialize_amd64_tdep prototype.
5575 * amd64-windows-nat.c: Remove _initialize_amd64_windows_nat
5576 prototype.
5577 * amd64-windows-tdep.c: Remove _initialize_amd64_windows_tdep
5578 prototype.
5579 * annotate.c: Remove _initialize_annotate prototype.
5580 * arc-newlib-tdep.c: Remove _initialize_arc_newlib_tdep prototype.
5581 * arc-tdep.c: Remove _initialize_arc_tdep prototype.
5582 * arch-utils.c: Remove _initialize_gdbarch_utils prototype.
5583 * arm-linux-nat.c: Remove _initialize_arm_linux_nat prototype.
5584 * arm-linux-tdep.c: Remove _initialize_arm_linux_tdep prototype.
5585 * arm-nbsd-tdep.c: Remove _initialize_arm_netbsd_tdep prototype.
5586 * arm-obsd-tdep.c: Remove _initialize_armobsd_tdep prototype.
5587 * arm-symbian-tdep.c: Remove _initialize_arm_symbian_tdep
5588 prototype.
5589 * arm-tdep.c: Remove _initialize_arm_tdep prototype.
5590 * arm-wince-tdep.c: Remove _initialize_arm_wince_tdep prototype.
5591 * auto-load.c: Remove _initialize_auto_load prototype.
5592 * auxv.c: Remove _initialize_auxv prototype.
5593 * avr-tdep.c: Remove _initialize_avr_tdep prototype.
5594 * ax-gdb.c: Remove _initialize_ax_gdb prototype.
5595 * bfin-linux-tdep.c: Remove _initialize_bfin_linux_tdep prototype.
5596 * bfin-tdep.c: Remove _initialize_bfin_tdep prototype.
5597 * break-catch-sig.c: Remove _initialize_break_catch_sig prototype.
5598 * break-catch-syscall.c: Remove _initialize_break_catch_syscall
5599 prototype.
5600 * break-catch-throw.c: Remove _initialize_break_catch_throw
5601 prototype.
5602 * breakpoint.c: Remove _initialize_breakpoint prototype.
5603 * bsd-uthread.c: Remove _initialize_bsd_uthread prototype.
5604 * btrace.c: Remove _initialize_btrace prototype.
5605 * charset.c: Remove _initialize_charset prototype.
5606 * cli/cli-cmds.c: Remove _initialize_cli_cmds prototype.
5607 * cli/cli-dump.c: Remove _initialize_cli_dump prototype.
5608 * cli/cli-interp.c: Remove _initialize_cli_interp prototype.
5609 * cli/cli-logging.c: Remove _initialize_cli_logging prototype.
5610 * cli/cli-script.c: Remove _initialize_cli_script prototype.
5611 * coff-pe-read.c: Remove _initialize_coff_pe_read prototype.
5612 * coffread.c: Remove _initialize_coffread prototype.
5613 * compile/compile.c: Remove _initialize_compile prototype.
5614 * complaints.c: Remove _initialize_complaints prototype.
5615 * completer.c: Remove _initialize_completer prototype.
5616 * copying.awk: Remove _initialize_copying prototype.
5617 * copying.c: Regenerate.
5618 * core-regset.c: Remove _initialize_core_regset prototype.
5619 * corefile.c: Remove _initialize_core prototype.
5620 * corelow.c: Remove _initialize_corelow prototype.
5621 * cp-abi.c: Remove _initialize_cp_abi prototype.
5622 * cp-namespace.c: Remove _initialize_cp_namespace prototype.
5623 * cp-support.c: Remove _initialize_cp_support prototype.
5624 * cp-valprint.c: Remove _initialize_cp_valprint prototype.
5625 * cris-linux-tdep.c: Remove _initialize_cris_linux_tdep prototype.
5626 * cris-tdep.c: Remove _initialize_cris_tdep prototype.
5627 * ctf.c: Remove _initialize_ctf prototype.
5628 * d-lang.c: Remove _initialize_d_language prototype.
5629 * darwin-nat-info.c: Remove _initialize_darwin_info_commands
5630 prototype.
5631 * darwin-nat.c: Remove _initialize_darwin_inferior prototype.
5632 * dbxread.c: Remove _initialize_dbxread prototype.
5633 * dcache.c: Remove _initialize_dcache prototype.
5634 * demangle.c: Remove _initialize_demangler prototype.
5635 * disasm-selftests.c: Remove _initialize_disasm_selftests
5636 prototype.
5637 * disasm.c: Remove _initialize_disasm prototype.
5638 * dtrace-probe.c: Remove _initialize_dtrace_probe prototype.
5639 * dummy-frame.c: Remove _initialize_dummy_frame prototype.
5640 * dwarf2-frame-tailcall.c: Remove _initialize_tailcall_frame
5641 prototype.
5642 * dwarf2-frame.c: Remove _initialize_dwarf2_frame prototype.
5643 * dwarf2expr.c: Remove _initialize_dwarf2expr prototype.
5644 * dwarf2loc.c: Remove _initialize_dwarf2loc prototype.
5645 * dwarf2read.c: Remove _initialize_dwarf2_read prototype.
5646 * elfread.c: Remove _initialize_elfread prototype.
5647 * exec.c: Remove _initialize_exec prototype.
5648 * extension.c: Remove _initialize_extension prototype.
5649 * f-lang.c: Remove _initialize_f_language prototype.
5650 * f-valprint.c: Remove _initialize_f_valprint prototype.
5651 * fbsd-nat.c: Remove _initialize_fbsd_nat prototype.
5652 * fbsd-tdep.c: Remove _initialize_fbsd_tdep prototype.
5653 * filesystem.c: Remove _initialize_filesystem prototype.
5654 * findcmd.c: Remove _initialize_mem_search prototype.
5655 * fork-child.c: Remove _initialize_fork_child prototype.
5656 * frame-base.c: Remove _initialize_frame_base prototype.
5657 * frame-unwind.c: Remove _initialize_frame_unwind prototype.
5658 * frame.c: Remove _initialize_frame prototype.
5659 * frv-linux-tdep.c: Remove _initialize_frv_linux_tdep prototype.
5660 * frv-tdep.c: Remove _initialize_frv_tdep prototype.
5661 * ft32-tdep.c: Remove _initialize_ft32_tdep prototype.
5662 * gcore.c: Remove _initialize_gcore prototype.
5663 * gdb_bfd.c: Remove _initialize_gdb_bfd prototype.
5664 * gdbarch.c: Regenerate.
5665 * gdbarch.sh: Remove _initialize_gdbarch prototype.
5666 * gdbtypes.c: Remove _initialize_gdbtypes prototype.
5667 * gnu-nat.c: Remove _initialize_gnu_nat prototype.
5668 * gnu-v2-abi.c: Remove _initialize_gnu_v2_abi prototype.
5669 * gnu-v3-abi.c: Remove _initialize_gnu_v3_abi prototype.
5670 * go-lang.c: Remove _initialize_go_language prototype.
5671 * go32-nat.c: Remove _initialize_go32_nat prototype.
5672 * guile/guile.c: Remove _initialize_guile prototype.
5673 * h8300-tdep.c: Remove _initialize_h8300_tdep prototype.
5674 * hppa-linux-nat.c: Remove _initialize_hppa_linux_nat prototype.
5675 * hppa-linux-tdep.c: Remove _initialize_hppa_linux_tdep prototype.
5676 * hppa-nbsd-nat.c: Remove _initialize_hppanbsd_nat prototype.
5677 * hppa-nbsd-tdep.c: Remove _initialize_hppanbsd_tdep prototype.
5678 * hppa-obsd-nat.c: Remove _initialize_hppaobsd_nat prototype.
5679 * hppa-obsd-tdep.c: Remove _initialize_hppaobsd_tdep prototype.
5680 * hppa-tdep.c: Remove _initialize_hppa_tdep prototype.
5681 * i386-bsd-nat.c: Remove _initialize_i386bsd_nat prototype.
5682 * i386-cygwin-tdep.c: Remove _initialize_i386_cygwin_tdep
5683 prototype.
5684 * i386-darwin-tdep.c: Remove _initialize_i386_darwin_tdep
5685 prototype.
5686 * i386-dicos-tdep.c: Remove _initialize_i386_dicos_tdep prototype.
5687 * i386-fbsd-nat.c: Remove _initialize_i386fbsd_nat prototype.
5688 * i386-fbsd-tdep.c: Remove _initialize_i386fbsd_tdep prototype.
5689 * i386-gnu-nat.c: Remove _initialize_i386gnu_nat prototype.
5690 * i386-gnu-tdep.c: Remove _initialize_i386gnu_tdep prototype.
5691 * i386-linux-nat.c: Remove _initialize_i386_linux_nat prototype.
5692 * i386-linux-tdep.c: Remove _initialize_i386_linux_tdep prototype.
5693 * i386-nbsd-nat.c: Remove _initialize_i386nbsd_nat prototype.
5694 * i386-nbsd-tdep.c: Remove _initialize_i386nbsd_tdep prototype.
5695 * i386-nto-tdep.c: Remove _initialize_i386nto_tdep prototype.
5696 * i386-obsd-nat.c: Remove _initialize_i386obsd_nat prototype.
5697 * i386-obsd-tdep.c: Remove _initialize_i386obsd_tdep prototype.
5698 * i386-sol2-nat.c: Remove _initialize_amd64_sol2_nat prototype.
5699 * i386-sol2-tdep.c: Remove _initialize_amd64_sol2_tdep prototype.
5700 * i386-tdep.c: Remove _initialize_i386_tdep prototype.
5701 * i386-windows-nat.c: Remove _initialize_i386_windows_nat
5702 prototype.
5703 * ia64-libunwind-tdep.c: Remove _initialize_libunwind_frame
5704 prototype.
5705 * ia64-linux-nat.c: Remove _initialize_ia64_linux_nat prototype.
5706 * ia64-linux-tdep.c: Remove _initialize_ia64_linux_tdep prototype.
5707 * ia64-tdep.c: Remove _initialize_ia64_tdep prototype.
5708 * ia64-vms-tdep.c: Remove _initialize_ia64_vms_tdep prototype.
5709 * infcall.c: Remove _initialize_infcall prototype.
5710 * infcmd.c: Remove _initialize_infcmd prototype.
5711 * inferior.c: Remove _initialize_inferiors prototype.
5712 * inflow.c: Remove _initialize_inflow prototype.
5713 * infrun.c: Remove _initialize_infrun prototype.
5714 * interps.c: Remove _initialize_interpreter prototype.
5715 * iq2000-tdep.c: Remove _initialize_iq2000_tdep prototype.
5716 * jit.c: Remove _initialize_jit prototype.
5717 * language.c: Remove _initialize_language prototype.
5718 * linux-fork.c: Remove _initialize_linux_fork prototype.
5719 * linux-nat.c: Remove _initialize_linux_nat prototype.
5720 * linux-tdep.c: Remove _initialize_linux_tdep prototype.
5721 * linux-thread-db.c: Remove _initialize_thread_db prototype.
5722 * lm32-tdep.c: Remove _initialize_lm32_tdep prototype.
5723 * m2-lang.c: Remove _initialize_m2_language prototype.
5724 * m32c-tdep.c: Remove _initialize_m32c_tdep prototype.
5725 * m32r-linux-nat.c: Remove _initialize_m32r_linux_nat prototype.
5726 * m32r-linux-tdep.c: Remove _initialize_m32r_linux_tdep prototype.
5727 * m32r-tdep.c: Remove _initialize_m32r_tdep prototype.
5728 * m68hc11-tdep.c: Remove _initialize_m68hc11_tdep prototype.
5729 * m68k-bsd-nat.c: Remove _initialize_m68kbsd_nat prototype.
5730 * m68k-bsd-tdep.c: Remove _initialize_m68kbsd_tdep prototype.
5731 * m68k-linux-nat.c: Remove _initialize_m68k_linux_tdep prototype.
5732 * m68k-linux-tdep.c: Remove _initialize_m68k_linux_tdep prototype.
5733 * m68k-tdep.c: Remove _initialize_m68k_tdep prototype.
5734 * m88k-bsd-nat.c: Remove _initialize_m68kbsd_nat prototype.
5735 * m88k-tdep.c: Remove _initialize_m68kbsd_tdep prototype.
5736 * machoread.c: Remove _initialize_machoread prototype.
5737 * macrocmd.c: Remove _initialize_macrocmd prototype.
5738 * macroscope.c: Remove _initialize_macroscope prototype.
5739 * maint.c: Remove _initialize_maint_cmds prototype.
5740 * mdebugread.c: Remove _initialize_mdebugread prototype.
5741 * memattr.c: Remove _initialize_mem prototype.
5742 * mep-tdep.c: Remove _initialize_mep_tdep prototype.
5743 * mi/mi-cmd-env.c: Remove _initialize_mi_cmd_env prototype.
5744 * mi/mi-cmds.c: Remove _initialize_mi_cmds prototype.
5745 * mi/mi-interp.c: Remove _initialize_mi_interp prototype.
5746 * mi/mi-main.c: Remove _initialize_mi_main prototype.
5747 * microblaze-linux-tdep.c: Remove
5748 _initialize_microblaze_linux_tdep prototype.
5749 * microblaze-tdep.c: Remove _initialize_microblaze_tdep prototype.
5750 * mips-fbsd-nat.c: Remove _initialize_mips_fbsd_nat prototype.
5751 * mips-fbsd-tdep.c: Remove _initialize_mips_fbsd_tdep prototype.
5752 * mips-linux-nat.c: Remove _initialize_mips_linux_nat prototype.
5753 * mips-linux-tdep.c: Remove _initialize_mips_linux_tdep prototype.
5754 * mips-nbsd-nat.c: Remove _initialize_mipsnbsd_nat prototype.
5755 * mips-nbsd-tdep.c: Remove _initialize_mipsnbsd_tdep prototype.
5756 * mips-sde-tdep.c: Remove _initialize_mips_sde_tdep prototype.
5757 * mips-tdep.c: Remove _initialize_mips_tdep prototype.
5758 * mips64-obsd-nat.c: Remove _initialize_mips64obsd_nat prototype.
5759 * mips64-obsd-tdep.c: Remove _initialize_mips64obsd_tdep
5760 prototype.
5761 * mipsread.c: Remove _initialize_mipsread prototype.
5762 * mn10300-linux-tdep.c: Remove _initialize_mn10300_linux_tdep
5763 prototype.
5764 * mn10300-tdep.c: Remove _initialize_mn10300_tdep prototype.
5765 * moxie-tdep.c: Remove _initialize_moxie_tdep prototype.
5766 * msp430-tdep.c: Remove _initialize_msp430_tdep prototype.
5767 * mt-tdep.c: Remove _initialize_mt_tdep prototype.
5768 * nds32-tdep.c: Remove _initialize_nds32_tdep prototype.
5769 * nios2-linux-tdep.c: Remove _initialize_nios2_linux_tdep
5770 prototype.
5771 * nios2-tdep.c: Remove _initialize_nios2_tdep prototype.
5772 * nto-procfs.c: Remove _initialize_procfs prototype.
5773 * nto-tdep.c: Remove _initialize_nto_tdep prototype.
5774 * objc-lang.c: Remove _initialize_objc_language prototype.
5775 * objfiles.c: Remove _initialize_objfiles prototype.
5776 * observer.c: Remove observer_test_first_notification_function,
5777 observer_test_second_notification_function,
5778 observer_test_third_notification_function, and
5779 _initialize_observer prototypes.
5780 * opencl-lang.c: Remove _initialize_opencl_language prototypes.
5781 * osabi.c: Remove _initialize_gdb_osabi prototype.
5782 * osdata.c: Remove _initialize_osdata prototype.
5783 * p-valprint.c: Remove _initialize_pascal_valprint prototype.
5784 * parse.c: Remove _initialize_parse prototype.
5785 * ppc-fbsd-nat.c: Remove _initialize_ppcfbsd_nat prototype.
5786 * ppc-fbsd-tdep.c: Remove _initialize_ppcfbsd_tdep prototype.
5787 * ppc-linux-nat.c: Remove _initialize_ppc_linux_nat prototype.
5788 * ppc-linux-tdep.c: Remove _initialize_ppc_linux_tdep prototype.
5789 * ppc-nbsd-nat.c: Remove _initialize_ppcnbsd_nat prototype.
5790 * ppc-nbsd-tdep.c: Remove _initialize_ppcnbsd_tdep prototype.
5791 * ppc-obsd-nat.c: Remove _initialize_ppcobsd_nat prototype.
5792 * ppc-obsd-tdep.c: Remove _initialize_ppcobsd_tdep prototype.
5793 * printcmd.c: Remove _initialize_printcmd prototype.
5794 * probe.c: Remove _initialize_probe prototype.
5795 * proc-api.c: Remove _initialize_proc_api prototype.
5796 * proc-events.c: Remove _initialize_proc_events prototype.
5797 * proc-service.c: Remove _initialize_proc_service prototype.
5798 * procfs.c: Remove _initialize_procfs prototype.
5799 * psymtab.c: Remove _initialize_psymtab prototype.
5800 * python/python.c: Remove _initialize_python prototype.
5801 * ravenscar-thread.c: Remove _initialize_ravenscar prototype.
5802 * record-btrace.c: Remove _initialize_record_btrace prototype.
5803 * record-full.c: Remove _initialize_record_full prototype.
5804 * record.c: Remove _initialize_record prototype.
5805 * regcache.c: Remove _initialize_regcache prototype.
5806 * reggroups.c: Remove _initialize_reggroup prototype.
5807 * remote-notif.c: Remove _initialize_notif prototype.
5808 * remote-sim.c: Remove _initialize_remote_sim prototype.
5809 * remote.c: Remove _initialize_remote prototype.
5810 * reverse.c: Remove _initialize_reverse prototype.
5811 * rl78-tdep.c: Remove _initialize_rl78_tdep prototype.
5812 * rs6000-aix-tdep.c: Remove _initialize_rs6000_aix_tdep prototype.
5813 * rs6000-lynx178-tdep.c: Remove _initialize_rs6000_lynx178_tdep
5814 prototype.
5815 * rs6000-nat.c: Remove _initialize_rs6000_nat prototype.
5816 * rs6000-tdep.c: Remove _initialize_rs6000_tdep prototype.
5817 * rust-exp.y: Remove _initialize_rust_exp prototype.
5818 * rx-tdep.c: Remove _initialize_rx_tdep prototype.
5819 * s390-linux-nat.c: Remove _initialize_s390_nat prototype.
5820 * s390-linux-tdep.c: Remove _initialize_s390_tdep prototype.
5821 * score-tdep.c: Remove _initialize_score_tdep prototype.
5822 * selftest-arch.c: Remove _initialize_selftests_foreach_arch
5823 prototype.
5824 * ser-go32.c: Remove _initialize_ser_dos prototype.
5825 * ser-mingw.c: Remove _initialize_ser_windows prototype.
5826 * ser-pipe.c: Remove _initialize_ser_pipe prototype.
5827 * ser-tcp.c: Remove _initialize_ser_tcp prototype.
5828 * ser-unix.c: Remove _initialize_ser_hardwire prototype.
5829 * serial.c: Remove _initialize_serial prototype.
5830 * sh-linux-tdep.c: Remove _initialize_sh_linux_tdep prototype.
5831 * sh-nbsd-nat.c: Remove _initialize_shnbsd_nat prototype.
5832 * sh-nbsd-tdep.c: Remove _initialize_shnbsd_tdep prototype.
5833 * sh-tdep.c: Remove _initialize_sh_tdep prototype.
5834 * skip.c: Remove _initialize_step_skip prototype.
5835 * sol-thread.c: Remove _initialize_sol_thread prototype.
5836 * solib-aix.c: Remove _initialize_solib_aix prototype.
5837 * solib-darwin.c: Remove _initialize_darwin_solib prototype.
5838 * solib-dsbt.c: Remove _initialize_dsbt_solib prototype.
5839 * solib-frv.c: Remove _initialize_frv_solib prototype.
5840 * solib-spu.c: Remove _initialize_spu_solib prototype.
5841 * solib-svr4.c: Remove _initialize_svr4_solib prototype.
5842 * solib-target.c: Remove _initialize_solib_target prototype.
5843 * solib.c: Remove _initialize_solib prototype.
5844 * source.c: Remove _initialize_source prototype.
5845 * sparc-linux-nat.c: Remove _initialize_sparc_linux_nat prototype.
5846 * sparc-linux-tdep.c: Remove _initialize_sparc_linux_tdep
5847 prototype.
5848 * sparc-nat.c: Remove _initialize_sparc_nat prototype.
5849 * sparc-nbsd-nat.c: Remove _initialize_sparcnbsd_nat prototype.
5850 * sparc-nbsd-tdep.c: Remove _initialize_sparcnbsd_tdep prototype.
5851 * sparc-obsd-tdep.c: Remove _initialize_sparc32obsd_tdep
5852 prototype.
5853 * sparc-sol2-nat.c: Remove _initialize_sparc_sol2_nat prototype.
5854 * sparc-sol2-tdep.c: Remove _initialize_sparc_sol2_tdep prototype.
5855 * sparc-tdep.c: Remove _initialize_sparc_tdep prototype.
5856 * sparc64-fbsd-nat.c: Remove _initialize_sparc64fbsd_nat
5857 prototype.
5858 * sparc64-fbsd-tdep.c: Remove _initialize_sparc64fbsd_tdep
5859 prototype.
5860 * sparc64-linux-nat.c: Remove _initialize_sparc64_linux_nat
5861 prototype.
5862 * sparc64-linux-tdep.c: Remove _initialize_sparc64_linux_tdep
5863 prototype.
5864 * sparc64-nat.c: Remove _initialize_sparc64_nat prototype.
5865 * sparc64-nbsd-nat.c: Remove _initialize_sparc64nbsd_nat
5866 prototype.
5867 * sparc64-nbsd-tdep.c: Remove _initialize_sparc64nbsd_tdep
5868 prototype.
5869 * sparc64-obsd-nat.c: Remove _initialize_sparc64obsd_nat
5870 prototype.
5871 * sparc64-obsd-tdep.c: Remove _initialize_sparc64obsd_tdep
5872 prototype.
5873 * sparc64-sol2-tdep.c: Remove _initialize_sparc64_sol2_tdep
5874 prototype.
5875 * spu-linux-nat.c: Remove _initialize_spu_nat prototype.
5876 * spu-multiarch.c: Remove _initialize_spu_multiarch prototype.
5877 * spu-tdep.c: Remove _initialize_spu_tdep prototype.
5878 * stabsread.c: Remove _initialize_stabsread prototype.
5879 * stack.c: Remove _initialize_stack prototype.
5880 * stap-probe.c: Remove _initialize_stap_probe prototype.
5881 * std-regs.c: Remove _initialize_frame_reg prototype.
5882 * symfile-debug.c: Remove _initialize_symfile_debug prototype.
5883 * symfile-mem.c: Remove _initialize_symfile_mem prototype.
5884 * symfile.c: Remove _initialize_symfile prototype.
5885 * symmisc.c: Remove _initialize_symmisc prototype.
5886 * symtab.c: Remove _initialize_symtab prototype.
5887 * target-dcache.c: Remove _initialize_target_dcache prototype.
5888 * target-descriptions.c: Remove _initialize_target_descriptions
5889 prototype.
5890 * thread.c: Remove _initialize_thread prototype.
5891 * tic6x-linux-tdep.c: Remove _initialize_tic6x_linux_tdep
5892 prototype.
5893 * tic6x-tdep.c: Remove _initialize_tic6x_tdep prototype.
5894 * tilegx-linux-nat.c: Remove _initialize_tile_linux_nat prototype.
5895 * tilegx-linux-tdep.c: Remove _initialize_tilegx_linux_tdep
5896 prototype.
5897 * tilegx-tdep.c: Remove _initialize_tilegx_tdep prototype.
5898 * tracefile-tfile.c: Remove _initialize_tracefile_tfile prototype.
5899 * tracefile.c: Remove _initialize_tracefile prototype.
5900 * tracepoint.c: Remove _initialize_tracepoint prototype.
5901 * tui/tui-hooks.c: Remove _initialize_tui_hooks prototype.
5902 * tui/tui-interp.c: Remove _initialize_tui_interp prototype.
5903 * tui/tui-layout.c: Remove _initialize_tui_layout prototype.
5904 * tui/tui-regs.c: Remove _initialize_tui_regs prototype.
5905 * tui/tui-stack.c: Remove _initialize_tui_stack prototype.
5906 * tui/tui-win.c: Remove _initialize_tui_win prototype.
5907 * tui/tui.c: Remove _initialize_tui prototype.
5908 * typeprint.c: Remove _initialize_typeprint prototype.
5909 * user-regs.c: Remove _initialize_user_regs prototype.
5910 * utils.c: Remove _initialize_utils prototype.
5911 * v850-tdep.c: Remove _initialize_v850_tdep prototype.
5912 * valarith.c: Remove _initialize_valarith prototype.
5913 * valops.c: Remove _initialize_valops prototype.
5914 * valprint.c: Remove _initialize_valprint prototype.
5915 * value.c: Remove _initialize_values prototype.
5916 * varobj.c: Remove _initialize_varobj prototype.
5917 * vax-bsd-nat.c: Remove _initialize_vaxbsd_nat prototype.
5918 * vax-nbsd-tdep.c: Remove _initialize_vaxnbsd_tdep prototype.
5919 * vax-tdep.c: Remove _initialize_vax_tdep prototype.
5920 * windows-nat.c: Remove _initialize_windows_nat,
5921 _initialize_check_for_gdb_ini, and _initialize_loadable
5922 prototypes.
5923 * windows-tdep.c: Remove _initialize_windows_tdep prototype.
5924 * xcoffread.c: Remove _initialize_xcoffread prototype.
5925 * xml-support.c: Remove _initialize_xml_support prototype.
5926 * xstormy16-tdep.c: Remove _initialize_xstormy16_tdep prototype.
5927 * xtensa-linux-nat.c: Remove _initialize_xtensa_linux_nat
5928 prototype.
5929 * xtensa-linux-tdep.c: Remove _initialize_xtensa_linux_tdep
5930 prototype.
5931 * xtensa-tdep.c: Remove _initialize_xtensa_tdep prototype.
5932
5933 2017-09-08 Keith Seitz <keiths@redhat.com>
5934
5935 * dwarf2read.c (struct field_info) <fnfields>: Remove unused
5936 field.
5937
5938 2017-09-08 Christoph Weinmann <christoph.t.weinmann@intel.com>
5939
5940 * f-valprint.c (f_val_print): Remove check for one byte
5941 sized integers. Remove printing of character type.
5942
5943 2017-09-08 Frank Penczek <frank.penczek@intel.com>
5944 Christoph Weinmann <christoph.t.weinmann@intel.com>
5945 Bernhard Heckel <bernhard.heckel@intel.com>
5946
5947 * f-typeprint.c (f_type_print_base): Use fprintfi_filtered
5948 to maintain proper indentation when printing pointers/refs.
5949
5950 2017-09-07 Joel Brobecker <brobecker@adacore.com>
5951
5952 GDB 8.0.1 released.
5953
5954 2017-09-07 Joel Brobecker <brobecker@adacore.com>
5955
5956 * NEWS (Changes in GDB 7.11): Remove entry for QStartupWithShell.
5957
5958 2017-09-05 Tom Tromey <tom@tromey.com>
5959
5960 * parse.c (funcall_chain): Now a std::vector.
5961 (start_arglist, end_arglist): Simplify.
5962 (free_funcalls): Remove.
5963 (parse_exp_in_context_1): Remove cleanup.
5964
5965 2017-09-05 Tom Tromey <tom@tromey.com>
5966
5967 * go-exp.y (go_parse): Don't create a cleanup.
5968
5969 2017-09-05 Tom Tromey <tom@tromey.com>
5970
5971 * d-exp.y (PrimaryExpression): Use std::string.
5972 (d_parse): Don't create a cleanup.
5973
5974 2017-09-05 Tom Tromey <tom@tromey.com>
5975
5976 * utils.c (do_clear_parser_state): Remove.
5977 (make_cleanup_clear_parser_state): Remove.
5978 * p-exp.y (pascal_parse): Use scoped_restore.
5979 * m2-exp.y (m2_parse): Use scoped_restore.
5980 * f-exp.y (f_parse): Use scoped_restore.
5981 * d-exp.y (d_parse): Use scoped_restore.
5982 * c-exp.y (c_parse): Use scoped_restore.
5983 * ada-exp.y (ada_parse): Use scoped_restore.
5984 * utils.h (make_cleanup_clear_parser_state): Remove.
5985
5986 2017-09-06 Keith Seitz <keiths@redhat.com>
5987
5988 * dwarf2read.c (dw2_linkage_name_attr): New function.
5989 (dw2_linkage_name): New function.
5990 (dwarf2_compute_name, dwarf2_physname, read_call_site_scope)
5991 (guess_full_die_structure_name, dwarf2_name): Use dw2_linkage_name.
5992 (anonymous_struct_prefix, dwarf2_name): Use dw2_linkage_name_attr.
5993
5994 2017-09-06 Kamil Rytarowski <n54@gmx.com>
5995
5996 * config/djgpp/djconfig.sh: Correct shell portability issue.
5997
5998 2017-09-06 Kamil Rytarowski <n54@gmx.com>
5999
6000 * configure.nat: Define HAVE_NATIVE_GCORE_HOST on NetBSD.
6001
6002 2017-09-06 John Baldwin <jhb@FreeBSD.org>
6003
6004 * Makefile.in (ALLDEPFILES): Add mips-fbsd-nat.c.
6005 * NEWS: Mention new FreeBSD/mips native configuration.
6006 * configure.host: Add aarch64*-*-freebsd*.
6007 * configure.nat: Likewise.
6008 * aarch64-fbsd-nat.c: New file.
6009
6010 2017-09-06 John Baldwin <jhb@FreeBSD.org>
6011
6012 * Makefile.in (ALL_64_TARGET_OBS): Add aarch64-fbsd-tdep.o.
6013 (ALLDEPFILES): Add aarch64-fbsd-tdep.c.
6014 * NEWS: Mention new FreeBSD/aarch64 target.
6015 * configure.tgt: Add aarch64*-*-freebsd*.
6016 * aarch64-fbsd-tdep.c: New file.
6017 * aarch64-fbsd-tdep.h: New file.
6018
6019 2017-09-06 Kamil Rytarowski <n54@gmx.com>
6020
6021 * MAINTAINERS (Write After Approval): Add Kamil Rytarowski.
6022
6023 2017-09-06 Jan Kratochvil <jan.kratochvil@redhat.com>
6024
6025 * parse.c (find_minsym_type_and_address): Don't relocate addresses
6026 of TLS symbols.
6027
6028 2017-09-05 Philippe Waroquiers <philippe.waroquiers@skynet.be>
6029
6030 * objfiles.c (get_objfile_bfd_data): Remove useless obstack_init
6031 call.
6032
6033 2017-09-05 Simon Marchi <simon.marchi@ericsson.com>
6034
6035 * infrun.c (follow_exec): Call add_thread after
6036 target_find_description.
6037
6038 2017-09-05 Simon Marchi <simon.marchi@ericsson.com>
6039
6040 * infrun.c (handle_inferior_event_1): When exec'ing, read
6041 stop_pc after follow_exec.
6042
6043 2017-09-05 Simon Marchi <simon.marchi@ericsson.com>
6044
6045 * remote.c (process_g_packet): Update error message.
6046
6047 2017-09-05 Yao Qi <yao.qi@linaro.org>
6048
6049 * configure.tgt (gdb_target_obs): Add i386.o for x86_64-*
6050 targets.
6051
6052 2017-09-05 Pedro Alves <palves@redhat.com>
6053
6054 * eval.c (eval_call, evaluate_funcall): New functions, factored
6055 out from ...
6056 (evaluate_subexp_standard): ... this.
6057
6058 2017-09-05 Yao Qi <yao.qi@linaro.org>
6059
6060 * amd64-tdep.c (amd64_target_description): Create target
6061 descriptions.
6062 (_initialize_amd64_tdep): Don't call functions
6063 initialize_tdesc_amd64_*. Add self tests.
6064 * arch/amd64.c (amd64_create_target_description): Add parameter
6065 is_linux. Call set_tdesc_osabi if is_linux is true.
6066 * arch/amd64.h (amd64_create_target_description): Update the
6067 declaration.
6068 * arch/i386.c (i386_create_target_description): Add parameter
6069 is_linux. Call set_tdesc_osabi if is_linux is true.
6070 * arch/i386.h (i386_create_target_description): Update
6071 declaration.
6072 * configure.tgt: Add i386.o to gdb_target_obs.
6073 * features/Makefile (XMLTOC): Remove i386/*.xml.
6074 * features/i386/amd64-avx-avx512.c: Remove.
6075 * features/i386/amd64-avx-mpx-avx512-pku.c: Remove.
6076 * features/i386/amd64-avx-mpx.c: Remove.
6077 * features/i386/amd64-avx.c: Remove.
6078 * features/i386/amd64-mpx.c: Remove.
6079 * features/i386/amd64.c: Remove.
6080 * features/i386/i386-avx-avx512.c: Remove.
6081 * features/i386/i386-avx-mpx-avx512-pku.c: Remove.
6082 * features/i386/i386-avx-mpx.c: Remove.
6083 * features/i386/i386-avx.c: Remove.
6084 * features/i386/i386-mmx.c: Remove.
6085 * features/i386/i386-mpx.c: Remove.
6086 * features/i386/i386.c: Remove.
6087 * i386-tdep.c: Don't include features/i386/i386*.c., include
6088 target-descriptions.h and arch/i386.h.
6089 (i386_target_description): Create target descriptions.
6090 (i386_gdbarch_init): Don't call initialize_tdesc_i386_*
6091 functions. Do self tests.
6092
6093 2017-09-05 Yao Qi <yao.qi@linaro.org>
6094
6095 * features/Makefile (XMLTOC): Remove i386/amd64XXX-linux.xml.
6096 * features/i386/amd64-avx-avx512-linux.c: Removed.
6097 * features/i386/amd64-avx-linux.c: Removed.
6098 * features/i386/amd64-avx-mpx-avx512-pku-linux.c: Removed.
6099 * features/i386/amd64-avx-mpx-linux.c: Removed.
6100 * features/i386/amd64-linux.c: Removed.
6101 * features/i386/amd64-mpx-linux.c: Removed.
6102 * features/i386/x32-avx-avx512-linux.c: Removed.
6103 * features/i386/x32-avx-linux.c: Removed.
6104 * features/i386/x32-linux.c: Removed.
6105
6106 2017-09-05 Yao Qi <yao.qi@linaro.org>
6107
6108 * amd64-linux-tdep.c: Include arch/amd64.h. Don't include
6109 features/i386/*.c.
6110 (amd64_linux_read_description): Call
6111 amd64_create_target_description.
6112 * arch/amd64.c: New file.
6113 * arch/amd64.h: New file.
6114 * configure.tgt (x86_64-*-linux*): Append amd64.o.
6115 * Makefile.in (ALL_64_TARGET_OBS): Append amd64.o.
6116
6117 2017-09-05 Yao Qi <yao.qi@linaro.org>
6118
6119 * amd64-linux-tdep.c: Don't include amd64-XXX-linux and
6120 x32-XXX-linux.c. Include 64bit-XX.c and x32-XX.c.
6121 (amd64_linux_read_description): Create target descriptions.
6122 (_initialize_amd64_linux_tdep): Don't call initialize_tdesc_XXX
6123 functions. Add unit tests.
6124 * features/Makefile (FEATURE_XMLFILES): Append 64bit-XXX.xml and
6125 x32-core.xml.
6126 * features/i386/64bit-avx.c: Generated.
6127 * features/i386/64bit-avx512.c: Generated.
6128 * features/i386/64bit-core.c: Generated.
6129 * features/i386/64bit-linux.c: Generated.
6130 * features/i386/64bit-mpx.c: Generated.
6131 * features/i386/64bit-pkeys.c: Generated.
6132 * features/i386/64bit-segments.c: Generated.
6133 * features/i386/64bit-sse.c: Generated.
6134 * features/i386/x32-core.c: Generated.
6135 * target-descriptions.c (maint_print_c_tdesc_cmd): Print feature
6136 c files for amd64-linux and x32-linux.
6137
6138 2017-09-05 Yao Qi <yao.qi@linaro.org>
6139
6140 * amd64-linux-tdep.c (amd64_linux_read_description): New
6141 function.
6142 (amd64_linux_core_read_description): Call
6143 amd64_linux_read_description.
6144 (amd64_linux_init_abi): Likewise.
6145 (amd64_x32_linux_init_abi): Likewise.
6146 * amd64-linux-tdep.h (amd64_linux_read_description): Declare.
6147 * x86-linux-nat.c (x86_linux_read_description): Call
6148 amd64_linux_read_description.
6149
6150 2017-09-05 Yao Qi <yao.qi@linaro.org>
6151
6152 * amd64-linux-tdep.c (amd64_linux_core_read_description): Update
6153 comments.
6154
6155 2017-09-05 Yao Qi <yao.qi@linaro.org>
6156
6157 * features/Makefile (XMLTOC): Remove i386/i386-XX-linux.xml.
6158 * features/i386/i386-avx-avx512-linux.c: Remove.
6159 * features/i386/i386-avx-linux.c: Remove.
6160 * features/i386/i386-avx-mpx-avx512-pku-linux.c: Remove.
6161 * features/i386/i386-avx-mpx-linux.c: Remove.
6162 * features/i386/i386-linux.c: Remove.
6163 * features/i386/i386-mmx-linux.c: Remove.
6164 * features/i386/i386-mpx-linux.c: Remove.
6165
6166 2017-09-05 Yao Qi <yao.qi@linaro.org>
6167
6168 * Makefile.in (ALL_TARGET_OBS): Add i386.o.
6169 (SFILES): Add arch/i386.c.
6170 (HFILES_NO_SRCDIR): Add arch/i386.h.
6171 * arch/i386.c: New file.
6172 * arch/i386.h: New file.
6173 * arch/tdesc.h (allocate_target_description): Declare.
6174 (set_tdesc_architecture): Declare.
6175 (set_tdesc_osabi): Declare.
6176 * configure.tgt (i[34567]86-*-linux*): Add i386.o.
6177 * i386-linux-tdep.c: Don't include ../features/i386/32bit-XXX.c.
6178 include arch/i386.h.
6179 (i386_linux_read_description): Remove code and call
6180 i386_create_target_description.
6181 (set_tdesc_architecture): New function.
6182 (set_tdesc_osabi): New function.
6183 * target-descriptions.h (allocate_target_description): Remove.
6184
6185 2017-09-05 Yao Qi <yao.qi@linaro.org>
6186
6187 * arch/tdesc.h (tdesc_create_feature): Add an argument xml.
6188 * target-descriptions.c (tdesc_create_feature): Likewise, and
6189 adjust code.
6190 * features/i386/32bit-avx.c: Re-generated.
6191 * features/i386/32bit-avx512.c: Re-generated.
6192 * features/i386/32bit-core.c: Re-generated.
6193 * features/i386/32bit-linux.c: Re-generated.
6194 * features/i386/32bit-mpx.c: Re-generated.
6195 * features/i386/32bit-pkeys.c: Re-generated.
6196 * features/i386/32bit-sse.c: Re-generated.
6197
6198 2017-09-05 Yao Qi <yao.qi@linaro.org>
6199
6200 * regformats/regdef.h (struct reg): Override operator == and !=.
6201
6202 2017-09-05 Yao Qi <yao.qi@linaro.org>
6203
6204 * arch/tdesc.h: New file.
6205 * regformats/regdat.sh: Generate code using tdesc_create_reg.
6206 * target-descriptions.c: Update comments.
6207 * target-descriptions.h: Include "arch/tdesc.h". Remove the
6208 declarations.
6209 * features/i386/32bit-avx.c: Re-generated.
6210 * features/i386/32bit-avx512.c: Re-generated.
6211 * features/i386/32bit-core.c: Re-generated.
6212 * features/i386/32bit-linux.c: Re-generated.
6213 * features/i386/32bit-mpx.c: Re-generated.
6214 * features/i386/32bit-pkeys.c: Re-generated.
6215 * features/i386/32bit-sse.c: Re-generated.
6216
6217 2017-09-05 Yao Qi <yao.qi@linaro.org>
6218
6219 * regformats/regdat.sh: Update generated code.
6220
6221 2017-09-05 Yao Qi <yao.qi@linaro.org>
6222
6223 * regformats/regdat.sh: Adjust code order.
6224
6225 2017-09-05 Simon Marchi <simon.marchi@ericsson.com>
6226
6227 * expprint.c (dump_subexp_body_standard): Use constant format
6228 string in fprintf_filtered call.
6229
6230 2017-09-04 John Baldwin <jhb@FreeBSD.org>
6231
6232 * configure.nat: Add "x86-nat.o x86-dregs.o" for NetBSD/amd64 and
6233 NetBSD/i386.
6234 * x86-bsd-nat.c [!DBREG_DRX && __NetBSD__]: Define DBREG_DRX.
6235
6236 2017-09-04 John Baldwin <jhb@FreeBSD.org>
6237
6238 * bsd-kvm.o: Make <sys/user.h> conditional on HAVE_SYS_USER_H.
6239
6240 2017-09-04 John Baldwin <jhb@FreeBSD.org>
6241
6242 * bsd-kvm.o: Define _KMEMUSER.
6243 * configure.ac: Define _KMEMUSER when checking for "struct lwp".
6244 * configure: Regenerate.
6245
6246 2017-09-04 John Baldwin <jhb@FreeBSD.org>
6247
6248 * amd64-fbsd-nat.c: Add include of "x86-xstate.h".
6249 * i386-fbsd-nat.c: Likewise.
6250
6251 2017-09-04 John Baldwin <jhb@FreeBSD.org>
6252
6253 * unittests/array-view-selftests.c: Add include of <array>.
6254
6255 2017-09-04 John Baldwin <jhb@FreeBSD.org>
6256
6257 * spu-tdep.c (flush_ea_cache): Add missing argument to
6258 call_function_by_hand.
6259
6260 2017-09-04 Pedro Alves <palves@redhat.com>
6261
6262 * NEWS (Safer support for debugging with no debug info): New.
6263
6264 2017-09-04 Pedro Alves <palves@redhat.com>
6265
6266 * c-exp.y (function_method, function_method_void): Add current
6267 instance flags to TYPE_INSTANCE.
6268 * dwarf2read.c (check_modifier): New.
6269 (compute_delayed_physnames): Assert that only C++ adds delayed
6270 physnames. Mark fn_fields as const/volatile depending on
6271 physname.
6272 * eval.c (make_params): New type_instance_flags parameter. Use
6273 it as the new type's instance flags.
6274 (evaluate_subexp_standard) <TYPE_INSTANCE>: Extract the instance
6275 flags element and pass it to make_params.
6276 * expprint.c (print_subexp_standard) <TYPE_INSTANCE>: Handle
6277 instance flags element.
6278 (dump_subexp_body_standard) <TYPE_INSTANCE>: Likewise.
6279 * gdbtypes.h: Include "enum-flags.h".
6280 (type_instance_flags): New enum-flags type.
6281 (TYPE_CONST, TYPE_VOLATILE, TYPE_RESTRICT, TYPE_ATOMIC)
6282 (TYPE_CODE_SPACE, TYPE_DATA_SPACE): Return boolean.
6283 * parse.c (operator_length_standard) <TYPE_INSTANCE>: Adjust.
6284 (follow_type_instance_flags): New function.
6285 (operator_check_standard) <TYPE_INSTANCE>: Adjust.
6286 * parser-defs.h (follow_type_instance_flags): Declare.
6287 * valops.c (value_struct_elt_for_reference): const/volatile must
6288 match too.
6289
6290 2017-09-04 Pedro Alves <palves@redhat.com>
6291
6292 * cp-namespace.c (cp_search_static_and_baseclasses): Handle
6293 function/method scopes; lookup the nested name as a function local
6294 static variable.
6295
6296 2017-09-04 Pedro Alves <palves@redhat.com>
6297
6298 (%type <voidval>): Add function_method.
6299 * c-exp.y (exp): New production for calls with no arguments.
6300 (function_method, function_method_void_or_typelist): New
6301 productions.
6302 (exp): New production for "method()::static_var".
6303 * eval.c (evaluate_subexp_standard): Handle OP_FUNC_STATIC_VAR.
6304 * expprint.c (print_subexp_standard, dump_subexp_body_standard):
6305 Handle OP_FUNC_STATIC_VAR.
6306 * parse.c (operator_length_standard):
6307 Handle OP_FUNC_STATIC_VAR.
6308
6309 2017-09-04 Pedro Alves <palves@redhat.com>
6310
6311 * eval.c (evaluate_subexp_standard): Remove UNOP_MEMVAL_TLS
6312 handling.
6313 * expprint.c (print_subexp_standard, dump_subexp_body_standard):
6314 Ditto.
6315 * parse.c (operator_length_standard, operator_check_standard):
6316 Ditto.
6317 * std-operator.def (UNOP_MEMVAL_TLS): Delete.
6318
6319 2017-09-04 Pedro Alves <palves@redhat.com>
6320
6321 * ax-gdb.c: Include "typeprint.h".
6322 (gen_expr_for_cast): New function.
6323 (gen_expr) <OP_CAST, OP_CAST_TYPE>: Use it.
6324 <OP_VAR_VALUE, OP_MSYM_VAR_VALUE>: Error out if the variable's
6325 type is unknown.
6326 * dwarf2read.c (new_symbol_full): Fallback to int instead of
6327 nodebug_data_symbol.
6328 * eval.c: Include "typeprint.h".
6329 (evaluate_subexp_standard) <OP_VAR_VALUE, OP_VAR_MSYM_VALUE>:
6330 Error out if symbol has unknown type.
6331 <UNOP_CAST, UNOP_CAST_TYPE>: Common bits factored out to
6332 evaluate_subexp_for_cast.
6333 (evaluate_subexp_for_address, evaluate_subexp_for_sizeof): Handle
6334 OP_VAR_MSYM_VALUE.
6335 (evaluate_subexp_for_cast): New function.
6336 * gdbtypes.c (init_nodebug_var_type): New function.
6337 (objfile_type): Use it to initialize types of variables with no
6338 debug info.
6339 * typeprint.c (error_unknown_type): New.
6340 * typeprint.h (error_unknown_type): New declaration.
6341 * compile/compile-c-types.c (convert_type_basic): Handle
6342 TYPE_CODE_ERROR; warn and fallback to int for variables with
6343 unknown type.
6344
6345 2017-09-04 Pedro Alves <palves@redhat.com>
6346
6347 * eval.c (evaluate_var_value): New function, factored out from ...
6348 (evaluate_subexp_standard): ... here.
6349
6350 2017-09-04 Pedro Alves <palves@redhat.com>
6351
6352 * eval.c (evaluate_subexp_standard) <UNOP_COMPLEMENT, UNOP_ADDR>:
6353 Remove useless assignments to 'op'.
6354
6355 2017-09-04 Pedro Alves <palves@redhat.com>
6356
6357 * eval.c (eval_skip_value): New function.
6358 (evaluate_subexp_standard): Use it.
6359
6360 2017-09-04 Pedro Alves <palves@redhat.com>
6361
6362 * eval.c (evaluate_subexp_standard): <OP_FUNCALL>: Extract
6363 function name from symbol/minsym and pass it to
6364 error_call_unknown_return_type.
6365
6366 2017-09-04 Pedro Alves <palves@redhat.com>
6367
6368 * ada-lang.c (resolve_subexp): Handle OP_VAR_MSYM_VALUE.
6369 * ax-gdb.c (gen_msym_var_ref): New function.
6370 (gen_expr): Handle OP_VAR_MSYM_VALUE.
6371 * eval.c (evaluate_var_msym_value): New function.
6372 * eval.c (evaluate_subexp_standard): Handle OP_VAR_MSYM_VALUE.
6373 <OP_FUNCALL>: Extract function name from symbol/minsym and pass it
6374 to call_function_by_hand.
6375 * expprint.c (print_subexp_standard, dump_subexp_body_standard):
6376 Handle OP_VAR_MSYM_VALUE.
6377 (union exp_element) <msymbol>: New field.
6378 * minsyms.h (struct type): Forward declare.
6379 (find_minsym_type_and_address): Declare.
6380 * parse.c (write_exp_elt_msym): New function.
6381 (write_exp_msymbol): Delete, refactored as ...
6382 (find_minsym_type_and_address): ... this new function.
6383 (write_exp_msymbol): Reimplement using OP_VAR_MSYM_VALUE.
6384 (operator_length_standard, operator_check_standard): Handle
6385 OP_VAR_MSYM_VALUE.
6386 * std-operator.def (OP_VAR_MSYM_VALUE): New.
6387
6388 2017-09-04 Pedro Alves <palves@redhat.com>
6389
6390 * ada-lang.c (ada_evaluate_subexp) <TYPE_CODE_FUNC>: Don't handle
6391 TYPE_GNU_IFUNC specially here. Throw error if return type is
6392 unknown.
6393 * ada-typeprint.c (print_func_type): Handle functions with unknown
6394 return type.
6395 * c-typeprint.c (c_type_print_base): Handle functions and methods
6396 with unknown return type.
6397 * compile/compile-c-symbols.c (convert_symbol_bmsym)
6398 <mst_text_gnu_ifunc>: Use nodebug_text_gnu_ifunc_symbol.
6399 * compile/compile-c-types.c: Include "objfiles.h".
6400 (convert_func): For functions with unknown return type, warn and
6401 default to int.
6402 * compile/compile-object-run.c (compile_object_run): Adjust call
6403 to call_function_by_hand_dummy.
6404 * elfread.c (elf_gnu_ifunc_resolve_addr): Adjust call to
6405 call_function_by_hand.
6406 * eval.c (evaluate_subexp_standard): Adjust calls to
6407 call_function_by_hand. Handle functions and methods with unknown
6408 return type. Pass expect_type to call_function_by_hand.
6409 * f-typeprint.c (f_type_print_base): Handle functions with unknown
6410 return type.
6411 * gcore.c (call_target_sbrk): Adjust call to
6412 call_function_by_hand.
6413 * gdbtypes.c (objfile_type): Leave nodebug text symbol with NULL
6414 return type instead of int. Make nodebug_text_gnu_ifunc_symbol be
6415 an integer address type instead of nodebug.
6416 * guile/scm-value.c (gdbscm_value_call): Adjust call to
6417 call_function_by_hand.
6418 * infcall.c (error_call_unknown_return_type): New function.
6419 (call_function_by_hand): New "default_return_type" parameter.
6420 Pass it down.
6421 (call_function_by_hand_dummy): New "default_return_type"
6422 parameter. Use it instead of defaulting to int. If there's no
6423 default and the return type is unknown, throw an error. If
6424 there's a default return type, and the called function has no
6425 debug info, then assume the function is prototyped.
6426 * infcall.h (call_function_by_hand, call_function_by_hand_dummy):
6427 New "default_return_type" parameter.
6428 (error_call_unknown_return_type): New declaration.
6429 * linux-fork.c (call_lseek): Cast return type of lseek.
6430 (inferior_call_waitpid, checkpoint_command): Adjust calls to
6431 call_function_by_hand.
6432 * linux-tdep.c (linux_infcall_mmap, linux_infcall_munmap): Adjust
6433 calls to call_function_by_hand.
6434 * m2-typeprint.c (m2_procedure): Handle functions with unknown
6435 return type.
6436 * objc-lang.c (lookup_objc_class, lookup_child_selector)
6437 (value_nsstring, print_object_command): Adjust calls to
6438 call_function_by_hand.
6439 * p-typeprint.c (pascal_type_print_varspec_prefix): Handle
6440 functions with unknown return type.
6441 (pascal_type_print_func_varspec_suffix): New function.
6442 (pascal_type_print_varspec_suffix) <TYPE_CODE_FUNC,
6443 TYPE_CODE_METHOD>: Use it.
6444 * python/py-value.c (valpy_call): Adjust call to
6445 call_function_by_hand.
6446 * rust-lang.c (rust_evaluate_funcall): Adjust call to
6447 call_function_by_hand.
6448 * valarith.c (value_x_binop, value_x_unop): Adjust calls to
6449 call_function_by_hand.
6450 * valops.c (value_allocate_space_in_inferior): Adjust call to
6451 call_function_by_hand.
6452 * typeprint.c (type_print_unknown_return_type): New function.
6453 * typeprint.h (type_print_unknown_return_type): New declaration.
6454
6455 2017-09-04 Pedro Alves <palves@redhat.com>
6456
6457 * gdbtypes.c (lookup_function_type_with_arguments): Mark function
6458 types with more than one parameter as prototyped.
6459
6460 2017-09-04 Pedro Alves <palves@redhat.com>
6461
6462 * cli/cli-cmds.c (print_disassembly, disassemble_current_function)
6463 (disassemble_command): Use gdb_disassembly_flags instead of bare
6464 int.
6465 * disasm.c (gdb_pretty_print_disassembler::pretty_print_insn)
6466 (dump_insns, do_mixed_source_and_assembly_deprecated)
6467 (do_mixed_source_and_assembly, do_assembly_only, gdb_disassembly):
6468 Use gdb_disassembly_flags instead of bare int.
6469 * disasm.h (DISASSEMBLY_SOURCE_DEPRECATED, DISASSEMBLY_RAW_INSN)
6470 (DISASSEMBLY_OMIT_FNAME, DISASSEMBLY_FILENAME)
6471 (DISASSEMBLY_OMIT_PC, DISASSEMBLY_SOURCE)
6472 (DISASSEMBLY_SPECULATIVE): No longer macros. Instead they're...
6473 (enum gdb_disassembly_flag): ... values of this new enumeration.
6474 (gdb_disassembly_flags): Define.
6475 (gdb_disassembly)
6476 (gdb_pretty_print_disassembler::pretty_print_insn): Use it.
6477 * mi/mi-cmd-disas.c (mi_cmd_disassemble): Use
6478 gdb_disassembly_flags instead of bare int.
6479 * record-btrace.c (btrace_insn_history)
6480 (record_btrace_insn_history, record_btrace_insn_history_range)
6481 (record_btrace_insn_history_from): Use gdb_disassembly_flags
6482 instead of bare int.
6483 * record.c (get_insn_history_modifiers, cmd_record_insn_history):
6484 Use gdb_disassembly_flags instead of bare int.
6485 * target-debug.h (target_debug_print_gdb_disassembly_flags):
6486 Define.
6487 * target-delegates.c: Regenerate.
6488 * target.c (target_insn_history, target_insn_history_from)
6489 (target_insn_history_range): Use gdb_disassembly_flags instead of
6490 bare int.
6491 * target.h: Include "disasm.h".
6492 (struct target_ops) <to_insn_history, to_insn_history_from,
6493 to_insn_history_range>: Use gdb_disassembly_flags instead of bare
6494 int.
6495 (target_insn_history, target_insn_history_from)
6496 (target_insn_history_range): Use gdb_disassembly_flags instead of
6497 bare int.
6498
6499 2017-09-04 Simon Marchi <simon.marchi@ericsson.com>
6500
6501 * cli/cli-script.c (build_command_line): For if/while commands,
6502 check whether args is empty.
6503
6504 2017-09-04 Simon Marchi <simon.marchi@ericsson.com>
6505
6506 * cli/cli-script.h (enum misc_command_type): Move from defs.h.
6507 (enum command_control_type): Likewise.
6508 (struct command_line): Likewise.
6509 (free_command_lines): Likewise.
6510 (struct command_lines_deleter): Likewise.
6511 (command_line_up): Likewise.
6512 (read_command_lines): Likewise.
6513 (read_command_lines_1): Likewise.
6514 * defs.h (enum misc_command_type): Move to cli/cli-script.h.
6515 (enum command_control_type): Likewise.
6516 (struct command_line): Likewise.
6517 (free_command_lines): Likewise.
6518 (struct command_lines_deleter): Likewise.
6519 (command_line_up): Likewise.
6520 (read_command_lines): Likewise.
6521 (read_command_lines_1): Likewise.
6522 * breakpoint.h: Include cli/cli-script.h.
6523 * extension-priv.h: Likewise.
6524 * gdbcmd.h: Likewise.
6525
6526 2017-09-04 Pedro Alves <palves@redhat.com>
6527
6528 * ada-lang.c (is_known_support_routine): Move sal declaration to
6529 where it is initialized.
6530 * breakpoint.c (create_internal_breakpoint, init_catchpoint)
6531 (parse_breakpoint_sals, decode_static_tracepoint_spec)
6532 (clear_command, update_static_tracepoint): Remove init_sal
6533 references. Move declarations closer to initializations.
6534 * cli/cli-cmds.c (list_command): Move sal declarations closer to
6535 initializations.
6536 * elfread.c (elf_gnu_ifunc_resolver_stop): Remove init_sal
6537 references. Move sal declarations closer to initializations.
6538 * frame.c (find_frame_sal): Return a symtab_and_line via function
6539 return instead of output parameter. Remove init_sal references.
6540 * frame.h (find_frame_sal): Return a symtab_and_line via function
6541 return instead of output parameter.
6542 * guile/scm-frame.c (gdbscm_frame_sal): Adjust.
6543 * guile/scm-symtab.c (stscm_make_sal_smob): Use in-place new
6544 instead of memset.
6545 (gdbscm_find_pc_line): Remove init_sal reference.
6546 * infcall.c (call_function_by_hand_dummy): Remove init_sal
6547 references. Move declarations closer to initializations.
6548 * infcmd.c (set_step_frame): Update. Move declarations closer to
6549 initializations.
6550 (finish_backward): Remove init_sal references. Move declarations
6551 closer to initializations.
6552 * infrun.c (process_event_stop_test, handle_step_into_function)
6553 (insert_hp_step_resume_breakpoint_at_frame)
6554 (insert_step_resume_breakpoint_at_caller): Likewise.
6555 * linespec.c (create_sals_line_offset, decode_digits_ordinary)
6556 (symbol_to_sal): Likewise.
6557 * probe.c (parse_probes_in_pspace): Remove init_sal reference.
6558 * python/py-frame.c (frapy_find_sal): Move sal declaration closer
6559 to its initialization.
6560 * reverse.c (save_bookmark_command): Use new/delete. Remove
6561 init_sal references. Move declarations closer to initializations.
6562 * source.c (get_current_source_symtab_and_line): Remove brace
6563 initialization.
6564 (set_current_source_symtab_and_line): Now takes the sal by const
6565 reference. Remove brace initialization.
6566 (line_info): Remove init_sal reference.
6567 * source.h (set_current_source_symtab_and_line): Now takes a
6568 symtab_and_line via const reference.
6569 * stack.c (set_current_sal_from_frame): Adjust.
6570 (print_frame_info): Adjust.
6571 (get_last_displayed_sal): Return the sal via function return
6572 instead of via output parameter. Simplify.
6573 (frame_info): Adjust.
6574 * stack.h (get_last_displayed_sal): Return the sal via function
6575 return instead of via output parameter.
6576 * symtab.c (init_sal): Delete.
6577 (find_pc_sect_line): Remove init_sal references. Move
6578 declarations closer to initializations.
6579 (find_function_start_sal): Remove init_sal references. Move
6580 declarations closer to initializations.
6581 * symtab.h (struct symtab_and_line): In-class initialize all
6582 fields.
6583 * tracepoint.c (set_traceframe_context)
6584 (print_one_static_tracepoint_marker): Remove init_sal references.
6585 Move declarations closer to initializations.
6586 * tui/tui-disasm.c (tui_show_disassem_and_update_source): Adjust.
6587 * tui/tui-stack.c (tui_show_frame_info): Adjust. Move
6588 declarations closer to initializations.
6589 * tui/tui-winsource.c (tui_update_source_window_as_is): Remove
6590 init_sal references. Adjust.
6591
6592 2017-09-04 Pedro Alves <palves@redhat.com>
6593
6594 * ax-gdb.c (agent_command_1): Use range-for.
6595 * break-catch-throw.c (re_set_exception_catchpoint): Update.
6596 * breakpoint.c: Include "common/array-view.h".
6597 (init_breakpoint_sal, create_breakpoint_sal): Change sals
6598 parameter from struct symtabs_and_lines to
6599 array_view<symtab_and_line>. Adjust. Use range-for. Update.
6600 (breakpoint_sals_to_pc): Change sals parameter from struct
6601 symtabs_and_lines to std::vector reference.
6602 (check_fast_tracepoint_sals): Change sals parameter from struct
6603 symtabs_and_lines to std::array_view. Use range-for.
6604 (decode_static_tracepoint_spec): Return a std::vector instead of
6605 symtabs_and_lines. Update.
6606 (create_breakpoint): Update.
6607 (break_range_command, until_break_command, clear_command): Update.
6608 (base_breakpoint_decode_location, bkpt_decode_location)
6609 (bkpt_probe_create_sals_from_location)
6610 (bkpt_probe_decode_location, tracepoint_decode_location)
6611 (tracepoint_probe_decode_location)
6612 (strace_marker_create_sals_from_location): Return a std::vector
6613 instead of symtabs_and_lines.
6614 (strace_marker_create_breakpoints_sal): Update.
6615 (strace_marker_decode_location): Return a std::vector instead of
6616 symtabs_and_lines. Update.
6617 (update_breakpoint_locations): Change struct symtabs_and_lines
6618 parameters to gdb::array_view. Adjust.
6619 (location_to_sals): Return a std::vector instead of
6620 symtabs_and_lines. Update.
6621 (breakpoint_re_set_default): Use std::vector instead of struct
6622 symtabs_and_lines.
6623 (decode_location_default): Return a std::vector instead of
6624 symtabs_and_lines. Update.
6625 * breakpoint.h: Include "common/array-view.h".
6626 (struct breakpoint_ops) <decode_location>: Now returns a
6627 std::vector instead of returning a symtabs_and_lines via output
6628 parameter.
6629 (update_breakpoint_locations): Change sals parameters to use
6630 gdb::array_view.
6631 * cli/cli-cmds.c (edit_command, list_command): Update to use
6632 std::vector and gdb::array_view.
6633 (ambiguous_line_spec): Adjust to use gdb::array_view and
6634 range-for.
6635 (compare_symtabs): Rename to ...
6636 (cmp_symtabs): ... this. Change parameters to symtab_and_line
6637 const reference and adjust.
6638 (filter_sals): Rewrite using std::vector and standard algorithms.
6639 * elfread.c (elf_gnu_ifunc_resolver_return_stop): Simplify.
6640 (jump_command): Update to use std::vector.
6641 * linespec.c (struct linespec_state) <canonical_names>: Update
6642 comment.
6643 (add_sal_to_sals_basic): Delete.
6644 (add_sal_to_sals, filter_results, convert_results_to_lsals)
6645 (decode_line_2, create_sals_line_offset)
6646 (convert_address_location_to_sals, convert_linespec_to_sals)
6647 (convert_explicit_location_to_sals, parse_linespec)
6648 (event_location_to_sals, decode_line_full, decode_line_1)
6649 (decode_line_with_current_source)
6650 (decode_line_with_last_displayed, decode_objc)
6651 (decode_digits_list_mode, decode_digits_ordinary, minsym_found)
6652 (linespec_result::~linespec_result): Adjust to use std::vector
6653 instead of symtabs_and_lines.
6654 * linespec.h (linespec_sals::sals): Now a std::vector.
6655 (struct linespec_result): Use std::vector, bool, and in-class
6656 initialization.
6657 (decode_line_1, decode_line_with_current_source)
6658 (decode_line_with_last_displayed): Return std::vector.
6659 * macrocmd.c (info_macros_command): Use std::vector.
6660 * mi/mi-main.c (mi_cmd_trace_find): Use std::vector.
6661 * probe.c (parse_probes_in_pspace, parse_probes): Adjust to use
6662 std::vector.
6663 * probe.h (parse_probes): Return a std::vector.
6664 * python/python.c (gdbpy_decode_line): Use std::vector and
6665 gdb::array_view.
6666 * source.c (select_source_symtab, line_info): Use std::vector.
6667 * stack.c (func_command): Use std::vector.
6668 * symtab.h (struct symtabs_and_lines): Delete.
6669 * tracepoint.c (tfind_line_command, scope_info): Use std::vector.
6670
6671 2017-09-04 Pedro Alves <palves@redhat.com>
6672
6673 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
6674 unittests/array-view-selftests.c.
6675 (SUBDIR_UNITTESTS_OBS): Add array-view-selftests.o.
6676 * common/array-view.h: New file.
6677 * unittests/array-view-selftests.c: New file.
6678
6679 2017-09-04 Pedro Alves <palves@redhat.com>
6680
6681 * cli/cli-cmds.c (edit_command): Pass message to
6682 ambiguous_line_spec.
6683 (list_command): Pass message to ambiguous_line_spec. Say
6684 "first"/"last" instead of "start" and "end" to be consistent with
6685 the manual.
6686 (ambiguous_line_spec): Add 'format' and vararg parameters. Use
6687 them to print formatted message.
6688
6689 2017-09-04 Pedro Alves <palves@redhat.com>
6690
6691 * btrace.c (ftrace_add_pt): Pass btrace_insn to
6692 ftrace_update_insns by reference instead of pointer.
6693
6694 2017-09-04 Yao Qi <yao.qi@linaro.org>
6695
6696 * i386-go32-tdep.c: Include x86-xstate.h.
6697 (i386_go32_init_abi): Call i386_target_description.
6698 * i386-tdep.c (i386_target_description): Return tdesc_i386_mmx
6699 if xcr0 is X86_XSTATE_X87_MASK.
6700 * i386-tdep.h (tdesc_i386): Remove the declaration.
6701 (tdesc_i386_mmx): Likewise.
6702
6703 2017-09-04 Yao Qi <yao.qi@linaro.org>
6704
6705 * i386-fbsd-tdep.c (i386fbsd_core_read_xcr0): Return
6706 X86_XSTATE_SSE_MASK instead of 0.
6707
6708 2017-09-04 Yao Qi <yao.qi@linaro.org>
6709
6710 * amd64-fbsd-nat.c (amd64fbsd_read_description): Call
6711 i386_target_description.
6712 * i386-fbsd-nat.c (i386fbsd_read_description): Call
6713 i386_target_description.
6714 * i386-tdep.c (i386_gdbarch_init): Likewise.
6715
6716 2017-09-04 Yao Qi <yao.qi@linaro.org>
6717
6718 * amd64-darwin-tdep.c: Include "x86-xstate.h".
6719 (x86_darwin_init_abi_64): Call amd64_target_description.
6720 * amd64-dicos-tdep.c: Likewise.
6721 * amd64-fbsd-nat.c: Likewise.
6722 * amd64-fbsd-tdep.c: Likewise.
6723 * amd64-nbsd-tdep.c: Likewise.
6724 * amd64-obsd-tdep.c: Likewise.
6725 * amd64-sol2-tdep.c: Likewise.
6726 * amd64-windows-tdep.c: Likewise.
6727 * amd64-tdep.h (tdesc_amd64): Remove the declaration.
6728
6729 2017-09-04 Simon Marchi <simon.marchi@ericsson.com>
6730
6731 * btrace.h (btrace_insn_s, DEF_VEC_O (btrace_insn_s)): Remove.
6732 (btrace_function) <insn>: Change type to use std::vector.
6733 * btrace.c (ftrace_debug, ftrace_call_num_insn,
6734 ftrace_find_call, ftrace_new_gap, ftrace_update_function,
6735 ftrace_update_insns, ftrace_compute_global_level_offset,
6736 btrace_stitch_bts, btrace_clear, btrace_insn_get,
6737 btrace_insn_end, btrace_insn_next, btrace_insn_prev): Adjust to
6738 change to std::vector.
6739 (ftrace_update_insns): Adjust to change to std::vector, change
6740 type of INSN parameter.
6741 (btrace_compute_ftrace_bts): Adjust call to ftrace_update_insns.
6742 * record-btrace.c (btrace_call_history_insn_range,
6743 btrace_compute_src_line_range,
6744 record_btrace_frame_prev_register): Adjust to change to
6745 std::vector.
6746 * python/py-record-btrace.c (recpy_bt_func_instructions): Adjust
6747 to change to std::vector.
6748
6749 2017-09-03 Tom Tromey <tom@tromey.com>
6750
6751 * corefile.c (reopen_exec_file): Use std::string.
6752
6753 2017-09-03 Tom Tromey <tom@tromey.com>
6754
6755 * compile/compile.c (compile_register_name_mangled): Return
6756 std::string.
6757 * compile/compile-loc2c.c (pushf_register_address): Update.
6758 (pushf_register): Update.
6759 * compile/compile-c-types.c (convert_array): Update.
6760 * compile/compile-c-symbols.c (generate_vla_size): Update.
6761 (error_symbol_once): Use a gdb::unique_xmalloc_ptr.
6762 (symbol_substitution_name): Return a gdb::unique_xmalloc_ptr.
6763 (convert_one_symbol): Update.
6764 (generate_c_for_for_one_variable): Update.
6765 * compile/compile-c-support.c (c_get_range_decl_name): Return a
6766 std::string.
6767 (generate_register_struct): Update.
6768 * compile/compile-internal.h (c_get_range_decl_name): Return a
6769 std::string.
6770 (compile_register_name_mangled): Return std::string.
6771
6772 2017-09-03 Tom Tromey <tom@tromey.com>
6773
6774 * utils.c (perror_string): Return a std::string.
6775 (throw_perror_with_name, perror_warning_with_name): Update.
6776
6777 2017-09-03 Tom Tromey <tom@tromey.com>
6778
6779 * demangle.c (demangle_command): Use std::string,
6780 unique_xmalloc_ptr.
6781
6782 2017-09-03 Tom Tromey <tom@tromey.com>
6783
6784 * cli/cli-setshow.c (do_set_command): Use std::string.
6785
6786 2017-09-03 Tom Tromey <tom@tromey.com>
6787
6788 * cli/cli-cmds.c (cd_command): Use gdb::unique_xmalloc_ptr.
6789
6790 2017-09-03 Tom Tromey <tom@tromey.com>
6791
6792 * mi/mi-interp.c (mi_cmd_interpreter_exec): Use std::string.
6793
6794 2017-09-03 Tom Tromey <tom@tromey.com>
6795
6796 * mi/mi-cmd-env.c (env_execute_cli_command): Use
6797 gdb::unique_xmalloc_ptr.
6798
6799 2017-09-03 Tom Tromey <tom@tromey.com>
6800
6801 * thread.c (print_thread_info_1): Use string_printf.
6802 (thread_apply_command, thread_apply_all_command): Use
6803 std::string.
6804
6805 2017-09-03 Tom Tromey <tom@tromey.com>
6806
6807 * valprint.c (val_print_string): Update.
6808 * gdbcore.h (memory_error_message): Return std::string.
6809 * corefile.c (memory_error_message): Return std::string.
6810 (memory_error): Update.
6811 * breakpoint.c (insert_bp_location): Update.
6812
6813 2017-09-03 Simon Marchi <simon.marchi@ericsson.com>
6814
6815 * target/waitstatus.h (target_waitstatus_to_string): Change
6816 return type to std::string.
6817 * target/waitstatus.c (target_waitstatus_to_string): Return
6818 std::string.
6819 * target.h (target_waitstatus_to_string): Remove declaration.
6820 * infrun.c (resume, clear_proceed_status_thread,
6821 print_target_wait_results, do_target_wait, save_waitstatus,
6822 stop_all_threads): Adjust.
6823 * record-btrace.c (record_btrace_wait): Adjust.
6824 * target-debug.h
6825 (target_debug_print_struct_target_waitstatus_p): Adjust.
6826
6827 2017-09-01 Jan Kratochvil <jan.kratochvil@redhat.com>
6828
6829 PR gdb/22046
6830 * nat/linux-procfs.c (parse_proc_status_state): Fix PROC_STATE_STOPPED
6831 detection.
6832
6833 2017-08-31 Sergio Durigan Junior <sergiodj@redhat.com>
6834
6835 * NEWS (Changes since GDB 8.0): Add entry mentioning new support
6836 for setting/unsetting environment variables on the remote target.
6837 (New remote packets): Add entries for QEnvironmentHexEncoded,
6838 QEnvironmentUnset and QEnvironmentReset.
6839 * common/environ.c (gdb_environ::operator=): Extend method to
6840 handle m_user_set_env_list and m_user_unset_env_list.
6841 (gdb_environ::clear): Likewise.
6842 (match_var_in_string): Change type of first parameter from 'char
6843 *' to 'const char *'.
6844 (gdb_environ::set): Extend method to handle
6845 m_user_set_env_list and m_user_unset_env_list.
6846 (gdb_environ::unset): Likewise.
6847 (gdb_environ::clear_user_set_env): New method.
6848 (gdb_environ::user_set_envp): Likewise.
6849 (gdb_environ::user_unset_envp): Likewise.
6850 * common/environ.h (gdb_environ): Handle m_user_set_env_list and
6851 m_user_unset_env_list on move constructor/assignment.
6852 (unset): Add new default parameter 'update_unset_list = true'.
6853 (clear_user_set_env): New method.
6854 (user_set_envp): Likewise.
6855 (user_unset_envp): Likewise.
6856 (m_user_set_env_list): New std::set.
6857 (m_user_unset_env_list): Likewise.
6858 * common/rsp-low.c (hex2str): New function.
6859 (bin2hex): New overload for bin2hex function.
6860 * common/rsp-low.c (hex2str): New prototype.
6861 (str2hex): New overload prototype.
6862 * remote.c: Include "environ.h". Add QEnvironmentHexEncoded,
6863 QEnvironmentUnset and QEnvironmentReset.
6864 (remote_protocol_features): Add QEnvironmentHexEncoded,
6865 QEnvironmentUnset and QEnvironmentReset packets.
6866 (send_environment_packet): New function.
6867 (extended_remote_environment_support): Likewise.
6868 (extended_remote_create_inferior): Call
6869 extended_remote_environment_support.
6870 (_initialize_remote): Add QEnvironmentHexEncoded,
6871 QEnvironmentUnset and QEnvironmentReset packet configs.
6872 * unittests/environ-selftests.c (gdb_selftest_env_var):
6873 New variable.
6874 (test_vector_initialization): New function.
6875 (test_init_from_host_environ): Likewise.
6876 (test_reinit_from_host_environ): Likewise.
6877 (test_set_A_unset_B_unset_A_cannot_find_A_can_find_B):
6878 Likewise.
6879 (test_unset_set_empty_vector): Likewise.
6880 (test_vector_clear): Likewise.
6881 (test_std_move): Likewise.
6882 (test_move_constructor):
6883 (test_self_move): Likewise.
6884 (test_set_unset_reset): Likewise.
6885 (run_tests): Rewrite in terms of the functions above.
6886
6887 2017-08-31 Weimin Pan <weimin.pan@oracle.com>
6888
6889 * sparc64-tdep.c (adi_stat_t): Fix comment formatting.
6890 (adi_available): Use a temp variable of type CORE_ADDR as argument
6891 3 when calling target_auxv_search.
6892 (adi_normalize_address): Use masks and xor operators to calculate
6893 normalized address.
6894 (adi_read_versions, adi_write_versions, adi_print_versions)
6895 (do_examine, do_assign): Use paddress.
6896
6897 2017-08-29 John Baldwin <jhb@FreeBSD.org>
6898
6899 * mips-fbsd-nat.c (getfpregs_supplies): Return true for FIR.
6900 * mips-fbsd-tdep.c (mips_fbsd_supply_fpregs): Split supply of FSR
6901 out of loop and add supply of FIR.
6902 (mips_fbsd_collect_fpregs): Split collect of FSR out of loop and
6903 add collect of FIR.
6904
6905 2017-08-28 Simon Marchi <simon.marchi@ericsson.com>
6906
6907 PR gdb/21827
6908 * cli/cli-script.c (define_command): Don't convert command name
6909 to lower case.
6910
6911 2017-08-25 Joel Brobecker <brobecker@adacore.com>
6912
6913 * ada-lang.c (ada_lookup_struct_elt_type): Remove parameter "dispp".
6914 Update all callers accordingly. Remove all code blocks handling
6915 the case where DISPP is not NULL.
6916
6917 2017-08-24 Jan Kratochvil <jan.kratochvil@redhat.com>
6918
6919 PR symtab/22003
6920 * dwarf2read.c (dwarf2_const_value_attr, dump_die_shallow)
6921 (dwarf2_get_attr_constant_value, dwarf2_fetch_constant_bytes)
6922 (skip_form_bytes, attr_form_is_constant): Handle DW_FORM_implicit_const.
6923
6924 2017-08-24 Jan Kratochvil <jan.kratochvil@redhat.com>
6925
6926 * dwarf2read.c (build_type_psymtabs_reader): New prototype.
6927 (process_psymtab_comp_unit): Accept IS_DEBUG_TYPES.
6928 (read_comp_units_from_section): New parameter abbrev_section, use
6929 read_and_check_comp_unit_head, allocate signatured_type if needed.
6930 (create_all_comp_units): Update read_comp_units_from_section caller.
6931
6932 2017-08-23 Pedro Alves <palves@redhat.com>
6933
6934 PR remote/21852
6935 * remote.c (add_current_inferior_and_thread): Set inferior_ptid
6936 to null_ptid and switch to thread without reading the registers
6937 after adding the inferior.
6938
6939 2017-08-23 Jan Kratochvil <jan.kratochvil@redhat.com>
6940
6941 * NEWS (Changes since GDB 8.0): Add set compile-gcc and show
6942 compile-gcc.
6943 * compile/compile.c (compile_gcc, show_compile_gcc): New.
6944 (compile_to_object): Implement compile_gcc.
6945 (_initialize_compile): Install "set compile-gcc". Initialize
6946 compile_gcc.
6947
6948 2017-08-23 Jan Kratochvil <jan.kratochvil@redhat.com>
6949
6950 * compile/compile.c (compile_to_object): Conditionally call
6951 set_verbose. Conditionally call compile or compile_v0.
6952
6953 2017-08-07 Weimin Pan <weimin.pan@oracle.com>
6954
6955 * sparc64-tdep.h: (adi_normalize_address): New export.
6956 * sparc-nat.h: (open_adi_tag_fd): New export.
6957 * sparc64-linux-nat.c: (open_adi_tag_fd): New function.
6958 * sparc64-linux-tdep.c:
6959 (SEGV_ACCADI, SEGV_ADIDERR, SEGV_ADIPERR) New defines.
6960 (sparc64_linux_handle_segmentation_fault): New function.
6961 (sparc64_linux_init_abi): Register
6962 sparc64_linux_handle_segmentation_fault
6963 * sparc64-tdep.c: Include cli-utils.h,gdbcmd.h,auxv.h.
6964 (sparc64_addr_bits_remove): New function.
6965 (sparc64_init_abi): Register sparc64_addr_bits_remove.
6966 (MAX_PROC_NAME_SIZE): New macro.
6967 (AT_ADI_BLKSZ, AT_ADI_NBITS, AT_ADI_UEONADI) New defines.
6968 (sparc64adilist): New variable.
6969 (adi_proc_list): New variable.
6970 (find_adi_info): New function.
6971 (add_adi_info): New function.
6972 (get_adi_info_proc): New function.
6973 (get_adi_info): New function.
6974 (info_adi_command): New function.
6975 (read_maps_entry): New function.
6976 (adi_available): New function.
6977 (adi_normalize_address): New function.
6978 (adi_align_address): New function.
6979 (adi_convert_byte_count): New function.
6980 (adi_tag_fd): New function.
6981 (adi_is_addr_mapped): New function.
6982 (adi_read_versions): New function.
6983 (adi_write_versions): New function.
6984 (adi_print_versions): New function.
6985 (do_examine): New function.
6986 (do_assign): New function.
6987 (adi_examine_command): New function.
6988 (adi_assign_command): New function.
6989 (_initialize_sparc64_adi_tdep): New function.
6990
6991 2017-08-22 Simon Marchi <simon.marchi@ericsson.com>
6992
6993 * breakpoint.c (breakpoints_info): Rename to ...
6994 (info_breakpoints_command): ... this.
6995 (watchpoints_info): Rename to ...
6996 (info_watchpoints_command): ... this.
6997 (tracepoints_info): Rename to ...
6998 (info_tracepoints_command): ... this.
6999 (_initialize_breakpoint): Adjust.
7000 * dcache.c (dcache_info): Rename to ...
7001 (info_display_command): ... this.
7002 (_initialize_dcache): Adjust.
7003 * frame.h (args_info): Rename to ...
7004 (info_args_command): ... this.
7005 (locals_info): Rename to ...
7006 (info_locals_command): ... this.
7007 * infcmd.c (nofp_registers_info): Rename to ...
7008 (info_registers_command): ... this.
7009 (float_info): Rename to ...
7010 (info_float_command): ... this.
7011 (program_info): Rename to ...
7012 (info_program_command): ... this.
7013 (all_registers_info): Rename to ...
7014 (info_all_registers_command): ... this.
7015 (vector_info): Rename to ...
7016 (info_vector_command): ... this.
7017 (float_info): Rename to ...
7018 (info_float_command): ... this.
7019 (_initialize_infcmd): Adjust.
7020 * inferior.h (term_info): Rename to ...
7021 (info_terminal_command): ... this.
7022 * inflow.c (term_info): Rename to ...
7023 (info_terminal_command): ... this.
7024 (_initialize_inflow): Adjust.
7025 * infrun.c (signals_info): Rename to ...
7026 (info_signals_command): ... this.
7027 (_initialize_infrun): Adjust.
7028 * objc-lang.c (classes_info): Rename to ...
7029 (info_classes_command): ... this.
7030 (selectors_info): Rename to ...
7031 (info_selectors_command): ... this.
7032 (_initialize_objc_language): Adjust.
7033 * printcmd.c (sym_info): Rename to ...
7034 (info_symbol_command): ... this.
7035 (address_info): Rename to ...
7036 (info_address_command): ... this.
7037 (display_info): Rename to ...
7038 (info_display_command): ... this.
7039 (_initialize_printcmd): Adjust.
7040 * reverse.c (bookmarks_info): Rename to ...
7041 (info_breakpoints_command): ... this.
7042 (_initialize_reverse): Adjust.
7043 * ser-go32.c (dos_info): Rename to ...
7044 (info_serial_command): ... this.
7045 (_initialize_ser_dos): Adjust.
7046 * skip.c (skip_info): Rename to ...
7047 (info_skip_command): ... this.
7048 (_initialize_step_skip): Adjust.
7049 * source.c (line_info): Rename to ...
7050 (info_line_command): ... this.
7051 (source_info): Rename to ...
7052 (info_source_command)
7053 * stack.c (frame_info): Rename to ...
7054 (info_frame_command): ... this.
7055 (locals_info): Rename to ...
7056 (info_locals_command): ... this.
7057 (args_info): Rename to ...
7058 (info_args_command): ... this.
7059 (_initialize_stack): Adjust.
7060 * symtab.c (sources_info): Rename to ...
7061 (info_sources_command): ... this.
7062 (variables_info): Rename to ...
7063 (info_variables_command): ... this.
7064 (functions_info): Rename to ...
7065 (info_functions_command): ... this.
7066 (types_info): Rename to ...
7067 (info_types_command): ... this.
7068 (_initialize_symtab): Adjust.
7069 * target.c (target_info): Rename to ...
7070 (info_target_command): ... this.
7071 (initialize_targets): Adjust.
7072 * tracepoint.c (tvariables_info): Rename to ...
7073 (info_tvariables_command): ... this.
7074 (scope_info): Rename to ...
7075 (info_scope_command): ... this.
7076 (trace_dump_actions): Adjust.
7077 (_initialize_tracepoint): Adjust.
7078
7079 2017-08-22 Tom Tromey <tom@tromey.com>
7080
7081 * breakpoint.h (install_breakpoint): Update.
7082 * breakpoint.c (add_solib_catchpoint): Update.
7083 (install_breakpoint): Change argument to a std::unique_ptr.
7084 (create_fork_vfork_event_catchpoint): Use std::unique_ptr.
7085 (create_breakpoint_sal, create_breakpoint): Update.
7086 (watch_command_1, catch_exec_command_1)
7087 (strace_marker_create_breakpoints_sal): Use std::unique_ptr.
7088 (add_to_breakpoint_chain): Change argument to a std::unique_ptr.
7089 Return the breakpoint.
7090 (set_raw_breakpoint_without_location, set_raw_breakpoint)
7091 (new_single_step_breakpoint): Update.
7092 * break-catch-throw.c (handle_gnu_v3_exceptions): Use
7093 std::unique_ptr.
7094 * break-catch-syscall.c (create_syscall_event_catchpoint): Use
7095 std::unique_ptr.
7096 * break-catch-sig.c (create_signal_catchpoint): Use
7097 std::unique_ptr.
7098 * ada-lang.c (create_ada_exception_catchpoint): Use
7099 std::unique_ptr.
7100
7101 2017-08-22 Tom Tromey <tom@tromey.com>
7102
7103 * breakpoint.c (add_solib_catchpoint): Use std::unique_ptr.
7104
7105 2017-08-22 Tom Tromey <tom@tromey.com>
7106
7107 * psymtab.c (psymtab_search_name): Return a unique_xmalloc_ptr.
7108 (lookup_partial_symbol): Update.
7109
7110 2017-08-22 Tom Tromey <tom@tromey.com>
7111
7112 * source.h (rewrite_source_path): Return a unique_xmalloc_ptr.
7113 * source.c (rewrite_source_path): Return a unique_xmalloc_ptr.
7114 (find_and_open_source, symtab_to_fullname): Update.
7115 * psymtab.c (psymtab_to_fullname): Update.
7116
7117 2017-08-22 Tom Tromey <tom@tromey.com>
7118
7119 * exec.c (exec_file_attach): Update.
7120 * linux-thread-db.c (try_thread_db_load): Update.
7121 * guile/scm-safe-call.c (gdbscm_safe_source_script): Update.
7122 * utils.c (gdb_realpath): Change return type.
7123 (gdb_realpath_keepfile): Update.
7124 (gdb_realpath_check_trailer, gdb_realpath_tests): New functions.
7125 (_initialize_utils): Register the new self test.
7126 * source.c (openp): Update.
7127 (find_and_open_source): Update.
7128 * nto-tdep.c (nto_find_and_open_solib): Update.
7129 * main.c (set_gdb_data_directory): Update.
7130 (captured_main_1): Update.
7131 * dwarf2read.c (dwarf2_get_dwz_file): Update
7132 (dw2_map_symbol_filenames): Update.
7133 * auto-load.c (auto_load_safe_path_vec_update): Update.
7134 (filename_is_in_auto_load_safe_path_vec): Change type of
7135 "filename_realp".
7136 (auto_load_objfile_script): Update.
7137 (file_is_auto_load_safe): Update. Use std::string.
7138 * utils.h (gdb_realpath): Return a gdb::unique_xmalloc_ptr.
7139
7140 2017-08-22 Tom Tromey <tom@tromey.com>
7141
7142 * utils.c (gdb_realpath_keepfile): Return a
7143 gdb::unique_xmalloc_ptr.
7144 * exec.c (exec_file_attach): Update.
7145 * utils.h (gdb_realpath_keepfile): Return a
7146 gdb::unique_xmalloc_ptr.
7147
7148 2017-08-22 Tom Tromey <tom@tromey.com>
7149
7150 * compile/compile.c (compile_file_command): Use
7151 gdb::unique_xmalloc_ptr, std::string.
7152 * utils.c (gdb_abspath): Change return type.
7153 * source.c (openp): Update.
7154 * objfiles.c (allocate_objfile): Update.
7155 * main.c (set_gdb_data_directory): Update.
7156 * utils.h (gdb_abspath): Return a gdb::unique_xmalloc_ptr.
7157
7158 2017-08-22 Zhouyi Zhou <zhouzhouyi@gmail.com>
7159
7160 * cli-cmds.c (list_commands): List actual code around more than
7161 one location.
7162
7163 2017-08-21 John Baldwin <jhb@FreeBSD.org>
7164
7165 * fbsd-nat.c (fbsd_add_threads): Use array type for `lwps'.
7166
7167 2017-08-21 Pedro Alves <palves@redhat.com>
7168
7169 PR gdb/19487
7170 * c-exp.y (variable production): Handle function aliases.
7171 * minsyms.c (msymbol_is_text): New function.
7172 * minsyms.h (msymbol_is_text): Declare.
7173 * symtab.c (find_function_alias_target): New function.
7174 * symtab.h (find_function_alias_target): Declare.
7175
7176 2017-08-21 Pedro Alves <palves@redhat.com>
7177
7178 * eval.c (evaluate_subexp_standard) <OP_TYPE>: Don't dig past
7179 typedefs.
7180 * typeprint.c (whatis_exp): If handling "whatis", and expression
7181 is OP_TYPE, strip one typedef level. Otherwise don't strip
7182 typedefs here.
7183 * valops.c (value_cast): Save "to" type before resolving
7184 stubs/typedefs. Use that type as resulting value's type.
7185
7186 2017-08-18 Tom Tromey <tom@tromey.com>
7187 Pedro Alves <palves@redhat.com>
7188
7189 * spu-multiarch.c (parse_spufs_run): Use scoped_restore.
7190 * sol-thread.c (sol_thread_resume, sol_thread_wait)
7191 (sol_thread_xfer_partial, rw_common): Use scoped_restore.
7192 * procfs.c (procfs_do_thread_registers): Use scoped_restore.
7193 * proc-service.c (ps_xfer_memory): Use scoped_restore.
7194 * linux-tdep.c (linux_corefile_thread): Remove a cleanup.
7195 (linux_get_siginfo_data): Add "thread" argument. Use
7196 scoped_restore.
7197 * linux-nat.c (linux_child_follow_fork)
7198 (check_stopped_by_watchpoint): Use scoped_restore.
7199 * infrun.c (displaced_step_prepare_throw, write_memory_ptid)
7200 (THREAD_STOPPED_BY, handle_signal_stop): Use scoped_restore.
7201 (restore_inferior_ptid, save_inferior_ptid): Remove.
7202 * btrace.c (btrace_fetch): Use scoped_restore.
7203 * bsd-uthread.c (bsd_uthread_fetch_registers)
7204 (bsd_uthread_store_registers): Use scoped_restore.
7205 * breakpoint.c (reattach_breakpoints, detach_breakpoints): Use
7206 scoped_restore.
7207 * aix-thread.c (aix_thread_resume, aix_thread_wait)
7208 (aix_thread_xfer_partial): Use scoped_restore.
7209 * inferior.h (save_inferior_ptid): Remove.
7210
7211 2017-08-18 Yao Qi <yao.qi@linaro.org>
7212
7213 PR tdep/21818
7214 * arm-tdep.c (gdb_print_insn_arm): Mark
7215 USER_SPECIFIED_MACHINE_TYPE if exec_bfd isn't NULL.
7216
7217 2017-08-18 Yao Qi <yao.qi@linaro.org>
7218
7219 * NEWS: Mention GDBserver's new option "--selftest".
7220 * Makefile.in (SFILES): Remove selftest.c, add common/selftest.c.
7221 * selftest.c: Move it to common/selftest.c.
7222 * selftest.h: Move it to common/selftest.h.
7223 * selftest-arch.c (reset): New function.
7224 (tests_with_arch): Call reset.
7225
7226 2017-08-18 Yao Qi <yao.qi@linaro.org>
7227
7228 * selftest.c (run_tests): Don't call QUIT. Call debug_printf
7229 instead of exception_fprintf and printf_filtered.
7230
7231 2017-08-18 Yao Qi <yao.qi@linaro.org>
7232
7233 * selftest.c (register_self_test): Rename it to
7234 selftests::register_test.
7235 (run_self_tests): selftest::run_tests.
7236 * selftest.h: Update declarations.
7237 * selftest-arch.c (register_self_test_foreach_arch): Rename it to
7238 selftests::register_test_foreach_arch.
7239 * selftest-arch.h: Update declaration.
7240 * aarch64-tdep.c: Update.
7241 * arm-tdep.c: Likewise.
7242 * disasm-selftests.c: Likewise.
7243 * dwarf2loc.c: Likewise.
7244 * dwarf2-frame.c: Likewise.
7245 * findvar.c: Likewise.
7246 * gdbarch-selftests.c: Likewise.
7247 * maint.c (maintenance_selftest): Likewise.
7248 * regcache.c: Likewise.
7249 * rust-exp.y: Likewise.
7250 * selftest-arch.c: Likewise.
7251 * unittests/environ-selftests.c: Likewise.
7252 * unittests/function-view-selftests.c: Likewise.
7253 * unittests/offset-type-selftests.c: Likewise.
7254 * unittests/optional-selftests.c: Likewise.
7255 * unittests/scoped_restore-selftests.c: Likewise.
7256 * utils-selftests.c: Likewise.
7257
7258 2017-08-17 Pedro Alves <palves@redhat.com>
7259
7260 * cli/cli-cmds.c (source_command): Delete 'old_source_verbose'
7261 local.
7262
7263 2017-08-17 Pedro Alves <palves@redhat.com>
7264
7265 * dwarf2read.c (struct dwarf2_cu) <line_header_die_owner>: New
7266 field.
7267 (reset_die_in_process): Delete, replaced by ...
7268 (process_die_scope): ... this new class. Make it responsible for
7269 freeing cu->line_header too.
7270 (process_die): Use process_die_scope.
7271 (handle_DW_AT_stmt_list): Record the line header's owner CU/DIE in
7272 cu->line_header_die_owner. Don't release the line header if it's
7273 owned by the CU.
7274 (setup_type_unit_groups): Make the CU/DIE own the line header.
7275 Don't release the line header here.
7276
7277 2017-08-17 Alex Lindsay <alexlindsay239@gmail.com> (tiny change)
7278
7279 * elfread.c (elf_read_minimal_symbols): xfree synthsyms.
7280
7281 2017-08-17 Ruslan Kabatsayev <b7.10110111@gmail.com>
7282
7283 * NEWS: Mention new shortcuts for nexti and stepi in TUI
7284 Single-Key mode
7285
7286 2017-08-16 Ruslan Kabatsayev <b7.10110111@gmail.com>
7287
7288 * tui/tui.c (tui_commands): Add "nexti" and "stepi" to the Single-Key
7289 mode command list.
7290
7291 2017-08-15 Stafford Horne <shorne@gmail.com>
7292
7293 * MAINTAINERS (Write After Approval): Add Stafford Horne.
7294
7295 2017-08-15 Stafford Horne <shorne@gmail.com>
7296
7297 * xtensa-tdep.c (xtensa_init_reggroups): Use xstrdup for cpname.
7298
7299 2017-08-15 Sergio Durigan Junior <sergiodj@redhat.com>
7300
7301 PR gdb/21954
7302 * infcmd.c (unset_environment_command): Use the 'clear' method on
7303 the environment instead of resetting it.
7304
7305 2017-08-15 John Baldwin <jhb@FreeBSD.org>
7306
7307 * fbsd-nat.c (fbsd_convert_siginfo): Fix compile on big-endian
7308 platforms.
7309
7310 2017-08-14 Tom Tromey <tom@tromey.com>
7311
7312 * valprint.c (print_octal_chars): Use HOST_CHAR_BIT.
7313 (print_binary_chars): Likewise.
7314 (BITS_IN_BYTES): Remove.
7315
7316 2017-08-14 Tom Tromey <tom@tromey.com>
7317
7318 PR gdb/21675
7319 * valprint.c (LOW_ZERO): Change value to 034.
7320 (print_octal_chars): Add static_asserts for octal constants.
7321 * printcmd.c (print_scalar_formatted): Add 'd' case.
7322
7323 2017-08-11 Tom Tromey <tom@tromey.com>
7324
7325 * symfile.c (add_symbol_file_command): Use std::vector.
7326
7327 2017-08-14 Tom Tromey <tom@tromey.com>
7328
7329 * break-catch-throw.c (handle_gnu_v3_exceptions): Use std::move.
7330 * break-catch-syscall.c (create_syscall_event_catchpoint): Use
7331 std::move.
7332 * break-catch-sig.c (create_signal_catchpoint): Use std::move.
7333
7334 2017-08-11 Pedro Alves <palves@redhat.com>
7335
7336 * infrun.c (process_event_stop_test): Adjust
7337 function_name_is_marked_for_skip call.
7338 * skip.c: Include <list>.
7339 (skiplist_entry): Make it a class with private fields, and
7340 getters/setters.
7341 (skiplist_entry_chain): Delete.
7342 (skiplist_entries): New.
7343 (skiplist_entry_count): Delete.
7344 (highest_skiplist_entry_num): New.
7345 (ALL_SKIPLIST_ENTRIES, ALL_SKIPLIST_ENTRIES_SAFE): Delete.
7346 (add_skiplist_entry): Delete.
7347 (skiplist_entry::skiplist_entry): New.
7348 (skiplist_entry::add_entry): New.
7349 (skip_file_command, skip_function): Adjust.
7350 (compile_skip_regexp): Delete.
7351 (skip_command): Don't compile regexp here. Adjust to use
7352 skiplist_entry::add_entry.
7353 (skip_info): Adjust to use range-for and getters.
7354 (skip_enable_command, skip_disable_command): Adjust to use
7355 range-for and setters.
7356 (skip_delete_command): Adjust to use std::list.
7357 (add_skiplist_entry): Delete.
7358 (skip_file_p): Delete, refactored as ...
7359 (skiplist_entry::do_skip_file_p): ... this new method.
7360 (skip_gfile_p): Delete, refactored as ...
7361 (skiplist_entry::do_gskip_file_p): ... this new method.
7362 (skip_function_p, skip_rfunction_p): Delete, refactored as ...
7363 (skiplist_entry::skip_function_p): ... this new method.
7364 (function_name_is_marked_for_skip): Now returns bool, and takes
7365 the function sal by const reference. Adjust to use range-for and
7366 skiplist_entry methods.
7367 (_initialize_step_skip): Remove references to
7368 skiplist_entry_chain, skiplist_entry_count.
7369 * skip.h (function_name_is_marked_for_skip): Now returns bool, and
7370 takes the function sal by const reference.
7371
7372 2017-08-11 Yao Qi <yao.qi@linaro.org>
7373
7374 * dwarf2-frame.c (clear_pointer_cleanup): Remove.
7375 (dwarf2_frame_cache): Remove reset_cache_cleanup.
7376 (dwarf2_frame_cache):
7377 * frame-unwind.c (frame_unwind_try_unwinder): Catch
7378 RETURN_MASK_ALL and set *this_case to NULL.
7379 * frame-unwind.h: Update comments.
7380
7381 2017-08-11 Yao Qi <yao.qi@linaro.org>
7382
7383 * dwarf2-frame.c (dwarf2_frame_state_alloc_regs): Remove.
7384 (dwarf2_frame_state_copy_regs): Remove.
7385 (dwarf2_frame_state_free_regs): Remove.
7386 (dwarf2_frame_state::~dwarf2_frame_state): Remove.
7387 (dwarf2_restore_rule): Call method .alloc_regs instead of
7388 dwarf2_frame_state_alloc_regs.
7389 (execute_cfa_program): Likewise. Call dwarf2_frame_state_reg_info
7390 constructor. Call std::move.
7391 (dwarf2_fetch_cfa_info): Don't call dwarf2_frame_state_copy_regs.
7392 (dwarf2_frame_cache): Likewise.
7393
7394 [GDB_SELF_TEST]: Include selftest.h and
7395 selftest-arch.h.
7396 [GDB_SELF_TEST] (execute_cfa_program_test): New function.
7397 (_initialize_dwarf2_frame) [GDB_SELF_TEST]: Register
7398 execute_cfa_program_test.
7399
7400 * dwarf2-frame.h (dwarf2_frame_state_reg_info): Add ctor, dtor,
7401 copy ctor, assignment operator, move assignment.
7402 <alloc_regs>: New method.
7403 <swap>: New method.
7404 (struct dwarf2_frame_state): Delete dtor.
7405 (dwarf2_frame_state_alloc_regs): Remove declaration.
7406 * sparc-tdep.c (sparc_execute_dwarf_cfa_vendor_op): Don't call
7407 dwarf2_frame_state_alloc_regs, use .alloc_regs instead.
7408
7409 2017-08-11 Yao Qi <yao.qi@linaro.org>
7410
7411 * dwarf2-frame.c (dwarf2_frame_state_free): Remove.
7412 (dwarf2_frame_state::dwarf2_frame_state): New.
7413 (dwarf2_frame_state::~dwarf2_frame_state): New.
7414 (dwarf2_fetch_cfa_info): Update.
7415 (dwarf2_frame_cache): Remove old_chain. Change 'fs' to an object
7416 rather than a pointer. Update code.
7417 * dwarf2-frame.h (struct dwarf2_frame_state): Declare ctor and
7418 dtor.
7419 <data_align, code_align, retaddr_column>: Change them to const.
7420 <armcc_cfa_offsets_sf, armcc_cfa_offsets_reversed>: Change them
7421 to bool.
7422
7423 2017-08-11 Yao Qi <yao.qi@linaro.org>
7424
7425 * dwarf2-frame.h (struct dwarf2_frame_state_reg) <exp_len>: Remove.
7426 <loc.exp>: New field.
7427 * dwarf2-frame.c (execute_cfa_program): Update.
7428 (dwarf2_frame_prev_register): Update.
7429
7430 2017-08-10 Pedro Alves <palves@redhat.com>
7431
7432 * common/gdb_unique_ptr.h (xfree_deleter<T[]>): Define.
7433
7434 2017-08-09 John Baldwin <jhb@FreeBSD.org>
7435
7436 * fbsd-nat.c (struct fbsd_fork_info): Remove.
7437 (fbsd_pending_children): Use std::list.
7438 (fbsd_remember_child): Likewise.
7439 (fbsd_is_child_pending): Likewise.
7440 (fbsd_pending_vfork_done): Use std::forward_list.
7441 (fbsd_add_vfork_done): Likewise.
7442 (fbsd_is_vfork_done_pending): Likewise.
7443 (fbsd_next_vfork_done): Likewise.
7444
7445 2017-08-09 John Baldwin <jhb@FreeBSD.org>
7446
7447 * fbsd-nat.c [HAVE_KINFO_GETVMMAP] (struct free_deleter): New.
7448 (fbsd_find_memory_regions): Use free_deleter with std::unique_ptr.
7449 [!HAVE_KINFO_GETVMMAP] (fbsd_find_memory_regions): Use std::string
7450 for `mapfilename'.
7451 (fbsd_xfer_partial): Use gdb::byte_vector.
7452 (fbsd_add_threads): Use gdb::unique_xmalloc_ptr.
7453
7454 2017-08-09 John Baldwin <jhb@FreeBSD.org>
7455
7456 * fbsd-nat.c: [!HAVE_KINFO_GETVMMAP]: Include <sys/user.h> and
7457 "filestuff.h".
7458 (fbsd_find_memory_regions): Fix `mapfile' initialization.
7459
7460 2017-08-09 Tom Tromey <tom@tromey.com>
7461
7462 * skip.c (skiplist_entry): New constructor.
7463 (skiplist_entry::enabled, skiplist_entry::function_is_regexp)
7464 (skiplist_entry::file_is_glob): Now bool.
7465 (skiplist_entry::file, skiplist_entry::function): Now
7466 std::string.
7467 (make_skip_entry): Return a unique_ptr. Use new.
7468 (free_skiplist_entry, free_skiplist_entry_cleanup)
7469 (make_free_skiplist_entry_cleanup): Remove.
7470 (skip_command, skip_disable_command, add_skiplist_entry)
7471 (skip_form_bytes, compile_skip_regexp, skip_command, skip_info)
7472 (skip_file_p, skip_gfile_p, skip_function_p, skip_rfunction_p)
7473 (function_name_is_marked_for_skip): Update.
7474 (skip_delete_command): Update. Use delete.
7475
7476 2017-08-09 Jiong Wang <jiong.wang@arm.com>
7477
7478 * aarch64-linux-tdep.c: Include "auxv.h" and "elf/common.h".
7479 (aarch64_linux_core_read_description): New function.
7480 (aarch64_linux_init_abi): Register gdbarch_core_read_description.
7481
7482 2017-08-09 Pedro Alves <palves@redhat.com>
7483
7484 * cp-name-parser.y (cp_comp_to_string): Return a
7485 gdb::unique_xmalloc_ptr<char>.
7486 * cp-support.c (replace_typedefs_qualified_name)
7487 (replace_typedefs): Adjust to use gdb::unique_xmalloc_ptr<char>.
7488 (cp_canonicalize_string_full): Use op= instead of explicit
7489 convertion.
7490 (cp_class_name_from_physname, method_name_from_physname)
7491 (cp_func_name, cp_remove_params): Adjust to use
7492 gdb::unique_xmalloc_ptr<char>.
7493 * cp-support.h (cp_comp_to_string): Return a
7494 gdb::unique_xmalloc_ptr<char>.
7495 * python/py-type.c (typy_lookup_type): Adjust to use
7496 gdb::unique_xmalloc_ptr<char>.
7497
7498 2017-08-09 H.J. Lu <hongjiu.lu@intel.com>
7499
7500 * dwarf2read.c (dwarf2_string_attr): Fix a typo.
7501
7502 2017-08-09 Alex Lindsay <alexlindsay239@gmail.com>
7503 Yao Qi <yao.qi@linaro.org>
7504
7505 * cp-support.c (cp_canonicalize_string_full): Use
7506 gdb::unique_xmalloc_ptr<char>.
7507 (cp_canonicalize_string): Likewise.
7508
7509 2017-08-09 Yao Qi <yao.qi@linaro.org>
7510
7511 * features/Makefile (WHICH): Remove i386/ non-linux stuff.
7512 * regformats/i386/amd64-avx-avx512.dat: Remove.
7513 * regformats/i386/amd64-avx-mpx-avx512-pku.dat: Remove.
7514 * regformats/i386/amd64-avx-mpx.dat:Remove.
7515 * regformats/i386/amd64-avx.dat: Remove.
7516 * regformats/i386/amd64-mpx.dat: Remove.
7517 * regformats/i386/i386-avx-avx512.dat: Remove.
7518 * regformats/i386/i386-avx-mpx-avx512-pku.dat: Remove.
7519 * regformats/i386/i386-avx-mpx.dat: Remove.
7520 * regformats/i386/i386-mmx.dat: Remove.
7521 * regformats/i386/i386-mpx.dat: Remove.
7522
7523 2017-08-09 Yao Qi <yao.qi@linaro.org>
7524
7525 * amd64-tdep.h (tdesc_x32): Remove the declaration.
7526 * amd64-tdep.c: Don't include features/i386/x32*.c.
7527 (_initialize_amd64_tdep): Don't call initialize_tdesc_x32*
7528 functions.
7529 * features/Makefile (WHICH): Remove i386/x32, i386/x32-avx,
7530 and i386/x32-avx-avx512.
7531 (XMLTOC): Remove i386/x32-avx.xml, i386/x32-avx-avx512.xml,
7532 and i386/x32.xml.
7533 * features/i386/x32-avx-avx512.c: Removed.
7534 * features/i386/x32-avx-avx512.xml: Removed.
7535 * features/i386/x32-avx.c: Removed.
7536 * features/i386/x32-avx.xml: Removed.
7537 * features/i386/x32.c: Removed.
7538 * features/i386/x32.xml: Removed.
7539 * regformats/i386/x32-avx-avx512.dat: Removed.
7540 * regformats/i386/x32-avx.dat: Removed.
7541 * regformats/i386/x32.dat: Removed.
7542
7543 2017-08-07 Maciej W. Rozycki <macro@imgtec.com>
7544
7545 PR breakpoints/21886
7546 * mem-break.c (default_memory_insert_breakpoint): Use
7547 `->placed_address' rather than `->reqstd_address' for the
7548 breakpoint location.
7549
7550 2017-08-07 Maciej W. Rozycki <macro@imgtec.com>
7551
7552 * arch-utils.c (default_print_insn): Remove arch/mach/endian
7553 assertions.
7554
7555 2017-08-07 Maciej W. Rozycki <macro@imgtec.com>
7556
7557 * gdbarch.sh (gdbarch_info): Replace the `tdep_info' member with
7558 a union of `tdep_info', `tdesc_data' and `id'.
7559 * aarch64-tdep.c (aarch64_gdbarch_init): Use `info.tdesc_data'
7560 rather than `info.tdep_info'.
7561 * amd64-linux-tdep.c (amd64_linux_init_abi): Likewise.
7562 * i386-linux-tdep.c (i386_linux_init_abi): Likewise.
7563 * i386-tdep.c (i386_gdbarch_init): Likewise.
7564 * mips-linux-tdep.c (mips_linux_init_abi): Likewise.
7565 * mips-tdep.c (mips_gdbarch_init): Likewise.
7566 * nds32-tdep.c (nds32_gdbarch_init): Likewise.
7567 * rs6000-tdep.c (rs6000_gdbarch_init): Likewise.
7568 * ppc-linux-tdep.c (ppu2spu_sniffer): Use `info.id' rather than
7569 `info.tdep_info'.
7570 (ppc_linux_init_abi): Use `info.tdesc_data' rather than
7571 `info.tdep_info'.
7572 * sparc-tdep.c (sparc32_gdbarch_init): Likewise.
7573 * spu-multiarch.c (spu_gdbarch): Use `info.id' rather than
7574 `info.tdep_info'.
7575 * spu-tdep.c (spu_gdbarch_init): Likewise.
7576 * gdbarch.h: Regenerate.
7577
7578 2017-08-07 Leszek Swirski <leszeks@google.com>
7579
7580 PR symtab/20899
7581 * dwarf2read.c (dwarf2_string_attr): Allow DW_FORM_GNU_strp_alt.
7582
7583 2017-08-07 Simon Marchi <simon.marchi@ericsson.com>
7584
7585 * remote-sim.c (gdbsim_load): Remove char **argv local variable.
7586 (gdbsim_open): Rename gdb_argv args object to argv.
7587
7588 2017-08-05 Tom Tromey <tom@tromey.com>
7589
7590 * compile/compile-object-load.c (compile_object_load): Use
7591 gdb::unique_xmalloc_ptr.
7592 * cli/cli-dump.c (scan_filename): Rename from
7593 scan_filename_with_cleanup. Change return type.
7594 (scan_expression): Rename from scan_expression_with_cleanup.
7595 Change return type.
7596 (dump_memory_to_file, dump_value_to_file, restore_command):
7597 Use gdb::unique_xmalloc_ptr. Update.
7598 * cli/cli-cmds.c (find_and_open_script): Use
7599 gdb::unique_xmalloc_ptr.
7600 * tracefile-tfile.c (tfile_open): Use gdb::unique_xmalloc_ptr.
7601 * symmisc.c (maintenance_print_symbols)
7602 (maintenance_print_msymbols): Use gdb::unique_xmalloc_ptr.
7603 * symfile.c (symfile_bfd_open, generic_load)
7604 (add_symbol_file_command, remove_symbol_file_command): Use
7605 gdb::unique_xmalloc_ptr.
7606 * source.c (openp): Use gdb::unique_xmalloc_ptr.
7607 * psymtab.c (maintenance_print_psymbols): Use
7608 gdb::unique_xmalloc_ptr.
7609 * corelow.c (core_open): Use gdb::unique_xmalloc_ptr.
7610 * breakpoint.c (save_breakpoints): Use gdb::unique_xmalloc_ptr.
7611 * solib.c (solib_map_sections): Use gdb::unique_xmalloc_ptr.
7612 (reload_shared_libraries_1): Likewise.
7613
7614 2017-08-05 Tom Tromey <tom@tromey.com>
7615
7616 * rust-exp.y (rust_op_ptr, set_field): Remove typedefs.
7617 (rust_op_vector, rust_set_vector): New typedefs.
7618 (current_parser): New global.
7619 (work_obstack): Change to pointer type. Update all users.
7620 (rust_ast, pstate): Remove globals.
7621 (struct rust_parser): New.
7622 (%union) <params, field_inits>: Change type.
7623 (start, tuple_expr, unit_expr, struct_expr_list, literal)
7624 (field_expr, expr_list, maybe_expr_list, type_list): Update.
7625 (ast_call_ish, ast_path, ast_function_type, ast_tuple_type)
7626 (convert_params_to_types, convert_params_to_expression): Change
7627 type of "params".
7628 (ast_string): Change type of "fields".
7629 (rust_parse): Make a rust_parser. Remove cleanups.
7630 (rust_lex_tests): Make and install an auto_obstack.
7631
7632 2017-08-04 Yao Qi <yao.qi@linaro.org>
7633
7634 * configure.srv (ipa_x32_linux_regobj): New.
7635 * linux-amd64-ipa.c (get_ipa_tdesc): Use X86_TDESC_AVX_AVX512
7636 instead of X86_TDESC_AVX512.
7637 (initialize_low_tracepoint): Call
7638 init_registers_x32_avx_avx512_linux.
7639
7640 2017-08-04 Yao Qi <yao.qi@linaro.org>
7641
7642 * utils.h (gdb_argv): Add namespace std for nullptr_t.
7643
7644 2017-08-03 Ruslan Kabatsayev <b7.10110111@gmail.com>
7645
7646 * MAINTAINERS (Write After Approval): Add Ruslan Kabatsayev.
7647
7648 2017-08-03 Tom Tromey <tom@tromey.com>
7649
7650 * utils.c (make_cleanup_freeargv, do_freeargv, gdb_buildargv):
7651 Remove.
7652 * utils.h (make_cleanup_freeargv, gdb_buildargv): Remove.
7653
7654 2017-08-03 Tom Tromey <tom@tromey.com>
7655
7656 * python/py-param.c (compute_enum_values): Use gdb_argv.
7657
7658 2017-08-03 Tom Tromey <tom@tromey.com>
7659
7660 * utils.h (struct gdb_argv_deleter): New.
7661 (gdb_argv): New class.
7662 * utils.c (gdb_argv::reset): New method.
7663 * tracepoint.c (delete_trace_variable_command): Use gdb_argv.
7664 * tracefile.c (tsave_command): Use gdb_argv.
7665 * top.c (new_ui_command): Use gdb_argv.
7666 * symmisc.c (maintenance_print_symbols)
7667 (maintenance_print_msymbols, maintenance_expand_symtabs): Use gdb_argv.
7668 * symfile.c (symbol_file_command, generic_load)
7669 (remove_symbol_file_command): Use gdb_argv.
7670 * stack.c (backtrace_command): Use gdb_argv.
7671 * source.c (add_path, show_substitute_path_command)
7672 (unset_substitute_path_command, set_substitute_path_command):
7673 Use gdb_argv.
7674 * skip.c (skip_command): Use gdb_argv. Use gdb_buildargv.
7675 * ser-mingw.c (pipe_windows_open): Use gdb_argv.
7676 * remote.c (extended_remote_run, remote_put_command)
7677 (remote_get_command, remote_delete_command): Use gdb_argv.
7678 * remote-sim.c (gdbsim_load, gdbsim_create_inferior)
7679 (gdbsim_open): Use gdb_argv.
7680 * python/py-cmd.c (gdbpy_string_to_argv): Use gdb_argv.
7681 * psymtab.c (maintenance_print_psymbols): Use gdb_argv.
7682 * procfs.c (procfs_info_proc): Use gdb_argv.
7683 * interps.c (interpreter_exec_cmd): Use gdb_argv.
7684 * infrun.c (handle_command): Use gdb_argv.
7685 * inferior.c (add_inferior_command, clone_inferior_command):
7686 Use gdb_argv.
7687 * guile/scm-string.c (gdbscm_string_to_argv): Use gdb_argv.
7688 * exec.c (exec_file_command): Use gdb_argv.
7689 * cli/cli-cmds.c (alias_command): Use gdb_argv.
7690 * compile/compile.c (build_argc_argv): Use gdb_argv.
7691
7692 2017-08-03 Tom Tromey <tom@tromey.com>
7693
7694 * python/python.c (gdbpy_decode_line): Use unique_xmalloc_ptr.
7695
7696 2017-08-03 Tom Tromey <tom@tromey.com>
7697
7698 * python/python.c (compute_python_string): Return std::string.
7699 (gdbpy_eval_from_control_command): Update.
7700 (do_start_initialization): Use std::string.
7701 * python/py-varobj.c (py_varobj_iter_next): Use string_printf, not
7702 xstrprintf.
7703 * python/py-breakpoint.c (local_setattro): Use string_printf, not
7704 xstrprintf.
7705
7706 2017-08-03 Tom Tromey <tom@tromey.com>
7707
7708 * top.h (do_restore_instream_cleanup): Remove.
7709 * top.c (do_restore_instream_cleanup): Remove.
7710 (read_command_file): Use scoped_restore.
7711 * cli/cli-script.c (execute_user_command): Use scoped_restore.
7712
7713 2017-08-03 Tom Tromey <tom@tromey.com>
7714
7715 * cli/cli-script.c (execute_user_command)
7716 (execute_control_command): Use scoped_restore.
7717
7718 2017-08-03 Tom Tromey <tom@tromey.com>
7719
7720 * cli/cli-script.c (do_restore_user_call_depth): Remove.
7721 (execute_user_command): Remove user_call_depth; use
7722 user_args_stack's size instead.
7723
7724 2017-08-03 Tom Tromey <tom@tromey.com>
7725
7726 * top.h (in_user_command): Remove.
7727 * top.c (in_user_command): Remove.
7728 * cli/cli-script.c (do_restore_user_call_depth)
7729 (execute_user_command): Update.
7730
7731 2017-08-03 Tom Tromey <tom@tromey.com>
7732
7733 * valops.c (search_struct_method): Use gdb::byte_vector.
7734 * valarith.c (value_concat): Use std::vector.
7735 * target.c (memory_xfer_partial): Use gdb::byte_vector.
7736 (simple_search_memory): Likewise.
7737 * printcmd.c (find_string_backward): Use gdb::byte_vector.
7738 * mi/mi-main.c (mi_cmd_data_write_memory): Use gdb::byte_vector.
7739 * gcore.c (gcore_copy_callback): Use gdb::byte_vector.
7740 * elfread.c (elf_rel_plt_read): Use std::string.
7741 * cp-valprint.c (cp_print_value): Use gdb::byte_vector.
7742 * cli/cli-dump.c (restore_section_callback): Use
7743 gdb::byte_vector.
7744
7745 2017-08-03 Tom Tromey <tom@tromey.com>
7746
7747 * jit.c (jit_reader_load_command): Use unique_xmalloc_ptr.
7748
7749 2017-08-03 Tom Tromey <tom@tromey.com>
7750
7751 * tui/tui-regs.c (tui_restore_gdbout): Remove.
7752 (tui_register_format): Use scoped_restore.
7753
7754 2017-08-03 Tom Tromey <tom@tromey.com>
7755
7756 * reverse.c (exec_direction_default): Remove.
7757 (exec_reverse_once): Use scoped_restore.
7758 * remote.c (restore_remote_timeout): Remove.
7759 (remote_flash_erase, remote_flash_write, remote_flash_done)
7760 (readchar, remote_serial_write): Use scoped_restore.
7761 * cli/cli-script.c (struct source_cleanup_lines_args)
7762 (source_cleanup_lines): Remove.
7763 (script_from_file): Use scoped_restore.
7764 * cli/cli-cmds.c (source_verbose_cleanup): Remove.
7765 (source_command): Use scoped_restore.
7766
7767 2017-08-03 Tom Tromey <tom@tromey.com>
7768
7769 * utils.h (make_cleanup_free_so): Remove.
7770 * utils.c (do_free_so, make_cleanup_free_so): Remove.
7771 * solist.h (struct so_deleter): New.
7772 (so_list_up): New typedef.
7773 * solib-svr4.c (svr4_read_so_list): Use so_list_up.
7774
7775 2017-08-03 Tom Tromey <tom@tromey.com>
7776
7777 * utils.h (make_cleanup_restore_current_language): Remove.
7778 * utils.c (do_restore_current_language)
7779 (make_cleanup_restore_current_language): Remove.
7780 * parse.c (parse_exp_in_context_1)
7781 (parse_expression_with_language): Use
7782 scoped_restore_current_language.
7783 * mi/mi-main.c (mi_cmd_execute): Use
7784 scoped_restore_current_language.
7785 * language.h (scoped_restore_current_language): New class.
7786
7787 2017-08-03 Tom Tromey <tom@tromey.com>
7788
7789 * compile/compile.c (cleanup_unlink_file): Remove.
7790 (compile_to_object): Use gdb::unlinker.
7791 (eval_compile_command): Likewise.
7792
7793 2017-08-03 Tom Tromey <tom@tromey.com>
7794
7795 * utils.h (make_cleanup_fclose): Remove.
7796 * utils.c (do_fclose_cleanup, make_cleanup_fclose): Remove.
7797
7798 2017-08-03 Tom Tromey <tom@tromey.com>
7799
7800 * top.c (open_terminal_stream): Return gdb_file_up.
7801 (new_ui_command): Update.
7802
7803 2017-08-03 Tom Tromey <tom@tromey.com>
7804
7805 * source.c (print_source_lines_base, forward_search_command)
7806 (reverse_search_command): Use gdb_file_up.
7807
7808 2017-08-03 Tom Tromey <tom@tromey.com>
7809
7810 * fbsd-nat.c (fbsd_find_memory_regions): Update.
7811
7812 2017-08-03 Tom Tromey <tom@tromey.com>
7813
7814 * cli/cli-cmds.c (find_and_open_script): Change return type.
7815 Remove "streamp" and "full_path" parameters.
7816 (source_script_with_search): Update.
7817 * auto-load.c (source_script_file): Update.
7818 * cli/cli-cmds.h (find_and_open_script): Change type.
7819 (open_script): New struct.
7820
7821 2017-08-03 Tom Tromey <tom@tromey.com>
7822
7823 * xml-support.c (xml_fetch_content_from_file): Update.
7824 * ui-file.c (stdio_file::open): Update.
7825 * tracefile-tfile.c (tfile_start): Update.
7826 * remote.c (remote_file_put, remote_file_get): Update.
7827 * nat/linux-procfs.c (linux_proc_get_int)
7828 (linux_proc_pid_get_state, linux_proc_tid_get_name): Update.
7829 * nat/linux-osdata.c (linux_common_core_of_thread): Update.
7830 (command_from_pid, commandline_from_pid, linux_xfer_osdata_cpus)
7831 (print_sockets, linux_xfer_osdata_shm, linux_xfer_osdata_sem)
7832 (linux_xfer_osdata_msg, linux_xfer_osdata_modules): Update.
7833 * nat/linux-btrace.c (linux_determine_kernel_start): Update.
7834 * linux-nat.c (linux_proc_pending_signals): Update.
7835 * dwarf2read.c (write_psymtabs_to_index): Use gdb_file_up.
7836 (file_closer): Remove.
7837 * compile/compile.c (compile_to_object): Update.
7838 * common/filestuff.h (struct gdb_file_deleter): New.
7839 (gdb_file_up): New typedef.
7840 (gdb_fopen_cloexec): Change return type.
7841 * common/filestuff.c (gdb_fopen_cloexec): Return gdb_file_up.
7842 * cli/cli-dump.c (fopen_with_cleanup): Remove.
7843 (dump_binary_file, restore_binary_file): Update.
7844 * auto-load.c (auto_load_objfile_script_1): Update.
7845
7846 2017-08-03 Tom Tromey <tom@tromey.com>
7847
7848 * tracepoint.c (tvariables_info_1): Use ui_out_emit_table.
7849 (info_static_tracepoint_markers_command): Likewise.
7850 * solib.c (info_sharedlibrary_command): Use ui_out_emit_table.
7851 * skip.c (skip_info): Use ui_out_emit_table.
7852 * progspace.c (print_program_space): Use ui_out_emit_table.
7853 * osdata.c (info_osdata): Use ui_out_emit_table.
7854 * mi/mi-cmd-info.c (mi_cmd_info_ada_exceptions): Use
7855 ui_out_emit_table.
7856 * linux-thread-db.c (info_auto_load_libthread_db): Use
7857 ui_out_emit_table.
7858 * inferior.c (print_inferior): Use ui_out_emit_table.
7859 * gdb_bfd.c (maintenance_info_bfds): Use ui_out_emit_table.
7860 * breakpoint.c (breakpoint_1): Use ui_out_emit_table.
7861 * auto-load.c (auto_load_info_scripts): Use ui_out_emit_table.
7862 * ada-tasks.c (print_ada_task_info): Use ui_out_emit_table.
7863 * ui-out.h (class ui_out_emit_table): New.
7864
7865 2017-08-02 Maciej W. Rozycki <macro@imgtec.com>
7866
7867 * mips-tdep.c (mips_fpu_type_str): New function.
7868 (mips_dump_tdep): Call it.
7869
7870 2017-08-01 Maciej W. Rozycki <macro@imgtec.com>
7871
7872 * mips-tdep.c (mips_gdbarch_init): Use MIPS_FPU_TYPE to access
7873 `->mips_fpu_type'.
7874
7875 2017-07-31 Xavier Roirand <roirand@adacore.com>
7876
7877 * solib-darwin.c (DYLD_VERSION_MAX): Increase value.
7878
7879 2017-07-27 Xavier Roirand <roirand@adacore.com>
7880
7881 * MAINTAINERS (Write After Approval): Add Xavier Roirand.
7882
7883 2017-07-26 Yao Qi <yao.qi@linaro.org>
7884
7885 * cli/cli-cmds.c (maintenancechecklist): New variable.
7886 * gdbcmd.h (maintenancechecklist): Declare it.
7887 * i386-linux-tdep.c (_initialize_i386_linux_tdep) [GDB_SELF_TEST]:
7888 Call i386_linux_read_description with different masks.
7889 * maint.c (maintenance_check_command): New function.
7890 (_initialize_maint_cmds): Call add_prefix_cmd.
7891 * target-descriptions.c (tdesc_reg): override operator != and ==.
7892 (tdesc_type): Likewise.
7893 (tdesc_feature): Likewise.
7894 (target_desc): Likewise.
7895 [GDB_SELF_TEST] (selftests::record_xml_tdesc): New function.
7896 (maintenance_check_xml_descriptions): New function.
7897 (_initialize_target_descriptions) Add command "xml-descriptions".
7898 * target-descriptions.h (selftests::record_xml_tdesc): Declare.
7899
7900 2017-07-26 Yao Qi <yao.qi@linaro.org>
7901
7902 * i386-linux-tdep.c: Don't include features/i386/i386-*linux.c.
7903 Include features/i386/32bit-*.c.
7904 (i386_linux_read_description): Generate target description if it
7905 doesn't exist.
7906 (_initialize_i386_linux_tdep): Don't call _initialize_tdesc_i386
7907 functions.
7908 * features/i386/32bit-linux.c: Re-generated.
7909 * features/i386/32bit-sse.c: Likewise.
7910 * target-descriptions.c (print_c_feature::visit): Print code to
7911 set register number if needed.
7912 (print_c_feature) <m_next_regnum>: New field.
7913
7914 2017-07-26 Yao Qi <yao.qi@linaro.org>
7915
7916 * features/Makefile (CFILES): Rename with TDESC_CFILES.
7917 (FEATURE_XMLFILES): New.
7918 (FEATURE_CFILES): New.
7919 New rules.
7920 (clean-cfiles): Remove generated c files.
7921 * features/i386/32bit-avx.c: Generated.
7922 * features/i386/32bit-avx512.c: Generated.
7923 * features/i386/32bit-core.c: Generated.
7924 * features/i386/32bit-linux.c: Generated.
7925 * features/i386/32bit-mpx.c: Generated.
7926 * features/i386/32bit-pkeys.c: Generated.
7927 * features/i386/32bit-sse.c: Generated.
7928 * target-descriptions.c: Include algorithm.
7929 (tdesc_element_visitor): Add method visit_end.
7930 (print_c_tdesc): Implement visit_end.
7931 (print_c_tdesc:: m_filename_after_features): Move it to
7932 protected.
7933 (print_c_feature): New class.
7934 (maint_print_c_tdesc_cmd): Use print_c_feature if XML file
7935 name starts with "i386/32bit-".
7936
7937 2017-07-26 Yao Qi <yao.qi@linaro.org>
7938
7939 * target-descriptions.c (tdesc_element_visitor): New class.
7940 (tdesc_element): New class.
7941 (tdesc_reg): Inherit from tdesc_element.
7942 (tdesc_reg::accept): New function.
7943 (tdesc_type): Inherit from tdesc_element.
7944 (tdesc_type::accept): New function.
7945 (tdesc_feature): Inherit from tdesc_element.
7946 (tdesc_feature::accept): New function.
7947 (target_desc): Inherit from tdesc_element.
7948 (target_desc::target_desc): New.
7949 (target_desc::~target_desc): New.
7950 (target_desc::accept): New.
7951 (allocate_target_description): Use new.
7952 (free_target_description): Use delete.
7953 (print_c_tdesc): New class.
7954 (maint_print_c_tdesc_cmd): Adjust.
7955
7956 * features/aarch64.c: Re-generated.
7957 * features/arc-arcompact.c: Re-generated.
7958 * features/arc-v2.c: Re-generated.
7959 * features/arm/arm-with-iwmmxt.c: Re-generated.
7960 * features/arm/arm-with-m.c: Re-generated.
7961 * features/arm/arm-with-m-fpa-layout.c: Re-generated.
7962 * features/arm/arm-with-m-vfp-d16.c: Re-generated.
7963 * features/arm/arm-with-neon.c: Re-generated.
7964 * features/arm/arm-with-vfpv2.c: Re-generated.
7965 * features/arm/arm-with-vfpv3.c: Re-generated.
7966 * features/i386/amd64-avx-avx512.c: Re-generated.
7967 * features/i386/amd64-avx-avx512-linux.c: Re-generated.
7968 * features/i386/amd64-avx.c: Re-generated.
7969 * features/i386/amd64-avx-linux.c: Re-generated.
7970 * features/i386/amd64-avx-mpx-avx512-pku.c: Re-generated.
7971 * features/i386/amd64-avx-mpx-avx512-pku-linux.c: Re-generated.
7972 * features/i386/amd64-avx-mpx.c: Re-generated.
7973 * features/i386/amd64-avx-mpx-linux.c: Re-generated.
7974 * features/i386/amd64.c: Re-generated.
7975 * features/i386/amd64-linux.c: Re-generated.
7976 * features/i386/amd64-mpx.c: Re-generated.
7977 * features/i386/amd64-mpx-linux.c: Re-generated.
7978 * features/i386/i386-avx-avx512.c: Re-generated.
7979 * features/i386/i386-avx-avx512-linux.c: Re-generated.
7980 * features/i386/i386-avx.c: Re-generated.
7981 * features/i386/i386-avx-linux.c: Re-generated.
7982 * features/i386/i386-avx-mpx-avx512-pku.c: Re-generated.
7983 * features/i386/i386-avx-mpx-avx512-pku-linux.c: Re-generated.
7984 * features/i386/i386-avx-mpx.c: Re-generated.
7985 * features/i386/i386-avx-mpx-linux.c: Re-generated.
7986 * features/i386/i386.c: Re-generated.
7987 * features/i386/i386-linux.c: Re-generated.
7988 * features/i386/i386-mmx.c: Re-generated.
7989 * features/i386/i386-mmx-linux.c: Re-generated.
7990 * features/i386/i386-mpx.c: Re-generated.
7991 * features/i386/i386-mpx-linux.c: Re-generated.
7992 * features/i386/x32-avx-avx512.c: Re-generated.
7993 * features/i386/x32-avx-avx512-linux.c: Re-generated.
7994 * features/i386/x32-avx.c: Re-generated.
7995 * features/i386/x32-avx-linux.c: Re-generated.
7996 * features/i386/x32.c: Re-generated.
7997 * features/i386/x32-linux.c: Re-generated.
7998 * features/microblaze.c: Re-generated.
7999 * features/microblaze-with-stack-protect.c: Re-generated.
8000 * features/mips64-dsp-linux.c: Re-generated.
8001 * features/mips64-linux.c: Re-generated.
8002 * features/mips-dsp-linux.c: Re-generated.
8003 * features/mips-linux.c: Re-generated.
8004 * features/nds32.c: Re-generated.
8005 * features/nios2.c: Re-generated.
8006 * features/nios2-linux.c: Re-generated.
8007 * features/rs6000/powerpc-32.c: Re-generated.
8008 * features/rs6000/powerpc-32l.c: Re-generated.
8009 * features/rs6000/powerpc-403.c: Re-generated.
8010 * features/rs6000/powerpc-403gc.c : Re-generated.
8011 * features/rs6000/powerpc-405.c: Re-generated.
8012 * features/rs6000/powerpc-505.c: Re-generated.
8013 * features/rs6000/powerpc-601.c: Re-generated.
8014 * features/rs6000/powerpc-602.c: Re-generated.
8015 * features/rs6000/powerpc-603.c: Re-generated.
8016 * features/rs6000/powerpc-604.c: Re-generated.
8017 * features/rs6000/powerpc-64.c: Re-generated.
8018 * features/rs6000/powerpc-64l.c: Re-generated.
8019 * features/rs6000/powerpc-7400.c: Re-generated.
8020 * features/rs6000/powerpc-750.c: Re-generated.
8021 * features/rs6000/powerpc-860.c: Re-generated.
8022 * features/rs6000/powerpc-altivec32.c: Re-generated.
8023 * features/rs6000/powerpc-altivec32l.c: Re-generated.
8024 * features/rs6000/powerpc-altivec64.c: Re-generated.
8025 * features/rs6000/powerpc-altivec64l.c: Re-generated.
8026 * features/rs6000/powerpc-cell32l.c: Re-generated.
8027 * features/rs6000/powerpc-cell64l.c: Re-generated.
8028 * features/rs6000/powerpc-e500.c: Re-generated.
8029 * features/rs6000/powerpc-e500l.c: Re-generated.
8030 * features/rs6000/powerpc-isa205-32l.c: Re-generated.
8031 * features/rs6000/powerpc-isa205-64l.c: Re-generated.
8032 * features/rs6000/powerpc-isa205-altivec32l.c: Re-generated.
8033 * features/rs6000/powerpc-isa205-altivec64l.c: Re-generated.
8034 * features/rs6000/powerpc-isa205-vsx32l.c: Re-generated.
8035 * features/rs6000/powerpc-isa205-vsx64l.c: Re-generated.
8036 * features/rs6000/powerpc-vsx32.c: Re-generated.
8037 * features/rs6000/powerpc-vsx32l.c: Re-generated.
8038 * features/rs6000/powerpc-vsx64.c: Re-generated.
8039 * features/rs6000/powerpc-vsx64l.c: Re-generated.
8040 * features/rs6000/rs6000.c: Re-generated.
8041 * features/s390-linux32.c: Re-generated.
8042 * features/s390-linux32v1.c: Re-generated.
8043 * features/s390-linux32v2.c: Re-generated.
8044 * features/s390-linux64.c: Re-generated.
8045 * features/s390-linux64v1.c: Re-generated.
8046 * features/s390-linux64v2.c: Re-generated.
8047 * features/s390-te-linux64.c: Re-generated.
8048 * features/s390-tevx-linux64.c: Re-generated.
8049 * features/s390-vx-linux64.c: Re-generated.
8050 * features/s390x-linux64.c: Re-generated.
8051 * features/s390x-linux64v1.c: Re-generated.
8052 * features/s390x-linux64v2.c: Re-generated.
8053 * features/s390x-te-linux64.c: Re-generated.
8054 * features/s390x-tevx-linux64.c: Re-generated.
8055 * features/s390x-vx-linux64.c: Re-generated.
8056 * features/sparc/sparc32-solaris.c: Re-generated.
8057 * features/sparc/sparc64-solaris.c: Re-generated.
8058 * features/tic6x-c62x.c: Re-generated.
8059 * features/tic6x-c62x-linux.c: Re-generated.
8060 * features/tic6x-c64x.c: Re-generated.
8061 * features/tic6x-c64x-linux.c: Re-generated.
8062 * features/tic6x-c64xp.c: Re-generated.
8063 * features/tic6x-c64xp-linux.c: Re-generated.
8064
8065 2017-07-26 Yao Qi <yao.qi@linaro.org>
8066
8067 * i386-linux-tdep.c (i386_linux_read_description): New function.
8068 (i386_linux_core_read_description): Call
8069 i386_linux_read_description.
8070 * i386-linux-tdep.h (i386_linux_read_description): Declare.
8071 (tdesc_i386_linux, tdesc_i386_mmx_linux): Remove declarations.
8072 (tdesc_i386_avx_linux, tdesc_i386_mpx_linux): Likewise
8073 (tdesc_i386_avx_mpx_linux, tdesc_i386_avx_avx512_linux): Likewise.
8074 (tdesc_i386_avx_mpx_avx512_pku_linux): Likewise.
8075 * x86-linux-nat.c (x86_linux_read_description): Call
8076 i386_linux_read_description.
8077
8078 2017-07-26 Yao Qi <yao.qi@linaro.org>
8079
8080 * NEWS: Mention it.
8081 * features/Makefile (%.c: %.xml): Pass the xml file name to
8082 command "maint print c-tdesc".
8083 * target-descriptions.c (maint_print_c_tdesc_cmd): Get file
8084 name from 'arg'.
8085
8086 2017-07-26 Yao Qi <yao.qi@linaro.org>
8087
8088 * target-descriptions.c (target_desc): Add ctor and dtor. Do
8089 in-class initialization.
8090 (tdesc_create_feature): Call new instead of XCNEW.
8091 (free_target_description): Ue delete.
8092
8093 2017-07-25 John Baldwin <jhb@FreeBSD.org>
8094
8095 * configure.nat: Add "-lkvm" for NetBSD/sparc64 and fix typo.
8096
8097 2017-07-25 Yao Qi <yao.qi@linaro.org>
8098
8099 * amd64-tdep.c (amd64_init_abi): Make argument default_tdesc
8100 constant.
8101 (amd64_x32_init_abi): Likewise.
8102 * amd64-tdep.h (amd64_init_abi): Update declaration.
8103 (amd64_x32_init_abi): Likewise.
8104
8105 2017-07-25 Yao Qi <yao.qi@linaro.org>
8106
8107 PR tdep/21717
8108 * arm-linux-nat.c (arm_linux_fetch_inferior_registers): Update
8109 condition for FPSCR.
8110 (arm_linux_store_inferior_registers): Likewise.
8111
8112 2017-07-22 Tom Tromey <tom@tromey.com>
8113
8114 * break-catch-syscall.c (struct catch_syscall_inferior_data)
8115 <syscalls_counts>: Now a std::vector.
8116 (get_catch_syscall_inferior_data): Use "new".
8117 (catch_syscall_inferior_data_cleanup): Use "delete".
8118 (insert_catch_syscall, remove_catch_syscall)
8119 (clear_syscall_counts): Update.
8120
8121 2017-07-22 Tom Tromey <tom@tromey.com>
8122
8123 * break-catch-syscall.c (syscall_catchpoint)
8124 <syscalls_to_be_caught>: Now a std::vector<int>
8125 (~syscall_catchpoint): Remove.
8126 (insert_catch_syscall, remove_catch_syscall)
8127 (breakpoint_hit_catch_syscall, print_one_catch_syscall)
8128 (print_mention_catch_syscall, print_recreate_catch_syscall):
8129 Update.
8130 (create_syscall_event_catchpoint): Change type of "filter"
8131 parameter.
8132 (catch_syscall_split_args): Return a std::vector.
8133 (catch_syscall_command_1, catching_syscall_number_1): Update.
8134
8135 2017-07-22 Tom Tromey <tom@tromey.com>
8136
8137 * break-catch-throw.c (struct exception_catchpoint)
8138 <exception_rx>: Now a std::string.
8139 (~exception_catchpoint): Remove.
8140 (print_one_detail_exception_catchpoint): Update.
8141 (handle_gnu_v3_exceptions): Change type of except_rx.
8142 (extract_exception_regexp): Return a std::string.
8143 (catch_exception_command_1): Update.
8144
8145 2017-07-22 Tom Tromey <tom@tromey.com>
8146
8147 * break-catch-sig.c (gdb_signal_type): Remove typedef.
8148 (struct signal_catchpoint) <signals_to_be_caught>: Now a
8149 std::vector.
8150 <catch_all>: Now a bool.
8151 (~signal_catchpoint): Remove.
8152 (signal_catchpoint_insert_location)
8153 (signal_catchpoint_remove_location)
8154 (signal_catchpoint_breakpoint_hit, signal_catchpoint_print_one)
8155 (signal_catchpoint_print_mention)
8156 (signal_catchpoint_print_recreate)
8157 (signal_catchpoint_explains_signal): Update.
8158 (create_signal_catchpoint): Change type of "filter" and
8159 "catch_all".
8160 (catch_signal_split_args): Return a std::vector. Change type of
8161 "catch_all".
8162 (catch_signal_command): Update.
8163
8164 2017-07-20 Pedro Alves <palves@redhat.com>
8165
8166 * ada-lang.c (ada_language_defn): Make extern.
8167 (_initialize_ada_language): Remove add_language call.
8168 * c-lang.c (c_language_defn, cplus_language_defn)
8169 (asm_language_defn, minimal_language_defn): Make extern.
8170 (_initialize_c_language): Delete.
8171 * completer.c (compare_cstrings): Delete, moved to utils.h.
8172 * d-lang.c (d_language_defn): Make extern.
8173 (_initialize_d_language): Remove add_language calls.
8174 * defs.h (enum language): Add comment.
8175 * f-lang.c (f_language_defn): Make extern.
8176 (_initialize_f_language): Remove add_language call.
8177 * go-lang.c (go_language_defn): Make extern.
8178 (_initialize_go_language): Remove add_language call.
8179 * language.c: Include <algorithm>.
8180 (languages): Redefine as const array.
8181 (languages_size, languages_allocsize, DEFAULT_ALLOCSIZE): Delete.
8182 (set_language_command): Handle "local". Use for-range loop.
8183 (set_language): Remove loop.
8184 (language_enum): Rewrite.
8185 (language_def, language_str): Remove loops.
8186 (add_language): Delete.
8187 (add_set_language_command): New, based on add_languages.
8188 (skip_language_trampoline): Adjust.
8189 (local_language_defn): Delete.
8190 (language_gdbarch_post_init): Adjust.
8191 (_initialize_language): Remove add_language calls. Call
8192 add_set_language_command.
8193 * language.h (add_language): Delete.
8194 (auto_language_defn)
8195 (unknown_language_defn, minimal_language_defn, ada_language_defn)
8196 (asm_language_defn, c_language_defn, cplus_language_defn)
8197 (d_language_defn, f_language_defn, go_language_defn)
8198 (m2_language_defn, objc_language_defn, opencl_language_defn)
8199 (pascal_language_defn, rust_language_defn): Declare.
8200 * m2-lang.c (m2_language_defn): Make extern.
8201 (_initialize_m2_language): Remove add_language call.
8202 * objc-lang.c (objc_language_defn): Make extern.
8203 (_initialize_objc_language): Remove add_language call.
8204 * opencl-lang.c (opencl_language_defn): Make extern.
8205 (_initialize_opencl_language): Remove add_language call.
8206 * p-lang.c (pascal_language_defn): Make extern.
8207 (_initialize_pascal_language): Delete.
8208 * rust-lang.c (rust_language_defn): Make extern.
8209 (_initialize_rust_language): Delete.
8210 * utils.h (compare_cstrings): New static inline function.
8211
8212 2017-07-20 Pedro Alves <palves@redhat.com>
8213
8214 * ada-lang.c (ada_to_fixed_type_1): Adjust.
8215 (get_var_value): Constify parameters.
8216 (get_int_var_value): Change prototype.
8217 (to_fixed_range_type): Adjust.
8218 * ada-lang.h (get_int_var_value): Change prototype.
8219
8220 2017-07-20 Pedro Alves <palves@redhat.com>
8221
8222 * dwarf2read.c (dw2_lookup_symbol): Use
8223 SYMBOL_MATCHES_SEARCH_NAME.
8224 * psymtab.c (psym_lookup_symbol): Use SYMBOL_MATCHES_SEARCH_NAME.
8225
8226 2017-07-20 Pedro Alves <palves@redhat.com>
8227
8228 * block.c (block_iter_name_step, block_iter_name_first)
8229 (block_iter_name_next): Delete.
8230 (block_lookup_symbol_primary): Adjust to use
8231 dict_iter_match_first/dict_iter_match_next.
8232 * block.h (block_iter_name_first, block_iter_name_next): Delete
8233 declarations.
8234 (ALL_BLOCK_SYMBOLS_WITH_NAME): Adjust to use
8235 dict_iter_match_first/dict_iter_match_next.
8236
8237 2017-07-20 Pedro Alves <palves@redhat.com>
8238
8239 * cp-support.c (cp_find_first_component_aux): Add missing case for
8240 end of string.
8241
8242 2017-07-18 David Blaikie <dblaikie@gmail.com>
8243
8244 * dwarf2read.c (create_cus_hash_table): Re-add lost initialization
8245 of dwo_cu's dwo_file.
8246
8247 2017-07-18 Yao Qi <yao.qi@linaro.org>
8248
8249 * remote.c (store_registers_using_G): Remove one line comment.
8250
8251 2017-07-18 Yao Qi <yao.qi@linaro.org>
8252
8253 * regcache.c (regcache_cpy): Simplify it.
8254 (regcache::cpy_no_passthrough): Remove it.
8255 * regcache.h (cpy_no_passthrough): Remove it.
8256 (regcache_dup, regcache_cpy): Update comments.
8257
8258 2017-07-18 Pedro Alves <palves@redhat.com>
8259
8260 * remote-sim.c (sim_command_completer): Adjust to work with a
8261 completion_tracker instead of a VEC.
8262
8263 2017-07-17 Pedro Alves <palves@redhat.com>
8264
8265 * completer.c (complete_source_filenames): New function.
8266 (complete_address_and_linespec_locations): New function.
8267 (location_completer): Use complete_address_and_linespec_locations.
8268 (completion_tracker::build_completion_result): Honor the tracker's
8269 request to suppress append.
8270 * completer.h (completion_tracker::suppress_append_ws)
8271 (completion_tracker::set_suppress_append_ws): New methods.
8272 (completion_tracker::m_suppress_append_ws): New field.
8273 (complete_source_filenames): New declaration.
8274 * linespec.c (linespec_complete_what): New.
8275 (struct ls_parser) <complete_what, completion_word,
8276 completion_quote_char, completion_quote_end, completion_tracker>:
8277 New fields.
8278 (string_find_incomplete_keyword_at_end): New.
8279 (linespec_lexer_lex_string): Record quote char. If in completion
8280 mode, don't throw.
8281 (linespec_lexer_consume_token): Advance the completion word point.
8282 (linespec_lexer_peek_token): Save/restore completion info.
8283 (save_stream_and_consume_token): New.
8284 (set_completion_after_number): New.
8285 (linespec_parse_basic): Set what to complete next depending on
8286 token. Handle function and label completions specially.
8287 (parse_linespec): Disable objc shortcut in completion mode. Set
8288 what to complete next depending on token type. Skip keyword if in
8289 completion mode.
8290 (complete_linespec_component, linespec_complete): New.
8291 * linespec.h (linespec_complete): Declare.
8292
8293 2017-07-17 Pedro Alves <palves@redhat.com>
8294
8295 * linespec.c (linespec_lexer_lex_string, find_toplevel_char):
8296 Handle 'operator<' / 'operator<<'.
8297
8298 2017-07-17 Pedro Alves <palves@redhat.com>
8299
8300 * completer.c (collect_explicit_location_matches): Handle
8301 MATCH_LABEL.
8302 (convert_explicit_location_to_linespec): New, factored out from
8303 ...
8304 (convert_explicit_location_to_sals): ... this.
8305 (complete_label): New.
8306 (linespec_complete_label, find_label_symbols_in_block): New.
8307 (find_label_symbols): Add completion_mode parameter and adjust to
8308 call find_label_symbols_in_block.
8309 * linespec.h (linespec_complete_label): Declare.
8310
8311 2017-07-17 Pedro Alves <palves@redhat.com>
8312
8313 * ada-lang.c (ada_collect_symbol_completion_matches): Add
8314 complete_symbol_mode parameter.
8315 * cli/cli-cmds.c (complete_command): Get the completion result out
8316 of the handle_brkchars tracker if used a custom word point.
8317 * completer.c: Include "linespec.h".
8318 (enum explicit_location_match_type) <MATCH_LINE>: New enumerator.
8319 (advance_to_expression_complete_word_point): New.
8320 (completion_tracker::completes_to_completion_word): New.
8321 (complete_files_symbols): Pass down
8322 complete_symbol_mode::EXPRESSION.
8323 (explicit_options, probe_options): New.
8324 (collect_explicit_location_matches): Complete on the
8325 explictit_loc->foo instead of word. Use
8326 linespec_complete_function. Handle MATCH_LINE. Handle offering
8327 keyword and options completions.
8328 (backup_text_ptr): Delete.
8329 (skip_keyword): New.
8330 (complete_explicit_location): Remove 'word' parameter. Add
8331 language, quoted_arg_start and quoted_arg_end parameters.
8332 Rewrite, parsing left to right.
8333 (location_completer): Rewrite.
8334 (location_completer_handle_brkchars): New function.
8335 (symbol_completer): Pass down complete_symbol_mode::EXPRESSION.
8336 (enum complete_line_internal_reason): Adjust comments.
8337 (completion_tracker::discard_completions): New.
8338 (completer_handle_brkchars_func_for_completer): Handle
8339 location_completer.
8340 (gdb_custom_word_point_brkchars)
8341 (gdb_org_rl_basic_quote_characters): New.
8342 (gdb_completion_word_break_characters_throw)
8343 (completion_find_completion_word): Handle trackers that use a
8344 custom word point.
8345 (completion_tracker::advance_custom_word_point_by): New.
8346 (completion_tracker::build_completion_result): Don't rely on
8347 readline appending the quote char.
8348 (gdb_rl_attempted_completion_function_throw): Handle trackers that
8349 use a custom word point.
8350 (gdb_rl_attempted_completion_function): Restore
8351 rl_basic_quote_characters.
8352 * completer.h (class completion_tracker): Extend intro comment.
8353 (completion_tracker::set_quote_char)
8354 (completion_tracker::quote_char)
8355 (completion_tracker::set_use_custom_word_point)
8356 (completion_tracker::use_custom_word_point)
8357 (completion_tracker::custom_word_point)
8358 (completion_tracker::set_custom_word_point)
8359 (completion_tracker::advance_custom_word_point_by)
8360 (completion_tracker::completes_to_completion_word)
8361 (completion_tracker::discard_completions): New methods.
8362 (completion_tracker::m_quote_char)
8363 (completion_tracker::m_use_custom_word_point)
8364 (completion_tracker::m_custom_word_point): New fields.
8365 (advance_to_expression_complete_word_point): Declare.
8366 * f-lang.c (f_collect_symbol_completion_matches): Add
8367 complete_symbol_mode parameter.
8368 * language.h (struct language_defn)
8369 <la_collect_symbol_completion_matches>: Add complete_symbol_mode
8370 parameter.
8371 * linespec.c (linespec_keywords): Add NULL terminator. Make extern.
8372 (linespec_complete_function): New function.
8373 (linespec_lexer_lex_keyword): Adjust.
8374 * linespec.h (linespec_keywords, linespec_complete_function): New
8375 declarations.
8376 * location.c (find_end_quote): New function.
8377 (explicit_location_lex_one): Add explicit_completion_info
8378 parameter. Save quoting info. Don't throw if being called for
8379 completion. Don't handle Ada operators here.
8380 (is_cp_operator, skip_op_false_positives, first_of)
8381 (explicit_location_lex_one_function): New function.
8382 (string_to_explicit_location): Replace 'dont_throw' parameter with
8383 an explicit_completion_info pointer parameter. Handle it. Don't
8384 use explicit_location_lex_one to lex function names. Use
8385 explicit_location_lex_one_function instead.
8386 * location.h (struct explicit_completion_info): New.
8387 (string_to_explicit_location): Replace 'dont_throw' parameter with
8388 an explicit_completion_info pointer parameter.
8389 * symtab.c (default_collect_symbol_completion_matches_break_on):
8390 Add complete_symbol_mode parameter. Handle LINESPEC mode.
8391 (default_collect_symbol_completion_matches)
8392 (collect_symbol_completion_matches): Add complete_symbol_mode
8393 parameter.
8394 (collect_symbol_completion_matches_type): Pass down
8395 complete_symbol_mode::EXPRESSION.
8396 (collect_file_symbol_completion_matches): Add complete_symbol_mode
8397 parameter. Handle LINESPEC mode.
8398 * symtab.h (complete_symbol_mode): New.
8399 (default_collect_symbol_completion_matches_break_on)
8400 (default_collect_symbol_completion_matches)
8401 (collect_symbol_completion_matches)
8402 (collect_file_symbol_completion_matches): Add complete_symbol_mode
8403 parameter.
8404
8405 2017-07-17 Pedro Alves <palves@redhat.com>
8406
8407 * utils.c (enum class strncmp_iw_mode): New.
8408 (strcmp_iw): Rename to ...
8409 (strncmp_iw_with_mode): ... this. Add string2_len and mode
8410 parameters. Handle them.
8411 (strncmp_iw): New.
8412 (strcmp_iw): Reimplement as wrapper around strncmp_iw_with_mode.
8413 * utils.h (strncmp_iw): Declare.
8414 (strcmp_iw): Move describing comments here.
8415
8416 2017-07-17 Pedro Alves <palves@redhat.com>
8417
8418 * c-exp.y (operator_stoken): Use CP_OPERATOR_LEN and
8419 CP_OPERATOR_STR.
8420 * c-typeprint.c (is_type_conversion_operator): Use
8421 CP_OPERATOR_STR.
8422 * cp-support.c (LENGTH_OF_OPERATOR): Delete.
8423 (cp_find_first_component_aux): Use CP_OPERATOR_STR and
8424 CP_OPERATOR_LEN.
8425 * cp-support.h (CP_OPERATOR_STR, CP_OPERATOR_LEN): New.
8426 * gnu-v2-abi.c (gnuv2_is_operator_name): Use CP_OPERATOR_STR.
8427 * gnu-v3-abi.c (gnuv3_is_operator_name): Use CP_OPERATOR_STR.
8428 * linespec.c (linespec_lexer_lex_string): Use CP_OPERATOR_LEN and
8429 CP_OPERATOR_STR.
8430 * location.c: Include "cp-support.h".
8431 (explicit_location_lex_one): Use CP_OPERATOR_LEN and
8432 CP_OPERATOR_STR.
8433 * symtab.c (operator_chars): Use CP_OPERATOR_STR and
8434 CP_OPERATOR_LEN.
8435
8436 2017-07-17 Pedro Alves <palves@redhat.com>
8437
8438 * cli/cli-cmds.c (complete_command): Use a completion tracker
8439 along with completion_find_completion_word for handle_brkchars
8440 phase.
8441 * completer.c (RL_QF_SINGLE_QUOTE, RL_QF_DOUBLE_QUOTE)
8442 (RL_QF_BACKSLASH, RL_QF_OTHER_QUOTE): New.
8443 (struct gdb_rl_completion_word_info): New.
8444 (gdb_rl_find_completion_word): New.
8445 (completion_find_completion_word): New.
8446 * completer.h (completion_find_completion_word): Declare.
8447
8448 2017-07-17 Pedro Alves <palves@redhat.com>
8449
8450 * ada-lang.c (symbol_completion_match): Adjust comments.
8451 (symbol_completion_add): Replace vector parameter with
8452 completion_tracker parameter. Use it.
8453 (ada_make_symbol_completion_list): Rename to...
8454 (ada_collect_symbol_completion_matches): ... this. Add
8455 completion_tracker parameter and use it.
8456 (ada_language_defn): Adjust.
8457 * break-catch-syscall.c (catch_syscall_completer): Adjust
8458 prototype and work with completion_tracker instead of VEC.
8459 * breakpoint.c (condition_completer): Adjust prototype and work
8460 with completion_tracker instead of VEC.
8461 * c-lang.c (c_language_defn, cplus_language_defn)
8462 (asm_language_defn, minimal_language_defn): Adjust to renames.
8463 * cli/cli-cmds.c (complete_command): Rework using
8464 completion_tracker. Catch exceptions when completing.
8465 * cli/cli-decode.c (integer_unlimited_completer)
8466 (complete_on_cmdlist, complete_on_enum): Adjust prototype and work
8467 with completion_tracker instead of VEC.
8468 * command.h (struct completion_tracker): Forward declare.
8469 (completer_ftype, completer_handle_brkchars_ftype): Change
8470 types.
8471 (complete_on_cmdlist, complete_on_enum): Adjust.
8472 * completer.c: Include <algorithm>.
8473 (struct gdb_completer_state): New.
8474 (current_completion): New global.
8475 (readline_line_completion_function): Delete.
8476 (noop_completer, filename_completer)
8477 (filename_completer_handle_brkchars, complete_files_symbols)
8478 (linespec_location_completer): Adjust to work with a
8479 completion_tracker instead of a VEC.
8480 (string_or_empty): New.
8481 (collect_explicit_location_matches): Adjust to work with a
8482 completion_tracker instead of a VEC.
8483 (explicit_location_completer): Rename to ...
8484 (complete_explicit_location): ... this and adjust to work with a
8485 completion_tracker instead of a VEC.
8486 (location_completer): Adjust to work with a completion_tracker
8487 instead of a VEC.
8488 (add_struct_fields): Adjust to work with a completion_list instead
8489 of VEC.
8490 (expression_completer): Rename to ...
8491 (complete_expression): ... this and adjust to work with a
8492 completion_tracker instead of a VEC. Use complete_files_symbols.
8493 (expression_completer): Reimplement on top of complete_expression.
8494 (symbol_completer): Adjust to work with a completion_tracker
8495 instead of a VEC.
8496 (enum complete_line_internal_reason): Add describing comments.
8497 (complete_line_internal_normal_command): Adjust to work with a
8498 completion_tracker instead of a VEC.
8499 (complete_line_internal): Rename to ...
8500 (complete_line_internal_1): ... this and adjust to work with a
8501 completion_tracker instead of a VEC. Assert TEXT is NULL in the
8502 handle_brkchars phase.
8503 (new_completion_tracker): Delete.
8504 (complete_line_internal): Reimplement as TRY/CATCH wrapper around
8505 complete_line_internal_1.
8506 (free_completion_tracker): Delete.
8507 (INITIAL_COMPLETION_HTAB_SIZE): New.
8508 (completion_tracker::completion_tracker)
8509 (completion_tracker::~completion_tracker): New.
8510 (maybe_add_completion): Delete.
8511 (completion_tracker::maybe_add_completion)
8512 (completion_tracker::add_completion)
8513 (completion_tracker::add_completions): New.
8514 (throw_max_completions_reached_error): Delete.
8515 (complete_line): Adjust to work with a completion_tracker instead
8516 of a VEC. Don't create a completion_tracker_t or check for max
8517 completions here.
8518 (command_completer, command_completer_handle_brkchars)
8519 (signal_completer, reg_or_group_completer_1)
8520 (reg_or_group_completer, default_completer_handle_brkchars):
8521 Adjust to work with a completion_tracker.
8522 (gdb_completion_word_break_characters_throw): New.
8523 (gdb_completion_word_break_characters): Reimplement.
8524 (line_completion_function): Delete.
8525 (completion_tracker::recompute_lowest_common_denominator)
8526 (expand_preserving_ws)
8527 (completion_tracker::build_completion_result)
8528 (completion_result::completion_result)
8529 (completion_result::completion_result)
8530 (completion_result::~completion_result)
8531 (completion_result::completion_result)
8532 (completion_result::release_match_list, compare_cstrings)
8533 (completion_result::sort_match_list)
8534 (completion_result::reset_match_list)
8535 (gdb_rl_attempted_completion_function_throw)
8536 (gdb_rl_attempted_completion_function): New.
8537 * completer.h (completion_list, struct completion_result)
8538 (class completion_tracker): New.
8539 (complete_line): Add completion_tracker parameter.
8540 (readline_line_completion_function): Delete.
8541 (gdb_rl_attempted_completion_function): New.
8542 (noop_completer, filename_completer, expression_completer)
8543 (location_completer, symbol_completer, command_completer)
8544 (signal_completer, reg_or_group_completer): Update prototypes.
8545 (completion_tracker_t, new_completion_tracker)
8546 (make_cleanup_free_completion_tracker): Delete.
8547 (enum maybe_add_completion_enum): Delete.
8548 (maybe_add_completion): Delete.
8549 (throw_max_completions_reached_error): Delete.
8550 * corefile.c (complete_set_gnutarget): Adjust to work with a
8551 completion_tracker instead of a VEC.
8552 * cp-abi.c (cp_abi_completer): Adjust to work with a
8553 completion_tracker instead of a VEC.
8554 * d-lang.c (d_language_defn): Adjust.
8555 * disasm.c (disassembler_options_completer): Adjust to work with a
8556 completion_tracker instead of a VEC.
8557 * f-lang.c (f_make_symbol_completion_list): Rename to ...
8558 (f_collect_symbol_completion_matches): ... this. Adjust to work
8559 with a completion_tracker instead of a VEC.
8560 (f_language_defn): Adjust.
8561 * go-lang.c (go_language_defn): Adjust.
8562 * guile/scm-cmd.c (cmdscm_add_completion, cmdscm_completer):
8563 Adjust to work with a completion_tracker instead of a VEC.
8564 * infrun.c (handle_completer): Likewise.
8565 * interps.c (interpreter_completer): Likewise.
8566 * interps.h (interpreter_completer): Likewise.
8567 * language.c (unknown_language_defn, auto_language_defn)
8568 (local_language_defn): Adjust.
8569 * language.h (language_defn::la_make_symbol_completion_list):
8570 Rename to ...
8571 (language_defn::la_collect_symbol_completion_matches): ... this
8572 and adjust to work with a completion_tracker instead of a VEC.
8573 * m2-lang.c (m2_language_defn): Adjust.
8574 * objc-lang.c (objc_language_defn): Adjust.
8575 * opencl-lang.c (opencl_language_defn): Adjust.
8576 * p-lang.c (pascal_language_defn): Adjust.
8577 * python/py-cmd.c (cmdpy_completer_helper): Handle NULL word.
8578 (cmdpy_completer_handle_brkchars, cmdpy_completer): Adjust to work
8579 with a completion_tracker.
8580 * rust-lang.c (rust_language_defn): Adjust.
8581 * symtab.c (free_completion_list, do_free_completion_list)
8582 (return_val, completion_tracker): Delete.
8583 (completion_list_add_name, completion_list_add_symbol)
8584 (completion_list_add_msymbol, completion_list_objc_symbol)
8585 (completion_list_add_fields, add_symtab_completions): Add
8586 completion_tracker parameter and use it.
8587 (default_make_symbol_completion_list_break_on_1): Rename to...
8588 (default_collect_symbol_completion_matches_break_on): ... this.
8589 Add completion_tracker parameter and use it instead of allocating
8590 a completion tracker here.
8591 (default_make_symbol_completion_list_break_on): Delete old
8592 implementation.
8593 (default_make_symbol_completion_list): Delete.
8594 (default_collect_symbol_completion_matches): New.
8595 (make_symbol_completion_list): Delete.
8596 (collect_symbol_completion_matches): New.
8597 (make_symbol_completion_type): Rename to ...
8598 (collect_symbol_completion_matches_type): ... this. Add
8599 completion_tracker parameter and use it instead of VEC.
8600 (make_file_symbol_completion_list_1): Rename to...
8601 (collect_file_symbol_completion_matches): ... this. Add
8602 completion_tracker parameter and use it instead of VEC.
8603 (make_file_symbol_completion_list): Delete.
8604 (add_filename_to_list): Use completion_list instead of a VEC.
8605 (add_partial_filename_data::list): Now a completion_list.
8606 (make_source_files_completion_list): Work with a completion_list
8607 instead of a VEC.
8608 * symtab.h: Include "completer.h".
8609 (default_make_symbol_completion_list_break_on)
8610 (default_make_symbol_completion_list, make_symbol_completion_list)
8611 (make_symbol_completion_type, make_file_symbol_completion_list)
8612 (make_source_files_completion_list): Delete.
8613 (default_collect_symbol_completion_matches_break_on)
8614 (default_collect_symbol_completion_matches)
8615 (collect_symbol_completion_matches)
8616 (collect_symbol_completion_matches_type)
8617 (collect_file_symbol_completion_matches)
8618 (make_source_files_completion_list): New.
8619 * top.c (init_main): Don't install a rl_completion_entry_function
8620 hook. Install a rl_attempted_completion_function hook instead.
8621 * tui/tui-layout.c (layout_completer): Adjust to work with a
8622 completion_tracker.
8623 * tui/tui-regs.c (tui_reggroup_completer):
8624 * tui/tui-win.c (window_name_completer, focus_completer)
8625 (winheight_completer): Adjust to work with a completion_tracker.
8626 * value.c: Include "completer.h".
8627 (complete_internalvar): Adjust to work with a completion_tracker.
8628 * value.h (complete_internalvar): Likewise.
8629
8630 2017-07-17 Pedro Alves <palves@redhat.com>
8631
8632 * cli/cli-decode.c (set_cmd_completer_handle_brkchars): Adjust to
8633 renames.
8634 * cli/cli-decode.h (struct cmd_list_element) <completer>: Move
8635 comments to completer_ftype's declaration.
8636 <completer_handle_brkchars>: Change type to
8637 completer_handle_brkchars_ftype.
8638 * command.h (completer_ftype): Add describing comment and give
8639 names to parameters.
8640 (completer_ftype_void): Rename to ...
8641 (completer_handle_brkchars_ftype) ... this. Add describing comment.
8642 (set_cmd_completer_handle_brkchars): Adjust.
8643 * completer.c (filename_completer_handle_brkchars): New function.
8644 (complete_line_internal_normal_command): New function, factored
8645 out from ...
8646 (complete_line_internal): ... here.
8647 (command_completer_handle_brkchars)
8648 (default_completer_handle_brkchars)
8649 (completer_handle_brkchars_func_for_completer): New functions.
8650 * completer.h (set_gdb_completion_word_break_characters): Delete
8651 declaration.
8652 (completer_handle_brkchars_func_for_completer): New declaration.
8653 * python/py-cmd.c (cmdpy_completer_handle_brkchars): Adjust to use
8654 completer_handle_brkchars_func_for_completer.
8655
8656 2017-07-17 Pedro Alves <palves@redhat.com>
8657
8658 * completer.c (symbol_completer): New function, based on
8659 make_symbol_completion_list_fn.
8660 * completer.h (symbol_completer): New declaration.
8661 * guile/scm-cmd.c (cmdscm_completers): Adjust.
8662 * python/py-cmd.c (completers): Adjust.
8663 * symtab.c (make_symbol_completion_list_fn): Delete.
8664 * symtab.h (make_symbol_completion_list_fn): Delete.
8665 * cli/cli-decode.c (add_cmd): Adjust.
8666
8667 2017-07-17 Pedro Alves <palves@redhat.com>
8668
8669 * Makefile.in (COMMON_OBS): Add filename-seen-cache.o.
8670 * dwarf2read.c: Include "filename-seen-cache.h".
8671 * dwarf2read.c (dwarf2_per_objfile) <filenames_cache>: New field.
8672 (dw2_map_symbol_filenames): Build and use a filenames_seen_cache.
8673 * filename-seen-cache.c: New file.
8674 * filename-seen-cache.h: New file.
8675 * symtab.c: Include "filename-seen-cache.h".
8676 (struct filename_seen_cache, INITIAL_FILENAME_SEEN_CACHE_SIZE)
8677 (create_filename_seen_cache, clear_filename_seen_cache)
8678 (delete_filename_seen_cache, filename_seen): Delete, parts moved
8679 to filename-seen-cache.h/filename-seen-cache.c.
8680 (output_source_filename, sources_info)
8681 (maybe_add_partial_symtab_filename)
8682 (make_source_files_completion_list): Adjust to use
8683 filename_seen_cache.
8684
8685 2017-07-17 Pedro Alves <palves@redhat.com>
8686
8687 * dwarf2read.c (dwarf2_per_objfile): In-class initialize all
8688 fields.
8689 (dwarf2_per_objfile::dwarf2_per_objfile(objfile*, const
8690 dwarf2_debug_sections*)): New.
8691 (dwarf2_per_objfile::dwarf2_per_objfile(const
8692 dwarf2_per_objfile&)): Declare as deleted.
8693 (dwarf2_per_objfile::operator=): Declare as deleted.
8694 (dwarf2_per_objfile::dwarf2_per_objfile)
8695 (dwarf2_per_objfile::~dwarf2_per_objfile)
8696 (dwarf2_per_objfile::free_cached_comp_units): New.
8697 (dwarf2_has_info): dwarf2_per_objfile initialization code moved to
8698 ctor. Call dwarf2_per_objfile's ctor manually.
8699 (dwarf2_locate_sections): Deleted/refactored as ...
8700 (dwarf2_per_objfile::locate_sections): ... this new method.
8701 (free_cached_comp_units): Defer to
8702 dwarf2_per_objfile::free_cached_comp_units.
8703 (dwarf2_free_objfile): Call dwarf2_per_objfile's dtor manually.
8704
8705 2017-07-14 Tom Tromey <tom@tromey.com>
8706
8707 PR rust/21764:
8708 * rust-exp.y (convert_ast_to_expression): Add "want_type"
8709 parameter.
8710 <UNOP_SIZEOF>: Split into separate case.
8711 <UNOP_VAR_VALUE>: Handle want_type. Add error case.
8712
8713 2017-07-14 Tom Tromey <tom@tromey.com>
8714
8715 PR rust/21763:
8716 * symtab.c (symbol_matches_domain): Add language_rust to special
8717 case.
8718 * rust-exp.y (convert_ast_to_expression) <OP_VAR_VALUE>: Don't
8719 treat LOC_TYPEDEF symbols as variables.
8720
8721 2017-07-14 Pedro Alves <palves@redhat.com>
8722
8723 * symtab.c (make_file_symbol_completion_list_1): Iterate over
8724 symtabs matching all symtabs with SRCFILE as file name instead of
8725 only considering the first hit, with lookup_symtab.
8726
8727 2017-07-14 Simon Marchi <simon.marchi@ericsson.com>
8728
8729 * ax-gdb.c (gen_aggregate_elt_ref): Remove operand_name and
8730 operator_name parameters.
8731 (gen_expr): Update function call.
8732
8733 2017-07-14 Simon Marchi <simon.marchi@ericsson.com>
8734
8735 * dwarf2loc.h (dwarf2_compile_expr_to_ax): Remove gdbarch
8736 parameter.
8737 * symtab.h (struct symbol_computed_ops::tracepoint_var_ref):
8738 Likewise.
8739 * dwarf2loc.c (dwarf2_compile_expr_to_ax): Remove gdbarch
8740 parameter, use agent_expr::gdbarch instead, update function
8741 calls.
8742 (locexpr_tracepoint_var_ref): Likewise.
8743 (loclist_tracepoint_var_ref): Likewise.
8744 * ax-gdb.c (gen_trace_static_fields): Likewise.
8745 (gen_traced_pop): Likewise.
8746 (gen_frame_args_address): Likewise.
8747 (gen_frame_locals_address): Likewise.
8748 (gen_var_ref): Likewise.
8749 (gen_struct_ref_recursive): Likewise.
8750 (gen_static_field): Likewise.
8751 (gen_maybe_namespace_elt): Likewise.
8752 (gen_expr): Likewise.
8753 (gen_trace_for_var): Likewise.
8754 (gen_trace_for_expr): Likewise.
8755 (gen_trace_for_return_address): Likewise.
8756
8757 2017-07-14 Simon Marchi <simon.marchi@ericsson.com>
8758
8759 * ax-gdb.c (gen_deref, gen_address_of): Remove unused ax
8760 parameter.
8761 (gen_struct_ref, gen_expr, gen_expr_binop_rest): Update call.
8762
8763 2017-07-14 Simon Marchi <simon.marchi@ericsson.com>
8764
8765 * ax-gdb.c (gen_usual_unary): Remove exp parameter, get gdbarch
8766 from ax, update calls.
8767 (gen_usual_arithmetic): Likewise.
8768 (gen_integral_promotions): Likewise.
8769 (gen_bitfield_ref): Likewise.
8770 (gen_primitive_field): Likewise.
8771 (gen_struct_ref_recursive): Likewise.
8772 (gen_struct_ref): Likewise.
8773 (gen_maybe_namespace_elt): Likewise.
8774 (gen_struct_elt_for_reference): Likewise.
8775 (gen_namespace_elt): Likewise.
8776 (gen_aggregate_elt_ref): Likewise.
8777 (gen_expr): Get gdbarch from ax, update calls.
8778 (gen_expr_binop_rest): Likewise.
8779
8780 2017-07-13 Pedro Alves <palves@redhat.com>
8781
8782 * amd64-darwin-tdep.c (x86_darwin_init_abi_64): Pass tdesc_amd64
8783 as default tdesc.
8784 * amd64-dicos-tdep.c (amd64_dicos_init_abi):
8785 * amd64-fbsd-tdep.c (amd64fbsd_init_abi):
8786 * amd64-linux-tdep.c (amd64_linux_init_abi): Pass
8787 tdesc_amd64_linux as default tdesc. Get final tdesc from the
8788 tdep.
8789 (amd64_x32_linux_init_abi): Pass tdesc_x32_linux as default tdesc.
8790 Get final tdesc from the tdep.
8791 * amd64-nbsd-tdep.c (amd64nbsd_init_abi): Pass tdesc_amd64 as
8792 default tdesc.
8793 * amd64-obsd-tdep.c (amd64obsd_init_abi): Likewise.
8794 * amd64-sol2-tdep.c (amd64_sol2_init_abi): Likewise.
8795 * amd64-tdep.c (amd64_init_abi): Add 'default_tdesc' parameter.
8796 Use it as default tdesc.
8797 (amd64_x32_init_abi): Add 'default_tdesc' parameter, and pass it
8798 down to amd_init_abi. No longer handle fallback tdesc here.
8799 * amd64-tdep.h (tdesc_x32): Declare.
8800 (amd64_init_abi, amd64_x32_init_abi): Add 'default_tdesc'
8801 parameter.
8802 * amd64-windows-tdep.c (amd64_windows_init_abi): Pass tdesc_amd64
8803 as default tdesc.
8804
8805 2017-07-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
8806
8807 * s390-linux-tdep.c (s390_process_record): Add support for
8808 instructions new in arch12.
8809
8810 2017-07-11 John Baldwin <jhb@FreeBSD.org>
8811
8812 * amd64-bsd-nat.c (amd64bsd_fetch_inferior_registers): Use
8813 PT_GETFSBASE and PT_GETGSBASE.
8814 (amd64bsd_store_inferior_registers): Use PT_SETFSBASE and
8815 PT_SETGSBASE.
8816
8817 2017-07-11 John Baldwin <jhb@FreeBSD.org>
8818
8819 * features/Makefile (amd64.dat, amd64-avx.dat, amd64-mpx.dat)
8820 (amd64-avx-mpx.dat, amd64-avx-avx512.dat)
8821 (amd64-avx-mpx-avx512-pku.dat): Add i386/64bit-segments.xml in
8822 those rules.
8823 * features/i386/amd64-avx-avx512.xml: Add 64bit-segments.xml.
8824 * features/i386/amd64-avx-mpx-avx512-pku.xml: Add 64bit-segments.xml.
8825 * features/i386/amd64-avx-mpx.xml: Add 64bit-segments.xml.
8826 * features/i386/amd64-avx.xml: Add 64bit-segments.xml.
8827 * features/i386/amd64-mpx.xml: Add 64bit-segments.xml.
8828 * features/i386/amd64.xml: Add 64bit-segments.xml.
8829 * features/i386/amd64-avx-avx512.c: Regenerated.
8830 * features/i386/amd64-avx-mpx-avx512-pku.c: Regenerated.
8831 * features/i386/amd64-avx-mpx.c: Regenerated.
8832 * features/i386/amd64-avx.c: Regenerated.
8833 * features/i386/amd64-mpx.c: Regenerated.
8834 * features/i386/amd64.c: Regenerated.
8835 * regformats/i386/amd64-avx-avx512.dat: Regenerated.
8836 * regformats/i386/amd64-avx-mpx-avx512-pku.dat: Regenerated.
8837 * regformats/i386/amd64-avx-mpx.dat: Regenerated.
8838 * regformats/i386/amd64-avx.dat: Regenerated.
8839 * regformats/i386/amd64-mpx.dat: Regenerated.
8840 * regformats/i386/amd64.dat: Regenerated.
8841
8842 2017-07-10 Yao Qi <yao.qi@linaro.org>
8843
8844 * features/i386/amd64-avx-avx512-linux.c: Re-generated.
8845 * features/i386/amd64-avx-mpx-avx512-pku-linux.c: Re-generated.
8846
8847 2017-07-10 Anton Kolesov <Anton.Kolesov@synopsys.com>
8848
8849 * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add setenv and
8850 unsetenv.
8851 * gnulib/aclocal.m4: Regenerate.
8852 * gnulib/config.in: Regenerate.
8853 * gnulib/configure: Regenerate.
8854 * gnulib/import/Makefile.am: Regenerate.
8855 * gnulib/import/Makefile.in: Regenerate.
8856 * gnulib/import/m4/gnulib-cache.m4: Regenerate.
8857 * gnulib/import/m4/gnulib-comp.m4: Regenerate.
8858 * gnulib/import/m4/environ.m4: New file.
8859 * gnulib/import/m4/setenv.m4: New file.
8860 * gnulib/import/setenv.c: New file.
8861 * gnulib/import/unsetenv.c: New file.
8862
8863 2017-07-09 Simon Marchi <simon.marchi@ericsson.com>
8864
8865 * compile/compile-loc2c.c (do_compile_dwarf_expr_to_c): Read
8866 address when op is DW_OP_addr.
8867
8868 2017-07-09 Tom Tromey <tom@tromey.com>
8869
8870 * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Reverse size
8871 check and apply to outer type.
8872
8873 2017-07-07 John Baldwin <jhb@FreeBSD.org>
8874
8875 * fbsd-tdep.c (LWPINFO_OFFSET, LWPINFO_PL_FLAGS)
8876 (LWPINFO64_PL_SIGINFO, LWPINFO32_PL_SIGINFO, PL_FLAG_SI)
8877 (SIZE64_SIGINFO_T, SIZE32_SIGINFO_T, fbsd_core_xfer_siginfo): New.
8878 (fbsd_init_abi): Install gdbarch "core_xfer_siginfo" method.
8879
8880 2017-07-07 John Baldwin <jhb@FreeBSD.org>
8881
8882 * fbsd-tdep.c (fbsd_core_thread_name): Use thread_section_name.
8883
8884 2017-07-07 John Baldwin <jhb@FreeBSD.org>
8885
8886 * corelow.c (get_core_siginfo): Remove.
8887 (core_xfer_partial): Use the gdbarch "core_xfer_siginfo" method
8888 instead of get_core_siginfo.
8889 * gdbarch.sh (core_xfer_siginfo): New gdbarch callback.
8890 * gdbarch.h: Re-generate.
8891 * gdbarch.c: Re-generate.
8892 * linux-tdep.c (linux_core_xfer_siginfo): New.
8893 (linux_init_abi): Install gdbarch "core_xfer_siginfo" method.
8894
8895 2017-07-07 John Baldwin <jhb@FreeBSD.org>
8896
8897 * corelow.c (thread_section_name): Move to ...
8898 * gdbcore.h (thread_section_name): ... here.
8899
8900 2017-07-07 John Baldwin <jhb@FreeBSD.org>
8901
8902 * fbsd-nat.c [PT_LWPINFO && __LP64__] (union sigval32)
8903 (struct siginfo32): New.
8904 [PT_LWPINFO] (fbsd_siginfo_size, fbsd_convert_siginfo): New.
8905 (fbsd_xfer_partial) [PT_LWPINFO]: Handle TARGET_OBJECT_SIGNAL_INFO
8906 via ptrace(PT_LWPINFO).
8907
8908 2017-07-07 John Baldwin <jhb@FreeBSD.org>
8909
8910 * fbsd-tdep.c (fbsd_gdbarch_data_handle, struct fbsd_gdbarch_data)
8911 (init_fbsd_gdbarch_data, get_fbsd_gdbarch_data)
8912 (fbsd_get_siginfo_type): New.
8913 (fbsd_init_abi): Install gdbarch "get_siginfo_type" method.
8914 (_initialize_fbsd_tdep): New.
8915
8916 2017-07-06 David Blaikie <dblaikie@gmail.com>
8917
8918 * dwarf2read.c (struct dwo_file): Use a htab of dwo_unit* (rather than
8919 a singular dwo_unit*) to support multiple CUs in the same way that
8920 multiple TUs are supported.
8921 (create_cus_hash_table): Replace create_dwo_cu with a function for
8922 parsing multiple CUs from a DWO file.
8923 (open_and_init_dwo_file): Use create_cus_hash_table rather than
8924 create_dwo_cu.
8925 (lookup_dwo_cutu): Lookup CU in the hash table in the dwo_file with
8926 htab_find, rather than comparing the signature to a singleton CU in
8927 the dwo_file.
8928
8929 2017-07-06 Pedro Alves <palves@redhat.com>
8930
8931 * python/py-unwind.c (pyuw_dealloc_cache): Fix for loop condition.
8932
8933 2017-07-04 Pedro Alves <palves@redhat.com>
8934
8935 * gdbtypes.c (recursive_dump_type): Don't reference TYPE_STATIC.
8936 * gdbtypes.h (TYPE_STATIC): Delete.
8937 (struct fn_field) <is_public, is_abstract, is_static, is_final,
8938 is_synchronized, is_native>: Delete.
8939 <dummy>: Bump.
8940 (TYPE_FN_FIELD_PUBLIC, TYPE_FN_FIELD_STATIC, TYPE_FN_FIELD_FINAL)
8941 (TYPE_FN_FIELD_SYNCHRONIZED, TYPE_FN_FIELD_NATIVE)
8942 (TYPE_FN_FIELD_ABSTRACT): Delete.
8943
8944 2017-07-03 Simon Marchi <simon.marchi@ericsson.com>
8945
8946 * buffer.h (buffer_finish): Fix spelling mistakes.
8947
8948 2017-07-01 Eli Zaretskii <eliz@gnu.org>
8949
8950 * .dir-locals.el: Automatically switch to C-style comments in
8951 versions of Emacs that support the feature.
8952
8953 2017-06-30 Sergio Durigan Junior <sergiodj@redhat.com>
8954 Pedro Alves <palves@redhat.com>
8955
8956 PR cli/21688
8957 * cli/cli-script.c (command_name_equals_not_inline): Remove function.
8958 (process_next_line): New variable 'inline_cmd'.
8959 Adjust 'if' clauses for "python", "compile" and "guile" to use
8960 'command_name_equals' and check for '!inline_cmd'.
8961
8962 2017-06-30 Sergio Durigan Junior <sergiodj@redhat.com>
8963
8964 PR cli/21688
8965 * cli/cli-script.c (command_name_equals_not_inline): New function.
8966 (process_next_line): Adjust 'if' clauses for "python", "compile"
8967 and "guile" to use command_name_equals_not_inline.
8968
8969 2017-06-29 Pedro Alves <palves@redhat.com>
8970
8971 * completer.c (expression_completer): Call
8972 linespec_location_completer instead of location_completer.
8973
8974 2017-06-29 Pedro Alves <palves@redhat.com>
8975
8976 * completer.c (expression_completer): Remove code that recomputes
8977 'text' from 'word'.
8978
8979 2017-06-29 Yao Qi <yao.qi@linaro.org>
8980
8981 * regformats/regdat.sh: Generate code with
8982 "ifndef IN_PROCESS_AGENT".
8983
8984 2017-06-28 Pedro Alves <palves@redhat.com>
8985
8986 * command.h: Include "common/scoped_restore.h".
8987
8988 2017-06-28 Yao Qi <yao.qi@linaro.org>
8989
8990 * mi/mi-cmd-break.c (mi_argv_to_format): Use obstack_grow_str
8991 instead of obstack_grow.
8992
8993 2017-06-28 Doug Gilmore <Doug.Gilmore@imgtec.com>
8994
8995 PR gdb/21337
8996 * symfile.c (reread_symbols): Call objfiles_changed just before
8997 read_symbols.
8998
8999 2017-06-27 Pedro Alves <palves@redhat.com>
9000
9001 * symtab.c (COMPLETION_LIST_ADD_SYMBOL)
9002 (MCOMPLETION_LIST_ADD_SYMBOL): Delete macros, replace with ...
9003 (completion_list_add_symbol, completion_list_add_msymbol):
9004 ... these new functions.
9005 (add_symtab_completions)
9006 (default_make_symbol_completion_list_break_on_1): Adjust.
9007
9008 2017-06-27 Pedro Alves <palves@redhat.com>
9009
9010 * objfiles.c (get_objfile_bfd_data): Call bfd_alloc instead of
9011 bfd_zalloc. Call objfile_per_bfd_storage's ctor.
9012 (free_objfile_per_bfd_storage): Call objfile_per_bfd_storage's
9013 dtor.
9014 * objfiles.h (objfile_per_bfd_storage): Add ctor. Make
9015 'storage_obstack' field an auto_obstack. In-class initialize all
9016 non-bitfield fields. Make minsyms_read bool.
9017 * symfile.c (read_symbols): Adjust.
9018
9019 2017-06-27 Alan Hayward <alan.hayward@arm.com>
9020
9021 * remote-sim.c (gdbsim_fetch_register): Use byte_vector.
9022 (gdbsim_store_register): Likewise.
9023
9024 2017-06-27 Pedro Alves <palves@redhat.com>
9025
9026 * c-exp.y (name_obstack): Now an auto_obstack.
9027 (yylex): Use auto_obstack::clear.
9028 (c_parse): Use auto_obstack::clear instead of reinitializing and
9029 freeing the obstack.
9030 * c-lang.c (evaluate_subexp_c): Use auto_obstack.
9031 * d-exp.y (name_obstack): Now an auto_obstack.
9032 (yylex): Use auto_obstack::clear.
9033 (d_parse): Use auto_obstack::clear instead of reinitializing and
9034 freeing the obstack.
9035 * dwarf2loc.c (fetch_const_value_from_synthetic_pointer): Use
9036 auto_obstack.
9037 * dwarf2read.c (create_addrmap_from_index)
9038 (dwarf2_build_psymtabs_hard)
9039 (update_enumeration_type_from_children): Likewise.
9040 * gdb_obstack.h (auto_obstack): New type.
9041 * go-exp.y (name_obstack): Now an auto_obstack.
9042 (build_packaged_name): Use auto_obstack::clear.
9043 (go_parse): Use auto_obstack::clear instead of reinitializing and
9044 freeing the obstack.
9045 * linux-tdep.c (linux_make_mappings_corefile_notes): Use
9046 auto_obstack.
9047 * printcmd.c (printf_wide_c_string, ui_printf): Use auto_obstack.
9048 * rust-exp.y (work_obstack): Now an auto_obstack.
9049 (rust_parse, rust_lex_tests): Use auto_obstack::clear instead of
9050 reinitializing and freeing the obstack.
9051 * utils.c (do_obstack_free, make_cleanup_obstack_free): Delete.
9052 (host_char_to_target): Use auto_obstack.
9053 * utils.h (make_cleanup_obstack_free): Delete declaration.
9054 * valprint.c (generic_emit_char, generic_printstr): Use
9055 auto_obstack.
9056
9057 2017-06-27 Simon Marchi <simon.marchi@ericsson.com>
9058
9059 * darwin-nat.c (darwin_check_new_threads): Don't handle dummy
9060 thread.
9061 (darwin_init_thread_list): Don't update dummy thread.
9062 (darwin_create_inferior, darwin_attach): Don't add a dummy thread.
9063
9064 2017-06-26 Simon Marchi <simon.marchi@ericsson.com>
9065
9066 * record-full.c (netorder16): Remove.
9067
9068 2017-06-26 Simon Marchi <simon.marchi@ericsson.com>
9069
9070 * common/diagnostics.h: Define macros for GCC.
9071 (DIAGNOSTIC_IGNORE_UNUSED_FUNCTION): New macro.
9072 * common/vec.h: Include diagnostics.h.
9073 (DIAGNOSTIC_IGNORE_UNUSED_VEC_FUNCTION): New macro.
9074 (DEF_VEC_I, DEF_VEC_P, DEF_VEC_O): Ignore -Wunused-function
9075 warning.
9076
9077 2017-06-26 Simon Marchi <simon.marchi@ericsson.com>
9078
9079 * common/diagnostics.h (DIAGNOSTIC_IGNORE_DEPRECATED_REGISTER):
9080 New macro.
9081 * ada-lex.l: Ignore deprecated register warnings.
9082
9083 2017-06-25 Simon Marchi <simon.marchi@ericsson.com>
9084
9085 * main.c (get_init_files): Replace "SYSTEM_GDBINIT +
9086 datadir_len" with "&SYSTEM_GDBINIT[datadir_len]".
9087
9088 2017-06-25 Simon Marchi <simon.marchi@ericsson.com>
9089
9090 * dtrace-probe.c (dtrace_process_dof_probe): Put semi-colon on
9091 its own line.
9092
9093 2017-06-25 Simon Marchi <simon.marchi@ericsson.com>
9094
9095 * nat/x86-dregs.c (x86_show_dr): Print registers one per line.
9096
9097 2017-06-23 Alan Hayward <alan.hayward@arm.com>
9098
9099 * xtensa-tdep.c (XTENSA_MAX_REGISTER_SIZE): Add.
9100 (xtensa_register_write_masked): Use XTENSA_MAX_REGISTER_SIZE.
9101 (xtensa_register_read_masked): Likewise.
9102
9103 2017-06-22 Sergio Durigan Junior <sergiodj@redhat.com>
9104
9105 * common/environ.c (gdb_environ::unset): Update comment.
9106
9107 2017-06-22 Alan Hayward <alan.hayward@arm.com>
9108
9109 * python/py-unwind.c (pyuw_sniffer): Allocate space for
9110 registers.
9111
9112 2017-06-22 Alan Hayward <alan.hayward@arm.com>
9113
9114 * record-full.c (record_full_exec_insn): Use byte_vector.
9115
9116 2017-06-22 Yao Qi <yao.qi@linaro.org>
9117
9118 * regformats/i386/amd64-avx-mpx-avx512-pku-linux.dat: Regenerated.
9119 * regformats/i386/amd64-avx-mpx-avx512-pku.dat: Regenerated.
9120
9121 2017-06-22 Alan Hayward <alan.hayward@arm.com>
9122
9123 * remote.c (cached_reg): Move from here...
9124 * regcache.h (cached_reg): ...to here.
9125 * python/py-unwind.c (struct reg_info): Remove.
9126 (cached_frame_info): Use cached_reg_t.
9127 (pyuw_prev_register): Likewise.
9128 (pyuw_sniffer): Use cached_reg_t and allocate registers.
9129 (pyuw_dealloc_cache): Free all registers.
9130
9131 2017-06-22 Pedro Alves <palves@redhat.com>
9132 Simon Marchi <simon.marchi@ericsson.com>
9133
9134 * unittests/environ-selftests.c (run_tests): Ignore -Wself-move
9135 warning.
9136 * common/diagnostics.h: New file.
9137
9138 2017-06-22 Pedro Alves <palves@redhat.com>
9139
9140 * common/agent.h: Add include guards.
9141
9142 2017-06-21 Simon Marchi <simon.marchi@ericsson.com>
9143
9144 * target.h (struct target_ops) <to_xfer_partial>: Update doc to
9145 talk about addressable units instead of bytes.
9146
9147 2017-06-20 Sergio Durigan Junior <sergiodj@redhat.com>
9148
9149 * common/environ.c (gdb_environ::unset): Use '::iterator' instead
9150 of '::const_iterator'.
9151
9152 2017-06-20 Sergio Durigan Junior <sergiodj@redhat.com>
9153
9154 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
9155 'unittests/environ-selftests.c'.
9156 (SUBDIR_UNITTESTS_OBS): Add 'environ-selftests.o'.
9157 * charset.c (find_charset_names): Declare object 'iconv_env'.
9158 Update code to use 'iconv_env' object. Remove call to
9159 'free_environ'.
9160 * common/environ.c: Include <utility>.
9161 (make_environ): Delete function.
9162 (free_environ): Delete function.
9163 (gdb_environ::clear): New function.
9164 (gdb_environ::operator=): New function.
9165 (gdb_environ::get): Likewise.
9166 (environ_vector): Delete function.
9167 (set_in_environ): Delete function.
9168 (gdb_environ::set): New function.
9169 (unset_in_environ): Delete function.
9170 (gdb_environ::unset): New function.
9171 (gdb_environ::envp): Likewise.
9172 * common/environ.h: Include <vector>.
9173 (struct gdb_environ): Delete; transform into...
9174 (class gdb_environ): ... this class.
9175 (free_environ): Delete prototype.
9176 (init_environ, get_in_environ, set_in_environ, unset_in_environ,
9177 environ_vector): Likewise.
9178 * infcmd.c (run_command_1): Update code to call
9179 'envp' from 'gdb_environ' class.
9180 (environment_info): Update code to call methods from 'gdb_environ'
9181 class.
9182 (unset_environment_command): Likewise.
9183 (path_info): Likewise.
9184 (path_command): Likewise.
9185 * inferior.c (inferior::~inferior): Delete call to 'free_environ'.
9186 (inferior::inferior): Initialize 'environment' using the host's
9187 information.
9188 * inferior.h: Remove forward declaration of 'struct gdb_environ'.
9189 Include "environ.h".
9190 (class inferior) <environment>: Change type from 'struct
9191 gdb_environ' to 'gdb_environ'.
9192 * mi/mi-cmd-env.c (mi_cmd_env_path): Update code to call
9193 methods from 'gdb_environ' class.
9194 * solib.c (solib_find_1): Likewise
9195 * unittests/environ-selftests.c: New file.
9196
9197 2017-06-20 Yao Qi <yao.qi@linaro.org>
9198
9199 * features/i386/i386-linux.xml: Exchange the order of including
9200 32bit-linux.xml and 32bit-sse.xml.
9201 * features/i386/i386-linux.c: Regenerated.
9202
9203 2017-06-20 Yao Qi <yao.qi@linaro.org>
9204
9205 * target-descriptions.c (tdesc_reg): Add ctor, dtor.
9206 Delete copy ctor and assignment operator.
9207 (tdesc_type): Likewise.
9208 (tdesc_feature): Likewise.
9209 (tdesc_free_reg): Remove.
9210 (tdesc_create_reg): Use new.
9211 (tdesc_free_type): Remove.
9212 (tdesc_create_vector): Use new.
9213 (tdesc_create_union): Likewise.
9214 (tdesc_create_flags): Likewise.
9215 (tdesc_create_enum): Likewise.
9216 (tdesc_free_feature): Delete.
9217 (free_target_description): Use delete.
9218
9219 2017-06-19 John Baldwin <jhb@FreeBSD.org>
9220
9221 * mips-tdep.c (print_gp_register_row): Don't error for unavailable
9222 registers.
9223
9224 2017-06-19 Pedro Alves <palves@redhat.com>
9225
9226 * dwarf2read.c (write_psymtabs_to_index): Construct file_closer
9227 after gdb::unlinker.
9228
9229 2017-06-19 Sergio Durigan Junior <sergiodj@redhat.com>
9230
9231 * mi/mi-cm-env.c (_initialize_mi_cmd_env): Use getenv instead of
9232 gdb_environ to access an environment variable.
9233
9234 2017-06-18 Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
9235
9236 * nat/linux-ptrace.c (linux_fork_to_function): Add cast to
9237 gdb_byte*.
9238
9239 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
9240
9241 * nat/fork-inferior.h (trace_start_error): Add ATTRIBUTE_PRINTF.
9242
9243 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
9244
9245 * configure: Re-generate.
9246 * warning.m4 (build_warnings): Add -Wno-mismatched-tags.
9247
9248 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
9249
9250 * configure: Re-generate.
9251 * warning.m4: Pass -Werror to compiler when checking for
9252 supported warning flags.
9253
9254 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
9255
9256 * Makefile.in (COMPILE.pre): Add "-x c++".
9257
9258 2017-06-16 Alan Hayward <alan.hayward@arm.com>
9259 Pedro Alves <palves@redhat.com>
9260 Yao Qi <yao.qi@linaro.org>
9261
9262 * defs.h (RequireLongest): New.
9263 (extract_integer): Declare function template.
9264 (extract_signed_integer): Remove the declaration, but define it
9265 static inline.
9266 (extract_unsigned_integer): Likewise.
9267 (store_integer): Declare function template.
9268 (store_signed_integer): Remove the declaration, but define it
9269 static inline.
9270 (store_unsigned_integer): Likewise.
9271 * findvar.c (extract_integer): New function template.
9272 (extract_signed_integer): Remove.
9273 (extract_unsigned_integer): Remove.
9274 (extract_integer<LONGEST>, extract_integer<ULONGEST>): Explicit
9275 instantiations.
9276 (store_integer): New function template.
9277 (store_signed_integer): Remove.
9278 (store_unsigned_integer): Remove.
9279 (store_integer): Explicit instantiations.
9280 * regcache.c (regcache_raw_read_signed): Update.
9281 (regcache::raw_read): New function.
9282 (regcache::raw_read_signed): Remove.
9283 (regcache::raw_read_unsigned): Remove.
9284 (regcache_raw_read_unsigned): Update.
9285 (regcache_raw_write_unsigned): Update.
9286 (regcache::raw_write_signed): Remove.
9287 (regcache::raw_write): New function.
9288 (regcache_cooked_read_signed): Update.
9289 (regcache::raw_write_unsigned): Remove.
9290 (regcache::cooked_read_signed): Remove.
9291 (regcache_cooked_read_unsigned): Update.
9292 (regcache::cooked_read_unsigned): Remove.
9293 (regcache_cooked_write_signed): Update.
9294 (regcache_cooked_write_unsigned): Update.
9295 * regcache.h (regcache) <raw_read_signed>: Remove.
9296 <raw_write_signed, raw_read_unsigned, raw_write_unsigned>: Remove.
9297 <raw_read, raw_write>: New.
9298 <cooked_read_signed, cooked_write_signed>: Remove.
9299 <cooked_write_unsigned, cooked_read_unsigned>: Remove.
9300 <cooked_read, cooked_write>: New.
9301 * sh64-tdep.c (sh64_pseudo_register_read): Update.
9302 (sh64_pseudo_register_write): Update.
9303
9304 2017-06-16 Anton Kolesov <anton.kolesov@synopsys.com>
9305
9306 * arc-tdep.c (arc_disassembler_options): New variable.
9307 (arc_gdbarch_init): Set and use it. Use arc_delayed_print_insn instead
9308 of default_print_insn.
9309 (arc_delayed_print_insn): Set info->section when needed,
9310 use default_print_insn to retrieve a disassembler.
9311
9312 2017-06-14 Sergio Durigan Junior <sergiodj@redhat.com>
9313
9314 PR gdb/21574
9315 * infcmd.c (_initialize_infcmd): Expand "help run" documentation
9316 to mention $SHELL and startup-with-shell.
9317
9318 2017-06-14 Max Filippov <jcmvbkbc@gmail.com>
9319
9320 * MAINTAINERS: Move Maxim Grigoriev to the Past Maintainers.
9321
9322 2017-06-14 Yao Qi <yao.qi@linaro.org>
9323
9324 * aarch64-tdep.c (aarch64_gdb_print_insn): Call
9325 default_print_insn instead of print_insn_aarch64.
9326 * arm-tdep.c (gdb_print_insn_arm): Call
9327 default_print_insn instead of print_insn_big_arm
9328 and print_insn_little_arm.
9329 * i386-tdep.c (i386_print_insn): Call default_print_insn
9330 instead of print_insn_i386.
9331 * ia64-tdep.c (ia64_print_insn): Call
9332 default_print_insn instead of print_insn_ia64.
9333 * mips-tdep.c (gdb_print_insn_mips): Call
9334 default_print_insn instead of print_insn_big_mips
9335 and print_insn_little_mips.
9336 * spu-tdep.c (gdb_print_insn_spu): Call default_print_insn
9337 instead of print_insn_spu.
9338
9339 2017-06-14 Pedro Alves <palves@redhat.com>
9340
9341 * ada-lang.c: Include "common/byte-vector.h".
9342 (ada_value_primitive_packed_val): Use gdb::byte_vector.
9343 * charset.c (wchar_iterator::iterate): Resize the vector instead
9344 of reserving it.
9345 * common/byte-vector.h: Include "common/def-vector.h".
9346 (wchar_iterator::m_out): Now a gdb::def_vector<gdb_wchar_t>.
9347 * cli/cli-dump.c: Include "common/byte-vector.h".
9348 (dump_memory_to_file, restore_binary_file): Use gdb::byte_vector.
9349 * common/byte-vector.h: New file.
9350 * common/def-vector.h: New file.
9351 * common/default-init-alloc.h: New file.
9352 * dwarf2loc.c: Include "common/byte-vector.h".
9353 (rw_pieced_value): Use gdb::byte_vector, and resize the vector
9354 instead of reserving it.
9355 * dwarf2read.c: Include "common/byte-vector.h".
9356 (data_buf::m_vec): Now a gdb::byte_vector.
9357 * gdb_regex.c: Include "common/def-vector.h".
9358 (compiled_regex::compiled_regex): Use gdb::def_vector<char>.
9359 * mi/mi-main.c: Include "common/byte-vector.h".
9360 (mi_cmd_data_read_memory): Use gdb::byte_vector.
9361 * printcmd.c: Include "common/byte-vector.h".
9362 (print_scalar_formatted): Use gdb::byte_vector.
9363 * valprint.c: Include "common/byte-vector.h".
9364 (maybe_negate_by_bytes, print_decimal_chars): Use
9365 gdb::byte_vector.
9366
9367 2017-06-13 Simon Marchi <simon.marchi@ericsson.com>
9368
9369 * darwin-nat.c: Include "nat/fork-inferior.h".
9370
9371 2017-06-13 Simon Marchi <simon.marchi@ericsson.com>
9372
9373 * configure.nat: Factor out Darwin bits that are not
9374 architecture-specific. Add fork-inferior.o.
9375
9376 2017-06-13 Simon Marchi <simon.marchi@ericsson.com>
9377
9378 * configure.nat: Factor out AIX bits that are not
9379 architecture-specific. Add fork-inferior.o.
9380
9381 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
9382
9383 * dwarf2loc.c (rw_pieced_value): New. Merge logic from...
9384 (read_pieced_value, write_pieced_value): ...here. Reduce to
9385 wrappers that just call rw_pieced_value.
9386
9387 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
9388
9389 * dwarf2loc.c (write_pieced_value): When writing the data for a
9390 memory piece, use write_memory_with_notification instead of
9391 write_memory.
9392
9393 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
9394
9395 * valops.c (read_value_memory): Change embedded_offset to
9396 represent a bit offset instead of a byte offset.
9397 * value.h (read_value_memory): Adjust comment.
9398
9399 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
9400
9401 * dwarf2loc.c (read_pieced_value): Remove unnecessary variables
9402 dest_offset_bits and source_offset_bits.
9403 (write_pieced_value): Likewise.
9404
9405 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
9406
9407 * dwarf2loc.c (read_pieced_value): Respect the piece offset, as
9408 given by DW_OP_bit_piece.
9409 (write_pieced_value): Likewise.
9410
9411 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
9412
9413 * dwarf2loc.c (read_pieced_value): Move the buffer allocation and
9414 some other preparations to the places where sufficient information
9415 is available.
9416 (write_pieced_value): Likewise.
9417
9418 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
9419
9420 * dwarf2loc.c (bits_to_bytes): New function.
9421 (read_pieced_value): Fix offset calculations for register pieces
9422 on big-endian targets.
9423 (write_pieced_value): Likewise.
9424
9425 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
9426
9427 * dwarf2loc.c (read_pieced_value): Remove buffer_size variable.
9428 (write_pieced_value): Likewise.
9429
9430 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
9431
9432 * dwarf2loc.c (write_pieced_value): When writing to a bit-field,
9433 transfer the source value's least significant bits, instead of its
9434 lowest-addressed ones. Rename type_len to max_offset.
9435 (read_pieced_value): Mirror above changes to write_pieced_value as
9436 applicable.
9437
9438 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
9439
9440 * dwarf2loc.c (write_pieced_value): In DWARF_VALUE_MEMORY,
9441 truncate full bytes from dest_offset_bits before using it as an
9442 offset into the buffer.
9443
9444 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
9445
9446 * dwarf2loc.c (write_pieced_value): Include transfer size in
9447 byte-wise check.
9448
9449 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
9450
9451 * dwarf2loc.c (write_pieced_value): Fix copy/paste error in the
9452 calculation of this_size.
9453
9454 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
9455
9456 * dwarf2loc.c (read_pieced_value): Respect parent value's offset
9457 when targeting a bit-field.
9458 (write_pieced_value): Likewise.
9459
9460 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
9461
9462 * dwarf2loc.c (struct piece_closure) <addr_size>: Remove field.
9463 (allocate_piece_closure): Drop addr_size parameter.
9464 (dwarf2_evaluate_loc_desc_full): Adjust call to
9465 allocate_piece_closure.
9466
9467 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
9468
9469 PR gdb/21226
9470 * dwarf2loc.c (read_pieced_value): Anchor stack value pieces at
9471 the LSB end, independent of endianness.
9472
9473 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
9474
9475 * dwarf2loc.c (write_pieced_value): Fix order of calculations for
9476 size capping.
9477
9478 2017-06-13 Yao Qi <yao.qi@linaro.org>
9479
9480 * mips-linux-nat.c: Move include features/mips*-linux.c to
9481 mips-linux-tdep.c.
9482 (_initialize_mips_linux_nat): Move initialize_tdesc_mips* calls
9483 to mips-linux-tdep.c.
9484 * mips-linux-tdep.c: Include features/mips*-linux.c
9485 (_initialize_mips_linux_tdep): Call initialize_tdesc_mips*
9486 functions.
9487 * mips-linux-tdep.h (tdesc_mips_linux): Declare.
9488 (tdesc_mips_dsp_linux, tdesc_mips64_linux): Declare.
9489 (tdesc_mips64_dsp_linux): Declare.
9490
9491 2017-06-12 Tom Tromey <tom@tromey.com>
9492
9493 * valprint.h (val_print_type_code_int): Remove.
9494 * valprint.c (generic_val_print_int): Always call
9495 val_print_scalar_formatted.
9496 (val_print_type_code_int): Remove.
9497 * printcmd.c (print_scalar_formatted): Handle options->format==0.
9498 * f-valprint.c (f_val_print): Use val_print_scalar_formatted.
9499 * c-valprint.c (c_val_print_int): Use val_print_scalar_formatted.
9500 * ada-valprint.c (ada_val_print_num): Use
9501 val_print_scalar_formatted.
9502
9503 2017-06-12 Tom Tromey <tom@tromey.com>
9504
9505 * printcmd.c (print_scalar_formatted): Unify the two switches.
9506 Don't convert scalars to LONGEST.
9507
9508 2017-06-12 Tom Tromey <tom@tromey.com>
9509
9510 PR exp/16225:
9511 * valprint.h (print_decimal_chars): Update.
9512 * valprint.c (maybe_negate_by_bytes): New function.
9513 (print_decimal_chars): Add "is_signed" argument.
9514 * printcmd.c (print_scalar_formatted): Update.
9515
9516 2017-06-12 Tom Tromey <tom@tromey.com>
9517
9518 PR exp/16225:
9519 * valprint.h (print_binary_chars, print_hex_chars): Update.
9520 * valprint.c (val_print_type_code_int): Update.
9521 (print_binary_chars): Add "zero_pad" argument.
9522 (emit_octal_digit): New function.
9523 (print_octal_chars): Don't zero-pad.
9524 (print_decimal_chars): Likewise.
9525 (print_hex_chars): Add "zero_pad" argument.
9526 * sh64-tdep.c (sh64_do_fp_register): Update.
9527 * regcache.c (regcache::dump): Update.
9528 * printcmd.c (print_scalar_formatted): Update.
9529 * infcmd.c (default_print_one_register_info): Update.
9530
9531 2017-06-12 Pedro Alves <palves@redhat.com>
9532 Alan Hayward <alan.hayward@arm.com>
9533
9534 * mips-tdep.c (MAX_MIPS_ABI_REGSIZE): New.
9535 (mips_eabi_push_dummy_call): Rename local 'regsize' to
9536 'abi_regsize'. Rename local array 'valbuf' to 'ref_valbuf', and
9537 use MAX_MIPS_ABI_REGSIZE instead of MAX_REGISTER_SIZE to size it.
9538 Assert that abi_regsize bytes fit in 'ref_valbuf'.
9539
9540 2017-06-12 Pedro Alves <palves@redhat.com>
9541
9542 * dwarf2read.c (mapped_symtab::data): Now a vector of
9543 symtab_index_entry instead of vector of
9544 std::unique_ptr<symtab_index_entry>. All users adjusted to check
9545 whether an element's name is NULL instead of checking whether the
9546 element itself is NULL.
9547 (find_slot): Change return type. Adjust.
9548 (hash_expand, , add_index_entry, uniquify_cu_indices)
9549 (write_hash_table): Adjust.
9550
9551 2017-06-12 Pedro Alves <palves@redhat.com>
9552
9553 * dwarf2read.c (recursively_count_psymbols): New function.
9554 (write_psymtabs_to_index): Call it to compute number of psyms and
9555 pass estimate size of psyms_seen to unordered_set's ctor.
9556
9557 2017-06-12 Pedro Alves <palves@redhat.com>
9558
9559 * dwarf2read.c (write_hash_table): Check if key already exists
9560 before emplacing.
9561
9562 2017-06-12 Pedro Alves <palves@redhat.com>
9563
9564 * dwarf2read.c (data_buf::append_space): Rename to...
9565 (data_buf::grow): ... this, and make private. Adjust all callers.
9566 (data_buf::append_uint): New method.
9567 (add_address_entry, write_one_signatured_type)
9568 (write_psymtabs_to_index): Use it.
9569
9570 2017-06-12 Pedro Alves <palves@redhat.com>
9571
9572 * dwarf2read.c (file_write(FILE *, const void *, size_t)): Delete.
9573 (file_write (FILE *, const std::vector<Elem>&)): Delete.
9574 (data_buf::file_write): Call ::fwrite directly.
9575
9576 2017-06-12 Pedro Alves <palves@redhat.com>
9577
9578 * dwarf2read.c (uniquify_cu_indices): Use std::unique and
9579 std::vector::erase.
9580
9581 2017-06-12 Jan Kratochvil <jan.kratochvil@redhat.com>
9582
9583 Code cleanup: C++ify .gdb_index producer.
9584 * dwarf2read.c: Include <unordered_set> and <unordered_map>.
9585 (MAYBE_SWAP) [WORDS_BIGENDIAN]: Cast to offset_type.
9586 (struct strtab_entry, hash_strtab_entry, eq_strtab_entry)
9587 (create_strtab, add_string): Remove.
9588 (file_write, data_buf): New.
9589 (struct symtab_index_entry): Use std::vector for cu_indices.
9590 (struct mapped_symtab): Use std::vector for data.
9591 (hash_symtab_entry, eq_symtab_entry, delete_symtab_entry)
9592 (create_symbol_hash_table, create_mapped_symtab, cleanup_mapped_symtab):
9593 Remove.
9594 (find_slot): Change return type. Update it to the new data structures.
9595 (hash_expand, add_index_entry): Update it to the new data structures.
9596 (offset_type_compare): Remove.
9597 (uniquify_cu_indices): Update it to the new data structures.
9598 (c_str_view, c_str_view_hasher, vector_hasher): New.
9599 (add_indices_to_cpool): Remove.
9600 (write_hash_table): Update it to the new data structures.
9601 (struct psymtab_cu_index_map, hash_psymtab_cu_index)
9602 (eq_psymtab_cu_index): Remove.
9603 (psym_index_map): New typedef.
9604 (struct addrmap_index_data): Change addr_obstack pointer to data_buf
9605 reference and std::unordered_map for cu_index_htab.
9606 (add_address_entry, add_address_entry_worker, write_address_map)
9607 (write_psymbols): Update it to the new data structures.
9608 (write_obstack): Remove.
9609 (struct signatured_type_index_data): Change types_list to a data_buf
9610 reference and psyms_seen to a std::unordered_set reference.
9611 (write_one_signatured_type, recursively_write_psymbols)
9612 (write_psymtabs_to_index): Update it to the new data structures.
9613
9614 2017-06-11 Simon Marchi <simon.marchi@ericsson.com>
9615
9616 * NEWS (Changes since GDB 8.0): Announce {set,show} debug
9617 separate-debug-file commands.
9618 * symfile.h (separate_debug_file_debug): New global.
9619 * symfile.c (separate_debug_file_debug): New global.
9620 (separate_debug_file_exists, find_separate_debug_file): Add
9621 debug output.
9622 (_initialize_symfile): Add "set debug separate-debug-file"
9623 command.
9624 * build-id.c (build_id_to_debug_bfd,
9625 find_separate_debug_file_by_buildid): Add debug output.
9626
9627 2017-06-10 Simon Marchi <simon.marchi@polymtl.ca>
9628
9629 * gdbarch.sh (displaced_step_free_closure): Remove.
9630 * gdbarch.h, gdbarch.c: Re-generate.
9631 * aarch64-linux-tdep.c (aarch64_linux_init_abi): Don't set
9632 displaced_step_free_closure.
9633 * amd64-linux-tdep.c (amd64_linux_init_abi_common): Likewise.
9634 * arm-linux-tdep.c (arm_linux_init_abi): Likewise.
9635 * i386-linux-tdep.c (i386_linux_init_abi): Likewise.
9636 * rs6000-aix-tdep.c (rs6000_aix_init_osabi): Likewise.
9637 * rs6000-tdep.c (rs6000_gdbarch_init): Likewise.
9638 * s390-linux-tdep.c (s390_gdbarch_init): Likewise.
9639 * arch-utils.h (simple_displaced_step_free_closure): Remove.
9640 * arch-utils.c (simple_displaced_step_free_closure): Remove.
9641 * infrun.c (displaced_step_clear): Call xfree instead of
9642 gdbarch_displaced_step_free_closure.
9643
9644 2017-06-08 Sergio Durigan Junior <sergiodj@redhat.com>
9645
9646 * common/common-utils.c (stringify_argv): Check for "arg[0] !=
9647 NULL".
9648
9649 2017-06-08 Alan Hayward <alan.hayward@arm.com>
9650
9651 * mn10300-tdep.c (MN10300_MAX_REGISTER_SIZE): Add.
9652 (mn10300_extract_return_value): Use MN10300_MAX_REGISTER_SIZE.
9653 (mn10300_push_dummy_call): Likewise.
9654
9655 2017-06-08 Alan Hayward <alan.hayward@arm.com>
9656
9657 * mi/mi-main.c (register_changed_p): Use value_contents_eq.
9658
9659 2017-06-08 Alan Hayward <alan.hayward@arm.com>
9660
9661 * mi/mi-main.c (register_changed_p): Use cooked_read_value.
9662
9663 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
9664
9665 * NEWS (Changes since GDB 8.0): Announce that GDBserver is now
9666 able to start inferiors using a shell.
9667 (New remote packets): Announce new packet "QStartupWithShell".
9668 * remote.c: Add PACKET_QStartupWithShell.
9669 (extended_remote_create_inferior): Handle new
9670 PACKET_QStartupWithShell.
9671 (remote_protocol_features) <QStartupWithShell>: New entry for
9672 PACKET_QStartupWithShell.
9673 (_initialize_remote): Call "add_packet_config_cmd" for
9674 QStartupShell.
9675
9676 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
9677 Pedro Alves <palves@redhat.com>
9678
9679 * Makefile.in (HFILES_NO_SRCDIR): Add "common/common-inferior.h"
9680 and "nat/fork-inferior.h".
9681 * common/common-inferior.h: New file, with contents from
9682 "gdb/inferior.h".
9683 * commom/common-utils.c: Include "common-utils.h".
9684 (stringify_argv): New function.
9685 * common/common-utils.h (stringify_argv): New prototype.
9686 * configure.nat: Add "fork-inferior.o" as a dependency for
9687 "*linux*", "fbsd*" and "nbsd*" hosts.
9688 * corefile.c (get_exec_file): Update comment.
9689 * darwin-nat.c (darwin_ptrace_him): Call "gdb_startup_inferior"
9690 instead of "startup_inferior".
9691 (darwin_create_inferior): Call "add_thread_silent" after
9692 "fork_inferior".
9693 * fork-child.c: Cleanup unnecessary includes.
9694 (SHELL_FILE): Move to "common/common-fork-child.c".
9695 (environ): Likewise.
9696 (exec_wrapper): Initialize.
9697 (get_exec_wrapper): New function.
9698 (breakup_args): Move to "common/common-fork-child.c"; rename to
9699 "breakup_args_for_exec".
9700 (escape_bang_in_quoted_argument): Move to
9701 "common/common-fork-child.c".
9702 (saved_ui): New variable.
9703 (prefork_hook): New function.
9704 (postfork_hook): Likewise.
9705 (postfork_child_hook): Likewise.
9706 (gdb_startup_inferior): Likewise.
9707 (fork_inferior): Move to "common/common-fork-child.c". Update
9708 function to support gdbserver.
9709 (startup_inferior): Likewise.
9710 * gdbcore.h (get_exec_file): Remove declaration.
9711 * gnu-nat.c (gnu_create_inferior): Call "gdb_startup_inferior"
9712 instead of "startup_inferior". Call "add_thread_silent" after
9713 "fork_inferior".
9714 * inf-ptrace.c: Include "nat/fork-inferior.h" and "utils.h".
9715 (inf_ptrace_create_inferior): Call "gdb_startup_inferior"
9716 instead of "startup_inferior". Call "add_thread_silent" after
9717 "fork_inferior".
9718 * inferior.h: Include "common-inferior.h".
9719 (trace_start_error): Move to "common/common-utils.h".
9720 (trace_start_error_with_name): Likewise.
9721 (fork_inferior): Move prototype to "nat/fork-inferior.h".
9722 (startup_inferior): Likewise.
9723 (gdb_startup_inferior): New prototype.
9724 * nat/fork-inferior.c: New file, with contents from "fork-child.c".
9725 * nat/fork-inferior.h: New file.
9726 * procfs.c (procfs_init_inferior): Call "gdb_startup_inferior"
9727 instead of "startup_inferior". Call "add_thread_silent" after
9728 "fork_inferior".
9729 * target.h (target_terminal_init): Move prototype to
9730 "target/target.h".
9731 (target_terminal_inferior): Likewise.
9732 (target_terminal_ours): Likewise.
9733 * target/target.h (target_terminal_init): New prototype, moved
9734 from "target.h".
9735 (target_terminal_inferior): Likewise.
9736 (target_terminal_ours): Likewise.
9737 * utils.c (gdb_flush_out_err): New function.
9738
9739 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
9740
9741 * Makefile.in (HFILES_NO_SRCDIR): Add "common/common-gdbthread.h".
9742 * common/common-gdbthread.h: New file, with parts from
9743 "gdb/gdbthread.h".
9744 * gdbthread.h: Include "common-gdbthread.h".
9745 (switch_to_thread): Moved to "common/common-gdbthread.h".
9746
9747 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
9748
9749 * Makefile.in (SFILES): Add "common/job-control.c".
9750 (HFILES_NO_SRCDIR): Add "common/job-control.h".
9751 (COMMON_OBS): Add "job-control.o".
9752 * common/job-control.c: New file, with contents from
9753 "gdb/inflow.c".
9754 * common/job-control.h: New file, with contents from "terminal.h".
9755 * fork-child.c: Include "job-control.h".
9756 * inflow.c: Include "job-control.h".
9757 (gdb_setpgid): Move to "common/common-inflow.c".
9758 (_initialize_inflow): Move setting of "job_control" to
9759 "handle_job_control".
9760 * terminal.h (job_control): Moved to "common/common-terminal.h".
9761 (gdb_setpgid): Likewise.
9762 * top.c: Include "job_control.h".
9763 * utils.c: Likewise.
9764 (job_control): Moved to "job-control.c".
9765
9766 2017-06-07 Pedro Alves <palves@redhat.com>
9767
9768 * Makefile.in (SFILES): Add gdb_regex.c.
9769 (COMMON_OBS): Add gdb_regex.o.
9770 * ada-lang.c (ada_add_standard_exceptions)
9771 (ada_add_exceptions_from_frame, name_matches_regex)
9772 (ada_add_global_exceptions, ada_exceptions_list_1): Change regex
9773 parameter type to compiled_regex. Adjust.
9774 (ada_exceptions_list): Use compiled_regex.
9775 * break-catch-throw.c (exception_catchpoint::pattern): Now a
9776 std::unique_ptr<compiled_regex>.
9777 (exception_catchpoint::~exception_catchpoint): Remove regfree
9778 call.
9779 (check_status_exception_catchpoint): Adjust to use compiled_regex.
9780 (handle_gnu_v3_exceptions): Adjust to use compiled_regex.
9781 * breakpoint.c (solib_catchpoint::compiled): Now a
9782 std::unique_ptr<compiled_regex>.
9783 (solib_catchpoint::~solib_catchpoint): Remove regfree call.
9784 (check_status_catch_solib): Adjust to use compiled_regex.
9785 (add_solib_catchpoint): Adjust to use compiled_regex.
9786 * cli/cli-cmds.c (apropos_command): Use compiled_regex.
9787 * cli/cli-decode.c (apropos_cmd): Change regex parameter to
9788 compiled_regex reference. Adjust to use it.
9789 * cli/cli-decode.h: Remove struct re_pattern_buffer forward
9790 declaration. Include "gdb_regex.h".
9791 (apropos_cmd): Change regex parameter to compiled_regex reference.
9792 * gdb_regex.c: New file.
9793 * gdb_regex.h (make_regfree_cleanup, get_regcomp_error): Delete
9794 declarations.
9795 (class compiled_regex): New.
9796 * linux-tdep.c: Include "common/gdb_optional.h".
9797 (struct mapping_regexes): New, factored out from
9798 mapping_is_anonymous_p, and adjusted to use compiled_regex.
9799 (mapping_is_anonymous_p): Use mapping_regexes wrapped in a
9800 gdb::optional and remove cleanups. Adjust to compiled_regex.
9801 * probe.c: Include "common/gdb_optional.h".
9802 (collect_probes): Use compiled_regex and gdb::optional and remove
9803 cleanups.
9804 * skip.c: Include "common/gdb_optional.h".
9805 (skiplist_entry::compiled_function_regexp): Now a
9806 gdb::optional<compiled_regex>.
9807 (skiplist_entry::compiled_function_regexp_is_valid): Delete field.
9808 (free_skiplist_entry): Remove regfree call.
9809 (compile_skip_regexp, skip_rfunction_p): Adjust to use
9810 compiled_regex and gdb::optional.
9811 * symtab.c: Include "common/gdb_optional.h".
9812 (search_symbols): Use compiled_regex and gdb::optional.
9813 * utils.c (do_regfree_cleanup, make_regfree_cleanup)
9814 (get_regcomp_error, compile_rx_or_error): Delete. Some bits moved
9815 to gdb_regex.c.
9816
9817 2017-06-07 Alan Hayward <alan.hayward@arm.com>
9818
9819 * regcache.c (regcache::save): Avoid buffer use.
9820 (regcache::dump): Likewise.
9821
9822 2017-06-07 Alan Hayward <alan.hayward@arm.com>
9823
9824 * sh-tdep.c (sh_pseudo_register_read): Remove
9825 MAX_REGISTER_SIZE.
9826 (sh_pseudo_register_write): Likewise.
9827 * sh64-tdep.c (sh64_pseudo_register_read): Likewise.
9828 (sh64_pseudo_register_write): Likewise
9829
9830 2017-06-07 Alan Hayward <alan.hayward@arm.com>
9831
9832 * aarch64-tdep.c (aarch64_store_return_value): Use
9833 V_REGISTER_SIZE.
9834 (aarch64_pseudo_read_value): Likewise.
9835 (aarch64_pseudo_write): Likewise.
9836
9837 2017-06-06 Yao Qi <yao.qi@linaro.org>
9838
9839 * regformats/regdef.h (set_register_cache): Remove the
9840 declaration.
9841
9842 2017-06-06 Alan Hayward <alan.hayward@arm.com>
9843
9844 * frame.c (frame_unwind_register_signed): Use
9845 frame_unwind_register_value.
9846
9847 2017-06-06 Pedro Alves <palves@redhat.com>
9848
9849 PR breakpoints/21553
9850 * breakpoint.c (create_breakpoints_sal_default)
9851 (init_breakpoint_sal, create_breakpoint_sal): Use
9852 gdb::unique_xmalloc_ptr for string parameters.
9853 (create_breakpoint): Constify 'extra_string' and 'cond_string'
9854 parameters. Replace cleanups with gdb::unique_xmalloc_ptr.
9855 (base_breakpoint_create_breakpoints_sal)
9856 (bkpt_create_breakpoints_sal, tracepoint_create_breakpoints_sal)
9857 (strace_marker_create_breakpoints_sal)
9858 (create_breakpoints_sal_default): Use gdb::unique_xmalloc_ptr for
9859 string parameters.
9860 * breakpoint.h (breakpoint_ops::create_breakpoints_sal): Use
9861 gdb::unique_xmalloc_ptr for string parameters.
9862 (create_breakpoint): Constify 'extra_string' and 'cond_string'
9863 parameters.
9864
9865 2017-06-06 Alan Hayward <alan.hayward@arm.com>
9866
9867 * alpha-tdep.c (alpha_register_to_value): Use
9868 get_frame_register_value.
9869 (alpha_value_to_register): Use ALPHA_REGISTER_SIZE.
9870
9871 2017-06-06 Alan Hayward <alan.hayward@arm.com>
9872
9873 * ia64-tdep.c (IA64_MAX_FP_REGISTER_SIZE) Add.
9874 (ia64_register_to_value): Use IA64_MAX_FP_REGISTER_SIZE.
9875 (ia64_value_to_register): Likewise.
9876 (ia64_extract_return_value): Likewise.
9877 (ia64_store_return_value): Likewise.
9878 (ia64_push_dummy_call): Likewise.
9879
9880 2017-06-04 Joel Brobecker <brobecker@adacore.com>
9881
9882 GDB 8.0 released.
9883
9884 2017-06-03 Simon Marchi <simon.marchi@ericsson.com>
9885
9886 * x86-linux-nat.c (struct arch_lwp_info): Remove.
9887
9888 2017-06-03 Simon Marchi <simon.marchi@polymtl.ca>
9889
9890 * linux-nat.c (linux_nat_post_attach_wait): Remove FIRST
9891 parameter.
9892 (linux_nat_attach): Adjust call to linux_nat_post_attach_wait.
9893
9894 2017-06-02 Simon Marchi <simon.marchi@ericsson.com>
9895
9896 * event-loop.c (poll_timers): Unallocate timer using delete
9897 instead of xfree.
9898
9899 2017-06-02 Simon Marchi <simon.marchi@polymtl.ca>
9900
9901 * breakpoint.h (struct breakpoint_ops) <dtor>: Remove.
9902 (struct breakpoint) <~breakpoint>: New.
9903 (struct watchpoint): Inherit from breakpoint.
9904 <~watchpoint>: New.
9905 <base>: Remove.
9906 (struct tracepoint): Inherit from breakpoint.
9907 <base>: Remove.
9908 * breakpoint.c (longjmp_breakpoint_ops): Remove.
9909 (struct longjmp_breakpoint): Inherit from breakpoint.
9910 <~longjmp_breakpoint>: New.
9911 <base>: Remove.
9912 (new_breakpoint_from_type): Remove casts.
9913 (watchpoint_in_thread_scope): Remove reference to base field.
9914 (watchpoint_del_at_next_stop): Likewise.
9915 (update_watchpoint): Likewise.
9916 (watchpoint_check): Likewise.
9917 (bpstat_check_watchpoint): Likewise.
9918 (set_longjmp_breakpoint): Likewise.
9919 (struct fork_catchpoint): Inherit from breakpoint.
9920 <base>: Remove.
9921 (struct solib_catchpoint): Inherit from breakpoint.
9922 <~solib_catchpoint>: New.
9923 <base>: Remove.
9924 (dtor_catch_solib): Change to ...
9925 (solib_catchpoint::~solib_catchpoint): ... this.
9926 (breakpoint_hit_catch_solib): Remove reference to base field.
9927 (add_solib_catchpoint): Likewise.
9928 (create_fork_vfork_event_catchpoint): Likewise.
9929 (struct exec_catchpoint): Inherit from breakpoint.
9930 <~exec_catchpoint>: New.
9931 <base>: Remove.
9932 (dtor_catch_exec): Change to ...
9933 (exec_catchpoint::~exec_catchpoint): ... this.
9934 (dtor_watchpoint): Change to ...
9935 (watchpoint::~watchpoint): ... this.
9936 (watch_command_1): Remove reference to base field.
9937 (catch_exec_command_1): Likewise.
9938 (base_breakpoint_dtor): Change to ...
9939 (breakpoint::~breakpoint): ... this.
9940 (base_breakpoint_ops): Remove dtor field value.
9941 (longjmp_bkpt_dtor): Change to ...
9942 (longjmp_breakpoint::~longjmp_breakpoint): ... this.
9943 (strace_marker_create_breakpoints_sal): Remove reference to base
9944 field.
9945 (delete_breakpoint): Don't manually call breakpoint destructor.
9946 (create_tracepoint_from_upload): Remove reference to base field.
9947 (trace_pass_set_count): Likewise.
9948 (initialize_breakpoint_ops): Don't initialize
9949 momentary_breakpoint_ops, don't set dtors.
9950 * ada-lang.c (struct ada_catchpoint): Inherit from breakpoint.
9951 <~ada_catchpoint>: New.
9952 <base>: Remove.
9953 (create_excep_cond_exprs): Remove reference to base field.
9954 (dtor_exception): Change to ...
9955 (ada_catchpoint::~ada_catchpoint): ... this.
9956 (dtor_catch_exception): Remove.
9957 (dtor_catch_exception_unhandled): Remove.
9958 (dtor_catch_assert): Remove.
9959 (create_ada_exception_catchpoint): Remove reference to base
9960 field.
9961 (initialize_ada_catchpoint_ops): Don't set dtors.
9962 * break-catch-sig.c (struct signal_catchpoint): Inherit from
9963 breakpoint.
9964 <~signal_catchpoint>: New.
9965 <base>: Remove.
9966 (signal_catchpoint_dtor): Change to ...
9967 (signal_catchpoint::~signal_catchpoint): ... this.
9968 (create_signal_catchpoint): Remove reference to base field.
9969 (initialize_signal_catchpoint_ops): Don't set dtor.
9970 * break-catch-syscall.c (struct syscall_catchpoint): Inherit
9971 from breakpoint.
9972 <~syscall_catchpoint>: New.
9973 <base>: Remove.
9974 (dtor_catch_syscall): Change to ...
9975 (syscall_catchpoint::~syscall_catchpoint): ... this.
9976 (create_syscall_event_catchpoint): Remove reference to base
9977 field.
9978 (initialize_syscall_catchpoint_ops): Don't set dtor.
9979 * break-catch-throw.c (struct exception_catchpoint): Inherit
9980 from breakpoint.
9981 <~exception_catchpoint>: New.
9982 <base>: Remove.
9983 (dtor_exception_catchpoint): Change to ...
9984 (exception_catchpoint::~exception_catchpoint): ... this.
9985 (handle_gnu_v3_exceptions): Remove reference to base field.
9986 (initialize_throw_catchpoint_ops): Don't set dtor.
9987 * ctf.c (ctf_get_traceframe_address): Remove reference to base
9988 field.
9989 * remote.c (remote_get_tracepoint_status): Likewise.
9990 * tracefile-tfile.c (tfile_get_traceframe_address): Likewise.
9991 * tracefile.c (tracefile_fetch_registers): Likewise.
9992 * tracepoint.c (actions_command): Likewise.
9993 (validate_actionline): Likewise.
9994 (tfind_1): Likewise.
9995 (get_traceframe_location): Likewise.
9996 (find_matching_tracepoint_location): Likewise.
9997 (parse_tracepoint_status): Likewise.
9998 * mi/mi-cmd-break.c (mi_cmd_break_passcount): Likewise.
9999
10000 2017-06-02 Simon Marchi <simon.marchi@polymtl.ca>
10001
10002 * breakpoint.c (struct longjmp_breakpoint): New struct.
10003 (is_tracepoint_type): Change return type to bool.
10004 (is_longjmp_type): New function.
10005 (new_breakpoint_from_type): Handle longjmp kinds of breakpoints.
10006 (set_raw_breakpoint_without_location): Use
10007 new_breakpoint_from_type.
10008 (set_raw_breakpoint): Likewise.
10009
10010 2017-06-02 Simon Marchi <simon.marchi@polymtl.ca>
10011
10012 * breakpoint.c (new_breakpoint_from_type): New function.
10013 (create_breakpoint_sal): Use new_breakpoint_from_type and
10014 unique_ptr.
10015 (create_breakpoint): Likewise.
10016
10017 2017-05-31 Simon Marchi <simon.marchi@ericsson.com>
10018
10019 * memattr.c (mem_info_command): Rename to ...
10020 (info_mem_command): ... this.
10021 (mem_enable_command): Rename to ...
10022 (enable_mem_command): ... this.
10023 (mem_disable_command): Rename to ...
10024 (disable_mem_command): ... this.
10025 (mem_delete_command): Rename to ...
10026 (delete_mem_command): ... this.
10027 (_initialize_mem): Adjust function names.
10028
10029 2017-05-31 Markus Metzger <markus.t.metzger@intel.com>
10030
10031 * btrace.c (handle_pt_insn_events): New.
10032 (ftrace_add_pt): Call handle_pt_insn_events. Rename ERRCODE into
10033 STATUS. Split into this and ...
10034 (handle_pt_insn_event_flags): ... this.
10035
10036 2017-05-31 Markus Metzger <markus.t.metzger@intel.com>
10037
10038 * configure.ac: Check for pt_insn_event, struct pt_insn.enabled,
10039 and struct pt_insn.resynced.
10040 * configure: Regenerated.
10041 * config.in: Regenerated.
10042
10043 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
10044
10045 * btrace.c (ftrace_find_call_by_number): New function.
10046 (ftrace_new_function): Store objects, not pointers.
10047 (ftrace_find_call_by_number, ftrace_new_return, ftrace_new_switch,
10048 ftrace_new_gap, ftrace_update_function,
10049 ftrace_compute_global_level_offset, btrace_stich_bts, btrace_clear,
10050 btrace_insn_get, btrace_insn_get_error, btrace_insn_end,
10051 btrace_insn_next, btrace_insn_prev, ptrace_find_insn_by_number,
10052 btrace_ends_with_single_insn, btrace_call_get): Account for
10053 btrace_thread_info::functions now storing objects.
10054 * btrace.h (struct btrace_thread_info): Add constructor.
10055 (struct btrace_thread_info) <functions>: Make std::vector.
10056 (struct btrace_thread_info) <prev, next, up, insn, errcode, flags):
10057 Initialize with default values.
10058 * record-btrace.c (record_btrace_frame_sniffer): Account for
10059 btrace_thread_info::functions now storing objects.
10060
10061 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
10062
10063 * btrace.c: Remove typedef bfun_s.
10064 (ftrace_new_gap): Directly add gaps to the list of gaps.
10065 (btrace_bridge_gaps, btrace_compute_ftrace_bts, pt_btrace_insn_flags,
10066 ftrace_add_pt, btrace_compute_ftrace_pt, btrace_compute_ftrace_1,
10067 btrace_finalize_ftrace, btrace_compute_ftrace): Use std::vector
10068 instead of gdb VEC.
10069
10070 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
10071
10072 * btrace.c (ftrace_fixup_caller, ftrace_new_return, ftrace_connect_bfun,
10073 ftrace_bridge_gap): Replace references to btrace_thread_info::segment
10074 with btrace_thread_info::next_segment and
10075 btrace_thread_info::prev_segment.
10076 * btrace.h: Remove struct btrace_func_link.
10077 (struct btrace_function): Replace pair of function segment pointers
10078 with pair of indices.
10079 * python/py-record-btrace.c (btpy_call_prev_sibling,
10080 btpy_call_next_sibling): Replace references to
10081 btrace_thread_info::segment with btrace_thread_info::next_segment and
10082 btrace_thread_info::prev_segment.
10083 * record-btrace.c (record_btrace_frame_this_id): Use
10084 btrace_find_call_by_number.
10085
10086 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
10087
10088 * btrace.c (ftrace_new_function, ftrace_fixup_level,
10089 ftrace_connect_bfun, ftrace_bridge_gap, btrace_bridge_gaps,
10090 btrace_insn_next, btrace_insn_prev): Remove references to
10091 btrace_thread_info::flow.
10092 * btrace.h (struct btrace_function): Remove FLOW.
10093
10094 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
10095
10096 * btrace.c (ftrace_find_call_by_number): New function.
10097 (ftrace_update_caller, ftrace_new_call, ftrace_new_tailcall,
10098 ftrace_get_caller, ftrace_find_call, ftrace_new_return,
10099 ftrace_match_backtrace, ftrace_connect_bfun, ftrace_connect_backtrace,
10100 ftrace_bridge_gap, btrace_bridge_gaps): Use btrace_function::up as an
10101 index.
10102 * btrace.h (struct btrace_function): Turn UP into an index.
10103 * python/py-record-btrace.c (btpy_call_up): Use btrace_function::up
10104 as an index.
10105 * record-btrace.c (record_btrace_frame_unwind_stop_reason,
10106 record_btrace_frame_prev_register, record_btrace_frame_sniffer,
10107 record_btrace_tailcall_frame_sniffe): Use btrace_find_call_by_number.
10108
10109 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
10110
10111 * btrace.c (ftrace_new_function, ftrace_new_call, ftrace_new_tailcall,
10112 ftrace_new_return, ftrace_new_switch, ftrace_new_gap,
10113 ftrace_update_function, ftrace_compute_global_level_offset,
10114 btrace_compute_ftrace_bts, ftrace_add_pt, btrace_compute_ftrace_pt,
10115 btrace_stitch_bts, btrace_fetch, btrace_clear, btrace_insn_number,
10116 btrace_insn_end, btrace_is_empty): Remove references to
10117 btrace_thread_info::begin and btrace_thread_info::end.
10118 * btrace.h (struct btrace_thread_info): Remove BEGIN and END.
10119 (struct btrace_thread_info) <functions>: Adjust comment.
10120 * record-btrace.c (record_btrace_start_replaying): Remove reference to
10121 btrace_thread_info::begin.
10122
10123 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
10124
10125 * btrace.c (ftrace_new_function, ftrace_new_call, ftrace_new_tailcall,
10126 ftrace_new_return, ftrace_new_switch, ftrace_new_gap,
10127 ftrace_update_function): Remove arguments that implicitly were always
10128 BTINFO->END.
10129 (btrace_compute_ftrace_bts, ftrace_add_pt, btrace_compute_ftrace_pt):
10130 Don't pass BTINFO->END.
10131
10132 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
10133
10134 * btrace.c: (btrace_insn_get, btrace_insn_get_error, btrace_insn_number,
10135 btrace_insn_begin, btrace_insn_end, btrace_insn_next, btrace_insn_prev,
10136 btrace_find_insn_by_number): Replace function segment pointer with
10137 index.
10138 (btrace_insn_cmp): Simplify.
10139 * btrace.h: (struct btrace_insn_iterator) Rename index to
10140 insn_index. Replace function segment pointer with index into function
10141 segment vector.
10142 * record-btrace.c (record_btrace_call_history): Replace function
10143 segment pointer use with index.
10144 (record_btrace_frame_sniffer): Retrieve function call segment through
10145 vector.
10146 (record_btrace_set_replay): Remove defunc't safety check.
10147
10148 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
10149
10150 * btrace.c (btrace_ends_with_single_insn): New function.
10151 (btrace_call_get, btrace_call_number, btrace_call_begin,
10152 btrace_call_end, btrace_call_next, btrace_call_prev,
10153 btrace_find_call_by_number): Use index into call segment vector
10154 instead of pointer.
10155 (btrace_call_cmp): Simplify.
10156 * btrace.h (struct btrace_call_iterator): Replace function call segment
10157 pointer with index into vector.
10158 * record-btrace.c (record_btrace_call_history): Use index instead of
10159 pointer.
10160
10161 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
10162
10163 * btrace.c (btrace_insn_begin, btrace_insn_end,
10164 btrace_find_insn_by_number): Add btinfo to iterator.
10165 * btrace.h (struct btrace_insn_iterator): Add btinfo.
10166
10167 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
10168
10169 * btrace.c (ftrace_new_function): Add btrace_thread_info to arguments
10170 and save pointers directly.
10171 (ftrace_new_call, ftrace_new_tailcall, ftrace_new_return,
10172 ftrace_new_switch, ftrace_new_gap, ftrace_update_function,
10173 ftrace_add_pt): Add btrace_thread_info to arguments. Adjust for
10174 changed signature of functions.
10175 (btrace_compute_ftrace_pt): Adjust for changed signature of functions.
10176 (btrace_fetch): Remove code that adds btrace_function pointers to
10177 vector of btrace_functions.
10178 (btrace_clear): Simplify freeing vector of btrace_functions.
10179
10180 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
10181
10182 * btrace.c (btrace_fetch, btrace_clear, btrace_find_insn_by_number):
10183 Replace VEC_* with std::vector functions.
10184 * btrace.h: Add include: vector. Remove typedef for DEF_VEC_P.
10185 (struct btrace_thread_info)<functions>: Change type to std::vector.
10186
10187 2017-05-30 Simon Marchi <simon.marchi@ericsson.com>
10188
10189 * NEWS (Changes in GDB 8.0): Remove extra empty line. Move
10190 "Removed targets and native configurations" up. Merge duplicate
10191 "New commands" sub-sections. Add "New options" sub-sections.
10192
10193 2017-05-26 Alan Hayward <alan.hayward@arm.com>
10194
10195 * defs.h (copy_integer_to_size): New declaration.
10196 * findvar.c (copy_integer_to_size): New function.
10197 (do_cint_test): New selftest function.
10198 (copy_integer_to_size_test): Likewise.
10199 (_initialize_findvar): Likewise.
10200 * mips-fbsd-tdep.c (mips_fbsd_supply_reg): Use raw_supply_integer.
10201 (mips_fbsd_collect_reg): Use raw_collect_integer.
10202 * mips-linux-tdep.c (supply_32bit_reg): Use raw_supply_integer.
10203 (mips64_fill_gregset): Use raw_collect_integer
10204 (mips64_fill_fpregset): Use raw_supply_integer.
10205 * regcache.c (regcache::raw_supply_integer): New function.
10206 (regcache::raw_collect_integer): Likewise.
10207 * regcache.h: (regcache::raw_supply_integer): New declaration.
10208 (regcache::raw_collect_integer): Likewise.
10209
10210 2017-05-24 Yao Qi <yao.qi@linaro.org>
10211
10212 * Makefile.in (SFILES): Add gdbarch-selftests.c.
10213 (COMMON_OBS): Add gdbarch-selftests.o.
10214 * frame.c [GDB_SELF_TESTS] (create_new_frame): New function.
10215 * frame.h [GDB_SELF_TESTS] (create_new_frame): Declare.
10216 * gdbarch-selftests.c: New file.
10217 * regcache.h (regcache) <~regcache>: Mark it virtual if
10218 GDB_SELF_TEST.
10219 <raw_write>: Likewise.
10220
10221 2017-05-24 Yao Qi <yao.qi@linaro.org>
10222
10223 * regcache.c (current_regcache): Change it to
10224 regcache::current_regcache.
10225 (regcache_observer_target_changed): Update.
10226 (regcache_thread_ptid_changed): Make it a regcache static
10227 method.
10228 (regcache_thread_ptid_changed): Update.
10229 (class regcache_access): New.
10230 (current_regcache_test): Update.
10231 (_initialize_regcache): Update.
10232 * regcache.h: Include forward_list.
10233 (regcache): Declare regcache_thread_ptid_changed and declare
10234 registers_changed_ptid as friend.
10235
10236 2017-05-24 Yao Qi <yao.qi@linaro.org>
10237
10238 * i387-tdep.c (i387_register_to_value): Use register_size
10239 instead of TYPE_LENGTH.
10240 * m68k-tdep.c (m68k_register_to_value): Likewise.
10241
10242 2017-05-24 Yao Qi <yao.qi@linaro.org>
10243
10244 * i387-tdep.c (i387_convert_register_p): Return false if type
10245 code isn't TYPE_CODE_FLT.
10246
10247 2017-05-24 Yao Qi <yao.qi@linaro.org>
10248
10249 * alpha-tdep.c (alpha_convert_register_p): Return true if type
10250 length is 4.
10251 (alpha_register_to_value): Remove type length check.
10252 (alpha_value_to_register): Likewise.
10253
10254 2017-05-24 Yao Qi <yao.qi@linaro.org>
10255
10256 * ia64-tdep.c (ia64_convert_register_p): Check type's code is
10257 TYPE_CODE_FLT.
10258
10259 2017-05-24 Yao Qi <yao.qi@linaro.org>
10260
10261 * m68k-tdep.c (m68k_convert_register_p): Check type's code is
10262 TYPE_CODE_FLT or not.
10263
10264 2017-05-24 Yao Qi <yao.qi@linaro.org>
10265
10266 * alpha-tdep.c (alpha_gdbarch_init): Use XCNEW instead of XNEW.
10267 * avr-tdep.c (avr_gdbarch_init): Likewise.
10268 * bfin-tdep.c (bfin_gdbarch_init): Likewise.
10269 * cris-tdep.c (cris_gdbarch_init): Likewise.
10270 * ft32-tdep.c (ft32_gdbarch_init): Likewise.
10271 * lm32-tdep.c (lm32_gdbarch_init): Likewise.
10272 * m32r-tdep.c (m32r_gdbarch_init): Likewise.
10273 * m68hc11-tdep.c (m68hc11_gdbarch_init): Likewise.
10274 * mep-tdep.c (mep_gdbarch_init): Likewise.
10275 * microblaze-tdep.c (microblaze_gdbarch_init): Likewise.
10276 * mips-tdep.c (mips_gdbarch_init): Likewise.
10277 * mn10300-tdep.c (mn10300_gdbarch_init): Likewise.
10278 * moxie-tdep.c (moxie_gdbarch_init): Likewise.
10279 * msp430-tdep.c (msp430_gdbarch_init): Likewise.
10280 * sh64-tdep.c (sh64_gdbarch_init): Likewise.
10281 * v850-tdep.c (v850_gdbarch_init): Likewise.
10282
10283 2017-05-24 Yao Qi <yao.qi@linaro.org>
10284
10285 * selftest-arch.c (tests_with_arch): Call registers_changed
10286 and reinit_frame_cache.
10287 * selftest.c (run_self_tests): Likewise.
10288
10289 2017-05-24 Yao Qi <yao.qi@linaro.org>
10290
10291 * rs6000-tdep.c (gdb_print_insn_powerpc): Remove.
10292 (rs6000_gdbarch_init): Don't call set_gdbarch_print_insn.
10293
10294 2017-05-24 Yao Qi <yao.qi@linaro.org>
10295
10296 * rl78-tdep.c (rl78_gdbarch_init): Don't call
10297 set_gdbarch_print_insn.
10298
10299 2017-05-24 Yao Qi <yao.qi@linaro.org>
10300
10301 * h8300-tdep.c (h8300_gdbarch_init): Don't call
10302 set_gdbarch_print_insn.
10303
10304 2017-05-24 Yao Qi <yao.qi@linaro.org>
10305
10306 * alpha-tdep.c (alpha_gdbarch_init): Don't call
10307 set_gdbarch_print_insn.
10308 * arc-tdep.c (arc_gdbarch_init): Likewise.
10309 * arch-utils.c: include dis-asm.h.
10310 (default_print_insn): New function.
10311 * arch-utils.h (default_print_insn): Declare.
10312 * avr-tdep.c (avr_gdbarch_init): Don't call set_gdbarch_print_insn.
10313 * bfin-tdep.c (bfin_gdbarch_init): Likewise.
10314 * cris-tdep.c (cris_delayed_get_disassembler): Remove.
10315 (cris_gdbarch_init): Don't call set_gdbarch_print_insn.
10316 * frv-tdep.c (frv_gdbarch_init): Likewise.
10317 * ft32-tdep.c (ft32_gdbarch_init): Likewise.
10318 * gdbarch.sh (print_insn): Use default_print_insn.
10319 * gdbarch.c: Regenerated.
10320 * hppa-tdep.c (hppa_gdbarch_init): Likewise.
10321 * iq2000-tdep.c (iq2000_gdbarch_init): Likewise.
10322 * lm32-tdep.c (lm32_gdbarch_init): Likewise.
10323 * m32c-tdep.c (m32c_gdbarch_init): Likewise.
10324 * m32r-tdep.c (m32r_gdbarch_init): Likewise.
10325 * m68hc11-tdep.c (gdb_print_insn_m68hc11): Remove.
10326 (m68hc11_gdbarch_init): Don't call set_gdbarch_print_insn.
10327 * m68k-tdep.c (m68k_gdbarch_init): Likewise.
10328 * m88k-tdep.c (m88k_gdbarch_init): Likewise.
10329 * microblaze-tdep.c (microblaze_gdbarch_init): Likewise.
10330 * mn10300-tdep.c (mn10300_gdbarch_init): Likewise.
10331 * moxie-tdep.c (moxie_gdbarch_init): Likewise.
10332 * msp430-tdep.c (msp430_gdbarch_init): Likewise.
10333 * mt-tdep.c (mt_gdbarch_init): Likewise.
10334 * nds32-tdep.c (nds32_gdbarch_init): Likewise.
10335 * nios2-tdep.c (nios2_print_insn): Remove.
10336 (nios2_gdbarch_init): Don't call set_gdbarch_print_insn.
10337 * rx-tdep.c (rx_gdbarch_init): Likewise.
10338 * s390-linux-tdep.c (s390_gdbarch_init): Likewise.
10339 * score-tdep.c (score_print_insn): Remove.
10340 (score_gdbarch_init): Don't call set_gdbarch_print_insn.
10341 * sh-tdep.c (sh_gdbarch_init): Likewise.
10342 * sh64-tdep.c (sh64_gdbarch_init): Likewise.
10343 * sparc-tdep.c (sparc32_gdbarch_init): Likewise.
10344 * tic6x-tdep.c (tic6x_print_insn): Remove.
10345 (tic6x_gdbarch_init): Don't call set_gdbarch_print_insn.
10346 * tilegx-tdep.c (tilegx_gdbarch_init): Likewise.
10347 * v850-tdep.c (v850_gdbarch_init): Likewise.
10348 * vax-tdep.c (vax_gdbarch_init): Likewise.
10349 * xstormy16-tdep.c (xstormy16_gdbarch_init): Likewise.
10350 * xtensa-tdep.c (xtensa_gdbarch_init): Likewise.
10351
10352 2017-05-23 John Baldwin <jhb@FreeBSD.org>
10353
10354 * mips-fbsd-tdep.c (MIPS_PC_REGNUM): Remove.
10355 (MIPS_FP0_REGNUM): Remove.
10356 (MIPS_FSR_REGNUM): Remove.
10357 (mips_fbsd_supply_fpregs): Use mips_regnum.
10358 (mips_fbsd_supply_gregs): Likewise.
10359 (mips_fbsd_collect_fpregs): Likewise.
10360 (mips_fbsd_collect_gregs): Likewise.
10361
10362 2017-05-23 John Baldwin <jhb@FreeBSD.org>
10363
10364 * mips-fbsd-nat.c (getregs_supplies): Fix upper bound comparison.
10365 (getpfpregs_supplies): New function.
10366 (mips_fbsd_fetch_inferior_registers): Remove early exit and use
10367 getfpregs_supplies.
10368 (mips_fbsd_store_inferior_registers): Likewise.
10369
10370 2017-05-22 Pedro Alves <palves@redhat.com>
10371
10372 * MAINTAINERS (Host/Native): Add John Baldwin as FreeBSD
10373 maintainer.
10374
10375 2017-05-22 Alan Hayward <alan.hayward@arm.com>
10376
10377 * ppc-linux-nat.c (fetch_register): Use PPC_MAX_REGISTER_SIZE.
10378 (store_register): Likewise.
10379 * ppc-sysv-tdep.c (ppc_sysv_abi_push_dummy_call): Likewise.
10380 (get_decimal_float_return_value): Likewise.
10381 (do_ppc_sysv_return_value): Likewise.
10382 (ppc64_sysv_abi_push_integer): Likewise.
10383 (ppc64_sysv_abi_push_freg): Likewise.
10384 (ppc64_sysv_abi_return_value_base): Likewise.
10385 (ppc64_sysv_abi_return_value): Likewise.
10386 * rs6000-aix-tdep.c (rs6000_push_dummy_call): Likewise.
10387 * rs6000-lynx178-tdep.c (rs6000_lynx178_push_dummy_call): Likewise.
10388 * rs6000-nat.c: Likewise.
10389 * rs6000-tdep.c (rs6000_register_to_value): Likewise.
10390 (rs6000_value_to_register): Likewise.
10391 * ppc-tdep.h (PPC_MAX_REGISTER_SIZE): Add.
10392
10393 2017-05-21 Tom Tromey <tom@tromey.com>
10394
10395 PR rust/21466:
10396 * rust-lang.c (rust_print_type) <TYPE_CODE_ARRAY>: Print unsized
10397 arrays as "[T]", not "[T; ]".
10398
10399 2017-05-19 Tom Tromey <tom@tromey.com>
10400
10401 PR rust/21484:
10402 * rust-lang.c (exp_descriptor_rust): New function.
10403 (rust_language_defn): Use it.
10404 * p-lang.c (pascal_language_defn): Update.
10405 * opencl-lang.c (opencl_language_defn): Update.
10406 * objc-lang.c (objc_language_defn): Update.
10407 * m2-lang.c (m2_language_defn): Update.
10408 * language.h (struct language_defn)
10409 <la_watch_location_expression>: New member.
10410 * language.c (unknown_language_defn, auto_language_defn)
10411 (local_language_defn): Update.
10412 * go-lang.c (go_language_defn): Update.
10413 * f-lang.c (f_language_defn): Update.
10414 * d-lang.c (d_language_defn): Update.
10415 * c-lang.h (c_watch_location_expression): Declare.
10416 * c-lang.c (c_watch_location_expression): New function.
10417 (c_language_defn, cplus_language_defn, asm_language_defn)
10418 (minimal_language_defn): Use it.
10419 * breakpoint.c (watch_command_1): Call
10420 la_watch_location_expression.
10421 * ada-lang.c (ada_language_defn): Update.
10422
10423 2017-05-19 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
10424
10425 PR tui/21482
10426 * gdb_curses.h (NOMACROS): Define.
10427 (NCURSES_NOMACROS): Define.
10428
10429 2017-05-19 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
10430
10431 PR tui/21482
10432 * tui/tui-windata.c (tui_erase_data_content): Cast last mvwaddstr
10433 arg to char *.
10434 * tui/tui-wingeneral.c (box_win): Likewise.
10435 * tui/tui-winsource.c (tui_erase_source_content): Likewise.
10436 (tui_show_source_line): Likewise.
10437 (tui_show_exec_info_content): Likewise.
10438
10439 2017-05-19 Vladimir Mezentsev <vladimir.mezentsev@oracle.com>
10440
10441 * sparc-tdep.c (sparc_structure_return_p)
10442 (sparc_arg_on_registers_p): New functions.
10443 (sparc32_store_arguments): Use them.
10444 * sparc64-tdep.c (sparc64_16_byte_align_p)
10445 (sparc64_store_floating_fields, sparc64_extract_floating_fields):
10446 Handle TYPE_CODE_ARRAY.
10447
10448 2017-05-17 Yao Qi <yao.qi@linaro.org>
10449
10450 * cli/cli-decode.c (add_alias_cmd): New function.
10451 * command.h (add_alias_cmd): Declare.
10452 * infcmd.c (_initialize_infcmd): Don't call add_com_alias,
10453 instead call add_alias_cmd.
10454
10455 2017-05-17 Pedro Alves <palves@redhat.com>
10456
10457 * Makefile.in (nat_extra_makefile_frag): Rename to ...
10458 (nat_makefile_frag): ... this. All references updated.
10459 * configure.ac: Likewise.
10460 * configure.nat: Likewise. Enhance comments.
10461 * configure: Regenerate.
10462
10463 2017-05-15 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
10464
10465 * procfs.c (procfs_create_inferior): Change prototype to match
10466 definition.
10467
10468 2017-05-13 Eli Zaretskii <eliz@gnu.org>
10469
10470 * tui/tui.c (tui_enable): Cast "unknown" to 'char *' to avoid a
10471 C++ compiler warning.
10472
10473 2017-05-12 Tom Tromey <tom@tromey.com>
10474
10475 PR rust/21483:
10476 * rust-lang.c (rust_evaluate_subexp) <STRUCTOP_STRUCT>: Don't
10477 recurse, just call value_struct_elt directly.
10478
10479 2017-05-12 Tom Tromey <tom@tromey.com>
10480
10481 * rust-lang.c (rust_dump_subexp_body) <STRUCTOP_ANONYMOUS,
10482 OP_RUST_ARRAY>: Fix.
10483
10484 2017-05-12 Tom Tromey <tom@tromey.com>
10485
10486 * rust-lang.c (rust_print_subexp): Replace "return" with "break".
10487
10488 2017-05-09 Yao Qi <yao.qi@linaro.org>
10489
10490 * regcache.c: Include <forward_list>.
10491 (struct regcache_list): Remove.
10492 (current_regcache): Update.
10493 (get_thread_arch_aspace_regcache): Update for std::forward_list.
10494 (regcache_thread_ptid_changed): Likewise.
10495 (registers_changed_ptid): Likewise.
10496 (current_regcache_size): Likewise.
10497
10498 2017-05-09 Yao Qi <yao.qi@linaro.org>
10499
10500 * regcache.c [GDB_SELF_TEST]: Include selftest.h.
10501 (current_regcache_size): New function.
10502 (current_regcache_test): New function.
10503 (_initialize_regcache) [GDB_SELF_TEST]: Register the unit test.
10504
10505 2017-05-08 Alan Hayward <alan.hayward@arm.com>
10506
10507 * mips-tdep.c (mips_o32_return_value): Remove unused buffer.
10508 (print_gp_register_row): Use get_frame_register_value.
10509
10510 2017-05-08 Alan Hayward <alan.hayward@arm.com>
10511
10512 * mips-linux-tdep.c (mips_supply_gregset): Use raw_supply_zeroed.
10513 (mips_supply_fpregset): Likewise.
10514 (mips64_supply_gregset): Likewise.
10515
10516 2017-05-08 Alan Hayward <alan.hayward@arm.com>
10517
10518 * mn10300-linux-tdep.c (am33_supply_gregset_method): Use
10519 regcache->raw_supply_zeroed.
10520
10521 2017-05-06 Sergio Durigan Junior <sergiodj@redhat.com>
10522
10523 * configure.nat: Rearrange 'case' statements to match
10524 host before cpu.
10525
10526 2017-05-06 Sergio Durigan Junior <sergiodj@redhat.com>
10527
10528 * Makefile.in: Remove "@host_makefile_frag@". Add variables
10529 NAT_FILE, NATDEPFILES, NAT_CDEPS, LOADLIBES, MH_CFLAGS, XM_CLIBS,
10530 NAT_GENERATED_FILES, HAVE_NATIVE_GCORE_HOST. Add
10531 "@nat_extra_makefile_frag@".
10532 (Makefile): Remove dependency on "@frags@".
10533 ($(GNULIB_BUILDDIR)/Makefile): Likewise.
10534 (data-directory/Makefile): Likewise.
10535 * config/aarch64/linux.mh: Deleted; moved contents to
10536 "gdb/configure.nat".
10537 * config/alpha/alpha-linux.mh: Likewise.
10538 * config/alpha/nbsd.mh: Likewise.
10539 * config/arm/linux.mh: Likewise.
10540 * config/arm/nbsdelf.mh: Likewise.
10541 * config/i386/cygwin.mh: Likewise.
10542 * config/i386/cygwin64.mh: Likewise.
10543 * config/i386/darwin.mh: Likewise.
10544 * config/i386/fbsd.mh: Likewise.
10545 * config/i386/fbsd64.mh: Likewise.
10546 * config/i386/go32.mh: Likewise.
10547 * config/i386/i386gnu.mh: Likewise.
10548 * config/i386/i386sol2.mh: Likewise.
10549 * config/i386/linux.mh: Likewise.
10550 * config/i386/linux64.mh: Likewise.
10551 * config/i386/mingw.mh: Likewise.
10552 * config/i386/mingw64.mh: Likewise.
10553 * config/i386/nbsd64.mh: Likewise.
10554 * config/i386/nbsdelf.mh: Likewise.
10555 * config/i386/nto.mh: Likewise.
10556 * config/i386/obsd.mh: Likewise.
10557 * config/i386/obsd64.mh: Likewise.
10558 * config/i386/sol2-64.mh: Likewise.
10559 * config/ia64/linux.mh: Likewise.
10560 * config/m32r/linux.mh: Likewise.
10561 * config/m68k/linux.mh: Likewise.
10562 * config/m68k/nbsdelf.mh: Likewise.
10563 * config/m68k/obsd.mh: Likewise.
10564 * config/m88k/obsd.mh: Likewise.
10565 * config/mips/fbsd.mh: Likewise.
10566 * config/mips/linux.mh: Likewise.
10567 * config/mips/nbsd.mh: Likewise.
10568 * config/mips/obsd64.mh: Likewise.
10569 * config/pa/linux.mh: Likewise.
10570 * config/pa/nbsd.mh: Likewise.
10571 * config/pa/obsd.mh: Likewise.
10572 * config/powerpc/aix.mh: Likewise.
10573 * config/powerpc/fbsd.mh: Likewise.
10574 * config/powerpc/linux.mh: Likewise.
10575 * config/powerpc/nbsd.mh: Likewise.
10576 * config/powerpc/obsd.mh: Likewise.
10577 * config/powerpc/ppc64-linux.mh: Likewise.
10578 * config/powerpc/spu-linux.mh: Likewise.
10579 * config/s390/linux.mh: Likewise.
10580 * config/sh/nbsd.mh: Likewise.
10581 * config/sparc/fbsd.mh: Likewise.
10582 * config/sparc/linux.mh: Likewise.
10583 * config/sparc/linux64.mh: Likewise.
10584 * config/sparc/nbsd64.mh: Likewise.
10585 * config/sparc/nbsdelf.mh: Likewise.
10586 * config/sparc/obsd64.mh: Likewise.
10587 * config/sparc/sol2.mh: Likewise.
10588 * config/tilegx/linux.mh: Likewise.
10589 * config/vax/nbsdelf.mh: Likewise.
10590 * config/vax/obsd.mh: Likewise.
10591 * config/xtensa/linux.mh: Likewise.
10592 * config/i386/i386gnu.mn: New file, with excerpts from
10593 "config/i386/i386gnu.mh".
10594 * configure: Regenerate.
10595 * configure.ac: Rewrite code to use "gdb/configure.nat" instead of
10596 *.mh files under "gdb/config".
10597 * configure.nat: New file, with contents from the
10598 "gdb/config/*/*.mh" files.
10599
10600 2017-05-05 Tim Wiederhake <tim.wiederhake@intel.com>
10601
10602 * btrace.c (btrace_clear): Free insn vector.
10603
10604 2017-05-05 Pedro Alves <palves@redhat.com>
10605
10606 * warning.m4 (build_warnings): Add -Wno-error=maybe-uninitialized.
10607 * configure: Regenerate.
10608
10609 2017-05-04 Pedro Alves <palves@redhat.com>
10610
10611 * Makefile.in (SFILES): Add progspace-and-thread.c.
10612 (HFILES_NO_SRCDIR): Add progspace-and-thread.h.
10613 (COMMON_OBS): Add progspace-and-thread.o.
10614 * breakpoint.c: Include "progspace-and-thread.h".
10615 (update_inserted_breakpoint_locations)
10616 (insert_breakpoint_locations, create_longjmp_master_breakpoint):
10617 Use scoped_restore_current_pspace_and_thread.
10618 (create_std_terminate_master_breakpoint): Use
10619 scoped_restore_current_program_space.
10620 (remove_breakpoint): Use scoped_restore_current_pspace_and_thread.
10621 (print_breakpoint_location): Use
10622 scoped_restore_current_program_space.
10623 (bp_loc_is_permanent): Use
10624 scoped_restore_current_pspace_and_thread.
10625 (resolve_sal_pc): Use scoped_restore_current_pspace_and_thread.
10626 (download_tracepoint_locations): Use
10627 scoped_restore_current_pspace_and_thread.
10628 (breakpoint_re_set): Use scoped_restore_current_pspace_and_thread.
10629 * exec.c (exec_close_1): Use scoped_restore_current_program_space.
10630 (enum step_over_calls_kind): Moved from inferior.h.
10631 (class scoped_restore_current_thread): New class.
10632 * gdbthread.h (make_cleanup_restore_current_thread): Delete
10633 declaration.
10634 (scoped_restore_current_thread): New class.
10635 * infcmd.c: Include "common/gdb_optional.h".
10636 (continue_1, proceed_after_attach): Use
10637 scoped_restore_current_thread.
10638 (notice_new_inferior): Use scoped_restore_current_thread.
10639 * inferior.c: Include "progspace-and-thread.h".
10640 (restore_inferior, save_current_inferior): Delete.
10641 (add_inferior_command, clone_inferior_command): Use
10642 scoped_restore_current_pspace_and_thread.
10643 * inferior.h (scoped_restore_current_inferior): New class.
10644 * infrun.c: Include "progspace-and-thread.h" and
10645 "common/gdb_optional.h".
10646 (follow_fork_inferior): Use
10647 scoped_restore_current_pspace_and_thread.
10648 (scoped_restore_exited_inferior): New class.
10649 (handle_vfork_child_exec_or_exit): Use
10650 scoped_restore_exited_inferior,
10651 scoped_restore_current_pspace_and_thread,
10652 scoped_restore_current_thread and scoped_restore.
10653 (fetch_inferior_event): Use scoped_restore_current_thread.
10654 * linespec.c (decode_line_full, decode_line_1): Use
10655 scoped_restore_current_program_space.
10656 * mi/mi-main.c: Include "progspace-and-thread.h".
10657 (exec_continue): Use scoped_restore_current_thread.
10658 (mi_cmd_exec_run): Use scoped_restore_current_pspace_and_thread.
10659 (mi_cmd_trace_frame_collected): Use scoped_restore_current_thread.
10660 * proc-service.c (ps_pglobal_lookup): Use
10661 scoped_restore_current_program_space.
10662 * progspace-and-thread.c: New file.
10663 * progspace-and-thread.h: New file.
10664 * progspace.c (release_program_space, clone_program_space): Use
10665 scoped_restore_current_program_space.
10666 (restore_program_space, save_current_program_space)
10667 (save_current_space_and_thread): Delete.
10668 (switch_to_program_space_and_thread): Moved to
10669 progspace-and-thread.c.
10670 * progspace.h (save_current_program_space)
10671 (save_current_space_and_thread): Delete declarations.
10672 (scoped_restore_current_program_space): New class.
10673 * remote.c (remote_btrace_maybe_reopen): Use
10674 scoped_restore_current_thread.
10675 * symtab.c: Include "progspace-and-thread.h".
10676 (skip_prologue_sal): Use scoped_restore_current_pspace_and_thread.
10677 * thread.c (print_thread_info_1): Use
10678 scoped_restore_current_thread.
10679 (struct current_thread_cleanup): Delete.
10680 (do_restore_current_thread_cleanup)
10681 (restore_current_thread_cleanup_dtor): Rename/convert both to ...
10682 (scoped_restore_current_thread::~scoped_restore_current_thread):
10683 ... this new dtor.
10684 (make_cleanup_restore_current_thread): Rename/convert to ...
10685 (scoped_restore_current_thread::scoped_restore_current_thread):
10686 ... this new ctor.
10687 (thread_apply_all_command): Use scoped_restore_current_thread.
10688 (thread_apply_command): Use scoped_restore_current_thread.
10689 * tracepoint.c (tdump_command): Use scoped_restore_current_thread.
10690 * varobj.c (value_of_root_1): Use scoped_restore_current_thread.
10691
10692 2017-05-04 Pedro Alves <palves@redhat.com>
10693
10694 * thread.c (make_cleanup_restore_current_thread): Move
10695 find_thread_ptid call before the is_stopped call. Assert that the
10696 thread is found. Replace is_stopped call by checking the thread's
10697 state directly. Remove unnecessary NULL-thread check.
10698
10699 2017-05-04 Pedro Alves <palves@redhat.com>
10700
10701 * corelow.c (thread_section_name): New class.
10702 (get_core_register_section, get_core_siginfo): Use it.
10703
10704 2017-05-04 Andreas Arnez <arnez@linux.vnet.ibm.com>
10705
10706 * corelow.c (sniff_core_bfd): Remove extra semicolon.
10707 (get_core_register_section): Remove xfree of NULL pointer.
10708
10709 2017-05-03 Alan Hayward <alan.hayward@arm.com>
10710
10711 * frv-linux-tdep.c (frv_linux_supply_gregset): Use raw_supply_zeroed.
10712 * regcache.c (regcache::raw_supply_zeroed): New function.
10713 * regcache.h (regcache::raw_supply_zeroed): New declaration.
10714
10715 2017-05-03 Simon Marchi <simon.marchi@ericsson.com>
10716
10717 * gdbarch.sh: Remove commented out definition of
10718 TARGET_CHAR_BIT.
10719 * gdbarch.h: Re-generate.
10720
10721 2017-05-03 Sergio Durigan Junior <sergiodj@redhat.com>
10722
10723 * configure: Regenerate.
10724
10725 2017-05-02 Simon Marchi <simon.marchi@ericsson.com>
10726
10727 * solib-target.c (solib_target_relocate_section_addresses):
10728 Remove num_section_bases, num_bases, segment_bases variables.
10729
10730 2017-05-02 Simon Marchi <simon.marchi@polymtl.ca>
10731
10732 * common/gdb_vecs.h (DEF_VEC_I (CORE_ADDR)): Remove.
10733
10734 2017-05-02 Simon Marchi <simon.marchi@polymtl.ca>
10735
10736 * solib-target.c: Include <vector>
10737 (struct lm_info_target) <~lm_info_target>: Remove.
10738 <segment_bases, section_bases>: Change type to
10739 std::vector<CORE_ADDR>.
10740 (library_list_start_segment, library_list_start_section,
10741 library_list_end_library,
10742 solib_target_relocate_section_addresses): Adjust.
10743
10744 2017-05-02 Simon Marchi <simon.marchi@polymtl.ca>
10745
10746 * gdbarch.sh (software_single_step): Change return type to
10747 std::vector<CORE_ADDR>.
10748 * gdbarch.c, gdbarch.h: Re-generate.
10749 * arch/arm-get-next-pcs.c (thumb_deal_with_atomic_sequence_raw):
10750 Adjust.
10751 (arm_deal_with_atomic_sequence_raw): Adjust.
10752 (thumb_get_next_pcs_raw): Adjust.
10753 (arm_get_next_pcs_raw): Adjust.
10754 (arm_get_next_pcs): Adjust.
10755 * arch/arm-get-next-pcs.h (arm_get_next_pcs): Adjust.
10756 * aarch64-tdep.c (aarch64_software_single_step): Adjust.
10757 * alpha-tdep.c (alpha_deal_with_atomic_sequence): Adjust.
10758 (alpha_software_single_step): Adjust.
10759 * alpha-tdep.h (alpha_software_single_step): Adjust.
10760 * arm-linux-tdep.c (arm_linux_software_single_step): Adjust.
10761 * arm-tdep.c (arm_software_single_step): Adjust.
10762 (arm_breakpoint_kind_from_current_state): Adjust.
10763 * arm-tdep.h (arm_software_single_step): Adjust.
10764 * breakpoint.c (insert_single_step_breakpoint): Adjust.
10765 * cris-tdep.c (cris_software_single_step): Adjust.
10766 * mips-tdep.c (mips_deal_with_atomic_sequence): Adjust.
10767 (micromips_deal_with_atomic_sequence): Adjust.
10768 (deal_with_atomic_sequence): Adjust.
10769 (mips_software_single_step): Adjust.
10770 * mips-tdep.h (mips_software_single_step): Adjust.
10771 * moxie-tdep.c (moxie_software_single_step): Adjust.
10772 * nios2-tdep.c (nios2_software_single_step): Adjust.
10773 * ppc-tdep.h (ppc_deal_with_atomic_sequence): Adjust.
10774 * rs6000-aix-tdep.c (rs6000_software_single_step): Adjust.
10775 * rs6000-tdep.c (ppc_deal_with_atomic_sequence): Adjust.
10776 * s390-linux-tdep.c (s390_software_single_step): Adjust.
10777 * sparc-tdep.c (sparc_software_single_step): Adjust.
10778 * spu-tdep.c (spu_software_single_step): Adjust.
10779 * tic6x-tdep.c (tic6x_software_single_step): Adjust.
10780
10781 2017-05-02 Simon Marchi <simon.marchi@polymtl.ca>
10782
10783 * gdbarch.sh: Use semi-colon as field separator instead of colon.
10784 * gdbarch.h: Re-generate.
10785
10786 2017-05-01 Tim Wiederhake <tim.wiederhake@intel.com>
10787
10788 * Makefile.in (SUBDIR_PYTHON_OBS): Add py-instruction.o.
10789 (SUBDIR_PYTHON_SRCS): Add py-instruction.c.
10790 * python/py-instruction.c, python/py-instruction.h: New file.
10791 * python/py-record.c: Add py-instruction.h include.
10792 (gdbpy_initialize_record): Make gdb.Instruction a super class of
10793 gdb.RecordInstruction.
10794 * python/python-internal.h: Add gdbpy_initialize_instruction
10795 declaration.
10796 * python/python.c (do_start_initialization): Add
10797 gdbpy_initialize_instruction.
10798
10799 2017-05-01 Tim Wiederhake <tim.wiederhake@intel.com>
10800
10801 * python/py-record-btrace.c (BTPY_REQUIRE_VALID_CALL, btpy_call_type):
10802 Remove.
10803 (btrace_func_from_recpy_func): New function.
10804 (btpy_call_new, btpy_number, btpy_hash, btpy_richcompare): Remove.
10805 (btpy_call_level, btpy_call_symbol, btpy_call_instructions,
10806 btpy_call_up, btpy_call_prev_sibling, btpy_call_next_sibling): Rename to ...
10807 (recpy_bt_func_level, recpy_bt_func_symbol, recpy_bt_func_instructions,
10808 recpy_bt_func_up, recpy_bt_func_prev, recpy_bt_func_next): This.
10809 Also, use new helper functions.
10810 (btpy_list_item): Use new helper functions.
10811 (recpy_bt_function_call_history): Use new type name.
10812 (btpy_call_getset): Remove.
10813 (gdbpy_initialize_btrace): Remove code to initialize
10814 gdb.BtraceFunctionCall.
10815 * python/py-record-btrace.h (recpy_bt_func_number, recpy_btb_func_level,
10816 recpy_btb_func_symbol, recpy_bt_func_instructions, recpy_bt_func_up,
10817 recpy_bt_func_prev, recpy_bt_func_next): New export.
10818 * python/py-record.c (recpy_func_type): New static object.
10819 (recpy_func_new, recpy_func_level, recpy_func_symbol,
10820 recpy_func_instructions, recpy_func_up, recpy_func_prev,
10821 recpy_func_next): New function.
10822 (recpy_element_hash, recpy_element_richcompare): Updated comment.
10823 (recpy_func_getset): New static object.
10824 (gdbpy_initialize_record): Add code to initialize gdb.RecordInstruction.
10825 * python/py-record.h (recpy_func_type, recpy_func_new): New export.
10826
10827 2017-05-01 Tim Wiederhake <tim.wiederhake@intel.com>
10828
10829 * python/py-record-btrace.c (BTPY_REQUIRE_VALID_INSN): Remove.
10830 (btpy_object, btpy_insn_type, btpy_new): Remove.
10831 (btpy_list_object): Use gdb.RecordInstruction type instead of
10832 gdb.BtraceInstruction type.
10833 (btrace_insn_from_recpy_insn): New function.
10834 (btpy_insn_or_gap_new): Adjust comment. Use recpy_insn_new instead of
10835 btpy_new.
10836 (btpy_call_new, btpy_list_item): Do not use btpy_new anymore.
10837 (btpy_number, btpy_hash, btpy_call_level, btpy_call_symbol,
10838 btpy_call_instructions, btpy_call_up, btpy_call_prev_sibling,
10839 btpy_call_next_sibling, btpy_richcompare): Use recpy_element_object
10840 instead of btpy_object.
10841 (btpy_insn_sal, btpy_insn_pc, btpy_insn_size, btpy_insn_is_speculative,
10842 btpy_insn_data, btpy_insn_decode): Rename to ...
10843 (recpy_bt_insn_sal, recpy_bt_insn_pc, recpy_bt_insn_size,
10844 recpy_bt_insn_is_speculative, recpy_bt_insn_data,
10845 recpy_bt_insn_decode): This. Also, use new helper functions.
10846 (btpy_list_position, recpy_bt_goto): Use recpy_element_object and
10847 recpy_insn_type.
10848 (btpy_insn_getset): Remove.
10849 (gdbpy_initialize_btrace): Remove code to initialize
10850 gdb.BtraceInstruction. Use recpy_element_object.
10851 * python/py-record-btrace.h (recpy_bt_insn_number, recpy_bt_insn_sal,
10852 recpy_bt_insn_pc, recpy_bt_insn_data, recpy_bt_insn_decoded,
10853 recpy_bt_insn_size, recpy_bt_insn_is_speculative): New export.
10854 * python/py-record.c (recpy_insn_type): New static object.
10855 (recpy_insn_new, recpy_insn_sal, recpy_insn_pc, recpy_insn_data,
10856 recpy_insn_decoded, recpy_insn_size, recpy_insn_is_speculative,
10857 recpy_element_number, recpy_element_hash, recpy_element_richcompare):
10858 New function.
10859 (recpy_insn_getset): New static object.
10860 (gdbpy_initialize_record): Initialize gdb.RecordInstruction.
10861 * python/py-record.h (recpy_element_object): New typedef.
10862 (recpy_insn_type, recpy_insn_new): New export.
10863
10864 2017-05-01 Tim Wiederhake <tim.wiederhake@intel.com>
10865
10866 * py-record-btrace.c (btpy_insn_new): Removed.
10867 (btpy_insn_or_gap_new): New function.
10868 (btpy_insn_error): Removed.
10869 (btpy_insn_sal, btpy_insn_pc, btpy_insn_size, btpy_insn_is_speculative,
10870 btpy_insn_data, btpy_insn_decode): Remove code path for gaps.
10871 (recpy_bt_replay_position, recpy_bt_begin, recpy_bt_end): Call
10872 btpy_insn_or_gap_new instead of btpy_insn_new.
10873 (btpy_insn_getset): Remove btpy_insn_error.
10874 * py-record.c (recpy_gap_type): New static object.
10875 (recpy_gap_object): New typedef.
10876 (recpy_gap_new, recpy_gap_number, recpy_gap_reason_code,
10877 recpy_gap_reason_string): New function.
10878 (recpy_gap_getset): New static object.
10879 (gdbpy_initialize_record): Initialize gdb.RecordGap type.
10880 * py-record.h (recpy_gap_new): New export.
10881
10882 2017-05-01 Tim Wiederhake <tim.wiederhake@intel.com>
10883
10884 * python/py-record.c (recpy_ptid): Remove.
10885 (recpy_record_getset): Remove recpy_ptid.
10886
10887 2017-05-01 Tim Wiederhake <tim.wiederhake@intel.com>
10888
10889 * btrace.c (btrace_fetch): Set inferior_ptid.
10890 * python/py-record-btrace.c: Add "py-record.h" include.
10891 (recpy_bt_format, recpy_bt_replay_position, recpy_bt_begin,
10892 recpy_bt_end, recpy_bt_instruction_history,
10893 recpy_bt_function_call_history, recpy_bt_goto): Use ptid stored
10894 in gdb.Record object instead of current ptid.
10895 * python/py-record.c: Include new "py-record.h" file.
10896 (recpy_record_object): Moved to py-record.h.
10897 * python/py-record.h: New file.
10898
10899 2017-05-01 Tim Wiederhake <tim.wiederhake@intel.com>
10900
10901 * python/py-record-btrace.c (BTPY_REQUIRE_VALID_INSN,
10902 BTPY_REQUIRE_VALID_CALL, recpy_bt_function_call_history): Fix
10903 indentation.
10904
10905 2017-05-01 Joel Brobecker <brobecker@adacore.com>
10906
10907 * MAINTAINERS: Move Daniel Jacobowitz and Mark Kettenis to
10908 the past maintainers section.
10909
10910 2017-04-28 Yao Qi <yao.qi@linaro.org>
10911
10912 * infcmd.c (get_return_value): Use regcache ctor, and remove
10913 cleanup.
10914
10915 2017-04-28 Yao Qi <yao.qi@linaro.org>
10916 Pedro Alves <palves@redhat.com>
10917
10918 * regcache.c (regcache::regcache): New tag dispatch ctor.
10919 (do_cooked_read): Moved above.
10920 (regcache_dup): Use the tag dispatch ctor..
10921 * regcache.h (regcache): Declare ctor, delete copy ctor and
10922 assignment operator, remove friend regcache_dup.
10923
10924 2017-04-28 Yao Qi <yao.qi@linaro.org>
10925
10926 * regcache.c (regcache_dup): Assert !src->m_readonly_p and
10927 call method save instead of regcache_cpy.
10928 * regcache.h (struct regcache): Make regcache_dup a friend.
10929
10930 2017-04-28 Yao Qi <yao.qi@linaro.org>
10931
10932 * regcache.c (struct regcache): Move to regcache.h
10933 (regcache::arch): New method.
10934 (regcache_get_ptid): Update.
10935 (get_regcache_arch): Call arch method.
10936 (get_regcache_aspace): Call method aspace.
10937 (register_buffer): Change it to method.
10938 (regcache_save): Change it to regcache::save.
10939 (regcache_restore): Likewise.
10940 (regcache_cpy_no_passthrough): Remove the declaration.
10941 (regcache_cpy): Call methods restore and cpy_no_passthrough.
10942 (regcache_cpy_no_passthrough): Change it to method
10943 cpy_no_passthrough.
10944 (regcache_register_status): Change it to method
10945 get_register_status.
10946 (regcache_invalidate): Change it to method invalidate.
10947 (regcache_thread_ptid_changed): Use methods ptid and set_ptid.
10948 (regcache_raw_update): Change it to method raw_update.
10949 (regcache_raw_read): Likewise.
10950 (regcache_raw_read_signed): Likewise.
10951 (regcache_raw_read_unsigned): Likewise.
10952 (regcache_raw_write_signed): Likewise.
10953 (regcache_raw_write_unsigned): Likewise.
10954 (regcache_cooked_read): Likewise.
10955 (regcache_cooked_read_value): Likewise.
10956 (regcache_cooked_read_signed): Likewise.
10957 (regcache_cooked_read_unsigned): Likewise.
10958 (regcache_cooked_write_signed): Likewise.
10959 (regcache_cooked_write_unsigned): Likewise.
10960 (regcache_raw_set_cached_value): Likewise.
10961 (regcache_raw_write): Likewise.
10962 (regcache_cooked_write): Likewise.
10963 (regcache_xfer_part): Likewise.
10964 (regcache_raw_read_part): Likewise.
10965 (regcache_raw_write_part): Likewise.
10966 (regcache_cooked_read_part): Likewise.
10967 (regcache_cooked_write_part): Likewise.
10968 (regcache_raw_supply): Likewise.
10969 (regcache_raw_collect): Likewise.
10970 (regcache_transfer_regset): Likewise.
10971 (regcache_supply_regset): Likewise.
10972 (regcache_collect_regset): Likewise.
10973 (regcache_debug_print_register): Likewise.
10974 (enum regcache_dump_what): Move it to regcache.h.
10975 (regcache_dump): Change it to method dump.
10976 * regcache.h (enum regcache_dump_what): New.
10977 (class regcache): New.
10978 * target.c (target_fetch_registers): Call method
10979 debug_print_register.
10980 (target_store_registers): Likewise.
10981
10982 2017-04-28 Simon Marchi <simon.marchi@ericsson.com>
10983
10984 * windows-nat.c (struct lm_info_windows): Initialize field.
10985 (windows_make_so): Allocate lm_info_windows with new.
10986 (windows_free_so): Free lm_info_windows with delete.
10987
10988 2017-04-28 Simon Marchi <simon.marchi@ericsson.com>
10989
10990 * solib-darwin.c (struct lm_info_darwin): Initialize field.
10991 (darwin_current_sos): Allocate lm_info_darwin with new, remove
10992 cleanup.
10993 (darwin_free_so): Free lm_info_darwin with delete.
10994
10995 2017-04-28 Simon Marchi <simon.marchi@ericsson.com>
10996
10997 * solib-svr4.h (struct lm_info_svr4): Initialize fields.
10998 <l_addr_p>: Change type to bool.
10999 * solib-svr4.c (lm_info_read): Allocate lm_info_svr4 with new.
11000 (svr4_free_so): Free lm_info_svr4 with delete.
11001 (svr4_copy_library_list): Replace memcpy with call to copy
11002 constructor.
11003 (library_list_start_library, svr4_default_sos): Allocate
11004 lm_info_svr4 with new.
11005
11006 2017-04-28 Simon Marchi <simon.marchi@ericsson.com>
11007
11008 * solib-target.c (struct lm_info_target): Add destructor,
11009 initialize fields.
11010 <name>: Change type to std::string.
11011 (library_list_start_library): Allocate lm_info_target with new.
11012 (solib_target_free_library_list): Free lm_info_target with
11013 delete.
11014 (solib_target_current_sos): Adapt to std::string.
11015 (solib_target_free_so): Free lm_info_target with delete.
11016
11017 2017-04-28 Simon Marchi <simon.marchi@ericsson.com>
11018
11019 * solib-frv.c (struct lm_info_frv): Add destructor, initialize
11020 fields.
11021 (frv_current_sos): Allocate lm_info_frv with new.
11022 (frv_relocate_main_executable): Free lm_info_frv with delete,
11023 allocate with new.
11024 (frv_clear_solib, frv_free_so): Free lm_info_frv with delete.
11025
11026 2017-04-28 Simon Marchi <simon.marchi@ericsson.com>
11027
11028 * solib-frv.c (struct lm_info_frv): Fix indentation.
11029
11030 2017-04-28 Simon Marchi <simon.marchi@ericsson.com>
11031
11032 * solib-dsbt.c (struct lm_info_dsbt): Add destructor, initialize
11033 map field.
11034 (dsbt_current_sos): Allocate lm_info_dsbt with new.
11035 (dsbt_relocate_main_executable): Free lm_info_dsbt with delete
11036 and allocate with new.
11037 (dsbt_clear_solib, dsbt_free_so): Free lm_info_dsbt with delete.
11038
11039 2017-04-28 Simon Marchi <simon.marchi@ericsson.com>
11040
11041 * solib-aix.c (struct lm_info_aix): Initialize fields in-class.
11042 <filename, member_name>: Change type to std::string.
11043 (solib_aix_new_lm_info, solib_aix_xfree_lm_info): Remove.
11044 (library_list_start_library): Allocate lm_info_aix with new.
11045 (solib_aix_free_library_list, solib_aix_free_so): Free with delete.
11046 (solib_aix_current_sos): Adapt to std::string, copy lm_info_aix
11047 with copy constructor.
11048
11049 2017-04-28 Simon Marchi <simon.marchi@ericsson.com>
11050
11051 * solist.h (struct lm_info): Remove.
11052 (struct lm_info_base): New class.
11053 (struct so_list) <lm_info>: Change type to lm_info_base *.
11054 * nto-tdep.c (struct lm_info): Remove.
11055 (lm_addr): Adjust.
11056 * solib-aix.c (struct lm_info): Rename to ...
11057 (struct lm_info_aix): ... this. Extend lm_info_base.
11058 (lm_info_p): Rename to ...
11059 (lm_info_aix_p): ... this, and adjust.
11060 (solib_aix_new_lm_info, solib_aix_xfree_lm_info,
11061 solib_aix_parse_libraries, library_list_start_library,
11062 solib_aix_free_library_list, solib_aix_parse_libraries,
11063 solib_aix_get_library_list,
11064 solib_aix_relocate_section_addresses, solib_aix_free_so,
11065 solib_aix_get_section_offsets,
11066 solib_aix_solib_create_inferior_hook, solib_aix_current_sos):
11067 Adjust.
11068 (struct solib_aix_inferior_data) <library_list>: Adjust.
11069 * solib-darwin.c (struct lm_info): Rename to ...
11070 (struct lm_info_darwin): ... this. Extend lm_info_base.
11071 (darwin_current_sos, darwin_relocate_section_addresses): Adjust.
11072 * solib-dsbt.c (struct lm_info): Rename to ...
11073 (struct lm_info_dsbt): ... this. Extend lm_info_base.
11074 (struct dsbt_info) <main_executable_lm_info): Adjust.
11075 (dsbt_current_sos, dsbt_relocate_main_executable, dsbt_free_so,
11076 dsbt_relocate_section_addresses): Adjust.
11077 * solib-frv.c (struct lm_info): Rename to ...
11078 (struct lm_info_frv): ... this. Extend lm_info_base.
11079 (main_executable_lm_info): Adjust.
11080 (frv_current_sos, frv_relocate_main_executable, frv_free_so,
11081 frv_relocate_section_addresses, frv_fdpic_find_global_pointer,
11082 find_canonical_descriptor_in_load_object,
11083 frv_fdpic_find_canonical_descriptor): Adjust.
11084 * solib-svr4.c (struct lm_info): Move to solib-svr4.h, renamed
11085 to lm_info_svr4.
11086 (lm_info_read, lm_addr_check, svr4_keep_data_in_core,
11087 svr4_clear_so, svr4_copy_library_list,
11088 library_list_start_library, svr4_default_sos, svr4_read_so_list,
11089 svr4_current_sos, svr4_fetch_objfile_link_map,
11090 solist_update_incremental): Adjust.
11091 * solib-svr4.h (struct lm_info_svr4): Move here from
11092 solib-svr4.c.
11093 * solib-target.c (struct lm_info): Rename to ...
11094 (struct lm_info_target): ... this. Extend lm_info_base.
11095 (lm_info_p): Rename to ...
11096 (lm_info_target_p): ... this.
11097 (solib_target_parse_libraries, library_list_start_segment,
11098 library_list_start_section, library_list_start_library,
11099 library_list_end_library, solib_target_free_library_list,
11100 solib_target_current_sos, solib_target_free_so,
11101 solib_target_relocate_section_addresses): Adjust.
11102 * windows-nat.c (struct lm_info): Rename to ...
11103 (struct lm_info_windows): ... this. Extend lm_info_base.
11104 (windows_make_so, handle_load_dll, handle_unload_dll,
11105 windows_xfer_shared_libraries): Adjust.
11106
11107 2017-04-28 Simon Marchi <simon.marchi@ericsson.com>
11108
11109 * solib-darwin.c (struct darwin_so_list): Remove.
11110 (darwin_current_sos): Allocate an so_list object instead of a
11111 darwin_so_list, separately allocate an lm_info object.
11112 (darwin_free_so): Free lm_info.
11113
11114 2017-04-28 John Baldwin <jhb@FreeBSD.org>
11115
11116 * mips-tdep.c (print_gp_register_row): Replace printf_filtered
11117 with fprintf_filtered.
11118
11119 2017-04-28 Yao Qi <yao.qi@linaro.org>
11120
11121 * regcache.c (regcache::regcache): New function.
11122 (regcache::~regcache): New function.
11123 (regcache_xmalloc_1): Remove.
11124 (regcache_xmalloc): Call new regcache.
11125 (regcache_xfree): Call delete regcache.
11126 (get_thread_arch_aspace_regcache): Call new regcache.
11127
11128 2017-04-28 Yao Qi <yao.qi@linaro.org>
11129
11130 * mips-linux-nat.c (mips_linux_new_thread): Use ptid method
11131 lwp instead of ptid_get_lwp.
11132
11133 2017-04-28 Yao Qi <yao.qi@linaro.org>
11134
11135 * mips-linux-nat.c (mips_linux_new_thread): Get lwpid from
11136 lwp_info instead of getting from inferior_ptid.
11137
11138 2017-04-27 Keith Seitz <keiths@redhat.com>
11139
11140 * gdbtypes.c (LVALUE_REFERENCE_TO_RVALUE_BINDING_BADNESS)
11141 DIFFERENT_REFERENCE_TYPE_BADNESS): Remove.
11142 (CV_CONVERSION_BADNESS): Define.
11143 (rank_one_type): Remove overly restrictive rvalue reference
11144 rank checks.
11145 Add cv-qualifier checks and subranks for type equality.
11146 * gdbtypes.h (REFERENCE_CONVERSION_RVALUE,
11147 REFERENCE_CONVERSION_CONST_LVALUE, CV_CONVERSION_BADNESS,
11148 CV_CONVERSION_CONST, CV_CONVERSION_VOLATILE): Declare.
11149
11150 2017-04-27 Simon Marchi <simon.marchi@ericsson.com>
11151
11152 * python/py-inferior.c (inferior_to_inferior_object): Increment reference
11153 count when creating the object.
11154
11155 2017-04-27 Sangamesh Mallayya <sangamesh.swamy@in.ibm.com>
11156 Ulrich Weigand <uweigand@de.ibm.com>
11157
11158 * xcoffread.c (read_xcoff_symtab): Read correct function auxiliary
11159 entry if xlc -qfuncsect or gcc -ffunction-sections compiler option
11160 is used in AIX.
11161 (read_xcoff_symtab): Handle C_WEAKEXT storage class.
11162 (process_xcoff_symbol): Likewise.
11163 (scan_xcoff_symtab): Likewise.
11164
11165 2017-04-26 Alan Hayward <alan.hayward@arm.com>
11166
11167 * ia64-tdep.c (examine_prologue): Use get_frame_register_unsigned.
11168 (ia64_sigtramp_frame_prev_register): Use read_memory_unsigned_integer.
11169 (ia64_access_reg): Use get_frame_register_unsigned.
11170 (ia64_access_rse_reg): Likewise.
11171 (ia64_libunwind_frame_prev_register): Likewise.
11172
11173 2017-04-26 Jiong Wang <jiong.wang@arm.com>
11174
11175 * gdbarch.sh: New gdbarch method execute_dwarf_cfa_vendor_op.
11176 * gdbarch.c: Regenerated.
11177 * gdbarch.h: Regenerated.
11178 * dwarf2-frame.c (dwarf2_frame_state_alloc_regs): Made the
11179 visibility external.
11180 (execute_cfa_program): Call execute_dwarf_cfa_vendor_op for CFI
11181 between DW_CFA_lo_user and DW_CFA_high_user inclusive.
11182 (enum cfa_how_kind): Move to ...
11183 (struct dwarf2_frame_state_reg_info): Likewise.
11184 (struct dwarf2_frame_state): Likewise.
11185 * dwarf2-frame.h: ... here.
11186 (dwarf2_frame_state_alloc_regs): New declaration.
11187 * sparc-tdep.c (sparc_execute_dwarf_cfa_vendor_op): New function.
11188 (sparc32_gdbarch_init): Register execute_dwarf_cfa_vendor_op hook.
11189
11190 2017-04-26 Alan Hayward <alan.hayward@arm.com>
11191
11192 * xtensa-tdep.c (xtensa_pseudo_register_read): Use
11193 regcache_raw_read_unsigned.
11194 (xtensa_pseudo_register_write): Likewise.
11195
11196 2017-04-26 Alan Hayward <alan.hayward@arm.com>
11197
11198 * nds32-tdep.c (nds32_pseudo_register_read): Abort on errors.
11199 (nds32_pseudo_register_write): Likewise.
11200
11201 2017-04-25 Yao Qi <yao.qi@linaro.org>
11202
11203 * regcache.c (struct regcache) <readonly_p>: Change its type
11204 to bool.
11205 (regcache_xmalloc_1): Update parameter type and callers update.
11206
11207 2017-04-25 Yao Qi <yao.qi@linaro.org>
11208
11209 * aarch64-tdep.c (aarch64_gdbarch_init): Don't call
11210 set_gdbarch_wchar_bit.
11211 * arm-tdep.c (arm_gdbarch_init): Likewise.
11212
11213 2017-04-25 Pedro Alves <palves@redhat.com>
11214
11215 * common/poison.h [!HAVE_IS_TRIVIALLY_COPYABLE] (IsRelocatable)
11216 (BothAreRelocatable, memcopy, memmove): Don't define.
11217 * common/traits.h (__has_feature, HAVE_IS_TRIVIALLY_COPYABLE): New
11218 macros.
11219
11220 2017-04-25 Pedro Alves <palves@redhat.com>
11221
11222 * common/common-defs.h: Include "common/poison.h".
11223 * common/function-view.h: (Not, Or, Requires): Move to traits.h
11224 and adjust.
11225 * common/poison.h: New file.
11226 * common/traits.h: Include <type_traits>.
11227 (Not, Or, Requires): New, moved from common/function-view.h.
11228
11229 2017-04-25 Pedro Alves <palves@redhat.com>
11230
11231 * breakpoint.h (struct breakpoint): In-class initialize all
11232 fields. Make boolean fields "bool".
11233 * breakpoint.c (init_raw_breakpoint_without_location): Remove
11234 memset call and initializations no longer necessary.
11235
11236 2017-04-25 Pedro Alves <palves@redhat.com>
11237
11238 * btrace.c (pt_btrace_insn_flags): Change parameter type to
11239 reference.
11240 (pt_btrace_insn): New function.
11241 (ftrace_add_pt): Remove memset call and use pt_btrace_insn.
11242
11243 2017-04-25 Pedro Alves <palves@redhat.com>
11244
11245 * ada-lang.c (ada_catchpoint_location): Now a "class". Remove
11246 "base" field and inherit from "bp_location" instead. Add
11247 non-default ctor.
11248 (allocate_location_exception): Use new non-default ctor.
11249 * breakpoint.c (get_first_locp_gte_addr): Remove memset call.
11250 (init_bp_location): Convert to ...
11251 (bp_location::bp_location): ... this new ctor, and remove memset
11252 call.
11253 (base_breakpoint_allocate_location): Use the new non-default ctor.
11254 * breakpoint.h (bp_location): Now a class. Declare default and
11255 non-default ctors. In-class initialize all members.
11256 (init_bp_location): Remove declaration.
11257
11258 2017-04-25 Pedro Alves <palves@redhat.com>
11259
11260 * common/enum-flags.h (enum_flags): Don't implement copy ctor and
11261 assignment operator.
11262
11263 2017-04-24 Yao Qi <yao.qi@linaro.org>
11264
11265 * doublest.c (convert_doublest_to_floatformat): Call
11266 floatformat_totalsize_bytes.
11267
11268 2017-04-22 Tom Tromey <tom@tromey.com>
11269
11270 * mi/mi-cmd-file.c (mi_cmd_file_list_shared_libraries): Use
11271 ui_out_emit_list.
11272 * stack.c (print_frame): Use ui_out_emit_list.
11273 * mi/mi-symbol-cmds.c (mi_cmd_symbol_list_lines): Use
11274 ui_out_emit_list.
11275 * mi/mi-main.c (print_one_inferior)
11276 (mi_cmd_data_list_register_names)
11277 (mi_cmd_data_list_register_values, mi_cmd_list_features)
11278 (mi_cmd_list_target_features, mi_cmd_trace_frame_collected): Use
11279 ui_out_emit_list.
11280 * mi/mi-interp.c (mi_on_normal_stop_1): Use ui_out_emit_list.
11281 (mi_output_solib_attribs): Use ui_out_emit_list,
11282 ui_out_emit_tuple.
11283 * mi/mi-cmd-var.c (varobj_update_one): Use ui_out_emit_list.
11284 * mi/mi-cmd-stack.c (mi_cmd_stack_list_frames)
11285 (mi_cmd_stack_list_args, list_args_or_locals): Use
11286 ui_out_emit_list.
11287 * disasm.c (do_assembly_only): Use ui_out_emit_list.
11288 * breakpoint.c (print_solib_event, output_thread_groups): Use
11289 ui_out_emit_list.
11290
11291 2017-04-22 Tom Tromey <tom@tromey.com>
11292
11293 * mi/mi-main.c (print_variable_or_computed): Use ui_out_emit_tuple.
11294 * mi/mi-cmd-var.c (varobj_update_one): Use ui_out_emit_tuple.
11295 * mi/mi-cmd-stack.c (list_arg_or_local): Use ui_out_emit_tuple.
11296
11297 2017-04-22 Tom Tromey <tom@tromey.com>
11298
11299 * tracepoint.c (tvariables_info_1)
11300 (print_one_static_tracepoint_marker): Use ui_out_emit_tuple.
11301
11302 2017-04-22 Tom Tromey <tom@tromey.com>
11303
11304 * stack.c (print_frame_arg): Use ui_out_emit_tuple,
11305 annotate_arg_emitter.
11306 * breakpoint.c (print_mention_watchpoint)
11307 (print_mention_masked_watchpoint): Use ui_out_emit_tuple.
11308 * annotate.h (struct annotate_arg_emitter): New.
11309
11310 2017-04-22 Tom Tromey <tom@tromey.com>
11311
11312 * record-btrace.c (record_btrace_insn_history)
11313 (record_btrace_insn_history_range, record_btrace_call_history)
11314 (record_btrace_call_history_range): Use ui_out_emit_tuple.
11315 * thread.c (do_captured_list_thread_ids, print_thread_info_1): Use
11316 ui_out_emit_tuple.
11317 * stack.c (print_frame_info): Use ui_out_emit_tuple.
11318 * solib.c (info_sharedlibrary_command): Use ui_out_emit_tuple.
11319 * skip.c (skip_info): Use ui_out_emit_tuple.
11320 * remote.c (show_remote_cmd): Use ui_out_emit_tuple.
11321 * progspace.c (print_program_space): Use ui_out_emit_tuple.
11322 * probe.c (info_probes_for_ops): Use ui_out_emit_tuple.
11323 * osdata.c (info_osdata): Use ui_out_emit_tuple.
11324 * mi/mi-symbol-cmds.c (mi_cmd_symbol_list_lines): Use
11325 ui_out_emit_tuple.
11326 * mi/mi-main.c (print_one_inferior, list_available_thread_groups)
11327 (output_register, mi_cmd_data_read_memory)
11328 (mi_cmd_data_read_memory_bytes, mi_load_progress)
11329 (mi_cmd_trace_frame_collected): Use ui_out_emit_tuple.
11330 * mi/mi-cmd-var.c (mi_cmd_var_list_children, varobj_update_one):
11331 Use ui_out_emit_tuple.
11332 * mi/mi-cmd-stack.c (mi_cmd_stack_list_args): Use
11333 ui_out_emit_tuple.
11334 * mi/mi-cmd-info.c (mi_cmd_info_ada_exceptions)
11335 (mi_cmd_info_gdb_mi_command): Use ui_out_emit_tuple.
11336 * linux-thread-db.c (info_auto_load_libthread_db): Use
11337 ui_out_emit_tuple.
11338 * inferior.c (print_inferior): Use ui_out_emit_tuple.
11339 * gdb_bfd.c (print_one_bfd): Use ui_out_emit_tuple.
11340 * disasm.c (do_mixed_source_and_assembly_deprecated)
11341 (do_mixed_source_and_assembly): Use ui_out_emit_tuple.
11342 * cp-abi.c (list_cp_abis): Use ui_out_emit_tuple.
11343 * cli/cli-setshow.c (cmd_show_list): Use ui_out_emit_tuple.
11344 * breakpoint.c (print_one_breakpoint_location)
11345 (print_one_breakpoint): Use ui_out_emit_tuple.
11346 * auto-load.c (print_script, info_auto_load_cmd): Use
11347 ui_out_emit_tuple.
11348 * ada-tasks.c (print_ada_task_info): Use ui_out_emit_tuple.
11349
11350 2017-04-21 Simon Marchi <simon.marchi@ericsson.com>
11351
11352 * thread.c (print_thread_info_1): Remove dead code.
11353
11354 2017-04-21 Jan Kratochvil <jan.kratochvil@redhat.com>
11355
11356 * aarch64-tdep.c (selftests::aarch64_process_record_test): Make it #if
11357 GDB_SELF_TEST.
11358 * arm-tdep.c (selftests::arm_record_test): Likewise.
11359
11360 2017-04-21 Yao Qi <yao.qi@linaro.org>
11361
11362 * regcache.c (regcache_restore): Remove argument 2. Replace
11363 argument 3 with regcache. Get register status from
11364 src->register_status and get register contents from
11365 register_buffer (src, regnum).
11366 (regcache_cpy): Update.
11367
11368 2017-04-19 Pedro Alves <palves@redhat.com>
11369
11370 * gdbthread.h (thread): Add missing closing parenthesis in
11371 comment.
11372
11373 2017-04-19 Pedro Alves <palves@redhat.com>
11374
11375 * common/refcounted-object.h: New file.
11376 * gdbthread.h: Include "common/refcounted-object.h".
11377 (thread_info): Inherit from refcounted_object and add comments.
11378 (thread_info::incref, thread_info::decref)
11379 (thread_info::m_refcount): Delete.
11380 (thread_info::deletable): Use the refcounted_object::refcount()
11381 method.
11382 * inferior.c (current_inferior_): Add comment.
11383 (set_current_inferior): Increment/decrement refcounts.
11384 (prune_inferiors, remove_inferior_command): Skip inferiors marked
11385 not-deletable instead of comparing with the current inferior.
11386 (initialize_inferiors): Increment the initial inferior's refcount.
11387 * inferior.h (struct inferior): Forward declare.
11388 Include "common/refcounted-object.h".
11389 (current_inferior, set_current_inferior): Move declaration to
11390 before struct inferior's definition, and fix comment.
11391 (inferior): Inherit from refcounted_object. Add comments.
11392 * thread.c (switch_to_thread_no_regs): Reference the thread's
11393 inferior pointer directly instead of doing a ptid lookup.
11394 (switch_to_no_thread): New function.
11395 (switch_to_thread(thread_info *)): New function, factored out
11396 from ...
11397 (switch_to_thread(ptid_t)): ... this.
11398 (restore_current_thread): Delete.
11399 (current_thread_cleanup): Remove 'inf_id' and 'was_removable'
11400 fields, and add 'inf' field.
11401 (do_restore_current_thread_cleanup): Check whether old->inf is
11402 alive instead of looking up an inferior by ptid. Use
11403 switch_to_thread and switch_to_no_thread.
11404 (restore_current_thread_cleanup_dtor): Use old->inf directly
11405 instead of lookup up an inferior by id. Decref the inferior.
11406 Don't restore 'removable'.
11407 (make_cleanup_restore_current_thread): Same the inferior pointer
11408 in old, instead of the inferior number. Incref the inferior.
11409 Don't save/clear 'removable'.
11410
11411 2017-04-19 Pedro Alves <palves@redhat.com>
11412
11413 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
11414 unittests/scoped_restore-selftests.c.
11415 (SUBDIR_UNITTESTS_OBS): Add scoped_restore-selftests.o.
11416 * common/scoped_restore.h (scoped_restore_base): Make "class".
11417 (scoped_restore_base::release): New public method.
11418 (scoped_restore_base::scoped_restore_base): New protected ctor.
11419 (scoped_restore_base::m_saved_var): New protected field.
11420 (scoped_restore_tmpl::scoped_restore_tmpl(T*)): Initialize the
11421 scoped_restore_base base class instead of m_saved_var directly.
11422 (scoped_restore_tmpl::scoped_restore_tmpl(T*, T2)): Likewise.
11423 (scoped_restore_tmpl::scoped_restore_tmpl(const
11424 scoped_restore_tmpl<T>&)): Likewise.
11425 (scoped_restore_tmpl::~scoped_restore_tmpl): Use the saved_var
11426 method.
11427 (scoped_restore_tmpl::saved_var): New method.
11428 (scoped_restore_tmpl::m_saved_var): Delete.
11429 * inferior.h (inferior::detaching): Now a bool.
11430 * infrun.c (prepare_for_detach): Use a scoped_restore instead of a
11431 cleanup.
11432 * unittests/scoped_restore-selftests.c: New file.
11433
11434 2017-04-19 Pedro Alves <palves@redhat.com>
11435
11436 * Makefile.in (SUBDIR_UNITTESTS_SRCS, SUBDIR_UNITTESTS_OBS):
11437 Re-sort in alphabetic order.
11438
11439 2017-04-18 Pedro Alves <palves@redhat.com>
11440
11441 * xml-support.c (obstack_xml_printf): Delete.
11442 * xml-support.h (obstack_xml_printf): Delete.
11443
11444 2017-04-18 Pedro Alves <palves@redhat.com>
11445
11446 * xml-support.c (gdb_xml_parser) <use_dtd, dtd_name, parse,
11447 vdebug, verror, body_text, start_element, end_element, name,
11448 user_data, set_is_xinclude, set_error, expat_parser>: New methods.
11449 <name, user_data, expat_parser, scopes, error, last_line, dtd_name,
11450 is_xinclude>: Make private and add m_ prefix.
11451 (gdb_xml_parser::body_text): New method, based on ...
11452 (gdb_xml_body_text): ... this. Adjust.
11453 (gdb_xml_parser::vdebug): New method, based on ...
11454 (gdb_xml_debug): ... this. Adjust.
11455 (gdb_xml_parser::verror): New method, based on ...
11456 (gdb_xml_error): ... this. Adjust.
11457 (gdb_xml_parser::start_element): New method, based on ...
11458 (gdb_xml_start_element): ... this. Adjust.
11459 (gdb_xml_start_element_wrapper): Defer to
11460 gdb_xml_parser::start_element and gdb_xml_parser::set_error.
11461 (gdb_xml_parser::end_element): New method, based on ...
11462 (gdb_xml_end_element_wrapper): ... this. Adjust.
11463 (gdb_xml_parser::~gdb_xml_parser): Adjust.
11464 (gdb_xml_parser::gdb_xml_parser): Adjust to field renames.
11465 (gdb_xml_parser::use_dtd): New method, based on ...
11466 (gdb_xml_use_dtd): ... this. Adjust.
11467 (gdb_xml_parser::parse): New method, based on ...
11468 (gdb_xml_parse): ... this. Adjust.
11469 (gdb_xml_parse_quick): Adjust to call the parser's parse method.
11470 (xinclude_start_include): Adjust to call the parser's name method.
11471 (xml_xinclude_default, xml_xinclude_start_doctype)
11472 (xml_xinclude_end_doctype): Adjust to call the parser's user_data
11473 method.
11474 (xml_process_xincludes): Adjust to call parser methods.
11475 * xml-support.h (gdb_xml_use_dtd, gdb_xml_parse): Delete
11476 declarations.
11477
11478 2017-04-18 Pedro Alves <palves@redhat.com>
11479
11480 * tracefile-tfile.c (tfile_write_tdesc): Adjust to use
11481 gdb::optional<std::string>.
11482 * xml-support.c: Include <string>.
11483 (scope_level::scope_level(scope_level &&))
11484 (scope_level::~scope_level): Delete.
11485 (scope_level::body): Now a std::string.
11486 (gdb_xml_body_text, gdb_xml_end_element): Adjust.
11487 (xinclude_parsing_data::xinclude_parsing_data): Add 'output'
11488 parameter.
11489 (xinclude_parsing_data::~xinclude_parsing_data): Delete.
11490 (xinclude_parsing_data::output): Now a std::string reference.
11491 (xinclude_start_include): Adjust.
11492 (xml_xinclude_default): Adjust.
11493 (xml_process_xincludes): Add 'output' parameter, and return bool.
11494 * xml-support.h (xml_process_xincludes): Add 'output' parameter,
11495 and return bool.
11496 * xml-tdesc.c: Include <unordered_map> and <string>.
11497 (tdesc_xml_cache): Delete.
11498 (tdesc_xml_cache_s): Delete.
11499 (xml_cache): Now an std::unordered_map.
11500 (tdesc_parse_xml): Adjust to use std::string and unordered_map.
11501 (target_fetch_description_xml): Change return type to
11502 gdb::optional<std::string>, and adjust.
11503 * xml-tdesc.h: Include "common/gdb_optional.h" and <string>.
11504 (target_fetch_description_xml): Change return type to
11505 gdb::optional<std::string>.
11506
11507 2017-04-18 Pedro Alves <palves@redhat.com>
11508
11509 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
11510 unittests/optional-selftests.c.
11511 (SUBDIR_UNITTESTS_OBS): Add optional-selftests.o.
11512 * unittests/optional-selftests.c: New file.
11513 * unittests/optional/assignment/1.cc: New file.
11514 * unittests/optional/assignment/2.cc: New file.
11515 * unittests/optional/assignment/3.cc: New file.
11516 * unittests/optional/assignment/4.cc: New file.
11517 * unittests/optional/assignment/5.cc: New file.
11518 * unittests/optional/assignment/6.cc: New file.
11519 * unittests/optional/assignment/7.cc: New file.
11520 * unittests/optional/cons/copy.cc: New file.
11521 * unittests/optional/cons/default.cc: New file.
11522 * unittests/optional/cons/move.cc: New file.
11523 * unittests/optional/cons/value.cc: New file.
11524 * unittests/optional/in_place.cc: New file.
11525 * unittests/optional/observers/1.cc: New file.
11526 * unittests/optional/observers/2.cc: New file.
11527
11528 2017-04-18 Pedro Alves <palves@redhat.com>
11529
11530 * common/gdb_optional.h: Include common/traits.h.
11531 (in_place_t): New type.
11532 (in_place): New constexpr variable.
11533 (optional::optional): Remove member initialization of
11534 m_instantiated.
11535 (optional::optional(in_place_t...)): New constructor.
11536 (optional::~optional): Use reset.
11537 (optional::optional(const optional&)): New.
11538 (optional::optional(const optional&&)): New.
11539 (optional::optional(T &)): New.
11540 (optional::optional(T &&)): New.
11541 (operator::operator=(const optional &)): New.
11542 (operator::operator=(optional &&)): New.
11543 (operator::operator= (const T &))
11544 (operator::operator= (T &&))
11545 (operator::emplace (Args &&... args)): Return a T&. Use reset.
11546 (operator::reset): New.
11547 (operator::m_instantiated):: Add in-class initializer.
11548 * common/traits.h: Include <type_traits>.
11549 (struct And): New types.
11550
11551 2017-04-18 Pedro Alves <palves@redhat.com>
11552
11553 * xml-support.c: Include <vector>.
11554 (scope_level::scope_level(const gdb_xml_element *))
11555 (scope_level::scope_level(scope_level&&)): New.
11556 (scope_level::~scope_level): New.
11557 (scope_level_s): Delete.
11558 (gdb_xml_parser::scopes): Now a std::vector.
11559 (gdb_xml_body_text, gdb_xml_start_element, gdb_xml_end_element):
11560 Use std::vector.
11561 (gdb_xml_parser::~gdb_xml_parser): Remove now unnecessary
11562 scope cleanup code.
11563 (gdb_xml_parser::gdb_xml_parser): Remove explicit initialization
11564 of the scopes member. Use std::vector::emplace_back.
11565
11566 2017-04-18 Pedro Alves <palves@redhat.com>
11567
11568 * xml-support.c (gdb_xml_parser): Add ctor/dtor. Make is_xinclude
11569 a bool.
11570 (gdb_xml_end_element): Change type of first parameter.
11571 (gdb_xml_cleanup): Rename to ...
11572 (gdb_xml_parser::~gdb_xml_parser): ... this.
11573 (gdb_xml_create_parser_and_cleanup): Delete with ...
11574 (gdb_xml_parser::gdb_xml_parser): ... creation parts factored out
11575 to this new ctor.
11576 (gdb_xml_parse_quick): Create a local gdb_xml_parser instead of
11577 using gdb_xml_create_parser_and_cleanup.
11578 (xinclude_parsing_data): Add ctor/dtor.
11579 (xml_xinclude_cleanup): Delete.
11580 (xml_process_xincludes): Create a local xinclude_parsing_data
11581 instead of heap-allocating one. Create a local gdb_xml_parser
11582 instead of heap-allocating one with
11583 gdb_xml_create_parser_and_cleanup.
11584
11585 2017-04-18 John Baldwin <jhb@FreeBSD.org>
11586
11587 PR threads/20743
11588 * fbsd-nat.c (resume_one_thread_cb): Remove.
11589 (resume_all_threads_cb): Remove.
11590 (fbsd_resume): Use ALL_NON_EXITED_THREADS instead of
11591 iterate_over_threads.
11592
11593 2017-04-17 Joel Brobecker <brobecker@adacore.com>
11594
11595 * NEWS: Create a new section for the next release branch.
11596 Rename the section of the current branch, now that it has
11597 been cut.
11598
11599 2017-04-17 Joel Brobecker <brobecker@adacore.com>
11600
11601 GDB 8.0 branch created (725bf5cf125783c2a7ca4ab63d3768e220bab2db):
11602 * version.in: Bump version to 8.0.50.DATE-git.
11603
11604 2017-04-13 Sergio Durigan Junior <sergiodj@redhat.com>
11605
11606 PR gdb/21385
11607 * windows-nat.c (windows_create_inferior): Declare 'allargs'
11608 independently of the host, and fix build breakage on Cygwin.
11609
11610 2017-04-13 Pedro Alves <palves@redhat.com>
11611
11612 * inferior.c (free_inferior): Convert to ...
11613 (inferior::~inferior): ... this dtor.
11614 (inferior::inferior): New ctor, factored out from ...
11615 (add_inferior_silent): ... here. Allocate the inferior with a new
11616 expression.
11617 (delete_inferior): Call delete instead of free_inferior.
11618 * inferior.h (gdb_environ, continuation): Forward declare.
11619 (inferior): Now a class. Add in-class initialization to all
11620 members. Make boolean fields bool, except 'detaching'.
11621 (inferior::inferior): New explicit ctor.
11622 (inferior::~inferior): New.
11623
11624 2017-04-13 Pedro Alves <palves@redhat.com>
11625
11626 * inferior.c (init_inferior_list): Delete.
11627 * inferior.h (init_inferior_list): Delete.
11628
11629 2017-04-13 Pedro Alves <palves@redhat.com>
11630
11631 PR threads/13217
11632 * gdb.threads/threadapply.exp (thr_apply_detach): New procedure.
11633 (top level): Call it twice, with different thread sets.
11634
11635 2017-04-13 Pedro Alves <palves@redhat.com>
11636
11637 * thread.c: Include <algorithm>.
11638 (thread_array_cleanup): Delete.
11639 (scoped_inc_dec_ref): New class.
11640 (live_threads_count): New function.
11641 (set_thread_refcount): Delete.
11642 (tp_array_compar_ascending): Now a bool.
11643 (tp_array_compar): Convert to a std::sort comparison function.
11644 (thread_apply_all_command): Use std::vector and scoped_inc_dec_ref
11645 and live_threads_count.
11646
11647 2017-04-13 Pedro Alves <palves@redhat.com>
11648
11649 * infrun.c (follow_fork_inferior): Also switch the current
11650 inferior.
11651
11652 2017-04-13 Pedro Alves <palves@redhat.com>
11653
11654 * breakpoint.c (watch_command_1): Save watchpoint-frame info
11655 before calling create_internal_breakpoint.
11656
11657 2017-04-13 Pedro Alves <palves@redhat.com>
11658
11659 * fork-child.c (execv_argv): New class.
11660 (breakup_args): Refactored as ...
11661 (execv_argv::init_for_no_shell): .. this method of execv_argv.
11662 Copy arguments to storage and replace separators with NULL
11663 terminators in place.
11664 (escape_bang_in_quoted_argument): Adjust to return bool.
11665 (execv_argv::execv_argv): New ctor.
11666 (execv_argv::init_for_shell): New method, factored out from
11667 fork_inferior. Don't strdup strings into the vector.
11668 (fork_inferior): Eliminate "shell" local and use execv_argv. Use
11669 Remove free_vector_argv call.
11670
11671 2017-04-13 Yao Qi <yao.qi@linaro.org>
11672
11673 * rx-tdep.c (rx_fpsw_type): Check tdep->rx_fpsw_type instead of
11674 tdep->rx_psw_type.
11675
11676 2017-04-13 Yao Qi <yao.qi@linaro.org>
11677
11678 * rl78-tdep.c (rl78_gdbarch_init): Use XCNEW instead of XNEW.
11679 * rx-tdep.c (rx_gdbarch_init): Likewise.
11680
11681 2017-04-13 Pedro Alves <palves@redhat.com>
11682
11683 * breakpoint.h (struct breakpoint): Reindent.
11684
11685 2017-04-13 Pedro Alves <palves@redhat.com>
11686
11687 * breakpoint.c (bp_location): Rename to ...
11688 (bp_locations): ... this. All references updated.
11689 (bp_location_count): Rename to ...
11690 (bp_locations_count): ... this. All references updated.
11691 (bp_location_placed_address_before_address_max): Rename to ...
11692 (bp_locations_placed_address_before_address_max): ... this. All
11693 references updated.
11694 (bp_location_shadow_len_after_address_max): Rename to ...
11695 (bp_locations_shadow_len_after_address_max): ... this. All
11696 references updated.
11697 (bp_location_compare_addrs): Rename to ...
11698 (bp_locations_compare_addrs): ... this. All references updated.
11699 (bp_location_compare):Rename to ...
11700 (bp_locations_compare): ... this. All references updated.
11701 (bp_location_target_extensions_update): Rename to ...
11702 (bp_locations_target_extensions_update): ... this. All references
11703 updated.
11704
11705 2017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
11706
11707 * Makefile.in (HFILES_NO_SRCDIR): Add "common/gdb_termios.h".
11708 * common/common.m4: Check headers 'termios.h', 'termio.h' and
11709 'sgtty.h'.
11710 * common/gdb_termios.h: New file, with parts of "terminal.h".
11711 * inflow.c: Include "gdb_termios.h".
11712 * ser-unix.c: Include "gdb_termios.h".
11713 * terminal.h: Move terminal-related defines to
11714 "common/gdb_termios.h".
11715
11716 2017-04-12 Tom Tromey <tom@tromey.com>
11717
11718 * probe.c (parse_probes): Update.
11719 * location.h (delete_event_location): Don't declare.
11720 (event_location_deleter::operator()): Update.
11721 * location.c (event_location_deleter::operator()): Rename from
11722 delete_event_location.
11723 * linespec.h (linespec_result) <location>: Change type to
11724 event_location_up.
11725 * linespec.c (canonicalize_linespec, event_location_to_sals)
11726 (decode_objc): Update.
11727 (linespec_result): Don't call delete_event_location.
11728 * breakpoint.c (create_breakpoints_sal)
11729 (bkpt_probe_create_sals_from_location)
11730 (strace_marker_create_sals_from_location): Update.
11731
11732 2017-04-12 Tom Tromey <tom@tromey.com>
11733
11734 * linespec.h (struct linespec_result): Add constructor and
11735 destructor.
11736 (init_linespec_result, destroy_linespec_result)
11737 (make_cleanup_destroy_linespec_result): Don't declare.
11738 * linespec.c (init_linespec_result): Remove.
11739 (linespec_result::~linespec_result): Rename from
11740 destroy_linespec_result. Update.
11741 (cleanup_linespec_result, make_cleanup_destroy_linespec_result):
11742 Remove.
11743 * breakpoint.c (create_breakpoint, break_range_command)
11744 (decode_location_default): Update.
11745 * ax-gdb.c (agent_command_1): Update.
11746
11747 2017-04-12 Tom Tromey <tom@tromey.com>
11748
11749 * remote.c (remote_download_tracepoint): Update.
11750 * python/py-breakpoint.c (bppy_get_location): Update.
11751 * guile/scm-breakpoint.c (bpscm_print_breakpoint_smob)
11752 (gdbscm_breakpoint_location): Update.
11753 * elfread.c (elf_gnu_ifunc_resolver_return_stop): Update.
11754 * breakpoint.h (struct breakpoint) <location, location_range_end>:
11755 Change type to event_location_up.
11756 * breakpoint.c (create_overlay_event_breakpoint)
11757 (create_longjmp_master_breakpoint)
11758 (create_std_terminate_master_breakpoint)
11759 (create_exception_master_breakpoint)
11760 (breakpoint_event_location_empty_p, print_breakpoint_location)
11761 (print_one_breakpoint_location, create_thread_event_breakpoint)
11762 (init_breakpoint_sal, create_breakpoint)
11763 (print_recreate_ranged_breakpoint, break_range_command)
11764 (init_ada_exception_breakpoint, say_where): Update.
11765 (base_breakpoint_dtor): Don't call delete_event_location.
11766 (bkpt_print_recreate, tracepoint_print_recreate)
11767 (dprintf_print_recreate, update_static_tracepoint)
11768 (breakpoint_re_set_default): Update.
11769
11770 2017-04-12 Tom Tromey <tom@tromey.com>
11771
11772 * compile/compile-loc2c.c (compute_stack_depth_worker): Change
11773 type of "to_do". Update.
11774 (compute_stack_depth): Use std::vector.
11775
11776 2017-04-12 Tom Tromey <tom@tromey.com>
11777
11778 * printcmd.c (find_instruction_backward): Use std::vector.
11779
11780 2017-04-12 Tom Tromey <tom@tromey.com>
11781
11782 * symfile.c (objfilep): Remove typedef.
11783 (reread_symbols): Use a std::vector.
11784
11785 2017-04-12 Tom Tromey <tom@tromey.com>
11786
11787 * mi/mi-main.c (exec_direction_forward): Remove.
11788 (exec_reverse_continue, mi_execute_command): Use scoped_restore.
11789 * guile/scm-ports.c (ioscm_with_output_to_port_worker): Use
11790 scoped_restore.
11791 * guile/guile.c (guile_repl_command, guile_command)
11792 (gdbscm_execute_gdb_command): Use scoped_restore.
11793 * go-exp.y (go_parse): Use scoped_restore.
11794 * d-exp.y (d_parse): Use scoped_restore.
11795 * cli/cli-decode.c (cmd_func): Use scoped_restore.
11796 * c-exp.y (c_parse): Use scoped_restore.
11797
11798 2017-04-12 Tom Tromey <tom@tromey.com>
11799
11800 * mi/mi-parse.h (struct mi_parse): Add constructor, destructor.
11801 (mi_parse): Update return type.
11802 (mi_parse_free): Remove.
11803 * mi/mi-parse.c (mi_parse::mi_parse): New constructor.
11804 (mi_parse::~mi_parse): Rename from mi_parse_free.
11805 (mi_parse_cleanup): Remove.
11806 (mi_parse): Return a unique_ptr. Use new.
11807 * mi/mi-main.c (mi_execute_command): Update.
11808
11809 2017-04-12 Tom Tromey <tom@tromey.com>
11810
11811 * location.c (explicit_location_lex_one): Return a
11812 unique_xmalloc_ptr.
11813 (string_to_explicit_location): Update. Remove cleanups.
11814
11815 2017-04-12 Tom Tromey <tom@tromey.com>
11816
11817 * gnu-v3-abi.c (value_and_voffset_p): Remove typedef.
11818 (compare_value_and_voffset): Change type. Update.
11819 (compute_vtable_size): Change type of "offset_vec".
11820 (gnuv3_print_vtable): Use std::vector. Remove cleanups.
11821 (gnuv3_get_typeid): Remove extraneous declaration.
11822
11823 2017-04-12 Tom Tromey <tom@tromey.com>
11824
11825 * charset.h (wchar_iterator): Fix comment.
11826
11827 2017-04-12 Tom Tromey <tom@tromey.com>
11828
11829 * charset.c (iconv_wrapper): New class.
11830 (cleanup_iconv): Remove.
11831 (convert_between_encodings): Use it.
11832
11833 2017-04-12 Tom Tromey <tom@tromey.com>
11834
11835 * symfile.h (increment_reading_symtab): Update type.
11836 * symfile.c (decrement_reading_symtab): Remove.
11837 (increment_reading_symtab): Return a scoped_restore_tmpl<int>.
11838 * psymtab.c (psymtab_to_symtab): Update.
11839 * dwarf2read.c (dw2_instantiate_symtab): Update.
11840
11841 2017-04-12 Tom Tromey <tom@tromey.com>
11842
11843 * jit.c (struct jit_reader): Declare separately. Add constructor
11844 and destructor. Change type of "handle".
11845 (loaded_jit_reader): Define separately.
11846 (jit_reader_load): Update. New "new".
11847 (jit_reader_unload_command): Use "delete".
11848 * gdb-dlfcn.h (struct dlclose_deleter): New.
11849 (gdb_dlhandle_up): New typedef.
11850 (gdb_dlopen, gdb_dlsym): Update types.
11851 (gdb_dlclose): Remove.
11852 * gdb-dlfcn.c (gdb_dlopen): Return a gdb_dlhandle_up.
11853 (gdb_dlsym): Change type of "handle".
11854 (make_cleanup_dlclose): Remove.
11855 (dlclose_deleter::operator()): Rename from gdb_dlclose.
11856 * compile/compile-c-support.c (load_libcc): Update.
11857
11858 2017-04-12 Tom Tromey <tom@tromey.com>
11859
11860 * symtab.h (find_pcs_for_symtab_line): Change return type.
11861 * symtab.c (find_pcs_for_symtab_line): Change return type.
11862 * python/py-linetable.c (build_line_table_tuple_from_pcs): Change
11863 type of "vec". Update.
11864 (ltpy_get_pcs_for_line): Update.
11865 * linespec.c (decode_digits_ordinary): Update.
11866
11867 2017-04-12 Tom Tromey <tom@tromey.com>
11868
11869 * tracepoint.c (actions_command): Update.
11870 * python/python.c (python_command, python_interactive_command):
11871 Update.
11872 * mi/mi-cmd-break.c (mi_cmd_break_commands): Update.
11873 * guile/guile.c (guile_command): Update.
11874 * defs.h (read_command_lines, read_command_lines_1): Return
11875 command_line_up.
11876 (command_lines_deleter): New struct.
11877 (command_line_up): New typedef.
11878 * compile/compile.c (compile_code_command)
11879 (compile_print_command): Update.
11880 * cli/cli-script.h (get_command_line, copy_command_lines): Return
11881 command_line_up.
11882 (make_cleanup_free_command_lines): Remove.
11883 * cli/cli-script.c (get_command_line, read_command_lines_1)
11884 (copy_command_lines): Return command_line_up.
11885 (while_command, if_command, read_command_lines, define_command)
11886 (document_command): Update.
11887 (do_free_command_lines_cleanup, make_cleanup_free_command_lines):
11888 Remove.
11889 * breakpoint.h (breakpoint_set_commands): Change type of
11890 "commands".
11891 * breakpoint.c (breakpoint_set_commands): Change type of
11892 "commands". Update.
11893 (do_map_commands_command, update_dprintf_command_list)
11894 (create_tracepoint_from_upload): Update.
11895
11896 2017-04-12 Tom Tromey <tom@tromey.com>
11897
11898 * tracepoint.c (scope_info): Update.
11899 * spu-tdep.c (spu_catch_start): Update.
11900 * python/python.c (gdbpy_decode_line): Update.
11901 * python/py-finishbreakpoint.c (bpfinishpy_init): Update.
11902 * python/py-breakpoint.c (bppy_init): Update.
11903 * probe.c (parse_probes): Update.
11904 * mi/mi-cmd-break.c (mi_cmd_break_insert_1): Update.
11905 * location.h (event_location_deleter): New struct.
11906 (event_location_up): New typedef.
11907 (new_linespec_location, new_address_location, new_probe_location)
11908 (new_explicit_location, copy_event_location)
11909 (string_to_event_location, string_to_event_location_basic)
11910 (string_to_explicit_location): Update return type.
11911 (make_cleanup_delete_event_location): Remove.
11912 * location.c (new_linespec_location, new_address_location)
11913 (new_probe_location, new_explicit_location, copy_event_location):
11914 Return event_location_up.
11915 (delete_event_location_cleanup)
11916 (make_cleanup_delete_event_location): Remove.
11917 (string_to_explicit_location, string_to_event_location_basic)
11918 (string_to_event_location): Return event_location_up.
11919 * linespec.c (canonicalize_linespec, event_location_to_sals)
11920 (decode_line_with_current_source)
11921 (decode_line_with_last_displayed, decode_objc): Update.
11922 * guile/scm-breakpoint.c (gdbscm_register_breakpoint_x): Update.
11923 * completer.c (location_completer): Update.
11924 * cli/cli-cmds.c (edit_command, list_command): Update.
11925 * breakpoint.c (create_overlay_event_breakpoint)
11926 (create_longjmp_master_breakpoint)
11927 (create_std_terminate_master_breakpoint)
11928 (create_exception_master_breakpoint)
11929 (create_thread_event_breakpoint): Update.
11930 (init_breakpoint_sal): Update. Remove some dead code.
11931 (create_breakpoint_sal): Change type of "location". Update.
11932 (create_breakpoints_sal, create_breakpoint, break_command_1)
11933 (dprintf_command, break_range_command, until_break_command)
11934 (init_ada_exception_breakpoint)
11935 (strace_marker_create_sals_from_location)
11936 (update_static_tracepoint, trace_command, ftrace_command)
11937 (strace_command, create_tracepoint_from_upload): Update.
11938 * break-catch-throw.c (re_set_exception_catchpoint): Update.
11939 * ax-gdb.c (agent_command_1): Update.
11940
11941 2017-04-12 Pedro Alves <palves@redhat.com>
11942
11943 * Makefile.in (ALL_TARGET_OBS): Add i386-go32-tdep.o.
11944 * configure.tgt: Handle i[34567]86-*-go32* and
11945 i[34567]86-*-msdosdjgpp*.
11946 * i386-tdep.c (i386_svr4_reg_to_regnum):
11947 Make extern.
11948 (i386_go32_init_abi, i386_coff_osabi_sniffer): Moved to
11949 i386-go32-tdep.c.
11950 (_initialize_i386_tdep): DJGPP bits moved to i386-go32-tdep.c.
11951 * i386-go32-tdep.c: New file.
11952 * i386-tdep.h (tdesc_i386_mmx, i386_svr4_reg_to_regnum): New
11953 declarations.
11954
11955 2017-04-12 Simon Marchi <simon.marchi@ericsson.com>
11956
11957 * aix-thread.c (pd_status2str): Change return type to const char *.
11958
11959 2017-04-12 Pedro Alves <palves@redhat.com>
11960
11961 * i386-tdep.c (i386_elf_init_abi, i386_go32_init_abi): Remove
11962 calls to set_gdbarch_gnu_triplet_regexp.
11963
11964 2017-04-12 Pedro Alves <palves@redhat.com>
11965
11966 PR gdb/21323
11967 * c-lang.c (cplus_primitive_types) <cplus_primitive_type_wchar_t>:
11968 New enum value.
11969 (cplus_language_arch_info): Register cplus_primitive_type_wchar_t.
11970 * gdbtypes.h (struct builtin_type) <builtin_wchar>: New field.
11971 * gdbtypes.c (gdbtypes_post_init): Create the "wchar_t" type.
11972 * gdbarch.sh (wchar_bit, wchar_signed): New per-arch values.
11973 * gdbarch.h, gdbarch.c: Regenerate.
11974 * aarch64-tdep.c (aarch64_gdbarch_init): Override
11975 gdbarch_wchar_bit and gdbarch_wchar_signed.
11976 * alpha-tdep.c (alpha_gdbarch_init): Likewise.
11977 * arm-tdep.c (arm_gdbarch_init): Likewise.
11978 * avr-tdep.c (avr_gdbarch_init): Likewise.
11979 * h8300-tdep.c (h8300_gdbarch_init): Likewise.
11980 * i386-nto-tdep.c (i386nto_init_abi): Likewise.
11981 * i386-tdep.c (i386_go32_init_abi): Likewise.
11982 * m32r-tdep.c (m32r_gdbarch_init): Likewise.
11983 * moxie-tdep.c (moxie_gdbarch_init): Likewise.
11984 * nds32-tdep.c (nds32_gdbarch_init): Likewise.
11985 * rs6000-aix-tdep.c (rs6000_aix_init_osabi): Likewise.
11986 * sh-tdep.c (sh_gdbarch_init): Likewise.
11987 * sparc-tdep.c (sparc32_gdbarch_init): Likewise.
11988 * sparc64-tdep.c (sparc64_init_abi): Likewise.
11989 * windows-tdep.c (windows_init_abi): Likewise.
11990 * xstormy16-tdep.c (xstormy16_gdbarch_init): Likewise.
11991
11992 2017-04-12 Pedro Alves <palves@redhat.com>
11993
11994 PR c++/21323
11995 * c-lang.c (cplus_primitive_types) <cplus_primitive_type_char16_t,
11996 cplus_primitive_type_char32_t>: New enum values.
11997 (cplus_language_arch_info): Register cplus_primitive_type_char16_t
11998 and cplus_primitive_type_char32_t.
11999 * dwarf2read.c (read_base_type) <DW_ATE_UTF>: If bit size is 16 or
12000 32, use the archtecture's built-in type for char16_t and char32_t,
12001 respectively. Otherwise, fallback to init_integer_type as before,
12002 but make the type unsigned, and issue a complaint.
12003 * gdbtypes.c (gdbtypes_post_init): Make char16_t and char32_t unsigned.
12004
12005 2017-04-12 Alan Hayward <alan.hayward@arm.com>
12006
12007 * m32r-tdep.c (M32R_ARG_REGISTER_SIZE): Added.
12008 (m32r_push_dummy_call): Use M32R_ARG_REGISTER_SIZE.
12009
12010 2017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
12011
12012 * windows-nat.c (windows_create_inferior): Declare 'toexec' as
12013 'const char *'.
12014
12015 2017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
12016
12017 * common/common-utils.c (free_vector_argv): New function.
12018 * common/common-utils.h: Include <vector>.
12019 (free_vector_argv): New prototype.
12020 * darwin-nat.c (darwin_create_inferior): Rewrite function
12021 prototype in order to constify "exec_file" and accept a
12022 "std::string" for "allargs".
12023 * fork-child.c: Include <vector>.
12024 (breakup_args): Rewrite function, using C++.
12025 (fork_inferior): Rewrite function header, constify "exec_file_arg"
12026 and accept "std::string" for "allargs". Update the code to
12027 calculate "argv" based on "allargs". Update calls to "exec_fun"
12028 and "execvp".
12029 * gnu-nat.c (gnu_create_inferior): Rewrite function prototype in
12030 order to constify "exec_file" and accept a "std::string" for
12031 "allargs".
12032 * go32-nat.c (go32_create_inferior): Likewise.
12033 * inf-ptrace.c (inf_ptrace_create_inferior): Likewise.
12034 * infcmd.c (run_command_1): Constify "exec_file". Use
12035 "std::string" for inferior arguments.
12036 * inferior.h (fork_inferior): Update prototype.
12037 * linux-nat.c (linux_nat_create_inferior): Rewrite function
12038 prototype in order to constify "exec_file" and accept a
12039 "std::string" for "allargs".
12040 * nto-procfs.c (procfs_create_inferior): Likewise.
12041 * procfs.c (procfs_create_inferior): Likewise.
12042 * remote-sim.c (gdbsim_create_inferior): Likewise.
12043 * remote.c (extended_remote_run): Update code to accept
12044 "std::string" as argument.
12045 (extended_remote_create_inferior): Rewrite function prototype in
12046 order to constify "exec_file" and accept a "std::string" for
12047 "allargs".
12048 * rs6000-nat.c (super_create_inferior): Likewise.
12049 (rs6000_create_inferior): Likewise.
12050 * target.h (struct target_ops) <to_create_inferior>: Likewise.
12051 * windows-nat.c (windows_create_inferior): Likewise.
12052
12053 2017-04-11 Pedro Alves <palves@redhat.com>
12054
12055 * thread.c: Fix whitespace throughout.
12056
12057 2017-04-11 Philipp Rudo <prudo@linux.vnet.ibm.com>
12058
12059 * linux-nat.c (linux_nat_detach): Remove delete_lwp call.
12060
12061 2017-04-11 Alan Hayward <alan.hayward@arm.com>
12062
12063 * arm-tdep.c (arm_store_return_value): Use FP_REGISTER_SIZE
12064
12065 2017-04-10 Sergio Durigan Junior <sergiodj@redhat.com>
12066
12067 PR gdb/21364
12068 * osdata.c (info_osdata): Check if 'type' is an empty string
12069 instead of NULL.
12070
12071 2017-04-10 Pedro Alves <palves@redhat.com>
12072
12073 * thread.c (add_thread_silent, delete_thread_1, find_thread_ptid)
12074 (ptid_to_global_thread_id, in_thread_list)
12075 (do_captured_list_thread_ids, set_resumed, set_running)
12076 (set_executing, set_stop_requested, finish_thread_state)
12077 (validate_registers_access, can_access_registers_ptid)
12078 (print_thread_info_1, switch_to_thread)
12079 (do_restore_current_thread_cleanup)
12080 (make_cleanup_restore_current_thread, thread_command)
12081 (thread_name_command): Use operator== instead of ptid_equal.
12082
12083 2017-04-10 Pedro Alves <palves@redhat.com>
12084
12085 * thread.c (struct current_thread_cleanup) <next>: Delete field.
12086 (current_thread_cleanup_chain): Delete.
12087 (restore_current_thread_cleanup_dtor)
12088 (make_cleanup_restore_current_thread): Remove references to
12089 current_thread_cleanup_chain.
12090
12091 2017-04-10 Alan Hayward <alan.hayward@arm.com>
12092
12093 * msp430-tdep.c (msp430_pseudo_register_read): Never return
12094 REG_UNKNOWN.
12095
12096 2017-04-10 Yao Qi <yao.qi@linaro.org>
12097
12098 PR gdb/19942
12099 * gdbthread.h (thread_info::deletable): New method.
12100 (thread_info::incref): New method.
12101 (thread_info::decref): New method.
12102 (thread_info::refcount): Move it to private.
12103 * infrun.c (save_stop_context): Call inc_refcount.
12104 (release_stop_context_cleanup): Likewise.
12105 * thread.c (set_thread_exited): New function.
12106 (init_thread_list): Delete "tp" only it is deletable, otherwise
12107 call set_thread_exited.
12108 (delete_thread_1): Call set_thread_exited.
12109 (current_thread_cleanup) <inferior_pid>: Remove.
12110 <thread>: New field.
12111 (restore_current_thread_ptid_changed): Removed.
12112 (do_restore_current_thread_cleanup): Adjust.
12113 (restore_current_thread_cleanup_dtor): Don't call
12114 find_thread_ptid.
12115 (set_thread_refcount): Use dec_refcount.
12116 (make_cleanup_restore_current_thread): Adjust.
12117 (thread_apply_all_command): Call inc_refcount.
12118 (_initialize_thread): Don't call
12119 observer_attach_thread_ptid_changed.
12120
12121 2017-04-10 Yao Qi <yao.qi@linaro.org>
12122
12123 * thread.c (delete_thread_1): Hoist code on marking thread as
12124 exited.
12125
12126 2017-04-09 Simon Marchi <simon.marchi@polymtl.ca>
12127
12128 * windows-nat.c (windows_detach): Initialize ptid with
12129 minus_one_ptid.
12130
12131 2017-04-07 Simon Marchi <simon.marchi@ericsson.com>
12132
12133 * unittests/ptid-selftests.c: Fix erroneous assert messages.
12134
12135 2017-04-07 Alan Hayward <alan.hayward@arm.com>
12136
12137 * bfin-tdep.c (BFIN_MAX_REGISTER_SIZE): Add.
12138 (bfin_pseudo_register_read): Use BFIN_MAX_REGISTER_SIZE.
12139 (bfin_pseudo_register_write): Likewise
12140
12141 2017-04-06 Simon Marchi <simon.marchi@ericsson.com>
12142
12143 * common/ptid.h (struct ptid): Change to...
12144 (class ptid_t): ... this.
12145 <ptid_t>: New constructors.
12146 <pid, lwp_p, lwp, tid_p, tid, is_pid, operator==, operator!=,
12147 matches>: New methods.
12148 <make_null, make_minus_one>: New static methods.
12149 <pid>: Rename to...
12150 <m_pid>: ...this.
12151 <lwp>: Rename to...
12152 <m_lwp>: ...this.
12153 <tid>: Rename to...
12154 <m_tid>: ...this.
12155 (ptid_build, ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal,
12156 ptid_is_pid, ptid_lwp_p, ptid_tid_p, ptid_match): Take ptid arguments
12157 as references, move comment to class ptid_t.
12158 * common/ptid.c (null_ptid, minus_one_ptid): Initialize with
12159 ptid_t static methods.
12160 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_tid,
12161 ptid_equal, ptid_is_pid, ptid_lwp_p, ptid_tid_p, ptid_match):
12162 Take ptid arguments as references, implement using ptid_t methods.
12163 * unittests/ptid-selftests.c: New file.
12164 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
12165 unittests/ptid-selftests.c.
12166 (SUBDIR_UNITTESTS_OBS): Add unittests/ptid-selftests.o.
12167
12168 2017-04-06 Thomas Preud'homme <thomas.preudhomme@arm.com>
12169
12170 * python/python.c (python_run_simple_file): Cast mode literal to
12171 non-const char pointer as expected by PyFile_FromString.
12172
12173 2017-04-05 Simon Marchi <simon.marchi@ericsson.com>
12174
12175 * common/ptid.c (ptid_lwp_p, ptid_tid_p): Remove comparison with
12176 minus_one_ptid and null_ptid.
12177
12178 2017-04-05 Pedro Alves <palves@redhat.com>
12179
12180 * warning.m4 (build_warnings): Remove -Wno-write-strings.
12181 * configure: Regenerate.
12182
12183 2017-04-05 Pedro Alves <palves@redhat.com>
12184
12185 * ada-exp.y (yyerror): Constify.
12186 * ada-lang.c (bound_name, get_selections)
12187 (ada_variant_discrim_type)
12188 (ada_variant_discrim_name, ada_value_struct_elt)
12189 (ada_lookup_struct_elt_type, is_unchecked_variant)
12190 (ada_which_variant_applies, standard_exc, ada_get_next_arg)
12191 (catch_ada_exception_command_split)
12192 (catch_ada_assert_command_split, catch_assert_command)
12193 (ada_op_name): Constify.
12194 * ada-lang.h (ada_yyerror, get_selections)
12195 (ada_variant_discrim_name, ada_value_struct_elt): Constify.
12196 * arc-tdep.c (arc_print_frame_cache): Constify.
12197 * arm-tdep.c (arm_skip_stub): Constify.
12198 * ax-gdb.c (gen_binop, gen_struct_ref_recursive, gen_struct_ref)
12199 (gen_aggregate_elt_ref): Constify.
12200 * bcache.c (print_bcache_statistics): Constify.
12201 * bcache.h (print_bcache_statistics): Constify.
12202 * break-catch-throw.c (catch_exception_command_1):
12203 * breakpoint.c (struct ep_type_description::description):
12204 Constify.
12205 (add_solib_catchpoint): Constify.
12206 (catch_fork_command_1): Add cast.
12207 (add_catch_command): Constify.
12208 * breakpoint.h (add_catch_command, add_solib_catchpoint):
12209 Constify.
12210 * bsd-uthread.c (bsd_uthread_state): Constify.
12211 * buildsym.c (patch_subfile_names): Constify.
12212 * buildsym.h (next_symbol_text_func, patch_subfile_names):
12213 Constify.
12214 * c-exp.y (yyerror): Constify.
12215 (token::oper): Constify.
12216 * c-lang.h (c_yyerror, cp_print_class_member): Constify.
12217 * c-varobj.c (cplus_describe_child): Constify.
12218 * charset.c (find_charset_names): Add cast.
12219 (find_charset_names): Constify array and add const_cast.
12220 * cli/cli-cmds.c (complete_command, cd_command): Constify.
12221 (edit_command): Constify.
12222 * cli/cli-decode.c (lookup_cmd): Constify.
12223 * cli/cli-dump.c (dump_memory_command, dump_value_command):
12224 Constify.
12225 (struct dump_context): Constify.
12226 (add_dump_command, restore_command): Constify.
12227 * cli/cli-script.c (get_command_line): Constify.
12228 * cli/cli-script.h (get_command_line): Constify.
12229 * cli/cli-utils.c (check_for_argument): Constify.
12230 * cli/cli-utils.h (check_for_argument): Constify.
12231 * coff-pe-read.c (struct read_pe_section_data): Constify.
12232 * command.h (lookup_cmd): Constify.
12233 * common/print-utils.c (decimal2str): Constify.
12234 * completer.c (gdb_print_filename): Constify.
12235 * corefile.c (set_gnutarget): Constify.
12236 * cp-name-parser.y (yyerror): Constify.
12237 * cp-valprint.c (cp_print_class_member): Constify.
12238 * cris-tdep.c (cris_register_name, crisv32_register_name):
12239 Constify.
12240 * d-exp.y (yyerror): Constify.
12241 (struct token::oper): Constify.
12242 * d-lang.h (d_yyerror): Constify.
12243 * dbxread.c (struct header_file_location::name): Constify.
12244 (add_old_header_file, add_new_header_file, last_function_name)
12245 (dbx_next_symbol_text, add_bincl_to_list)
12246 (find_corresponding_bincl_psymtab, set_namestring)
12247 (find_stab_function_addr, read_dbx_symtab, start_psymtab)
12248 (dbx_end_psymtab, read_ofile_symtab, process_one_symbol):
12249 * defs.h (command_line_input, print_address_symbolic)
12250 (deprecated_readline_begin_hook): Constify.
12251 * dwarf2read.c (anonymous_struct_prefix, dwarf_bool_name):
12252 Constify.
12253 * event-top.c (handle_line_of_input): Constify and add cast.
12254 * exceptions.c (catch_errors): Constify.
12255 * exceptions.h (catch_errors): Constify.
12256 * expprint.c (print_subexp_standard, op_string, op_name)
12257 (op_name_standard, dump_raw_expression, dump_raw_expression):
12258 * expression.h (op_name, op_string, dump_raw_expression):
12259 Constify.
12260 * f-exp.y (yyerror): Constify.
12261 (struct token::oper): Constify.
12262 (struct f77_boolean_val::name): Constify.
12263 * f-lang.c (f_word_break_characters): Constify.
12264 * f-lang.h (f_yyerror): Constify.
12265 * fork-child.c (fork_inferior): Add cast.
12266 * frv-tdep.c (struct gdbarch_tdep::register_names): Constify.
12267 (new_variant): Constify.
12268 * gdbarch.sh (pstring_ptr, pstring_list): Constify.
12269 * gdbarch.c: Regenerate.
12270 * gdbcore.h (set_gnutarget): Constify.
12271 * go-exp.y (yyerror): Constify.
12272 (token::oper): Constify.
12273 * go-lang.h (go_yyerror): Constify.
12274 * go32-nat.c (go32_sysinfo): Constify.
12275 * guile/scm-breakpoint.c (gdbscm_breakpoint_expression): Constify.
12276 * guile/scm-cmd.c (cmdscm_function): Constify.
12277 * guile/scm-param.c (pascm_param_value): Constify.
12278 * h8300-tdep.c (h8300_register_name, h8300s_register_name)
12279 (h8300sx_register_name): Constify.
12280 * hppa-tdep.c (hppa32_register_name, hppa64_register_name):
12281 Constify.
12282 * ia64-tdep.c (ia64_register_names): Constify.
12283 * infcmd.c (construct_inferior_arguments): Constify.
12284 (path_command, attach_post_wait): Constify.
12285 * language.c (show_range_command, show_case_command)
12286 (unk_lang_error): Constify.
12287 * language.h (language_defn::la_error)
12288 (language_defn::la_name_of_this): Constify.
12289 * linespec.c (decode_line_2): Constify.
12290 * linux-thread-db.c (thread_db_err_str): Constify.
12291 * lm32-tdep.c (lm32_register_name): Constify.
12292 * m2-exp.y (yyerror): Constify.
12293 * m2-lang.h (m2_yyerror): Constify.
12294 * m32r-tdep.c (m32r_register_names): Constify and make static.
12295 * m68hc11-tdep.c (m68hc11_register_names): Constify.
12296 * m88k-tdep.c (m88k_register_name): Constify.
12297 * macroexp.c (appendmem): Constify.
12298 * mdebugread.c (fdr_name, add_data_symbol, parse_type)
12299 (upgrade_type, parse_external, parse_partial_symbols)
12300 (mdebug_next_symbol_text, cross_ref, mylookup_symbol, new_psymtab)
12301 (new_symbol): Constify.
12302 * memattr.c (mem_info_command): Constify.
12303 * mep-tdep.c (register_name_from_keyword): Constify.
12304 * mi/mi-cmd-env.c (mi_cmd_env_path, _initialize_mi_cmd_env):
12305 Constify.
12306 * mi/mi-cmd-stack.c (list_args_or_locals): Constify.
12307 * mi/mi-cmd-var.c (mi_cmd_var_show_attributes): Constify.
12308 * mi/mi-main.c (captured_mi_execute_command): Constify and add
12309 cast.
12310 (mi_execute_async_cli_command): Constify.
12311 * mips-tdep.c (mips_register_name): Constify.
12312 * mn10300-tdep.c (register_name, mn10300_generic_register_name)
12313 (am33_register_name, am33_2_register_name)
12314 * moxie-tdep.c (moxie_register_names): Constify.
12315 * nat/linux-osdata.c (osdata_type): Constify fields.
12316 * nto-tdep.c (nto_parse_redirection): Constify.
12317 * objc-lang.c (lookup_struct_typedef, lookup_objc_class)
12318 (lookup_child_selector): Constify.
12319 (objc_methcall::name): Constify.
12320 * objc-lang.h (lookup_objc_class, lookup_child_selector)
12321 (lookup_struct_typedef): Constify.
12322 * objfiles.c (pc_in_section): Constify.
12323 * objfiles.h (pc_in_section): Constify.
12324 * p-exp.y (struct token::oper): Constify.
12325 (yyerror): Constify.
12326 * p-lang.h (pascal_yyerror): Constify.
12327 * parser-defs.h (op_name_standard): Constify.
12328 (op_print::string): Constify.
12329 (exp_descriptor::op_name): Constify.
12330 * printcmd.c (print_address_symbolic): Constify.
12331 * psymtab.c (print_partial_symbols): Constify.
12332 * python/py-breakpoint.c (stop_func): Constify.
12333 (bppy_get_expression): Constify.
12334 * python/py-cmd.c (cmdpy_completer::name): Constify.
12335 (cmdpy_function): Constify.
12336 * python/py-event.c (evpy_add_attribute)
12337 (gdbpy_initialize_event_generic): Constify.
12338 * python/py-event.h (evpy_add_attribute)
12339 (gdbpy_initialize_event_generic): Constify.
12340 * python/py-evts.c (add_new_registry): Constify.
12341 * python/py-finishbreakpoint.c (outofscope_func): Constify.
12342 * python/py-framefilter.c (get_py_iter_from_func): Constify.
12343 * python/py-inferior.c (get_buffer): Add cast.
12344 * python/py-param.c (parm_constant::name): Constify.
12345 * python/py-unwind.c (fprint_frame_id): Constify.
12346 * python/python.c (gdbpy_parameter_value): Constify.
12347 * remote-fileio.c (remote_fio_func_map): Make 'name' const.
12348 * remote.c (memory_packet_config::name): Constify.
12349 (show_packet_config_cmd, remote_write_bytes)
12350 (remote_buffer_add_string):
12351 * reverse.c (exec_reverse_once): Constify.
12352 * rs6000-tdep.c (variant::name, variant::description): Constify.
12353 * rust-exp.y (rustyyerror): Constify.
12354 * rust-lang.c (rust_op_name): Constify.
12355 * rust-lang.h (rustyyerror): Constify.
12356 * serial.h (serial_ops::name): Constify.
12357 * sh-tdep.c (sh_sh_register_name, sh_sh3_register_name)
12358 (sh_sh3e_register_name, sh_sh2e_register_name)
12359 (sh_sh2a_register_name, sh_sh2a_nofpu_register_name)
12360 (sh_sh_dsp_register_name, sh_sh3_dsp_register_name)
12361 (sh_sh4_register_name, sh_sh4_nofpu_register_name)
12362 (sh_sh4al_dsp_register_name): Constify.
12363 * sh64-tdep.c (sh64_register_name): Constify.
12364 * solib-darwin.c (lookup_symbol_from_bfd): Constify.
12365 * spu-tdep.c (spu_register_name, info_spu_dma_cmdlist): Constify.
12366 * stabsread.c (patch_block_stabs, read_type_number)
12367 (ref_map::stabs, ref_add, process_reference)
12368 (symbol_reference_defined, define_symbol, define_symbol)
12369 (error_type, read_type, read_member_functions, read_cpp_abbrev)
12370 (read_one_struct_field, read_struct_fields, read_baseclasses)
12371 (read_tilde_fields, read_struct_type, read_array_type)
12372 (read_enum_type, read_sun_builtin_type, read_sun_floating_type)
12373 (read_huge_number, read_range_type, read_args, common_block_start)
12374 (find_name_end): Constify.
12375 * stabsread.h (common_block_start, define_symbol)
12376 (process_one_symbol, symbol_reference_defined, ref_add):
12377 * symfile.c (get_section_index, add_symbol_file_command):
12378 * symfile.h (get_section_index): Constify.
12379 * target-descriptions.c (tdesc_type::name): Constify.
12380 (tdesc_free_type): Add cast.
12381 * target.c (find_default_run_target):
12382 (add_deprecated_target_alias, find_default_run_target)
12383 (target_announce_detach): Constify.
12384 (do_option): Constify.
12385 * target.h (add_deprecated_target_alias): Constify.
12386 * thread.c (print_thread_info_1): Constify.
12387 * top.c (deprecated_readline_begin_hook, command_line_input):
12388 Constify.
12389 (init_main): Add casts.
12390 * top.h (handle_line_of_input): Constify.
12391 * tracefile-tfile.c (tfile_write_uploaded_tsv): Constify.
12392 * tracepoint.c (tvariables_info_1, trace_status_mi): Constify.
12393 (tfind_command): Rename to ...
12394 (tfind_command_1): ... this and constify.
12395 (tfind_command): New function.
12396 (tfind_end_command, tfind_start_command): Adjust.
12397 (encode_source_string): Constify.
12398 * tracepoint.h (encode_source_string): Constify.
12399 * tui/tui-data.c (tui_partial_win_by_name): Constify.
12400 * tui/tui-data.h (tui_partial_win_by_name): Constify.
12401 * tui/tui-source.c (tui_set_source_content_nil): Constify.
12402 * tui/tui-source.h (tui_set_source_content_nil): Constify.
12403 * tui/tui-win.c (parse_scrolling_args): Constify.
12404 * tui/tui-windata.c (tui_erase_data_content): Constify.
12405 * tui/tui-windata.h (tui_erase_data_content): Constify.
12406 * tui/tui-winsource.c (tui_erase_source_content): Constify.
12407 * tui/tui.c (tui_enable): Add cast.
12408 * utils.c (defaulted_query): Constify.
12409 (init_page_info): Add cast.
12410 (puts_debug, subset_compare): Constify.
12411 * utils.h (subset_compare): Constify.
12412 * varobj.c (varobj_format_string): Constify.
12413 * varobj.h (varobj_format_string): Constify.
12414 * vax-tdep.c (vax_register_name): Constify.
12415 * windows-nat.c (windows_detach): Constify.
12416 * xcoffread.c (process_linenos, xcoff_next_symbol_text): Constify.
12417 * xml-support.c (gdb_xml_end_element): Constify.
12418 * xml-tdesc.c (tdesc_start_reg): Constify.
12419 * xstormy16-tdep.c (xstormy16_register_name): Constify.
12420 * xtensa-tdep.c (xtensa_find_register_by_name): Constify.
12421 * xtensa-tdep.h (xtensa_register_t::name): Constify.
12422
12423 2017-04-05 Pedro Alves <palves@redhat.com>
12424
12425 * proc-api.c (struct trans): Constify.
12426 (procfs_note): Constify.
12427 * proc-events.c (struct trans, syscall_table):
12428 * proc-flags.c (struct trans): Constify.
12429 * proc-utils.h (procfs_note): Constify.
12430 * proc-why.c (struct trans): Constify.
12431 * procfs.c (dead_procinfo, find_syscall, proc_warn, proc_error)
12432 (procfs_detach): Constify.
12433 * sol-thread.c (struct string_map): Constify.
12434 (td_err_string, td_state_string): Constify.
12435
12436 2017-04-05 Pedro Alves <palves@redhat.com>
12437
12438 * proc-api.c (procfs_filename): Don't initialize
12439 procfs_filename.
12440 (prepare_to_trace): Assume procfs_filename is non-NULL.
12441 (_initialize_proc_api): Give procfs_filename a default value here.
12442
12443 2017-04-05 Pedro Alves <palves@redhat.com>
12444
12445 * break-catch-throw.c (handle_gnu_v3_exceptions): Constify
12446 'cond_string' parameter.
12447 (extract_exception_regexp): Constify 'string' parameter.
12448 (catch_exception_command_1): Constify.
12449 * breakpoint.c (init_catchpoint)
12450 (create_fork_vfork_event_catchpoint): Constify 'cond_string'
12451 parameter.
12452 (ep_parse_optional_if_clause, catch_fork_command_1)
12453 (catch_exec_command_1): Constify.
12454 * breakpoint.h (init_catchpoint): Constify 'cond_string'
12455 parameter.
12456 (ep_parse_optional_if_clause): Constify.
12457 * cli/cli-utils.c (remove_trailing_whitespace)
12458 (check_for_argument): Constify.
12459 * cli/cli-utils.h (remove_trailing_whitespace): Constify and add
12460 non-const overload.
12461 (check_for_argument): Likewise.
12462
12463 2017-04-05 Pedro Alves <palves@redhat.com>
12464
12465 * event-top.c (command_line_handler): Add cast to execute_command
12466 call.
12467 * record-btrace.c (cmd_record_btrace_bts_start)
12468 (cmd_record_btrace_pt_start, cmd_record_btrace_start)
12469 (cmd_record_btrace_start): Add cast to execute_command call.
12470 * record-full.c (record_full_goto_insn):
12471 * record.c (record_start, record_stop): Add cast to
12472 execute_command_to_string calls.
12473 (cmd_record_start): Add cast to execute_command calls.
12474
12475 2017-04-05 Pedro Alves <palves@redhat.com>
12476
12477 * python/python-internal.h (gdb_PyArg_ParseTupleAndKeywords): New
12478 static inline function.
12479 * python/py-arch.c (archpy_disassemble): Constify 'keywords'
12480 array and use gdb_PyArg_ParseTupleAndKeywords.
12481 * python/py-cmd.c (cmdpy_init): Likewise.
12482 * python/py-finishbreakpoint.c (bpfinishpy_init): Likewise.
12483 * python/py-inferior.c (infpy_read_memory, infpy_write_memory)
12484 (infpy_search_memory): Likewise.
12485 * python/py-objfile.c (objfpy_add_separate_debug_file)
12486 (gdbpy_lookup_objfile): Likewise.
12487 * python/py-symbol.c (gdbpy_lookup_symbol)
12488 (gdbpy_lookup_global_symbol): Likewise.
12489 * python/py-type.c (gdbpy_lookup_type): Likewise.
12490 * python/py-value.c (valpy_lazy_string, valpy_string): Likewise.
12491 * python/python.c (execute_gdb_command, gdbpy_write, gdbpy_flush):
12492 Likewise.
12493
12494 2017-04-05 Pedro Alves <palves@redhat.com>
12495
12496 * python/python-internal.h (gdb_PyGetSetDef): New type.
12497 * python/py-block.c (block_object_getset)
12498 (breakpoint_object_getset): Now a gdb_PyGetSetDef array.
12499 * python/py-event.c (event_object_getset)
12500 (finish_breakpoint_object_getset): Likewise.
12501 * python/py-inferior.c (inferior_object_getset): Likewise.
12502 * python/py-infthread.c (thread_object_getset): Likewise.
12503 * python/py-lazy-string.c (lazy_string_object_getset): Likewise.
12504 * python/py-linetable.c (linetable_entry_object_getset): Likewise.
12505 * python/py-objfile.c (objfile_getset): Likewise.
12506 * python/py-progspace.c (pspace_getset): Likewise.
12507 * python/py-record-btrace.c (btpy_insn_getset, btpy_call_getset):
12508 Likewise.
12509 * python/py-record.c (recpy_record_getset): Likewise.
12510 * python/py-symbol.c (symbol_object_getset): Likewise.
12511 * python/py-symtab.c (symtab_object_getset, sal_object_getset):
12512 Likewise.
12513 * python/py-type.c (type_object_getset, field_object_getset):
12514 Likewise.
12515 * python/py-value.c (value_object_getset): Likewise.
12516
12517 2017-04-05 Pedro Alves <palves@redhat.com>
12518
12519 * python/python-internal.h (gdb_PyObject_CallMethod)
12520 (gdb_PyErr_NewException, gdb_PySys_GetObject, gdb_PySys_SetPath):
12521 New functions.
12522 (GDB_PYSYS_SETPATH_CHAR, PyObject_CallMethod, PyErr_NewException)
12523 (PySys_GetObject, PySys_SetPath): New macros.
12524
12525 2017-04-05 Pedro Alves <palves@redhat.com>
12526
12527 * mi/mi-cmd-info.c (mi_cmd_info_os): Call info_osdata instead of
12528 info_osdata_command.
12529 * osdata.c (info_osdata_command): Rename to ...
12530 (info_osdata): ... this. Constify 'type' parameter, and remove
12531 the 'from_tty' parameter. Accept NULL TYPE.
12532 (info_osdata_command): New function.
12533 * osdata.h (info_osdata_command): Remove declaration.
12534 (info_osdata): New declaration.
12535
12536 2017-04-05 Pedro Alves <palves@redhat.com>
12537
12538 * mi/mi-cmd-break.c (mi_cmd_break_insert_1, mi_cmd_break_insert)
12539 (mi_cmd_dprintf_insert, mi_cmd_break_passcount)
12540 (mi_cmd_break_watch, mi_cmd_break_commands): Constify 'command'
12541 parameter.
12542 * mi/mi-cmd-catch.c (mi_cmd_catch_assert, mi_cmd_catch_exception)
12543 (mi_cmd_catch_load, mi_cmd_catch_unload): Constify cmd' parameter.
12544 * mi/mi-cmd-disas.c (mi_cmd_disassemble): Constify 'command'
12545 parameter.
12546 * mi/mi-cmd-env.c (mi_cmd_env_pwd, mi_cmd_env_cd, mi_cmd_env_path)
12547 (mi_cmd_env_dir, mi_cmd_inferior_tty_set, _cmd_inferior_tty_show)
12548 * mi/mi-cmd-file.c (mi_cmd_file_list_exec_source_file)
12549 (mi_cmd_file_list_exec_source_files)
12550 (mi_cmd_file_list_shared_libraries): Constify 'command' parameter.
12551 * mi/mi-cmd-info.c (mi_cmd_info_ada_exceptions)
12552 (mi_cmd_info_gdb_mi_command, mi_cmd_info_os): Constify 'command'
12553 parameter.
12554 * mi/mi-cmd-stack.c (mi_cmd_enable_frame_filters)
12555 (mi_cmd_stack_list_frames, mi_cmd_stack_info_depth)
12556 (mi_cmd_stack_list_locals, mi_cmd_stack_list_args)
12557 (mi_cmd_stack_list_variables, mi_cmd_stack_select_frame)
12558 (mi_cmd_stack_info_frame): Constify 'command' parameter.
12559 * mi/mi-cmd-target.c (mi_cmd_target_file_get)
12560 (mi_cmd_target_file_put, mi_cmd_target_file_delete): Constify
12561 'command' parameter.
12562 * mi/mi-cmd-var.c (mi_cmd_var_create, mi_cmd_var_delete)
12563 (mi_cmd_var_set_format, mi_cmd_var_set_visualizer)
12564 (mi_cmd_var_set_frozen, mi_cmd_var_show_format)
12565 (mi_cmd_var_info_num_children, mi_cmd_var_list_children)
12566 (mi_cmd_var_info_type, mi_cmd_var_info_path_expression)
12567 (mi_cmd_var_info_expression, mi_cmd_var_show_attributes)
12568 (mi_cmd_var_evaluate_expression, mi_cmd_var_assign)
12569 (mi_cmd_var_update, mi_cmd_enable_pretty_printing)
12570 (mi_cmd_var_set_update_range): Constify 'command' parameter.
12571 * mi/mi-cmds.h (mi_cmd_argv_ftype): Constify 'command' parameter.
12572 * mi/mi-interp.c (mi_cmd_interpreter_exec): Constify 'command'
12573 parameter.
12574 * mi/mi-main.c (mi_cmd_gdb_exit, mi_cmd_exec_next)
12575 (mi_cmd_exec_next_instruction, mi_cmd_exec_step)
12576 (mi_cmd_exec_step_instruction, mi_cmd_exec_finish)
12577 (mi_cmd_exec_return ,mi_cmd_exec_jump, mi_cmd_exec_continue)
12578 (mi_cmd_exec_interrupt, mi_cmd_exec_run, mi_cmd_target_detach)
12579 (mi_cmd_target_flash_erase, mi_cmd_thread_select)
12580 (mi_cmd_thread_list_ids, mi_cmd_thread_info)
12581 (mi_cmd_list_thread_groups, mi_cmd_data_list_register_names)
12582 (mi_cmd_data_list_changed_registers)
12583 (mi_cmd_data_write_register_values)
12584 (mi_cmd_data_evaluate_expression, mi_cmd_data_read_memory)
12585 (mi_cmd_data_read_memory_bytes, mi_cmd_data_write_memory)
12586 (mi_cmd_data_write_memory_bytes, mi_cmd_enable_timings)
12587 (mi_cmd_list_features, mi_cmd_list_target_features)
12588 (mi_cmd_add_inferior, mi_cmd_remove_inferior)
12589 (mi_cmd_trace_define_variable, mi_cmd_trace_list_variables)
12590 (mi_cmd_trace_find, mi_cmd_trace_save, mi_cmd_trace_start)
12591 (mi_cmd_trace_status, mi_cmd_trace_stop, mi_cmd_ada_task_info)
12592 (mi_cmd_trace_frame_collected): Constify 'command'
12593 parameter.
12594 * mi/mi-symbol-cmds.c (mi_cmd_symbol_list_lines): Constify
12595 'command' parameter.
12596
12597 2017-04-05 Pedro Alves <palves@redhat.com>
12598
12599 * ada-lang.c (ada_completer_word_break_characters): Now a const
12600 array.
12601 (ada_get_gdb_completer_word_break_characters): Constify.
12602 * completer.c (gdb_completer_command_word_break_characters)
12603 (gdb_completer_file_name_break_characters)
12604 (gdb_completer_quote_characters): Now const arrays.
12605 (get_gdb_completer_quote_characters): Constify.
12606 (set_rl_completer_word_break_characters): New function.
12607 (set_gdb_completion_word_break_characters)
12608 (complete_line_internal): Use it.
12609 * completer.h (get_gdb_completer_quote_characters): Constify.
12610 (set_rl_completer_word_break_characters): Declare.
12611 * f-lang.c (f_word_break_characters): Constify.
12612 * language.c (default_word_break_characters): Constify.
12613 * language.h (language_defn::la_word_break_characters): Constify.
12614 (default_word_break_characters): Constify.
12615 * top.c (init_main): Use set_rl_completer_word_break_characters.
12616
12617 2017-04-05 Pedro Alves <palves@redhat.com>
12618
12619 * aix-thread.c (aix_thread_pid_to_str)
12620 (aix_thread_extra_thread_info): Constify.
12621 * bsd-kvm.c (bsd_kvm_pid_to_str): Constify.
12622 * bsd-uthread.c (bsd_uthread_extra_thread_info)
12623 (bsd_uthread_pid_to_str): Constify.
12624 * corelow.c (core_pid_to_str): Constify.
12625 * darwin-nat.c (darwin_pid_to_str): Constify.
12626 * fbsd-nat.c (fbsd_pid_to_str): Constify.
12627 * fbsd-tdep.c (fbsd_core_pid_to_str, gdbarch_core_pid_to_str):
12628 Constify.
12629 * gnu-nat.c (gnu_pid_to_str): Constify.
12630 * go32-nat.c (go32_pid_to_str): Constify.
12631 * i386-cygwin-tdep.c (i386_windows_core_pid_to_str): Constify.
12632 * inf-ptrace.c (inf_ptrace_pid_to_str): Constify.
12633 * inferior.c (inferior_pid_to_str): Constify.
12634 * linux-nat.c (linux_nat_pid_to_str): Constify.
12635 * linux-tdep.c (linux_core_pid_to_str): Constify.
12636 * linux-thread-db.c (thread_db_pid_to_str)
12637 (thread_db_extra_thread_info): Constify.
12638 * nto-tdep.c (nto_extra_thread_info): Constify.
12639 * nto-tdep.h (nto_extra_thread_info): Constify.
12640 * obsd-nat.c (obsd_pid_to_str): Constify.
12641 * procfs.c (procfs_pid_to_str): Constify.
12642 * ravenscar-thread.c (ravenscar_extra_thread_info)
12643 (ravenscar_pid_to_str): Constify.
12644 * remote-sim.c (gdbsim_pid_to_str): Constify.
12645 * remote.c (remote_threads_extra_info, remote_pid_to_str):
12646 Constify.
12647 * sol-thread.c (solaris_pid_to_str): Constify.
12648 * sol2-tdep.c (sol2_core_pid_to_str): Constify.
12649 * sol2-tdep.h (sol2_core_pid_to_str): Constify.
12650 * target.c (default_pid_to_str, target_pid_to_str)
12651 (normal_pid_to_str, default_pid_to_str): Constify.
12652 * target.h (target_ops::to_pid_to_str)
12653 (target_ops::to_extra_thread_info): Constify.
12654 (target_pid_to_str, normal_pid_to_str): Constify.
12655 * windows-nat.c (windows_pid_to_str): Constify.
12656 * gdbarch.sh (core_pid_to_str): Constify.
12657 * target-delegates.c: Regenerate.
12658 * gdbarch.h, gdbarch.c: Regenerate.
12659
12660 2017-04-05 Pedro Alves <palves@redhat.com>
12661
12662 * main.c (captured_main_1): Use gdb::unique_xmalloc_ptr to manage
12663 the memory of the temporary warning_pre_print override.
12664 * utils.c (warning_pre_print): Constify.
12665 * utils.h (warning_pre_print): Constify.
12666
12667 2017-04-05 Pedro Alves <palves@redhat.com>
12668
12669 * cli/cli-cmds.c (shell_escape): Constify 'arg' parameter.
12670 (shell_command): New function.
12671 (make_command): Use std::string.
12672 (init_cli_cmds): Register shell_command instead of shell_escape.
12673
12674 2017-04-05 Pedro Alves <palves@redhat.com>
12675
12676 * breakpoint.c (dprintf_function, dprintf_channel): Don't initialize.
12677 * tracepoint.c (default_collect): Don't initialize.
12678
12679 2017-04-05 Pedro Alves <palves@redhat.com>
12680
12681 * macroexp.c (macro_buffer::shared): Now a bool.
12682 (init_buffer): Update.
12683 (init_shared_buffer): Constify 'addr' parameter.
12684 (substitute_args, expand, macro_expand, macro_expand_next): Remove
12685 casts.
12686
12687 2017-04-05 Pedro Alves <palves@redhat.com>
12688
12689 * arm-tdep.c (show_disassembly_style_sfunc): Constify local.
12690 * disasm.c (set_disassembler_options): Constify local.
12691 * i386-tdep.c (i386_print_insn): Remove cast and FIXME comment.
12692
12693 2017-04-05 Sergio Durigan Junior <sergiodj@redhat.com>
12694
12695 PR gdb/21352
12696 * tracefile.c (tsave_command): Fix argument parsing for '-r'
12697 option.
12698
12699 2017-04-05 Yao Qi <yao.qi@linaro.org>
12700
12701 * frame.c (frame_unwind_register_unsigned): Call
12702 frame_unwind_register_value.
12703
12704 2017-04-05 Yao Qi <yao.qi@linaro.org>
12705
12706 * gdb.threads/thread-specific-bp.exp (check_thread_specific_breakpoint):
12707 Use gdb_test_multiple, and don't match anchor.
12708
12709 2017-04-05 Pedro Alves <palves@redhat.com>
12710
12711 * MAINTAINERS (Global Maintainers): Add Simon Marchi.
12712 (Write After Approval): Remove Simon Marchi.
12713
12714 2017-04-05 Pedro Alves <palves@redhat.com>
12715
12716 * common/gdb_optional.h (optional::optional): Make constexpr and
12717 initialize m_dummy.
12718
12719 2017-04-04 John Baldwin <jhb@FreeBSD.org>
12720
12721 * amd64-fbsd-tdep.c: Remove "bsd-uthread.h" include.
12722 (amd64fbsd_jmp_buf_reg_offset): Remove.
12723 (amd64fbsd_supply_uthread): Remove function.
12724 (amd64fbsd_collect_uthread): Remove function.
12725 (amd64fbsd_init_abi): Don't set bsd-uthread callbacks.
12726 * configure.tgt (i[34567]86-*-freebsd*): Remove bsd-uthread.o.
12727 (x86_64-*-freebsd*): Remove bsd-uthread.o.
12728 (fbsd-nat.c): Update comment.
12729 * i386-fbsd-tdep.c: Remove "bsd-uthread.h" include.
12730 (i386fbsd_jmp_buf_reg_offset): Remove.
12731 (i386fbsd_supply_uthread): Remove function.
12732 (i386fbsd_collect_uthread): Remove function.
12733 (i386fbsd_init_abi): Don't set bsd-uthread callbacks.
12734
12735 2017-04-04 John Baldwin <jhb@FreeBSD.org>
12736
12737 * Makefile.in (ALL_64_TARGET_OBS): Remove alpha-fbsd-tdep.o.
12738 (ALLDEPFILES): Remove alpha-fbsd-tdep.c
12739 * NEWS: Mention that support for FreeBSD/alpha was removed.
12740 * alpha-fbsd-tdep.c: Delete file.
12741 * config/alpha/fbsd.mh: Delete file.
12742 * configure.host: Delete alpha*-*-freebsd* and
12743 alpha*-*-kfreebsd*-gnu.
12744 * configure.tgt: Delete alpha*-*-freebsd* and
12745 alpha*-*-kfreebsd*-gnu.
12746
12747 2017-04-04 John Baldwin <jhb@FreeBSD.org>
12748
12749 * amd64-bsd-nat.c (amd64bsd_fetch_inferior_registers,
12750 amd64bsd_store_inferior_registers): Use ptid from regcache.
12751
12752 2017-04-04 Pedro Alves <palves@redhat.com>
12753
12754 * dwarf2read.c (lnp_state_machine): Now a class. Initialize all
12755 data fields, make them private and add "m_" prefixes.
12756 (lnp_state_machine::lnp_state_machine): New ctor.
12757 (record_line, check_line_address, handle_set_discriminator)
12758 (handle_set_address, handle_advance_pc, handle_special_opcode)
12759 (handle_advance_line, handle_set_file, handle_negate_stmt)
12760 (handle_const_add_pc, handle_fixed_advance_pc, handle_copy)
12761 (end_sequence, advance_line): New methods.
12762 (m_gdbarch, m_record_lines_p): New fields.
12763 (lnp_reader_state): Delete.
12764 (dwarf_record_line): Rename to ...
12765 (lnp_state_machine::record_line): ... adjust.
12766 (init_lnp_state_machine): Delete.
12767 (lnp_state_machine::lnp_state_machine): New.
12768 (check_line_address): Rename to ...
12769 (lnp_state_machine::check_line_address): This.
12770 (dwarf_decode_lines_1): Remove reference to "reader_state".
12771 Adjust lnp_state_machine having a non-default ctor. Use bool.
12772 State machine internal state manipulation moved to
12773 lnp_state_machine methods.
12774
12775 2017-04-04 Pedro Alves <palves@redhat.com>
12776
12777 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
12778 unittests/offset-type-selftests.c.
12779 (SUBDIR_UNITTESTS_OBS): Add offset-type-selftests.o.
12780 * common/offset-type.h: New file.
12781 * common/preprocessor.h: New file.
12782 * common/traits.h: New file.
12783 * common/valid-expr.h: New file.
12784 * dwarf2expr.c: Include "common/underlying.h". Adjust to use
12785 sect_offset and cu_offset strong typedefs throughout.
12786 * dwarf2expr.h: Adjust to use sect_offset and cu_offset strong
12787 typedefs throughout.
12788 * dwarf2loc.c: Include "common/underlying.h". Adjust to use
12789 sect_offset and cu_offset strong typedefs throughout.
12790 * dwarf2read.c: Adjust to use sect_offset and cu_offset strong
12791 typedefs throughout.
12792 * gdbtypes.h: Include "common/offset-type.h".
12793 (cu_offset): Now an offset type (strong typedef) instead of a
12794 struct.
12795 (sect_offset): Likewise.
12796 (union call_site_parameter_u): Rename "param_offset" field to
12797 "param_cu_off".
12798 * unittests/offset-type-selftests.c: New file.
12799
12800 2017-04-04 Pedro Alves <palves@redhat.com>
12801
12802 * common/underlying.h: New file.
12803 * dwarf2read.c: Include "common/gdb_optional.h" and
12804 "common/underlying.h".
12805 (dir_index, file_name_index): New types.
12806 (file_entry): Use them.
12807 (file_entry::include): Use to_underlying.
12808 (line_header::add_file_name): Use dir_index.
12809 (read_formatted_entries): Use gdb::optional. Read form before
12810 writting to file_entry.
12811 (dwarf_decode_line_header): Use dir_index.
12812 (lnp_state_machine::current_file): Use to_underlying.
12813 (lnp_state_machine::file): Change type to file_name_index.
12814 (dwarf_record_line): Use to_underlying.
12815 (init_lnp_state_machine): Use file_name_index.
12816 (dwarf_decode_lines_1): Use dir_index and file_name_index.
12817
12818 2017-04-04 Pedro Alves <palves@redhat.com>
12819
12820 * common/gdb_optional.h (gdb::optiona): Add operator->, operator*,
12821 operator bool, has_value and get methods.
12822
12823 2017-04-04 Pedro Alves <palves@redhat.com>
12824
12825 * dwarf2read.c (struct file_entry): Add ctors, and initialize all
12826 fields.
12827 (line_header): Initialize all data fields. Change type of
12828 standard_opcode_lengths to std::unique_ptr<unsigned char[]>.
12829 Change type of include_dirs to std::vector<const char *>. Remove
12830 num_include_dirs, include_dirs_size. Change type of file_names to
12831 std::vector<file_entry>. Remove num_file_names, file_names_size.
12832 (line_header::line_header): New.
12833 (line_header::add_include_dir, line_header::add_file_name): New
12834 methods.
12835 (line_header::include_dir_at): Remove NULL check.
12836 (line_header::file_name_at): Add const overload.
12837 (line_header_up): New unique_ptr typedef.
12838 (dw2_get_file_names_reader): Use line_header_up. Adjust to use
12839 std::vector. Remove free_line_header call.
12840 (dwarf2_build_include_psymtabs): Use line_header_up. Remove
12841 free_line_header call.
12842 (free_cu_line_header): Delete.
12843 (handle_DW_AT_stmt_list, handle_DW_AT_stmt_list)
12844 (setup_type_unit_groups): Use line_header_up instead of cleanups.
12845 Adjust to use std::vector.
12846 (free_line_header): Delete.
12847 (free_line_header_voidp): Use delete.
12848 (add_include_dir): Replace with ...
12849 (line_header::add_include_dir): ... this method. Use std::vector.
12850 (add_file_name): Replace with ...
12851 (line_header::add_file_name): ... this method. Use std::vector.
12852 (add_include_dir_stub): Delete.
12853 (read_formatted_entries): Remove memset.
12854 (dwarf_decode_line_header): Return a line_header_up instead of a
12855 raw pointer. Remove cleanup handling. Pass lambdas to
12856 read_formatted_entries. Adjust to use line_header methods.
12857 (dwarf_decode_lines_1): Adjust to use line_header methods.
12858 (dwarf_decode_lines, file_file_name, file_full_name): Adjust to
12859 use std::vector.
12860
12861 2017-04-04 Simon Marchi <simon.marchi@polymtl.ca>
12862
12863 * remote.c (set_general_thread, set_continue_thread): Use ptid_t
12864 instead of struct ptid.
12865
12866 2017-05-04 Alan Hayward <alan.hayward@arm.com>
12867
12868 * frame.c (get_frame_register_bytes): Unwind using value.
12869 (put_frame_register_bytes): Likewise.
12870
12871 2017-03-30 Iain Buclaw <ibuclaw@gdcproject.org>
12872
12873 * d-exp.y (type_aggregate_p): Treat TYPE_CODE_MODULE as being
12874 aggregate-like.
12875
12876 2017-03-29 Jan Kratochvil <jan.kratochvil@redhat.com>
12877
12878 * auto-load.c (auto_load_section_scripts): Check SEC_HAS_CONTENTS.
12879
12880 2017-03-29 Yao Qi <yao.qi@linaro.org>
12881
12882 * gdbthread.h (struct thread_info): Declare constructor and
12883 destructor. Add some in-class member initializers.
12884 * thread.c (free_thread): Remove.
12885 (init_thread_list): Call delete instead of free_thread.
12886 (new_thread): Call thread_info constructor.
12887 (thread_info::thread_info): New function.
12888 (thread_info::~thread_info): New function.
12889 (delete_thread_1): Call delete instead of free_thread.
12890 (make_cleanup_restore_current_thread): Move tp and frame to
12891 inner block.
12892
12893 2017-03-28 Anton Kolesov <anton.kolesov@synopsys.com>
12894
12895 * arc-tdep.c (arc_frame_cache): Add support for prologue analysis.
12896 (arc_skip_prologue): Likewise.
12897 (arc_make_frame_cache): Likewise.
12898 (arc_pv_get_operand): New function.
12899 (arc_is_in_prologue): Likewise.
12900 (arc_analyze_prologue): Likewise.
12901 (arc_print_frame_cache): Likewise.
12902 (MAX_PROLOGUE_LENGTH): New constant.
12903
12904 2017-03-28 Anton Kolesov <anton.kolesov@synopsys.com>
12905
12906 * configure.tgt: Add arc-insn.o.
12907 * arc-tdep.c (arc_delayed_print_insn): Make non-static.
12908 (dump_arc_instruction_command): New function.
12909 (arc_fprintf_disasm): Likewise.
12910 (arc_disassemble_info): Likewise.
12911 (arc_insn_get_operand_value): Likewise.
12912 (arc_insn_get_operand_value_signed): Likewise.
12913 (arc_insn_get_memory_base_reg): Likewise.
12914 (arc_insn_get_memory_offset): Likewise.
12915 (arc_insn_get_branch_target): Likewise.
12916 (arc_insn_dump): Likewise.
12917 (arc_insn_get_linear_next_pc): Likewise.
12918 * arc-tdep.h (arc_delayed_print_insn): Add function declaration.
12919 (arc_disassemble_info): Likewise.
12920 (arc_insn_get_branch_target): Likewise.
12921 (arc_insn_get_linear_next_pc): Likewise.
12922 * NEWS: Mention new "maint print arc arc-instruction".
12923
12924 2017-03-28 Anton Kolesov <anton.kolesov@synopsys.com>
12925
12926 * arc-tdep (maintenance_print_arc_list): New variable.
12927 (maintenance_print_arc_command): New function.
12928
12929 2017-03-28 Anton Kolesov <anton.kolesov@synopsys.com>
12930
12931 * arc-tdep.c (core_v2_register_names, core_arcompact_register_names)
12932 Add "limm" and "reserved".
12933 (arc_cannot_fetch_register, arc_cannot_store_register): Add
12934 ARC_RESERVED_REGNUM and ARC_LIMM_REGNUM.
12935 * arc-tdep.h (arc_regnum): Likewise.
12936
12937 2017-03-27 Max Filippov <jcmvbkbc@gmail.com>
12938
12939 * xtensa-linux-nat.c (fill_gregset): Call regcache_raw_collect
12940 for THREADPTR register.
12941 (supply_gregset_reg): Call regcache_raw_supply for THREADPTR
12942 register.
12943 * xtensa-tdep.c (XTENSA_DBREGN_UREG): New definition.
12944 (xtensa_derive_tdep): Initialize tdep->threadptr_regnum.
12945 * xtensa-tdep.h (gdbarch_tdep::threadptr_regnum): New field.
12946
12947 2017-03-27 Max Filippov <jcmvbkbc@gmail.com>
12948
12949 * xtensa-tdep.c (xtensa_pseudo_register_read): Treat all
12950 registers above gdbarch_num_regs (gdbarch) as privileged in
12951 call0 ABI.
12952
12953 2017-03-27 Max Filippov <jcmvbkbc@gmail.com>
12954
12955 * xtensa-linux-nat.c (fill_gregset): Call regcache_raw_collect
12956 for a single specified register or for all registers in
12957 a0_base..a0_base + C0_NREGS range.
12958 (supply_gregset_reg): Call regcache_raw_supply for a single
12959 specified register or for all registers in a0_base..a0_base +
12960 C0_NREGS range.
12961
12962 2017-03-27 Max Filippov <jcmvbkbc@gmail.com>
12963
12964 * arch/xtensa.h (C0_NREGS): Add definition.
12965 * xtensa-tdep.c (C0_NREGS): Remove definition.
12966
12967 2017-03-27 Max Filippov <jcmvbkbc@gmail.com>
12968
12969 * xtensa-tdep.c (xtensa_scan_prologue, call0_analyze_prologue):
12970 Drop xtensa_default_isa initialization.
12971 (xtensa_gdbarch_init): Initialize xtensa_default_isa.
12972
12973 2017-03-27 Pedro Alves <palves@redhat.com>
12974
12975 * dwarf2read.c (file_entry) <dir_index>: Add comment.
12976 (file_entry::include_dir): New method.
12977 (line_header::include_dir_at, line_header::file_name_at): New
12978 methods.
12979 (setup_type_unit_groups, setup_type_unit_groups)
12980 (psymtab_include_file_name): Simplify using the new methods.
12981 (lnp_state_machine) <the_line_header>: New field.
12982 <file>: Add comment.
12983 (lnp_state_machine::current_file): New method.
12984 (dwarf_record_line): Simplify using the new methods.
12985 (init_lnp_state_machine): Initialize the "the_line_header" field.
12986 (dwarf_decode_lines_1, dwarf_decode_lines, file_file_name):
12987 Simplify using the new methods.
12988
12989 2017-03-27 Pedro Alves <palves@redhat.com>
12990
12991 * cp-name-parser.y (make_empty): Delete.
12992 (demangler_special, nested_name, ptr_operator, array_indicator)
12993 (direct_declarator, declarator_1): Use fill_comp instead of
12994 make_empty.
12995
12996 2017-03-27 Pedro Alves <palves@redhat.com>
12997
12998 * xml-support.h (gdb_xml_debug): Pass a "first-to-check" argument
12999 to ATTRIBUTE_PRINTF.
13000 * solib-target.c (library_list_start_list): Print "string" not
13001 "version".
13002 * xml-tdesc.c (tdesc_start_field): Pass "field_name" to
13003 gdb_xml_error call.
13004
13005 2017-03-27 Pedro Alves <palves@redhat.com>
13006
13007 * dwarf2read.c (struct file_and_directory): New.
13008 (dwarf2_get_dwz_file): Adjust to use std::string.
13009 (dw2_get_file_names_reader): Adjust to use file_and_directory.
13010 (find_file_and_directory): Adjust to return a file_and_directory
13011 object.
13012 (read_file_scope): Adjust to use file_and_directory. Remove
13013 make_cleanup/do_cleanups calls.
13014 (open_and_init_dwp_file): Adjust to use std::string. Remove
13015 make_cleanup/do_cleanups calls.
13016 * python/python.c (do_start_initialization): Adjust to ldirname
13017 returning a std::string.
13018 * utils.c (ldirname): Now returns a std::string.
13019 * utils.h (ldirname): Change return type to std::string.
13020 * xml-syscall.c (xml_init_syscalls_info): Adjust to ldirname
13021 returning a std::string.
13022 * xml-tdesc.c (file_read_description_xml): Likewise.
13023
13024 2017-03-24 Alan Hayward <alan.hayward@arm.com>
13025
13026 * regcache.c (regcache_debug_print_register): New function.
13027 * regcache.h (regcache_debug_print_register): New declaration.
13028 * target.c (debug_print_register): Remove.
13029 (target_fetch_registers): Call regcache_debug_print_register.
13030 (target_store_registers): Likewise.
13031
13032 2017-03-24 Pádraig Brady <pbrady@fb.com>
13033
13034 * dwarf2read.c (setup_type_unit_groups): Ensure dir_index doesn't
13035 reference beyond the 'lh->include_dirs' array before accessing to
13036 it.
13037 (psymtab_include_file_name): Likewise.
13038 (dwarf_decode_lines_1): Likewise.
13039 (dwarf_decode_lines): Likewise.
13040 (file_file_name): Likewise.
13041
13042 2017-03-23 Simon Marchi <simon.marchi@ericsson.com>
13043
13044 * fbsd-tdep.c (fbsd_corefile_thread): Don't set/restore
13045 inferior_ptid.
13046 * proc-service.c (ps_lgetregs, ps_lsetregs, ps_lgetfpregs,
13047 ps_lsetfpregs): Likewise.
13048 * regcache.c (regcache_raw_update, regcache_raw_write): Likewise.
13049 * sol-thread.c (ps_lgetregs, ps_lsetregs, ps_lgetfpregs,
13050 ps_lsetfpregs): Likewise.
13051 * target.c (target_fetch_registers, target_store_registers):
13052 Remove asserts.
13053
13054 2017-03-23 Alan Hayward <alan.hayward@arm.com>
13055
13056 * sol-thread.c (sol_thread_store_registers): Remove regcache calls.
13057
13058 2017-03-23 Yao Qi <yao.qi@linaro.org>
13059
13060 * aarch64-tdep.c (aarch64_process_record_test): Declare.
13061 (_initialize_aarch64_tdep): Register it.
13062 (aarch64_record_load_store): Handle PRFM instruction.
13063 (aarch64_process_record_test): New function.
13064
13065 2017-03-23 Yao Qi <yao.qi@linaro.org>
13066
13067 * aarch64-tdep.c (aarch64_record_load_store): Fix code
13068 indentation.
13069
13070 2017-03-23 Yao Qi <yao.qi@linaro.org>
13071
13072 * aarch64-tdep.c: Remove AARCH64_RECORD_FAILURE.
13073
13074 2017-03-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
13075
13076 python/python.c (do_start_initialization): Fix memory leak.
13077
13078 2017-03-22 Simon Marchi <simon.marchi@polymtl.ca>
13079
13080 * inf-ptrace.c (inf_ptrace_xfer_partial): Get pid from ptid
13081 using get_ptrace_pid.
13082 * linux-nat.c (linux_nat_xfer_partial): Don't set/restore
13083 inferior_ptid.
13084 (linux_proc_xfer_partial, linux_proc_xfer_spu): Use lwp of
13085 inferior_ptid instead of pid.
13086
13087 2017-03-22 Yao Qi <yao.qi@linaro.org>
13088
13089 * aarch64-tdep.c: Wrap locally used classes in anonymous
13090 namespace.
13091 * arm-tdep.c: Likewise.
13092 * linespec.c: Likewise.
13093 * ui-out.c: Likewise.
13094
13095 2017-03-22 Jonah Graham <jonah@kichwacoders.com>
13096
13097 PR gdb/19637
13098 * python/lib/gdb/printer/bound_registers.py: Import sys.
13099
13100 2017-03-21 Simon Marchi <simon.marchi@ericsson.com>
13101
13102 * windows-nat.c (do_windows_fetch_inferior_registers): Add
13103 windows_thread_info parameter and use it instead of
13104 current_thread.
13105 (windows_fetch_inferior_registers): Don't set current_thread,
13106 pass the thread to do_windows_fetch_inferior_registers. Use
13107 ptid from regcache instead of inferior_ptid.
13108 (do_windows_store_inferior_registers): Add windows_thread_info
13109 parameter and use it instead of current_thread.
13110 (windows_store_inferior_registers): Don't set current_thread,
13111 pass the thread to do_windows_store_inferior_registers. Use
13112 ptid from regcache instead of inferior_ptid.
13113
13114 2017-03-21 Simon Marchi <simon.marchi@ericsson.com>
13115
13116 * ser-mingw.c (ser_windows_raw): Remove reference to
13117 struct serial::current_timeout.
13118
13119 2017-03-21 Ivo Raisr <ivo.raisr@oracle.com>
13120
13121 PR tdep/20928
13122 * gdb/sparc-tdep.h (gdbarch_tdep) <sparc64_ccr_type>: New field.
13123 * gdb/sparc64-tdep.c (sparc64_ccr_type): New function.
13124 (sparc64_fsr_type): Fix %fsr decoding.
13125
13126 2017-03-21 Tim Wiederhake <tim.wiederhake@intel.com>
13127
13128 * python/py-record-btrace.c (btpy_insn_data): Change return type
13129 for Python 2.
13130
13131 2017-03-20 Simon Marchi <simon.marchi@polymtl.ca>
13132
13133 * spu-linux-nat.c (spu_fetch_inferior_registers,
13134 spu_store_inferior_registers): Use ptid from regcache, set and
13135 restore inferior_ptid.
13136 * spu-multiarch.c (spu_fetch_registers, spu_store_registers):
13137 Likewise.
13138
13139 2017-03-20 Simon Marchi <simon.marchi@polymtl.ca>
13140
13141 * i386-linux-nat.c (fetch_register, store_register,
13142 i386_linux_fetch_inferior_registers,
13143 i386_linux_store_inferior_registers): Use ptid from regcache.
13144 * ia64-linux-nat.c (ia64_linux_fetch_register,
13145 ia64_linux_store_register): Likewise.
13146 * inf-ptrace.c (inf_ptrace_fetch_register,
13147 inf_ptrace_store_register): Likewise.
13148 * m32r-linux-nat.c (m32r_linux_fetch_inferior_registers,
13149 m32r_linux_store_inferior_registers): Likewise.
13150 * m68k-bsd-nat.c (m68kbsd_fetch_inferior_registers,
13151 m68kbsd_store_inferior_registers): Likewise.
13152 * m68k-linux-nat.c (fetch_register, store_register,
13153 m68k_linux_fetch_inferior_registers,
13154 m68k_linux_store_inferior_registers): Likewise.
13155 * m88k-bsd-nat.c (m88kbsd_fetch_inferior_registers,
13156 m88kbsd_store_inferior_registers): Likewise.
13157 * mips-fbsd-nat.c (mips_fbsd_fetch_inferior_registers,
13158 mips_fbsd_store_inferior_registers): Likewise.
13159 * mips-linux-nat.c (mips64_linux_regsets_fetch_registers,
13160 mips64_linux_regsets_store_registers): Likewise.
13161 * mips-nbsd-nat.c (mipsnbsd_fetch_inferior_registers,
13162 mipsnbsd_store_inferior_registers): Likewise.
13163 * mips-obsd-nat.c (mips64obsd_fetch_inferior_registers,
13164 mips64obsd_store_inferior_registers): Likewise.
13165 * nto-procfs.c (procfs_fetch_registers, procfs_store_registers):
13166 Likewise.
13167 * ppc-fbsd-nat.c (ppcfbsd_fetch_inferior_registers,
13168 ppcfbsd_store_inferior_registers): Likewise.
13169 * ppc-linux-nat.c (ppc_linux_fetch_inferior_registers,
13170 ppc_linux_store_inferior_registers): Likewise.
13171 * ppc-nbsd-nat.c (ppcnbsd_fetch_inferior_registers,
13172 ppcnbsd_store_inferior_registers): Likewise.
13173 * ppc-obsd-nat.c (ppcobsd_fetch_registers,
13174 ppcobsd_store_registers): Likewise.
13175 * procfs.c (procfs_fetch_registers, procfs_store_registers):
13176 Likewise.
13177 * ravenscar-thread.c (ravenscar_fetch_registers,
13178 ravenscar_store_registers, ravenscar_prepare_to_store):
13179 Likewise.
13180 * record-btrace.c (record_btrace_fetch_registers,
13181 record_btrace_store_registers, record_btrace_prepare_to_store):
13182 Likewise.
13183 * remote-sim.c (gdbsim_fetch_register, gdbsim_store_register):
13184 Lookup inferior using ptid from regcache, instead of
13185 current_inferior.
13186 * remote.c (remote_fetch_registers, remote_store_registers): Use
13187 ptid from regcache.
13188 * rs6000-nat.c (fetch_register, store_register): Likewise.
13189 * s390-linux-nat.c (s390_linux_fetch_inferior_registers,
13190 s390_linux_store_inferior_registers): Likewise.
13191 * sh-nbsd-nat.c (shnbsd_fetch_inferior_registers,
13192 shnbsd_store_inferior_registers): Likewise.
13193 * sol-thread.c (sol_thread_fetch_registers,
13194 sol_thread_store_registers): Likewise.
13195 * sparc-nat.c (sparc_fetch_inferior_registers,
13196 sparc_store_inferior_registers): Likewise.
13197 * tilegx-linux-nat.c (fetch_inferior_registers,
13198 store_inferior_registers): Likewise.
13199 * vax-bsd-nat.c (vaxbsd_fetch_inferior_registers,
13200 vaxbsd_store_inferior_registers): Likewise.
13201 * xtensa-linux-nat.c (fetch_gregs, store_gregs, fetch_xtregs,
13202 store_xtregs): Likewise.
13203
13204 2017-03-20 Artemiy Volkov <artemiyv@acm.org>
13205
13206 PR gdb/14441
13207 * NEWS: Mention support for rvalue references in GDB and python.
13208 * doc/gdb.texinfo (C Plus Plus Expressions): Mention that GDB
13209 supports both lvalue and rvalue references.
13210
13211 2017-03-20 Artemiy Volkov <artemiyv@acm.org>
13212
13213 PR gdb/14441
13214 * gdbtypes.c (rank_one_type): Implement overloading
13215 resolution rules regarding rvalue references.
13216
13217 2017-03-20 Artemiy Volkov <artemiyv@acm.org>
13218
13219 PR gdb/14441
13220 * aarch64-tdep.c (aarch64_type_align)
13221 (aarch64_extract_return_value, aarch64_store_return_value): Change
13222 lvalue reference type checks to general reference type checks.
13223 * amd64-tdep.c (amd64_classify): Likewise.
13224 * amd64-windows-tdep.c (amd64_windows_passed_by_integer_register):
13225 Likewise.
13226 * arm-tdep.c (arm_type_align, arm_extract_return_value)
13227 (arm_store_return_value): Likewise.
13228 * ax-gdb.c (gen_fetch, gen_cast): Likewise.
13229 * c-typeprint.c (c_print_type): Likewise.
13230 * c-varobj.c (adjust_value_for_child_access, c_value_of_variable)
13231 (cplus_number_of_children, cplus_describe_child): Likewise.
13232 * compile/compile-c-symbols.c (generate_vla_size): Likewise.
13233 * completer.c (expression_completer): Likewise.
13234 * cp-support.c (make_symbol_overload_list_adl_namespace):
13235 Likewise.
13236 * darwin-nat-info.c (info_mach_region_command): Likewise.
13237 * dwarf2loc.c (entry_data_value_coerce_ref)
13238 (value_of_dwarf_reg_entry): Likewise.
13239 * eval.c (ptrmath_type_p, evaluate_subexp_standard)
13240 (evaluate_subexp_for_address, evaluate_subexp_for_sizeof):
13241 Likewise.
13242 * findvar.c (extract_typed_address, store_typed_address):
13243 Likewise.
13244 * gdbtypes.c (rank_one_type): Likewise.
13245 * hppa-tdep.c (hppa64_integral_or_pointer_p): Likewise.
13246 * infcall.c (value_arg_coerce): Likewise.
13247 * language.c (pointer_type): Likewise.
13248 * m32c-tdep.c (m32c_reg_arg_type, m32c_m16c_address_to_pointer):
13249 Likewise.
13250 * m88k-tdep.c (m88k_integral_or_pointer_p): Likewise.
13251 * mn10300-tdep.c (mn10300_type_align): Likewise.
13252 * msp430-tdep.c (msp430_push_dummy_call): Likewise.
13253 * ppc-sysv-tdep.c (do_ppc_sysv_return_value)
13254 (ppc64_sysv_abi_push_param, ppc64_sysv_abi_return_value):
13255 Likewise.
13256 * printcmd.c (print_formatted, x_command): Likewise.
13257 * python/py-type.c (typy_get_composite, typy_template_argument):
13258 Likewise.
13259 * python/py-value.c (valpy_referenced_value)
13260 (valpy_get_dynamic_type, value_has_field): Likewise.
13261 * s390-linux-tdep.c (s390_function_arg_integer): Likewise.
13262 * sparc-tdep.c (sparc_integral_or_pointer_p): Likewise.
13263 * sparc64-tdep.c (sparc64_integral_or_pointer_p): Likewise.
13264 * spu-tdep.c (spu_scalar_value_p): Likewise.
13265 * symtab.c (lookup_symbol_aux): Likewise.
13266 * typeprint.c (whatis_exp, print_type_scalar): Likewise.
13267 * valarith.c (binop_types_user_defined_p, unop_user_defined_p):
13268 Likewise.
13269 * valops.c (value_cast_pointers, value_cast)
13270 (value_reinterpret_cast, value_dynamic_cast, value_addr, typecmp)
13271 (value_struct_elt, value_struct_elt_bitpos)
13272 (value_find_oload_method_list, find_overload_match)
13273 (value_rtti_indirect_type): Likewise.
13274 * valprint.c (val_print_scalar_type_p, generic_val_print):
13275 Likewise.
13276 * value.c (value_actual_type, value_as_address, unpack_long)
13277 (pack_long, pack_unsigned_long, coerce_ref_if_computed)
13278 (coerce_ref): Likewise.
13279 * varobj.c (varobj_get_value_type): Likewise.
13280
13281 2017-03-20 Artemiy Volkov <artemiyv@acm.org>
13282
13283 PR gdb/14441
13284 * doc/python.texi (Types in Python): Add TYPE_CODE_RVALUE_REF to
13285 table of constants.
13286 * python/lib/gdb/command/explore.py: Support exploring values
13287 of rvalue reference types.
13288 * python/lib/gdb/types.py: Implement get_basic_type() for
13289 rvalue reference types.
13290 * python/py-type.c (pyty_codes) <TYPE_CODE_RVALUE_REF>: New
13291 constant.
13292 * python/py-value.c (valpy_getitem): Add an rvalue reference
13293 check.
13294 (valpy_reference_value): Add new parameter "refcode".
13295 (valpy_lvalue_reference_value, valpy_rvalue_reference_value):
13296 New wrappers for valpy_reference_value().
13297 * python/py-xmethods.c (gdbpy_get_xmethod_result_type)
13298 (gdbpy_invoke_xmethod): Likewise.
13299
13300 2017-03-20 Artemiy Volkov <artemiyv@acm.org>
13301
13302 PR gdb/14441
13303 * dwarf2read.c (process_die, read_type_die_1): Handle the
13304 DW_TAG_rvalue_reference_type DIE.
13305 (read_tag_reference_type): Add new parameter "refcode".
13306
13307 2017-03-20 Artemiy Volkov <artemiyv@acm.org>
13308
13309 PR gdb/14441
13310 * c-typeprint.c (c_print_type, c_type_print_varspec_prefix)
13311 (c_type_print_modifier, c_type_print_varspec_suffix)
13312 (c_type_print_base): Support printing rvalue reference types.
13313 * c-valprint.c (c_val_print, c_value_print): Support printing
13314 rvalue reference values.
13315
13316 2017-03-20 Artemiy Volkov <artemiyv@acm.org>
13317
13318 PR gdb/14441
13319 * cp-name-parser.y (ptr_operator): Handle the '&&' token in
13320 typename.
13321 * cp-support.c (replace_typedefs): Handle
13322 DEMANGLE_COMPONENT_RVALUE_REFERENCE.
13323 * python/py-type.c (typy_lookup_type): Likewise.
13324
13325 2017-03-20 Artemiy Volkov <artemiyv@acm.org>
13326
13327 PR gdb/14441
13328 * c-exp.y (ptr_operator): Handle the '&&' token in the typename.
13329 * parse.c (insert_type): Change assert statement.
13330 (follow_types): Handle rvalue reference types.
13331 * parser-defs.h (enum type_pieces) <tp_rvalue_reference>: New
13332 constant.
13333
13334 2017-03-20 Artemiy Volkov <artemiyv@acm.org>
13335
13336 PR gdb/14441
13337 * ada-lang.c (ada_evaluate_subexp): Adhere to the new
13338 value_ref() interface.
13339 * c-valprint.c (c_value_print): Likewise.
13340 * infcall.c (value_arg_coerce): Likewise.
13341 * python/py-value.c (valpy_reference_value): Likewise.
13342 * valops.c (value_cast, value_reinterpret_cast)
13343 (value_dynamic_cast, typecmp): Likewise.
13344 (value_ref): Parameterize by kind of return value reference type.
13345 * value.h (value_ref): Add new parameter "refcode".
13346
13347 2017-03-20 Artemiy Volkov <artemiyv@acm.org>
13348
13349 PR gdb/14441
13350 * dwarf2read.c (read_tag_reference_type): Use
13351 lookup_lvalue_reference_type() instead of lookup_reference_type().
13352 * eval.c (evaluate_subexp_standard): Likewise.
13353 * f-exp.y: Likewise.
13354 * gdbtypes.c (make_reference_type, lookup_reference_type):
13355 Generalize with rvalue reference types.
13356 (lookup_lvalue_reference_type, lookup_rvalue_reference_type): New
13357 convenience wrappers for lookup_reference_type().
13358 * gdbtypes.h (make_reference_type, lookup_reference_type): Add a
13359 reference kind parameter.
13360 (lookup_lvalue_reference_type, lookup_rvalue_reference_type): Add
13361 wrappers for lookup_reference_type().
13362 * guile/scm-type.c (gdbscm_type_reference): Use
13363 lookup_lvalue_reference_type() instead of lookup_reference_type().
13364 * guile/scm-value.c (gdbscm_value_dynamic_type): Likewise.
13365 * parse.c (follow_types): Likewise.
13366 * python/py-type.c (typy_reference, typy_lookup_type): Likewise.
13367 * python/py-value.c (valpy_get_dynamic_type, valpy_getitem):
13368 Likewise.
13369 * python/py-xmethods.c (gdbpy_get_xmethod_result_type)
13370 (gdbpy_invoke_xmethod): Likewise.
13371 * stabsread.c: Provide extra argument to make_reference_type()
13372 call.
13373 * valops.c (value_ref, value_rtti_indirect_type): Use
13374 lookup_lvalue_reference_type() instead of lookup_reference_type().
13375
13376 2017-03-20 Artemiy Volkov <artemiyv@acm.org>
13377
13378 PR gdb/14441
13379 * gdbtypes.h (enum type_code) <TYPE_CODE_RVALUE_REF>: New constant.
13380 (TYPE_IS_REFERENCE): New macro.
13381 (struct type): Add rvalue_reference_type field.
13382 (TYPE_RVALUE_REFERENCE_TYPE): New macro.
13383
13384 2017-03-20 Marc-Andre Laperle <marc-andre.laperle@ericsson.com>
13385
13386 * NEWS: Add an entry about new '-file-list-shared-libraries' command.
13387 * mi/mi-cmd-file.c (mi_cmd_file_list_shared_libraries):
13388 New function definition.
13389 * mi/mi-cmds.c (mi_cmds): Add -file-list-shared-libraries command.
13390 * mi/mi-cmds.h (mi_cmd_file_list_shared_libraries):
13391 New function declaration.
13392 * mi/mi-interp.c (mi_output_solib_attribs): New Function.
13393 * mi/mi-interp.h: New file.
13394 * solib.c (info_sharedlibrary_command): Replace for loop with
13395 ALL_SO_LIBS macro
13396 * solib.h (update_solib_list): New function declaration.
13397 (so_list_head): Move macro.
13398 * solist.h (ALL_SO_LIBS): New macro.
13399
13400 2017-03-20 Marc-Andre Laperle <marc-andre.laperle@ericsson.com>
13401
13402 * infcmd.c (post_create_inferior): Remove unused argument in
13403 call to solib_add.
13404 * remote.c (remote_start_remote): Likewise.
13405 * solib-frv.c (frv_fetch_objfile_link_map): Likewise.
13406 * solib-svr4.c: (svr4_fetch_objfile_link_map): Likewise.
13407 (enable_break): Likewise.
13408 * solib.c (update_solib_list): Remove unused target argument
13409 and its documentation.
13410 (solib_add): Remove unused target argument. Remove unused
13411 argument in call to update_solib_list.
13412 (info_sharedlibrary_command): Remove unused argument in call
13413 to update_solib_list.
13414 (sharedlibrary_command): Remove unused argument in call to
13415 solib_add.
13416 (handle_solib_event): Likewise.
13417 (reload_shared_libraries): Likewise.
13418 * solib.h (solib_add): Remove unused target argument.
13419
13420 2017-03-20 Andreas Arnez <arnez@linux.vnet.ibm.com>
13421
13422 * s390-linux-tdep.c (is_rsi, is_rie): Remove functions.
13423 (s390_displaced_step_fixup): Cover relative branches with the
13424 default fixup handling. This fixes lack of support for some
13425 relative branch instructions.
13426
13427 2017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
13428
13429 * i386-gnu-nat.c (gnu_fetch_registers, gnu_store_registers): Use
13430 ptid from regcache.
13431
13432 2017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
13433
13434 * i386-darwin-nat.c (i386_darwin_fetch_inferior_registers,
13435 i386_darwin_store_inferior_registers): Use ptid from regcache.
13436
13437 2017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
13438
13439 * i386-bsd-nat.c (i386bsd_fetch_inferior_registers,
13440 i386bsd_store_inferior_registers): Use ptid from regcache.
13441
13442 2017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
13443
13444 * hppa-obsd-nat.c (hppaobsd_fetch_registers,
13445 hppaobsd_store_registers): Use ptid from regcache.
13446
13447 2017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
13448
13449 * hppa-nbsd-nat.c (hppanbsd_fetch_registers,
13450 hppanbsd_store_registers): Use ptid from regcache.
13451
13452 2017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
13453
13454 * hppa-linux-nat.c (fetch_register, store_register): Use ptid
13455 from regcache. Use get_ptrace_pid.
13456
13457 2017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
13458
13459 * corelow.c (get_core_register_section): Use ptid from regcache,
13460 update doc.
13461
13462 2017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
13463
13464 * bsd-uthread.c (bsd_uthread_fetch_registers,
13465 bsd_uthread_store_registers): Use ptid from regcache, set and
13466 restore inferior_ptid.
13467
13468 2017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
13469
13470 * arm-nbsd-nat.c (fetch_register, fetch_regs, fetch_fp_register,
13471 fetch_fp_regs, store_register, store_regs, store_fp_register,
13472 store_fp_regs): Use ptid from regcache.
13473
13474 2017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
13475
13476 * arm-linux-nat.c (fetch_fpregs, store_fpregs, fetch_regs,
13477 store_regs, fetch_wmmx_regs, store_wmmx_regs, fetch_vfp_regs,
13478 store_vfp_regs): Use ptid from regcache.
13479
13480 2017-03-17 Pedro Alves <palves@redhat.com>
13481
13482 PR remote/21188
13483 * ser-base.c (ser_base_wait_for): Add comment.
13484 (do_ser_base_readchar): Improve comment based on the ser-unix.c's
13485 version.
13486 * ser-unix.c (hardwire_raw): Remove reference to
13487 scb->current_timeout.
13488 (wait_for, do_hardwire_readchar, hardwire_readchar): Delete.
13489 (hardwire_ops): Install ser_base_readchar instead of
13490 hardwire_readchar.
13491 * serial.h (struct serial) <current_timeout, timeout_remaining>:
13492 Remove fields.
13493
13494 2017-03-17 Jonah Graham <jonah@kichwacoders.com>
13495
13496 PR gdb/19637
13497 * python/lib/gdb/printer/bound_registers.py: Add support for
13498 Python 3.
13499
13500 2017-03-16 Andreas Arnez <arnez@linux.vnet.ibm.com>
13501
13502 * dwarf2loc.c (indirect_synthetic_pointer): Get data type of
13503 pointed-to DIE and pass it to dwarf2_evaluate_loc_desc_full.
13504 (dwarf2_evaluate_loc_desc_full): New parameter subobj_type; rename
13505 byte_offset to subobj_byte_offset. Fix the handling of
13506 DWARF_VALUE_STACK on big-endian targets when coming via an
13507 implicit pointer.
13508 (dwarf2_evaluate_loc_desc): Adjust call to
13509 dwarf2_evaluate_loc_desc_full.
13510 * dwarf2loc.h (dwarf2_fetch_die_type_sect_off): New declaration.
13511 * dwarf2read.c (dwarf2_fetch_die_type_sect_off): New function.
13512
13513 2017-03-16 Yao Qi <yao.qi@linaro.org>
13514
13515 * arm-tdep.c (thumb_record_misc): Decode CBNZ, CBZ, REV16,
13516 and REVSH instructions.
13517
13518 2017-03-16 Yao Qi <yao.qi@linaro.org>
13519
13520 * arm-tdep.c [GDB_SELF_TEST]: include "selftests.h".
13521 (arm_record_test): Declare.
13522 (_initialize_arm_tdep) [GDB_SELF_TEST]: call register_self_test.
13523 (thumb_record_ld_st_reg_offset): Rewrite the opcode matching to
13524 align with the manual.
13525 (thumb_record_misc): Adjust the code order to align with the
13526 manual.
13527 (thumb2_record_decode_insn_handler): Fix instruction matching.
13528 (instruction_reader_thumb): New class.
13529 (arm_record_test): New function.
13530
13531 2017-03-16 Yao Qi <yao.qi@linaro.org>
13532
13533 * arm-tdep.c (abstract_memory_reader): New class.
13534 (instruction_reader): New class.
13535 (extract_arm_insn): Add argument 'reader'. Callers updated.
13536 (decode_insn): Likewise.
13537
13538 2017-03-16 Doug Evans <dje@google.com>
13539
13540 * guile/scm-lazy-string.c (lazy_string_smob): Clarify use of LENGTH
13541 member. Change type of TYPE member to SCM. All uses updated.
13542 (lsscm_make_lazy_string_smob): Add assert.
13543 (lsscm_make_lazy_string): Flag bad length values.
13544 (lsscm_elt_type): New function.
13545 (gdbscm_lazy_string_to_value): Rewrite to use
13546 lsscm_safe_lazy_string_to_value.
13547 (lsscm_safe_lazy_string_to_value): Fix handling of TYPE_CODE_PTR.
13548 * guile/scm-value.c (gdbscm_value_to_lazy_string): Flag bad length
13549 values. Fix TYPE_CODE_PTR. Handle TYPE_CODE_ARRAY. Handle typedefs
13550 in incoming type.
13551 * guile/guile-internal.h (tyscm_scm_to_type): Declare.
13552 * guile/scm-type.c (tyscm_scm_to_type): New function.
13553
13554 2017-03-15 Doug Evans <dje@google.com>
13555
13556 PR python/17728, python/18439, python/18779
13557 * python/py-lazy-string.c (lazy_string_object): Clarify use of LENGTH
13558 member. Change type of TYPE member to PyObject *. All uses updated.
13559 (stpy_convert_to_value): Fix handling of TYPE_CODE_PTR.
13560 (gdbpy_create_lazy_string_object): Flag bad length values.
13561 Handle TYPE_CODE_ARRAY with possibly different user-provided length.
13562 Handle typedefs in incoming type.
13563 (stpy_lazy_string_elt_type): New function.
13564 (gdbpy_extract_lazy_string): Call it.
13565 * python/py-value.c (valpy_lazy_string): Flag bad length values.
13566 Fix handling of TYPE_CODE_PTR. Handle TYPE_CODE_ARRAY. Handle
13567 typedefs in incoming type.
13568
13569 2017-03-16 Doug Evans <dje@google.com>
13570
13571 * guile/guile-internal.h (tyscm_scm_to_type): Declare.
13572 * guile/scm-type.c (tyscm_scm_to_type): New function.
13573
13574 2017-03-16 Jiong Wang <jiong.wang@arm.com>
13575
13576 * inf-ptrace.c (inf_ptrace_peek_poke): Change the type to
13577 "ULONGEST" for "skip".
13578
13579 2017-03-14 Andreas Arnez <arnez@linux.vnet.ibm.com>
13580
13581 PR gdb/21220
13582 * inf-ptrace.c (inf_ptrace_xfer_partial): In "case
13583 TARGET_OBJECT_MEMORY", extract the logic for ptrace peek/poke...
13584 (inf_ptrace_peek_poke): ...here. New function. Now also loop
13585 over ptrace peek/poke until end of buffer or error.
13586
13587 2017-03-14 Simon Marchi <simon.marchi@ericsson.com>
13588
13589 * parse.c (length_of_subexp): Make static.
13590 * parser-defs.h (length_of_subexp): Remove.
13591
13592 2017-03-14 Andreas Arnez <arnez@linux.vnet.ibm.com>
13593
13594 * linux-nat.c (linux_proc_xfer_partial): Handle write operations
13595 as well.
13596
13597 2017-03-14 Pedro Alves <palves@redhat.com>
13598
13599 * cp-name-parser.y (cp_demangled_name_to_comp): Update comment.
13600 (main): Use std::unique_ptr. Remove calls to
13601 cp_demangled_name_parse_free.
13602
13603 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
13604
13605 * alpha-bsd-nat.c (alphabsd_fetch_inferior_registers,
13606 alphabsd_store_inferior_registers): Use regcache->ptid instead
13607 of inferior_ptid.
13608
13609 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
13610
13611 * aix-thread.c (aix_thread_fetch_registers,
13612 aix_thread_store_registers): Use regcache->ptid instead of
13613 inferior_ptid.
13614
13615 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
13616
13617 * aarch64-linux-nat.c (fetch_gregs_from_thread,
13618 store_gregs_to_thread, fetch_fpregs_from_thread,
13619 store_fpregs_to_thread): Use regcache->ptid instead of
13620 inferior_ptid.
13621
13622 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
13623
13624 * amd64-linux-nat.c (amd64_linux_fetch_inferior_registers,
13625 amd64_linux_fetch_inferior_registers): Use regcache->ptid
13626 instead of inferior_ptid.
13627
13628 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
13629
13630 * target.c (target_fetch_registers, target_store_registers): Add
13631 assert.
13632
13633 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
13634
13635 * regcache.h (regcache_get_ptid): New function.
13636 * regcache.c (regcache_get_ptid): New function.
13637
13638 2017-03-13 Mark Wielaard <mark@klomp.org>
13639
13640 * cp-name-parser.y (make_empty): Initialize d_printing to zero.
13641
13642 2017-03-10 Keith Seitz <keiths@redhat.com>
13643
13644 PR c++/8218
13645 * c-typeprint.c (cp_type_print_method_args): Skip artificial arguments.
13646
13647 2017-03-08 Pedro Alves <palves@redhat.com>
13648
13649 PR gdb/18360
13650 * infrun.c (start_step_over, do_target_resume, resume)
13651 (restart_threads): Assert we're not resuming a thread that is
13652 meant to be stopped.
13653 (infrun_thread_stop_requested_callback): Delete.
13654 (infrun_thread_stop_requested): If the thread is internally
13655 stopped, queue a pending stop event and clear the thread's
13656 inline-frame state.
13657 (handle_stop_requested): New function.
13658 (handle_syscall_event, handle_inferior_event_1): Use
13659 handle_stop_requested.
13660 (handle_stop_requested): New function.
13661 (handle_signal_stop): Set the thread's stop_signal here instead of
13662 at caller.
13663 (finish_step_over): Clear step over info unconditionally.
13664 (handle_signal_stop): If the user had interrupted the event
13665 thread, consider the stop a random signal.
13666 (handle_signal_stop) <signal arrived while stepping over
13667 breakpoint>: Don't restart threads here.
13668 (stop_waiting): Don't clear step-over info here.
13669
13670 2017-03-08 Pedro Alves <palves@redhat.com>
13671
13672 PR 21206
13673 * common/gdb_unlinker.h (unlinker::unlinker): Attribute nonnull
13674 goes to argument 2, not 1.
13675
13676 2017-03-08 Pedro Alves <palves@redhat.com>
13677
13678 PR cli/21218
13679 * top.c (gdb_readline_wrapper): Avoid passing NULL to
13680 display_gdb_prompt.
13681 (command_line_input): Add comment.
13682
13683 2017-03-08 Pedro Alves <palves@redhat.com>
13684
13685 PR tui/21216
13686 * tui/tui-file.c (tui_file::write): New.
13687 * tui/tui-file.h (tui_file): Override "write".
13688 * tui/tui-io.c (do_tui_putc, update_start_line): New functions,
13689 factored out from ...
13690 (tui_puts): ... here.
13691 (tui_putc): Use them.
13692 (tui_write): New function.
13693 * tui/tui-io.h (tui_write): Declare.
13694
13695 2017-03-07 Sergio Durigan Junior <sergiodj@redhat.com>
13696
13697 * Makefile.in (SFILES): Replace "environ.c" with
13698 "common/environ.c".
13699 (HFILES_NO_SRCDIR): Likewise, for "environ.h".
13700 * environ.c: Include "common-defs.h" instead of "defs.h. Moved
13701 to...
13702 * common/environ.c: ... here.
13703 * environ.h: Moved to...
13704 * common/environ.h: ... here.
13705
13706 2017-03-07 Peter Bergner <bergner@vnet.ibm.com>
13707
13708 * gdbarch.sh (pstring_ptr): New static function.
13709 (gdbarch_disassembler_options): Use it.
13710 (gdbarch_verify_disassembler_options): Print valid_disassembler_options,
13711 not valid_disassembler_option->name.
13712 * gdbarch.c: Regenerate.
13713
13714 2017-03-07 Peter Bergner <bergner@vnet.ibm.com>
13715
13716 * config/powerpc/ppc64-linux.mh (MH_CFLAGS): Delete.
13717
13718 2017-03-07 Pedro Alves <palves@redhat.com>
13719
13720 * tui/tui-regs.c (tui_restore_gdbout): Don't delete gdb_stdout.
13721
13722 2017-03-07 Walfred Tedeschi <walfred.tedeschi@intel.com>
13723
13724 * i387-tdep.h (i387_reset_bnd_regs): Add function definition.
13725 * i387-tdep.c (i387_reset_bnd_regs): Add function implementation.
13726 * i386-tdep.c (i386_push_dummy_call): Call i387_reset_bnd_regs.
13727 * amd64-tdep.c (amd64_push_dummy_call): Call i387_reset_bnd_regs.
13728
13729 2017-03-06 Simon Marchi <simon.marchi@ericsson.com>
13730
13731 * xtensa-linux-nat.c (fetch_gregs): Remove const.
13732
13733 2017-03-03 Simon Marchi <simon.marchi@ericsson.com>
13734
13735 * remote.c (remote_add_target_side_commands): Use range-based
13736 for loop.
13737
13738 2017-03-03 Yao Qi <yao.qi@linaro.org>
13739
13740 PR gdb/21165
13741 * ada-valprint.c (ada_val_print_ref): Call value_fetch_lazy if
13742 value is lazy.
13743 * valprint.c (common_val_print): Likewise.
13744
13745 2017-02-28 Peter Bergner <bergner@vnet.ibm.com>
13746
13747 * NEWS: Mention new set/show disassembler-options commands.
13748 * doc/gdb.texinfo: Document new set/show disassembler-options commands.
13749 * disasm.c: Include "arch-utils.h", "gdbcmd.h" and "safe-ctype.h".
13750 (prospective_options): New static variable.
13751 (gdb_disassembler::gdb_disassembler): Initialize
13752 m_di.disassembler_options.
13753 (gdb_buffered_insn_length_init_dis): Initilize di->disassembler_options.
13754 (get_disassembler_options): New function.
13755 (set_disassembler_options): Likewise.
13756 (set_disassembler_options_sfunc): Likewise.
13757 (show_disassembler_options_sfunc): Likewise.
13758 (disassembler_options_completer): Likewise.
13759 (_initialize_disasm): Likewise.
13760 * disasm.h (get_disassembler_options): New prototype.
13761 (set_disassembler_options): Likewise.
13762 * gdbarch.sh (gdbarch_disassembler_options): New variable.
13763 (gdbarch_verify_disassembler_options): Likewise.
13764 * gdbarch.c: Regenerate.
13765 * gdbarch.h: Likewise.
13766 * arm-tdep.c (num_disassembly_options): Delete.
13767 (set_disassembly_style): Likewise.
13768 (arm_disassembler_options): New static variable.
13769 (set_disassembly_style_sfunc): Convert short style name into long
13770 option name. Call set_disassembler_options.
13771 (show_disassembly_style_sfunc): New function.
13772 (arm_gdbarch_init): Call set_gdbarch_disassembler_options and
13773 set_gdbarch_verify_disassembler_options.
13774 (_initialize_arm_tdep): Delete regnames variable and update callers.
13775 (arm_disassembler_options): Initialize.
13776 (disasm_options): New variable.
13777 (num_disassembly_options): Rename from this...
13778 (num_disassembly_styles): ...to this. Compute by scanning through
13779 disasm_options.
13780 (valid_disassembly_styles): Initialize using disasm_options.
13781 Remove calls to parse_arm_disassembler_option, get_arm_regnames and
13782 set_arm_regname_option.
13783 Pass show_disassembly_style_sfunc to the "disassembler" setshow command.
13784 * rs6000-tdep.c (powerpc_disassembler_options): New static variable.
13785 (rs6000_gdbarch_init): Call set_gdbarch_disassembler_options and
13786 set_gdbarch_verify_disassembler_options.
13787 * s390-tdep.c (s390_disassembler_options): New static variable.
13788 (s390_gdbarch_init):all set_gdbarch_disassembler_options and
13789 set_gdbarch_verify_disassembler_options.
13790
13791 2017-02-27 Simon Marchi <simon.marchi@ericsson.com>
13792
13793 * remote.c (remote_add_target_side_condition): Remove "struct"
13794 keyword from range-based for loop.
13795
13796 2017-02-27 Simon Marchi <simon.marchi@ericsson.com>
13797
13798 * remote.c (remote_add_target_side_condition): Use range-based
13799 for loop. Update comment.
13800
13801 2017-02-27 Yao Qi <yao.qi@linaro.org>
13802
13803 * f-typeprint.c (f_print_type): Check "varstring" is empty first.
13804
13805 2017-02-26 Alan Hayward <alan.hayward@arm.com>
13806
13807 * regcache.c (regcache_raw_update): New function.
13808 (regcache_raw_read): Move code to regcache_raw_update.
13809 * regcache.h (regcache_raw_update): New declaration.
13810 * remote.c (remote_prepare_to_store): Call regcache_raw_update.
13811
13812 2017-02-26 Jan Kratochvil <jan.kratochvil@redhat.com>
13813
13814 * dwarf2read.c (create_debug_type_hash_table): Initialize
13815 header.signature and header.type_offset_in_tu.
13816
13817 2017-02-24 Pedro Alves <palves@redhat.com>
13818
13819 * symtab.c (make_file_symbol_completion_list_1): Use
13820 add_symtab_completions.
13821
13822 2017-02-24 Alan Hayward <alan.hayward@arm.com>
13823
13824 * stack.c (frame_info): Use frame_unwind_register_value to avoid buf.
13825
13826 2017-02-24 Alan Hayward <alan.hayward@arm.com>
13827
13828 * i386-tdep.c (i386_pseudo_register_read_into_value): Use
13829 I386_MAX_REGISTER_SIZE.
13830 (i386_pseudo_register_write): Likewise.
13831 (i386_process_record): Likewise.
13832 * i387-tdep.c (i387_supply_xsave): Likewise.
13833 * m68k-linux-nat.c (fetch_register): Use M68K_MAX_REGISTER_SIZE.
13834 (store_register): Likewise.
13835
13836 2017-02-23 Pedro Alves <palves@redhat.com>
13837
13838 * ada-lang.c: Include "common/function-view.h".
13839 (ada_iterate_over_symbols): Adjust to use function_view as
13840 callback type.
13841 (struct add_partial_datum, ada_complete_symbol_matcher): Delete.
13842 (ada_make_symbol_completion_list): Use a lambda.
13843 (ada_exc_search_name_matches): Delete.
13844 (name_matches_regex): New.
13845 (ada_add_global_exceptions): Use a lambda and name_matches_regex.
13846 * compile/compile-c-support.c: Include "common/function-view.h".
13847 (print_one_macro): Change prototype to accept a ui_file pointer.
13848 (write_macro_definitions): Use a lambda.
13849 * dwarf2read.c: Include "common/function-view.h".
13850 (dw2_map_expand_apply, dw2_map_symtabs_matching_filename)
13851 (dw2_expand_symtabs_matching): Adjust to use function_view as
13852 callback type.
13853 * language.h: Include "common/function-view.h".
13854 (struct language_defn) <la_iterate_over_symbols>: Adjust to use
13855 function_view as callback type.
13856 (LA_ITERATE_OVER_SYMBOLS): Remove DATA parameter.
13857 * linespec.c: Include "common/function-view.h".
13858 (collect_info::add_symbol): New method.
13859 (struct symbol_and_data_callback, iterate_inline_only, struct
13860 symbol_matcher_data, iterate_name_matcher): Delete.
13861 (iterate_over_all_matching_symtabs): Adjust to use function_view
13862 as callback type and lambdas.
13863 (iterate_over_file_blocks): Adjust to use function_view as
13864 callback type.
13865 (decode_compound_collector): Now a class with private fields.
13866 (decode_compound_collector::release_symbols): New method.
13867 (collect_one_symbol): Rename to...
13868 (decode_compound_collector::operator()): ... this and adjust.
13869 (lookup_prefix_sym): decode_compound_collector construction bits
13870 move to decode_compound_collector ctor. Pass the
13871 decode_compound_collector object directly as callback. Remove
13872 cleanups and use decode_compound_collector::release_symbols
13873 instead.
13874 (symtab_collector): Now a class with private fields.
13875 (symtab_collector::release_symtabs): New method.
13876 (add_symtabs_to_list): Rename to...
13877 (symtab_collector::operator()): ... this and adjust.
13878 (collect_symtabs_from_filename): symtab_collector construction
13879 bits move to symtab_collector ctor. Pass the symtab_collector
13880 object directly as callback. Remove cleanups and use
13881 symtab_collector::release_symtabs instead.
13882 (collect_symbols): Delete.
13883 (add_matching_symbols_to_info): Use lambdas.
13884 * macrocmd.c (print_macro_callback): Delete.
13885 (info_macro_command): Use a lambda.
13886 (info_macros_command): Pass print_macro_definition as callable
13887 directly.
13888 (print_one_macro): Remove 'ignore' parameter.
13889 (macro_list_command): Adjust.
13890 * macrotab.c (macro_for_each_data::fn): Now a function_view.
13891 (macro_for_each_data::user_data): Delete field.
13892 (foreach_macro): Adjust to call the function_view.
13893 (macro_for_each): Adjust to use function_view as callback type.
13894 (foreach_macro_in_scope): Adjust to call the function_view.
13895 (macro_for_each_in_scope): Adjust to use function_view as callback
13896 type.
13897 * macrotab.h: Include "common/function-view.h".
13898 (macro_callback_fn): Declare a prototype instead of a pointer.
13899 Remove "user_data" parameter.
13900 (macro_for_each, macro_for_each_in_scope): Adjust to use
13901 function_view as callback type.
13902 * psymtab.c (partial_map_expand_apply)
13903 (psym_map_symtabs_matching_filename, recursively_search_psymtabs):
13904 Adjust to use function_view as callback type and to return bool.
13905 (psym_expand_symtabs_matching): Adjust to use function_view as
13906 callback types.
13907 * symfile-debug.c (debug_qf_map_symtabs_matching_filename): Adjust
13908 to use function_view as callback type and to return bool.
13909 (debug_qf_expand_symtabs_matching): Adjust to use function_view as
13910 callback types.
13911 * symfile.c (expand_symtabs_matching): Adjust to use function_view
13912 as callback types.
13913 * symfile.h: Include "common/function-view.h".
13914 (expand_symtabs_file_matcher_ftype)
13915 (expand_symtabs_symbol_matcher_ftype)
13916 (expand_symtabs_exp_notify_ftype): Remove "data" parameter and
13917 return bool.
13918 (quick_symbol_functions::map_symtabs_matching_filename)
13919 (quick_symbol_functions::expand_symtabs_matching): Adjust to use
13920 function_view as callback type and return bool.
13921 (expand_symtabs_matching): Adjust to use function_view as callback
13922 type.
13923 (maintenance_expand_name_matcher)
13924 (maintenance_expand_file_matcher): Delete.
13925 (maintenance_expand_symtabs): Use lambdas.
13926 * symtab.c (iterate_over_some_symtabs): Adjust to use
13927 function_view as callback types and return bool.
13928 (iterate_over_symtabs): Likewise. Use unique_xmalloc_ptr instead
13929 of a cleanup.
13930 (lookup_symtab_callback): Delete.
13931 (lookup_symtab): Use a lambda.
13932 (iterate_over_symbols): Adjust to use function_view as callback
13933 type.
13934 (struct search_symbols_data, search_symbols_file_matches)
13935 (search_symbols_name_matches): Delete.
13936 (search_symbols): Use a pair of lambdas.
13937 (struct add_name_data, add_macro_name, symbol_completion_matcher)
13938 (symtab_expansion_callback): Delete.
13939 (default_make_symbol_completion_list_break_on_1): Use lambdas.
13940 * symtab.h: Include "common/function-view.h".
13941 (iterate_over_some_symtabs): Adjust to use function_view as
13942 callback type and return bool.
13943 (iterate_over_symtabs): Adjust to use function_view as callback
13944 type.
13945 (symbol_found_callback_ftype): Remove 'data' parameter and return
13946 bool.
13947 (iterate_over_symbols): Adjust to use function_view as callback
13948 type.
13949
13950 2017-02-23 Pedro Alves <palves@redhat.com>
13951
13952 * Makefile.in (SUBDIR_UNITTESTS_SRCS, SUBDIR_UNITTESTS_OBS): New.
13953 (%.o) <unittests/%.c>: New pattern.
13954 * configure.ac ($development): Add $(SUBDIR_UNITTESTS_OBS) to
13955 CONFIG_OBS, and $(SUBDIR_UNITTESTS_SRCS) to CONFIG_SRCS.
13956 * common/function-view.h: New file.
13957 * unittests/function-view-selftests.c: New file.
13958 * configure: Regenerate.
13959
13960 2017-02-23 Simon Marchi <simon.marchi@ericsson.com>
13961
13962 * bsd-uthread.c (bsd_uthread_thread_alive): Use ptid instead of
13963 inferior_ptid.
13964 * go32-nat.c (go32_thread_alive): Likewise.
13965
13966 2017-02-23 Yao Qi <yao.qi@linaro.org>
13967
13968 * varobj-iter.h (varobj_iter_delete): Call xfree instead of
13969 delete.
13970
13971 2017-02-23 Yao Qi <yao.qi@linaro.org>
13972
13973 * varobj.c (varobj_clear_saved_item): Use delete instead of
13974 xfree.
13975 (update_dynamic_varobj_children): Likewise.
13976
13977 2017-02-21 Jan Kratochvil <jan.kratochvil@redhat.com>
13978
13979 * dwarf2read.c (dwarf2_record_block_ranges): Add forgotten BASEADDR.
13980
13981 2017-02-21 Simon Marchi <simon.marchi@ericsson.com>
13982
13983 * common/enum-flags.h (enum_flags::enum_flags): Initialize
13984 m_enum_value to 0 in default constructor.
13985
13986 2017-02-21 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
13987
13988 * rs6000-tdep.c (LOAD_AND_RESERVE_MASK): Rename from LWARX_MASK.
13989 (STORE_CONDITIONAL_MASK): Rename from STWCX_MASK.
13990 (LBARX_INSTRUCTION, LHARX_INSTRUCTION, LQARX_INSTRUCTION,
13991 STBCX_INSTRUCTION, STHCX_INSTRUCTION, STQCX_INSTRUCTION): New defines.
13992 (IS_LOAD_AND_RESERVE_INSN, IS_STORE_CONDITIONAL_INSN): New macros.
13993 (ppc_displaced_step_copy_insn): Use IS_LOAD_AND_RESERVE_INSN.
13994 (ppc_deal_with_atomic_sequence): Use IS_LOAD_AND_RESERVE_INSN and
13995 IS_STORE_CONDITIONAL_INSN.
13996
13997 2017-02-21 Jan Kratochvil <jan.kratochvil@redhat.com>
13998
13999 * dwarf2_rnglists_process: Initialize range_beginning and range_end.
14000
14001 2017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
14002
14003 * NEWS (Changes since GDB 7.12): Add DWARF-5.
14004
14005 2017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
14006
14007 * dwarf2read.c (skip_one_die, read_attribute_value)
14008 (dwarf2_const_value_attr, dump_die_shallow)
14009 (dwarf2_get_attr_constant_value, dwarf2_fetch_constant_bytes)
14010 (skip_form_bytes, attr_form_is_constant): Handle DW_FORM_data16.
14011
14012 2017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
14013
14014 * dwarf2read.c (read_file_scope): Rename DW_MACRO_GNU_*.
14015 (dwarf_parse_macro_header): Accept DWARF version 5.
14016 (dwarf_decode_macro_bytes, dwarf_decode_macros): Rename DW_MACRO_GNU_*.
14017
14018 2017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
14019
14020 * block.c (call_site_for_pc): Rename DW_OP_GNU_*, DW_TAG_GNU_* and
14021 DW_AT_GNU_*.
14022 * common/common-exceptions.h (enum errors): Likewise.
14023 * dwarf2-frame.c (class dwarf_expr_executor): Likewise.
14024 * dwarf2expr.c (dwarf_block_to_dwarf_reg)
14025 (dwarf_expr_context::execute_stack_op): Likewise.
14026 * dwarf2expr.h (struct dwarf_expr_context, struct dwarf_expr_piece):
14027 Likewise.
14028 * dwarf2loc.c (dwarf_evaluate_loc_desc::get_base_type)
14029 (dwarf_evaluate_loc_desc::push_dwarf_reg_entry_value)
14030 (show_entry_values_debug, call_site_to_target_addr)
14031 (func_addr_to_tail_call_list, func_verify_no_selftailcall)
14032 (dwarf_expr_reg_to_entry_parameter, dwarf_entry_parameter_to_value)
14033 (entry_data_value_free_closure, value_of_dwarf_reg_entry)
14034 (value_of_dwarf_block_entry, indirect_pieced_value)
14035 (symbol_needs_eval_context::push_dwarf_reg_entry_value):
14036 (disassemble_dwarf_expression): Likewise.
14037 * dwarf2read.c (process_die, inherit_abstract_dies)
14038 (read_call_site_scope): Likewise.
14039 * gdbtypes.h (struct func_type, struct call_site_parameter)
14040 (struct call_site): Likewise.
14041 * stack.c (read_frame_arg): Likewise.
14042 * std-operator.def (OP_VAR_ENTRY_VALUE): Likewise.
14043
14044 2017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
14045
14046 * defs.h (read_unsigned_leb128): New declaration.
14047 * dwarf2loc.c (decode_debug_loclists_addresses): New function.
14048 (decode_debug_loc_dwo_addresses): Update DEBUG_LOC_* to DW_LLE_*.
14049 (dwarf2_find_location_expression): Call also
14050 decode_debug_loclists_addresses. Handle DWARF-5 ULEB128 length.
14051 * dwarf2loc.h (dwarf2_version): New declaration.
14052 * dwarf2read.c (struct dwarf2_per_objfile): Add loclists, line_str,
14053 rnglists.
14054 (dwarf2_elf_names): Add .debug_loclists, .debug_line_str,
14055 .debug_rnglists.
14056 (struct dwop_section_names): Add loclists_dwo.
14057 (dwop_section_names): Add .debug_loclists.dwo.
14058 (struct comp_unit_head): Add unit_type, signature, type_offset_in_tu.
14059 (struct dwarf2_per_cu_data): Add dwarf_version.
14060 (struct dwo_sections): Add loclists.
14061 (struct attr_abbrev): Add implicit_const.
14062 (read_indirect_line_string): New declaration.
14063 (read_unsigned_leb128): Delete declaration.
14064 (rcuh_kind): New definition.
14065 (read_and_check_comp_unit_head): Change parameter
14066 is_debug_types_section to section_kind.
14067 (dwarf2_locate_sections): Handle loclists, line_str and rnglists.
14068 (read_comp_unit_head): Change parameter abfd to section, add parameter
14069 section_kind. Handle DWARF-5.
14070 (error_check_comp_unit_head): Accept also DWARF version 5.
14071 (read_and_check_comp_unit_head): Change parameter
14072 is_debug_types_section to section_kind.
14073 (read_and_check_type_unit_head): Delete function.
14074 (read_abbrev_offset): Handle DWARF-5.
14075 (create_debug_type_hash_table): Add parameter section_kind. Process
14076 only DW_UT_type. Use signature and type_offset_in_tu from struct
14077 comp_unit_head.
14078 (create_debug_types_hash_table): Update create_debug_type_hash_table
14079 caller.
14080 (create_all_type_units): Call create_debug_type_hash_table.
14081 (read_cutu_die_from_dwo, init_cutu_and_read_dies): Change
14082 read_and_check_type_unit_head caller to read_and_check_comp_unit_head
14083 caller.
14084 (skip_one_die): Handle DW_FORM_implicit_const.
14085 (dwarf2_rnglists_process): New function.
14086 (dwarf2_ranges_process): Call dwarf2_rnglists_process for DWARF-5.
14087 (abbrev_table_read_table): Handle DW_FORM_implicit_const.
14088 (read_attribute_value): Handle DW_FORM_implicit_const,
14089 DW_FORM_line_strp.
14090 (read_attribute): Handle DW_FORM_implicit_const.
14091 (read_indirect_string_at_offset_from): New function from
14092 read_indirect_string_at_offset.
14093 (read_indirect_string_at_offset): Call
14094 read_indirect_string_at_offset_from.
14095 (read_indirect_line_string_at_offset): New function.
14096 (read_indirect_string): New function comment.
14097 (read_indirect_line_string): New function.
14098 (read_unsigned_leb128): Make it global.
14099 (dwarf2_string_attr): Handle DWARF-5.
14100 (add_include_dir_stub, read_formatted_entries): New functions.
14101 (dwarf_decode_line_header, dump_die_shallow, cu_debug_loc_section):
14102 Handle DWARF-5.
14103 (per_cu_header_read_in): Update read_comp_unit_head caller.
14104 (dwarf2_version): New function.
14105 * symfile.h (struct dwarf2_debug_sections): Add loclists, line_str and
14106 rnglists.
14107 * xcoffread.c (dwarf2_xcoff_names): Update struct dwarf2_debug_sections
14108 fields.
14109
14110 2017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
14111
14112 * dwarf2read.c (abbrev_table_read_table): Read the data only once.
14113
14114 2017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
14115
14116 * dwarf2read.c (dwarf2_ranges_process): New function from
14117 dwarf2_ranges_read.
14118 (dwarf2_ranges_read, dwarf2_record_block_ranges): Use
14119 dwarf2_ranges_process.
14120
14121 2017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
14122
14123 * dwarf2read.c (create_debug_type_hash_table): New function from
14124 create_debug_types_hash_table.
14125 (create_debug_types_hash_table): Call create_debug_type_hash_table.
14126 (create_all_type_units, open_and_init_dwo_file): Update
14127 create_debug_types_hash_table callers.
14128
14129 2017-02-20 Sergio Durigan Junior <sergiodj@redhat.com>
14130
14131 PR gdb/16188
14132 * fork-child.c (trace_start_error): Fix thinko. va_end should
14133 refer to 'ap', not 'args'.
14134
14135 2017-02-20 Sergio Durigan Junior <sergiodj@redhat.com>
14136 Pedro Alves <palves@redhat.com>
14137
14138 PR gdb/16188
14139 * darwin-nat.c (darwin_ptrace_me): Check if calls to system
14140 calls succeeded.
14141 * fork-child.c (trace_start_error): New function.
14142 (trace_start_error_with_name): Likewise.
14143 * gnu-nat.c (gnu_ptrace_me): Check if call to PTRACE succeeded.
14144 * inf-ptrace.c (inf_ptrace_me): Likewise.
14145 * inferior.h (trace_start_error): New prototype.
14146 (trace_start_error_with_name): Likewise.
14147
14148 2017-02-15 Sergio Durigan Junior <sergiodj@redhat.com>
14149
14150 PR gdb/21164
14151 * psymtab.c (maintenance_print_psymbols): Verify if 'argv' is not
14152 NULL before using it.
14153 * symmisc.c (maintenance_print_symbols): Likewise.
14154 (maintenance_print_msymbols): Likewise.
14155
14156 2017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
14157
14158 * NEWS: Add record Python bindings entry.
14159
14160 2017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
14161
14162 * Makefile.in (SUBDIR_PYTHON_OBS): Add py-record-btrace.o,
14163 py-record-full.o.
14164 (SUBDIR_PYTHON_SRCS): Add py-record-btrace.c, py-record-full.c.
14165 * python/py-record-btrace.c, python/py-record-btrace.h,
14166 python/py-record-full.c, python/py-record-full.h: New file.
14167 * python/py-record.c: Add include for py-record-btrace.h and
14168 py-record-full.h.
14169 (recpy_method, recpy_format, recpy_goto, recpy_replay_position,
14170 recpy_instruction_history, recpy_function_call_history, recpy_begin,
14171 recpy_end): Use functions from py-record-btrace.c and py-record-full.c.
14172 * python/python-internal.h (PyInt_FromSsize_t, PyInt_AsSsize_t):
14173 New definition.
14174 (gdbpy_initialize_btrace): New export.
14175 * python/python.c (_initialize_python): Add gdbpy_initialize_btrace.
14176
14177 2017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
14178
14179 * Makefile.in (SUBDIR_PYTHON_OBS): Add python/py-record.o.
14180 (SUBDIR_PYTHON_SRCS): Add python/py-record.c.
14181 * python/py-record.c: New file.
14182 * python/python-internal.h (gdbpy_start_recording,
14183 gdbpy_current_recording, gdpy_stop_recording,
14184 gdbpy_initialize_record): New export.
14185 * python/python.c (_initialize_python): Add gdbpy_initialize_record.
14186 (python_GdbMethods): Add gdbpy_start_recording,
14187 gdbpy_current_recording and gdbpy_stop_recording.
14188
14189 2017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
14190
14191 * record-btrace.c (record_btrace_record_method): New function.
14192 (init_record_btrace_ops): Initialize to_record_method.
14193 * record-full.c (record_full_record_method): New function.
14194 (init_record_full_ops, init_record_full_core_ops): Add
14195 record_full_record_method.
14196 * record.h (enum record_method): New enum.
14197 * target-debug.h (target_debug_print_enum_record_method: New define.
14198 * target-delegates.c: Regenerate.
14199 * target.c (target_record_method): New function.
14200 * target.h: Include record.h.
14201 (struct target_ops) <to_record_method>: New field.
14202 (target_record_method): New export.
14203
14204 2017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
14205
14206 * record.h (record_start, record_stop): New export.
14207 * record.c (record_start, record_stop): New function.
14208
14209 2017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
14210
14211 * btrace.c (btrace_fetch): Copy function call segments pointer
14212 into a vector.
14213 (btrace_clear): Clear the vector.
14214 (btrace_find_insn_by_number): Use binary search to find the correct
14215 function call segment.
14216 * btrace.h (brace_fun_p): New typedef.
14217 (struct btrace_thread_info) <functions>: New field.
14218
14219 2017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
14220
14221 * record-btrace.c (btrace_ui_out_decode_error): Move most of it ...
14222 * btrace.c (btrace_decode_error): ... here. New function.
14223 * btrace.h (btrace_decode_error): New export.
14224
14225 2017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
14226
14227 * btrace.c (ftrace_call_num_insn, btrace_insn_get_error): New function.
14228 (ftrace_new_function, btrace_insn_number, btrace_insn_cmp,
14229 btrace_find_insn_by_number): Remove special case for gaps.
14230 * btrace.h (btrace_insn_get_error): New export.
14231 (btrace_insn_number, btrace_find_insn_by_number): Adjust comment.
14232 * record-btrace.c (btrace_insn_history): Print number for gaps.
14233 (record_btrace_info, record_btrace_goto): Handle gaps.
14234
14235 2017-02-14 Tom Tromey <tom@tromey.com>
14236
14237 PR python/13598:
14238 * python/python.c (gdbpy_before_prompt_hook): Emit before_prompt
14239 event.
14240 * python/py-evts.c (gdbpy_initialize_py_events): Add
14241 before_prompt registry.
14242 * python/py-events.h (events_object) <before_prompt>: New field.
14243
14244 2017-02-14 Markus Metzger <markus.t.metzger@intel.com>
14245
14246 * btrace.c (ftrace_new_switch): Preserve up link and flags.
14247
14248 2017-02-13 Luis Machado <lgustavo@codesourcery.com>
14249
14250 * symfile (_initialize_symfile): Add usage text to the load command's
14251 help text.
14252
14253 2017-02-10 Simon Marchi <simon.marchi@ericsson.com>
14254
14255 * utils.c (defaulted_query): Don't query on secondary UIs.
14256
14257 2017-02-10 Tom Tromey <tom@tromey.com>
14258
14259 * rust-lang.c (rust_get_disr_info): Remove unused variable.
14260
14261 2017-02-10 Tom Tromey <tom@tromey.com>
14262
14263 * python/py-value.c (valpy_richcompare_throw): Remove unnecessary
14264 "cleanup" local.
14265 * python/py-type.c (typy_legacy_template_argument): Remove
14266 unnecessary "cleanup" local.
14267
14268 2017-02-10 Tom Tromey <tom@tromey.com>
14269
14270 * python/python.c (do_start_initialization): New function, from
14271 _initialize_python.
14272 (_initialize_python): Call do_start_initialization.
14273 * python/py-linetable.c (ltpy_iternext): Use explicit returns, not
14274 goto.
14275
14276 2017-02-10 Tom Tromey <tom@tromey.com>
14277
14278 * python/py-prettyprint.c (pretty_print_one_value): Use
14279 gdbpy_ref.
14280
14281 2017-02-10 Tom Tromey <tom@tromey.com>
14282
14283 * python/py-cmd.c (cmdpy_destroyer): Use gdbpy_ref.
14284 * python/py-breakpoint.c (gdbpy_breakpoint_deleted): Use
14285 gdbpy_ref.
14286 * python/py-type.c (field_new): Use gdbpy_ref.
14287 * python/py-symtab.c (symtab_and_line_to_sal_object): Use
14288 gdbpy_ref.
14289 * python/py-progspace.c (pspy_new): Use gdbpy_ref.
14290 (py_free_pspace): Likewise.
14291 (pspace_to_pspace_object): Likewise.
14292 * python/py-objfile.c (objfpy_new): Use gdbpy_ref.
14293 (py_free_objfile): Likewise.
14294 (objfile_to_objfile_object): Likewise.
14295 * python/py-inferior.c (delete_thread_object): Use
14296 gdbpy_ref.
14297 (infpy_read_memory): Likewise.
14298 (py_free_inferior): Likewise.
14299 * python/py-evtregistry.c (create_eventregistry_object): Use
14300 gdbpy_ref.
14301 * python/py-event.c (create_event_object): Use gdbpy_ref.
14302
14303 2017-02-10 Tom Tromey <tom@tromey.com>
14304
14305 * python/py-ref.h (gdbpy_ref_policy): Now a template.
14306 (gdbpy_ref): Now a template; allow subclasses of PyObject to be
14307 used.
14308 * python/py-arch.c, python/py-bpevent.c, python/py-breakpoint.c,
14309 python/py-cmd.c, python/py-continueevent.c, python/py-event.c,
14310 python/py-exitedevent.c, python/py-finishbreakpoint.c,
14311 python/py-framefilter.c, python/py-function.c,
14312 python/py-inferior.c, python/py-infevents.c,
14313 python/py-linetable.c, python/py-newobjfileevent.c,
14314 python/py-param.c, python/py-prettyprint.c, python/py-ref.h,
14315 python/py-signalevent.c, python/py-stopevent.c,
14316 python/py-symbol.c, python/py-threadevent.c, python/py-type.c,
14317 python/py-unwind.c, python/py-utils.c, python/py-value.c,
14318 python/py-varobj.c, python/py-xmethods.c, python/python.c,
14319 varobj.c: Change gdbpy_ref to gdbpy_ref<>.
14320
14321 2017-02-10 Tom Tromey <tom@tromey.com>
14322
14323 * ui-out.h (ui_out_emit_type): New class.
14324 (ui_out_emit_tuple, ui_out_emit_list): New typedefs.
14325 * python/py-framefilter.c (py_print_single_arg): Use gdb::optional
14326 and ui_out_emit_tuple.
14327 (enumerate_locals): Likewise.
14328 (py_mi_print_variables, py_print_locals, py_print_args): Use
14329 ui_out_emit_list.
14330 (py_print_frame): Use gdb::optional, ui_out_emit_tuple,
14331 ui_out_emit_list.
14332 * common/gdb_optional.h: New file.
14333
14334 2017-02-10 Martin Galvan <martingalvan@sourceware.org>
14335
14336 * MAINTAINERS (Write After Approval): Update my e-mail address.
14337
14338 2017-02-10 Martin Galvan <martingalvan@sourceware.org>
14339
14340 PR gdb/21122
14341 * breakpoint.c (_initialize_breakpoint): Update the help description
14342 of the 'commands' command to indicate that it takes a list argument.
14343
14344 2017-02-09 Simon Marchi <simon.marchi@ericsson.com>
14345
14346 * interps.c (current_interp_set_logging): Remove "return".
14347
14348 2017-02-09 Gary Benson <gbenson@redhat.com>
14349
14350 * symtab.c (add_symtab_completions): Prevent NULL pointer
14351 dereference.
14352
14353 2017-02-08 Pedro Alves <palves@redhat.com>
14354
14355 * interps.c (interp::interp): Remove reference to quiet_p.
14356 (interp_set): Make static. Remove dead "Switching to" output
14357 code.
14358 (interp_quiet_p, interp_set_quiet): Delete.
14359 (interpreter_exec_cmd): Don't set the interpreter quiet.
14360 * interps.h (interp_quiet_p): Make static.
14361 (class interp) <quiet_p>: Remove field
14362
14363 2017-02-08 Jerome Guitton <guitton@adacore.com>
14364
14365 * cli/cli-decode.c (find_command_name_length): Make it extern.
14366 * cli/cli-decode.h (find_command_name_length): Declare.
14367 * cli/cli-script.c (command_name_equals, line_first_arg):
14368 New functions.
14369 (process_next_line): Use cli-decode to parse command names.
14370 (build_command_line): Make args a constant pointer.
14371
14372 2017-02-08 Jerome Guitton <guitton@adacore.com>
14373
14374 * cli-decode.c (lookup_cmd_1, lookup_cmd_composition):
14375 Remove case-insensitive search.
14376
14377 2017-02-07 Jose E. Marchesi <jose.marchesi@oracle.com>
14378
14379 * sparc-tdep.c (sparc32_gdbarch_init): Do not place a + operator
14380 at the end of the line. Avoids an ARI warning.
14381
14382 2017-02-06 Luis Machado <lgustavo@codesourcery.com>
14383
14384 * NEWS: Mention support for record/replay of Intel 64 rdrand and
14385 rdseed instructions.
14386 i386-tdep.c (i386_process_record): Handle Intel 64 rdrand and rseed.
14387
14388 2017-02-06 Ivo Raisr <ivo.raisr@oracle.com>
14389
14390 PR tdep/20936
14391 Provide and use sparc32 and sparc64 target description XML files.
14392 * features/sparc/sparc32-cp0.xml, features/sparc/sparc32-cpu.xml,
14393 features/sparc/sparc32-fpu.xml: New files for sparc 32-bit.
14394 * features/sparc/sparc64-cp0.xml, features/sparc/sparc64-cpu.xml,
14395 features/sparc/sparc64-fpu.xml: New files for sparc 64-bit.
14396 * features/sparc/sparc32-solaris.xml: New file.
14397 * features/sparc/sparc64-solaris.xml: New file.
14398 * features/sparc/sparc32-solaris.c: Generated.
14399 * features/sparc/sparc64-solaris.c: Generated.
14400 * sparc-tdep.h: Account for differences in target descriptions.
14401 * sparc-tdep.c (sparc32_register_name): Use target provided registers.
14402 (sparc32_register_type): Use target provided registers.
14403 (validate_tdesc_registers): New function.
14404 (sparc32_gdbarch_init): Use tdesc_has_registers.
14405 Set pseudoregister functions.
14406 * sparc64-tdep.c (sparc64_register_name): Use target provided registers.
14407 (sparc64_register_type): Use target provided registers.
14408 (sparc64_init_abi): Set pseudoregister functions.
14409
14410 2017-02-03 Tom Tromey <tom@tromey.com>
14411
14412 PR rust/21097:
14413 * rust-lang.c (rust_print_type) <TYPE_CODE_UNION>: Handle enums
14414 with a single member.
14415
14416 2017-02-03 Pedro Alves <palves@redhat.com>
14417
14418 * cli/cli-interp.c (cli_interp_base::cli_interp_base)
14419 (cli_interp_base::~cli_interp_base): New.
14420 (cli_interp): New struct.
14421 (as_cli_interp): Cast the interp itself to cli_interp.
14422 (cli_interpreter_pre_command_loop): Rename to ...
14423 (cli_interp_base::pre_command_loop): ... this. Remove 'self'
14424 parameter.
14425 (cli_interpreter_init): Rename to ...
14426 (cli_interp::init): ... this. Remove 'self' parameter. Use
14427 boolean. Make extern.
14428 (cli_interpreter_resume): Rename to ...
14429 (cli_interp::resume): ... this. Remove 'data' parameter. Make
14430 extern.
14431 (cli_interpreter_suspend): Rename to ...
14432 (cli_interp::suspend): ... this. Remove 'data' parameter. Make
14433 extern.
14434 (cli_interpreter_exec): Rename to ...
14435 (cli_interp::exec): ... this. Remove 'data' parameter. Make
14436 extern.
14437 (cli_interpreter_supports_command_editing): Rename to ...
14438 (cli_interp_base::supports_command_editing): ... this. Remove
14439 'interp' parameter. Make extern.
14440 (cli_ui_out): Rename to ...
14441 (cli_interp::interp_ui_out): ... this. Remove 'interp' parameter.
14442 Make extern.
14443 (cli_set_logging): Rename to ...
14444 (cli_interp_base::set_logging): ... this. Remove 'interp'
14445 parameter. Make extern.
14446 (cli_interp_procs): Delete.
14447 (cli_interp_factory): Adjust to use "new".
14448 * cli/cli-interp.h: Include "interps.h".
14449 (struct cli_interp_base): New struct.
14450 * interps.c (struct interp): Delete. Fields moved to interps.h.
14451 (interp_new): Delete.
14452 (interp::interp, interp::~interp): New.
14453 (interp_set): Use bool, and return void. Assume the interpreter
14454 has suspend, init and resume methods, and that the all return
14455 void.
14456 (set_top_level_interpreter): interp_set returns void.
14457 (interp_ui_out): Adapt.
14458 (current_interp_set_logging): Adapt.
14459 (interp_data): Delete.
14460 (interp_pre_command_loop, interp_supports_command_editing): Adapt.
14461 (interp_exec): Adapt.
14462 (top_level_interpreter_data): Delete.
14463 * interps.h (interp_init_ftype, interp_resume_ftype)
14464 (interp_suspend_ftype, interp_exec_ftype)
14465 (interp_pre_command_loop_ftype, interp_ui_out_ftype): Delete.
14466 (class interp): New.
14467 (interp_new): Delete.
14468 (interp_set): Now returns void. Use bool.
14469 (interp_data, top_level_interpreter_data): Delete.
14470 * mi/mi-common.h: Include interps.h.
14471 (class mi_interp): Inherit from interp. Define a ctor. Declare
14472 init, resume, suspect, exec, interp_ui_out, set_logging and
14473 pre_command_loop methods.
14474 * mi/mi-interp.c (as_mi_interp): Cast the interp itself.
14475 (mi_interpreter_init): Rename to ...
14476 (mi_interp::init): ... this. Remove the 'interp' parameter, use
14477 bool, return void and make extern. Adjust.
14478 (mi_interpreter_resume): ... Rename to ...
14479 (mi_interp::resume): ... this. Remove the 'data' parameter,
14480 return void and make extern. Adjust.
14481 (mi_interpreter_suspend): ... Rename to ...
14482 (mi_interp::suspend): ... this. Remove the 'data' parameter,
14483 return void and make extern. Adjust.
14484 (mi_interpreter_exec): ... Rename to ...
14485 (mi_interp::exec): ... this. Remove the 'data' parameter and make
14486 extern. Adjust.
14487 (mi_interpreter_pre_command_loop): ... Rename to ...
14488 (mi_interp::pre_command_loop): ... this. Remove the 'self'
14489 parameter and make extern.
14490 (mi_on_normal_stop_1): Adjust.
14491 (mi_ui_out): Rename to ...
14492 (mi_interp::interp_ui_out): ... this. Remove the 'interp'
14493 parameter and make extern. Adjust.
14494 (mi_set_logging): Rename to ...
14495 (mi_interp::set_logging): ... this. Remove the 'interp'
14496 parameter and make extern. Adjust.
14497 (mi_interp_procs): Delete.
14498 (mi_interp_factory): Adjust to use 'new'.
14499 * mi/mi-main.c (mi_cmd_gdb_exit, captured_mi_execute_command)
14500 (mi_print_exception, mi_execute_command, mi_load_progress):
14501 Adjust.
14502 * tui/tui-interp.c (tui_interp): New class.
14503 (as_tui_interp): Return a tui_interp pointer.
14504 (tui_on_normal_stop, tui_on_signal_received)
14505 (tui_on_end_stepping_range, tui_on_signal_exited, tui_on_exited)
14506 (tui_on_no_history, tui_on_user_selected_context_changed): Adjust
14507 to use interp::interp_ui_out.
14508 (tui_init): Rename to ...
14509 (tui_interp::init): ... this. Remove the 'self' parameter, use
14510 bool, return void and make extern. Adjust.
14511 (tui_resume): Rename to ...
14512 (tui_interp::resume): ... this. Remove the 'data' parameter,
14513 return void and make extern. Adjust.
14514 (tui_suspend): Rename to ...
14515 (tui_interp::suspend): ... this. Remove the 'data' parameter,
14516 return void and make extern. Adjust.
14517 (tui_ui_out): Rename to ...
14518 (tui_interp::interp_ui_out): ... this. Remove the 'self'
14519 parameter, and make extern. Adjust.
14520 (tui_exec): Rename to ...
14521 (tui_interp::exec): ... this. Remove the 'data' parameter and
14522 make extern.
14523 (tui_interp_procs): Delete.
14524 (tui_interp_factory): Use "new".
14525
14526 2017-02-02 Tom Tromey <tom@tromey.com>
14527
14528 * rust-exp.y (ends_raw_string, space_then_number)
14529 (rust_identifier_start_p): Return bool.
14530 * rust-lang.c (rust_tuple_type_p, rust_underscore_fields)
14531 (rust_tuple_struct_type_p, rust_tuple_variant_type_p)
14532 (rust_slice_type_p, rust_range_type_p, rust_u8_type_p)
14533 (rust_chartype_p): Return bool.
14534 (val_print_struct, rust_print_struct_def, rust_print_type):
14535 Update.
14536 * rust-lang.h (rust_tuple_type_p, rust_tuple_struct_type_p):
14537 Return bool.
14538
14539 2017-02-02 Tom Tromey <tom@tromey.com>
14540
14541 * rust-lang.c: Reindent.
14542
14543 2017-02-02 Tom Tromey <tom@tromey.com>
14544
14545 * rust-lang.h (rust_crate_for_block): Update.
14546 * rust-lang.c (rust_crate_for_block): Return std::string.
14547 (rust_get_disr_info): Use std:;string, not
14548 gdb::unique_xmalloc_ptr.
14549 * rust-exp.y (crate_name): Update.
14550
14551 2017-02-02 Pedro Alves <palves@redhat.com>
14552
14553 * disasm-selftests.c (print_one_insn_test): Move the "verbose"
14554 field out of gdb_disassembler_test and make it static.
14555
14556 2017-02-02 Pedro Alves <palves@redhat.com>
14557
14558 * mi/mi-common.h (struct mi_interp): Delete the mi2_interp,
14559 mi1_interp and mi_interp fields.
14560
14561 2017-02-02 Pedro Alves <palves@redhat.com>
14562
14563 * cli/cli-interp.c (struct saved_output_files, saved_output):
14564 Moved from cli/cli-logging.c.
14565 (cli_set_logging): New function.
14566 (cli_interp_procs): Install cli_set_logging.
14567 * cli/cli-interp.h (make_logging_output, cli_set_logging):
14568 Declare.
14569 * cli/cli-logging.c (struct saved_output_files, saved_output):
14570 Moved to cli/cli-interp.c.
14571 (pop_output_files): Don't save outputs here.
14572 (make_logging_output): New function.
14573 (handle_redirections): Don't build tee nor save previous outputs
14574 here.
14575 * interps.c (current_interp_set_logging): Change prototype.
14576 Assume there's always a set_logging_proc method installed.
14577 * interps.h (interp_set_logging_ftype): Change prototype.
14578 (current_interp_set_logging): Change prototype and adjust comment.
14579 * mi/mi-interp.c (mi_set_logging): Change protototype. Adjust to
14580 use make_logging_output.
14581 * tui/tui-interp.c (tui_interp_procs): Install cli_set_logging.
14582 2017-02-02 Pedro Alves <palves@redhat.com>
14583
14584 * cli/cli-logging.c (maybe_warn_already_logging): New factored out
14585 from ...
14586 (set_logging_overwrite): ... here.
14587 (logging_no_redirect_file): Delete.
14588 (set_logging_redirect): Don't handle redirection on the fly.
14589 Instead warn that "logging off" / "logging on" is necessary.
14590 (pop_output_files): Delete references to logging_no_redirect_file.
14591 (show_logging_command): Always speak in terms of what will happen
14592 once logging is reenabled.
14593
14594 2017-02-02 Pedro Alves <palves@redhat.com>
14595
14596 * disasm.h (gdb_pretty_print_disassembler): Tweak intro comment.
14597
14598 2017-02-02 Pedro Alves <palves@redhat.com>
14599
14600 * disasm.c (gdb_pretty_print_insn): Rename to ...
14601 (gdb_pretty_print_disassembler::pretty_print_insn): ... this.
14602 Remove gdbarch parameter. Adapt to clear the object's buffers
14603 instead of allocating new buffers, and to print using the object's
14604 gdb_disassembler instead of calling gdb_print_insn.
14605 (dump_insns): Use gdb_pretty_print_disassembler.
14606 * disasm.h (gdb_pretty_print_insn): Delete declaration.
14607 (gdb_pretty_print_disassembler): New class.
14608 * record-btrace.c (btrace_insn_history): Use
14609 gdb_pretty_print_disassembler.
14610
14611 2017-02-02 Pedro Alves <palves@redhat.com>
14612
14613 * ada-lang.c (type_as_string): Use string_file.
14614 * ada-valprint.c (ada_print_floating): Use string_file.
14615 * ada-varobj.c (ada_varobj_scalar_image)
14616 (ada_varobj_get_value_image): Use string_file.
14617 * aix-thread.c (aix_thread_extra_thread_info): Use string_file.
14618 * arm-tdep.c (_initialize_arm_tdep): Use string_printf.
14619 * breakpoint.c (update_inserted_breakpoint_locations)
14620 (insert_breakpoint_locations, reattach_breakpoints)
14621 (print_breakpoint_location, print_one_detail_ranged_breakpoint)
14622 (print_it_watchpoint): Use string_file.
14623 (save_breakpoints): Use stdio_file.
14624 * c-exp.y (oper): Use string_file.
14625 * cli/cli-logging.c (set_logging_redirect): Use ui_file_up and
14626 tee_file.
14627 (pop_output_files): Use delete.
14628 (handle_redirections): Use stdio_file and tee_file.
14629 * cli/cli-setshow.c (do_show_command): Use string_file.
14630 * compile/compile-c-support.c (c_compute_program): Use
14631 string_file.
14632 * compile/compile-c-symbols.c (generate_vla_size): Take a
14633 'string_file &' instead of a 'ui_file *'.
14634 (generate_c_for_for_one_variable): Take a 'string_file &' instead
14635 of a 'ui_file *'. Use string_file.
14636 (generate_c_for_variable_locations): Take a 'string_file &'
14637 instead of a 'ui_file *'.
14638 * compile/compile-internal.h (generate_c_for_for_one_variable):
14639 Take a 'string_file &' instead of a 'ui_file *'.
14640 * compile/compile-loc2c.c (push, pushf, unary, binary)
14641 (print_label, pushf_register_address, pushf_register)
14642 (do_compile_dwarf_expr_to_c): Take a 'string_file &' instead of a
14643 'ui_file *'. Adjust.
14644 * compile/compile.c (compile_to_object): Use string_file.
14645 * compile/compile.h (compile_dwarf_expr_to_c)
14646 (compile_dwarf_bounds_to_c): Take a 'string_file &' instead of a
14647 'ui_file *'.
14648 * cp-support.c (inspect_type): Use string_file and obstack_copy0.
14649 (replace_typedefs_qualified_name): Use string_file and
14650 obstack_copy0.
14651 * disasm.c (gdb_pretty_print_insn): Use string_file.
14652 (gdb_disassembly): Adjust reference the null_stream global.
14653 (do_ui_file_delete): Delete.
14654 (gdb_insn_length): Use null_stream.
14655 * dummy-frame.c (maintenance_print_dummy_frames): Use stdio_file.
14656 * dwarf2loc.c (dwarf2_compile_property_to_c)
14657 (locexpr_generate_c_location, loclist_generate_c_location): Take a
14658 'string_file &' instead of a 'ui_file *'.
14659 * dwarf2loc.h (dwarf2_compile_property_to_c): Likewise.
14660 * dwarf2read.c (do_ui_file_peek_last): Delete.
14661 (dwarf2_compute_name): Use string_file.
14662 * event-top.c (gdb_setup_readline): Use stdio_file.
14663 * gdbarch.sh (verify_gdbarch): Use string_file.
14664 * gdbtypes.c (safe_parse_type): Use null_stream.
14665 * guile/scm-breakpoint.c (gdbscm_breakpoint_commands): Use
14666 string_file.
14667 * guile/scm-disasm.c (gdbscm_print_insn_from_port): Take a
14668 'string_file *' instead of a 'ui_file *'.
14669 (gdbscm_arch_disassemble): Use string_file.
14670 * guile/scm-frame.c (frscm_print_frame_smob): Use string_file.
14671 * guile/scm-ports.c (class ioscm_file_port): Now a class that
14672 inherits from ui_file.
14673 (ioscm_file_port_delete, ioscm_file_port_rewind)
14674 (ioscm_file_port_put): Delete.
14675 (ioscm_file_port_write): Rename to ...
14676 (ioscm_file_port::write): ... this. Remove file_port_magic
14677 checks.
14678 (ioscm_file_port_new): Delete.
14679 (ioscm_with_output_to_port_worker): Use ioscm_file_port and
14680 ui_file_up.
14681 * guile/scm-type.c (tyscm_type_name): Use string_file.
14682 * guile/scm-value.c (vlscm_print_value_smob, gdbscm_value_print):
14683 Use string_file.
14684 * infcmd.c (print_return_value_1): Use string_file.
14685 * infrun.c (print_target_wait_results): Use string_file.
14686 * language.c (add_language): Use string_file.
14687 * location.c (explicit_to_string_internal): Use string_file.
14688 * main.c (captured_main_1): Use null_file.
14689 * maint.c (maintenance_print_architecture): Use stdio_file.
14690 * mi/mi-cmd-stack.c (list_arg_or_local): Use string_file.
14691 * mi/mi-common.h (struct mi_interp) <out, err, log, targ,
14692 event_channel>: Change type to mi_console_file pointer.
14693 * mi/mi-console.c (mi_console_file_fputs, mi_console_file_flush)
14694 (mi_console_file_delete): Delete.
14695 (struct mi_console_file): Delete.
14696 (mi_console_file_magic): Delete.
14697 (mi_console_file_new): Delete.
14698 (mi_console_file::mi_console_file): New.
14699 (mi_console_file_delete): Delete.
14700 (mi_console_file_fputs): Delete.
14701 (mi_console_file::write): New.
14702 (mi_console_raw_packet): Delete.
14703 (mi_console_file::flush): New.
14704 (mi_console_file_flush): Delete.
14705 (mi_console_set_raw): Rename to ...
14706 (mi_console_file::set_raw): ... this.
14707 * mi/mi-console.h (class mi_console_file): New class.
14708 (mi_console_file_new, mi_console_set_raw): Delete.
14709 * mi/mi-interp.c (mi_interpreter_init): Use mi_console_file.
14710 (mi_set_logging): Use delete and tee_file. Adjust.
14711 * mi/mi-main.c (output_register): Use string_file.
14712 (mi_cmd_data_evaluate_expression): Use string_file.
14713 (mi_cmd_data_read_memory): Use string_file.
14714 (mi_cmd_execute, print_variable_or_computed): Use string_file.
14715 * mi/mi-out.c (mi_ui_out::main_stream): New.
14716 (mi_ui_out::rewind): Use main_stream and
14717 string_file.
14718 (mi_ui_out::put): Use main_stream and string_file.
14719 (mi_ui_out::mi_ui_out): Remove 'stream' parameter.
14720 Allocate a 'string_file' instead.
14721 (mi_out_new): Don't allocate a mem_fileopen stream here.
14722 * mi/mi-out.h (mi_ui_out::mi_ui_out): Remove 'stream' parameter.
14723 (mi_ui_out::main_stream): Declare method.
14724 * printcmd.c (eval_command): Use string_file.
14725 * psymtab.c (maintenance_print_psymbols): Use stdio_file.
14726 * python/py-arch.c (archpy_disassemble): Use string_file.
14727 * python/py-breakpoint.c (bppy_get_commands): Use string_file.
14728 * python/py-frame.c (frapy_str): Use string_file.
14729 * python/py-framefilter.c (py_print_type, py_print_single_arg):
14730 Use string_file.
14731 * python/py-type.c (typy_str): Use string_file.
14732 * python/py-unwind.c (unwind_infopy_str): Use string_file.
14733 * python/py-value.c (valpy_str): Use string_file.
14734 * record-btrace.c (btrace_insn_history): Use string_file.
14735 * regcache.c (regcache_print): Use stdio_file.
14736 * reggroups.c (maintenance_print_reggroups): Use stdio_file.
14737 * remote.c (escape_buffer): Use string_file.
14738 * rust-lang.c (rust_get_disr_info): Use string_file.
14739 * serial.c (serial_open_ops_1): Use stdio_file.
14740 (do_serial_close): Use delete.
14741 * stack.c (print_frame_arg): Use string_file.
14742 (print_frame_args): Remove local mem_fileopen stream, not used.
14743 (print_frame): Use string_file.
14744 * symmisc.c (maintenance_print_symbols): Use stdio_file.
14745 * symtab.h (struct symbol_computed_ops) <generate_c_location>:
14746 Take a 'string_file *' instead of a 'ui_file *'.
14747 * top.c (new_ui): Use stdio_file and stderr_file.
14748 (free_ui): Use delete.
14749 (execute_command_to_string): Use string_file.
14750 (quit_confirm): Use string_file.
14751 * tracepoint.c (collection_list::append_exp): Use string_file.
14752 * tui/tui-disasm.c (tui_disassemble): Use string_file.
14753 * tui/tui-file.c: Don't include "ui-file.h".
14754 (enum streamtype, struct tui_stream): Delete.
14755 (tui_file_new, tui_file_delete, tui_fileopen, tui_sfileopen)
14756 (tui_file_isatty, tui_file_rewind, tui_file_put): Delete.
14757 (tui_file::tui_file): New method.
14758 (tui_file_fputs): Delete.
14759 (tui_file_get_strbuf): Delete.
14760 (tui_file::puts): New method.
14761 (tui_file_adjust_strbuf): Delete.
14762 (tui_file_flush): Delete.
14763 (tui_file::flush): New method.
14764 * tui/tui-file.h: Tweak intro comment.
14765 Include ui-file.h.
14766 (tui_fileopen, tui_sfileopen, tui_file_get_strbuf)
14767 (tui_file_adjust_strbuf): Delete declarations.
14768 (class tui_file): New class.
14769 * tui/tui-io.c (tui_initialize_io): Use tui_file.
14770 * tui/tui-regs.c (tui_restore_gdbout): Use delete.
14771 (tui_register_format): Use string_stream.
14772 * tui/tui-stack.c (tui_make_status_line): Use string_file.
14773 (tui_get_function_from_frame): Use string_file.
14774 * typeprint.c (type_to_string): Use string_file.
14775 * ui-file.c (struct ui_file, ui_file_magic, ui_file_new): Delete.
14776 (null_stream): New global.
14777 (ui_file_delete): Delete.
14778 (ui_file::ui_file): New.
14779 (null_file_isatty): Delete.
14780 (ui_file::~ui_file): New.
14781 (null_file_rewind): Delete.
14782 (ui_file::printf): New.
14783 (null_file_put): Delete.
14784 (null_file_flush): Delete.
14785 (ui_file::putstr): New.
14786 (null_file_write): Delete.
14787 (ui_file::putstrn): New.
14788 (null_file_read): Delete.
14789 (ui_file::putc): New.
14790 (null_file_fputs): Delete.
14791 (null_file_write_async_safe): Delete.
14792 (ui_file::vprintf): New.
14793 (null_file_delete): Delete.
14794 (null_file::write): New.
14795 (null_file_fseek): Delete.
14796 (null_file::puts): New.
14797 (ui_file_data): Delete.
14798 (null_file::write_async_safe): New.
14799 (gdb_flush, ui_file_isatty): Adjust.
14800 (ui_file_put, ui_file_rewind): Delete.
14801 (ui_file_write): Adjust.
14802 (ui_file_write_for_put): Delete.
14803 (ui_file_write_async_safe, ui_file_read): Adjust.
14804 (ui_file_fseek): Delete.
14805 (fputs_unfiltered): Adjust.
14806 (set_ui_file_flush, set_ui_file_isatty, set_ui_file_rewind)
14807 (set_ui_file_put, set_ui_file_write, set_ui_file_write_async_safe)
14808 (set_ui_file_read, set_ui_file_fputs, set_ui_file_fseek)
14809 (set_ui_file_data): Delete.
14810 (string_file::~string_file, string_file::write)
14811 (struct accumulated_ui_file, do_ui_file_xstrdup, ui_file_xstrdup)
14812 (do_ui_file_as_string, ui_file_as_string): Delete.
14813 (do_ui_file_obsavestring, ui_file_obsavestring): Delete.
14814 (struct mem_file): Delete.
14815 (mem_file_new): Delete.
14816 (stdio_file::stdio_file): New.
14817 (mem_file_delete): Delete.
14818 (stdio_file::stdio_file): New.
14819 (mem_fileopen): Delete.
14820 (stdio_file::~stdio_file): New.
14821 (mem_file_rewind): Delete.
14822 (stdio_file::set_stream): New.
14823 (mem_file_put): Delete.
14824 (stdio_file::open): New.
14825 (mem_file_write): Delete.
14826 (stdio_file_magic, struct stdio_file): Delete.
14827 (stdio_file_new, stdio_file_delete, stdio_file_flush): Delete.
14828 (stdio_file::flush): New.
14829 (stdio_file_read): Rename to ...
14830 (stdio_file::read): ... this. Adjust.
14831 (stdio_file_write): Rename to ...
14832 (stdio_file::write): ... this. Adjust.
14833 (stdio_file_write_async_safe): Rename to ...
14834 (stdio_file::write_async_safe) ... this. Adjust.
14835 (stdio_file_fputs): Rename to ...
14836 (stdio_file::puts) ... this. Adjust.
14837 (stdio_file_isatty): Delete.
14838 (stdio_file_fseek): Delete.
14839 (stdio_file::isatty): New.
14840 (stderr_file_write): Rename to ...
14841 (stderr_file::write) ... this. Adjust.
14842 (stderr_file_fputs): Rename to ...
14843 (stderr_file::puts) ... this. Adjust.
14844 (stderr_fileopen, stdio_fileopen, gdb_fopen): Delete.
14845 (stderr_file::stderr_file): New.
14846 (tee_file_magic): Delete.
14847 (struct tee_file): Delete.
14848 (tee_file::tee_file): New.
14849 (tee_file_new): Delete.
14850 (tee_file::~tee_file): New.
14851 (tee_file_delete): Delete.
14852 (tee_file_flush): Rename to ...
14853 (tee_file::flush): ... this. Adjust.
14854 (tee_file_write): Rename to ...
14855 (tee_file::write): ... this. Adjust.
14856 (tee_file::write_async_safe): New.
14857 (tee_file_fputs): Rename to ...
14858 (tee_file::puts): ... this. Adjust.
14859 (tee_file_isatty): Rename to ...
14860 (tee_file::isatty): ... this. Adjust.
14861 * ui-file.h (struct obstack, struct ui_file): Don't
14862 forward-declare.
14863 (ui_file_new, ui_file_flush_ftype, set_ui_file_flush)
14864 (ui_file_write_ftype)
14865 (set_ui_file_write, ui_file_fputs_ftype, set_ui_file_fputs)
14866 (ui_file_write_async_safe_ftype, set_ui_file_write_async_safe)
14867 (ui_file_read_ftype, set_ui_file_read, ui_file_isatty_ftype)
14868 (set_ui_file_isatty, ui_file_rewind_ftype, set_ui_file_rewind)
14869 (ui_file_put_method_ftype, ui_file_put_ftype, set_ui_file_put)
14870 (ui_file_delete_ftype, set_ui_file_data, ui_file_fseek_ftype)
14871 (set_ui_file_fseek): Delete.
14872 (ui_file_data, ui_file_delete, ui_file_rewind)
14873 (struct ui_file): New.
14874 (ui_file_up): New.
14875 (class null_file): New.
14876 (null_stream): Declare.
14877 (ui_file_write_for_put, ui_file_put): Delete.
14878 (ui_file_xstrdup, ui_file_as_string, ui_file_obsavestring):
14879 Delete.
14880 (ui_file_fseek, mem_fileopen, stdio_fileopen, stderr_fileopen)
14881 (gdb_fopen, tee_file_new): Delete.
14882 (struct string_file): New.
14883 (struct stdio_file): New.
14884 (stdio_file_up): New.
14885 (struct stderr_file): New.
14886 (class tee_file): New.
14887 * ui-out.c (ui_out::field_stream): Take a 'string_file &' instead
14888 of a 'ui_file *'. Adjust.
14889 * ui-out.h (class ui_out) <field_stream>: Likewise.
14890 * utils.c (do_ui_file_delete, make_cleanup_ui_file_delete)
14891 (null_stream): Delete.
14892 (error_stream): Take a 'string_file &' instead of a 'ui_file *'.
14893 Adjust.
14894 * utils.h (struct ui_file): Delete forward declaration..
14895 (make_cleanup_ui_file_delete, null_stream): Delete declarations.
14896 (error_stream): Take a 'string_file &' instead of a
14897 'ui_file *'.
14898 * varobj.c (varobj_value_get_print_value): Use string_file.
14899 * xtensa-tdep.c (xtensa_verify_config): Use string_file.
14900 * gdbarch.c: Regenerate.
14901
14902 2017-02-02 Pedro Alves <palves@redhat.com>
14903
14904 * disasm.c (gdb_disassembler::pretty_print_insn): Rename to...
14905 (gdb_pretty_print_insn): ... this. Now a free function. Add back
14906 a 'gdbarch' parameter. Allocate a mem_fileopen stream here.
14907 Adjust to call gdb_print_insn instead of
14908 gdb_disassembler::print_insn.
14909 (dump_insns, do_mixed_source_and_assembly_deprecated)
14910 (do_mixed_source_and_assembly, do_assembly_only): Add back a
14911 'gdbarch' parameter. Remove gdb_disassembler parameter.
14912 (gdb_disassembly): Don't allocate a gdb_disassembler here.
14913 * disasm.h (gdb_disassembler::pretty_print_insn): Delete
14914 declaration.
14915 (gdb_pretty_print_insn): Re-add declaration.
14916 * record-btrace.c (btrace_insn_history): Don't allocate a
14917 gdb_disassembler here. Adjust to call gdb_pretty_print_insn.
14918
14919 2017-02-01 Simon Marchi <simon.marchi@polymtl.ca>
14920
14921 * disasm.h (gdb_disassembly): Remove file_string parameter.
14922 * disasm.c (gdb_disassembly): Likewise.
14923 * cli/cli-cmds.c (print_disassembly): Adapt.
14924 * mi/mi-cmd-disas.c (mi_cmd_disassemble): Likewise.
14925 * stack.c (do_gdb_disassembly): Likewise.
14926
14927 2017-02-01 Andreas Arnez <arnez@linux.vnet.ibm.com>
14928
14929 * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): For
14930 DWARF_VALUE_LITERAL, no longer ignore the offset on big-endian
14931 targets. And if the implicit value is longer than needed, extract
14932 the first bytes instead of the "least significant" ones.
14933
14934 2017-02-01 Markus Metzger <markus.t.metzger@intel.com>
14935
14936 * btrace.c (btrace_enable): Do not call btrace_add_pc for
14937 BTRACE_FORMAT_PT or if can_access_registers_ptid returns false.
14938 (btrace_fetch): Assert can_access_registers_ptid.
14939 * record-btrace.c (require_btrace_thread, record_btrace_info): Call
14940 validate_registers_access.
14941
14942 2017-02-01 Markus Metzger <markus.t.metzger@intel.com>
14943
14944 * gdbthread.h (can_access_registers_ptid): New.
14945 * thread.c (can_access_registers_ptid): New.
14946
14947 2017-02-01 Pedro Alves <palves@redhat.com>
14948
14949 * i386-tdep.c (i386_fast_tracepoint_valid_at): Use gdb_insn_length.
14950
14951 2017-01-31 Pedro Alves <palves@redhat.com>
14952
14953 * mi/mi-interp.c (mi_breakpoint_created, mi_breakpoint_modified):
14954 Fix typos.
14955
14956 2017-01-31 Pedro Alves <palves@redhat.com>
14957
14958 * stack.c (print_frame_args): Remove local mem_fileopen stream,
14959 not used.
14960
14961 2017-01-31 Pedro Alves <palves@redhat.com>
14962
14963 * varobj.c (varobj_value_get_print_value): Remove xstrdup call.
14964
14965 2017-01-31 Pedro Alves <palves@redhat.com>
14966
14967 * common/scoped_restore.h
14968 (scoped_restore_tmpl::scoped_restore_tmpl): Template on T2, and
14969 change the value's parameter type to T2.
14970 (make_scoped_restore): Likewise.
14971
14972 2017-01-27 Walfred Tedeschi <walfred.tedeschi@intel.com>
14973 Richard Henderson <rth@redhat.com>
14974
14975 * amd64-linux-nat.c (PTRACE_ARCH_PRCTL): New define.
14976 (amd64_linux_fetch_inferior_registers): Add case to fetch FS_BASE
14977 GS_BASE for older kernels.
14978 (amd64_linux_store_inferior_registers): Add case to store FS_BASE
14979 GS_BASE for older kernels.
14980 * amd64-linux-tdep.c (amd64_linux_gregset_reg_offset): Add FS_BASE
14981 and GS_BASE to the offset table.
14982 (amd64_linux_register_reggroup_p): Add FS_BASE and GS_BASE to the
14983 system register group.
14984 * amd64-nat.c (amd64_native_gregset_reg_offset): Implements case
14985 for older kernels.
14986 * amd64-tdep.c (amd64_init_abi): Add segment registers for the
14987 amd64 ABI.
14988 * amd64-tdep.h (amd64_regnum): Add AMD64_FSBASE_REGNUM and
14989 AMD64_GSBASE_REGNUM.
14990 (AMD64_NUM_REGS): Set to AMD64_GSBASE_REGNUM + 1.
14991 * features/Makefile (amd64-linux.dat, amd64-avx-linux.dat)
14992 (amd64-mpx-linux.dat, amd64-avx512-linux.dat, x32-linux.dat)
14993 (x32-avx-linux.dat, x32-avx512-linux.dat): Add
14994 i386/64bit-segments.xml in those rules.
14995 * features/i386/64bit-segments.xml: New file.
14996 * features/i386/amd64-avx-mpx-linux.xml: Add 64bit-segments.xml.
14997 * features/i386/amd64-avx-linux.xml: Add 64bit-segments.xml.
14998 * features/i386/amd64-avx512-linux.xml: Add 64bit-segments.xml.
14999 * features/i386/amd64-mpx-linux.xml: Add 64bit-segments.xml.
15000 * features/i386/x32-avx512-linux.xml: Add 64bit-segments.xml.
15001 * features/i386/x32-avx-linux.xml: Add 64bit-segments.xml.
15002 * features/i386/amd64-linux.xml: Add 64bit-segments.xml.
15003 * features/i386/amd64-avx-linux.c: Regenerated.
15004 * features/i386/amd64-avx-mpx-linux.c: Regenerated.
15005 * features/i386/amd64-avx-mpx.c: Regenerated.
15006 * features/i386/amd64-avx512-linux.c: Regenerated.
15007 * features/i386/amd64-linux.c: Regenerated.
15008 * features/i386/amd64-mpx-linux.c: Regenerated.
15009 * features/i386/i386-avx-mpx-linux.c: Regenerated.
15010 * features/i386/i386-avx-mpx.c: Regenerated.
15011 * features/i386/x32-avx-linux.c: Regenerated.
15012 * features/i386/x32-avx512-linux.c: Regenerated.
15013 * regformats/i386/amd64-avx-linux.dat: Regenerated.
15014 * regformats/i386/amd64-avx-mpx-linux.dat: Regenerated.
15015 * regformats/i386/amd64-avx512-linux.dat: Regenerated.
15016 * regformats/i386/amd64-linux.dat: Regenerated.
15017 * regformats/i386/amd64-mpx-linux.dat: Regenerated.
15018 * regformats/i386/x32-avx-linux.dat: Regenerated.
15019 * regformats/i386/x32-avx512-linux.dat: Regenerated.
15020 * regformats/i386/x32-linux.dat: Regenerated.
15021
15022 2017-01-27 Walfred Tedeschi <walfred.tedeschi@intel.com>
15023
15024 * amd64-linux-tdep.h (AMD64_LINUX_ORIG_RAX_REGNUM):
15025 Set to AMD64_NUM_REGS.
15026
15027 2017-01-27 Walfred Tedeschi <walfred.tedeschi@intel.com>
15028
15029 * amd64-nat.c (amd64_native_gregset_reg_offset): Simplify logic
15030 that checks validity of a register number.
15031
15032 2017-01-27 Kees Cook <keescook@google.com>
15033
15034 * gdb/arm-linux-nat.c (arm_linux_fetch_inferior_registers): Call
15035 fetch_fpregs if target has fpa registers.
15036 (arm_linux_store_inferior_registers): Call store_fpregs if target
15037 has fpa registers.
15038
15039 2017-01-26 Andreas Arnez <arnez@linux.vnet.ibm.com>
15040
15041 * cris-tdep.c (cris_gdbarch_init): Remove check for
15042 info.byte_order and force it to BFD_ENDIAN_LITTLE.
15043
15044 2017-01-26 Antoine Tremblay <antoine.tremblay@ericsson.com>
15045
15046 * corelow.c (get_core_register_section): Check for regset
15047 existence before checking for REGSET_VARIABLE_SIZE.
15048
15049 2017-01-26 Yao Qi <yao.qi@linaro.org>
15050 Pedro Alves <palves@redhat.com>
15051
15052 PR gdb/20939
15053 * disasm.c (gdb_disassembler::dis_asm_memory_error): Don't
15054 call memory_error, save memaddr instead.
15055 (gdb_disassembler::print_insn): If gdbarch_print_insn returns
15056 negative, cal memory_error.
15057 * disasm.h (gdb_disassembler) <m_err_memaddr>: New field.
15058
15059 2017-01-26 Yao Qi <yao.qi@linaro.org>
15060
15061 * disasm-selftests.c (memory_error_test): New function.
15062 (_initialize_disasm_selftests): Register memory_error_test.
15063
15064 2017-01-26 Yao Qi <yao.qi@linaro.org>
15065
15066 * Makefile.in (SFILES): Add disasm-selftests.c and
15067 selftest-arch.c.
15068 (COMMON_OBS): Add disasm-selftests.o and selftest-arch.o.
15069 * disasm-selftests.c: New file.
15070 * selftest-arch.c: New file.
15071 * selftest-arch.h: New file.
15072
15073 2017-01-26 Yao Qi <yao.qi@linaro.org>
15074
15075 * mep-tdep.c (mep_gdb_print_insn): Set info->arch
15076 to bfd_arch_mep. Don't return 0 if section is not
15077 found. Call print_insn_mep.
15078
15079 2017-01-26 Pedro Alves <palves@redhat.com>
15080 Yao Qi <yao.qi@linaro.org>
15081
15082 * arm-tdep.c: Include "disasm.h".
15083 (gdb_print_insn_arm): Update code to get gdbarch.
15084 * disasm.c (dis_asm_read_memory): Change it to
15085 gdb_disassembler::dis_asm_read_memory.
15086 (dis_asm_memory_error): Likewise.
15087 (dis_asm_print_address): Likewise.
15088 (gdb_pretty_print_insn): Change it to
15089 gdb_disassembler::pretty_print_insn.
15090 (dump_insns): Add one argument gdb_disassemlber. All
15091 callers updated.
15092 (do_mixed_source_and_assembly_deprecated): Likewise.
15093 (do_mixed_source_and_assembly): Likewise.
15094 (do_assembly_only): Likewise.
15095 (gdb_disassembler::gdb_disassembler): New.
15096 (gdb_disassembler::print_insn): New.
15097 * disasm.h (class gdb_disassembler): New.
15098 (gdb_pretty_print_insn): Remove declaration.
15099 (gdb_disassemble_info): Likewise.
15100 * guile/scm-disasm.c (class gdbscm_disassembler): New.
15101 (gdbscm_disasm_read_memory_worker): Update.
15102 (gdbscm_disasm_read_memory): Update.
15103 (gdbscm_disasm_memory_error): Remove.
15104 (gdbscm_disasm_print_address): Remove.
15105 (gdbscm_disassembler::gdbscm_disassembler): New.
15106 (gdbscm_print_insn_from_port): Update.
15107 * mips-tdep.c: Include disasm.h.
15108 (gdb_print_insn_mips): Update code to get gdbarch.
15109 * record-btrace.c (btrace_insn_history): Update.
15110 * spu-tdep.c: Include disasm.h.
15111 (struct spu_dis_asm_data): Remove.
15112 (struct spu_dis_asm_info): New.
15113 (spu_dis_asm_print_address): Use spu_dis_asm_info to get
15114 SPU id.
15115 (gdb_print_insn_spu): Cast disassemble_info to
15116 spu_dis_asm_info.
15117
15118 2017-01-26 Yao Qi <yao.qi@linaro.org>
15119
15120 * disasm.c (do_ui_file_delete): Delete.
15121 (gdb_insn_length): Move code creating stream to ...
15122 * utils.c (null_stream): ... here. New function.
15123 * utils.h (null_stream): Declare.
15124
15125 2017-01-23 Simon Marchi <simon.marchi@polymtl.ca>
15126
15127 * python/py-inferior.c (find_thread_object): Return directly
15128 from the loop. Remove "found" variable.
15129
15130 2017-01-21 Joel Brobecker <brobecker@adacore.com>
15131
15132 GDB 7.12.1 released.
15133
15134 2017-01-20 Simon Marchi <simon.marchi@ericsson.com>
15135
15136 * python/py-function.c (fnpy_call): Reorder declarations to have
15137 the gdbpy_enter object declared first.
15138 * python/py-xmethods.c (gdbpy_get_xmethod_arg_types): Likewise.
15139
15140 2017-01-20 Simon Marchi <simon.marchi@ericsson.com>
15141
15142 PR python/21068
15143 * python/python-internal.h (PyMem_RawMalloc): Define for
15144 Python < 3.4.
15145 * python/py-gdb-readline.c (gdbpy_readline_wrapper): Use
15146 PyMem_RawMalloc instead of PyMem_Malloc.
15147
15148 2017-01-20 Mike Wrighton <mike_wrighton@codesourcery.com>
15149 Luis Machado <lgustavo@codesourcery.com>
15150
15151 * NEWS (New commands): Mention flash-erase.
15152 (New MI commands): Mention target-flash-erase.
15153 * mi/mi-cmds.c (mi_cmd_target_flash_erase): Add target-flash-erase MI
15154 command.
15155 * mi/mi-cmds.h (mi_cmd_target_flash_erase): New declaration.
15156 * mi/mi-main.c (mi_cmd_target_flash_erase): New function.
15157 * target.c (flash_erase_command): New function.
15158 (initialize_targets): Add new flash-erase command.
15159 * target.h (flash_erase_command): New declaration.
15160
15161 2017-01-20 Joel Brobecker <brobecker@adacore.com>
15162
15163 * nat/linux-ptrace.c: Only include <sys/procfs.h> if
15164 HAVE_SYS_PROCFS_H is defined.
15165
15166 2017-01-18 Alan Hayward <alan.hayward@arm.com>
15167
15168 * remote.c (struct cached_reg): Change data into a pointer.
15169 * (stop_reply_dtr): Free data pointers before deleting vector.
15170 (process_stop_reply): Likewise.
15171 (remote_parse_stop_reply): Allocate space for data
15172
15173 2017-01-18 Alan Hayward <alan.hayward@arm.com>
15174
15175 * amd64-tdep.c (amd64_pseudo_register_read_value): remove
15176 MAX_REGISTER_SIZE.
15177 (amd64_pseudo_register_read_value): Likewise.
15178 * remote.c (fetch_register_using_p): Remove MAX_REGISTER_SIZE.
15179 (store_register_using_P): Likewise.
15180 * regcache.c (regcache_xfer_part): Likewise.
15181
15182 2017-01-16 Ivo Raisr <ivo.raisr@oracle.com>
15183
15184 Split real and pseudo registers.
15185 * sparc-tdep.h (SPARC_CORE_REGISTERS): New macro.
15186 (sparc32_pseudo_regnum): New enum.
15187 * sparc64-tdep.h (sparc64_pseudo_regnum): New enum.
15188 * sparc-tdep.c (SPARC32_FPU_REGISTERS): New macro.
15189 (SPARC32_CP0_REGISTERS): New macro.
15190 (sparc32_pseudo_register_name): New function.
15191 (sparc32_register_name): Use sparc32_pseudo_register_name.
15192 (sparc32_pseudo_register_type): New function.
15193 (sparc32_register_type): Use sparc32_pseudo_register_type.
15194 (sparc32_pseudo_register_read, sparc32_pseudo_register_write): Handle
15195 pseudo register numbers.
15196 * sparc64-tdep.c SPARC64_FPU_REGISTERS): New macro.
15197 (SPARC64_CP0_REGISTERS): New macro.
15198 (sparc64_pseudo_register_name): New function.
15199 (sparc64_register_name): Use sparc64_pseudo_register_name.
15200 (sparc64_pseudo_register_type): New function.
15201 (sparc64_register_type): Use sparc64_pseudo_register_type.
15202 (sparc64_pseudo_register_read, sparc64_pseudo_register_write): Handle
15203 pseudo register numbers.
15204 (sparc64_store_floating_fields, sparc64_extract_floating_fields,
15205 sparc64_store_arguments): Handle pseudo register numbers.
15206
15207 2017-01-13 Yao Qi <yao.qi@linaro.org>
15208
15209 * remote.c (REMOTE_DEBUG_MAX_CHAR): New macro.
15210 (putpkt_binary): Print only REMOTE_DEBUG_MAX_CHAR chars in debug
15211 output.
15212 (getpkt_or_notif_sane_1): Likewise.
15213
15214 2017-01-13 Yao Qi <yao.qi@linaro.org>
15215
15216 * Makefile.in (checker-headers): Use CXX and CXX_DIALET instead
15217 of CC. Pass "-x c++-header" instead of "-x c".
15218
15219 2017-01-12 Simon Marchi <simon.marchi@ericsson.com>
15220
15221 * remote.c (remote_can_async_p): Update comment.
15222
15223 2017-01-12 Simon Marchi <simon.marchi@ericsson.com>
15224
15225 * linux-nat.c (linux_nat_can_async_p): Update comment.
15226
15227 2017-01-12 Simon Marchi <simon.marchi@ericsson.com>
15228
15229 * serial.c (serial_open): Forget about "pc" and "lpt" serial interface.
15230
15231 2017-01-11 Simon Marchi <simon.marchi@ericsson.com>
15232
15233 * cli/cli-decode.c (lookup_cmd_1): Fix typo in comment.
15234
15235 2017-01-10 Tom Tromey <tom@tromey.com>
15236
15237 * python/py-type.c (typy_legacy_template_argument): Update.
15238 * cp-support.h (struct demangle_parse_info) (demangle_parse_info,
15239 ~demangle_parse_info): Declare new members.
15240 (cp_demangled_name_to_comp): Return unique_ptr.
15241 (cp_demangled_name_parse_free)
15242 (make_cleanup_cp_demangled_name_parse_free)
15243 (cp_new_demangle_parse_info): Remove.
15244 * cp-support.c (do_demangled_name_parse_free_cleanup)
15245 (make_cleanup_cp_demangled_name_parse_free): Remove.
15246 (inspect_type, cp_canonicalize_string_full)
15247 (cp_canonicalize_string): Update.
15248 (mangled_name_to_comp): Change return type.
15249 (cp_class_name_from_physname, method_name_from_physname)
15250 (cp_func_name, cp_remove_params): Update.
15251 * cp-name-parser.y (demangle_parse_info): New constructor, from
15252 cp_new_demangle_parse_info.
15253 (~demangle_parse_info): New destructor, from
15254 cp_demangled_name_parse_free.
15255 (cp_merge_demangle_parse_infos): Update.
15256 (cp_demangled_name_to_comp): Change return type.
15257
15258 2017-01-10 Tom Tromey <tom@tromey.com>
15259
15260 * top.c (prevent_dont_repeat): Change return type.
15261 * python/python.c (execute_gdb_command): Use std::string.
15262 Update.
15263 * guile/guile.c (gdbscm_execute_gdb_command): Update.
15264 * command.h (prevent_dont_repeat): Change return type.
15265 * breakpoint.c (bpstat_do_actions_1): Update.
15266
15267 2017-01-10 Tom Tromey <tom@tromey.com>
15268
15269 * value.h (scoped_value_mark::~scoped_value_mark): Call
15270 free_to_mark.
15271 (scoped_value_mark::free_to_mark): New method.
15272 * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Use
15273 scoped_value_mark.
15274
15275 2017-01-10 Tom Tromey <tom@tromey.com>
15276
15277 * python/py-value.c (valpy_dereference, valpy_referenced_value)
15278 (valpy_reference_value, valpy_const_value, valpy_get_address)
15279 (valpy_get_dynamic_type, valpy_lazy_string, valpy_do_cast)
15280 (valpy_getitem, valpy_call, valpy_binop_throw, valpy_negative)
15281 (valpy_absolute, valpy_richcompare_throw): Use scoped_value_mark.
15282 * dwarf2loc.c (dwarf2_loc_desc_get_symbol_read_needs): Use
15283 scoped_value_mark.
15284 * dwarf2-frame.c (execute_stack_op): Use scoped_value_mark.
15285 * value.h (scoped_value_mark): New class.
15286
15287 2017-01-10 Tom Tromey <tom@tromey.com>
15288
15289 * dwarf2read.c (dwarf2_build_psymtabs): Use psymtab_discarder.
15290 * psympriv.h (make_cleanup_discard_psymtabs): Don't declare.
15291 * psymtab.c (discard_psymtabs_upto): Remove.
15292 (make_cleanup_discard_psymtabs): Remove.
15293 (struct psymtab_state): Remove.
15294
15295 2017-01-10 Tom Tromey <tom@tromey.com>
15296
15297 * record-full.c (record_full_save_cleanups): Remove.
15298 (record_full_save): Use gdb::unlinker.
15299 * gcore.c (do_bfd_delete_cleanup): Remove.
15300 (gcore_command): Use gdb::unlinker, unique_xmalloc_ptr. Remove
15301 cleanups.
15302 * dwarf2read.c (unlink_if_set): Remove.
15303 (write_psymtabs_to_index): Use gdb::unlinker.
15304 * common/gdb_unlinker.h: New file.
15305
15306 2017-01-10 Tom Tromey <tom@tromey.com>
15307
15308 * windows-tdep.c (windows_xfer_shared_library): Update.
15309 * windows-nat.c (windows_make_so): Update.
15310 * utils.h (make_cleanup_bfd_unref): Remove.
15311 * utils.c (do_bfd_close_cleanup, make_cleanup_bfd_unref): Remove.
15312 * symfile.h (symfile_bfd_open)
15313 (find_separate_debug_file_in_section): Return gdb_bfd_ref_ptr.
15314 * symfile.c (read_symbols, symbol_file_add)
15315 (separate_debug_file_exists): Update.
15316 (symfile_bfd_open): Return gdb_bfd_ref_ptr.
15317 (generic_load, reread_symbols): Update.
15318 * symfile-mem.c (symbol_file_add_from_memory): Update.
15319 * spu-linux-nat.c (spu_bfd_open): Return gdb_bfd_ref_ptr.
15320 (spu_symbol_file_add_from_memory): Update.
15321 * solist.h (struct target_so_ops) <bfd_open>: Return
15322 gdb_bfd_ref_ptr.
15323 (solib_bfd_fopen, solib_bfd_open): Return gdb_bfd_ref_ptr.
15324 * solib.c (solib_bfd_fopen, solib_bfd_open): Return
15325 gdb_bfd_ref_ptr.
15326 (solib_map_sections, reload_shared_libraries_1): Update.
15327 * solib-svr4.c (enable_break): Update.
15328 * solib-spu.c (spu_bfd_fopen): Return gdb_bfd_ref_ptr.
15329 * solib-frv.c (enable_break2): Update.
15330 * solib-dsbt.c (enable_break): Update.
15331 * solib-darwin.c (gdb_bfd_mach_o_fat_extract): Return
15332 gdb_bfd_ref_ptr.
15333 (darwin_solib_get_all_image_info_addr_at_init): Update.
15334 (darwin_bfd_open): Return gdb_bfd_ref_ptr.
15335 * solib-aix.c (solib_aix_bfd_open): Return gdb_bfd_ref_ptr.
15336 * record-full.c (record_full_save): Update.
15337 * python/py-objfile.c (objfpy_add_separate_debug_file): Update.
15338 * procfs.c (insert_dbx_link_bpt_in_file): Update.
15339 * minidebug.c (find_separate_debug_file_in_section): Return
15340 gdb_bfd_ref_ptr.
15341 * machoread.c (macho_add_oso_symfile): Change abfd to
15342 gdb_bfd_ref_ptr.
15343 (macho_symfile_read_all_oso): Update.
15344 (macho_check_dsym): Return gdb_bfd_ref_ptr.
15345 (macho_symfile_read): Update.
15346 * jit.c (bfd_open_from_target_memory): Return gdb_bfd_ref_ptr.
15347 (jit_bfd_try_read_symtab): Update.
15348 * gdb_bfd.h (gdb_bfd_open, gdb_bfd_fopen, gdb_bfd_openr)
15349 (gdb_bfd_openw, gdb_bfd_openr_iovec)
15350 (gdb_bfd_openr_next_archived_file, gdb_bfd_fdopenr): Return
15351 gdb_bfd_ref_ptr.
15352 (gdb_bfd_ref_policy): New struct.
15353 (gdb_bfd_ref_ptr): New typedef.
15354 * gdb_bfd.c (gdb_bfd_open, gdb_bfd_fopen, gdb_bfd_openr)
15355 (gdb_bfd_openw, gdb_bfd_openr_iovec)
15356 (gdb_bfd_openr_next_archived_file, gdb_bfd_fdopenr): Return
15357 gdb_bfd_ref_ptr.
15358 * gcore.h (create_gcore_bfd): Return gdb_bfd_ref_ptr.
15359 * gcore.c (create_gcore_bfd): Return gdb_bfd_ref_ptr.
15360 (gcore_command): Update.
15361 * exec.c (exec_file_attach): Update.
15362 * elfread.c (elf_symfile_read): Update.
15363 * dwarf2read.c (dwarf2_get_dwz_file): Update.
15364 (try_open_dwop_file, open_dwo_file): Return gdb_bfd_ref_ptr.
15365 (open_and_init_dwo_file): Update.
15366 (open_dwp_file): Return gdb_bfd_ref_ptr.
15367 (open_and_init_dwp_file): Update.
15368 * corelow.c (core_open): Update.
15369 * compile/compile-object-load.c (compile_object_load): Update.
15370 * common/gdb_ref_ptr.h (ref_ptr::operator->): New operator.
15371 * coffread.c (coff_symfile_read): Update.
15372 * cli/cli-dump.c (bfd_openr_or_error, bfd_openw_or_error): Return
15373 gdb_bfd_ref_ptr. Rename.
15374 (dump_bfd_file, restore_command): Update.
15375 * build-id.h (build_id_to_debug_bfd): Return gdb_bfd_ref_ptr.
15376 * build-id.c (build_id_to_debug_bfd): Return gdb_bfd_ref_ptr.
15377 (find_separate_debug_file_by_buildid): Update.
15378
15379 2017-01-10 Tom Tromey <tom@tromey.com>
15380
15381 * common/gdb_ref_ptr.h: New file.
15382 * python/py-ref.h (struct gdbpy_ref_policy): New.
15383 (gdbpy_ref): Now a typedef.
15384
15385 2017-01-10 Tom Tromey <tom@tromey.com>
15386
15387 * utils.h (make_cleanup_htab_delete): Don't declare.
15388 * utils.c (do_htab_delete_cleanup, make_cleanup_htab_delete):
15389 Remove.
15390 * linespec.c (decode_compound_collector): Add constructor,
15391 destructor.
15392 (lookup_prefix_sym): Remove cleanup.
15393 (symtab_collector): Add constructor, destructor.
15394 (collect_symtabs_from_filename): Remove cleanup.
15395 * disasm.c (do_mixed_source_and_assembly): Use htab_up.
15396 * compile/compile-c-symbols.c (generate_c_for_variable_locations):
15397 Use htab_up.
15398 * gnu-v3-abi.c (gnuv3_print_vtable): Use htab_up.
15399 * dwarf2read.c (dw2_expand_symtabs_matching)
15400 (dw2_map_symbol_filenames, dwarf_decode_macros)
15401 (write_psymtabs_to_index): Use htab_up.
15402 * dwarf2loc.c (func_verify_no_selftailcall)
15403 (call_site_find_chain_1, func_verify_no_selftailcall)
15404 (chain_candidate, call_site_find_chain_1): Use std::unordered_set,
15405 std::vector, gdb::unique_xmalloc_ptr.
15406 (call_sitep): Remove typedef.
15407 (dwarf2_locexpr_baton_eval): Remove unused variable.
15408
15409 2017-01-10 Tom Tromey <tom@tromey.com>
15410
15411 * python/python-internal.h (make_cleanup_py_decref)
15412 (make_cleanup_py_xdecref): Don't declare.
15413 * python/py-utils.c (py_decref, make_cleanup_py_decref)
15414 (py_xdecref, make_cleanup_py_xdecref): Remove.
15415
15416 2017-01-10 Tom Tromey <tom@tromey.com>
15417
15418 * python/py-framefilter.c (py_mi_print_variables): Use gdbpy_ref.
15419 (py_print_locals, enumerate_locals, py_print_args): Use gdbpy_ref.
15420
15421 2017-01-10 Tom Tromey <tom@tromey.com>
15422
15423 * python/py-framefilter.c (enumerate_args): Use gdbpy_ref.
15424
15425 2017-01-10 Tom Tromey <tom@tromey.com>
15426
15427 * python/py-utils.c (unicode_to_encoded_string)
15428 (python_string_to_target_string)
15429 (python_string_to_target_python_string)
15430 (python_string_to_host_string, gdbpy_obj_to_string)
15431 (get_addr_from_python): Use gdbpy_ref.
15432
15433 2017-01-10 Tom Tromey <tom@tromey.com>
15434
15435 * python/py-unwind.c (pyuw_object_attribute_to_pointer): Use
15436 gdbpy_ref.
15437
15438 2017-01-10 Tom Tromey <tom@tromey.com>
15439
15440 * python/python.c (eval_python_command, gdbpy_decode_line)
15441 (gdbpy_run_events, gdbpy_start_type_printers)
15442 (gdbpy_apply_type_printers): Use gdbpy_ref.
15443
15444 2017-01-10 Tom Tromey <tom@tromey.com>
15445
15446 * python/py-param.c (get_doc_string, compute_enum_values): Use
15447 gdbpy_ref.
15448
15449 2017-01-10 Tom Tromey <tom@tromey.com>
15450
15451 * python/py-inferior.c (find_thread_object, build_inferior_list):
15452 Use gdbpy_ref.
15453
15454 2017-01-10 Tom Tromey <tom@tromey.com>
15455
15456 * python/py-framefilter.c (py_print_frame): Use gdbpy_ref.
15457
15458 2017-01-10 Tom Tromey <tom@tromey.com>
15459
15460 * python/py-finishbreakpoint.c (bpfinishpy_out_of_scope): Use
15461 gdbpy_ref.
15462
15463 2017-01-10 Tom Tromey <tom@tromey.com>
15464
15465 * python/py-cmd.c (cmdpy_completer_helper): Use gdbpy_ref. Remove
15466 extra incref.
15467 (cmdpy_completer_handle_brkchars, cmdpy_completer, cmdpy_init):
15468 Use gdbpy_ref.
15469
15470 2017-01-10 Tom Tromey <tom@tromey.com>
15471
15472 * python/py-breakpoint.c (gdbpy_breakpoint_cond_says_stop): Use
15473 gdbpy_ref.
15474
15475 2017-01-10 Tom Tromey <tom@tromey.com>
15476
15477 * python/py-arch.c (archpy_disassemble): Use gdbpy_ref. Don't
15478 decref results of PyArg_ParseTupleAndKeywords.
15479
15480 2017-01-10 Tom Tromey <tom@tromey.com>
15481
15482 * python/python.c (python_run_simple_file): Use
15483 unique_xmalloc_ptr, gdbpy_ref.
15484
15485 2017-01-10 Tom Tromey <tom@tromey.com>
15486
15487 * python/py-prettyprint.c (print_stack_unless_memory_error)
15488 (print_string_repr, print_children): Use gdbpy_ref.
15489 (dummy_python_frame): New class.
15490 (dummy_python_frame::dummy_python_frame): Rename from
15491 push_dummy_python_frame.
15492 (py_restore_tstate): Remove.
15493
15494 2017-01-10 Tom Tromey <tom@tromey.com>
15495
15496 * python/py-framefilter.c (py_print_frame): Use gdbpy_ref.
15497
15498 2017-01-10 Tom Tromey <tom@tromey.com>
15499
15500 * python/python.c (ensure_python_env, restore_python_env):
15501 Remove.
15502 * python/python-internal.h (ensure_python_env): Don't declare.
15503 * varobj.h (varobj_ensure_python_env): Don't declare.
15504 * varobj.c (varobj_ensure_python_env): Remove.
15505
15506 2017-01-10 Tom Tromey <tom@tromey.com>
15507
15508 * varobj.c (varobj_value_get_print_value): Use
15509 gdbpy_enter_varobj.
15510
15511 2017-01-10 Tom Tromey <tom@tromey.com>
15512
15513 * python/py-prettyprint.c (print_string_repr, print_children):
15514 Update.
15515 * python/py-lazy-string.c (gdbpy_extract_lazy_string): Change type
15516 of "encoding".
15517 * varobj.c (varobj_value_get_print_value): Update.
15518 * python/python-internal.h (gdbpy_extract_lazy_string): Update.
15519
15520 2017-01-10 Tom Tromey <tom@tromey.com>
15521
15522 * varobj.c (varobj_get_display_hint)
15523 (dynamic_varobj_has_child_method, install_new_value_visualizer)
15524 (varobj_set_visualizer, free_variable): Use
15525 gdbpy_enter_varobj.
15526
15527 2017-01-10 Tom Tromey <tom@tromey.com>
15528
15529 * python/python.c (python_command): Use gdbpy_enter, gdbpy_ref.
15530 (do_finish_initialization): New function. Use gdbpy_ref.
15531 (gdbpy_finish_initialization): Use gdbpy_enter. Call
15532 do_finish_initialization.
15533
15534 2017-01-10 Tom Tromey <tom@tromey.com>
15535
15536 * python/py-param.c (get_set_value, get_show_value): Use
15537 gdbpy_enter, gdbpy_ref.
15538
15539 2017-01-10 Tom Tromey <tom@tromey.com>
15540
15541 * python/py-function.c (fnpy_call): Use gdbpy_enter, gdbpy_ref.
15542
15543 2017-01-10 Tom Tromey <tom@tromey.com>
15544
15545 * python/py-cmd.c (cmdpy_function): Use gdbpy_enter, gdbpy_ref.
15546
15547 2017-01-10 Tom Tromey <tom@tromey.com>
15548
15549 * python/py-varobj.c (py_varobj_iter_dtor, py_varobj_iter_next):
15550 Use gdbpy_enter_varobj.
15551
15552 2017-01-10 Tom Tromey <tom@tromey.com>
15553
15554 * varobj.c (gdbpy_enter_varobj): New constructor.
15555 * python/python-internal.h (gdbpy_enter_varobj): New class.
15556 * python/py-varobj.c (py_varobj_get_iterator): Use
15557 gdbpy_enter_varobj.
15558
15559 2017-01-10 Tom Tromey <tom@tromey.com>
15560
15561 * python/py-xmethods.c (gdbpy_get_xmethod_result_type): Use
15562 gdbpy_enter, gdbpy_ref, unique_xmalloc_ptr.
15563 (gdbpy_invoke_xmethod): Use gdbpy_ref, gdbpy_enter.
15564 (gdbpy_get_xmethod_arg_types): Use gdbpy_ref,
15565 unique_xmalloc_ptr.
15566 (gdbpy_get_xmethod_arg_types): Use gdbpy_ref, gdbpy_enter.
15567
15568 2017-01-10 Tom Tromey <tom@tromey.com>
15569
15570 * python/py-xmethods.c (invoke_match_method): Use
15571 gdbpy_ref.
15572
15573 2017-01-10 Tom Tromey <tom@tromey.com>
15574
15575 * python/py-xmethods.c (gdbpy_get_matching_xmethod_workers): use
15576 gdbpy_enter, gdbpy_ref.
15577
15578 2017-01-10 Tom Tromey <tom@tromey.com>
15579
15580 * python/python.c (python_interactive_command): Use gdbpy_enter.
15581
15582 2017-01-10 Tom Tromey <tom@tromey.com>
15583
15584 * python/python.c (gdbpy_before_prompt_hook): Use gdbpy_enter,
15585 gdbpy_ref.
15586
15587 2017-01-10 Tom Tromey <tom@tromey.com>
15588
15589 * python/py-prettyprint.c (gdbpy_apply_val_pretty_printer): Use
15590 gdbpy_enter, gdbpy_ref, unique_xmalloc_ptr.
15591
15592 2017-01-10 Tom Tromey <tom@tromey.com>
15593
15594 * utils.h (htab_deleter): New struct.
15595 (htab_up): New typedef.
15596 * python/py-framefilter.c (gdbpy_apply_frame_filter): Use
15597 gdbpy_enter, gdbpy_ref, htab_up.
15598
15599 2017-01-10 Tom Tromey <tom@tromey.com>
15600
15601 * python/py-unwind.c (pending_frame_invalidate): Remove.
15602 (pyuw_sniffer): Use gdbpy_enter and gdbpy_ref.
15603
15604 2017-01-10 Tom Tromey <tom@tromey.com>
15605
15606 * python/py-xmethods.c (gdbpy_free_xmethod_worker_data)
15607 (gdbpy_clone_xmethod_worker_data): Use gdbpy_enter.
15608
15609 2017-01-10 Tom Tromey <tom@tromey.com>
15610
15611 * python/py-type.c (save_objfile_types): Use gdbpy_enter.
15612
15613 2017-01-10 Tom Tromey <tom@tromey.com>
15614
15615 * python/python.c (gdbpy_eval_from_control_command)
15616 (gdbpy_source_script, gdbpy_run_events)
15617 (gdbpy_source_objfile_script, gdbpy_execute_objfile_script)
15618 (gdbpy_free_type_printers, gdbpy_finish_initialization): Use
15619 gdbpy_enter.
15620
15621 2017-01-10 Tom Tromey <tom@tromey.com>
15622
15623 * python/py-progspace.c (py_free_pspace): Use gdbpy_enter.
15624
15625 2017-01-10 Tom Tromey <tom@tromey.com>
15626
15627 * python/py-objfile.c (py_free_objfile): Use gdbpy_enter.
15628
15629 2017-01-10 Tom Tromey <tom@tromey.com>
15630
15631 * python/py-inferior.c (python_on_normal_stop, python_on_resume)
15632 (python_on_inferior_call_pre, python_on_inferior_call_post)
15633 (python_on_memory_change, python_on_register_change)
15634 (python_inferior_exit, python_new_objfile, add_thread_object)
15635 (delete_thread_object, py_free_inferior): Use gdbpy_enter.
15636
15637 2017-01-10 Tom Tromey <tom@tromey.com>
15638
15639 * python/py-finishbreakpoint.c (bpfinishpy_handle_stop)
15640 (bpfinishpy_handle_exit): Use gdbpy_enter.
15641
15642 2017-01-10 Tom Tromey <tom@tromey.com>
15643
15644 * python/py-cmd.c (cmdpy_destroyer)
15645 (cmdpy_completer_handle_brkchars, cmdpy_completer): Use
15646 gdbpy_enter.
15647
15648 2017-01-10 Tom Tromey <tom@tromey.com>
15649
15650 * python/py-breakpoint.c (gdbpy_breakpoint_cond_says_stop): Use
15651 gdbpy_enter.
15652 (gdbpy_breakpoint_has_cond): Likewise.
15653
15654 2017-01-10 Tom Tromey <tom@tromey.com>
15655
15656 * python/python.c (gdbpy_enter): New constructor.
15657 (~gdbpy_enter): New destructor.
15658 (restore_python_env, ensure_python_env): Rewrite.
15659 * python/python-internal.h (gdbpy_enter): New class.
15660
15661 2017-01-10 Tom Tromey <tom@tromey.com>
15662
15663 * python/py-symbol.c (gdbpy_lookup_symbol): Use gdbpy_ref.
15664
15665 2017-01-10 Tom Tromey <tom@tromey.com>
15666
15667 * python/py-value.c (value_has_field, get_field_flag)
15668 (get_field_type, valpy_getitem, convert_value_from_python): Use
15669 gdbpy_ref.
15670
15671 2017-01-10 Tom Tromey <tom@tromey.com>
15672
15673 * python/python.c (gdbpy_progspaces, gdbpy_objfiles): Use
15674 gdbpy_ref.
15675
15676 2017-01-10 Tom Tromey <tom@tromey.com>
15677
15678 * python/py-prettyprint.c (search_pp_list)
15679 (find_pretty_printer_from_objfiles)
15680 (find_pretty_printer_from_progspace)
15681 (find_pretty_printer_from_gdb, find_pretty_printer)
15682 (gdbpy_get_display_hint, gdbpy_get_varobj_pretty_printer): Use
15683 gdbpy_ref.
15684
15685 2017-01-10 Tom Tromey <tom@tromey.com>
15686
15687 * python/py-param.c (call_doc_function): Use gdbpy_ref.
15688
15689 2017-01-10 Tom Tromey <tom@tromey.com>
15690
15691 * python/py-linetable.c (build_line_table_tuple_from_pcs)
15692 (ltpy_get_all_source_lines): Use gdbpy_ref.
15693
15694 2017-01-10 Tom Tromey <tom@tromey.com>
15695
15696 * python/py-framefilter.c (extract_sym, extract_value)
15697 (get_py_iter_from_func, bootstrap_python_frame_filters): Use
15698 gdbpy_ref.
15699
15700 2017-01-10 Tom Tromey <tom@tromey.com>
15701
15702 * python/py-breakpoint.c (gdbpy_breakpoints): Use gdbpy_ref.
15703
15704 2017-01-10 Tom Tromey <tom@tromey.com>
15705
15706 * python/py-inferior.c (gdbpy_inferiors): Use gdbpy_ref.
15707
15708 2017-01-10 Tom Tromey <tom@tromey.com>
15709
15710 * python/py-function.c (convert_values_to_python, fnpy_init): Use
15711 gdbpy_ref.
15712
15713 2017-01-10 Tom Tromey <tom@tromey.com>
15714
15715 * python/py-cmd.c (gdbpy_string_to_argv): Use gdbpy_ref.
15716
15717 2017-01-10 Tom Tromey <tom@tromey.com>
15718
15719 * python/py-type.c (convert_field, make_fielditem, typy_fields)
15720 (typy_range): Use gdbpy_ref.
15721
15722 2017-01-10 Tom Tromey <tom@tromey.com>
15723
15724 * python/py-threadevent.c (create_thread_event_object): Use
15725 gdbpy_ref.
15726 * python/py-stopevent.c (create_stop_event_object): Simplify.
15727 (emit_stop_event): Use gdbpy_ref.
15728 * python/py-signalevent.c (create_signal_event_object): Use
15729 gdbpy_ref.
15730 * python/py-newobjfileevent.c (create_new_objfile_event_object)
15731 (emit_new_objfile_event, create_clear_objfiles_event_object)
15732 (emit_clear_objfiles_event): Use gdbpy_ref.
15733 * python/py-infevents.c (create_inferior_call_event_object)
15734 (create_register_changed_event_object)
15735 (create_memory_changed_event_object, emit_inferior_call_event)
15736 (emit_memory_changed_event, emit_register_changed_event): Use
15737 gdbpy_ref.
15738 * python/py-exitedevent.c (create_exited_event_object)
15739 (emit_exited_event): Use gdbpy_ref.
15740 * python/py-event.h (evpy_emit_event): Remove
15741 CPYCHECKER_STEALS_REFERENCE_TO_ARG annotation.
15742 * python/py-event.c (evpy_emit_event): Use gdbpy_ref.
15743 * python/py-continueevent.c (emit_continue_event): Use
15744 gdbpy_ref.
15745 * python/py-breakpoint.c (gdbpy_breakpoint_created)
15746 (gdbpy_breakpoint_deleted, gdbpy_breakpoint_modified): Use
15747 gdbpy_ref.
15748 * python/py-bpevent.c (create_breakpoint_event_object): Use
15749 gdbpy_ref.
15750
15751 2017-01-10 Tom Tromey <tom@tromey.com>
15752
15753 * python/py-ref.h: New file.
15754
15755 2017-01-10 Simon Marchi <simon.marchi@ericsson.com>
15756
15757 * cli-out.c (cli_ui_out::do_redirect): Change return type to
15758 void.
15759 * cli-out.h (cli_ui_out::do_redirect): Likewise.
15760 * mi/mi-out.c (mi_ui_out::do_redirect): Likewise.
15761 * mi/mi-out.h (mi_ui_out::do_redirect): Likewise.
15762 * ui-out.c (ui_out::redirect): Likewise.
15763 * ui-out.h (ui_out::redirect, ui_out::do_redirect): Likewise.
15764 * cli/cli-logging.c (set_logging_redirect): Update call site of
15765 ui_out::redirect.
15766 (handle_redirections): Likewise.
15767 * scm-ports.c (ioscm_with_output_to_port_worker): Likewise.
15768 * top.c (execute_command_to_string): Likewise.
15769 * utils.c (do_ui_out_redirect_pop): Likewise.
15770
15771 2017-01-10 Simon Marchi <simon.marchi@ericsson.com>
15772
15773 * stack.c (_initialize_stack): Update "frame" command help message.
15774
15775 2017-01-08 Iain Buclaw <ibuclaw@gdcproject.org>
15776
15777 * d-exp.y (CastExpression): Emit UNOP_CAST_TYPE.
15778
15779 2017-01-06 Yao Qi <yao.qi@linaro.org>
15780
15781 * x86-linux-nat.h: Include gdb_proc_service.h.
15782
15783 2017-01-06 Yao Qi <yao.qi@linaro.org>
15784
15785 * ser-base.h: Include serial.h.
15786
15787 2017-01-06 Yao Qi <yao.qi@linaro.org>
15788
15789 * ppc-linux-tdep.h: Include ppc-tdep.h.
15790
15791 2017-01-06 Yao Qi <yao.qi@linaro.org>
15792
15793 * nat/amd64-linux-siginfo.h: Include signal.h.
15794
15795 2017-01-06 Yao Qi <yao.qi@linaro.org>
15796
15797 * nat/aarch64-linux-hw-point.h: Include break-common.h.
15798
15799 2017-01-06 Yao Qi <yao.qi@linaro.org>
15800
15801 * mi/mi-parse.h: Include mi-cmds.h.
15802
15803 2017-01-06 Yao Qi <yao.qi@linaro.org>
15804
15805 * inf-loop.c: Don't include "target.h".
15806 * inf-loop.h: Include it here.
15807
15808 2017-01-06 Yao Qi <yao.qi@linaro.org>
15809
15810 * dfp.h: Include "dboulest.h" and "expression.h".
15811
15812 2017-01-06 Yao Qi <yao.qi@linaro.org>
15813
15814 * ax-gdb.h: Include "ax.h".
15815
15816 2017-01-06 Yao Qi <yao.qi@linaro.org>
15817
15818 * Makefile.in (HFILES_NO_SRCDIR): Replace gdb_ptrace.h
15819 with nat/gdb_ptrace.h.
15820
15821 2017-01-05 Yao Qi <yao.qi@linaro.org>
15822
15823 * mips-fbsd-tdep.c (mips_fbsd_sigframe_init): Move && to
15824 new line.
15825 (mips64_fbsd_sigframe_init): Likewise.
15826
15827 2017-01-04 John Baldwin <jhb@FreeBSD.org>
15828
15829 * mips-fbsd-tdep.c (_initialize_mips_fbsd_tdep): Use
15830 GDB_OSABI_FREEBSD instead of GDB_OSABI_FREEBSD_ELF.
15831
15832 2017-01-04 John Baldwin <jhb@FreeBSD.org>
15833
15834 * Makefile.in (ALLDEPFILES): Add mips-fbsd-nat.c.
15835 * NEWS: Mention new FreeBSD/mips native configuration.
15836 * config/mips/fbsd.mh: New file.
15837 * configure.host: Add mips*-*-freebsd*.
15838 * mips-fbsd-nat.c: New file.
15839
15840 2017-01-04 John Baldwin <jhb@FreeBSD.org>
15841
15842 * Makefile.in (ALL_TARGET_OBS): Add mips-fbsd-tdep.o.
15843 (ALLDEPFILES): Add mips-fbsd-tdep.c.
15844 * NEWS: Mention new FreeBSD/mips target.
15845 * configure.tgt: Add mips*-*-freebsd*.
15846 * mips-fbsd-tdep.c: New file.
15847 * mips-fbsd-tdep.h: New file.
15848
15849 2017-01-04 Yao Qi <yao.qi@linaro.org>
15850
15851 * dwarf2loc.c (write_pieced_value): Don't use VALUE_FRAME_ID (to),
15852 use c->frame_id when the piece location is DWARF_VALUE_REGISTER.
15853
15854 2017-01-01 Joel Brobecker <brobecker@adacore.com>
15855
15856 Update copyright year range in all GDB files.
15857
15858 2017-01-01 Joel Brobecker <brobecker@adacore.com>
15859
15860 * config/djgpp/fnchange.lst: Add entry for gdb/ChangeLog-2016.
15861
15862 For older changes see ChangeLog-2016.
15863 \f
15864 Local Variables:
15865 mode: change-log
15866 left-margin: 8
15867 fill-column: 74
15868 version-control: never
15869 coding: utf-8
15870 End: