1 2017-11-16 Pedro Alves <palves@redhat.com>
3 * inf-loop.c (inferior_event_handler): Don't swallow the exception
4 if the prompt is blocked.
6 2017-11-16 Pedro Alves <palves@redhat.com>
8 * breakpoint.c (insert_bp_location): Replace bp_err and
9 bp_err_message locals by a gdb_exception local.
11 2017-11-16 Pedro Alves <palves@redhat.com>
13 * inflow.c (scoped_ignore_sigttou): New class.
14 (child_terminal_ours_1, new_tty): Use it.
16 2017-11-16 Ulrich Weigand <uweigand@de.ibm.com>
18 * target-float.c (decimal_from_number): Add byte_order argument and
19 call match_endianness. Error if unknown floating-point type.
20 (decimal_to_number): Add byte_order argument and call match_endianness.
21 (decimal_from_longest): Update call. Do not call match_endianness.
22 (decimal_from_ulongest): Likewise.
23 (decimal_binop): Likewise.
24 (decimal_is_zero): Likewise.
25 (decimal_compare): Likewise.
26 (decimal_convert): Likewise.
28 2017-11-16 Phil Muldoon <pmuldoon@redhat.com>
30 * python/python.c (gdbpy_rbreak): New function.
31 * NEWS: Document Python rbreak feature.
33 2017-11-16 Yao Qi <yao.qi@linaro.org>
35 * features/tic6x-c62x.xml: Remove.
36 * features/tic6x-c64x.xml: Remove.
37 * features/tic6x-c64xp.xml: Remove.
39 2017-11-15 John Baldwin <jhb@FreeBSD.org>
41 * symtab.h: Include <array>.
43 2017-11-15 John Baldwin <jhb@FreeBSD.org>
45 * bsd-kvm.c (bsd_kvm_cmd): Constify 'arg'.
46 (bsd_kvm_proc_cmd): Likewise.
48 2017-11-15 Simon Marchi <simon.marchi@ericsson.com>
50 * tui/tui-win.c (window_name_completer): Replace VEC with
53 2017-11-15 Andrew Cagney <cagney@gnu.org>
55 * MAINTAINERS: Remove no-longer applicable entries.
57 2017-11-15 Andrew Cagney <cagney@gnu.org>
59 * MAINTAINERS: Move self to Past Maintainers.
61 2017-11-15 Yao Qi <yao.qi@linaro.org>
63 * features/Makefile (XMLTOC): Remove nios2-linux.xml.
64 * features/nios2-linux.c: Remove.
65 * nios2-linux-tdep.c (_initialize_nios2_linux_tdep): Don't call
66 initialize_tdesc_nios2_linux.
68 2017-11-15 Yao Qi <yao.qi@linaro.org>
70 * m68hc11-tdep.c (M68HC11_NUM_REGS): Change it to
71 M68HC11_LAST_HARD_REG + 1.
73 2017-11-14 Paul Carroll <pcarroll@codesourcery.com>
76 * remote.c (remote_write_bytes_aux, remote_read_bytes_1,
77 remote_read_bytes, remote_write_qxfer, remote_xfer_partial):
78 Return TARGET_XFER_EOF if size of returned data is 0.
80 2017-11-14 Simon Marchi <simon.marchi@ericsson.com>
82 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
83 memory-map-selftests.c.
84 (SUBDIR_UNITTESTS_OBS): Add memory-map-selftests.o.
85 * memory-map.c (memory_map_start_memory): Fix computation of hi
87 * unittests/memory-map-selftests.c: New file.
89 2017-11-09 Joel Brobecker <brobecker@adacore.com>
91 * ada-lang.c: Fix some typos in the general command documenting
92 how Ada expressions are being evaluated and how their result
95 2017-11-09 Tom Tromey <tom@tromey.com>
97 * psymtab.c (psymbol_hash): Do not hash string contents.
98 (psymbol_compare): Add comment.
100 2017-11-09 Tom Tromey <tom@tromey.com>
102 * dictionary.c (dict_hash): Move "TKB" check into the "switch".
104 2017-11-08 Joel Brobecker <brobecker@adacore.com>
106 * ada-exp.y (write_var_from_sym): Remove parameter
107 "orig_left_context". Update all callers.
109 2017-11-08 Simon Marchi <simon.marchi@ericsson.com>
111 * tracepoint.h (class collection_list) <stringify>: Return
112 std::vector<std::string>.
113 (encode_actions_rsp): Change parameters to
114 std::vector<std::string> *.
115 * tracepoint.c (collection_list::stringify): Return
116 std::vector<std::string> and adjust accordingly.
117 (encode_actions_rsp): Changee parameters to
118 std::vector<std::string> and adjust accordingly.
119 * remote.c (free_actions_list),
120 free_actions_list_cleanup_wrapper): Remove.
121 (remote_download_tracepoint): Adjust to std::vector.
123 2017-11-08 Tom Tromey <tom@tromey.com>
125 * dwarf2read.c (symbolp): Remove typedef.
126 (read_func_scope): Use std::vector.
127 (process_structure_scope): Use std::vector.
129 2017-11-08 Pedro Alves <palves@redhat.com>
131 * ada-lang.c (ada_make_symbol_completion_list): Use
132 completion_skip_symbol.
133 * symtab.c (symbol_is_function_or_method(minimal_symbol*)): New.
134 (symbol_is_function_or_method(symbol*)): New.
135 (add_symtab_completions): Add complete_symbol_mode parameter. Use
136 completion_skip_symbol.
137 (default_collect_symbol_completion_matches_break_on): Use
138 completion_skip_symbol. Pass down mode.
139 (collect_file_symbol_completion_matches): Pass down mode.
140 * symtab.h (symbol_is_function_or_method): New declarations.
141 (completion_skip_symbol): New template function.
143 2017-11-08 Pedro Alves <palves@redhat.com>
145 * linespec.c (iterate_over_all_matching_symtabs): Add
146 search_domain parameter. Pass it down to expand_symtabs_matching.
147 (decode_objc): Request FUNCTIONS_DOMAIN symbols only.
148 (lookup_prefix_sym): Adjust by passing ALL_DOMAIN as
150 (add_all_symbol_names_from_pspace): Add search_domain parameter.
152 (find_method, find_function_symbols): Request FUNCTIONS_DOMAIN
154 (add_matching_symbols_to_info): Add search_domain parameter. Pass
157 2017-11-08 Pedro Alves <palves@redhat.com>
159 * ada-lang.c (ada_make_symbol_completion_list): Remove text and
160 text_len locals and don't pass them down.
161 * symtab.c (completion_list_add_name): Remove
162 sym_text/sym_text_len parameters and adjust.
163 (completion_list_add_symbol, completion_list_add_msymbol)
164 (completion_list_objc_symbol, completion_list_add_fields)
165 (add_symtab_completions): Likewise.
166 (default_collect_symbol_completion_matches_break_on)
167 (collect_file_symbol_completion_matches): Remove sym_text_len
168 local and don't pass it down.
169 * symtab.h (completion_list_add_name): Remove
170 sym_text/sym_text_len parameters.
172 2017-11-08 Pedro Alves <palves@redhat.com>
174 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
175 unittests/lookup_name_info-selftests.c.
176 (SUBDIR_UNITTESTS_OBS): Add lookup_name_info-selftests.o.
177 * cp-support.c: Include "selftest.h".
178 (cp_remove_params_1): Rename from cp_remove_params. Add
179 'require_param' parameter, and handle it.
180 (cp_remove_params): Reimplement.
181 (cp_remove_params_if_any): New.
182 (selftests::quote): New.
183 (selftests::check_remove_params): New.
184 (selftests::test_cp_remove_params): New.
185 (_initialize_cp_support): Install
186 selftests::test_cp_remove_params.
187 * cp-support.h (cp_remove_params_if_any): Declare.
188 * dwarf2read.c :Include "selftest.h".
189 (dw2_expand_symtabs_matching_symbol): Use
190 lookup_name_info::make_ignore_params.
191 (selftests::dw2_expand_symtabs_matching::mock_mapped_index)
192 (selftests::dw2_expand_symtabs_matching::string_or_null)
193 (selftests::dw2_expand_symtabs_matching::check_match)
194 (selftests::dw2_expand_symtabs_matching::test_symbols)
195 (selftests::dw2_expand_symtabs_matching::run_test): New.
196 (_initialize_dwarf2_read): Register
197 selftests::dw2_expand_symtabs_matching::run_test.
198 * psymtab.c (psym_expand_symtabs_matching): Use
199 lookup_name_info::make_ignore_params.
200 * symtab.c (demangle_for_lookup_info::demangle_for_lookup_info):
201 If the lookup name wants to ignore parameters, strip them.
202 (compare_symbol_name): Remove sym_text/sym_text_len parameters and
204 (completion_list_add_name): Don't pass down sym_text/sym_text_len.
205 (default_collect_symbol_completion_matches_break_on): Don't try to
207 * symtab.h (lookup_name_info::lookup_name_info): Add
208 'ignore_parameters' parameter.
209 (lookup_name_info::ignore_parameters)
210 (lookup_name_info::make_ignore_params): New methods.
211 (lookup_name_info::m_ignore_parameters): New field.
212 * unittests/lookup_name_info-selftests.c: New file.
214 2017-11-08 Pedro Alves <palves@redhat.com>
216 * dwarf2read.c (dw2_expand_marked_cus)
217 (dw2_expand_symtabs_matching_symbol): Remove forward declarations.
218 (dw2_expand_symtabs_matching): Move further below.
219 (dw2_expand_marked_cus): Reindent.
221 2017-11-08 Pedro Alves <palves@redhat.com>
223 * dwarf2read.c (byte_swap, MAYBE_SWAP): Move higher up in file.
224 (struct name_component): New.
225 (mapped_index::name_components): New field.
226 (mapped_index::symbol_name_at): New method.
227 (dwarf2_read_index): Call mapped_index ctor.
228 (dw2_map_matching_symbols): Add comment about name_components
230 (dw2_expand_symtabs_matching): Factor part to...
231 (dw2_expand_symtabs_matching_symbol): ... this new function.
232 Build name components table, and lookup symbols in it before
233 calling the name matcher.
234 (dw2_expand_marked_cus): New, factored out from
235 dw2_expand_symtabs_matching.
236 (dwarf2_per_objfile_free): Call the mapped_index's dtor.
238 2017-11-08 Pedro Alves <palves@redhat.com>
240 * ada-lang.c (ada_encode): Rename to ..
241 (ada_encode_1): ... this. Add throw_errors parameter and handle
243 (ada_encode): Reimplement.
244 (match_name): Delete, folded into full_name.
245 (resolve_subexp): No longer pass the encoded name to
246 ada_lookup_symbol_list.
247 (should_use_wild_match): Delete.
248 (name_match_type_from_name): New.
249 (ada_lookup_simple_minsym): Use lookup_name_info and the
250 language's symbol_name_matcher_ftype.
251 (add_symbols_from_enclosing_procs, ada_add_local_symbols)
252 (ada_add_block_renamings): Adjust to use lookup_name_info.
253 (ada_lookup_name): New.
254 (add_nonlocal_symbols, ada_add_all_symbols)
255 (ada_lookup_symbol_list_worker, ada_lookup_symbol_list)
256 (ada_iterate_over_symbols): Adjust to use lookup_name_info.
257 (ada_name_for_lookup): Delete.
258 (ada_lookup_encoded_symbol): Construct a verbatim name.
259 (wild_match): Reverse sense of return type. Use bool.
260 (full_match): Reverse sense of return type. Inline bits of old
262 (ada_add_block_symbols): Adjust to use lookup_name_info.
263 (symbol_completion_match): Delete, folded into...
264 (ada_lookup_name_info::matches): ... .this new method.
265 (symbol_completion_add): Delete.
266 (ada_collect_symbol_completion_matches): Add name_match_type
267 parameter. Adjust to use lookup_name_info and
268 completion_list_add_name.
269 (get_var_value, ada_add_global_exceptions): Adjust to use
271 (ada_get_symbol_name_cmp): Delete.
272 (do_wild_match, do_full_match): New functions.
273 (ada_lookup_name_info::ada_lookup_name_info): New method.
274 (ada_symbol_name_matches, ada_get_symbol_name_matcher): New
276 (ada_language_defn): Install ada_get_symbol_name_matcher.
277 * ada-lex.l (processId): If name starts with '<', copy it
279 * block.c (block_iter_match_step, block_iter_match_first)
280 (block_iter_match_next, block_lookup_symbol)
281 (block_lookup_symbol_primary, block_find_symbol): Adjust to use
283 * block.h (block_iter_match_first, block_iter_match_next)
284 (ALL_BLOCK_SYMBOLS_WITH_NAME): Adjust to use lookup_name_info.
285 * c-lang.c (c_language_defn, cplus_language_defn)
286 (asm_language_defn, minimal_language_defn): Adjust comments to
287 refer to la_get_symbol_name_matcher.
288 * completer.c (complete_files_symbols)
289 (collect_explicit_location_matches, symbol_completer): Pass a
290 symbol_name_match_type down.
291 * completer.h (class completion_match, completion_match_result):
293 (completion_tracker::reset_completion_match_result): New method.
294 (completion_tracker::m_completion_match_result): New field.
295 * cp-support.c (make_symbol_overload_list_block): Adjust to use
297 (cp_fq_symbol_name_matches, cp_get_symbol_name_matcher): New
299 * cp-support.h (cp_get_symbol_name_matcher): New declaration.
300 * d-lang.c: Adjust comments to refer to
301 la_get_symbol_name_matcher.
302 * dictionary.c (dict_vector) <iter_match_first, iter_match_next>:
303 Adjust to use lookup_name_info.
304 (dict_iter_match_first, dict_iter_match_next)
305 (iter_match_first_hashed, iter_match_next_hashed)
306 (iter_match_first_linear, iter_match_next_linear): Adjust to work
307 with a lookup_name_info.
308 * dictionary.h (dict_iter_match_first, dict_iter_match_next):
310 * dwarf2read.c (dw2_lookup_symbol): Adjust to use lookup_name_info.
311 (dw2_map_matching_symbols): Adjust to use symbol_name_match_type.
312 (gdb_index_symbol_name_matcher): New class.
313 (dw2_expand_symtabs_matching) Adjust to use lookup_name_info and
314 gdb_index_symbol_name_matcher. Accept a NULL symbol_matcher.
315 * f-lang.c (f_collect_symbol_completion_matches): Adjust to work
316 with a symbol_name_match_type.
317 (f_language_defn): Adjust comments to refer to
318 la_get_symbol_name_matcher.
319 * go-lang.c (go_language_defn): Adjust comments to refer to
320 la_get_symbol_name_matcher.
321 * language.c (default_symbol_name_matcher)
322 (language_get_symbol_name_matcher): New functions.
323 (unknown_language_defn, auto_language_defn): Adjust comments to
324 refer to la_get_symbol_name_matcher.
325 * language.h (symbol_name_cmp_ftype): Delete.
326 (language_defn) <la_collect_symbol_completion_matches>: Add match
328 <la_get_symbol_name_cmp>: Delete field.
329 <la_get_symbol_name_matcher>: New field.
330 <la_iterate_over_symbols>: Adjust to use lookup_name_info.
331 (default_symbol_name_matcher, language_get_symbol_name_matcher):
333 * linespec.c (iterate_over_all_matching_symtabs)
334 (iterate_over_file_blocks): Adjust to use lookup_name_info.
335 (find_methods): Add language parameter, and use lookup_name_info
336 and the language's symbol_name_matcher_ftype.
337 (linespec_complete_function): Adjust.
338 (lookup_prefix_sym): Use lookup_name_info.
339 (add_all_symbol_names_from_pspace): Adjust.
340 (find_superclass_methods): Add language parameter and pass it
342 (find_method): Pass symbol language down.
343 (find_linespec_symbols): Don't demangle or Ada encode here.
344 (search_minsyms_for_name): Add lookup_name_info parameter.
345 (add_matching_symbols_to_info): Add name_match_type parameter.
346 Use lookup_name_info.
347 * m2-lang.c (m2_language_defn): Adjust comments to refer to
348 la_get_symbol_name_matcher.
349 * minsyms.c: Include <algorithm>.
350 (add_minsym_to_demangled_hash_table): Remove table parameter and
351 add objfile parameter. Use search_name_hash, and add language to
352 demangled languages vector.
353 (struct found_minimal_symbols): New struct.
354 (lookup_minimal_symbol_mangled, lookup_minimal_symbol_demangled):
356 (lookup_minimal_symbol): Adjust to use them. Don't canonicalize
357 input names here. Use lookup_name_info instead. Lookup up
358 demangled names once for each language in the demangled names
360 (iterate_over_minimal_symbols): Use lookup_name_info. Lookup up
361 demangled names once for each language in the demangled names
363 (build_minimal_symbol_hash_tables): Adjust.
364 * minsyms.h (iterate_over_minimal_symbols): Adjust to pass down a
366 * objc-lang.c (objc_language_defn): Adjust comment to refer to
367 la_get_symbol_name_matcher.
368 * objfiles.h: Include <vector>.
369 (objfile_per_bfd_storage) <demangled_hash_languages>: New field.
370 * opencl-lang.c (opencl_language_defn): Adjust comment to refer to
371 la_get_symbol_name_matcher.
372 * p-lang.c (pascal_language_defn): Adjust comment to refer to
373 la_get_symbol_name_matcher.
374 * psymtab.c (psym_lookup_symbol): Use lookup_name_info.
375 (match_partial_symbol): Use symbol_name_match_type,
376 lookup_name_info and psymbol_name_matches.
377 (lookup_partial_symbol): Use lookup_name_info.
378 (map_block): Use symbol_name_match_type and lookup_name_info.
379 (psym_map_matching_symbols): Use symbol_name_match_type.
380 (psymbol_name_matches): New.
381 (recursively_search_psymtabs): Use lookup_name_info and
382 psymbol_name_matches. Rename 'kind' parameter to 'domain'.
383 (psym_expand_symtabs_matching): Use lookup_name_info. Rename
384 'kind' parameter to 'domain'.
385 * rust-lang.c (rust_language_defn): Adjust comment to refer to
386 la_get_symbol_name_matcher.
387 * symfile-debug.c (debug_qf_map_matching_symbols)
388 (debug_qf_map_matching_symbols): Use symbol_name_match_type.
389 (debug_qf_expand_symtabs_matching): Use lookup_name_info.
390 * symfile.c (expand_symtabs_matching): Use lookup_name_info.
391 * symfile.h (quick_symbol_functions) <map_matching_symbols>:
392 Adjust to use symbol_name_match_type.
393 <expand_symtabs_matching>: Adjust to use lookup_name_info.
394 (expand_symtabs_matching): Adjust to use lookup_name_info.
395 * symmisc.c (maintenance_expand_symtabs): Use
396 lookup_name_info::match_any ().
397 * symtab.c (symbol_matches_search_name): New.
398 (eq_symbol_entry): Adjust to use lookup_name_info and the
400 (demangle_for_lookup_info::demangle_for_lookup_info): New.
401 (lookup_name_info::match_any): New.
402 (iterate_over_symbols, search_symbols): Use lookup_name_info.
403 (compare_symbol_name): Add language, lookup_name_info and
404 completion_match_result parameters, and use them.
405 (completion_list_add_name): Make extern. Add language and
406 lookup_name_info parameters. Use them.
407 (completion_list_add_symbol, completion_list_add_msymbol)
408 (completion_list_objc_symbol): Add lookup_name_info parameters and
409 adjust. Pass down language.
410 (completion_list_add_fields): Add lookup_name_info parameters and
411 adjust. Pass down language.
412 (add_symtab_completions): Add lookup_name_info parameters and
414 (default_collect_symbol_completion_matches_break_on): Add
415 name_match_type parameter, and use it. Use lookup_name_info.
416 (default_collect_symbol_completion_matches)
417 (collect_symbol_completion_matches): Add name_match_type
418 parameter, and pass it down.
419 (collect_symbol_completion_matches_type): Adjust.
420 (collect_file_symbol_completion_matches): Add name_match_type
421 parameter, and use lookup_name_info.
422 * symtab.h: Include <string> and "common/gdb_optional.h".
423 (enum class symbol_name_match_type): New.
424 (class ada_lookup_name_info): New.
425 (struct demangle_for_lookup_info): New.
426 (class lookup_name_info): New.
427 (symbol_name_matcher_ftype): New.
428 (SYMBOL_MATCHES_SEARCH_NAME): Use symbol_matches_search_name.
429 (symbol_matches_search_name): Declare.
430 (MSYMBOL_MATCHES_SEARCH_NAME): Delete.
431 (default_collect_symbol_completion_matches)
432 (collect_symbol_completion_matches)
433 (collect_file_symbol_completion_matches): Add name_match_type
435 (iterate_over_symbols): Use lookup_name_info.
436 (completion_list_add_name): Declare.
437 * utils.c (enum class strncmp_iw_mode): Moved to utils.h.
438 (strncmp_iw_with_mode): Now extern.
439 * utils.h (enum class strncmp_iw_mode): Moved from utils.c.
440 (strncmp_iw_with_mode): Declare.
442 2017-11-08 Keith Seitz <keiths@redhat.com>
443 Pedro Alves <palves@redhat.com>
445 * ada-lang.c (ada_language_defn): Install
446 default_search_name_hash.
447 * buildsym.c (struct buildsym_compunit): <language>: New field.
448 (finish_block_internal): Pass language when creating dictionaries.
449 (start_buildsym_compunit, start_symtab): New language parameters.
451 (restart_symtab): Pass down compilation unit's language.
452 * buildsym.h (enum language): Forward declare.
453 (start_symtab): New 'language' parameter.
454 * c-lang.c (c_language_defn, cplus_language_defn)
455 (asm_language_defn, minimal_language_defn): Install
456 default_search_name_hash.
457 * coffread.c (coff_start_symtab): Adjust.
458 * d-lang.c (d_language_defn): Install default_search_name_hash.
459 * dbxread.c (struct symloc): Add 'pst_language' field.
460 (PST_LANGUAGE): Define.
461 (start_psymtab, read_ofile_symtab): Use it.
462 (process_one_symbol): New 'language' parameter. Pass it down.
463 * dictionary.c (struct dictionary) <language>: New field.
464 (DICT_LANGUAGE): Define.
465 (dict_create_hashed, dict_create_hashed_expandable)
466 (dict_create_linear, dict_create_linear_expandable): New parameter
467 'language'. Set the dictionary's language.
468 (iter_match_first_hashed): Adjust to rename.
469 (insert_symbol_hashed): Assert we don't see mismatching
470 languages. Adjust to rename.
471 (dict_hash): Rename to ...
472 (default_search_name_hash): ... this and make extern.
473 * dictionary.h (struct language_defn): Forward declare.
474 (dict_create_hashed): New parameter 'language'.
475 * dwarf2read.c (dwarf2_start_symtab): Pass down language.
476 * f-lang.c (f_language_defn): Install default_search_name_hash.
477 * go-lang.c (go_language_defn): Install default_search_name_hash.
478 * jit.c (finalize_symtab): Pass compunit's language to dictionary
480 * language.c (unknown_language_defn, auto_language_defn):
481 * language.h (language_defn::la_search_name_hash): New field.
482 (default_search_name_hash): Declare.
483 * m2-lang.c (m2_language_defn): Install default_search_name_hash.
484 * mdebugread.c (new_block): New parameter 'language'.
485 * mdebugread.c (parse_symbol): Pass symbol language to block
487 (psymtab_to_symtab_1): Pass down language.
488 (new_symtab): Pass compunit's language to block allocation.
489 * objc-lang.c (objc_language_defn): Install
490 default_search_name_hash.
491 * opencl-lang.c (opencl_language_defn):
492 * p-lang.c (pascal_language_defn): Install
493 default_search_name_hash.
494 * rust-lang.c (rust_language_defn): Install
495 default_search_name_hash.
496 * stabsread.h (enum language): Forward declare.
497 (process_one_symbol): Add 'language' parameter.
498 * symtab.c (search_name_hash): New function.
499 * symtab.h (search_name_hash): Declare.
500 * xcoffread.c (read_xcoff_symtab): Pass language to start_symtab.
502 2017-11-08 Pedro Alves <palves@redhat.com>
504 * cp-name-parser.y (main): Don't initialize extra_chars.
506 2017-11-07 Tom Tromey <tom@tromey.com>
508 * event-top.h (command_handler): Constify.
509 * record-full.c (cmd_record_full_start): Update.
510 * thread.c (thread_apply_all_command): Update.
511 * printcmd.c (eval_command): Update.
512 * mi/mi-main.c (mi_execute_cli_command): Update.
513 (mi_execute_async_cli_command): Update.
514 * tui/tui-stack.c (tui_update_command): Update.
515 * cli/cli-interp.c (safe_execute_command): Constify.
516 * record.c (record_start): Update.
517 (record_start, record_stop, cmd_record_start): Update.
518 * record-btrace.c (cmd_record_btrace_bts_start): Update.
519 (cmd_record_btrace_pt_start): Update.
520 (cmd_record_btrace_start): Update.
521 (cmd_record_btrace_start): Update.
522 * reverse.c (exec_reverse_once): Update.
523 * python/python.c (execute_gdb_command): Don't copy the command.
524 * event-top.c (command_line_handler): Update.
525 (command_handler): Constify.
526 * defs.h (deprecated_call_command_hook): Constify.
527 * cli/cli-script.h (execute_user_command): Constify.
528 * cli/cli-script.c (execute_user_command): Constify.
529 (execute_cmd_pre_hook, execute_cmd_post_hook): Constify.
530 (enum command_control_type): Update.
531 * main.c (catch_command_errors): Remove non-const overload.
532 (catch_command_errors_ftype): Remove.
533 * python/py-cmd.c (cmdpy_function): Constify.
534 * guile/scm-cmd.c (cmdscm_function): Constify.
535 * cli/cli-dump.c (call_dump_func): Constify.
536 * cli/cli-decode.c (do_const_cfunc): Constify.
537 (do_sfunc): Constify.
538 (cmd_func): Constify.
539 * gdbcmd.h (execute_command, execute_command_to_string): Constify.
540 * top.h (execute_command): Constify.
541 * top.c (execute_command): Constify.
542 (execute_command_to_string): Constify.
543 (deprecated_call_command_hook): Constify.
544 * command.h (cmd_func): Constify.
545 * cli/cli-decode.h (struct cmd_list_element) <func>: Constify.
547 2017-11-07 Tom Tromey <tom@tromey.com>
549 * ada-lang.c (catch_ada_exception_command): Constify.
550 (catch_assert_command): Constify.
551 * break-catch-throw.c (catch_catch_command, catch_throw_command)
552 (catch_rethrow_command): Constify.
553 (catch_exception_command_1): Constify.
554 * breakpoint.h (add_catch_command): Constify.
555 * break-catch-syscall.c (catch_syscall_command_1): Constify.
556 (catch_syscall_split_args): Constify.
557 * break-catch-sig.c (catch_signal_command): Constify.
558 (catch_signal_split_args): Constify.
559 * cli/cli-decode.h (struct cmd_list_element) <function>: Use
560 cmd_const_sfunc_ftype.
561 * cli/cli-decode.c (add_setshow_cmd_full): Constify.
562 (add_setshow_enum_cmd, add_setshow_auto_boolean_cmd)
563 (add_setshow_boolean_cmd, add_setshow_filename_cmd)
564 (add_setshow_string_cmd, struct cmd_list_element)
565 (add_setshow_optional_filename_cmd, add_setshow_integer_cmd)
566 (add_setshow_uinteger_cmd, add_setshow_zinteger_cmd)
567 (add_setshow_zuinteger_unlimited_cmd, add_setshow_zuinteger_cmd):
569 (set_cmd_sfunc): Constify.
570 (empty_sfunc): Constify.
571 * command.h (add_setshow_enum_cmd, add_setshow_auto_boolean_cmd)
572 (add_setshow_boolean_cmd, add_setshow_filename_cmd)
573 (add_setshow_string_cmd, add_setshow_string_noescape_cmd)
574 (add_setshow_optional_filename_cmd, add_setshow_integer_cmd)
575 (add_setshow_uinteger_cmd, add_setshow_zinteger_cmd)
576 (add_setshow_zuinteger_cmd, add_setshow_zuinteger_unlimited_cmd):
578 (set_cmd_sfunc): Constify.
579 (cmd_sfunc_ftype): Remove.
580 * compile/compile.c (set_compile_args): Constify.
581 * infrun.c (set_disable_randomization): Constify.
582 * infcmd.c (set_args_command, set_cwd_command): Constify.
583 * breakpoint.c (set_condition_evaluation_mode): Constify.
584 (add_catch_command): Constify.
585 (catch_fork_command_1, catch_exec_command_1)
586 (catch_load_command_1, catch_unload_command_1): Constify.
587 (catch_load_or_unload): Constify.
588 * guile/scm-param.c (pascm_set_func): Constify.
589 (add_setshow_generic): Constify.
590 * python/py-param.c (get_set_value): Constify.
591 * top.h (set_verbose): Constify.
592 * tui/tui-win.c (tui_set_var_cmd): Constify.
593 * mi/mi-main.c (set_mi_async_command): Constify.
594 * cli/cli-logging.c (set_logging_overwrite)
595 (set_logging_redirect): Constify.
596 * value.c (set_max_value_size): Constify.
597 * valprint.c (set_input_radix, set_output_radix): Constify.
598 * utils.c (set_width_command, set_height_command): Constify.
599 * typeprint.c (set_print_type_methods, set_print_type_typedefs): Constify.
600 * tracepoint.c (set_disconnected_tracing)
601 (set_circular_trace_buffer, set_trace_buffer_size)
602 (set_trace_user, set_trace_notes, set_trace_stop_notes): Constify.
603 * top.c (set_history_size_command, set_verbose, set_editing)
604 (set_gdb_datadir, set_history_filename): Constify.
605 * target.c (set_targetdebug, maint_set_target_async_command)
606 (maint_set_target_non_stop_command, set_target_permissions)
607 (set_write_memory_permission): Constify.
608 (open_target): Constify.
609 * target-descriptions.c (set_tdesc_filename_cmd): Constify.
610 * target-dcache.c (set_stack_cache, set_code_cache): Constify.
611 * symtab.c (set_symbol_cache_size_handler): Constify.
612 * symfile.c (set_ext_lang_command): Constify.
613 * symfile-debug.c (set_debug_symfile): Constify.
614 * source.c (set_directories_command): Constify.
615 * solib.c (reload_shared_libraries, gdb_sysroot_changed): Constify.
616 * serial.c (set_parity): Constify.
617 * rs6000-tdep.c (powerpc_set_soft_float, powerpc_set_vector_abi): Constify.
618 * remote.c (set_remote_exec_file, set_remotebreak)
619 (set_remote_protocol_Z_packet_cmd, set_range_stepping): Constify.
620 * record.c (set_record_insn_history_size)
621 (set_record_call_history_size): Constify.
622 * record-full.c (set_record_full_insn_max_num): Constify.
623 * proc-api.c (set_procfs_trace_cmd, set_procfs_file_cmd): Constify.
624 * osabi.c (set_osabi): Constify.
625 * mips-tdep.c (set_mips64_transfers_32bit_regs)
626 (reinit_frame_cache_sfunc, mips_abi_update): Constify.
627 * maint.c (maintenance_set_profile_cmd): Constify.
628 * linux-thread-db.c (set_libthread_db_search_path): Constify.
629 * language.c (set_language_command, set_range_command)
630 (set_case_command): Constify.
631 * infrun.c (set_non_stop, set_observer_mode)
632 (set_stop_on_solib_events, set_schedlock_func)
633 (set_exec_direction_func): Constify.
634 * infcmd.c (set_inferior_tty_command): Constify.
635 * disasm.c (set_disassembler_options_sfunc): Constify.
636 * demangle.c (set_demangling_command): Constify.
637 * dcache.c (set_dcache_size, set_dcache_line_size): Constify.
638 * cris-tdep.c (set_cris_version, set_cris_mode)
639 (set_cris_dwarf2_cfi): Constify.
640 * corefile.c (set_gnutarget_command): Constify.
641 * charset.c (set_host_charset_sfunc, set_target_charset_sfunc)
642 (set_target_wide_charset_sfunc): Constify.
643 * breakpoint.c (update_dprintf_commands): Constify.
644 * auto-load.c (set_auto_load_dir, set_auto_load_safe_path): Constify.
645 * arm-tdep.c (set_fp_model_sfunc, arm_set_abi)
646 (set_disassembly_style_sfunc): Constify.
647 * arch-utils.c (set_endian, set_architecture): Constify.
648 * alpha-tdep.c (reinit_frame_cache_sfunc): Constify.
649 * agent.c (set_can_use_agent): Constify.
651 2017-11-07 Tom Tromey <tom@tromey.com>
653 * go32-nat.c (go32_sysinfo, go32_sldt, go32_sgdt, go32_sidt)
654 (go32_pde, go32_pte, go32_pte_for_address): Constify.
655 * gnu-nat.c (_parse_bool_arg, show_thread_default_pause_cmd)
656 (set_thread_default_pause_cmd, set_thread_default_run_cmd)
657 (show_thread_default_run_cmd, set_thread_default_detach_sc_cmd)
658 (parse_int_arg, show_thread_default_detach_sc_cmd)
659 (set_signals_cmd, show_signals_cmd, set_sig_thread_cmd)
660 (show_sig_thread_cmd, set_stopped_cmd, show_stopped_cmd)
661 (set_exceptions_cmd, show_exceptions_cmd, set_task_pause_cmd)
662 (show_task_pause_cmd, set_task_detach_sc_cmd)
663 (show_task_detach_sc_cmd, set_task_exc_port_cmd)
664 (set_noninvasive_cmd, set_thread_pause_cmd)
665 (show_thread_pause_cmd, set_thread_run_cmd, show_thread_run_cmd)
666 (set_thread_detach_sc_cmd, show_thread_detach_sc_cmd)
667 (set_thread_exc_port_cmd, thread_takeover_sc_cmd): Constify.
668 * windows-nat.c (display_selectors): Constify.
669 * cli/cli-decode.h (struct cmd_list_element) <function>: Remove
671 * cli/cli-decode.c (set_cmd_cfunc): Remove non-const overload.
672 (cmd_cfunc_eq): Likewise.
673 (struct cmd_list_element): Likewise.
675 (cli_user_command_p): Update.
676 * command.h (add_cmd): Remove non-const overload.
677 (cmd_cfunc_ftype): Remove typedef.
678 (cmd_cfunc_eq): Remove non-const overload.
679 * value.c (show_values): Constify.
680 * thread.c (thread_apply_all_command): Constify.
681 * symfile.c (load_command): Constify.
682 * source.c (directory_command): Constify.
683 * maint.c (maintenance_internal_error)
684 (maintenance_demangler_warning, maintenance_space_display)
685 (maintenance_print_architecture, maintenance_translate_address)
686 (maintenance_info_selftests, maintenance_internal_warning):
688 * breakpoint.c (disable_trace_command, enable_trace_command):
690 * auto-load.c (info_auto_load_local_gdbinit, add_auto_load_dir):
692 (add_auto_load_safe_path): Constify.
693 * guile/scm-auto-load.c (info_auto_load_guile_scripts): Constify.
694 * top.h (show_commands): Constify.
695 * linux-thread-db.c (info_auto_load_libthread_db): Constify.
696 * sparc64-tdep.c (adi_examine_command): Constify.
697 (adi_assign_command): Constify.
699 2017-11-07 Tom Tromey <tom@tromey.com>
701 * frame.h (info_locals_command, info_args_command): Constify.
702 * auto-load.h (auto_load_info_scripts): Constify.
703 * inferior.h (registers_info): Constify.
704 * copying.c: Rebuild.
705 * copying.awk: Constify generated commands.
706 * auto-load.c (auto_load_info_scripts)
707 (info_auto_load_gdb_scripts): Constify.
708 * cli/cli-decode.c (struct cmd_list_element): Take a
709 cmd_const_cfunc_ftype.
710 * command.h (add_info): Take a cmd_const_cfunc_ftype.
711 * tui/tui-win.c (tui_all_windows_info): Constify.
712 * python/py-auto-load.c (info_auto_load_python_scripts):
714 * cli/cli-cmds.c (show_command): Remove non-const overload.
715 * tracepoint.c (info_tvariables_command, info_scope_command):
717 (info_static_tracepoint_markers_command): Constify.
718 * thread.c (info_threads_command): Constify.
719 (print_thread_info_1): Constify.
720 * target.c (info_target_command): Constify.
721 * symtab.c (info_sources_command, info_functions_command)
722 (info_types_command): Constify.
723 (info_variables_command): Remove non-const overload.
724 * symfile.c (info_ext_lang_command): Constify.
725 * stack.c (info_frame_command, info_locals_command)
726 (info_args_command): Constify.
727 (backtrace_command): Remove non-const overload.
728 * source.c (info_source_command, info_line_command): Constify.
729 * solib.c (info_sharedlibrary_command): Constify.
730 * skip.c (info_skip_command): Constify.
731 * ser-go32.c (info_serial_command): Constify.
732 * reverse.c (info_bookmarks_command): Constify.
733 * printcmd.c (info_symbol_command, info_address_command)
734 (info_display_command): Constify.
735 * osdata.c (info_osdata_command): Constify.
736 * objc-lang.c (info_selectors_command, info_classes_command):
738 * nto-procfs.c (procfs_pidlist, procfs_meminfo): Constify.
739 * memattr.c (info_mem_command): Constify.
740 * macrocmd.c (info_macro_command, info_macros_command): Constify.
741 * linux-fork.c (info_checkpoints_command): Constify.
742 * infrun.c (info_signals_command): Constify.
743 * inflow.c (info_terminal_command): Constify.
744 * inferior.c (info_inferiors_command): Constify.
745 (print_inferior): Constify.
746 * infcmd.c (info_program_command, info_all_registers_command)
747 (info_registers_command, info_vector_command)
748 (info_float_command): Constify.
749 (registers_info): Constify.
750 * gnu-nat.c (info_send_rights_cmd, info_recv_rights_cmd)
751 (info_port_sets_cmd, info_dead_names_cmd, info_port_rights_cmd):
753 * f-valprint.c (info_common_command): Constify.
754 * dcache.c (info_dcache_command): Constify.
755 (dcache_info_1): Constify.
756 * darwin-nat-info.c (info_mach_tasks_command)
757 (info_mach_task_command, info_mach_ports_command)
758 (info_mach_port_command, info_mach_threads_command)
759 (info_mach_thread_command, info_mach_regions_command)
760 (info_mach_regions_recurse_command, info_mach_region_command)
761 (info_mach_exceptions_command): Constify.
762 (get_task_from_args): Constify.
763 * cp-support.c (info_vtbl_command): Constify.
764 * breakpoint.c (info_watchpoints_command)
765 (info_tracepoints_command): Constify.
766 (info_breakpoints_command): Remove non-const overload.
767 * avr-tdep.c (avr_io_reg_read_command): Constify.
768 * auxv.c (info_auxv_command): Constify.
769 * ada-tasks.c (info_tasks_command): Constify.
770 (info_task): Constify.
771 * ada-lang.c (info_exceptions_command): Constify.
773 2017-11-07 Tom Tromey <tom@tromey.com>
775 * solib.h (no_shared_libraries): Constify.
776 * frame.h (return_command): Constify.
777 * cli/cli-cmds.h (quit_command): Constify.
778 * top.h (quit_command, execute_command): Constify.
779 * target.h (flash_erase_command): Constify.
780 * inferior.h (set_inferior_args, attach_command): Constify.
781 * tracepoint.h (start_tracing, stop_tracing): Constify.
782 * breakpoint.h (break_command, tbreak_command)
783 (hbreak_command_wrapper, thbreak_command_wrapper)
784 (rbreak_command_wrapper, watch_command_wrapper)
785 (awatch_command_wrapper, rwatch_command_wrapper)
786 (get_tracepoint_by_number): Constify.
787 * symtab.c (info_variables_command, rbreak_command)
788 (symtab_symbol_info): Constify.
789 (info_variables_command): Add non-const overload.
790 * top.c (dont_repeat_command): Constify.
791 * breakpoint.c (ignore_command, commands_command)
792 (condition_command, tbreak_command, hbreak_command)
793 (thbreak_command, clear_command, break_command)
794 (info_breakpoints_command, watch_command, rwatch_command)
795 (awatch_command, trace_command, ftrace_command, strace_command)
796 (trace_pass_command, break_range_command, dprintf_command)
797 (agent_printf_command, get_tracepoint_by_number)
798 (watch_maybe_just_location, trace_pass_command): Constify.
799 (info_breakpoints_command): Add non-const overload.
800 * tracefile.c (tsave_command): Constify.
801 * infcmd.c (attach_command, disconnect_command, signal_command)
802 (queue_signal_command, stepi_command, nexti_command)
803 (finish_command, next_command, step_command, until_command)
804 (advance_command, jump_command, continue_command, run_command)
805 (start_command, starti_command, interrupt_command)
806 (run_command_1, set_inferior_args, step_1): Constify.
807 * inferior.c (add_inferior_command, remove_inferior_command)
808 (clone_inferior_command): Constify.
809 * linux-fork.c (checkpoint_command, restart_command): Constify.
810 * windows-nat.c (signal_event_command): Constify.
811 * guile/guile.c (guile_repl_command, guile_command): Constify.
812 * printcmd.c (x_command, display_command, printf_command)
813 (output_command, set_command, call_command, print_command)
814 (eval_command): Constify.
815 (non_const_set_command): Remove.
816 (_initialize_printcmd): Update.
817 * source.c (forward_search_command, reverse_search_command):
819 * jit.c (jit_reader_load_command, jit_reader_unload_command):
821 * infrun.c (handle_command): Constify.
822 * memattr.c (mem_command): Constify.
823 * stack.c (return_command, up_command, up_silently_command)
824 (down_command, down_silently_command, frame_command)
825 (backtrace_command, func_command, backtrace_command_1): Constify.
826 (backtrace_command): Add non-const overload.
827 * remote-sim.c (simulator_command): Constify.
828 * exec.c (set_section_command): Constify.
829 * tracepoint.c (tdump_command, trace_variable_command)
830 (tstatus_command, tstop_command, tstart_command)
831 (end_actions_pseudocommand, while_stepping_pseudocommand)
832 (collect_pseudocommand, teval_pseudocommand, actions_command)
833 (start_tracing, stop_tracing): Constify.
834 * value.c (init_if_undefined_command): Constify.
835 * tui/tui-stack.c (tui_update_command): Constify.
836 * tui/tui-win.c (tui_refresh_all_command)
837 (tui_set_tab_width_command, tui_set_win_height_command)
838 (tui_set_focus_command, tui_scroll_forward_command)
839 (tui_scroll_backward_command, tui_scroll_left_command)
840 (tui_scroll_right_command, parse_scrolling_args, tui_set_focus)
841 (tui_set_win_height): Constify.
842 * tui/tui-layout.c (tui_layout_command): Constify.
843 * procfs.c (proc_trace_syscalls, proc_trace_sysentry_cmd)
844 (proc_trace_sysexit_cmd, proc_untrace_sysentry_cmd)
845 (proc_untrace_sysexit_cmd): Constify.
846 * remote.c (threadlist_test_cmd, threadinfo_test_cmd)
847 (threadset_test_cmd, threadlist_update_test_cmd)
848 (threadalive_test): Constify.
849 * objc-lang.c (print_object_command): Constify.
850 * command.h (add_com): Constify.
851 * cli/cli-dump.c (restore_command): Constify.
852 * cli/cli-cmds.c (pwd_command, echo_command, quit_command)
853 (help_command, complete_command, shell_command, edit_command)
854 (list_command, disassemble_command, make_command)
855 (apropos_command, alias_command): Constify.
856 * cli/cli-script.c (document_command, define_command)
857 (while_command, if_command, validate_comname): Constify.
858 * cli/cli-decode.c (struct cmd_list_element): Change type of
860 * target.c (do_monitor_command, flash_erase_command): Constify.
861 * regcache.c (reg_flush_command): Constify.
862 * reverse.c (reverse_step, reverse_next, reverse_stepi)
863 (reverse_nexti, reverse_continue, reverse_finish)
864 (save_bookmark_command, goto_bookmark_command)
865 (exec_reverse_once): Constify.
866 * python/python.c (python_interactive_command, python_command):
868 * typeprint.c (ptype_command, whatis_command, whatis_exp):
870 * solib.c (sharedlibrary_command, no_shared_libraries): Constify.
871 * gcore.c (gcore_command): Constify.
873 2017-11-07 Tom Tromey <tom@tromey.com>
875 * printcmd.c (x_command): Call set_repeat_arguments.
876 * cli/cli-cmds.c (list_command): Call set_repeat_arguments.
877 * top.c (repeat_arguments): New global.
878 (set_repeat_arguments): New function.
879 (execute_command): Handle repeat_arguments.
880 (show_commands): Calls set_repeat_arguments.
881 * command.h (set_repeat_arguments): Declare.
883 2017-11-07 Tom Tromey <tom@tromey.com>
885 * stack.c (backtrace_command): Use std::string.
886 (backtrace_command_1): Make "count_exp" const.
888 2017-11-07 Tom Tromey <tom@tromey.com>
890 * source.c (directory_switch, mod_path, add_path): Constify.
891 * defs.h (add_path, mod_path, directory_switch): Constify.
892 * mi/mi-cmd-env.c (env_mod_path): Constify.
894 2017-11-07 Tom Tromey <tom@tromey.com>
896 * infcmd.c (strip_bg_char): Return gdb::unique_xmalloc_ptr.
897 (run_command_1, continue_command, step_1, jump_command)
898 (signal_command, until_command, advance_command, finish_command)
899 (attach_command): Update.
901 2017-11-07 Tom Tromey <tom@tromey.com>
903 * command.h (set_cmd_cfunc): Don't declare.
904 * cli/cli-decode.c (set_cmd_cfunc): Now static.
906 2017-11-07 Tom Tromey <tom@tromey.com>
908 * stack.c (select_frame_command): Constify.
909 * cli/cli-decode.c (add_com_suppress_notification): Constify.
910 * command.h (add_com_suppress_notification): Constify.
912 2017-11-07 Tom Tromey <tom@tromey.com>
914 * breakpoint.c (stop_command): Constify.
915 * cli/cli-decode.c (struct cmd_list_element): Constify.
916 * command.h (add_abbrev_prefix_cmd): Constify.
918 2017-11-07 Pedro Alves <palves@redhat.com>
920 * breakpoint.c (extract_bp_kind): New enum.
921 (extract_bp_num, extract_bp_or_bp_range): New functions, partially
922 factored out from ...
923 (extract_bp_number_and_location): ... here.
924 * cli/cli-utils.c (get_number_trailer): Handle '-$variable'.
926 2017-11-07 Pedro Alves <palves@redhat.com>
928 * breakpoint.c (extract_bp_number_and_location): Change return
929 type to void. Throw error instead of warning.
930 (enable_disable_command): Adjust.
932 2017-11-07 Xavier Roirand <roirand@adacore.com>
933 Pedro Alves <palves@redhat.com>
935 * breakpoint.c (map_breakpoint_number_range): New, factored out
937 (map_breakpoint_numbers): ... here.
938 (find_location_by_number): Change parameters from string to
939 breakpoint number and location.
940 (extract_bp_number_and_location): New function.
941 (enable_disable_bp_num_loc)
942 (enable_disable_breakpoint_location_range)
943 (enable_disable_command): New functions, factored out ...
944 (enable_command, disable_command): ... these functions, and
945 adjusted to support ranges.
946 * NEWS: Document enable/disable breakpoint location range feature.
948 2017-11-06 Luis Machado <luis.machado@linaro.org>
950 * MAINTAINERS (Write After Approval): Update my e-mail address.
952 2017-11-06 Pedro Alves <palves@redhat.com>
954 * gnu-nat.c (gnu_terminal_init): Delete.
955 (gnu_target): Don't install gnu_terminal_init.
956 * inflow.c (child_terminal_init_with_pgrp): Delete, merged with ...
957 (child_terminal_init): ... this function.
959 2017-11-06 Pedro Alves <palves@redhat.com>
961 * common/common.m4 (GDB_AC_COMMON): No longer check termio.h nor
963 * config.in, configure: Regenerate.
965 2017-11-06 Pedro Alves <palves@redhat.com>
967 * event-top.c: Check SIGTSTP instead of STOP_SIGNAL thoughout.
968 (async_init_signals): Adjust.
969 (handle_stop_sig): Rename to ...
970 (handle_sigtstp): ... this.
971 (async_stop_sig): Rename to ...
972 (async_sigtstp_handler): ... this, and delete STOP_SIGNAL !=
974 * event-top.h: Move signal.h include to the top. Check SIGTSTP
975 instead of STOP_SIGNAL thoughout.
976 (handle_stop_sig): Rename to ...
977 (handle_sigtstp): ... this.
978 * top.c (command_line_input): Replace STOP_SIGNAL -> SIGTSTP.
980 2017-11-06 Pedro Alves <palves@redhat.com>
982 * inflow.c (child_terminal_inferior, child_terminal_ours_1): No
983 longer set flags twice in row.
985 2017-11-06 Pedro Alves <palves@redhat.com>
987 * Makefile.in (SER_HARDWIRE): Update comment.
988 (HFILES_NO_SRCDIR): Remove gdb_termios.h.
989 * common/gdb_termios.h: Delete file.
990 * common/job-control.c: Include termios.h and unistd.h instead of
992 (gdb_setpgid): Remove HAVE_TERMIOS || TIOCGPGRP preprocessor
994 (have_job_control): Check HAVE_TERMIOS_H instead of HAVE_TERMIOS.
996 * configure.ac: No longer check for termio.h and sgtty.h.
997 * configure: Regenerate.
998 * inflow.c: Include termios.h instead of gdb_termios.h. Replace
999 PROCESS_GROUP_TYPE checks with HAVE_TERMIOS_H checks throughout.
1000 Replace PROCESS_GROUP_TYPE references with pid_t references
1002 (gdb_getpgrp): Delete.
1003 (set_initial_gdb_ttystate): Use tcgetpgrp instead of gdb_getpgrp.
1004 (child_terminal_inferior): Remove comment. Remove sgtty code.
1005 (child_terminal_ours_1): Use tcgetpgrp directly instead of
1006 gdb_getpgrp. Use serial_set_tty_state instead aof
1007 serial_noflush_set_tty_state. Remove sgtty code.
1008 * inflow.h: Include unistd.h instead of gdb_termios.h. Replace
1009 PROCESS_GROUP_TYPE check with HAVE_TERMIOS_H check.
1010 (inferior_process_group): Now returns pid_t.
1011 * ser-base.c (ser_base_noflush_set_tty_state): Delete.
1012 * ser-base.h (ser_base_noflush_set_tty_state): Delete.
1013 * ser-event.c (serial_event_ops): Update.
1014 * ser-go32.c (dos_noflush_set_tty_state): Delete.
1016 * ser-mingw.c (hardwire_ops, tty_ops, pipe_ops, tcp_ops): Update.
1017 * ser-pipe.c (pipe_ops): Update.
1018 * ser-tcp.c (tcp_ops): Update.
1019 * ser-unix.c: Include termios.h instead of gdb_termios.h. Remove
1020 HAVE_TERMIOS checks.
1021 [HAVE_TERMIO] (struct hardwire_ttystate): Delete.
1022 [HAVE_SGTTY] (struct hardwire_ttystate): Delete.
1023 (get_tty_state, set_tty_state): Drop termio and sgtty code, and
1025 (hardwire_noflush_set_tty_state): Delete.
1026 (hardwire_print_tty_state, hardwire_drain_output)
1027 (hardwire_flush_output, hardwire_flush_input)
1028 (hardwire_send_break, hardwire_raw, hardwire_setbaudrate)
1029 (hardwire_setstopbits, hardwire_setparity): Drop termio and sgtty
1030 code, and assume termios.
1031 (hardwire_ops): Update.
1032 (_initialize_ser_hardwire): Remove HAVE_TERMIOS check.
1033 * serial.c (serial_noflush_set_tty_state): Delete.
1034 * serial.h (serial_noflush_set_tty_state): Delete.
1035 (serial_ops::noflush_set_tty_state): Delete.
1037 2017-11-06 Ulrich Weigand <uweigand@de.ibm.com>
1039 * Makefile.in (SFILES): Remove doublest.c and dfp.c.
1040 (HFILES_NO_SRCDIR): Remove doublest.h and dfp.h.
1041 (COMMON_OBS): Remove doublest.o and dfp.o.
1042 Do not build target-float.c (instead of doublest.c)
1043 with -Wformat-nonliteral.
1045 * doublest.c: Remove file.
1046 * doublest.h: Remove file.
1047 * dfp.c: Remove file.
1048 * dfp.h: Remove file.
1050 * target-float.c: Do not include "doublest.h" and "dfp.h".
1051 (DOUBLEST): Move here from doublest.h.
1052 (enum float_kind): Likewise.
1053 (FLOATFORMAT_CHAR_BIT): Likewise.
1054 (FLOATFORMAT_LARGEST_BYTES): Likewise.
1055 (floatformat_totalsize_bytes): Move here from doublest.c. Make static.
1056 (floatformat_precision): Likewise.
1057 (floatformat_normalize_byteorder, get_field, put_field): Likewise.
1058 (floatformat_is_negative, floatformat_classify, floatformat_mantissa):
1060 (host_float_format, host_double_format, host_long_double_format):
1062 (floatformat_to_string, floatformat_from_string): Likewise.
1063 (floatformat_to_doublest): Likewise. Also, inline the original
1064 convert_floatformat_to_doublest.
1065 (floatformat_from_doublest): Likewise. Also, inline the original
1066 convert_floatformat_from_doublest.
1068 Include "dpd/decimal128.h", "dpd/decimal64.h", and "dpd/decimal32.h".
1069 (MAX_DECIMAL_STRING): Move here from dfp.c.
1070 (match_endianness): Likewise.
1071 (set_decnumber_context, decimal_check_errors): Likewise.
1072 (decimal_from_number, decimal_to_number): Likewise.
1073 (decimal_to_string, decimal_from_string): Likewise. Make static.
1074 (decimal_from_longest, decimal_from_ulongest): Likewise.
1075 (decimal_to_longest): Likewise.
1076 (decimal_binop, decimal_is_zero, decimal_compare): Likewise.
1077 (decimal_convert): Likewise.
1079 2017-11-06 Ulrich Weigand <uweigand@de.ibm.com>
1081 * doublest.c: Do not include "gdbtypes.h".
1082 (extract_typed_floating): Remove.
1083 (store_typed_floating): Remove.
1084 (convert_typed_floating): Remove.
1085 * doublest.h (struct type): Remove.
1086 (DOUBLEST_PRINT_FORMAT): Remove.
1087 (DOUBLEST_SCAN_FORMAT): Remove.
1088 (extract_typed_floating): Remove.
1089 (store_typed_floating): Remove.
1090 (convert_typed_floating): Remove.
1092 * dfp.c (decimal_from_doublest): Remove.
1093 (decimal_to_doublest): Remove.
1094 * dfp.h: Do not include "doublest.h".
1095 (decimal_from_doublest): Remove.
1096 (decimal_to_doublest): Remove.
1098 * value.c: Do not include "doublest.h" and "dfp.h".
1099 (value_as_double): Remove.
1100 (unpack_double): Remove.
1101 (value_from_double): Remove.
1102 (value_from_decfloat): Remove.
1103 * value.h: Do not include "doublest.h".
1104 (value_as_double): Remove.
1105 (unpack_double): Remove.
1106 (value_from_double): Remove.
1107 (value_from_decfloat): Remove.
1109 2017-11-06 Ulrich Weigand <uweigand@de.ibm.com>
1111 * i386-tdep.c: Include "target-float.h". Do not include "doublest.h".
1112 (i386_extract_return_value): Use target_float_convert.
1113 (i386_store_return_value): Likewise.
1114 * i387-tdep.c (i387_register_to_value): Use target_float_convert.
1115 (i387_value_to_register): Likewise.
1116 * ia64-tdep.c: Include "target-float.h". Do not include "doublest.h".
1117 (ia64_register_to_value): Use target_float_convert.
1118 (ia64_value_to_register): Likewise.
1119 (ia64_extract_return_value): Likewise.
1120 (ia64_store_return_value): Likewise.
1121 (ia64_push_dummy_call): Likewise.
1122 * m68k-tdep.c: Include "target-float.h".
1123 (m68k_register_to_value): Use target_float_convert.
1124 (m68k_value_to_register): Likewise.
1125 (m68k_svr4_extract_return_value): Likewise.
1126 (m68k_svr4_store_return_value): Likewise.
1127 * ppc-sysv-tdep.c: Include "target-float.h".
1128 (ppc_sysv_abi_push_dummy_call): Use target_float_convert.
1129 (do_ppc_sysv_return_value): Likewise.
1130 (ppc64_sysv_abi_push_freg): Likewise.
1131 (ppc64_sysv_abi_return_value_base): Likewise.
1132 * rs6000-aix-tdep.c: Include "target-float.h".
1133 (rs6000_push_dummy_call): Use target_float_convert.
1134 (rs6000_return_value): Likewise.
1135 * rs6000-lynx178-tdep.c: Include "target-float.h".
1136 (rs6000_lynx178_push_dummy_call): Use target_float_convert.
1137 (rs6000_lynx178_return_value): Likewise.
1138 * rs6000-tdep.c: Include "target-float.h". Do not include "doublest.h".
1139 (rs6000_register_to_value): Use target_float_convert.
1140 (rs6000_value_to_register): Likewise.
1141 * arm-tdep.c: Include "target-float.h". Do not include "doublest.h".
1142 (arm_extract_return_value): Use target_float_convert.
1143 (arm_store_return_value): Likewise.
1144 * sh-tdep.c: Include "target-float.h". Do not include "doublest.h".
1145 (sh_register_convert_to_virtual): Use target_float_convert.
1146 (sh_register_convert_to_raw): Likewise.
1147 * sh64-tdep.c: Include "target-float.h".
1148 (sh64_extract_return_value): Use target_float_convert.
1149 (sh64_register_convert_to_virtual): Likewise.
1150 (sh64_register_convert_to_raw): Likewise. Fix argument types.
1152 2017-11-06 Ulrich Weigand <uweigand@de.ibm.com>
1154 * target-float.c (floatformat_to_host_double): New function.
1155 (floatformat_from_host_double): Likewise.
1156 (target_float_to_host_double): Likewise.
1157 (target_float_from_host_double): Likewise.
1158 * target-float.h (target_float_to_host_double): Add prototype.
1159 (target_float_from_host_double): Likewise.
1161 * guile/scm-value.c: Include "target-float.h".
1162 (gdbscm_value_to_real): Use target_float_to_host_double.
1163 Handle integer source values via value_as_long.
1164 * guile/scm-math.c: Include "target-float.h". Do not include
1165 "doublest.h", "dfp.h", and "expression.h".
1166 (vlscm_convert_typed_number): Use target_float_from_host_double.
1167 (vlscm_convert_number): Likewise.
1169 * python/py-value.c (valpy_float): Use target_float_to_host_double.
1170 (convert_value_from_python): Use target_float_from_host_double.
1172 2017-11-06 Ulrich Weigand <uweigand@de.ibm.com>
1174 * ada-lang.c (cast_to_fixed): Reimplement in target arithmetic.
1175 (cast_from_fixed): Likewise.
1176 (ada_scaling_type): New function.
1177 (ada_delta): Return value instead of DOUBLEST. Perform target
1178 arithmetic instead of host arithmetic.
1179 (scaling_factor): Rename to ...
1180 (ada_scaling_factor) ... this. Make non-static. Return value instead
1181 of DOUBLEST. Perform target arithmetic instead of host arithmetic.
1182 (ada_fixed_to_float): Remove.
1183 (ada_float_to_fixed): Remove.
1184 * ada-lang.h (ada_fixed_to_float): Remove.
1185 (ada_float_to_fixed): Remove.
1186 (ada_delta): Return value instead of DOUBLEST.
1187 (ada_scaling_factor): Add prototype.
1189 * ada-typeprint.c: Include "target-float.h".
1190 (print_fixed_point_type): Perform target arithmetic instead of
1192 * ada-valprint.c: Include "target-float.h".
1193 (ada_val_print_num): Perform target arithmetic instead of
1194 host arithmetic for fixed-point types.
1196 2017-11-06 Ulrich Weigand <uweigand@de.ibm.com>
1198 * target-float.c: Include <math.h>.
1199 (floatformat_binop): New function.
1200 (floatformat_compare): Likewise.
1201 (target_float_binop): Likewise.
1202 (target_float_compare): Likewise.
1203 * target-float.h: Include "expression.h".
1204 (target_float_binop): Add prototype.
1205 (target_float_compare): Likewise.
1207 * valarith.c: Do not include "doublest.h" and "dfp.h".
1208 Include "common/byte-vector.h".
1209 (value_args_as_decimal): Remove, replace by ...
1210 (value_args_as_target_float): ... this function. Handle both
1211 binary and decimal target floating-point formats.
1212 (scalar_binop): Handle both binary and decimal FP using
1213 value_args_as_target_float and target_float_binop.
1214 (value_equal): Handle both binary and decimal FP using
1215 value_args_as_target_float and target_float_compare.
1216 (value_less): Likewise.
1217 (value_pos): Handle all scalar types as simple copy.
1218 (value_neg): Handle all scalar types via BINOP_SUB from 0.
1219 * dfp.c (decimal_binop): Throw error instead of internal_error
1220 when called with an unsupported operation code.
1222 2017-11-06 Ulrich Weigand <uweigand@de.ibm.com>
1224 * target-float.c (target_float_to_string): New function.
1225 (target_float_from_string): New function.
1226 * target-float.h (target_float_to_string): Add prototype.
1227 (target_float_from_string): Add prototype.
1229 * valprint.c: Include "target-float.h". Do not include
1230 "doublest.h" and "dfp.h".
1231 (print_floating): Use target_float_to_string.
1232 * printcmd.c: Include "target-float.h". Do not include "dfp.h".
1233 (printf_floating): Use target_float_to_string.
1234 * i387-tdep.c: Include "target-float.h". Do not include "doublest.h".
1235 (print_i387_value): Use target_float_to_string.
1236 * mips-tdep.c: Include "target-float.h".
1237 (mips_print_fp_register): Use target_float_to_string.
1238 * sh64-tdep.c: Include "target-float.h".
1239 (sh64_do_fp_register): Use target_float_to_string.
1241 * parse.c: Include "target-float.h". Do not include
1242 "doublest.h" and "dfp.h".
1243 (parse_float): Use target_float_from_string.
1244 * stabsread.c: Include "target-float.h". Do not include "doublest.h".
1245 (define_symbol): Use target_float_from_string.
1246 * gdbarch-selftests.c: Include "target-float.h".
1247 (register_to_value_test): Use target_float_from_string.
1249 2017-11-06 Ulrich Weigand <uweigand@de.ibm.com>
1251 * Makefile.c (SFILES): Add target-float.c.
1252 (HFILES_NO_SRCDIR): Add target-float.h.
1253 (COMMON_OBS): Add target-float.o.
1254 * target-float.h: New file.
1255 * target-float.c: New file.
1257 * doublest.c (floatformat_classify): Fix detection of float_zero.
1259 * gdbtypes.c (is_floating_type): New function.
1260 * gdbtypes.h (is_floating_type): Add prototype.
1262 * value.c: Do not include "floatformat.h".
1263 (unpack_double): Use target_float_is_valid.
1264 (is_floating_value): New function.
1265 * value.h (is_floating_value): Add prototype-
1267 * valarith.c: Include "target-float.h".
1268 (value_logical_not): Use target_float_is_zero.
1270 * python/py-value.c: Include "target-float.h".
1271 (valpy_nonzero): Use target_float_is_zero.
1273 2017-11-04 Tom Tromey <tom@tromey.com>
1275 * h8300-tdep.c (h8300_push_dummy_call): Use std::vector.
1277 2017-11-04 Tom Tromey <tom@tromey.com>
1279 * breakpoint.c (set_momentary_breakpoint): Return
1281 (until_break_command): Update.
1282 (new_until_break_fsm): Change argument types to
1284 (set_momentary_breakpoint_at_pc): Return breakpoint_up.
1285 (do_delete_breakpoint_cleanup, make_cleanup_delete_breakpoint):
1287 * infcmd.c (finish_forward): Update.
1288 * breakpoint.h (set_momentary_breakpoint)
1289 (set_momentary_breakpoint_at_pc): Return breakpoint_up.
1290 (make_cleanup_delete_breakpoint): Remove.
1291 (struct breakpoint_deleter): New.
1292 (breakpoint_up): New typedef.
1293 * infrun.c (insert_step_resume_breakpoint_at_sal_1): Update.
1294 (insert_exception_resume_breakpoint): Update.
1295 (insert_exception_resume_from_probe): Update.
1296 (insert_longjmp_resume_breakpoint): Update.
1297 * arm-linux-tdep.c (arm_linux_copy_svc): Update.
1298 * elfread.c (elf_gnu_ifunc_resolver_stop): Update.
1299 * infcall.c (call_function_by_hand_dummy): Update
1301 2017-11-04 Tom Tromey <tom@tromey.com>
1303 * c-typeprint.c (c_type_print_base): Use gdb::unique_xmalloc_ptr.
1305 2017-11-04 Tom Tromey <tom@tromey.com>
1307 * linux-tdep.c (linux_core_info_proc_mappings): Use
1309 (linux_get_siginfo_data): Return gdb::byte_vector. Remove
1311 (linux_corefile_thread): Update.
1312 (linux_make_corefile_notes): Remove unused variable.
1314 2017-11-04 Tom Tromey <tom@tromey.com>
1316 * ppc-linux-tdep.c (ppc_linux_get_syscall_number): Use
1319 2017-11-04 Tom Tromey <tom@tromey.com>
1321 * objfiles.c (do_free_objfile_cleanup): Remove.
1322 * compile/compile-object-load.c (compile_object_load): Update.
1323 * objfiles.h (make_cleanup_free_objfile): Remove.
1325 2017-11-04 Tom Tromey <tom@tromey.com>
1327 * sparc64-tdep.c (do_examine): Use gdb::def_vector.
1328 (adi_read_versions): Change "tags" to "gdb_byte *".
1329 (adi_print_versions): Likewise.
1331 2017-11-04 Tom Tromey <tom@tromey.com>
1334 (scoped_rbreak_breakpoints::scoped_rbreak_breakpoints): Rename
1335 from start_rbreak_breakpoints.
1336 (scoped_rbreak_breakpoints): Rename from end_rbreak_breakpoints.
1337 * breakpoint.h (class scoped_rbreak_breakpoints): New.
1338 (start_rbreak_breakpoints, end_rbreak_breakpoints): Remove.
1339 * symtab.c (do_end_rbreak_breakpoints): Remove.
1340 (rbreak_command): Use scoped_rbreak_breakpoints, std::string.
1342 2017-11-04 Tom Tromey <tom@tromey.com>
1344 * cp-namespace.c (reset_directive_searched): Remove.
1345 (cp_lookup_symbol_via_imports): Use scoped_restore.
1346 * cp-support.c (reset_directive_searched): Remove.
1347 (make_symbol_overload_list_using): Use scoped_restore.
1348 * d-namespace.c (d_lookup_symbol_imports): Use scoped_restore.
1349 (reset_directive_searched): Remove.
1351 2017-11-04 Tom Tromey <tom@tromey.com>
1353 * symfile.c (find_separate_debug_file_by_debuglink): Use
1356 2017-11-04 Tom Tromey <tom@tromey.com>
1358 * compile/compile-loc2c.c (compute_stack_depth_worker): Change
1360 (compute_stack_depth): Likewise.
1361 (do_compile_dwarf_expr_to_c): Use std::vector.
1363 2017-11-04 Tom Tromey <tom@tromey.com>
1365 * compile/compile-object-load.c (link_callbacks_einfo): Use
1368 2017-11-04 Tom Tromey <tom@tromey.com>
1370 * dwarf2read.c (process_full_comp_unit, process_full_type_unit):
1371 Use scoped_free_pendings.
1372 * dbxread.c (dbx_symfile_read, dbx_psymtab_to_symtab_1): Use
1373 scoped_free_pendings.
1374 * xcoffread.c (xcoff_psymtab_to_symtab_1): Use scoped_free_pendings.
1375 (xcoff_initial_scan): Likewise.
1376 * buildsym.c (reset_symtab_globals): Update comment.
1377 (scoped_free_pendings): Rename from really_free_pendings.
1378 (prepare_for_building): Update comment.
1379 (buildsym_init): Likewise.
1380 * buildsym.h (class scoped_free_pendings): New class.
1381 (really_free_pendings): Don't declare.
1383 2017-11-03 Ulrich Weigand <uweigand@de.ibm.com>
1385 * doublest.c (convert_doublest_to_floatformat): Fix uninitialized
1386 output when converting a zero value to a special byteorder format.
1388 2017-11-02 Yao Qi <yao.qi@linaro.org>
1390 * frame.c (do_frame_register_read): Remove aspace.
1391 * jit.c (jit_frame_sniffer): Likwise.
1392 * ppc-linux-tdep.c (ppu2spu_sniffer): Likewise.
1393 * regcache.c (regcache::regcache): Pass nullptr.
1394 (regcache_print): Caller updated.
1395 * regcache.h (regcache::regcache): Remove one constructor
1398 2017-11-02 Yao Qi <yao.qi@linaro.org>
1400 * regcache.h (regcache) <m_readonly_p>: Change it to const bool.
1402 2017-11-02 Yao Qi <yao.qi@linaro.org>
1404 * breakpoint.c (insert_single_step_breakpoints): Update.
1405 * frame.c (struct frame_info) <aspace>: Add const.
1406 (frame_save_as_regcache): Add const.
1407 (get_frame_address_space): Return const address_space *.
1408 * frame.h (get_frame_address_space): Update declaration.
1409 * infrun.c (struct step_over_info) <aspace>: Add const.
1410 (set_step_over_info): Make aspace const.
1411 (displaced_step_prepare_throw): Change variable const.
1413 (proceed): Likewise.
1414 (adjust_pc_after_break): Likewise.
1415 (save_waitstatus): Likewise.
1416 (handle_signal_stop): Likewise.
1417 (keep_going_pass_signal): Likewise.
1418 * jit.c (jit_frame_sniffer): Add const.
1419 * mips-tdep.c (mips_single_step_through_delay): Likewise.
1420 * ppc-linux-tdep.c (ppu2spu_sniffer): Likewise.
1421 * record-full.c (record_full_wait_1): Likewise.
1422 * regcache.c (regcache::regcache): Change parameter to const.
1423 * regcache.h (regcache::regcache): Likewise.
1424 (regcache::aspace): Return const address_space *.
1425 (regcache) <m_aspace>: Add const.
1427 2017-11-02 Yao Qi <yao.qi@linaro.org>
1429 * darwin-nat.c (cancel_breakpoint): Use regcache->aspace ().
1430 * frame.c (create_sentinel_frame): Likewise.
1431 * infrun.c (displaced_step_prepare_throw): Likewise.
1433 (thread_still_needs_step_over_bp): Likewise.
1434 (proceed): Likewise.
1435 (do_target_wait): Likewise.
1436 (adjust_pc_after_break): Likewise.
1437 (handle_syscall_event): Likewise.
1438 (save_waitstatus): Likewise.
1439 (handle_inferior_event_1): Likewise.
1440 (handle_signal_stop): Likewise.
1441 (keep_going_pass_signal): Likewise.
1442 * linux-nat.c (status_callback): Likewise.
1443 (save_stop_reason): Likewise.
1444 (resume_stopped_resumed_lwps): Likewise.
1445 * record-full.c (record_full_exec_insn): Likewise.
1446 (record_full_wait_1): Likewise.
1447 * regcache.c (get_regcache_aspace): Remove.
1448 * regcache.h (get_regcache_aspace): Remove.
1450 2017-11-02 Yao Qi <yao.qi@linaro.org>
1452 * regcache.c (struct regcache_descr) <nr_raw_registers>: Remove.
1453 (init_regcache_descr): Use gdbarch_num_regs.
1454 (regcache::regcache): Likewise.
1455 (regcache::get_register_status): Likewise.
1456 (regcache::assert_raw_regnum): Likewise.
1457 (regcache::cooked_read): Likewise.
1458 (regcache::cooked_read_value): Likewise.
1459 (regcache::cooked_write): Likewise.
1460 (regcache::dump): Likewise.
1461 (regcache::num_raw_registers): New method.
1462 * regcache.h (class regcache) <num_raw_registers>: New.
1464 2017-11-02 Yao Qi <yao.qi@linaro.org>
1466 * regcache.c (regcache::assert_regnum): New method.
1467 (regcache::invalidate): Call assert_regnum.
1468 (regcache::raw_update): Likewise.
1469 (regcache::raw_write): Likewise.
1470 (regcache::raw_read_part): Likewise.
1471 (regcache::raw_write_part): Likewise.
1472 (regcache::raw_supply): Likewise.
1473 (regcache::raw_supply_integer): Likewise.
1474 (regcache::raw_supply_zeroed): Likewise.
1475 (regcache::raw_collect): Likewise.
1476 (regcache::raw_collect_integer): Likewise.
1477 * regcache.h (regcache::assert_regnum): Declare.
1479 2017-11-02 Yao Qi <yao.qi@linaro.org>
1481 * regcache.c (regcache::dump): Remove code.
1483 2017-11-02 Yao Qi <yao.qi@linaro.org>
1485 * regcache.c (struct regcache_descr) <sizeof_raw_register_status>:
1487 <sizeof_cooked_register_status>: Remove.
1488 (init_regcache_descr): Update.
1489 (regcache::regcache): Use nr_cooked_registers and nr_raw_registers.
1490 (regcache::save): Likewise.
1491 (regcache::dump): Likewise.
1493 2017-11-01 James Bowman <james.bowman@ftdichip.com>
1495 * ft32-tdep.c (ft32_fetch_instruction): New function.
1496 (ft32_analyze_prologue): Use ft32_fetch_instruction().
1498 2017-10-31 Simon Marchi <simon.marchi@polymtl.ca>
1500 * cli/cli-script.c (execute_control_command): Rename to ...
1501 (execute_control_command_1): ... this.
1502 (execute_control_command): New function.
1504 2017-10-31 Simon Marchi <simon.marchi@ericsson.com>
1506 * tracepoint.c (tfind_command): Remove const_cast.
1508 2017-10-30 Mike Gulick <mgulick@mathworks.com>
1510 * Makefile.in (HFILES_NO_SRCDIR): Remove reference to gdb.h.
1512 2017-10-30 Simon Marchi <simon.marchi@ericsson.com>
1514 * common/common-utils.h (in_inclusive_range): New function.
1515 * arm-tdep.c (arm_record_extension_space): Use
1517 (thumb_record_ld_st_reg_offset): Use in_inclusive_range.
1518 * cris-tdep.c (cris_spec_reg_applicable): Use
1521 2017-10-30 Pedro Alves <palves@redhat.com>
1522 Simon Marchi <simon.marchi@ericsson.com>
1524 * remote.c (remote_set_syscall_catchpoint): Build a std::string
1525 instead of a gdb::unique_xmalloc_ptr, using string_appendf.
1527 2017-10-30 Pedro Alves <palves@redhat.com>
1529 * common/common-utils.c (string_appendf, string_vappendf): New
1531 * common/common-utils.h (string_appendf, string_vappendf): New
1533 * unittests/common-utils-selftests.c (string_appendf_func)
1534 (test_appendf_func, string_vappendf_wrapper, string_appendf_tests)
1535 (string_vappendf_tests): New functions.
1536 (_initialize_common_utils_selftests): Register "string_appendf" and
1537 "string_vappendf tests".
1539 2017-10-30 Pedro Alves <palves@redhat.com>
1541 * unittests/common-utils-selftests.c (format_func): New typedef.
1542 (string_printf_tests, string_vprintf_tests): Tests factored out
1544 (test_format_func): ... this new function.
1545 (string_printf_tests, string_vprintf_tests): Reimplement on top of
1548 2017-10-29 Simon Marchi <simon.marchi@ericsson.com>
1550 * darwin-nat.c: Remove include of gdb.h.
1552 2017-10-29 Simon Marchi <simon.marchi@ericsson.com>
1554 * xtensa-xtregs.c: Fix formatting issues.
1556 2017-10-29 Simon Marchi <simon.marchi@ericsson.com>
1558 * xtensa-xtregs.c (xtensa_regtable_t) <name>: Constify.
1560 2017-10-28 Maksim Dzabraev <dzabraew@gmail.com>
1563 * python/py-infthread.c (thpy_get_inferior): Increment reference
1564 of inferior before returning it.
1566 2017-10-27 Simon Marchi <simon.marchi@ericsson.com>
1568 * unittests/common-utils-selftests.c (format): Add
1571 2017-10-27 Simon Marchi <simon.marchi@polymtl.ca>
1573 * xml-syscall.c (struct syscall_desc): Add constructor.
1574 <name>: Change type to std::string.
1575 (syscall_desc_up): New typedef.
1576 (syscall_desc_p): Remove typeder.
1577 (DEF_VEC_P(syscall_desc_p)): Remove.
1578 (struct syscall_group_desc): Add constructor.
1579 <name>: Change type to std::string.
1580 <syscalls>: Change type to std::vector.
1581 (syscall_group_desc_up): New typedef.
1582 (syscall_group_desc_p): Remove typedef.
1583 (DEF_VEC_P(syscall_group_desc_p)): Remove.
1584 (struct syscalls_info) <syscalls>: Change type to std::vector of
1587 <my_gdb_datadir>: Change type to std::string.
1588 (syscalls_info_up): New typedef.
1589 (allocate_syscalls_info): Remove.
1590 (syscalls_info_free_syscalls_desc): Remove.
1591 (syscalls_info_free_syscall_group_desc): Remove.
1592 (free_syscalls_info): Remove.
1593 (make_cleanup_free_syscalls_info): Remove.
1594 (syscall_group_create_syscall_group_desc): Adjust.
1595 (syscall_group_add_syscall): Adjust.
1596 (syscall_create_syscall_desc): Adjust.
1597 (syscall_parse_xml): Adjust, use unique_ptr instead of cleanup.
1598 (init_syscalls_info): Adjust.
1599 (syscall_group_get_group_by_name): Adjust.
1600 (xml_get_syscall_number): Adjust.
1601 (xml_get_syscall_name): Adjust.
1602 (xml_list_of_syscalls): Adjust.
1603 (xml_list_syscalls_by_group): Adjust.
1604 (xml_list_of_groups): Adjust.
1606 2017-10-27 Simon Marchi <simon.marchi@ericsson.com>
1608 * probe.h: Don't include gdb_vecs.h.
1609 (DEF_VEC_P (probe_p)): Remove.
1610 (find_probes_in_objfile): Return an std::vector.
1611 * probe.c (find_probes_in_objfile): Likewise.
1612 * breakpoint.c (breakpoint_objfile_data)
1613 <longjmp_probes>: Change type to std::vector.
1614 <exception_probes>: Likewise.
1615 (free_breakpoint_probes): Don't manually free vectors.
1616 (create_longjmp_master_breakpoint): Adjust.
1617 (create_exception_master_breakpoint): Adjust.
1618 * solib-svr4.c (svr4_create_probe_breakpoints): Change
1619 parameter type, adjust.
1620 (svr4_create_solib_event_breakpoints): Adjust.
1622 2017-10-27 Simon Marchi <simon.marchi@ericsson.com>
1624 * breakpoint.c (breakpoint_objfile_data): Initialize fields.
1625 (get_breakpoint_objfile_data): Allocate breakpoint_objfile_data
1627 (free_breakpoint_probes): Rename to ...
1628 (free_breakpoint_objfile_data): ... this, and call delete on
1631 2017-10-27 Simon Marchi <simon.marchi@polymtl.ca>
1633 * auto-load.c: Don't include gdb_vecs.h, include algorithm.
1634 (loaded_script_ptr): Remove typedef.
1635 (DEF_VEC_P (loaded_script_ptr)): Remove.
1636 (struct collect_matching_scripts_data): Add constructor.
1637 <scripts_p>: Change type to (pointer to) std::vector.
1638 (collect_matching_scripts_data): Adjust.
1639 (sort_scripts_by_name): Make suitable for std::sort.
1640 (print_scripts): Don't sort vector, adjust to std::vector.
1641 (auto_load_info_scripts): Sort vectors, adjust to std::vector.
1643 2017-10-27 Simon Marchi <simon.marchi@ericsson.com>
1645 * symfile.c (filename_language): Make struct, not typedef. Add
1647 <ext>: Change type to std::string.
1648 (DEF_VEC_O (filename_language)): Remove.
1649 (filename_language_table): Change type to std::vector.
1650 (add_filename_language): Adjust.
1651 (set_ext_lang_command): Adjust.
1652 (info_ext_lang_command): Adjust.
1653 (deduce_language_from_filename): Adjust.
1654 (class scoped_restore_filename_language_table): Remove.
1655 (test_filename_language): Use scoped_restore.
1656 (test_set_ext_lang_command): Use scoped_restore, adjust to
1659 2017-10-27 Simon Marchi <simon.marchi@ericsson.com>
1661 * symfile.c: Include selftest.h.
1662 (class scoped_restore_filename_language_table): New.
1663 (test_filename_language): New test.
1664 (test_set_ext_lang_command): New test.
1665 (_initialize_symfile): Register tests.
1667 2017-10-27 Keith Seitz <keiths@redhat.com>
1669 * breakpoint.c (print_breakpoint_location): Use the symbol saved
1670 in the bp_location, falling back to find_pc_sect_function when
1672 (add_location_to_breakpoint): Save sal->symbol.
1673 * breakpoint.h (struct bp_location) <symbol>: New field.
1674 * symtab.c (find_function_start_sal): Save the symbol into the SaL.
1675 * symtab.h (struct symtab_and_line) <symbol>: New field.
1677 2017-10-26 Patrick Frants <osscontribute@gmail.com>
1680 * cp-valprint.c (cp_print_value_fields): Use obstack_blank_fast
1683 2017-10-26 Pedro Alves <palves@redhat.com>
1685 * remote.c (remote_async_terminal_ours_p): Delete.
1686 (remote_open_1, remote_terminal_inferior, remote_terminal_ours):
1687 Remove references to 'remote_async_terminal_ours_p'.
1689 2017-10-26 Yao Qi <yao.qi@linaro.org>
1691 * breakpoint.h (regular_breakpoint_inserted_here_p): Remove.
1693 2017-10-26 Yao Qi <yao.qi@linaro.org>
1695 * break-catch-sig.c (signal_catchpoint_breakpoint_hit): Make
1697 * break-catch-syscall.c (breakpoint_hit_catch_syscall):
1699 * breakpoint.c (bpstat_check_location): Remove cast.
1700 (breakpoint_hit_catch_fork): Make aspce const.
1701 (breakpoint_hit_catch_solib): Likewise.
1702 (breakpoint_hit_catch_exec): Likewise.
1703 (breakpoint_hit_ranged_breakpoint): Likewise.
1704 (breakpoint_hit_watchpoint): Likewise.
1705 (base_breakpoint_breakpoint_hit): Likewise.
1706 (bkpt_breakpoint_hit): Likewise.
1707 (dprintf_breakpoint_hit): Likewise.
1708 (tracepoint_breakpoint_hit): Likewise.
1709 * breakpoint.h (breakpoint_ops) <breakpoint_hit>: Likewise.
1711 2017-10-26 Yao Qi <yao.qi@linaro.org>
1713 * breakpoint.c (breakpoint_location_address_match): Change
1714 "struct address_space *" to "const address_space".
1715 (breakpoint_location_address_range_overlap): Likewise.
1716 (breakpoint_here_p): Likewise.
1717 (breakpoint_in_range_p): Likewise.
1718 (moribund_breakpoint_here_p): Likewise.
1719 (bp_location_inserted_here_p): Likewise.
1720 (software_breakpoint_inserted_here_p): Likewise.
1721 (hardware_breakpoint_inserted_here_p): Likewise.
1722 (hardware_watchpoint_inserted_in_range): Likewise.
1723 (bpstat_check_location): Likewise.
1724 (bpstat_stop_status): Likewise.
1725 (breakpoint_address_match): Likewise.
1726 (breakpoint_address_match_range): Likewise.
1727 (breakpoint_location_address_match): Likewise.
1728 (breakpoint_location_address_range_overlap): Likewise.
1729 (insert_single_step_breakpoint): Likewise.
1730 (breakpoint_has_location_inserted_here): Likewise.
1731 (single_step_breakpoint_inserted_here_p): Likewise.
1732 (pc_at_non_inline_function): Likewise.
1733 * breakpoint.h (bpstat_stop_status): Update declaration.
1734 (breakpoint_here_p): Likewise.
1735 (breakpoint_in_range_p): Likewise.
1736 (moribund_breakpoint_here_p): Likewise.
1737 (breakpoint_inserted_here_p): Likewise.
1738 (software_breakpoint_inserted_here_p): Likewise.
1739 (hardware_breakpoint_inserted_here_p): Likewise.
1740 (breakpoint_has_location_inserted_here): Likewise.
1741 (single_step_breakpoint_inserted_here_p): Likewise.
1742 (hardware_watchpoint_inserted_in_range): Likewise.
1743 (breakpoint_address_match): Likewise.
1744 (insert_single_step_breakpoint): Likewise.
1745 (pc_at_non_inline_function): Likewise.
1746 * gdbthread.h (thread_has_single_step_breakpoint_here): Likewise.
1747 * record.c (record_check_stopped_by_breakpoint): Likewise.
1748 * record.h (record_check_stopped_by_breakpoint): Likewise.
1749 * thread.c (thread_has_single_step_breakpoint_here): Likewise.
1751 2017-10-25 Yao Qi <yao.qi@linaro.org>
1753 * aarch32-linux-nat.c (aarch32_gp_regcache_supply): Use
1754 regcache->arch () instead get_regcache_arch.
1755 * aarch64-fbsd-nat.c (aarch64_fbsd_fetch_inferior_registers):
1757 (aarch64_fbsd_store_inferior_registers): Likewise.
1758 * aarch64-linux-nat.c (fetch_gregs_from_thread): Likewise.
1759 (store_gregs_to_thread): Likewise.
1760 (fetch_fpregs_from_thread): Likewise.
1761 (store_fpregs_to_thread): Likewise.
1762 * aarch64-tdep.c (aarch64_extract_return_value): Likewise.
1763 (aarch64_store_return_value): Likewise.
1764 (aarch64_software_single_step): Likewise.
1765 * aix-thread.c (aix_thread_wait): Likewise.
1766 (supply_reg32): Likewise.
1767 (supply_sprs64): Likewise.
1768 (supply_sprs32): Likewise.
1769 (fill_gprs64): Likewise.
1770 (fill_gprs32): Likewise.
1771 (fill_sprs64): Likewise.
1772 (fill_sprs32): Likewise.
1773 (store_regs_user_thread): Likewise.
1774 (store_regs_kernel_thread): Likewise.
1775 * alpha-bsd-nat.c (alphabsd_fetch_inferior_registers): Likewise.
1776 (alphabsd_store_inferior_registers): Likewise.
1777 * alpha-tdep.c (alpha_extract_return_value): Likewise.
1778 (alpha_store_return_value): Likewise.
1779 (alpha_deal_with_atomic_sequence): Likewise.
1780 (alpha_next_pc): Likewise.
1781 (alpha_software_single_step): Likewise.
1782 * amd64-bsd-nat.c (amd64bsd_fetch_inferior_registers): Likewise.
1783 (amd64bsd_store_inferior_registers): Likewise.
1784 * amd64-linux-nat.c (amd64_linux_fetch_inferior_registers):
1786 (amd64_linux_store_inferior_registers): Likewise.
1787 * amd64-nat.c (amd64_supply_native_gregset): Likewise.
1788 (amd64_collect_native_gregset): Likewise.
1789 * amd64-obsd-tdep.c (amd64obsd_supply_uthread): Likewise.
1790 (amd64obsd_collect_uthread): Likewise.
1791 * amd64-tdep.c (amd64_supply_fpregset): Likewise.
1792 (amd64_collect_fpregset): Likewise.
1793 (amd64_supply_fxsave): Likewise.
1794 (amd64_supply_xsave): Likewise.
1795 (amd64_collect_fxsave): Likewise.
1796 (amd64_collect_xsave): Likewise.
1797 * arc-tdep.c (arc_write_pc): Likewise.
1798 * arch-utils.c (default_skip_permanent_breakpoint): Likewise.
1799 * arm-fbsd-nat.c (arm_fbsd_fetch_inferior_registers): Likewise.
1800 (arm_fbsd_store_inferior_registers): Likewise.
1801 * arm-linux-nat.c (fetch_vfp_regs): Likewise.
1802 (store_vfp_regs): Likewise.
1803 (arm_linux_fetch_inferior_registers): Likewise.
1804 (arm_linux_store_inferior_registers): Likewise.
1805 * arm-linux-tdep.c (arm_linux_supply_gregset): Likewise.
1806 (arm_linux_sigreturn_next_pc): Likewise.
1807 (arm_linux_get_next_pcs_syscall_next_pc): Likewise.
1808 * arm-nbsd-nat.c (arm_supply_gregset): Likewise.
1809 (fetch_register): Likewise.
1810 (store_register): Likewise.
1811 * arm-tdep.c (arm_is_thumb): Likewise.
1812 (displaced_in_arm_mode): Likewise.
1813 (bx_write_pc): Likewise.
1814 (arm_get_next_pcs_addr_bits_remove): Likewise.
1815 (arm_software_single_step): Likewise.
1816 (arm_extract_return_value): Likewise.
1817 (arm_store_return_value): Likewise.
1818 (arm_write_pc): Likewise.
1819 * bfin-tdep.c (bfin_extract_return_value): Likewise.
1820 * bsd-uthread.c (bsd_uthread_fetch_registers): Likewise.
1821 (bsd_uthread_store_registers): Likewise.
1822 * core-regset.c (fetch_core_registers): Likewise.
1823 * corelow.c (get_core_registers): Likewise.
1824 * cris-tdep.c (cris_store_return_value): Likewise.
1825 (cris_extract_return_value): Likewise.
1826 (find_step_target): Likewise.
1827 (find_step_target): Likewise.
1828 (cris_software_single_step): Likewise.
1829 * ctf.c (ctf_fetch_registers): Likewise.
1830 * darwin-nat.c (cancel_breakpoint): Likewise.
1831 * fbsd-tdep.c (fbsd_collect_thread_registers): Likewise.
1832 * frv-tdep.c (frv_extract_return_value): Likewise.
1833 * ft32-tdep.c (ft32_store_return_value): Likewise.
1834 (ft32_extract_return_value): Likewise.
1835 * go32-nat.c (fetch_register): Likewise.
1836 (go32_fetch_registers): Likewise.
1837 (go32_store_registers): Likewise.
1838 (store_register): Likewise.
1839 * h8300-tdep.c (h8300_extract_return_value): Likewise.
1840 (h8300_store_return_value): Likewise.
1841 * hppa-linux-nat.c (fetch_register): Likewise.
1842 (store_register): Likewise.
1843 (hppa_linux_fetch_inferior_registers): Likewise.
1844 (hppa_linux_store_inferior_registers): Likewise.
1845 * i386-darwin-nat.c (i386_darwin_fetch_inferior_registers): Likewise.
1846 (i386_darwin_store_inferior_registers): Likewise.
1847 * i386-gnu-nat.c (gnu_fetch_registers): Likewise.
1848 (gnu_store_registers): Likewise.
1849 * i386-linux-nat.c (fetch_register): Likewise.
1850 (store_register): Likewise.
1851 (supply_gregset): Likewise.
1852 (fill_gregset): Likewise.
1853 (i386_linux_fetch_inferior_registers): Likewise.
1854 (i386_linux_store_inferior_registers): Likewise.
1855 (i386_linux_resume): Likewise.
1856 * i386-linux-tdep.c (i386_linux_get_syscall_number_from_regcache):
1858 * i386-nto-tdep.c (i386nto_supply_gregset): Likewise.
1859 * i386-obsd-nat.c (i386obsd_supply_pcb): Likewise.
1860 * i386-obsd-tdep.c (i386obsd_supply_uthread): Likewise.
1861 (i386obsd_collect_uthread): Likewise.
1862 * i386-tdep.c (i386_mmx_regnum_to_fp_regnum): Likewise.
1863 (i386_supply_gregset): Likewise.
1864 (i386_collect_gregset): Likewise.
1865 (i386_supply_fpregset): Likewise.
1866 (i386_collect_fpregset): Likewise.
1867 (i386_mpx_bd_base): Likewise.
1868 * i386-v4-nat.c (supply_fpregset): Likewise.
1869 (fill_fpregset): Likewise.
1870 * i387-tdep.c (i387_supply_fsave): Likewise.
1871 (i387_collect_fsave): Likewise.
1872 (i387_supply_fxsave): Likewise.
1873 (i387_collect_fxsave): Likewise.
1874 (i387_supply_xsave): Likewise.
1875 (i387_collect_xsave): Likewise.
1876 * ia64-linux-nat.c (ia64_linux_fetch_registers): Likewise.
1877 (ia64_linux_store_registers): Likewise.
1878 * ia64-tdep.c (ia64_access_rse_reg): Likewise.
1879 (ia64_extract_return_value): Likewise.
1880 (ia64_store_return_value): Likewise.
1881 (find_func_descr): Likewise.
1882 * inf-child.c (inf_child_fetch_inferior_registers): Likewise.
1883 * inf-ptrace.c (inf_ptrace_fetch_registers): Likewise.
1884 (inf_ptrace_store_registers): Likewise.
1885 * infrun.c (use_displaced_stepping): Likewise.
1886 (displaced_step_prepare_throw): Likewise.
1888 (proceed): Likewise.
1889 (do_target_wait): Likewise.
1890 (adjust_pc_after_break): Likewise.
1891 (handle_inferior_event_1): Likewise.
1892 (handle_signal_stop): Likewise.
1893 (save_infcall_suspend_state): Likewise.
1894 (restore_infcall_suspend_state): Likewise.
1895 * iq2000-tdep.c (iq2000_extract_return_value): Likewise.
1896 * jit.c (jit_frame_prev_register): Likewise.
1897 * linux-nat.c (save_stop_reason): Likewise.
1898 (linux_nat_wait_1): Likewise.
1899 (resume_stopped_resumed_lwps): Likewise.
1900 * linux-record.c (record_linux_sockaddr): Likewise.
1901 (record_linux_msghdr): Likewise.
1902 (record_linux_system_call): Likewise.
1903 * linux-tdep.c (linux_collect_thread_registers): Likewise.
1904 * lm32-tdep.c (lm32_extract_return_value): Likewise.
1905 (lm32_store_return_value): Likewise.
1906 * m32c-tdep.c (m32c_read_flg): Likewise.
1907 (m32c_pseudo_register_read): Likewise.
1908 (m32c_pseudo_register_write): Likewise.
1909 * m32r-linux-tdep.c (m32r_linux_supply_gregset): Likewise.
1910 (m32r_linux_collect_gregset): Likewise.
1911 * m32r-tdep.c (m32r_store_return_value): Likewise.
1912 (m32r_extract_return_value): Likewise.
1913 * m68k-bsd-nat.c (m68kbsd_supply_fpregset): Likewise.
1914 (m68kbsd_collect_fpregset): Likewise.
1915 * m68k-bsd-tdep.c (m68kbsd_supply_fpregset): Likewise.
1916 * m68k-linux-nat.c (fetch_register): Likewise.
1917 (old_fetch_inferior_registers): Likewise.
1918 (old_store_inferior_registers): Likewise.
1919 (store_regs): Likewise.
1920 * m68k-tdep.c (m68k_svr4_extract_return_value): Likewise.
1921 (m68k_svr4_store_return_value): Likewise.
1922 * m88k-tdep.c (m88k_store_arguments): Likewise.
1923 * mi/mi-main.c (mi_cmd_data_list_changed_registers): Likewise.
1924 (mi_cmd_data_write_register_values): Likewise.
1925 * mips-fbsd-nat.c (mips_fbsd_fetch_inferior_registers): Likewise.
1926 (mips_fbsd_store_inferior_registers): Likewise.
1927 * mips-fbsd-tdep.c (mips_fbsd_supply_fpregs): Likewise.
1928 (mips_fbsd_supply_gregs): Likewise.
1929 (mips_fbsd_collect_fpregs): Likewise.
1930 (mips_fbsd_collect_gregs): Likewise.
1931 (mips_fbsd_supply_fpregset): Likewise.
1932 (mips_fbsd_collect_fpregset): Likewise.
1933 (mips_fbsd_supply_gregset): Likewise.
1934 (mips_fbsd_collect_gregset): Likewise.
1935 * mips-linux-nat.c (supply_gregset): Likewise.
1936 (fill_gregset): Likewise.
1937 (supply_fpregset): Likewise.
1938 (fill_fpregset): Likewise.
1939 * mips-linux-tdep.c (mips_supply_gregset): Likewise.
1940 (mips_fill_gregset): Likewise.
1941 (mips_supply_fpregset): Likewise.
1942 (mips_fill_fpregset): Likewise.
1943 (mips64_supply_gregset): Likewise.
1944 (micromips_linux_sigframe_validate): Likewise.
1945 * mips-nbsd-nat.c (mipsnbsd_fetch_inferior_registers): Likewise.
1946 (mipsnbsd_fetch_inferior_registers): Likewise.
1947 (mipsnbsd_store_inferior_registers): Likewise.
1948 * mips-nbsd-tdep.c (mipsnbsd_supply_fpregset): Likewise.
1949 (mipsnbsd_supply_gregset): Likewise.
1950 (mipsnbsd_iterate_over_regset_sections): Likewise.
1951 (mipsnbsd_supply_reg): Likewise.
1952 (mipsnbsd_supply_fpreg): Likewise.
1953 * mips-tdep.c (mips_in_frame_stub): Likewise.
1954 (mips_dummy_id): Likewise.
1955 (is_octeon_bbit_op): Likewise.
1956 (micromips_bc1_pc): Likewise.
1957 (extended_mips16_next_pc): Likewise.
1958 (mips16_next_pc): Likewise.
1959 (deal_with_atomic_sequence): Likewise.
1960 * moxie-tdep.c (moxie_process_readu): Likewise.
1961 * nios2-tdep.c (nios2_get_next_pc): Likewise.
1962 * nto-procfs.c (procfs_store_registers): Likewise.
1963 * ppc-fbsd-nat.c (ppcfbsd_fetch_inferior_registers): Likewise.
1964 (ppcfbsd_store_inferior_registers): Likewise.
1965 * ppc-linux-nat.c (fetch_vsx_register): Likewise.
1966 (fetch_altivec_register): Likewise.
1967 (get_spe_registers): Likewise.
1968 (fetch_spe_register): Likewise.
1969 (fetch_altivec_registers): Likewise.
1970 (fetch_all_gp_regs): Likewise.
1971 (fetch_all_fp_regs): Likewise.
1972 (store_vsx_register): Likewise.
1973 (store_altivec_register): Likewise.
1974 (set_spe_registers): Likewise.
1975 (store_spe_register): Likewise.
1976 (store_altivec_registers): Likewise.
1977 (store_all_gp_regs): Likewise.
1978 (store_all_fp_regs): Likewise.
1979 * ppc-linux-tdep.c (ppc_linux_supply_gregset): Likewise.
1980 (ppc_linux_collect_gregset): Likewise.
1981 (ppc_canonicalize_syscall): Likewise.
1982 (ppc_linux_record_signal): Likewise.
1983 (ppu2spu_prev_register): Likewise.
1984 * ppc-nbsd-nat.c (ppcnbsd_supply_pcb): Likewise.
1985 * ppc-obsd-nat.c (ppcobsd_fetch_registers): Likewise.
1986 (ppcobsd_store_registers): Likewise.
1987 * ppc-ravenscar-thread.c (ppc_ravenscar_generic_fetch_registers):
1989 (ppc_ravenscar_generic_store_registers): Likewise.
1990 * procfs.c (procfs_fetch_registers): Likewise.
1991 (procfs_store_registers): Likewise.
1992 * ravenscar-thread.c (ravenscar_fetch_registers): Likewise.
1993 (ravenscar_store_registers): Likewise.
1994 (ravenscar_prepare_to_store): Likewise.
1995 * record-btrace.c (record_btrace_fetch_registers): Likewise.
1996 * record-full.c (record_full_wait_1): Likewise.
1997 (record_full_registers_change): Likewise.
1998 (record_full_store_registers): Likewise.
1999 (record_full_core_fetch_registers): Likewise.
2000 (record_full_save): Likewise.
2001 (record_full_goto_insn): Likewise.
2002 * regcache.c (regcache_register_size): Likewise.
2003 (get_regcache_arch): Remove.
2004 (regcache_read_pc): Likewise.
2005 * regcache.h (get_regcache_arch): Remove.
2006 * remote-sim.c (gdbsim_fetch_register): Likewise.
2007 (gdbsim_store_register): Likewise.
2008 * remote.c (fetch_register_using_p): Likewise.
2009 (send_g_packet): Likewise.
2010 (remote_prepare_to_store): Likewise.
2011 (store_registers_using_G): Likewise.
2012 * reverse.c (save_bookmark_command): Likewise.
2013 (goto_bookmark_command): Likewise.
2014 * rs6000-aix-tdep.c (branch_dest): Likewise.
2015 * rs6000-nat.c (rs6000_ptrace64): Likewise.
2016 (fetch_register): Likewise.
2017 * rs6000-tdep.c (ppc_supply_reg): Likewise.
2018 (ppc_collect_reg): Likewise.
2019 (ppc_collect_gregset): Likewise.
2020 (ppc_collect_fpregset): Likewise.
2021 (ppc_collect_vsxregset): Likewise.
2022 (ppc_collect_vrregset): Likewise.
2023 (ppc_displaced_step_hw_singlestep): Likewise.
2024 (rs6000_pseudo_register_read): Likewise.
2025 (rs6000_pseudo_register_write): Likewise.
2026 * s390-linux-nat.c (supply_gregset): Likewise.
2027 (fill_gregset): Likewise.
2028 (s390_linux_fetch_inferior_registers): Likewise.
2029 * s390-linux-tdep.c (s390_write_pc): Likewise.
2030 (s390_software_single_step): Likewise.
2031 (s390_all_but_pc_registers_record): Likewise.
2032 (s390_linux_syscall_record): Likewise.
2033 * sentinel-frame.c (sentinel_frame_prev_arch): Likewise.
2034 * sh-nbsd-nat.c (shnbsd_fetch_inferior_registers): Likewise.
2035 (shnbsd_store_inferior_registers): Likewise.
2036 * sh-tdep.c (sh_extract_return_value_nofpu): Likewise.
2037 (sh_extract_return_value_fpu): Likewise.
2038 (sh_store_return_value_nofpu): Likewise.
2039 (sh_corefile_supply_regset): Likewise.
2040 (sh_corefile_collect_regset): Likewise.
2041 * sh64-tdep.c (sh64_extract_return_value): Likewise.
2042 (sh64_store_return_value): Likewise.
2043 * sparc-linux-tdep.c (sparc32_linux_collect_core_fpregset): Likewise.
2044 * sparc-nat.c (sparc_fetch_inferior_registers): Likewise.
2045 (sparc_store_inferior_registers): Likewise.
2046 * sparc-ravenscar-thread.c (register_in_thread_descriptor_p): Likewise.
2047 (sparc_ravenscar_prepare_to_store): Likewise.
2048 * sparc-tdep.c (sparc32_store_arguments): Likewise.
2049 (sparc_analyze_control_transfer): Likewise.
2050 (sparc_step_trap): Likewise.
2051 (sparc_software_single_step): Likewise.
2052 (sparc32_gdbarch_init): Likewise.
2053 (sparc_supply_rwindow): Likewise.
2054 (sparc_collect_rwindow): Likewise.
2055 * sparc64-linux-tdep.c (sparc64_linux_collect_core_fpregset): Likewise.
2056 * sparc64-nbsd-nat.c (sparc64nbsd_supply_gregset): Likewise.
2057 (sparc64nbsd_collect_gregset): Likewise.
2058 (sparc64nbsd_supply_fpregset): Likewise.
2059 (sparc64nbsd_collect_fpregset): Likewise.
2060 * sparc64-tdep.c (sparc64_store_arguments): Likewise.
2061 (sparc64_supply_gregset): Likewise.
2062 (sparc64_collect_gregset): Likewise.
2063 (sparc64_supply_fpregset): Likewise.
2064 (sparc64_collect_fpregset): Likewise.
2065 * spu-linux-nat.c (spu_fetch_inferior_registers): Likewise.
2066 * spu-tdep.c (spu_unwind_sp): Likewise.
2067 (spu2ppu_prev_register): Likewise.
2068 (spu_memory_remove_breakpoint): Likewise.
2069 * stack.c (return_command): Likewise.
2070 * tic6x-tdep.c (tic6x_extract_signed_field): Likewise.
2071 * tracefile-tfile.c (tfile_fetch_registers): Likewise.
2072 * tracefile.c (trace_save_ctf): Likewise.
2073 * windows-nat.c (do_windows_fetch_inferior_registers): Likewise.
2074 (do_windows_store_inferior_registers): Likewise.
2075 (windows_resume): Likewise.
2076 * xtensa-linux-nat.c (fill_gregset): Likewise.
2077 (supply_gregset_reg): Likewise.
2078 * xtensa-tdep.c (xtensa_register_write_masked): Likewise.
2079 (xtensa_register_read_masked): Likewise.
2080 (xtensa_supply_gregset): Likewise.
2081 (xtensa_extract_return_value): Likewise.
2082 (xtensa_store_return_value): Likewise.
2084 2017-10-25 Ulrich Weigand <uweigand@de.ibm.com>
2086 * doublest.c (floatformat_from_string): New function.
2087 * doublest.h (floatformat_from_string): Add prototype.
2089 * std-operator.def (OP_DOUBLE, OP_DECFLOAT): Remove, replace by ...
2090 (OP_FLOAT): ... this.
2091 * expression.h: Do not include "doublest.h".
2092 (union exp_element): Replace doubleconst and decfloatconst by
2093 new element floatconst.
2094 * ada-lang.c (resolve_subexp): Handle OP_FLOAT instead of OP_DOUBLE.
2095 (ada_evaluate_subexp): Likewise.
2096 * eval.c (evaluate_subexp_standard): Handle OP_FLOAT instead of
2097 OP_DOUBLE and OP_DECFLOAT.
2098 * expprint.c (print_subexp_standard): Likewise.
2099 (dump_subexp_body_standard): Likewise.
2100 * breakpoint.c (watchpoint_exp_is_const): Likewise.
2102 * parse.c: Include "dfp.h".
2103 (write_exp_elt_dblcst, write_exp_elt_decfloatcst): Remove.
2104 (write_exp_elt_floatcst): New function.
2105 (operator_length_standard): Handle OP_FLOAT instead of OP_DOUBLE
2107 (operator_check_standard): Likewise.
2108 (parse_float): Do not accept suffix. Take type as input. Return bool.
2109 Return target format buffer instead of host DOUBLEST.
2110 Use floatformat_from_string and decimal_from_string to parse
2111 either binary or decimal floating-point types.
2112 (parse_c_float): Remove.
2113 * parser-defs.h: Do not include "doublest.h".
2114 (write_exp_elt_dblcst, write_exp_elt_decfloatcst): Remove.
2115 (write_exp_elt_floatcst): Add prototype.
2116 (parse_float): Update prototype.
2117 (parse_c_float): Remove.
2119 * c-exp.y: Do not include "dfp.h".
2120 (typed_val_float): Use byte buffer instead of DOUBLEST.
2121 (typed_val_decfloat): Remove.
2123 (FLOAT): Use OP_FLOAT and write_exp_elt_floatcst.
2124 (parse_number): Update to new parse_float interface.
2125 Parse suffixes and determine type before calling parse_float.
2126 Handle decimal and binary FP types the same way.
2128 * d-exp.y (typed_val_float): Use byte buffer instead of DOUBLEST.
2129 (FLOAT_LITERAL): Use OP_FLOAT and write_exp_elt_floatcst.
2130 (parse_number): Update to new parse_float interface.
2131 Parse suffixes and determine type before calling parse_float.
2133 * f-exp.y: Replace dval by typed_val_float.
2134 (FLOAT): Use OP_FLOAT and write_exp_elt_floatcst.
2135 (parse_number): Use parse_float instead of atof.
2137 * go-exp.y (typed_val_float): Use byte buffer instead of DOUBLEST.
2138 (parse_go_float): Remove.
2139 (FLOAT): Use OP_FLOAT and write_exp_elt_floatcst.
2140 (parse_number): Call parse_float instead of parse_go_float.
2141 Parse suffixes and determine type before calling parse_float.
2143 * p-exp.y (typed_val_float): Use byte buffer instead of DOUBLEST.
2144 (FLOAT): Use OP_FLOAT and write_exp_elt_floatcst.
2145 (parse_number): Update to new parse_float interface.
2146 Parse suffixes and determine type before calling parse_float.
2148 * m2-exp.y: Replace dval by byte buffer val.
2149 (FLOAT): Use OP_FLOAT and write_exp_elt_floatcst.
2150 (parse_number): Call parse_float instead of atof.
2152 * rust-exp.y (typed_val_float): Use byte buffer instead of DOUBLEST.
2153 (lex_number): Call parse_float instead of strtod.
2154 (ast_dliteral): Use OP_FLOAT instead of OP_DOUBLE.
2155 (convert_ast_to_expression): Handle OP_FLOAT instead of OP_DOUBLE.
2156 Use write_exp_elt_floatcst.
2157 (unit_testing): Remove static variable.
2158 (rust_type): Do not check unit_testing.
2159 (rust_lex_tests): Do not set uint_testing. Set up dummy rust_parser.
2161 * ada-exp.y (type_float, type_double): Remove.
2162 (typed_val_float): Use byte buffer instead of DOUBLEST.
2163 (FLOAT): Use OP_FLOAT and write_exp_elt_floatcst.
2164 * ada-lex.l (processReal): Use parse_float instead of sscanf.
2166 2017-10-25 Alan Hayward <alan.hayward@arm.com>
2168 * aarch64-tdep.h (enum aarch64_regnum): Remove.
2169 * arch/aarch64.h: New file.
2171 2017-10-24 Ulrich Weigand <uweigand@de.ibm.com>
2173 * dfp.h (decimal_from_string): Use const reference for argument.
2174 * dfp.c (decimal_from_string): Likewise.
2176 2017-10-24 Ulrich Weigand <uweigand@de.ibm.com>
2178 * i387-tdep.c (print_i387_value): Use floatformat_to_string.
2179 * sh64-tdep.c (sh64_do_fp_register): Likewise.
2180 * mips-tdep.c (mips_print_fp_register): Likewise.
2182 2017-10-24 Ulrich Weigand <uweigand@de.ibm.com>
2184 * common/format.h (enum argclass): Replace decfloat_arg by
2185 dec32float_arg, dec64float_arg, and dec128float_arg.
2186 * common/format.c (parse_format_string): Update to return
2187 new decimal float argument classes.
2189 * printcmd.c (printf_decfloat): Rename to ...
2190 (printf_floating): ... this. Add argclass argument, and use it
2191 instead of parsing the format string again. Add support for
2192 binary floating-point values, using floatformat_to_string.
2193 Convert value to the target format if it doesn't already match.
2194 (ui_printf): Call printf_floating instead of printf_decfloat,
2195 also for double_arg / long_double_arg. Pass argclass.
2197 * dfp.c (decimal_to_string): Add format string argument.
2198 * dfp.h (decimal_to_string): Likewise.
2200 * doublest.c (floatformat_to_string): Add format string argument.
2201 * doublest.h (floatformat_to_string): Likewise.
2203 2017-10-24 Ulrich Weigand <uweigand@de.ibm.com>
2205 * doublest.c (floatformat_precision): New routine.
2206 (floatformat_to_string): Likewise.
2207 * doublest.c (floatformat_to_string): Add prototype.
2209 * printcmd.c (print_scalar_formatted): Only call print_floating
2210 on floating-point types.
2211 * valprint.c: Do not include "floatformat.h".
2212 (generic_val_print_decfloat): Remove.
2213 (generic_val_print): Call generic_val_print_float for both
2214 TYPE_CODE_FLT and TYPE_CODE_DECFLOAT.
2215 (print_floating): Use floatformat_to_string. Handle decimal float.
2216 (print_decimal_floating): Remove, merge into floatformat_to_string.
2217 * value.h (print_decimal_floating): Remove.
2219 * Makefile.in: Do not build doublest.c with -Wformat-nonliteral.
2221 2017-10-24 Ulrich Weigand <uweigand@de.ibm.com>
2223 * buildsym.c (end_symtab_get_static_block): Use std::stable_sort.
2225 2017-10-21 Simon Marchi <simon.marchi@ericsson.com>
2227 * memattr.h: Don't include vec.h.
2228 (struct mem_attrib): Initialize fields.
2229 <unknown>: New static method.
2230 (struct mem_region): Add constructors, operator<, initialize
2232 * memattr.c: Include algorithm.
2233 (default_mem_attrib, unknown_mem_attrib): Remove.
2234 (user_mem_region_list): New global.
2235 (target_mem_region_list, mem_region_list): Change type to
2236 std::vector<mem_region>.
2237 (mem_use_target): Now a function.
2238 (target_mem_regions_valid): Change type to bool.
2239 (mem_region_lessthan, mem_region_cmp, mem_region_init): Remove.
2240 (require_user_regions): Adjust.
2241 (require_target_regions): Adjust.
2242 (create_mem_region): Adjust.
2243 (lookup_mem_region): Adjust.
2244 (invalidate_target_mem_regions): Adjust.
2245 (mem_clear): Rename to...
2246 (user_mem_clear): ... this, and adjust.
2247 (mem_command): Adjust.
2248 (info_mem_command): Adjust.
2249 (mem_enable, enable_mem_command, mem_disable,
2250 disable_mem_command): Adjust.
2251 (mem_delete): Adjust.
2252 (delete_mem_command): Adjust.
2253 * memory-map.h (parse_memory_map): Return an std::vector.
2254 * memory-map.c (parse_memory_map): Likewise.
2255 (struct memory_map_parsing_data): Add constructor.
2256 <memory_map>: Point to std::vector.
2257 (memory_map_start_memory): Adjust.
2258 (memory_map_end_memory): Adjust.
2259 (memory_map_end_property): Adjust.
2260 (clear_result): Remove.
2261 * remote.c (remote_memory_map): Return an std::vector.
2262 * target-debug.h (target_debug_print_VEC_mem_region_s__p):
2264 (target_debug_print_mem_region_vector): New.
2265 * target-delegates.c: Regenerate.
2266 * target.h (mem_region_vector): New typedef.
2267 (to_memory_map): Return mem_region_vector.
2268 (target_memory_map): Return an std::vector.
2269 * target.c (target_memory_map): Return an std::vector.
2270 (flash_erase_command): Adjust.
2272 2017-10-21 Simon Marchi <simon.marchi@ericsson.com>
2274 * memory-map.c (struct memory_map_parsing_data) <property_name>:
2275 Change type to std::string.
2276 (memory_map_start_property): Adjust.
2277 (memory_map_end_property): Adjust.
2279 2017-10-21 Simon Marchi <simon.marchi@polymtl.ca>
2281 * infrun.h: Include common/byte-vector.h.
2282 (struct displaced_step_closure): New struct.
2283 (struct buf_displaced_step_closure): New struct.
2284 * infrun.c (displaced_step_closure::~displaced_step_closure):
2285 Provide default implementation.
2286 (displaced_step_clear): Deallocate step closure with delete.
2287 * aarch64-tdep.c (displaced_step_closure): Rename to ...
2288 (aarch64_displaced_step_closure): ... this, extend
2289 displaced_step_closure.
2290 (aarch64_displaced_step_data) <dsc>: Change type to
2291 aarch64_displaced_step_closure.
2292 (aarch64_displaced_step_copy_insn): Adjust to type change, use
2294 (aarch64_displaced_step_fixup): Add cast for displaced step
2296 * amd64-tdep.c (displaced_step_closure): Rename to ...
2297 (amd64_displaced_step_closure): ... this, extend
2298 displaced_step_closure.
2299 <insn_buf>: Change type to std::vector<gdb_byte>.
2301 (fixup_riprel): Change type of DSC parameter, adjust to type
2303 (fixup_displaced_copy): Change type of DSC parameter.
2304 (amd64_displaced_step_copy_insn): Instantiate
2305 amd64_displaced_step_closure.
2306 (amd64_displaced_step_fixup): Add cast for closure type, adjust
2307 to type change of insn_buf.
2308 * arm-linux-tdep.c (arm_linux_cleanup_svc): Change type of
2310 (arm_linux_copy_svc): Likewise.
2311 (cleanup_kernel_helper_return): Likewise.
2312 (arm_catch_kernel_helper_return): Likewise.
2313 (arm_linux_displaced_step_copy_insn): Instantiate
2314 arm_displaced_step_closure.
2315 * arm-tdep.c (arm_pc_is_thumb): Add cast for closure.
2316 (displaced_read_reg): Change type of parameter DSC.
2317 (branch_write_pc): Likewise.
2318 (load_write_pc): Likewise.
2319 (alu_write_pc): Likewise.
2320 (displaced_write_reg): Likewise.
2321 (arm_copy_unmodified): Likewise.
2322 (thumb_copy_unmodified_32bit): Likewise.
2323 (thumb_copy_unmodified_16bit): Likewise.
2324 (cleanup_preload): Likewise.
2325 (install_preload): Likewise.
2326 (arm_copy_preload): Likewise.
2327 (thumb2_copy_preload): Likewise.
2328 (install_preload_reg): Likewise.
2329 (arm_copy_preload_reg): Likewise.
2330 (cleanup_copro_load_store): Likewise.
2331 (install_copro_load_store): Likewise.
2332 (arm_copy_copro_load_store) Likewise.
2333 (thumb2_copy_copro_load_store): Likewise.
2334 (cleanup_branch): Likewise.
2335 (install_b_bl_blx): Likewise.
2336 (arm_copy_b_bl_blx): Likewise.
2337 (thumb2_copy_b_bl_blx): Likewise.
2338 (thumb_copy_b): Likewise.
2339 (install_bx_blx_reg): Likewise.
2340 (arm_copy_bx_blx_reg): Likewise.
2341 (thumb_copy_bx_blx_reg): Likewise.
2342 (cleanup_alu_imm): Likewise.
2343 (arm_copy_alu_imm): Likewise.
2344 (thumb2_copy_alu_imm): Likewise.
2345 (cleanup_alu_reg): Likewise.
2346 (install_alu_reg): Likewise.
2347 (arm_copy_alu_reg): Likewise.
2348 (thumb_copy_alu_reg): Likewise.
2349 (cleanup_alu_shifted_reg): Likewise.
2350 (install_alu_shifted_reg): Likewise.
2351 (arm_copy_alu_shifted_reg): Likewise.
2352 (cleanup_load): Likewise.
2353 (cleanup_store): Likewise.
2354 (arm_copy_extra_ld_st): Likewise.
2355 (install_load_store): Likewise.
2356 (thumb2_copy_load_literal): Likewise.
2357 (thumb2_copy_load_reg_imm): Likewise.
2358 (arm_copy_ldr_str_ldrb_strb): Likewise.
2359 (cleanup_block_load_all): Likewise.
2360 (cleanup_block_store_pc): Likewise.
2361 (cleanup_block_load_pc): Likewise.
2362 (arm_copy_block_xfer): Likewise.
2363 (thumb2_copy_block_xfer): Likewise.
2364 (cleanup_svc): Likewise.
2365 (install_svc): Likewise.
2366 (arm_copy_svc): Likewise.
2367 (thumb_copy_svc): Likewise.
2368 (arm_copy_undef): Likewise.
2369 (thumb_32bit_copy_undef): Likewise.
2370 (arm_copy_unpred): Likewise.
2371 (arm_decode_misc_memhint_neon): Likewise.
2372 (arm_decode_unconditional): Likewise.
2373 (arm_decode_miscellaneous): Likewise.
2374 (arm_decode_dp_misc): Likewise.
2375 (arm_decode_ld_st_word_ubyte): Likewise.
2376 (arm_decode_media): Likewise.
2377 (arm_decode_b_bl_ldmstm): Likewise.
2378 (arm_decode_ext_reg_ld_st): Likewise.
2379 (thumb2_decode_dp_shift_reg): Likewise.
2380 (thumb2_decode_ext_reg_ld_st): Likewise.
2381 (arm_decode_svc_copro): Likewise.
2382 (thumb2_decode_svc_copro): Likewise.
2383 (install_pc_relative): Likewise.
2384 (thumb_copy_pc_relative_16bit): Likewise.
2385 (thumb_decode_pc_relative_16bit): Likewise.
2386 (thumb_copy_pc_relative_32bit): Likewise.
2387 (thumb_copy_16bit_ldr_literal): Likewise.
2388 (thumb_copy_cbnz_cbz): Likewise.
2389 (thumb2_copy_table_branch): Likewise.
2390 (cleanup_pop_pc_16bit_all): Likewise.
2391 (thumb_copy_pop_pc_16bit): Likewise.
2392 (thumb_process_displaced_16bit_insn): Likewise.
2393 (decode_thumb_32bit_ld_mem_hints): Likewise.
2394 (thumb_process_displaced_32bit_insn): Likewise.
2395 (thumb_process_displaced_insn): Likewise.
2396 (arm_process_displaced_insn): Likewise.
2397 (arm_displaced_init_closure): Likewise.
2398 (arm_displaced_step_fixup): Add cast for closure.
2399 * arm-tdep.h: Include infrun.h.
2400 (displaced_step_closure): Rename to ...
2401 (arm_displaced_step_closure): ... this, extend
2402 displaced_step_closure.
2403 <u::svc::copy_svc_os>: Change type of parameter DSC.
2404 <cleanup>: Likewise.
2405 (arm_process_displaced_insn): Likewise.
2406 (arm_displaced_init_closure): Likewise.
2407 (displaced_read_reg): Likewise.
2408 (displaced_write_reg): Likewise.
2409 * i386-linux-tdep.c (i386_linux_displaced_step_copy_insn):
2411 * i386-tdep.h: Include infrun.h.
2412 (i386_displaced_step_closure): New typedef.
2413 * i386-tdep.c (i386_displaced_step_copy_insn): Use
2414 i386_displaced_step_closure.
2415 (i386_displaced_step_fixup): Adjust.
2416 * rs6000-tdep.c (ppc_displaced_step_closure): New typedef.
2417 (ppc_displaced_step_copy_insn): Use ppc_displaced_step_closure
2419 (ppc_displaced_step_fixup): Adjust.
2420 * s390-linux-tdep.c (s390_displaced_step_closure): New typedef.
2421 (s390_displaced_step_copy_insn): Use s390_displaced_step_closure
2423 (s390_displaced_step_fixup): Adjust.
2425 2017-10-21 Simon Marchi <simon.marchi@polymtl.ca>
2427 * interps.h (interp_resume, interp_suspend, interp_set_temp):
2428 Remove declarations.
2430 2017-10-20 Tom Tromey <tom@tromey.com>
2432 * gdb_bfd.c (struct gdb_bfd_data) <included_bfds>: Now a
2434 (gdb_bfd_record_inclusion): Update.
2435 (bfdp): Remove typedef.
2437 2017-10-20 Tom Tromey <tom@tromey.com>
2439 * gdb_bfd.c (gdb_bfd_ref): Use new.
2440 (struct gdb_bfd_data): Add constructor, destructor, and member
2442 (gdb_bfd_unref): Use delete.
2444 2017-10-20 Tom Tromey <tom@tromey.com>
2446 * exec.c (exec_file_attach): Use new_bfd_ref.
2447 * symfile-mem.c (symbol_file_add_from_memory): Use new_bfd_ref.
2448 * gdb_bfd.c (gdb_bfd_open, gdb_bfd_fopen, gdb_bfd_openr)
2449 (gdb_bfd_openw, gdb_bfd_openr_iovec, gdb_bfd_fdopenr): Use
2451 * gdb_bfd.h (new_bfd_ref): New function.
2453 2017-10-20 Pedro Alves <palves@redhat.com>
2455 * main.c (captured_command_loop): Add attribute noinline.
2457 2017-10-19 Simon Marchi <simon.marchi@ericsson.com>
2459 * interps.c (struct interp_factory): Add constructor.
2460 (interp_factory_p): Remove typedef.
2461 (DEF_VEC_P(interp_factory_p)): Remove.
2462 (interpreter_factories): Change type to std::vector.
2463 (interp_factory_register): Adjust.
2464 (interp_lookup): Adjust.
2465 (interpreter_completer): Adjust.
2467 2017-10-19 Tom Tromey <tom@tromey.com>
2469 * break-catch-syscall.c (catch_syscall_completer): Use
2470 std::string, gdb::unique_xmalloc_ptr.
2472 2017-10-19 Tom Tromey <tom@tromey.com>
2474 * infcall.c (call_function_by_hand_dummy): Use std::string.
2476 2017-10-19 Tom Tromey <tom@tromey.com>
2478 * mi/mi-main.c (mi_cmd_execute): Update.
2479 * top.h (prepare_execute_command): Return scoped_value_mark.
2480 * value.h (class scoped_value_mark): Use DISABLE_COPY_AND_ASSIGN.
2481 Add move constructor.
2482 * top.c (prepare_execute_command): Return scoped_value_mark.
2483 (execute_command): Update.
2485 2017-10-19 Pedro Alves <palves@redhat.com>
2487 * xml-support.c (xml_fetch_content_from_file): Check fread's
2490 2017-10-19 Pedro Alves <palves@redhat.com>
2492 * ser-base.c (ser_base_read_error_fd): Delete the file handler if
2494 (handle_error_fd): New function.
2495 (ser_base_async): Add/delete an event loop file handler for
2498 2017-10-19 Pedro Alves <palves@redhat.com>
2500 * xml-support.c (xml_fetch_content_from_file): Don't read in
2501 chunks. Instead use fseek to determine the file's size, and read
2504 2017-11-18 Keith Seitz <keiths@redhat.com>
2506 * c-exp.y (oper): Canonicalize conversion operators of user-defined
2508 Add whitespace to front of type name.
2510 2017-10-18 Keith Seitz <keiths@redhat.com>
2512 * dwarf2read.c (dwarf2_add_typedef): Issue a complaint on unhandled
2513 DW_AT_accessibility.
2515 2017-10-18 Yao Qi <yao.qi@linaro.org>
2517 * features/tic6x-c62x-linux.c: Remove.
2519 2017-10-17 Tom Tromey <tom@tromey.com>
2521 * disasm.c (do_mixed_source_and_assembly_deprecated): Use
2522 gdb::optional, ui_out_emit_list, ui_out_emit_tuple.
2523 (do_mixed_source_and_assembly): Likewise.
2525 2017-10-17 Tom Tromey <tom@tromey.com>
2527 * regcache.c (regcache::xfer_part): Remove assertion.
2529 2017-10-17 Pedro Alves <palves@redhat.com>
2531 * xml-support.c (xml_fetch_content_from_file): Call
2532 unique_ptr::release() instead unique_ptr::get() when passing
2535 2017-10-17 Yao Qi <yao.qi@linaro.org>
2537 * regcache.c (regcache::xfer_part): Remove parameters read and
2538 write, add parameter is_raw. All callers are updated.
2540 2017-10-16 Keith Seitz <keiths@redhat.com>
2542 * c-typeprint.c (enum access_specifier): Moved here from
2544 (output_access_specifier): New function.
2545 (c_type_print_base): Consider typedefs when assessing
2546 whether access labels are needed.
2547 Use output_access_specifier as needed.
2548 Output access specifier for typedefs, if needed.
2549 * dwarf2read.c (dwarf2_add_typedef): Record DW_AT_accessibility.
2550 * gdbtypes.h (struct typedef_field) <is_protected, is_private>: New
2552 (TYPE_TYPEDEF_FIELD_PROTECTED, TYPE_TYPEDEF_FIELD_PRIVATE): New
2555 2017-10-16 Tom Tromey <tom@tromey.com>
2557 * linux-tdep.c (linux_info_proc, linux_find_memory_regions_full)
2558 (linux_fill_prpsinfo, linux_vsyscall_range_raw): Update.
2559 * target.c (target_fileio_read_stralloc): Update.
2560 * sparc64-tdep.c (adi_is_addr_mapped): Update.
2561 * target.h (target_fileio_read_stralloc): Return
2564 2017-10-16 Tom Tromey <tom@tromey.com>
2566 * xml-syscall.c (xml_init_syscalls_info): Update.
2567 * xml-support.c (xinclude_start_include): Update.
2568 (xml_fetch_content_from_file): Return unique_xmalloc_ptr.
2569 * xml-support.h (xml_fetch_another): Return unique_xmalloc_ptr.
2570 (xml_fetch_content_from_file): Likewise.
2571 * osdata.c (get_osdata): Update.
2572 * target.h (target_read_stralloc, target_get_osdata): Return
2574 * solib-aix.c (solib_aix_get_library_list): Update.
2575 * solib-target.c (solib_target_current_sos): Update.
2576 * solib-svr4.c (svr4_current_sos_via_xfer_libraries): Update.
2577 * xml-tdesc.c (fetch_available_features_from_target): Update.
2578 (target_fetch_description_xml): Update.
2579 (file_read_description_xml): Update.
2580 * remote.c (remote_get_threads_with_qxfer, remote_memory_map)
2581 (remote_traceframe_info, btrace_read_config, remote_read_btrace)
2582 (remote_pid_to_exec_file): Update.
2583 * target.c (target_read_stralloc): Return unique_xmalloc_ptr.
2584 (target_get_osdata): Likewise.
2586 2017-10-16 Tom Tromey <tom@tromey.com>
2588 * remote.c (remote_register_number_and_offset): Use std::vector.
2589 (remote_set_syscall_catchpoint): Use gdb::unique_xmalloc_ptr.
2590 (putpkt_binary): Use gdb::def_vector.
2591 (compare_sections_command): Use gdb::byte_vector.
2593 2017-10-16 Tom Tromey <tom@tromey.com>
2595 * ppc-linux-nat.c (hwdebug_insert_point): Use
2596 gdb::unique_xmalloc_ptr, XDUP.
2598 2017-10-16 Tom Tromey <tom@tromey.com>
2600 * probe.c (parse_probes): Use std::string.
2601 (info_probes_for_ops, enable_probes_command)
2602 (disable_probes_command): Remove cleanups.
2604 2017-10-16 Tom Tromey <tom@tromey.com>
2606 * buildsym.c (block_compar): Remove.
2607 (end_symtab_get_static_block): Use std::vector.
2609 2017-10-16 Simon Marchi <simon.marchi@ericsson.com>
2611 * memrange.h (struct mem_range): Define operator< and operator==.
2612 (mem_range_s): Remove.
2613 (DEF_VEC_O (mem_range_s)): Remove.
2614 (normalize_mem_ranges): Change parameter type to std::vector.
2615 * memrange.c (compare_mem_ranges): Remove.
2616 (normalize_mem_ranges): Change parameter type to std::vector,
2617 adjust to vector change.
2618 * exec.c (section_table_available_memory): Return vector, remove
2620 (section_table_read_available_memory): Adjust to std::vector
2622 * remote.c (remote_read_bytes): Adjust to std::vector
2624 * tracepoint.h (traceframe_available_memory): Change parameter
2625 type to std::vector.
2626 * tracepoint.c (traceframe_available_memory): Change parameter
2627 type to std::vector, adjust.
2628 * gdb/mi/mi-main.c (mi_cmd_trace_frame_collected): Adjust to
2630 * gdb/Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
2631 unittests/memrange-selftests.c.
2632 (SUBDIR_UNITTESTS_OBS): Add memrange-selftests.o.
2633 * gdb/unittests/memrange-selftests.c: New file.
2635 2017-10-16 Pedro Alves <palves@redhat.com>
2637 * elfread.c (probe_key_free): Rename range-for variable.
2638 * probe.c (parse_probes_in_pspace, find_probes_in_objfile)
2639 (find_probe_by_pc, collect_probes): Rename range-for variable.
2641 2017-10-16 Yao Qi <yao.qi@linaro.org>
2643 * features/Makefile (XMLTOC): Remove tic6x-*.xml.
2644 * features/tic6x-c62x.c: Remove.
2645 * features/tic6x-c64x-linux.c: Remove.
2646 * features/tic6x-c64x.c: Remove.
2647 * features/tic6x-c64xp-linux.c: Remove.
2648 * features/tic6x-c64xp.c: Remove.
2649 * tic6x-linux-tdep.c (_initialize_tic6x_linux_tdep): Don't call
2650 initialize_tdesc_tic6x_*_linux functions.
2651 * tic6x-tdep.c (_initialize_tic6x_tdep): Don't call
2652 initialize_tdesc_tic6x_* functions.
2654 2017-10-16 Yao Qi <yao.qi@linaro.org>
2656 * features/Makefile (WHICH): Remove tic6x-c64xp, tic6x-c64x
2658 * regformats/tic6x-c62x.dat: Remove.
2659 * regformats/tic6x-c64x.dat: Remove.
2660 * regformats/tic6x-c64xp.dat: Remove.
2662 2017-10-15 Simon Marchi <simon.marchi@ericsson.com>
2664 * tracepoint.c (parse_traceframe_info): Return a unique_ptr
2665 (the !HAVE_LIBEXPAT version).
2667 2017-10-14 Simon Marchi <simon.marchi@ericsson.com>
2669 * nat/linux-osdata.c (struct pid_pgid_entry) <operator<>: Make
2672 2017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
2674 * target.h: Include tracepoint.h.
2675 (enum trace_find_type): Move to tracepoint.h.
2676 (struct target_ops) <to_traceframe_info>: Return a unique ptr.
2677 * tracepoint.h: Don't include target.h
2678 (enum trace_find_type): Move from target.h.
2679 (parse_traceframe_info): Return a unique ptr.
2680 * tracepoint.c (current_traceframe_info): Change type to unique
2682 (free_traceframe_info): Remove.
2683 (clear_traceframe_info): Don't manually free
2684 current_traceframe_info.
2685 (free_result): Remove.
2686 (parse_traceframe_info): Return a unique ptr.
2687 (get_traceframe_info): Adjust to unique ptr.
2688 * ctf.c (ctf_traceframe_info): Return a unique ptr.
2689 * remote.c (remote_traceframe_info): Return a unique ptr.
2690 * tracefile-tfile.c (tfile_traceframe_info): Return a unique
2692 * target-debug.h (target_debug_print_traceframe_info_up): New
2694 * target-delegates.c: Regenerate.
2696 2017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
2698 * memrange.h (struct mem_range): Add constructors.
2699 * tracepoint.h (struct traceframe_info) <memory>: Change type to
2700 std::vector<mem_range>.
2701 * tracepoint.c (free_traceframe_info): Don't manually free
2703 (traceframe_info_start_memory): Adjust to vector change.
2704 (traceframe_available_memory): Likewise.
2705 * tracefile-tfile.c (build_traceframe_info): Likewise.
2706 * ctf.c (ctf_traceframe_info): Likewise.
2708 2017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
2710 * tracepoint.h (struct traceframe_info) <tvars>: Change type to
2712 * tracepoint.c (free_traceframe_info): Deallocate with delete.
2713 (traceframe_info_start_tvar): Adjust to vector change.
2714 (parse_traceframe_info): Allocate with new.
2715 * ctf.c (ctf_traceframe_info): Allocate with new, adjust to
2717 * tracefile-tfile.c (build_traceframe_info): Adjust to vector
2719 tfile_traceframe_info): Allocate with new.
2720 * mi/mi-main.c (mi_cmd_trace_frame_collected): Adjust to vector
2723 2017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
2725 * tracepoint.c (traceframe_info): Rename to...
2726 (current_traceframe_info): ...this.
2727 (clear_traceframe_info): Adjust.
2728 (get_traceframe_info): Adjust.
2730 2017-10-14 Simon Marchi <simon.marchi@ericsson.com>
2732 * nat/linux-osdata.c: Include algorithm.
2733 (compare_processes): Remove.
2734 (struct pid_pgid_entry): New struct.
2735 (linux_xfer_osdata_processgroups): Use std::vector instead of
2738 2017-10-14 Simon Marchi <simon.marchi@ericsson.com>
2740 * objfiles.h: Don't include symfile.h.
2741 (struct partial_symbol): Remove forward-declaration.
2742 (struct objfile) <global_psymbols, static_psymbols>: Change type
2743 to std::vector<partial_symbol *>.
2744 * objfiles.c (objfile::objfile): Don't memset those fields.
2745 (objfile::~objfile): Don't free those fields.
2746 * psympriv.h (struct psymbol_allocation_list): Remove
2747 forward-declaration.
2748 (add_psymbol_to_list): Change psymbol_allocation_list parameter
2750 (start_psymtab_common): Change parameters to std::vector.
2751 * psymtab.c: Include algorithm.
2752 (require_partial_symbols): Call shrink_to_fit.
2753 (find_pc_sect_psymbol): Adjust to vector change.
2754 (match_partial_symbol): Likewise.
2755 (lookup_partial_symbol): Likewise.
2756 (psym_relocate): Likewise.
2757 (dump_psymtab): Likewise.
2758 (recursively_search_psymtabs): Likewise.
2759 (compare_psymbols): Remove.
2760 (sort_pst_symbols): Adjust to vector change.
2761 (start_psymtab_common): Likewise.
2762 (end_psymtab_common): Likewise.
2763 (psymbol_bcache_full): De-constify return value.
2764 (add_psymbol_to_bcache): Likewise.
2765 (extend_psymbol_list): Remove.
2766 (append_psymbol_to_list): Adjust to vector change.
2767 (add_psymbol_to_list): Likewise.
2768 (init_psymbol_list): Likewise.
2769 (maintenance_info_psymtabs): Likewise.
2770 (maintenance_check_psymtabs): Likewise.
2771 * symfile.h (struct psymbol_allocation_list): Remove.
2772 * symfile.c (reread_symbols): Adjust to vector change.
2773 * dbxread.c (start_psymtab): Change type of parameters.
2774 (dbx_symfile_read): Adjust to vector change.
2775 (read_dbx_symtab): Likewise.
2776 (start_psymtab): Change type of parameters.
2777 * dwarf2read.c (dwarf2_build_psymtabs): Adjust to vector change.
2778 (create_partial_symtab): Likewise.
2779 (add_partial_symbol): Likewise.
2780 (write_one_signatured_type): Likewise.
2781 (recursively_write_psymbols): Likewise.
2782 * mdebugread.c (parse_partial_symbols): Likewise.
2783 * xcoffread.c (xcoff_start_psymtab): Change type of parameters.
2784 (scan_xcoff_symtab): Adjust to vector change.
2785 (xcoff_initial_scan): Likewise.
2787 2017-10-13 Simon Marchi <simon.marchi@ericsson.com>
2789 * ada-typeprint.c (print_dynamic_range_bound): Use std::string.
2791 2017-10-13 Yao Qi <yao.qi@linaro.org>
2793 * features/Makefile: Remove tic6x-*-expedite, add tic6x-expedite.
2794 Remove s390x-*-expedite, add s390x-expedite.
2796 2017-10-13 Yao Qi <yao.qi@linaro.org>
2798 * features/s390-gs-linux64.c: Regenerated.
2799 * features/s390x-gs-linux64.c: Regenerated.
2801 2017-10-13 Tom Tromey <tom@tromey.com>
2803 * compile/compile-object-run.c (do_module_cleanup): Use delete.
2804 * solib.c (update_solib_list, reload_shared_libraries_1): Use
2806 * symfile.c (symbol_file_add_with_addrs): Use new.
2807 (symbol_file_add_separate): Update comment.
2808 (syms_from_objfile_1, remove_symbol_file_command): Use delete.
2809 * jit.c (jit_object_close_impl): Use new.
2810 (jit_unregister_code): Use delete.
2811 * objfiles.c (objfile::objfile): Rename from allocate_objfile.
2812 (~objfile): Rename from free_objfile.
2813 (free_objfile_separate_debug, do_free_objfile_cleanup)
2814 (free_all_objfiles, objfile_purge_solibs): Use delete.
2815 * objfiles.h (struct objfile): Add constructor and destructor.
2816 Use DISABLE_COPY_AND_ASSIGN. Add initializers to data members.
2817 (allocate_objfile, free_objfile): Don't declare.
2818 (struct objstats): Add initializers.
2820 2017-10-12 Simon Marchi <simon.marchi@ericsson.com>
2822 * arch-utils.h (simple_displaced_step_copy_insn): Remove.
2823 * arch-utils.c (simple_displaced_step_copy_insn): Remove.
2824 * gdbarch.sh (displaced_step_copy_insn): Adjust comment.
2825 * gdbarch.h: Regenerate.
2826 * i386-linux-tdep.c (i386_linux_displaced_step_copy_insn):
2828 * i386-tdep.c (i386_displaced_step_copy_insn): Adjust comment.
2829 (i386_displaced_step_fixup): Adjust comment.
2830 * rs6000-tdep.c (ppc_displaced_step_copy_insn): Adjust comment.
2832 2017-10-12 Tom Tromey <tom@tromey.com>
2834 * prologue-value.h (pv_area::store_would_trash): Return bool.
2835 (pv_area::find_reg): Likewise.
2836 * prologue-value.c (pv_area::store_would_trash): Return bool.
2837 (pv_area::find_reg): Likewise.
2839 2017-10-12 Tom Tromey <tom@tromey.com>
2841 * s390-linux-tdep.c (s390_store, s390_load)
2842 (s390_check_for_saved, s390_analyze_prologue): Update.
2843 * rx-tdep.c (check_for_saved, rx_analyze_prologue): Update.
2844 * rl78-tdep.c (rl78_analyze_prologue, check_for_saved): Update.
2845 * prologue-value.h (class pv_area): Move from prologue-value.c.
2846 Change names of members. Add constructor, destructor, member
2848 (make_pv_area, free_pv_area, make_cleanup_free_pv_area)
2849 (pv_area_store, pv_area_fetch, pv_area_store_would_trash)
2850 (pv_area_fetch, pv_area_scan): Don't declare.
2851 * prologue-value.c (struct pv_area::area_entry): Now member of
2853 (struct pv_area): Move to prologue-value.h.
2854 (pv_area::pv_area): Rename from make_pv_area.
2855 (pv_area::~pv_area): Rename from free_pv_area.
2856 (do_free_pv_area_cleanup, make_cleanup_free_pv_area): Remove.
2857 (clear_entries, find_entry, overlaps, store_would_trash, store)
2858 (fetch, find_reg, scan): Now member of pv_area.
2859 Remove "area" argument. Update.
2860 * msp430-tdep.c (check_for_saved, msp430_analyze_prologue):
2862 * mn10300-tdep.c (push_reg, check_for_saved)
2863 (mn10300_analyze_prologue): Update.
2864 * mep-tdep.c (is_arg_spill, check_for_saved)
2865 (mep_analyze_prologue): Update.
2866 * m32c-tdep.c (m32c_pv_push, m32c_srcdest_fetch)
2867 (m32c_srcdest_store, m32c_pv_enter, m32c_is_arg_spill)
2868 (m32c_is_struct_return, m32c_analyze_prologue): Update.
2869 * arm-tdep.c (thumb_analyze_prologue, arm_analyze_prologue):
2871 * arc-tdep.c (arc_is_in_prologue, arc_analyze_prologue): Update.
2872 * aarch64-tdep.c (aarch64_analyze_prologue): Update.
2874 2017-10-12 Simon Marchi <simon.marchi@ericsson.com>
2876 * linux-nat.h (linux_nat_set_delete_thread): New declaration.
2877 * linux-nat.c (linux_nat_delete_thread): New variable.
2878 (lwp_free): Invoke linux_nat_delete_thread if set.
2879 (linux_nat_set_delete_thread): New function.
2880 * aarch64-linux-nat.c (_initialize_aarch64_linux_nat): Assign
2881 thread delete callback.
2882 * arm-linux-nat.c (arm_linux_delete_thread): New function.
2883 (_initialize_arm_linux_nat): Assign thread delete callback.
2884 * s390-linux-nat.c (s390_delete_thread): New function.
2885 (_initialize_s390_nat): Assign thread delete callback.
2886 * x86-linux-nat.c (x86_linux_add_target): Likewise.
2887 * nat/aarch64-linux.c (aarch64_linux_delete_thread): New
2889 * nat/aarch64-linux.h (aarch64_linux_delete_thread): New
2891 * nat/x86-linux.c (x86_linux_delete_thread): New function.
2892 * nat/x86-linux.h (x86_linux_delete_thread): New declaration.
2894 2017-10-09 Tom Tromey <tom@tromey.com>
2896 * tui/tui-win.c (tui_set_win_height, parse_scrolling_args): Use
2898 * tui/tui-layout.c (enum tui_status): Use std::string.
2900 2017-10-11 Tom Tromey <tom@tromey.com>
2902 * gdbthread.h (thread_command): Constify.
2903 * inferior.h (detach_command): Constify.
2904 * top.h (set_history, show_history): Constify.
2905 * arm-tdep.c (set_arm_command, show_arm_command): Constify.
2906 * serial.c (serial_set_cmd, serial_show_cmd): Constify.
2907 * bsd-kvm.c (bsd_kvm_cmd): Constify.
2908 * printcmd.c (set_command): Constify.
2909 (non_const_set_command): New function.
2910 * dcache.c (set_dcache_command, show_dcache_command): Constify.
2911 * breakpoint.c (enable_command, disable_command, delete_command)
2912 (catch_command, tcatch_command, set_breakpoint_cmd)
2913 (show_breakpoint_cmd): Constify.
2914 * macrocmd.c (macro_command): Constify.
2915 * infcmd.c (unset_command, kill_command, detach_command)
2916 (info_proc_cmd): Constify.
2917 * i386-tdep.c (set_mpx_cmd, show_mpx_cmd): Constify.
2918 * auto-load.c (show_auto_load_cmd, set_auto_load_cmd)
2919 (info_auto_load_cmd): Constify.
2920 * target-descriptions.c (set_tdesc_cmd, show_tdesc_cmd)
2921 (unset_tdesc_cmd): Constify.
2922 * ada-lang.c (set_ada_command, show_ada_command)
2923 (maint_set_ada_cmd, maint_show_ada_cmd): Constify.
2924 * guile/guile.c (set_guile_command, show_guile_command)
2925 (info_guile_command): Constify.
2926 * tui/tui-win.c (tui_command, set_tui_cmd, show_tui_cmd):
2928 * skip.c (skip_command): Constify.
2929 * compile/compile.c (_initialize_compile): Constify.
2930 * dwarf2read.c (set_dwarf_cmd, show_dwarf_cmd): Constify.
2931 * btrace.c (maint_btrace_cmd, maint_btrace_set_cmd)
2932 (maint_btrace_show_cmd, maint_btrace_pt_set_cmd)
2933 (maint_btrace_pt_show_cmd): Constify.
2934 * remote.c (set_remote_cmd, show_remote_cmd, remote_command):
2936 * python/python.c (user_show_python, user_set_python): Constify.
2937 * mips-tdep.c (set_mips_command, show_mips_command)
2938 (set_mipsfpu_command): Constify.
2939 * record-btrace.c (cmd_record_btrace_start)
2940 (cmd_set_record_btrace, cmd_show_record_btrace)
2941 (cmd_set_record_btrace_bts, cmd_show_record_btrace_bts)
2942 (cmd_set_record_btrace_pt, cmd_show_record_btrace_pt): Constify.
2943 * rs6000-tdep.c (set_powerpc_command, show_powerpc_command):
2945 * symfile.c (overlay_command): Constify.
2946 * spu-tdep.c (set_spu_command, show_spu_command): Constify.
2947 * cli/cli-logging.c (set_logging_command, show_logging_command):
2949 * cli/cli-dump.c (dump_command, append_command)
2950 (srec_dump_command, ihex_dump_command, verilog_dump_command)
2951 (tekhex_dump_command, binary_dump_command)
2952 (binary_append_command): Constify.
2953 * cli/cli-decode.c (struct cmd_list_element): Change type of
2955 * cli/cli-cmds.c (info_command, show_command, set_debug)
2956 (show_debug): Constify.
2957 (show_command): Add non-const overload.
2958 * top.c (set_history, show_history): Constify.
2959 * sh-tdep.c (set_sh_command, show_sh_command): Constify.
2960 * command.h (add_prefix_cmd): Accept a cmd_const_cfunc_ftype.
2961 * target.c (target_command): Constify.
2962 * sparc64-tdep.c (info_adi_command): Constify.
2963 * record-full.c (cmd_record_full_start): Constify.
2964 (set_record_full_command): Constify. Fix typo.
2965 (show_record_full_command): Constify.
2966 * thread.c (thread_command, thread_apply_command): Constify.
2967 * memattr.c (dummy_cmd): Constify.
2968 * value.c (function_command): Constify.
2969 * frame.c (set_backtrace_cmd, show_backtrace_cmd): Constify.
2970 * probe.c (info_probes_command): Constify.
2971 * ser-tcp.c (set_tcp_cmd, show_tcp_cmd): Constify.
2972 * gnu-nat.c (set_task_cmd, show_task_cmd, set_thread_cmd)
2973 (show_thread_cmd, set_thread_default_cmd)
2974 (show_thread_default_cmd): Constify.
2975 (check_empty): Constify.
2976 * tracepoint.c (tfind_command): Constify.
2977 * cp-support.c (maint_cplus_command): Constify.
2978 * windows-tdep.c (info_w32_command): Constify.
2979 * record.c (cmd_record_start, set_record_command)
2980 (show_record_command, info_record_command, cmd_record_goto):
2982 * ravenscar-thread.c (set_ravenscar_command)
2983 (show_ravenscar_command): Constify.
2984 * utils.c (set_internal_problem_cmd, show_internal_problem_cmd):
2986 (add_internal_problem_command): Remove casts.
2987 * arc-tdep.c (maintenance_print_arc_command): Constify.
2988 * valprint.c (set_print, show_print, set_print_raw)
2989 (show_print_raw): Constify.
2990 * maint.c (maintenance_command, maintenance_info_command)
2991 (maintenance_print_command, maintenance_set_cmd)
2992 (maintenance_show_cmd, set_per_command_cmd)
2993 (show_per_command_cmd, maintenance_check_command): Constify.
2994 * language.c (set_check, show_check): Constify.
2995 * typeprint.c (show_print_type, set_print_type): Constify.
2996 * go32-nat.c (go32_info_dos_command): Constify.
2998 2017-10-11 Tom Tromey <tom@tromey.com>
3000 * breakpoint.c (prepare_re_set_context): Remove.
3001 (breakpoint_re_set_one): Update. Don't use cleanups.
3002 (breakpoint_re_set): Use scoped_restore, std::string, and
3003 scoped_restore_current_language.
3005 2017-10-11 Tom Tromey <tom@tromey.com>
3007 * breakpoint.c (commands_command_1): Use std::string.
3008 (cleanup_executing_breakpoints): Remove.
3009 (bpstat_do_actions_1): Use scoped_restore.
3010 (bpstat_check_watchpoint): Use std::string.
3011 (decode_static_tracepoint_spec): Likewise.
3012 (break_range_command): Likewise.
3013 (watch_command_1): Likewise.
3014 (compare_breakpoints): Change argument types.
3015 (clear_command): Use std::vector.
3016 (cleanup_executing_breakpoints): Remove.
3017 (update_global_location_list): Use unique_xmalloc_ptr.
3018 (strace_command): Remove unused declaration.
3020 2017-10-11 John Baldwin <jhb@FreeBSD.org>
3022 * Makefile.in (ALLDEPFILES): Add arm-fbsd-nat.c.
3023 * NEWS: Mention new FreeBSD/arm native configuration.
3024 * configure.host: Add arm*-*-freebsd*.
3025 * configure.nat: Likewise.
3026 * arm-fbsd-nat.c: New file.
3028 2017-10-11 John Baldwin <jhb@FreeBSD.org>
3030 * Makefile.in (ALL_TARGET_OBS): Add arm-fbsd-tdep.o.
3031 (ALLDEPFILES): Add arm-fbsd-tdep.c.
3032 * NEWS: Mention new FreeBSD/arm target.
3033 * configure.tgt: Add arm*-*-freebsd*.
3034 * arm-fbsd-tdep.c: New file.
3035 * arm-fbsd-tdep.h: New file.
3037 2017-10-11 Maciej W. Rozycki <macro@imgtec.com>
3039 * linux-tdep.c (linux_make_corefile_notes): Remove call to
3040 `gdbarch_elfcore_write_linux_prpsinfo'.
3041 * gdbarch.sh (elfcore_write_linux_prpsinfo): Remove architecture
3043 (elf_internal_linux_prpsinfo): Remove declaration.
3044 * gdbarch.h: Regenerate.
3045 * gdbarch.c: Regenerate.
3047 2017-10-11 Maciej W. Rozycki <macro@imgtec.com>
3049 * ppc-linux-tdep.c (ppc_linux_init_abi): Remove call to
3050 `set_gdbarch_elfcore_write_linux_prpsinfo'.
3052 2017-10-11 Pedro Alves <palves@redhat.com>
3054 * breakpoint.c (reattach_breakpoints): Delete.
3055 * breakpoint.h (reattach_breakpoints): Delete.
3057 2017-10-11 Simon Marchi <simon.marchi@ericsson.com>
3059 * symfile.c (registered_sym_fns): Make struct, not typedef.
3060 (DEF_VEC_O (registered_sym_fns)): Remove.
3061 (symtab_fns): Change type to std::vector.
3062 (add_symtab_fns): Adjust.
3063 (find_sym_fns): Adjust.
3065 2017-10-11 Anton Kolesov <Anton.Kolesov@synopsys.com>
3067 * arc-tdep.c (arc_gdbarch_init): Pass proper cpu value to disassembler.
3068 * arc-tdep.h (arc_arch_is_em): New function.
3069 (arc_arch_is_hs): Likewise.
3071 2017-10-11 Egeyar Bagcioglu <egeyar.bagcioglu@oracle.com>
3073 * macrotab.h (macro_lookup_inclusion): Remove unnecessary
3074 parentheses in the declaration.
3075 (macro_lookup_inclusion): Likewise.
3076 (macro_lookup_definition): Likewise.
3077 * p-lang.h (pascal_builtin_types): Likewise.
3078 * tui/tui-data.c (tui_win_list): Likewise.
3079 * tui/tui-data.h (tui_win_list): Likewise.
3080 * utils.h (make_cleanup_free_section_addr_info): Likewise.
3082 2017-10-11 Mark Rages <markrages@gmail.com>
3084 * target-memory.c (block_boundaries): Fix for block address not
3085 aligned on block size.
3087 2017-10-10 Pedro Alves <palves@redhat.com>
3088 Tom Tromey <tom@tromey.com>
3090 * breakpoint.c (struct captured_breakpoint_query_args)
3091 (do_captured_breakpoint_query, gdb_breakpoint_query): Delete.
3092 (print_breakpoint): New.
3093 * breakpoint.h (print_breakpoint): Declare.
3094 * common/common-exceptions.h (enum return_reason): Remove
3095 references to catch_exceptions.
3096 * exceptions.c (catch_exceptions, catch_exceptions_with_msg):
3098 * exceptions.h (catch_exceptions_ftype, catch_exceptions)
3099 (catch_exception_ftype, catch_exceptions_with_msg): Delete.
3101 * gdbthread.h (thread_select): Declare.
3102 * mi/mi-cmd-break.c: Don't include gdb.h.
3103 (breakpoint_notify): Use print_breakpoint.
3104 * mi/mi-cmd-catch.c: Don't include gdb.h.
3105 * mi/mi-interp.c: Don't include gdb.h.
3106 (mi_print_breakpoint_for_event): New.
3107 (mi_breakpoint_created, mi_breakpoint_modified): Use
3108 mi_print_breakpoint_for_event.
3109 * mi/mi-main.c: Don't include gdb.h.
3110 (mi_cmd_thread_select): Parse the global thread ID here. Use
3111 thread_select instead of gdb_thread_select.
3112 (mi_cmd_thread_list_ids): Output "thread-ids" tuple here instead
3113 of using gdb_list_thread_ids.
3114 * remote-fileio.c (do_remote_fileio_request): Change type. Reply
3116 (remote_fileio_request): Use TRY/CATCH instead of
3118 * symfile-mem.c (struct symbol_file_add_from_memory_args)
3119 (symbol_file_add_from_memory_wrapper): Delete.
3120 (add_vsyscall_page): Use TRY/CATCH instead of catch_exceptions.
3121 * thread.c: Don't include gdb.h.
3122 (do_captured_list_thread_ids, gdb_list_thread_ids): Delete.
3123 (thread_alive): Use thread_select.
3124 (do_captured_thread_select): Delete, parts salvaged as ...
3125 (thread_select): ... this new function.
3126 (gdb_thread_select): Delete.
3128 2017-10-10 Pedro Alves <palves@redhat.com>
3129 Tom Tromey <tom@tromey.com>
3131 * breakpoint.c (breakpoint_cond_eval): Change return type to bool
3133 (WP_DELETED, WP_VALUE_CHANGED, WP_VALUE_NOT_CHANGED, WP_IGNORE):
3134 No longer macros. Instead ...
3135 (enum wp_check_result): They're now values of this new
3137 (watchpoint_check): Change return type to wp_check_result and
3138 parameter type to bpstat.
3139 (bpstat_check_watchpoint): Use TRY/CATCH instead of catch_errors.
3140 (bpstat_check_breakpoint_conditions): Use TRY/CATCH instead of
3141 catch_errors. Reverse logic of watchpoint_check call.
3142 (breakpoint_re_set_one): Now returns void and takes a breakpoint
3143 pointer as parameter.
3144 (breakpoint_re_set): Use TRY/CATCH instead of catch_errors.
3145 * common/common-exceptions.c (throw_exception_sjlj): Update
3146 comments to avoid mentioning catch_errors.
3147 * exceptions.c (catch_errors): Delete.
3148 * exceptions.h: Update comments to avoid mentioning catch_errors.
3149 (catch_errors_ftype, catch_errors): Delete.
3150 * infrun.c (normal_stop): Use TRY/CATCH instead of catch_errors.
3151 (hook_stop_stub): Delete.
3152 (restore_selected_frame): Change return type to void, and
3153 parameter type to const frame_id &.
3154 (restore_infcall_control_state): Use TRY/CATCH instead of
3156 * main.c (captured_command_loop): Return void and remove
3157 parameter. Remove references to catch_errors.
3158 (captured_main): Use TRY/CATCH instead of catch_errors.
3159 * objc-lang.c (objc_submethod_helper_data)
3160 (find_objc_msgcall_submethod_helper): Delete.
3161 (find_objc_msgcall_submethod): Use TRY/CATCH instead of
3163 * record-full.c (record_full_message): Return void.
3164 (record_full_message_args, record_full_message_wrapper): Delete.
3165 (record_full_message_wrapper_safe): Return bool and use TRY/CATCH
3166 instead of catch_errors.
3167 * solib-aix.c (solib_aix_open_symbol_file_object): Change
3168 parameter type to int.
3169 * solib-darwin.c (open_symbol_file_object): Ditto.
3170 * solib-dsbt.c (open_symbol_file_object): Ditto.
3171 * solib-frv.c (open_symbol_file_object): Ditto.
3172 * solib-svr4.c (open_symbol_file_object): Ditto.
3173 * solib-target.c (solib_target_open_symbol_file_object): Ditto.
3174 * solib.c (update_solib_list): Use TRY/CATCH instead of
3176 * solist.h (struct target_so_ops) <open_symbol_file_object>:
3178 * symmisc.c (struct print_symbol_args): Remove.
3179 (dump_symtab_1): Use TRY/CATCH instead of catch_errors.
3180 (print_symbol): Change type.
3181 * windows-nat.c (handle_load_dll, handle_unload_dll): Return void
3182 and remove parameters.
3183 (catch_errors): New.
3184 (get_windows_debug_event): Adjust.
3186 2017-10-09 Tom Tromey <tom@tromey.com>
3188 * mi/mi-main.c (free_splay_tree): Remove.
3189 (list_available_thread_groups): Use splay_tree_up.
3190 * common/gdb_splay_tree.h: New file.
3192 2017-10-09 Tom Tromey <tom@tromey.com>
3194 * mi/mi-main.c (do_nothing): Remove.
3195 (list_available_thread_groups): Update.
3197 2017-10-09 Pedro Alves <palves@redhat.com>
3199 * infrun.c (handle_inferior_event_1) <TARGET_WAITKIND_EXECD>: Skip
3200 reading registers when switching context.
3202 2017-10-09 John Baldwin <jhb@FreeBSD.org>
3204 * fbsd-nat.c (fbsd_siginfo_size): Use gdbarch_long_bit.
3205 (fbsd_convert_siginfo): Likewise.
3206 * fbsd-tdep.c (fbsd_core_xfer_siginfo): Likewise.
3208 2017-10-09 Simon Marchi <simon.marchi@polymtl.ca>
3210 * configure.ac (try_guile_versions): Remove guile-2.2.
3211 * configure: Regenerate.
3213 2017-10-09 Tom Tromey <tom@tromey.com>
3215 * Makefile.in (COMPILE.post, POSTCOMPILE): Restore $(basename).
3216 (COMPILE.pre): Use $(CXX).
3218 2017-10-09 Pedro Alves <palves@redhat.com>
3220 * cp-support.c (cp_remove_params): Return a gdb::unique_xmalloc_ptr.
3222 (overload_list_add_symbol): Adjust to use gdb::unique_xmalloc_ptr.
3223 * cp-support.h (cp_remove_params): Now returns a
3224 gdb::unique_xmalloc_ptr.
3225 * dwarf2read.c (find_slot_in_mapped_hash): Now returns bool.
3226 Adjust to cp_remove_params returning a gdb::unique_xmalloc_ptr.
3227 * psymtab.c (psymtab_search_name): Adjust to cp_remove_params
3228 returning a gdb::unique_xmalloc_ptr.
3229 (lookup_partial_symbol): Adjust to use gdb::unique_xmalloc_ptr.
3230 * stack.c (find_frame_funname): Adjust to cp_remove_params
3231 returning a gdb::unique_xmalloc_ptr.
3233 2017-10-08 Tom Tromey <tom@tromey.com>
3235 * dwarf2read.c (dwarf2_get_dwz_file): Use
3236 gdb::unique_xmalloc_ptr.
3237 (find_slot_in_mapped_hash): Likewise.
3238 (dwarf2_physname): Likewise.
3239 (create_dwo_unit_in_dwp_v1): Use std::string.
3240 (create_dwo_unit_in_dwp_v2): Likewise.
3241 (lookup_dwo_cutu): Likewise.
3242 (inherit_abstract_dies): Use std::vector.
3243 (read_array_type): Likewise.
3244 (dwarf_decode_macros): Remove unused declaration.
3245 (unsigned_int_compar): Remove.
3246 (dwarf2_build_psymtabs_hard): Use scoped_restore.
3247 (psymtabs_addrmap_cleanup): Remove.
3249 2017-10-08 Tom Tromey <tom@tromey.com>
3251 * frame-unwind.c (frame_unwind_try_unwinder): Update.
3252 * frame.h (frame_cleanup_after_sniffer): Declare.
3253 (frame_prepare_for_sniffer): Return void.
3254 * frame.c (frame_cleanup_after_sniffer): No longer static. Change
3256 (frame_prepare_for_sniffer): Return void.
3258 2017-10-08 Tom Tromey <tom@tromey.com>
3260 * utils.h (make_cleanup_value_free): Remove.
3261 * utils.c (do_value_free, struct cleanup): Remove.
3262 * dwarf2loc.c (dwarf2_evaluate_loc_desc_full) <DWARF_VALUE_STACK>:
3264 * value.h (struct value_deleter): New.
3265 (gdb_value_up): New typedef.
3267 2017-10-08 Tom Tromey <tom@tromey.com>
3269 * symtab.c (free_search_symbols, do_free_search_symbols_cleanup)
3270 (make_cleanup_free_search_symbols): Remove.
3271 (search_symbols): Return std::vector.
3272 (symbol_search::compare_search_syms): Now member of
3273 symbol_search. Change arguments.
3274 (sort_search_symbols_remove_dups): Change arguments. Rewrite.
3275 (symtab_symbol_info, rbreak_command): Update.
3276 * symtab.h (struct symbol_search) <next>: Remove.
3278 (symbol_search::operator<): New function.
3279 (symbol_search::operator==): New function.
3280 (search_symbols): Remove std::vector.
3281 (free_search_symbols, make_cleanup_free_search_symbols): Remove.
3282 (symbol_search::compare_search_syms): Declare.
3284 2017-10-06 Yao Qi <yao.qi@linaro.org>
3286 * Makefile.in (ALL_64_TARGET_OBS): Replace aarch64-insn.o with
3287 arch/aarch64-insn.o.
3289 * configure.tgt: Replace aarch64-insn.o with arch/aarch64-insn.o.
3291 2017-10-06 Yao Qi <yao.qi@linaro.org>
3293 * Makefile.in (ALL_TARGET_OBS): Replace arm.o, arm-get-next-pcs.o,
3294 and arm-linux.o with arch/arm.o, arch/arm-get-next-pcs.o and
3295 arch/arm-linux.o respectively.
3296 * configure.tgt: Likewise.
3298 2017-10-06 Yao Qi <yao.qi@linaro.org>
3300 * Makefile.in (ALL_TARGET_OBS): Rename i386.o to arch/i386.o.
3301 * configure.tgt (i386_tobjs): Replace i386.o with arch/i386.o.
3303 2017-10-06 Pedro Alves <palves@redhat.com>
3305 * windows-nat.c: Include <algorithm>.
3307 2017-10-06 Yao Qi <yao.qi@linaro.org>
3309 * configure.tgt (i386_tobjs): New variable.
3310 (amd64_tobjs): New variable.
3311 Set $cpu_obs and $os_obs.
3313 2017-10-06 Yao Qi <yao.qi@linaro.org>
3315 * Makefile.in (CONFIG_SRC_SUBDIR): New.
3316 (ALL_64_TARGET_OBS): Replace amd64.o with arch/amd64.o.
3317 (clean): Remove object files and dependency files.
3318 (distclean): Remove the directory.
3319 * configure.ac: Invoke AC_CONFIG_COMMANDS.
3320 * configure: Re-generated.
3321 * configure.tgt: Replace amd64.o with arch/amd64.o.
3323 2017-10-05 Jose E. Marchesi <jose.marchesi@oracle.com>
3326 * arm-tdep.c (arm_decode_misc_memhint_neon): Fix decoding of CPS
3329 2017-10-05 Pedro Alves <palves@redhat.com>
3331 * linux-nat.c (linux_child_follow_fork): When following the parent
3332 and detaching the child, consult the parent thread's architecture
3333 instead of the child's.
3335 2017-10-05 Ulrich Weigand <uweigand@de.ibm.com>
3337 * ax.h: Do not include "doublest.h".
3338 (union agent_val): Remove.
3340 2017-10-05 Ulrich Weigand <uweigand@de.ibm.com>
3342 * dfp.h (MAX_DECIMAL_STRING): Move to dfp.c.
3343 (decimal_to_string): Return std::string object.
3344 (decimal_from_string): Accept std::string object. Return bool.
3345 (decimal_from_integral, decimal_from_doublest): Remove.
3346 (decimal_from_longest): Add prototype.
3347 (decimal_from_ulongest): Likewise.
3348 (decimal_to_longest): Likewise.
3349 (decimal_from_doublest): Likewise.
3350 * dfp.c: Do not include "gdbtypes.h" or "value.h".
3351 (MAX_DECIMAL_STRING): Move here.
3352 (decimal_to_string): Return std::string object.
3353 (decimal_from_string): Accept std::string object. Return bool.
3354 (decimal_from_integral): Remove, replace by ...
3355 (decimal_from_longest, decimal_from_ulongest): ... these new functions.
3356 (decimal_to_longest): New function.
3357 (decimal_from_floating): Remove, replace by ...
3358 (decimal_from_doublest): ... this new function.
3359 (decimal_to_doublest): Update to new decimal_to_string interface.
3361 * value.c (unpack_long): Use decimal_to_longest.
3362 * valops.c (value_cast): Use decimal_from_doublest instead of
3363 decimal_from_floating. Use decimal_from_[u]longest isntead of
3364 decimal_from_integral.
3365 * valarith.c (value_args_as_decimal): Likewise.
3366 * valprint.c (print_decimal_floating): Update to new
3367 decimal_to_string interface.
3368 * printcmd.c (printf_decfloat): Likewise.
3369 * c-exp.y (parse_number): Update to new decimal_from_string interface.
3371 2017-10-05 Ulrich Weigand <uweigand@de.ibm.com>
3373 * doublest.h: Do not include "floatformat.h". Remove stale comments.
3374 * gdbtypes.c: Include "floatformat.h".
3375 * value.c: Likewise.
3376 * m68k-tdep.c: Likewise.
3378 * findvar.c: Do not include "floatformat.h".
3379 * amd64-darwin-tdep.c: Likewise.
3380 * arm-linux-tdep.c: Likewise.
3381 * i386-darwin-tdep.c: Likewise.
3382 * i387-tdep.c: Likewise.
3383 * m68k-linux-tdep.c: Likewise.
3384 * mep-tdep.c: Likewise.
3385 * mips-tdep.c: Likewise.
3386 * nios2-tdep.c: Likewise.
3387 * s390-linux-tdep.c: Likewise.
3388 * sparc-obsd-tdep.c: Likewise.
3389 * sparc-tdep.c: Likewise.
3390 * sparc64-tdep.c: Likewise.
3391 * spu-tdep.c: Likewise.
3392 * tic6x-tdep.c: Likewise.
3393 * tilegx-tdep.c: Likewise.
3394 * vax-tdep.c: Likewise.
3395 * xstormy16-tdep.c: Likewise.
3396 * xtensa-tdep.c: Likewise.
3398 * top.c: Do not include "doublest.h".
3399 * aarch64-tdep.c: Likewise.
3400 * alpha-tdep.c: Likewise.
3401 * arm-linux-tdep.c: Likewise.
3402 * m68k-linux-tdep.c: Likewise.
3403 * tilegx-tdep.c: Likewise.
3404 * xstormy16-tdep.c: Likewise.
3406 2017-10-05 John Baldwin <jhb@FreeBSD.org>
3408 * mips-fbsd-tdep.c (MIPS_INST_ADDIU_A0_SP_N32): Define.
3409 (mipsn32_fbsd_sigframe): Define.
3410 (mips_fbsd_init_abi): Install mipsn32_fbsd_sigframe unwinder
3411 for FreeBSD/mipsn32.
3413 2017-10-05 John Baldwin <jhb@FreeBSD.org>
3415 * fbsd-tdep.c (fbsd_print_auxv_entry): Handle AT_EHDRFLAGS and
3418 2017-10-05 Tristan Gingold <tgingold@free.fr>
3420 * MAINTAINERS (Misc): Update my email address.
3422 2017-10-04 Pedro Alves <palves@redhat.com>
3424 * remote.c (get_remote_arch_state): New 'gdbarch' parameter. Use
3425 it instead of target_gdbarch.
3426 (get_remote_state, get_remote_packet_size): Adjust
3427 get_remote_arch_state calls, passing down target_gdbarch
3429 (packet_reg_from_regnum, packet_reg_from_pnum): New parameter
3430 'gdbarch' and use it instead of target_gdbarch.
3431 (get_memory_packet_size): Adjust get_remote_arch_state calls,
3432 passing down target_gdbarch explicitly.
3433 (struct stop_reply) <arch>: New field.
3434 (remote_parse_stop_reply): Use the stopped thread's architecture,
3435 not the current inferior's. Save the architecture in the
3437 (process_stop_reply): Use the stop reply's architecture.
3438 (process_g_packet, remote_fetch_registers)
3439 (remote_prepare_to_store, store_registers_using_G)
3440 (remote_store_registers): Adjust get_remote_arch_state calls,
3441 using the regcache's architecture.
3442 (remote_get_trace_status): Adjust get_remote_arch_state calls,
3443 passing down target_gdbarch explicitly.
3444 * spu-multiarch.c (spu_thread_architecture): Defer to the target
3445 beneath instead of calling target_gdbarch.
3446 * target.c (default_thread_architecture): Use the specified
3447 inferior's architecture, instead of the current inferior's
3448 architecture (via target_gdbarch).
3450 2017-10-04 Pedro Alves <palves@redhat.com>
3452 * regcache.c (get_thread_arch_regcache): Remove null_ptid special
3454 (regcache_print): Handle !target_has_registers here instead.
3456 2017-10-04 Pedro Alves <palves@redhat.com>
3458 * frame.c (create_test_frame): Delete.
3459 * frame.h (create_test_frame): Delete.
3460 * gdbarch-selftests.c: Include gdbthread.h and target.h.
3461 (class regcache_test): Delete.
3462 (test_target_has_registers, test_target_has_stack)
3463 (test_target_has_memory, test_target_prepare_to_store)
3464 (test_target_store_registers): New functions.
3465 (test_target_ops): New class.
3466 (register_to_value_test): Error out if there's already a
3467 process_stratum (or higher) target pushed. Create a fuller mock
3468 environment, with mock target_ops, inferior, address space, thread
3470 * progspace.c (struct address_space): Move to ...
3471 * progspace.h (struct address_space): ... here.
3472 * regcache.h (regcache::~regcache, regcache::raw_write)
3473 [GDB_SELF_TEST]: No longer virtual.
3475 2017-10-04 Simon Marchi <simon.marchi@ericsson.com>
3477 * mi/mi-main.c (list_available_thread_groups): Reverse filter logic.
3479 2017-10-04 Pedro Alves <palves@redhat.com>
3481 * guile/scm-breakpoint.c (gdbscm_breakpoint_commands): Move code
3482 out of 'between TRY and CATCH'.
3484 2017-10-04 Pedro Alves <palves@redhat.com>
3486 * cli/cli-cmds.c (complete_command): Add missing END_CATCH.
3487 * common/common-exceptions.h (TRY): Open an outermost scope.
3488 Expand intro comment.
3490 (END_CATCH): Close the outermost scope.
3491 * completer.c (complete_line_internal): Add missing END_CATCH.
3493 2017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
3495 * NEWS (Changes since GDB 8.0): Add entry about new
3496 'set-cwd-on-gdbserver' feature.
3497 (New remote packets): Add entry for QSetWorkingDir.
3498 * common/common-inferior.h (set_inferior_cwd): New prototype.
3499 * infcmd.c (set_inferior_cwd): Remove "static".
3500 (show_cwd_command): Expand text to include remote debugging.
3501 * remote.c: Add PACKET_QSetWorkingDir.
3502 (remote_protocol_features) <QSetWorkingDir>: New entry for
3503 PACKET_QSetWorkingDir.
3504 (extended_remote_set_inferior_cwd): New function.
3505 (extended_remote_create_inferior): Call
3506 "extended_remote_set_inferior_cwd".
3507 (_initialize_remote): Call "add_packet_config_cmd" for
3510 2017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
3512 * NEWS (New commands): Mention "set/show cwd".
3513 * cli/cli-cmds.c (_initialize_cli_cmds): Mention "set cwd" on
3514 "cd" command's help text.
3515 * common/common-inferior.h (get_inferior_cwd): New prototype.
3516 * infcmd.c (inferior_cwd_scratch): New global variable.
3517 (set_inferior_cwd): New function.
3518 (get_inferior_cwd): Likewise.
3519 (set_cwd_command): Likewise.
3520 (show_cwd_command): Likewise.
3521 (_initialize_infcmd): Add "set/show cwd" commands.
3522 * inferior.h (class inferior) <cwd>: New field.
3523 * nat/fork-inferior.c: Include "gdb_tilde_expand.h".
3524 (fork_inferior): Change inferior's cwd before its execution.
3525 * windows-nat.c (windows_create_inferior): Pass inferior's cwd
3528 2017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
3530 * Makefile.in (SFILES): Add gdb_tilde_expand.c.
3531 (HFILES_NO_SRCDIR): Add gdb_tilde_expand.h.
3532 (COMMON_OBS): Add gdb_tilde_expand.o.
3533 * common/gdb_tilde_expand.c: New file.
3534 * common/gdb_tilde_expand.h: Likewise.
3536 2017-10-03 Maciej W. Rozycki <macro@imgtec.com>
3538 * gdbarch.sh (objfile): Remove duplicate declaration.
3539 * gdbarch.h: Regenerate.
3541 2017-10-03 Tom Tromey <tom@tromey.com>
3543 * utils.c (internal_vproblem): Use string_vprintf.
3545 2017-10-03 Tom Tromey <tom@tromey.com>
3547 * printcmd.c (info_symbol_command): Use std::string.
3549 2017-10-03 Tom Tromey <tom@tromey.com>
3551 * top.c (gdb_safe_append_history): Use std::string.
3553 2017-10-03 Tom Tromey <tom@tromey.com>
3555 * event-top.c (stdin_event_handler): Update.
3556 * main.c (captured_main_1): Update.
3557 * top.h (make_delete_ui_cleanup): Remove.
3558 (struct ui): Add constructor and destructor.
3559 (new_ui, delete_ui): Remove.
3560 * top.c (make_delete_ui_cleanup): Remove.
3561 (new_ui_command): Use std::unique_ptr.
3562 (delete_ui_cleanup): Remove.
3563 (ui::ui): Rename from new_ui. Update.
3565 (ui::~ui): Rename from delete_ui. Update.
3567 2017-10-03 Tom Tromey <tom@tromey.com>
3569 * symfile.c (load_progress): Use gdb::byte_vector.
3571 2017-10-03 Tom Tromey <tom@tromey.com>
3573 * mi/mi-main.c (mi_cmd_trace_frame_collected): Remove unused
3575 * printcmd.c (x_command): Remove unused declaration.
3576 * symfile.c (symbol_file_command): Remove unused declaration.
3578 2017-10-03 Tom Tromey <tom@tromey.com>
3580 * utils.c (internal_vproblem): Use std::string.
3581 (defaulted_query): Likewise.
3583 2017-10-03 Tom Tromey <tom@tromey.com>
3585 * guile/scm-ports.c (ioscm_with_output_to_port_worker): Update.
3586 * top.c (execute_command_to_string): Update.
3587 * utils.c (make_cleanup_restore_page_info): Remove.
3588 (do_restore_page_info_cleanup): Remove.
3589 (set_batch_flag_and_restore_page_info):
3591 (make_cleanup_restore_page_info): Remove.
3592 (set_batch_flag_and_make_cleanup_restore_page_info): Remove.
3593 (~set_batch_flag_and_restore_page_info): New
3594 (make_cleanup_restore_uinteger): Remove.
3595 (make_cleanup_restore_integer): Remove.
3596 (struct restore_integer_closure): Remove.
3597 (restore_integer): Remove.
3598 * utils.h (struct set_batch_flag_and_restore_page_info): New
3600 (set_batch_flag_and_make_cleanup_restore_page_info): Remove.
3601 (make_cleanup_restore_page_info): Remove.
3602 (make_cleanup_restore_uinteger) Remove.
3603 (make_cleanup_restore_integer) Remove.
3605 2017-10-03 Tom Tromey <tom@tromey.com>
3607 * record-full.h (record_full_gdb_operation_disable_set): Return
3608 scoped_restore_tmpl<int>.
3609 * infrun.c (adjust_pc_after_break): Update.
3610 (handle_signal_stop): Update.
3611 * record-full.c (record_full_gdb_operation_disable_set): Return
3612 scoped_restore_tmpl<int>.
3613 (record_full_wait_1, record_full_insert_breakpoint)
3614 (record_full_remove_breakpoint, record_full_save)
3615 (record_full_goto_insn): Update.
3617 2017-10-02 Tom Tromey <tom@tromey.com>
3620 * rust-lang.c (rust_val_print_str): New function.
3621 (val_print_struct): Call it.
3622 (rust_subscript): Preserve name of slice type.
3624 2017-10-02 Tom Tromey <tom@tromey.com>
3626 * rust-lang.c (rust_subscript): Handle slices in
3627 EVAL_AVOID_SIDE_EFFECTS case.
3629 2017-10-02 Tom Tromey <tom@tromey.com>
3631 * rust-lang.c (rust_slice_type_p): Recognize &str as a slice type.
3633 2017-10-02 Tom Tromey <tom@tromey.com>
3635 * rust-lang.h (rust_slice_type): Add "extern".
3637 2017-10-02 Tom Tromey <tom@tromey.com>
3638 Pedro Alves <palves@redhat.com>
3640 * ada-lang.h (ada_exc_info::operator<): Make const.
3641 (ada_exc_info::operator==): Make const.
3642 * ada-lang.c (ada_exc_info::operator<, ada_exc_info::operator==):
3645 2017-09-29 Tom Tromey <tom@tromey.com>
3647 * target.c (read_whatever_is_readable): Change type of "result".
3649 (free_memory_read_result_vector): Remove.
3650 (read_memory_robust): Change return type. Update.
3651 * mi/mi-main.c (mi_cmd_data_read_memory_bytes): Update. Use
3652 bin2hex, std::string.
3653 * target.h (memory_read_result_s): Remove typedef.
3654 (free_memory_read_result_vector): Remove.
3655 (read_memory_robust): Return std::vector.
3657 2017-09-29 Tom Tromey <tom@tromey.com>
3659 * mi/mi-main.c (captured_mi_execute_command): Use scope_restore.
3661 2017-09-29 Tom Tromey <tom@tromey.com>
3663 * mi/mi-cmd-info.c (mi_cmd_info_ada_exceptions): Update.
3664 * ada-lang.h (struct ada_exc_info): Remove typedef. Declare
3665 operator< and operator==.
3666 (ada_exceptions_list): Return a std::vector.
3667 * ada-lang.c (ada_exc_info::operator<): Rename from
3668 compare_ada_exception_info.
3669 (ada_exc_info::operator==): New.
3670 (sort_remove_dups_ada_exceptions_list): Change type of
3672 (ada_add_standard_exceptions, ada_add_exceptions_from_frame)
3673 (ada_add_global_exceptions): Likewise.
3674 (ada_exceptions_list_1): Return a std::vector.
3675 (ada_exceptions_list): Likewise.
3677 2017-09-29 Tom Tromey <tom@tromey.com>
3679 * mi/mi-main.c (struct print_one_inferior_data) <inferiors>: Now a
3681 (print_one_inferior): Update.
3682 (free_vector_of_ints): Remove.
3683 (list_available_thread_groups): Change "ids" to std::set.
3684 (mi_cmd_list_thread_groups): Update.
3685 (struct collect_cores_data) <core>: Now a std::set.
3686 (collect_cores): Update.
3688 (print_one_inferior): Update.
3690 2017-09-29 Tom Tromey <tom@tromey.com>
3692 * mi/mi-main.c (mi_execute_cli_command): Use std::string.
3693 (mi_execute_async_cli_command): Likewise.
3694 (mi_cmd_trace_frame_collected): Use field_fmt.
3696 2017-09-29 Tom Tromey <tom@tromey.com>
3698 * mi/mi-main.c (mi_cmd_data_write_memory_bytes): Use
3701 2017-09-29 Tom Tromey <tom@tromey.com>
3703 * mi/mi-parse.c (mi_parse): Remove unused declaration.
3705 2017-09-29 Tom Tromey <tom@tromey.com>
3707 * mi/mi-cmd-disas.c (mi_cmd_disassemble): Don't copy "oarg".
3709 2017-09-29 Tom Tromey <tom@tromey.com>
3711 * varobj.h (varobj_gen_name): Return std::string.
3712 * varobj.c (varobj_gen_name): Return std::string.
3713 * mi/mi-cmd-var.c (mi_cmd_var_create): Use std::string.
3714 (mi_cmd_var_delete): Don't copy "name".
3716 2017-09-29 Tom Tromey <tom@tromey.com>
3718 * mi/mi-cmd-break.c (mi_argv_to_format): Return std::string.
3719 (mi_cmd_break_insert_1): Update.
3721 2017-09-29 Tom Tromey <tom@tromey.com>
3723 * target.h (make_scoped_defer_target_commit_resume): Update.
3724 * target.c (make_scoped_defer_target_commit_resume): Rename from
3725 make_cleanup_defer_target_commit_resume. Return a
3727 * infrun.c (proceed): Use make_scoped_defer_target_commit_resume.
3729 2017-09-29 Tom Tromey <tom@tromey.com>
3731 * main.c (captured_main_1): Remove unused declaration.
3732 * spu-multiarch.c (parse_spufs_run): Remove unused declaration.
3734 2017-09-29 Tom Tromey <tom@tromey.com>
3736 * symtab.c (search_symbols): Remove unused outer cleanup.
3737 (make_source_files_completion_list): Remove unused declaration.
3739 2017-09-29 Tom Tromey <tom@tromey.com>
3741 * mt-tdep.c (mt_push_dummy_call): Use gdb::byte_vector.
3743 2017-09-29 Tom Tromey <tom@tromey.com>
3745 * xstormy16-tdep.c (xstormy16_push_dummy_call): Use
3748 2017-09-29 Tom Tromey <tom@tromey.com>
3750 * complaints.c (vcomplaint): Use std::string.
3752 2017-09-29 Tom Tromey <tom@tromey.com>
3754 * tracepoint.c (trace_variable_command): Use std::string.
3755 (encode_actions_1): Remove unused declarations.
3756 (create_tsv_from_upload): Use std::string.
3758 2017-09-29 Tom Tromey <tom@tromey.com>
3760 * cp-support.c (gdb_demangle): Use std::string.
3762 2017-09-29 Tom Tromey <tom@tromey.com>
3764 * stack.c (parse_frame_specification): Use std::string
3765 (info_frame_command): Use gdb::unique_xmalloc_ptr.
3767 2017-09-29 Tom Tromey <tom@tromey.com>
3769 * tilegx-tdep.c (tilegx_push_dummy_call): Use gdb::byte_vector.
3771 2017-09-29 Tom Tromey <tom@tromey.com>
3773 * utils.c (vfprintf_maybe_filtered): Use std::string.
3774 (vfprintf_unfiltered): Likewise.
3776 2017-09-29 Tom Tromey <tom@tromey.com>
3778 * event-top.c (top_level_prompt): Return std::string.
3779 (display_gdb_prompt): Update.
3781 2017-09-29 Tom Tromey <tom@tromey.com>
3783 * unittests/common-utils-selftests.c (format): New function.
3784 (string_vprintf_tests): New function.
3785 (_initialize_common_utils_selftests): Register new tests.
3786 * common/common-utils.c (string_vprintf): New function.
3787 * common/common-utils.h (string_vprintf): Declare.
3789 2017-09-29 Pedro Alves <palves@redhat.com>
3791 * common/rsp-low.c (unpack_varlen_hex): Constify.
3792 * common/rsp-low.h (unpack_varlen_hex): Constify.
3793 * linux-nat.c (linux_child_static_tracepoint_markers_by_strid):
3795 * remote.c (remote_set_permissions, read_ptid)
3796 (remote_current_thread, remote_get_threads_with_qthreadinfo)
3797 (remote_static_tracepoint_marker_at)
3798 (remote_static_tracepoint_markers_by_strid)
3799 (stop_reply_extract_thread, remote_parse_stop_reply): Constify.
3800 * tracepoint.c (parse_trace_status, parse_tracepoint_status)
3801 (parse_tracepoint_definition, parse_tsv_definition)
3802 (parse_static_tracepoint_marker_definition): Constify.
3803 * tracepoint.h (parse_static_tracepoint_marker_definition)
3804 (parse_trace_status, parse_tracepoint_status)
3805 (parse_tracepoint_definition, parse_tsv_definition): Constify.
3807 2017-09-29 Pedro Alves <palves@redhat.com>
3809 * remote.c (target_buf, target_buf_size): Delete.
3810 (remote_get_noisy_reply): Remove buf_p and sizeof_buf parameters.
3811 Use the connection's packet buffer instead.
3812 All callers adjusted.
3813 (_initialize_remote): Remove references to target_buf and
3816 2017-09-28 Pedro Alves <palves@redhat.com>
3818 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
3819 unittests/common-utils-selftests.c.
3820 (SUBDIR_UNITTESTS_OBS): Add common-utils-selftests.o.
3821 (COMMON_OBS): Remove utils-selftests.o.
3822 * utils-selftests.c: Move to ...
3823 * unittests/common-utils-selftests.c: ... here and rename self
3824 test to "string_printf".
3826 2017-09-28 Alexander Shaposhnikov <alexander.v.shaposhnikov@gmail.com> (tiny patch)
3828 * dwarf2read.c (open_and_init_dwp_file): Protect against dwp_file
3829 having NULL cus or tus.
3831 2017-09-27 Ulrich Weigand <uweigand@de.ibm.com>
3833 * arm-tdep.c: (convert_from_extended): Remove.
3834 (convert_to_extended): Likewise.
3835 (arm_extract_return_value): Use convert_typed_floating.
3836 (arm_store_return_value): Likewise.
3838 * sh-tdep.h (struct gdbarch_tdep): Add sh_littlebyte_bigword_type.
3839 * sh-tdep.c: Do not include "floatformat.h".
3840 (sh_littlebyte_bigword_type): New function.
3841 (sh_register_convert_to_virtual): Use convert_typed_floating.
3842 (sh_register_convert_to_raw): Likewise.
3843 * sh64-tdep.c: (struct gdbarch_tdep): Add sh_littlebyte_bigword_type.
3844 (sh64_littlebyte_bigword_type): New function.
3845 (sh64_extract_return_value): Use convert_typed_floating.
3846 (sh64_register_convert_to_virtual): Likewise.
3847 (sh64_register_convert_to_raw): Likewise.
3849 2017-09-27 Ulrich Weigand <uweigand@de.ibm.com>
3851 * doublest.h (floatformat_from_type): Move to gdbtypes.h.
3852 * doublest.c (floatformat_from_type): Move to gdbtypes.c.
3854 * gdbtypes.h (union type_specific): Make field floatformat hold
3855 just a single struct floatformat, not an array.
3856 (floatformat_from_type): Move here.
3857 * gdbtypes.c (floatformat_from_type): Move here. Update to
3858 changed TYPE_FLOATFORMAT definition.
3859 (verify_floatformat): Update to changed TYPE_FLOATFORMAT.
3860 (recursive_dump_type): Likewise.
3861 (init_float_type): Install correct floatformat for byte order.
3862 (arch_float_type): Likewise.
3864 2017-09-27 Ulrich Weigand <uweigand@de.ibm.com>
3866 * gdbtypes.c (init_type): Change incoming argument from
3867 length-in-bytes to length-in-bits. Assert length is a
3868 multiple of TARGET_CHAR_BITS.
3869 (arch_type, arch_flags_type): Likewise.
3870 (init_integer_type): Update call to init_type.
3871 (init_character_type): Likewise.
3872 (init_boolean_type): Likewise.
3873 (init_float_type): Likewise.
3874 (init_decfloat_type): Likewise.
3875 (init_complex_type): Likewise.
3876 (init_pointer_type): Likewise.
3877 (objfile_type): Likewise.
3878 (arch_integer_type): Update call to arch_type.
3879 (arch_character_type): Likewise.
3880 (arch_boolean_type): Likewise.
3881 (arch_float_type): Likewise.
3882 (arch_decfloat_type): Likewise.
3883 (arch_complex_type): Likewise.
3884 (arch_pointer_type): Likewise.
3885 (gdbtypes_post_init): Likewise.
3887 * dwarf2read.c (dwarf2_init_float_type): Update call to init_type.
3888 (read_base_type): Likewise.
3889 * mdebugread.c (basic_type): Likewise.
3890 * stabsread.c (dbx_init_float_type): Likewise.
3891 (rs6000_builtin_type): Likewise.
3892 (read_range_type): Likewise. Also, fix call to init_integer_type
3893 with erroneous length argument.
3895 * ada-lang.c (ada_language_arch_info): Update call to arch_type.
3896 * d-lang.c (build_d_types): Likewise.
3897 * f-lang.c (build_fortran_types): Likewise.
3898 * go-lang.c (build_go_types): Likewise.
3899 * opencl-lang.c (build_opencl_types): Likewise.
3900 * jit.c (finalize_symtab): Likewise.
3901 * gnu-v3-abi.c (build_gdb_vtable_type): Likewise.
3902 (build_std_type_info_type): Likewise.
3903 * target-descriptions.c (tdesc_gdb_type): Likewise. Also,
3904 update call to arch_flags_type.
3906 * linux-tdep.c (linux_get_siginfo_type_with_fields): Update call to
3908 * fbsd-tdep.c (fbsd_get_siginfo_type): Likewise.
3909 * windows-tdep.c (windows_get_tlb_type): Likewise.
3911 * avr-tdep.c (avr_gdbarch_init): Update call to arch_type.
3912 * ft32-tdep.c (ft32_gdbarch_init): Likewise.
3913 * m32c-tdep.c (make_types): Likewise.
3914 * rl78-tdep.c (rl78_gdbarch_init): Likewise.
3915 (rl78_psw_type): Update call to arch_flags_type.
3916 * m68k-tdep.c (m68k_ps_type): Update call to arch_flags_type.
3917 * rx-tdep.c (rx_psw_type): Likewise.
3918 (rx_fpsw_type): Likewise.
3919 * sparc-tdep.c (sparc_psr_type): Likewise.
3920 (sparc_fsr_type): Likewise.
3921 * sparc64-tdep.c (sparc64_pstate_type): Likewise.
3922 (sparc64_ccr_type): Likewise.
3923 (sparc64_fsr_type): Likewise.
3924 (sparc64_fprs_type): Likewise.
3926 2017-09-27 Tom Tromey <tom@tromey.com>
3928 * findcmd.c (find_command): Constify.
3930 2017-09-27 Tom Tromey <tom@tromey.com>
3932 * ada-tasks.c (task_command_1, task_command): Constify.
3934 2017-09-27 Tom Tromey <tom@tromey.com>
3936 * symtab.c (maintenance_print_symbol_cache)
3937 (maintenance_flush_symbol_cache)
3938 (maintenance_print_symbol_cache_statistics): Constify.
3940 2017-09-27 Tom Tromey <tom@tromey.com>
3942 * inferior.c (detach_inferior_command, kill_inferior_command)
3943 (inferior_command): Constify.
3945 2017-09-27 Tom Tromey <tom@tromey.com>
3947 * regcache.c (regcache_print, maintenance_print_registers)
3948 (maintenance_print_raw_registers)
3949 (maintenance_print_cooked_registers)
3950 (maintenance_print_register_groups)
3951 (maintenance_print_remote_registers): Constify.
3953 2017-09-27 Tom Tromey <tom@tromey.com>
3955 * printcmd.c (map_display_numbers, undisplay_command)
3956 (enable_disable_display_command, enable_display_command)
3957 (disable_display_command): Constify.
3959 2017-09-27 Tom Tromey <tom@tromey.com>
3961 * breakpoint.h (delete_command): Don't declare.
3962 * breakpoint.c (delete_command, enable_once_command)
3963 (enable_count_command, enable_delete_command, breakpoint_1)
3964 (maintenance_info_breakpoints, stopin_command, stopat_command)
3965 (delete_command, delete_trace_command, save_breakpoints)
3966 (save_breakpoints_command, save_tracepoints_command): Constify.
3968 2017-09-27 Tom Tromey <tom@tromey.com>
3970 * macrocmd.c (macro_expand_command, macro_expand_once_command)
3971 (skip_ws, extract_identifier, macro_define_command)
3972 (macro_undef_command, macro_list_command): Constify.
3974 2017-09-27 Tom Tromey <tom@tromey.com>
3976 * infcmd.c (environment_info, set_environment_command)
3977 (unset_environment_command, path_info, info_proc_cmd_1)
3978 (info_proc_cmd_mappings, info_proc_cmd_stat)
3979 (info_proc_cmd_status, info_proc_cmd_cwd, info_proc_cmd_cmdline)
3980 (info_proc_cmd_exe, info_proc_cmd_all): Constify.
3982 2017-09-27 Tom Tromey <tom@tromey.com>
3984 * i386-tdep.c (i386_mpx_info_bounds, i386_mpx_set_bounds):
3987 2017-09-27 Tom Tromey <tom@tromey.com>
3989 * symfile-mem.c (add_symbol_file_from_memory_command): Constify.
3991 2017-09-27 Tom Tromey <tom@tromey.com>
3993 * demangle.c (demangle_command): Constify.
3995 2017-09-27 Tom Tromey <tom@tromey.com>
3997 * progspace.c (maintenance_info_program_spaces_command):
4000 2017-09-27 Tom Tromey <tom@tromey.com>
4002 * compile/compile.c (check_raw_argument, compile_file_command)
4003 (compile_code_command, compile_print_command): Constify.
4005 2017-09-27 Tom Tromey <tom@tromey.com>
4007 * reggroups.c (maintenance_print_reggroups): Constify.
4009 2017-09-27 Tom Tromey <tom@tromey.com>
4011 * dwarf2read.c (save_gdb_index_command): Constify.
4013 2017-09-27 Tom Tromey <tom@tromey.com>
4015 * stap-probe.c (info_probes_stap_command): Constify.
4017 2017-09-27 Tom Tromey <tom@tromey.com>
4019 * fork-child.c (unset_exec_wrapper_command): Constify.
4021 2017-09-27 Tom Tromey <tom@tromey.com>
4023 * btrace.c (get_uint, get_context_size, no_chunk)
4024 (maint_btrace_packet_history_cmd)
4025 (maint_btrace_clear_packet_history_cmd, maint_btrace_clear_cmd)
4026 (maint_info_btrace_cmd): Constify.
4028 2017-09-27 Tom Tromey <tom@tromey.com>
4030 * reverse.c (delete_bookmark_command): Constify.
4032 2017-09-27 Tom Tromey <tom@tromey.com>
4034 * remote.c (set_memory_packet_size)
4035 (set_memory_write_packet_size, show_memory_write_packet_size)
4036 (set_memory_read_packet_size, show_memory_read_packet_size)
4037 (compare_sections_command, packet_command, remote_put_command)
4038 (remote_get_command, remote_delete_command): Constify.
4040 2017-09-27 Tom Tromey <tom@tromey.com>
4042 * mips-tdep.c (show_mipsfpu_command, set_mipsfpu_single_command)
4043 (set_mipsfpu_double_command, set_mipsfpu_none_command)
4044 (set_mipsfpu_auto_command): Constify.
4046 2017-09-27 Tom Tromey <tom@tromey.com>
4048 * cli/cli-cmds.h (cd_command): Constify.
4049 * cli/cli-cmds.c (cd_command): Constify.
4051 2017-09-27 Tom Tromey <tom@tromey.com>
4053 * thread.c (thread_name_command, thread_find_command): Constify.
4055 2017-09-27 Tom Tromey <tom@tromey.com>
4057 * probe.c (enable_probes_command, disable_probes_command):
4060 2017-09-27 Tom Tromey <tom@tromey.com>
4062 * symfile.c (symbol_file_command): Constify.
4063 * gdbcore.h (deprecated_file_changed_hook): Constify.
4064 * exec.c (deprecated_file_changed_hook, exec_file_command)
4065 (file_command): Constify.
4066 * defs.h (symbol_file_command): Constify.
4068 2017-09-27 Tom Tromey <tom@tromey.com>
4070 * remote-fileio.c (set_system_call_allowed)
4071 (show_system_call_allowed): Constify.
4073 2017-09-27 Tom Tromey <tom@tromey.com>
4075 * tracepoint.c (delete_trace_variable_command)
4076 (tfind_end_command, tfind_start_command, tfind_pc_command)
4077 (tfind_tracepoint_command, tfind_line_command)
4078 (tfind_range_command, tfind_outside_command): Constify.
4080 2017-09-27 Tom Tromey <tom@tromey.com>
4082 * ax-gdb.c (maint_agent_printf_command, agent_command)
4083 (agent_eval_command): Constify.
4085 2017-09-27 Tom Tromey <tom@tromey.com>
4087 * tracepoint.c (info_scope_command): Constify.
4088 * python/python.c (gdbpy_decode_line): Constify.
4089 * python/py-breakpoint.c (bppy_init): Constify.
4090 * mi/mi-cmd-break.c (mi_cmd_break_insert_1): Constify.
4091 * location.h: (new_linespec_location)
4092 (string_to_event_location_basic, string_to_event_location):
4094 * location.c (new_linespec_location)
4095 (string_to_event_location_basic, string_to_event_location):
4097 * linespec.h (decode_line_with_current_source)
4098 (decode_line_with_last_displayed, linespec_lex_to_end): Constify.
4099 * linespec.c (linespec_lex_to_end)
4100 (decode_line_with_current_source)
4101 (decode_line_with_last_displayed): Constify.
4102 * guile/scm-breakpoint.c (gdbscm_register_breakpoint_x):
4104 * cli/cli-cmds.c (edit_command, list_command): Constify.
4105 * breakpoint.h (until_break_command, watch_command_wrapper)
4106 (awatch_command_wrapper, rwatch_command_wrapper)
4107 (init_ada_exception_breakpoint): Constify.
4108 * breakpoint.c (break_command_1, dprintf_command)
4109 (break_range_command, watch_command_wrapper)
4110 (rwatch_command_wrapper, awatch_command_wrapper)
4111 (until_break_command, init_ada_exception_breakpoint)
4112 (strace_marker_create_sals_from_location, trace_command)
4113 (ftrace_command, strace_command, struct tracepoint): Constify.
4114 * ax-gdb.c (agent_command_1): Constify.
4115 * ada-lang.c (ada_exception_sal): Constify.
4117 2017-09-27 Tom Tromey <tom@tromey.com>
4119 * record.c (cmd_record_delete, cmd_record_stop, cmd_record_save)
4120 (cmd_record_goto_begin, cmd_record_goto_end, get_insn_number)
4121 (get_context_size, no_chunk, get_insn_history_modifiers)
4122 (cmd_record_insn_history, get_call_history_modifiers)
4123 (cmd_record_call_history): Constify.
4125 2017-09-27 Tom Tromey <tom@tromey.com>
4127 * source.c (show_substitute_path_command)
4128 (unset_substitute_path_command, set_substitute_path_command):
4131 2017-09-27 Tom Tromey <tom@tromey.com>
4133 * typeprint.c (maintenance_print_type): Constify.
4134 * maint.c (maintenance_dump_me, maintenance_demangle)
4135 (maintenance_time_display, maintenance_info_sections)
4136 (maintenance_print_statistics, maintenance_deprecate)
4137 (maintenance_undeprecate): Constify.
4138 (maintenance_do_deprecate): Constify. Use std::string.
4139 (maintenance_selftest): Constify.
4140 * gdbtypes.h (maintenance_print_type): Constify.
4142 2017-09-27 Tom Tromey <tom@tromey.com>
4144 * hppa-tdep.c (unwind_command): Constify.
4146 2017-09-27 Tom Tromey <tom@tromey.com>
4148 * target-descriptions.c (unset_tdesc_filename_cmd)
4149 (maint_print_c_tdesc_cmd, maintenance_check_xml_descriptions):
4152 2017-09-27 Tom Tromey <tom@tromey.com>
4154 * dummy-frame.c (maintenance_print_dummy_frames): Constify.
4156 2017-09-27 Tom Tromey <tom@tromey.com>
4158 * tui/tui.c (tui_enable_command, tui_disable_command): Constify.
4160 2017-09-27 Tom Tromey <tom@tromey.com>
4162 * tui/tui-regs.c (tui_reg_command): Constify.
4164 2017-09-27 Tom Tromey <tom@tromey.com>
4166 * skip.c (skip_file_command, skip_function_command)
4167 (skip_enable_command, skip_disable_command, skip_delete_command):
4170 2017-09-27 Tom Tromey <tom@tromey.com>
4172 * record-btrace.c (cmd_record_btrace_bts_start)
4173 (cmd_record_btrace_pt_start): Constify.
4175 2017-09-27 Tom Tromey <tom@tromey.com>
4177 * symmisc.c (maintenance_print_symbols)
4178 (maintenance_print_msymbols, maintenance_print_objfiles)
4179 (maintenance_info_symtabs, maintenance_check_symtabs)
4180 (maintenance_expand_symtabs, maintenance_info_line_tables):
4183 2017-09-27 Tom Tromey <tom@tromey.com>
4185 * top.c (new_ui_command): Constify.
4187 2017-09-27 Tom Tromey <tom@tromey.com>
4189 * symfile.c (add_symbol_file_command)
4190 (remove_symbol_file_command, list_overlays_command)
4191 (map_overlay_command, unmap_overlay_command)
4192 (overlay_auto_command, overlay_manual_command)
4193 (overlay_off_command, overlay_load_command): Constify.
4195 2017-09-27 Tom Tromey <tom@tromey.com>
4197 * spu-tdep.c (info_spu_event_command, info_spu_signal_command)
4198 (info_spu_mailbox_command, info_spu_dma_command)
4199 (info_spu_proxydma_command): Constify.
4201 2017-09-27 Tom Tromey <tom@tromey.com>
4203 * cli/cli-logging.c (set_logging_on, set_logging_off): Constify.
4205 2017-09-27 Tom Tromey <tom@tromey.com>
4207 * cli/cli-script.c (user_defined_command): Constify.
4209 2017-09-27 Tom Tromey <tom@tromey.com>
4211 * cli/cli-dump.c (dump_memory_command, dump_value_command)
4212 (dump_srec_memory, dump_srec_value, dump_ihex_memory)
4213 (dump_ihex_value, dump_verilog_memory, dump_verilog_value)
4214 (dump_tekhex_memory, dump_tekhex_value, dump_binary_memory)
4215 (dump_binary_value, append_binary_memory, append_binary_value):
4217 (struct dump_context) <func>: Constify.
4218 (add_dump_command): Update.
4220 2017-09-27 Tom Tromey <tom@tromey.com>
4222 * cli/cli-cmds.c (show_version, show_configuration)
4223 (source_command, show_user): Constify.
4225 2017-09-27 Tom Tromey <tom@tromey.com>
4227 * target.c (maintenance_print_target_stack): Constify.
4229 2017-09-27 Tom Tromey <tom@tromey.com>
4231 * interps.c (interpreter_exec_cmd): Constify.
4233 2017-09-27 Tom Tromey <tom@tromey.com>
4235 * record-full.c (cmd_record_full_restore): Constify.
4237 2017-09-27 Tom Tromey <tom@tromey.com>
4239 * memattr.c (enable_mem_command, disable_mem_command)
4240 (delete_mem_command): Constify.
4242 2017-09-27 Tom Tromey <tom@tromey.com>
4244 * value.c (show_convenience): Constify.
4246 2017-09-27 Tom Tromey <tom@tromey.com>
4248 * gdbcore.h (core_file_command): Update.
4249 * corefile.c (core_file_command): Constify.
4251 2017-09-27 Tom Tromey <tom@tromey.com>
4253 * user-regs.c (maintenance_print_user_registers): Constify.
4255 2017-09-27 Tom Tromey <tom@tromey.com>
4257 * cp-namespace.c (maintenance_cplus_namespace): Constify.
4259 2017-09-27 Tom Tromey <tom@tromey.com>
4261 * cp-support.c (first_component_command): Constify.
4263 2017-09-27 Tom Tromey <tom@tromey.com>
4265 * psymtab.c (maintenance_print_psymbols)
4266 (maintenance_info_psymtabs, maintenance_check_psymtabs):
4269 2017-09-27 Tom Tromey <tom@tromey.com>
4271 * windows-tdep.c (display_tib): Constify.
4273 2017-09-27 Tom Tromey <tom@tromey.com>
4275 * linux-fork.c (delete_checkpoint_command)
4276 (detach_checkpoint_command): Constify.
4278 2017-09-27 Tom Tromey <tom@tromey.com>
4280 * cp-abi.c (set_cp_abi_cmd, show_cp_abi_cmd): Constify.
4282 2017-09-27 Tom Tromey <tom@tromey.com>
4284 * arc-tdep.c (dump_arc_instruction_command): Constify.
4286 2017-09-27 Tom Tromey <tom@tromey.com>
4288 * valprint.c (set_radix, show_radix): Constify.
4290 2017-09-27 Tom Tromey <tom@tromey.com>
4292 * dtrace-probe.c (info_probes_dtrace_command): Constify.
4294 2017-09-27 Tom Tromey <tom@tromey.com>
4296 * command.h (not_just_help_class_command): Update.
4297 * cli/cli-decode.h (not_just_help_class_command): Update.
4298 * cli/cli-decode.c (not_just_help_class_command): Constify.
4300 2017-09-27 Tom Tromey <tom@tromey.com>
4302 * gdb_bfd.c (maintenance_info_bfds): Constify.
4304 2017-09-27 Tom Tromey <tom@tromey.com>
4306 * cli/cli-decode.c (add_cmd, set_cmd_cfunc): New function
4308 (do_add_cmd): Rename from add_cmd. Don't call set_cmd_cfunc.
4309 (do_const_cfunc): New function.
4310 (cmd_cfunc_eq): New overload.
4311 (cli_user_command_p): Check do_const_cfunc.
4312 * cli/cli-decode.h (struct cmd_list_element) <function>: New field
4314 * command.h (add_cmd): Add const overload and no-function
4316 (set_cmd_cfunc): Add const overload.
4317 (cmd_const_cfunc_ftype): Declare.
4318 (cmd_cfunc_eq): Add const overload.
4319 * breakpoint.c, cli-cmds.c, cli-dump.c, guile/scm-cmd.c,
4320 python/py-cmd.c, target.c, tracepoint.c: Use no-function add_cmd
4323 2017-09-27 Tom Tromey <tom@tromey.com>
4325 * macroexp.c (get_next_token_for_substitution): New function.
4326 (substitute_args): Call it. Check for __VA_OPT__.
4328 2017-09-26 Walfred Tedeschi <walfred.tedeschi@intel.com>
4329 Pedro Alves <palves@redhat.com>
4331 * dwarf2read.c (dwarf2_cu): Remove field producer_is_icc and add
4332 producer_is_icc_lt_14.
4333 (producer_is_icc_lt_14): New function.
4334 (check_producer): Add code for checking version of ICC.
4335 (producer_is_icc): Move to producer.c.
4336 (read_structure_type): Restrict ICC workaround to ICC<14.
4337 * producer.c: Include selftest.h.
4338 (producer_is_icc, producer_parsing_tests, _initialize_producer):
4340 * producer.h (producer_is_icc): New declaration.
4342 2017-09-26 Walfred Tedeschi <walfred.tedeschi@intel.com>
4344 * Makefile.in (SFILES): Add producer.c.
4345 (COMMON_OBS): Add producer.o
4346 * amd64-tdep.c (producer.h): Add new include.
4347 * dwarf2read.c (producer.h): Add new include.
4348 * producer.c: New file.
4349 * producer.h: New file.
4350 * utils.c (producer_is_gcc, producer_is_gcc_ge_4): Move to
4352 * utils.h (producer_is_gcc, producer_is_gcc_ge_4): Move to
4355 2017-09-26 Matthias Klose <doko@ubuntu.com>
4357 * configure.ac: Search ncursesw before ncurses.
4358 Check ncursesw/ncurses.h before ncurses/ncurses.h.
4359 * gdb_curses.h: Include <ncursesw/ncurses.h>
4360 * config.in, configure: Regenerate.
4362 2017-09-26 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
4365 * configure.host <*-*-solaris2.[01], *-*-solaris2.[2-9]*>: Mark as
4367 Use gdb_host sol2 for i[34567]86-*-solaris2*, x86_64-*-solaris2*.
4368 Remove i386sol2 support.
4369 * configure.nat <i386sol2>: Remove.
4370 <sol2-64>: Fold into ...
4372 Move common settings to default section.
4374 * configure.tgt <i[34567]86-*-solaris2.1[0-9]*,
4375 x86_64-*-solaris2.1[0-9]*>: Rename to ...
4376 <i[34567]86-*-solaris2*, x86_64-*-solaris2*>: ... this.
4377 <i[34567]86-*-solaris*>: Remove.
4378 <sparc-*-solaris2.[0-6], sparc-*-solaris2.[0-6].*>: Remove.
4380 * configure.ac: Remove wctype in libw check.
4381 (_MSE_INT_H): Don't define on Solaris 7-9.
4382 <solaris*>: Remove libthread_db.so.1 check.
4383 * configure: Regenerate.
4384 * config.in: Regenerate.
4386 * proc-service.c: Remove PROC_SERVICE_IS_OLD handling.
4387 (gdb_ps_prochandle_t, gdb_ps_read_buf_t, gdb_ps_write_buf_t)
4388 (gdb_ps_size_t): Remove.
4389 Use base types in users.
4390 * sol-thread.c: Likewise, also for gdb_ps_addr_t.
4392 * NEWS (Changes since GDB 8.0): Document Solaris 2.0-9 removal.
4394 2017-09-26 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
4397 * sparc64-tdep.c (adi_tag_fd): Print pid as long.
4398 (adi_is_addr_mapped): Likewise.
4399 (PSR_ICC): Don't redefine.
4400 (PSR_IMPL): Likewise.
4402 2017-09-25 Tom Tromey <tom@tromey.com>
4404 * regcache.c (regcache::dump): Use string_printf.
4406 2017-09-25 Tom Tromey <tom@tromey.com>
4408 * regcache.c (class regcache_invalidator): New.
4409 (struct register_to_invalidate): Remove.
4410 (make_cleanup_regcache_invalidate): Remove.
4411 (regcache::raw_write): Use regcache_invalidator.
4413 2017-09-25 Tom Tromey <tom@tromey.com>
4415 * spu-tdep.c (spu2ppu_sniffer): Update.
4416 * regcache.h (make_cleanup_regcache_xfree): Don't declare.
4417 * regcache.c (do_regcache_xfree, make_cleanup_regcache_xfree):
4419 * ppc-linux-tdep.c (ppu2spu_sniffer): Update.
4420 * mi/mi-main.c (mi_cmd_data_list_changed_registers): Update.
4421 * frame.h (frame_save_as_regcache): Return std::unique_ptr.
4422 * frame.c (frame_save_as_regcache): Return std::unique_ptr.
4423 (frame_pop): Update.
4425 2017-09-25 Tom Tromey <tom@tromey.com>
4427 * spu-tdep.c (spu2ppu_dealloc_cache): Use delete.
4428 * regcache.h (regcache_xfree): Don't declare.
4429 * regcache.c (regcache_xfree): Remove.
4430 (do_regcache_xfree): Use delete.
4431 * ppc-linux-tdep.c (ppu2spu_dealloc_cache): Use delete.
4432 * linux-fork.c (free_fork): Use delete.
4433 (fork_save_infrun_state): Likewise.
4434 * jit.c (jit_dealloc_cache): Use delete.
4435 * infrun.c (discard_infcall_suspend_state): Use delete.
4437 2017-09-25 Tom Tromey <tom@tromey.com>
4439 * regcache.h (regcache_xmalloc): Don't declare.
4440 (regcache_raw_set_cached_value): Update comment.
4441 * regcache.c (regcache_xmalloc): Remove.
4442 * ppc-linux-tdep.c (ppu2spu_sniffer): Use new.
4443 * jit.c (jit_frame_sniffer): Use new.
4444 * frame.c (frame_save_as_regcache): Use new.
4446 2017-09-25 Andreas Arnez <arnez@linux.vnet.ibm.com>
4448 * NEWS: Advertise support for guarded-storage registers on IBM z.
4450 2017-09-25 Andreas Arnez <arnez@linux.vnet.ibm.com>
4452 * s390-linux-nat.c (have_regset_gs): New static variable.
4453 (s390_linux_fetch_inferior_registers): Handle guarded-storage
4454 control block and guarded-storage broadcast control regsets.
4455 (s390_read_description): Detect whether the target has
4456 guarded-storage support, return appropriate tdesc.
4457 * s390-linux-tdep.c (features/s390-gs-linux64.c): New include.
4458 (features/s390x-gs-linux64.c): Likewise.
4459 (struct gdbarch_tdep) <have_gs>: New field.
4460 (s390_regmap_gs, s390_regmap_gsbc, s390_gs_regset)
4461 (s390_gsbc_regset): New variables.
4462 (s390_iterate_over_regset_sections): Iterate over s390_gs_regset
4463 and s390_gsbc_regset, if applicable.
4464 (s390_core_read_description): Check whether core file was from a
4465 target with guarded-storage support; include appropriate regsets.
4466 (s390_gdbarch_init): Add registers for guarded-storage support.
4467 (_initialize_s390_tdep): Initialize new target descriptions that
4468 include registers for guarded-storage support.
4469 * s390-linux-tdep.h (HWCAP_S390_GS, S390_GSD_REGNUM)
4470 (S390_GSSM_REGNUM, S390_GSEPLA_REGNUM)
4471 (S390_BC_GSD_REGNUM, S390_BC_GSSM_REGNUM): New defines.
4472 (S390_NUM_REGS): Adjust macro definition.
4473 (s390_gs_regset, s390_gsbc_regset, tdesc_s390_gs_linux64)
4474 (tdesc_s390x_gs_linux64): New declarations.
4476 2017-09-25 Andreas Arnez <arnez@linux.vnet.ibm.com>
4478 * features/s390-gs-linux64.xml: New file.
4479 * features/s390-gs.xml: New file.
4480 * features/s390-gsbc.xml: New file.
4481 * features/s390x-gs-linux64.xml: New file.
4482 * features/Makefile (WHICH): Add s390-gs-linux64 and
4484 (s390-gs-linux64-expedite, s390x-gs-linux64-expedite): New macros.
4485 (XMLTOC): Add s390-gs-linux64.xml and s390x-linux64.xml.
4486 * features/s390-gs-linux64.c: New generated file.
4487 * features/s390x-gs-linux64.c: New file.
4488 * regformats/s390-gs-linux64.dat: New file.
4489 * regformats/s390x-gs-linux64.dat: New file.
4491 2017-09-23 Tom Tromey <tom@tromey.com>
4493 * defs.h (make_cleanup_override_quit_handler): Don't declare.
4495 2017-09-22 Tom Tromey <tom@tromey.com>
4497 * utils.c (class scoped_input_handler) <m_quit_handler>: Change
4498 type to scoped_restore_tmpl.
4499 <scoped_input_handler>: Initialize m_quit_handler directly.
4501 2017-09-22 Sergio Durigan Junior <sergiodj@redhat.com>
4503 * cli/cli-cmds.c (pwd_command): Use "getcwd (NULL, 0)".
4504 (cd_command): Likewise. Free "current_directory" before
4506 * main.c (captured_main_1): Use "getcwd (NULL, 0)".
4507 * mi/mi-cmd-env.c (mi_cmd_env_pwd): Likewise.
4508 * top.c (gdb_dirbuf): Remove global declaration.
4509 * top.h (gdb_dirbuf): Likewise.
4511 2017-09-22 Sergio Durigan Junior <sergiodj@redhat.com>
4513 * gnulib/aclocal.m4: Regenerate.
4514 * gnulib/config.in: Regenerate.
4515 * gnulib/configure: Regenerate.
4516 * gnulib/import/Makefile.am: Regenerate.
4517 * gnulib/import/Makefile.in: Regenerate.
4518 * gnulib/import/assure.h: New file.
4519 * gnulib/import/at-func.c: Likewise
4520 * gnulib/import/chdir-long.c: New file.
4521 * gnulib/import/chdir-long.h: New file.
4522 * gnulib/import/cloexec.c: New file.
4523 * gnulib/import/cloexec.h: New file.
4524 * gnulib/import/close.c: New file.
4525 * gnulib/import/closedir.c: New file.
4526 * gnulib/import/dirent-private.h: New file.
4527 * gnulib/import/dup-safer.c: New file.
4528 * gnulib/import/dup.c: New file.
4529 * gnulib/import/dup2.c: New file.
4530 * gnulib/import/error.c: New file.
4531 * gnulib/import/error.h: New file.
4532 * gnulib/import/exitfail.c: New file.
4533 * gnulib/import/exitfail.h: New file.
4534 * gnulib/import/fchdir.c: New file.
4535 * gnulib/import/fcntl.c: New file.
4536 * gnulib/import/fcntl.in.h: New file.
4537 * gnulib/import/fd-hook.c: New file.
4538 * gnulib/import/fd-hook.h: New file.
4539 * gnulib/import/fd-safer.c: New file.
4540 * gnulib/import/fdopendir.c: New file.
4541 * gnulib/import/filename.h: New file.
4542 * gnulib/import/filenamecat-lgpl.c: New file.
4543 * gnulib/import/filenamecat.h: New file.
4544 * gnulib/import/fstat.c: New file.
4545 * gnulib/import/fstatat.c: New file.
4546 * gnulib/import/getcwd-lgpl.c: New file.
4547 * gnulib/import/getcwd.c: New file.
4548 * gnulib/import/getdtablesize.c: New file.
4549 * gnulib/import/getlogin_r.c: New file.
4550 * gnulib/import/getprogname.c: New file.
4551 * gnulib/import/getprogname.h: New file.
4552 * gnulib/import/gettext.h: New file.
4553 * gnulib/import/glob-libc.h: New file.
4554 * gnulib/import/glob.c: New file.
4555 * gnulib/import/glob.in.h: New file.
4556 * gnulib/import/intprops.h: New file.
4557 * gnulib/import/m4/chdir-long.m4: New file.
4558 * gnulib/import/m4/close.m4: New file.
4559 * gnulib/import/m4/closedir.m4: New file.
4560 * gnulib/import/m4/d-ino.m4: New file.
4561 * gnulib/import/m4/d-type.m4: New file.
4562 * gnulib/import/m4/dup.m4: New file.
4563 * gnulib/import/m4/dup2.m4: New file.
4564 * gnulib/import/m4/error.m4: New file.
4565 * gnulib/import/m4/fchdir.m4: New file.
4566 * gnulib/import/m4/fcntl.m4: New file.
4567 * gnulib/import/m4/fcntl_h.m4: New file.
4568 * gnulib/import/m4/fdopendir.m4: New file.
4569 * gnulib/import/m4/filenamecat.m4: New file.
4570 * gnulib/import/m4/fstat.m4: New file.
4571 * gnulib/import/m4/fstatat.m4: New file.
4572 * gnulib/import/m4/getcwd-abort-bug.m4: New file.
4573 * gnulib/import/m4/getcwd-path-max.m4: New file.
4574 * gnulib/import/m4/getcwd.m4: New file.
4575 * gnulib/import/m4/getdtablesize.m4: New file.
4576 * gnulib/import/m4/getlogin_r.m4: New file.
4577 * gnulib/import/m4/getprogname.m4: New file.
4578 * gnulib/import/m4/glob.m4: New file.
4579 * gnulib/import/m4/gnulib-cache.m4: Regenerate.
4580 * gnulib/import/m4/gnulib-comp.m4: Regenerate.
4581 * gnulib/import/m4/mempcpy.m4: New file.
4582 * gnulib/import/m4/memrchr.m4: New file.
4583 * gnulib/import/m4/mode_t.m4: New file.
4584 * gnulib/import/m4/msvc-inval.m4: New file.
4585 * gnulib/import/m4/msvc-nothrow.m4: New file.
4586 * gnulib/import/m4/open.m4: New file.
4587 * gnulib/import/m4/openat.m4: New file.
4588 * gnulib/import/m4/opendir.m4: New file.
4589 * gnulib/import/m4/readdir.m4: New file.
4590 * gnulib/import/m4/realloc.m4: New file.
4591 * gnulib/import/m4/rewinddir.m4: New file.
4592 * gnulib/import/m4/save-cwd.m4: New file.
4593 * gnulib/import/m4/strdup.m4: New file.
4594 * gnulib/import/m4/strerror.m4: New file.
4595 * gnulib/import/m4/unistd-safer.m4: New file.
4596 * gnulib/import/mempcpy.c: New file.
4597 * gnulib/import/memrchr.c: New file.
4598 * gnulib/import/msvc-inval.c: New file.
4599 * gnulib/import/msvc-inval.h: New file.
4600 * gnulib/import/msvc-nothrow.c: New file.
4601 * gnulib/import/msvc-nothrow.h: New file.
4602 * gnulib/import/open.c: New file.
4603 * gnulib/import/openat-die.c: New file.
4604 * gnulib/import/openat-priv.h: New file.
4605 * gnulib/import/openat-proc.c: New file.
4606 * gnulib/import/openat.c: New file.
4607 * gnulib/import/openat.h: New file.
4608 * gnulib/import/opendir.c: New file.
4609 * gnulib/import/pipe-safer.c: New file.
4610 * gnulib/import/readdir.c: New file.
4611 * gnulib/import/realloc.c: New file.
4612 * gnulib/import/rewinddir.c: New file.
4613 * gnulib/import/save-cwd.c: New file.
4614 * gnulib/import/save-cwd.h: New file.
4615 * gnulib/import/strdup.c: New file.
4616 * gnulib/import/strerror-override.c: New file.
4617 * gnulib/import/strerror-override.h: New file.
4618 * gnulib/import/strerror.c: New file.
4619 * gnulib/import/unistd--.h: New file.
4620 * gnulib/import/unistd-safer.h: New file.
4621 * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add
4622 "getcwd" and "glob".
4623 * ser-tcp.c: Undefine "close" before redefining it.
4625 2017-09-21 Simon Marchi <simon.marchi@ericsson.com>
4627 * guile/scm-value.c (gdbscm_value_address): Initialize address,
4630 2017-09-22 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
4632 * configure.nat <i386sol2,i386>: Add fork-inferior.o to NATDEPFILES.
4633 <sol2,sparc>: Likewise.
4634 <sol2-64,i386>: Likewise.
4636 * warning.m4 (AM_GDB_WARNINGS): Disable -Wunknown-pragmas,
4637 -Wdeprecated-declarations on *-*-solaris*.
4638 * configure: Regenerate.
4640 * procfs.c: Include "nat/inferior.h".
4641 (procfs_info_proc): Fix typo.
4643 2017-09-21 Kevin Buettner <kevinb@redhat.com>
4645 * remote.c (vector): Include.
4646 (struct private_thread_info): Add field, thread_handle.
4647 (free_private_thread_info): Deallocate storage associated with
4649 (get_private_info_thread): Initialize `thread_handle' field.
4650 (struct thread_item): Add field, thread_handle.
4651 (clear_threads_listing_context): Deallocate storage associated
4653 (start_thread): Add support for "handle" attribute.
4654 (thread_attributes): Add "handle".
4655 (remote_get_threads_with_qthreadinfo): Initialize thread_handle
4657 (remote_update_thread_list): Update thread_handle.
4658 (remote_thread_handle_to_thread_info): New function.
4659 (init_remote_ops): Initialize to_thread_handle_to_thread_info.
4661 2017-09-21 Kevin Buettner <kevinb@redhat.com>
4663 * python/py-inferior.c (gdbpy_thread_from_thread_handle): New
4665 (inferior_object_methods): Add gdbpy_thread_from_thread_handle.
4666 * python/python-internal.h (thread_object_type): Declare.
4668 2017-09-21 Kevin Buettner <kevinb@redhat.com>
4670 * target.h (struct target_ops): Add to_thread_handle_to_thread_info.
4671 (target_thread_handle_to_thread_info): Declare.
4672 * target.c (target_thread_handle_to_thread_info): New function.
4673 * target-delegates.c: Regenerate.
4674 * gdbthread.h (find_thread_by_handle): Declare.
4675 * thread.c (find_thread_by_handle): New function.
4676 * linux-thread-db.c (thread_db_thread_handle_to_thread_info): New
4678 (init_thread_db_ops): Register thread_db_thread_handle_to_thread_info.
4680 2017-09-21 Simon Marchi <simon.marchi@ericsson.com>
4682 * nat/linux-waitpid.c (linux_debug): Add ATTRIBUTE_PRINTF.
4684 2017-09-21 Simon Marchi <simon.marchi@ericsson.com>
4686 * microblaze-tdep.c (microblaze_debug): Add ATTRIBUTE_PRINTF.
4688 2017-09-21 Yao Qi <yao.qi@linaro.org>
4690 * configure.tgt (aarch64*-*-freebsd*): Add fbsd-tdep.o solib-svr4.o
4693 2017-09-20 Tom Tromey <tom@tromey.com>
4695 * breakpoint.c (struct counted_command_line): Remove.
4696 (breakpoint_commands): Update.
4697 (alloc_counted_command_line, incref_counted_command_line)
4698 (decref_counted_command_line, do_cleanup_counted_command_line)
4699 (make_cleanup_decref_counted_command_line): Remove.
4700 (breakpoint_set_commands, commands_command_1, ~bpstats, bpstats)
4701 (bpstat_clear_actions, bpstat_do_actions_1, watchpoint_check)
4702 (bpstat_stop_status, print_one_breakpoint_location, ~breakpoint)
4703 (save_breakpoints): Update.
4704 * breakpoint.h (counted_command_line): Now a typedef to
4706 (struct breakpoint) <commands>: Now a counted_command_line.
4707 (struct bpstats) <command>: Likewise.
4709 2017-09-20 Tom Tromey <tom@tromey.com>
4711 * breakpoint.c (struct commands_info, do_map_commands_command):
4713 (commands_command_1): Update.
4714 (iterate_over_related_breakpoints): Take a function_view.
4715 (do_delete_breakpoint, do_map_delete_breakpoint): Remove.
4716 (delete_command): Update.
4717 (map_breakpoint_numbers): Take a function_view.
4718 (do_disable_breakpoint, do_map_delete_breakpoint): Remove.
4719 (disable_command): Update.
4720 (do_enable_breakpoint, do_map_enable_breakpoint): Remove.
4721 (enable_command): Update.
4722 (struct disp_data, do_enable_breakpoint_disp)
4723 (do_map_enable_once_breakpoint, do_map_enable_count_breakpoint)
4724 (do_map_enable_delete_breakpoint): Remove.
4725 (enable_once_command, enable_count_command, enable_delete_command)
4726 (delete_trace_variable_command): Update.
4728 2017-09-20 Tom Tromey <tom@tromey.com>
4730 * breakpoint.c (~bpstats): Rename from bpstat_free. Update.
4731 (bpstat_clear): Use delete.
4732 (bpstats): New constructors.
4733 (bpstat_copy, bpstat_stop_status): Use new.
4734 (dprintf_after_condition_true): Update.
4735 * breakpoint.h (bpstats::bpstats): Add constructors.
4736 (bpstats::~bpstats): Add destructor.
4738 2017-09-20 Pedro Alves <palves@redhat.com>
4740 * eval.c (make_params): Delete, refactored as ...
4741 (class fake_method): ... this new type's ctor.
4742 (fake_method::~fake_method): New.
4743 (evaluate_subexp_standard): Use 'fake_method'.
4745 2017-09-20 Tom Tromey <tom@tromey.com>
4747 * windows-nat.c (get_windows_debug_event, windows_wait)
4748 (do_initial_windows_stuff, windows_attach): Update.
4749 * utils.c (vwarning, internal_vproblem): Update.
4750 (ui_unregister_input_event_handler_cleanup)
4751 (prepare_to_handle_input): Remove.
4752 (class scoped_input_handler): New.
4753 (defaulted_query, prompt_for_continue): Update.
4754 * tui/tui-hooks.c (tui_refresh_frame_and_register_information):
4756 * top.c (undo_terminal_modifications_before_exit): Update.
4757 * target/target.h (target_terminal_init, target_terminal_inferior)
4758 (target_terminal_ours): Don't declare.
4759 (class target_terminal): New.
4760 * target.h (target_terminal_is_inferior, target_terminal_is_ours)
4761 (target_terminal_ours_for_output)
4762 (make_cleanup_restore_target_terminal): Don't declare.
4763 (target_terminal_info): Remove.
4764 * target.c (enum terminal_state, terminal_state): Remove.
4765 (target_terminal::terminal_state): Define.
4766 (target_terminal::init): Rename from target_terminal_init.
4767 (target_terminal::inferior): Rename from
4768 target_terminal_inferior.
4769 (target_terminal::ours): Rename from target_terminal_ours.
4770 (target_terminal::ours_for_output): Rename from
4771 target_terminal_ours_for_output.
4772 (target_terminal::info): New method.
4773 (cleanup_restore_target_terminal)
4774 (make_cleanup_restore_target_terminal): Remove.
4775 * solib.c (handle_solib_event): Update.
4776 * remote.c (remote_serial_quit_handler): Update.
4777 (remote_terminal_inferior, remote_wait_as): Update.
4778 * record-full.c (record_full_wait_1): Update.
4779 * nto-procfs.c (procfs_create_inferior): Update.
4780 * nat/fork-inferior.c (startup_inferior): Update.
4781 * mi/mi-interp.c (mi_new_thread, mi_thread_exit)
4782 (mi_record_changed, mi_inferior_added, mi_inferior_appeared)
4783 (mi_inferior_exit, mi_inferior_removed, mi_traceframe_changed)
4784 (mi_tsv_created, mi_tsv_deleted, mi_tsv_modified)
4785 (mi_breakpoint_created, mi_breakpoint_deleted)
4786 (mi_breakpoint_modified, mi_on_resume, mi_solib_loaded)
4787 (mi_solib_unloaded, mi_command_param_changed, mi_memory_changed)
4788 (mi_user_selected_context_changed, report_initial_inferior):
4790 * linux-nat.c (linux_nat_attach, linux_nat_terminal_ours)
4791 (linux_nat_terminal_inferior): Update.
4792 * infrun.c (follow_fork_inferior)
4793 (handle_vfork_child_exec_or_exit, do_target_resume)
4794 (check_curr_ui_sync_execution_done, handle_inferior_event_1)
4795 (handle_signal_stop, maybe_remove_breakpoints, normal_stop):
4797 * inflow.c (child_terminal_init, info_terminal_command): Update.
4798 * infcmd.c (post_create_inferior, continue_1, prepare_one_step)
4799 (attach_command): Update.
4800 * infcall.c (call_thread_fsm_should_stop): Update.
4801 * gnu-nat.c (gnu_attach): Update.
4802 * extension.c (struct active_ext_lang_state)
4803 (restore_active_ext_lang): Update.
4804 * exceptions.c (print_flush): Update.
4805 * event-top.c (async_enable_stdin, default_quit_handler): Update.
4806 (struct quit_handler_cleanup_data, restore_quit_handler)
4807 (restore_quit_handler_dtor, make_cleanup_override_quit_handler):
4809 * cp-support.c (gdb_demangle): Update.
4810 * breakpoint.c (update_inserted_breakpoint_locations)
4811 (insert_breakpoint_locations, handle_jit_event)
4812 (disable_breakpoints_in_unloaded_shlib): Update.
4813 * annotate.c (annotate_breakpoints_invalid)
4814 (annotate_frames_invalid): Update.
4816 2017-09-20 Tom Tromey <tom@tromey.com>
4818 * main.c (catch_command_errors): Rename from
4819 catch_command_errors_const.
4820 (captured_main_1): Update.
4822 2017-09-20 Pedro Alves <palves@redhat.com>
4824 * cli/cli-cmds.c (list_command): Use print_sal_location.
4825 (print_sal_location): New function.
4826 (ambiguous_line_spec): Use print_sal_location.
4827 * linespec.c (symbol_to_sal): Record the symbol in the sal.
4828 * symtab.c (find_function_start_sal): Likewise.
4829 * symtab.h (symtab_and_line::symbol): New field.
4831 2017-09-20 Pedro Alves <palves@redhat.com>
4833 * linespec.c (minsym_found): Handle non-text minsyms.
4834 (symbol_to_sal): Record a sal.pc for non-block, non-label symbols.
4836 2017-09-20 Walfred Tedeschi <walfred.tedeschi@intel.com>
4838 * features/Makefile (i386-avx-mpx-avx512-pku.dat): Add missing
4841 2017-09-20 Walfred Tedeschi <walfred.tedeschi@intel.com>
4843 * gdb.arch/i386-avx512.c (move_zmm_data_to_reg): Use
4844 vmovups instead vmovaps.
4845 (move_zmm_data_to_memory): Use vmovups instead vmovaps.
4847 2017-09-19 John Baldwin <jhb@FreeBSD.org>
4849 * NEWS (Changes since GDB 8.0): Add starti.
4850 * infcmd.c (enum run_break): New.
4851 (run_command_1): Queue pending event for RUN_STOP_AT_FIRST_INSN
4853 (run_command): Use enum run_how.
4854 (start_command): Likewise.
4855 (starti_command): New function.
4856 (RUN_ARGS_HELP): New macro.
4857 (_initialize_infcmd): Use RUN_ARGS_HELP for run and start
4858 commands. Add starti command.
4860 2017-09-19 Yao Qi <yao.qi@linaro.org>
4862 * Makefile.in (monitor.o): Remove the rule.
4864 2017-09-19 Yao Qi <yao.qi@linaro.org>
4866 * annotate.h (struct annotate_arg_emitter): Use
4867 DISABLE_COPY_AND_ASSIGN.
4868 * common/refcounted-object.h (refcounted_object): Likewise.
4869 * completer.h (struct completion_result): Likewise.
4870 * dwarf2read.c (struct dwarf2_per_objfile): Likewise.
4871 * filename-seen-cache.h (filename_seen_cache): Likewise.
4872 * gdbcore.h (thread_section_name): Likewise.
4873 * gdb_regex.h (compiled_regex): Likewise.
4874 * gdbthread.h (scoped_restore_current_thread): Likewise.
4875 * inferior.h (scoped_restore_current_inferior): Likewise.
4876 * jit.c (jit_reader): Likewise.
4877 * linespec.h (struct linespec_result): Likewise.
4878 * mi/mi-parse.h (struct mi_parse): Likewise.
4879 * nat/fork-inferior.c (execv_argv): Likewise.
4880 * progspace.h (scoped_restore_current_program_space): Likewise.
4881 * python/python-internal.h (class gdbpy_enter): Likewise.
4882 * regcache.h (regcache): Likewise.
4883 * target-descriptions.c (struct tdesc_reg): Likewise.
4884 (struct tdesc_type): Likewise.
4885 (struct tdesc_feature): Likewise.
4886 * ui-out.h (ui_out_emit_type): Likewise.
4888 2017-09-18 Simon Marchi <simon.marchi@ericsson.com>
4890 * dwarf2expr.c (dwarf_expr_context::execute_stack_op): Remove
4891 label abort_expression.
4893 2017-09-16 Simon Marchi <simon.marchi@ericsson.com>
4895 * common/buffer.c (buffer_xml_printf): Adjust.
4896 * common/xml-utils.c (xml_escape_text): Change return type to
4897 std::string, update code accordingly.
4898 * common/xml-utils.h (xml_escape_text): Change return type to
4900 * rs6000-aix-tdep.c (rs6000_aix_shared_library_to_xml): Adjust.
4901 * windows-tdep.c (windows_xfer_shared_library): Adjust.
4902 * unittests/xml-utils-selftests.c (test_xml_escape_text):
4905 2017-09-16 Simon Marchi <simon.marchi@ericsson.com>
4907 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add new source file.
4908 (SUBDIR_UNITTESTS_OBS): Add new object file.
4909 * unittests/xml-utils-selftests.c: New file.
4911 2017-09-16 Simon Marchi <simon.marchi@ericsson.com>
4913 * common/selftest.h (selftest): New struct/interface.
4914 (register_test): Add name parameter, add new overload.
4915 (run_tests): Add filter parameter.
4916 (for_each_selftest_ftype): New typedef.
4917 (for_each_selftest): New declaration.
4918 * common/selftest.c (tests): Change type to
4919 map<string, unique_ptr<selftest>>.
4920 (simple_selftest): New struct.
4921 (register_test): New function.
4922 (register_test): Add name parameter and use it.
4923 (run_tests): Add filter parameter and use it. Add prints.
4924 Adjust to vector -> map change.
4925 * aarch64-tdep.c (_initialize_aarch64_tdep): Add names when
4926 registering selftests.
4927 * arm-tdep.c (_initialize_arm_tdep): Likewise.
4928 * disasm-selftests.c (_initialize_disasm_selftests): Likewise.
4929 * dwarf2-frame.c (_initialize_dwarf2_frame): Likewise.
4930 * dwarf2loc.c (_initialize_dwarf2loc): Likewise.
4931 * findvar.c (_initialize_findvar): Likewise.
4932 * gdbarch-selftests.c (_initialize_gdbarch_selftests): Likewise.
4933 * maint.c (maintenance_selftest): Update call to run_tests.
4934 (maintenance_info_selftests): New function.
4935 (_initialize_maint_cmds): Register "maintenance info selftests"
4936 command. Update "maintenance selftest" doc.
4937 * regcache.c (_initialize_regcache): Add names when registering
4939 * rust-exp.y (_initialize_rust_exp): Likewise.
4940 * selftest-arch.c (gdbarch_selftest): New struct.
4941 (gdbarch_tests): Remove.
4942 (register_test_foreach_arch): Add name parameter. Call
4944 (tests_with_arch): Remove, move most content to
4945 gdbarch_selftest::operator().
4946 (_initialize_selftests_foreach_arch): Remove.
4947 * selftest-arch.h (register_test_foreach_arch): Add name
4949 (run_tests_with_arch): New declaration.
4950 * utils-selftests.c (_initialize_utils_selftests): Add names
4951 when registering selftests.
4952 * utils.c (_initialize_utils): Likewise.
4953 * unittests/array-view-selftests.c
4954 (_initialize_array_view_selftests): Likewise.
4955 * unittests/environ-selftests.c (_initialize_environ_selftests):
4957 * unittests/function-view-selftests.c
4958 (_initialize_function_view_selftests): Likewise.
4959 * unittests/offset-type-selftests.c
4960 (_initialize_offset_type_selftests): Likewise.
4961 * unittests/optional-selftests.c
4962 (_initialize_optional_selftests): Likewise.
4963 * unittests/scoped_restore-selftests.c
4964 (_initialize_scoped_restore_selftests): Likewise.
4965 * NEWS: Document "maintenance selftest" and "maint info
4968 2017-09-16 Simon Marchi <simon.marchi@ericsson.com>
4970 * mi/mi-main.c (mi_load_progress): Restore current_uiout using a
4973 2017-09-16 Simon Marchi <simon.marchi@ericsson.com>
4975 * mi/mi-main.c (mi_load_progress): Make uiout variable
4978 2017-09-15 Pedro Alves <palves@redhat.com>
4980 * compile/compile-c-types.c (convert_enum, convert_int)
4981 (convert_float): Adjust to refer to int_type_v0 and float_type_v0.
4983 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
4985 * dwarf2read.c (copy_string): Remove.
4986 (parse_macro_definition): Replace copy_string with savestring.
4988 2017-09-15 Yao Qi <yao.qi@linaro.org>
4990 * configure.tgt (i[34567]86-*-darwin*): Append amd64.o to
4992 (i[34567]86-*-solaris2.1[0-9]* | x86_64-*-solaris2.1[0-9]*):
4994 (i[34567]86-*-linux*): Likewise.
4996 2017-09-14 Simon Marchi <simon.marchi@ericsson.com>
4998 * dwarf2expr.h (dwarf_stack_value): Add constructor.
4999 (dwarf_expr_context) <~dwarf_expr_context>: Define as default.
5000 <stack>: Change type to std::vector.
5001 <stack_len, stack_allocated>: Remove.
5002 <grow_stack>: Remove.
5003 * dwarf2expr.c (dwarf_expr_context::dwarf_expr_context): Adjust.
5004 (dwarf_expr_context::~dwarf_expr_context): Remove.
5005 (dwarf_expr_context::grow_stack): Remove.
5006 (dwarf_expr_context::push): Adjust.
5007 (dwarf_expr_context::pop): Adjust.
5008 (dwarf_expr_context::fetch): Adjust.
5009 (dwarf_expr_context::fetch_in_stack_memory): Adjust.
5010 (dwarf_expr_context::stack_empty_p): Adjust.
5011 (dwarf_expr_context::execute_stack_op): Adjust.
5013 2017-09-14 Simon Marchi <simon.marchi@ericsson.com>
5015 * dwarf2expr.h (dwarf_expr_context) <stack_empty_p>: Change
5016 return type to bool.
5017 * dwarf2expr.c (dwarf_expr_context::stack_empty_p): Likewise.
5019 2017-09-14 Simon Marchi <simon.marchi@ericsson.com>
5021 * dwarf2expr.h (dwarf_expr_piece) <v.mem.in_stack_memory>:
5022 Change type to bool.
5023 (dwarf_stack_value) <in_stack_memory>: Likewise.
5024 (dwarf_expr_context) <push_address>: Change parameter type to
5026 <fetch_in_stack_memory>: Change return type to bool.
5027 <push>: Change parameter type to bool.
5028 * dwarf2expr.c (dwarf_expr_context::push): Change parameter type
5030 (dwarf_expr_context::push_address): Likewise.
5031 (dwarf_expr_context::fetch_in_stack_memory): Change return type
5033 (dwarf_expr_context::execute_stack_op): Adjust.
5034 * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Adjust.
5036 2017-09-14 Simon Marchi <simon.marchi@ericsson.com>
5038 * dwarf2expr.h (struct dwarf_expr_piece): Move up.
5039 (struct dwarf_expr_context) <n_pieces>: Remove.
5040 <pieces>: Change type to std::vector.
5041 * dwarf2expr.c (dwarf_expr_context::dwarf_expr_context): Adjust.
5042 (dwarf_expr_context::~dwarf_expr_context): Don't manually free
5044 (dwarf_expr_context::add_piece): Adjust.
5045 * dwarf2loc.c (struct piece_closure): Initialize fields.
5047 <pieces>: Change type to std::vector.
5048 (allocate_piece_closure): Adjust, change parameter to
5049 std::vector rvalue and std::move it to piece_closure.
5050 (rw_pieced_value): Adjust.
5051 (check_pieced_synthetic_pointer): Adjust.
5052 (indirect_synthetic_pointer): Adjust.
5053 (coerce_pieced_ref): Adjust.
5054 (free_pieced_value_closure): Adjust. Use delete to free
5056 (dwarf2_evaluate_loc_desc_full): Adjust. std::move ctx.pieces
5057 to allocate_piece_closure.
5058 (dwarf2_loc_desc_get_symbol_read_needs): Adjust.
5060 2017-09-12 Simon Marchi <simon.marchi@ericsson.com>
5062 * probe.h (probe_ops_cp): Remove typedef.
5063 (DEF_VEC_P (probe_ops_cp)): Remove.
5064 (all_probe_ops): Change type to std::vector.
5065 * probe.c (info_probes_for_ops): Adjust to vector change.
5066 (probe_linespec_to_ops): Likewise.
5067 (all_probe_ops): Change type to std::vector.
5068 (_initialize_probe): Adjust to vector change.
5069 * dtrace-probe.c (_initialize_dtrace_probe): Likewise.
5070 * elfread.c (elf_get_probes): Likewise.
5071 * stap-probe.c (_initialize_stap_probe): Likewise.
5073 2017-09-12 Simon Marchi <simon.marchi@ericsson.com>
5075 * probe.h (struct bound_probe): Define constructors.
5076 * probe.c (bound_probe_s): Remove typedef.
5077 (DEF_VEC_O (bound_probe_s)): Remove VEC.
5078 (collect_probes): Change return type to std::vector, remove
5080 (compare_probes): Return bool, change parameter type. Change
5081 semantic to "less than".
5082 (gen_ui_out_table_header_info): Change parameter to std::vector
5084 (exists_probe_with_pops): Likewise.
5085 (info_probes_for_ops): Update to std::vector change.
5086 (enable_probes_command): Likewise.
5087 (disable_probes_command): Likewise.
5089 2017-09-12 Simon Marchi <simon.marchi@ericsson.com>
5091 * probe.h (struct probe_ops) <get_probes>: Change parameter from
5093 * probe.c (parse_probes_in_pspace): Update.
5094 (find_probes_in_objfile): Update.
5095 (find_probe_by_pc): Update.
5096 (collect_probes): Update.
5097 (probe_any_get_probes): Update.
5098 * symfile.h (struct sym_probe_fns) <sym_get_probes> Change
5099 return type to reference to std::vector.
5100 * dtrace-probe.c (dtrace_process_dof_probe): Change parameter to
5101 std::vector and update.
5102 (dtrace_process_dof): Likewise.
5103 (dtrace_get_probes): Likewise.
5104 * elfread.c (elf_get_probes): Change return type to std::vector,
5105 store an std::vector in bfd_data.
5106 (probe_key_free): Update to std::vector.
5107 * stap-probe.c (handle_stap_probe): Change parameter to
5108 std::vector and update.
5109 (stap_get_probes): Likewise.
5110 * symfile-debug.c (debug_sym_get_probes): Change return type to
5111 std::vector and update.
5113 2017-09-11 Tom Tromey <tom@tromey.com>
5115 * breakpoint.c (program_breakpoint_here_p): Update.
5116 * target.c (make_scoped_restore_show_memory_breakpoints): Rename
5117 from make_show_memory_breakpoints_cleanup. Return a
5118 scoped_restore_tmpl<int>.
5119 (restore_show_memory_breakpoints): Remove.
5120 * ppc-linux-tdep.c (ppc_linux_memory_remove_breakpoint): Update.
5121 * mem-break.c (memory_validate_breakpoint): Update.
5122 * ia64-tdep.c (ia64_memory_insert_breakpoint): Update.
5123 (ia64_memory_remove_breakpoint): Update.
5124 (ia64_breakpoint_from_pc): Update.
5125 * target.h (make_scoped_restore_show_memory_breakpoints): Rename
5126 from make_show_memory_breakpoints_cleanup.
5128 2017-09-11 Tom Tromey <tom@tromey.com>
5130 * d-namespace.c (d_lookup_symbol): Use std::string.
5131 (find_symbol_in_baseclass): Likewise.
5133 2017-09-11 Tom Tromey <tom@tromey.com>
5135 * ctf.c (ctf_start): Use std::string.
5137 2017-09-11 Tom Tromey <tom@tromey.com>
5139 * ada-lang.c (is_known_support_routine): Update.
5140 (ada_unhandled_exception_name_addr_from_raise): Update.
5141 * guile/scm-frame.c (gdbscm_frame_name): Update.
5142 * python/py-frame.c (frapy_name): Update.
5143 (frapy_function): Update.
5144 * stack.h (find_frame_funname): Update.
5145 * stack.c (find_frame_funname): Return unique_xmalloc_ptr.
5146 (print_frame): Update.
5148 2017-09-11 Tom Tromey <tom@tromey.com>
5150 * findcmd.c (put_bits): Take a gdb::byte_vector.
5151 (parse_find_args): Return gdb::byte_vector. "args" now const.
5152 Remove "pattern_bufp" and "pattern_lenp" parameters. Remove
5154 (find_command): Update.
5156 2017-09-11 Tom Tromey <tom@tromey.com>
5158 * cli/cli-script.c (class scoped_restore_hook_in): New.
5159 (clear_hook_in_cleanup): Remove.
5160 (execute_cmd_pre_hook, execute_cmd_post_hook): Use
5161 scoped_restore_hook_in.
5163 2017-09-11 Tom Tromey <tom@tromey.com>
5165 * cli/cli-script.c (restore_interp): Remove.
5166 (read_command_lines): Use scoped_restore_interp.
5167 * interps.c (scoped_restore_interp::set_temp): Rename from
5169 * interps.h (class scoped_restore_interp): New.
5170 (interp_set_temp): Remove.
5172 2017-09-11 Tom Tromey <tom@tromey.com>
5174 * mi/mi-cmd-catch.c (mi_cmd_catch_assert)
5175 (mi_cmd_catch_exception, mi_catch_load_unload): Update.
5176 * mi/mi-cmd-break.c (setup_breakpoint_reporting): Return a
5178 (mi_cmd_break_insert_1): Update.
5179 * mi/mi-cmd-break.h (setup_breakpoint_reporting): Return a
5182 2017-09-11 Tom Tromey <tom@tromey.com>
5184 * demangle.c (demangle_command): Update.
5185 * breakpoint.c (disable_command): Update.
5186 (enable_command): Update.
5187 (find_location_by_number): Make "number" const. Use
5189 * cli/cli-utils.c (extract_arg): Return std::string.
5190 * probe.c (parse_probe_linespec): Update. Change types.
5191 (collect_probes): Take string arguments.
5192 (parse_probe_linespec): Likewise.
5193 (info_probes_for_ops): Update.
5194 (enable_probes_command): Update.
5195 (disable_probes_command): Update.
5196 * break-catch-sig.c (catch_signal_split_args): Update.
5197 * mi/mi-parse.c (mi_parse): Update.
5199 2017-09-11 Tom Tromey <tom@tromey.com>
5201 * language.h (language_enum): Make argument const.
5202 * language.c (language_enum): Make argument const.
5204 2017-09-11 Tom Tromey <tom@tromey.com>
5206 * common/common-utils.h (skip_to_space): Remove macro, redeclare
5208 (skip_to_space): Rename from skip_to_space_const.
5209 * common/common-utils.c (skip_to_space): New function.
5210 (skip_to_space): Rename from skip_to_space_const.
5211 * cli/cli-utils.h (get_number): Rename from get_number_const.
5212 (extract_arg): Rename from extract_arg_const.
5213 * cli/cli-utils.c (get_number): Rename from get_number_const.
5214 (extract_arg): Rename from extract_arg_const.
5215 (number_or_range_parser::get_number): Use ::get_number.
5216 * aarch64-linux-tdep.c, ada-lang.c, arm-linux-tdep.c, ax-gdb.c,
5217 break-catch-throw.c, breakpoint.c, cli/cli-cmds.c, cli/cli-dump.c,
5218 cli/cli-script.c, cli/cli-setshow.c, compile/compile.c,
5219 completer.c, demangle.c, disasm.c, findcmd.c, linespec.c,
5220 linux-tdep.c, linux-thread-db.c, location.c, mi/mi-parse.c,
5221 minsyms.c, nat/linux-procfs.c, printcmd.c, probe.c,
5222 python/py-breakpoint.c, record.c, rust-exp.y, serial.c, stack.c,
5223 stap-probe.c, tid-parse.c, tracepoint.c: Update all callers.
5225 2017-09-11 Tom Tromey <tom@tromey.com>
5227 * python/python.c (do_start_initialization): Use
5228 py-event-types.def to initialize types.
5229 Define all object type structures.
5230 * python/python-internal.h: Don't declare event initialization
5232 * python/py-threadevent.c (thread_event_object_type): Don't
5234 * python/py-stopevent.c (stop_event_object_type): Don't define.
5235 * python/py-signalevent.c (signal_event_object_type): Don't
5237 * python/py-newobjfileevent.c (new_objfile_event_object_type)
5238 (clear_objfiles_event_object_type): Don't declare or define.
5239 * python/py-infevents.c (inferior_call_pre_event_object_type)
5240 (inferior_call_post_event_object_type)
5241 (register_changed_event_object_type)
5242 (memory_changed_event_object_type): Don't declare or define.
5243 * python/py-inferior.c (new_thread_event_object_type)
5244 (new_inferior_event_object_type)
5245 (inferior_deleted_event_object_type): Don't declare or define.
5246 * python/py-exitedevent.c (exited_event_object_type): Don't
5248 * python/py-evts.c (gdbpy_initialize_py_events): Use
5250 * python/py-events.h (thread_event_object_type): Don't declare.
5251 (events_object): Use py-all-events.def.
5252 * python/py-event.h (GDBPY_NEW_EVENT_TYPE): Remove. Use
5254 * python/py-event-types.def: New file.
5255 * python/py-continueevent.c (create_continue_event_object): Don't
5257 * python/py-bpevent.c (breakpoint_event_object_type): Don't
5259 * python/py-all-events.def: New file.
5261 2017-09-11 Tom Tromey <tom@tromey.com>
5263 * python/py-threadevent.c (create_thread_event_object): Return
5265 * python/py-stopevent.h (create_stop_event_object)
5266 (create_breakpoint_event_object, create_signal_event_object):
5268 * python/py-stopevent.c (create_stop_event_object): Return
5270 (emit_stop_event): Update.
5271 * python/py-signalevent.c (create_signal_event_object): Return
5273 * python/py-infevents.c (create_inferior_call_event_object):
5275 * python/py-event.h (create_event_object)
5276 (create_thread_event_object): Update.
5277 * python/py-event.c (create_event_object): Return gdbpy_ref.
5278 * python/py-continueevent.c: Return gdbpy_ref.
5279 * python/py-bpevent.c (create_breakpoint_event_object): Return
5282 2017-09-11 Tom Tromey <tom@tromey.com>
5286 * python/python.c (do_start_initialization): Initialize new event
5288 * python/python-internal.h (gdbpy_initialize_new_inferior_event)
5289 (gdbpy_initialize_inferior_deleted_event)
5290 (gdbpy_initialize_new_thread_event): Declare.
5291 * python/py-threadevent.c (create_thread_event_object): Add option
5293 * python/py-inferior.c (new_thread_event_object_type)
5294 (new_inferior_event_object_type)
5295 (inferior_deleted_event_object_type): Declare.
5296 (python_new_inferior, python_inferior_deleted): New functions.
5297 (add_thread_object): Emit new_thread event.
5298 (gdbpy_initialize_inferior): Attach new functions to corresponding
5300 (new_thread, new_inferior, inferior_deleted): Define new event
5302 * python/py-evts.c (gdbpy_initialize_py_events): Add new
5304 * python/py-events.h (events_object) <new_inferior,
5305 inferior_deleted, new_thread>: New fields.
5306 * python/py-event.h (create_thread_event_breakpoint): Add optional
5309 2017-09-10 Andrew Burgess <andrew.burgess@embecosm.com>
5311 * utils.c (abort_with_message): Don't compare gdb_stderr to NULL,
5312 check current_ui instead.
5313 (internal_vproblem): Likewise.
5315 2017-09-09 Simon Marchi <simon.marchi@ericsson.com>
5317 * thread.c (print_thread_info_1): Remove unnecessary calls to
5318 uiout->is_mi_like_p.
5320 2017-09-09 Tom Tromey <tom@tromey.com>
5322 * namespace.h (add_using_directive): Update.
5323 * namespace.c (add_using_directive): Change type of excludes to
5325 * dwarf2read.c (read_import_statement): Use std::vector.
5326 (read_namespace): Update.
5327 * cp-namespace.c (cp_scan_for_anonymous_namespaces): Update.
5329 2017-09-09 Tom Tromey <tom@tromey.com>
5331 * linespec.c (create_sals_line_offset): Use gdb::def_vector.
5333 2017-09-09 Tom Tromey <tom@tromey.com>
5335 * p-valprint.c (pascal_object_print_value): Use gdb::byte_vector.
5337 2017-09-09 Tom Tromey <tom@tromey.com>
5339 * stack.c (func_command): Use gdb::def_vector.
5341 2017-09-09 Tom Tromey <tom@tromey.com>
5343 * mi/mi-cmd-var.c (mi_cmd_var_list_children): Use gdb::optional,
5344 ui_out_emit_list, ui_out_emit_tuple.
5345 (mi_cmd_var_update): Likewise.
5347 2017-09-09 Tom Tromey <tom@tromey.com>
5349 * mi/mi-interp.c (mi_user_selected_context_changed): Use
5350 ui_out_redirect_pop.
5351 * guile/scm-ports.c (ioscm_with_output_to_port_worker): Use
5352 ui_out_redirect_pop.
5353 * utils.c (do_ui_out_redirect_pop)
5354 (make_cleanup_ui_out_redirect_pop): Remove.
5355 * top.c (execute_command_to_string): Use ui_out_redirect_pop.
5356 * utils.h (make_cleanup_ui_out_redirect_pop): Remove.
5357 * ui-out.h (ui_out_redirect_pop): New class.
5359 2017-09-09 Tom Tromey <tom@tromey.com>
5361 * mi/mi-main.c (output_cores): Use ui_out_emit_list.
5362 (list_available_thread_groups, mi_cmd_list_thread_groups)
5363 (mi_cmd_data_list_changed_registers, mi_cmd_data_read_memory)
5364 (mi_cmd_data_read_memory_bytes, mi_cmd_trace_frame_collected):
5367 2017-09-09 Tom Tromey <tom@tromey.com>
5369 * disasm.c (gdb_pretty_print_disassembler::pretty_print_insn): Use
5372 2017-09-09 Tom Tromey <tom@tromey.com>
5374 * target.c (flash_erase_command): Use ui_out_emit_tuple.
5375 * stack.c (print_frame): Use ui_out_emit_tuple.
5376 * spu-tdep.c (info_spu_event_command): Use ui_out_emit_tuple.
5377 (info_spu_mailbox_command, info_spu_dma_command)
5378 (info_spu_proxydma_command): Likewise.
5379 * mi/mi-main.c (mi_cmd_trace_frame_collected): Use
5380 ui_out_emit_tuple, gdb::byte_vector, bin2hex.
5381 * mi/mi-cmd-file.c (mi_cmd_file_list_shared_libraries): Use
5383 * breakpoint.c (print_it_watchpoint): Use ui_out_emit_tuple.
5385 2017-09-09 Tom Tromey <tom@tromey.com>
5387 * ui-out.h (make_cleanup_ui_out_table_begin_end): Remove.
5388 (class ui_out_emit_table): Update comment.
5389 * ui-out.c (do_cleanup_table_end)
5390 (make_cleanup_ui_out_table_begin_end): Remove.
5391 * spu-tdep.c (info_spu_mailbox_list): Use ui_out_emit_table.
5392 (info_spu_dma_cmdlist): Likewise.
5393 * probe.c (info_probes_for_ops): Use ui_out_emit_table.
5394 * darwin-nat-info.c (darwin_debug_regions_recurse): Use
5397 2017-09-09 Tom Tromey <tom@tromey.com>
5399 * thread.c (print_thread_info_1): Use ui_out_emit_table,
5400 ui_out_emit_list, gdb::optional.
5402 2017-09-09 John Baldwin <jhb@FreeBSD.org>
5404 * aarch64-linux-nat.c: Remove _initialize_aarch64_linux_nat
5406 * aarch64-linux-tdep.c: Remove _initialize_aarch64_linux_tdep
5408 * aarch64-newlib-tdep.c: Remove _initialize_aarch64_newlib_tdep
5410 * aarch64-tdep.c: Remove _initialize_aarch64_tdep prototype.
5411 * ada-exp.y: Remove _initialize_ada_exp prototype.
5412 * ada-lang.c: Remove _initialize_ada_language prototype.
5413 * ada-tasks.c: Remove _initialize_tasks prototype.
5414 * addrmap.c: Remove _initialize_addrmap prototype.
5415 * agent.c: Remove _initialize_agent prototype.
5416 * aix-thread.c: Remove _initialize_aix_thread prototype.
5417 * alpha-bsd-nat.c: Remove _initialize_alphabsd_nat prototype.
5418 * alpha-linux-nat.c: Remove _initialize_alpha_linux_nat prototype.
5419 * alpha-linux-tdep.c: Remove _initialize_alpha_linux_tdep
5421 * alpha-nbsd-tdep.c: Remove _initialize_alphanbsd_tdep prototype.
5422 * alpha-obsd-tdep.c: Remove _initialize_alphaobsd_tdep prototype.
5423 * alpha-tdep.c: Remove _initialize_alpha_tdep prototype.
5424 * amd64-darwin-tdep.c: Remove _initialize_amd64_darwin_tdep
5426 * amd64-dicos-tdep.c: Remove _initialize_amd64_dicos_tdep
5428 * amd64-fbsd-nat.c: Remove _initialize_amd64fbsd_nat prototype.
5429 * amd64-fbsd-tdep.c: Remove _initialize_amd64fbsd_tdep prototype.
5430 * amd64-linux-nat.c: Remove _initialize_amd64_linux_nat prototype.
5431 * amd64-linux-tdep.c: Remove _initialize_amd64_linux_tdep
5433 * amd64-nbsd-nat.c: Remove _initialize_amd64nbsd_nat prototype.
5434 * amd64-nbsd-tdep.c: Remove _initialize_amd64nbsd_tdep prototype.
5435 * amd64-obsd-nat.c: Remove _initialize_amd64obsd_nat prototype.
5436 * amd64-obsd-tdep.c: Remove _initialize_amd64obsd_tdep prototype.
5437 * amd64-sol2-tdep.c: Remove _initialize_amd64_sol2_tdep prototype.
5438 * amd64-tdep.c: Remove _initialize_amd64_tdep prototype.
5439 * amd64-windows-nat.c: Remove _initialize_amd64_windows_nat
5441 * amd64-windows-tdep.c: Remove _initialize_amd64_windows_tdep
5443 * annotate.c: Remove _initialize_annotate prototype.
5444 * arc-newlib-tdep.c: Remove _initialize_arc_newlib_tdep prototype.
5445 * arc-tdep.c: Remove _initialize_arc_tdep prototype.
5446 * arch-utils.c: Remove _initialize_gdbarch_utils prototype.
5447 * arm-linux-nat.c: Remove _initialize_arm_linux_nat prototype.
5448 * arm-linux-tdep.c: Remove _initialize_arm_linux_tdep prototype.
5449 * arm-nbsd-tdep.c: Remove _initialize_arm_netbsd_tdep prototype.
5450 * arm-obsd-tdep.c: Remove _initialize_armobsd_tdep prototype.
5451 * arm-symbian-tdep.c: Remove _initialize_arm_symbian_tdep
5453 * arm-tdep.c: Remove _initialize_arm_tdep prototype.
5454 * arm-wince-tdep.c: Remove _initialize_arm_wince_tdep prototype.
5455 * auto-load.c: Remove _initialize_auto_load prototype.
5456 * auxv.c: Remove _initialize_auxv prototype.
5457 * avr-tdep.c: Remove _initialize_avr_tdep prototype.
5458 * ax-gdb.c: Remove _initialize_ax_gdb prototype.
5459 * bfin-linux-tdep.c: Remove _initialize_bfin_linux_tdep prototype.
5460 * bfin-tdep.c: Remove _initialize_bfin_tdep prototype.
5461 * break-catch-sig.c: Remove _initialize_break_catch_sig prototype.
5462 * break-catch-syscall.c: Remove _initialize_break_catch_syscall
5464 * break-catch-throw.c: Remove _initialize_break_catch_throw
5466 * breakpoint.c: Remove _initialize_breakpoint prototype.
5467 * bsd-uthread.c: Remove _initialize_bsd_uthread prototype.
5468 * btrace.c: Remove _initialize_btrace prototype.
5469 * charset.c: Remove _initialize_charset prototype.
5470 * cli/cli-cmds.c: Remove _initialize_cli_cmds prototype.
5471 * cli/cli-dump.c: Remove _initialize_cli_dump prototype.
5472 * cli/cli-interp.c: Remove _initialize_cli_interp prototype.
5473 * cli/cli-logging.c: Remove _initialize_cli_logging prototype.
5474 * cli/cli-script.c: Remove _initialize_cli_script prototype.
5475 * coff-pe-read.c: Remove _initialize_coff_pe_read prototype.
5476 * coffread.c: Remove _initialize_coffread prototype.
5477 * compile/compile.c: Remove _initialize_compile prototype.
5478 * complaints.c: Remove _initialize_complaints prototype.
5479 * completer.c: Remove _initialize_completer prototype.
5480 * copying.awk: Remove _initialize_copying prototype.
5481 * copying.c: Regenerate.
5482 * core-regset.c: Remove _initialize_core_regset prototype.
5483 * corefile.c: Remove _initialize_core prototype.
5484 * corelow.c: Remove _initialize_corelow prototype.
5485 * cp-abi.c: Remove _initialize_cp_abi prototype.
5486 * cp-namespace.c: Remove _initialize_cp_namespace prototype.
5487 * cp-support.c: Remove _initialize_cp_support prototype.
5488 * cp-valprint.c: Remove _initialize_cp_valprint prototype.
5489 * cris-linux-tdep.c: Remove _initialize_cris_linux_tdep prototype.
5490 * cris-tdep.c: Remove _initialize_cris_tdep prototype.
5491 * ctf.c: Remove _initialize_ctf prototype.
5492 * d-lang.c: Remove _initialize_d_language prototype.
5493 * darwin-nat-info.c: Remove _initialize_darwin_info_commands
5495 * darwin-nat.c: Remove _initialize_darwin_inferior prototype.
5496 * dbxread.c: Remove _initialize_dbxread prototype.
5497 * dcache.c: Remove _initialize_dcache prototype.
5498 * demangle.c: Remove _initialize_demangler prototype.
5499 * disasm-selftests.c: Remove _initialize_disasm_selftests
5501 * disasm.c: Remove _initialize_disasm prototype.
5502 * dtrace-probe.c: Remove _initialize_dtrace_probe prototype.
5503 * dummy-frame.c: Remove _initialize_dummy_frame prototype.
5504 * dwarf2-frame-tailcall.c: Remove _initialize_tailcall_frame
5506 * dwarf2-frame.c: Remove _initialize_dwarf2_frame prototype.
5507 * dwarf2expr.c: Remove _initialize_dwarf2expr prototype.
5508 * dwarf2loc.c: Remove _initialize_dwarf2loc prototype.
5509 * dwarf2read.c: Remove _initialize_dwarf2_read prototype.
5510 * elfread.c: Remove _initialize_elfread prototype.
5511 * exec.c: Remove _initialize_exec prototype.
5512 * extension.c: Remove _initialize_extension prototype.
5513 * f-lang.c: Remove _initialize_f_language prototype.
5514 * f-valprint.c: Remove _initialize_f_valprint prototype.
5515 * fbsd-nat.c: Remove _initialize_fbsd_nat prototype.
5516 * fbsd-tdep.c: Remove _initialize_fbsd_tdep prototype.
5517 * filesystem.c: Remove _initialize_filesystem prototype.
5518 * findcmd.c: Remove _initialize_mem_search prototype.
5519 * fork-child.c: Remove _initialize_fork_child prototype.
5520 * frame-base.c: Remove _initialize_frame_base prototype.
5521 * frame-unwind.c: Remove _initialize_frame_unwind prototype.
5522 * frame.c: Remove _initialize_frame prototype.
5523 * frv-linux-tdep.c: Remove _initialize_frv_linux_tdep prototype.
5524 * frv-tdep.c: Remove _initialize_frv_tdep prototype.
5525 * ft32-tdep.c: Remove _initialize_ft32_tdep prototype.
5526 * gcore.c: Remove _initialize_gcore prototype.
5527 * gdb_bfd.c: Remove _initialize_gdb_bfd prototype.
5528 * gdbarch.c: Regenerate.
5529 * gdbarch.sh: Remove _initialize_gdbarch prototype.
5530 * gdbtypes.c: Remove _initialize_gdbtypes prototype.
5531 * gnu-nat.c: Remove _initialize_gnu_nat prototype.
5532 * gnu-v2-abi.c: Remove _initialize_gnu_v2_abi prototype.
5533 * gnu-v3-abi.c: Remove _initialize_gnu_v3_abi prototype.
5534 * go-lang.c: Remove _initialize_go_language prototype.
5535 * go32-nat.c: Remove _initialize_go32_nat prototype.
5536 * guile/guile.c: Remove _initialize_guile prototype.
5537 * h8300-tdep.c: Remove _initialize_h8300_tdep prototype.
5538 * hppa-linux-nat.c: Remove _initialize_hppa_linux_nat prototype.
5539 * hppa-linux-tdep.c: Remove _initialize_hppa_linux_tdep prototype.
5540 * hppa-nbsd-nat.c: Remove _initialize_hppanbsd_nat prototype.
5541 * hppa-nbsd-tdep.c: Remove _initialize_hppanbsd_tdep prototype.
5542 * hppa-obsd-nat.c: Remove _initialize_hppaobsd_nat prototype.
5543 * hppa-obsd-tdep.c: Remove _initialize_hppaobsd_tdep prototype.
5544 * hppa-tdep.c: Remove _initialize_hppa_tdep prototype.
5545 * i386-bsd-nat.c: Remove _initialize_i386bsd_nat prototype.
5546 * i386-cygwin-tdep.c: Remove _initialize_i386_cygwin_tdep
5548 * i386-darwin-tdep.c: Remove _initialize_i386_darwin_tdep
5550 * i386-dicos-tdep.c: Remove _initialize_i386_dicos_tdep prototype.
5551 * i386-fbsd-nat.c: Remove _initialize_i386fbsd_nat prototype.
5552 * i386-fbsd-tdep.c: Remove _initialize_i386fbsd_tdep prototype.
5553 * i386-gnu-nat.c: Remove _initialize_i386gnu_nat prototype.
5554 * i386-gnu-tdep.c: Remove _initialize_i386gnu_tdep prototype.
5555 * i386-linux-nat.c: Remove _initialize_i386_linux_nat prototype.
5556 * i386-linux-tdep.c: Remove _initialize_i386_linux_tdep prototype.
5557 * i386-nbsd-nat.c: Remove _initialize_i386nbsd_nat prototype.
5558 * i386-nbsd-tdep.c: Remove _initialize_i386nbsd_tdep prototype.
5559 * i386-nto-tdep.c: Remove _initialize_i386nto_tdep prototype.
5560 * i386-obsd-nat.c: Remove _initialize_i386obsd_nat prototype.
5561 * i386-obsd-tdep.c: Remove _initialize_i386obsd_tdep prototype.
5562 * i386-sol2-nat.c: Remove _initialize_amd64_sol2_nat prototype.
5563 * i386-sol2-tdep.c: Remove _initialize_amd64_sol2_tdep prototype.
5564 * i386-tdep.c: Remove _initialize_i386_tdep prototype.
5565 * i386-windows-nat.c: Remove _initialize_i386_windows_nat
5567 * ia64-libunwind-tdep.c: Remove _initialize_libunwind_frame
5569 * ia64-linux-nat.c: Remove _initialize_ia64_linux_nat prototype.
5570 * ia64-linux-tdep.c: Remove _initialize_ia64_linux_tdep prototype.
5571 * ia64-tdep.c: Remove _initialize_ia64_tdep prototype.
5572 * ia64-vms-tdep.c: Remove _initialize_ia64_vms_tdep prototype.
5573 * infcall.c: Remove _initialize_infcall prototype.
5574 * infcmd.c: Remove _initialize_infcmd prototype.
5575 * inferior.c: Remove _initialize_inferiors prototype.
5576 * inflow.c: Remove _initialize_inflow prototype.
5577 * infrun.c: Remove _initialize_infrun prototype.
5578 * interps.c: Remove _initialize_interpreter prototype.
5579 * iq2000-tdep.c: Remove _initialize_iq2000_tdep prototype.
5580 * jit.c: Remove _initialize_jit prototype.
5581 * language.c: Remove _initialize_language prototype.
5582 * linux-fork.c: Remove _initialize_linux_fork prototype.
5583 * linux-nat.c: Remove _initialize_linux_nat prototype.
5584 * linux-tdep.c: Remove _initialize_linux_tdep prototype.
5585 * linux-thread-db.c: Remove _initialize_thread_db prototype.
5586 * lm32-tdep.c: Remove _initialize_lm32_tdep prototype.
5587 * m2-lang.c: Remove _initialize_m2_language prototype.
5588 * m32c-tdep.c: Remove _initialize_m32c_tdep prototype.
5589 * m32r-linux-nat.c: Remove _initialize_m32r_linux_nat prototype.
5590 * m32r-linux-tdep.c: Remove _initialize_m32r_linux_tdep prototype.
5591 * m32r-tdep.c: Remove _initialize_m32r_tdep prototype.
5592 * m68hc11-tdep.c: Remove _initialize_m68hc11_tdep prototype.
5593 * m68k-bsd-nat.c: Remove _initialize_m68kbsd_nat prototype.
5594 * m68k-bsd-tdep.c: Remove _initialize_m68kbsd_tdep prototype.
5595 * m68k-linux-nat.c: Remove _initialize_m68k_linux_tdep prototype.
5596 * m68k-linux-tdep.c: Remove _initialize_m68k_linux_tdep prototype.
5597 * m68k-tdep.c: Remove _initialize_m68k_tdep prototype.
5598 * m88k-bsd-nat.c: Remove _initialize_m68kbsd_nat prototype.
5599 * m88k-tdep.c: Remove _initialize_m68kbsd_tdep prototype.
5600 * machoread.c: Remove _initialize_machoread prototype.
5601 * macrocmd.c: Remove _initialize_macrocmd prototype.
5602 * macroscope.c: Remove _initialize_macroscope prototype.
5603 * maint.c: Remove _initialize_maint_cmds prototype.
5604 * mdebugread.c: Remove _initialize_mdebugread prototype.
5605 * memattr.c: Remove _initialize_mem prototype.
5606 * mep-tdep.c: Remove _initialize_mep_tdep prototype.
5607 * mi/mi-cmd-env.c: Remove _initialize_mi_cmd_env prototype.
5608 * mi/mi-cmds.c: Remove _initialize_mi_cmds prototype.
5609 * mi/mi-interp.c: Remove _initialize_mi_interp prototype.
5610 * mi/mi-main.c: Remove _initialize_mi_main prototype.
5611 * microblaze-linux-tdep.c: Remove
5612 _initialize_microblaze_linux_tdep prototype.
5613 * microblaze-tdep.c: Remove _initialize_microblaze_tdep prototype.
5614 * mips-fbsd-nat.c: Remove _initialize_mips_fbsd_nat prototype.
5615 * mips-fbsd-tdep.c: Remove _initialize_mips_fbsd_tdep prototype.
5616 * mips-linux-nat.c: Remove _initialize_mips_linux_nat prototype.
5617 * mips-linux-tdep.c: Remove _initialize_mips_linux_tdep prototype.
5618 * mips-nbsd-nat.c: Remove _initialize_mipsnbsd_nat prototype.
5619 * mips-nbsd-tdep.c: Remove _initialize_mipsnbsd_tdep prototype.
5620 * mips-sde-tdep.c: Remove _initialize_mips_sde_tdep prototype.
5621 * mips-tdep.c: Remove _initialize_mips_tdep prototype.
5622 * mips64-obsd-nat.c: Remove _initialize_mips64obsd_nat prototype.
5623 * mips64-obsd-tdep.c: Remove _initialize_mips64obsd_tdep
5625 * mipsread.c: Remove _initialize_mipsread prototype.
5626 * mn10300-linux-tdep.c: Remove _initialize_mn10300_linux_tdep
5628 * mn10300-tdep.c: Remove _initialize_mn10300_tdep prototype.
5629 * moxie-tdep.c: Remove _initialize_moxie_tdep prototype.
5630 * msp430-tdep.c: Remove _initialize_msp430_tdep prototype.
5631 * mt-tdep.c: Remove _initialize_mt_tdep prototype.
5632 * nds32-tdep.c: Remove _initialize_nds32_tdep prototype.
5633 * nios2-linux-tdep.c: Remove _initialize_nios2_linux_tdep
5635 * nios2-tdep.c: Remove _initialize_nios2_tdep prototype.
5636 * nto-procfs.c: Remove _initialize_procfs prototype.
5637 * nto-tdep.c: Remove _initialize_nto_tdep prototype.
5638 * objc-lang.c: Remove _initialize_objc_language prototype.
5639 * objfiles.c: Remove _initialize_objfiles prototype.
5640 * observer.c: Remove observer_test_first_notification_function,
5641 observer_test_second_notification_function,
5642 observer_test_third_notification_function, and
5643 _initialize_observer prototypes.
5644 * opencl-lang.c: Remove _initialize_opencl_language prototypes.
5645 * osabi.c: Remove _initialize_gdb_osabi prototype.
5646 * osdata.c: Remove _initialize_osdata prototype.
5647 * p-valprint.c: Remove _initialize_pascal_valprint prototype.
5648 * parse.c: Remove _initialize_parse prototype.
5649 * ppc-fbsd-nat.c: Remove _initialize_ppcfbsd_nat prototype.
5650 * ppc-fbsd-tdep.c: Remove _initialize_ppcfbsd_tdep prototype.
5651 * ppc-linux-nat.c: Remove _initialize_ppc_linux_nat prototype.
5652 * ppc-linux-tdep.c: Remove _initialize_ppc_linux_tdep prototype.
5653 * ppc-nbsd-nat.c: Remove _initialize_ppcnbsd_nat prototype.
5654 * ppc-nbsd-tdep.c: Remove _initialize_ppcnbsd_tdep prototype.
5655 * ppc-obsd-nat.c: Remove _initialize_ppcobsd_nat prototype.
5656 * ppc-obsd-tdep.c: Remove _initialize_ppcobsd_tdep prototype.
5657 * printcmd.c: Remove _initialize_printcmd prototype.
5658 * probe.c: Remove _initialize_probe prototype.
5659 * proc-api.c: Remove _initialize_proc_api prototype.
5660 * proc-events.c: Remove _initialize_proc_events prototype.
5661 * proc-service.c: Remove _initialize_proc_service prototype.
5662 * procfs.c: Remove _initialize_procfs prototype.
5663 * psymtab.c: Remove _initialize_psymtab prototype.
5664 * python/python.c: Remove _initialize_python prototype.
5665 * ravenscar-thread.c: Remove _initialize_ravenscar prototype.
5666 * record-btrace.c: Remove _initialize_record_btrace prototype.
5667 * record-full.c: Remove _initialize_record_full prototype.
5668 * record.c: Remove _initialize_record prototype.
5669 * regcache.c: Remove _initialize_regcache prototype.
5670 * reggroups.c: Remove _initialize_reggroup prototype.
5671 * remote-notif.c: Remove _initialize_notif prototype.
5672 * remote-sim.c: Remove _initialize_remote_sim prototype.
5673 * remote.c: Remove _initialize_remote prototype.
5674 * reverse.c: Remove _initialize_reverse prototype.
5675 * rl78-tdep.c: Remove _initialize_rl78_tdep prototype.
5676 * rs6000-aix-tdep.c: Remove _initialize_rs6000_aix_tdep prototype.
5677 * rs6000-lynx178-tdep.c: Remove _initialize_rs6000_lynx178_tdep
5679 * rs6000-nat.c: Remove _initialize_rs6000_nat prototype.
5680 * rs6000-tdep.c: Remove _initialize_rs6000_tdep prototype.
5681 * rust-exp.y: Remove _initialize_rust_exp prototype.
5682 * rx-tdep.c: Remove _initialize_rx_tdep prototype.
5683 * s390-linux-nat.c: Remove _initialize_s390_nat prototype.
5684 * s390-linux-tdep.c: Remove _initialize_s390_tdep prototype.
5685 * score-tdep.c: Remove _initialize_score_tdep prototype.
5686 * selftest-arch.c: Remove _initialize_selftests_foreach_arch
5688 * ser-go32.c: Remove _initialize_ser_dos prototype.
5689 * ser-mingw.c: Remove _initialize_ser_windows prototype.
5690 * ser-pipe.c: Remove _initialize_ser_pipe prototype.
5691 * ser-tcp.c: Remove _initialize_ser_tcp prototype.
5692 * ser-unix.c: Remove _initialize_ser_hardwire prototype.
5693 * serial.c: Remove _initialize_serial prototype.
5694 * sh-linux-tdep.c: Remove _initialize_sh_linux_tdep prototype.
5695 * sh-nbsd-nat.c: Remove _initialize_shnbsd_nat prototype.
5696 * sh-nbsd-tdep.c: Remove _initialize_shnbsd_tdep prototype.
5697 * sh-tdep.c: Remove _initialize_sh_tdep prototype.
5698 * skip.c: Remove _initialize_step_skip prototype.
5699 * sol-thread.c: Remove _initialize_sol_thread prototype.
5700 * solib-aix.c: Remove _initialize_solib_aix prototype.
5701 * solib-darwin.c: Remove _initialize_darwin_solib prototype.
5702 * solib-dsbt.c: Remove _initialize_dsbt_solib prototype.
5703 * solib-frv.c: Remove _initialize_frv_solib prototype.
5704 * solib-spu.c: Remove _initialize_spu_solib prototype.
5705 * solib-svr4.c: Remove _initialize_svr4_solib prototype.
5706 * solib-target.c: Remove _initialize_solib_target prototype.
5707 * solib.c: Remove _initialize_solib prototype.
5708 * source.c: Remove _initialize_source prototype.
5709 * sparc-linux-nat.c: Remove _initialize_sparc_linux_nat prototype.
5710 * sparc-linux-tdep.c: Remove _initialize_sparc_linux_tdep
5712 * sparc-nat.c: Remove _initialize_sparc_nat prototype.
5713 * sparc-nbsd-nat.c: Remove _initialize_sparcnbsd_nat prototype.
5714 * sparc-nbsd-tdep.c: Remove _initialize_sparcnbsd_tdep prototype.
5715 * sparc-obsd-tdep.c: Remove _initialize_sparc32obsd_tdep
5717 * sparc-sol2-nat.c: Remove _initialize_sparc_sol2_nat prototype.
5718 * sparc-sol2-tdep.c: Remove _initialize_sparc_sol2_tdep prototype.
5719 * sparc-tdep.c: Remove _initialize_sparc_tdep prototype.
5720 * sparc64-fbsd-nat.c: Remove _initialize_sparc64fbsd_nat
5722 * sparc64-fbsd-tdep.c: Remove _initialize_sparc64fbsd_tdep
5724 * sparc64-linux-nat.c: Remove _initialize_sparc64_linux_nat
5726 * sparc64-linux-tdep.c: Remove _initialize_sparc64_linux_tdep
5728 * sparc64-nat.c: Remove _initialize_sparc64_nat prototype.
5729 * sparc64-nbsd-nat.c: Remove _initialize_sparc64nbsd_nat
5731 * sparc64-nbsd-tdep.c: Remove _initialize_sparc64nbsd_tdep
5733 * sparc64-obsd-nat.c: Remove _initialize_sparc64obsd_nat
5735 * sparc64-obsd-tdep.c: Remove _initialize_sparc64obsd_tdep
5737 * sparc64-sol2-tdep.c: Remove _initialize_sparc64_sol2_tdep
5739 * spu-linux-nat.c: Remove _initialize_spu_nat prototype.
5740 * spu-multiarch.c: Remove _initialize_spu_multiarch prototype.
5741 * spu-tdep.c: Remove _initialize_spu_tdep prototype.
5742 * stabsread.c: Remove _initialize_stabsread prototype.
5743 * stack.c: Remove _initialize_stack prototype.
5744 * stap-probe.c: Remove _initialize_stap_probe prototype.
5745 * std-regs.c: Remove _initialize_frame_reg prototype.
5746 * symfile-debug.c: Remove _initialize_symfile_debug prototype.
5747 * symfile-mem.c: Remove _initialize_symfile_mem prototype.
5748 * symfile.c: Remove _initialize_symfile prototype.
5749 * symmisc.c: Remove _initialize_symmisc prototype.
5750 * symtab.c: Remove _initialize_symtab prototype.
5751 * target-dcache.c: Remove _initialize_target_dcache prototype.
5752 * target-descriptions.c: Remove _initialize_target_descriptions
5754 * thread.c: Remove _initialize_thread prototype.
5755 * tic6x-linux-tdep.c: Remove _initialize_tic6x_linux_tdep
5757 * tic6x-tdep.c: Remove _initialize_tic6x_tdep prototype.
5758 * tilegx-linux-nat.c: Remove _initialize_tile_linux_nat prototype.
5759 * tilegx-linux-tdep.c: Remove _initialize_tilegx_linux_tdep
5761 * tilegx-tdep.c: Remove _initialize_tilegx_tdep prototype.
5762 * tracefile-tfile.c: Remove _initialize_tracefile_tfile prototype.
5763 * tracefile.c: Remove _initialize_tracefile prototype.
5764 * tracepoint.c: Remove _initialize_tracepoint prototype.
5765 * tui/tui-hooks.c: Remove _initialize_tui_hooks prototype.
5766 * tui/tui-interp.c: Remove _initialize_tui_interp prototype.
5767 * tui/tui-layout.c: Remove _initialize_tui_layout prototype.
5768 * tui/tui-regs.c: Remove _initialize_tui_regs prototype.
5769 * tui/tui-stack.c: Remove _initialize_tui_stack prototype.
5770 * tui/tui-win.c: Remove _initialize_tui_win prototype.
5771 * tui/tui.c: Remove _initialize_tui prototype.
5772 * typeprint.c: Remove _initialize_typeprint prototype.
5773 * user-regs.c: Remove _initialize_user_regs prototype.
5774 * utils.c: Remove _initialize_utils prototype.
5775 * v850-tdep.c: Remove _initialize_v850_tdep prototype.
5776 * valarith.c: Remove _initialize_valarith prototype.
5777 * valops.c: Remove _initialize_valops prototype.
5778 * valprint.c: Remove _initialize_valprint prototype.
5779 * value.c: Remove _initialize_values prototype.
5780 * varobj.c: Remove _initialize_varobj prototype.
5781 * vax-bsd-nat.c: Remove _initialize_vaxbsd_nat prototype.
5782 * vax-nbsd-tdep.c: Remove _initialize_vaxnbsd_tdep prototype.
5783 * vax-tdep.c: Remove _initialize_vax_tdep prototype.
5784 * windows-nat.c: Remove _initialize_windows_nat,
5785 _initialize_check_for_gdb_ini, and _initialize_loadable
5787 * windows-tdep.c: Remove _initialize_windows_tdep prototype.
5788 * xcoffread.c: Remove _initialize_xcoffread prototype.
5789 * xml-support.c: Remove _initialize_xml_support prototype.
5790 * xstormy16-tdep.c: Remove _initialize_xstormy16_tdep prototype.
5791 * xtensa-linux-nat.c: Remove _initialize_xtensa_linux_nat
5793 * xtensa-linux-tdep.c: Remove _initialize_xtensa_linux_tdep
5795 * xtensa-tdep.c: Remove _initialize_xtensa_tdep prototype.
5797 2017-09-08 Keith Seitz <keiths@redhat.com>
5799 * dwarf2read.c (struct field_info) <fnfields>: Remove unused
5802 2017-09-08 Christoph Weinmann <christoph.t.weinmann@intel.com>
5804 * f-valprint.c (f_val_print): Remove check for one byte
5805 sized integers. Remove printing of character type.
5807 2017-09-08 Frank Penczek <frank.penczek@intel.com>
5808 Christoph Weinmann <christoph.t.weinmann@intel.com>
5809 Bernhard Heckel <bernhard.heckel@intel.com>
5811 * f-typeprint.c (f_type_print_base): Use fprintfi_filtered
5812 to maintain proper indentation when printing pointers/refs.
5814 2017-09-07 Joel Brobecker <brobecker@adacore.com>
5818 2017-09-07 Joel Brobecker <brobecker@adacore.com>
5820 * NEWS (Changes in GDB 7.11): Remove entry for QStartupWithShell.
5822 2017-09-05 Tom Tromey <tom@tromey.com>
5824 * parse.c (funcall_chain): Now a std::vector.
5825 (start_arglist, end_arglist): Simplify.
5826 (free_funcalls): Remove.
5827 (parse_exp_in_context_1): Remove cleanup.
5829 2017-09-05 Tom Tromey <tom@tromey.com>
5831 * go-exp.y (go_parse): Don't create a cleanup.
5833 2017-09-05 Tom Tromey <tom@tromey.com>
5835 * d-exp.y (PrimaryExpression): Use std::string.
5836 (d_parse): Don't create a cleanup.
5838 2017-09-05 Tom Tromey <tom@tromey.com>
5840 * utils.c (do_clear_parser_state): Remove.
5841 (make_cleanup_clear_parser_state): Remove.
5842 * p-exp.y (pascal_parse): Use scoped_restore.
5843 * m2-exp.y (m2_parse): Use scoped_restore.
5844 * f-exp.y (f_parse): Use scoped_restore.
5845 * d-exp.y (d_parse): Use scoped_restore.
5846 * c-exp.y (c_parse): Use scoped_restore.
5847 * ada-exp.y (ada_parse): Use scoped_restore.
5848 * utils.h (make_cleanup_clear_parser_state): Remove.
5850 2017-09-06 Keith Seitz <keiths@redhat.com>
5852 * dwarf2read.c (dw2_linkage_name_attr): New function.
5853 (dw2_linkage_name): New function.
5854 (dwarf2_compute_name, dwarf2_physname, read_call_site_scope)
5855 (guess_full_die_structure_name, dwarf2_name): Use dw2_linkage_name.
5856 (anonymous_struct_prefix, dwarf2_name): Use dw2_linkage_name_attr.
5858 2017-09-06 Kamil Rytarowski <n54@gmx.com>
5860 * config/djgpp/djconfig.sh: Correct shell portability issue.
5862 2017-09-06 Kamil Rytarowski <n54@gmx.com>
5864 * configure.nat: Define HAVE_NATIVE_GCORE_HOST on NetBSD.
5866 2017-09-06 John Baldwin <jhb@FreeBSD.org>
5868 * Makefile.in (ALLDEPFILES): Add mips-fbsd-nat.c.
5869 * NEWS: Mention new FreeBSD/mips native configuration.
5870 * configure.host: Add aarch64*-*-freebsd*.
5871 * configure.nat: Likewise.
5872 * aarch64-fbsd-nat.c: New file.
5874 2017-09-06 John Baldwin <jhb@FreeBSD.org>
5876 * Makefile.in (ALL_64_TARGET_OBS): Add aarch64-fbsd-tdep.o.
5877 (ALLDEPFILES): Add aarch64-fbsd-tdep.c.
5878 * NEWS: Mention new FreeBSD/aarch64 target.
5879 * configure.tgt: Add aarch64*-*-freebsd*.
5880 * aarch64-fbsd-tdep.c: New file.
5881 * aarch64-fbsd-tdep.h: New file.
5883 2017-09-06 Kamil Rytarowski <n54@gmx.com>
5885 * MAINTAINERS (Write After Approval): Add Kamil Rytarowski.
5887 2017-09-06 Jan Kratochvil <jan.kratochvil@redhat.com>
5889 * parse.c (find_minsym_type_and_address): Don't relocate addresses
5892 2017-09-05 Philippe Waroquiers <philippe.waroquiers@skynet.be>
5894 * objfiles.c (get_objfile_bfd_data): Remove useless obstack_init
5897 2017-09-05 Simon Marchi <simon.marchi@ericsson.com>
5899 * infrun.c (follow_exec): Call add_thread after
5900 target_find_description.
5902 2017-09-05 Simon Marchi <simon.marchi@ericsson.com>
5904 * infrun.c (handle_inferior_event_1): When exec'ing, read
5905 stop_pc after follow_exec.
5907 2017-09-05 Simon Marchi <simon.marchi@ericsson.com>
5909 * remote.c (process_g_packet): Update error message.
5911 2017-09-05 Yao Qi <yao.qi@linaro.org>
5913 * configure.tgt (gdb_target_obs): Add i386.o for x86_64-*
5916 2017-09-05 Pedro Alves <palves@redhat.com>
5918 * eval.c (eval_call, evaluate_funcall): New functions, factored
5920 (evaluate_subexp_standard): ... this.
5922 2017-09-05 Yao Qi <yao.qi@linaro.org>
5924 * amd64-tdep.c (amd64_target_description): Create target
5926 (_initialize_amd64_tdep): Don't call functions
5927 initialize_tdesc_amd64_*. Add self tests.
5928 * arch/amd64.c (amd64_create_target_description): Add parameter
5929 is_linux. Call set_tdesc_osabi if is_linux is true.
5930 * arch/amd64.h (amd64_create_target_description): Update the
5932 * arch/i386.c (i386_create_target_description): Add parameter
5933 is_linux. Call set_tdesc_osabi if is_linux is true.
5934 * arch/i386.h (i386_create_target_description): Update
5936 * configure.tgt: Add i386.o to gdb_target_obs.
5937 * features/Makefile (XMLTOC): Remove i386/*.xml.
5938 * features/i386/amd64-avx-avx512.c: Remove.
5939 * features/i386/amd64-avx-mpx-avx512-pku.c: Remove.
5940 * features/i386/amd64-avx-mpx.c: Remove.
5941 * features/i386/amd64-avx.c: Remove.
5942 * features/i386/amd64-mpx.c: Remove.
5943 * features/i386/amd64.c: Remove.
5944 * features/i386/i386-avx-avx512.c: Remove.
5945 * features/i386/i386-avx-mpx-avx512-pku.c: Remove.
5946 * features/i386/i386-avx-mpx.c: Remove.
5947 * features/i386/i386-avx.c: Remove.
5948 * features/i386/i386-mmx.c: Remove.
5949 * features/i386/i386-mpx.c: Remove.
5950 * features/i386/i386.c: Remove.
5951 * i386-tdep.c: Don't include features/i386/i386*.c., include
5952 target-descriptions.h and arch/i386.h.
5953 (i386_target_description): Create target descriptions.
5954 (i386_gdbarch_init): Don't call initialize_tdesc_i386_*
5955 functions. Do self tests.
5957 2017-09-05 Yao Qi <yao.qi@linaro.org>
5959 * features/Makefile (XMLTOC): Remove i386/amd64XXX-linux.xml.
5960 * features/i386/amd64-avx-avx512-linux.c: Removed.
5961 * features/i386/amd64-avx-linux.c: Removed.
5962 * features/i386/amd64-avx-mpx-avx512-pku-linux.c: Removed.
5963 * features/i386/amd64-avx-mpx-linux.c: Removed.
5964 * features/i386/amd64-linux.c: Removed.
5965 * features/i386/amd64-mpx-linux.c: Removed.
5966 * features/i386/x32-avx-avx512-linux.c: Removed.
5967 * features/i386/x32-avx-linux.c: Removed.
5968 * features/i386/x32-linux.c: Removed.
5970 2017-09-05 Yao Qi <yao.qi@linaro.org>
5972 * amd64-linux-tdep.c: Include arch/amd64.h. Don't include
5974 (amd64_linux_read_description): Call
5975 amd64_create_target_description.
5976 * arch/amd64.c: New file.
5977 * arch/amd64.h: New file.
5978 * configure.tgt (x86_64-*-linux*): Append amd64.o.
5979 * Makefile.in (ALL_64_TARGET_OBS): Append amd64.o.
5981 2017-09-05 Yao Qi <yao.qi@linaro.org>
5983 * amd64-linux-tdep.c: Don't include amd64-XXX-linux and
5984 x32-XXX-linux.c. Include 64bit-XX.c and x32-XX.c.
5985 (amd64_linux_read_description): Create target descriptions.
5986 (_initialize_amd64_linux_tdep): Don't call initialize_tdesc_XXX
5987 functions. Add unit tests.
5988 * features/Makefile (FEATURE_XMLFILES): Append 64bit-XXX.xml and
5990 * features/i386/64bit-avx.c: Generated.
5991 * features/i386/64bit-avx512.c: Generated.
5992 * features/i386/64bit-core.c: Generated.
5993 * features/i386/64bit-linux.c: Generated.
5994 * features/i386/64bit-mpx.c: Generated.
5995 * features/i386/64bit-pkeys.c: Generated.
5996 * features/i386/64bit-segments.c: Generated.
5997 * features/i386/64bit-sse.c: Generated.
5998 * features/i386/x32-core.c: Generated.
5999 * target-descriptions.c (maint_print_c_tdesc_cmd): Print feature
6000 c files for amd64-linux and x32-linux.
6002 2017-09-05 Yao Qi <yao.qi@linaro.org>
6004 * amd64-linux-tdep.c (amd64_linux_read_description): New
6006 (amd64_linux_core_read_description): Call
6007 amd64_linux_read_description.
6008 (amd64_linux_init_abi): Likewise.
6009 (amd64_x32_linux_init_abi): Likewise.
6010 * amd64-linux-tdep.h (amd64_linux_read_description): Declare.
6011 * x86-linux-nat.c (x86_linux_read_description): Call
6012 amd64_linux_read_description.
6014 2017-09-05 Yao Qi <yao.qi@linaro.org>
6016 * amd64-linux-tdep.c (amd64_linux_core_read_description): Update
6019 2017-09-05 Yao Qi <yao.qi@linaro.org>
6021 * features/Makefile (XMLTOC): Remove i386/i386-XX-linux.xml.
6022 * features/i386/i386-avx-avx512-linux.c: Remove.
6023 * features/i386/i386-avx-linux.c: Remove.
6024 * features/i386/i386-avx-mpx-avx512-pku-linux.c: Remove.
6025 * features/i386/i386-avx-mpx-linux.c: Remove.
6026 * features/i386/i386-linux.c: Remove.
6027 * features/i386/i386-mmx-linux.c: Remove.
6028 * features/i386/i386-mpx-linux.c: Remove.
6030 2017-09-05 Yao Qi <yao.qi@linaro.org>
6032 * Makefile.in (ALL_TARGET_OBS): Add i386.o.
6033 (SFILES): Add arch/i386.c.
6034 (HFILES_NO_SRCDIR): Add arch/i386.h.
6035 * arch/i386.c: New file.
6036 * arch/i386.h: New file.
6037 * arch/tdesc.h (allocate_target_description): Declare.
6038 (set_tdesc_architecture): Declare.
6039 (set_tdesc_osabi): Declare.
6040 * configure.tgt (i[34567]86-*-linux*): Add i386.o.
6041 * i386-linux-tdep.c: Don't include ../features/i386/32bit-XXX.c.
6042 include arch/i386.h.
6043 (i386_linux_read_description): Remove code and call
6044 i386_create_target_description.
6045 (set_tdesc_architecture): New function.
6046 (set_tdesc_osabi): New function.
6047 * target-descriptions.h (allocate_target_description): Remove.
6049 2017-09-05 Yao Qi <yao.qi@linaro.org>
6051 * arch/tdesc.h (tdesc_create_feature): Add an argument xml.
6052 * target-descriptions.c (tdesc_create_feature): Likewise, and
6054 * features/i386/32bit-avx.c: Re-generated.
6055 * features/i386/32bit-avx512.c: Re-generated.
6056 * features/i386/32bit-core.c: Re-generated.
6057 * features/i386/32bit-linux.c: Re-generated.
6058 * features/i386/32bit-mpx.c: Re-generated.
6059 * features/i386/32bit-pkeys.c: Re-generated.
6060 * features/i386/32bit-sse.c: Re-generated.
6062 2017-09-05 Yao Qi <yao.qi@linaro.org>
6064 * regformats/regdef.h (struct reg): Override operator == and !=.
6066 2017-09-05 Yao Qi <yao.qi@linaro.org>
6068 * arch/tdesc.h: New file.
6069 * regformats/regdat.sh: Generate code using tdesc_create_reg.
6070 * target-descriptions.c: Update comments.
6071 * target-descriptions.h: Include "arch/tdesc.h". Remove the
6073 * features/i386/32bit-avx.c: Re-generated.
6074 * features/i386/32bit-avx512.c: Re-generated.
6075 * features/i386/32bit-core.c: Re-generated.
6076 * features/i386/32bit-linux.c: Re-generated.
6077 * features/i386/32bit-mpx.c: Re-generated.
6078 * features/i386/32bit-pkeys.c: Re-generated.
6079 * features/i386/32bit-sse.c: Re-generated.
6081 2017-09-05 Yao Qi <yao.qi@linaro.org>
6083 * regformats/regdat.sh: Update generated code.
6085 2017-09-05 Yao Qi <yao.qi@linaro.org>
6087 * regformats/regdat.sh: Adjust code order.
6089 2017-09-05 Simon Marchi <simon.marchi@ericsson.com>
6091 * expprint.c (dump_subexp_body_standard): Use constant format
6092 string in fprintf_filtered call.
6094 2017-09-04 John Baldwin <jhb@FreeBSD.org>
6096 * configure.nat: Add "x86-nat.o x86-dregs.o" for NetBSD/amd64 and
6098 * x86-bsd-nat.c [!DBREG_DRX && __NetBSD__]: Define DBREG_DRX.
6100 2017-09-04 John Baldwin <jhb@FreeBSD.org>
6102 * bsd-kvm.o: Make <sys/user.h> conditional on HAVE_SYS_USER_H.
6104 2017-09-04 John Baldwin <jhb@FreeBSD.org>
6106 * bsd-kvm.o: Define _KMEMUSER.
6107 * configure.ac: Define _KMEMUSER when checking for "struct lwp".
6108 * configure: Regenerate.
6110 2017-09-04 John Baldwin <jhb@FreeBSD.org>
6112 * amd64-fbsd-nat.c: Add include of "x86-xstate.h".
6113 * i386-fbsd-nat.c: Likewise.
6115 2017-09-04 John Baldwin <jhb@FreeBSD.org>
6117 * unittests/array-view-selftests.c: Add include of <array>.
6119 2017-09-04 John Baldwin <jhb@FreeBSD.org>
6121 * spu-tdep.c (flush_ea_cache): Add missing argument to
6122 call_function_by_hand.
6124 2017-09-04 Pedro Alves <palves@redhat.com>
6126 * NEWS (Safer support for debugging with no debug info): New.
6128 2017-09-04 Pedro Alves <palves@redhat.com>
6130 * c-exp.y (function_method, function_method_void): Add current
6131 instance flags to TYPE_INSTANCE.
6132 * dwarf2read.c (check_modifier): New.
6133 (compute_delayed_physnames): Assert that only C++ adds delayed
6134 physnames. Mark fn_fields as const/volatile depending on
6136 * eval.c (make_params): New type_instance_flags parameter. Use
6137 it as the new type's instance flags.
6138 (evaluate_subexp_standard) <TYPE_INSTANCE>: Extract the instance
6139 flags element and pass it to make_params.
6140 * expprint.c (print_subexp_standard) <TYPE_INSTANCE>: Handle
6141 instance flags element.
6142 (dump_subexp_body_standard) <TYPE_INSTANCE>: Likewise.
6143 * gdbtypes.h: Include "enum-flags.h".
6144 (type_instance_flags): New enum-flags type.
6145 (TYPE_CONST, TYPE_VOLATILE, TYPE_RESTRICT, TYPE_ATOMIC)
6146 (TYPE_CODE_SPACE, TYPE_DATA_SPACE): Return boolean.
6147 * parse.c (operator_length_standard) <TYPE_INSTANCE>: Adjust.
6148 (follow_type_instance_flags): New function.
6149 (operator_check_standard) <TYPE_INSTANCE>: Adjust.
6150 * parser-defs.h (follow_type_instance_flags): Declare.
6151 * valops.c (value_struct_elt_for_reference): const/volatile must
6154 2017-09-04 Pedro Alves <palves@redhat.com>
6156 * cp-namespace.c (cp_search_static_and_baseclasses): Handle
6157 function/method scopes; lookup the nested name as a function local
6160 2017-09-04 Pedro Alves <palves@redhat.com>
6162 (%type <voidval>): Add function_method.
6163 * c-exp.y (exp): New production for calls with no arguments.
6164 (function_method, function_method_void_or_typelist): New
6166 (exp): New production for "method()::static_var".
6167 * eval.c (evaluate_subexp_standard): Handle OP_FUNC_STATIC_VAR.
6168 * expprint.c (print_subexp_standard, dump_subexp_body_standard):
6169 Handle OP_FUNC_STATIC_VAR.
6170 * parse.c (operator_length_standard):
6171 Handle OP_FUNC_STATIC_VAR.
6173 2017-09-04 Pedro Alves <palves@redhat.com>
6175 * eval.c (evaluate_subexp_standard): Remove UNOP_MEMVAL_TLS
6177 * expprint.c (print_subexp_standard, dump_subexp_body_standard):
6179 * parse.c (operator_length_standard, operator_check_standard):
6181 * std-operator.def (UNOP_MEMVAL_TLS): Delete.
6183 2017-09-04 Pedro Alves <palves@redhat.com>
6185 * ax-gdb.c: Include "typeprint.h".
6186 (gen_expr_for_cast): New function.
6187 (gen_expr) <OP_CAST, OP_CAST_TYPE>: Use it.
6188 <OP_VAR_VALUE, OP_MSYM_VAR_VALUE>: Error out if the variable's
6190 * dwarf2read.c (new_symbol_full): Fallback to int instead of
6191 nodebug_data_symbol.
6192 * eval.c: Include "typeprint.h".
6193 (evaluate_subexp_standard) <OP_VAR_VALUE, OP_VAR_MSYM_VALUE>:
6194 Error out if symbol has unknown type.
6195 <UNOP_CAST, UNOP_CAST_TYPE>: Common bits factored out to
6196 evaluate_subexp_for_cast.
6197 (evaluate_subexp_for_address, evaluate_subexp_for_sizeof): Handle
6199 (evaluate_subexp_for_cast): New function.
6200 * gdbtypes.c (init_nodebug_var_type): New function.
6201 (objfile_type): Use it to initialize types of variables with no
6203 * typeprint.c (error_unknown_type): New.
6204 * typeprint.h (error_unknown_type): New declaration.
6205 * compile/compile-c-types.c (convert_type_basic): Handle
6206 TYPE_CODE_ERROR; warn and fallback to int for variables with
6209 2017-09-04 Pedro Alves <palves@redhat.com>
6211 * eval.c (evaluate_var_value): New function, factored out from ...
6212 (evaluate_subexp_standard): ... here.
6214 2017-09-04 Pedro Alves <palves@redhat.com>
6216 * eval.c (evaluate_subexp_standard) <UNOP_COMPLEMENT, UNOP_ADDR>:
6217 Remove useless assignments to 'op'.
6219 2017-09-04 Pedro Alves <palves@redhat.com>
6221 * eval.c (eval_skip_value): New function.
6222 (evaluate_subexp_standard): Use it.
6224 2017-09-04 Pedro Alves <palves@redhat.com>
6226 * eval.c (evaluate_subexp_standard): <OP_FUNCALL>: Extract
6227 function name from symbol/minsym and pass it to
6228 error_call_unknown_return_type.
6230 2017-09-04 Pedro Alves <palves@redhat.com>
6232 * ada-lang.c (resolve_subexp): Handle OP_VAR_MSYM_VALUE.
6233 * ax-gdb.c (gen_msym_var_ref): New function.
6234 (gen_expr): Handle OP_VAR_MSYM_VALUE.
6235 * eval.c (evaluate_var_msym_value): New function.
6236 * eval.c (evaluate_subexp_standard): Handle OP_VAR_MSYM_VALUE.
6237 <OP_FUNCALL>: Extract function name from symbol/minsym and pass it
6238 to call_function_by_hand.
6239 * expprint.c (print_subexp_standard, dump_subexp_body_standard):
6240 Handle OP_VAR_MSYM_VALUE.
6241 (union exp_element) <msymbol>: New field.
6242 * minsyms.h (struct type): Forward declare.
6243 (find_minsym_type_and_address): Declare.
6244 * parse.c (write_exp_elt_msym): New function.
6245 (write_exp_msymbol): Delete, refactored as ...
6246 (find_minsym_type_and_address): ... this new function.
6247 (write_exp_msymbol): Reimplement using OP_VAR_MSYM_VALUE.
6248 (operator_length_standard, operator_check_standard): Handle
6250 * std-operator.def (OP_VAR_MSYM_VALUE): New.
6252 2017-09-04 Pedro Alves <palves@redhat.com>
6254 * ada-lang.c (ada_evaluate_subexp) <TYPE_CODE_FUNC>: Don't handle
6255 TYPE_GNU_IFUNC specially here. Throw error if return type is
6257 * ada-typeprint.c (print_func_type): Handle functions with unknown
6259 * c-typeprint.c (c_type_print_base): Handle functions and methods
6260 with unknown return type.
6261 * compile/compile-c-symbols.c (convert_symbol_bmsym)
6262 <mst_text_gnu_ifunc>: Use nodebug_text_gnu_ifunc_symbol.
6263 * compile/compile-c-types.c: Include "objfiles.h".
6264 (convert_func): For functions with unknown return type, warn and
6266 * compile/compile-object-run.c (compile_object_run): Adjust call
6267 to call_function_by_hand_dummy.
6268 * elfread.c (elf_gnu_ifunc_resolve_addr): Adjust call to
6269 call_function_by_hand.
6270 * eval.c (evaluate_subexp_standard): Adjust calls to
6271 call_function_by_hand. Handle functions and methods with unknown
6272 return type. Pass expect_type to call_function_by_hand.
6273 * f-typeprint.c (f_type_print_base): Handle functions with unknown
6275 * gcore.c (call_target_sbrk): Adjust call to
6276 call_function_by_hand.
6277 * gdbtypes.c (objfile_type): Leave nodebug text symbol with NULL
6278 return type instead of int. Make nodebug_text_gnu_ifunc_symbol be
6279 an integer address type instead of nodebug.
6280 * guile/scm-value.c (gdbscm_value_call): Adjust call to
6281 call_function_by_hand.
6282 * infcall.c (error_call_unknown_return_type): New function.
6283 (call_function_by_hand): New "default_return_type" parameter.
6285 (call_function_by_hand_dummy): New "default_return_type"
6286 parameter. Use it instead of defaulting to int. If there's no
6287 default and the return type is unknown, throw an error. If
6288 there's a default return type, and the called function has no
6289 debug info, then assume the function is prototyped.
6290 * infcall.h (call_function_by_hand, call_function_by_hand_dummy):
6291 New "default_return_type" parameter.
6292 (error_call_unknown_return_type): New declaration.
6293 * linux-fork.c (call_lseek): Cast return type of lseek.
6294 (inferior_call_waitpid, checkpoint_command): Adjust calls to
6295 call_function_by_hand.
6296 * linux-tdep.c (linux_infcall_mmap, linux_infcall_munmap): Adjust
6297 calls to call_function_by_hand.
6298 * m2-typeprint.c (m2_procedure): Handle functions with unknown
6300 * objc-lang.c (lookup_objc_class, lookup_child_selector)
6301 (value_nsstring, print_object_command): Adjust calls to
6302 call_function_by_hand.
6303 * p-typeprint.c (pascal_type_print_varspec_prefix): Handle
6304 functions with unknown return type.
6305 (pascal_type_print_func_varspec_suffix): New function.
6306 (pascal_type_print_varspec_suffix) <TYPE_CODE_FUNC,
6307 TYPE_CODE_METHOD>: Use it.
6308 * python/py-value.c (valpy_call): Adjust call to
6309 call_function_by_hand.
6310 * rust-lang.c (rust_evaluate_funcall): Adjust call to
6311 call_function_by_hand.
6312 * valarith.c (value_x_binop, value_x_unop): Adjust calls to
6313 call_function_by_hand.
6314 * valops.c (value_allocate_space_in_inferior): Adjust call to
6315 call_function_by_hand.
6316 * typeprint.c (type_print_unknown_return_type): New function.
6317 * typeprint.h (type_print_unknown_return_type): New declaration.
6319 2017-09-04 Pedro Alves <palves@redhat.com>
6321 * gdbtypes.c (lookup_function_type_with_arguments): Mark function
6322 types with more than one parameter as prototyped.
6324 2017-09-04 Pedro Alves <palves@redhat.com>
6326 * cli/cli-cmds.c (print_disassembly, disassemble_current_function)
6327 (disassemble_command): Use gdb_disassembly_flags instead of bare
6329 * disasm.c (gdb_pretty_print_disassembler::pretty_print_insn)
6330 (dump_insns, do_mixed_source_and_assembly_deprecated)
6331 (do_mixed_source_and_assembly, do_assembly_only, gdb_disassembly):
6332 Use gdb_disassembly_flags instead of bare int.
6333 * disasm.h (DISASSEMBLY_SOURCE_DEPRECATED, DISASSEMBLY_RAW_INSN)
6334 (DISASSEMBLY_OMIT_FNAME, DISASSEMBLY_FILENAME)
6335 (DISASSEMBLY_OMIT_PC, DISASSEMBLY_SOURCE)
6336 (DISASSEMBLY_SPECULATIVE): No longer macros. Instead they're...
6337 (enum gdb_disassembly_flag): ... values of this new enumeration.
6338 (gdb_disassembly_flags): Define.
6340 (gdb_pretty_print_disassembler::pretty_print_insn): Use it.
6341 * mi/mi-cmd-disas.c (mi_cmd_disassemble): Use
6342 gdb_disassembly_flags instead of bare int.
6343 * record-btrace.c (btrace_insn_history)
6344 (record_btrace_insn_history, record_btrace_insn_history_range)
6345 (record_btrace_insn_history_from): Use gdb_disassembly_flags
6346 instead of bare int.
6347 * record.c (get_insn_history_modifiers, cmd_record_insn_history):
6348 Use gdb_disassembly_flags instead of bare int.
6349 * target-debug.h (target_debug_print_gdb_disassembly_flags):
6351 * target-delegates.c: Regenerate.
6352 * target.c (target_insn_history, target_insn_history_from)
6353 (target_insn_history_range): Use gdb_disassembly_flags instead of
6355 * target.h: Include "disasm.h".
6356 (struct target_ops) <to_insn_history, to_insn_history_from,
6357 to_insn_history_range>: Use gdb_disassembly_flags instead of bare
6359 (target_insn_history, target_insn_history_from)
6360 (target_insn_history_range): Use gdb_disassembly_flags instead of
6363 2017-09-04 Simon Marchi <simon.marchi@ericsson.com>
6365 * cli/cli-script.c (build_command_line): For if/while commands,
6366 check whether args is empty.
6368 2017-09-04 Simon Marchi <simon.marchi@ericsson.com>
6370 * cli/cli-script.h (enum misc_command_type): Move from defs.h.
6371 (enum command_control_type): Likewise.
6372 (struct command_line): Likewise.
6373 (free_command_lines): Likewise.
6374 (struct command_lines_deleter): Likewise.
6375 (command_line_up): Likewise.
6376 (read_command_lines): Likewise.
6377 (read_command_lines_1): Likewise.
6378 * defs.h (enum misc_command_type): Move to cli/cli-script.h.
6379 (enum command_control_type): Likewise.
6380 (struct command_line): Likewise.
6381 (free_command_lines): Likewise.
6382 (struct command_lines_deleter): Likewise.
6383 (command_line_up): Likewise.
6384 (read_command_lines): Likewise.
6385 (read_command_lines_1): Likewise.
6386 * breakpoint.h: Include cli/cli-script.h.
6387 * extension-priv.h: Likewise.
6388 * gdbcmd.h: Likewise.
6390 2017-09-04 Pedro Alves <palves@redhat.com>
6392 * ada-lang.c (is_known_support_routine): Move sal declaration to
6393 where it is initialized.
6394 * breakpoint.c (create_internal_breakpoint, init_catchpoint)
6395 (parse_breakpoint_sals, decode_static_tracepoint_spec)
6396 (clear_command, update_static_tracepoint): Remove init_sal
6397 references. Move declarations closer to initializations.
6398 * cli/cli-cmds.c (list_command): Move sal declarations closer to
6400 * elfread.c (elf_gnu_ifunc_resolver_stop): Remove init_sal
6401 references. Move sal declarations closer to initializations.
6402 * frame.c (find_frame_sal): Return a symtab_and_line via function
6403 return instead of output parameter. Remove init_sal references.
6404 * frame.h (find_frame_sal): Return a symtab_and_line via function
6405 return instead of output parameter.
6406 * guile/scm-frame.c (gdbscm_frame_sal): Adjust.
6407 * guile/scm-symtab.c (stscm_make_sal_smob): Use in-place new
6409 (gdbscm_find_pc_line): Remove init_sal reference.
6410 * infcall.c (call_function_by_hand_dummy): Remove init_sal
6411 references. Move declarations closer to initializations.
6412 * infcmd.c (set_step_frame): Update. Move declarations closer to
6414 (finish_backward): Remove init_sal references. Move declarations
6415 closer to initializations.
6416 * infrun.c (process_event_stop_test, handle_step_into_function)
6417 (insert_hp_step_resume_breakpoint_at_frame)
6418 (insert_step_resume_breakpoint_at_caller): Likewise.
6419 * linespec.c (create_sals_line_offset, decode_digits_ordinary)
6420 (symbol_to_sal): Likewise.
6421 * probe.c (parse_probes_in_pspace): Remove init_sal reference.
6422 * python/py-frame.c (frapy_find_sal): Move sal declaration closer
6423 to its initialization.
6424 * reverse.c (save_bookmark_command): Use new/delete. Remove
6425 init_sal references. Move declarations closer to initializations.
6426 * source.c (get_current_source_symtab_and_line): Remove brace
6428 (set_current_source_symtab_and_line): Now takes the sal by const
6429 reference. Remove brace initialization.
6430 (line_info): Remove init_sal reference.
6431 * source.h (set_current_source_symtab_and_line): Now takes a
6432 symtab_and_line via const reference.
6433 * stack.c (set_current_sal_from_frame): Adjust.
6434 (print_frame_info): Adjust.
6435 (get_last_displayed_sal): Return the sal via function return
6436 instead of via output parameter. Simplify.
6437 (frame_info): Adjust.
6438 * stack.h (get_last_displayed_sal): Return the sal via function
6439 return instead of via output parameter.
6440 * symtab.c (init_sal): Delete.
6441 (find_pc_sect_line): Remove init_sal references. Move
6442 declarations closer to initializations.
6443 (find_function_start_sal): Remove init_sal references. Move
6444 declarations closer to initializations.
6445 * symtab.h (struct symtab_and_line): In-class initialize all
6447 * tracepoint.c (set_traceframe_context)
6448 (print_one_static_tracepoint_marker): Remove init_sal references.
6449 Move declarations closer to initializations.
6450 * tui/tui-disasm.c (tui_show_disassem_and_update_source): Adjust.
6451 * tui/tui-stack.c (tui_show_frame_info): Adjust. Move
6452 declarations closer to initializations.
6453 * tui/tui-winsource.c (tui_update_source_window_as_is): Remove
6454 init_sal references. Adjust.
6456 2017-09-04 Pedro Alves <palves@redhat.com>
6458 * ax-gdb.c (agent_command_1): Use range-for.
6459 * break-catch-throw.c (re_set_exception_catchpoint): Update.
6460 * breakpoint.c: Include "common/array-view.h".
6461 (init_breakpoint_sal, create_breakpoint_sal): Change sals
6462 parameter from struct symtabs_and_lines to
6463 array_view<symtab_and_line>. Adjust. Use range-for. Update.
6464 (breakpoint_sals_to_pc): Change sals parameter from struct
6465 symtabs_and_lines to std::vector reference.
6466 (check_fast_tracepoint_sals): Change sals parameter from struct
6467 symtabs_and_lines to std::array_view. Use range-for.
6468 (decode_static_tracepoint_spec): Return a std::vector instead of
6469 symtabs_and_lines. Update.
6470 (create_breakpoint): Update.
6471 (break_range_command, until_break_command, clear_command): Update.
6472 (base_breakpoint_decode_location, bkpt_decode_location)
6473 (bkpt_probe_create_sals_from_location)
6474 (bkpt_probe_decode_location, tracepoint_decode_location)
6475 (tracepoint_probe_decode_location)
6476 (strace_marker_create_sals_from_location): Return a std::vector
6477 instead of symtabs_and_lines.
6478 (strace_marker_create_breakpoints_sal): Update.
6479 (strace_marker_decode_location): Return a std::vector instead of
6480 symtabs_and_lines. Update.
6481 (update_breakpoint_locations): Change struct symtabs_and_lines
6482 parameters to gdb::array_view. Adjust.
6483 (location_to_sals): Return a std::vector instead of
6484 symtabs_and_lines. Update.
6485 (breakpoint_re_set_default): Use std::vector instead of struct
6487 (decode_location_default): Return a std::vector instead of
6488 symtabs_and_lines. Update.
6489 * breakpoint.h: Include "common/array-view.h".
6490 (struct breakpoint_ops) <decode_location>: Now returns a
6491 std::vector instead of returning a symtabs_and_lines via output
6493 (update_breakpoint_locations): Change sals parameters to use
6495 * cli/cli-cmds.c (edit_command, list_command): Update to use
6496 std::vector and gdb::array_view.
6497 (ambiguous_line_spec): Adjust to use gdb::array_view and
6499 (compare_symtabs): Rename to ...
6500 (cmp_symtabs): ... this. Change parameters to symtab_and_line
6501 const reference and adjust.
6502 (filter_sals): Rewrite using std::vector and standard algorithms.
6503 * elfread.c (elf_gnu_ifunc_resolver_return_stop): Simplify.
6504 (jump_command): Update to use std::vector.
6505 * linespec.c (struct linespec_state) <canonical_names>: Update
6507 (add_sal_to_sals_basic): Delete.
6508 (add_sal_to_sals, filter_results, convert_results_to_lsals)
6509 (decode_line_2, create_sals_line_offset)
6510 (convert_address_location_to_sals, convert_linespec_to_sals)
6511 (convert_explicit_location_to_sals, parse_linespec)
6512 (event_location_to_sals, decode_line_full, decode_line_1)
6513 (decode_line_with_current_source)
6514 (decode_line_with_last_displayed, decode_objc)
6515 (decode_digits_list_mode, decode_digits_ordinary, minsym_found)
6516 (linespec_result::~linespec_result): Adjust to use std::vector
6517 instead of symtabs_and_lines.
6518 * linespec.h (linespec_sals::sals): Now a std::vector.
6519 (struct linespec_result): Use std::vector, bool, and in-class
6521 (decode_line_1, decode_line_with_current_source)
6522 (decode_line_with_last_displayed): Return std::vector.
6523 * macrocmd.c (info_macros_command): Use std::vector.
6524 * mi/mi-main.c (mi_cmd_trace_find): Use std::vector.
6525 * probe.c (parse_probes_in_pspace, parse_probes): Adjust to use
6527 * probe.h (parse_probes): Return a std::vector.
6528 * python/python.c (gdbpy_decode_line): Use std::vector and
6530 * source.c (select_source_symtab, line_info): Use std::vector.
6531 * stack.c (func_command): Use std::vector.
6532 * symtab.h (struct symtabs_and_lines): Delete.
6533 * tracepoint.c (tfind_line_command, scope_info): Use std::vector.
6535 2017-09-04 Pedro Alves <palves@redhat.com>
6537 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
6538 unittests/array-view-selftests.c.
6539 (SUBDIR_UNITTESTS_OBS): Add array-view-selftests.o.
6540 * common/array-view.h: New file.
6541 * unittests/array-view-selftests.c: New file.
6543 2017-09-04 Pedro Alves <palves@redhat.com>
6545 * cli/cli-cmds.c (edit_command): Pass message to
6546 ambiguous_line_spec.
6547 (list_command): Pass message to ambiguous_line_spec. Say
6548 "first"/"last" instead of "start" and "end" to be consistent with
6550 (ambiguous_line_spec): Add 'format' and vararg parameters. Use
6551 them to print formatted message.
6553 2017-09-04 Pedro Alves <palves@redhat.com>
6555 * btrace.c (ftrace_add_pt): Pass btrace_insn to
6556 ftrace_update_insns by reference instead of pointer.
6558 2017-09-04 Yao Qi <yao.qi@linaro.org>
6560 * i386-go32-tdep.c: Include x86-xstate.h.
6561 (i386_go32_init_abi): Call i386_target_description.
6562 * i386-tdep.c (i386_target_description): Return tdesc_i386_mmx
6563 if xcr0 is X86_XSTATE_X87_MASK.
6564 * i386-tdep.h (tdesc_i386): Remove the declaration.
6565 (tdesc_i386_mmx): Likewise.
6567 2017-09-04 Yao Qi <yao.qi@linaro.org>
6569 * i386-fbsd-tdep.c (i386fbsd_core_read_xcr0): Return
6570 X86_XSTATE_SSE_MASK instead of 0.
6572 2017-09-04 Yao Qi <yao.qi@linaro.org>
6574 * amd64-fbsd-nat.c (amd64fbsd_read_description): Call
6575 i386_target_description.
6576 * i386-fbsd-nat.c (i386fbsd_read_description): Call
6577 i386_target_description.
6578 * i386-tdep.c (i386_gdbarch_init): Likewise.
6580 2017-09-04 Yao Qi <yao.qi@linaro.org>
6582 * amd64-darwin-tdep.c: Include "x86-xstate.h".
6583 (x86_darwin_init_abi_64): Call amd64_target_description.
6584 * amd64-dicos-tdep.c: Likewise.
6585 * amd64-fbsd-nat.c: Likewise.
6586 * amd64-fbsd-tdep.c: Likewise.
6587 * amd64-nbsd-tdep.c: Likewise.
6588 * amd64-obsd-tdep.c: Likewise.
6589 * amd64-sol2-tdep.c: Likewise.
6590 * amd64-windows-tdep.c: Likewise.
6591 * amd64-tdep.h (tdesc_amd64): Remove the declaration.
6593 2017-09-04 Simon Marchi <simon.marchi@ericsson.com>
6595 * btrace.h (btrace_insn_s, DEF_VEC_O (btrace_insn_s)): Remove.
6596 (btrace_function) <insn>: Change type to use std::vector.
6597 * btrace.c (ftrace_debug, ftrace_call_num_insn,
6598 ftrace_find_call, ftrace_new_gap, ftrace_update_function,
6599 ftrace_update_insns, ftrace_compute_global_level_offset,
6600 btrace_stitch_bts, btrace_clear, btrace_insn_get,
6601 btrace_insn_end, btrace_insn_next, btrace_insn_prev): Adjust to
6602 change to std::vector.
6603 (ftrace_update_insns): Adjust to change to std::vector, change
6604 type of INSN parameter.
6605 (btrace_compute_ftrace_bts): Adjust call to ftrace_update_insns.
6606 * record-btrace.c (btrace_call_history_insn_range,
6607 btrace_compute_src_line_range,
6608 record_btrace_frame_prev_register): Adjust to change to
6610 * python/py-record-btrace.c (recpy_bt_func_instructions): Adjust
6611 to change to std::vector.
6613 2017-09-03 Tom Tromey <tom@tromey.com>
6615 * corefile.c (reopen_exec_file): Use std::string.
6617 2017-09-03 Tom Tromey <tom@tromey.com>
6619 * compile/compile.c (compile_register_name_mangled): Return
6621 * compile/compile-loc2c.c (pushf_register_address): Update.
6622 (pushf_register): Update.
6623 * compile/compile-c-types.c (convert_array): Update.
6624 * compile/compile-c-symbols.c (generate_vla_size): Update.
6625 (error_symbol_once): Use a gdb::unique_xmalloc_ptr.
6626 (symbol_substitution_name): Return a gdb::unique_xmalloc_ptr.
6627 (convert_one_symbol): Update.
6628 (generate_c_for_for_one_variable): Update.
6629 * compile/compile-c-support.c (c_get_range_decl_name): Return a
6631 (generate_register_struct): Update.
6632 * compile/compile-internal.h (c_get_range_decl_name): Return a
6634 (compile_register_name_mangled): Return std::string.
6636 2017-09-03 Tom Tromey <tom@tromey.com>
6638 * utils.c (perror_string): Return a std::string.
6639 (throw_perror_with_name, perror_warning_with_name): Update.
6641 2017-09-03 Tom Tromey <tom@tromey.com>
6643 * demangle.c (demangle_command): Use std::string,
6646 2017-09-03 Tom Tromey <tom@tromey.com>
6648 * cli/cli-setshow.c (do_set_command): Use std::string.
6650 2017-09-03 Tom Tromey <tom@tromey.com>
6652 * cli/cli-cmds.c (cd_command): Use gdb::unique_xmalloc_ptr.
6654 2017-09-03 Tom Tromey <tom@tromey.com>
6656 * mi/mi-interp.c (mi_cmd_interpreter_exec): Use std::string.
6658 2017-09-03 Tom Tromey <tom@tromey.com>
6660 * mi/mi-cmd-env.c (env_execute_cli_command): Use
6661 gdb::unique_xmalloc_ptr.
6663 2017-09-03 Tom Tromey <tom@tromey.com>
6665 * thread.c (print_thread_info_1): Use string_printf.
6666 (thread_apply_command, thread_apply_all_command): Use
6669 2017-09-03 Tom Tromey <tom@tromey.com>
6671 * valprint.c (val_print_string): Update.
6672 * gdbcore.h (memory_error_message): Return std::string.
6673 * corefile.c (memory_error_message): Return std::string.
6674 (memory_error): Update.
6675 * breakpoint.c (insert_bp_location): Update.
6677 2017-09-03 Simon Marchi <simon.marchi@ericsson.com>
6679 * target/waitstatus.h (target_waitstatus_to_string): Change
6680 return type to std::string.
6681 * target/waitstatus.c (target_waitstatus_to_string): Return
6683 * target.h (target_waitstatus_to_string): Remove declaration.
6684 * infrun.c (resume, clear_proceed_status_thread,
6685 print_target_wait_results, do_target_wait, save_waitstatus,
6686 stop_all_threads): Adjust.
6687 * record-btrace.c (record_btrace_wait): Adjust.
6689 (target_debug_print_struct_target_waitstatus_p): Adjust.
6691 2017-09-01 Jan Kratochvil <jan.kratochvil@redhat.com>
6694 * nat/linux-procfs.c (parse_proc_status_state): Fix PROC_STATE_STOPPED
6697 2017-08-31 Sergio Durigan Junior <sergiodj@redhat.com>
6699 * NEWS (Changes since GDB 8.0): Add entry mentioning new support
6700 for setting/unsetting environment variables on the remote target.
6701 (New remote packets): Add entries for QEnvironmentHexEncoded,
6702 QEnvironmentUnset and QEnvironmentReset.
6703 * common/environ.c (gdb_environ::operator=): Extend method to
6704 handle m_user_set_env_list and m_user_unset_env_list.
6705 (gdb_environ::clear): Likewise.
6706 (match_var_in_string): Change type of first parameter from 'char
6707 *' to 'const char *'.
6708 (gdb_environ::set): Extend method to handle
6709 m_user_set_env_list and m_user_unset_env_list.
6710 (gdb_environ::unset): Likewise.
6711 (gdb_environ::clear_user_set_env): New method.
6712 (gdb_environ::user_set_envp): Likewise.
6713 (gdb_environ::user_unset_envp): Likewise.
6714 * common/environ.h (gdb_environ): Handle m_user_set_env_list and
6715 m_user_unset_env_list on move constructor/assignment.
6716 (unset): Add new default parameter 'update_unset_list = true'.
6717 (clear_user_set_env): New method.
6718 (user_set_envp): Likewise.
6719 (user_unset_envp): Likewise.
6720 (m_user_set_env_list): New std::set.
6721 (m_user_unset_env_list): Likewise.
6722 * common/rsp-low.c (hex2str): New function.
6723 (bin2hex): New overload for bin2hex function.
6724 * common/rsp-low.c (hex2str): New prototype.
6725 (str2hex): New overload prototype.
6726 * remote.c: Include "environ.h". Add QEnvironmentHexEncoded,
6727 QEnvironmentUnset and QEnvironmentReset.
6728 (remote_protocol_features): Add QEnvironmentHexEncoded,
6729 QEnvironmentUnset and QEnvironmentReset packets.
6730 (send_environment_packet): New function.
6731 (extended_remote_environment_support): Likewise.
6732 (extended_remote_create_inferior): Call
6733 extended_remote_environment_support.
6734 (_initialize_remote): Add QEnvironmentHexEncoded,
6735 QEnvironmentUnset and QEnvironmentReset packet configs.
6736 * unittests/environ-selftests.c (gdb_selftest_env_var):
6738 (test_vector_initialization): New function.
6739 (test_init_from_host_environ): Likewise.
6740 (test_reinit_from_host_environ): Likewise.
6741 (test_set_A_unset_B_unset_A_cannot_find_A_can_find_B):
6743 (test_unset_set_empty_vector): Likewise.
6744 (test_vector_clear): Likewise.
6745 (test_std_move): Likewise.
6746 (test_move_constructor):
6747 (test_self_move): Likewise.
6748 (test_set_unset_reset): Likewise.
6749 (run_tests): Rewrite in terms of the functions above.
6751 2017-08-31 Weimin Pan <weimin.pan@oracle.com>
6753 * sparc64-tdep.c (adi_stat_t): Fix comment formatting.
6754 (adi_available): Use a temp variable of type CORE_ADDR as argument
6755 3 when calling target_auxv_search.
6756 (adi_normalize_address): Use masks and xor operators to calculate
6758 (adi_read_versions, adi_write_versions, adi_print_versions)
6759 (do_examine, do_assign): Use paddress.
6761 2017-08-29 John Baldwin <jhb@FreeBSD.org>
6763 * mips-fbsd-nat.c (getfpregs_supplies): Return true for FIR.
6764 * mips-fbsd-tdep.c (mips_fbsd_supply_fpregs): Split supply of FSR
6765 out of loop and add supply of FIR.
6766 (mips_fbsd_collect_fpregs): Split collect of FSR out of loop and
6769 2017-08-28 Simon Marchi <simon.marchi@ericsson.com>
6772 * cli/cli-script.c (define_command): Don't convert command name
6775 2017-08-25 Joel Brobecker <brobecker@adacore.com>
6777 * ada-lang.c (ada_lookup_struct_elt_type): Remove parameter "dispp".
6778 Update all callers accordingly. Remove all code blocks handling
6779 the case where DISPP is not NULL.
6781 2017-08-24 Jan Kratochvil <jan.kratochvil@redhat.com>
6784 * dwarf2read.c (dwarf2_const_value_attr, dump_die_shallow)
6785 (dwarf2_get_attr_constant_value, dwarf2_fetch_constant_bytes)
6786 (skip_form_bytes, attr_form_is_constant): Handle DW_FORM_implicit_const.
6788 2017-08-24 Jan Kratochvil <jan.kratochvil@redhat.com>
6790 * dwarf2read.c (build_type_psymtabs_reader): New prototype.
6791 (process_psymtab_comp_unit): Accept IS_DEBUG_TYPES.
6792 (read_comp_units_from_section): New parameter abbrev_section, use
6793 read_and_check_comp_unit_head, allocate signatured_type if needed.
6794 (create_all_comp_units): Update read_comp_units_from_section caller.
6796 2017-08-23 Pedro Alves <palves@redhat.com>
6799 * remote.c (add_current_inferior_and_thread): Set inferior_ptid
6800 to null_ptid and switch to thread without reading the registers
6801 after adding the inferior.
6803 2017-08-23 Jan Kratochvil <jan.kratochvil@redhat.com>
6805 * NEWS (Changes since GDB 8.0): Add set compile-gcc and show
6807 * compile/compile.c (compile_gcc, show_compile_gcc): New.
6808 (compile_to_object): Implement compile_gcc.
6809 (_initialize_compile): Install "set compile-gcc". Initialize
6812 2017-08-23 Jan Kratochvil <jan.kratochvil@redhat.com>
6814 * compile/compile.c (compile_to_object): Conditionally call
6815 set_verbose. Conditionally call compile or compile_v0.
6817 2017-08-07 Weimin Pan <weimin.pan@oracle.com>
6819 * sparc64-tdep.h: (adi_normalize_address): New export.
6820 * sparc-nat.h: (open_adi_tag_fd): New export.
6821 * sparc64-linux-nat.c: (open_adi_tag_fd): New function.
6822 * sparc64-linux-tdep.c:
6823 (SEGV_ACCADI, SEGV_ADIDERR, SEGV_ADIPERR) New defines.
6824 (sparc64_linux_handle_segmentation_fault): New function.
6825 (sparc64_linux_init_abi): Register
6826 sparc64_linux_handle_segmentation_fault
6827 * sparc64-tdep.c: Include cli-utils.h,gdbcmd.h,auxv.h.
6828 (sparc64_addr_bits_remove): New function.
6829 (sparc64_init_abi): Register sparc64_addr_bits_remove.
6830 (MAX_PROC_NAME_SIZE): New macro.
6831 (AT_ADI_BLKSZ, AT_ADI_NBITS, AT_ADI_UEONADI) New defines.
6832 (sparc64adilist): New variable.
6833 (adi_proc_list): New variable.
6834 (find_adi_info): New function.
6835 (add_adi_info): New function.
6836 (get_adi_info_proc): New function.
6837 (get_adi_info): New function.
6838 (info_adi_command): New function.
6839 (read_maps_entry): New function.
6840 (adi_available): New function.
6841 (adi_normalize_address): New function.
6842 (adi_align_address): New function.
6843 (adi_convert_byte_count): New function.
6844 (adi_tag_fd): New function.
6845 (adi_is_addr_mapped): New function.
6846 (adi_read_versions): New function.
6847 (adi_write_versions): New function.
6848 (adi_print_versions): New function.
6849 (do_examine): New function.
6850 (do_assign): New function.
6851 (adi_examine_command): New function.
6852 (adi_assign_command): New function.
6853 (_initialize_sparc64_adi_tdep): New function.
6855 2017-08-22 Simon Marchi <simon.marchi@ericsson.com>
6857 * breakpoint.c (breakpoints_info): Rename to ...
6858 (info_breakpoints_command): ... this.
6859 (watchpoints_info): Rename to ...
6860 (info_watchpoints_command): ... this.
6861 (tracepoints_info): Rename to ...
6862 (info_tracepoints_command): ... this.
6863 (_initialize_breakpoint): Adjust.
6864 * dcache.c (dcache_info): Rename to ...
6865 (info_display_command): ... this.
6866 (_initialize_dcache): Adjust.
6867 * frame.h (args_info): Rename to ...
6868 (info_args_command): ... this.
6869 (locals_info): Rename to ...
6870 (info_locals_command): ... this.
6871 * infcmd.c (nofp_registers_info): Rename to ...
6872 (info_registers_command): ... this.
6873 (float_info): Rename to ...
6874 (info_float_command): ... this.
6875 (program_info): Rename to ...
6876 (info_program_command): ... this.
6877 (all_registers_info): Rename to ...
6878 (info_all_registers_command): ... this.
6879 (vector_info): Rename to ...
6880 (info_vector_command): ... this.
6881 (float_info): Rename to ...
6882 (info_float_command): ... this.
6883 (_initialize_infcmd): Adjust.
6884 * inferior.h (term_info): Rename to ...
6885 (info_terminal_command): ... this.
6886 * inflow.c (term_info): Rename to ...
6887 (info_terminal_command): ... this.
6888 (_initialize_inflow): Adjust.
6889 * infrun.c (signals_info): Rename to ...
6890 (info_signals_command): ... this.
6891 (_initialize_infrun): Adjust.
6892 * objc-lang.c (classes_info): Rename to ...
6893 (info_classes_command): ... this.
6894 (selectors_info): Rename to ...
6895 (info_selectors_command): ... this.
6896 (_initialize_objc_language): Adjust.
6897 * printcmd.c (sym_info): Rename to ...
6898 (info_symbol_command): ... this.
6899 (address_info): Rename to ...
6900 (info_address_command): ... this.
6901 (display_info): Rename to ...
6902 (info_display_command): ... this.
6903 (_initialize_printcmd): Adjust.
6904 * reverse.c (bookmarks_info): Rename to ...
6905 (info_breakpoints_command): ... this.
6906 (_initialize_reverse): Adjust.
6907 * ser-go32.c (dos_info): Rename to ...
6908 (info_serial_command): ... this.
6909 (_initialize_ser_dos): Adjust.
6910 * skip.c (skip_info): Rename to ...
6911 (info_skip_command): ... this.
6912 (_initialize_step_skip): Adjust.
6913 * source.c (line_info): Rename to ...
6914 (info_line_command): ... this.
6915 (source_info): Rename to ...
6916 (info_source_command)
6917 * stack.c (frame_info): Rename to ...
6918 (info_frame_command): ... this.
6919 (locals_info): Rename to ...
6920 (info_locals_command): ... this.
6921 (args_info): Rename to ...
6922 (info_args_command): ... this.
6923 (_initialize_stack): Adjust.
6924 * symtab.c (sources_info): Rename to ...
6925 (info_sources_command): ... this.
6926 (variables_info): Rename to ...
6927 (info_variables_command): ... this.
6928 (functions_info): Rename to ...
6929 (info_functions_command): ... this.
6930 (types_info): Rename to ...
6931 (info_types_command): ... this.
6932 (_initialize_symtab): Adjust.
6933 * target.c (target_info): Rename to ...
6934 (info_target_command): ... this.
6935 (initialize_targets): Adjust.
6936 * tracepoint.c (tvariables_info): Rename to ...
6937 (info_tvariables_command): ... this.
6938 (scope_info): Rename to ...
6939 (info_scope_command): ... this.
6940 (trace_dump_actions): Adjust.
6941 (_initialize_tracepoint): Adjust.
6943 2017-08-22 Tom Tromey <tom@tromey.com>
6945 * breakpoint.h (install_breakpoint): Update.
6946 * breakpoint.c (add_solib_catchpoint): Update.
6947 (install_breakpoint): Change argument to a std::unique_ptr.
6948 (create_fork_vfork_event_catchpoint): Use std::unique_ptr.
6949 (create_breakpoint_sal, create_breakpoint): Update.
6950 (watch_command_1, catch_exec_command_1)
6951 (strace_marker_create_breakpoints_sal): Use std::unique_ptr.
6952 (add_to_breakpoint_chain): Change argument to a std::unique_ptr.
6953 Return the breakpoint.
6954 (set_raw_breakpoint_without_location, set_raw_breakpoint)
6955 (new_single_step_breakpoint): Update.
6956 * break-catch-throw.c (handle_gnu_v3_exceptions): Use
6958 * break-catch-syscall.c (create_syscall_event_catchpoint): Use
6960 * break-catch-sig.c (create_signal_catchpoint): Use
6962 * ada-lang.c (create_ada_exception_catchpoint): Use
6965 2017-08-22 Tom Tromey <tom@tromey.com>
6967 * breakpoint.c (add_solib_catchpoint): Use std::unique_ptr.
6969 2017-08-22 Tom Tromey <tom@tromey.com>
6971 * psymtab.c (psymtab_search_name): Return a unique_xmalloc_ptr.
6972 (lookup_partial_symbol): Update.
6974 2017-08-22 Tom Tromey <tom@tromey.com>
6976 * source.h (rewrite_source_path): Return a unique_xmalloc_ptr.
6977 * source.c (rewrite_source_path): Return a unique_xmalloc_ptr.
6978 (find_and_open_source, symtab_to_fullname): Update.
6979 * psymtab.c (psymtab_to_fullname): Update.
6981 2017-08-22 Tom Tromey <tom@tromey.com>
6983 * exec.c (exec_file_attach): Update.
6984 * linux-thread-db.c (try_thread_db_load): Update.
6985 * guile/scm-safe-call.c (gdbscm_safe_source_script): Update.
6986 * utils.c (gdb_realpath): Change return type.
6987 (gdb_realpath_keepfile): Update.
6988 (gdb_realpath_check_trailer, gdb_realpath_tests): New functions.
6989 (_initialize_utils): Register the new self test.
6990 * source.c (openp): Update.
6991 (find_and_open_source): Update.
6992 * nto-tdep.c (nto_find_and_open_solib): Update.
6993 * main.c (set_gdb_data_directory): Update.
6994 (captured_main_1): Update.
6995 * dwarf2read.c (dwarf2_get_dwz_file): Update
6996 (dw2_map_symbol_filenames): Update.
6997 * auto-load.c (auto_load_safe_path_vec_update): Update.
6998 (filename_is_in_auto_load_safe_path_vec): Change type of
7000 (auto_load_objfile_script): Update.
7001 (file_is_auto_load_safe): Update. Use std::string.
7002 * utils.h (gdb_realpath): Return a gdb::unique_xmalloc_ptr.
7004 2017-08-22 Tom Tromey <tom@tromey.com>
7006 * utils.c (gdb_realpath_keepfile): Return a
7007 gdb::unique_xmalloc_ptr.
7008 * exec.c (exec_file_attach): Update.
7009 * utils.h (gdb_realpath_keepfile): Return a
7010 gdb::unique_xmalloc_ptr.
7012 2017-08-22 Tom Tromey <tom@tromey.com>
7014 * compile/compile.c (compile_file_command): Use
7015 gdb::unique_xmalloc_ptr, std::string.
7016 * utils.c (gdb_abspath): Change return type.
7017 * source.c (openp): Update.
7018 * objfiles.c (allocate_objfile): Update.
7019 * main.c (set_gdb_data_directory): Update.
7020 * utils.h (gdb_abspath): Return a gdb::unique_xmalloc_ptr.
7022 2017-08-22 Zhouyi Zhou <zhouzhouyi@gmail.com>
7024 * cli-cmds.c (list_commands): List actual code around more than
7027 2017-08-21 John Baldwin <jhb@FreeBSD.org>
7029 * fbsd-nat.c (fbsd_add_threads): Use array type for `lwps'.
7031 2017-08-21 Pedro Alves <palves@redhat.com>
7034 * c-exp.y (variable production): Handle function aliases.
7035 * minsyms.c (msymbol_is_text): New function.
7036 * minsyms.h (msymbol_is_text): Declare.
7037 * symtab.c (find_function_alias_target): New function.
7038 * symtab.h (find_function_alias_target): Declare.
7040 2017-08-21 Pedro Alves <palves@redhat.com>
7042 * eval.c (evaluate_subexp_standard) <OP_TYPE>: Don't dig past
7044 * typeprint.c (whatis_exp): If handling "whatis", and expression
7045 is OP_TYPE, strip one typedef level. Otherwise don't strip
7047 * valops.c (value_cast): Save "to" type before resolving
7048 stubs/typedefs. Use that type as resulting value's type.
7050 2017-08-18 Tom Tromey <tom@tromey.com>
7051 Pedro Alves <palves@redhat.com>
7053 * spu-multiarch.c (parse_spufs_run): Use scoped_restore.
7054 * sol-thread.c (sol_thread_resume, sol_thread_wait)
7055 (sol_thread_xfer_partial, rw_common): Use scoped_restore.
7056 * procfs.c (procfs_do_thread_registers): Use scoped_restore.
7057 * proc-service.c (ps_xfer_memory): Use scoped_restore.
7058 * linux-tdep.c (linux_corefile_thread): Remove a cleanup.
7059 (linux_get_siginfo_data): Add "thread" argument. Use
7061 * linux-nat.c (linux_child_follow_fork)
7062 (check_stopped_by_watchpoint): Use scoped_restore.
7063 * infrun.c (displaced_step_prepare_throw, write_memory_ptid)
7064 (THREAD_STOPPED_BY, handle_signal_stop): Use scoped_restore.
7065 (restore_inferior_ptid, save_inferior_ptid): Remove.
7066 * btrace.c (btrace_fetch): Use scoped_restore.
7067 * bsd-uthread.c (bsd_uthread_fetch_registers)
7068 (bsd_uthread_store_registers): Use scoped_restore.
7069 * breakpoint.c (reattach_breakpoints, detach_breakpoints): Use
7071 * aix-thread.c (aix_thread_resume, aix_thread_wait)
7072 (aix_thread_xfer_partial): Use scoped_restore.
7073 * inferior.h (save_inferior_ptid): Remove.
7075 2017-08-18 Yao Qi <yao.qi@linaro.org>
7078 * arm-tdep.c (gdb_print_insn_arm): Mark
7079 USER_SPECIFIED_MACHINE_TYPE if exec_bfd isn't NULL.
7081 2017-08-18 Yao Qi <yao.qi@linaro.org>
7083 * NEWS: Mention GDBserver's new option "--selftest".
7084 * Makefile.in (SFILES): Remove selftest.c, add common/selftest.c.
7085 * selftest.c: Move it to common/selftest.c.
7086 * selftest.h: Move it to common/selftest.h.
7087 * selftest-arch.c (reset): New function.
7088 (tests_with_arch): Call reset.
7090 2017-08-18 Yao Qi <yao.qi@linaro.org>
7092 * selftest.c (run_tests): Don't call QUIT. Call debug_printf
7093 instead of exception_fprintf and printf_filtered.
7095 2017-08-18 Yao Qi <yao.qi@linaro.org>
7097 * selftest.c (register_self_test): Rename it to
7098 selftests::register_test.
7099 (run_self_tests): selftest::run_tests.
7100 * selftest.h: Update declarations.
7101 * selftest-arch.c (register_self_test_foreach_arch): Rename it to
7102 selftests::register_test_foreach_arch.
7103 * selftest-arch.h: Update declaration.
7104 * aarch64-tdep.c: Update.
7105 * arm-tdep.c: Likewise.
7106 * disasm-selftests.c: Likewise.
7107 * dwarf2loc.c: Likewise.
7108 * dwarf2-frame.c: Likewise.
7109 * findvar.c: Likewise.
7110 * gdbarch-selftests.c: Likewise.
7111 * maint.c (maintenance_selftest): Likewise.
7112 * regcache.c: Likewise.
7113 * rust-exp.y: Likewise.
7114 * selftest-arch.c: Likewise.
7115 * unittests/environ-selftests.c: Likewise.
7116 * unittests/function-view-selftests.c: Likewise.
7117 * unittests/offset-type-selftests.c: Likewise.
7118 * unittests/optional-selftests.c: Likewise.
7119 * unittests/scoped_restore-selftests.c: Likewise.
7120 * utils-selftests.c: Likewise.
7122 2017-08-17 Pedro Alves <palves@redhat.com>
7124 * cli/cli-cmds.c (source_command): Delete 'old_source_verbose'
7127 2017-08-17 Pedro Alves <palves@redhat.com>
7129 * dwarf2read.c (struct dwarf2_cu) <line_header_die_owner>: New
7131 (reset_die_in_process): Delete, replaced by ...
7132 (process_die_scope): ... this new class. Make it responsible for
7133 freeing cu->line_header too.
7134 (process_die): Use process_die_scope.
7135 (handle_DW_AT_stmt_list): Record the line header's owner CU/DIE in
7136 cu->line_header_die_owner. Don't release the line header if it's
7138 (setup_type_unit_groups): Make the CU/DIE own the line header.
7139 Don't release the line header here.
7141 2017-08-17 Alex Lindsay <alexlindsay239@gmail.com> (tiny change)
7143 * elfread.c (elf_read_minimal_symbols): xfree synthsyms.
7145 2017-08-17 Ruslan Kabatsayev <b7.10110111@gmail.com>
7147 * NEWS: Mention new shortcuts for nexti and stepi in TUI
7150 2017-08-16 Ruslan Kabatsayev <b7.10110111@gmail.com>
7152 * tui/tui.c (tui_commands): Add "nexti" and "stepi" to the Single-Key
7155 2017-08-15 Stafford Horne <shorne@gmail.com>
7157 * MAINTAINERS (Write After Approval): Add Stafford Horne.
7159 2017-08-15 Stafford Horne <shorne@gmail.com>
7161 * xtensa-tdep.c (xtensa_init_reggroups): Use xstrdup for cpname.
7163 2017-08-15 Sergio Durigan Junior <sergiodj@redhat.com>
7166 * infcmd.c (unset_environment_command): Use the 'clear' method on
7167 the environment instead of resetting it.
7169 2017-08-15 John Baldwin <jhb@FreeBSD.org>
7171 * fbsd-nat.c (fbsd_convert_siginfo): Fix compile on big-endian
7174 2017-08-14 Tom Tromey <tom@tromey.com>
7176 * valprint.c (print_octal_chars): Use HOST_CHAR_BIT.
7177 (print_binary_chars): Likewise.
7178 (BITS_IN_BYTES): Remove.
7180 2017-08-14 Tom Tromey <tom@tromey.com>
7183 * valprint.c (LOW_ZERO): Change value to 034.
7184 (print_octal_chars): Add static_asserts for octal constants.
7185 * printcmd.c (print_scalar_formatted): Add 'd' case.
7187 2017-08-11 Tom Tromey <tom@tromey.com>
7189 * symfile.c (add_symbol_file_command): Use std::vector.
7191 2017-08-14 Tom Tromey <tom@tromey.com>
7193 * break-catch-throw.c (handle_gnu_v3_exceptions): Use std::move.
7194 * break-catch-syscall.c (create_syscall_event_catchpoint): Use
7196 * break-catch-sig.c (create_signal_catchpoint): Use std::move.
7198 2017-08-11 Pedro Alves <palves@redhat.com>
7200 * infrun.c (process_event_stop_test): Adjust
7201 function_name_is_marked_for_skip call.
7202 * skip.c: Include <list>.
7203 (skiplist_entry): Make it a class with private fields, and
7205 (skiplist_entry_chain): Delete.
7206 (skiplist_entries): New.
7207 (skiplist_entry_count): Delete.
7208 (highest_skiplist_entry_num): New.
7209 (ALL_SKIPLIST_ENTRIES, ALL_SKIPLIST_ENTRIES_SAFE): Delete.
7210 (add_skiplist_entry): Delete.
7211 (skiplist_entry::skiplist_entry): New.
7212 (skiplist_entry::add_entry): New.
7213 (skip_file_command, skip_function): Adjust.
7214 (compile_skip_regexp): Delete.
7215 (skip_command): Don't compile regexp here. Adjust to use
7216 skiplist_entry::add_entry.
7217 (skip_info): Adjust to use range-for and getters.
7218 (skip_enable_command, skip_disable_command): Adjust to use
7219 range-for and setters.
7220 (skip_delete_command): Adjust to use std::list.
7221 (add_skiplist_entry): Delete.
7222 (skip_file_p): Delete, refactored as ...
7223 (skiplist_entry::do_skip_file_p): ... this new method.
7224 (skip_gfile_p): Delete, refactored as ...
7225 (skiplist_entry::do_gskip_file_p): ... this new method.
7226 (skip_function_p, skip_rfunction_p): Delete, refactored as ...
7227 (skiplist_entry::skip_function_p): ... this new method.
7228 (function_name_is_marked_for_skip): Now returns bool, and takes
7229 the function sal by const reference. Adjust to use range-for and
7230 skiplist_entry methods.
7231 (_initialize_step_skip): Remove references to
7232 skiplist_entry_chain, skiplist_entry_count.
7233 * skip.h (function_name_is_marked_for_skip): Now returns bool, and
7234 takes the function sal by const reference.
7236 2017-08-11 Yao Qi <yao.qi@linaro.org>
7238 * dwarf2-frame.c (clear_pointer_cleanup): Remove.
7239 (dwarf2_frame_cache): Remove reset_cache_cleanup.
7240 (dwarf2_frame_cache):
7241 * frame-unwind.c (frame_unwind_try_unwinder): Catch
7242 RETURN_MASK_ALL and set *this_case to NULL.
7243 * frame-unwind.h: Update comments.
7245 2017-08-11 Yao Qi <yao.qi@linaro.org>
7247 * dwarf2-frame.c (dwarf2_frame_state_alloc_regs): Remove.
7248 (dwarf2_frame_state_copy_regs): Remove.
7249 (dwarf2_frame_state_free_regs): Remove.
7250 (dwarf2_frame_state::~dwarf2_frame_state): Remove.
7251 (dwarf2_restore_rule): Call method .alloc_regs instead of
7252 dwarf2_frame_state_alloc_regs.
7253 (execute_cfa_program): Likewise. Call dwarf2_frame_state_reg_info
7254 constructor. Call std::move.
7255 (dwarf2_fetch_cfa_info): Don't call dwarf2_frame_state_copy_regs.
7256 (dwarf2_frame_cache): Likewise.
7258 [GDB_SELF_TEST]: Include selftest.h and
7260 [GDB_SELF_TEST] (execute_cfa_program_test): New function.
7261 (_initialize_dwarf2_frame) [GDB_SELF_TEST]: Register
7262 execute_cfa_program_test.
7264 * dwarf2-frame.h (dwarf2_frame_state_reg_info): Add ctor, dtor,
7265 copy ctor, assignment operator, move assignment.
7266 <alloc_regs>: New method.
7268 (struct dwarf2_frame_state): Delete dtor.
7269 (dwarf2_frame_state_alloc_regs): Remove declaration.
7270 * sparc-tdep.c (sparc_execute_dwarf_cfa_vendor_op): Don't call
7271 dwarf2_frame_state_alloc_regs, use .alloc_regs instead.
7273 2017-08-11 Yao Qi <yao.qi@linaro.org>
7275 * dwarf2-frame.c (dwarf2_frame_state_free): Remove.
7276 (dwarf2_frame_state::dwarf2_frame_state): New.
7277 (dwarf2_frame_state::~dwarf2_frame_state): New.
7278 (dwarf2_fetch_cfa_info): Update.
7279 (dwarf2_frame_cache): Remove old_chain. Change 'fs' to an object
7280 rather than a pointer. Update code.
7281 * dwarf2-frame.h (struct dwarf2_frame_state): Declare ctor and
7283 <data_align, code_align, retaddr_column>: Change them to const.
7284 <armcc_cfa_offsets_sf, armcc_cfa_offsets_reversed>: Change them
7287 2017-08-11 Yao Qi <yao.qi@linaro.org>
7289 * dwarf2-frame.h (struct dwarf2_frame_state_reg) <exp_len>: Remove.
7290 <loc.exp>: New field.
7291 * dwarf2-frame.c (execute_cfa_program): Update.
7292 (dwarf2_frame_prev_register): Update.
7294 2017-08-10 Pedro Alves <palves@redhat.com>
7296 * common/gdb_unique_ptr.h (xfree_deleter<T[]>): Define.
7298 2017-08-09 John Baldwin <jhb@FreeBSD.org>
7300 * fbsd-nat.c (struct fbsd_fork_info): Remove.
7301 (fbsd_pending_children): Use std::list.
7302 (fbsd_remember_child): Likewise.
7303 (fbsd_is_child_pending): Likewise.
7304 (fbsd_pending_vfork_done): Use std::forward_list.
7305 (fbsd_add_vfork_done): Likewise.
7306 (fbsd_is_vfork_done_pending): Likewise.
7307 (fbsd_next_vfork_done): Likewise.
7309 2017-08-09 John Baldwin <jhb@FreeBSD.org>
7311 * fbsd-nat.c [HAVE_KINFO_GETVMMAP] (struct free_deleter): New.
7312 (fbsd_find_memory_regions): Use free_deleter with std::unique_ptr.
7313 [!HAVE_KINFO_GETVMMAP] (fbsd_find_memory_regions): Use std::string
7315 (fbsd_xfer_partial): Use gdb::byte_vector.
7316 (fbsd_add_threads): Use gdb::unique_xmalloc_ptr.
7318 2017-08-09 John Baldwin <jhb@FreeBSD.org>
7320 * fbsd-nat.c: [!HAVE_KINFO_GETVMMAP]: Include <sys/user.h> and
7322 (fbsd_find_memory_regions): Fix `mapfile' initialization.
7324 2017-08-09 Tom Tromey <tom@tromey.com>
7326 * skip.c (skiplist_entry): New constructor.
7327 (skiplist_entry::enabled, skiplist_entry::function_is_regexp)
7328 (skiplist_entry::file_is_glob): Now bool.
7329 (skiplist_entry::file, skiplist_entry::function): Now
7331 (make_skip_entry): Return a unique_ptr. Use new.
7332 (free_skiplist_entry, free_skiplist_entry_cleanup)
7333 (make_free_skiplist_entry_cleanup): Remove.
7334 (skip_command, skip_disable_command, add_skiplist_entry)
7335 (skip_form_bytes, compile_skip_regexp, skip_command, skip_info)
7336 (skip_file_p, skip_gfile_p, skip_function_p, skip_rfunction_p)
7337 (function_name_is_marked_for_skip): Update.
7338 (skip_delete_command): Update. Use delete.
7340 2017-08-09 Jiong Wang <jiong.wang@arm.com>
7342 * aarch64-linux-tdep.c: Include "auxv.h" and "elf/common.h".
7343 (aarch64_linux_core_read_description): New function.
7344 (aarch64_linux_init_abi): Register gdbarch_core_read_description.
7346 2017-08-09 Pedro Alves <palves@redhat.com>
7348 * cp-name-parser.y (cp_comp_to_string): Return a
7349 gdb::unique_xmalloc_ptr<char>.
7350 * cp-support.c (replace_typedefs_qualified_name)
7351 (replace_typedefs): Adjust to use gdb::unique_xmalloc_ptr<char>.
7352 (cp_canonicalize_string_full): Use op= instead of explicit
7354 (cp_class_name_from_physname, method_name_from_physname)
7355 (cp_func_name, cp_remove_params): Adjust to use
7356 gdb::unique_xmalloc_ptr<char>.
7357 * cp-support.h (cp_comp_to_string): Return a
7358 gdb::unique_xmalloc_ptr<char>.
7359 * python/py-type.c (typy_lookup_type): Adjust to use
7360 gdb::unique_xmalloc_ptr<char>.
7362 2017-08-09 H.J. Lu <hongjiu.lu@intel.com>
7364 * dwarf2read.c (dwarf2_string_attr): Fix a typo.
7366 2017-08-09 Alex Lindsay <alexlindsay239@gmail.com>
7367 Yao Qi <yao.qi@linaro.org>
7369 * cp-support.c (cp_canonicalize_string_full): Use
7370 gdb::unique_xmalloc_ptr<char>.
7371 (cp_canonicalize_string): Likewise.
7373 2017-08-09 Yao Qi <yao.qi@linaro.org>
7375 * features/Makefile (WHICH): Remove i386/ non-linux stuff.
7376 * regformats/i386/amd64-avx-avx512.dat: Remove.
7377 * regformats/i386/amd64-avx-mpx-avx512-pku.dat: Remove.
7378 * regformats/i386/amd64-avx-mpx.dat:Remove.
7379 * regformats/i386/amd64-avx.dat: Remove.
7380 * regformats/i386/amd64-mpx.dat: Remove.
7381 * regformats/i386/i386-avx-avx512.dat: Remove.
7382 * regformats/i386/i386-avx-mpx-avx512-pku.dat: Remove.
7383 * regformats/i386/i386-avx-mpx.dat: Remove.
7384 * regformats/i386/i386-mmx.dat: Remove.
7385 * regformats/i386/i386-mpx.dat: Remove.
7387 2017-08-09 Yao Qi <yao.qi@linaro.org>
7389 * amd64-tdep.h (tdesc_x32): Remove the declaration.
7390 * amd64-tdep.c: Don't include features/i386/x32*.c.
7391 (_initialize_amd64_tdep): Don't call initialize_tdesc_x32*
7393 * features/Makefile (WHICH): Remove i386/x32, i386/x32-avx,
7394 and i386/x32-avx-avx512.
7395 (XMLTOC): Remove i386/x32-avx.xml, i386/x32-avx-avx512.xml,
7397 * features/i386/x32-avx-avx512.c: Removed.
7398 * features/i386/x32-avx-avx512.xml: Removed.
7399 * features/i386/x32-avx.c: Removed.
7400 * features/i386/x32-avx.xml: Removed.
7401 * features/i386/x32.c: Removed.
7402 * features/i386/x32.xml: Removed.
7403 * regformats/i386/x32-avx-avx512.dat: Removed.
7404 * regformats/i386/x32-avx.dat: Removed.
7405 * regformats/i386/x32.dat: Removed.
7407 2017-08-07 Maciej W. Rozycki <macro@imgtec.com>
7409 PR breakpoints/21886
7410 * mem-break.c (default_memory_insert_breakpoint): Use
7411 `->placed_address' rather than `->reqstd_address' for the
7412 breakpoint location.
7414 2017-08-07 Maciej W. Rozycki <macro@imgtec.com>
7416 * arch-utils.c (default_print_insn): Remove arch/mach/endian
7419 2017-08-07 Maciej W. Rozycki <macro@imgtec.com>
7421 * gdbarch.sh (gdbarch_info): Replace the `tdep_info' member with
7422 a union of `tdep_info', `tdesc_data' and `id'.
7423 * aarch64-tdep.c (aarch64_gdbarch_init): Use `info.tdesc_data'
7424 rather than `info.tdep_info'.
7425 * amd64-linux-tdep.c (amd64_linux_init_abi): Likewise.
7426 * i386-linux-tdep.c (i386_linux_init_abi): Likewise.
7427 * i386-tdep.c (i386_gdbarch_init): Likewise.
7428 * mips-linux-tdep.c (mips_linux_init_abi): Likewise.
7429 * mips-tdep.c (mips_gdbarch_init): Likewise.
7430 * nds32-tdep.c (nds32_gdbarch_init): Likewise.
7431 * rs6000-tdep.c (rs6000_gdbarch_init): Likewise.
7432 * ppc-linux-tdep.c (ppu2spu_sniffer): Use `info.id' rather than
7434 (ppc_linux_init_abi): Use `info.tdesc_data' rather than
7436 * sparc-tdep.c (sparc32_gdbarch_init): Likewise.
7437 * spu-multiarch.c (spu_gdbarch): Use `info.id' rather than
7439 * spu-tdep.c (spu_gdbarch_init): Likewise.
7440 * gdbarch.h: Regenerate.
7442 2017-08-07 Leszek Swirski <leszeks@google.com>
7445 * dwarf2read.c (dwarf2_string_attr): Allow DW_FORM_GNU_strp_alt.
7447 2017-08-07 Simon Marchi <simon.marchi@ericsson.com>
7449 * remote-sim.c (gdbsim_load): Remove char **argv local variable.
7450 (gdbsim_open): Rename gdb_argv args object to argv.
7452 2017-08-05 Tom Tromey <tom@tromey.com>
7454 * compile/compile-object-load.c (compile_object_load): Use
7455 gdb::unique_xmalloc_ptr.
7456 * cli/cli-dump.c (scan_filename): Rename from
7457 scan_filename_with_cleanup. Change return type.
7458 (scan_expression): Rename from scan_expression_with_cleanup.
7460 (dump_memory_to_file, dump_value_to_file, restore_command):
7461 Use gdb::unique_xmalloc_ptr. Update.
7462 * cli/cli-cmds.c (find_and_open_script): Use
7463 gdb::unique_xmalloc_ptr.
7464 * tracefile-tfile.c (tfile_open): Use gdb::unique_xmalloc_ptr.
7465 * symmisc.c (maintenance_print_symbols)
7466 (maintenance_print_msymbols): Use gdb::unique_xmalloc_ptr.
7467 * symfile.c (symfile_bfd_open, generic_load)
7468 (add_symbol_file_command, remove_symbol_file_command): Use
7469 gdb::unique_xmalloc_ptr.
7470 * source.c (openp): Use gdb::unique_xmalloc_ptr.
7471 * psymtab.c (maintenance_print_psymbols): Use
7472 gdb::unique_xmalloc_ptr.
7473 * corelow.c (core_open): Use gdb::unique_xmalloc_ptr.
7474 * breakpoint.c (save_breakpoints): Use gdb::unique_xmalloc_ptr.
7475 * solib.c (solib_map_sections): Use gdb::unique_xmalloc_ptr.
7476 (reload_shared_libraries_1): Likewise.
7478 2017-08-05 Tom Tromey <tom@tromey.com>
7480 * rust-exp.y (rust_op_ptr, set_field): Remove typedefs.
7481 (rust_op_vector, rust_set_vector): New typedefs.
7482 (current_parser): New global.
7483 (work_obstack): Change to pointer type. Update all users.
7484 (rust_ast, pstate): Remove globals.
7485 (struct rust_parser): New.
7486 (%union) <params, field_inits>: Change type.
7487 (start, tuple_expr, unit_expr, struct_expr_list, literal)
7488 (field_expr, expr_list, maybe_expr_list, type_list): Update.
7489 (ast_call_ish, ast_path, ast_function_type, ast_tuple_type)
7490 (convert_params_to_types, convert_params_to_expression): Change
7492 (ast_string): Change type of "fields".
7493 (rust_parse): Make a rust_parser. Remove cleanups.
7494 (rust_lex_tests): Make and install an auto_obstack.
7496 2017-08-04 Yao Qi <yao.qi@linaro.org>
7498 * configure.srv (ipa_x32_linux_regobj): New.
7499 * linux-amd64-ipa.c (get_ipa_tdesc): Use X86_TDESC_AVX_AVX512
7500 instead of X86_TDESC_AVX512.
7501 (initialize_low_tracepoint): Call
7502 init_registers_x32_avx_avx512_linux.
7504 2017-08-04 Yao Qi <yao.qi@linaro.org>
7506 * utils.h (gdb_argv): Add namespace std for nullptr_t.
7508 2017-08-03 Ruslan Kabatsayev <b7.10110111@gmail.com>
7510 * MAINTAINERS (Write After Approval): Add Ruslan Kabatsayev.
7512 2017-08-03 Tom Tromey <tom@tromey.com>
7514 * utils.c (make_cleanup_freeargv, do_freeargv, gdb_buildargv):
7516 * utils.h (make_cleanup_freeargv, gdb_buildargv): Remove.
7518 2017-08-03 Tom Tromey <tom@tromey.com>
7520 * python/py-param.c (compute_enum_values): Use gdb_argv.
7522 2017-08-03 Tom Tromey <tom@tromey.com>
7524 * utils.h (struct gdb_argv_deleter): New.
7525 (gdb_argv): New class.
7526 * utils.c (gdb_argv::reset): New method.
7527 * tracepoint.c (delete_trace_variable_command): Use gdb_argv.
7528 * tracefile.c (tsave_command): Use gdb_argv.
7529 * top.c (new_ui_command): Use gdb_argv.
7530 * symmisc.c (maintenance_print_symbols)
7531 (maintenance_print_msymbols, maintenance_expand_symtabs): Use gdb_argv.
7532 * symfile.c (symbol_file_command, generic_load)
7533 (remove_symbol_file_command): Use gdb_argv.
7534 * stack.c (backtrace_command): Use gdb_argv.
7535 * source.c (add_path, show_substitute_path_command)
7536 (unset_substitute_path_command, set_substitute_path_command):
7538 * skip.c (skip_command): Use gdb_argv. Use gdb_buildargv.
7539 * ser-mingw.c (pipe_windows_open): Use gdb_argv.
7540 * remote.c (extended_remote_run, remote_put_command)
7541 (remote_get_command, remote_delete_command): Use gdb_argv.
7542 * remote-sim.c (gdbsim_load, gdbsim_create_inferior)
7543 (gdbsim_open): Use gdb_argv.
7544 * python/py-cmd.c (gdbpy_string_to_argv): Use gdb_argv.
7545 * psymtab.c (maintenance_print_psymbols): Use gdb_argv.
7546 * procfs.c (procfs_info_proc): Use gdb_argv.
7547 * interps.c (interpreter_exec_cmd): Use gdb_argv.
7548 * infrun.c (handle_command): Use gdb_argv.
7549 * inferior.c (add_inferior_command, clone_inferior_command):
7551 * guile/scm-string.c (gdbscm_string_to_argv): Use gdb_argv.
7552 * exec.c (exec_file_command): Use gdb_argv.
7553 * cli/cli-cmds.c (alias_command): Use gdb_argv.
7554 * compile/compile.c (build_argc_argv): Use gdb_argv.
7556 2017-08-03 Tom Tromey <tom@tromey.com>
7558 * python/python.c (gdbpy_decode_line): Use unique_xmalloc_ptr.
7560 2017-08-03 Tom Tromey <tom@tromey.com>
7562 * python/python.c (compute_python_string): Return std::string.
7563 (gdbpy_eval_from_control_command): Update.
7564 (do_start_initialization): Use std::string.
7565 * python/py-varobj.c (py_varobj_iter_next): Use string_printf, not
7567 * python/py-breakpoint.c (local_setattro): Use string_printf, not
7570 2017-08-03 Tom Tromey <tom@tromey.com>
7572 * top.h (do_restore_instream_cleanup): Remove.
7573 * top.c (do_restore_instream_cleanup): Remove.
7574 (read_command_file): Use scoped_restore.
7575 * cli/cli-script.c (execute_user_command): Use scoped_restore.
7577 2017-08-03 Tom Tromey <tom@tromey.com>
7579 * cli/cli-script.c (execute_user_command)
7580 (execute_control_command): Use scoped_restore.
7582 2017-08-03 Tom Tromey <tom@tromey.com>
7584 * cli/cli-script.c (do_restore_user_call_depth): Remove.
7585 (execute_user_command): Remove user_call_depth; use
7586 user_args_stack's size instead.
7588 2017-08-03 Tom Tromey <tom@tromey.com>
7590 * top.h (in_user_command): Remove.
7591 * top.c (in_user_command): Remove.
7592 * cli/cli-script.c (do_restore_user_call_depth)
7593 (execute_user_command): Update.
7595 2017-08-03 Tom Tromey <tom@tromey.com>
7597 * valops.c (search_struct_method): Use gdb::byte_vector.
7598 * valarith.c (value_concat): Use std::vector.
7599 * target.c (memory_xfer_partial): Use gdb::byte_vector.
7600 (simple_search_memory): Likewise.
7601 * printcmd.c (find_string_backward): Use gdb::byte_vector.
7602 * mi/mi-main.c (mi_cmd_data_write_memory): Use gdb::byte_vector.
7603 * gcore.c (gcore_copy_callback): Use gdb::byte_vector.
7604 * elfread.c (elf_rel_plt_read): Use std::string.
7605 * cp-valprint.c (cp_print_value): Use gdb::byte_vector.
7606 * cli/cli-dump.c (restore_section_callback): Use
7609 2017-08-03 Tom Tromey <tom@tromey.com>
7611 * jit.c (jit_reader_load_command): Use unique_xmalloc_ptr.
7613 2017-08-03 Tom Tromey <tom@tromey.com>
7615 * tui/tui-regs.c (tui_restore_gdbout): Remove.
7616 (tui_register_format): Use scoped_restore.
7618 2017-08-03 Tom Tromey <tom@tromey.com>
7620 * reverse.c (exec_direction_default): Remove.
7621 (exec_reverse_once): Use scoped_restore.
7622 * remote.c (restore_remote_timeout): Remove.
7623 (remote_flash_erase, remote_flash_write, remote_flash_done)
7624 (readchar, remote_serial_write): Use scoped_restore.
7625 * cli/cli-script.c (struct source_cleanup_lines_args)
7626 (source_cleanup_lines): Remove.
7627 (script_from_file): Use scoped_restore.
7628 * cli/cli-cmds.c (source_verbose_cleanup): Remove.
7629 (source_command): Use scoped_restore.
7631 2017-08-03 Tom Tromey <tom@tromey.com>
7633 * utils.h (make_cleanup_free_so): Remove.
7634 * utils.c (do_free_so, make_cleanup_free_so): Remove.
7635 * solist.h (struct so_deleter): New.
7636 (so_list_up): New typedef.
7637 * solib-svr4.c (svr4_read_so_list): Use so_list_up.
7639 2017-08-03 Tom Tromey <tom@tromey.com>
7641 * utils.h (make_cleanup_restore_current_language): Remove.
7642 * utils.c (do_restore_current_language)
7643 (make_cleanup_restore_current_language): Remove.
7644 * parse.c (parse_exp_in_context_1)
7645 (parse_expression_with_language): Use
7646 scoped_restore_current_language.
7647 * mi/mi-main.c (mi_cmd_execute): Use
7648 scoped_restore_current_language.
7649 * language.h (scoped_restore_current_language): New class.
7651 2017-08-03 Tom Tromey <tom@tromey.com>
7653 * compile/compile.c (cleanup_unlink_file): Remove.
7654 (compile_to_object): Use gdb::unlinker.
7655 (eval_compile_command): Likewise.
7657 2017-08-03 Tom Tromey <tom@tromey.com>
7659 * utils.h (make_cleanup_fclose): Remove.
7660 * utils.c (do_fclose_cleanup, make_cleanup_fclose): Remove.
7662 2017-08-03 Tom Tromey <tom@tromey.com>
7664 * top.c (open_terminal_stream): Return gdb_file_up.
7665 (new_ui_command): Update.
7667 2017-08-03 Tom Tromey <tom@tromey.com>
7669 * source.c (print_source_lines_base, forward_search_command)
7670 (reverse_search_command): Use gdb_file_up.
7672 2017-08-03 Tom Tromey <tom@tromey.com>
7674 * fbsd-nat.c (fbsd_find_memory_regions): Update.
7676 2017-08-03 Tom Tromey <tom@tromey.com>
7678 * cli/cli-cmds.c (find_and_open_script): Change return type.
7679 Remove "streamp" and "full_path" parameters.
7680 (source_script_with_search): Update.
7681 * auto-load.c (source_script_file): Update.
7682 * cli/cli-cmds.h (find_and_open_script): Change type.
7683 (open_script): New struct.
7685 2017-08-03 Tom Tromey <tom@tromey.com>
7687 * xml-support.c (xml_fetch_content_from_file): Update.
7688 * ui-file.c (stdio_file::open): Update.
7689 * tracefile-tfile.c (tfile_start): Update.
7690 * remote.c (remote_file_put, remote_file_get): Update.
7691 * nat/linux-procfs.c (linux_proc_get_int)
7692 (linux_proc_pid_get_state, linux_proc_tid_get_name): Update.
7693 * nat/linux-osdata.c (linux_common_core_of_thread): Update.
7694 (command_from_pid, commandline_from_pid, linux_xfer_osdata_cpus)
7695 (print_sockets, linux_xfer_osdata_shm, linux_xfer_osdata_sem)
7696 (linux_xfer_osdata_msg, linux_xfer_osdata_modules): Update.
7697 * nat/linux-btrace.c (linux_determine_kernel_start): Update.
7698 * linux-nat.c (linux_proc_pending_signals): Update.
7699 * dwarf2read.c (write_psymtabs_to_index): Use gdb_file_up.
7700 (file_closer): Remove.
7701 * compile/compile.c (compile_to_object): Update.
7702 * common/filestuff.h (struct gdb_file_deleter): New.
7703 (gdb_file_up): New typedef.
7704 (gdb_fopen_cloexec): Change return type.
7705 * common/filestuff.c (gdb_fopen_cloexec): Return gdb_file_up.
7706 * cli/cli-dump.c (fopen_with_cleanup): Remove.
7707 (dump_binary_file, restore_binary_file): Update.
7708 * auto-load.c (auto_load_objfile_script_1): Update.
7710 2017-08-03 Tom Tromey <tom@tromey.com>
7712 * tracepoint.c (tvariables_info_1): Use ui_out_emit_table.
7713 (info_static_tracepoint_markers_command): Likewise.
7714 * solib.c (info_sharedlibrary_command): Use ui_out_emit_table.
7715 * skip.c (skip_info): Use ui_out_emit_table.
7716 * progspace.c (print_program_space): Use ui_out_emit_table.
7717 * osdata.c (info_osdata): Use ui_out_emit_table.
7718 * mi/mi-cmd-info.c (mi_cmd_info_ada_exceptions): Use
7720 * linux-thread-db.c (info_auto_load_libthread_db): Use
7722 * inferior.c (print_inferior): Use ui_out_emit_table.
7723 * gdb_bfd.c (maintenance_info_bfds): Use ui_out_emit_table.
7724 * breakpoint.c (breakpoint_1): Use ui_out_emit_table.
7725 * auto-load.c (auto_load_info_scripts): Use ui_out_emit_table.
7726 * ada-tasks.c (print_ada_task_info): Use ui_out_emit_table.
7727 * ui-out.h (class ui_out_emit_table): New.
7729 2017-08-02 Maciej W. Rozycki <macro@imgtec.com>
7731 * mips-tdep.c (mips_fpu_type_str): New function.
7732 (mips_dump_tdep): Call it.
7734 2017-08-01 Maciej W. Rozycki <macro@imgtec.com>
7736 * mips-tdep.c (mips_gdbarch_init): Use MIPS_FPU_TYPE to access
7739 2017-07-31 Xavier Roirand <roirand@adacore.com>
7741 * solib-darwin.c (DYLD_VERSION_MAX): Increase value.
7743 2017-07-27 Xavier Roirand <roirand@adacore.com>
7745 * MAINTAINERS (Write After Approval): Add Xavier Roirand.
7747 2017-07-26 Yao Qi <yao.qi@linaro.org>
7749 * cli/cli-cmds.c (maintenancechecklist): New variable.
7750 * gdbcmd.h (maintenancechecklist): Declare it.
7751 * i386-linux-tdep.c (_initialize_i386_linux_tdep) [GDB_SELF_TEST]:
7752 Call i386_linux_read_description with different masks.
7753 * maint.c (maintenance_check_command): New function.
7754 (_initialize_maint_cmds): Call add_prefix_cmd.
7755 * target-descriptions.c (tdesc_reg): override operator != and ==.
7756 (tdesc_type): Likewise.
7757 (tdesc_feature): Likewise.
7758 (target_desc): Likewise.
7759 [GDB_SELF_TEST] (selftests::record_xml_tdesc): New function.
7760 (maintenance_check_xml_descriptions): New function.
7761 (_initialize_target_descriptions) Add command "xml-descriptions".
7762 * target-descriptions.h (selftests::record_xml_tdesc): Declare.
7764 2017-07-26 Yao Qi <yao.qi@linaro.org>
7766 * i386-linux-tdep.c: Don't include features/i386/i386-*linux.c.
7767 Include features/i386/32bit-*.c.
7768 (i386_linux_read_description): Generate target description if it
7770 (_initialize_i386_linux_tdep): Don't call _initialize_tdesc_i386
7772 * features/i386/32bit-linux.c: Re-generated.
7773 * features/i386/32bit-sse.c: Likewise.
7774 * target-descriptions.c (print_c_feature::visit): Print code to
7775 set register number if needed.
7776 (print_c_feature) <m_next_regnum>: New field.
7778 2017-07-26 Yao Qi <yao.qi@linaro.org>
7780 * features/Makefile (CFILES): Rename with TDESC_CFILES.
7781 (FEATURE_XMLFILES): New.
7782 (FEATURE_CFILES): New.
7784 (clean-cfiles): Remove generated c files.
7785 * features/i386/32bit-avx.c: Generated.
7786 * features/i386/32bit-avx512.c: Generated.
7787 * features/i386/32bit-core.c: Generated.
7788 * features/i386/32bit-linux.c: Generated.
7789 * features/i386/32bit-mpx.c: Generated.
7790 * features/i386/32bit-pkeys.c: Generated.
7791 * features/i386/32bit-sse.c: Generated.
7792 * target-descriptions.c: Include algorithm.
7793 (tdesc_element_visitor): Add method visit_end.
7794 (print_c_tdesc): Implement visit_end.
7795 (print_c_tdesc:: m_filename_after_features): Move it to
7797 (print_c_feature): New class.
7798 (maint_print_c_tdesc_cmd): Use print_c_feature if XML file
7799 name starts with "i386/32bit-".
7801 2017-07-26 Yao Qi <yao.qi@linaro.org>
7803 * target-descriptions.c (tdesc_element_visitor): New class.
7804 (tdesc_element): New class.
7805 (tdesc_reg): Inherit from tdesc_element.
7806 (tdesc_reg::accept): New function.
7807 (tdesc_type): Inherit from tdesc_element.
7808 (tdesc_type::accept): New function.
7809 (tdesc_feature): Inherit from tdesc_element.
7810 (tdesc_feature::accept): New function.
7811 (target_desc): Inherit from tdesc_element.
7812 (target_desc::target_desc): New.
7813 (target_desc::~target_desc): New.
7814 (target_desc::accept): New.
7815 (allocate_target_description): Use new.
7816 (free_target_description): Use delete.
7817 (print_c_tdesc): New class.
7818 (maint_print_c_tdesc_cmd): Adjust.
7820 * features/aarch64.c: Re-generated.
7821 * features/arc-arcompact.c: Re-generated.
7822 * features/arc-v2.c: Re-generated.
7823 * features/arm/arm-with-iwmmxt.c: Re-generated.
7824 * features/arm/arm-with-m.c: Re-generated.
7825 * features/arm/arm-with-m-fpa-layout.c: Re-generated.
7826 * features/arm/arm-with-m-vfp-d16.c: Re-generated.
7827 * features/arm/arm-with-neon.c: Re-generated.
7828 * features/arm/arm-with-vfpv2.c: Re-generated.
7829 * features/arm/arm-with-vfpv3.c: Re-generated.
7830 * features/i386/amd64-avx-avx512.c: Re-generated.
7831 * features/i386/amd64-avx-avx512-linux.c: Re-generated.
7832 * features/i386/amd64-avx.c: Re-generated.
7833 * features/i386/amd64-avx-linux.c: Re-generated.
7834 * features/i386/amd64-avx-mpx-avx512-pku.c: Re-generated.
7835 * features/i386/amd64-avx-mpx-avx512-pku-linux.c: Re-generated.
7836 * features/i386/amd64-avx-mpx.c: Re-generated.
7837 * features/i386/amd64-avx-mpx-linux.c: Re-generated.
7838 * features/i386/amd64.c: Re-generated.
7839 * features/i386/amd64-linux.c: Re-generated.
7840 * features/i386/amd64-mpx.c: Re-generated.
7841 * features/i386/amd64-mpx-linux.c: Re-generated.
7842 * features/i386/i386-avx-avx512.c: Re-generated.
7843 * features/i386/i386-avx-avx512-linux.c: Re-generated.
7844 * features/i386/i386-avx.c: Re-generated.
7845 * features/i386/i386-avx-linux.c: Re-generated.
7846 * features/i386/i386-avx-mpx-avx512-pku.c: Re-generated.
7847 * features/i386/i386-avx-mpx-avx512-pku-linux.c: Re-generated.
7848 * features/i386/i386-avx-mpx.c: Re-generated.
7849 * features/i386/i386-avx-mpx-linux.c: Re-generated.
7850 * features/i386/i386.c: Re-generated.
7851 * features/i386/i386-linux.c: Re-generated.
7852 * features/i386/i386-mmx.c: Re-generated.
7853 * features/i386/i386-mmx-linux.c: Re-generated.
7854 * features/i386/i386-mpx.c: Re-generated.
7855 * features/i386/i386-mpx-linux.c: Re-generated.
7856 * features/i386/x32-avx-avx512.c: Re-generated.
7857 * features/i386/x32-avx-avx512-linux.c: Re-generated.
7858 * features/i386/x32-avx.c: Re-generated.
7859 * features/i386/x32-avx-linux.c: Re-generated.
7860 * features/i386/x32.c: Re-generated.
7861 * features/i386/x32-linux.c: Re-generated.
7862 * features/microblaze.c: Re-generated.
7863 * features/microblaze-with-stack-protect.c: Re-generated.
7864 * features/mips64-dsp-linux.c: Re-generated.
7865 * features/mips64-linux.c: Re-generated.
7866 * features/mips-dsp-linux.c: Re-generated.
7867 * features/mips-linux.c: Re-generated.
7868 * features/nds32.c: Re-generated.
7869 * features/nios2.c: Re-generated.
7870 * features/nios2-linux.c: Re-generated.
7871 * features/rs6000/powerpc-32.c: Re-generated.
7872 * features/rs6000/powerpc-32l.c: Re-generated.
7873 * features/rs6000/powerpc-403.c: Re-generated.
7874 * features/rs6000/powerpc-403gc.c : Re-generated.
7875 * features/rs6000/powerpc-405.c: Re-generated.
7876 * features/rs6000/powerpc-505.c: Re-generated.
7877 * features/rs6000/powerpc-601.c: Re-generated.
7878 * features/rs6000/powerpc-602.c: Re-generated.
7879 * features/rs6000/powerpc-603.c: Re-generated.
7880 * features/rs6000/powerpc-604.c: Re-generated.
7881 * features/rs6000/powerpc-64.c: Re-generated.
7882 * features/rs6000/powerpc-64l.c: Re-generated.
7883 * features/rs6000/powerpc-7400.c: Re-generated.
7884 * features/rs6000/powerpc-750.c: Re-generated.
7885 * features/rs6000/powerpc-860.c: Re-generated.
7886 * features/rs6000/powerpc-altivec32.c: Re-generated.
7887 * features/rs6000/powerpc-altivec32l.c: Re-generated.
7888 * features/rs6000/powerpc-altivec64.c: Re-generated.
7889 * features/rs6000/powerpc-altivec64l.c: Re-generated.
7890 * features/rs6000/powerpc-cell32l.c: Re-generated.
7891 * features/rs6000/powerpc-cell64l.c: Re-generated.
7892 * features/rs6000/powerpc-e500.c: Re-generated.
7893 * features/rs6000/powerpc-e500l.c: Re-generated.
7894 * features/rs6000/powerpc-isa205-32l.c: Re-generated.
7895 * features/rs6000/powerpc-isa205-64l.c: Re-generated.
7896 * features/rs6000/powerpc-isa205-altivec32l.c: Re-generated.
7897 * features/rs6000/powerpc-isa205-altivec64l.c: Re-generated.
7898 * features/rs6000/powerpc-isa205-vsx32l.c: Re-generated.
7899 * features/rs6000/powerpc-isa205-vsx64l.c: Re-generated.
7900 * features/rs6000/powerpc-vsx32.c: Re-generated.
7901 * features/rs6000/powerpc-vsx32l.c: Re-generated.
7902 * features/rs6000/powerpc-vsx64.c: Re-generated.
7903 * features/rs6000/powerpc-vsx64l.c: Re-generated.
7904 * features/rs6000/rs6000.c: Re-generated.
7905 * features/s390-linux32.c: Re-generated.
7906 * features/s390-linux32v1.c: Re-generated.
7907 * features/s390-linux32v2.c: Re-generated.
7908 * features/s390-linux64.c: Re-generated.
7909 * features/s390-linux64v1.c: Re-generated.
7910 * features/s390-linux64v2.c: Re-generated.
7911 * features/s390-te-linux64.c: Re-generated.
7912 * features/s390-tevx-linux64.c: Re-generated.
7913 * features/s390-vx-linux64.c: Re-generated.
7914 * features/s390x-linux64.c: Re-generated.
7915 * features/s390x-linux64v1.c: Re-generated.
7916 * features/s390x-linux64v2.c: Re-generated.
7917 * features/s390x-te-linux64.c: Re-generated.
7918 * features/s390x-tevx-linux64.c: Re-generated.
7919 * features/s390x-vx-linux64.c: Re-generated.
7920 * features/sparc/sparc32-solaris.c: Re-generated.
7921 * features/sparc/sparc64-solaris.c: Re-generated.
7922 * features/tic6x-c62x.c: Re-generated.
7923 * features/tic6x-c62x-linux.c: Re-generated.
7924 * features/tic6x-c64x.c: Re-generated.
7925 * features/tic6x-c64x-linux.c: Re-generated.
7926 * features/tic6x-c64xp.c: Re-generated.
7927 * features/tic6x-c64xp-linux.c: Re-generated.
7929 2017-07-26 Yao Qi <yao.qi@linaro.org>
7931 * i386-linux-tdep.c (i386_linux_read_description): New function.
7932 (i386_linux_core_read_description): Call
7933 i386_linux_read_description.
7934 * i386-linux-tdep.h (i386_linux_read_description): Declare.
7935 (tdesc_i386_linux, tdesc_i386_mmx_linux): Remove declarations.
7936 (tdesc_i386_avx_linux, tdesc_i386_mpx_linux): Likewise
7937 (tdesc_i386_avx_mpx_linux, tdesc_i386_avx_avx512_linux): Likewise.
7938 (tdesc_i386_avx_mpx_avx512_pku_linux): Likewise.
7939 * x86-linux-nat.c (x86_linux_read_description): Call
7940 i386_linux_read_description.
7942 2017-07-26 Yao Qi <yao.qi@linaro.org>
7945 * features/Makefile (%.c: %.xml): Pass the xml file name to
7946 command "maint print c-tdesc".
7947 * target-descriptions.c (maint_print_c_tdesc_cmd): Get file
7950 2017-07-26 Yao Qi <yao.qi@linaro.org>
7952 * target-descriptions.c (target_desc): Add ctor and dtor. Do
7953 in-class initialization.
7954 (tdesc_create_feature): Call new instead of XCNEW.
7955 (free_target_description): Ue delete.
7957 2017-07-25 John Baldwin <jhb@FreeBSD.org>
7959 * configure.nat: Add "-lkvm" for NetBSD/sparc64 and fix typo.
7961 2017-07-25 Yao Qi <yao.qi@linaro.org>
7963 * amd64-tdep.c (amd64_init_abi): Make argument default_tdesc
7965 (amd64_x32_init_abi): Likewise.
7966 * amd64-tdep.h (amd64_init_abi): Update declaration.
7967 (amd64_x32_init_abi): Likewise.
7969 2017-07-25 Yao Qi <yao.qi@linaro.org>
7972 * arm-linux-nat.c (arm_linux_fetch_inferior_registers): Update
7973 condition for FPSCR.
7974 (arm_linux_store_inferior_registers): Likewise.
7976 2017-07-22 Tom Tromey <tom@tromey.com>
7978 * break-catch-syscall.c (struct catch_syscall_inferior_data)
7979 <syscalls_counts>: Now a std::vector.
7980 (get_catch_syscall_inferior_data): Use "new".
7981 (catch_syscall_inferior_data_cleanup): Use "delete".
7982 (insert_catch_syscall, remove_catch_syscall)
7983 (clear_syscall_counts): Update.
7985 2017-07-22 Tom Tromey <tom@tromey.com>
7987 * break-catch-syscall.c (syscall_catchpoint)
7988 <syscalls_to_be_caught>: Now a std::vector<int>
7989 (~syscall_catchpoint): Remove.
7990 (insert_catch_syscall, remove_catch_syscall)
7991 (breakpoint_hit_catch_syscall, print_one_catch_syscall)
7992 (print_mention_catch_syscall, print_recreate_catch_syscall):
7994 (create_syscall_event_catchpoint): Change type of "filter"
7996 (catch_syscall_split_args): Return a std::vector.
7997 (catch_syscall_command_1, catching_syscall_number_1): Update.
7999 2017-07-22 Tom Tromey <tom@tromey.com>
8001 * break-catch-throw.c (struct exception_catchpoint)
8002 <exception_rx>: Now a std::string.
8003 (~exception_catchpoint): Remove.
8004 (print_one_detail_exception_catchpoint): Update.
8005 (handle_gnu_v3_exceptions): Change type of except_rx.
8006 (extract_exception_regexp): Return a std::string.
8007 (catch_exception_command_1): Update.
8009 2017-07-22 Tom Tromey <tom@tromey.com>
8011 * break-catch-sig.c (gdb_signal_type): Remove typedef.
8012 (struct signal_catchpoint) <signals_to_be_caught>: Now a
8014 <catch_all>: Now a bool.
8015 (~signal_catchpoint): Remove.
8016 (signal_catchpoint_insert_location)
8017 (signal_catchpoint_remove_location)
8018 (signal_catchpoint_breakpoint_hit, signal_catchpoint_print_one)
8019 (signal_catchpoint_print_mention)
8020 (signal_catchpoint_print_recreate)
8021 (signal_catchpoint_explains_signal): Update.
8022 (create_signal_catchpoint): Change type of "filter" and
8024 (catch_signal_split_args): Return a std::vector. Change type of
8026 (catch_signal_command): Update.
8028 2017-07-20 Pedro Alves <palves@redhat.com>
8030 * ada-lang.c (ada_language_defn): Make extern.
8031 (_initialize_ada_language): Remove add_language call.
8032 * c-lang.c (c_language_defn, cplus_language_defn)
8033 (asm_language_defn, minimal_language_defn): Make extern.
8034 (_initialize_c_language): Delete.
8035 * completer.c (compare_cstrings): Delete, moved to utils.h.
8036 * d-lang.c (d_language_defn): Make extern.
8037 (_initialize_d_language): Remove add_language calls.
8038 * defs.h (enum language): Add comment.
8039 * f-lang.c (f_language_defn): Make extern.
8040 (_initialize_f_language): Remove add_language call.
8041 * go-lang.c (go_language_defn): Make extern.
8042 (_initialize_go_language): Remove add_language call.
8043 * language.c: Include <algorithm>.
8044 (languages): Redefine as const array.
8045 (languages_size, languages_allocsize, DEFAULT_ALLOCSIZE): Delete.
8046 (set_language_command): Handle "local". Use for-range loop.
8047 (set_language): Remove loop.
8048 (language_enum): Rewrite.
8049 (language_def, language_str): Remove loops.
8050 (add_language): Delete.
8051 (add_set_language_command): New, based on add_languages.
8052 (skip_language_trampoline): Adjust.
8053 (local_language_defn): Delete.
8054 (language_gdbarch_post_init): Adjust.
8055 (_initialize_language): Remove add_language calls. Call
8056 add_set_language_command.
8057 * language.h (add_language): Delete.
8058 (auto_language_defn)
8059 (unknown_language_defn, minimal_language_defn, ada_language_defn)
8060 (asm_language_defn, c_language_defn, cplus_language_defn)
8061 (d_language_defn, f_language_defn, go_language_defn)
8062 (m2_language_defn, objc_language_defn, opencl_language_defn)
8063 (pascal_language_defn, rust_language_defn): Declare.
8064 * m2-lang.c (m2_language_defn): Make extern.
8065 (_initialize_m2_language): Remove add_language call.
8066 * objc-lang.c (objc_language_defn): Make extern.
8067 (_initialize_objc_language): Remove add_language call.
8068 * opencl-lang.c (opencl_language_defn): Make extern.
8069 (_initialize_opencl_language): Remove add_language call.
8070 * p-lang.c (pascal_language_defn): Make extern.
8071 (_initialize_pascal_language): Delete.
8072 * rust-lang.c (rust_language_defn): Make extern.
8073 (_initialize_rust_language): Delete.
8074 * utils.h (compare_cstrings): New static inline function.
8076 2017-07-20 Pedro Alves <palves@redhat.com>
8078 * ada-lang.c (ada_to_fixed_type_1): Adjust.
8079 (get_var_value): Constify parameters.
8080 (get_int_var_value): Change prototype.
8081 (to_fixed_range_type): Adjust.
8082 * ada-lang.h (get_int_var_value): Change prototype.
8084 2017-07-20 Pedro Alves <palves@redhat.com>
8086 * dwarf2read.c (dw2_lookup_symbol): Use
8087 SYMBOL_MATCHES_SEARCH_NAME.
8088 * psymtab.c (psym_lookup_symbol): Use SYMBOL_MATCHES_SEARCH_NAME.
8090 2017-07-20 Pedro Alves <palves@redhat.com>
8092 * block.c (block_iter_name_step, block_iter_name_first)
8093 (block_iter_name_next): Delete.
8094 (block_lookup_symbol_primary): Adjust to use
8095 dict_iter_match_first/dict_iter_match_next.
8096 * block.h (block_iter_name_first, block_iter_name_next): Delete
8098 (ALL_BLOCK_SYMBOLS_WITH_NAME): Adjust to use
8099 dict_iter_match_first/dict_iter_match_next.
8101 2017-07-20 Pedro Alves <palves@redhat.com>
8103 * cp-support.c (cp_find_first_component_aux): Add missing case for
8106 2017-07-18 David Blaikie <dblaikie@gmail.com>
8108 * dwarf2read.c (create_cus_hash_table): Re-add lost initialization
8109 of dwo_cu's dwo_file.
8111 2017-07-18 Yao Qi <yao.qi@linaro.org>
8113 * remote.c (store_registers_using_G): Remove one line comment.
8115 2017-07-18 Yao Qi <yao.qi@linaro.org>
8117 * regcache.c (regcache_cpy): Simplify it.
8118 (regcache::cpy_no_passthrough): Remove it.
8119 * regcache.h (cpy_no_passthrough): Remove it.
8120 (regcache_dup, regcache_cpy): Update comments.
8122 2017-07-18 Pedro Alves <palves@redhat.com>
8124 * remote-sim.c (sim_command_completer): Adjust to work with a
8125 completion_tracker instead of a VEC.
8127 2017-07-17 Pedro Alves <palves@redhat.com>
8129 * completer.c (complete_source_filenames): New function.
8130 (complete_address_and_linespec_locations): New function.
8131 (location_completer): Use complete_address_and_linespec_locations.
8132 (completion_tracker::build_completion_result): Honor the tracker's
8133 request to suppress append.
8134 * completer.h (completion_tracker::suppress_append_ws)
8135 (completion_tracker::set_suppress_append_ws): New methods.
8136 (completion_tracker::m_suppress_append_ws): New field.
8137 (complete_source_filenames): New declaration.
8138 * linespec.c (linespec_complete_what): New.
8139 (struct ls_parser) <complete_what, completion_word,
8140 completion_quote_char, completion_quote_end, completion_tracker>:
8142 (string_find_incomplete_keyword_at_end): New.
8143 (linespec_lexer_lex_string): Record quote char. If in completion
8145 (linespec_lexer_consume_token): Advance the completion word point.
8146 (linespec_lexer_peek_token): Save/restore completion info.
8147 (save_stream_and_consume_token): New.
8148 (set_completion_after_number): New.
8149 (linespec_parse_basic): Set what to complete next depending on
8150 token. Handle function and label completions specially.
8151 (parse_linespec): Disable objc shortcut in completion mode. Set
8152 what to complete next depending on token type. Skip keyword if in
8154 (complete_linespec_component, linespec_complete): New.
8155 * linespec.h (linespec_complete): Declare.
8157 2017-07-17 Pedro Alves <palves@redhat.com>
8159 * linespec.c (linespec_lexer_lex_string, find_toplevel_char):
8160 Handle 'operator<' / 'operator<<'.
8162 2017-07-17 Pedro Alves <palves@redhat.com>
8164 * completer.c (collect_explicit_location_matches): Handle
8166 (convert_explicit_location_to_linespec): New, factored out from
8168 (convert_explicit_location_to_sals): ... this.
8169 (complete_label): New.
8170 (linespec_complete_label, find_label_symbols_in_block): New.
8171 (find_label_symbols): Add completion_mode parameter and adjust to
8172 call find_label_symbols_in_block.
8173 * linespec.h (linespec_complete_label): Declare.
8175 2017-07-17 Pedro Alves <palves@redhat.com>
8177 * ada-lang.c (ada_collect_symbol_completion_matches): Add
8178 complete_symbol_mode parameter.
8179 * cli/cli-cmds.c (complete_command): Get the completion result out
8180 of the handle_brkchars tracker if used a custom word point.
8181 * completer.c: Include "linespec.h".
8182 (enum explicit_location_match_type) <MATCH_LINE>: New enumerator.
8183 (advance_to_expression_complete_word_point): New.
8184 (completion_tracker::completes_to_completion_word): New.
8185 (complete_files_symbols): Pass down
8186 complete_symbol_mode::EXPRESSION.
8187 (explicit_options, probe_options): New.
8188 (collect_explicit_location_matches): Complete on the
8189 explictit_loc->foo instead of word. Use
8190 linespec_complete_function. Handle MATCH_LINE. Handle offering
8191 keyword and options completions.
8192 (backup_text_ptr): Delete.
8193 (skip_keyword): New.
8194 (complete_explicit_location): Remove 'word' parameter. Add
8195 language, quoted_arg_start and quoted_arg_end parameters.
8196 Rewrite, parsing left to right.
8197 (location_completer): Rewrite.
8198 (location_completer_handle_brkchars): New function.
8199 (symbol_completer): Pass down complete_symbol_mode::EXPRESSION.
8200 (enum complete_line_internal_reason): Adjust comments.
8201 (completion_tracker::discard_completions): New.
8202 (completer_handle_brkchars_func_for_completer): Handle
8204 (gdb_custom_word_point_brkchars)
8205 (gdb_org_rl_basic_quote_characters): New.
8206 (gdb_completion_word_break_characters_throw)
8207 (completion_find_completion_word): Handle trackers that use a
8209 (completion_tracker::advance_custom_word_point_by): New.
8210 (completion_tracker::build_completion_result): Don't rely on
8211 readline appending the quote char.
8212 (gdb_rl_attempted_completion_function_throw): Handle trackers that
8213 use a custom word point.
8214 (gdb_rl_attempted_completion_function): Restore
8215 rl_basic_quote_characters.
8216 * completer.h (class completion_tracker): Extend intro comment.
8217 (completion_tracker::set_quote_char)
8218 (completion_tracker::quote_char)
8219 (completion_tracker::set_use_custom_word_point)
8220 (completion_tracker::use_custom_word_point)
8221 (completion_tracker::custom_word_point)
8222 (completion_tracker::set_custom_word_point)
8223 (completion_tracker::advance_custom_word_point_by)
8224 (completion_tracker::completes_to_completion_word)
8225 (completion_tracker::discard_completions): New methods.
8226 (completion_tracker::m_quote_char)
8227 (completion_tracker::m_use_custom_word_point)
8228 (completion_tracker::m_custom_word_point): New fields.
8229 (advance_to_expression_complete_word_point): Declare.
8230 * f-lang.c (f_collect_symbol_completion_matches): Add
8231 complete_symbol_mode parameter.
8232 * language.h (struct language_defn)
8233 <la_collect_symbol_completion_matches>: Add complete_symbol_mode
8235 * linespec.c (linespec_keywords): Add NULL terminator. Make extern.
8236 (linespec_complete_function): New function.
8237 (linespec_lexer_lex_keyword): Adjust.
8238 * linespec.h (linespec_keywords, linespec_complete_function): New
8240 * location.c (find_end_quote): New function.
8241 (explicit_location_lex_one): Add explicit_completion_info
8242 parameter. Save quoting info. Don't throw if being called for
8243 completion. Don't handle Ada operators here.
8244 (is_cp_operator, skip_op_false_positives, first_of)
8245 (explicit_location_lex_one_function): New function.
8246 (string_to_explicit_location): Replace 'dont_throw' parameter with
8247 an explicit_completion_info pointer parameter. Handle it. Don't
8248 use explicit_location_lex_one to lex function names. Use
8249 explicit_location_lex_one_function instead.
8250 * location.h (struct explicit_completion_info): New.
8251 (string_to_explicit_location): Replace 'dont_throw' parameter with
8252 an explicit_completion_info pointer parameter.
8253 * symtab.c (default_collect_symbol_completion_matches_break_on):
8254 Add complete_symbol_mode parameter. Handle LINESPEC mode.
8255 (default_collect_symbol_completion_matches)
8256 (collect_symbol_completion_matches): Add complete_symbol_mode
8258 (collect_symbol_completion_matches_type): Pass down
8259 complete_symbol_mode::EXPRESSION.
8260 (collect_file_symbol_completion_matches): Add complete_symbol_mode
8261 parameter. Handle LINESPEC mode.
8262 * symtab.h (complete_symbol_mode): New.
8263 (default_collect_symbol_completion_matches_break_on)
8264 (default_collect_symbol_completion_matches)
8265 (collect_symbol_completion_matches)
8266 (collect_file_symbol_completion_matches): Add complete_symbol_mode
8269 2017-07-17 Pedro Alves <palves@redhat.com>
8271 * utils.c (enum class strncmp_iw_mode): New.
8272 (strcmp_iw): Rename to ...
8273 (strncmp_iw_with_mode): ... this. Add string2_len and mode
8274 parameters. Handle them.
8276 (strcmp_iw): Reimplement as wrapper around strncmp_iw_with_mode.
8277 * utils.h (strncmp_iw): Declare.
8278 (strcmp_iw): Move describing comments here.
8280 2017-07-17 Pedro Alves <palves@redhat.com>
8282 * c-exp.y (operator_stoken): Use CP_OPERATOR_LEN and
8284 * c-typeprint.c (is_type_conversion_operator): Use
8286 * cp-support.c (LENGTH_OF_OPERATOR): Delete.
8287 (cp_find_first_component_aux): Use CP_OPERATOR_STR and
8289 * cp-support.h (CP_OPERATOR_STR, CP_OPERATOR_LEN): New.
8290 * gnu-v2-abi.c (gnuv2_is_operator_name): Use CP_OPERATOR_STR.
8291 * gnu-v3-abi.c (gnuv3_is_operator_name): Use CP_OPERATOR_STR.
8292 * linespec.c (linespec_lexer_lex_string): Use CP_OPERATOR_LEN and
8294 * location.c: Include "cp-support.h".
8295 (explicit_location_lex_one): Use CP_OPERATOR_LEN and
8297 * symtab.c (operator_chars): Use CP_OPERATOR_STR and
8300 2017-07-17 Pedro Alves <palves@redhat.com>
8302 * cli/cli-cmds.c (complete_command): Use a completion tracker
8303 along with completion_find_completion_word for handle_brkchars
8305 * completer.c (RL_QF_SINGLE_QUOTE, RL_QF_DOUBLE_QUOTE)
8306 (RL_QF_BACKSLASH, RL_QF_OTHER_QUOTE): New.
8307 (struct gdb_rl_completion_word_info): New.
8308 (gdb_rl_find_completion_word): New.
8309 (completion_find_completion_word): New.
8310 * completer.h (completion_find_completion_word): Declare.
8312 2017-07-17 Pedro Alves <palves@redhat.com>
8314 * ada-lang.c (symbol_completion_match): Adjust comments.
8315 (symbol_completion_add): Replace vector parameter with
8316 completion_tracker parameter. Use it.
8317 (ada_make_symbol_completion_list): Rename to...
8318 (ada_collect_symbol_completion_matches): ... this. Add
8319 completion_tracker parameter and use it.
8320 (ada_language_defn): Adjust.
8321 * break-catch-syscall.c (catch_syscall_completer): Adjust
8322 prototype and work with completion_tracker instead of VEC.
8323 * breakpoint.c (condition_completer): Adjust prototype and work
8324 with completion_tracker instead of VEC.
8325 * c-lang.c (c_language_defn, cplus_language_defn)
8326 (asm_language_defn, minimal_language_defn): Adjust to renames.
8327 * cli/cli-cmds.c (complete_command): Rework using
8328 completion_tracker. Catch exceptions when completing.
8329 * cli/cli-decode.c (integer_unlimited_completer)
8330 (complete_on_cmdlist, complete_on_enum): Adjust prototype and work
8331 with completion_tracker instead of VEC.
8332 * command.h (struct completion_tracker): Forward declare.
8333 (completer_ftype, completer_handle_brkchars_ftype): Change
8335 (complete_on_cmdlist, complete_on_enum): Adjust.
8336 * completer.c: Include <algorithm>.
8337 (struct gdb_completer_state): New.
8338 (current_completion): New global.
8339 (readline_line_completion_function): Delete.
8340 (noop_completer, filename_completer)
8341 (filename_completer_handle_brkchars, complete_files_symbols)
8342 (linespec_location_completer): Adjust to work with a
8343 completion_tracker instead of a VEC.
8344 (string_or_empty): New.
8345 (collect_explicit_location_matches): Adjust to work with a
8346 completion_tracker instead of a VEC.
8347 (explicit_location_completer): Rename to ...
8348 (complete_explicit_location): ... this and adjust to work with a
8349 completion_tracker instead of a VEC.
8350 (location_completer): Adjust to work with a completion_tracker
8352 (add_struct_fields): Adjust to work with a completion_list instead
8354 (expression_completer): Rename to ...
8355 (complete_expression): ... this and adjust to work with a
8356 completion_tracker instead of a VEC. Use complete_files_symbols.
8357 (expression_completer): Reimplement on top of complete_expression.
8358 (symbol_completer): Adjust to work with a completion_tracker
8360 (enum complete_line_internal_reason): Add describing comments.
8361 (complete_line_internal_normal_command): Adjust to work with a
8362 completion_tracker instead of a VEC.
8363 (complete_line_internal): Rename to ...
8364 (complete_line_internal_1): ... this and adjust to work with a
8365 completion_tracker instead of a VEC. Assert TEXT is NULL in the
8366 handle_brkchars phase.
8367 (new_completion_tracker): Delete.
8368 (complete_line_internal): Reimplement as TRY/CATCH wrapper around
8369 complete_line_internal_1.
8370 (free_completion_tracker): Delete.
8371 (INITIAL_COMPLETION_HTAB_SIZE): New.
8372 (completion_tracker::completion_tracker)
8373 (completion_tracker::~completion_tracker): New.
8374 (maybe_add_completion): Delete.
8375 (completion_tracker::maybe_add_completion)
8376 (completion_tracker::add_completion)
8377 (completion_tracker::add_completions): New.
8378 (throw_max_completions_reached_error): Delete.
8379 (complete_line): Adjust to work with a completion_tracker instead
8380 of a VEC. Don't create a completion_tracker_t or check for max
8382 (command_completer, command_completer_handle_brkchars)
8383 (signal_completer, reg_or_group_completer_1)
8384 (reg_or_group_completer, default_completer_handle_brkchars):
8385 Adjust to work with a completion_tracker.
8386 (gdb_completion_word_break_characters_throw): New.
8387 (gdb_completion_word_break_characters): Reimplement.
8388 (line_completion_function): Delete.
8389 (completion_tracker::recompute_lowest_common_denominator)
8390 (expand_preserving_ws)
8391 (completion_tracker::build_completion_result)
8392 (completion_result::completion_result)
8393 (completion_result::completion_result)
8394 (completion_result::~completion_result)
8395 (completion_result::completion_result)
8396 (completion_result::release_match_list, compare_cstrings)
8397 (completion_result::sort_match_list)
8398 (completion_result::reset_match_list)
8399 (gdb_rl_attempted_completion_function_throw)
8400 (gdb_rl_attempted_completion_function): New.
8401 * completer.h (completion_list, struct completion_result)
8402 (class completion_tracker): New.
8403 (complete_line): Add completion_tracker parameter.
8404 (readline_line_completion_function): Delete.
8405 (gdb_rl_attempted_completion_function): New.
8406 (noop_completer, filename_completer, expression_completer)
8407 (location_completer, symbol_completer, command_completer)
8408 (signal_completer, reg_or_group_completer): Update prototypes.
8409 (completion_tracker_t, new_completion_tracker)
8410 (make_cleanup_free_completion_tracker): Delete.
8411 (enum maybe_add_completion_enum): Delete.
8412 (maybe_add_completion): Delete.
8413 (throw_max_completions_reached_error): Delete.
8414 * corefile.c (complete_set_gnutarget): Adjust to work with a
8415 completion_tracker instead of a VEC.
8416 * cp-abi.c (cp_abi_completer): Adjust to work with a
8417 completion_tracker instead of a VEC.
8418 * d-lang.c (d_language_defn): Adjust.
8419 * disasm.c (disassembler_options_completer): Adjust to work with a
8420 completion_tracker instead of a VEC.
8421 * f-lang.c (f_make_symbol_completion_list): Rename to ...
8422 (f_collect_symbol_completion_matches): ... this. Adjust to work
8423 with a completion_tracker instead of a VEC.
8424 (f_language_defn): Adjust.
8425 * go-lang.c (go_language_defn): Adjust.
8426 * guile/scm-cmd.c (cmdscm_add_completion, cmdscm_completer):
8427 Adjust to work with a completion_tracker instead of a VEC.
8428 * infrun.c (handle_completer): Likewise.
8429 * interps.c (interpreter_completer): Likewise.
8430 * interps.h (interpreter_completer): Likewise.
8431 * language.c (unknown_language_defn, auto_language_defn)
8432 (local_language_defn): Adjust.
8433 * language.h (language_defn::la_make_symbol_completion_list):
8435 (language_defn::la_collect_symbol_completion_matches): ... this
8436 and adjust to work with a completion_tracker instead of a VEC.
8437 * m2-lang.c (m2_language_defn): Adjust.
8438 * objc-lang.c (objc_language_defn): Adjust.
8439 * opencl-lang.c (opencl_language_defn): Adjust.
8440 * p-lang.c (pascal_language_defn): Adjust.
8441 * python/py-cmd.c (cmdpy_completer_helper): Handle NULL word.
8442 (cmdpy_completer_handle_brkchars, cmdpy_completer): Adjust to work
8443 with a completion_tracker.
8444 * rust-lang.c (rust_language_defn): Adjust.
8445 * symtab.c (free_completion_list, do_free_completion_list)
8446 (return_val, completion_tracker): Delete.
8447 (completion_list_add_name, completion_list_add_symbol)
8448 (completion_list_add_msymbol, completion_list_objc_symbol)
8449 (completion_list_add_fields, add_symtab_completions): Add
8450 completion_tracker parameter and use it.
8451 (default_make_symbol_completion_list_break_on_1): Rename to...
8452 (default_collect_symbol_completion_matches_break_on): ... this.
8453 Add completion_tracker parameter and use it instead of allocating
8454 a completion tracker here.
8455 (default_make_symbol_completion_list_break_on): Delete old
8457 (default_make_symbol_completion_list): Delete.
8458 (default_collect_symbol_completion_matches): New.
8459 (make_symbol_completion_list): Delete.
8460 (collect_symbol_completion_matches): New.
8461 (make_symbol_completion_type): Rename to ...
8462 (collect_symbol_completion_matches_type): ... this. Add
8463 completion_tracker parameter and use it instead of VEC.
8464 (make_file_symbol_completion_list_1): Rename to...
8465 (collect_file_symbol_completion_matches): ... this. Add
8466 completion_tracker parameter and use it instead of VEC.
8467 (make_file_symbol_completion_list): Delete.
8468 (add_filename_to_list): Use completion_list instead of a VEC.
8469 (add_partial_filename_data::list): Now a completion_list.
8470 (make_source_files_completion_list): Work with a completion_list
8472 * symtab.h: Include "completer.h".
8473 (default_make_symbol_completion_list_break_on)
8474 (default_make_symbol_completion_list, make_symbol_completion_list)
8475 (make_symbol_completion_type, make_file_symbol_completion_list)
8476 (make_source_files_completion_list): Delete.
8477 (default_collect_symbol_completion_matches_break_on)
8478 (default_collect_symbol_completion_matches)
8479 (collect_symbol_completion_matches)
8480 (collect_symbol_completion_matches_type)
8481 (collect_file_symbol_completion_matches)
8482 (make_source_files_completion_list): New.
8483 * top.c (init_main): Don't install a rl_completion_entry_function
8484 hook. Install a rl_attempted_completion_function hook instead.
8485 * tui/tui-layout.c (layout_completer): Adjust to work with a
8487 * tui/tui-regs.c (tui_reggroup_completer):
8488 * tui/tui-win.c (window_name_completer, focus_completer)
8489 (winheight_completer): Adjust to work with a completion_tracker.
8490 * value.c: Include "completer.h".
8491 (complete_internalvar): Adjust to work with a completion_tracker.
8492 * value.h (complete_internalvar): Likewise.
8494 2017-07-17 Pedro Alves <palves@redhat.com>
8496 * cli/cli-decode.c (set_cmd_completer_handle_brkchars): Adjust to
8498 * cli/cli-decode.h (struct cmd_list_element) <completer>: Move
8499 comments to completer_ftype's declaration.
8500 <completer_handle_brkchars>: Change type to
8501 completer_handle_brkchars_ftype.
8502 * command.h (completer_ftype): Add describing comment and give
8503 names to parameters.
8504 (completer_ftype_void): Rename to ...
8505 (completer_handle_brkchars_ftype) ... this. Add describing comment.
8506 (set_cmd_completer_handle_brkchars): Adjust.
8507 * completer.c (filename_completer_handle_brkchars): New function.
8508 (complete_line_internal_normal_command): New function, factored
8510 (complete_line_internal): ... here.
8511 (command_completer_handle_brkchars)
8512 (default_completer_handle_brkchars)
8513 (completer_handle_brkchars_func_for_completer): New functions.
8514 * completer.h (set_gdb_completion_word_break_characters): Delete
8516 (completer_handle_brkchars_func_for_completer): New declaration.
8517 * python/py-cmd.c (cmdpy_completer_handle_brkchars): Adjust to use
8518 completer_handle_brkchars_func_for_completer.
8520 2017-07-17 Pedro Alves <palves@redhat.com>
8522 * completer.c (symbol_completer): New function, based on
8523 make_symbol_completion_list_fn.
8524 * completer.h (symbol_completer): New declaration.
8525 * guile/scm-cmd.c (cmdscm_completers): Adjust.
8526 * python/py-cmd.c (completers): Adjust.
8527 * symtab.c (make_symbol_completion_list_fn): Delete.
8528 * symtab.h (make_symbol_completion_list_fn): Delete.
8529 * cli/cli-decode.c (add_cmd): Adjust.
8531 2017-07-17 Pedro Alves <palves@redhat.com>
8533 * Makefile.in (COMMON_OBS): Add filename-seen-cache.o.
8534 * dwarf2read.c: Include "filename-seen-cache.h".
8535 * dwarf2read.c (dwarf2_per_objfile) <filenames_cache>: New field.
8536 (dw2_map_symbol_filenames): Build and use a filenames_seen_cache.
8537 * filename-seen-cache.c: New file.
8538 * filename-seen-cache.h: New file.
8539 * symtab.c: Include "filename-seen-cache.h".
8540 (struct filename_seen_cache, INITIAL_FILENAME_SEEN_CACHE_SIZE)
8541 (create_filename_seen_cache, clear_filename_seen_cache)
8542 (delete_filename_seen_cache, filename_seen): Delete, parts moved
8543 to filename-seen-cache.h/filename-seen-cache.c.
8544 (output_source_filename, sources_info)
8545 (maybe_add_partial_symtab_filename)
8546 (make_source_files_completion_list): Adjust to use
8547 filename_seen_cache.
8549 2017-07-17 Pedro Alves <palves@redhat.com>
8551 * dwarf2read.c (dwarf2_per_objfile): In-class initialize all
8553 (dwarf2_per_objfile::dwarf2_per_objfile(objfile*, const
8554 dwarf2_debug_sections*)): New.
8555 (dwarf2_per_objfile::dwarf2_per_objfile(const
8556 dwarf2_per_objfile&)): Declare as deleted.
8557 (dwarf2_per_objfile::operator=): Declare as deleted.
8558 (dwarf2_per_objfile::dwarf2_per_objfile)
8559 (dwarf2_per_objfile::~dwarf2_per_objfile)
8560 (dwarf2_per_objfile::free_cached_comp_units): New.
8561 (dwarf2_has_info): dwarf2_per_objfile initialization code moved to
8562 ctor. Call dwarf2_per_objfile's ctor manually.
8563 (dwarf2_locate_sections): Deleted/refactored as ...
8564 (dwarf2_per_objfile::locate_sections): ... this new method.
8565 (free_cached_comp_units): Defer to
8566 dwarf2_per_objfile::free_cached_comp_units.
8567 (dwarf2_free_objfile): Call dwarf2_per_objfile's dtor manually.
8569 2017-07-14 Tom Tromey <tom@tromey.com>
8572 * rust-exp.y (convert_ast_to_expression): Add "want_type"
8574 <UNOP_SIZEOF>: Split into separate case.
8575 <UNOP_VAR_VALUE>: Handle want_type. Add error case.
8577 2017-07-14 Tom Tromey <tom@tromey.com>
8580 * symtab.c (symbol_matches_domain): Add language_rust to special
8582 * rust-exp.y (convert_ast_to_expression) <OP_VAR_VALUE>: Don't
8583 treat LOC_TYPEDEF symbols as variables.
8585 2017-07-14 Pedro Alves <palves@redhat.com>
8587 * symtab.c (make_file_symbol_completion_list_1): Iterate over
8588 symtabs matching all symtabs with SRCFILE as file name instead of
8589 only considering the first hit, with lookup_symtab.
8591 2017-07-14 Simon Marchi <simon.marchi@ericsson.com>
8593 * ax-gdb.c (gen_aggregate_elt_ref): Remove operand_name and
8594 operator_name parameters.
8595 (gen_expr): Update function call.
8597 2017-07-14 Simon Marchi <simon.marchi@ericsson.com>
8599 * dwarf2loc.h (dwarf2_compile_expr_to_ax): Remove gdbarch
8601 * symtab.h (struct symbol_computed_ops::tracepoint_var_ref):
8603 * dwarf2loc.c (dwarf2_compile_expr_to_ax): Remove gdbarch
8604 parameter, use agent_expr::gdbarch instead, update function
8606 (locexpr_tracepoint_var_ref): Likewise.
8607 (loclist_tracepoint_var_ref): Likewise.
8608 * ax-gdb.c (gen_trace_static_fields): Likewise.
8609 (gen_traced_pop): Likewise.
8610 (gen_frame_args_address): Likewise.
8611 (gen_frame_locals_address): Likewise.
8612 (gen_var_ref): Likewise.
8613 (gen_struct_ref_recursive): Likewise.
8614 (gen_static_field): Likewise.
8615 (gen_maybe_namespace_elt): Likewise.
8616 (gen_expr): Likewise.
8617 (gen_trace_for_var): Likewise.
8618 (gen_trace_for_expr): Likewise.
8619 (gen_trace_for_return_address): Likewise.
8621 2017-07-14 Simon Marchi <simon.marchi@ericsson.com>
8623 * ax-gdb.c (gen_deref, gen_address_of): Remove unused ax
8625 (gen_struct_ref, gen_expr, gen_expr_binop_rest): Update call.
8627 2017-07-14 Simon Marchi <simon.marchi@ericsson.com>
8629 * ax-gdb.c (gen_usual_unary): Remove exp parameter, get gdbarch
8630 from ax, update calls.
8631 (gen_usual_arithmetic): Likewise.
8632 (gen_integral_promotions): Likewise.
8633 (gen_bitfield_ref): Likewise.
8634 (gen_primitive_field): Likewise.
8635 (gen_struct_ref_recursive): Likewise.
8636 (gen_struct_ref): Likewise.
8637 (gen_maybe_namespace_elt): Likewise.
8638 (gen_struct_elt_for_reference): Likewise.
8639 (gen_namespace_elt): Likewise.
8640 (gen_aggregate_elt_ref): Likewise.
8641 (gen_expr): Get gdbarch from ax, update calls.
8642 (gen_expr_binop_rest): Likewise.
8644 2017-07-13 Pedro Alves <palves@redhat.com>
8646 * amd64-darwin-tdep.c (x86_darwin_init_abi_64): Pass tdesc_amd64
8648 * amd64-dicos-tdep.c (amd64_dicos_init_abi):
8649 * amd64-fbsd-tdep.c (amd64fbsd_init_abi):
8650 * amd64-linux-tdep.c (amd64_linux_init_abi): Pass
8651 tdesc_amd64_linux as default tdesc. Get final tdesc from the
8653 (amd64_x32_linux_init_abi): Pass tdesc_x32_linux as default tdesc.
8654 Get final tdesc from the tdep.
8655 * amd64-nbsd-tdep.c (amd64nbsd_init_abi): Pass tdesc_amd64 as
8657 * amd64-obsd-tdep.c (amd64obsd_init_abi): Likewise.
8658 * amd64-sol2-tdep.c (amd64_sol2_init_abi): Likewise.
8659 * amd64-tdep.c (amd64_init_abi): Add 'default_tdesc' parameter.
8660 Use it as default tdesc.
8661 (amd64_x32_init_abi): Add 'default_tdesc' parameter, and pass it
8662 down to amd_init_abi. No longer handle fallback tdesc here.
8663 * amd64-tdep.h (tdesc_x32): Declare.
8664 (amd64_init_abi, amd64_x32_init_abi): Add 'default_tdesc'
8666 * amd64-windows-tdep.c (amd64_windows_init_abi): Pass tdesc_amd64
8669 2017-07-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
8671 * s390-linux-tdep.c (s390_process_record): Add support for
8672 instructions new in arch12.
8674 2017-07-11 John Baldwin <jhb@FreeBSD.org>
8676 * amd64-bsd-nat.c (amd64bsd_fetch_inferior_registers): Use
8677 PT_GETFSBASE and PT_GETGSBASE.
8678 (amd64bsd_store_inferior_registers): Use PT_SETFSBASE and
8681 2017-07-11 John Baldwin <jhb@FreeBSD.org>
8683 * features/Makefile (amd64.dat, amd64-avx.dat, amd64-mpx.dat)
8684 (amd64-avx-mpx.dat, amd64-avx-avx512.dat)
8685 (amd64-avx-mpx-avx512-pku.dat): Add i386/64bit-segments.xml in
8687 * features/i386/amd64-avx-avx512.xml: Add 64bit-segments.xml.
8688 * features/i386/amd64-avx-mpx-avx512-pku.xml: Add 64bit-segments.xml.
8689 * features/i386/amd64-avx-mpx.xml: Add 64bit-segments.xml.
8690 * features/i386/amd64-avx.xml: Add 64bit-segments.xml.
8691 * features/i386/amd64-mpx.xml: Add 64bit-segments.xml.
8692 * features/i386/amd64.xml: Add 64bit-segments.xml.
8693 * features/i386/amd64-avx-avx512.c: Regenerated.
8694 * features/i386/amd64-avx-mpx-avx512-pku.c: Regenerated.
8695 * features/i386/amd64-avx-mpx.c: Regenerated.
8696 * features/i386/amd64-avx.c: Regenerated.
8697 * features/i386/amd64-mpx.c: Regenerated.
8698 * features/i386/amd64.c: Regenerated.
8699 * regformats/i386/amd64-avx-avx512.dat: Regenerated.
8700 * regformats/i386/amd64-avx-mpx-avx512-pku.dat: Regenerated.
8701 * regformats/i386/amd64-avx-mpx.dat: Regenerated.
8702 * regformats/i386/amd64-avx.dat: Regenerated.
8703 * regformats/i386/amd64-mpx.dat: Regenerated.
8704 * regformats/i386/amd64.dat: Regenerated.
8706 2017-07-10 Yao Qi <yao.qi@linaro.org>
8708 * features/i386/amd64-avx-avx512-linux.c: Re-generated.
8709 * features/i386/amd64-avx-mpx-avx512-pku-linux.c: Re-generated.
8711 2017-07-10 Anton Kolesov <Anton.Kolesov@synopsys.com>
8713 * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add setenv and
8715 * gnulib/aclocal.m4: Regenerate.
8716 * gnulib/config.in: Regenerate.
8717 * gnulib/configure: Regenerate.
8718 * gnulib/import/Makefile.am: Regenerate.
8719 * gnulib/import/Makefile.in: Regenerate.
8720 * gnulib/import/m4/gnulib-cache.m4: Regenerate.
8721 * gnulib/import/m4/gnulib-comp.m4: Regenerate.
8722 * gnulib/import/m4/environ.m4: New file.
8723 * gnulib/import/m4/setenv.m4: New file.
8724 * gnulib/import/setenv.c: New file.
8725 * gnulib/import/unsetenv.c: New file.
8727 2017-07-09 Simon Marchi <simon.marchi@ericsson.com>
8729 * compile/compile-loc2c.c (do_compile_dwarf_expr_to_c): Read
8730 address when op is DW_OP_addr.
8732 2017-07-09 Tom Tromey <tom@tromey.com>
8734 * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Reverse size
8735 check and apply to outer type.
8737 2017-07-07 John Baldwin <jhb@FreeBSD.org>
8739 * fbsd-tdep.c (LWPINFO_OFFSET, LWPINFO_PL_FLAGS)
8740 (LWPINFO64_PL_SIGINFO, LWPINFO32_PL_SIGINFO, PL_FLAG_SI)
8741 (SIZE64_SIGINFO_T, SIZE32_SIGINFO_T, fbsd_core_xfer_siginfo): New.
8742 (fbsd_init_abi): Install gdbarch "core_xfer_siginfo" method.
8744 2017-07-07 John Baldwin <jhb@FreeBSD.org>
8746 * fbsd-tdep.c (fbsd_core_thread_name): Use thread_section_name.
8748 2017-07-07 John Baldwin <jhb@FreeBSD.org>
8750 * corelow.c (get_core_siginfo): Remove.
8751 (core_xfer_partial): Use the gdbarch "core_xfer_siginfo" method
8752 instead of get_core_siginfo.
8753 * gdbarch.sh (core_xfer_siginfo): New gdbarch callback.
8754 * gdbarch.h: Re-generate.
8755 * gdbarch.c: Re-generate.
8756 * linux-tdep.c (linux_core_xfer_siginfo): New.
8757 (linux_init_abi): Install gdbarch "core_xfer_siginfo" method.
8759 2017-07-07 John Baldwin <jhb@FreeBSD.org>
8761 * corelow.c (thread_section_name): Move to ...
8762 * gdbcore.h (thread_section_name): ... here.
8764 2017-07-07 John Baldwin <jhb@FreeBSD.org>
8766 * fbsd-nat.c [PT_LWPINFO && __LP64__] (union sigval32)
8767 (struct siginfo32): New.
8768 [PT_LWPINFO] (fbsd_siginfo_size, fbsd_convert_siginfo): New.
8769 (fbsd_xfer_partial) [PT_LWPINFO]: Handle TARGET_OBJECT_SIGNAL_INFO
8770 via ptrace(PT_LWPINFO).
8772 2017-07-07 John Baldwin <jhb@FreeBSD.org>
8774 * fbsd-tdep.c (fbsd_gdbarch_data_handle, struct fbsd_gdbarch_data)
8775 (init_fbsd_gdbarch_data, get_fbsd_gdbarch_data)
8776 (fbsd_get_siginfo_type): New.
8777 (fbsd_init_abi): Install gdbarch "get_siginfo_type" method.
8778 (_initialize_fbsd_tdep): New.
8780 2017-07-06 David Blaikie <dblaikie@gmail.com>
8782 * dwarf2read.c (struct dwo_file): Use a htab of dwo_unit* (rather than
8783 a singular dwo_unit*) to support multiple CUs in the same way that
8784 multiple TUs are supported.
8785 (create_cus_hash_table): Replace create_dwo_cu with a function for
8786 parsing multiple CUs from a DWO file.
8787 (open_and_init_dwo_file): Use create_cus_hash_table rather than
8789 (lookup_dwo_cutu): Lookup CU in the hash table in the dwo_file with
8790 htab_find, rather than comparing the signature to a singleton CU in
8793 2017-07-06 Pedro Alves <palves@redhat.com>
8795 * python/py-unwind.c (pyuw_dealloc_cache): Fix for loop condition.
8797 2017-07-04 Pedro Alves <palves@redhat.com>
8799 * gdbtypes.c (recursive_dump_type): Don't reference TYPE_STATIC.
8800 * gdbtypes.h (TYPE_STATIC): Delete.
8801 (struct fn_field) <is_public, is_abstract, is_static, is_final,
8802 is_synchronized, is_native>: Delete.
8804 (TYPE_FN_FIELD_PUBLIC, TYPE_FN_FIELD_STATIC, TYPE_FN_FIELD_FINAL)
8805 (TYPE_FN_FIELD_SYNCHRONIZED, TYPE_FN_FIELD_NATIVE)
8806 (TYPE_FN_FIELD_ABSTRACT): Delete.
8808 2017-07-03 Simon Marchi <simon.marchi@ericsson.com>
8810 * buffer.h (buffer_finish): Fix spelling mistakes.
8812 2017-07-01 Eli Zaretskii <eliz@gnu.org>
8814 * .dir-locals.el: Automatically switch to C-style comments in
8815 versions of Emacs that support the feature.
8817 2017-06-30 Sergio Durigan Junior <sergiodj@redhat.com>
8818 Pedro Alves <palves@redhat.com>
8821 * cli/cli-script.c (command_name_equals_not_inline): Remove function.
8822 (process_next_line): New variable 'inline_cmd'.
8823 Adjust 'if' clauses for "python", "compile" and "guile" to use
8824 'command_name_equals' and check for '!inline_cmd'.
8826 2017-06-30 Sergio Durigan Junior <sergiodj@redhat.com>
8829 * cli/cli-script.c (command_name_equals_not_inline): New function.
8830 (process_next_line): Adjust 'if' clauses for "python", "compile"
8831 and "guile" to use command_name_equals_not_inline.
8833 2017-06-29 Pedro Alves <palves@redhat.com>
8835 * completer.c (expression_completer): Call
8836 linespec_location_completer instead of location_completer.
8838 2017-06-29 Pedro Alves <palves@redhat.com>
8840 * completer.c (expression_completer): Remove code that recomputes
8843 2017-06-29 Yao Qi <yao.qi@linaro.org>
8845 * regformats/regdat.sh: Generate code with
8846 "ifndef IN_PROCESS_AGENT".
8848 2017-06-28 Pedro Alves <palves@redhat.com>
8850 * command.h: Include "common/scoped_restore.h".
8852 2017-06-28 Yao Qi <yao.qi@linaro.org>
8854 * mi/mi-cmd-break.c (mi_argv_to_format): Use obstack_grow_str
8855 instead of obstack_grow.
8857 2017-06-28 Doug Gilmore <Doug.Gilmore@imgtec.com>
8860 * symfile.c (reread_symbols): Call objfiles_changed just before
8863 2017-06-27 Pedro Alves <palves@redhat.com>
8865 * symtab.c (COMPLETION_LIST_ADD_SYMBOL)
8866 (MCOMPLETION_LIST_ADD_SYMBOL): Delete macros, replace with ...
8867 (completion_list_add_symbol, completion_list_add_msymbol):
8868 ... these new functions.
8869 (add_symtab_completions)
8870 (default_make_symbol_completion_list_break_on_1): Adjust.
8872 2017-06-27 Pedro Alves <palves@redhat.com>
8874 * objfiles.c (get_objfile_bfd_data): Call bfd_alloc instead of
8875 bfd_zalloc. Call objfile_per_bfd_storage's ctor.
8876 (free_objfile_per_bfd_storage): Call objfile_per_bfd_storage's
8878 * objfiles.h (objfile_per_bfd_storage): Add ctor. Make
8879 'storage_obstack' field an auto_obstack. In-class initialize all
8880 non-bitfield fields. Make minsyms_read bool.
8881 * symfile.c (read_symbols): Adjust.
8883 2017-06-27 Alan Hayward <alan.hayward@arm.com>
8885 * remote-sim.c (gdbsim_fetch_register): Use byte_vector.
8886 (gdbsim_store_register): Likewise.
8888 2017-06-27 Pedro Alves <palves@redhat.com>
8890 * c-exp.y (name_obstack): Now an auto_obstack.
8891 (yylex): Use auto_obstack::clear.
8892 (c_parse): Use auto_obstack::clear instead of reinitializing and
8893 freeing the obstack.
8894 * c-lang.c (evaluate_subexp_c): Use auto_obstack.
8895 * d-exp.y (name_obstack): Now an auto_obstack.
8896 (yylex): Use auto_obstack::clear.
8897 (d_parse): Use auto_obstack::clear instead of reinitializing and
8898 freeing the obstack.
8899 * dwarf2loc.c (fetch_const_value_from_synthetic_pointer): Use
8901 * dwarf2read.c (create_addrmap_from_index)
8902 (dwarf2_build_psymtabs_hard)
8903 (update_enumeration_type_from_children): Likewise.
8904 * gdb_obstack.h (auto_obstack): New type.
8905 * go-exp.y (name_obstack): Now an auto_obstack.
8906 (build_packaged_name): Use auto_obstack::clear.
8907 (go_parse): Use auto_obstack::clear instead of reinitializing and
8908 freeing the obstack.
8909 * linux-tdep.c (linux_make_mappings_corefile_notes): Use
8911 * printcmd.c (printf_wide_c_string, ui_printf): Use auto_obstack.
8912 * rust-exp.y (work_obstack): Now an auto_obstack.
8913 (rust_parse, rust_lex_tests): Use auto_obstack::clear instead of
8914 reinitializing and freeing the obstack.
8915 * utils.c (do_obstack_free, make_cleanup_obstack_free): Delete.
8916 (host_char_to_target): Use auto_obstack.
8917 * utils.h (make_cleanup_obstack_free): Delete declaration.
8918 * valprint.c (generic_emit_char, generic_printstr): Use
8921 2017-06-27 Simon Marchi <simon.marchi@ericsson.com>
8923 * darwin-nat.c (darwin_check_new_threads): Don't handle dummy
8925 (darwin_init_thread_list): Don't update dummy thread.
8926 (darwin_create_inferior, darwin_attach): Don't add a dummy thread.
8928 2017-06-26 Simon Marchi <simon.marchi@ericsson.com>
8930 * record-full.c (netorder16): Remove.
8932 2017-06-26 Simon Marchi <simon.marchi@ericsson.com>
8934 * common/diagnostics.h: Define macros for GCC.
8935 (DIAGNOSTIC_IGNORE_UNUSED_FUNCTION): New macro.
8936 * common/vec.h: Include diagnostics.h.
8937 (DIAGNOSTIC_IGNORE_UNUSED_VEC_FUNCTION): New macro.
8938 (DEF_VEC_I, DEF_VEC_P, DEF_VEC_O): Ignore -Wunused-function
8941 2017-06-26 Simon Marchi <simon.marchi@ericsson.com>
8943 * common/diagnostics.h (DIAGNOSTIC_IGNORE_DEPRECATED_REGISTER):
8945 * ada-lex.l: Ignore deprecated register warnings.
8947 2017-06-25 Simon Marchi <simon.marchi@ericsson.com>
8949 * main.c (get_init_files): Replace "SYSTEM_GDBINIT +
8950 datadir_len" with "&SYSTEM_GDBINIT[datadir_len]".
8952 2017-06-25 Simon Marchi <simon.marchi@ericsson.com>
8954 * dtrace-probe.c (dtrace_process_dof_probe): Put semi-colon on
8957 2017-06-25 Simon Marchi <simon.marchi@ericsson.com>
8959 * nat/x86-dregs.c (x86_show_dr): Print registers one per line.
8961 2017-06-23 Alan Hayward <alan.hayward@arm.com>
8963 * xtensa-tdep.c (XTENSA_MAX_REGISTER_SIZE): Add.
8964 (xtensa_register_write_masked): Use XTENSA_MAX_REGISTER_SIZE.
8965 (xtensa_register_read_masked): Likewise.
8967 2017-06-22 Sergio Durigan Junior <sergiodj@redhat.com>
8969 * common/environ.c (gdb_environ::unset): Update comment.
8971 2017-06-22 Alan Hayward <alan.hayward@arm.com>
8973 * python/py-unwind.c (pyuw_sniffer): Allocate space for
8976 2017-06-22 Alan Hayward <alan.hayward@arm.com>
8978 * record-full.c (record_full_exec_insn): Use byte_vector.
8980 2017-06-22 Yao Qi <yao.qi@linaro.org>
8982 * regformats/i386/amd64-avx-mpx-avx512-pku-linux.dat: Regenerated.
8983 * regformats/i386/amd64-avx-mpx-avx512-pku.dat: Regenerated.
8985 2017-06-22 Alan Hayward <alan.hayward@arm.com>
8987 * remote.c (cached_reg): Move from here...
8988 * regcache.h (cached_reg): ...to here.
8989 * python/py-unwind.c (struct reg_info): Remove.
8990 (cached_frame_info): Use cached_reg_t.
8991 (pyuw_prev_register): Likewise.
8992 (pyuw_sniffer): Use cached_reg_t and allocate registers.
8993 (pyuw_dealloc_cache): Free all registers.
8995 2017-06-22 Pedro Alves <palves@redhat.com>
8996 Simon Marchi <simon.marchi@ericsson.com>
8998 * unittests/environ-selftests.c (run_tests): Ignore -Wself-move
9000 * common/diagnostics.h: New file.
9002 2017-06-22 Pedro Alves <palves@redhat.com>
9004 * common/agent.h: Add include guards.
9006 2017-06-21 Simon Marchi <simon.marchi@ericsson.com>
9008 * target.h (struct target_ops) <to_xfer_partial>: Update doc to
9009 talk about addressable units instead of bytes.
9011 2017-06-20 Sergio Durigan Junior <sergiodj@redhat.com>
9013 * common/environ.c (gdb_environ::unset): Use '::iterator' instead
9014 of '::const_iterator'.
9016 2017-06-20 Sergio Durigan Junior <sergiodj@redhat.com>
9018 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
9019 'unittests/environ-selftests.c'.
9020 (SUBDIR_UNITTESTS_OBS): Add 'environ-selftests.o'.
9021 * charset.c (find_charset_names): Declare object 'iconv_env'.
9022 Update code to use 'iconv_env' object. Remove call to
9024 * common/environ.c: Include <utility>.
9025 (make_environ): Delete function.
9026 (free_environ): Delete function.
9027 (gdb_environ::clear): New function.
9028 (gdb_environ::operator=): New function.
9029 (gdb_environ::get): Likewise.
9030 (environ_vector): Delete function.
9031 (set_in_environ): Delete function.
9032 (gdb_environ::set): New function.
9033 (unset_in_environ): Delete function.
9034 (gdb_environ::unset): New function.
9035 (gdb_environ::envp): Likewise.
9036 * common/environ.h: Include <vector>.
9037 (struct gdb_environ): Delete; transform into...
9038 (class gdb_environ): ... this class.
9039 (free_environ): Delete prototype.
9040 (init_environ, get_in_environ, set_in_environ, unset_in_environ,
9041 environ_vector): Likewise.
9042 * infcmd.c (run_command_1): Update code to call
9043 'envp' from 'gdb_environ' class.
9044 (environment_info): Update code to call methods from 'gdb_environ'
9046 (unset_environment_command): Likewise.
9047 (path_info): Likewise.
9048 (path_command): Likewise.
9049 * inferior.c (inferior::~inferior): Delete call to 'free_environ'.
9050 (inferior::inferior): Initialize 'environment' using the host's
9052 * inferior.h: Remove forward declaration of 'struct gdb_environ'.
9053 Include "environ.h".
9054 (class inferior) <environment>: Change type from 'struct
9055 gdb_environ' to 'gdb_environ'.
9056 * mi/mi-cmd-env.c (mi_cmd_env_path): Update code to call
9057 methods from 'gdb_environ' class.
9058 * solib.c (solib_find_1): Likewise
9059 * unittests/environ-selftests.c: New file.
9061 2017-06-20 Yao Qi <yao.qi@linaro.org>
9063 * features/i386/i386-linux.xml: Exchange the order of including
9064 32bit-linux.xml and 32bit-sse.xml.
9065 * features/i386/i386-linux.c: Regenerated.
9067 2017-06-20 Yao Qi <yao.qi@linaro.org>
9069 * target-descriptions.c (tdesc_reg): Add ctor, dtor.
9070 Delete copy ctor and assignment operator.
9071 (tdesc_type): Likewise.
9072 (tdesc_feature): Likewise.
9073 (tdesc_free_reg): Remove.
9074 (tdesc_create_reg): Use new.
9075 (tdesc_free_type): Remove.
9076 (tdesc_create_vector): Use new.
9077 (tdesc_create_union): Likewise.
9078 (tdesc_create_flags): Likewise.
9079 (tdesc_create_enum): Likewise.
9080 (tdesc_free_feature): Delete.
9081 (free_target_description): Use delete.
9083 2017-06-19 John Baldwin <jhb@FreeBSD.org>
9085 * mips-tdep.c (print_gp_register_row): Don't error for unavailable
9088 2017-06-19 Pedro Alves <palves@redhat.com>
9090 * dwarf2read.c (write_psymtabs_to_index): Construct file_closer
9091 after gdb::unlinker.
9093 2017-06-19 Sergio Durigan Junior <sergiodj@redhat.com>
9095 * mi/mi-cm-env.c (_initialize_mi_cmd_env): Use getenv instead of
9096 gdb_environ to access an environment variable.
9098 2017-06-18 Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
9100 * nat/linux-ptrace.c (linux_fork_to_function): Add cast to
9103 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
9105 * nat/fork-inferior.h (trace_start_error): Add ATTRIBUTE_PRINTF.
9107 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
9109 * configure: Re-generate.
9110 * warning.m4 (build_warnings): Add -Wno-mismatched-tags.
9112 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
9114 * configure: Re-generate.
9115 * warning.m4: Pass -Werror to compiler when checking for
9116 supported warning flags.
9118 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
9120 * Makefile.in (COMPILE.pre): Add "-x c++".
9122 2017-06-16 Alan Hayward <alan.hayward@arm.com>
9123 Pedro Alves <palves@redhat.com>
9124 Yao Qi <yao.qi@linaro.org>
9126 * defs.h (RequireLongest): New.
9127 (extract_integer): Declare function template.
9128 (extract_signed_integer): Remove the declaration, but define it
9130 (extract_unsigned_integer): Likewise.
9131 (store_integer): Declare function template.
9132 (store_signed_integer): Remove the declaration, but define it
9134 (store_unsigned_integer): Likewise.
9135 * findvar.c (extract_integer): New function template.
9136 (extract_signed_integer): Remove.
9137 (extract_unsigned_integer): Remove.
9138 (extract_integer<LONGEST>, extract_integer<ULONGEST>): Explicit
9140 (store_integer): New function template.
9141 (store_signed_integer): Remove.
9142 (store_unsigned_integer): Remove.
9143 (store_integer): Explicit instantiations.
9144 * regcache.c (regcache_raw_read_signed): Update.
9145 (regcache::raw_read): New function.
9146 (regcache::raw_read_signed): Remove.
9147 (regcache::raw_read_unsigned): Remove.
9148 (regcache_raw_read_unsigned): Update.
9149 (regcache_raw_write_unsigned): Update.
9150 (regcache::raw_write_signed): Remove.
9151 (regcache::raw_write): New function.
9152 (regcache_cooked_read_signed): Update.
9153 (regcache::raw_write_unsigned): Remove.
9154 (regcache::cooked_read_signed): Remove.
9155 (regcache_cooked_read_unsigned): Update.
9156 (regcache::cooked_read_unsigned): Remove.
9157 (regcache_cooked_write_signed): Update.
9158 (regcache_cooked_write_unsigned): Update.
9159 * regcache.h (regcache) <raw_read_signed>: Remove.
9160 <raw_write_signed, raw_read_unsigned, raw_write_unsigned>: Remove.
9161 <raw_read, raw_write>: New.
9162 <cooked_read_signed, cooked_write_signed>: Remove.
9163 <cooked_write_unsigned, cooked_read_unsigned>: Remove.
9164 <cooked_read, cooked_write>: New.
9165 * sh64-tdep.c (sh64_pseudo_register_read): Update.
9166 (sh64_pseudo_register_write): Update.
9168 2017-06-16 Anton Kolesov <anton.kolesov@synopsys.com>
9170 * arc-tdep.c (arc_disassembler_options): New variable.
9171 (arc_gdbarch_init): Set and use it. Use arc_delayed_print_insn instead
9172 of default_print_insn.
9173 (arc_delayed_print_insn): Set info->section when needed,
9174 use default_print_insn to retrieve a disassembler.
9176 2017-06-14 Sergio Durigan Junior <sergiodj@redhat.com>
9179 * infcmd.c (_initialize_infcmd): Expand "help run" documentation
9180 to mention $SHELL and startup-with-shell.
9182 2017-06-14 Max Filippov <jcmvbkbc@gmail.com>
9184 * MAINTAINERS: Move Maxim Grigoriev to the Past Maintainers.
9186 2017-06-14 Yao Qi <yao.qi@linaro.org>
9188 * aarch64-tdep.c (aarch64_gdb_print_insn): Call
9189 default_print_insn instead of print_insn_aarch64.
9190 * arm-tdep.c (gdb_print_insn_arm): Call
9191 default_print_insn instead of print_insn_big_arm
9192 and print_insn_little_arm.
9193 * i386-tdep.c (i386_print_insn): Call default_print_insn
9194 instead of print_insn_i386.
9195 * ia64-tdep.c (ia64_print_insn): Call
9196 default_print_insn instead of print_insn_ia64.
9197 * mips-tdep.c (gdb_print_insn_mips): Call
9198 default_print_insn instead of print_insn_big_mips
9199 and print_insn_little_mips.
9200 * spu-tdep.c (gdb_print_insn_spu): Call default_print_insn
9201 instead of print_insn_spu.
9203 2017-06-14 Pedro Alves <palves@redhat.com>
9205 * ada-lang.c: Include "common/byte-vector.h".
9206 (ada_value_primitive_packed_val): Use gdb::byte_vector.
9207 * charset.c (wchar_iterator::iterate): Resize the vector instead
9209 * common/byte-vector.h: Include "common/def-vector.h".
9210 (wchar_iterator::m_out): Now a gdb::def_vector<gdb_wchar_t>.
9211 * cli/cli-dump.c: Include "common/byte-vector.h".
9212 (dump_memory_to_file, restore_binary_file): Use gdb::byte_vector.
9213 * common/byte-vector.h: New file.
9214 * common/def-vector.h: New file.
9215 * common/default-init-alloc.h: New file.
9216 * dwarf2loc.c: Include "common/byte-vector.h".
9217 (rw_pieced_value): Use gdb::byte_vector, and resize the vector
9218 instead of reserving it.
9219 * dwarf2read.c: Include "common/byte-vector.h".
9220 (data_buf::m_vec): Now a gdb::byte_vector.
9221 * gdb_regex.c: Include "common/def-vector.h".
9222 (compiled_regex::compiled_regex): Use gdb::def_vector<char>.
9223 * mi/mi-main.c: Include "common/byte-vector.h".
9224 (mi_cmd_data_read_memory): Use gdb::byte_vector.
9225 * printcmd.c: Include "common/byte-vector.h".
9226 (print_scalar_formatted): Use gdb::byte_vector.
9227 * valprint.c: Include "common/byte-vector.h".
9228 (maybe_negate_by_bytes, print_decimal_chars): Use
9231 2017-06-13 Simon Marchi <simon.marchi@ericsson.com>
9233 * darwin-nat.c: Include "nat/fork-inferior.h".
9235 2017-06-13 Simon Marchi <simon.marchi@ericsson.com>
9237 * configure.nat: Factor out Darwin bits that are not
9238 architecture-specific. Add fork-inferior.o.
9240 2017-06-13 Simon Marchi <simon.marchi@ericsson.com>
9242 * configure.nat: Factor out AIX bits that are not
9243 architecture-specific. Add fork-inferior.o.
9245 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
9247 * dwarf2loc.c (rw_pieced_value): New. Merge logic from...
9248 (read_pieced_value, write_pieced_value): ...here. Reduce to
9249 wrappers that just call rw_pieced_value.
9251 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
9253 * dwarf2loc.c (write_pieced_value): When writing the data for a
9254 memory piece, use write_memory_with_notification instead of
9257 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
9259 * valops.c (read_value_memory): Change embedded_offset to
9260 represent a bit offset instead of a byte offset.
9261 * value.h (read_value_memory): Adjust comment.
9263 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
9265 * dwarf2loc.c (read_pieced_value): Remove unnecessary variables
9266 dest_offset_bits and source_offset_bits.
9267 (write_pieced_value): Likewise.
9269 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
9271 * dwarf2loc.c (read_pieced_value): Respect the piece offset, as
9272 given by DW_OP_bit_piece.
9273 (write_pieced_value): Likewise.
9275 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
9277 * dwarf2loc.c (read_pieced_value): Move the buffer allocation and
9278 some other preparations to the places where sufficient information
9280 (write_pieced_value): Likewise.
9282 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
9284 * dwarf2loc.c (bits_to_bytes): New function.
9285 (read_pieced_value): Fix offset calculations for register pieces
9286 on big-endian targets.
9287 (write_pieced_value): Likewise.
9289 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
9291 * dwarf2loc.c (read_pieced_value): Remove buffer_size variable.
9292 (write_pieced_value): Likewise.
9294 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
9296 * dwarf2loc.c (write_pieced_value): When writing to a bit-field,
9297 transfer the source value's least significant bits, instead of its
9298 lowest-addressed ones. Rename type_len to max_offset.
9299 (read_pieced_value): Mirror above changes to write_pieced_value as
9302 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
9304 * dwarf2loc.c (write_pieced_value): In DWARF_VALUE_MEMORY,
9305 truncate full bytes from dest_offset_bits before using it as an
9306 offset into the buffer.
9308 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
9310 * dwarf2loc.c (write_pieced_value): Include transfer size in
9313 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
9315 * dwarf2loc.c (write_pieced_value): Fix copy/paste error in the
9316 calculation of this_size.
9318 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
9320 * dwarf2loc.c (read_pieced_value): Respect parent value's offset
9321 when targeting a bit-field.
9322 (write_pieced_value): Likewise.
9324 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
9326 * dwarf2loc.c (struct piece_closure) <addr_size>: Remove field.
9327 (allocate_piece_closure): Drop addr_size parameter.
9328 (dwarf2_evaluate_loc_desc_full): Adjust call to
9329 allocate_piece_closure.
9331 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
9334 * dwarf2loc.c (read_pieced_value): Anchor stack value pieces at
9335 the LSB end, independent of endianness.
9337 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
9339 * dwarf2loc.c (write_pieced_value): Fix order of calculations for
9342 2017-06-13 Yao Qi <yao.qi@linaro.org>
9344 * mips-linux-nat.c: Move include features/mips*-linux.c to
9346 (_initialize_mips_linux_nat): Move initialize_tdesc_mips* calls
9347 to mips-linux-tdep.c.
9348 * mips-linux-tdep.c: Include features/mips*-linux.c
9349 (_initialize_mips_linux_tdep): Call initialize_tdesc_mips*
9351 * mips-linux-tdep.h (tdesc_mips_linux): Declare.
9352 (tdesc_mips_dsp_linux, tdesc_mips64_linux): Declare.
9353 (tdesc_mips64_dsp_linux): Declare.
9355 2017-06-12 Tom Tromey <tom@tromey.com>
9357 * valprint.h (val_print_type_code_int): Remove.
9358 * valprint.c (generic_val_print_int): Always call
9359 val_print_scalar_formatted.
9360 (val_print_type_code_int): Remove.
9361 * printcmd.c (print_scalar_formatted): Handle options->format==0.
9362 * f-valprint.c (f_val_print): Use val_print_scalar_formatted.
9363 * c-valprint.c (c_val_print_int): Use val_print_scalar_formatted.
9364 * ada-valprint.c (ada_val_print_num): Use
9365 val_print_scalar_formatted.
9367 2017-06-12 Tom Tromey <tom@tromey.com>
9369 * printcmd.c (print_scalar_formatted): Unify the two switches.
9370 Don't convert scalars to LONGEST.
9372 2017-06-12 Tom Tromey <tom@tromey.com>
9375 * valprint.h (print_decimal_chars): Update.
9376 * valprint.c (maybe_negate_by_bytes): New function.
9377 (print_decimal_chars): Add "is_signed" argument.
9378 * printcmd.c (print_scalar_formatted): Update.
9380 2017-06-12 Tom Tromey <tom@tromey.com>
9383 * valprint.h (print_binary_chars, print_hex_chars): Update.
9384 * valprint.c (val_print_type_code_int): Update.
9385 (print_binary_chars): Add "zero_pad" argument.
9386 (emit_octal_digit): New function.
9387 (print_octal_chars): Don't zero-pad.
9388 (print_decimal_chars): Likewise.
9389 (print_hex_chars): Add "zero_pad" argument.
9390 * sh64-tdep.c (sh64_do_fp_register): Update.
9391 * regcache.c (regcache::dump): Update.
9392 * printcmd.c (print_scalar_formatted): Update.
9393 * infcmd.c (default_print_one_register_info): Update.
9395 2017-06-12 Pedro Alves <palves@redhat.com>
9396 Alan Hayward <alan.hayward@arm.com>
9398 * mips-tdep.c (MAX_MIPS_ABI_REGSIZE): New.
9399 (mips_eabi_push_dummy_call): Rename local 'regsize' to
9400 'abi_regsize'. Rename local array 'valbuf' to 'ref_valbuf', and
9401 use MAX_MIPS_ABI_REGSIZE instead of MAX_REGISTER_SIZE to size it.
9402 Assert that abi_regsize bytes fit in 'ref_valbuf'.
9404 2017-06-12 Pedro Alves <palves@redhat.com>
9406 * dwarf2read.c (mapped_symtab::data): Now a vector of
9407 symtab_index_entry instead of vector of
9408 std::unique_ptr<symtab_index_entry>. All users adjusted to check
9409 whether an element's name is NULL instead of checking whether the
9410 element itself is NULL.
9411 (find_slot): Change return type. Adjust.
9412 (hash_expand, , add_index_entry, uniquify_cu_indices)
9413 (write_hash_table): Adjust.
9415 2017-06-12 Pedro Alves <palves@redhat.com>
9417 * dwarf2read.c (recursively_count_psymbols): New function.
9418 (write_psymtabs_to_index): Call it to compute number of psyms and
9419 pass estimate size of psyms_seen to unordered_set's ctor.
9421 2017-06-12 Pedro Alves <palves@redhat.com>
9423 * dwarf2read.c (write_hash_table): Check if key already exists
9426 2017-06-12 Pedro Alves <palves@redhat.com>
9428 * dwarf2read.c (data_buf::append_space): Rename to...
9429 (data_buf::grow): ... this, and make private. Adjust all callers.
9430 (data_buf::append_uint): New method.
9431 (add_address_entry, write_one_signatured_type)
9432 (write_psymtabs_to_index): Use it.
9434 2017-06-12 Pedro Alves <palves@redhat.com>
9436 * dwarf2read.c (file_write(FILE *, const void *, size_t)): Delete.
9437 (file_write (FILE *, const std::vector<Elem>&)): Delete.
9438 (data_buf::file_write): Call ::fwrite directly.
9440 2017-06-12 Pedro Alves <palves@redhat.com>
9442 * dwarf2read.c (uniquify_cu_indices): Use std::unique and
9445 2017-06-12 Jan Kratochvil <jan.kratochvil@redhat.com>
9447 Code cleanup: C++ify .gdb_index producer.
9448 * dwarf2read.c: Include <unordered_set> and <unordered_map>.
9449 (MAYBE_SWAP) [WORDS_BIGENDIAN]: Cast to offset_type.
9450 (struct strtab_entry, hash_strtab_entry, eq_strtab_entry)
9451 (create_strtab, add_string): Remove.
9452 (file_write, data_buf): New.
9453 (struct symtab_index_entry): Use std::vector for cu_indices.
9454 (struct mapped_symtab): Use std::vector for data.
9455 (hash_symtab_entry, eq_symtab_entry, delete_symtab_entry)
9456 (create_symbol_hash_table, create_mapped_symtab, cleanup_mapped_symtab):
9458 (find_slot): Change return type. Update it to the new data structures.
9459 (hash_expand, add_index_entry): Update it to the new data structures.
9460 (offset_type_compare): Remove.
9461 (uniquify_cu_indices): Update it to the new data structures.
9462 (c_str_view, c_str_view_hasher, vector_hasher): New.
9463 (add_indices_to_cpool): Remove.
9464 (write_hash_table): Update it to the new data structures.
9465 (struct psymtab_cu_index_map, hash_psymtab_cu_index)
9466 (eq_psymtab_cu_index): Remove.
9467 (psym_index_map): New typedef.
9468 (struct addrmap_index_data): Change addr_obstack pointer to data_buf
9469 reference and std::unordered_map for cu_index_htab.
9470 (add_address_entry, add_address_entry_worker, write_address_map)
9471 (write_psymbols): Update it to the new data structures.
9472 (write_obstack): Remove.
9473 (struct signatured_type_index_data): Change types_list to a data_buf
9474 reference and psyms_seen to a std::unordered_set reference.
9475 (write_one_signatured_type, recursively_write_psymbols)
9476 (write_psymtabs_to_index): Update it to the new data structures.
9478 2017-06-11 Simon Marchi <simon.marchi@ericsson.com>
9480 * NEWS (Changes since GDB 8.0): Announce {set,show} debug
9481 separate-debug-file commands.
9482 * symfile.h (separate_debug_file_debug): New global.
9483 * symfile.c (separate_debug_file_debug): New global.
9484 (separate_debug_file_exists, find_separate_debug_file): Add
9486 (_initialize_symfile): Add "set debug separate-debug-file"
9488 * build-id.c (build_id_to_debug_bfd,
9489 find_separate_debug_file_by_buildid): Add debug output.
9491 2017-06-10 Simon Marchi <simon.marchi@polymtl.ca>
9493 * gdbarch.sh (displaced_step_free_closure): Remove.
9494 * gdbarch.h, gdbarch.c: Re-generate.
9495 * aarch64-linux-tdep.c (aarch64_linux_init_abi): Don't set
9496 displaced_step_free_closure.
9497 * amd64-linux-tdep.c (amd64_linux_init_abi_common): Likewise.
9498 * arm-linux-tdep.c (arm_linux_init_abi): Likewise.
9499 * i386-linux-tdep.c (i386_linux_init_abi): Likewise.
9500 * rs6000-aix-tdep.c (rs6000_aix_init_osabi): Likewise.
9501 * rs6000-tdep.c (rs6000_gdbarch_init): Likewise.
9502 * s390-linux-tdep.c (s390_gdbarch_init): Likewise.
9503 * arch-utils.h (simple_displaced_step_free_closure): Remove.
9504 * arch-utils.c (simple_displaced_step_free_closure): Remove.
9505 * infrun.c (displaced_step_clear): Call xfree instead of
9506 gdbarch_displaced_step_free_closure.
9508 2017-06-08 Sergio Durigan Junior <sergiodj@redhat.com>
9510 * common/common-utils.c (stringify_argv): Check for "arg[0] !=
9513 2017-06-08 Alan Hayward <alan.hayward@arm.com>
9515 * mn10300-tdep.c (MN10300_MAX_REGISTER_SIZE): Add.
9516 (mn10300_extract_return_value): Use MN10300_MAX_REGISTER_SIZE.
9517 (mn10300_push_dummy_call): Likewise.
9519 2017-06-08 Alan Hayward <alan.hayward@arm.com>
9521 * mi/mi-main.c (register_changed_p): Use value_contents_eq.
9523 2017-06-08 Alan Hayward <alan.hayward@arm.com>
9525 * mi/mi-main.c (register_changed_p): Use cooked_read_value.
9527 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
9529 * NEWS (Changes since GDB 8.0): Announce that GDBserver is now
9530 able to start inferiors using a shell.
9531 (New remote packets): Announce new packet "QStartupWithShell".
9532 * remote.c: Add PACKET_QStartupWithShell.
9533 (extended_remote_create_inferior): Handle new
9534 PACKET_QStartupWithShell.
9535 (remote_protocol_features) <QStartupWithShell>: New entry for
9536 PACKET_QStartupWithShell.
9537 (_initialize_remote): Call "add_packet_config_cmd" for
9540 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
9541 Pedro Alves <palves@redhat.com>
9543 * Makefile.in (HFILES_NO_SRCDIR): Add "common/common-inferior.h"
9544 and "nat/fork-inferior.h".
9545 * common/common-inferior.h: New file, with contents from
9547 * commom/common-utils.c: Include "common-utils.h".
9548 (stringify_argv): New function.
9549 * common/common-utils.h (stringify_argv): New prototype.
9550 * configure.nat: Add "fork-inferior.o" as a dependency for
9551 "*linux*", "fbsd*" and "nbsd*" hosts.
9552 * corefile.c (get_exec_file): Update comment.
9553 * darwin-nat.c (darwin_ptrace_him): Call "gdb_startup_inferior"
9554 instead of "startup_inferior".
9555 (darwin_create_inferior): Call "add_thread_silent" after
9557 * fork-child.c: Cleanup unnecessary includes.
9558 (SHELL_FILE): Move to "common/common-fork-child.c".
9559 (environ): Likewise.
9560 (exec_wrapper): Initialize.
9561 (get_exec_wrapper): New function.
9562 (breakup_args): Move to "common/common-fork-child.c"; rename to
9563 "breakup_args_for_exec".
9564 (escape_bang_in_quoted_argument): Move to
9565 "common/common-fork-child.c".
9566 (saved_ui): New variable.
9567 (prefork_hook): New function.
9568 (postfork_hook): Likewise.
9569 (postfork_child_hook): Likewise.
9570 (gdb_startup_inferior): Likewise.
9571 (fork_inferior): Move to "common/common-fork-child.c". Update
9572 function to support gdbserver.
9573 (startup_inferior): Likewise.
9574 * gdbcore.h (get_exec_file): Remove declaration.
9575 * gnu-nat.c (gnu_create_inferior): Call "gdb_startup_inferior"
9576 instead of "startup_inferior". Call "add_thread_silent" after
9578 * inf-ptrace.c: Include "nat/fork-inferior.h" and "utils.h".
9579 (inf_ptrace_create_inferior): Call "gdb_startup_inferior"
9580 instead of "startup_inferior". Call "add_thread_silent" after
9582 * inferior.h: Include "common-inferior.h".
9583 (trace_start_error): Move to "common/common-utils.h".
9584 (trace_start_error_with_name): Likewise.
9585 (fork_inferior): Move prototype to "nat/fork-inferior.h".
9586 (startup_inferior): Likewise.
9587 (gdb_startup_inferior): New prototype.
9588 * nat/fork-inferior.c: New file, with contents from "fork-child.c".
9589 * nat/fork-inferior.h: New file.
9590 * procfs.c (procfs_init_inferior): Call "gdb_startup_inferior"
9591 instead of "startup_inferior". Call "add_thread_silent" after
9593 * target.h (target_terminal_init): Move prototype to
9595 (target_terminal_inferior): Likewise.
9596 (target_terminal_ours): Likewise.
9597 * target/target.h (target_terminal_init): New prototype, moved
9599 (target_terminal_inferior): Likewise.
9600 (target_terminal_ours): Likewise.
9601 * utils.c (gdb_flush_out_err): New function.
9603 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
9605 * Makefile.in (HFILES_NO_SRCDIR): Add "common/common-gdbthread.h".
9606 * common/common-gdbthread.h: New file, with parts from
9608 * gdbthread.h: Include "common-gdbthread.h".
9609 (switch_to_thread): Moved to "common/common-gdbthread.h".
9611 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
9613 * Makefile.in (SFILES): Add "common/job-control.c".
9614 (HFILES_NO_SRCDIR): Add "common/job-control.h".
9615 (COMMON_OBS): Add "job-control.o".
9616 * common/job-control.c: New file, with contents from
9618 * common/job-control.h: New file, with contents from "terminal.h".
9619 * fork-child.c: Include "job-control.h".
9620 * inflow.c: Include "job-control.h".
9621 (gdb_setpgid): Move to "common/common-inflow.c".
9622 (_initialize_inflow): Move setting of "job_control" to
9623 "handle_job_control".
9624 * terminal.h (job_control): Moved to "common/common-terminal.h".
9625 (gdb_setpgid): Likewise.
9626 * top.c: Include "job_control.h".
9627 * utils.c: Likewise.
9628 (job_control): Moved to "job-control.c".
9630 2017-06-07 Pedro Alves <palves@redhat.com>
9632 * Makefile.in (SFILES): Add gdb_regex.c.
9633 (COMMON_OBS): Add gdb_regex.o.
9634 * ada-lang.c (ada_add_standard_exceptions)
9635 (ada_add_exceptions_from_frame, name_matches_regex)
9636 (ada_add_global_exceptions, ada_exceptions_list_1): Change regex
9637 parameter type to compiled_regex. Adjust.
9638 (ada_exceptions_list): Use compiled_regex.
9639 * break-catch-throw.c (exception_catchpoint::pattern): Now a
9640 std::unique_ptr<compiled_regex>.
9641 (exception_catchpoint::~exception_catchpoint): Remove regfree
9643 (check_status_exception_catchpoint): Adjust to use compiled_regex.
9644 (handle_gnu_v3_exceptions): Adjust to use compiled_regex.
9645 * breakpoint.c (solib_catchpoint::compiled): Now a
9646 std::unique_ptr<compiled_regex>.
9647 (solib_catchpoint::~solib_catchpoint): Remove regfree call.
9648 (check_status_catch_solib): Adjust to use compiled_regex.
9649 (add_solib_catchpoint): Adjust to use compiled_regex.
9650 * cli/cli-cmds.c (apropos_command): Use compiled_regex.
9651 * cli/cli-decode.c (apropos_cmd): Change regex parameter to
9652 compiled_regex reference. Adjust to use it.
9653 * cli/cli-decode.h: Remove struct re_pattern_buffer forward
9654 declaration. Include "gdb_regex.h".
9655 (apropos_cmd): Change regex parameter to compiled_regex reference.
9656 * gdb_regex.c: New file.
9657 * gdb_regex.h (make_regfree_cleanup, get_regcomp_error): Delete
9659 (class compiled_regex): New.
9660 * linux-tdep.c: Include "common/gdb_optional.h".
9661 (struct mapping_regexes): New, factored out from
9662 mapping_is_anonymous_p, and adjusted to use compiled_regex.
9663 (mapping_is_anonymous_p): Use mapping_regexes wrapped in a
9664 gdb::optional and remove cleanups. Adjust to compiled_regex.
9665 * probe.c: Include "common/gdb_optional.h".
9666 (collect_probes): Use compiled_regex and gdb::optional and remove
9668 * skip.c: Include "common/gdb_optional.h".
9669 (skiplist_entry::compiled_function_regexp): Now a
9670 gdb::optional<compiled_regex>.
9671 (skiplist_entry::compiled_function_regexp_is_valid): Delete field.
9672 (free_skiplist_entry): Remove regfree call.
9673 (compile_skip_regexp, skip_rfunction_p): Adjust to use
9674 compiled_regex and gdb::optional.
9675 * symtab.c: Include "common/gdb_optional.h".
9676 (search_symbols): Use compiled_regex and gdb::optional.
9677 * utils.c (do_regfree_cleanup, make_regfree_cleanup)
9678 (get_regcomp_error, compile_rx_or_error): Delete. Some bits moved
9681 2017-06-07 Alan Hayward <alan.hayward@arm.com>
9683 * regcache.c (regcache::save): Avoid buffer use.
9684 (regcache::dump): Likewise.
9686 2017-06-07 Alan Hayward <alan.hayward@arm.com>
9688 * sh-tdep.c (sh_pseudo_register_read): Remove
9690 (sh_pseudo_register_write): Likewise.
9691 * sh64-tdep.c (sh64_pseudo_register_read): Likewise.
9692 (sh64_pseudo_register_write): Likewise
9694 2017-06-07 Alan Hayward <alan.hayward@arm.com>
9696 * aarch64-tdep.c (aarch64_store_return_value): Use
9698 (aarch64_pseudo_read_value): Likewise.
9699 (aarch64_pseudo_write): Likewise.
9701 2017-06-06 Yao Qi <yao.qi@linaro.org>
9703 * regformats/regdef.h (set_register_cache): Remove the
9706 2017-06-06 Alan Hayward <alan.hayward@arm.com>
9708 * frame.c (frame_unwind_register_signed): Use
9709 frame_unwind_register_value.
9711 2017-06-06 Pedro Alves <palves@redhat.com>
9713 PR breakpoints/21553
9714 * breakpoint.c (create_breakpoints_sal_default)
9715 (init_breakpoint_sal, create_breakpoint_sal): Use
9716 gdb::unique_xmalloc_ptr for string parameters.
9717 (create_breakpoint): Constify 'extra_string' and 'cond_string'
9718 parameters. Replace cleanups with gdb::unique_xmalloc_ptr.
9719 (base_breakpoint_create_breakpoints_sal)
9720 (bkpt_create_breakpoints_sal, tracepoint_create_breakpoints_sal)
9721 (strace_marker_create_breakpoints_sal)
9722 (create_breakpoints_sal_default): Use gdb::unique_xmalloc_ptr for
9724 * breakpoint.h (breakpoint_ops::create_breakpoints_sal): Use
9725 gdb::unique_xmalloc_ptr for string parameters.
9726 (create_breakpoint): Constify 'extra_string' and 'cond_string'
9729 2017-06-06 Alan Hayward <alan.hayward@arm.com>
9731 * alpha-tdep.c (alpha_register_to_value): Use
9732 get_frame_register_value.
9733 (alpha_value_to_register): Use ALPHA_REGISTER_SIZE.
9735 2017-06-06 Alan Hayward <alan.hayward@arm.com>
9737 * ia64-tdep.c (IA64_MAX_FP_REGISTER_SIZE) Add.
9738 (ia64_register_to_value): Use IA64_MAX_FP_REGISTER_SIZE.
9739 (ia64_value_to_register): Likewise.
9740 (ia64_extract_return_value): Likewise.
9741 (ia64_store_return_value): Likewise.
9742 (ia64_push_dummy_call): Likewise.
9744 2017-06-04 Joel Brobecker <brobecker@adacore.com>
9748 2017-06-03 Simon Marchi <simon.marchi@ericsson.com>
9750 * x86-linux-nat.c (struct arch_lwp_info): Remove.
9752 2017-06-03 Simon Marchi <simon.marchi@polymtl.ca>
9754 * linux-nat.c (linux_nat_post_attach_wait): Remove FIRST
9756 (linux_nat_attach): Adjust call to linux_nat_post_attach_wait.
9758 2017-06-02 Simon Marchi <simon.marchi@ericsson.com>
9760 * event-loop.c (poll_timers): Unallocate timer using delete
9763 2017-06-02 Simon Marchi <simon.marchi@polymtl.ca>
9765 * breakpoint.h (struct breakpoint_ops) <dtor>: Remove.
9766 (struct breakpoint) <~breakpoint>: New.
9767 (struct watchpoint): Inherit from breakpoint.
9770 (struct tracepoint): Inherit from breakpoint.
9772 * breakpoint.c (longjmp_breakpoint_ops): Remove.
9773 (struct longjmp_breakpoint): Inherit from breakpoint.
9774 <~longjmp_breakpoint>: New.
9776 (new_breakpoint_from_type): Remove casts.
9777 (watchpoint_in_thread_scope): Remove reference to base field.
9778 (watchpoint_del_at_next_stop): Likewise.
9779 (update_watchpoint): Likewise.
9780 (watchpoint_check): Likewise.
9781 (bpstat_check_watchpoint): Likewise.
9782 (set_longjmp_breakpoint): Likewise.
9783 (struct fork_catchpoint): Inherit from breakpoint.
9785 (struct solib_catchpoint): Inherit from breakpoint.
9786 <~solib_catchpoint>: New.
9788 (dtor_catch_solib): Change to ...
9789 (solib_catchpoint::~solib_catchpoint): ... this.
9790 (breakpoint_hit_catch_solib): Remove reference to base field.
9791 (add_solib_catchpoint): Likewise.
9792 (create_fork_vfork_event_catchpoint): Likewise.
9793 (struct exec_catchpoint): Inherit from breakpoint.
9794 <~exec_catchpoint>: New.
9796 (dtor_catch_exec): Change to ...
9797 (exec_catchpoint::~exec_catchpoint): ... this.
9798 (dtor_watchpoint): Change to ...
9799 (watchpoint::~watchpoint): ... this.
9800 (watch_command_1): Remove reference to base field.
9801 (catch_exec_command_1): Likewise.
9802 (base_breakpoint_dtor): Change to ...
9803 (breakpoint::~breakpoint): ... this.
9804 (base_breakpoint_ops): Remove dtor field value.
9805 (longjmp_bkpt_dtor): Change to ...
9806 (longjmp_breakpoint::~longjmp_breakpoint): ... this.
9807 (strace_marker_create_breakpoints_sal): Remove reference to base
9809 (delete_breakpoint): Don't manually call breakpoint destructor.
9810 (create_tracepoint_from_upload): Remove reference to base field.
9811 (trace_pass_set_count): Likewise.
9812 (initialize_breakpoint_ops): Don't initialize
9813 momentary_breakpoint_ops, don't set dtors.
9814 * ada-lang.c (struct ada_catchpoint): Inherit from breakpoint.
9815 <~ada_catchpoint>: New.
9817 (create_excep_cond_exprs): Remove reference to base field.
9818 (dtor_exception): Change to ...
9819 (ada_catchpoint::~ada_catchpoint): ... this.
9820 (dtor_catch_exception): Remove.
9821 (dtor_catch_exception_unhandled): Remove.
9822 (dtor_catch_assert): Remove.
9823 (create_ada_exception_catchpoint): Remove reference to base
9825 (initialize_ada_catchpoint_ops): Don't set dtors.
9826 * break-catch-sig.c (struct signal_catchpoint): Inherit from
9828 <~signal_catchpoint>: New.
9830 (signal_catchpoint_dtor): Change to ...
9831 (signal_catchpoint::~signal_catchpoint): ... this.
9832 (create_signal_catchpoint): Remove reference to base field.
9833 (initialize_signal_catchpoint_ops): Don't set dtor.
9834 * break-catch-syscall.c (struct syscall_catchpoint): Inherit
9836 <~syscall_catchpoint>: New.
9838 (dtor_catch_syscall): Change to ...
9839 (syscall_catchpoint::~syscall_catchpoint): ... this.
9840 (create_syscall_event_catchpoint): Remove reference to base
9842 (initialize_syscall_catchpoint_ops): Don't set dtor.
9843 * break-catch-throw.c (struct exception_catchpoint): Inherit
9845 <~exception_catchpoint>: New.
9847 (dtor_exception_catchpoint): Change to ...
9848 (exception_catchpoint::~exception_catchpoint): ... this.
9849 (handle_gnu_v3_exceptions): Remove reference to base field.
9850 (initialize_throw_catchpoint_ops): Don't set dtor.
9851 * ctf.c (ctf_get_traceframe_address): Remove reference to base
9853 * remote.c (remote_get_tracepoint_status): Likewise.
9854 * tracefile-tfile.c (tfile_get_traceframe_address): Likewise.
9855 * tracefile.c (tracefile_fetch_registers): Likewise.
9856 * tracepoint.c (actions_command): Likewise.
9857 (validate_actionline): Likewise.
9858 (tfind_1): Likewise.
9859 (get_traceframe_location): Likewise.
9860 (find_matching_tracepoint_location): Likewise.
9861 (parse_tracepoint_status): Likewise.
9862 * mi/mi-cmd-break.c (mi_cmd_break_passcount): Likewise.
9864 2017-06-02 Simon Marchi <simon.marchi@polymtl.ca>
9866 * breakpoint.c (struct longjmp_breakpoint): New struct.
9867 (is_tracepoint_type): Change return type to bool.
9868 (is_longjmp_type): New function.
9869 (new_breakpoint_from_type): Handle longjmp kinds of breakpoints.
9870 (set_raw_breakpoint_without_location): Use
9871 new_breakpoint_from_type.
9872 (set_raw_breakpoint): Likewise.
9874 2017-06-02 Simon Marchi <simon.marchi@polymtl.ca>
9876 * breakpoint.c (new_breakpoint_from_type): New function.
9877 (create_breakpoint_sal): Use new_breakpoint_from_type and
9879 (create_breakpoint): Likewise.
9881 2017-05-31 Simon Marchi <simon.marchi@ericsson.com>
9883 * memattr.c (mem_info_command): Rename to ...
9884 (info_mem_command): ... this.
9885 (mem_enable_command): Rename to ...
9886 (enable_mem_command): ... this.
9887 (mem_disable_command): Rename to ...
9888 (disable_mem_command): ... this.
9889 (mem_delete_command): Rename to ...
9890 (delete_mem_command): ... this.
9891 (_initialize_mem): Adjust function names.
9893 2017-05-31 Markus Metzger <markus.t.metzger@intel.com>
9895 * btrace.c (handle_pt_insn_events): New.
9896 (ftrace_add_pt): Call handle_pt_insn_events. Rename ERRCODE into
9897 STATUS. Split into this and ...
9898 (handle_pt_insn_event_flags): ... this.
9900 2017-05-31 Markus Metzger <markus.t.metzger@intel.com>
9902 * configure.ac: Check for pt_insn_event, struct pt_insn.enabled,
9903 and struct pt_insn.resynced.
9904 * configure: Regenerated.
9905 * config.in: Regenerated.
9907 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
9909 * btrace.c (ftrace_find_call_by_number): New function.
9910 (ftrace_new_function): Store objects, not pointers.
9911 (ftrace_find_call_by_number, ftrace_new_return, ftrace_new_switch,
9912 ftrace_new_gap, ftrace_update_function,
9913 ftrace_compute_global_level_offset, btrace_stich_bts, btrace_clear,
9914 btrace_insn_get, btrace_insn_get_error, btrace_insn_end,
9915 btrace_insn_next, btrace_insn_prev, ptrace_find_insn_by_number,
9916 btrace_ends_with_single_insn, btrace_call_get): Account for
9917 btrace_thread_info::functions now storing objects.
9918 * btrace.h (struct btrace_thread_info): Add constructor.
9919 (struct btrace_thread_info) <functions>: Make std::vector.
9920 (struct btrace_thread_info) <prev, next, up, insn, errcode, flags):
9921 Initialize with default values.
9922 * record-btrace.c (record_btrace_frame_sniffer): Account for
9923 btrace_thread_info::functions now storing objects.
9925 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
9927 * btrace.c: Remove typedef bfun_s.
9928 (ftrace_new_gap): Directly add gaps to the list of gaps.
9929 (btrace_bridge_gaps, btrace_compute_ftrace_bts, pt_btrace_insn_flags,
9930 ftrace_add_pt, btrace_compute_ftrace_pt, btrace_compute_ftrace_1,
9931 btrace_finalize_ftrace, btrace_compute_ftrace): Use std::vector
9934 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
9936 * btrace.c (ftrace_fixup_caller, ftrace_new_return, ftrace_connect_bfun,
9937 ftrace_bridge_gap): Replace references to btrace_thread_info::segment
9938 with btrace_thread_info::next_segment and
9939 btrace_thread_info::prev_segment.
9940 * btrace.h: Remove struct btrace_func_link.
9941 (struct btrace_function): Replace pair of function segment pointers
9942 with pair of indices.
9943 * python/py-record-btrace.c (btpy_call_prev_sibling,
9944 btpy_call_next_sibling): Replace references to
9945 btrace_thread_info::segment with btrace_thread_info::next_segment and
9946 btrace_thread_info::prev_segment.
9947 * record-btrace.c (record_btrace_frame_this_id): Use
9948 btrace_find_call_by_number.
9950 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
9952 * btrace.c (ftrace_new_function, ftrace_fixup_level,
9953 ftrace_connect_bfun, ftrace_bridge_gap, btrace_bridge_gaps,
9954 btrace_insn_next, btrace_insn_prev): Remove references to
9955 btrace_thread_info::flow.
9956 * btrace.h (struct btrace_function): Remove FLOW.
9958 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
9960 * btrace.c (ftrace_find_call_by_number): New function.
9961 (ftrace_update_caller, ftrace_new_call, ftrace_new_tailcall,
9962 ftrace_get_caller, ftrace_find_call, ftrace_new_return,
9963 ftrace_match_backtrace, ftrace_connect_bfun, ftrace_connect_backtrace,
9964 ftrace_bridge_gap, btrace_bridge_gaps): Use btrace_function::up as an
9966 * btrace.h (struct btrace_function): Turn UP into an index.
9967 * python/py-record-btrace.c (btpy_call_up): Use btrace_function::up
9969 * record-btrace.c (record_btrace_frame_unwind_stop_reason,
9970 record_btrace_frame_prev_register, record_btrace_frame_sniffer,
9971 record_btrace_tailcall_frame_sniffe): Use btrace_find_call_by_number.
9973 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
9975 * btrace.c (ftrace_new_function, ftrace_new_call, ftrace_new_tailcall,
9976 ftrace_new_return, ftrace_new_switch, ftrace_new_gap,
9977 ftrace_update_function, ftrace_compute_global_level_offset,
9978 btrace_compute_ftrace_bts, ftrace_add_pt, btrace_compute_ftrace_pt,
9979 btrace_stitch_bts, btrace_fetch, btrace_clear, btrace_insn_number,
9980 btrace_insn_end, btrace_is_empty): Remove references to
9981 btrace_thread_info::begin and btrace_thread_info::end.
9982 * btrace.h (struct btrace_thread_info): Remove BEGIN and END.
9983 (struct btrace_thread_info) <functions>: Adjust comment.
9984 * record-btrace.c (record_btrace_start_replaying): Remove reference to
9985 btrace_thread_info::begin.
9987 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
9989 * btrace.c (ftrace_new_function, ftrace_new_call, ftrace_new_tailcall,
9990 ftrace_new_return, ftrace_new_switch, ftrace_new_gap,
9991 ftrace_update_function): Remove arguments that implicitly were always
9993 (btrace_compute_ftrace_bts, ftrace_add_pt, btrace_compute_ftrace_pt):
9994 Don't pass BTINFO->END.
9996 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
9998 * btrace.c: (btrace_insn_get, btrace_insn_get_error, btrace_insn_number,
9999 btrace_insn_begin, btrace_insn_end, btrace_insn_next, btrace_insn_prev,
10000 btrace_find_insn_by_number): Replace function segment pointer with
10002 (btrace_insn_cmp): Simplify.
10003 * btrace.h: (struct btrace_insn_iterator) Rename index to
10004 insn_index. Replace function segment pointer with index into function
10006 * record-btrace.c (record_btrace_call_history): Replace function
10007 segment pointer use with index.
10008 (record_btrace_frame_sniffer): Retrieve function call segment through
10010 (record_btrace_set_replay): Remove defunc't safety check.
10012 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
10014 * btrace.c (btrace_ends_with_single_insn): New function.
10015 (btrace_call_get, btrace_call_number, btrace_call_begin,
10016 btrace_call_end, btrace_call_next, btrace_call_prev,
10017 btrace_find_call_by_number): Use index into call segment vector
10018 instead of pointer.
10019 (btrace_call_cmp): Simplify.
10020 * btrace.h (struct btrace_call_iterator): Replace function call segment
10021 pointer with index into vector.
10022 * record-btrace.c (record_btrace_call_history): Use index instead of
10025 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
10027 * btrace.c (btrace_insn_begin, btrace_insn_end,
10028 btrace_find_insn_by_number): Add btinfo to iterator.
10029 * btrace.h (struct btrace_insn_iterator): Add btinfo.
10031 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
10033 * btrace.c (ftrace_new_function): Add btrace_thread_info to arguments
10034 and save pointers directly.
10035 (ftrace_new_call, ftrace_new_tailcall, ftrace_new_return,
10036 ftrace_new_switch, ftrace_new_gap, ftrace_update_function,
10037 ftrace_add_pt): Add btrace_thread_info to arguments. Adjust for
10038 changed signature of functions.
10039 (btrace_compute_ftrace_pt): Adjust for changed signature of functions.
10040 (btrace_fetch): Remove code that adds btrace_function pointers to
10041 vector of btrace_functions.
10042 (btrace_clear): Simplify freeing vector of btrace_functions.
10044 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
10046 * btrace.c (btrace_fetch, btrace_clear, btrace_find_insn_by_number):
10047 Replace VEC_* with std::vector functions.
10048 * btrace.h: Add include: vector. Remove typedef for DEF_VEC_P.
10049 (struct btrace_thread_info)<functions>: Change type to std::vector.
10051 2017-05-30 Simon Marchi <simon.marchi@ericsson.com>
10053 * NEWS (Changes in GDB 8.0): Remove extra empty line. Move
10054 "Removed targets and native configurations" up. Merge duplicate
10055 "New commands" sub-sections. Add "New options" sub-sections.
10057 2017-05-26 Alan Hayward <alan.hayward@arm.com>
10059 * defs.h (copy_integer_to_size): New declaration.
10060 * findvar.c (copy_integer_to_size): New function.
10061 (do_cint_test): New selftest function.
10062 (copy_integer_to_size_test): Likewise.
10063 (_initialize_findvar): Likewise.
10064 * mips-fbsd-tdep.c (mips_fbsd_supply_reg): Use raw_supply_integer.
10065 (mips_fbsd_collect_reg): Use raw_collect_integer.
10066 * mips-linux-tdep.c (supply_32bit_reg): Use raw_supply_integer.
10067 (mips64_fill_gregset): Use raw_collect_integer
10068 (mips64_fill_fpregset): Use raw_supply_integer.
10069 * regcache.c (regcache::raw_supply_integer): New function.
10070 (regcache::raw_collect_integer): Likewise.
10071 * regcache.h: (regcache::raw_supply_integer): New declaration.
10072 (regcache::raw_collect_integer): Likewise.
10074 2017-05-24 Yao Qi <yao.qi@linaro.org>
10076 * Makefile.in (SFILES): Add gdbarch-selftests.c.
10077 (COMMON_OBS): Add gdbarch-selftests.o.
10078 * frame.c [GDB_SELF_TESTS] (create_new_frame): New function.
10079 * frame.h [GDB_SELF_TESTS] (create_new_frame): Declare.
10080 * gdbarch-selftests.c: New file.
10081 * regcache.h (regcache) <~regcache>: Mark it virtual if
10083 <raw_write>: Likewise.
10085 2017-05-24 Yao Qi <yao.qi@linaro.org>
10087 * regcache.c (current_regcache): Change it to
10088 regcache::current_regcache.
10089 (regcache_observer_target_changed): Update.
10090 (regcache_thread_ptid_changed): Make it a regcache static
10092 (regcache_thread_ptid_changed): Update.
10093 (class regcache_access): New.
10094 (current_regcache_test): Update.
10095 (_initialize_regcache): Update.
10096 * regcache.h: Include forward_list.
10097 (regcache): Declare regcache_thread_ptid_changed and declare
10098 registers_changed_ptid as friend.
10100 2017-05-24 Yao Qi <yao.qi@linaro.org>
10102 * i387-tdep.c (i387_register_to_value): Use register_size
10103 instead of TYPE_LENGTH.
10104 * m68k-tdep.c (m68k_register_to_value): Likewise.
10106 2017-05-24 Yao Qi <yao.qi@linaro.org>
10108 * i387-tdep.c (i387_convert_register_p): Return false if type
10109 code isn't TYPE_CODE_FLT.
10111 2017-05-24 Yao Qi <yao.qi@linaro.org>
10113 * alpha-tdep.c (alpha_convert_register_p): Return true if type
10115 (alpha_register_to_value): Remove type length check.
10116 (alpha_value_to_register): Likewise.
10118 2017-05-24 Yao Qi <yao.qi@linaro.org>
10120 * ia64-tdep.c (ia64_convert_register_p): Check type's code is
10123 2017-05-24 Yao Qi <yao.qi@linaro.org>
10125 * m68k-tdep.c (m68k_convert_register_p): Check type's code is
10126 TYPE_CODE_FLT or not.
10128 2017-05-24 Yao Qi <yao.qi@linaro.org>
10130 * alpha-tdep.c (alpha_gdbarch_init): Use XCNEW instead of XNEW.
10131 * avr-tdep.c (avr_gdbarch_init): Likewise.
10132 * bfin-tdep.c (bfin_gdbarch_init): Likewise.
10133 * cris-tdep.c (cris_gdbarch_init): Likewise.
10134 * ft32-tdep.c (ft32_gdbarch_init): Likewise.
10135 * lm32-tdep.c (lm32_gdbarch_init): Likewise.
10136 * m32r-tdep.c (m32r_gdbarch_init): Likewise.
10137 * m68hc11-tdep.c (m68hc11_gdbarch_init): Likewise.
10138 * mep-tdep.c (mep_gdbarch_init): Likewise.
10139 * microblaze-tdep.c (microblaze_gdbarch_init): Likewise.
10140 * mips-tdep.c (mips_gdbarch_init): Likewise.
10141 * mn10300-tdep.c (mn10300_gdbarch_init): Likewise.
10142 * moxie-tdep.c (moxie_gdbarch_init): Likewise.
10143 * msp430-tdep.c (msp430_gdbarch_init): Likewise.
10144 * sh64-tdep.c (sh64_gdbarch_init): Likewise.
10145 * v850-tdep.c (v850_gdbarch_init): Likewise.
10147 2017-05-24 Yao Qi <yao.qi@linaro.org>
10149 * selftest-arch.c (tests_with_arch): Call registers_changed
10150 and reinit_frame_cache.
10151 * selftest.c (run_self_tests): Likewise.
10153 2017-05-24 Yao Qi <yao.qi@linaro.org>
10155 * rs6000-tdep.c (gdb_print_insn_powerpc): Remove.
10156 (rs6000_gdbarch_init): Don't call set_gdbarch_print_insn.
10158 2017-05-24 Yao Qi <yao.qi@linaro.org>
10160 * rl78-tdep.c (rl78_gdbarch_init): Don't call
10161 set_gdbarch_print_insn.
10163 2017-05-24 Yao Qi <yao.qi@linaro.org>
10165 * h8300-tdep.c (h8300_gdbarch_init): Don't call
10166 set_gdbarch_print_insn.
10168 2017-05-24 Yao Qi <yao.qi@linaro.org>
10170 * alpha-tdep.c (alpha_gdbarch_init): Don't call
10171 set_gdbarch_print_insn.
10172 * arc-tdep.c (arc_gdbarch_init): Likewise.
10173 * arch-utils.c: include dis-asm.h.
10174 (default_print_insn): New function.
10175 * arch-utils.h (default_print_insn): Declare.
10176 * avr-tdep.c (avr_gdbarch_init): Don't call set_gdbarch_print_insn.
10177 * bfin-tdep.c (bfin_gdbarch_init): Likewise.
10178 * cris-tdep.c (cris_delayed_get_disassembler): Remove.
10179 (cris_gdbarch_init): Don't call set_gdbarch_print_insn.
10180 * frv-tdep.c (frv_gdbarch_init): Likewise.
10181 * ft32-tdep.c (ft32_gdbarch_init): Likewise.
10182 * gdbarch.sh (print_insn): Use default_print_insn.
10183 * gdbarch.c: Regenerated.
10184 * hppa-tdep.c (hppa_gdbarch_init): Likewise.
10185 * iq2000-tdep.c (iq2000_gdbarch_init): Likewise.
10186 * lm32-tdep.c (lm32_gdbarch_init): Likewise.
10187 * m32c-tdep.c (m32c_gdbarch_init): Likewise.
10188 * m32r-tdep.c (m32r_gdbarch_init): Likewise.
10189 * m68hc11-tdep.c (gdb_print_insn_m68hc11): Remove.
10190 (m68hc11_gdbarch_init): Don't call set_gdbarch_print_insn.
10191 * m68k-tdep.c (m68k_gdbarch_init): Likewise.
10192 * m88k-tdep.c (m88k_gdbarch_init): Likewise.
10193 * microblaze-tdep.c (microblaze_gdbarch_init): Likewise.
10194 * mn10300-tdep.c (mn10300_gdbarch_init): Likewise.
10195 * moxie-tdep.c (moxie_gdbarch_init): Likewise.
10196 * msp430-tdep.c (msp430_gdbarch_init): Likewise.
10197 * mt-tdep.c (mt_gdbarch_init): Likewise.
10198 * nds32-tdep.c (nds32_gdbarch_init): Likewise.
10199 * nios2-tdep.c (nios2_print_insn): Remove.
10200 (nios2_gdbarch_init): Don't call set_gdbarch_print_insn.
10201 * rx-tdep.c (rx_gdbarch_init): Likewise.
10202 * s390-linux-tdep.c (s390_gdbarch_init): Likewise.
10203 * score-tdep.c (score_print_insn): Remove.
10204 (score_gdbarch_init): Don't call set_gdbarch_print_insn.
10205 * sh-tdep.c (sh_gdbarch_init): Likewise.
10206 * sh64-tdep.c (sh64_gdbarch_init): Likewise.
10207 * sparc-tdep.c (sparc32_gdbarch_init): Likewise.
10208 * tic6x-tdep.c (tic6x_print_insn): Remove.
10209 (tic6x_gdbarch_init): Don't call set_gdbarch_print_insn.
10210 * tilegx-tdep.c (tilegx_gdbarch_init): Likewise.
10211 * v850-tdep.c (v850_gdbarch_init): Likewise.
10212 * vax-tdep.c (vax_gdbarch_init): Likewise.
10213 * xstormy16-tdep.c (xstormy16_gdbarch_init): Likewise.
10214 * xtensa-tdep.c (xtensa_gdbarch_init): Likewise.
10216 2017-05-23 John Baldwin <jhb@FreeBSD.org>
10218 * mips-fbsd-tdep.c (MIPS_PC_REGNUM): Remove.
10219 (MIPS_FP0_REGNUM): Remove.
10220 (MIPS_FSR_REGNUM): Remove.
10221 (mips_fbsd_supply_fpregs): Use mips_regnum.
10222 (mips_fbsd_supply_gregs): Likewise.
10223 (mips_fbsd_collect_fpregs): Likewise.
10224 (mips_fbsd_collect_gregs): Likewise.
10226 2017-05-23 John Baldwin <jhb@FreeBSD.org>
10228 * mips-fbsd-nat.c (getregs_supplies): Fix upper bound comparison.
10229 (getpfpregs_supplies): New function.
10230 (mips_fbsd_fetch_inferior_registers): Remove early exit and use
10231 getfpregs_supplies.
10232 (mips_fbsd_store_inferior_registers): Likewise.
10234 2017-05-22 Pedro Alves <palves@redhat.com>
10236 * MAINTAINERS (Host/Native): Add John Baldwin as FreeBSD
10239 2017-05-22 Alan Hayward <alan.hayward@arm.com>
10241 * ppc-linux-nat.c (fetch_register): Use PPC_MAX_REGISTER_SIZE.
10242 (store_register): Likewise.
10243 * ppc-sysv-tdep.c (ppc_sysv_abi_push_dummy_call): Likewise.
10244 (get_decimal_float_return_value): Likewise.
10245 (do_ppc_sysv_return_value): Likewise.
10246 (ppc64_sysv_abi_push_integer): Likewise.
10247 (ppc64_sysv_abi_push_freg): Likewise.
10248 (ppc64_sysv_abi_return_value_base): Likewise.
10249 (ppc64_sysv_abi_return_value): Likewise.
10250 * rs6000-aix-tdep.c (rs6000_push_dummy_call): Likewise.
10251 * rs6000-lynx178-tdep.c (rs6000_lynx178_push_dummy_call): Likewise.
10252 * rs6000-nat.c: Likewise.
10253 * rs6000-tdep.c (rs6000_register_to_value): Likewise.
10254 (rs6000_value_to_register): Likewise.
10255 * ppc-tdep.h (PPC_MAX_REGISTER_SIZE): Add.
10257 2017-05-21 Tom Tromey <tom@tromey.com>
10260 * rust-lang.c (rust_print_type) <TYPE_CODE_ARRAY>: Print unsized
10261 arrays as "[T]", not "[T; ]".
10263 2017-05-19 Tom Tromey <tom@tromey.com>
10266 * rust-lang.c (exp_descriptor_rust): New function.
10267 (rust_language_defn): Use it.
10268 * p-lang.c (pascal_language_defn): Update.
10269 * opencl-lang.c (opencl_language_defn): Update.
10270 * objc-lang.c (objc_language_defn): Update.
10271 * m2-lang.c (m2_language_defn): Update.
10272 * language.h (struct language_defn)
10273 <la_watch_location_expression>: New member.
10274 * language.c (unknown_language_defn, auto_language_defn)
10275 (local_language_defn): Update.
10276 * go-lang.c (go_language_defn): Update.
10277 * f-lang.c (f_language_defn): Update.
10278 * d-lang.c (d_language_defn): Update.
10279 * c-lang.h (c_watch_location_expression): Declare.
10280 * c-lang.c (c_watch_location_expression): New function.
10281 (c_language_defn, cplus_language_defn, asm_language_defn)
10282 (minimal_language_defn): Use it.
10283 * breakpoint.c (watch_command_1): Call
10284 la_watch_location_expression.
10285 * ada-lang.c (ada_language_defn): Update.
10287 2017-05-19 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
10290 * gdb_curses.h (NOMACROS): Define.
10291 (NCURSES_NOMACROS): Define.
10293 2017-05-19 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
10296 * tui/tui-windata.c (tui_erase_data_content): Cast last mvwaddstr
10298 * tui/tui-wingeneral.c (box_win): Likewise.
10299 * tui/tui-winsource.c (tui_erase_source_content): Likewise.
10300 (tui_show_source_line): Likewise.
10301 (tui_show_exec_info_content): Likewise.
10303 2017-05-19 Vladimir Mezentsev <vladimir.mezentsev@oracle.com>
10305 * sparc-tdep.c (sparc_structure_return_p)
10306 (sparc_arg_on_registers_p): New functions.
10307 (sparc32_store_arguments): Use them.
10308 * sparc64-tdep.c (sparc64_16_byte_align_p)
10309 (sparc64_store_floating_fields, sparc64_extract_floating_fields):
10310 Handle TYPE_CODE_ARRAY.
10312 2017-05-17 Yao Qi <yao.qi@linaro.org>
10314 * cli/cli-decode.c (add_alias_cmd): New function.
10315 * command.h (add_alias_cmd): Declare.
10316 * infcmd.c (_initialize_infcmd): Don't call add_com_alias,
10317 instead call add_alias_cmd.
10319 2017-05-17 Pedro Alves <palves@redhat.com>
10321 * Makefile.in (nat_extra_makefile_frag): Rename to ...
10322 (nat_makefile_frag): ... this. All references updated.
10323 * configure.ac: Likewise.
10324 * configure.nat: Likewise. Enhance comments.
10325 * configure: Regenerate.
10327 2017-05-15 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
10329 * procfs.c (procfs_create_inferior): Change prototype to match
10332 2017-05-13 Eli Zaretskii <eliz@gnu.org>
10334 * tui/tui.c (tui_enable): Cast "unknown" to 'char *' to avoid a
10335 C++ compiler warning.
10337 2017-05-12 Tom Tromey <tom@tromey.com>
10340 * rust-lang.c (rust_evaluate_subexp) <STRUCTOP_STRUCT>: Don't
10341 recurse, just call value_struct_elt directly.
10343 2017-05-12 Tom Tromey <tom@tromey.com>
10345 * rust-lang.c (rust_dump_subexp_body) <STRUCTOP_ANONYMOUS,
10346 OP_RUST_ARRAY>: Fix.
10348 2017-05-12 Tom Tromey <tom@tromey.com>
10350 * rust-lang.c (rust_print_subexp): Replace "return" with "break".
10352 2017-05-09 Yao Qi <yao.qi@linaro.org>
10354 * regcache.c: Include <forward_list>.
10355 (struct regcache_list): Remove.
10356 (current_regcache): Update.
10357 (get_thread_arch_aspace_regcache): Update for std::forward_list.
10358 (regcache_thread_ptid_changed): Likewise.
10359 (registers_changed_ptid): Likewise.
10360 (current_regcache_size): Likewise.
10362 2017-05-09 Yao Qi <yao.qi@linaro.org>
10364 * regcache.c [GDB_SELF_TEST]: Include selftest.h.
10365 (current_regcache_size): New function.
10366 (current_regcache_test): New function.
10367 (_initialize_regcache) [GDB_SELF_TEST]: Register the unit test.
10369 2017-05-08 Alan Hayward <alan.hayward@arm.com>
10371 * mips-tdep.c (mips_o32_return_value): Remove unused buffer.
10372 (print_gp_register_row): Use get_frame_register_value.
10374 2017-05-08 Alan Hayward <alan.hayward@arm.com>
10376 * mips-linux-tdep.c (mips_supply_gregset): Use raw_supply_zeroed.
10377 (mips_supply_fpregset): Likewise.
10378 (mips64_supply_gregset): Likewise.
10380 2017-05-08 Alan Hayward <alan.hayward@arm.com>
10382 * mn10300-linux-tdep.c (am33_supply_gregset_method): Use
10383 regcache->raw_supply_zeroed.
10385 2017-05-06 Sergio Durigan Junior <sergiodj@redhat.com>
10387 * configure.nat: Rearrange 'case' statements to match
10390 2017-05-06 Sergio Durigan Junior <sergiodj@redhat.com>
10392 * Makefile.in: Remove "@host_makefile_frag@". Add variables
10393 NAT_FILE, NATDEPFILES, NAT_CDEPS, LOADLIBES, MH_CFLAGS, XM_CLIBS,
10394 NAT_GENERATED_FILES, HAVE_NATIVE_GCORE_HOST. Add
10395 "@nat_extra_makefile_frag@".
10396 (Makefile): Remove dependency on "@frags@".
10397 ($(GNULIB_BUILDDIR)/Makefile): Likewise.
10398 (data-directory/Makefile): Likewise.
10399 * config/aarch64/linux.mh: Deleted; moved contents to
10400 "gdb/configure.nat".
10401 * config/alpha/alpha-linux.mh: Likewise.
10402 * config/alpha/nbsd.mh: Likewise.
10403 * config/arm/linux.mh: Likewise.
10404 * config/arm/nbsdelf.mh: Likewise.
10405 * config/i386/cygwin.mh: Likewise.
10406 * config/i386/cygwin64.mh: Likewise.
10407 * config/i386/darwin.mh: Likewise.
10408 * config/i386/fbsd.mh: Likewise.
10409 * config/i386/fbsd64.mh: Likewise.
10410 * config/i386/go32.mh: Likewise.
10411 * config/i386/i386gnu.mh: Likewise.
10412 * config/i386/i386sol2.mh: Likewise.
10413 * config/i386/linux.mh: Likewise.
10414 * config/i386/linux64.mh: Likewise.
10415 * config/i386/mingw.mh: Likewise.
10416 * config/i386/mingw64.mh: Likewise.
10417 * config/i386/nbsd64.mh: Likewise.
10418 * config/i386/nbsdelf.mh: Likewise.
10419 * config/i386/nto.mh: Likewise.
10420 * config/i386/obsd.mh: Likewise.
10421 * config/i386/obsd64.mh: Likewise.
10422 * config/i386/sol2-64.mh: Likewise.
10423 * config/ia64/linux.mh: Likewise.
10424 * config/m32r/linux.mh: Likewise.
10425 * config/m68k/linux.mh: Likewise.
10426 * config/m68k/nbsdelf.mh: Likewise.
10427 * config/m68k/obsd.mh: Likewise.
10428 * config/m88k/obsd.mh: Likewise.
10429 * config/mips/fbsd.mh: Likewise.
10430 * config/mips/linux.mh: Likewise.
10431 * config/mips/nbsd.mh: Likewise.
10432 * config/mips/obsd64.mh: Likewise.
10433 * config/pa/linux.mh: Likewise.
10434 * config/pa/nbsd.mh: Likewise.
10435 * config/pa/obsd.mh: Likewise.
10436 * config/powerpc/aix.mh: Likewise.
10437 * config/powerpc/fbsd.mh: Likewise.
10438 * config/powerpc/linux.mh: Likewise.
10439 * config/powerpc/nbsd.mh: Likewise.
10440 * config/powerpc/obsd.mh: Likewise.
10441 * config/powerpc/ppc64-linux.mh: Likewise.
10442 * config/powerpc/spu-linux.mh: Likewise.
10443 * config/s390/linux.mh: Likewise.
10444 * config/sh/nbsd.mh: Likewise.
10445 * config/sparc/fbsd.mh: Likewise.
10446 * config/sparc/linux.mh: Likewise.
10447 * config/sparc/linux64.mh: Likewise.
10448 * config/sparc/nbsd64.mh: Likewise.
10449 * config/sparc/nbsdelf.mh: Likewise.
10450 * config/sparc/obsd64.mh: Likewise.
10451 * config/sparc/sol2.mh: Likewise.
10452 * config/tilegx/linux.mh: Likewise.
10453 * config/vax/nbsdelf.mh: Likewise.
10454 * config/vax/obsd.mh: Likewise.
10455 * config/xtensa/linux.mh: Likewise.
10456 * config/i386/i386gnu.mn: New file, with excerpts from
10457 "config/i386/i386gnu.mh".
10458 * configure: Regenerate.
10459 * configure.ac: Rewrite code to use "gdb/configure.nat" instead of
10460 *.mh files under "gdb/config".
10461 * configure.nat: New file, with contents from the
10462 "gdb/config/*/*.mh" files.
10464 2017-05-05 Tim Wiederhake <tim.wiederhake@intel.com>
10466 * btrace.c (btrace_clear): Free insn vector.
10468 2017-05-05 Pedro Alves <palves@redhat.com>
10470 * warning.m4 (build_warnings): Add -Wno-error=maybe-uninitialized.
10471 * configure: Regenerate.
10473 2017-05-04 Pedro Alves <palves@redhat.com>
10475 * Makefile.in (SFILES): Add progspace-and-thread.c.
10476 (HFILES_NO_SRCDIR): Add progspace-and-thread.h.
10477 (COMMON_OBS): Add progspace-and-thread.o.
10478 * breakpoint.c: Include "progspace-and-thread.h".
10479 (update_inserted_breakpoint_locations)
10480 (insert_breakpoint_locations, create_longjmp_master_breakpoint):
10481 Use scoped_restore_current_pspace_and_thread.
10482 (create_std_terminate_master_breakpoint): Use
10483 scoped_restore_current_program_space.
10484 (remove_breakpoint): Use scoped_restore_current_pspace_and_thread.
10485 (print_breakpoint_location): Use
10486 scoped_restore_current_program_space.
10487 (bp_loc_is_permanent): Use
10488 scoped_restore_current_pspace_and_thread.
10489 (resolve_sal_pc): Use scoped_restore_current_pspace_and_thread.
10490 (download_tracepoint_locations): Use
10491 scoped_restore_current_pspace_and_thread.
10492 (breakpoint_re_set): Use scoped_restore_current_pspace_and_thread.
10493 * exec.c (exec_close_1): Use scoped_restore_current_program_space.
10494 (enum step_over_calls_kind): Moved from inferior.h.
10495 (class scoped_restore_current_thread): New class.
10496 * gdbthread.h (make_cleanup_restore_current_thread): Delete
10498 (scoped_restore_current_thread): New class.
10499 * infcmd.c: Include "common/gdb_optional.h".
10500 (continue_1, proceed_after_attach): Use
10501 scoped_restore_current_thread.
10502 (notice_new_inferior): Use scoped_restore_current_thread.
10503 * inferior.c: Include "progspace-and-thread.h".
10504 (restore_inferior, save_current_inferior): Delete.
10505 (add_inferior_command, clone_inferior_command): Use
10506 scoped_restore_current_pspace_and_thread.
10507 * inferior.h (scoped_restore_current_inferior): New class.
10508 * infrun.c: Include "progspace-and-thread.h" and
10509 "common/gdb_optional.h".
10510 (follow_fork_inferior): Use
10511 scoped_restore_current_pspace_and_thread.
10512 (scoped_restore_exited_inferior): New class.
10513 (handle_vfork_child_exec_or_exit): Use
10514 scoped_restore_exited_inferior,
10515 scoped_restore_current_pspace_and_thread,
10516 scoped_restore_current_thread and scoped_restore.
10517 (fetch_inferior_event): Use scoped_restore_current_thread.
10518 * linespec.c (decode_line_full, decode_line_1): Use
10519 scoped_restore_current_program_space.
10520 * mi/mi-main.c: Include "progspace-and-thread.h".
10521 (exec_continue): Use scoped_restore_current_thread.
10522 (mi_cmd_exec_run): Use scoped_restore_current_pspace_and_thread.
10523 (mi_cmd_trace_frame_collected): Use scoped_restore_current_thread.
10524 * proc-service.c (ps_pglobal_lookup): Use
10525 scoped_restore_current_program_space.
10526 * progspace-and-thread.c: New file.
10527 * progspace-and-thread.h: New file.
10528 * progspace.c (release_program_space, clone_program_space): Use
10529 scoped_restore_current_program_space.
10530 (restore_program_space, save_current_program_space)
10531 (save_current_space_and_thread): Delete.
10532 (switch_to_program_space_and_thread): Moved to
10533 progspace-and-thread.c.
10534 * progspace.h (save_current_program_space)
10535 (save_current_space_and_thread): Delete declarations.
10536 (scoped_restore_current_program_space): New class.
10537 * remote.c (remote_btrace_maybe_reopen): Use
10538 scoped_restore_current_thread.
10539 * symtab.c: Include "progspace-and-thread.h".
10540 (skip_prologue_sal): Use scoped_restore_current_pspace_and_thread.
10541 * thread.c (print_thread_info_1): Use
10542 scoped_restore_current_thread.
10543 (struct current_thread_cleanup): Delete.
10544 (do_restore_current_thread_cleanup)
10545 (restore_current_thread_cleanup_dtor): Rename/convert both to ...
10546 (scoped_restore_current_thread::~scoped_restore_current_thread):
10548 (make_cleanup_restore_current_thread): Rename/convert to ...
10549 (scoped_restore_current_thread::scoped_restore_current_thread):
10551 (thread_apply_all_command): Use scoped_restore_current_thread.
10552 (thread_apply_command): Use scoped_restore_current_thread.
10553 * tracepoint.c (tdump_command): Use scoped_restore_current_thread.
10554 * varobj.c (value_of_root_1): Use scoped_restore_current_thread.
10556 2017-05-04 Pedro Alves <palves@redhat.com>
10558 * thread.c (make_cleanup_restore_current_thread): Move
10559 find_thread_ptid call before the is_stopped call. Assert that the
10560 thread is found. Replace is_stopped call by checking the thread's
10561 state directly. Remove unnecessary NULL-thread check.
10563 2017-05-04 Pedro Alves <palves@redhat.com>
10565 * corelow.c (thread_section_name): New class.
10566 (get_core_register_section, get_core_siginfo): Use it.
10568 2017-05-04 Andreas Arnez <arnez@linux.vnet.ibm.com>
10570 * corelow.c (sniff_core_bfd): Remove extra semicolon.
10571 (get_core_register_section): Remove xfree of NULL pointer.
10573 2017-05-03 Alan Hayward <alan.hayward@arm.com>
10575 * frv-linux-tdep.c (frv_linux_supply_gregset): Use raw_supply_zeroed.
10576 * regcache.c (regcache::raw_supply_zeroed): New function.
10577 * regcache.h (regcache::raw_supply_zeroed): New declaration.
10579 2017-05-03 Simon Marchi <simon.marchi@ericsson.com>
10581 * gdbarch.sh: Remove commented out definition of
10583 * gdbarch.h: Re-generate.
10585 2017-05-03 Sergio Durigan Junior <sergiodj@redhat.com>
10587 * configure: Regenerate.
10589 2017-05-02 Simon Marchi <simon.marchi@ericsson.com>
10591 * solib-target.c (solib_target_relocate_section_addresses):
10592 Remove num_section_bases, num_bases, segment_bases variables.
10594 2017-05-02 Simon Marchi <simon.marchi@polymtl.ca>
10596 * common/gdb_vecs.h (DEF_VEC_I (CORE_ADDR)): Remove.
10598 2017-05-02 Simon Marchi <simon.marchi@polymtl.ca>
10600 * solib-target.c: Include <vector>
10601 (struct lm_info_target) <~lm_info_target>: Remove.
10602 <segment_bases, section_bases>: Change type to
10603 std::vector<CORE_ADDR>.
10604 (library_list_start_segment, library_list_start_section,
10605 library_list_end_library,
10606 solib_target_relocate_section_addresses): Adjust.
10608 2017-05-02 Simon Marchi <simon.marchi@polymtl.ca>
10610 * gdbarch.sh (software_single_step): Change return type to
10611 std::vector<CORE_ADDR>.
10612 * gdbarch.c, gdbarch.h: Re-generate.
10613 * arch/arm-get-next-pcs.c (thumb_deal_with_atomic_sequence_raw):
10615 (arm_deal_with_atomic_sequence_raw): Adjust.
10616 (thumb_get_next_pcs_raw): Adjust.
10617 (arm_get_next_pcs_raw): Adjust.
10618 (arm_get_next_pcs): Adjust.
10619 * arch/arm-get-next-pcs.h (arm_get_next_pcs): Adjust.
10620 * aarch64-tdep.c (aarch64_software_single_step): Adjust.
10621 * alpha-tdep.c (alpha_deal_with_atomic_sequence): Adjust.
10622 (alpha_software_single_step): Adjust.
10623 * alpha-tdep.h (alpha_software_single_step): Adjust.
10624 * arm-linux-tdep.c (arm_linux_software_single_step): Adjust.
10625 * arm-tdep.c (arm_software_single_step): Adjust.
10626 (arm_breakpoint_kind_from_current_state): Adjust.
10627 * arm-tdep.h (arm_software_single_step): Adjust.
10628 * breakpoint.c (insert_single_step_breakpoint): Adjust.
10629 * cris-tdep.c (cris_software_single_step): Adjust.
10630 * mips-tdep.c (mips_deal_with_atomic_sequence): Adjust.
10631 (micromips_deal_with_atomic_sequence): Adjust.
10632 (deal_with_atomic_sequence): Adjust.
10633 (mips_software_single_step): Adjust.
10634 * mips-tdep.h (mips_software_single_step): Adjust.
10635 * moxie-tdep.c (moxie_software_single_step): Adjust.
10636 * nios2-tdep.c (nios2_software_single_step): Adjust.
10637 * ppc-tdep.h (ppc_deal_with_atomic_sequence): Adjust.
10638 * rs6000-aix-tdep.c (rs6000_software_single_step): Adjust.
10639 * rs6000-tdep.c (ppc_deal_with_atomic_sequence): Adjust.
10640 * s390-linux-tdep.c (s390_software_single_step): Adjust.
10641 * sparc-tdep.c (sparc_software_single_step): Adjust.
10642 * spu-tdep.c (spu_software_single_step): Adjust.
10643 * tic6x-tdep.c (tic6x_software_single_step): Adjust.
10645 2017-05-02 Simon Marchi <simon.marchi@polymtl.ca>
10647 * gdbarch.sh: Use semi-colon as field separator instead of colon.
10648 * gdbarch.h: Re-generate.
10650 2017-05-01 Tim Wiederhake <tim.wiederhake@intel.com>
10652 * Makefile.in (SUBDIR_PYTHON_OBS): Add py-instruction.o.
10653 (SUBDIR_PYTHON_SRCS): Add py-instruction.c.
10654 * python/py-instruction.c, python/py-instruction.h: New file.
10655 * python/py-record.c: Add py-instruction.h include.
10656 (gdbpy_initialize_record): Make gdb.Instruction a super class of
10657 gdb.RecordInstruction.
10658 * python/python-internal.h: Add gdbpy_initialize_instruction
10660 * python/python.c (do_start_initialization): Add
10661 gdbpy_initialize_instruction.
10663 2017-05-01 Tim Wiederhake <tim.wiederhake@intel.com>
10665 * python/py-record-btrace.c (BTPY_REQUIRE_VALID_CALL, btpy_call_type):
10667 (btrace_func_from_recpy_func): New function.
10668 (btpy_call_new, btpy_number, btpy_hash, btpy_richcompare): Remove.
10669 (btpy_call_level, btpy_call_symbol, btpy_call_instructions,
10670 btpy_call_up, btpy_call_prev_sibling, btpy_call_next_sibling): Rename to ...
10671 (recpy_bt_func_level, recpy_bt_func_symbol, recpy_bt_func_instructions,
10672 recpy_bt_func_up, recpy_bt_func_prev, recpy_bt_func_next): This.
10673 Also, use new helper functions.
10674 (btpy_list_item): Use new helper functions.
10675 (recpy_bt_function_call_history): Use new type name.
10676 (btpy_call_getset): Remove.
10677 (gdbpy_initialize_btrace): Remove code to initialize
10678 gdb.BtraceFunctionCall.
10679 * python/py-record-btrace.h (recpy_bt_func_number, recpy_btb_func_level,
10680 recpy_btb_func_symbol, recpy_bt_func_instructions, recpy_bt_func_up,
10681 recpy_bt_func_prev, recpy_bt_func_next): New export.
10682 * python/py-record.c (recpy_func_type): New static object.
10683 (recpy_func_new, recpy_func_level, recpy_func_symbol,
10684 recpy_func_instructions, recpy_func_up, recpy_func_prev,
10685 recpy_func_next): New function.
10686 (recpy_element_hash, recpy_element_richcompare): Updated comment.
10687 (recpy_func_getset): New static object.
10688 (gdbpy_initialize_record): Add code to initialize gdb.RecordInstruction.
10689 * python/py-record.h (recpy_func_type, recpy_func_new): New export.
10691 2017-05-01 Tim Wiederhake <tim.wiederhake@intel.com>
10693 * python/py-record-btrace.c (BTPY_REQUIRE_VALID_INSN): Remove.
10694 (btpy_object, btpy_insn_type, btpy_new): Remove.
10695 (btpy_list_object): Use gdb.RecordInstruction type instead of
10696 gdb.BtraceInstruction type.
10697 (btrace_insn_from_recpy_insn): New function.
10698 (btpy_insn_or_gap_new): Adjust comment. Use recpy_insn_new instead of
10700 (btpy_call_new, btpy_list_item): Do not use btpy_new anymore.
10701 (btpy_number, btpy_hash, btpy_call_level, btpy_call_symbol,
10702 btpy_call_instructions, btpy_call_up, btpy_call_prev_sibling,
10703 btpy_call_next_sibling, btpy_richcompare): Use recpy_element_object
10704 instead of btpy_object.
10705 (btpy_insn_sal, btpy_insn_pc, btpy_insn_size, btpy_insn_is_speculative,
10706 btpy_insn_data, btpy_insn_decode): Rename to ...
10707 (recpy_bt_insn_sal, recpy_bt_insn_pc, recpy_bt_insn_size,
10708 recpy_bt_insn_is_speculative, recpy_bt_insn_data,
10709 recpy_bt_insn_decode): This. Also, use new helper functions.
10710 (btpy_list_position, recpy_bt_goto): Use recpy_element_object and
10712 (btpy_insn_getset): Remove.
10713 (gdbpy_initialize_btrace): Remove code to initialize
10714 gdb.BtraceInstruction. Use recpy_element_object.
10715 * python/py-record-btrace.h (recpy_bt_insn_number, recpy_bt_insn_sal,
10716 recpy_bt_insn_pc, recpy_bt_insn_data, recpy_bt_insn_decoded,
10717 recpy_bt_insn_size, recpy_bt_insn_is_speculative): New export.
10718 * python/py-record.c (recpy_insn_type): New static object.
10719 (recpy_insn_new, recpy_insn_sal, recpy_insn_pc, recpy_insn_data,
10720 recpy_insn_decoded, recpy_insn_size, recpy_insn_is_speculative,
10721 recpy_element_number, recpy_element_hash, recpy_element_richcompare):
10723 (recpy_insn_getset): New static object.
10724 (gdbpy_initialize_record): Initialize gdb.RecordInstruction.
10725 * python/py-record.h (recpy_element_object): New typedef.
10726 (recpy_insn_type, recpy_insn_new): New export.
10728 2017-05-01 Tim Wiederhake <tim.wiederhake@intel.com>
10730 * py-record-btrace.c (btpy_insn_new): Removed.
10731 (btpy_insn_or_gap_new): New function.
10732 (btpy_insn_error): Removed.
10733 (btpy_insn_sal, btpy_insn_pc, btpy_insn_size, btpy_insn_is_speculative,
10734 btpy_insn_data, btpy_insn_decode): Remove code path for gaps.
10735 (recpy_bt_replay_position, recpy_bt_begin, recpy_bt_end): Call
10736 btpy_insn_or_gap_new instead of btpy_insn_new.
10737 (btpy_insn_getset): Remove btpy_insn_error.
10738 * py-record.c (recpy_gap_type): New static object.
10739 (recpy_gap_object): New typedef.
10740 (recpy_gap_new, recpy_gap_number, recpy_gap_reason_code,
10741 recpy_gap_reason_string): New function.
10742 (recpy_gap_getset): New static object.
10743 (gdbpy_initialize_record): Initialize gdb.RecordGap type.
10744 * py-record.h (recpy_gap_new): New export.
10746 2017-05-01 Tim Wiederhake <tim.wiederhake@intel.com>
10748 * python/py-record.c (recpy_ptid): Remove.
10749 (recpy_record_getset): Remove recpy_ptid.
10751 2017-05-01 Tim Wiederhake <tim.wiederhake@intel.com>
10753 * btrace.c (btrace_fetch): Set inferior_ptid.
10754 * python/py-record-btrace.c: Add "py-record.h" include.
10755 (recpy_bt_format, recpy_bt_replay_position, recpy_bt_begin,
10756 recpy_bt_end, recpy_bt_instruction_history,
10757 recpy_bt_function_call_history, recpy_bt_goto): Use ptid stored
10758 in gdb.Record object instead of current ptid.
10759 * python/py-record.c: Include new "py-record.h" file.
10760 (recpy_record_object): Moved to py-record.h.
10761 * python/py-record.h: New file.
10763 2017-05-01 Tim Wiederhake <tim.wiederhake@intel.com>
10765 * python/py-record-btrace.c (BTPY_REQUIRE_VALID_INSN,
10766 BTPY_REQUIRE_VALID_CALL, recpy_bt_function_call_history): Fix
10769 2017-05-01 Joel Brobecker <brobecker@adacore.com>
10771 * MAINTAINERS: Move Daniel Jacobowitz and Mark Kettenis to
10772 the past maintainers section.
10774 2017-04-28 Yao Qi <yao.qi@linaro.org>
10776 * infcmd.c (get_return_value): Use regcache ctor, and remove
10779 2017-04-28 Yao Qi <yao.qi@linaro.org>
10780 Pedro Alves <palves@redhat.com>
10782 * regcache.c (regcache::regcache): New tag dispatch ctor.
10783 (do_cooked_read): Moved above.
10784 (regcache_dup): Use the tag dispatch ctor..
10785 * regcache.h (regcache): Declare ctor, delete copy ctor and
10786 assignment operator, remove friend regcache_dup.
10788 2017-04-28 Yao Qi <yao.qi@linaro.org>
10790 * regcache.c (regcache_dup): Assert !src->m_readonly_p and
10791 call method save instead of regcache_cpy.
10792 * regcache.h (struct regcache): Make regcache_dup a friend.
10794 2017-04-28 Yao Qi <yao.qi@linaro.org>
10796 * regcache.c (struct regcache): Move to regcache.h
10797 (regcache::arch): New method.
10798 (regcache_get_ptid): Update.
10799 (get_regcache_arch): Call arch method.
10800 (get_regcache_aspace): Call method aspace.
10801 (register_buffer): Change it to method.
10802 (regcache_save): Change it to regcache::save.
10803 (regcache_restore): Likewise.
10804 (regcache_cpy_no_passthrough): Remove the declaration.
10805 (regcache_cpy): Call methods restore and cpy_no_passthrough.
10806 (regcache_cpy_no_passthrough): Change it to method
10807 cpy_no_passthrough.
10808 (regcache_register_status): Change it to method
10809 get_register_status.
10810 (regcache_invalidate): Change it to method invalidate.
10811 (regcache_thread_ptid_changed): Use methods ptid and set_ptid.
10812 (regcache_raw_update): Change it to method raw_update.
10813 (regcache_raw_read): Likewise.
10814 (regcache_raw_read_signed): Likewise.
10815 (regcache_raw_read_unsigned): Likewise.
10816 (regcache_raw_write_signed): Likewise.
10817 (regcache_raw_write_unsigned): Likewise.
10818 (regcache_cooked_read): Likewise.
10819 (regcache_cooked_read_value): Likewise.
10820 (regcache_cooked_read_signed): Likewise.
10821 (regcache_cooked_read_unsigned): Likewise.
10822 (regcache_cooked_write_signed): Likewise.
10823 (regcache_cooked_write_unsigned): Likewise.
10824 (regcache_raw_set_cached_value): Likewise.
10825 (regcache_raw_write): Likewise.
10826 (regcache_cooked_write): Likewise.
10827 (regcache_xfer_part): Likewise.
10828 (regcache_raw_read_part): Likewise.
10829 (regcache_raw_write_part): Likewise.
10830 (regcache_cooked_read_part): Likewise.
10831 (regcache_cooked_write_part): Likewise.
10832 (regcache_raw_supply): Likewise.
10833 (regcache_raw_collect): Likewise.
10834 (regcache_transfer_regset): Likewise.
10835 (regcache_supply_regset): Likewise.
10836 (regcache_collect_regset): Likewise.
10837 (regcache_debug_print_register): Likewise.
10838 (enum regcache_dump_what): Move it to regcache.h.
10839 (regcache_dump): Change it to method dump.
10840 * regcache.h (enum regcache_dump_what): New.
10841 (class regcache): New.
10842 * target.c (target_fetch_registers): Call method
10843 debug_print_register.
10844 (target_store_registers): Likewise.
10846 2017-04-28 Simon Marchi <simon.marchi@ericsson.com>
10848 * windows-nat.c (struct lm_info_windows): Initialize field.
10849 (windows_make_so): Allocate lm_info_windows with new.
10850 (windows_free_so): Free lm_info_windows with delete.
10852 2017-04-28 Simon Marchi <simon.marchi@ericsson.com>
10854 * solib-darwin.c (struct lm_info_darwin): Initialize field.
10855 (darwin_current_sos): Allocate lm_info_darwin with new, remove
10857 (darwin_free_so): Free lm_info_darwin with delete.
10859 2017-04-28 Simon Marchi <simon.marchi@ericsson.com>
10861 * solib-svr4.h (struct lm_info_svr4): Initialize fields.
10862 <l_addr_p>: Change type to bool.
10863 * solib-svr4.c (lm_info_read): Allocate lm_info_svr4 with new.
10864 (svr4_free_so): Free lm_info_svr4 with delete.
10865 (svr4_copy_library_list): Replace memcpy with call to copy
10867 (library_list_start_library, svr4_default_sos): Allocate
10868 lm_info_svr4 with new.
10870 2017-04-28 Simon Marchi <simon.marchi@ericsson.com>
10872 * solib-target.c (struct lm_info_target): Add destructor,
10874 <name>: Change type to std::string.
10875 (library_list_start_library): Allocate lm_info_target with new.
10876 (solib_target_free_library_list): Free lm_info_target with
10878 (solib_target_current_sos): Adapt to std::string.
10879 (solib_target_free_so): Free lm_info_target with delete.
10881 2017-04-28 Simon Marchi <simon.marchi@ericsson.com>
10883 * solib-frv.c (struct lm_info_frv): Add destructor, initialize
10885 (frv_current_sos): Allocate lm_info_frv with new.
10886 (frv_relocate_main_executable): Free lm_info_frv with delete,
10888 (frv_clear_solib, frv_free_so): Free lm_info_frv with delete.
10890 2017-04-28 Simon Marchi <simon.marchi@ericsson.com>
10892 * solib-frv.c (struct lm_info_frv): Fix indentation.
10894 2017-04-28 Simon Marchi <simon.marchi@ericsson.com>
10896 * solib-dsbt.c (struct lm_info_dsbt): Add destructor, initialize
10898 (dsbt_current_sos): Allocate lm_info_dsbt with new.
10899 (dsbt_relocate_main_executable): Free lm_info_dsbt with delete
10900 and allocate with new.
10901 (dsbt_clear_solib, dsbt_free_so): Free lm_info_dsbt with delete.
10903 2017-04-28 Simon Marchi <simon.marchi@ericsson.com>
10905 * solib-aix.c (struct lm_info_aix): Initialize fields in-class.
10906 <filename, member_name>: Change type to std::string.
10907 (solib_aix_new_lm_info, solib_aix_xfree_lm_info): Remove.
10908 (library_list_start_library): Allocate lm_info_aix with new.
10909 (solib_aix_free_library_list, solib_aix_free_so): Free with delete.
10910 (solib_aix_current_sos): Adapt to std::string, copy lm_info_aix
10911 with copy constructor.
10913 2017-04-28 Simon Marchi <simon.marchi@ericsson.com>
10915 * solist.h (struct lm_info): Remove.
10916 (struct lm_info_base): New class.
10917 (struct so_list) <lm_info>: Change type to lm_info_base *.
10918 * nto-tdep.c (struct lm_info): Remove.
10920 * solib-aix.c (struct lm_info): Rename to ...
10921 (struct lm_info_aix): ... this. Extend lm_info_base.
10922 (lm_info_p): Rename to ...
10923 (lm_info_aix_p): ... this, and adjust.
10924 (solib_aix_new_lm_info, solib_aix_xfree_lm_info,
10925 solib_aix_parse_libraries, library_list_start_library,
10926 solib_aix_free_library_list, solib_aix_parse_libraries,
10927 solib_aix_get_library_list,
10928 solib_aix_relocate_section_addresses, solib_aix_free_so,
10929 solib_aix_get_section_offsets,
10930 solib_aix_solib_create_inferior_hook, solib_aix_current_sos):
10932 (struct solib_aix_inferior_data) <library_list>: Adjust.
10933 * solib-darwin.c (struct lm_info): Rename to ...
10934 (struct lm_info_darwin): ... this. Extend lm_info_base.
10935 (darwin_current_sos, darwin_relocate_section_addresses): Adjust.
10936 * solib-dsbt.c (struct lm_info): Rename to ...
10937 (struct lm_info_dsbt): ... this. Extend lm_info_base.
10938 (struct dsbt_info) <main_executable_lm_info): Adjust.
10939 (dsbt_current_sos, dsbt_relocate_main_executable, dsbt_free_so,
10940 dsbt_relocate_section_addresses): Adjust.
10941 * solib-frv.c (struct lm_info): Rename to ...
10942 (struct lm_info_frv): ... this. Extend lm_info_base.
10943 (main_executable_lm_info): Adjust.
10944 (frv_current_sos, frv_relocate_main_executable, frv_free_so,
10945 frv_relocate_section_addresses, frv_fdpic_find_global_pointer,
10946 find_canonical_descriptor_in_load_object,
10947 frv_fdpic_find_canonical_descriptor): Adjust.
10948 * solib-svr4.c (struct lm_info): Move to solib-svr4.h, renamed
10950 (lm_info_read, lm_addr_check, svr4_keep_data_in_core,
10951 svr4_clear_so, svr4_copy_library_list,
10952 library_list_start_library, svr4_default_sos, svr4_read_so_list,
10953 svr4_current_sos, svr4_fetch_objfile_link_map,
10954 solist_update_incremental): Adjust.
10955 * solib-svr4.h (struct lm_info_svr4): Move here from
10957 * solib-target.c (struct lm_info): Rename to ...
10958 (struct lm_info_target): ... this. Extend lm_info_base.
10959 (lm_info_p): Rename to ...
10960 (lm_info_target_p): ... this.
10961 (solib_target_parse_libraries, library_list_start_segment,
10962 library_list_start_section, library_list_start_library,
10963 library_list_end_library, solib_target_free_library_list,
10964 solib_target_current_sos, solib_target_free_so,
10965 solib_target_relocate_section_addresses): Adjust.
10966 * windows-nat.c (struct lm_info): Rename to ...
10967 (struct lm_info_windows): ... this. Extend lm_info_base.
10968 (windows_make_so, handle_load_dll, handle_unload_dll,
10969 windows_xfer_shared_libraries): Adjust.
10971 2017-04-28 Simon Marchi <simon.marchi@ericsson.com>
10973 * solib-darwin.c (struct darwin_so_list): Remove.
10974 (darwin_current_sos): Allocate an so_list object instead of a
10975 darwin_so_list, separately allocate an lm_info object.
10976 (darwin_free_so): Free lm_info.
10978 2017-04-28 John Baldwin <jhb@FreeBSD.org>
10980 * mips-tdep.c (print_gp_register_row): Replace printf_filtered
10981 with fprintf_filtered.
10983 2017-04-28 Yao Qi <yao.qi@linaro.org>
10985 * regcache.c (regcache::regcache): New function.
10986 (regcache::~regcache): New function.
10987 (regcache_xmalloc_1): Remove.
10988 (regcache_xmalloc): Call new regcache.
10989 (regcache_xfree): Call delete regcache.
10990 (get_thread_arch_aspace_regcache): Call new regcache.
10992 2017-04-28 Yao Qi <yao.qi@linaro.org>
10994 * mips-linux-nat.c (mips_linux_new_thread): Use ptid method
10995 lwp instead of ptid_get_lwp.
10997 2017-04-28 Yao Qi <yao.qi@linaro.org>
10999 * mips-linux-nat.c (mips_linux_new_thread): Get lwpid from
11000 lwp_info instead of getting from inferior_ptid.
11002 2017-04-27 Keith Seitz <keiths@redhat.com>
11004 * gdbtypes.c (LVALUE_REFERENCE_TO_RVALUE_BINDING_BADNESS)
11005 DIFFERENT_REFERENCE_TYPE_BADNESS): Remove.
11006 (CV_CONVERSION_BADNESS): Define.
11007 (rank_one_type): Remove overly restrictive rvalue reference
11009 Add cv-qualifier checks and subranks for type equality.
11010 * gdbtypes.h (REFERENCE_CONVERSION_RVALUE,
11011 REFERENCE_CONVERSION_CONST_LVALUE, CV_CONVERSION_BADNESS,
11012 CV_CONVERSION_CONST, CV_CONVERSION_VOLATILE): Declare.
11014 2017-04-27 Simon Marchi <simon.marchi@ericsson.com>
11016 * python/py-inferior.c (inferior_to_inferior_object): Increment reference
11017 count when creating the object.
11019 2017-04-27 Sangamesh Mallayya <sangamesh.swamy@in.ibm.com>
11020 Ulrich Weigand <uweigand@de.ibm.com>
11022 * xcoffread.c (read_xcoff_symtab): Read correct function auxiliary
11023 entry if xlc -qfuncsect or gcc -ffunction-sections compiler option
11025 (read_xcoff_symtab): Handle C_WEAKEXT storage class.
11026 (process_xcoff_symbol): Likewise.
11027 (scan_xcoff_symtab): Likewise.
11029 2017-04-26 Alan Hayward <alan.hayward@arm.com>
11031 * ia64-tdep.c (examine_prologue): Use get_frame_register_unsigned.
11032 (ia64_sigtramp_frame_prev_register): Use read_memory_unsigned_integer.
11033 (ia64_access_reg): Use get_frame_register_unsigned.
11034 (ia64_access_rse_reg): Likewise.
11035 (ia64_libunwind_frame_prev_register): Likewise.
11037 2017-04-26 Jiong Wang <jiong.wang@arm.com>
11039 * gdbarch.sh: New gdbarch method execute_dwarf_cfa_vendor_op.
11040 * gdbarch.c: Regenerated.
11041 * gdbarch.h: Regenerated.
11042 * dwarf2-frame.c (dwarf2_frame_state_alloc_regs): Made the
11043 visibility external.
11044 (execute_cfa_program): Call execute_dwarf_cfa_vendor_op for CFI
11045 between DW_CFA_lo_user and DW_CFA_high_user inclusive.
11046 (enum cfa_how_kind): Move to ...
11047 (struct dwarf2_frame_state_reg_info): Likewise.
11048 (struct dwarf2_frame_state): Likewise.
11049 * dwarf2-frame.h: ... here.
11050 (dwarf2_frame_state_alloc_regs): New declaration.
11051 * sparc-tdep.c (sparc_execute_dwarf_cfa_vendor_op): New function.
11052 (sparc32_gdbarch_init): Register execute_dwarf_cfa_vendor_op hook.
11054 2017-04-26 Alan Hayward <alan.hayward@arm.com>
11056 * xtensa-tdep.c (xtensa_pseudo_register_read): Use
11057 regcache_raw_read_unsigned.
11058 (xtensa_pseudo_register_write): Likewise.
11060 2017-04-26 Alan Hayward <alan.hayward@arm.com>
11062 * nds32-tdep.c (nds32_pseudo_register_read): Abort on errors.
11063 (nds32_pseudo_register_write): Likewise.
11065 2017-04-25 Yao Qi <yao.qi@linaro.org>
11067 * regcache.c (struct regcache) <readonly_p>: Change its type
11069 (regcache_xmalloc_1): Update parameter type and callers update.
11071 2017-04-25 Yao Qi <yao.qi@linaro.org>
11073 * aarch64-tdep.c (aarch64_gdbarch_init): Don't call
11074 set_gdbarch_wchar_bit.
11075 * arm-tdep.c (arm_gdbarch_init): Likewise.
11077 2017-04-25 Pedro Alves <palves@redhat.com>
11079 * common/poison.h [!HAVE_IS_TRIVIALLY_COPYABLE] (IsRelocatable)
11080 (BothAreRelocatable, memcopy, memmove): Don't define.
11081 * common/traits.h (__has_feature, HAVE_IS_TRIVIALLY_COPYABLE): New
11084 2017-04-25 Pedro Alves <palves@redhat.com>
11086 * common/common-defs.h: Include "common/poison.h".
11087 * common/function-view.h: (Not, Or, Requires): Move to traits.h
11089 * common/poison.h: New file.
11090 * common/traits.h: Include <type_traits>.
11091 (Not, Or, Requires): New, moved from common/function-view.h.
11093 2017-04-25 Pedro Alves <palves@redhat.com>
11095 * breakpoint.h (struct breakpoint): In-class initialize all
11096 fields. Make boolean fields "bool".
11097 * breakpoint.c (init_raw_breakpoint_without_location): Remove
11098 memset call and initializations no longer necessary.
11100 2017-04-25 Pedro Alves <palves@redhat.com>
11102 * btrace.c (pt_btrace_insn_flags): Change parameter type to
11104 (pt_btrace_insn): New function.
11105 (ftrace_add_pt): Remove memset call and use pt_btrace_insn.
11107 2017-04-25 Pedro Alves <palves@redhat.com>
11109 * ada-lang.c (ada_catchpoint_location): Now a "class". Remove
11110 "base" field and inherit from "bp_location" instead. Add
11112 (allocate_location_exception): Use new non-default ctor.
11113 * breakpoint.c (get_first_locp_gte_addr): Remove memset call.
11114 (init_bp_location): Convert to ...
11115 (bp_location::bp_location): ... this new ctor, and remove memset
11117 (base_breakpoint_allocate_location): Use the new non-default ctor.
11118 * breakpoint.h (bp_location): Now a class. Declare default and
11119 non-default ctors. In-class initialize all members.
11120 (init_bp_location): Remove declaration.
11122 2017-04-25 Pedro Alves <palves@redhat.com>
11124 * common/enum-flags.h (enum_flags): Don't implement copy ctor and
11125 assignment operator.
11127 2017-04-24 Yao Qi <yao.qi@linaro.org>
11129 * doublest.c (convert_doublest_to_floatformat): Call
11130 floatformat_totalsize_bytes.
11132 2017-04-22 Tom Tromey <tom@tromey.com>
11134 * mi/mi-cmd-file.c (mi_cmd_file_list_shared_libraries): Use
11136 * stack.c (print_frame): Use ui_out_emit_list.
11137 * mi/mi-symbol-cmds.c (mi_cmd_symbol_list_lines): Use
11139 * mi/mi-main.c (print_one_inferior)
11140 (mi_cmd_data_list_register_names)
11141 (mi_cmd_data_list_register_values, mi_cmd_list_features)
11142 (mi_cmd_list_target_features, mi_cmd_trace_frame_collected): Use
11144 * mi/mi-interp.c (mi_on_normal_stop_1): Use ui_out_emit_list.
11145 (mi_output_solib_attribs): Use ui_out_emit_list,
11147 * mi/mi-cmd-var.c (varobj_update_one): Use ui_out_emit_list.
11148 * mi/mi-cmd-stack.c (mi_cmd_stack_list_frames)
11149 (mi_cmd_stack_list_args, list_args_or_locals): Use
11151 * disasm.c (do_assembly_only): Use ui_out_emit_list.
11152 * breakpoint.c (print_solib_event, output_thread_groups): Use
11155 2017-04-22 Tom Tromey <tom@tromey.com>
11157 * mi/mi-main.c (print_variable_or_computed): Use ui_out_emit_tuple.
11158 * mi/mi-cmd-var.c (varobj_update_one): Use ui_out_emit_tuple.
11159 * mi/mi-cmd-stack.c (list_arg_or_local): Use ui_out_emit_tuple.
11161 2017-04-22 Tom Tromey <tom@tromey.com>
11163 * tracepoint.c (tvariables_info_1)
11164 (print_one_static_tracepoint_marker): Use ui_out_emit_tuple.
11166 2017-04-22 Tom Tromey <tom@tromey.com>
11168 * stack.c (print_frame_arg): Use ui_out_emit_tuple,
11169 annotate_arg_emitter.
11170 * breakpoint.c (print_mention_watchpoint)
11171 (print_mention_masked_watchpoint): Use ui_out_emit_tuple.
11172 * annotate.h (struct annotate_arg_emitter): New.
11174 2017-04-22 Tom Tromey <tom@tromey.com>
11176 * record-btrace.c (record_btrace_insn_history)
11177 (record_btrace_insn_history_range, record_btrace_call_history)
11178 (record_btrace_call_history_range): Use ui_out_emit_tuple.
11179 * thread.c (do_captured_list_thread_ids, print_thread_info_1): Use
11181 * stack.c (print_frame_info): Use ui_out_emit_tuple.
11182 * solib.c (info_sharedlibrary_command): Use ui_out_emit_tuple.
11183 * skip.c (skip_info): Use ui_out_emit_tuple.
11184 * remote.c (show_remote_cmd): Use ui_out_emit_tuple.
11185 * progspace.c (print_program_space): Use ui_out_emit_tuple.
11186 * probe.c (info_probes_for_ops): Use ui_out_emit_tuple.
11187 * osdata.c (info_osdata): Use ui_out_emit_tuple.
11188 * mi/mi-symbol-cmds.c (mi_cmd_symbol_list_lines): Use
11190 * mi/mi-main.c (print_one_inferior, list_available_thread_groups)
11191 (output_register, mi_cmd_data_read_memory)
11192 (mi_cmd_data_read_memory_bytes, mi_load_progress)
11193 (mi_cmd_trace_frame_collected): Use ui_out_emit_tuple.
11194 * mi/mi-cmd-var.c (mi_cmd_var_list_children, varobj_update_one):
11195 Use ui_out_emit_tuple.
11196 * mi/mi-cmd-stack.c (mi_cmd_stack_list_args): Use
11198 * mi/mi-cmd-info.c (mi_cmd_info_ada_exceptions)
11199 (mi_cmd_info_gdb_mi_command): Use ui_out_emit_tuple.
11200 * linux-thread-db.c (info_auto_load_libthread_db): Use
11202 * inferior.c (print_inferior): Use ui_out_emit_tuple.
11203 * gdb_bfd.c (print_one_bfd): Use ui_out_emit_tuple.
11204 * disasm.c (do_mixed_source_and_assembly_deprecated)
11205 (do_mixed_source_and_assembly): Use ui_out_emit_tuple.
11206 * cp-abi.c (list_cp_abis): Use ui_out_emit_tuple.
11207 * cli/cli-setshow.c (cmd_show_list): Use ui_out_emit_tuple.
11208 * breakpoint.c (print_one_breakpoint_location)
11209 (print_one_breakpoint): Use ui_out_emit_tuple.
11210 * auto-load.c (print_script, info_auto_load_cmd): Use
11212 * ada-tasks.c (print_ada_task_info): Use ui_out_emit_tuple.
11214 2017-04-21 Simon Marchi <simon.marchi@ericsson.com>
11216 * thread.c (print_thread_info_1): Remove dead code.
11218 2017-04-21 Jan Kratochvil <jan.kratochvil@redhat.com>
11220 * aarch64-tdep.c (selftests::aarch64_process_record_test): Make it #if
11222 * arm-tdep.c (selftests::arm_record_test): Likewise.
11224 2017-04-21 Yao Qi <yao.qi@linaro.org>
11226 * regcache.c (regcache_restore): Remove argument 2. Replace
11227 argument 3 with regcache. Get register status from
11228 src->register_status and get register contents from
11229 register_buffer (src, regnum).
11230 (regcache_cpy): Update.
11232 2017-04-19 Pedro Alves <palves@redhat.com>
11234 * gdbthread.h (thread): Add missing closing parenthesis in
11237 2017-04-19 Pedro Alves <palves@redhat.com>
11239 * common/refcounted-object.h: New file.
11240 * gdbthread.h: Include "common/refcounted-object.h".
11241 (thread_info): Inherit from refcounted_object and add comments.
11242 (thread_info::incref, thread_info::decref)
11243 (thread_info::m_refcount): Delete.
11244 (thread_info::deletable): Use the refcounted_object::refcount()
11246 * inferior.c (current_inferior_): Add comment.
11247 (set_current_inferior): Increment/decrement refcounts.
11248 (prune_inferiors, remove_inferior_command): Skip inferiors marked
11249 not-deletable instead of comparing with the current inferior.
11250 (initialize_inferiors): Increment the initial inferior's refcount.
11251 * inferior.h (struct inferior): Forward declare.
11252 Include "common/refcounted-object.h".
11253 (current_inferior, set_current_inferior): Move declaration to
11254 before struct inferior's definition, and fix comment.
11255 (inferior): Inherit from refcounted_object. Add comments.
11256 * thread.c (switch_to_thread_no_regs): Reference the thread's
11257 inferior pointer directly instead of doing a ptid lookup.
11258 (switch_to_no_thread): New function.
11259 (switch_to_thread(thread_info *)): New function, factored out
11261 (switch_to_thread(ptid_t)): ... this.
11262 (restore_current_thread): Delete.
11263 (current_thread_cleanup): Remove 'inf_id' and 'was_removable'
11264 fields, and add 'inf' field.
11265 (do_restore_current_thread_cleanup): Check whether old->inf is
11266 alive instead of looking up an inferior by ptid. Use
11267 switch_to_thread and switch_to_no_thread.
11268 (restore_current_thread_cleanup_dtor): Use old->inf directly
11269 instead of lookup up an inferior by id. Decref the inferior.
11270 Don't restore 'removable'.
11271 (make_cleanup_restore_current_thread): Same the inferior pointer
11272 in old, instead of the inferior number. Incref the inferior.
11273 Don't save/clear 'removable'.
11275 2017-04-19 Pedro Alves <palves@redhat.com>
11277 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
11278 unittests/scoped_restore-selftests.c.
11279 (SUBDIR_UNITTESTS_OBS): Add scoped_restore-selftests.o.
11280 * common/scoped_restore.h (scoped_restore_base): Make "class".
11281 (scoped_restore_base::release): New public method.
11282 (scoped_restore_base::scoped_restore_base): New protected ctor.
11283 (scoped_restore_base::m_saved_var): New protected field.
11284 (scoped_restore_tmpl::scoped_restore_tmpl(T*)): Initialize the
11285 scoped_restore_base base class instead of m_saved_var directly.
11286 (scoped_restore_tmpl::scoped_restore_tmpl(T*, T2)): Likewise.
11287 (scoped_restore_tmpl::scoped_restore_tmpl(const
11288 scoped_restore_tmpl<T>&)): Likewise.
11289 (scoped_restore_tmpl::~scoped_restore_tmpl): Use the saved_var
11291 (scoped_restore_tmpl::saved_var): New method.
11292 (scoped_restore_tmpl::m_saved_var): Delete.
11293 * inferior.h (inferior::detaching): Now a bool.
11294 * infrun.c (prepare_for_detach): Use a scoped_restore instead of a
11296 * unittests/scoped_restore-selftests.c: New file.
11298 2017-04-19 Pedro Alves <palves@redhat.com>
11300 * Makefile.in (SUBDIR_UNITTESTS_SRCS, SUBDIR_UNITTESTS_OBS):
11301 Re-sort in alphabetic order.
11303 2017-04-18 Pedro Alves <palves@redhat.com>
11305 * xml-support.c (obstack_xml_printf): Delete.
11306 * xml-support.h (obstack_xml_printf): Delete.
11308 2017-04-18 Pedro Alves <palves@redhat.com>
11310 * xml-support.c (gdb_xml_parser) <use_dtd, dtd_name, parse,
11311 vdebug, verror, body_text, start_element, end_element, name,
11312 user_data, set_is_xinclude, set_error, expat_parser>: New methods.
11313 <name, user_data, expat_parser, scopes, error, last_line, dtd_name,
11314 is_xinclude>: Make private and add m_ prefix.
11315 (gdb_xml_parser::body_text): New method, based on ...
11316 (gdb_xml_body_text): ... this. Adjust.
11317 (gdb_xml_parser::vdebug): New method, based on ...
11318 (gdb_xml_debug): ... this. Adjust.
11319 (gdb_xml_parser::verror): New method, based on ...
11320 (gdb_xml_error): ... this. Adjust.
11321 (gdb_xml_parser::start_element): New method, based on ...
11322 (gdb_xml_start_element): ... this. Adjust.
11323 (gdb_xml_start_element_wrapper): Defer to
11324 gdb_xml_parser::start_element and gdb_xml_parser::set_error.
11325 (gdb_xml_parser::end_element): New method, based on ...
11326 (gdb_xml_end_element_wrapper): ... this. Adjust.
11327 (gdb_xml_parser::~gdb_xml_parser): Adjust.
11328 (gdb_xml_parser::gdb_xml_parser): Adjust to field renames.
11329 (gdb_xml_parser::use_dtd): New method, based on ...
11330 (gdb_xml_use_dtd): ... this. Adjust.
11331 (gdb_xml_parser::parse): New method, based on ...
11332 (gdb_xml_parse): ... this. Adjust.
11333 (gdb_xml_parse_quick): Adjust to call the parser's parse method.
11334 (xinclude_start_include): Adjust to call the parser's name method.
11335 (xml_xinclude_default, xml_xinclude_start_doctype)
11336 (xml_xinclude_end_doctype): Adjust to call the parser's user_data
11338 (xml_process_xincludes): Adjust to call parser methods.
11339 * xml-support.h (gdb_xml_use_dtd, gdb_xml_parse): Delete
11342 2017-04-18 Pedro Alves <palves@redhat.com>
11344 * tracefile-tfile.c (tfile_write_tdesc): Adjust to use
11345 gdb::optional<std::string>.
11346 * xml-support.c: Include <string>.
11347 (scope_level::scope_level(scope_level &&))
11348 (scope_level::~scope_level): Delete.
11349 (scope_level::body): Now a std::string.
11350 (gdb_xml_body_text, gdb_xml_end_element): Adjust.
11351 (xinclude_parsing_data::xinclude_parsing_data): Add 'output'
11353 (xinclude_parsing_data::~xinclude_parsing_data): Delete.
11354 (xinclude_parsing_data::output): Now a std::string reference.
11355 (xinclude_start_include): Adjust.
11356 (xml_xinclude_default): Adjust.
11357 (xml_process_xincludes): Add 'output' parameter, and return bool.
11358 * xml-support.h (xml_process_xincludes): Add 'output' parameter,
11360 * xml-tdesc.c: Include <unordered_map> and <string>.
11361 (tdesc_xml_cache): Delete.
11362 (tdesc_xml_cache_s): Delete.
11363 (xml_cache): Now an std::unordered_map.
11364 (tdesc_parse_xml): Adjust to use std::string and unordered_map.
11365 (target_fetch_description_xml): Change return type to
11366 gdb::optional<std::string>, and adjust.
11367 * xml-tdesc.h: Include "common/gdb_optional.h" and <string>.
11368 (target_fetch_description_xml): Change return type to
11369 gdb::optional<std::string>.
11371 2017-04-18 Pedro Alves <palves@redhat.com>
11373 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
11374 unittests/optional-selftests.c.
11375 (SUBDIR_UNITTESTS_OBS): Add optional-selftests.o.
11376 * unittests/optional-selftests.c: New file.
11377 * unittests/optional/assignment/1.cc: New file.
11378 * unittests/optional/assignment/2.cc: New file.
11379 * unittests/optional/assignment/3.cc: New file.
11380 * unittests/optional/assignment/4.cc: New file.
11381 * unittests/optional/assignment/5.cc: New file.
11382 * unittests/optional/assignment/6.cc: New file.
11383 * unittests/optional/assignment/7.cc: New file.
11384 * unittests/optional/cons/copy.cc: New file.
11385 * unittests/optional/cons/default.cc: New file.
11386 * unittests/optional/cons/move.cc: New file.
11387 * unittests/optional/cons/value.cc: New file.
11388 * unittests/optional/in_place.cc: New file.
11389 * unittests/optional/observers/1.cc: New file.
11390 * unittests/optional/observers/2.cc: New file.
11392 2017-04-18 Pedro Alves <palves@redhat.com>
11394 * common/gdb_optional.h: Include common/traits.h.
11395 (in_place_t): New type.
11396 (in_place): New constexpr variable.
11397 (optional::optional): Remove member initialization of
11399 (optional::optional(in_place_t...)): New constructor.
11400 (optional::~optional): Use reset.
11401 (optional::optional(const optional&)): New.
11402 (optional::optional(const optional&&)): New.
11403 (optional::optional(T &)): New.
11404 (optional::optional(T &&)): New.
11405 (operator::operator=(const optional &)): New.
11406 (operator::operator=(optional &&)): New.
11407 (operator::operator= (const T &))
11408 (operator::operator= (T &&))
11409 (operator::emplace (Args &&... args)): Return a T&. Use reset.
11410 (operator::reset): New.
11411 (operator::m_instantiated):: Add in-class initializer.
11412 * common/traits.h: Include <type_traits>.
11413 (struct And): New types.
11415 2017-04-18 Pedro Alves <palves@redhat.com>
11417 * xml-support.c: Include <vector>.
11418 (scope_level::scope_level(const gdb_xml_element *))
11419 (scope_level::scope_level(scope_level&&)): New.
11420 (scope_level::~scope_level): New.
11421 (scope_level_s): Delete.
11422 (gdb_xml_parser::scopes): Now a std::vector.
11423 (gdb_xml_body_text, gdb_xml_start_element, gdb_xml_end_element):
11425 (gdb_xml_parser::~gdb_xml_parser): Remove now unnecessary
11426 scope cleanup code.
11427 (gdb_xml_parser::gdb_xml_parser): Remove explicit initialization
11428 of the scopes member. Use std::vector::emplace_back.
11430 2017-04-18 Pedro Alves <palves@redhat.com>
11432 * xml-support.c (gdb_xml_parser): Add ctor/dtor. Make is_xinclude
11434 (gdb_xml_end_element): Change type of first parameter.
11435 (gdb_xml_cleanup): Rename to ...
11436 (gdb_xml_parser::~gdb_xml_parser): ... this.
11437 (gdb_xml_create_parser_and_cleanup): Delete with ...
11438 (gdb_xml_parser::gdb_xml_parser): ... creation parts factored out
11440 (gdb_xml_parse_quick): Create a local gdb_xml_parser instead of
11441 using gdb_xml_create_parser_and_cleanup.
11442 (xinclude_parsing_data): Add ctor/dtor.
11443 (xml_xinclude_cleanup): Delete.
11444 (xml_process_xincludes): Create a local xinclude_parsing_data
11445 instead of heap-allocating one. Create a local gdb_xml_parser
11446 instead of heap-allocating one with
11447 gdb_xml_create_parser_and_cleanup.
11449 2017-04-18 John Baldwin <jhb@FreeBSD.org>
11452 * fbsd-nat.c (resume_one_thread_cb): Remove.
11453 (resume_all_threads_cb): Remove.
11454 (fbsd_resume): Use ALL_NON_EXITED_THREADS instead of
11455 iterate_over_threads.
11457 2017-04-17 Joel Brobecker <brobecker@adacore.com>
11459 * NEWS: Create a new section for the next release branch.
11460 Rename the section of the current branch, now that it has
11463 2017-04-17 Joel Brobecker <brobecker@adacore.com>
11465 GDB 8.0 branch created (725bf5cf125783c2a7ca4ab63d3768e220bab2db):
11466 * version.in: Bump version to 8.0.50.DATE-git.
11468 2017-04-13 Sergio Durigan Junior <sergiodj@redhat.com>
11471 * windows-nat.c (windows_create_inferior): Declare 'allargs'
11472 independently of the host, and fix build breakage on Cygwin.
11474 2017-04-13 Pedro Alves <palves@redhat.com>
11476 * inferior.c (free_inferior): Convert to ...
11477 (inferior::~inferior): ... this dtor.
11478 (inferior::inferior): New ctor, factored out from ...
11479 (add_inferior_silent): ... here. Allocate the inferior with a new
11481 (delete_inferior): Call delete instead of free_inferior.
11482 * inferior.h (gdb_environ, continuation): Forward declare.
11483 (inferior): Now a class. Add in-class initialization to all
11484 members. Make boolean fields bool, except 'detaching'.
11485 (inferior::inferior): New explicit ctor.
11486 (inferior::~inferior): New.
11488 2017-04-13 Pedro Alves <palves@redhat.com>
11490 * inferior.c (init_inferior_list): Delete.
11491 * inferior.h (init_inferior_list): Delete.
11493 2017-04-13 Pedro Alves <palves@redhat.com>
11496 * gdb.threads/threadapply.exp (thr_apply_detach): New procedure.
11497 (top level): Call it twice, with different thread sets.
11499 2017-04-13 Pedro Alves <palves@redhat.com>
11501 * thread.c: Include <algorithm>.
11502 (thread_array_cleanup): Delete.
11503 (scoped_inc_dec_ref): New class.
11504 (live_threads_count): New function.
11505 (set_thread_refcount): Delete.
11506 (tp_array_compar_ascending): Now a bool.
11507 (tp_array_compar): Convert to a std::sort comparison function.
11508 (thread_apply_all_command): Use std::vector and scoped_inc_dec_ref
11509 and live_threads_count.
11511 2017-04-13 Pedro Alves <palves@redhat.com>
11513 * infrun.c (follow_fork_inferior): Also switch the current
11516 2017-04-13 Pedro Alves <palves@redhat.com>
11518 * breakpoint.c (watch_command_1): Save watchpoint-frame info
11519 before calling create_internal_breakpoint.
11521 2017-04-13 Pedro Alves <palves@redhat.com>
11523 * fork-child.c (execv_argv): New class.
11524 (breakup_args): Refactored as ...
11525 (execv_argv::init_for_no_shell): .. this method of execv_argv.
11526 Copy arguments to storage and replace separators with NULL
11527 terminators in place.
11528 (escape_bang_in_quoted_argument): Adjust to return bool.
11529 (execv_argv::execv_argv): New ctor.
11530 (execv_argv::init_for_shell): New method, factored out from
11531 fork_inferior. Don't strdup strings into the vector.
11532 (fork_inferior): Eliminate "shell" local and use execv_argv. Use
11533 Remove free_vector_argv call.
11535 2017-04-13 Yao Qi <yao.qi@linaro.org>
11537 * rx-tdep.c (rx_fpsw_type): Check tdep->rx_fpsw_type instead of
11540 2017-04-13 Yao Qi <yao.qi@linaro.org>
11542 * rl78-tdep.c (rl78_gdbarch_init): Use XCNEW instead of XNEW.
11543 * rx-tdep.c (rx_gdbarch_init): Likewise.
11545 2017-04-13 Pedro Alves <palves@redhat.com>
11547 * breakpoint.h (struct breakpoint): Reindent.
11549 2017-04-13 Pedro Alves <palves@redhat.com>
11551 * breakpoint.c (bp_location): Rename to ...
11552 (bp_locations): ... this. All references updated.
11553 (bp_location_count): Rename to ...
11554 (bp_locations_count): ... this. All references updated.
11555 (bp_location_placed_address_before_address_max): Rename to ...
11556 (bp_locations_placed_address_before_address_max): ... this. All
11557 references updated.
11558 (bp_location_shadow_len_after_address_max): Rename to ...
11559 (bp_locations_shadow_len_after_address_max): ... this. All
11560 references updated.
11561 (bp_location_compare_addrs): Rename to ...
11562 (bp_locations_compare_addrs): ... this. All references updated.
11563 (bp_location_compare):Rename to ...
11564 (bp_locations_compare): ... this. All references updated.
11565 (bp_location_target_extensions_update): Rename to ...
11566 (bp_locations_target_extensions_update): ... this. All references
11569 2017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
11571 * Makefile.in (HFILES_NO_SRCDIR): Add "common/gdb_termios.h".
11572 * common/common.m4: Check headers 'termios.h', 'termio.h' and
11574 * common/gdb_termios.h: New file, with parts of "terminal.h".
11575 * inflow.c: Include "gdb_termios.h".
11576 * ser-unix.c: Include "gdb_termios.h".
11577 * terminal.h: Move terminal-related defines to
11578 "common/gdb_termios.h".
11580 2017-04-12 Tom Tromey <tom@tromey.com>
11582 * probe.c (parse_probes): Update.
11583 * location.h (delete_event_location): Don't declare.
11584 (event_location_deleter::operator()): Update.
11585 * location.c (event_location_deleter::operator()): Rename from
11586 delete_event_location.
11587 * linespec.h (linespec_result) <location>: Change type to
11589 * linespec.c (canonicalize_linespec, event_location_to_sals)
11590 (decode_objc): Update.
11591 (linespec_result): Don't call delete_event_location.
11592 * breakpoint.c (create_breakpoints_sal)
11593 (bkpt_probe_create_sals_from_location)
11594 (strace_marker_create_sals_from_location): Update.
11596 2017-04-12 Tom Tromey <tom@tromey.com>
11598 * linespec.h (struct linespec_result): Add constructor and
11600 (init_linespec_result, destroy_linespec_result)
11601 (make_cleanup_destroy_linespec_result): Don't declare.
11602 * linespec.c (init_linespec_result): Remove.
11603 (linespec_result::~linespec_result): Rename from
11604 destroy_linespec_result. Update.
11605 (cleanup_linespec_result, make_cleanup_destroy_linespec_result):
11607 * breakpoint.c (create_breakpoint, break_range_command)
11608 (decode_location_default): Update.
11609 * ax-gdb.c (agent_command_1): Update.
11611 2017-04-12 Tom Tromey <tom@tromey.com>
11613 * remote.c (remote_download_tracepoint): Update.
11614 * python/py-breakpoint.c (bppy_get_location): Update.
11615 * guile/scm-breakpoint.c (bpscm_print_breakpoint_smob)
11616 (gdbscm_breakpoint_location): Update.
11617 * elfread.c (elf_gnu_ifunc_resolver_return_stop): Update.
11618 * breakpoint.h (struct breakpoint) <location, location_range_end>:
11619 Change type to event_location_up.
11620 * breakpoint.c (create_overlay_event_breakpoint)
11621 (create_longjmp_master_breakpoint)
11622 (create_std_terminate_master_breakpoint)
11623 (create_exception_master_breakpoint)
11624 (breakpoint_event_location_empty_p, print_breakpoint_location)
11625 (print_one_breakpoint_location, create_thread_event_breakpoint)
11626 (init_breakpoint_sal, create_breakpoint)
11627 (print_recreate_ranged_breakpoint, break_range_command)
11628 (init_ada_exception_breakpoint, say_where): Update.
11629 (base_breakpoint_dtor): Don't call delete_event_location.
11630 (bkpt_print_recreate, tracepoint_print_recreate)
11631 (dprintf_print_recreate, update_static_tracepoint)
11632 (breakpoint_re_set_default): Update.
11634 2017-04-12 Tom Tromey <tom@tromey.com>
11636 * compile/compile-loc2c.c (compute_stack_depth_worker): Change
11637 type of "to_do". Update.
11638 (compute_stack_depth): Use std::vector.
11640 2017-04-12 Tom Tromey <tom@tromey.com>
11642 * printcmd.c (find_instruction_backward): Use std::vector.
11644 2017-04-12 Tom Tromey <tom@tromey.com>
11646 * symfile.c (objfilep): Remove typedef.
11647 (reread_symbols): Use a std::vector.
11649 2017-04-12 Tom Tromey <tom@tromey.com>
11651 * mi/mi-main.c (exec_direction_forward): Remove.
11652 (exec_reverse_continue, mi_execute_command): Use scoped_restore.
11653 * guile/scm-ports.c (ioscm_with_output_to_port_worker): Use
11655 * guile/guile.c (guile_repl_command, guile_command)
11656 (gdbscm_execute_gdb_command): Use scoped_restore.
11657 * go-exp.y (go_parse): Use scoped_restore.
11658 * d-exp.y (d_parse): Use scoped_restore.
11659 * cli/cli-decode.c (cmd_func): Use scoped_restore.
11660 * c-exp.y (c_parse): Use scoped_restore.
11662 2017-04-12 Tom Tromey <tom@tromey.com>
11664 * mi/mi-parse.h (struct mi_parse): Add constructor, destructor.
11665 (mi_parse): Update return type.
11666 (mi_parse_free): Remove.
11667 * mi/mi-parse.c (mi_parse::mi_parse): New constructor.
11668 (mi_parse::~mi_parse): Rename from mi_parse_free.
11669 (mi_parse_cleanup): Remove.
11670 (mi_parse): Return a unique_ptr. Use new.
11671 * mi/mi-main.c (mi_execute_command): Update.
11673 2017-04-12 Tom Tromey <tom@tromey.com>
11675 * location.c (explicit_location_lex_one): Return a
11676 unique_xmalloc_ptr.
11677 (string_to_explicit_location): Update. Remove cleanups.
11679 2017-04-12 Tom Tromey <tom@tromey.com>
11681 * gnu-v3-abi.c (value_and_voffset_p): Remove typedef.
11682 (compare_value_and_voffset): Change type. Update.
11683 (compute_vtable_size): Change type of "offset_vec".
11684 (gnuv3_print_vtable): Use std::vector. Remove cleanups.
11685 (gnuv3_get_typeid): Remove extraneous declaration.
11687 2017-04-12 Tom Tromey <tom@tromey.com>
11689 * charset.h (wchar_iterator): Fix comment.
11691 2017-04-12 Tom Tromey <tom@tromey.com>
11693 * charset.c (iconv_wrapper): New class.
11694 (cleanup_iconv): Remove.
11695 (convert_between_encodings): Use it.
11697 2017-04-12 Tom Tromey <tom@tromey.com>
11699 * symfile.h (increment_reading_symtab): Update type.
11700 * symfile.c (decrement_reading_symtab): Remove.
11701 (increment_reading_symtab): Return a scoped_restore_tmpl<int>.
11702 * psymtab.c (psymtab_to_symtab): Update.
11703 * dwarf2read.c (dw2_instantiate_symtab): Update.
11705 2017-04-12 Tom Tromey <tom@tromey.com>
11707 * jit.c (struct jit_reader): Declare separately. Add constructor
11708 and destructor. Change type of "handle".
11709 (loaded_jit_reader): Define separately.
11710 (jit_reader_load): Update. New "new".
11711 (jit_reader_unload_command): Use "delete".
11712 * gdb-dlfcn.h (struct dlclose_deleter): New.
11713 (gdb_dlhandle_up): New typedef.
11714 (gdb_dlopen, gdb_dlsym): Update types.
11715 (gdb_dlclose): Remove.
11716 * gdb-dlfcn.c (gdb_dlopen): Return a gdb_dlhandle_up.
11717 (gdb_dlsym): Change type of "handle".
11718 (make_cleanup_dlclose): Remove.
11719 (dlclose_deleter::operator()): Rename from gdb_dlclose.
11720 * compile/compile-c-support.c (load_libcc): Update.
11722 2017-04-12 Tom Tromey <tom@tromey.com>
11724 * symtab.h (find_pcs_for_symtab_line): Change return type.
11725 * symtab.c (find_pcs_for_symtab_line): Change return type.
11726 * python/py-linetable.c (build_line_table_tuple_from_pcs): Change
11727 type of "vec". Update.
11728 (ltpy_get_pcs_for_line): Update.
11729 * linespec.c (decode_digits_ordinary): Update.
11731 2017-04-12 Tom Tromey <tom@tromey.com>
11733 * tracepoint.c (actions_command): Update.
11734 * python/python.c (python_command, python_interactive_command):
11736 * mi/mi-cmd-break.c (mi_cmd_break_commands): Update.
11737 * guile/guile.c (guile_command): Update.
11738 * defs.h (read_command_lines, read_command_lines_1): Return
11740 (command_lines_deleter): New struct.
11741 (command_line_up): New typedef.
11742 * compile/compile.c (compile_code_command)
11743 (compile_print_command): Update.
11744 * cli/cli-script.h (get_command_line, copy_command_lines): Return
11746 (make_cleanup_free_command_lines): Remove.
11747 * cli/cli-script.c (get_command_line, read_command_lines_1)
11748 (copy_command_lines): Return command_line_up.
11749 (while_command, if_command, read_command_lines, define_command)
11750 (document_command): Update.
11751 (do_free_command_lines_cleanup, make_cleanup_free_command_lines):
11753 * breakpoint.h (breakpoint_set_commands): Change type of
11755 * breakpoint.c (breakpoint_set_commands): Change type of
11756 "commands". Update.
11757 (do_map_commands_command, update_dprintf_command_list)
11758 (create_tracepoint_from_upload): Update.
11760 2017-04-12 Tom Tromey <tom@tromey.com>
11762 * tracepoint.c (scope_info): Update.
11763 * spu-tdep.c (spu_catch_start): Update.
11764 * python/python.c (gdbpy_decode_line): Update.
11765 * python/py-finishbreakpoint.c (bpfinishpy_init): Update.
11766 * python/py-breakpoint.c (bppy_init): Update.
11767 * probe.c (parse_probes): Update.
11768 * mi/mi-cmd-break.c (mi_cmd_break_insert_1): Update.
11769 * location.h (event_location_deleter): New struct.
11770 (event_location_up): New typedef.
11771 (new_linespec_location, new_address_location, new_probe_location)
11772 (new_explicit_location, copy_event_location)
11773 (string_to_event_location, string_to_event_location_basic)
11774 (string_to_explicit_location): Update return type.
11775 (make_cleanup_delete_event_location): Remove.
11776 * location.c (new_linespec_location, new_address_location)
11777 (new_probe_location, new_explicit_location, copy_event_location):
11778 Return event_location_up.
11779 (delete_event_location_cleanup)
11780 (make_cleanup_delete_event_location): Remove.
11781 (string_to_explicit_location, string_to_event_location_basic)
11782 (string_to_event_location): Return event_location_up.
11783 * linespec.c (canonicalize_linespec, event_location_to_sals)
11784 (decode_line_with_current_source)
11785 (decode_line_with_last_displayed, decode_objc): Update.
11786 * guile/scm-breakpoint.c (gdbscm_register_breakpoint_x): Update.
11787 * completer.c (location_completer): Update.
11788 * cli/cli-cmds.c (edit_command, list_command): Update.
11789 * breakpoint.c (create_overlay_event_breakpoint)
11790 (create_longjmp_master_breakpoint)
11791 (create_std_terminate_master_breakpoint)
11792 (create_exception_master_breakpoint)
11793 (create_thread_event_breakpoint): Update.
11794 (init_breakpoint_sal): Update. Remove some dead code.
11795 (create_breakpoint_sal): Change type of "location". Update.
11796 (create_breakpoints_sal, create_breakpoint, break_command_1)
11797 (dprintf_command, break_range_command, until_break_command)
11798 (init_ada_exception_breakpoint)
11799 (strace_marker_create_sals_from_location)
11800 (update_static_tracepoint, trace_command, ftrace_command)
11801 (strace_command, create_tracepoint_from_upload): Update.
11802 * break-catch-throw.c (re_set_exception_catchpoint): Update.
11803 * ax-gdb.c (agent_command_1): Update.
11805 2017-04-12 Pedro Alves <palves@redhat.com>
11807 * Makefile.in (ALL_TARGET_OBS): Add i386-go32-tdep.o.
11808 * configure.tgt: Handle i[34567]86-*-go32* and
11809 i[34567]86-*-msdosdjgpp*.
11810 * i386-tdep.c (i386_svr4_reg_to_regnum):
11812 (i386_go32_init_abi, i386_coff_osabi_sniffer): Moved to
11814 (_initialize_i386_tdep): DJGPP bits moved to i386-go32-tdep.c.
11815 * i386-go32-tdep.c: New file.
11816 * i386-tdep.h (tdesc_i386_mmx, i386_svr4_reg_to_regnum): New
11819 2017-04-12 Simon Marchi <simon.marchi@ericsson.com>
11821 * aix-thread.c (pd_status2str): Change return type to const char *.
11823 2017-04-12 Pedro Alves <palves@redhat.com>
11825 * i386-tdep.c (i386_elf_init_abi, i386_go32_init_abi): Remove
11826 calls to set_gdbarch_gnu_triplet_regexp.
11828 2017-04-12 Pedro Alves <palves@redhat.com>
11831 * c-lang.c (cplus_primitive_types) <cplus_primitive_type_wchar_t>:
11833 (cplus_language_arch_info): Register cplus_primitive_type_wchar_t.
11834 * gdbtypes.h (struct builtin_type) <builtin_wchar>: New field.
11835 * gdbtypes.c (gdbtypes_post_init): Create the "wchar_t" type.
11836 * gdbarch.sh (wchar_bit, wchar_signed): New per-arch values.
11837 * gdbarch.h, gdbarch.c: Regenerate.
11838 * aarch64-tdep.c (aarch64_gdbarch_init): Override
11839 gdbarch_wchar_bit and gdbarch_wchar_signed.
11840 * alpha-tdep.c (alpha_gdbarch_init): Likewise.
11841 * arm-tdep.c (arm_gdbarch_init): Likewise.
11842 * avr-tdep.c (avr_gdbarch_init): Likewise.
11843 * h8300-tdep.c (h8300_gdbarch_init): Likewise.
11844 * i386-nto-tdep.c (i386nto_init_abi): Likewise.
11845 * i386-tdep.c (i386_go32_init_abi): Likewise.
11846 * m32r-tdep.c (m32r_gdbarch_init): Likewise.
11847 * moxie-tdep.c (moxie_gdbarch_init): Likewise.
11848 * nds32-tdep.c (nds32_gdbarch_init): Likewise.
11849 * rs6000-aix-tdep.c (rs6000_aix_init_osabi): Likewise.
11850 * sh-tdep.c (sh_gdbarch_init): Likewise.
11851 * sparc-tdep.c (sparc32_gdbarch_init): Likewise.
11852 * sparc64-tdep.c (sparc64_init_abi): Likewise.
11853 * windows-tdep.c (windows_init_abi): Likewise.
11854 * xstormy16-tdep.c (xstormy16_gdbarch_init): Likewise.
11856 2017-04-12 Pedro Alves <palves@redhat.com>
11859 * c-lang.c (cplus_primitive_types) <cplus_primitive_type_char16_t,
11860 cplus_primitive_type_char32_t>: New enum values.
11861 (cplus_language_arch_info): Register cplus_primitive_type_char16_t
11862 and cplus_primitive_type_char32_t.
11863 * dwarf2read.c (read_base_type) <DW_ATE_UTF>: If bit size is 16 or
11864 32, use the archtecture's built-in type for char16_t and char32_t,
11865 respectively. Otherwise, fallback to init_integer_type as before,
11866 but make the type unsigned, and issue a complaint.
11867 * gdbtypes.c (gdbtypes_post_init): Make char16_t and char32_t unsigned.
11869 2017-04-12 Alan Hayward <alan.hayward@arm.com>
11871 * m32r-tdep.c (M32R_ARG_REGISTER_SIZE): Added.
11872 (m32r_push_dummy_call): Use M32R_ARG_REGISTER_SIZE.
11874 2017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
11876 * windows-nat.c (windows_create_inferior): Declare 'toexec' as
11879 2017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
11881 * common/common-utils.c (free_vector_argv): New function.
11882 * common/common-utils.h: Include <vector>.
11883 (free_vector_argv): New prototype.
11884 * darwin-nat.c (darwin_create_inferior): Rewrite function
11885 prototype in order to constify "exec_file" and accept a
11886 "std::string" for "allargs".
11887 * fork-child.c: Include <vector>.
11888 (breakup_args): Rewrite function, using C++.
11889 (fork_inferior): Rewrite function header, constify "exec_file_arg"
11890 and accept "std::string" for "allargs". Update the code to
11891 calculate "argv" based on "allargs". Update calls to "exec_fun"
11893 * gnu-nat.c (gnu_create_inferior): Rewrite function prototype in
11894 order to constify "exec_file" and accept a "std::string" for
11896 * go32-nat.c (go32_create_inferior): Likewise.
11897 * inf-ptrace.c (inf_ptrace_create_inferior): Likewise.
11898 * infcmd.c (run_command_1): Constify "exec_file". Use
11899 "std::string" for inferior arguments.
11900 * inferior.h (fork_inferior): Update prototype.
11901 * linux-nat.c (linux_nat_create_inferior): Rewrite function
11902 prototype in order to constify "exec_file" and accept a
11903 "std::string" for "allargs".
11904 * nto-procfs.c (procfs_create_inferior): Likewise.
11905 * procfs.c (procfs_create_inferior): Likewise.
11906 * remote-sim.c (gdbsim_create_inferior): Likewise.
11907 * remote.c (extended_remote_run): Update code to accept
11908 "std::string" as argument.
11909 (extended_remote_create_inferior): Rewrite function prototype in
11910 order to constify "exec_file" and accept a "std::string" for
11912 * rs6000-nat.c (super_create_inferior): Likewise.
11913 (rs6000_create_inferior): Likewise.
11914 * target.h (struct target_ops) <to_create_inferior>: Likewise.
11915 * windows-nat.c (windows_create_inferior): Likewise.
11917 2017-04-11 Pedro Alves <palves@redhat.com>
11919 * thread.c: Fix whitespace throughout.
11921 2017-04-11 Philipp Rudo <prudo@linux.vnet.ibm.com>
11923 * linux-nat.c (linux_nat_detach): Remove delete_lwp call.
11925 2017-04-11 Alan Hayward <alan.hayward@arm.com>
11927 * arm-tdep.c (arm_store_return_value): Use FP_REGISTER_SIZE
11929 2017-04-10 Sergio Durigan Junior <sergiodj@redhat.com>
11932 * osdata.c (info_osdata): Check if 'type' is an empty string
11935 2017-04-10 Pedro Alves <palves@redhat.com>
11937 * thread.c (add_thread_silent, delete_thread_1, find_thread_ptid)
11938 (ptid_to_global_thread_id, in_thread_list)
11939 (do_captured_list_thread_ids, set_resumed, set_running)
11940 (set_executing, set_stop_requested, finish_thread_state)
11941 (validate_registers_access, can_access_registers_ptid)
11942 (print_thread_info_1, switch_to_thread)
11943 (do_restore_current_thread_cleanup)
11944 (make_cleanup_restore_current_thread, thread_command)
11945 (thread_name_command): Use operator== instead of ptid_equal.
11947 2017-04-10 Pedro Alves <palves@redhat.com>
11949 * thread.c (struct current_thread_cleanup) <next>: Delete field.
11950 (current_thread_cleanup_chain): Delete.
11951 (restore_current_thread_cleanup_dtor)
11952 (make_cleanup_restore_current_thread): Remove references to
11953 current_thread_cleanup_chain.
11955 2017-04-10 Alan Hayward <alan.hayward@arm.com>
11957 * msp430-tdep.c (msp430_pseudo_register_read): Never return
11960 2017-04-10 Yao Qi <yao.qi@linaro.org>
11963 * gdbthread.h (thread_info::deletable): New method.
11964 (thread_info::incref): New method.
11965 (thread_info::decref): New method.
11966 (thread_info::refcount): Move it to private.
11967 * infrun.c (save_stop_context): Call inc_refcount.
11968 (release_stop_context_cleanup): Likewise.
11969 * thread.c (set_thread_exited): New function.
11970 (init_thread_list): Delete "tp" only it is deletable, otherwise
11971 call set_thread_exited.
11972 (delete_thread_1): Call set_thread_exited.
11973 (current_thread_cleanup) <inferior_pid>: Remove.
11974 <thread>: New field.
11975 (restore_current_thread_ptid_changed): Removed.
11976 (do_restore_current_thread_cleanup): Adjust.
11977 (restore_current_thread_cleanup_dtor): Don't call
11979 (set_thread_refcount): Use dec_refcount.
11980 (make_cleanup_restore_current_thread): Adjust.
11981 (thread_apply_all_command): Call inc_refcount.
11982 (_initialize_thread): Don't call
11983 observer_attach_thread_ptid_changed.
11985 2017-04-10 Yao Qi <yao.qi@linaro.org>
11987 * thread.c (delete_thread_1): Hoist code on marking thread as
11990 2017-04-09 Simon Marchi <simon.marchi@polymtl.ca>
11992 * windows-nat.c (windows_detach): Initialize ptid with
11995 2017-04-07 Simon Marchi <simon.marchi@ericsson.com>
11997 * unittests/ptid-selftests.c: Fix erroneous assert messages.
11999 2017-04-07 Alan Hayward <alan.hayward@arm.com>
12001 * bfin-tdep.c (BFIN_MAX_REGISTER_SIZE): Add.
12002 (bfin_pseudo_register_read): Use BFIN_MAX_REGISTER_SIZE.
12003 (bfin_pseudo_register_write): Likewise
12005 2017-04-06 Simon Marchi <simon.marchi@ericsson.com>
12007 * common/ptid.h (struct ptid): Change to...
12008 (class ptid_t): ... this.
12009 <ptid_t>: New constructors.
12010 <pid, lwp_p, lwp, tid_p, tid, is_pid, operator==, operator!=,
12011 matches>: New methods.
12012 <make_null, make_minus_one>: New static methods.
12013 <pid>: Rename to...
12015 <lwp>: Rename to...
12017 <tid>: Rename to...
12019 (ptid_build, ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal,
12020 ptid_is_pid, ptid_lwp_p, ptid_tid_p, ptid_match): Take ptid arguments
12021 as references, move comment to class ptid_t.
12022 * common/ptid.c (null_ptid, minus_one_ptid): Initialize with
12023 ptid_t static methods.
12024 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_tid,
12025 ptid_equal, ptid_is_pid, ptid_lwp_p, ptid_tid_p, ptid_match):
12026 Take ptid arguments as references, implement using ptid_t methods.
12027 * unittests/ptid-selftests.c: New file.
12028 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
12029 unittests/ptid-selftests.c.
12030 (SUBDIR_UNITTESTS_OBS): Add unittests/ptid-selftests.o.
12032 2017-04-06 Thomas Preud'homme <thomas.preudhomme@arm.com>
12034 * python/python.c (python_run_simple_file): Cast mode literal to
12035 non-const char pointer as expected by PyFile_FromString.
12037 2017-04-05 Simon Marchi <simon.marchi@ericsson.com>
12039 * common/ptid.c (ptid_lwp_p, ptid_tid_p): Remove comparison with
12040 minus_one_ptid and null_ptid.
12042 2017-04-05 Pedro Alves <palves@redhat.com>
12044 * warning.m4 (build_warnings): Remove -Wno-write-strings.
12045 * configure: Regenerate.
12047 2017-04-05 Pedro Alves <palves@redhat.com>
12049 * ada-exp.y (yyerror): Constify.
12050 * ada-lang.c (bound_name, get_selections)
12051 (ada_variant_discrim_type)
12052 (ada_variant_discrim_name, ada_value_struct_elt)
12053 (ada_lookup_struct_elt_type, is_unchecked_variant)
12054 (ada_which_variant_applies, standard_exc, ada_get_next_arg)
12055 (catch_ada_exception_command_split)
12056 (catch_ada_assert_command_split, catch_assert_command)
12057 (ada_op_name): Constify.
12058 * ada-lang.h (ada_yyerror, get_selections)
12059 (ada_variant_discrim_name, ada_value_struct_elt): Constify.
12060 * arc-tdep.c (arc_print_frame_cache): Constify.
12061 * arm-tdep.c (arm_skip_stub): Constify.
12062 * ax-gdb.c (gen_binop, gen_struct_ref_recursive, gen_struct_ref)
12063 (gen_aggregate_elt_ref): Constify.
12064 * bcache.c (print_bcache_statistics): Constify.
12065 * bcache.h (print_bcache_statistics): Constify.
12066 * break-catch-throw.c (catch_exception_command_1):
12067 * breakpoint.c (struct ep_type_description::description):
12069 (add_solib_catchpoint): Constify.
12070 (catch_fork_command_1): Add cast.
12071 (add_catch_command): Constify.
12072 * breakpoint.h (add_catch_command, add_solib_catchpoint):
12074 * bsd-uthread.c (bsd_uthread_state): Constify.
12075 * buildsym.c (patch_subfile_names): Constify.
12076 * buildsym.h (next_symbol_text_func, patch_subfile_names):
12078 * c-exp.y (yyerror): Constify.
12079 (token::oper): Constify.
12080 * c-lang.h (c_yyerror, cp_print_class_member): Constify.
12081 * c-varobj.c (cplus_describe_child): Constify.
12082 * charset.c (find_charset_names): Add cast.
12083 (find_charset_names): Constify array and add const_cast.
12084 * cli/cli-cmds.c (complete_command, cd_command): Constify.
12085 (edit_command): Constify.
12086 * cli/cli-decode.c (lookup_cmd): Constify.
12087 * cli/cli-dump.c (dump_memory_command, dump_value_command):
12089 (struct dump_context): Constify.
12090 (add_dump_command, restore_command): Constify.
12091 * cli/cli-script.c (get_command_line): Constify.
12092 * cli/cli-script.h (get_command_line): Constify.
12093 * cli/cli-utils.c (check_for_argument): Constify.
12094 * cli/cli-utils.h (check_for_argument): Constify.
12095 * coff-pe-read.c (struct read_pe_section_data): Constify.
12096 * command.h (lookup_cmd): Constify.
12097 * common/print-utils.c (decimal2str): Constify.
12098 * completer.c (gdb_print_filename): Constify.
12099 * corefile.c (set_gnutarget): Constify.
12100 * cp-name-parser.y (yyerror): Constify.
12101 * cp-valprint.c (cp_print_class_member): Constify.
12102 * cris-tdep.c (cris_register_name, crisv32_register_name):
12104 * d-exp.y (yyerror): Constify.
12105 (struct token::oper): Constify.
12106 * d-lang.h (d_yyerror): Constify.
12107 * dbxread.c (struct header_file_location::name): Constify.
12108 (add_old_header_file, add_new_header_file, last_function_name)
12109 (dbx_next_symbol_text, add_bincl_to_list)
12110 (find_corresponding_bincl_psymtab, set_namestring)
12111 (find_stab_function_addr, read_dbx_symtab, start_psymtab)
12112 (dbx_end_psymtab, read_ofile_symtab, process_one_symbol):
12113 * defs.h (command_line_input, print_address_symbolic)
12114 (deprecated_readline_begin_hook): Constify.
12115 * dwarf2read.c (anonymous_struct_prefix, dwarf_bool_name):
12117 * event-top.c (handle_line_of_input): Constify and add cast.
12118 * exceptions.c (catch_errors): Constify.
12119 * exceptions.h (catch_errors): Constify.
12120 * expprint.c (print_subexp_standard, op_string, op_name)
12121 (op_name_standard, dump_raw_expression, dump_raw_expression):
12122 * expression.h (op_name, op_string, dump_raw_expression):
12124 * f-exp.y (yyerror): Constify.
12125 (struct token::oper): Constify.
12126 (struct f77_boolean_val::name): Constify.
12127 * f-lang.c (f_word_break_characters): Constify.
12128 * f-lang.h (f_yyerror): Constify.
12129 * fork-child.c (fork_inferior): Add cast.
12130 * frv-tdep.c (struct gdbarch_tdep::register_names): Constify.
12131 (new_variant): Constify.
12132 * gdbarch.sh (pstring_ptr, pstring_list): Constify.
12133 * gdbarch.c: Regenerate.
12134 * gdbcore.h (set_gnutarget): Constify.
12135 * go-exp.y (yyerror): Constify.
12136 (token::oper): Constify.
12137 * go-lang.h (go_yyerror): Constify.
12138 * go32-nat.c (go32_sysinfo): Constify.
12139 * guile/scm-breakpoint.c (gdbscm_breakpoint_expression): Constify.
12140 * guile/scm-cmd.c (cmdscm_function): Constify.
12141 * guile/scm-param.c (pascm_param_value): Constify.
12142 * h8300-tdep.c (h8300_register_name, h8300s_register_name)
12143 (h8300sx_register_name): Constify.
12144 * hppa-tdep.c (hppa32_register_name, hppa64_register_name):
12146 * ia64-tdep.c (ia64_register_names): Constify.
12147 * infcmd.c (construct_inferior_arguments): Constify.
12148 (path_command, attach_post_wait): Constify.
12149 * language.c (show_range_command, show_case_command)
12150 (unk_lang_error): Constify.
12151 * language.h (language_defn::la_error)
12152 (language_defn::la_name_of_this): Constify.
12153 * linespec.c (decode_line_2): Constify.
12154 * linux-thread-db.c (thread_db_err_str): Constify.
12155 * lm32-tdep.c (lm32_register_name): Constify.
12156 * m2-exp.y (yyerror): Constify.
12157 * m2-lang.h (m2_yyerror): Constify.
12158 * m32r-tdep.c (m32r_register_names): Constify and make static.
12159 * m68hc11-tdep.c (m68hc11_register_names): Constify.
12160 * m88k-tdep.c (m88k_register_name): Constify.
12161 * macroexp.c (appendmem): Constify.
12162 * mdebugread.c (fdr_name, add_data_symbol, parse_type)
12163 (upgrade_type, parse_external, parse_partial_symbols)
12164 (mdebug_next_symbol_text, cross_ref, mylookup_symbol, new_psymtab)
12165 (new_symbol): Constify.
12166 * memattr.c (mem_info_command): Constify.
12167 * mep-tdep.c (register_name_from_keyword): Constify.
12168 * mi/mi-cmd-env.c (mi_cmd_env_path, _initialize_mi_cmd_env):
12170 * mi/mi-cmd-stack.c (list_args_or_locals): Constify.
12171 * mi/mi-cmd-var.c (mi_cmd_var_show_attributes): Constify.
12172 * mi/mi-main.c (captured_mi_execute_command): Constify and add
12174 (mi_execute_async_cli_command): Constify.
12175 * mips-tdep.c (mips_register_name): Constify.
12176 * mn10300-tdep.c (register_name, mn10300_generic_register_name)
12177 (am33_register_name, am33_2_register_name)
12178 * moxie-tdep.c (moxie_register_names): Constify.
12179 * nat/linux-osdata.c (osdata_type): Constify fields.
12180 * nto-tdep.c (nto_parse_redirection): Constify.
12181 * objc-lang.c (lookup_struct_typedef, lookup_objc_class)
12182 (lookup_child_selector): Constify.
12183 (objc_methcall::name): Constify.
12184 * objc-lang.h (lookup_objc_class, lookup_child_selector)
12185 (lookup_struct_typedef): Constify.
12186 * objfiles.c (pc_in_section): Constify.
12187 * objfiles.h (pc_in_section): Constify.
12188 * p-exp.y (struct token::oper): Constify.
12189 (yyerror): Constify.
12190 * p-lang.h (pascal_yyerror): Constify.
12191 * parser-defs.h (op_name_standard): Constify.
12192 (op_print::string): Constify.
12193 (exp_descriptor::op_name): Constify.
12194 * printcmd.c (print_address_symbolic): Constify.
12195 * psymtab.c (print_partial_symbols): Constify.
12196 * python/py-breakpoint.c (stop_func): Constify.
12197 (bppy_get_expression): Constify.
12198 * python/py-cmd.c (cmdpy_completer::name): Constify.
12199 (cmdpy_function): Constify.
12200 * python/py-event.c (evpy_add_attribute)
12201 (gdbpy_initialize_event_generic): Constify.
12202 * python/py-event.h (evpy_add_attribute)
12203 (gdbpy_initialize_event_generic): Constify.
12204 * python/py-evts.c (add_new_registry): Constify.
12205 * python/py-finishbreakpoint.c (outofscope_func): Constify.
12206 * python/py-framefilter.c (get_py_iter_from_func): Constify.
12207 * python/py-inferior.c (get_buffer): Add cast.
12208 * python/py-param.c (parm_constant::name): Constify.
12209 * python/py-unwind.c (fprint_frame_id): Constify.
12210 * python/python.c (gdbpy_parameter_value): Constify.
12211 * remote-fileio.c (remote_fio_func_map): Make 'name' const.
12212 * remote.c (memory_packet_config::name): Constify.
12213 (show_packet_config_cmd, remote_write_bytes)
12214 (remote_buffer_add_string):
12215 * reverse.c (exec_reverse_once): Constify.
12216 * rs6000-tdep.c (variant::name, variant::description): Constify.
12217 * rust-exp.y (rustyyerror): Constify.
12218 * rust-lang.c (rust_op_name): Constify.
12219 * rust-lang.h (rustyyerror): Constify.
12220 * serial.h (serial_ops::name): Constify.
12221 * sh-tdep.c (sh_sh_register_name, sh_sh3_register_name)
12222 (sh_sh3e_register_name, sh_sh2e_register_name)
12223 (sh_sh2a_register_name, sh_sh2a_nofpu_register_name)
12224 (sh_sh_dsp_register_name, sh_sh3_dsp_register_name)
12225 (sh_sh4_register_name, sh_sh4_nofpu_register_name)
12226 (sh_sh4al_dsp_register_name): Constify.
12227 * sh64-tdep.c (sh64_register_name): Constify.
12228 * solib-darwin.c (lookup_symbol_from_bfd): Constify.
12229 * spu-tdep.c (spu_register_name, info_spu_dma_cmdlist): Constify.
12230 * stabsread.c (patch_block_stabs, read_type_number)
12231 (ref_map::stabs, ref_add, process_reference)
12232 (symbol_reference_defined, define_symbol, define_symbol)
12233 (error_type, read_type, read_member_functions, read_cpp_abbrev)
12234 (read_one_struct_field, read_struct_fields, read_baseclasses)
12235 (read_tilde_fields, read_struct_type, read_array_type)
12236 (read_enum_type, read_sun_builtin_type, read_sun_floating_type)
12237 (read_huge_number, read_range_type, read_args, common_block_start)
12238 (find_name_end): Constify.
12239 * stabsread.h (common_block_start, define_symbol)
12240 (process_one_symbol, symbol_reference_defined, ref_add):
12241 * symfile.c (get_section_index, add_symbol_file_command):
12242 * symfile.h (get_section_index): Constify.
12243 * target-descriptions.c (tdesc_type::name): Constify.
12244 (tdesc_free_type): Add cast.
12245 * target.c (find_default_run_target):
12246 (add_deprecated_target_alias, find_default_run_target)
12247 (target_announce_detach): Constify.
12248 (do_option): Constify.
12249 * target.h (add_deprecated_target_alias): Constify.
12250 * thread.c (print_thread_info_1): Constify.
12251 * top.c (deprecated_readline_begin_hook, command_line_input):
12253 (init_main): Add casts.
12254 * top.h (handle_line_of_input): Constify.
12255 * tracefile-tfile.c (tfile_write_uploaded_tsv): Constify.
12256 * tracepoint.c (tvariables_info_1, trace_status_mi): Constify.
12257 (tfind_command): Rename to ...
12258 (tfind_command_1): ... this and constify.
12259 (tfind_command): New function.
12260 (tfind_end_command, tfind_start_command): Adjust.
12261 (encode_source_string): Constify.
12262 * tracepoint.h (encode_source_string): Constify.
12263 * tui/tui-data.c (tui_partial_win_by_name): Constify.
12264 * tui/tui-data.h (tui_partial_win_by_name): Constify.
12265 * tui/tui-source.c (tui_set_source_content_nil): Constify.
12266 * tui/tui-source.h (tui_set_source_content_nil): Constify.
12267 * tui/tui-win.c (parse_scrolling_args): Constify.
12268 * tui/tui-windata.c (tui_erase_data_content): Constify.
12269 * tui/tui-windata.h (tui_erase_data_content): Constify.
12270 * tui/tui-winsource.c (tui_erase_source_content): Constify.
12271 * tui/tui.c (tui_enable): Add cast.
12272 * utils.c (defaulted_query): Constify.
12273 (init_page_info): Add cast.
12274 (puts_debug, subset_compare): Constify.
12275 * utils.h (subset_compare): Constify.
12276 * varobj.c (varobj_format_string): Constify.
12277 * varobj.h (varobj_format_string): Constify.
12278 * vax-tdep.c (vax_register_name): Constify.
12279 * windows-nat.c (windows_detach): Constify.
12280 * xcoffread.c (process_linenos, xcoff_next_symbol_text): Constify.
12281 * xml-support.c (gdb_xml_end_element): Constify.
12282 * xml-tdesc.c (tdesc_start_reg): Constify.
12283 * xstormy16-tdep.c (xstormy16_register_name): Constify.
12284 * xtensa-tdep.c (xtensa_find_register_by_name): Constify.
12285 * xtensa-tdep.h (xtensa_register_t::name): Constify.
12287 2017-04-05 Pedro Alves <palves@redhat.com>
12289 * proc-api.c (struct trans): Constify.
12290 (procfs_note): Constify.
12291 * proc-events.c (struct trans, syscall_table):
12292 * proc-flags.c (struct trans): Constify.
12293 * proc-utils.h (procfs_note): Constify.
12294 * proc-why.c (struct trans): Constify.
12295 * procfs.c (dead_procinfo, find_syscall, proc_warn, proc_error)
12296 (procfs_detach): Constify.
12297 * sol-thread.c (struct string_map): Constify.
12298 (td_err_string, td_state_string): Constify.
12300 2017-04-05 Pedro Alves <palves@redhat.com>
12302 * proc-api.c (procfs_filename): Don't initialize
12304 (prepare_to_trace): Assume procfs_filename is non-NULL.
12305 (_initialize_proc_api): Give procfs_filename a default value here.
12307 2017-04-05 Pedro Alves <palves@redhat.com>
12309 * break-catch-throw.c (handle_gnu_v3_exceptions): Constify
12310 'cond_string' parameter.
12311 (extract_exception_regexp): Constify 'string' parameter.
12312 (catch_exception_command_1): Constify.
12313 * breakpoint.c (init_catchpoint)
12314 (create_fork_vfork_event_catchpoint): Constify 'cond_string'
12316 (ep_parse_optional_if_clause, catch_fork_command_1)
12317 (catch_exec_command_1): Constify.
12318 * breakpoint.h (init_catchpoint): Constify 'cond_string'
12320 (ep_parse_optional_if_clause): Constify.
12321 * cli/cli-utils.c (remove_trailing_whitespace)
12322 (check_for_argument): Constify.
12323 * cli/cli-utils.h (remove_trailing_whitespace): Constify and add
12324 non-const overload.
12325 (check_for_argument): Likewise.
12327 2017-04-05 Pedro Alves <palves@redhat.com>
12329 * event-top.c (command_line_handler): Add cast to execute_command
12331 * record-btrace.c (cmd_record_btrace_bts_start)
12332 (cmd_record_btrace_pt_start, cmd_record_btrace_start)
12333 (cmd_record_btrace_start): Add cast to execute_command call.
12334 * record-full.c (record_full_goto_insn):
12335 * record.c (record_start, record_stop): Add cast to
12336 execute_command_to_string calls.
12337 (cmd_record_start): Add cast to execute_command calls.
12339 2017-04-05 Pedro Alves <palves@redhat.com>
12341 * python/python-internal.h (gdb_PyArg_ParseTupleAndKeywords): New
12342 static inline function.
12343 * python/py-arch.c (archpy_disassemble): Constify 'keywords'
12344 array and use gdb_PyArg_ParseTupleAndKeywords.
12345 * python/py-cmd.c (cmdpy_init): Likewise.
12346 * python/py-finishbreakpoint.c (bpfinishpy_init): Likewise.
12347 * python/py-inferior.c (infpy_read_memory, infpy_write_memory)
12348 (infpy_search_memory): Likewise.
12349 * python/py-objfile.c (objfpy_add_separate_debug_file)
12350 (gdbpy_lookup_objfile): Likewise.
12351 * python/py-symbol.c (gdbpy_lookup_symbol)
12352 (gdbpy_lookup_global_symbol): Likewise.
12353 * python/py-type.c (gdbpy_lookup_type): Likewise.
12354 * python/py-value.c (valpy_lazy_string, valpy_string): Likewise.
12355 * python/python.c (execute_gdb_command, gdbpy_write, gdbpy_flush):
12358 2017-04-05 Pedro Alves <palves@redhat.com>
12360 * python/python-internal.h (gdb_PyGetSetDef): New type.
12361 * python/py-block.c (block_object_getset)
12362 (breakpoint_object_getset): Now a gdb_PyGetSetDef array.
12363 * python/py-event.c (event_object_getset)
12364 (finish_breakpoint_object_getset): Likewise.
12365 * python/py-inferior.c (inferior_object_getset): Likewise.
12366 * python/py-infthread.c (thread_object_getset): Likewise.
12367 * python/py-lazy-string.c (lazy_string_object_getset): Likewise.
12368 * python/py-linetable.c (linetable_entry_object_getset): Likewise.
12369 * python/py-objfile.c (objfile_getset): Likewise.
12370 * python/py-progspace.c (pspace_getset): Likewise.
12371 * python/py-record-btrace.c (btpy_insn_getset, btpy_call_getset):
12373 * python/py-record.c (recpy_record_getset): Likewise.
12374 * python/py-symbol.c (symbol_object_getset): Likewise.
12375 * python/py-symtab.c (symtab_object_getset, sal_object_getset):
12377 * python/py-type.c (type_object_getset, field_object_getset):
12379 * python/py-value.c (value_object_getset): Likewise.
12381 2017-04-05 Pedro Alves <palves@redhat.com>
12383 * python/python-internal.h (gdb_PyObject_CallMethod)
12384 (gdb_PyErr_NewException, gdb_PySys_GetObject, gdb_PySys_SetPath):
12386 (GDB_PYSYS_SETPATH_CHAR, PyObject_CallMethod, PyErr_NewException)
12387 (PySys_GetObject, PySys_SetPath): New macros.
12389 2017-04-05 Pedro Alves <palves@redhat.com>
12391 * mi/mi-cmd-info.c (mi_cmd_info_os): Call info_osdata instead of
12392 info_osdata_command.
12393 * osdata.c (info_osdata_command): Rename to ...
12394 (info_osdata): ... this. Constify 'type' parameter, and remove
12395 the 'from_tty' parameter. Accept NULL TYPE.
12396 (info_osdata_command): New function.
12397 * osdata.h (info_osdata_command): Remove declaration.
12398 (info_osdata): New declaration.
12400 2017-04-05 Pedro Alves <palves@redhat.com>
12402 * mi/mi-cmd-break.c (mi_cmd_break_insert_1, mi_cmd_break_insert)
12403 (mi_cmd_dprintf_insert, mi_cmd_break_passcount)
12404 (mi_cmd_break_watch, mi_cmd_break_commands): Constify 'command'
12406 * mi/mi-cmd-catch.c (mi_cmd_catch_assert, mi_cmd_catch_exception)
12407 (mi_cmd_catch_load, mi_cmd_catch_unload): Constify cmd' parameter.
12408 * mi/mi-cmd-disas.c (mi_cmd_disassemble): Constify 'command'
12410 * mi/mi-cmd-env.c (mi_cmd_env_pwd, mi_cmd_env_cd, mi_cmd_env_path)
12411 (mi_cmd_env_dir, mi_cmd_inferior_tty_set, _cmd_inferior_tty_show)
12412 * mi/mi-cmd-file.c (mi_cmd_file_list_exec_source_file)
12413 (mi_cmd_file_list_exec_source_files)
12414 (mi_cmd_file_list_shared_libraries): Constify 'command' parameter.
12415 * mi/mi-cmd-info.c (mi_cmd_info_ada_exceptions)
12416 (mi_cmd_info_gdb_mi_command, mi_cmd_info_os): Constify 'command'
12418 * mi/mi-cmd-stack.c (mi_cmd_enable_frame_filters)
12419 (mi_cmd_stack_list_frames, mi_cmd_stack_info_depth)
12420 (mi_cmd_stack_list_locals, mi_cmd_stack_list_args)
12421 (mi_cmd_stack_list_variables, mi_cmd_stack_select_frame)
12422 (mi_cmd_stack_info_frame): Constify 'command' parameter.
12423 * mi/mi-cmd-target.c (mi_cmd_target_file_get)
12424 (mi_cmd_target_file_put, mi_cmd_target_file_delete): Constify
12425 'command' parameter.
12426 * mi/mi-cmd-var.c (mi_cmd_var_create, mi_cmd_var_delete)
12427 (mi_cmd_var_set_format, mi_cmd_var_set_visualizer)
12428 (mi_cmd_var_set_frozen, mi_cmd_var_show_format)
12429 (mi_cmd_var_info_num_children, mi_cmd_var_list_children)
12430 (mi_cmd_var_info_type, mi_cmd_var_info_path_expression)
12431 (mi_cmd_var_info_expression, mi_cmd_var_show_attributes)
12432 (mi_cmd_var_evaluate_expression, mi_cmd_var_assign)
12433 (mi_cmd_var_update, mi_cmd_enable_pretty_printing)
12434 (mi_cmd_var_set_update_range): Constify 'command' parameter.
12435 * mi/mi-cmds.h (mi_cmd_argv_ftype): Constify 'command' parameter.
12436 * mi/mi-interp.c (mi_cmd_interpreter_exec): Constify 'command'
12438 * mi/mi-main.c (mi_cmd_gdb_exit, mi_cmd_exec_next)
12439 (mi_cmd_exec_next_instruction, mi_cmd_exec_step)
12440 (mi_cmd_exec_step_instruction, mi_cmd_exec_finish)
12441 (mi_cmd_exec_return ,mi_cmd_exec_jump, mi_cmd_exec_continue)
12442 (mi_cmd_exec_interrupt, mi_cmd_exec_run, mi_cmd_target_detach)
12443 (mi_cmd_target_flash_erase, mi_cmd_thread_select)
12444 (mi_cmd_thread_list_ids, mi_cmd_thread_info)
12445 (mi_cmd_list_thread_groups, mi_cmd_data_list_register_names)
12446 (mi_cmd_data_list_changed_registers)
12447 (mi_cmd_data_write_register_values)
12448 (mi_cmd_data_evaluate_expression, mi_cmd_data_read_memory)
12449 (mi_cmd_data_read_memory_bytes, mi_cmd_data_write_memory)
12450 (mi_cmd_data_write_memory_bytes, mi_cmd_enable_timings)
12451 (mi_cmd_list_features, mi_cmd_list_target_features)
12452 (mi_cmd_add_inferior, mi_cmd_remove_inferior)
12453 (mi_cmd_trace_define_variable, mi_cmd_trace_list_variables)
12454 (mi_cmd_trace_find, mi_cmd_trace_save, mi_cmd_trace_start)
12455 (mi_cmd_trace_status, mi_cmd_trace_stop, mi_cmd_ada_task_info)
12456 (mi_cmd_trace_frame_collected): Constify 'command'
12458 * mi/mi-symbol-cmds.c (mi_cmd_symbol_list_lines): Constify
12459 'command' parameter.
12461 2017-04-05 Pedro Alves <palves@redhat.com>
12463 * ada-lang.c (ada_completer_word_break_characters): Now a const
12465 (ada_get_gdb_completer_word_break_characters): Constify.
12466 * completer.c (gdb_completer_command_word_break_characters)
12467 (gdb_completer_file_name_break_characters)
12468 (gdb_completer_quote_characters): Now const arrays.
12469 (get_gdb_completer_quote_characters): Constify.
12470 (set_rl_completer_word_break_characters): New function.
12471 (set_gdb_completion_word_break_characters)
12472 (complete_line_internal): Use it.
12473 * completer.h (get_gdb_completer_quote_characters): Constify.
12474 (set_rl_completer_word_break_characters): Declare.
12475 * f-lang.c (f_word_break_characters): Constify.
12476 * language.c (default_word_break_characters): Constify.
12477 * language.h (language_defn::la_word_break_characters): Constify.
12478 (default_word_break_characters): Constify.
12479 * top.c (init_main): Use set_rl_completer_word_break_characters.
12481 2017-04-05 Pedro Alves <palves@redhat.com>
12483 * aix-thread.c (aix_thread_pid_to_str)
12484 (aix_thread_extra_thread_info): Constify.
12485 * bsd-kvm.c (bsd_kvm_pid_to_str): Constify.
12486 * bsd-uthread.c (bsd_uthread_extra_thread_info)
12487 (bsd_uthread_pid_to_str): Constify.
12488 * corelow.c (core_pid_to_str): Constify.
12489 * darwin-nat.c (darwin_pid_to_str): Constify.
12490 * fbsd-nat.c (fbsd_pid_to_str): Constify.
12491 * fbsd-tdep.c (fbsd_core_pid_to_str, gdbarch_core_pid_to_str):
12493 * gnu-nat.c (gnu_pid_to_str): Constify.
12494 * go32-nat.c (go32_pid_to_str): Constify.
12495 * i386-cygwin-tdep.c (i386_windows_core_pid_to_str): Constify.
12496 * inf-ptrace.c (inf_ptrace_pid_to_str): Constify.
12497 * inferior.c (inferior_pid_to_str): Constify.
12498 * linux-nat.c (linux_nat_pid_to_str): Constify.
12499 * linux-tdep.c (linux_core_pid_to_str): Constify.
12500 * linux-thread-db.c (thread_db_pid_to_str)
12501 (thread_db_extra_thread_info): Constify.
12502 * nto-tdep.c (nto_extra_thread_info): Constify.
12503 * nto-tdep.h (nto_extra_thread_info): Constify.
12504 * obsd-nat.c (obsd_pid_to_str): Constify.
12505 * procfs.c (procfs_pid_to_str): Constify.
12506 * ravenscar-thread.c (ravenscar_extra_thread_info)
12507 (ravenscar_pid_to_str): Constify.
12508 * remote-sim.c (gdbsim_pid_to_str): Constify.
12509 * remote.c (remote_threads_extra_info, remote_pid_to_str):
12511 * sol-thread.c (solaris_pid_to_str): Constify.
12512 * sol2-tdep.c (sol2_core_pid_to_str): Constify.
12513 * sol2-tdep.h (sol2_core_pid_to_str): Constify.
12514 * target.c (default_pid_to_str, target_pid_to_str)
12515 (normal_pid_to_str, default_pid_to_str): Constify.
12516 * target.h (target_ops::to_pid_to_str)
12517 (target_ops::to_extra_thread_info): Constify.
12518 (target_pid_to_str, normal_pid_to_str): Constify.
12519 * windows-nat.c (windows_pid_to_str): Constify.
12520 * gdbarch.sh (core_pid_to_str): Constify.
12521 * target-delegates.c: Regenerate.
12522 * gdbarch.h, gdbarch.c: Regenerate.
12524 2017-04-05 Pedro Alves <palves@redhat.com>
12526 * main.c (captured_main_1): Use gdb::unique_xmalloc_ptr to manage
12527 the memory of the temporary warning_pre_print override.
12528 * utils.c (warning_pre_print): Constify.
12529 * utils.h (warning_pre_print): Constify.
12531 2017-04-05 Pedro Alves <palves@redhat.com>
12533 * cli/cli-cmds.c (shell_escape): Constify 'arg' parameter.
12534 (shell_command): New function.
12535 (make_command): Use std::string.
12536 (init_cli_cmds): Register shell_command instead of shell_escape.
12538 2017-04-05 Pedro Alves <palves@redhat.com>
12540 * breakpoint.c (dprintf_function, dprintf_channel): Don't initialize.
12541 * tracepoint.c (default_collect): Don't initialize.
12543 2017-04-05 Pedro Alves <palves@redhat.com>
12545 * macroexp.c (macro_buffer::shared): Now a bool.
12546 (init_buffer): Update.
12547 (init_shared_buffer): Constify 'addr' parameter.
12548 (substitute_args, expand, macro_expand, macro_expand_next): Remove
12551 2017-04-05 Pedro Alves <palves@redhat.com>
12553 * arm-tdep.c (show_disassembly_style_sfunc): Constify local.
12554 * disasm.c (set_disassembler_options): Constify local.
12555 * i386-tdep.c (i386_print_insn): Remove cast and FIXME comment.
12557 2017-04-05 Sergio Durigan Junior <sergiodj@redhat.com>
12560 * tracefile.c (tsave_command): Fix argument parsing for '-r'
12563 2017-04-05 Yao Qi <yao.qi@linaro.org>
12565 * frame.c (frame_unwind_register_unsigned): Call
12566 frame_unwind_register_value.
12568 2017-04-05 Yao Qi <yao.qi@linaro.org>
12570 * gdb.threads/thread-specific-bp.exp (check_thread_specific_breakpoint):
12571 Use gdb_test_multiple, and don't match anchor.
12573 2017-04-05 Pedro Alves <palves@redhat.com>
12575 * MAINTAINERS (Global Maintainers): Add Simon Marchi.
12576 (Write After Approval): Remove Simon Marchi.
12578 2017-04-05 Pedro Alves <palves@redhat.com>
12580 * common/gdb_optional.h (optional::optional): Make constexpr and
12581 initialize m_dummy.
12583 2017-04-04 John Baldwin <jhb@FreeBSD.org>
12585 * amd64-fbsd-tdep.c: Remove "bsd-uthread.h" include.
12586 (amd64fbsd_jmp_buf_reg_offset): Remove.
12587 (amd64fbsd_supply_uthread): Remove function.
12588 (amd64fbsd_collect_uthread): Remove function.
12589 (amd64fbsd_init_abi): Don't set bsd-uthread callbacks.
12590 * configure.tgt (i[34567]86-*-freebsd*): Remove bsd-uthread.o.
12591 (x86_64-*-freebsd*): Remove bsd-uthread.o.
12592 (fbsd-nat.c): Update comment.
12593 * i386-fbsd-tdep.c: Remove "bsd-uthread.h" include.
12594 (i386fbsd_jmp_buf_reg_offset): Remove.
12595 (i386fbsd_supply_uthread): Remove function.
12596 (i386fbsd_collect_uthread): Remove function.
12597 (i386fbsd_init_abi): Don't set bsd-uthread callbacks.
12599 2017-04-04 John Baldwin <jhb@FreeBSD.org>
12601 * Makefile.in (ALL_64_TARGET_OBS): Remove alpha-fbsd-tdep.o.
12602 (ALLDEPFILES): Remove alpha-fbsd-tdep.c
12603 * NEWS: Mention that support for FreeBSD/alpha was removed.
12604 * alpha-fbsd-tdep.c: Delete file.
12605 * config/alpha/fbsd.mh: Delete file.
12606 * configure.host: Delete alpha*-*-freebsd* and
12607 alpha*-*-kfreebsd*-gnu.
12608 * configure.tgt: Delete alpha*-*-freebsd* and
12609 alpha*-*-kfreebsd*-gnu.
12611 2017-04-04 John Baldwin <jhb@FreeBSD.org>
12613 * amd64-bsd-nat.c (amd64bsd_fetch_inferior_registers,
12614 amd64bsd_store_inferior_registers): Use ptid from regcache.
12616 2017-04-04 Pedro Alves <palves@redhat.com>
12618 * dwarf2read.c (lnp_state_machine): Now a class. Initialize all
12619 data fields, make them private and add "m_" prefixes.
12620 (lnp_state_machine::lnp_state_machine): New ctor.
12621 (record_line, check_line_address, handle_set_discriminator)
12622 (handle_set_address, handle_advance_pc, handle_special_opcode)
12623 (handle_advance_line, handle_set_file, handle_negate_stmt)
12624 (handle_const_add_pc, handle_fixed_advance_pc, handle_copy)
12625 (end_sequence, advance_line): New methods.
12626 (m_gdbarch, m_record_lines_p): New fields.
12627 (lnp_reader_state): Delete.
12628 (dwarf_record_line): Rename to ...
12629 (lnp_state_machine::record_line): ... adjust.
12630 (init_lnp_state_machine): Delete.
12631 (lnp_state_machine::lnp_state_machine): New.
12632 (check_line_address): Rename to ...
12633 (lnp_state_machine::check_line_address): This.
12634 (dwarf_decode_lines_1): Remove reference to "reader_state".
12635 Adjust lnp_state_machine having a non-default ctor. Use bool.
12636 State machine internal state manipulation moved to
12637 lnp_state_machine methods.
12639 2017-04-04 Pedro Alves <palves@redhat.com>
12641 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
12642 unittests/offset-type-selftests.c.
12643 (SUBDIR_UNITTESTS_OBS): Add offset-type-selftests.o.
12644 * common/offset-type.h: New file.
12645 * common/preprocessor.h: New file.
12646 * common/traits.h: New file.
12647 * common/valid-expr.h: New file.
12648 * dwarf2expr.c: Include "common/underlying.h". Adjust to use
12649 sect_offset and cu_offset strong typedefs throughout.
12650 * dwarf2expr.h: Adjust to use sect_offset and cu_offset strong
12651 typedefs throughout.
12652 * dwarf2loc.c: Include "common/underlying.h". Adjust to use
12653 sect_offset and cu_offset strong typedefs throughout.
12654 * dwarf2read.c: Adjust to use sect_offset and cu_offset strong
12655 typedefs throughout.
12656 * gdbtypes.h: Include "common/offset-type.h".
12657 (cu_offset): Now an offset type (strong typedef) instead of a
12659 (sect_offset): Likewise.
12660 (union call_site_parameter_u): Rename "param_offset" field to
12662 * unittests/offset-type-selftests.c: New file.
12664 2017-04-04 Pedro Alves <palves@redhat.com>
12666 * common/underlying.h: New file.
12667 * dwarf2read.c: Include "common/gdb_optional.h" and
12668 "common/underlying.h".
12669 (dir_index, file_name_index): New types.
12670 (file_entry): Use them.
12671 (file_entry::include): Use to_underlying.
12672 (line_header::add_file_name): Use dir_index.
12673 (read_formatted_entries): Use gdb::optional. Read form before
12674 writting to file_entry.
12675 (dwarf_decode_line_header): Use dir_index.
12676 (lnp_state_machine::current_file): Use to_underlying.
12677 (lnp_state_machine::file): Change type to file_name_index.
12678 (dwarf_record_line): Use to_underlying.
12679 (init_lnp_state_machine): Use file_name_index.
12680 (dwarf_decode_lines_1): Use dir_index and file_name_index.
12682 2017-04-04 Pedro Alves <palves@redhat.com>
12684 * common/gdb_optional.h (gdb::optiona): Add operator->, operator*,
12685 operator bool, has_value and get methods.
12687 2017-04-04 Pedro Alves <palves@redhat.com>
12689 * dwarf2read.c (struct file_entry): Add ctors, and initialize all
12691 (line_header): Initialize all data fields. Change type of
12692 standard_opcode_lengths to std::unique_ptr<unsigned char[]>.
12693 Change type of include_dirs to std::vector<const char *>. Remove
12694 num_include_dirs, include_dirs_size. Change type of file_names to
12695 std::vector<file_entry>. Remove num_file_names, file_names_size.
12696 (line_header::line_header): New.
12697 (line_header::add_include_dir, line_header::add_file_name): New
12699 (line_header::include_dir_at): Remove NULL check.
12700 (line_header::file_name_at): Add const overload.
12701 (line_header_up): New unique_ptr typedef.
12702 (dw2_get_file_names_reader): Use line_header_up. Adjust to use
12703 std::vector. Remove free_line_header call.
12704 (dwarf2_build_include_psymtabs): Use line_header_up. Remove
12705 free_line_header call.
12706 (free_cu_line_header): Delete.
12707 (handle_DW_AT_stmt_list, handle_DW_AT_stmt_list)
12708 (setup_type_unit_groups): Use line_header_up instead of cleanups.
12709 Adjust to use std::vector.
12710 (free_line_header): Delete.
12711 (free_line_header_voidp): Use delete.
12712 (add_include_dir): Replace with ...
12713 (line_header::add_include_dir): ... this method. Use std::vector.
12714 (add_file_name): Replace with ...
12715 (line_header::add_file_name): ... this method. Use std::vector.
12716 (add_include_dir_stub): Delete.
12717 (read_formatted_entries): Remove memset.
12718 (dwarf_decode_line_header): Return a line_header_up instead of a
12719 raw pointer. Remove cleanup handling. Pass lambdas to
12720 read_formatted_entries. Adjust to use line_header methods.
12721 (dwarf_decode_lines_1): Adjust to use line_header methods.
12722 (dwarf_decode_lines, file_file_name, file_full_name): Adjust to
12725 2017-04-04 Simon Marchi <simon.marchi@polymtl.ca>
12727 * remote.c (set_general_thread, set_continue_thread): Use ptid_t
12728 instead of struct ptid.
12730 2017-05-04 Alan Hayward <alan.hayward@arm.com>
12732 * frame.c (get_frame_register_bytes): Unwind using value.
12733 (put_frame_register_bytes): Likewise.
12735 2017-03-30 Iain Buclaw <ibuclaw@gdcproject.org>
12737 * d-exp.y (type_aggregate_p): Treat TYPE_CODE_MODULE as being
12740 2017-03-29 Jan Kratochvil <jan.kratochvil@redhat.com>
12742 * auto-load.c (auto_load_section_scripts): Check SEC_HAS_CONTENTS.
12744 2017-03-29 Yao Qi <yao.qi@linaro.org>
12746 * gdbthread.h (struct thread_info): Declare constructor and
12747 destructor. Add some in-class member initializers.
12748 * thread.c (free_thread): Remove.
12749 (init_thread_list): Call delete instead of free_thread.
12750 (new_thread): Call thread_info constructor.
12751 (thread_info::thread_info): New function.
12752 (thread_info::~thread_info): New function.
12753 (delete_thread_1): Call delete instead of free_thread.
12754 (make_cleanup_restore_current_thread): Move tp and frame to
12757 2017-03-28 Anton Kolesov <anton.kolesov@synopsys.com>
12759 * arc-tdep.c (arc_frame_cache): Add support for prologue analysis.
12760 (arc_skip_prologue): Likewise.
12761 (arc_make_frame_cache): Likewise.
12762 (arc_pv_get_operand): New function.
12763 (arc_is_in_prologue): Likewise.
12764 (arc_analyze_prologue): Likewise.
12765 (arc_print_frame_cache): Likewise.
12766 (MAX_PROLOGUE_LENGTH): New constant.
12768 2017-03-28 Anton Kolesov <anton.kolesov@synopsys.com>
12770 * configure.tgt: Add arc-insn.o.
12771 * arc-tdep.c (arc_delayed_print_insn): Make non-static.
12772 (dump_arc_instruction_command): New function.
12773 (arc_fprintf_disasm): Likewise.
12774 (arc_disassemble_info): Likewise.
12775 (arc_insn_get_operand_value): Likewise.
12776 (arc_insn_get_operand_value_signed): Likewise.
12777 (arc_insn_get_memory_base_reg): Likewise.
12778 (arc_insn_get_memory_offset): Likewise.
12779 (arc_insn_get_branch_target): Likewise.
12780 (arc_insn_dump): Likewise.
12781 (arc_insn_get_linear_next_pc): Likewise.
12782 * arc-tdep.h (arc_delayed_print_insn): Add function declaration.
12783 (arc_disassemble_info): Likewise.
12784 (arc_insn_get_branch_target): Likewise.
12785 (arc_insn_get_linear_next_pc): Likewise.
12786 * NEWS: Mention new "maint print arc arc-instruction".
12788 2017-03-28 Anton Kolesov <anton.kolesov@synopsys.com>
12790 * arc-tdep (maintenance_print_arc_list): New variable.
12791 (maintenance_print_arc_command): New function.
12793 2017-03-28 Anton Kolesov <anton.kolesov@synopsys.com>
12795 * arc-tdep.c (core_v2_register_names, core_arcompact_register_names)
12796 Add "limm" and "reserved".
12797 (arc_cannot_fetch_register, arc_cannot_store_register): Add
12798 ARC_RESERVED_REGNUM and ARC_LIMM_REGNUM.
12799 * arc-tdep.h (arc_regnum): Likewise.
12801 2017-03-27 Max Filippov <jcmvbkbc@gmail.com>
12803 * xtensa-linux-nat.c (fill_gregset): Call regcache_raw_collect
12804 for THREADPTR register.
12805 (supply_gregset_reg): Call regcache_raw_supply for THREADPTR
12807 * xtensa-tdep.c (XTENSA_DBREGN_UREG): New definition.
12808 (xtensa_derive_tdep): Initialize tdep->threadptr_regnum.
12809 * xtensa-tdep.h (gdbarch_tdep::threadptr_regnum): New field.
12811 2017-03-27 Max Filippov <jcmvbkbc@gmail.com>
12813 * xtensa-tdep.c (xtensa_pseudo_register_read): Treat all
12814 registers above gdbarch_num_regs (gdbarch) as privileged in
12817 2017-03-27 Max Filippov <jcmvbkbc@gmail.com>
12819 * xtensa-linux-nat.c (fill_gregset): Call regcache_raw_collect
12820 for a single specified register or for all registers in
12821 a0_base..a0_base + C0_NREGS range.
12822 (supply_gregset_reg): Call regcache_raw_supply for a single
12823 specified register or for all registers in a0_base..a0_base +
12826 2017-03-27 Max Filippov <jcmvbkbc@gmail.com>
12828 * arch/xtensa.h (C0_NREGS): Add definition.
12829 * xtensa-tdep.c (C0_NREGS): Remove definition.
12831 2017-03-27 Max Filippov <jcmvbkbc@gmail.com>
12833 * xtensa-tdep.c (xtensa_scan_prologue, call0_analyze_prologue):
12834 Drop xtensa_default_isa initialization.
12835 (xtensa_gdbarch_init): Initialize xtensa_default_isa.
12837 2017-03-27 Pedro Alves <palves@redhat.com>
12839 * dwarf2read.c (file_entry) <dir_index>: Add comment.
12840 (file_entry::include_dir): New method.
12841 (line_header::include_dir_at, line_header::file_name_at): New
12843 (setup_type_unit_groups, setup_type_unit_groups)
12844 (psymtab_include_file_name): Simplify using the new methods.
12845 (lnp_state_machine) <the_line_header>: New field.
12846 <file>: Add comment.
12847 (lnp_state_machine::current_file): New method.
12848 (dwarf_record_line): Simplify using the new methods.
12849 (init_lnp_state_machine): Initialize the "the_line_header" field.
12850 (dwarf_decode_lines_1, dwarf_decode_lines, file_file_name):
12851 Simplify using the new methods.
12853 2017-03-27 Pedro Alves <palves@redhat.com>
12855 * cp-name-parser.y (make_empty): Delete.
12856 (demangler_special, nested_name, ptr_operator, array_indicator)
12857 (direct_declarator, declarator_1): Use fill_comp instead of
12860 2017-03-27 Pedro Alves <palves@redhat.com>
12862 * xml-support.h (gdb_xml_debug): Pass a "first-to-check" argument
12863 to ATTRIBUTE_PRINTF.
12864 * solib-target.c (library_list_start_list): Print "string" not
12866 * xml-tdesc.c (tdesc_start_field): Pass "field_name" to
12867 gdb_xml_error call.
12869 2017-03-27 Pedro Alves <palves@redhat.com>
12871 * dwarf2read.c (struct file_and_directory): New.
12872 (dwarf2_get_dwz_file): Adjust to use std::string.
12873 (dw2_get_file_names_reader): Adjust to use file_and_directory.
12874 (find_file_and_directory): Adjust to return a file_and_directory
12876 (read_file_scope): Adjust to use file_and_directory. Remove
12877 make_cleanup/do_cleanups calls.
12878 (open_and_init_dwp_file): Adjust to use std::string. Remove
12879 make_cleanup/do_cleanups calls.
12880 * python/python.c (do_start_initialization): Adjust to ldirname
12881 returning a std::string.
12882 * utils.c (ldirname): Now returns a std::string.
12883 * utils.h (ldirname): Change return type to std::string.
12884 * xml-syscall.c (xml_init_syscalls_info): Adjust to ldirname
12885 returning a std::string.
12886 * xml-tdesc.c (file_read_description_xml): Likewise.
12888 2017-03-24 Alan Hayward <alan.hayward@arm.com>
12890 * regcache.c (regcache_debug_print_register): New function.
12891 * regcache.h (regcache_debug_print_register): New declaration.
12892 * target.c (debug_print_register): Remove.
12893 (target_fetch_registers): Call regcache_debug_print_register.
12894 (target_store_registers): Likewise.
12896 2017-03-24 Pádraig Brady <pbrady@fb.com>
12898 * dwarf2read.c (setup_type_unit_groups): Ensure dir_index doesn't
12899 reference beyond the 'lh->include_dirs' array before accessing to
12901 (psymtab_include_file_name): Likewise.
12902 (dwarf_decode_lines_1): Likewise.
12903 (dwarf_decode_lines): Likewise.
12904 (file_file_name): Likewise.
12906 2017-03-23 Simon Marchi <simon.marchi@ericsson.com>
12908 * fbsd-tdep.c (fbsd_corefile_thread): Don't set/restore
12910 * proc-service.c (ps_lgetregs, ps_lsetregs, ps_lgetfpregs,
12911 ps_lsetfpregs): Likewise.
12912 * regcache.c (regcache_raw_update, regcache_raw_write): Likewise.
12913 * sol-thread.c (ps_lgetregs, ps_lsetregs, ps_lgetfpregs,
12914 ps_lsetfpregs): Likewise.
12915 * target.c (target_fetch_registers, target_store_registers):
12918 2017-03-23 Alan Hayward <alan.hayward@arm.com>
12920 * sol-thread.c (sol_thread_store_registers): Remove regcache calls.
12922 2017-03-23 Yao Qi <yao.qi@linaro.org>
12924 * aarch64-tdep.c (aarch64_process_record_test): Declare.
12925 (_initialize_aarch64_tdep): Register it.
12926 (aarch64_record_load_store): Handle PRFM instruction.
12927 (aarch64_process_record_test): New function.
12929 2017-03-23 Yao Qi <yao.qi@linaro.org>
12931 * aarch64-tdep.c (aarch64_record_load_store): Fix code
12934 2017-03-23 Yao Qi <yao.qi@linaro.org>
12936 * aarch64-tdep.c: Remove AARCH64_RECORD_FAILURE.
12938 2017-03-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
12940 python/python.c (do_start_initialization): Fix memory leak.
12942 2017-03-22 Simon Marchi <simon.marchi@polymtl.ca>
12944 * inf-ptrace.c (inf_ptrace_xfer_partial): Get pid from ptid
12945 using get_ptrace_pid.
12946 * linux-nat.c (linux_nat_xfer_partial): Don't set/restore
12948 (linux_proc_xfer_partial, linux_proc_xfer_spu): Use lwp of
12949 inferior_ptid instead of pid.
12951 2017-03-22 Yao Qi <yao.qi@linaro.org>
12953 * aarch64-tdep.c: Wrap locally used classes in anonymous
12955 * arm-tdep.c: Likewise.
12956 * linespec.c: Likewise.
12957 * ui-out.c: Likewise.
12959 2017-03-22 Jonah Graham <jonah@kichwacoders.com>
12962 * python/lib/gdb/printer/bound_registers.py: Import sys.
12964 2017-03-21 Simon Marchi <simon.marchi@ericsson.com>
12966 * windows-nat.c (do_windows_fetch_inferior_registers): Add
12967 windows_thread_info parameter and use it instead of
12969 (windows_fetch_inferior_registers): Don't set current_thread,
12970 pass the thread to do_windows_fetch_inferior_registers. Use
12971 ptid from regcache instead of inferior_ptid.
12972 (do_windows_store_inferior_registers): Add windows_thread_info
12973 parameter and use it instead of current_thread.
12974 (windows_store_inferior_registers): Don't set current_thread,
12975 pass the thread to do_windows_store_inferior_registers. Use
12976 ptid from regcache instead of inferior_ptid.
12978 2017-03-21 Simon Marchi <simon.marchi@ericsson.com>
12980 * ser-mingw.c (ser_windows_raw): Remove reference to
12981 struct serial::current_timeout.
12983 2017-03-21 Ivo Raisr <ivo.raisr@oracle.com>
12986 * gdb/sparc-tdep.h (gdbarch_tdep) <sparc64_ccr_type>: New field.
12987 * gdb/sparc64-tdep.c (sparc64_ccr_type): New function.
12988 (sparc64_fsr_type): Fix %fsr decoding.
12990 2017-03-21 Tim Wiederhake <tim.wiederhake@intel.com>
12992 * python/py-record-btrace.c (btpy_insn_data): Change return type
12995 2017-03-20 Simon Marchi <simon.marchi@polymtl.ca>
12997 * spu-linux-nat.c (spu_fetch_inferior_registers,
12998 spu_store_inferior_registers): Use ptid from regcache, set and
12999 restore inferior_ptid.
13000 * spu-multiarch.c (spu_fetch_registers, spu_store_registers):
13003 2017-03-20 Simon Marchi <simon.marchi@polymtl.ca>
13005 * i386-linux-nat.c (fetch_register, store_register,
13006 i386_linux_fetch_inferior_registers,
13007 i386_linux_store_inferior_registers): Use ptid from regcache.
13008 * ia64-linux-nat.c (ia64_linux_fetch_register,
13009 ia64_linux_store_register): Likewise.
13010 * inf-ptrace.c (inf_ptrace_fetch_register,
13011 inf_ptrace_store_register): Likewise.
13012 * m32r-linux-nat.c (m32r_linux_fetch_inferior_registers,
13013 m32r_linux_store_inferior_registers): Likewise.
13014 * m68k-bsd-nat.c (m68kbsd_fetch_inferior_registers,
13015 m68kbsd_store_inferior_registers): Likewise.
13016 * m68k-linux-nat.c (fetch_register, store_register,
13017 m68k_linux_fetch_inferior_registers,
13018 m68k_linux_store_inferior_registers): Likewise.
13019 * m88k-bsd-nat.c (m88kbsd_fetch_inferior_registers,
13020 m88kbsd_store_inferior_registers): Likewise.
13021 * mips-fbsd-nat.c (mips_fbsd_fetch_inferior_registers,
13022 mips_fbsd_store_inferior_registers): Likewise.
13023 * mips-linux-nat.c (mips64_linux_regsets_fetch_registers,
13024 mips64_linux_regsets_store_registers): Likewise.
13025 * mips-nbsd-nat.c (mipsnbsd_fetch_inferior_registers,
13026 mipsnbsd_store_inferior_registers): Likewise.
13027 * mips-obsd-nat.c (mips64obsd_fetch_inferior_registers,
13028 mips64obsd_store_inferior_registers): Likewise.
13029 * nto-procfs.c (procfs_fetch_registers, procfs_store_registers):
13031 * ppc-fbsd-nat.c (ppcfbsd_fetch_inferior_registers,
13032 ppcfbsd_store_inferior_registers): Likewise.
13033 * ppc-linux-nat.c (ppc_linux_fetch_inferior_registers,
13034 ppc_linux_store_inferior_registers): Likewise.
13035 * ppc-nbsd-nat.c (ppcnbsd_fetch_inferior_registers,
13036 ppcnbsd_store_inferior_registers): Likewise.
13037 * ppc-obsd-nat.c (ppcobsd_fetch_registers,
13038 ppcobsd_store_registers): Likewise.
13039 * procfs.c (procfs_fetch_registers, procfs_store_registers):
13041 * ravenscar-thread.c (ravenscar_fetch_registers,
13042 ravenscar_store_registers, ravenscar_prepare_to_store):
13044 * record-btrace.c (record_btrace_fetch_registers,
13045 record_btrace_store_registers, record_btrace_prepare_to_store):
13047 * remote-sim.c (gdbsim_fetch_register, gdbsim_store_register):
13048 Lookup inferior using ptid from regcache, instead of
13050 * remote.c (remote_fetch_registers, remote_store_registers): Use
13051 ptid from regcache.
13052 * rs6000-nat.c (fetch_register, store_register): Likewise.
13053 * s390-linux-nat.c (s390_linux_fetch_inferior_registers,
13054 s390_linux_store_inferior_registers): Likewise.
13055 * sh-nbsd-nat.c (shnbsd_fetch_inferior_registers,
13056 shnbsd_store_inferior_registers): Likewise.
13057 * sol-thread.c (sol_thread_fetch_registers,
13058 sol_thread_store_registers): Likewise.
13059 * sparc-nat.c (sparc_fetch_inferior_registers,
13060 sparc_store_inferior_registers): Likewise.
13061 * tilegx-linux-nat.c (fetch_inferior_registers,
13062 store_inferior_registers): Likewise.
13063 * vax-bsd-nat.c (vaxbsd_fetch_inferior_registers,
13064 vaxbsd_store_inferior_registers): Likewise.
13065 * xtensa-linux-nat.c (fetch_gregs, store_gregs, fetch_xtregs,
13066 store_xtregs): Likewise.
13068 2017-03-20 Artemiy Volkov <artemiyv@acm.org>
13071 * NEWS: Mention support for rvalue references in GDB and python.
13072 * doc/gdb.texinfo (C Plus Plus Expressions): Mention that GDB
13073 supports both lvalue and rvalue references.
13075 2017-03-20 Artemiy Volkov <artemiyv@acm.org>
13078 * gdbtypes.c (rank_one_type): Implement overloading
13079 resolution rules regarding rvalue references.
13081 2017-03-20 Artemiy Volkov <artemiyv@acm.org>
13084 * aarch64-tdep.c (aarch64_type_align)
13085 (aarch64_extract_return_value, aarch64_store_return_value): Change
13086 lvalue reference type checks to general reference type checks.
13087 * amd64-tdep.c (amd64_classify): Likewise.
13088 * amd64-windows-tdep.c (amd64_windows_passed_by_integer_register):
13090 * arm-tdep.c (arm_type_align, arm_extract_return_value)
13091 (arm_store_return_value): Likewise.
13092 * ax-gdb.c (gen_fetch, gen_cast): Likewise.
13093 * c-typeprint.c (c_print_type): Likewise.
13094 * c-varobj.c (adjust_value_for_child_access, c_value_of_variable)
13095 (cplus_number_of_children, cplus_describe_child): Likewise.
13096 * compile/compile-c-symbols.c (generate_vla_size): Likewise.
13097 * completer.c (expression_completer): Likewise.
13098 * cp-support.c (make_symbol_overload_list_adl_namespace):
13100 * darwin-nat-info.c (info_mach_region_command): Likewise.
13101 * dwarf2loc.c (entry_data_value_coerce_ref)
13102 (value_of_dwarf_reg_entry): Likewise.
13103 * eval.c (ptrmath_type_p, evaluate_subexp_standard)
13104 (evaluate_subexp_for_address, evaluate_subexp_for_sizeof):
13106 * findvar.c (extract_typed_address, store_typed_address):
13108 * gdbtypes.c (rank_one_type): Likewise.
13109 * hppa-tdep.c (hppa64_integral_or_pointer_p): Likewise.
13110 * infcall.c (value_arg_coerce): Likewise.
13111 * language.c (pointer_type): Likewise.
13112 * m32c-tdep.c (m32c_reg_arg_type, m32c_m16c_address_to_pointer):
13114 * m88k-tdep.c (m88k_integral_or_pointer_p): Likewise.
13115 * mn10300-tdep.c (mn10300_type_align): Likewise.
13116 * msp430-tdep.c (msp430_push_dummy_call): Likewise.
13117 * ppc-sysv-tdep.c (do_ppc_sysv_return_value)
13118 (ppc64_sysv_abi_push_param, ppc64_sysv_abi_return_value):
13120 * printcmd.c (print_formatted, x_command): Likewise.
13121 * python/py-type.c (typy_get_composite, typy_template_argument):
13123 * python/py-value.c (valpy_referenced_value)
13124 (valpy_get_dynamic_type, value_has_field): Likewise.
13125 * s390-linux-tdep.c (s390_function_arg_integer): Likewise.
13126 * sparc-tdep.c (sparc_integral_or_pointer_p): Likewise.
13127 * sparc64-tdep.c (sparc64_integral_or_pointer_p): Likewise.
13128 * spu-tdep.c (spu_scalar_value_p): Likewise.
13129 * symtab.c (lookup_symbol_aux): Likewise.
13130 * typeprint.c (whatis_exp, print_type_scalar): Likewise.
13131 * valarith.c (binop_types_user_defined_p, unop_user_defined_p):
13133 * valops.c (value_cast_pointers, value_cast)
13134 (value_reinterpret_cast, value_dynamic_cast, value_addr, typecmp)
13135 (value_struct_elt, value_struct_elt_bitpos)
13136 (value_find_oload_method_list, find_overload_match)
13137 (value_rtti_indirect_type): Likewise.
13138 * valprint.c (val_print_scalar_type_p, generic_val_print):
13140 * value.c (value_actual_type, value_as_address, unpack_long)
13141 (pack_long, pack_unsigned_long, coerce_ref_if_computed)
13142 (coerce_ref): Likewise.
13143 * varobj.c (varobj_get_value_type): Likewise.
13145 2017-03-20 Artemiy Volkov <artemiyv@acm.org>
13148 * doc/python.texi (Types in Python): Add TYPE_CODE_RVALUE_REF to
13149 table of constants.
13150 * python/lib/gdb/command/explore.py: Support exploring values
13151 of rvalue reference types.
13152 * python/lib/gdb/types.py: Implement get_basic_type() for
13153 rvalue reference types.
13154 * python/py-type.c (pyty_codes) <TYPE_CODE_RVALUE_REF>: New
13156 * python/py-value.c (valpy_getitem): Add an rvalue reference
13158 (valpy_reference_value): Add new parameter "refcode".
13159 (valpy_lvalue_reference_value, valpy_rvalue_reference_value):
13160 New wrappers for valpy_reference_value().
13161 * python/py-xmethods.c (gdbpy_get_xmethod_result_type)
13162 (gdbpy_invoke_xmethod): Likewise.
13164 2017-03-20 Artemiy Volkov <artemiyv@acm.org>
13167 * dwarf2read.c (process_die, read_type_die_1): Handle the
13168 DW_TAG_rvalue_reference_type DIE.
13169 (read_tag_reference_type): Add new parameter "refcode".
13171 2017-03-20 Artemiy Volkov <artemiyv@acm.org>
13174 * c-typeprint.c (c_print_type, c_type_print_varspec_prefix)
13175 (c_type_print_modifier, c_type_print_varspec_suffix)
13176 (c_type_print_base): Support printing rvalue reference types.
13177 * c-valprint.c (c_val_print, c_value_print): Support printing
13178 rvalue reference values.
13180 2017-03-20 Artemiy Volkov <artemiyv@acm.org>
13183 * cp-name-parser.y (ptr_operator): Handle the '&&' token in
13185 * cp-support.c (replace_typedefs): Handle
13186 DEMANGLE_COMPONENT_RVALUE_REFERENCE.
13187 * python/py-type.c (typy_lookup_type): Likewise.
13189 2017-03-20 Artemiy Volkov <artemiyv@acm.org>
13192 * c-exp.y (ptr_operator): Handle the '&&' token in the typename.
13193 * parse.c (insert_type): Change assert statement.
13194 (follow_types): Handle rvalue reference types.
13195 * parser-defs.h (enum type_pieces) <tp_rvalue_reference>: New
13198 2017-03-20 Artemiy Volkov <artemiyv@acm.org>
13201 * ada-lang.c (ada_evaluate_subexp): Adhere to the new
13202 value_ref() interface.
13203 * c-valprint.c (c_value_print): Likewise.
13204 * infcall.c (value_arg_coerce): Likewise.
13205 * python/py-value.c (valpy_reference_value): Likewise.
13206 * valops.c (value_cast, value_reinterpret_cast)
13207 (value_dynamic_cast, typecmp): Likewise.
13208 (value_ref): Parameterize by kind of return value reference type.
13209 * value.h (value_ref): Add new parameter "refcode".
13211 2017-03-20 Artemiy Volkov <artemiyv@acm.org>
13214 * dwarf2read.c (read_tag_reference_type): Use
13215 lookup_lvalue_reference_type() instead of lookup_reference_type().
13216 * eval.c (evaluate_subexp_standard): Likewise.
13217 * f-exp.y: Likewise.
13218 * gdbtypes.c (make_reference_type, lookup_reference_type):
13219 Generalize with rvalue reference types.
13220 (lookup_lvalue_reference_type, lookup_rvalue_reference_type): New
13221 convenience wrappers for lookup_reference_type().
13222 * gdbtypes.h (make_reference_type, lookup_reference_type): Add a
13223 reference kind parameter.
13224 (lookup_lvalue_reference_type, lookup_rvalue_reference_type): Add
13225 wrappers for lookup_reference_type().
13226 * guile/scm-type.c (gdbscm_type_reference): Use
13227 lookup_lvalue_reference_type() instead of lookup_reference_type().
13228 * guile/scm-value.c (gdbscm_value_dynamic_type): Likewise.
13229 * parse.c (follow_types): Likewise.
13230 * python/py-type.c (typy_reference, typy_lookup_type): Likewise.
13231 * python/py-value.c (valpy_get_dynamic_type, valpy_getitem):
13233 * python/py-xmethods.c (gdbpy_get_xmethod_result_type)
13234 (gdbpy_invoke_xmethod): Likewise.
13235 * stabsread.c: Provide extra argument to make_reference_type()
13237 * valops.c (value_ref, value_rtti_indirect_type): Use
13238 lookup_lvalue_reference_type() instead of lookup_reference_type().
13240 2017-03-20 Artemiy Volkov <artemiyv@acm.org>
13243 * gdbtypes.h (enum type_code) <TYPE_CODE_RVALUE_REF>: New constant.
13244 (TYPE_IS_REFERENCE): New macro.
13245 (struct type): Add rvalue_reference_type field.
13246 (TYPE_RVALUE_REFERENCE_TYPE): New macro.
13248 2017-03-20 Marc-Andre Laperle <marc-andre.laperle@ericsson.com>
13250 * NEWS: Add an entry about new '-file-list-shared-libraries' command.
13251 * mi/mi-cmd-file.c (mi_cmd_file_list_shared_libraries):
13252 New function definition.
13253 * mi/mi-cmds.c (mi_cmds): Add -file-list-shared-libraries command.
13254 * mi/mi-cmds.h (mi_cmd_file_list_shared_libraries):
13255 New function declaration.
13256 * mi/mi-interp.c (mi_output_solib_attribs): New Function.
13257 * mi/mi-interp.h: New file.
13258 * solib.c (info_sharedlibrary_command): Replace for loop with
13260 * solib.h (update_solib_list): New function declaration.
13261 (so_list_head): Move macro.
13262 * solist.h (ALL_SO_LIBS): New macro.
13264 2017-03-20 Marc-Andre Laperle <marc-andre.laperle@ericsson.com>
13266 * infcmd.c (post_create_inferior): Remove unused argument in
13268 * remote.c (remote_start_remote): Likewise.
13269 * solib-frv.c (frv_fetch_objfile_link_map): Likewise.
13270 * solib-svr4.c: (svr4_fetch_objfile_link_map): Likewise.
13271 (enable_break): Likewise.
13272 * solib.c (update_solib_list): Remove unused target argument
13273 and its documentation.
13274 (solib_add): Remove unused target argument. Remove unused
13275 argument in call to update_solib_list.
13276 (info_sharedlibrary_command): Remove unused argument in call
13277 to update_solib_list.
13278 (sharedlibrary_command): Remove unused argument in call to
13280 (handle_solib_event): Likewise.
13281 (reload_shared_libraries): Likewise.
13282 * solib.h (solib_add): Remove unused target argument.
13284 2017-03-20 Andreas Arnez <arnez@linux.vnet.ibm.com>
13286 * s390-linux-tdep.c (is_rsi, is_rie): Remove functions.
13287 (s390_displaced_step_fixup): Cover relative branches with the
13288 default fixup handling. This fixes lack of support for some
13289 relative branch instructions.
13291 2017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
13293 * i386-gnu-nat.c (gnu_fetch_registers, gnu_store_registers): Use
13294 ptid from regcache.
13296 2017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
13298 * i386-darwin-nat.c (i386_darwin_fetch_inferior_registers,
13299 i386_darwin_store_inferior_registers): Use ptid from regcache.
13301 2017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
13303 * i386-bsd-nat.c (i386bsd_fetch_inferior_registers,
13304 i386bsd_store_inferior_registers): Use ptid from regcache.
13306 2017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
13308 * hppa-obsd-nat.c (hppaobsd_fetch_registers,
13309 hppaobsd_store_registers): Use ptid from regcache.
13311 2017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
13313 * hppa-nbsd-nat.c (hppanbsd_fetch_registers,
13314 hppanbsd_store_registers): Use ptid from regcache.
13316 2017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
13318 * hppa-linux-nat.c (fetch_register, store_register): Use ptid
13319 from regcache. Use get_ptrace_pid.
13321 2017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
13323 * corelow.c (get_core_register_section): Use ptid from regcache,
13326 2017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
13328 * bsd-uthread.c (bsd_uthread_fetch_registers,
13329 bsd_uthread_store_registers): Use ptid from regcache, set and
13330 restore inferior_ptid.
13332 2017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
13334 * arm-nbsd-nat.c (fetch_register, fetch_regs, fetch_fp_register,
13335 fetch_fp_regs, store_register, store_regs, store_fp_register,
13336 store_fp_regs): Use ptid from regcache.
13338 2017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
13340 * arm-linux-nat.c (fetch_fpregs, store_fpregs, fetch_regs,
13341 store_regs, fetch_wmmx_regs, store_wmmx_regs, fetch_vfp_regs,
13342 store_vfp_regs): Use ptid from regcache.
13344 2017-03-17 Pedro Alves <palves@redhat.com>
13347 * ser-base.c (ser_base_wait_for): Add comment.
13348 (do_ser_base_readchar): Improve comment based on the ser-unix.c's
13350 * ser-unix.c (hardwire_raw): Remove reference to
13351 scb->current_timeout.
13352 (wait_for, do_hardwire_readchar, hardwire_readchar): Delete.
13353 (hardwire_ops): Install ser_base_readchar instead of
13355 * serial.h (struct serial) <current_timeout, timeout_remaining>:
13358 2017-03-17 Jonah Graham <jonah@kichwacoders.com>
13361 * python/lib/gdb/printer/bound_registers.py: Add support for
13364 2017-03-16 Andreas Arnez <arnez@linux.vnet.ibm.com>
13366 * dwarf2loc.c (indirect_synthetic_pointer): Get data type of
13367 pointed-to DIE and pass it to dwarf2_evaluate_loc_desc_full.
13368 (dwarf2_evaluate_loc_desc_full): New parameter subobj_type; rename
13369 byte_offset to subobj_byte_offset. Fix the handling of
13370 DWARF_VALUE_STACK on big-endian targets when coming via an
13372 (dwarf2_evaluate_loc_desc): Adjust call to
13373 dwarf2_evaluate_loc_desc_full.
13374 * dwarf2loc.h (dwarf2_fetch_die_type_sect_off): New declaration.
13375 * dwarf2read.c (dwarf2_fetch_die_type_sect_off): New function.
13377 2017-03-16 Yao Qi <yao.qi@linaro.org>
13379 * arm-tdep.c (thumb_record_misc): Decode CBNZ, CBZ, REV16,
13380 and REVSH instructions.
13382 2017-03-16 Yao Qi <yao.qi@linaro.org>
13384 * arm-tdep.c [GDB_SELF_TEST]: include "selftests.h".
13385 (arm_record_test): Declare.
13386 (_initialize_arm_tdep) [GDB_SELF_TEST]: call register_self_test.
13387 (thumb_record_ld_st_reg_offset): Rewrite the opcode matching to
13388 align with the manual.
13389 (thumb_record_misc): Adjust the code order to align with the
13391 (thumb2_record_decode_insn_handler): Fix instruction matching.
13392 (instruction_reader_thumb): New class.
13393 (arm_record_test): New function.
13395 2017-03-16 Yao Qi <yao.qi@linaro.org>
13397 * arm-tdep.c (abstract_memory_reader): New class.
13398 (instruction_reader): New class.
13399 (extract_arm_insn): Add argument 'reader'. Callers updated.
13400 (decode_insn): Likewise.
13402 2017-03-16 Doug Evans <dje@google.com>
13404 * guile/scm-lazy-string.c (lazy_string_smob): Clarify use of LENGTH
13405 member. Change type of TYPE member to SCM. All uses updated.
13406 (lsscm_make_lazy_string_smob): Add assert.
13407 (lsscm_make_lazy_string): Flag bad length values.
13408 (lsscm_elt_type): New function.
13409 (gdbscm_lazy_string_to_value): Rewrite to use
13410 lsscm_safe_lazy_string_to_value.
13411 (lsscm_safe_lazy_string_to_value): Fix handling of TYPE_CODE_PTR.
13412 * guile/scm-value.c (gdbscm_value_to_lazy_string): Flag bad length
13413 values. Fix TYPE_CODE_PTR. Handle TYPE_CODE_ARRAY. Handle typedefs
13415 * guile/guile-internal.h (tyscm_scm_to_type): Declare.
13416 * guile/scm-type.c (tyscm_scm_to_type): New function.
13418 2017-03-15 Doug Evans <dje@google.com>
13420 PR python/17728, python/18439, python/18779
13421 * python/py-lazy-string.c (lazy_string_object): Clarify use of LENGTH
13422 member. Change type of TYPE member to PyObject *. All uses updated.
13423 (stpy_convert_to_value): Fix handling of TYPE_CODE_PTR.
13424 (gdbpy_create_lazy_string_object): Flag bad length values.
13425 Handle TYPE_CODE_ARRAY with possibly different user-provided length.
13426 Handle typedefs in incoming type.
13427 (stpy_lazy_string_elt_type): New function.
13428 (gdbpy_extract_lazy_string): Call it.
13429 * python/py-value.c (valpy_lazy_string): Flag bad length values.
13430 Fix handling of TYPE_CODE_PTR. Handle TYPE_CODE_ARRAY. Handle
13431 typedefs in incoming type.
13433 2017-03-16 Doug Evans <dje@google.com>
13435 * guile/guile-internal.h (tyscm_scm_to_type): Declare.
13436 * guile/scm-type.c (tyscm_scm_to_type): New function.
13438 2017-03-16 Jiong Wang <jiong.wang@arm.com>
13440 * inf-ptrace.c (inf_ptrace_peek_poke): Change the type to
13441 "ULONGEST" for "skip".
13443 2017-03-14 Andreas Arnez <arnez@linux.vnet.ibm.com>
13446 * inf-ptrace.c (inf_ptrace_xfer_partial): In "case
13447 TARGET_OBJECT_MEMORY", extract the logic for ptrace peek/poke...
13448 (inf_ptrace_peek_poke): ...here. New function. Now also loop
13449 over ptrace peek/poke until end of buffer or error.
13451 2017-03-14 Simon Marchi <simon.marchi@ericsson.com>
13453 * parse.c (length_of_subexp): Make static.
13454 * parser-defs.h (length_of_subexp): Remove.
13456 2017-03-14 Andreas Arnez <arnez@linux.vnet.ibm.com>
13458 * linux-nat.c (linux_proc_xfer_partial): Handle write operations
13461 2017-03-14 Pedro Alves <palves@redhat.com>
13463 * cp-name-parser.y (cp_demangled_name_to_comp): Update comment.
13464 (main): Use std::unique_ptr. Remove calls to
13465 cp_demangled_name_parse_free.
13467 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
13469 * alpha-bsd-nat.c (alphabsd_fetch_inferior_registers,
13470 alphabsd_store_inferior_registers): Use regcache->ptid instead
13473 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
13475 * aix-thread.c (aix_thread_fetch_registers,
13476 aix_thread_store_registers): Use regcache->ptid instead of
13479 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
13481 * aarch64-linux-nat.c (fetch_gregs_from_thread,
13482 store_gregs_to_thread, fetch_fpregs_from_thread,
13483 store_fpregs_to_thread): Use regcache->ptid instead of
13486 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
13488 * amd64-linux-nat.c (amd64_linux_fetch_inferior_registers,
13489 amd64_linux_fetch_inferior_registers): Use regcache->ptid
13490 instead of inferior_ptid.
13492 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
13494 * target.c (target_fetch_registers, target_store_registers): Add
13497 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
13499 * regcache.h (regcache_get_ptid): New function.
13500 * regcache.c (regcache_get_ptid): New function.
13502 2017-03-13 Mark Wielaard <mark@klomp.org>
13504 * cp-name-parser.y (make_empty): Initialize d_printing to zero.
13506 2017-03-10 Keith Seitz <keiths@redhat.com>
13509 * c-typeprint.c (cp_type_print_method_args): Skip artificial arguments.
13511 2017-03-08 Pedro Alves <palves@redhat.com>
13514 * infrun.c (start_step_over, do_target_resume, resume)
13515 (restart_threads): Assert we're not resuming a thread that is
13516 meant to be stopped.
13517 (infrun_thread_stop_requested_callback): Delete.
13518 (infrun_thread_stop_requested): If the thread is internally
13519 stopped, queue a pending stop event and clear the thread's
13520 inline-frame state.
13521 (handle_stop_requested): New function.
13522 (handle_syscall_event, handle_inferior_event_1): Use
13523 handle_stop_requested.
13524 (handle_stop_requested): New function.
13525 (handle_signal_stop): Set the thread's stop_signal here instead of
13527 (finish_step_over): Clear step over info unconditionally.
13528 (handle_signal_stop): If the user had interrupted the event
13529 thread, consider the stop a random signal.
13530 (handle_signal_stop) <signal arrived while stepping over
13531 breakpoint>: Don't restart threads here.
13532 (stop_waiting): Don't clear step-over info here.
13534 2017-03-08 Pedro Alves <palves@redhat.com>
13537 * common/gdb_unlinker.h (unlinker::unlinker): Attribute nonnull
13538 goes to argument 2, not 1.
13540 2017-03-08 Pedro Alves <palves@redhat.com>
13543 * top.c (gdb_readline_wrapper): Avoid passing NULL to
13544 display_gdb_prompt.
13545 (command_line_input): Add comment.
13547 2017-03-08 Pedro Alves <palves@redhat.com>
13550 * tui/tui-file.c (tui_file::write): New.
13551 * tui/tui-file.h (tui_file): Override "write".
13552 * tui/tui-io.c (do_tui_putc, update_start_line): New functions,
13553 factored out from ...
13554 (tui_puts): ... here.
13555 (tui_putc): Use them.
13556 (tui_write): New function.
13557 * tui/tui-io.h (tui_write): Declare.
13559 2017-03-07 Sergio Durigan Junior <sergiodj@redhat.com>
13561 * Makefile.in (SFILES): Replace "environ.c" with
13562 "common/environ.c".
13563 (HFILES_NO_SRCDIR): Likewise, for "environ.h".
13564 * environ.c: Include "common-defs.h" instead of "defs.h. Moved
13566 * common/environ.c: ... here.
13567 * environ.h: Moved to...
13568 * common/environ.h: ... here.
13570 2017-03-07 Peter Bergner <bergner@vnet.ibm.com>
13572 * gdbarch.sh (pstring_ptr): New static function.
13573 (gdbarch_disassembler_options): Use it.
13574 (gdbarch_verify_disassembler_options): Print valid_disassembler_options,
13575 not valid_disassembler_option->name.
13576 * gdbarch.c: Regenerate.
13578 2017-03-07 Peter Bergner <bergner@vnet.ibm.com>
13580 * config/powerpc/ppc64-linux.mh (MH_CFLAGS): Delete.
13582 2017-03-07 Pedro Alves <palves@redhat.com>
13584 * tui/tui-regs.c (tui_restore_gdbout): Don't delete gdb_stdout.
13586 2017-03-07 Walfred Tedeschi <walfred.tedeschi@intel.com>
13588 * i387-tdep.h (i387_reset_bnd_regs): Add function definition.
13589 * i387-tdep.c (i387_reset_bnd_regs): Add function implementation.
13590 * i386-tdep.c (i386_push_dummy_call): Call i387_reset_bnd_regs.
13591 * amd64-tdep.c (amd64_push_dummy_call): Call i387_reset_bnd_regs.
13593 2017-03-06 Simon Marchi <simon.marchi@ericsson.com>
13595 * xtensa-linux-nat.c (fetch_gregs): Remove const.
13597 2017-03-03 Simon Marchi <simon.marchi@ericsson.com>
13599 * remote.c (remote_add_target_side_commands): Use range-based
13602 2017-03-03 Yao Qi <yao.qi@linaro.org>
13605 * ada-valprint.c (ada_val_print_ref): Call value_fetch_lazy if
13607 * valprint.c (common_val_print): Likewise.
13609 2017-02-28 Peter Bergner <bergner@vnet.ibm.com>
13611 * NEWS: Mention new set/show disassembler-options commands.
13612 * doc/gdb.texinfo: Document new set/show disassembler-options commands.
13613 * disasm.c: Include "arch-utils.h", "gdbcmd.h" and "safe-ctype.h".
13614 (prospective_options): New static variable.
13615 (gdb_disassembler::gdb_disassembler): Initialize
13616 m_di.disassembler_options.
13617 (gdb_buffered_insn_length_init_dis): Initilize di->disassembler_options.
13618 (get_disassembler_options): New function.
13619 (set_disassembler_options): Likewise.
13620 (set_disassembler_options_sfunc): Likewise.
13621 (show_disassembler_options_sfunc): Likewise.
13622 (disassembler_options_completer): Likewise.
13623 (_initialize_disasm): Likewise.
13624 * disasm.h (get_disassembler_options): New prototype.
13625 (set_disassembler_options): Likewise.
13626 * gdbarch.sh (gdbarch_disassembler_options): New variable.
13627 (gdbarch_verify_disassembler_options): Likewise.
13628 * gdbarch.c: Regenerate.
13629 * gdbarch.h: Likewise.
13630 * arm-tdep.c (num_disassembly_options): Delete.
13631 (set_disassembly_style): Likewise.
13632 (arm_disassembler_options): New static variable.
13633 (set_disassembly_style_sfunc): Convert short style name into long
13634 option name. Call set_disassembler_options.
13635 (show_disassembly_style_sfunc): New function.
13636 (arm_gdbarch_init): Call set_gdbarch_disassembler_options and
13637 set_gdbarch_verify_disassembler_options.
13638 (_initialize_arm_tdep): Delete regnames variable and update callers.
13639 (arm_disassembler_options): Initialize.
13640 (disasm_options): New variable.
13641 (num_disassembly_options): Rename from this...
13642 (num_disassembly_styles): ...to this. Compute by scanning through
13644 (valid_disassembly_styles): Initialize using disasm_options.
13645 Remove calls to parse_arm_disassembler_option, get_arm_regnames and
13646 set_arm_regname_option.
13647 Pass show_disassembly_style_sfunc to the "disassembler" setshow command.
13648 * rs6000-tdep.c (powerpc_disassembler_options): New static variable.
13649 (rs6000_gdbarch_init): Call set_gdbarch_disassembler_options and
13650 set_gdbarch_verify_disassembler_options.
13651 * s390-tdep.c (s390_disassembler_options): New static variable.
13652 (s390_gdbarch_init):all set_gdbarch_disassembler_options and
13653 set_gdbarch_verify_disassembler_options.
13655 2017-02-27 Simon Marchi <simon.marchi@ericsson.com>
13657 * remote.c (remote_add_target_side_condition): Remove "struct"
13658 keyword from range-based for loop.
13660 2017-02-27 Simon Marchi <simon.marchi@ericsson.com>
13662 * remote.c (remote_add_target_side_condition): Use range-based
13663 for loop. Update comment.
13665 2017-02-27 Yao Qi <yao.qi@linaro.org>
13667 * f-typeprint.c (f_print_type): Check "varstring" is empty first.
13669 2017-02-26 Alan Hayward <alan.hayward@arm.com>
13671 * regcache.c (regcache_raw_update): New function.
13672 (regcache_raw_read): Move code to regcache_raw_update.
13673 * regcache.h (regcache_raw_update): New declaration.
13674 * remote.c (remote_prepare_to_store): Call regcache_raw_update.
13676 2017-02-26 Jan Kratochvil <jan.kratochvil@redhat.com>
13678 * dwarf2read.c (create_debug_type_hash_table): Initialize
13679 header.signature and header.type_offset_in_tu.
13681 2017-02-24 Pedro Alves <palves@redhat.com>
13683 * symtab.c (make_file_symbol_completion_list_1): Use
13684 add_symtab_completions.
13686 2017-02-24 Alan Hayward <alan.hayward@arm.com>
13688 * stack.c (frame_info): Use frame_unwind_register_value to avoid buf.
13690 2017-02-24 Alan Hayward <alan.hayward@arm.com>
13692 * i386-tdep.c (i386_pseudo_register_read_into_value): Use
13693 I386_MAX_REGISTER_SIZE.
13694 (i386_pseudo_register_write): Likewise.
13695 (i386_process_record): Likewise.
13696 * i387-tdep.c (i387_supply_xsave): Likewise.
13697 * m68k-linux-nat.c (fetch_register): Use M68K_MAX_REGISTER_SIZE.
13698 (store_register): Likewise.
13700 2017-02-23 Pedro Alves <palves@redhat.com>
13702 * ada-lang.c: Include "common/function-view.h".
13703 (ada_iterate_over_symbols): Adjust to use function_view as
13705 (struct add_partial_datum, ada_complete_symbol_matcher): Delete.
13706 (ada_make_symbol_completion_list): Use a lambda.
13707 (ada_exc_search_name_matches): Delete.
13708 (name_matches_regex): New.
13709 (ada_add_global_exceptions): Use a lambda and name_matches_regex.
13710 * compile/compile-c-support.c: Include "common/function-view.h".
13711 (print_one_macro): Change prototype to accept a ui_file pointer.
13712 (write_macro_definitions): Use a lambda.
13713 * dwarf2read.c: Include "common/function-view.h".
13714 (dw2_map_expand_apply, dw2_map_symtabs_matching_filename)
13715 (dw2_expand_symtabs_matching): Adjust to use function_view as
13717 * language.h: Include "common/function-view.h".
13718 (struct language_defn) <la_iterate_over_symbols>: Adjust to use
13719 function_view as callback type.
13720 (LA_ITERATE_OVER_SYMBOLS): Remove DATA parameter.
13721 * linespec.c: Include "common/function-view.h".
13722 (collect_info::add_symbol): New method.
13723 (struct symbol_and_data_callback, iterate_inline_only, struct
13724 symbol_matcher_data, iterate_name_matcher): Delete.
13725 (iterate_over_all_matching_symtabs): Adjust to use function_view
13726 as callback type and lambdas.
13727 (iterate_over_file_blocks): Adjust to use function_view as
13729 (decode_compound_collector): Now a class with private fields.
13730 (decode_compound_collector::release_symbols): New method.
13731 (collect_one_symbol): Rename to...
13732 (decode_compound_collector::operator()): ... this and adjust.
13733 (lookup_prefix_sym): decode_compound_collector construction bits
13734 move to decode_compound_collector ctor. Pass the
13735 decode_compound_collector object directly as callback. Remove
13736 cleanups and use decode_compound_collector::release_symbols
13738 (symtab_collector): Now a class with private fields.
13739 (symtab_collector::release_symtabs): New method.
13740 (add_symtabs_to_list): Rename to...
13741 (symtab_collector::operator()): ... this and adjust.
13742 (collect_symtabs_from_filename): symtab_collector construction
13743 bits move to symtab_collector ctor. Pass the symtab_collector
13744 object directly as callback. Remove cleanups and use
13745 symtab_collector::release_symtabs instead.
13746 (collect_symbols): Delete.
13747 (add_matching_symbols_to_info): Use lambdas.
13748 * macrocmd.c (print_macro_callback): Delete.
13749 (info_macro_command): Use a lambda.
13750 (info_macros_command): Pass print_macro_definition as callable
13752 (print_one_macro): Remove 'ignore' parameter.
13753 (macro_list_command): Adjust.
13754 * macrotab.c (macro_for_each_data::fn): Now a function_view.
13755 (macro_for_each_data::user_data): Delete field.
13756 (foreach_macro): Adjust to call the function_view.
13757 (macro_for_each): Adjust to use function_view as callback type.
13758 (foreach_macro_in_scope): Adjust to call the function_view.
13759 (macro_for_each_in_scope): Adjust to use function_view as callback
13761 * macrotab.h: Include "common/function-view.h".
13762 (macro_callback_fn): Declare a prototype instead of a pointer.
13763 Remove "user_data" parameter.
13764 (macro_for_each, macro_for_each_in_scope): Adjust to use
13765 function_view as callback type.
13766 * psymtab.c (partial_map_expand_apply)
13767 (psym_map_symtabs_matching_filename, recursively_search_psymtabs):
13768 Adjust to use function_view as callback type and to return bool.
13769 (psym_expand_symtabs_matching): Adjust to use function_view as
13771 * symfile-debug.c (debug_qf_map_symtabs_matching_filename): Adjust
13772 to use function_view as callback type and to return bool.
13773 (debug_qf_expand_symtabs_matching): Adjust to use function_view as
13775 * symfile.c (expand_symtabs_matching): Adjust to use function_view
13777 * symfile.h: Include "common/function-view.h".
13778 (expand_symtabs_file_matcher_ftype)
13779 (expand_symtabs_symbol_matcher_ftype)
13780 (expand_symtabs_exp_notify_ftype): Remove "data" parameter and
13782 (quick_symbol_functions::map_symtabs_matching_filename)
13783 (quick_symbol_functions::expand_symtabs_matching): Adjust to use
13784 function_view as callback type and return bool.
13785 (expand_symtabs_matching): Adjust to use function_view as callback
13787 (maintenance_expand_name_matcher)
13788 (maintenance_expand_file_matcher): Delete.
13789 (maintenance_expand_symtabs): Use lambdas.
13790 * symtab.c (iterate_over_some_symtabs): Adjust to use
13791 function_view as callback types and return bool.
13792 (iterate_over_symtabs): Likewise. Use unique_xmalloc_ptr instead
13794 (lookup_symtab_callback): Delete.
13795 (lookup_symtab): Use a lambda.
13796 (iterate_over_symbols): Adjust to use function_view as callback
13798 (struct search_symbols_data, search_symbols_file_matches)
13799 (search_symbols_name_matches): Delete.
13800 (search_symbols): Use a pair of lambdas.
13801 (struct add_name_data, add_macro_name, symbol_completion_matcher)
13802 (symtab_expansion_callback): Delete.
13803 (default_make_symbol_completion_list_break_on_1): Use lambdas.
13804 * symtab.h: Include "common/function-view.h".
13805 (iterate_over_some_symtabs): Adjust to use function_view as
13806 callback type and return bool.
13807 (iterate_over_symtabs): Adjust to use function_view as callback
13809 (symbol_found_callback_ftype): Remove 'data' parameter and return
13811 (iterate_over_symbols): Adjust to use function_view as callback
13814 2017-02-23 Pedro Alves <palves@redhat.com>
13816 * Makefile.in (SUBDIR_UNITTESTS_SRCS, SUBDIR_UNITTESTS_OBS): New.
13817 (%.o) <unittests/%.c>: New pattern.
13818 * configure.ac ($development): Add $(SUBDIR_UNITTESTS_OBS) to
13819 CONFIG_OBS, and $(SUBDIR_UNITTESTS_SRCS) to CONFIG_SRCS.
13820 * common/function-view.h: New file.
13821 * unittests/function-view-selftests.c: New file.
13822 * configure: Regenerate.
13824 2017-02-23 Simon Marchi <simon.marchi@ericsson.com>
13826 * bsd-uthread.c (bsd_uthread_thread_alive): Use ptid instead of
13828 * go32-nat.c (go32_thread_alive): Likewise.
13830 2017-02-23 Yao Qi <yao.qi@linaro.org>
13832 * varobj-iter.h (varobj_iter_delete): Call xfree instead of
13835 2017-02-23 Yao Qi <yao.qi@linaro.org>
13837 * varobj.c (varobj_clear_saved_item): Use delete instead of
13839 (update_dynamic_varobj_children): Likewise.
13841 2017-02-21 Jan Kratochvil <jan.kratochvil@redhat.com>
13843 * dwarf2read.c (dwarf2_record_block_ranges): Add forgotten BASEADDR.
13845 2017-02-21 Simon Marchi <simon.marchi@ericsson.com>
13847 * common/enum-flags.h (enum_flags::enum_flags): Initialize
13848 m_enum_value to 0 in default constructor.
13850 2017-02-21 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
13852 * rs6000-tdep.c (LOAD_AND_RESERVE_MASK): Rename from LWARX_MASK.
13853 (STORE_CONDITIONAL_MASK): Rename from STWCX_MASK.
13854 (LBARX_INSTRUCTION, LHARX_INSTRUCTION, LQARX_INSTRUCTION,
13855 STBCX_INSTRUCTION, STHCX_INSTRUCTION, STQCX_INSTRUCTION): New defines.
13856 (IS_LOAD_AND_RESERVE_INSN, IS_STORE_CONDITIONAL_INSN): New macros.
13857 (ppc_displaced_step_copy_insn): Use IS_LOAD_AND_RESERVE_INSN.
13858 (ppc_deal_with_atomic_sequence): Use IS_LOAD_AND_RESERVE_INSN and
13859 IS_STORE_CONDITIONAL_INSN.
13861 2017-02-21 Jan Kratochvil <jan.kratochvil@redhat.com>
13863 * dwarf2_rnglists_process: Initialize range_beginning and range_end.
13865 2017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
13867 * NEWS (Changes since GDB 7.12): Add DWARF-5.
13869 2017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
13871 * dwarf2read.c (skip_one_die, read_attribute_value)
13872 (dwarf2_const_value_attr, dump_die_shallow)
13873 (dwarf2_get_attr_constant_value, dwarf2_fetch_constant_bytes)
13874 (skip_form_bytes, attr_form_is_constant): Handle DW_FORM_data16.
13876 2017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
13878 * dwarf2read.c (read_file_scope): Rename DW_MACRO_GNU_*.
13879 (dwarf_parse_macro_header): Accept DWARF version 5.
13880 (dwarf_decode_macro_bytes, dwarf_decode_macros): Rename DW_MACRO_GNU_*.
13882 2017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
13884 * block.c (call_site_for_pc): Rename DW_OP_GNU_*, DW_TAG_GNU_* and
13886 * common/common-exceptions.h (enum errors): Likewise.
13887 * dwarf2-frame.c (class dwarf_expr_executor): Likewise.
13888 * dwarf2expr.c (dwarf_block_to_dwarf_reg)
13889 (dwarf_expr_context::execute_stack_op): Likewise.
13890 * dwarf2expr.h (struct dwarf_expr_context, struct dwarf_expr_piece):
13892 * dwarf2loc.c (dwarf_evaluate_loc_desc::get_base_type)
13893 (dwarf_evaluate_loc_desc::push_dwarf_reg_entry_value)
13894 (show_entry_values_debug, call_site_to_target_addr)
13895 (func_addr_to_tail_call_list, func_verify_no_selftailcall)
13896 (dwarf_expr_reg_to_entry_parameter, dwarf_entry_parameter_to_value)
13897 (entry_data_value_free_closure, value_of_dwarf_reg_entry)
13898 (value_of_dwarf_block_entry, indirect_pieced_value)
13899 (symbol_needs_eval_context::push_dwarf_reg_entry_value):
13900 (disassemble_dwarf_expression): Likewise.
13901 * dwarf2read.c (process_die, inherit_abstract_dies)
13902 (read_call_site_scope): Likewise.
13903 * gdbtypes.h (struct func_type, struct call_site_parameter)
13904 (struct call_site): Likewise.
13905 * stack.c (read_frame_arg): Likewise.
13906 * std-operator.def (OP_VAR_ENTRY_VALUE): Likewise.
13908 2017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
13910 * defs.h (read_unsigned_leb128): New declaration.
13911 * dwarf2loc.c (decode_debug_loclists_addresses): New function.
13912 (decode_debug_loc_dwo_addresses): Update DEBUG_LOC_* to DW_LLE_*.
13913 (dwarf2_find_location_expression): Call also
13914 decode_debug_loclists_addresses. Handle DWARF-5 ULEB128 length.
13915 * dwarf2loc.h (dwarf2_version): New declaration.
13916 * dwarf2read.c (struct dwarf2_per_objfile): Add loclists, line_str,
13918 (dwarf2_elf_names): Add .debug_loclists, .debug_line_str,
13920 (struct dwop_section_names): Add loclists_dwo.
13921 (dwop_section_names): Add .debug_loclists.dwo.
13922 (struct comp_unit_head): Add unit_type, signature, type_offset_in_tu.
13923 (struct dwarf2_per_cu_data): Add dwarf_version.
13924 (struct dwo_sections): Add loclists.
13925 (struct attr_abbrev): Add implicit_const.
13926 (read_indirect_line_string): New declaration.
13927 (read_unsigned_leb128): Delete declaration.
13928 (rcuh_kind): New definition.
13929 (read_and_check_comp_unit_head): Change parameter
13930 is_debug_types_section to section_kind.
13931 (dwarf2_locate_sections): Handle loclists, line_str and rnglists.
13932 (read_comp_unit_head): Change parameter abfd to section, add parameter
13933 section_kind. Handle DWARF-5.
13934 (error_check_comp_unit_head): Accept also DWARF version 5.
13935 (read_and_check_comp_unit_head): Change parameter
13936 is_debug_types_section to section_kind.
13937 (read_and_check_type_unit_head): Delete function.
13938 (read_abbrev_offset): Handle DWARF-5.
13939 (create_debug_type_hash_table): Add parameter section_kind. Process
13940 only DW_UT_type. Use signature and type_offset_in_tu from struct
13942 (create_debug_types_hash_table): Update create_debug_type_hash_table
13944 (create_all_type_units): Call create_debug_type_hash_table.
13945 (read_cutu_die_from_dwo, init_cutu_and_read_dies): Change
13946 read_and_check_type_unit_head caller to read_and_check_comp_unit_head
13948 (skip_one_die): Handle DW_FORM_implicit_const.
13949 (dwarf2_rnglists_process): New function.
13950 (dwarf2_ranges_process): Call dwarf2_rnglists_process for DWARF-5.
13951 (abbrev_table_read_table): Handle DW_FORM_implicit_const.
13952 (read_attribute_value): Handle DW_FORM_implicit_const,
13954 (read_attribute): Handle DW_FORM_implicit_const.
13955 (read_indirect_string_at_offset_from): New function from
13956 read_indirect_string_at_offset.
13957 (read_indirect_string_at_offset): Call
13958 read_indirect_string_at_offset_from.
13959 (read_indirect_line_string_at_offset): New function.
13960 (read_indirect_string): New function comment.
13961 (read_indirect_line_string): New function.
13962 (read_unsigned_leb128): Make it global.
13963 (dwarf2_string_attr): Handle DWARF-5.
13964 (add_include_dir_stub, read_formatted_entries): New functions.
13965 (dwarf_decode_line_header, dump_die_shallow, cu_debug_loc_section):
13967 (per_cu_header_read_in): Update read_comp_unit_head caller.
13968 (dwarf2_version): New function.
13969 * symfile.h (struct dwarf2_debug_sections): Add loclists, line_str and
13971 * xcoffread.c (dwarf2_xcoff_names): Update struct dwarf2_debug_sections
13974 2017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
13976 * dwarf2read.c (abbrev_table_read_table): Read the data only once.
13978 2017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
13980 * dwarf2read.c (dwarf2_ranges_process): New function from
13981 dwarf2_ranges_read.
13982 (dwarf2_ranges_read, dwarf2_record_block_ranges): Use
13983 dwarf2_ranges_process.
13985 2017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
13987 * dwarf2read.c (create_debug_type_hash_table): New function from
13988 create_debug_types_hash_table.
13989 (create_debug_types_hash_table): Call create_debug_type_hash_table.
13990 (create_all_type_units, open_and_init_dwo_file): Update
13991 create_debug_types_hash_table callers.
13993 2017-02-20 Sergio Durigan Junior <sergiodj@redhat.com>
13996 * fork-child.c (trace_start_error): Fix thinko. va_end should
13997 refer to 'ap', not 'args'.
13999 2017-02-20 Sergio Durigan Junior <sergiodj@redhat.com>
14000 Pedro Alves <palves@redhat.com>
14003 * darwin-nat.c (darwin_ptrace_me): Check if calls to system
14005 * fork-child.c (trace_start_error): New function.
14006 (trace_start_error_with_name): Likewise.
14007 * gnu-nat.c (gnu_ptrace_me): Check if call to PTRACE succeeded.
14008 * inf-ptrace.c (inf_ptrace_me): Likewise.
14009 * inferior.h (trace_start_error): New prototype.
14010 (trace_start_error_with_name): Likewise.
14012 2017-02-15 Sergio Durigan Junior <sergiodj@redhat.com>
14015 * psymtab.c (maintenance_print_psymbols): Verify if 'argv' is not
14016 NULL before using it.
14017 * symmisc.c (maintenance_print_symbols): Likewise.
14018 (maintenance_print_msymbols): Likewise.
14020 2017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
14022 * NEWS: Add record Python bindings entry.
14024 2017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
14026 * Makefile.in (SUBDIR_PYTHON_OBS): Add py-record-btrace.o,
14028 (SUBDIR_PYTHON_SRCS): Add py-record-btrace.c, py-record-full.c.
14029 * python/py-record-btrace.c, python/py-record-btrace.h,
14030 python/py-record-full.c, python/py-record-full.h: New file.
14031 * python/py-record.c: Add include for py-record-btrace.h and
14033 (recpy_method, recpy_format, recpy_goto, recpy_replay_position,
14034 recpy_instruction_history, recpy_function_call_history, recpy_begin,
14035 recpy_end): Use functions from py-record-btrace.c and py-record-full.c.
14036 * python/python-internal.h (PyInt_FromSsize_t, PyInt_AsSsize_t):
14038 (gdbpy_initialize_btrace): New export.
14039 * python/python.c (_initialize_python): Add gdbpy_initialize_btrace.
14041 2017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
14043 * Makefile.in (SUBDIR_PYTHON_OBS): Add python/py-record.o.
14044 (SUBDIR_PYTHON_SRCS): Add python/py-record.c.
14045 * python/py-record.c: New file.
14046 * python/python-internal.h (gdbpy_start_recording,
14047 gdbpy_current_recording, gdpy_stop_recording,
14048 gdbpy_initialize_record): New export.
14049 * python/python.c (_initialize_python): Add gdbpy_initialize_record.
14050 (python_GdbMethods): Add gdbpy_start_recording,
14051 gdbpy_current_recording and gdbpy_stop_recording.
14053 2017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
14055 * record-btrace.c (record_btrace_record_method): New function.
14056 (init_record_btrace_ops): Initialize to_record_method.
14057 * record-full.c (record_full_record_method): New function.
14058 (init_record_full_ops, init_record_full_core_ops): Add
14059 record_full_record_method.
14060 * record.h (enum record_method): New enum.
14061 * target-debug.h (target_debug_print_enum_record_method: New define.
14062 * target-delegates.c: Regenerate.
14063 * target.c (target_record_method): New function.
14064 * target.h: Include record.h.
14065 (struct target_ops) <to_record_method>: New field.
14066 (target_record_method): New export.
14068 2017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
14070 * record.h (record_start, record_stop): New export.
14071 * record.c (record_start, record_stop): New function.
14073 2017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
14075 * btrace.c (btrace_fetch): Copy function call segments pointer
14077 (btrace_clear): Clear the vector.
14078 (btrace_find_insn_by_number): Use binary search to find the correct
14079 function call segment.
14080 * btrace.h (brace_fun_p): New typedef.
14081 (struct btrace_thread_info) <functions>: New field.
14083 2017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
14085 * record-btrace.c (btrace_ui_out_decode_error): Move most of it ...
14086 * btrace.c (btrace_decode_error): ... here. New function.
14087 * btrace.h (btrace_decode_error): New export.
14089 2017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
14091 * btrace.c (ftrace_call_num_insn, btrace_insn_get_error): New function.
14092 (ftrace_new_function, btrace_insn_number, btrace_insn_cmp,
14093 btrace_find_insn_by_number): Remove special case for gaps.
14094 * btrace.h (btrace_insn_get_error): New export.
14095 (btrace_insn_number, btrace_find_insn_by_number): Adjust comment.
14096 * record-btrace.c (btrace_insn_history): Print number for gaps.
14097 (record_btrace_info, record_btrace_goto): Handle gaps.
14099 2017-02-14 Tom Tromey <tom@tromey.com>
14102 * python/python.c (gdbpy_before_prompt_hook): Emit before_prompt
14104 * python/py-evts.c (gdbpy_initialize_py_events): Add
14105 before_prompt registry.
14106 * python/py-events.h (events_object) <before_prompt>: New field.
14108 2017-02-14 Markus Metzger <markus.t.metzger@intel.com>
14110 * btrace.c (ftrace_new_switch): Preserve up link and flags.
14112 2017-02-13 Luis Machado <lgustavo@codesourcery.com>
14114 * symfile (_initialize_symfile): Add usage text to the load command's
14117 2017-02-10 Simon Marchi <simon.marchi@ericsson.com>
14119 * utils.c (defaulted_query): Don't query on secondary UIs.
14121 2017-02-10 Tom Tromey <tom@tromey.com>
14123 * rust-lang.c (rust_get_disr_info): Remove unused variable.
14125 2017-02-10 Tom Tromey <tom@tromey.com>
14127 * python/py-value.c (valpy_richcompare_throw): Remove unnecessary
14129 * python/py-type.c (typy_legacy_template_argument): Remove
14130 unnecessary "cleanup" local.
14132 2017-02-10 Tom Tromey <tom@tromey.com>
14134 * python/python.c (do_start_initialization): New function, from
14135 _initialize_python.
14136 (_initialize_python): Call do_start_initialization.
14137 * python/py-linetable.c (ltpy_iternext): Use explicit returns, not
14140 2017-02-10 Tom Tromey <tom@tromey.com>
14142 * python/py-prettyprint.c (pretty_print_one_value): Use
14145 2017-02-10 Tom Tromey <tom@tromey.com>
14147 * python/py-cmd.c (cmdpy_destroyer): Use gdbpy_ref.
14148 * python/py-breakpoint.c (gdbpy_breakpoint_deleted): Use
14150 * python/py-type.c (field_new): Use gdbpy_ref.
14151 * python/py-symtab.c (symtab_and_line_to_sal_object): Use
14153 * python/py-progspace.c (pspy_new): Use gdbpy_ref.
14154 (py_free_pspace): Likewise.
14155 (pspace_to_pspace_object): Likewise.
14156 * python/py-objfile.c (objfpy_new): Use gdbpy_ref.
14157 (py_free_objfile): Likewise.
14158 (objfile_to_objfile_object): Likewise.
14159 * python/py-inferior.c (delete_thread_object): Use
14161 (infpy_read_memory): Likewise.
14162 (py_free_inferior): Likewise.
14163 * python/py-evtregistry.c (create_eventregistry_object): Use
14165 * python/py-event.c (create_event_object): Use gdbpy_ref.
14167 2017-02-10 Tom Tromey <tom@tromey.com>
14169 * python/py-ref.h (gdbpy_ref_policy): Now a template.
14170 (gdbpy_ref): Now a template; allow subclasses of PyObject to be
14172 * python/py-arch.c, python/py-bpevent.c, python/py-breakpoint.c,
14173 python/py-cmd.c, python/py-continueevent.c, python/py-event.c,
14174 python/py-exitedevent.c, python/py-finishbreakpoint.c,
14175 python/py-framefilter.c, python/py-function.c,
14176 python/py-inferior.c, python/py-infevents.c,
14177 python/py-linetable.c, python/py-newobjfileevent.c,
14178 python/py-param.c, python/py-prettyprint.c, python/py-ref.h,
14179 python/py-signalevent.c, python/py-stopevent.c,
14180 python/py-symbol.c, python/py-threadevent.c, python/py-type.c,
14181 python/py-unwind.c, python/py-utils.c, python/py-value.c,
14182 python/py-varobj.c, python/py-xmethods.c, python/python.c,
14183 varobj.c: Change gdbpy_ref to gdbpy_ref<>.
14185 2017-02-10 Tom Tromey <tom@tromey.com>
14187 * ui-out.h (ui_out_emit_type): New class.
14188 (ui_out_emit_tuple, ui_out_emit_list): New typedefs.
14189 * python/py-framefilter.c (py_print_single_arg): Use gdb::optional
14190 and ui_out_emit_tuple.
14191 (enumerate_locals): Likewise.
14192 (py_mi_print_variables, py_print_locals, py_print_args): Use
14194 (py_print_frame): Use gdb::optional, ui_out_emit_tuple,
14196 * common/gdb_optional.h: New file.
14198 2017-02-10 Martin Galvan <martingalvan@sourceware.org>
14200 * MAINTAINERS (Write After Approval): Update my e-mail address.
14202 2017-02-10 Martin Galvan <martingalvan@sourceware.org>
14205 * breakpoint.c (_initialize_breakpoint): Update the help description
14206 of the 'commands' command to indicate that it takes a list argument.
14208 2017-02-09 Simon Marchi <simon.marchi@ericsson.com>
14210 * interps.c (current_interp_set_logging): Remove "return".
14212 2017-02-09 Gary Benson <gbenson@redhat.com>
14214 * symtab.c (add_symtab_completions): Prevent NULL pointer
14217 2017-02-08 Pedro Alves <palves@redhat.com>
14219 * interps.c (interp::interp): Remove reference to quiet_p.
14220 (interp_set): Make static. Remove dead "Switching to" output
14222 (interp_quiet_p, interp_set_quiet): Delete.
14223 (interpreter_exec_cmd): Don't set the interpreter quiet.
14224 * interps.h (interp_quiet_p): Make static.
14225 (class interp) <quiet_p>: Remove field
14227 2017-02-08 Jerome Guitton <guitton@adacore.com>
14229 * cli/cli-decode.c (find_command_name_length): Make it extern.
14230 * cli/cli-decode.h (find_command_name_length): Declare.
14231 * cli/cli-script.c (command_name_equals, line_first_arg):
14233 (process_next_line): Use cli-decode to parse command names.
14234 (build_command_line): Make args a constant pointer.
14236 2017-02-08 Jerome Guitton <guitton@adacore.com>
14238 * cli-decode.c (lookup_cmd_1, lookup_cmd_composition):
14239 Remove case-insensitive search.
14241 2017-02-07 Jose E. Marchesi <jose.marchesi@oracle.com>
14243 * sparc-tdep.c (sparc32_gdbarch_init): Do not place a + operator
14244 at the end of the line. Avoids an ARI warning.
14246 2017-02-06 Luis Machado <lgustavo@codesourcery.com>
14248 * NEWS: Mention support for record/replay of Intel 64 rdrand and
14249 rdseed instructions.
14250 i386-tdep.c (i386_process_record): Handle Intel 64 rdrand and rseed.
14252 2017-02-06 Ivo Raisr <ivo.raisr@oracle.com>
14255 Provide and use sparc32 and sparc64 target description XML files.
14256 * features/sparc/sparc32-cp0.xml, features/sparc/sparc32-cpu.xml,
14257 features/sparc/sparc32-fpu.xml: New files for sparc 32-bit.
14258 * features/sparc/sparc64-cp0.xml, features/sparc/sparc64-cpu.xml,
14259 features/sparc/sparc64-fpu.xml: New files for sparc 64-bit.
14260 * features/sparc/sparc32-solaris.xml: New file.
14261 * features/sparc/sparc64-solaris.xml: New file.
14262 * features/sparc/sparc32-solaris.c: Generated.
14263 * features/sparc/sparc64-solaris.c: Generated.
14264 * sparc-tdep.h: Account for differences in target descriptions.
14265 * sparc-tdep.c (sparc32_register_name): Use target provided registers.
14266 (sparc32_register_type): Use target provided registers.
14267 (validate_tdesc_registers): New function.
14268 (sparc32_gdbarch_init): Use tdesc_has_registers.
14269 Set pseudoregister functions.
14270 * sparc64-tdep.c (sparc64_register_name): Use target provided registers.
14271 (sparc64_register_type): Use target provided registers.
14272 (sparc64_init_abi): Set pseudoregister functions.
14274 2017-02-03 Tom Tromey <tom@tromey.com>
14277 * rust-lang.c (rust_print_type) <TYPE_CODE_UNION>: Handle enums
14278 with a single member.
14280 2017-02-03 Pedro Alves <palves@redhat.com>
14282 * cli/cli-interp.c (cli_interp_base::cli_interp_base)
14283 (cli_interp_base::~cli_interp_base): New.
14284 (cli_interp): New struct.
14285 (as_cli_interp): Cast the interp itself to cli_interp.
14286 (cli_interpreter_pre_command_loop): Rename to ...
14287 (cli_interp_base::pre_command_loop): ... this. Remove 'self'
14289 (cli_interpreter_init): Rename to ...
14290 (cli_interp::init): ... this. Remove 'self' parameter. Use
14291 boolean. Make extern.
14292 (cli_interpreter_resume): Rename to ...
14293 (cli_interp::resume): ... this. Remove 'data' parameter. Make
14295 (cli_interpreter_suspend): Rename to ...
14296 (cli_interp::suspend): ... this. Remove 'data' parameter. Make
14298 (cli_interpreter_exec): Rename to ...
14299 (cli_interp::exec): ... this. Remove 'data' parameter. Make
14301 (cli_interpreter_supports_command_editing): Rename to ...
14302 (cli_interp_base::supports_command_editing): ... this. Remove
14303 'interp' parameter. Make extern.
14304 (cli_ui_out): Rename to ...
14305 (cli_interp::interp_ui_out): ... this. Remove 'interp' parameter.
14307 (cli_set_logging): Rename to ...
14308 (cli_interp_base::set_logging): ... this. Remove 'interp'
14309 parameter. Make extern.
14310 (cli_interp_procs): Delete.
14311 (cli_interp_factory): Adjust to use "new".
14312 * cli/cli-interp.h: Include "interps.h".
14313 (struct cli_interp_base): New struct.
14314 * interps.c (struct interp): Delete. Fields moved to interps.h.
14315 (interp_new): Delete.
14316 (interp::interp, interp::~interp): New.
14317 (interp_set): Use bool, and return void. Assume the interpreter
14318 has suspend, init and resume methods, and that the all return
14320 (set_top_level_interpreter): interp_set returns void.
14321 (interp_ui_out): Adapt.
14322 (current_interp_set_logging): Adapt.
14323 (interp_data): Delete.
14324 (interp_pre_command_loop, interp_supports_command_editing): Adapt.
14325 (interp_exec): Adapt.
14326 (top_level_interpreter_data): Delete.
14327 * interps.h (interp_init_ftype, interp_resume_ftype)
14328 (interp_suspend_ftype, interp_exec_ftype)
14329 (interp_pre_command_loop_ftype, interp_ui_out_ftype): Delete.
14330 (class interp): New.
14331 (interp_new): Delete.
14332 (interp_set): Now returns void. Use bool.
14333 (interp_data, top_level_interpreter_data): Delete.
14334 * mi/mi-common.h: Include interps.h.
14335 (class mi_interp): Inherit from interp. Define a ctor. Declare
14336 init, resume, suspect, exec, interp_ui_out, set_logging and
14337 pre_command_loop methods.
14338 * mi/mi-interp.c (as_mi_interp): Cast the interp itself.
14339 (mi_interpreter_init): Rename to ...
14340 (mi_interp::init): ... this. Remove the 'interp' parameter, use
14341 bool, return void and make extern. Adjust.
14342 (mi_interpreter_resume): ... Rename to ...
14343 (mi_interp::resume): ... this. Remove the 'data' parameter,
14344 return void and make extern. Adjust.
14345 (mi_interpreter_suspend): ... Rename to ...
14346 (mi_interp::suspend): ... this. Remove the 'data' parameter,
14347 return void and make extern. Adjust.
14348 (mi_interpreter_exec): ... Rename to ...
14349 (mi_interp::exec): ... this. Remove the 'data' parameter and make
14351 (mi_interpreter_pre_command_loop): ... Rename to ...
14352 (mi_interp::pre_command_loop): ... this. Remove the 'self'
14353 parameter and make extern.
14354 (mi_on_normal_stop_1): Adjust.
14355 (mi_ui_out): Rename to ...
14356 (mi_interp::interp_ui_out): ... this. Remove the 'interp'
14357 parameter and make extern. Adjust.
14358 (mi_set_logging): Rename to ...
14359 (mi_interp::set_logging): ... this. Remove the 'interp'
14360 parameter and make extern. Adjust.
14361 (mi_interp_procs): Delete.
14362 (mi_interp_factory): Adjust to use 'new'.
14363 * mi/mi-main.c (mi_cmd_gdb_exit, captured_mi_execute_command)
14364 (mi_print_exception, mi_execute_command, mi_load_progress):
14366 * tui/tui-interp.c (tui_interp): New class.
14367 (as_tui_interp): Return a tui_interp pointer.
14368 (tui_on_normal_stop, tui_on_signal_received)
14369 (tui_on_end_stepping_range, tui_on_signal_exited, tui_on_exited)
14370 (tui_on_no_history, tui_on_user_selected_context_changed): Adjust
14371 to use interp::interp_ui_out.
14372 (tui_init): Rename to ...
14373 (tui_interp::init): ... this. Remove the 'self' parameter, use
14374 bool, return void and make extern. Adjust.
14375 (tui_resume): Rename to ...
14376 (tui_interp::resume): ... this. Remove the 'data' parameter,
14377 return void and make extern. Adjust.
14378 (tui_suspend): Rename to ...
14379 (tui_interp::suspend): ... this. Remove the 'data' parameter,
14380 return void and make extern. Adjust.
14381 (tui_ui_out): Rename to ...
14382 (tui_interp::interp_ui_out): ... this. Remove the 'self'
14383 parameter, and make extern. Adjust.
14384 (tui_exec): Rename to ...
14385 (tui_interp::exec): ... this. Remove the 'data' parameter and
14387 (tui_interp_procs): Delete.
14388 (tui_interp_factory): Use "new".
14390 2017-02-02 Tom Tromey <tom@tromey.com>
14392 * rust-exp.y (ends_raw_string, space_then_number)
14393 (rust_identifier_start_p): Return bool.
14394 * rust-lang.c (rust_tuple_type_p, rust_underscore_fields)
14395 (rust_tuple_struct_type_p, rust_tuple_variant_type_p)
14396 (rust_slice_type_p, rust_range_type_p, rust_u8_type_p)
14397 (rust_chartype_p): Return bool.
14398 (val_print_struct, rust_print_struct_def, rust_print_type):
14400 * rust-lang.h (rust_tuple_type_p, rust_tuple_struct_type_p):
14403 2017-02-02 Tom Tromey <tom@tromey.com>
14405 * rust-lang.c: Reindent.
14407 2017-02-02 Tom Tromey <tom@tromey.com>
14409 * rust-lang.h (rust_crate_for_block): Update.
14410 * rust-lang.c (rust_crate_for_block): Return std::string.
14411 (rust_get_disr_info): Use std:;string, not
14412 gdb::unique_xmalloc_ptr.
14413 * rust-exp.y (crate_name): Update.
14415 2017-02-02 Pedro Alves <palves@redhat.com>
14417 * disasm-selftests.c (print_one_insn_test): Move the "verbose"
14418 field out of gdb_disassembler_test and make it static.
14420 2017-02-02 Pedro Alves <palves@redhat.com>
14422 * mi/mi-common.h (struct mi_interp): Delete the mi2_interp,
14423 mi1_interp and mi_interp fields.
14425 2017-02-02 Pedro Alves <palves@redhat.com>
14427 * cli/cli-interp.c (struct saved_output_files, saved_output):
14428 Moved from cli/cli-logging.c.
14429 (cli_set_logging): New function.
14430 (cli_interp_procs): Install cli_set_logging.
14431 * cli/cli-interp.h (make_logging_output, cli_set_logging):
14433 * cli/cli-logging.c (struct saved_output_files, saved_output):
14434 Moved to cli/cli-interp.c.
14435 (pop_output_files): Don't save outputs here.
14436 (make_logging_output): New function.
14437 (handle_redirections): Don't build tee nor save previous outputs
14439 * interps.c (current_interp_set_logging): Change prototype.
14440 Assume there's always a set_logging_proc method installed.
14441 * interps.h (interp_set_logging_ftype): Change prototype.
14442 (current_interp_set_logging): Change prototype and adjust comment.
14443 * mi/mi-interp.c (mi_set_logging): Change protototype. Adjust to
14444 use make_logging_output.
14445 * tui/tui-interp.c (tui_interp_procs): Install cli_set_logging.
14446 2017-02-02 Pedro Alves <palves@redhat.com>
14448 * cli/cli-logging.c (maybe_warn_already_logging): New factored out
14450 (set_logging_overwrite): ... here.
14451 (logging_no_redirect_file): Delete.
14452 (set_logging_redirect): Don't handle redirection on the fly.
14453 Instead warn that "logging off" / "logging on" is necessary.
14454 (pop_output_files): Delete references to logging_no_redirect_file.
14455 (show_logging_command): Always speak in terms of what will happen
14456 once logging is reenabled.
14458 2017-02-02 Pedro Alves <palves@redhat.com>
14460 * disasm.h (gdb_pretty_print_disassembler): Tweak intro comment.
14462 2017-02-02 Pedro Alves <palves@redhat.com>
14464 * disasm.c (gdb_pretty_print_insn): Rename to ...
14465 (gdb_pretty_print_disassembler::pretty_print_insn): ... this.
14466 Remove gdbarch parameter. Adapt to clear the object's buffers
14467 instead of allocating new buffers, and to print using the object's
14468 gdb_disassembler instead of calling gdb_print_insn.
14469 (dump_insns): Use gdb_pretty_print_disassembler.
14470 * disasm.h (gdb_pretty_print_insn): Delete declaration.
14471 (gdb_pretty_print_disassembler): New class.
14472 * record-btrace.c (btrace_insn_history): Use
14473 gdb_pretty_print_disassembler.
14475 2017-02-02 Pedro Alves <palves@redhat.com>
14477 * ada-lang.c (type_as_string): Use string_file.
14478 * ada-valprint.c (ada_print_floating): Use string_file.
14479 * ada-varobj.c (ada_varobj_scalar_image)
14480 (ada_varobj_get_value_image): Use string_file.
14481 * aix-thread.c (aix_thread_extra_thread_info): Use string_file.
14482 * arm-tdep.c (_initialize_arm_tdep): Use string_printf.
14483 * breakpoint.c (update_inserted_breakpoint_locations)
14484 (insert_breakpoint_locations, reattach_breakpoints)
14485 (print_breakpoint_location, print_one_detail_ranged_breakpoint)
14486 (print_it_watchpoint): Use string_file.
14487 (save_breakpoints): Use stdio_file.
14488 * c-exp.y (oper): Use string_file.
14489 * cli/cli-logging.c (set_logging_redirect): Use ui_file_up and
14491 (pop_output_files): Use delete.
14492 (handle_redirections): Use stdio_file and tee_file.
14493 * cli/cli-setshow.c (do_show_command): Use string_file.
14494 * compile/compile-c-support.c (c_compute_program): Use
14496 * compile/compile-c-symbols.c (generate_vla_size): Take a
14497 'string_file &' instead of a 'ui_file *'.
14498 (generate_c_for_for_one_variable): Take a 'string_file &' instead
14499 of a 'ui_file *'. Use string_file.
14500 (generate_c_for_variable_locations): Take a 'string_file &'
14501 instead of a 'ui_file *'.
14502 * compile/compile-internal.h (generate_c_for_for_one_variable):
14503 Take a 'string_file &' instead of a 'ui_file *'.
14504 * compile/compile-loc2c.c (push, pushf, unary, binary)
14505 (print_label, pushf_register_address, pushf_register)
14506 (do_compile_dwarf_expr_to_c): Take a 'string_file &' instead of a
14507 'ui_file *'. Adjust.
14508 * compile/compile.c (compile_to_object): Use string_file.
14509 * compile/compile.h (compile_dwarf_expr_to_c)
14510 (compile_dwarf_bounds_to_c): Take a 'string_file &' instead of a
14512 * cp-support.c (inspect_type): Use string_file and obstack_copy0.
14513 (replace_typedefs_qualified_name): Use string_file and
14515 * disasm.c (gdb_pretty_print_insn): Use string_file.
14516 (gdb_disassembly): Adjust reference the null_stream global.
14517 (do_ui_file_delete): Delete.
14518 (gdb_insn_length): Use null_stream.
14519 * dummy-frame.c (maintenance_print_dummy_frames): Use stdio_file.
14520 * dwarf2loc.c (dwarf2_compile_property_to_c)
14521 (locexpr_generate_c_location, loclist_generate_c_location): Take a
14522 'string_file &' instead of a 'ui_file *'.
14523 * dwarf2loc.h (dwarf2_compile_property_to_c): Likewise.
14524 * dwarf2read.c (do_ui_file_peek_last): Delete.
14525 (dwarf2_compute_name): Use string_file.
14526 * event-top.c (gdb_setup_readline): Use stdio_file.
14527 * gdbarch.sh (verify_gdbarch): Use string_file.
14528 * gdbtypes.c (safe_parse_type): Use null_stream.
14529 * guile/scm-breakpoint.c (gdbscm_breakpoint_commands): Use
14531 * guile/scm-disasm.c (gdbscm_print_insn_from_port): Take a
14532 'string_file *' instead of a 'ui_file *'.
14533 (gdbscm_arch_disassemble): Use string_file.
14534 * guile/scm-frame.c (frscm_print_frame_smob): Use string_file.
14535 * guile/scm-ports.c (class ioscm_file_port): Now a class that
14536 inherits from ui_file.
14537 (ioscm_file_port_delete, ioscm_file_port_rewind)
14538 (ioscm_file_port_put): Delete.
14539 (ioscm_file_port_write): Rename to ...
14540 (ioscm_file_port::write): ... this. Remove file_port_magic
14542 (ioscm_file_port_new): Delete.
14543 (ioscm_with_output_to_port_worker): Use ioscm_file_port and
14545 * guile/scm-type.c (tyscm_type_name): Use string_file.
14546 * guile/scm-value.c (vlscm_print_value_smob, gdbscm_value_print):
14548 * infcmd.c (print_return_value_1): Use string_file.
14549 * infrun.c (print_target_wait_results): Use string_file.
14550 * language.c (add_language): Use string_file.
14551 * location.c (explicit_to_string_internal): Use string_file.
14552 * main.c (captured_main_1): Use null_file.
14553 * maint.c (maintenance_print_architecture): Use stdio_file.
14554 * mi/mi-cmd-stack.c (list_arg_or_local): Use string_file.
14555 * mi/mi-common.h (struct mi_interp) <out, err, log, targ,
14556 event_channel>: Change type to mi_console_file pointer.
14557 * mi/mi-console.c (mi_console_file_fputs, mi_console_file_flush)
14558 (mi_console_file_delete): Delete.
14559 (struct mi_console_file): Delete.
14560 (mi_console_file_magic): Delete.
14561 (mi_console_file_new): Delete.
14562 (mi_console_file::mi_console_file): New.
14563 (mi_console_file_delete): Delete.
14564 (mi_console_file_fputs): Delete.
14565 (mi_console_file::write): New.
14566 (mi_console_raw_packet): Delete.
14567 (mi_console_file::flush): New.
14568 (mi_console_file_flush): Delete.
14569 (mi_console_set_raw): Rename to ...
14570 (mi_console_file::set_raw): ... this.
14571 * mi/mi-console.h (class mi_console_file): New class.
14572 (mi_console_file_new, mi_console_set_raw): Delete.
14573 * mi/mi-interp.c (mi_interpreter_init): Use mi_console_file.
14574 (mi_set_logging): Use delete and tee_file. Adjust.
14575 * mi/mi-main.c (output_register): Use string_file.
14576 (mi_cmd_data_evaluate_expression): Use string_file.
14577 (mi_cmd_data_read_memory): Use string_file.
14578 (mi_cmd_execute, print_variable_or_computed): Use string_file.
14579 * mi/mi-out.c (mi_ui_out::main_stream): New.
14580 (mi_ui_out::rewind): Use main_stream and
14582 (mi_ui_out::put): Use main_stream and string_file.
14583 (mi_ui_out::mi_ui_out): Remove 'stream' parameter.
14584 Allocate a 'string_file' instead.
14585 (mi_out_new): Don't allocate a mem_fileopen stream here.
14586 * mi/mi-out.h (mi_ui_out::mi_ui_out): Remove 'stream' parameter.
14587 (mi_ui_out::main_stream): Declare method.
14588 * printcmd.c (eval_command): Use string_file.
14589 * psymtab.c (maintenance_print_psymbols): Use stdio_file.
14590 * python/py-arch.c (archpy_disassemble): Use string_file.
14591 * python/py-breakpoint.c (bppy_get_commands): Use string_file.
14592 * python/py-frame.c (frapy_str): Use string_file.
14593 * python/py-framefilter.c (py_print_type, py_print_single_arg):
14595 * python/py-type.c (typy_str): Use string_file.
14596 * python/py-unwind.c (unwind_infopy_str): Use string_file.
14597 * python/py-value.c (valpy_str): Use string_file.
14598 * record-btrace.c (btrace_insn_history): Use string_file.
14599 * regcache.c (regcache_print): Use stdio_file.
14600 * reggroups.c (maintenance_print_reggroups): Use stdio_file.
14601 * remote.c (escape_buffer): Use string_file.
14602 * rust-lang.c (rust_get_disr_info): Use string_file.
14603 * serial.c (serial_open_ops_1): Use stdio_file.
14604 (do_serial_close): Use delete.
14605 * stack.c (print_frame_arg): Use string_file.
14606 (print_frame_args): Remove local mem_fileopen stream, not used.
14607 (print_frame): Use string_file.
14608 * symmisc.c (maintenance_print_symbols): Use stdio_file.
14609 * symtab.h (struct symbol_computed_ops) <generate_c_location>:
14610 Take a 'string_file *' instead of a 'ui_file *'.
14611 * top.c (new_ui): Use stdio_file and stderr_file.
14612 (free_ui): Use delete.
14613 (execute_command_to_string): Use string_file.
14614 (quit_confirm): Use string_file.
14615 * tracepoint.c (collection_list::append_exp): Use string_file.
14616 * tui/tui-disasm.c (tui_disassemble): Use string_file.
14617 * tui/tui-file.c: Don't include "ui-file.h".
14618 (enum streamtype, struct tui_stream): Delete.
14619 (tui_file_new, tui_file_delete, tui_fileopen, tui_sfileopen)
14620 (tui_file_isatty, tui_file_rewind, tui_file_put): Delete.
14621 (tui_file::tui_file): New method.
14622 (tui_file_fputs): Delete.
14623 (tui_file_get_strbuf): Delete.
14624 (tui_file::puts): New method.
14625 (tui_file_adjust_strbuf): Delete.
14626 (tui_file_flush): Delete.
14627 (tui_file::flush): New method.
14628 * tui/tui-file.h: Tweak intro comment.
14630 (tui_fileopen, tui_sfileopen, tui_file_get_strbuf)
14631 (tui_file_adjust_strbuf): Delete declarations.
14632 (class tui_file): New class.
14633 * tui/tui-io.c (tui_initialize_io): Use tui_file.
14634 * tui/tui-regs.c (tui_restore_gdbout): Use delete.
14635 (tui_register_format): Use string_stream.
14636 * tui/tui-stack.c (tui_make_status_line): Use string_file.
14637 (tui_get_function_from_frame): Use string_file.
14638 * typeprint.c (type_to_string): Use string_file.
14639 * ui-file.c (struct ui_file, ui_file_magic, ui_file_new): Delete.
14640 (null_stream): New global.
14641 (ui_file_delete): Delete.
14642 (ui_file::ui_file): New.
14643 (null_file_isatty): Delete.
14644 (ui_file::~ui_file): New.
14645 (null_file_rewind): Delete.
14646 (ui_file::printf): New.
14647 (null_file_put): Delete.
14648 (null_file_flush): Delete.
14649 (ui_file::putstr): New.
14650 (null_file_write): Delete.
14651 (ui_file::putstrn): New.
14652 (null_file_read): Delete.
14653 (ui_file::putc): New.
14654 (null_file_fputs): Delete.
14655 (null_file_write_async_safe): Delete.
14656 (ui_file::vprintf): New.
14657 (null_file_delete): Delete.
14658 (null_file::write): New.
14659 (null_file_fseek): Delete.
14660 (null_file::puts): New.
14661 (ui_file_data): Delete.
14662 (null_file::write_async_safe): New.
14663 (gdb_flush, ui_file_isatty): Adjust.
14664 (ui_file_put, ui_file_rewind): Delete.
14665 (ui_file_write): Adjust.
14666 (ui_file_write_for_put): Delete.
14667 (ui_file_write_async_safe, ui_file_read): Adjust.
14668 (ui_file_fseek): Delete.
14669 (fputs_unfiltered): Adjust.
14670 (set_ui_file_flush, set_ui_file_isatty, set_ui_file_rewind)
14671 (set_ui_file_put, set_ui_file_write, set_ui_file_write_async_safe)
14672 (set_ui_file_read, set_ui_file_fputs, set_ui_file_fseek)
14673 (set_ui_file_data): Delete.
14674 (string_file::~string_file, string_file::write)
14675 (struct accumulated_ui_file, do_ui_file_xstrdup, ui_file_xstrdup)
14676 (do_ui_file_as_string, ui_file_as_string): Delete.
14677 (do_ui_file_obsavestring, ui_file_obsavestring): Delete.
14678 (struct mem_file): Delete.
14679 (mem_file_new): Delete.
14680 (stdio_file::stdio_file): New.
14681 (mem_file_delete): Delete.
14682 (stdio_file::stdio_file): New.
14683 (mem_fileopen): Delete.
14684 (stdio_file::~stdio_file): New.
14685 (mem_file_rewind): Delete.
14686 (stdio_file::set_stream): New.
14687 (mem_file_put): Delete.
14688 (stdio_file::open): New.
14689 (mem_file_write): Delete.
14690 (stdio_file_magic, struct stdio_file): Delete.
14691 (stdio_file_new, stdio_file_delete, stdio_file_flush): Delete.
14692 (stdio_file::flush): New.
14693 (stdio_file_read): Rename to ...
14694 (stdio_file::read): ... this. Adjust.
14695 (stdio_file_write): Rename to ...
14696 (stdio_file::write): ... this. Adjust.
14697 (stdio_file_write_async_safe): Rename to ...
14698 (stdio_file::write_async_safe) ... this. Adjust.
14699 (stdio_file_fputs): Rename to ...
14700 (stdio_file::puts) ... this. Adjust.
14701 (stdio_file_isatty): Delete.
14702 (stdio_file_fseek): Delete.
14703 (stdio_file::isatty): New.
14704 (stderr_file_write): Rename to ...
14705 (stderr_file::write) ... this. Adjust.
14706 (stderr_file_fputs): Rename to ...
14707 (stderr_file::puts) ... this. Adjust.
14708 (stderr_fileopen, stdio_fileopen, gdb_fopen): Delete.
14709 (stderr_file::stderr_file): New.
14710 (tee_file_magic): Delete.
14711 (struct tee_file): Delete.
14712 (tee_file::tee_file): New.
14713 (tee_file_new): Delete.
14714 (tee_file::~tee_file): New.
14715 (tee_file_delete): Delete.
14716 (tee_file_flush): Rename to ...
14717 (tee_file::flush): ... this. Adjust.
14718 (tee_file_write): Rename to ...
14719 (tee_file::write): ... this. Adjust.
14720 (tee_file::write_async_safe): New.
14721 (tee_file_fputs): Rename to ...
14722 (tee_file::puts): ... this. Adjust.
14723 (tee_file_isatty): Rename to ...
14724 (tee_file::isatty): ... this. Adjust.
14725 * ui-file.h (struct obstack, struct ui_file): Don't
14727 (ui_file_new, ui_file_flush_ftype, set_ui_file_flush)
14728 (ui_file_write_ftype)
14729 (set_ui_file_write, ui_file_fputs_ftype, set_ui_file_fputs)
14730 (ui_file_write_async_safe_ftype, set_ui_file_write_async_safe)
14731 (ui_file_read_ftype, set_ui_file_read, ui_file_isatty_ftype)
14732 (set_ui_file_isatty, ui_file_rewind_ftype, set_ui_file_rewind)
14733 (ui_file_put_method_ftype, ui_file_put_ftype, set_ui_file_put)
14734 (ui_file_delete_ftype, set_ui_file_data, ui_file_fseek_ftype)
14735 (set_ui_file_fseek): Delete.
14736 (ui_file_data, ui_file_delete, ui_file_rewind)
14737 (struct ui_file): New.
14739 (class null_file): New.
14740 (null_stream): Declare.
14741 (ui_file_write_for_put, ui_file_put): Delete.
14742 (ui_file_xstrdup, ui_file_as_string, ui_file_obsavestring):
14744 (ui_file_fseek, mem_fileopen, stdio_fileopen, stderr_fileopen)
14745 (gdb_fopen, tee_file_new): Delete.
14746 (struct string_file): New.
14747 (struct stdio_file): New.
14748 (stdio_file_up): New.
14749 (struct stderr_file): New.
14750 (class tee_file): New.
14751 * ui-out.c (ui_out::field_stream): Take a 'string_file &' instead
14752 of a 'ui_file *'. Adjust.
14753 * ui-out.h (class ui_out) <field_stream>: Likewise.
14754 * utils.c (do_ui_file_delete, make_cleanup_ui_file_delete)
14755 (null_stream): Delete.
14756 (error_stream): Take a 'string_file &' instead of a 'ui_file *'.
14758 * utils.h (struct ui_file): Delete forward declaration..
14759 (make_cleanup_ui_file_delete, null_stream): Delete declarations.
14760 (error_stream): Take a 'string_file &' instead of a
14762 * varobj.c (varobj_value_get_print_value): Use string_file.
14763 * xtensa-tdep.c (xtensa_verify_config): Use string_file.
14764 * gdbarch.c: Regenerate.
14766 2017-02-02 Pedro Alves <palves@redhat.com>
14768 * disasm.c (gdb_disassembler::pretty_print_insn): Rename to...
14769 (gdb_pretty_print_insn): ... this. Now a free function. Add back
14770 a 'gdbarch' parameter. Allocate a mem_fileopen stream here.
14771 Adjust to call gdb_print_insn instead of
14772 gdb_disassembler::print_insn.
14773 (dump_insns, do_mixed_source_and_assembly_deprecated)
14774 (do_mixed_source_and_assembly, do_assembly_only): Add back a
14775 'gdbarch' parameter. Remove gdb_disassembler parameter.
14776 (gdb_disassembly): Don't allocate a gdb_disassembler here.
14777 * disasm.h (gdb_disassembler::pretty_print_insn): Delete
14779 (gdb_pretty_print_insn): Re-add declaration.
14780 * record-btrace.c (btrace_insn_history): Don't allocate a
14781 gdb_disassembler here. Adjust to call gdb_pretty_print_insn.
14783 2017-02-01 Simon Marchi <simon.marchi@polymtl.ca>
14785 * disasm.h (gdb_disassembly): Remove file_string parameter.
14786 * disasm.c (gdb_disassembly): Likewise.
14787 * cli/cli-cmds.c (print_disassembly): Adapt.
14788 * mi/mi-cmd-disas.c (mi_cmd_disassemble): Likewise.
14789 * stack.c (do_gdb_disassembly): Likewise.
14791 2017-02-01 Andreas Arnez <arnez@linux.vnet.ibm.com>
14793 * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): For
14794 DWARF_VALUE_LITERAL, no longer ignore the offset on big-endian
14795 targets. And if the implicit value is longer than needed, extract
14796 the first bytes instead of the "least significant" ones.
14798 2017-02-01 Markus Metzger <markus.t.metzger@intel.com>
14800 * btrace.c (btrace_enable): Do not call btrace_add_pc for
14801 BTRACE_FORMAT_PT or if can_access_registers_ptid returns false.
14802 (btrace_fetch): Assert can_access_registers_ptid.
14803 * record-btrace.c (require_btrace_thread, record_btrace_info): Call
14804 validate_registers_access.
14806 2017-02-01 Markus Metzger <markus.t.metzger@intel.com>
14808 * gdbthread.h (can_access_registers_ptid): New.
14809 * thread.c (can_access_registers_ptid): New.
14811 2017-02-01 Pedro Alves <palves@redhat.com>
14813 * i386-tdep.c (i386_fast_tracepoint_valid_at): Use gdb_insn_length.
14815 2017-01-31 Pedro Alves <palves@redhat.com>
14817 * mi/mi-interp.c (mi_breakpoint_created, mi_breakpoint_modified):
14820 2017-01-31 Pedro Alves <palves@redhat.com>
14822 * stack.c (print_frame_args): Remove local mem_fileopen stream,
14825 2017-01-31 Pedro Alves <palves@redhat.com>
14827 * varobj.c (varobj_value_get_print_value): Remove xstrdup call.
14829 2017-01-31 Pedro Alves <palves@redhat.com>
14831 * common/scoped_restore.h
14832 (scoped_restore_tmpl::scoped_restore_tmpl): Template on T2, and
14833 change the value's parameter type to T2.
14834 (make_scoped_restore): Likewise.
14836 2017-01-27 Walfred Tedeschi <walfred.tedeschi@intel.com>
14837 Richard Henderson <rth@redhat.com>
14839 * amd64-linux-nat.c (PTRACE_ARCH_PRCTL): New define.
14840 (amd64_linux_fetch_inferior_registers): Add case to fetch FS_BASE
14841 GS_BASE for older kernels.
14842 (amd64_linux_store_inferior_registers): Add case to store FS_BASE
14843 GS_BASE for older kernels.
14844 * amd64-linux-tdep.c (amd64_linux_gregset_reg_offset): Add FS_BASE
14845 and GS_BASE to the offset table.
14846 (amd64_linux_register_reggroup_p): Add FS_BASE and GS_BASE to the
14847 system register group.
14848 * amd64-nat.c (amd64_native_gregset_reg_offset): Implements case
14850 * amd64-tdep.c (amd64_init_abi): Add segment registers for the
14852 * amd64-tdep.h (amd64_regnum): Add AMD64_FSBASE_REGNUM and
14853 AMD64_GSBASE_REGNUM.
14854 (AMD64_NUM_REGS): Set to AMD64_GSBASE_REGNUM + 1.
14855 * features/Makefile (amd64-linux.dat, amd64-avx-linux.dat)
14856 (amd64-mpx-linux.dat, amd64-avx512-linux.dat, x32-linux.dat)
14857 (x32-avx-linux.dat, x32-avx512-linux.dat): Add
14858 i386/64bit-segments.xml in those rules.
14859 * features/i386/64bit-segments.xml: New file.
14860 * features/i386/amd64-avx-mpx-linux.xml: Add 64bit-segments.xml.
14861 * features/i386/amd64-avx-linux.xml: Add 64bit-segments.xml.
14862 * features/i386/amd64-avx512-linux.xml: Add 64bit-segments.xml.
14863 * features/i386/amd64-mpx-linux.xml: Add 64bit-segments.xml.
14864 * features/i386/x32-avx512-linux.xml: Add 64bit-segments.xml.
14865 * features/i386/x32-avx-linux.xml: Add 64bit-segments.xml.
14866 * features/i386/amd64-linux.xml: Add 64bit-segments.xml.
14867 * features/i386/amd64-avx-linux.c: Regenerated.
14868 * features/i386/amd64-avx-mpx-linux.c: Regenerated.
14869 * features/i386/amd64-avx-mpx.c: Regenerated.
14870 * features/i386/amd64-avx512-linux.c: Regenerated.
14871 * features/i386/amd64-linux.c: Regenerated.
14872 * features/i386/amd64-mpx-linux.c: Regenerated.
14873 * features/i386/i386-avx-mpx-linux.c: Regenerated.
14874 * features/i386/i386-avx-mpx.c: Regenerated.
14875 * features/i386/x32-avx-linux.c: Regenerated.
14876 * features/i386/x32-avx512-linux.c: Regenerated.
14877 * regformats/i386/amd64-avx-linux.dat: Regenerated.
14878 * regformats/i386/amd64-avx-mpx-linux.dat: Regenerated.
14879 * regformats/i386/amd64-avx512-linux.dat: Regenerated.
14880 * regformats/i386/amd64-linux.dat: Regenerated.
14881 * regformats/i386/amd64-mpx-linux.dat: Regenerated.
14882 * regformats/i386/x32-avx-linux.dat: Regenerated.
14883 * regformats/i386/x32-avx512-linux.dat: Regenerated.
14884 * regformats/i386/x32-linux.dat: Regenerated.
14886 2017-01-27 Walfred Tedeschi <walfred.tedeschi@intel.com>
14888 * amd64-linux-tdep.h (AMD64_LINUX_ORIG_RAX_REGNUM):
14889 Set to AMD64_NUM_REGS.
14891 2017-01-27 Walfred Tedeschi <walfred.tedeschi@intel.com>
14893 * amd64-nat.c (amd64_native_gregset_reg_offset): Simplify logic
14894 that checks validity of a register number.
14896 2017-01-27 Kees Cook <keescook@google.com>
14898 * gdb/arm-linux-nat.c (arm_linux_fetch_inferior_registers): Call
14899 fetch_fpregs if target has fpa registers.
14900 (arm_linux_store_inferior_registers): Call store_fpregs if target
14903 2017-01-26 Andreas Arnez <arnez@linux.vnet.ibm.com>
14905 * cris-tdep.c (cris_gdbarch_init): Remove check for
14906 info.byte_order and force it to BFD_ENDIAN_LITTLE.
14908 2017-01-26 Antoine Tremblay <antoine.tremblay@ericsson.com>
14910 * corelow.c (get_core_register_section): Check for regset
14911 existence before checking for REGSET_VARIABLE_SIZE.
14913 2017-01-26 Yao Qi <yao.qi@linaro.org>
14914 Pedro Alves <palves@redhat.com>
14917 * disasm.c (gdb_disassembler::dis_asm_memory_error): Don't
14918 call memory_error, save memaddr instead.
14919 (gdb_disassembler::print_insn): If gdbarch_print_insn returns
14920 negative, cal memory_error.
14921 * disasm.h (gdb_disassembler) <m_err_memaddr>: New field.
14923 2017-01-26 Yao Qi <yao.qi@linaro.org>
14925 * disasm-selftests.c (memory_error_test): New function.
14926 (_initialize_disasm_selftests): Register memory_error_test.
14928 2017-01-26 Yao Qi <yao.qi@linaro.org>
14930 * Makefile.in (SFILES): Add disasm-selftests.c and
14932 (COMMON_OBS): Add disasm-selftests.o and selftest-arch.o.
14933 * disasm-selftests.c: New file.
14934 * selftest-arch.c: New file.
14935 * selftest-arch.h: New file.
14937 2017-01-26 Yao Qi <yao.qi@linaro.org>
14939 * mep-tdep.c (mep_gdb_print_insn): Set info->arch
14940 to bfd_arch_mep. Don't return 0 if section is not
14941 found. Call print_insn_mep.
14943 2017-01-26 Pedro Alves <palves@redhat.com>
14944 Yao Qi <yao.qi@linaro.org>
14946 * arm-tdep.c: Include "disasm.h".
14947 (gdb_print_insn_arm): Update code to get gdbarch.
14948 * disasm.c (dis_asm_read_memory): Change it to
14949 gdb_disassembler::dis_asm_read_memory.
14950 (dis_asm_memory_error): Likewise.
14951 (dis_asm_print_address): Likewise.
14952 (gdb_pretty_print_insn): Change it to
14953 gdb_disassembler::pretty_print_insn.
14954 (dump_insns): Add one argument gdb_disassemlber. All
14956 (do_mixed_source_and_assembly_deprecated): Likewise.
14957 (do_mixed_source_and_assembly): Likewise.
14958 (do_assembly_only): Likewise.
14959 (gdb_disassembler::gdb_disassembler): New.
14960 (gdb_disassembler::print_insn): New.
14961 * disasm.h (class gdb_disassembler): New.
14962 (gdb_pretty_print_insn): Remove declaration.
14963 (gdb_disassemble_info): Likewise.
14964 * guile/scm-disasm.c (class gdbscm_disassembler): New.
14965 (gdbscm_disasm_read_memory_worker): Update.
14966 (gdbscm_disasm_read_memory): Update.
14967 (gdbscm_disasm_memory_error): Remove.
14968 (gdbscm_disasm_print_address): Remove.
14969 (gdbscm_disassembler::gdbscm_disassembler): New.
14970 (gdbscm_print_insn_from_port): Update.
14971 * mips-tdep.c: Include disasm.h.
14972 (gdb_print_insn_mips): Update code to get gdbarch.
14973 * record-btrace.c (btrace_insn_history): Update.
14974 * spu-tdep.c: Include disasm.h.
14975 (struct spu_dis_asm_data): Remove.
14976 (struct spu_dis_asm_info): New.
14977 (spu_dis_asm_print_address): Use spu_dis_asm_info to get
14979 (gdb_print_insn_spu): Cast disassemble_info to
14982 2017-01-26 Yao Qi <yao.qi@linaro.org>
14984 * disasm.c (do_ui_file_delete): Delete.
14985 (gdb_insn_length): Move code creating stream to ...
14986 * utils.c (null_stream): ... here. New function.
14987 * utils.h (null_stream): Declare.
14989 2017-01-23 Simon Marchi <simon.marchi@polymtl.ca>
14991 * python/py-inferior.c (find_thread_object): Return directly
14992 from the loop. Remove "found" variable.
14994 2017-01-21 Joel Brobecker <brobecker@adacore.com>
14996 GDB 7.12.1 released.
14998 2017-01-20 Simon Marchi <simon.marchi@ericsson.com>
15000 * python/py-function.c (fnpy_call): Reorder declarations to have
15001 the gdbpy_enter object declared first.
15002 * python/py-xmethods.c (gdbpy_get_xmethod_arg_types): Likewise.
15004 2017-01-20 Simon Marchi <simon.marchi@ericsson.com>
15007 * python/python-internal.h (PyMem_RawMalloc): Define for
15009 * python/py-gdb-readline.c (gdbpy_readline_wrapper): Use
15010 PyMem_RawMalloc instead of PyMem_Malloc.
15012 2017-01-20 Mike Wrighton <mike_wrighton@codesourcery.com>
15013 Luis Machado <lgustavo@codesourcery.com>
15015 * NEWS (New commands): Mention flash-erase.
15016 (New MI commands): Mention target-flash-erase.
15017 * mi/mi-cmds.c (mi_cmd_target_flash_erase): Add target-flash-erase MI
15019 * mi/mi-cmds.h (mi_cmd_target_flash_erase): New declaration.
15020 * mi/mi-main.c (mi_cmd_target_flash_erase): New function.
15021 * target.c (flash_erase_command): New function.
15022 (initialize_targets): Add new flash-erase command.
15023 * target.h (flash_erase_command): New declaration.
15025 2017-01-20 Joel Brobecker <brobecker@adacore.com>
15027 * nat/linux-ptrace.c: Only include <sys/procfs.h> if
15028 HAVE_SYS_PROCFS_H is defined.
15030 2017-01-18 Alan Hayward <alan.hayward@arm.com>
15032 * remote.c (struct cached_reg): Change data into a pointer.
15033 * (stop_reply_dtr): Free data pointers before deleting vector.
15034 (process_stop_reply): Likewise.
15035 (remote_parse_stop_reply): Allocate space for data
15037 2017-01-18 Alan Hayward <alan.hayward@arm.com>
15039 * amd64-tdep.c (amd64_pseudo_register_read_value): remove
15041 (amd64_pseudo_register_read_value): Likewise.
15042 * remote.c (fetch_register_using_p): Remove MAX_REGISTER_SIZE.
15043 (store_register_using_P): Likewise.
15044 * regcache.c (regcache_xfer_part): Likewise.
15046 2017-01-16 Ivo Raisr <ivo.raisr@oracle.com>
15048 Split real and pseudo registers.
15049 * sparc-tdep.h (SPARC_CORE_REGISTERS): New macro.
15050 (sparc32_pseudo_regnum): New enum.
15051 * sparc64-tdep.h (sparc64_pseudo_regnum): New enum.
15052 * sparc-tdep.c (SPARC32_FPU_REGISTERS): New macro.
15053 (SPARC32_CP0_REGISTERS): New macro.
15054 (sparc32_pseudo_register_name): New function.
15055 (sparc32_register_name): Use sparc32_pseudo_register_name.
15056 (sparc32_pseudo_register_type): New function.
15057 (sparc32_register_type): Use sparc32_pseudo_register_type.
15058 (sparc32_pseudo_register_read, sparc32_pseudo_register_write): Handle
15059 pseudo register numbers.
15060 * sparc64-tdep.c SPARC64_FPU_REGISTERS): New macro.
15061 (SPARC64_CP0_REGISTERS): New macro.
15062 (sparc64_pseudo_register_name): New function.
15063 (sparc64_register_name): Use sparc64_pseudo_register_name.
15064 (sparc64_pseudo_register_type): New function.
15065 (sparc64_register_type): Use sparc64_pseudo_register_type.
15066 (sparc64_pseudo_register_read, sparc64_pseudo_register_write): Handle
15067 pseudo register numbers.
15068 (sparc64_store_floating_fields, sparc64_extract_floating_fields,
15069 sparc64_store_arguments): Handle pseudo register numbers.
15071 2017-01-13 Yao Qi <yao.qi@linaro.org>
15073 * remote.c (REMOTE_DEBUG_MAX_CHAR): New macro.
15074 (putpkt_binary): Print only REMOTE_DEBUG_MAX_CHAR chars in debug
15076 (getpkt_or_notif_sane_1): Likewise.
15078 2017-01-13 Yao Qi <yao.qi@linaro.org>
15080 * Makefile.in (checker-headers): Use CXX and CXX_DIALET instead
15081 of CC. Pass "-x c++-header" instead of "-x c".
15083 2017-01-12 Simon Marchi <simon.marchi@ericsson.com>
15085 * remote.c (remote_can_async_p): Update comment.
15087 2017-01-12 Simon Marchi <simon.marchi@ericsson.com>
15089 * linux-nat.c (linux_nat_can_async_p): Update comment.
15091 2017-01-12 Simon Marchi <simon.marchi@ericsson.com>
15093 * serial.c (serial_open): Forget about "pc" and "lpt" serial interface.
15095 2017-01-11 Simon Marchi <simon.marchi@ericsson.com>
15097 * cli/cli-decode.c (lookup_cmd_1): Fix typo in comment.
15099 2017-01-10 Tom Tromey <tom@tromey.com>
15101 * python/py-type.c (typy_legacy_template_argument): Update.
15102 * cp-support.h (struct demangle_parse_info) (demangle_parse_info,
15103 ~demangle_parse_info): Declare new members.
15104 (cp_demangled_name_to_comp): Return unique_ptr.
15105 (cp_demangled_name_parse_free)
15106 (make_cleanup_cp_demangled_name_parse_free)
15107 (cp_new_demangle_parse_info): Remove.
15108 * cp-support.c (do_demangled_name_parse_free_cleanup)
15109 (make_cleanup_cp_demangled_name_parse_free): Remove.
15110 (inspect_type, cp_canonicalize_string_full)
15111 (cp_canonicalize_string): Update.
15112 (mangled_name_to_comp): Change return type.
15113 (cp_class_name_from_physname, method_name_from_physname)
15114 (cp_func_name, cp_remove_params): Update.
15115 * cp-name-parser.y (demangle_parse_info): New constructor, from
15116 cp_new_demangle_parse_info.
15117 (~demangle_parse_info): New destructor, from
15118 cp_demangled_name_parse_free.
15119 (cp_merge_demangle_parse_infos): Update.
15120 (cp_demangled_name_to_comp): Change return type.
15122 2017-01-10 Tom Tromey <tom@tromey.com>
15124 * top.c (prevent_dont_repeat): Change return type.
15125 * python/python.c (execute_gdb_command): Use std::string.
15127 * guile/guile.c (gdbscm_execute_gdb_command): Update.
15128 * command.h (prevent_dont_repeat): Change return type.
15129 * breakpoint.c (bpstat_do_actions_1): Update.
15131 2017-01-10 Tom Tromey <tom@tromey.com>
15133 * value.h (scoped_value_mark::~scoped_value_mark): Call
15135 (scoped_value_mark::free_to_mark): New method.
15136 * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Use
15139 2017-01-10 Tom Tromey <tom@tromey.com>
15141 * python/py-value.c (valpy_dereference, valpy_referenced_value)
15142 (valpy_reference_value, valpy_const_value, valpy_get_address)
15143 (valpy_get_dynamic_type, valpy_lazy_string, valpy_do_cast)
15144 (valpy_getitem, valpy_call, valpy_binop_throw, valpy_negative)
15145 (valpy_absolute, valpy_richcompare_throw): Use scoped_value_mark.
15146 * dwarf2loc.c (dwarf2_loc_desc_get_symbol_read_needs): Use
15148 * dwarf2-frame.c (execute_stack_op): Use scoped_value_mark.
15149 * value.h (scoped_value_mark): New class.
15151 2017-01-10 Tom Tromey <tom@tromey.com>
15153 * dwarf2read.c (dwarf2_build_psymtabs): Use psymtab_discarder.
15154 * psympriv.h (make_cleanup_discard_psymtabs): Don't declare.
15155 * psymtab.c (discard_psymtabs_upto): Remove.
15156 (make_cleanup_discard_psymtabs): Remove.
15157 (struct psymtab_state): Remove.
15159 2017-01-10 Tom Tromey <tom@tromey.com>
15161 * record-full.c (record_full_save_cleanups): Remove.
15162 (record_full_save): Use gdb::unlinker.
15163 * gcore.c (do_bfd_delete_cleanup): Remove.
15164 (gcore_command): Use gdb::unlinker, unique_xmalloc_ptr. Remove
15166 * dwarf2read.c (unlink_if_set): Remove.
15167 (write_psymtabs_to_index): Use gdb::unlinker.
15168 * common/gdb_unlinker.h: New file.
15170 2017-01-10 Tom Tromey <tom@tromey.com>
15172 * windows-tdep.c (windows_xfer_shared_library): Update.
15173 * windows-nat.c (windows_make_so): Update.
15174 * utils.h (make_cleanup_bfd_unref): Remove.
15175 * utils.c (do_bfd_close_cleanup, make_cleanup_bfd_unref): Remove.
15176 * symfile.h (symfile_bfd_open)
15177 (find_separate_debug_file_in_section): Return gdb_bfd_ref_ptr.
15178 * symfile.c (read_symbols, symbol_file_add)
15179 (separate_debug_file_exists): Update.
15180 (symfile_bfd_open): Return gdb_bfd_ref_ptr.
15181 (generic_load, reread_symbols): Update.
15182 * symfile-mem.c (symbol_file_add_from_memory): Update.
15183 * spu-linux-nat.c (spu_bfd_open): Return gdb_bfd_ref_ptr.
15184 (spu_symbol_file_add_from_memory): Update.
15185 * solist.h (struct target_so_ops) <bfd_open>: Return
15187 (solib_bfd_fopen, solib_bfd_open): Return gdb_bfd_ref_ptr.
15188 * solib.c (solib_bfd_fopen, solib_bfd_open): Return
15190 (solib_map_sections, reload_shared_libraries_1): Update.
15191 * solib-svr4.c (enable_break): Update.
15192 * solib-spu.c (spu_bfd_fopen): Return gdb_bfd_ref_ptr.
15193 * solib-frv.c (enable_break2): Update.
15194 * solib-dsbt.c (enable_break): Update.
15195 * solib-darwin.c (gdb_bfd_mach_o_fat_extract): Return
15197 (darwin_solib_get_all_image_info_addr_at_init): Update.
15198 (darwin_bfd_open): Return gdb_bfd_ref_ptr.
15199 * solib-aix.c (solib_aix_bfd_open): Return gdb_bfd_ref_ptr.
15200 * record-full.c (record_full_save): Update.
15201 * python/py-objfile.c (objfpy_add_separate_debug_file): Update.
15202 * procfs.c (insert_dbx_link_bpt_in_file): Update.
15203 * minidebug.c (find_separate_debug_file_in_section): Return
15205 * machoread.c (macho_add_oso_symfile): Change abfd to
15207 (macho_symfile_read_all_oso): Update.
15208 (macho_check_dsym): Return gdb_bfd_ref_ptr.
15209 (macho_symfile_read): Update.
15210 * jit.c (bfd_open_from_target_memory): Return gdb_bfd_ref_ptr.
15211 (jit_bfd_try_read_symtab): Update.
15212 * gdb_bfd.h (gdb_bfd_open, gdb_bfd_fopen, gdb_bfd_openr)
15213 (gdb_bfd_openw, gdb_bfd_openr_iovec)
15214 (gdb_bfd_openr_next_archived_file, gdb_bfd_fdopenr): Return
15216 (gdb_bfd_ref_policy): New struct.
15217 (gdb_bfd_ref_ptr): New typedef.
15218 * gdb_bfd.c (gdb_bfd_open, gdb_bfd_fopen, gdb_bfd_openr)
15219 (gdb_bfd_openw, gdb_bfd_openr_iovec)
15220 (gdb_bfd_openr_next_archived_file, gdb_bfd_fdopenr): Return
15222 * gcore.h (create_gcore_bfd): Return gdb_bfd_ref_ptr.
15223 * gcore.c (create_gcore_bfd): Return gdb_bfd_ref_ptr.
15224 (gcore_command): Update.
15225 * exec.c (exec_file_attach): Update.
15226 * elfread.c (elf_symfile_read): Update.
15227 * dwarf2read.c (dwarf2_get_dwz_file): Update.
15228 (try_open_dwop_file, open_dwo_file): Return gdb_bfd_ref_ptr.
15229 (open_and_init_dwo_file): Update.
15230 (open_dwp_file): Return gdb_bfd_ref_ptr.
15231 (open_and_init_dwp_file): Update.
15232 * corelow.c (core_open): Update.
15233 * compile/compile-object-load.c (compile_object_load): Update.
15234 * common/gdb_ref_ptr.h (ref_ptr::operator->): New operator.
15235 * coffread.c (coff_symfile_read): Update.
15236 * cli/cli-dump.c (bfd_openr_or_error, bfd_openw_or_error): Return
15237 gdb_bfd_ref_ptr. Rename.
15238 (dump_bfd_file, restore_command): Update.
15239 * build-id.h (build_id_to_debug_bfd): Return gdb_bfd_ref_ptr.
15240 * build-id.c (build_id_to_debug_bfd): Return gdb_bfd_ref_ptr.
15241 (find_separate_debug_file_by_buildid): Update.
15243 2017-01-10 Tom Tromey <tom@tromey.com>
15245 * common/gdb_ref_ptr.h: New file.
15246 * python/py-ref.h (struct gdbpy_ref_policy): New.
15247 (gdbpy_ref): Now a typedef.
15249 2017-01-10 Tom Tromey <tom@tromey.com>
15251 * utils.h (make_cleanup_htab_delete): Don't declare.
15252 * utils.c (do_htab_delete_cleanup, make_cleanup_htab_delete):
15254 * linespec.c (decode_compound_collector): Add constructor,
15256 (lookup_prefix_sym): Remove cleanup.
15257 (symtab_collector): Add constructor, destructor.
15258 (collect_symtabs_from_filename): Remove cleanup.
15259 * disasm.c (do_mixed_source_and_assembly): Use htab_up.
15260 * compile/compile-c-symbols.c (generate_c_for_variable_locations):
15262 * gnu-v3-abi.c (gnuv3_print_vtable): Use htab_up.
15263 * dwarf2read.c (dw2_expand_symtabs_matching)
15264 (dw2_map_symbol_filenames, dwarf_decode_macros)
15265 (write_psymtabs_to_index): Use htab_up.
15266 * dwarf2loc.c (func_verify_no_selftailcall)
15267 (call_site_find_chain_1, func_verify_no_selftailcall)
15268 (chain_candidate, call_site_find_chain_1): Use std::unordered_set,
15269 std::vector, gdb::unique_xmalloc_ptr.
15270 (call_sitep): Remove typedef.
15271 (dwarf2_locexpr_baton_eval): Remove unused variable.
15273 2017-01-10 Tom Tromey <tom@tromey.com>
15275 * python/python-internal.h (make_cleanup_py_decref)
15276 (make_cleanup_py_xdecref): Don't declare.
15277 * python/py-utils.c (py_decref, make_cleanup_py_decref)
15278 (py_xdecref, make_cleanup_py_xdecref): Remove.
15280 2017-01-10 Tom Tromey <tom@tromey.com>
15282 * python/py-framefilter.c (py_mi_print_variables): Use gdbpy_ref.
15283 (py_print_locals, enumerate_locals, py_print_args): Use gdbpy_ref.
15285 2017-01-10 Tom Tromey <tom@tromey.com>
15287 * python/py-framefilter.c (enumerate_args): Use gdbpy_ref.
15289 2017-01-10 Tom Tromey <tom@tromey.com>
15291 * python/py-utils.c (unicode_to_encoded_string)
15292 (python_string_to_target_string)
15293 (python_string_to_target_python_string)
15294 (python_string_to_host_string, gdbpy_obj_to_string)
15295 (get_addr_from_python): Use gdbpy_ref.
15297 2017-01-10 Tom Tromey <tom@tromey.com>
15299 * python/py-unwind.c (pyuw_object_attribute_to_pointer): Use
15302 2017-01-10 Tom Tromey <tom@tromey.com>
15304 * python/python.c (eval_python_command, gdbpy_decode_line)
15305 (gdbpy_run_events, gdbpy_start_type_printers)
15306 (gdbpy_apply_type_printers): Use gdbpy_ref.
15308 2017-01-10 Tom Tromey <tom@tromey.com>
15310 * python/py-param.c (get_doc_string, compute_enum_values): Use
15313 2017-01-10 Tom Tromey <tom@tromey.com>
15315 * python/py-inferior.c (find_thread_object, build_inferior_list):
15318 2017-01-10 Tom Tromey <tom@tromey.com>
15320 * python/py-framefilter.c (py_print_frame): Use gdbpy_ref.
15322 2017-01-10 Tom Tromey <tom@tromey.com>
15324 * python/py-finishbreakpoint.c (bpfinishpy_out_of_scope): Use
15327 2017-01-10 Tom Tromey <tom@tromey.com>
15329 * python/py-cmd.c (cmdpy_completer_helper): Use gdbpy_ref. Remove
15331 (cmdpy_completer_handle_brkchars, cmdpy_completer, cmdpy_init):
15334 2017-01-10 Tom Tromey <tom@tromey.com>
15336 * python/py-breakpoint.c (gdbpy_breakpoint_cond_says_stop): Use
15339 2017-01-10 Tom Tromey <tom@tromey.com>
15341 * python/py-arch.c (archpy_disassemble): Use gdbpy_ref. Don't
15342 decref results of PyArg_ParseTupleAndKeywords.
15344 2017-01-10 Tom Tromey <tom@tromey.com>
15346 * python/python.c (python_run_simple_file): Use
15347 unique_xmalloc_ptr, gdbpy_ref.
15349 2017-01-10 Tom Tromey <tom@tromey.com>
15351 * python/py-prettyprint.c (print_stack_unless_memory_error)
15352 (print_string_repr, print_children): Use gdbpy_ref.
15353 (dummy_python_frame): New class.
15354 (dummy_python_frame::dummy_python_frame): Rename from
15355 push_dummy_python_frame.
15356 (py_restore_tstate): Remove.
15358 2017-01-10 Tom Tromey <tom@tromey.com>
15360 * python/py-framefilter.c (py_print_frame): Use gdbpy_ref.
15362 2017-01-10 Tom Tromey <tom@tromey.com>
15364 * python/python.c (ensure_python_env, restore_python_env):
15366 * python/python-internal.h (ensure_python_env): Don't declare.
15367 * varobj.h (varobj_ensure_python_env): Don't declare.
15368 * varobj.c (varobj_ensure_python_env): Remove.
15370 2017-01-10 Tom Tromey <tom@tromey.com>
15372 * varobj.c (varobj_value_get_print_value): Use
15373 gdbpy_enter_varobj.
15375 2017-01-10 Tom Tromey <tom@tromey.com>
15377 * python/py-prettyprint.c (print_string_repr, print_children):
15379 * python/py-lazy-string.c (gdbpy_extract_lazy_string): Change type
15381 * varobj.c (varobj_value_get_print_value): Update.
15382 * python/python-internal.h (gdbpy_extract_lazy_string): Update.
15384 2017-01-10 Tom Tromey <tom@tromey.com>
15386 * varobj.c (varobj_get_display_hint)
15387 (dynamic_varobj_has_child_method, install_new_value_visualizer)
15388 (varobj_set_visualizer, free_variable): Use
15389 gdbpy_enter_varobj.
15391 2017-01-10 Tom Tromey <tom@tromey.com>
15393 * python/python.c (python_command): Use gdbpy_enter, gdbpy_ref.
15394 (do_finish_initialization): New function. Use gdbpy_ref.
15395 (gdbpy_finish_initialization): Use gdbpy_enter. Call
15396 do_finish_initialization.
15398 2017-01-10 Tom Tromey <tom@tromey.com>
15400 * python/py-param.c (get_set_value, get_show_value): Use
15401 gdbpy_enter, gdbpy_ref.
15403 2017-01-10 Tom Tromey <tom@tromey.com>
15405 * python/py-function.c (fnpy_call): Use gdbpy_enter, gdbpy_ref.
15407 2017-01-10 Tom Tromey <tom@tromey.com>
15409 * python/py-cmd.c (cmdpy_function): Use gdbpy_enter, gdbpy_ref.
15411 2017-01-10 Tom Tromey <tom@tromey.com>
15413 * python/py-varobj.c (py_varobj_iter_dtor, py_varobj_iter_next):
15414 Use gdbpy_enter_varobj.
15416 2017-01-10 Tom Tromey <tom@tromey.com>
15418 * varobj.c (gdbpy_enter_varobj): New constructor.
15419 * python/python-internal.h (gdbpy_enter_varobj): New class.
15420 * python/py-varobj.c (py_varobj_get_iterator): Use
15421 gdbpy_enter_varobj.
15423 2017-01-10 Tom Tromey <tom@tromey.com>
15425 * python/py-xmethods.c (gdbpy_get_xmethod_result_type): Use
15426 gdbpy_enter, gdbpy_ref, unique_xmalloc_ptr.
15427 (gdbpy_invoke_xmethod): Use gdbpy_ref, gdbpy_enter.
15428 (gdbpy_get_xmethod_arg_types): Use gdbpy_ref,
15429 unique_xmalloc_ptr.
15430 (gdbpy_get_xmethod_arg_types): Use gdbpy_ref, gdbpy_enter.
15432 2017-01-10 Tom Tromey <tom@tromey.com>
15434 * python/py-xmethods.c (invoke_match_method): Use
15437 2017-01-10 Tom Tromey <tom@tromey.com>
15439 * python/py-xmethods.c (gdbpy_get_matching_xmethod_workers): use
15440 gdbpy_enter, gdbpy_ref.
15442 2017-01-10 Tom Tromey <tom@tromey.com>
15444 * python/python.c (python_interactive_command): Use gdbpy_enter.
15446 2017-01-10 Tom Tromey <tom@tromey.com>
15448 * python/python.c (gdbpy_before_prompt_hook): Use gdbpy_enter,
15451 2017-01-10 Tom Tromey <tom@tromey.com>
15453 * python/py-prettyprint.c (gdbpy_apply_val_pretty_printer): Use
15454 gdbpy_enter, gdbpy_ref, unique_xmalloc_ptr.
15456 2017-01-10 Tom Tromey <tom@tromey.com>
15458 * utils.h (htab_deleter): New struct.
15459 (htab_up): New typedef.
15460 * python/py-framefilter.c (gdbpy_apply_frame_filter): Use
15461 gdbpy_enter, gdbpy_ref, htab_up.
15463 2017-01-10 Tom Tromey <tom@tromey.com>
15465 * python/py-unwind.c (pending_frame_invalidate): Remove.
15466 (pyuw_sniffer): Use gdbpy_enter and gdbpy_ref.
15468 2017-01-10 Tom Tromey <tom@tromey.com>
15470 * python/py-xmethods.c (gdbpy_free_xmethod_worker_data)
15471 (gdbpy_clone_xmethod_worker_data): Use gdbpy_enter.
15473 2017-01-10 Tom Tromey <tom@tromey.com>
15475 * python/py-type.c (save_objfile_types): Use gdbpy_enter.
15477 2017-01-10 Tom Tromey <tom@tromey.com>
15479 * python/python.c (gdbpy_eval_from_control_command)
15480 (gdbpy_source_script, gdbpy_run_events)
15481 (gdbpy_source_objfile_script, gdbpy_execute_objfile_script)
15482 (gdbpy_free_type_printers, gdbpy_finish_initialization): Use
15485 2017-01-10 Tom Tromey <tom@tromey.com>
15487 * python/py-progspace.c (py_free_pspace): Use gdbpy_enter.
15489 2017-01-10 Tom Tromey <tom@tromey.com>
15491 * python/py-objfile.c (py_free_objfile): Use gdbpy_enter.
15493 2017-01-10 Tom Tromey <tom@tromey.com>
15495 * python/py-inferior.c (python_on_normal_stop, python_on_resume)
15496 (python_on_inferior_call_pre, python_on_inferior_call_post)
15497 (python_on_memory_change, python_on_register_change)
15498 (python_inferior_exit, python_new_objfile, add_thread_object)
15499 (delete_thread_object, py_free_inferior): Use gdbpy_enter.
15501 2017-01-10 Tom Tromey <tom@tromey.com>
15503 * python/py-finishbreakpoint.c (bpfinishpy_handle_stop)
15504 (bpfinishpy_handle_exit): Use gdbpy_enter.
15506 2017-01-10 Tom Tromey <tom@tromey.com>
15508 * python/py-cmd.c (cmdpy_destroyer)
15509 (cmdpy_completer_handle_brkchars, cmdpy_completer): Use
15512 2017-01-10 Tom Tromey <tom@tromey.com>
15514 * python/py-breakpoint.c (gdbpy_breakpoint_cond_says_stop): Use
15516 (gdbpy_breakpoint_has_cond): Likewise.
15518 2017-01-10 Tom Tromey <tom@tromey.com>
15520 * python/python.c (gdbpy_enter): New constructor.
15521 (~gdbpy_enter): New destructor.
15522 (restore_python_env, ensure_python_env): Rewrite.
15523 * python/python-internal.h (gdbpy_enter): New class.
15525 2017-01-10 Tom Tromey <tom@tromey.com>
15527 * python/py-symbol.c (gdbpy_lookup_symbol): Use gdbpy_ref.
15529 2017-01-10 Tom Tromey <tom@tromey.com>
15531 * python/py-value.c (value_has_field, get_field_flag)
15532 (get_field_type, valpy_getitem, convert_value_from_python): Use
15535 2017-01-10 Tom Tromey <tom@tromey.com>
15537 * python/python.c (gdbpy_progspaces, gdbpy_objfiles): Use
15540 2017-01-10 Tom Tromey <tom@tromey.com>
15542 * python/py-prettyprint.c (search_pp_list)
15543 (find_pretty_printer_from_objfiles)
15544 (find_pretty_printer_from_progspace)
15545 (find_pretty_printer_from_gdb, find_pretty_printer)
15546 (gdbpy_get_display_hint, gdbpy_get_varobj_pretty_printer): Use
15549 2017-01-10 Tom Tromey <tom@tromey.com>
15551 * python/py-param.c (call_doc_function): Use gdbpy_ref.
15553 2017-01-10 Tom Tromey <tom@tromey.com>
15555 * python/py-linetable.c (build_line_table_tuple_from_pcs)
15556 (ltpy_get_all_source_lines): Use gdbpy_ref.
15558 2017-01-10 Tom Tromey <tom@tromey.com>
15560 * python/py-framefilter.c (extract_sym, extract_value)
15561 (get_py_iter_from_func, bootstrap_python_frame_filters): Use
15564 2017-01-10 Tom Tromey <tom@tromey.com>
15566 * python/py-breakpoint.c (gdbpy_breakpoints): Use gdbpy_ref.
15568 2017-01-10 Tom Tromey <tom@tromey.com>
15570 * python/py-inferior.c (gdbpy_inferiors): Use gdbpy_ref.
15572 2017-01-10 Tom Tromey <tom@tromey.com>
15574 * python/py-function.c (convert_values_to_python, fnpy_init): Use
15577 2017-01-10 Tom Tromey <tom@tromey.com>
15579 * python/py-cmd.c (gdbpy_string_to_argv): Use gdbpy_ref.
15581 2017-01-10 Tom Tromey <tom@tromey.com>
15583 * python/py-type.c (convert_field, make_fielditem, typy_fields)
15584 (typy_range): Use gdbpy_ref.
15586 2017-01-10 Tom Tromey <tom@tromey.com>
15588 * python/py-threadevent.c (create_thread_event_object): Use
15590 * python/py-stopevent.c (create_stop_event_object): Simplify.
15591 (emit_stop_event): Use gdbpy_ref.
15592 * python/py-signalevent.c (create_signal_event_object): Use
15594 * python/py-newobjfileevent.c (create_new_objfile_event_object)
15595 (emit_new_objfile_event, create_clear_objfiles_event_object)
15596 (emit_clear_objfiles_event): Use gdbpy_ref.
15597 * python/py-infevents.c (create_inferior_call_event_object)
15598 (create_register_changed_event_object)
15599 (create_memory_changed_event_object, emit_inferior_call_event)
15600 (emit_memory_changed_event, emit_register_changed_event): Use
15602 * python/py-exitedevent.c (create_exited_event_object)
15603 (emit_exited_event): Use gdbpy_ref.
15604 * python/py-event.h (evpy_emit_event): Remove
15605 CPYCHECKER_STEALS_REFERENCE_TO_ARG annotation.
15606 * python/py-event.c (evpy_emit_event): Use gdbpy_ref.
15607 * python/py-continueevent.c (emit_continue_event): Use
15609 * python/py-breakpoint.c (gdbpy_breakpoint_created)
15610 (gdbpy_breakpoint_deleted, gdbpy_breakpoint_modified): Use
15612 * python/py-bpevent.c (create_breakpoint_event_object): Use
15615 2017-01-10 Tom Tromey <tom@tromey.com>
15617 * python/py-ref.h: New file.
15619 2017-01-10 Simon Marchi <simon.marchi@ericsson.com>
15621 * cli-out.c (cli_ui_out::do_redirect): Change return type to
15623 * cli-out.h (cli_ui_out::do_redirect): Likewise.
15624 * mi/mi-out.c (mi_ui_out::do_redirect): Likewise.
15625 * mi/mi-out.h (mi_ui_out::do_redirect): Likewise.
15626 * ui-out.c (ui_out::redirect): Likewise.
15627 * ui-out.h (ui_out::redirect, ui_out::do_redirect): Likewise.
15628 * cli/cli-logging.c (set_logging_redirect): Update call site of
15630 (handle_redirections): Likewise.
15631 * scm-ports.c (ioscm_with_output_to_port_worker): Likewise.
15632 * top.c (execute_command_to_string): Likewise.
15633 * utils.c (do_ui_out_redirect_pop): Likewise.
15635 2017-01-10 Simon Marchi <simon.marchi@ericsson.com>
15637 * stack.c (_initialize_stack): Update "frame" command help message.
15639 2017-01-08 Iain Buclaw <ibuclaw@gdcproject.org>
15641 * d-exp.y (CastExpression): Emit UNOP_CAST_TYPE.
15643 2017-01-06 Yao Qi <yao.qi@linaro.org>
15645 * x86-linux-nat.h: Include gdb_proc_service.h.
15647 2017-01-06 Yao Qi <yao.qi@linaro.org>
15649 * ser-base.h: Include serial.h.
15651 2017-01-06 Yao Qi <yao.qi@linaro.org>
15653 * ppc-linux-tdep.h: Include ppc-tdep.h.
15655 2017-01-06 Yao Qi <yao.qi@linaro.org>
15657 * nat/amd64-linux-siginfo.h: Include signal.h.
15659 2017-01-06 Yao Qi <yao.qi@linaro.org>
15661 * nat/aarch64-linux-hw-point.h: Include break-common.h.
15663 2017-01-06 Yao Qi <yao.qi@linaro.org>
15665 * mi/mi-parse.h: Include mi-cmds.h.
15667 2017-01-06 Yao Qi <yao.qi@linaro.org>
15669 * inf-loop.c: Don't include "target.h".
15670 * inf-loop.h: Include it here.
15672 2017-01-06 Yao Qi <yao.qi@linaro.org>
15674 * dfp.h: Include "dboulest.h" and "expression.h".
15676 2017-01-06 Yao Qi <yao.qi@linaro.org>
15678 * ax-gdb.h: Include "ax.h".
15680 2017-01-06 Yao Qi <yao.qi@linaro.org>
15682 * Makefile.in (HFILES_NO_SRCDIR): Replace gdb_ptrace.h
15683 with nat/gdb_ptrace.h.
15685 2017-01-05 Yao Qi <yao.qi@linaro.org>
15687 * mips-fbsd-tdep.c (mips_fbsd_sigframe_init): Move && to
15689 (mips64_fbsd_sigframe_init): Likewise.
15691 2017-01-04 John Baldwin <jhb@FreeBSD.org>
15693 * mips-fbsd-tdep.c (_initialize_mips_fbsd_tdep): Use
15694 GDB_OSABI_FREEBSD instead of GDB_OSABI_FREEBSD_ELF.
15696 2017-01-04 John Baldwin <jhb@FreeBSD.org>
15698 * Makefile.in (ALLDEPFILES): Add mips-fbsd-nat.c.
15699 * NEWS: Mention new FreeBSD/mips native configuration.
15700 * config/mips/fbsd.mh: New file.
15701 * configure.host: Add mips*-*-freebsd*.
15702 * mips-fbsd-nat.c: New file.
15704 2017-01-04 John Baldwin <jhb@FreeBSD.org>
15706 * Makefile.in (ALL_TARGET_OBS): Add mips-fbsd-tdep.o.
15707 (ALLDEPFILES): Add mips-fbsd-tdep.c.
15708 * NEWS: Mention new FreeBSD/mips target.
15709 * configure.tgt: Add mips*-*-freebsd*.
15710 * mips-fbsd-tdep.c: New file.
15711 * mips-fbsd-tdep.h: New file.
15713 2017-01-04 Yao Qi <yao.qi@linaro.org>
15715 * dwarf2loc.c (write_pieced_value): Don't use VALUE_FRAME_ID (to),
15716 use c->frame_id when the piece location is DWARF_VALUE_REGISTER.
15718 2017-01-01 Joel Brobecker <brobecker@adacore.com>
15720 Update copyright year range in all GDB files.
15722 2017-01-01 Joel Brobecker <brobecker@adacore.com>
15724 * config/djgpp/fnchange.lst: Add entry for gdb/ChangeLog-2016.
15726 For older changes see ChangeLog-2016.
15732 version-control: never