]> git.ipfire.org Git - thirdparty/binutils-gdb.git/blame - gdb/ChangeLog
Optimize .gdb_index symbol name searching
[thirdparty/binutils-gdb.git] / gdb / ChangeLog
CommitLineData
3f563c84
PA
12017-11-08 Pedro Alves <palves@redhat.com>
2
3 * dwarf2read.c (byte_swap, MAYBE_SWAP): Move higher up in file.
4 (struct name_component): New.
5 (mapped_index::name_components): New field.
6 (mapped_index::symbol_name_at): New method.
7 (dwarf2_read_index): Call mapped_index ctor.
8 (dw2_map_matching_symbols): Add comment about name_components
9 table.
10 (dw2_expand_symtabs_matching): Factor part to...
11 (dw2_expand_symtabs_matching_symbol): ... this new function.
12 Build name components table, and lookup symbols in it before
13 calling the name matcher.
14 (dw2_expand_marked_cus): New, factored out from
15 dw2_expand_symtabs_matching.
16 (dwarf2_per_objfile_free): Call the mapped_index's dtor.
17
b5ec771e
PA
182017-11-08 Pedro Alves <palves@redhat.com>
19
20 * ada-lang.c (ada_encode): Rename to ..
21 (ada_encode_1): ... this. Add throw_errors parameter and handle
22 it.
23 (ada_encode): Reimplement.
24 (match_name): Delete, folded into full_name.
25 (resolve_subexp): No longer pass the encoded name to
26 ada_lookup_symbol_list.
27 (should_use_wild_match): Delete.
28 (name_match_type_from_name): New.
29 (ada_lookup_simple_minsym): Use lookup_name_info and the
30 language's symbol_name_matcher_ftype.
31 (add_symbols_from_enclosing_procs, ada_add_local_symbols)
32 (ada_add_block_renamings): Adjust to use lookup_name_info.
33 (ada_lookup_name): New.
34 (add_nonlocal_symbols, ada_add_all_symbols)
35 (ada_lookup_symbol_list_worker, ada_lookup_symbol_list)
36 (ada_iterate_over_symbols): Adjust to use lookup_name_info.
37 (ada_name_for_lookup): Delete.
38 (ada_lookup_encoded_symbol): Construct a verbatim name.
39 (wild_match): Reverse sense of return type. Use bool.
40 (full_match): Reverse sense of return type. Inline bits of old
41 match_name here.
42 (ada_add_block_symbols): Adjust to use lookup_name_info.
43 (symbol_completion_match): Delete, folded into...
44 (ada_lookup_name_info::matches): ... .this new method.
45 (symbol_completion_add): Delete.
46 (ada_collect_symbol_completion_matches): Add name_match_type
47 parameter. Adjust to use lookup_name_info and
48 completion_list_add_name.
49 (get_var_value, ada_add_global_exceptions): Adjust to use
50 lookup_name_info.
51 (ada_get_symbol_name_cmp): Delete.
52 (do_wild_match, do_full_match): New functions.
53 (ada_lookup_name_info::ada_lookup_name_info): New method.
54 (ada_symbol_name_matches, ada_get_symbol_name_matcher): New
55 functions.
56 (ada_language_defn): Install ada_get_symbol_name_matcher.
57 * ada-lex.l (processId): If name starts with '<', copy it
58 verbatim.
59 * block.c (block_iter_match_step, block_iter_match_first)
60 (block_iter_match_next, block_lookup_symbol)
61 (block_lookup_symbol_primary, block_find_symbol): Adjust to use
62 lookup_name_info.
63 * block.h (block_iter_match_first, block_iter_match_next)
64 (ALL_BLOCK_SYMBOLS_WITH_NAME): Adjust to use lookup_name_info.
65 * c-lang.c (c_language_defn, cplus_language_defn)
66 (asm_language_defn, minimal_language_defn): Adjust comments to
67 refer to la_get_symbol_name_matcher.
68 * completer.c (complete_files_symbols)
69 (collect_explicit_location_matches, symbol_completer): Pass a
70 symbol_name_match_type down.
71 * completer.h (class completion_match, completion_match_result):
72 New classes.
73 (completion_tracker::reset_completion_match_result): New method.
74 (completion_tracker::m_completion_match_result): New field.
75 * cp-support.c (make_symbol_overload_list_block): Adjust to use
76 lookup_name_info.
77 (cp_fq_symbol_name_matches, cp_get_symbol_name_matcher): New
78 functions.
79 * cp-support.h (cp_get_symbol_name_matcher): New declaration.
80 * d-lang.c: Adjust comments to refer to
81 la_get_symbol_name_matcher.
82 * dictionary.c (dict_vector) <iter_match_first, iter_match_next>:
83 Adjust to use lookup_name_info.
84 (dict_iter_match_first, dict_iter_match_next)
85 (iter_match_first_hashed, iter_match_next_hashed)
86 (iter_match_first_linear, iter_match_next_linear): Adjust to work
87 with a lookup_name_info.
88 * dictionary.h (dict_iter_match_first, dict_iter_match_next):
89 Likewise.
90 * dwarf2read.c (dw2_lookup_symbol): Adjust to use lookup_name_info.
91 (dw2_map_matching_symbols): Adjust to use symbol_name_match_type.
92 (gdb_index_symbol_name_matcher): New class.
93 (dw2_expand_symtabs_matching) Adjust to use lookup_name_info and
94 gdb_index_symbol_name_matcher. Accept a NULL symbol_matcher.
95 * f-lang.c (f_collect_symbol_completion_matches): Adjust to work
96 with a symbol_name_match_type.
97 (f_language_defn): Adjust comments to refer to
98 la_get_symbol_name_matcher.
99 * go-lang.c (go_language_defn): Adjust comments to refer to
100 la_get_symbol_name_matcher.
101 * language.c (default_symbol_name_matcher)
102 (language_get_symbol_name_matcher): New functions.
103 (unknown_language_defn, auto_language_defn): Adjust comments to
104 refer to la_get_symbol_name_matcher.
105 * language.h (symbol_name_cmp_ftype): Delete.
106 (language_defn) <la_collect_symbol_completion_matches>: Add match
107 type parameter.
108 <la_get_symbol_name_cmp>: Delete field.
109 <la_get_symbol_name_matcher>: New field.
110 <la_iterate_over_symbols>: Adjust to use lookup_name_info.
111 (default_symbol_name_matcher, language_get_symbol_name_matcher):
112 Declare.
113 * linespec.c (iterate_over_all_matching_symtabs)
114 (iterate_over_file_blocks): Adjust to use lookup_name_info.
115 (find_methods): Add language parameter, and use lookup_name_info
116 and the language's symbol_name_matcher_ftype.
117 (linespec_complete_function): Adjust.
118 (lookup_prefix_sym): Use lookup_name_info.
119 (add_all_symbol_names_from_pspace): Adjust.
120 (find_superclass_methods): Add language parameter and pass it
121 down.
122 (find_method): Pass symbol language down.
123 (find_linespec_symbols): Don't demangle or Ada encode here.
124 (search_minsyms_for_name): Add lookup_name_info parameter.
125 (add_matching_symbols_to_info): Add name_match_type parameter.
126 Use lookup_name_info.
127 * m2-lang.c (m2_language_defn): Adjust comments to refer to
128 la_get_symbol_name_matcher.
129 * minsyms.c: Include <algorithm>.
130 (add_minsym_to_demangled_hash_table): Remove table parameter and
131 add objfile parameter. Use search_name_hash, and add language to
132 demangled languages vector.
133 (struct found_minimal_symbols): New struct.
134 (lookup_minimal_symbol_mangled, lookup_minimal_symbol_demangled):
135 New functions.
136 (lookup_minimal_symbol): Adjust to use them. Don't canonicalize
137 input names here. Use lookup_name_info instead. Lookup up
138 demangled names once for each language in the demangled names
139 vector.
140 (iterate_over_minimal_symbols): Use lookup_name_info. Lookup up
141 demangled names once for each language in the demangled names
142 vector.
143 (build_minimal_symbol_hash_tables): Adjust.
144 * minsyms.h (iterate_over_minimal_symbols): Adjust to pass down a
145 lookup_name_info.
146 * objc-lang.c (objc_language_defn): Adjust comment to refer to
147 la_get_symbol_name_matcher.
148 * objfiles.h: Include <vector>.
149 (objfile_per_bfd_storage) <demangled_hash_languages>: New field.
150 * opencl-lang.c (opencl_language_defn): Adjust comment to refer to
151 la_get_symbol_name_matcher.
152 * p-lang.c (pascal_language_defn): Adjust comment to refer to
153 la_get_symbol_name_matcher.
154 * psymtab.c (psym_lookup_symbol): Use lookup_name_info.
155 (match_partial_symbol): Use symbol_name_match_type,
156 lookup_name_info and psymbol_name_matches.
157 (lookup_partial_symbol): Use lookup_name_info.
158 (map_block): Use symbol_name_match_type and lookup_name_info.
159 (psym_map_matching_symbols): Use symbol_name_match_type.
160 (psymbol_name_matches): New.
161 (recursively_search_psymtabs): Use lookup_name_info and
162 psymbol_name_matches. Rename 'kind' parameter to 'domain'.
163 (psym_expand_symtabs_matching): Use lookup_name_info. Rename
164 'kind' parameter to 'domain'.
165 * rust-lang.c (rust_language_defn): Adjust comment to refer to
166 la_get_symbol_name_matcher.
167 * symfile-debug.c (debug_qf_map_matching_symbols)
168 (debug_qf_map_matching_symbols): Use symbol_name_match_type.
169 (debug_qf_expand_symtabs_matching): Use lookup_name_info.
170 * symfile.c (expand_symtabs_matching): Use lookup_name_info.
171 * symfile.h (quick_symbol_functions) <map_matching_symbols>:
172 Adjust to use symbol_name_match_type.
173 <expand_symtabs_matching>: Adjust to use lookup_name_info.
174 (expand_symtabs_matching): Adjust to use lookup_name_info.
175 * symmisc.c (maintenance_expand_symtabs): Use
176 lookup_name_info::match_any ().
177 * symtab.c (symbol_matches_search_name): New.
178 (eq_symbol_entry): Adjust to use lookup_name_info and the
179 language's matcher.
180 (demangle_for_lookup_info::demangle_for_lookup_info): New.
181 (lookup_name_info::match_any): New.
182 (iterate_over_symbols, search_symbols): Use lookup_name_info.
183 (compare_symbol_name): Add language, lookup_name_info and
184 completion_match_result parameters, and use them.
185 (completion_list_add_name): Make extern. Add language and
186 lookup_name_info parameters. Use them.
187 (completion_list_add_symbol, completion_list_add_msymbol)
188 (completion_list_objc_symbol): Add lookup_name_info parameters and
189 adjust. Pass down language.
190 (completion_list_add_fields): Add lookup_name_info parameters and
191 adjust. Pass down language.
192 (add_symtab_completions): Add lookup_name_info parameters and
193 adjust.
194 (default_collect_symbol_completion_matches_break_on): Add
195 name_match_type parameter, and use it. Use lookup_name_info.
196 (default_collect_symbol_completion_matches)
197 (collect_symbol_completion_matches): Add name_match_type
198 parameter, and pass it down.
199 (collect_symbol_completion_matches_type): Adjust.
200 (collect_file_symbol_completion_matches): Add name_match_type
201 parameter, and use lookup_name_info.
202 * symtab.h: Include <string> and "common/gdb_optional.h".
203 (enum class symbol_name_match_type): New.
204 (class ada_lookup_name_info): New.
205 (struct demangle_for_lookup_info): New.
206 (class lookup_name_info): New.
207 (symbol_name_matcher_ftype): New.
208 (SYMBOL_MATCHES_SEARCH_NAME): Use symbol_matches_search_name.
209 (symbol_matches_search_name): Declare.
210 (MSYMBOL_MATCHES_SEARCH_NAME): Delete.
211 (default_collect_symbol_completion_matches)
212 (collect_symbol_completion_matches)
213 (collect_file_symbol_completion_matches): Add name_match_type
214 parameter.
215 (iterate_over_symbols): Use lookup_name_info.
216 (completion_list_add_name): Declare.
217 * utils.c (enum class strncmp_iw_mode): Moved to utils.h.
218 (strncmp_iw_with_mode): Now extern.
219 * utils.h (enum class strncmp_iw_mode): Moved from utils.c.
220 (strncmp_iw_with_mode): Declare.
221
5ffa0793
PA
2222017-11-08 Keith Seitz <keiths@redhat.com>
223 Pedro Alves <palves@redhat.com>
224
225 * ada-lang.c (ada_language_defn): Install
226 default_search_name_hash.
227 * buildsym.c (struct buildsym_compunit): <language>: New field.
228 (finish_block_internal): Pass language when creating dictionaries.
229 (start_buildsym_compunit, start_symtab): New language parameters.
230 Use them.
231 (restart_symtab): Pass down compilation unit's language.
232 * buildsym.h (enum language): Forward declare.
233 (start_symtab): New 'language' parameter.
234 * c-lang.c (c_language_defn, cplus_language_defn)
235 (asm_language_defn, minimal_language_defn): Install
236 default_search_name_hash.
237 * coffread.c (coff_start_symtab): Adjust.
238 * d-lang.c (d_language_defn): Install default_search_name_hash.
239 * dbxread.c (struct symloc): Add 'pst_language' field.
240 (PST_LANGUAGE): Define.
241 (start_psymtab, read_ofile_symtab): Use it.
242 (process_one_symbol): New 'language' parameter. Pass it down.
243 * dictionary.c (struct dictionary) <language>: New field.
244 (DICT_LANGUAGE): Define.
245 (dict_create_hashed, dict_create_hashed_expandable)
246 (dict_create_linear, dict_create_linear_expandable): New parameter
247 'language'. Set the dictionary's language.
248 (iter_match_first_hashed): Adjust to rename.
249 (insert_symbol_hashed): Assert we don't see mismatching
250 languages. Adjust to rename.
251 (dict_hash): Rename to ...
252 (default_search_name_hash): ... this and make extern.
253 * dictionary.h (struct language_defn): Forward declare.
254 (dict_create_hashed): New parameter 'language'.
255 * dwarf2read.c (dwarf2_start_symtab): Pass down language.
256 * f-lang.c (f_language_defn): Install default_search_name_hash.
257 * go-lang.c (go_language_defn): Install default_search_name_hash.
258 * jit.c (finalize_symtab): Pass compunit's language to dictionary
259 creation.
260 * language.c (unknown_language_defn, auto_language_defn):
261 * language.h (language_defn::la_search_name_hash): New field.
262 (default_search_name_hash): Declare.
263 * m2-lang.c (m2_language_defn): Install default_search_name_hash.
264 * mdebugread.c (new_block): New parameter 'language'.
265 * mdebugread.c (parse_symbol): Pass symbol language to block
266 allocation.
267 (psymtab_to_symtab_1): Pass down language.
268 (new_symtab): Pass compunit's language to block allocation.
269 * objc-lang.c (objc_language_defn): Install
270 default_search_name_hash.
271 * opencl-lang.c (opencl_language_defn):
272 * p-lang.c (pascal_language_defn): Install
273 default_search_name_hash.
274 * rust-lang.c (rust_language_defn): Install
275 default_search_name_hash.
276 * stabsread.h (enum language): Forward declare.
277 (process_one_symbol): Add 'language' parameter.
278 * symtab.c (search_name_hash): New function.
279 * symtab.h (search_name_hash): Declare.
280 * xcoffread.c (read_xcoff_symtab): Pass language to start_symtab.
281
2a1dde5d
PA
2822017-11-08 Pedro Alves <palves@redhat.com>
283
284 * cp-name-parser.y (main): Don't initialize extra_chars.
285
95a6b0a1
TT
2862017-11-07 Tom Tromey <tom@tromey.com>
287
288 * event-top.h (command_handler): Constify.
289 * record-full.c (cmd_record_full_start): Update.
290 * thread.c (thread_apply_all_command): Update.
291 * printcmd.c (eval_command): Update.
292 * mi/mi-main.c (mi_execute_cli_command): Update.
293 (mi_execute_async_cli_command): Update.
294 * tui/tui-stack.c (tui_update_command): Update.
295 * cli/cli-interp.c (safe_execute_command): Constify.
296 * record.c (record_start): Update.
297 (record_start, record_stop, cmd_record_start): Update.
298 * record-btrace.c (cmd_record_btrace_bts_start): Update.
299 (cmd_record_btrace_pt_start): Update.
300 (cmd_record_btrace_start): Update.
301 (cmd_record_btrace_start): Update.
302 * reverse.c (exec_reverse_once): Update.
303 * python/python.c (execute_gdb_command): Don't copy the command.
304 * event-top.c (command_line_handler): Update.
305 (command_handler): Constify.
306 * defs.h (deprecated_call_command_hook): Constify.
307 * cli/cli-script.h (execute_user_command): Constify.
308 * cli/cli-script.c (execute_user_command): Constify.
309 (execute_cmd_pre_hook, execute_cmd_post_hook): Constify.
310 (enum command_control_type): Update.
311 * main.c (catch_command_errors): Remove non-const overload.
312 (catch_command_errors_ftype): Remove.
313 * python/py-cmd.c (cmdpy_function): Constify.
314 * guile/scm-cmd.c (cmdscm_function): Constify.
315 * cli/cli-dump.c (call_dump_func): Constify.
316 * cli/cli-decode.c (do_const_cfunc): Constify.
317 (do_sfunc): Constify.
318 (cmd_func): Constify.
319 * gdbcmd.h (execute_command, execute_command_to_string): Constify.
320 * top.h (execute_command): Constify.
321 * top.c (execute_command): Constify.
322 (execute_command_to_string): Constify.
323 (deprecated_call_command_hook): Constify.
324 * command.h (cmd_func): Constify.
325 * cli/cli-decode.h (struct cmd_list_element) <func>: Constify.
326
eb4c3f4a
TT
3272017-11-07 Tom Tromey <tom@tromey.com>
328
329 * ada-lang.c (catch_ada_exception_command): Constify.
330 (catch_assert_command): Constify.
331 * break-catch-throw.c (catch_catch_command, catch_throw_command)
332 (catch_rethrow_command): Constify.
333 (catch_exception_command_1): Constify.
334 * breakpoint.h (add_catch_command): Constify.
335 * break-catch-syscall.c (catch_syscall_command_1): Constify.
336 (catch_syscall_split_args): Constify.
337 * break-catch-sig.c (catch_signal_command): Constify.
338 (catch_signal_split_args): Constify.
339 * cli/cli-decode.h (struct cmd_list_element) <function>: Use
340 cmd_const_sfunc_ftype.
341 * cli/cli-decode.c (add_setshow_cmd_full): Constify.
342 (add_setshow_enum_cmd, add_setshow_auto_boolean_cmd)
343 (add_setshow_boolean_cmd, add_setshow_filename_cmd)
344 (add_setshow_string_cmd, struct cmd_list_element)
345 (add_setshow_optional_filename_cmd, add_setshow_integer_cmd)
346 (add_setshow_uinteger_cmd, add_setshow_zinteger_cmd)
347 (add_setshow_zuinteger_unlimited_cmd, add_setshow_zuinteger_cmd):
348 Constify.
349 (set_cmd_sfunc): Constify.
350 (empty_sfunc): Constify.
351 * command.h (add_setshow_enum_cmd, add_setshow_auto_boolean_cmd)
352 (add_setshow_boolean_cmd, add_setshow_filename_cmd)
353 (add_setshow_string_cmd, add_setshow_string_noescape_cmd)
354 (add_setshow_optional_filename_cmd, add_setshow_integer_cmd)
355 (add_setshow_uinteger_cmd, add_setshow_zinteger_cmd)
356 (add_setshow_zuinteger_cmd, add_setshow_zuinteger_unlimited_cmd):
357 Constify.
358 (set_cmd_sfunc): Constify.
359 (cmd_sfunc_ftype): Remove.
360 * compile/compile.c (set_compile_args): Constify.
361 * infrun.c (set_disable_randomization): Constify.
362 * infcmd.c (set_args_command, set_cwd_command): Constify.
363 * breakpoint.c (set_condition_evaluation_mode): Constify.
364 (add_catch_command): Constify.
365 (catch_fork_command_1, catch_exec_command_1)
366 (catch_load_command_1, catch_unload_command_1): Constify.
367 (catch_load_or_unload): Constify.
368 * guile/scm-param.c (pascm_set_func): Constify.
369 (add_setshow_generic): Constify.
370 * python/py-param.c (get_set_value): Constify.
371 * top.h (set_verbose): Constify.
372 * tui/tui-win.c (tui_set_var_cmd): Constify.
373 * mi/mi-main.c (set_mi_async_command): Constify.
374 * cli/cli-logging.c (set_logging_overwrite)
375 (set_logging_redirect): Constify.
376 * value.c (set_max_value_size): Constify.
377 * valprint.c (set_input_radix, set_output_radix): Constify.
378 * utils.c (set_width_command, set_height_command): Constify.
379 * typeprint.c (set_print_type_methods, set_print_type_typedefs): Constify.
380 * tracepoint.c (set_disconnected_tracing)
381 (set_circular_trace_buffer, set_trace_buffer_size)
382 (set_trace_user, set_trace_notes, set_trace_stop_notes): Constify.
383 * top.c (set_history_size_command, set_verbose, set_editing)
384 (set_gdb_datadir, set_history_filename): Constify.
385 * target.c (set_targetdebug, maint_set_target_async_command)
386 (maint_set_target_non_stop_command, set_target_permissions)
387 (set_write_memory_permission): Constify.
388 (open_target): Constify.
389 * target-descriptions.c (set_tdesc_filename_cmd): Constify.
390 * target-dcache.c (set_stack_cache, set_code_cache): Constify.
391 * symtab.c (set_symbol_cache_size_handler): Constify.
392 * symfile.c (set_ext_lang_command): Constify.
393 * symfile-debug.c (set_debug_symfile): Constify.
394 * source.c (set_directories_command): Constify.
395 * solib.c (reload_shared_libraries, gdb_sysroot_changed): Constify.
396 * serial.c (set_parity): Constify.
397 * rs6000-tdep.c (powerpc_set_soft_float, powerpc_set_vector_abi): Constify.
398 * remote.c (set_remote_exec_file, set_remotebreak)
399 (set_remote_protocol_Z_packet_cmd, set_range_stepping): Constify.
400 * record.c (set_record_insn_history_size)
401 (set_record_call_history_size): Constify.
402 * record-full.c (set_record_full_insn_max_num): Constify.
403 * proc-api.c (set_procfs_trace_cmd, set_procfs_file_cmd): Constify.
404 * osabi.c (set_osabi): Constify.
405 * mips-tdep.c (set_mips64_transfers_32bit_regs)
406 (reinit_frame_cache_sfunc, mips_abi_update): Constify.
407 * maint.c (maintenance_set_profile_cmd): Constify.
408 * linux-thread-db.c (set_libthread_db_search_path): Constify.
409 * language.c (set_language_command, set_range_command)
410 (set_case_command): Constify.
411 * infrun.c (set_non_stop, set_observer_mode)
412 (set_stop_on_solib_events, set_schedlock_func)
413 (set_exec_direction_func): Constify.
414 * infcmd.c (set_inferior_tty_command): Constify.
415 * disasm.c (set_disassembler_options_sfunc): Constify.
416 * demangle.c (set_demangling_command): Constify.
417 * dcache.c (set_dcache_size, set_dcache_line_size): Constify.
418 * cris-tdep.c (set_cris_version, set_cris_mode)
419 (set_cris_dwarf2_cfi): Constify.
420 * corefile.c (set_gnutarget_command): Constify.
421 * charset.c (set_host_charset_sfunc, set_target_charset_sfunc)
422 (set_target_wide_charset_sfunc): Constify.
423 * breakpoint.c (update_dprintf_commands): Constify.
424 * auto-load.c (set_auto_load_dir, set_auto_load_safe_path): Constify.
425 * arm-tdep.c (set_fp_model_sfunc, arm_set_abi)
426 (set_disassembly_style_sfunc): Constify.
427 * arch-utils.c (set_endian, set_architecture): Constify.
428 * alpha-tdep.c (reinit_frame_cache_sfunc): Constify.
429 * agent.c (set_can_use_agent): Constify.
430
5fed81ff
TT
4312017-11-07 Tom Tromey <tom@tromey.com>
432
433 * go32-nat.c (go32_sysinfo, go32_sldt, go32_sgdt, go32_sidt)
434 (go32_pde, go32_pte, go32_pte_for_address): Constify.
435 * gnu-nat.c (_parse_bool_arg, show_thread_default_pause_cmd)
436 (set_thread_default_pause_cmd, set_thread_default_run_cmd)
437 (show_thread_default_run_cmd, set_thread_default_detach_sc_cmd)
438 (parse_int_arg, show_thread_default_detach_sc_cmd)
439 (set_signals_cmd, show_signals_cmd, set_sig_thread_cmd)
440 (show_sig_thread_cmd, set_stopped_cmd, show_stopped_cmd)
441 (set_exceptions_cmd, show_exceptions_cmd, set_task_pause_cmd)
442 (show_task_pause_cmd, set_task_detach_sc_cmd)
443 (show_task_detach_sc_cmd, set_task_exc_port_cmd)
444 (set_noninvasive_cmd, set_thread_pause_cmd)
445 (show_thread_pause_cmd, set_thread_run_cmd, show_thread_run_cmd)
446 (set_thread_detach_sc_cmd, show_thread_detach_sc_cmd)
447 (set_thread_exc_port_cmd, thread_takeover_sc_cmd): Constify.
448 * windows-nat.c (display_selectors): Constify.
449 * cli/cli-decode.h (struct cmd_list_element) <function>: Remove
450 non-const "cfunc".
451 * cli/cli-decode.c (set_cmd_cfunc): Remove non-const overload.
452 (cmd_cfunc_eq): Likewise.
453 (struct cmd_list_element): Likewise.
454 (do_cfunc): Remove.
455 (cli_user_command_p): Update.
456 * command.h (add_cmd): Remove non-const overload.
457 (cmd_cfunc_ftype): Remove typedef.
458 (cmd_cfunc_eq): Remove non-const overload.
459 * value.c (show_values): Constify.
460 * thread.c (thread_apply_all_command): Constify.
461 * symfile.c (load_command): Constify.
462 * source.c (directory_command): Constify.
463 * maint.c (maintenance_internal_error)
464 (maintenance_demangler_warning, maintenance_space_display)
465 (maintenance_print_architecture, maintenance_translate_address)
466 (maintenance_info_selftests, maintenance_internal_warning):
467 Constify.
468 * breakpoint.c (disable_trace_command, enable_trace_command):
469 Constify.
470 * auto-load.c (info_auto_load_local_gdbinit, add_auto_load_dir):
471 Constify.
472 (add_auto_load_safe_path): Constify.
473 * guile/scm-auto-load.c (info_auto_load_guile_scripts): Constify.
474 * top.h (show_commands): Constify.
475 * linux-thread-db.c (info_auto_load_libthread_db): Constify.
476 * sparc64-tdep.c (adi_examine_command): Constify.
477 (adi_assign_command): Constify.
478
1d12d88f
TT
4792017-11-07 Tom Tromey <tom@tromey.com>
480
481 * frame.h (info_locals_command, info_args_command): Constify.
482 * auto-load.h (auto_load_info_scripts): Constify.
483 * inferior.h (registers_info): Constify.
484 * copying.c: Rebuild.
485 * copying.awk: Constify generated commands.
486 * auto-load.c (auto_load_info_scripts)
487 (info_auto_load_gdb_scripts): Constify.
488 * cli/cli-decode.c (struct cmd_list_element): Take a
489 cmd_const_cfunc_ftype.
490 * command.h (add_info): Take a cmd_const_cfunc_ftype.
491 * tui/tui-win.c (tui_all_windows_info): Constify.
492 * python/py-auto-load.c (info_auto_load_python_scripts):
493 Constify.
494 * cli/cli-cmds.c (show_command): Remove non-const overload.
495 * tracepoint.c (info_tvariables_command, info_scope_command):
496 Constify.
497 (info_static_tracepoint_markers_command): Constify.
498 * thread.c (info_threads_command): Constify.
499 (print_thread_info_1): Constify.
500 * target.c (info_target_command): Constify.
501 * symtab.c (info_sources_command, info_functions_command)
502 (info_types_command): Constify.
503 (info_variables_command): Remove non-const overload.
504 * symfile.c (info_ext_lang_command): Constify.
505 * stack.c (info_frame_command, info_locals_command)
506 (info_args_command): Constify.
507 (backtrace_command): Remove non-const overload.
508 * source.c (info_source_command, info_line_command): Constify.
509 * solib.c (info_sharedlibrary_command): Constify.
510 * skip.c (info_skip_command): Constify.
511 * ser-go32.c (info_serial_command): Constify.
512 * reverse.c (info_bookmarks_command): Constify.
513 * printcmd.c (info_symbol_command, info_address_command)
514 (info_display_command): Constify.
515 * osdata.c (info_osdata_command): Constify.
516 * objc-lang.c (info_selectors_command, info_classes_command):
517 Constify.
518 * nto-procfs.c (procfs_pidlist, procfs_meminfo): Constify.
519 * memattr.c (info_mem_command): Constify.
520 * macrocmd.c (info_macro_command, info_macros_command): Constify.
521 * linux-fork.c (info_checkpoints_command): Constify.
522 * infrun.c (info_signals_command): Constify.
523 * inflow.c (info_terminal_command): Constify.
524 * inferior.c (info_inferiors_command): Constify.
525 (print_inferior): Constify.
526 * infcmd.c (info_program_command, info_all_registers_command)
527 (info_registers_command, info_vector_command)
528 (info_float_command): Constify.
529 (registers_info): Constify.
530 * gnu-nat.c (info_send_rights_cmd, info_recv_rights_cmd)
531 (info_port_sets_cmd, info_dead_names_cmd, info_port_rights_cmd):
532 Constify.
533 * f-valprint.c (info_common_command): Constify.
534 * dcache.c (info_dcache_command): Constify.
535 (dcache_info_1): Constify.
536 * darwin-nat-info.c (info_mach_tasks_command)
537 (info_mach_task_command, info_mach_ports_command)
538 (info_mach_port_command, info_mach_threads_command)
539 (info_mach_thread_command, info_mach_regions_command)
540 (info_mach_regions_recurse_command, info_mach_region_command)
541 (info_mach_exceptions_command): Constify.
542 (get_task_from_args): Constify.
543 * cp-support.c (info_vtbl_command): Constify.
544 * breakpoint.c (info_watchpoints_command)
545 (info_tracepoints_command): Constify.
546 (info_breakpoints_command): Remove non-const overload.
547 * avr-tdep.c (avr_io_reg_read_command): Constify.
548 * auxv.c (info_auxv_command): Constify.
549 * ada-tasks.c (info_tasks_command): Constify.
550 (info_task): Constify.
551 * ada-lang.c (info_exceptions_command): Constify.
552
0b39b52e
TT
5532017-11-07 Tom Tromey <tom@tromey.com>
554
555 * solib.h (no_shared_libraries): Constify.
556 * frame.h (return_command): Constify.
557 * cli/cli-cmds.h (quit_command): Constify.
558 * top.h (quit_command, execute_command): Constify.
559 * target.h (flash_erase_command): Constify.
560 * inferior.h (set_inferior_args, attach_command): Constify.
561 * tracepoint.h (start_tracing, stop_tracing): Constify.
562 * breakpoint.h (break_command, tbreak_command)
563 (hbreak_command_wrapper, thbreak_command_wrapper)
564 (rbreak_command_wrapper, watch_command_wrapper)
565 (awatch_command_wrapper, rwatch_command_wrapper)
566 (get_tracepoint_by_number): Constify.
567 * symtab.c (info_variables_command, rbreak_command)
568 (symtab_symbol_info): Constify.
569 (info_variables_command): Add non-const overload.
570 * top.c (dont_repeat_command): Constify.
571 * breakpoint.c (ignore_command, commands_command)
572 (condition_command, tbreak_command, hbreak_command)
573 (thbreak_command, clear_command, break_command)
574 (info_breakpoints_command, watch_command, rwatch_command)
575 (awatch_command, trace_command, ftrace_command, strace_command)
576 (trace_pass_command, break_range_command, dprintf_command)
577 (agent_printf_command, get_tracepoint_by_number)
578 (watch_maybe_just_location, trace_pass_command): Constify.
579 (info_breakpoints_command): Add non-const overload.
580 * tracefile.c (tsave_command): Constify.
581 * infcmd.c (attach_command, disconnect_command, signal_command)
582 (queue_signal_command, stepi_command, nexti_command)
583 (finish_command, next_command, step_command, until_command)
584 (advance_command, jump_command, continue_command, run_command)
585 (start_command, starti_command, interrupt_command)
586 (run_command_1, set_inferior_args, step_1): Constify.
587 * inferior.c (add_inferior_command, remove_inferior_command)
588 (clone_inferior_command): Constify.
589 * linux-fork.c (checkpoint_command, restart_command): Constify.
590 * windows-nat.c (signal_event_command): Constify.
591 * guile/guile.c (guile_repl_command, guile_command): Constify.
592 * printcmd.c (x_command, display_command, printf_command)
593 (output_command, set_command, call_command, print_command)
594 (eval_command): Constify.
595 (non_const_set_command): Remove.
596 (_initialize_printcmd): Update.
597 * source.c (forward_search_command, reverse_search_command):
598 Constify.
599 * jit.c (jit_reader_load_command, jit_reader_unload_command):
600 Constify.
601 * infrun.c (handle_command): Constify.
602 * memattr.c (mem_command): Constify.
603 * stack.c (return_command, up_command, up_silently_command)
604 (down_command, down_silently_command, frame_command)
605 (backtrace_command, func_command, backtrace_command_1): Constify.
606 (backtrace_command): Add non-const overload.
607 * remote-sim.c (simulator_command): Constify.
608 * exec.c (set_section_command): Constify.
609 * tracepoint.c (tdump_command, trace_variable_command)
610 (tstatus_command, tstop_command, tstart_command)
611 (end_actions_pseudocommand, while_stepping_pseudocommand)
612 (collect_pseudocommand, teval_pseudocommand, actions_command)
613 (start_tracing, stop_tracing): Constify.
614 * value.c (init_if_undefined_command): Constify.
615 * tui/tui-stack.c (tui_update_command): Constify.
616 * tui/tui-win.c (tui_refresh_all_command)
617 (tui_set_tab_width_command, tui_set_win_height_command)
618 (tui_set_focus_command, tui_scroll_forward_command)
619 (tui_scroll_backward_command, tui_scroll_left_command)
620 (tui_scroll_right_command, parse_scrolling_args, tui_set_focus)
621 (tui_set_win_height): Constify.
622 * tui/tui-layout.c (tui_layout_command): Constify.
623 * procfs.c (proc_trace_syscalls, proc_trace_sysentry_cmd)
624 (proc_trace_sysexit_cmd, proc_untrace_sysentry_cmd)
625 (proc_untrace_sysexit_cmd): Constify.
626 * remote.c (threadlist_test_cmd, threadinfo_test_cmd)
627 (threadset_test_cmd, threadlist_update_test_cmd)
628 (threadalive_test): Constify.
629 * objc-lang.c (print_object_command): Constify.
630 * command.h (add_com): Constify.
631 * cli/cli-dump.c (restore_command): Constify.
632 * cli/cli-cmds.c (pwd_command, echo_command, quit_command)
633 (help_command, complete_command, shell_command, edit_command)
634 (list_command, disassemble_command, make_command)
635 (apropos_command, alias_command): Constify.
636 * cli/cli-script.c (document_command, define_command)
637 (while_command, if_command, validate_comname): Constify.
638 * cli/cli-decode.c (struct cmd_list_element): Change type of
639 "fun".
640 * target.c (do_monitor_command, flash_erase_command): Constify.
641 * regcache.c (reg_flush_command): Constify.
642 * reverse.c (reverse_step, reverse_next, reverse_stepi)
643 (reverse_nexti, reverse_continue, reverse_finish)
644 (save_bookmark_command, goto_bookmark_command)
645 (exec_reverse_once): Constify.
646 * python/python.c (python_interactive_command, python_command):
647 Constify.
648 * typeprint.c (ptype_command, whatis_command, whatis_exp):
649 Constify.
650 * solib.c (sharedlibrary_command, no_shared_libraries): Constify.
651 * gcore.c (gcore_command): Constify.
652
85c4be7c
TT
6532017-11-07 Tom Tromey <tom@tromey.com>
654
655 * printcmd.c (x_command): Call set_repeat_arguments.
656 * cli/cli-cmds.c (list_command): Call set_repeat_arguments.
657 * top.c (repeat_arguments): New global.
658 (set_repeat_arguments): New function.
659 (execute_command): Handle repeat_arguments.
660 (show_commands): Calls set_repeat_arguments.
661 * command.h (set_repeat_arguments): Declare.
662
022643b4
TT
6632017-11-07 Tom Tromey <tom@tromey.com>
664
665 * stack.c (backtrace_command): Use std::string.
666 (backtrace_command_1): Make "count_exp" const.
667
5614fb77
TT
6682017-11-07 Tom Tromey <tom@tromey.com>
669
670 * source.c (directory_switch, mod_path, add_path): Constify.
671 * defs.h (add_path, mod_path, directory_switch): Constify.
672 * mi/mi-cmd-env.c (env_mod_path): Constify.
673
6be9a197
TT
6742017-11-07 Tom Tromey <tom@tromey.com>
675
676 * infcmd.c (strip_bg_char): Return gdb::unique_xmalloc_ptr.
677 (run_command_1, continue_command, step_1, jump_command)
678 (signal_command, until_command, advance_command, finish_command)
679 (attach_command): Update.
680
c2252c0d
TT
6812017-11-07 Tom Tromey <tom@tromey.com>
682
683 * command.h (set_cmd_cfunc): Don't declare.
684 * cli/cli-decode.c (set_cmd_cfunc): Now static.
685
1ee870c5
TT
6862017-11-07 Tom Tromey <tom@tromey.com>
687
688 * stack.c (select_frame_command): Constify.
689 * cli/cli-decode.c (add_com_suppress_notification): Constify.
690 * command.h (add_com_suppress_notification): Constify.
691
ee7ddd71
TT
6922017-11-07 Tom Tromey <tom@tromey.com>
693
694 * breakpoint.c (stop_command): Constify.
695 * cli/cli-decode.c (struct cmd_list_element): Constify.
696 * command.h (add_abbrev_prefix_cmd): Constify.
697
95e95a6d
PA
6982017-11-07 Pedro Alves <palves@redhat.com>
699
700 * breakpoint.c (extract_bp_kind): New enum.
701 (extract_bp_num, extract_bp_or_bp_range): New functions, partially
702 factored out from ...
703 (extract_bp_number_and_location): ... here.
704 * cli/cli-utils.c (get_number_trailer): Handle '-$variable'.
705
cc638e86
PA
7062017-11-07 Pedro Alves <palves@redhat.com>
707
708 * breakpoint.c (extract_bp_number_and_location): Change return
709 type to void. Throw error instead of warning.
710 (enable_disable_command): Adjust.
711
d0fe4701
XR
7122017-11-07 Xavier Roirand <roirand@adacore.com>
713 Pedro Alves <palves@redhat.com>
714
715 * breakpoint.c (map_breakpoint_number_range): New, factored out
716 from ...
717 (map_breakpoint_numbers): ... here.
718 (find_location_by_number): Change parameters from string to
719 breakpoint number and location.
720 (extract_bp_number_and_location): New function.
721 (enable_disable_bp_num_loc)
722 (enable_disable_breakpoint_location_range)
723 (enable_disable_command): New functions, factored out ...
724 (enable_command, disable_command): ... these functions, and
725 adjusted to support ranges.
726 * NEWS: Document enable/disable breakpoint location range feature.
727
635dc5b2
LM
7282017-11-06 Luis Machado <luis.machado@linaro.org>
729
730 * MAINTAINERS (Write After Approval): Update my e-mail address.
731
556e5da5
PA
7322017-11-06 Pedro Alves <palves@redhat.com>
733
734 * gnu-nat.c (gnu_terminal_init): Delete.
735 (gnu_target): Don't install gnu_terminal_init.
736 * inflow.c (child_terminal_init_with_pgrp): Delete, merged with ...
737 (child_terminal_init): ... this function.
738
d1928160
PA
7392017-11-06 Pedro Alves <palves@redhat.com>
740
741 * common/common.m4 (GDB_AC_COMMON): No longer check termio.h nor
742 sgtty.h.
743 * config.in, configure: Regenerate.
744
6aa899ce
PA
7452017-11-06 Pedro Alves <palves@redhat.com>
746
747 * event-top.c: Check SIGTSTP instead of STOP_SIGNAL thoughout.
748 (async_init_signals): Adjust.
749 (handle_stop_sig): Rename to ...
750 (handle_sigtstp): ... this.
751 (async_stop_sig): Rename to ...
752 (async_sigtstp_handler): ... this, and delete STOP_SIGNAL !=
753 SIGTSTP path.
754 * event-top.h: Move signal.h include to the top. Check SIGTSTP
755 instead of STOP_SIGNAL thoughout.
756 (handle_stop_sig): Rename to ...
757 (handle_sigtstp): ... this.
758 * top.c (command_line_input): Replace STOP_SIGNAL -> SIGTSTP.
759
a94799ac
PA
7602017-11-06 Pedro Alves <palves@redhat.com>
761
762 * inflow.c (child_terminal_inferior, child_terminal_ours_1): No
763 longer set flags twice in row.
764
726e1356
PA
7652017-11-06 Pedro Alves <palves@redhat.com>
766
767 * Makefile.in (SER_HARDWIRE): Update comment.
768 (HFILES_NO_SRCDIR): Remove gdb_termios.h.
769 * common/gdb_termios.h: Delete file.
770 * common/job-control.c: Include termios.h and unistd.h instead of
771 gdb_termios.h.
772 (gdb_setpgid): Remove HAVE_TERMIOS || TIOCGPGRP preprocessor
773 check.
774 (have_job_control): Check HAVE_TERMIOS_H instead of HAVE_TERMIOS.
775 Remove sgtty code.
776 * configure.ac: No longer check for termio.h and sgtty.h.
777 * configure: Regenerate.
778 * inflow.c: Include termios.h instead of gdb_termios.h. Replace
779 PROCESS_GROUP_TYPE checks with HAVE_TERMIOS_H checks throughout.
780 Replace PROCESS_GROUP_TYPE references with pid_t references
781 throughout.
782 (gdb_getpgrp): Delete.
783 (set_initial_gdb_ttystate): Use tcgetpgrp instead of gdb_getpgrp.
784 (child_terminal_inferior): Remove comment. Remove sgtty code.
785 (child_terminal_ours_1): Use tcgetpgrp directly instead of
786 gdb_getpgrp. Use serial_set_tty_state instead aof
787 serial_noflush_set_tty_state. Remove sgtty code.
788 * inflow.h: Include unistd.h instead of gdb_termios.h. Replace
789 PROCESS_GROUP_TYPE check with HAVE_TERMIOS_H check.
790 (inferior_process_group): Now returns pid_t.
791 * ser-base.c (ser_base_noflush_set_tty_state): Delete.
792 * ser-base.h (ser_base_noflush_set_tty_state): Delete.
793 * ser-event.c (serial_event_ops): Update.
794 * ser-go32.c (dos_noflush_set_tty_state): Delete.
795 (dos_ops): Update.
796 * ser-mingw.c (hardwire_ops, tty_ops, pipe_ops, tcp_ops): Update.
797 * ser-pipe.c (pipe_ops): Update.
798 * ser-tcp.c (tcp_ops): Update.
799 * ser-unix.c: Include termios.h instead of gdb_termios.h. Remove
800 HAVE_TERMIOS checks.
801 [HAVE_TERMIO] (struct hardwire_ttystate): Delete.
802 [HAVE_SGTTY] (struct hardwire_ttystate): Delete.
803 (get_tty_state, set_tty_state): Drop termio and sgtty code, and
804 assume termios.
805 (hardwire_noflush_set_tty_state): Delete.
806 (hardwire_print_tty_state, hardwire_drain_output)
807 (hardwire_flush_output, hardwire_flush_input)
808 (hardwire_send_break, hardwire_raw, hardwire_setbaudrate)
809 (hardwire_setstopbits, hardwire_setparity): Drop termio and sgtty
810 code, and assume termios.
811 (hardwire_ops): Update.
812 (_initialize_ser_hardwire): Remove HAVE_TERMIOS check.
813 * serial.c (serial_noflush_set_tty_state): Delete.
814 * serial.h (serial_noflush_set_tty_state): Delete.
815 (serial_ops::noflush_set_tty_state): Delete.
816
1cfb73db
UW
8172017-11-06 Ulrich Weigand <uweigand@de.ibm.com>
818
819 * Makefile.in (SFILES): Remove doublest.c and dfp.c.
820 (HFILES_NO_SRCDIR): Remove doublest.h and dfp.h.
821 (COMMON_OBS): Remove doublest.o and dfp.o.
822 Do not build target-float.c (instead of doublest.c)
823 with -Wformat-nonliteral.
824
825 * doublest.c: Remove file.
826 * doublest.h: Remove file.
827 * dfp.c: Remove file.
828 * dfp.h: Remove file.
829
830 * target-float.c: Do not include "doublest.h" and "dfp.h".
831 (DOUBLEST): Move here from doublest.h.
832 (enum float_kind): Likewise.
833 (FLOATFORMAT_CHAR_BIT): Likewise.
834 (FLOATFORMAT_LARGEST_BYTES): Likewise.
835 (floatformat_totalsize_bytes): Move here from doublest.c. Make static.
836 (floatformat_precision): Likewise.
837 (floatformat_normalize_byteorder, get_field, put_field): Likewise.
838 (floatformat_is_negative, floatformat_classify, floatformat_mantissa):
839 Likewise.
840 (host_float_format, host_double_format, host_long_double_format):
841 Likewise.
842 (floatformat_to_string, floatformat_from_string): Likewise.
843 (floatformat_to_doublest): Likewise. Also, inline the original
844 convert_floatformat_to_doublest.
845 (floatformat_from_doublest): Likewise. Also, inline the original
846 convert_floatformat_from_doublest.
847
848 Include "dpd/decimal128.h", "dpd/decimal64.h", and "dpd/decimal32.h".
849 (MAX_DECIMAL_STRING): Move here from dfp.c.
850 (match_endianness): Likewise.
851 (set_decnumber_context, decimal_check_errors): Likewise.
852 (decimal_from_number, decimal_to_number): Likewise.
853 (decimal_to_string, decimal_from_string): Likewise. Make static.
854 (decimal_from_longest, decimal_from_ulongest): Likewise.
855 (decimal_to_longest): Likewise.
856 (decimal_binop, decimal_is_zero, decimal_compare): Likewise.
857 (decimal_convert): Likewise.
858
b07e9c46
UW
8592017-11-06 Ulrich Weigand <uweigand@de.ibm.com>
860
861 * doublest.c: Do not include "gdbtypes.h".
862 (extract_typed_floating): Remove.
863 (store_typed_floating): Remove.
864 (convert_typed_floating): Remove.
865 * doublest.h (struct type): Remove.
866 (DOUBLEST_PRINT_FORMAT): Remove.
867 (DOUBLEST_SCAN_FORMAT): Remove.
868 (extract_typed_floating): Remove.
869 (store_typed_floating): Remove.
870 (convert_typed_floating): Remove.
871
872 * dfp.c (decimal_from_doublest): Remove.
873 (decimal_to_doublest): Remove.
874 * dfp.h: Do not include "doublest.h".
875 (decimal_from_doublest): Remove.
876 (decimal_to_doublest): Remove.
877
878 * value.c: Do not include "doublest.h" and "dfp.h".
879 (value_as_double): Remove.
880 (unpack_double): Remove.
881 (value_from_double): Remove.
882 (value_from_decfloat): Remove.
883 * value.h: Do not include "doublest.h".
884 (value_as_double): Remove.
885 (unpack_double): Remove.
886 (value_from_double): Remove.
887 (value_from_decfloat): Remove.
888
3b2ca824
UW
8892017-11-06 Ulrich Weigand <uweigand@de.ibm.com>
890
891 * i386-tdep.c: Include "target-float.h". Do not include "doublest.h".
892 (i386_extract_return_value): Use target_float_convert.
893 (i386_store_return_value): Likewise.
894 * i387-tdep.c (i387_register_to_value): Use target_float_convert.
895 (i387_value_to_register): Likewise.
896 * ia64-tdep.c: Include "target-float.h". Do not include "doublest.h".
897 (ia64_register_to_value): Use target_float_convert.
898 (ia64_value_to_register): Likewise.
899 (ia64_extract_return_value): Likewise.
900 (ia64_store_return_value): Likewise.
901 (ia64_push_dummy_call): Likewise.
902 * m68k-tdep.c: Include "target-float.h".
903 (m68k_register_to_value): Use target_float_convert.
904 (m68k_value_to_register): Likewise.
905 (m68k_svr4_extract_return_value): Likewise.
906 (m68k_svr4_store_return_value): Likewise.
907 * ppc-sysv-tdep.c: Include "target-float.h".
908 (ppc_sysv_abi_push_dummy_call): Use target_float_convert.
909 (do_ppc_sysv_return_value): Likewise.
910 (ppc64_sysv_abi_push_freg): Likewise.
911 (ppc64_sysv_abi_return_value_base): Likewise.
912 * rs6000-aix-tdep.c: Include "target-float.h".
913 (rs6000_push_dummy_call): Use target_float_convert.
914 (rs6000_return_value): Likewise.
915 * rs6000-lynx178-tdep.c: Include "target-float.h".
916 (rs6000_lynx178_push_dummy_call): Use target_float_convert.
917 (rs6000_lynx178_return_value): Likewise.
918 * rs6000-tdep.c: Include "target-float.h". Do not include "doublest.h".
919 (rs6000_register_to_value): Use target_float_convert.
920 (rs6000_value_to_register): Likewise.
921 * arm-tdep.c: Include "target-float.h". Do not include "doublest.h".
922 (arm_extract_return_value): Use target_float_convert.
923 (arm_store_return_value): Likewise.
924 * sh-tdep.c: Include "target-float.h". Do not include "doublest.h".
925 (sh_register_convert_to_virtual): Use target_float_convert.
926 (sh_register_convert_to_raw): Likewise.
927 * sh64-tdep.c: Include "target-float.h".
928 (sh64_extract_return_value): Use target_float_convert.
929 (sh64_register_convert_to_virtual): Likewise.
930 (sh64_register_convert_to_raw): Likewise. Fix argument types.
931
14ad9311
UW
9322017-11-06 Ulrich Weigand <uweigand@de.ibm.com>
933
934 * target-float.c (floatformat_to_host_double): New function.
935 (floatformat_from_host_double): Likewise.
936 (target_float_to_host_double): Likewise.
937 (target_float_from_host_double): Likewise.
938 * target-float.h (target_float_to_host_double): Add prototype.
939 (target_float_from_host_double): Likewise.
940
941 * guile/scm-value.c: Include "target-float.h".
942 (gdbscm_value_to_real): Use target_float_to_host_double.
943 Handle integer source values via value_as_long.
944 * guile/scm-math.c: Include "target-float.h". Do not include
945 "doublest.h", "dfp.h", and "expression.h".
946 (vlscm_convert_typed_number): Use target_float_from_host_double.
947 (vlscm_convert_number): Likewise.
948
949 * python/py-value.c (valpy_float): Use target_float_to_host_double.
950 (convert_value_from_python): Use target_float_from_host_double.
951
50eff16b
UW
9522017-11-06 Ulrich Weigand <uweigand@de.ibm.com>
953
954 * ada-lang.c (cast_to_fixed): Reimplement in target arithmetic.
955 (cast_from_fixed): Likewise.
956 (ada_scaling_type): New function.
957 (ada_delta): Return value instead of DOUBLEST. Perform target
958 arithmetic instead of host arithmetic.
959 (scaling_factor): Rename to ...
960 (ada_scaling_factor) ... this. Make non-static. Return value instead
961 of DOUBLEST. Perform target arithmetic instead of host arithmetic.
962 (ada_fixed_to_float): Remove.
963 (ada_float_to_fixed): Remove.
964 * ada-lang.h (ada_fixed_to_float): Remove.
965 (ada_float_to_fixed): Remove.
966 (ada_delta): Return value instead of DOUBLEST.
967 (ada_scaling_factor): Add prototype.
968
969 * ada-typeprint.c: Include "target-float.h".
970 (print_fixed_point_type): Perform target arithmetic instead of
971 host arithmetic.
972 * ada-valprint.c: Include "target-float.h".
973 (ada_val_print_num): Perform target arithmetic instead of
974 host arithmetic for fixed-point types.
975
66c02b9e
UW
9762017-11-06 Ulrich Weigand <uweigand@de.ibm.com>
977
978 * target-float.c: Include <math.h>.
979 (floatformat_binop): New function.
980 (floatformat_compare): Likewise.
981 (target_float_binop): Likewise.
982 (target_float_compare): Likewise.
983 * target-float.h: Include "expression.h".
984 (target_float_binop): Add prototype.
985 (target_float_compare): Likewise.
986
987 * valarith.c: Do not include "doublest.h" and "dfp.h".
988 Include "common/byte-vector.h".
989 (value_args_as_decimal): Remove, replace by ...
990 (value_args_as_target_float): ... this function. Handle both
991 binary and decimal target floating-point formats.
992 (scalar_binop): Handle both binary and decimal FP using
993 value_args_as_target_float and target_float_binop.
994 (value_equal): Handle both binary and decimal FP using
995 value_args_as_target_float and target_float_compare.
996 (value_less): Likewise.
997 (value_pos): Handle all scalar types as simple copy.
998 (value_neg): Handle all scalar types via BINOP_SUB from 0.
999 * dfp.c (decimal_binop): Throw error instead of internal_error
1000 when called with an unsupported operation code.
1001
f69fdf9b
UW
10022017-11-06 Ulrich Weigand <uweigand@de.ibm.com>
1003
1004 * target-float.c (target_float_to_string): New function.
1005 (target_float_from_string): New function.
1006 * target-float.h (target_float_to_string): Add prototype.
1007 (target_float_from_string): Add prototype.
1008
1009 * valprint.c: Include "target-float.h". Do not include
1010 "doublest.h" and "dfp.h".
1011 (print_floating): Use target_float_to_string.
1012 * printcmd.c: Include "target-float.h". Do not include "dfp.h".
1013 (printf_floating): Use target_float_to_string.
1014 * i387-tdep.c: Include "target-float.h". Do not include "doublest.h".
1015 (print_i387_value): Use target_float_to_string.
1016 * mips-tdep.c: Include "target-float.h".
1017 (mips_print_fp_register): Use target_float_to_string.
1018 * sh64-tdep.c: Include "target-float.h".
1019 (sh64_do_fp_register): Use target_float_to_string.
1020
1021 * parse.c: Include "target-float.h". Do not include
1022 "doublest.h" and "dfp.h".
1023 (parse_float): Use target_float_from_string.
1024 * stabsread.c: Include "target-float.h". Do not include "doublest.h".
1025 (define_symbol): Use target_float_from_string.
1026 * gdbarch-selftests.c: Include "target-float.h".
1027 (register_to_value_test): Use target_float_from_string.
1028
70100014
UW
10292017-11-06 Ulrich Weigand <uweigand@de.ibm.com>
1030
1031 * Makefile.c (SFILES): Add target-float.c.
1032 (HFILES_NO_SRCDIR): Add target-float.h.
1033 (COMMON_OBS): Add target-float.o.
1034 * target-float.h: New file.
1035 * target-float.c: New file.
1036
1037 * doublest.c (floatformat_classify): Fix detection of float_zero.
1038
1039 * gdbtypes.c (is_floating_type): New function.
1040 * gdbtypes.h (is_floating_type): Add prototype.
1041
1042 * value.c: Do not include "floatformat.h".
1043 (unpack_double): Use target_float_is_valid.
1044 (is_floating_value): New function.
1045 * value.h (is_floating_value): Add prototype-
1046
1047 * valarith.c: Include "target-float.h".
1048 (value_logical_not): Use target_float_is_zero.
1049
1050 * python/py-value.c: Include "target-float.h".
1051 (valpy_nonzero): Use target_float_is_zero.
1052
ab4b1c46
TT
10532017-11-04 Tom Tromey <tom@tromey.com>
1054
1055 * h8300-tdep.c (h8300_push_dummy_call): Use std::vector.
1056
454dafbd
TT
10572017-11-04 Tom Tromey <tom@tromey.com>
1058
1059 * breakpoint.c (set_momentary_breakpoint): Return
1060 breakpoint_up.
1061 (until_break_command): Update.
1062 (new_until_break_fsm): Change argument types to
1063 breakpoint_up.
1064 (set_momentary_breakpoint_at_pc): Return breakpoint_up.
1065 (do_delete_breakpoint_cleanup, make_cleanup_delete_breakpoint):
1066 Remove.
1067 * infcmd.c (finish_forward): Update.
1068 * breakpoint.h (set_momentary_breakpoint)
1069 (set_momentary_breakpoint_at_pc): Return breakpoint_up.
1070 (make_cleanup_delete_breakpoint): Remove.
1071 (struct breakpoint_deleter): New.
1072 (breakpoint_up): New typedef.
1073 * infrun.c (insert_step_resume_breakpoint_at_sal_1): Update.
1074 (insert_exception_resume_breakpoint): Update.
1075 (insert_exception_resume_from_probe): Update.
1076 (insert_longjmp_resume_breakpoint): Update.
1077 * arm-linux-tdep.c (arm_linux_copy_svc): Update.
1078 * elfread.c (elf_gnu_ifunc_resolver_stop): Update.
1079 * infcall.c (call_function_by_hand_dummy): Update
1080
331b71e5
TT
10812017-11-04 Tom Tromey <tom@tromey.com>
1082
1083 * c-typeprint.c (c_type_print_base): Use gdb::unique_xmalloc_ptr.
1084
9f584b37
TT
10852017-11-04 Tom Tromey <tom@tromey.com>
1086
1087 * linux-tdep.c (linux_core_info_proc_mappings): Use
1088 gdb::def_vector.
1089 (linux_get_siginfo_data): Return gdb::byte_vector. Remove
1090 "size" argument.
1091 (linux_corefile_thread): Update.
1092 (linux_make_corefile_notes): Remove unused variable.
1093
779bc38e
TT
10942017-11-04 Tom Tromey <tom@tromey.com>
1095
1096 * ppc-linux-tdep.c (ppc_linux_get_syscall_number): Use
1097 gdb::byte_vector.
1098
ed2b3126
TT
10992017-11-04 Tom Tromey <tom@tromey.com>
1100
1101 * objfiles.c (do_free_objfile_cleanup): Remove.
1102 * compile/compile-object-load.c (compile_object_load): Update.
1103 * objfiles.h (make_cleanup_free_objfile): Remove.
1104
7f6743fd
TT
11052017-11-04 Tom Tromey <tom@tromey.com>
1106
1107 * sparc64-tdep.c (do_examine): Use gdb::def_vector.
1108 (adi_read_versions): Change "tags" to "gdb_byte *".
1109 (adi_print_versions): Likewise.
1110
c80049d3
TT
11112017-11-04 Tom Tromey <tom@tromey.com>
1112
1113 * breakpoint.c
1114 (scoped_rbreak_breakpoints::scoped_rbreak_breakpoints): Rename
1115 from start_rbreak_breakpoints.
1116 (scoped_rbreak_breakpoints): Rename from end_rbreak_breakpoints.
1117 * breakpoint.h (class scoped_rbreak_breakpoints): New.
1118 (start_rbreak_breakpoints, end_rbreak_breakpoints): Remove.
1119 * symtab.c (do_end_rbreak_breakpoints): Remove.
1120 (rbreak_command): Use scoped_rbreak_breakpoints, std::string.
1121
167b0be1
TT
11222017-11-04 Tom Tromey <tom@tromey.com>
1123
1124 * cp-namespace.c (reset_directive_searched): Remove.
1125 (cp_lookup_symbol_via_imports): Use scoped_restore.
1126 * cp-support.c (reset_directive_searched): Remove.
1127 (make_symbol_overload_list_using): Use scoped_restore.
1128 * d-namespace.c (d_lookup_symbol_imports): Use scoped_restore.
1129 (reset_directive_searched): Remove.
1130
5eae7aea
TT
11312017-11-04 Tom Tromey <tom@tromey.com>
1132
1133 * symfile.c (find_separate_debug_file_by_debuglink): Use
1134 unique_xmalloc_ptr.
1135
c6bcad5f
TT
11362017-11-04 Tom Tromey <tom@tromey.com>
1137
1138 * compile/compile-loc2c.c (compute_stack_depth_worker): Change
1139 type of "info".
1140 (compute_stack_depth): Likewise.
1141 (do_compile_dwarf_expr_to_c): Use std::vector.
1142
20dcd8ca
TT
11432017-11-04 Tom Tromey <tom@tromey.com>
1144
1145 * compile/compile-object-load.c (link_callbacks_einfo): Use
1146 std::string.
1147
33c7c59d
TT
11482017-11-04 Tom Tromey <tom@tromey.com>
1149
1150 * dwarf2read.c (process_full_comp_unit, process_full_type_unit):
1151 Use scoped_free_pendings.
1152 * dbxread.c (dbx_symfile_read, dbx_psymtab_to_symtab_1): Use
1153 scoped_free_pendings.
1154 * xcoffread.c (xcoff_psymtab_to_symtab_1): Use scoped_free_pendings.
1155 (xcoff_initial_scan): Likewise.
1156 * buildsym.c (reset_symtab_globals): Update comment.
1157 (scoped_free_pendings): Rename from really_free_pendings.
1158 (prepare_for_building): Update comment.
1159 (buildsym_init): Likewise.
1160 * buildsym.h (class scoped_free_pendings): New class.
1161 (really_free_pendings): Don't declare.
1162
67fa57cf
UW
11632017-11-03 Ulrich Weigand <uweigand@de.ibm.com>
1164
1165 * doublest.c (convert_doublest_to_floatformat): Fix uninitialized
1166 output when converting a zero value to a special byteorder format.
1167
f26ae15b
YQ
11682017-11-02 Yao Qi <yao.qi@linaro.org>
1169
1170 * frame.c (do_frame_register_read): Remove aspace.
1171 * jit.c (jit_frame_sniffer): Likwise.
1172 * ppc-linux-tdep.c (ppu2spu_sniffer): Likewise.
1173 * regcache.c (regcache::regcache): Pass nullptr.
1174 (regcache_print): Caller updated.
1175 * regcache.h (regcache::regcache): Remove one constructor
1176 parameter aspace.
1177
6c6e9412
YQ
11782017-11-02 Yao Qi <yao.qi@linaro.org>
1179
1180 * regcache.h (regcache) <m_readonly_p>: Change it to const bool.
1181
8b86c959
YQ
11822017-11-02 Yao Qi <yao.qi@linaro.org>
1183
1184 * breakpoint.c (insert_single_step_breakpoints): Update.
1185 * frame.c (struct frame_info) <aspace>: Add const.
1186 (frame_save_as_regcache): Add const.
1187 (get_frame_address_space): Return const address_space *.
1188 * frame.h (get_frame_address_space): Update declaration.
1189 * infrun.c (struct step_over_info) <aspace>: Add const.
1190 (set_step_over_info): Make aspace const.
1191 (displaced_step_prepare_throw): Change variable const.
1192 (resume): Likewise.
1193 (proceed): Likewise.
1194 (adjust_pc_after_break): Likewise.
1195 (save_waitstatus): Likewise.
1196 (handle_signal_stop): Likewise.
1197 (keep_going_pass_signal): Likewise.
1198 * jit.c (jit_frame_sniffer): Add const.
1199 * mips-tdep.c (mips_single_step_through_delay): Likewise.
1200 * ppc-linux-tdep.c (ppu2spu_sniffer): Likewise.
1201 * record-full.c (record_full_wait_1): Likewise.
1202 * regcache.c (regcache::regcache): Change parameter to const.
1203 * regcache.h (regcache::regcache): Likewise.
1204 (regcache::aspace): Return const address_space *.
1205 (regcache) <m_aspace>: Add const.
1206
a01bda52
YQ
12072017-11-02 Yao Qi <yao.qi@linaro.org>
1208
1209 * darwin-nat.c (cancel_breakpoint): Use regcache->aspace ().
1210 * frame.c (create_sentinel_frame): Likewise.
1211 * infrun.c (displaced_step_prepare_throw): Likewise.
1212 (resume): Likewise.
1213 (thread_still_needs_step_over_bp): Likewise.
1214 (proceed): Likewise.
1215 (do_target_wait): Likewise.
1216 (adjust_pc_after_break): Likewise.
1217 (handle_syscall_event): Likewise.
1218 (save_waitstatus): Likewise.
1219 (handle_inferior_event_1): Likewise.
1220 (handle_signal_stop): Likewise.
1221 (keep_going_pass_signal): Likewise.
1222 * linux-nat.c (status_callback): Likewise.
1223 (save_stop_reason): Likewise.
1224 (resume_stopped_resumed_lwps): Likewise.
1225 * record-full.c (record_full_exec_insn): Likewise.
1226 (record_full_wait_1): Likewise.
1227 * regcache.c (get_regcache_aspace): Remove.
1228 * regcache.h (get_regcache_aspace): Remove.
1229
d999647b
YQ
12302017-11-02 Yao Qi <yao.qi@linaro.org>
1231
1232 * regcache.c (struct regcache_descr) <nr_raw_registers>: Remove.
1233 (init_regcache_descr): Use gdbarch_num_regs.
1234 (regcache::regcache): Likewise.
1235 (regcache::get_register_status): Likewise.
1236 (regcache::assert_raw_regnum): Likewise.
1237 (regcache::cooked_read): Likewise.
1238 (regcache::cooked_read_value): Likewise.
1239 (regcache::cooked_write): Likewise.
1240 (regcache::dump): Likewise.
1241 (regcache::num_raw_registers): New method.
1242 * regcache.h (class regcache) <num_raw_registers>: New.
1243
4e888c28
YQ
12442017-11-02 Yao Qi <yao.qi@linaro.org>
1245
1246 * regcache.c (regcache::assert_regnum): New method.
1247 (regcache::invalidate): Call assert_regnum.
1248 (regcache::raw_update): Likewise.
1249 (regcache::raw_write): Likewise.
1250 (regcache::raw_read_part): Likewise.
1251 (regcache::raw_write_part): Likewise.
1252 (regcache::raw_supply): Likewise.
1253 (regcache::raw_supply_integer): Likewise.
1254 (regcache::raw_supply_zeroed): Likewise.
1255 (regcache::raw_collect): Likewise.
1256 (regcache::raw_collect_integer): Likewise.
1257 * regcache.h (regcache::assert_regnum): Declare.
1258
2e1b49b3
YQ
12592017-11-02 Yao Qi <yao.qi@linaro.org>
1260
1261 * regcache.c (regcache::dump): Remove code.
1262
6c5218df
YQ
12632017-11-02 Yao Qi <yao.qi@linaro.org>
1264
1265 * regcache.c (struct regcache_descr) <sizeof_raw_register_status>:
1266 Remove.
1267 <sizeof_cooked_register_status>: Remove.
1268 (init_regcache_descr): Update.
1269 (regcache::regcache): Use nr_cooked_registers and nr_raw_registers.
1270 (regcache::save): Likewise.
1271 (regcache::dump): Likewise.
1272
dcc31d28
JB
12732017-11-01 James Bowman <james.bowman@ftdichip.com>
1274
1275 * ft32-tdep.c (ft32_fetch_instruction): New function.
1276 (ft32_analyze_prologue): Use ft32_fetch_instruction().
1277
3a87ae65
SM
12782017-10-31 Simon Marchi <simon.marchi@polymtl.ca>
1279
1280 * cli/cli-script.c (execute_control_command): Rename to ...
1281 (execute_control_command_1): ... this.
1282 (execute_control_command): New function.
1283
09b847f3
SM
12842017-10-31 Simon Marchi <simon.marchi@ericsson.com>
1285
1286 * tracepoint.c (tfind_command): Remove const_cast.
1287
f871c485
MG
12882017-10-30 Mike Gulick <mgulick@mathworks.com>
1289
1290 * Makefile.in (HFILES_NO_SRCDIR): Remove reference to gdb.h.
1291
b020ff80
SM
12922017-10-30 Simon Marchi <simon.marchi@ericsson.com>
1293
1294 * common/common-utils.h (in_inclusive_range): New function.
1295 * arm-tdep.c (arm_record_extension_space): Use
1296 in_inclusive_range.
1297 (thumb_record_ld_st_reg_offset): Use in_inclusive_range.
1298 * cris-tdep.c (cris_spec_reg_applicable): Use
1299 in_inclusive_range.
1300
1b81856f
PA
13012017-10-30 Pedro Alves <palves@redhat.com>
1302 Simon Marchi <simon.marchi@ericsson.com>
1303
1304 * remote.c (remote_set_syscall_catchpoint): Build a std::string
1305 instead of a gdb::unique_xmalloc_ptr, using string_appendf.
1306
31b833b3
PA
13072017-10-30 Pedro Alves <palves@redhat.com>
1308
1309 * common/common-utils.c (string_appendf, string_vappendf): New
1310 functions.
1311 * common/common-utils.h (string_appendf, string_vappendf): New
1312 declarations.
1313 * unittests/common-utils-selftests.c (string_appendf_func)
1314 (test_appendf_func, string_vappendf_wrapper, string_appendf_tests)
1315 (string_vappendf_tests): New functions.
1316 (_initialize_common_utils_selftests): Register "string_appendf" and
1317 "string_vappendf tests".
1318
4a250334
PA
13192017-10-30 Pedro Alves <palves@redhat.com>
1320
1321 * unittests/common-utils-selftests.c (format_func): New typedef.
1322 (string_printf_tests, string_vprintf_tests): Tests factored out
1323 and merged to ...
1324 (test_format_func): ... this new function.
1325 (string_printf_tests, string_vprintf_tests): Reimplement on top of
1326 test_format_func.
1327
16c5c17e
SM
13282017-10-29 Simon Marchi <simon.marchi@ericsson.com>
1329
1330 * darwin-nat.c: Remove include of gdb.h.
1331
7ca51576
SM
13322017-10-29 Simon Marchi <simon.marchi@ericsson.com>
1333
1334 * xtensa-xtregs.c: Fix formatting issues.
1335
c1342859
SM
13362017-10-29 Simon Marchi <simon.marchi@ericsson.com>
1337
1338 * xtensa-xtregs.c (xtensa_regtable_t) <name>: Constify.
1339
484d8d36
MD
13402017-10-28 Maksim Dzabraev <dzabraew@gmail.com>
1341
1342 PR python/21213
1343 * python/py-infthread.c (thpy_get_inferior): Increment reference
1344 of inferior before returning it.
1345
b5540b5f
SM
13462017-10-27 Simon Marchi <simon.marchi@ericsson.com>
1347
1348 * unittests/common-utils-selftests.c (format): Add
1349 ATTRIBUTE_PRINTF.
1350
5a9dcda1
SM
13512017-10-27 Simon Marchi <simon.marchi@polymtl.ca>
1352
1353 * xml-syscall.c (struct syscall_desc): Add constructor.
1354 <name>: Change type to std::string.
1355 (syscall_desc_up): New typedef.
1356 (syscall_desc_p): Remove typeder.
1357 (DEF_VEC_P(syscall_desc_p)): Remove.
1358 (struct syscall_group_desc): Add constructor.
1359 <name>: Change type to std::string.
1360 <syscalls>: Change type to std::vector.
1361 (syscall_group_desc_up): New typedef.
1362 (syscall_group_desc_p): Remove typedef.
1363 (DEF_VEC_P(syscall_group_desc_p)): Remove.
1364 (struct syscalls_info) <syscalls>: Change type to std::vector of
1365 unique_ptr.
1366 <groups>: Likewise.
1367 <my_gdb_datadir>: Change type to std::string.
1368 (syscalls_info_up): New typedef.
1369 (allocate_syscalls_info): Remove.
1370 (syscalls_info_free_syscalls_desc): Remove.
1371 (syscalls_info_free_syscall_group_desc): Remove.
1372 (free_syscalls_info): Remove.
1373 (make_cleanup_free_syscalls_info): Remove.
1374 (syscall_group_create_syscall_group_desc): Adjust.
1375 (syscall_group_add_syscall): Adjust.
1376 (syscall_create_syscall_desc): Adjust.
1377 (syscall_parse_xml): Adjust, use unique_ptr instead of cleanup.
1378 (init_syscalls_info): Adjust.
1379 (syscall_group_get_group_by_name): Adjust.
1380 (xml_get_syscall_number): Adjust.
1381 (xml_get_syscall_name): Adjust.
1382 (xml_list_of_syscalls): Adjust.
1383 (xml_list_syscalls_by_group): Adjust.
1384 (xml_list_of_groups): Adjust.
1385
45461e0d
SM
13862017-10-27 Simon Marchi <simon.marchi@ericsson.com>
1387
1388 * probe.h: Don't include gdb_vecs.h.
1389 (DEF_VEC_P (probe_p)): Remove.
1390 (find_probes_in_objfile): Return an std::vector.
1391 * probe.c (find_probes_in_objfile): Likewise.
1392 * breakpoint.c (breakpoint_objfile_data)
1393 <longjmp_probes>: Change type to std::vector.
1394 <exception_probes>: Likewise.
1395 (free_breakpoint_probes): Don't manually free vectors.
1396 (create_longjmp_master_breakpoint): Adjust.
1397 (create_exception_master_breakpoint): Adjust.
1398 * solib-svr4.c (svr4_create_probe_breakpoints): Change
1399 parameter type, adjust.
1400 (svr4_create_solib_event_breakpoints): Adjust.
1401
43dce439
SM
14022017-10-27 Simon Marchi <simon.marchi@ericsson.com>
1403
1404 * breakpoint.c (breakpoint_objfile_data): Initialize fields.
1405 (get_breakpoint_objfile_data): Allocate breakpoint_objfile_data
1406 with new.
1407 (free_breakpoint_probes): Rename to ...
1408 (free_breakpoint_objfile_data): ... this, and call delete on
1409 bp_objfile_data..
1410
6a1b9516
SM
14112017-10-27 Simon Marchi <simon.marchi@polymtl.ca>
1412
1413 * auto-load.c: Don't include gdb_vecs.h, include algorithm.
1414 (loaded_script_ptr): Remove typedef.
1415 (DEF_VEC_P (loaded_script_ptr)): Remove.
1416 (struct collect_matching_scripts_data): Add constructor.
1417 <scripts_p>: Change type to (pointer to) std::vector.
1418 (collect_matching_scripts_data): Adjust.
1419 (sort_scripts_by_name): Make suitable for std::sort.
1420 (print_scripts): Don't sort vector, adjust to std::vector.
1421 (auto_load_info_scripts): Sort vectors, adjust to std::vector.
1422
593e3209
SM
14232017-10-27 Simon Marchi <simon.marchi@ericsson.com>
1424
1425 * symfile.c (filename_language): Make struct, not typedef. Add
1426 constructor.
1427 <ext>: Change type to std::string.
1428 (DEF_VEC_O (filename_language)): Remove.
1429 (filename_language_table): Change type to std::vector.
1430 (add_filename_language): Adjust.
1431 (set_ext_lang_command): Adjust.
1432 (info_ext_lang_command): Adjust.
1433 (deduce_language_from_filename): Adjust.
1434 (class scoped_restore_filename_language_table): Remove.
1435 (test_filename_language): Use scoped_restore.
1436 (test_set_ext_lang_command): Use scoped_restore, adjust to
1437 std::vector change.
1438
32fa66eb
SM
14392017-10-27 Simon Marchi <simon.marchi@ericsson.com>
1440
1441 * symfile.c: Include selftest.h.
1442 (class scoped_restore_filename_language_table): New.
1443 (test_filename_language): New test.
1444 (test_set_ext_lang_command): New test.
1445 (_initialize_symfile): Register tests.
1446
4a27f119
KS
14472017-10-27 Keith Seitz <keiths@redhat.com>
1448
1449 * breakpoint.c (print_breakpoint_location): Use the symbol saved
1450 in the bp_location, falling back to find_pc_sect_function when
1451 needed.
1452 (add_location_to_breakpoint): Save sal->symbol.
1453 * breakpoint.h (struct bp_location) <symbol>: New field.
1454 * symtab.c (find_function_start_sal): Save the symbol into the SaL.
1455 * symtab.h (struct symtab_and_line) <symbol>: New field.
1456
a43f3893
PF
14572017-10-26 Patrick Frants <osscontribute@gmail.com>
1458
7453e6b2 1459 PR gdb/13669
a43f3893
PF
1460 * cp-valprint.c (cp_print_value_fields): Use obstack_blank_fast
1461 to rewind obstack.
1462
23cc4e1b
PA
14632017-10-26 Pedro Alves <palves@redhat.com>
1464
1465 * remote.c (remote_async_terminal_ours_p): Delete.
1466 (remote_open_1, remote_terminal_inferior, remote_terminal_ours):
1467 Remove references to 'remote_async_terminal_ours_p'.
1468
6abc18bb
YQ
14692017-10-26 Yao Qi <yao.qi@linaro.org>
1470
1471 * breakpoint.h (regular_breakpoint_inserted_here_p): Remove.
1472
bd522513
YQ
14732017-10-26 Yao Qi <yao.qi@linaro.org>
1474
1475 * break-catch-sig.c (signal_catchpoint_breakpoint_hit): Make
1476 aspace const.
1477 * break-catch-syscall.c (breakpoint_hit_catch_syscall):
1478 Likewise.
1479 * breakpoint.c (bpstat_check_location): Remove cast.
1480 (breakpoint_hit_catch_fork): Make aspce const.
1481 (breakpoint_hit_catch_solib): Likewise.
1482 (breakpoint_hit_catch_exec): Likewise.
1483 (breakpoint_hit_ranged_breakpoint): Likewise.
1484 (breakpoint_hit_watchpoint): Likewise.
1485 (base_breakpoint_breakpoint_hit): Likewise.
1486 (bkpt_breakpoint_hit): Likewise.
1487 (dprintf_breakpoint_hit): Likewise.
1488 (tracepoint_breakpoint_hit): Likewise.
1489 * breakpoint.h (breakpoint_ops) <breakpoint_hit>: Likewise.
1490
accd0bcd
YQ
14912017-10-26 Yao Qi <yao.qi@linaro.org>
1492
1493 * breakpoint.c (breakpoint_location_address_match): Change
1494 "struct address_space *" to "const address_space".
1495 (breakpoint_location_address_range_overlap): Likewise.
1496 (breakpoint_here_p): Likewise.
1497 (breakpoint_in_range_p): Likewise.
1498 (moribund_breakpoint_here_p): Likewise.
1499 (bp_location_inserted_here_p): Likewise.
1500 (software_breakpoint_inserted_here_p): Likewise.
1501 (hardware_breakpoint_inserted_here_p): Likewise.
1502 (hardware_watchpoint_inserted_in_range): Likewise.
1503 (bpstat_check_location): Likewise.
1504 (bpstat_stop_status): Likewise.
1505 (breakpoint_address_match): Likewise.
1506 (breakpoint_address_match_range): Likewise.
1507 (breakpoint_location_address_match): Likewise.
1508 (breakpoint_location_address_range_overlap): Likewise.
1509 (insert_single_step_breakpoint): Likewise.
1510 (breakpoint_has_location_inserted_here): Likewise.
1511 (single_step_breakpoint_inserted_here_p): Likewise.
1512 (pc_at_non_inline_function): Likewise.
1513 * breakpoint.h (bpstat_stop_status): Update declaration.
1514 (breakpoint_here_p): Likewise.
1515 (breakpoint_in_range_p): Likewise.
1516 (moribund_breakpoint_here_p): Likewise.
1517 (breakpoint_inserted_here_p): Likewise.
1518 (software_breakpoint_inserted_here_p): Likewise.
1519 (hardware_breakpoint_inserted_here_p): Likewise.
1520 (breakpoint_has_location_inserted_here): Likewise.
1521 (single_step_breakpoint_inserted_here_p): Likewise.
1522 (hardware_watchpoint_inserted_in_range): Likewise.
1523 (breakpoint_address_match): Likewise.
1524 (insert_single_step_breakpoint): Likewise.
1525 (pc_at_non_inline_function): Likewise.
1526 * gdbthread.h (thread_has_single_step_breakpoint_here): Likewise.
1527 * record.c (record_check_stopped_by_breakpoint): Likewise.
1528 * record.h (record_check_stopped_by_breakpoint): Likewise.
1529 * thread.c (thread_has_single_step_breakpoint_here): Likewise.
1530
ac7936df
YQ
15312017-10-25 Yao Qi <yao.qi@linaro.org>
1532
1533 * aarch32-linux-nat.c (aarch32_gp_regcache_supply): Use
1534 regcache->arch () instead get_regcache_arch.
1535 * aarch64-fbsd-nat.c (aarch64_fbsd_fetch_inferior_registers):
1536 Likewise.
1537 (aarch64_fbsd_store_inferior_registers): Likewise.
1538 * aarch64-linux-nat.c (fetch_gregs_from_thread): Likewise.
1539 (store_gregs_to_thread): Likewise.
1540 (fetch_fpregs_from_thread): Likewise.
1541 (store_fpregs_to_thread): Likewise.
1542 * aarch64-tdep.c (aarch64_extract_return_value): Likewise.
1543 (aarch64_store_return_value): Likewise.
1544 (aarch64_software_single_step): Likewise.
1545 * aix-thread.c (aix_thread_wait): Likewise.
1546 (supply_reg32): Likewise.
1547 (supply_sprs64): Likewise.
1548 (supply_sprs32): Likewise.
1549 (fill_gprs64): Likewise.
1550 (fill_gprs32): Likewise.
1551 (fill_sprs64): Likewise.
1552 (fill_sprs32): Likewise.
1553 (store_regs_user_thread): Likewise.
1554 (store_regs_kernel_thread): Likewise.
1555 * alpha-bsd-nat.c (alphabsd_fetch_inferior_registers): Likewise.
1556 (alphabsd_store_inferior_registers): Likewise.
1557 * alpha-tdep.c (alpha_extract_return_value): Likewise.
1558 (alpha_store_return_value): Likewise.
1559 (alpha_deal_with_atomic_sequence): Likewise.
1560 (alpha_next_pc): Likewise.
1561 (alpha_software_single_step): Likewise.
1562 * amd64-bsd-nat.c (amd64bsd_fetch_inferior_registers): Likewise.
1563 (amd64bsd_store_inferior_registers): Likewise.
1564 * amd64-linux-nat.c (amd64_linux_fetch_inferior_registers):
1565 Likewise.
1566 (amd64_linux_store_inferior_registers): Likewise.
1567 * amd64-nat.c (amd64_supply_native_gregset): Likewise.
1568 (amd64_collect_native_gregset): Likewise.
1569 * amd64-obsd-tdep.c (amd64obsd_supply_uthread): Likewise.
1570 (amd64obsd_collect_uthread): Likewise.
1571 * amd64-tdep.c (amd64_supply_fpregset): Likewise.
1572 (amd64_collect_fpregset): Likewise.
1573 (amd64_supply_fxsave): Likewise.
1574 (amd64_supply_xsave): Likewise.
1575 (amd64_collect_fxsave): Likewise.
1576 (amd64_collect_xsave): Likewise.
1577 * arc-tdep.c (arc_write_pc): Likewise.
1578 * arch-utils.c (default_skip_permanent_breakpoint): Likewise.
1579 * arm-fbsd-nat.c (arm_fbsd_fetch_inferior_registers): Likewise.
1580 (arm_fbsd_store_inferior_registers): Likewise.
1581 * arm-linux-nat.c (fetch_vfp_regs): Likewise.
1582 (store_vfp_regs): Likewise.
1583 (arm_linux_fetch_inferior_registers): Likewise.
1584 (arm_linux_store_inferior_registers): Likewise.
1585 * arm-linux-tdep.c (arm_linux_supply_gregset): Likewise.
1586 (arm_linux_sigreturn_next_pc): Likewise.
1587 (arm_linux_get_next_pcs_syscall_next_pc): Likewise.
1588 * arm-nbsd-nat.c (arm_supply_gregset): Likewise.
1589 (fetch_register): Likewise.
1590 (store_register): Likewise.
1591 * arm-tdep.c (arm_is_thumb): Likewise.
1592 (displaced_in_arm_mode): Likewise.
1593 (bx_write_pc): Likewise.
1594 (arm_get_next_pcs_addr_bits_remove): Likewise.
1595 (arm_software_single_step): Likewise.
1596 (arm_extract_return_value): Likewise.
1597 (arm_store_return_value): Likewise.
1598 (arm_write_pc): Likewise.
1599 * bfin-tdep.c (bfin_extract_return_value): Likewise.
1600 * bsd-uthread.c (bsd_uthread_fetch_registers): Likewise.
1601 (bsd_uthread_store_registers): Likewise.
1602 * core-regset.c (fetch_core_registers): Likewise.
1603 * corelow.c (get_core_registers): Likewise.
1604 * cris-tdep.c (cris_store_return_value): Likewise.
1605 (cris_extract_return_value): Likewise.
1606 (find_step_target): Likewise.
1607 (find_step_target): Likewise.
1608 (cris_software_single_step): Likewise.
1609 * ctf.c (ctf_fetch_registers): Likewise.
1610 * darwin-nat.c (cancel_breakpoint): Likewise.
1611 * fbsd-tdep.c (fbsd_collect_thread_registers): Likewise.
1612 * frv-tdep.c (frv_extract_return_value): Likewise.
1613 * ft32-tdep.c (ft32_store_return_value): Likewise.
1614 (ft32_extract_return_value): Likewise.
1615 * go32-nat.c (fetch_register): Likewise.
1616 (go32_fetch_registers): Likewise.
1617 (go32_store_registers): Likewise.
1618 (store_register): Likewise.
1619 * h8300-tdep.c (h8300_extract_return_value): Likewise.
1620 (h8300_store_return_value): Likewise.
1621 * hppa-linux-nat.c (fetch_register): Likewise.
1622 (store_register): Likewise.
1623 (hppa_linux_fetch_inferior_registers): Likewise.
1624 (hppa_linux_store_inferior_registers): Likewise.
1625 * i386-darwin-nat.c (i386_darwin_fetch_inferior_registers): Likewise.
1626 (i386_darwin_store_inferior_registers): Likewise.
1627 * i386-gnu-nat.c (gnu_fetch_registers): Likewise.
1628 (gnu_store_registers): Likewise.
1629 * i386-linux-nat.c (fetch_register): Likewise.
1630 (store_register): Likewise.
1631 (supply_gregset): Likewise.
1632 (fill_gregset): Likewise.
1633 (i386_linux_fetch_inferior_registers): Likewise.
1634 (i386_linux_store_inferior_registers): Likewise.
1635 (i386_linux_resume): Likewise.
1636 * i386-linux-tdep.c (i386_linux_get_syscall_number_from_regcache):
1637 Likewise.
1638 * i386-nto-tdep.c (i386nto_supply_gregset): Likewise.
1639 * i386-obsd-nat.c (i386obsd_supply_pcb): Likewise.
1640 * i386-obsd-tdep.c (i386obsd_supply_uthread): Likewise.
1641 (i386obsd_collect_uthread): Likewise.
1642 * i386-tdep.c (i386_mmx_regnum_to_fp_regnum): Likewise.
1643 (i386_supply_gregset): Likewise.
1644 (i386_collect_gregset): Likewise.
1645 (i386_supply_fpregset): Likewise.
1646 (i386_collect_fpregset): Likewise.
1647 (i386_mpx_bd_base): Likewise.
1648 * i386-v4-nat.c (supply_fpregset): Likewise.
1649 (fill_fpregset): Likewise.
1650 * i387-tdep.c (i387_supply_fsave): Likewise.
1651 (i387_collect_fsave): Likewise.
1652 (i387_supply_fxsave): Likewise.
1653 (i387_collect_fxsave): Likewise.
1654 (i387_supply_xsave): Likewise.
1655 (i387_collect_xsave): Likewise.
1656 * ia64-linux-nat.c (ia64_linux_fetch_registers): Likewise.
1657 (ia64_linux_store_registers): Likewise.
1658 * ia64-tdep.c (ia64_access_rse_reg): Likewise.
1659 (ia64_extract_return_value): Likewise.
1660 (ia64_store_return_value): Likewise.
1661 (find_func_descr): Likewise.
1662 * inf-child.c (inf_child_fetch_inferior_registers): Likewise.
1663 * inf-ptrace.c (inf_ptrace_fetch_registers): Likewise.
1664 (inf_ptrace_store_registers): Likewise.
1665 * infrun.c (use_displaced_stepping): Likewise.
1666 (displaced_step_prepare_throw): Likewise.
1667 (resume): Likewise.
1668 (proceed): Likewise.
1669 (do_target_wait): Likewise.
1670 (adjust_pc_after_break): Likewise.
1671 (handle_inferior_event_1): Likewise.
1672 (handle_signal_stop): Likewise.
1673 (save_infcall_suspend_state): Likewise.
1674 (restore_infcall_suspend_state): Likewise.
1675 * iq2000-tdep.c (iq2000_extract_return_value): Likewise.
1676 * jit.c (jit_frame_prev_register): Likewise.
1677 * linux-nat.c (save_stop_reason): Likewise.
1678 (linux_nat_wait_1): Likewise.
1679 (resume_stopped_resumed_lwps): Likewise.
1680 * linux-record.c (record_linux_sockaddr): Likewise.
1681 (record_linux_msghdr): Likewise.
1682 (record_linux_system_call): Likewise.
1683 * linux-tdep.c (linux_collect_thread_registers): Likewise.
1684 * lm32-tdep.c (lm32_extract_return_value): Likewise.
1685 (lm32_store_return_value): Likewise.
1686 * m32c-tdep.c (m32c_read_flg): Likewise.
1687 (m32c_pseudo_register_read): Likewise.
1688 (m32c_pseudo_register_write): Likewise.
1689 * m32r-linux-tdep.c (m32r_linux_supply_gregset): Likewise.
1690 (m32r_linux_collect_gregset): Likewise.
1691 * m32r-tdep.c (m32r_store_return_value): Likewise.
1692 (m32r_extract_return_value): Likewise.
1693 * m68k-bsd-nat.c (m68kbsd_supply_fpregset): Likewise.
1694 (m68kbsd_collect_fpregset): Likewise.
1695 * m68k-bsd-tdep.c (m68kbsd_supply_fpregset): Likewise.
1696 * m68k-linux-nat.c (fetch_register): Likewise.
1697 (old_fetch_inferior_registers): Likewise.
1698 (old_store_inferior_registers): Likewise.
1699 (store_regs): Likewise.
1700 * m68k-tdep.c (m68k_svr4_extract_return_value): Likewise.
1701 (m68k_svr4_store_return_value): Likewise.
1702 * m88k-tdep.c (m88k_store_arguments): Likewise.
1703 * mi/mi-main.c (mi_cmd_data_list_changed_registers): Likewise.
1704 (mi_cmd_data_write_register_values): Likewise.
1705 * mips-fbsd-nat.c (mips_fbsd_fetch_inferior_registers): Likewise.
1706 (mips_fbsd_store_inferior_registers): Likewise.
1707 * mips-fbsd-tdep.c (mips_fbsd_supply_fpregs): Likewise.
1708 (mips_fbsd_supply_gregs): Likewise.
1709 (mips_fbsd_collect_fpregs): Likewise.
1710 (mips_fbsd_collect_gregs): Likewise.
1711 (mips_fbsd_supply_fpregset): Likewise.
1712 (mips_fbsd_collect_fpregset): Likewise.
1713 (mips_fbsd_supply_gregset): Likewise.
1714 (mips_fbsd_collect_gregset): Likewise.
1715 * mips-linux-nat.c (supply_gregset): Likewise.
1716 (fill_gregset): Likewise.
1717 (supply_fpregset): Likewise.
1718 (fill_fpregset): Likewise.
1719 * mips-linux-tdep.c (mips_supply_gregset): Likewise.
1720 (mips_fill_gregset): Likewise.
1721 (mips_supply_fpregset): Likewise.
1722 (mips_fill_fpregset): Likewise.
1723 (mips64_supply_gregset): Likewise.
1724 (micromips_linux_sigframe_validate): Likewise.
1725 * mips-nbsd-nat.c (mipsnbsd_fetch_inferior_registers): Likewise.
1726 (mipsnbsd_fetch_inferior_registers): Likewise.
1727 (mipsnbsd_store_inferior_registers): Likewise.
1728 * mips-nbsd-tdep.c (mipsnbsd_supply_fpregset): Likewise.
1729 (mipsnbsd_supply_gregset): Likewise.
1730 (mipsnbsd_iterate_over_regset_sections): Likewise.
1731 (mipsnbsd_supply_reg): Likewise.
1732 (mipsnbsd_supply_fpreg): Likewise.
1733 * mips-tdep.c (mips_in_frame_stub): Likewise.
1734 (mips_dummy_id): Likewise.
1735 (is_octeon_bbit_op): Likewise.
1736 (micromips_bc1_pc): Likewise.
1737 (extended_mips16_next_pc): Likewise.
1738 (mips16_next_pc): Likewise.
1739 (deal_with_atomic_sequence): Likewise.
1740 * moxie-tdep.c (moxie_process_readu): Likewise.
1741 * nios2-tdep.c (nios2_get_next_pc): Likewise.
1742 * nto-procfs.c (procfs_store_registers): Likewise.
1743 * ppc-fbsd-nat.c (ppcfbsd_fetch_inferior_registers): Likewise.
1744 (ppcfbsd_store_inferior_registers): Likewise.
1745 * ppc-linux-nat.c (fetch_vsx_register): Likewise.
1746 (fetch_altivec_register): Likewise.
1747 (get_spe_registers): Likewise.
1748 (fetch_spe_register): Likewise.
1749 (fetch_altivec_registers): Likewise.
1750 (fetch_all_gp_regs): Likewise.
1751 (fetch_all_fp_regs): Likewise.
1752 (store_vsx_register): Likewise.
1753 (store_altivec_register): Likewise.
1754 (set_spe_registers): Likewise.
1755 (store_spe_register): Likewise.
1756 (store_altivec_registers): Likewise.
1757 (store_all_gp_regs): Likewise.
1758 (store_all_fp_regs): Likewise.
1759 * ppc-linux-tdep.c (ppc_linux_supply_gregset): Likewise.
1760 (ppc_linux_collect_gregset): Likewise.
1761 (ppc_canonicalize_syscall): Likewise.
1762 (ppc_linux_record_signal): Likewise.
1763 (ppu2spu_prev_register): Likewise.
1764 * ppc-nbsd-nat.c (ppcnbsd_supply_pcb): Likewise.
1765 * ppc-obsd-nat.c (ppcobsd_fetch_registers): Likewise.
1766 (ppcobsd_store_registers): Likewise.
1767 * ppc-ravenscar-thread.c (ppc_ravenscar_generic_fetch_registers):
1768 Likewise.
1769 (ppc_ravenscar_generic_store_registers): Likewise.
1770 * procfs.c (procfs_fetch_registers): Likewise.
1771 (procfs_store_registers): Likewise.
1772 * ravenscar-thread.c (ravenscar_fetch_registers): Likewise.
1773 (ravenscar_store_registers): Likewise.
1774 (ravenscar_prepare_to_store): Likewise.
1775 * record-btrace.c (record_btrace_fetch_registers): Likewise.
1776 * record-full.c (record_full_wait_1): Likewise.
1777 (record_full_registers_change): Likewise.
1778 (record_full_store_registers): Likewise.
1779 (record_full_core_fetch_registers): Likewise.
1780 (record_full_save): Likewise.
1781 (record_full_goto_insn): Likewise.
1782 * regcache.c (regcache_register_size): Likewise.
1783 (get_regcache_arch): Remove.
1784 (regcache_read_pc): Likewise.
1785 * regcache.h (get_regcache_arch): Remove.
1786 * remote-sim.c (gdbsim_fetch_register): Likewise.
1787 (gdbsim_store_register): Likewise.
1788 * remote.c (fetch_register_using_p): Likewise.
1789 (send_g_packet): Likewise.
1790 (remote_prepare_to_store): Likewise.
1791 (store_registers_using_G): Likewise.
1792 * reverse.c (save_bookmark_command): Likewise.
1793 (goto_bookmark_command): Likewise.
1794 * rs6000-aix-tdep.c (branch_dest): Likewise.
1795 * rs6000-nat.c (rs6000_ptrace64): Likewise.
1796 (fetch_register): Likewise.
1797 * rs6000-tdep.c (ppc_supply_reg): Likewise.
1798 (ppc_collect_reg): Likewise.
1799 (ppc_collect_gregset): Likewise.
1800 (ppc_collect_fpregset): Likewise.
1801 (ppc_collect_vsxregset): Likewise.
1802 (ppc_collect_vrregset): Likewise.
1803 (ppc_displaced_step_hw_singlestep): Likewise.
1804 (rs6000_pseudo_register_read): Likewise.
1805 (rs6000_pseudo_register_write): Likewise.
1806 * s390-linux-nat.c (supply_gregset): Likewise.
1807 (fill_gregset): Likewise.
1808 (s390_linux_fetch_inferior_registers): Likewise.
1809 * s390-linux-tdep.c (s390_write_pc): Likewise.
1810 (s390_software_single_step): Likewise.
1811 (s390_all_but_pc_registers_record): Likewise.
1812 (s390_linux_syscall_record): Likewise.
1813 * sentinel-frame.c (sentinel_frame_prev_arch): Likewise.
1814 * sh-nbsd-nat.c (shnbsd_fetch_inferior_registers): Likewise.
1815 (shnbsd_store_inferior_registers): Likewise.
1816 * sh-tdep.c (sh_extract_return_value_nofpu): Likewise.
1817 (sh_extract_return_value_fpu): Likewise.
1818 (sh_store_return_value_nofpu): Likewise.
1819 (sh_corefile_supply_regset): Likewise.
1820 (sh_corefile_collect_regset): Likewise.
1821 * sh64-tdep.c (sh64_extract_return_value): Likewise.
1822 (sh64_store_return_value): Likewise.
1823 * sparc-linux-tdep.c (sparc32_linux_collect_core_fpregset): Likewise.
1824 * sparc-nat.c (sparc_fetch_inferior_registers): Likewise.
1825 (sparc_store_inferior_registers): Likewise.
1826 * sparc-ravenscar-thread.c (register_in_thread_descriptor_p): Likewise.
1827 (sparc_ravenscar_prepare_to_store): Likewise.
1828 * sparc-tdep.c (sparc32_store_arguments): Likewise.
1829 (sparc_analyze_control_transfer): Likewise.
1830 (sparc_step_trap): Likewise.
1831 (sparc_software_single_step): Likewise.
1832 (sparc32_gdbarch_init): Likewise.
1833 (sparc_supply_rwindow): Likewise.
1834 (sparc_collect_rwindow): Likewise.
1835 * sparc64-linux-tdep.c (sparc64_linux_collect_core_fpregset): Likewise.
1836 * sparc64-nbsd-nat.c (sparc64nbsd_supply_gregset): Likewise.
1837 (sparc64nbsd_collect_gregset): Likewise.
1838 (sparc64nbsd_supply_fpregset): Likewise.
1839 (sparc64nbsd_collect_fpregset): Likewise.
1840 * sparc64-tdep.c (sparc64_store_arguments): Likewise.
1841 (sparc64_supply_gregset): Likewise.
1842 (sparc64_collect_gregset): Likewise.
1843 (sparc64_supply_fpregset): Likewise.
1844 (sparc64_collect_fpregset): Likewise.
1845 * spu-linux-nat.c (spu_fetch_inferior_registers): Likewise.
1846 * spu-tdep.c (spu_unwind_sp): Likewise.
1847 (spu2ppu_prev_register): Likewise.
1848 (spu_memory_remove_breakpoint): Likewise.
1849 * stack.c (return_command): Likewise.
1850 * tic6x-tdep.c (tic6x_extract_signed_field): Likewise.
1851 * tracefile-tfile.c (tfile_fetch_registers): Likewise.
1852 * tracefile.c (trace_save_ctf): Likewise.
1853 * windows-nat.c (do_windows_fetch_inferior_registers): Likewise.
1854 (do_windows_store_inferior_registers): Likewise.
1855 (windows_resume): Likewise.
1856 * xtensa-linux-nat.c (fill_gregset): Likewise.
1857 (supply_gregset_reg): Likewise.
1858 * xtensa-tdep.c (xtensa_register_write_masked): Likewise.
1859 (xtensa_register_read_masked): Likewise.
1860 (xtensa_supply_gregset): Likewise.
1861 (xtensa_extract_return_value): Likewise.
1862 (xtensa_store_return_value): Likewise.
1863
edd079d9
UW
18642017-10-25 Ulrich Weigand <uweigand@de.ibm.com>
1865
1866 * doublest.c (floatformat_from_string): New function.
1867 * doublest.h (floatformat_from_string): Add prototype.
1868
1869 * std-operator.def (OP_DOUBLE, OP_DECFLOAT): Remove, replace by ...
1870 (OP_FLOAT): ... this.
1871 * expression.h: Do not include "doublest.h".
1872 (union exp_element): Replace doubleconst and decfloatconst by
1873 new element floatconst.
1874 * ada-lang.c (resolve_subexp): Handle OP_FLOAT instead of OP_DOUBLE.
1875 (ada_evaluate_subexp): Likewise.
1876 * eval.c (evaluate_subexp_standard): Handle OP_FLOAT instead of
1877 OP_DOUBLE and OP_DECFLOAT.
1878 * expprint.c (print_subexp_standard): Likewise.
1879 (dump_subexp_body_standard): Likewise.
1880 * breakpoint.c (watchpoint_exp_is_const): Likewise.
1881
1882 * parse.c: Include "dfp.h".
1883 (write_exp_elt_dblcst, write_exp_elt_decfloatcst): Remove.
1884 (write_exp_elt_floatcst): New function.
1885 (operator_length_standard): Handle OP_FLOAT instead of OP_DOUBLE
1886 and OP_DECFLOAT.
1887 (operator_check_standard): Likewise.
1888 (parse_float): Do not accept suffix. Take type as input. Return bool.
1889 Return target format buffer instead of host DOUBLEST.
1890 Use floatformat_from_string and decimal_from_string to parse
1891 either binary or decimal floating-point types.
1892 (parse_c_float): Remove.
1893 * parser-defs.h: Do not include "doublest.h".
1894 (write_exp_elt_dblcst, write_exp_elt_decfloatcst): Remove.
1895 (write_exp_elt_floatcst): Add prototype.
1896 (parse_float): Update prototype.
1897 (parse_c_float): Remove.
1898
1899 * c-exp.y: Do not include "dfp.h".
1900 (typed_val_float): Use byte buffer instead of DOUBLEST.
1901 (typed_val_decfloat): Remove.
1902 (DECFLOAT): Remove.
1903 (FLOAT): Use OP_FLOAT and write_exp_elt_floatcst.
1904 (parse_number): Update to new parse_float interface.
1905 Parse suffixes and determine type before calling parse_float.
1906 Handle decimal and binary FP types the same way.
1907
1908 * d-exp.y (typed_val_float): Use byte buffer instead of DOUBLEST.
1909 (FLOAT_LITERAL): Use OP_FLOAT and write_exp_elt_floatcst.
1910 (parse_number): Update to new parse_float interface.
1911 Parse suffixes and determine type before calling parse_float.
1912
1913 * f-exp.y: Replace dval by typed_val_float.
1914 (FLOAT): Use OP_FLOAT and write_exp_elt_floatcst.
1915 (parse_number): Use parse_float instead of atof.
1916
1917 * go-exp.y (typed_val_float): Use byte buffer instead of DOUBLEST.
1918 (parse_go_float): Remove.
1919 (FLOAT): Use OP_FLOAT and write_exp_elt_floatcst.
1920 (parse_number): Call parse_float instead of parse_go_float.
1921 Parse suffixes and determine type before calling parse_float.
1922
1923 * p-exp.y (typed_val_float): Use byte buffer instead of DOUBLEST.
1924 (FLOAT): Use OP_FLOAT and write_exp_elt_floatcst.
1925 (parse_number): Update to new parse_float interface.
1926 Parse suffixes and determine type before calling parse_float.
1927
1928 * m2-exp.y: Replace dval by byte buffer val.
1929 (FLOAT): Use OP_FLOAT and write_exp_elt_floatcst.
1930 (parse_number): Call parse_float instead of atof.
1931
1932 * rust-exp.y (typed_val_float): Use byte buffer instead of DOUBLEST.
1933 (lex_number): Call parse_float instead of strtod.
1934 (ast_dliteral): Use OP_FLOAT instead of OP_DOUBLE.
1935 (convert_ast_to_expression): Handle OP_FLOAT instead of OP_DOUBLE.
1936 Use write_exp_elt_floatcst.
1937 (unit_testing): Remove static variable.
1938 (rust_type): Do not check unit_testing.
1939 (rust_lex_tests): Do not set uint_testing. Set up dummy rust_parser.
1940
1941 * ada-exp.y (type_float, type_double): Remove.
1942 (typed_val_float): Use byte buffer instead of DOUBLEST.
1943 (FLOAT): Use OP_FLOAT and write_exp_elt_floatcst.
1944 * ada-lex.l (processReal): Use parse_float instead of sscanf.
1945
cc628f3d
AH
19462017-10-25 Alan Hayward <alan.hayward@arm.com>
1947
1948 * aarch64-tdep.h (enum aarch64_regnum): Remove.
1949 * arch/aarch64.h: New file.
1950
09a7c6aa
UW
19512017-10-24 Ulrich Weigand <uweigand@de.ibm.com>
1952
1953 * dfp.h (decimal_from_string): Use const reference for argument.
1954 * dfp.c (decimal_from_string): Likewise.
1955
8ba0dd51
UW
19562017-10-24 Ulrich Weigand <uweigand@de.ibm.com>
1957
1958 * i387-tdep.c (print_i387_value): Use floatformat_to_string.
1959 * sh64-tdep.c (sh64_do_fp_register): Likewise.
1960 * mips-tdep.c (mips_print_fp_register): Likewise.
1961
16e812b2
UW
19622017-10-24 Ulrich Weigand <uweigand@de.ibm.com>
1963
1964 * common/format.h (enum argclass): Replace decfloat_arg by
1965 dec32float_arg, dec64float_arg, and dec128float_arg.
1966 * common/format.c (parse_format_string): Update to return
1967 new decimal float argument classes.
1968
1969 * printcmd.c (printf_decfloat): Rename to ...
1970 (printf_floating): ... this. Add argclass argument, and use it
1971 instead of parsing the format string again. Add support for
1972 binary floating-point values, using floatformat_to_string.
1973 Convert value to the target format if it doesn't already match.
1974 (ui_printf): Call printf_floating instead of printf_decfloat,
1975 also for double_arg / long_double_arg. Pass argclass.
1976
1977 * dfp.c (decimal_to_string): Add format string argument.
1978 * dfp.h (decimal_to_string): Likewise.
1979
1980 * doublest.c (floatformat_to_string): Add format string argument.
1981 * doublest.h (floatformat_to_string): Likewise.
1982
fdf0cbc2
UW
19832017-10-24 Ulrich Weigand <uweigand@de.ibm.com>
1984
1985 * doublest.c (floatformat_precision): New routine.
1986 (floatformat_to_string): Likewise.
1987 * doublest.c (floatformat_to_string): Add prototype.
1988
1989 * printcmd.c (print_scalar_formatted): Only call print_floating
1990 on floating-point types.
1991 * valprint.c: Do not include "floatformat.h".
1992 (generic_val_print_decfloat): Remove.
1993 (generic_val_print): Call generic_val_print_float for both
1994 TYPE_CODE_FLT and TYPE_CODE_DECFLOAT.
1995 (print_floating): Use floatformat_to_string. Handle decimal float.
1996 (print_decimal_floating): Remove, merge into floatformat_to_string.
1997 * value.h (print_decimal_floating): Remove.
1998
1999 * Makefile.in: Do not build doublest.c with -Wformat-nonliteral.
2000
5033013f
UW
20012017-10-24 Ulrich Weigand <uweigand@de.ibm.com>
2002
2003 * buildsym.c (end_symtab_get_static_block): Use std::stable_sort.
2004
a664f67e
SM
20052017-10-21 Simon Marchi <simon.marchi@ericsson.com>
2006
2007 * memattr.h: Don't include vec.h.
2008 (struct mem_attrib): Initialize fields.
2009 <unknown>: New static method.
2010 (struct mem_region): Add constructors, operator<, initialize
2011 fields.
2012 * memattr.c: Include algorithm.
2013 (default_mem_attrib, unknown_mem_attrib): Remove.
2014 (user_mem_region_list): New global.
2015 (target_mem_region_list, mem_region_list): Change type to
2016 std::vector<mem_region>.
2017 (mem_use_target): Now a function.
2018 (target_mem_regions_valid): Change type to bool.
2019 (mem_region_lessthan, mem_region_cmp, mem_region_init): Remove.
2020 (require_user_regions): Adjust.
2021 (require_target_regions): Adjust.
2022 (create_mem_region): Adjust.
2023 (lookup_mem_region): Adjust.
2024 (invalidate_target_mem_regions): Adjust.
2025 (mem_clear): Rename to...
2026 (user_mem_clear): ... this, and adjust.
2027 (mem_command): Adjust.
2028 (info_mem_command): Adjust.
2029 (mem_enable, enable_mem_command, mem_disable,
2030 disable_mem_command): Adjust.
2031 (mem_delete): Adjust.
2032 (delete_mem_command): Adjust.
2033 * memory-map.h (parse_memory_map): Return an std::vector.
2034 * memory-map.c (parse_memory_map): Likewise.
2035 (struct memory_map_parsing_data): Add constructor.
2036 <memory_map>: Point to std::vector.
2037 (memory_map_start_memory): Adjust.
2038 (memory_map_end_memory): Adjust.
2039 (memory_map_end_property): Adjust.
2040 (clear_result): Remove.
2041 * remote.c (remote_memory_map): Return an std::vector.
2042 * target-debug.h (target_debug_print_VEC_mem_region_s__p):
2043 Remove.
2044 (target_debug_print_mem_region_vector): New.
2045 * target-delegates.c: Regenerate.
2046 * target.h (mem_region_vector): New typedef.
2047 (to_memory_map): Return mem_region_vector.
2048 (target_memory_map): Return an std::vector.
2049 * target.c (target_memory_map): Return an std::vector.
2050 (flash_erase_command): Adjust.
2051
6e17c565
SM
20522017-10-21 Simon Marchi <simon.marchi@ericsson.com>
2053
2054 * memory-map.c (struct memory_map_parsing_data) <property_name>:
2055 Change type to std::string.
2056 (memory_map_start_property): Adjust.
2057 (memory_map_end_property): Adjust.
2058
cfba9872
SM
20592017-10-21 Simon Marchi <simon.marchi@polymtl.ca>
2060
2061 * infrun.h: Include common/byte-vector.h.
2062 (struct displaced_step_closure): New struct.
2063 (struct buf_displaced_step_closure): New struct.
2064 * infrun.c (displaced_step_closure::~displaced_step_closure):
2065 Provide default implementation.
2066 (displaced_step_clear): Deallocate step closure with delete.
2067 * aarch64-tdep.c (displaced_step_closure): Rename to ...
2068 (aarch64_displaced_step_closure): ... this, extend
2069 displaced_step_closure.
2070 (aarch64_displaced_step_data) <dsc>: Change type to
2071 aarch64_displaced_step_closure.
2072 (aarch64_displaced_step_copy_insn): Adjust to type change, use
2073 unique_ptr.
2074 (aarch64_displaced_step_fixup): Add cast for displaced step
2075 closure.
2076 * amd64-tdep.c (displaced_step_closure): Rename to ...
2077 (amd64_displaced_step_closure): ... this, extend
2078 displaced_step_closure.
2079 <insn_buf>: Change type to std::vector<gdb_byte>.
2080 <max_len>: Remove.
2081 (fixup_riprel): Change type of DSC parameter, adjust to type
2082 change of insn_buf.
2083 (fixup_displaced_copy): Change type of DSC parameter.
2084 (amd64_displaced_step_copy_insn): Instantiate
2085 amd64_displaced_step_closure.
2086 (amd64_displaced_step_fixup): Add cast for closure type, adjust
2087 to type change of insn_buf.
2088 * arm-linux-tdep.c (arm_linux_cleanup_svc): Change type of
2089 parameter DSC.
2090 (arm_linux_copy_svc): Likewise.
2091 (cleanup_kernel_helper_return): Likewise.
2092 (arm_catch_kernel_helper_return): Likewise.
2093 (arm_linux_displaced_step_copy_insn): Instantiate
2094 arm_displaced_step_closure.
2095 * arm-tdep.c (arm_pc_is_thumb): Add cast for closure.
2096 (displaced_read_reg): Change type of parameter DSC.
2097 (branch_write_pc): Likewise.
2098 (load_write_pc): Likewise.
2099 (alu_write_pc): Likewise.
2100 (displaced_write_reg): Likewise.
2101 (arm_copy_unmodified): Likewise.
2102 (thumb_copy_unmodified_32bit): Likewise.
2103 (thumb_copy_unmodified_16bit): Likewise.
2104 (cleanup_preload): Likewise.
2105 (install_preload): Likewise.
2106 (arm_copy_preload): Likewise.
2107 (thumb2_copy_preload): Likewise.
2108 (install_preload_reg): Likewise.
2109 (arm_copy_preload_reg): Likewise.
2110 (cleanup_copro_load_store): Likewise.
2111 (install_copro_load_store): Likewise.
2112 (arm_copy_copro_load_store) Likewise.
2113 (thumb2_copy_copro_load_store): Likewise.
2114 (cleanup_branch): Likewise.
2115 (install_b_bl_blx): Likewise.
2116 (arm_copy_b_bl_blx): Likewise.
2117 (thumb2_copy_b_bl_blx): Likewise.
2118 (thumb_copy_b): Likewise.
2119 (install_bx_blx_reg): Likewise.
2120 (arm_copy_bx_blx_reg): Likewise.
2121 (thumb_copy_bx_blx_reg): Likewise.
2122 (cleanup_alu_imm): Likewise.
2123 (arm_copy_alu_imm): Likewise.
2124 (thumb2_copy_alu_imm): Likewise.
2125 (cleanup_alu_reg): Likewise.
2126 (install_alu_reg): Likewise.
2127 (arm_copy_alu_reg): Likewise.
2128 (thumb_copy_alu_reg): Likewise.
2129 (cleanup_alu_shifted_reg): Likewise.
2130 (install_alu_shifted_reg): Likewise.
2131 (arm_copy_alu_shifted_reg): Likewise.
2132 (cleanup_load): Likewise.
2133 (cleanup_store): Likewise.
2134 (arm_copy_extra_ld_st): Likewise.
2135 (install_load_store): Likewise.
2136 (thumb2_copy_load_literal): Likewise.
2137 (thumb2_copy_load_reg_imm): Likewise.
2138 (arm_copy_ldr_str_ldrb_strb): Likewise.
2139 (cleanup_block_load_all): Likewise.
2140 (cleanup_block_store_pc): Likewise.
2141 (cleanup_block_load_pc): Likewise.
2142 (arm_copy_block_xfer): Likewise.
2143 (thumb2_copy_block_xfer): Likewise.
2144 (cleanup_svc): Likewise.
2145 (install_svc): Likewise.
2146 (arm_copy_svc): Likewise.
2147 (thumb_copy_svc): Likewise.
2148 (arm_copy_undef): Likewise.
2149 (thumb_32bit_copy_undef): Likewise.
2150 (arm_copy_unpred): Likewise.
2151 (arm_decode_misc_memhint_neon): Likewise.
2152 (arm_decode_unconditional): Likewise.
2153 (arm_decode_miscellaneous): Likewise.
2154 (arm_decode_dp_misc): Likewise.
2155 (arm_decode_ld_st_word_ubyte): Likewise.
2156 (arm_decode_media): Likewise.
2157 (arm_decode_b_bl_ldmstm): Likewise.
2158 (arm_decode_ext_reg_ld_st): Likewise.
2159 (thumb2_decode_dp_shift_reg): Likewise.
2160 (thumb2_decode_ext_reg_ld_st): Likewise.
2161 (arm_decode_svc_copro): Likewise.
2162 (thumb2_decode_svc_copro): Likewise.
2163 (install_pc_relative): Likewise.
2164 (thumb_copy_pc_relative_16bit): Likewise.
2165 (thumb_decode_pc_relative_16bit): Likewise.
2166 (thumb_copy_pc_relative_32bit): Likewise.
2167 (thumb_copy_16bit_ldr_literal): Likewise.
2168 (thumb_copy_cbnz_cbz): Likewise.
2169 (thumb2_copy_table_branch): Likewise.
2170 (cleanup_pop_pc_16bit_all): Likewise.
2171 (thumb_copy_pop_pc_16bit): Likewise.
2172 (thumb_process_displaced_16bit_insn): Likewise.
2173 (decode_thumb_32bit_ld_mem_hints): Likewise.
2174 (thumb_process_displaced_32bit_insn): Likewise.
2175 (thumb_process_displaced_insn): Likewise.
2176 (arm_process_displaced_insn): Likewise.
2177 (arm_displaced_init_closure): Likewise.
2178 (arm_displaced_step_fixup): Add cast for closure.
2179 * arm-tdep.h: Include infrun.h.
2180 (displaced_step_closure): Rename to ...
2181 (arm_displaced_step_closure): ... this, extend
2182 displaced_step_closure.
2183 <u::svc::copy_svc_os>: Change type of parameter DSC.
2184 <cleanup>: Likewise.
2185 (arm_process_displaced_insn): Likewise.
2186 (arm_displaced_init_closure): Likewise.
2187 (displaced_read_reg): Likewise.
2188 (displaced_write_reg): Likewise.
2189 * i386-linux-tdep.c (i386_linux_displaced_step_copy_insn):
2190 Adjust.
2191 * i386-tdep.h: Include infrun.h.
2192 (i386_displaced_step_closure): New typedef.
2193 * i386-tdep.c (i386_displaced_step_copy_insn): Use
2194 i386_displaced_step_closure.
2195 (i386_displaced_step_fixup): Adjust.
2196 * rs6000-tdep.c (ppc_displaced_step_closure): New typedef.
2197 (ppc_displaced_step_copy_insn): Use ppc_displaced_step_closure
2198 and unique_ptr.
2199 (ppc_displaced_step_fixup): Adjust.
2200 * s390-linux-tdep.c (s390_displaced_step_closure): New typedef.
2201 (s390_displaced_step_copy_insn): Use s390_displaced_step_closure
2202 and unique_ptr.
2203 (s390_displaced_step_fixup): Adjust.
2204
b392b304
SM
22052017-10-21 Simon Marchi <simon.marchi@polymtl.ca>
2206
2207 * interps.h (interp_resume, interp_suspend, interp_set_temp):
2208 Remove declarations.
2209
d5833c62
TT
22102017-10-20 Tom Tromey <tom@tromey.com>
2211
2212 * gdb_bfd.c (struct gdb_bfd_data) <included_bfds>: Now a
2213 std::vector.
2214 (gdb_bfd_record_inclusion): Update.
2215 (bfdp): Remove typedef.
2216
06d5bbc8
TT
22172017-10-20 Tom Tromey <tom@tromey.com>
2218
2219 * gdb_bfd.c (gdb_bfd_ref): Use new.
2220 (struct gdb_bfd_data): Add constructor, destructor, and member
2221 initializers.
2222 (gdb_bfd_unref): Use delete.
2223
2712ce2e
TT
22242017-10-20 Tom Tromey <tom@tromey.com>
2225
2226 * exec.c (exec_file_attach): Use new_bfd_ref.
2227 * symfile-mem.c (symbol_file_add_from_memory): Use new_bfd_ref.
2228 * gdb_bfd.c (gdb_bfd_open, gdb_bfd_fopen, gdb_bfd_openr)
2229 (gdb_bfd_openw, gdb_bfd_openr_iovec, gdb_bfd_fdopenr): Use
2230 new_bfd_ref.
2231 * gdb_bfd.h (new_bfd_ref): New function.
2232
fcc8fb2f
PA
22332017-10-20 Pedro Alves <palves@redhat.com>
2234
2235 * main.c (captured_command_loop): Add attribute noinline.
2236
4c2287b0
SM
22372017-10-19 Simon Marchi <simon.marchi@ericsson.com>
2238
2239 * interps.c (struct interp_factory): Add constructor.
2240 (interp_factory_p): Remove typedef.
2241 (DEF_VEC_P(interp_factory_p)): Remove.
2242 (interpreter_factories): Change type to std::vector.
2243 (interp_factory_register): Adjust.
2244 (interp_lookup): Adjust.
2245 (interpreter_completer): Adjust.
2246
3d415c26
TT
22472017-10-19 Tom Tromey <tom@tromey.com>
2248
2249 * break-catch-syscall.c (catch_syscall_completer): Use
2250 std::string, gdb::unique_xmalloc_ptr.
2251
395423c4
TT
22522017-10-19 Tom Tromey <tom@tromey.com>
2253
2254 * infcall.c (call_function_by_hand_dummy): Use std::string.
2255
54f70bc1
TT
22562017-10-19 Tom Tromey <tom@tromey.com>
2257
2258 * mi/mi-main.c (mi_cmd_execute): Update.
2259 * top.h (prepare_execute_command): Return scoped_value_mark.
2260 * value.h (class scoped_value_mark): Use DISABLE_COPY_AND_ASSIGN.
2261 Add move constructor.
2262 * top.c (prepare_execute_command): Return scoped_value_mark.
2263 (execute_command): Update.
2264
63929e84
PA
22652017-10-19 Pedro Alves <palves@redhat.com>
2266
2267 * xml-support.c (xml_fetch_content_from_file): Check fread's
2268 return.
2269
a75868f5
PA
22702017-10-19 Pedro Alves <palves@redhat.com>
2271
2272 * ser-base.c (ser_base_read_error_fd): Delete the file handler if
2273 async.
2274 (handle_error_fd): New function.
2275 (ser_base_async): Add/delete an event loop file handler for
2276 error_fd.
2277
2edf834e
PA
22782017-10-19 Pedro Alves <palves@redhat.com>
2279
2280 * xml-support.c (xml_fetch_content_from_file): Don't read in
2281 chunks. Instead use fseek to determine the file's size, and read
2282 it in one go.
2283
c8ba13ad
KS
22842017-11-18 Keith Seitz <keiths@redhat.com>
2285
2286 * c-exp.y (oper): Canonicalize conversion operators of user-defined
2287 types.
2288 Add whitespace to front of type name.
2289
37534686
KS
22902017-10-18 Keith Seitz <keiths@redhat.com>
2291
2292 * dwarf2read.c (dwarf2_add_typedef): Issue a complaint on unhandled
2293 DW_AT_accessibility.
2294
28c7c158
YQ
22952017-10-18 Yao Qi <yao.qi@linaro.org>
2296
2297 * features/tic6x-c62x-linux.c: Remove.
2298
30f0b101
TT
22992017-10-17 Tom Tromey <tom@tromey.com>
2300
2301 * disasm.c (do_mixed_source_and_assembly_deprecated): Use
2302 gdb::optional, ui_out_emit_list, ui_out_emit_tuple.
2303 (do_mixed_source_and_assembly): Likewise.
2304
57e12da9
TT
23052017-10-17 Tom Tromey <tom@tromey.com>
2306
2307 * regcache.c (regcache::xfer_part): Remove assertion.
2308
7b700999
PA
23092017-10-17 Pedro Alves <palves@redhat.com>
2310
2311 * xml-support.c (xml_fetch_content_from_file): Call
2312 unique_ptr::release() instead unique_ptr::get() when passing
2313 through xrealloc.
2314
d3037ba6
YQ
23152017-10-17 Yao Qi <yao.qi@linaro.org>
2316
2317 * regcache.c (regcache::xfer_part): Remove parameters read and
2318 write, add parameter is_raw. All callers are updated.
2319
83d5a34d
KS
23202017-10-16 Keith Seitz <keiths@redhat.com>
2321
2322 * c-typeprint.c (enum access_specifier): Moved here from
2323 c_type_print_base.
2324 (output_access_specifier): New function.
2325 (c_type_print_base): Consider typedefs when assessing
2326 whether access labels are needed.
2327 Use output_access_specifier as needed.
2328 Output access specifier for typedefs, if needed.
2329 * dwarf2read.c (dwarf2_add_typedef): Record DW_AT_accessibility.
2330 * gdbtypes.h (struct typedef_field) <is_protected, is_private>: New
2331 fields.
2332 (TYPE_TYPEDEF_FIELD_PROTECTED, TYPE_TYPEDEF_FIELD_PRIVATE): New
2333 accessor macros.
2334
87028b87
TT
23352017-10-16 Tom Tromey <tom@tromey.com>
2336
2337 * linux-tdep.c (linux_info_proc, linux_find_memory_regions_full)
2338 (linux_fill_prpsinfo, linux_vsyscall_range_raw): Update.
2339 * target.c (target_fileio_read_stralloc): Update.
2340 * sparc64-tdep.c (adi_is_addr_mapped): Update.
2341 * target.h (target_fileio_read_stralloc): Return
2342 unique_xmalloc_ptr.
2343
b7b030ad
TT
23442017-10-16 Tom Tromey <tom@tromey.com>
2345
2346 * xml-syscall.c (xml_init_syscalls_info): Update.
2347 * xml-support.c (xinclude_start_include): Update.
2348 (xml_fetch_content_from_file): Return unique_xmalloc_ptr.
2349 * xml-support.h (xml_fetch_another): Return unique_xmalloc_ptr.
2350 (xml_fetch_content_from_file): Likewise.
2351 * osdata.c (get_osdata): Update.
2352 * target.h (target_read_stralloc, target_get_osdata): Return
2353 unique_xmalloc_ptr.
2354 * solib-aix.c (solib_aix_get_library_list): Update.
2355 * solib-target.c (solib_target_current_sos): Update.
2356 * solib-svr4.c (svr4_current_sos_via_xfer_libraries): Update.
2357 * xml-tdesc.c (fetch_available_features_from_target): Update.
2358 (target_fetch_description_xml): Update.
2359 (file_read_description_xml): Update.
2360 * remote.c (remote_get_threads_with_qxfer, remote_memory_map)
2361 (remote_traceframe_info, btrace_read_config, remote_read_btrace)
2362 (remote_pid_to_exec_file): Update.
2363 * target.c (target_read_stralloc): Return unique_xmalloc_ptr.
2364 (target_get_osdata): Likewise.
2365
b80406ac
TT
23662017-10-16 Tom Tromey <tom@tromey.com>
2367
2368 * remote.c (remote_register_number_and_offset): Use std::vector.
2369 (remote_set_syscall_catchpoint): Use gdb::unique_xmalloc_ptr.
2370 (putpkt_binary): Use gdb::def_vector.
2371 (compare_sections_command): Use gdb::byte_vector.
2372
a90ecff8
TT
23732017-10-16 Tom Tromey <tom@tromey.com>
2374
2375 * ppc-linux-nat.c (hwdebug_insert_point): Use
2376 gdb::unique_xmalloc_ptr, XDUP.
2377
2dc0e219
TT
23782017-10-16 Tom Tromey <tom@tromey.com>
2379
2380 * probe.c (parse_probes): Use std::string.
2381 (info_probes_for_ops, enable_probes_command)
2382 (disable_probes_command): Remove cleanups.
2383
b05628f0
TT
23842017-10-16 Tom Tromey <tom@tromey.com>
2385
2386 * buildsym.c (block_compar): Remove.
2387 (end_symtab_get_static_block): Use std::vector.
2388
a79b1bc6
SM
23892017-10-16 Simon Marchi <simon.marchi@ericsson.com>
2390
2391 * memrange.h (struct mem_range): Define operator< and operator==.
2392 (mem_range_s): Remove.
2393 (DEF_VEC_O (mem_range_s)): Remove.
2394 (normalize_mem_ranges): Change parameter type to std::vector.
2395 * memrange.c (compare_mem_ranges): Remove.
2396 (normalize_mem_ranges): Change parameter type to std::vector,
2397 adjust to vector change.
2398 * exec.c (section_table_available_memory): Return vector, remove
2399 parameter.
2400 (section_table_read_available_memory): Adjust to std::vector
2401 change.
2402 * remote.c (remote_read_bytes): Adjust to std::vector
2403 change.
2404 * tracepoint.h (traceframe_available_memory): Change parameter
2405 type to std::vector.
2406 * tracepoint.c (traceframe_available_memory): Change parameter
2407 type to std::vector, adjust.
2408 * gdb/mi/mi-main.c (mi_cmd_trace_frame_collected): Adjust to
2409 std::vector change.
2410 * gdb/Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
2411 unittests/memrange-selftests.c.
2412 (SUBDIR_UNITTESTS_OBS): Add memrange-selftests.o.
2413 * gdb/unittests/memrange-selftests.c: New file.
2414
63f0e930
PA
24152017-10-16 Pedro Alves <palves@redhat.com>
2416
2417 * elfread.c (probe_key_free): Rename range-for variable.
2418 * probe.c (parse_probes_in_pspace, find_probes_in_objfile)
2419 (find_probe_by_pc, collect_probes): Rename range-for variable.
2420
c40c7bfc
YQ
24212017-10-16 Yao Qi <yao.qi@linaro.org>
2422
2423 * features/Makefile (XMLTOC): Remove tic6x-*.xml.
2424 * features/tic6x-c62x.c: Remove.
2425 * features/tic6x-c64x-linux.c: Remove.
2426 * features/tic6x-c64x.c: Remove.
2427 * features/tic6x-c64xp-linux.c: Remove.
2428 * features/tic6x-c64xp.c: Remove.
2429 * tic6x-linux-tdep.c (_initialize_tic6x_linux_tdep): Don't call
2430 initialize_tdesc_tic6x_*_linux functions.
2431 * tic6x-tdep.c (_initialize_tic6x_tdep): Don't call
2432 initialize_tdesc_tic6x_* functions.
2433
df27ae6a
YQ
24342017-10-16 Yao Qi <yao.qi@linaro.org>
2435
2436 * features/Makefile (WHICH): Remove tic6x-c64xp, tic6x-c64x
2437 tic6x-c62x.
2438 * regformats/tic6x-c62x.dat: Remove.
2439 * regformats/tic6x-c64x.dat: Remove.
2440 * regformats/tic6x-c64xp.dat: Remove.
2441
86766165
SM
24422017-10-15 Simon Marchi <simon.marchi@ericsson.com>
2443
2444 * tracepoint.c (parse_traceframe_info): Return a unique_ptr
2445 (the !HAVE_LIBEXPAT version).
2446
824dfcc3
SM
24472017-10-14 Simon Marchi <simon.marchi@ericsson.com>
2448
2449 * nat/linux-osdata.c (struct pid_pgid_entry) <operator<>: Make
2450 const.
2451
2098b393
SM
24522017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
2453
2454 * target.h: Include tracepoint.h.
2455 (enum trace_find_type): Move to tracepoint.h.
2456 (struct target_ops) <to_traceframe_info>: Return a unique ptr.
2457 * tracepoint.h: Don't include target.h
2458 (enum trace_find_type): Move from target.h.
2459 (parse_traceframe_info): Return a unique ptr.
2460 * tracepoint.c (current_traceframe_info): Change type to unique
2461 ptr.
2462 (free_traceframe_info): Remove.
2463 (clear_traceframe_info): Don't manually free
2464 current_traceframe_info.
2465 (free_result): Remove.
2466 (parse_traceframe_info): Return a unique ptr.
2467 (get_traceframe_info): Adjust to unique ptr.
2468 * ctf.c (ctf_traceframe_info): Return a unique ptr.
2469 * remote.c (remote_traceframe_info): Return a unique ptr.
2470 * tracefile-tfile.c (tfile_traceframe_info): Return a unique
2471 ptr.
2472 * target-debug.h (target_debug_print_traceframe_info_up): New
2473 macro.
2474 * target-delegates.c: Regenerate.
2475
4cdd21a8
SM
24762017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
2477
2478 * memrange.h (struct mem_range): Add constructors.
2479 * tracepoint.h (struct traceframe_info) <memory>: Change type to
2480 std::vector<mem_range>.
2481 * tracepoint.c (free_traceframe_info): Don't manually free
2482 vector.
2483 (traceframe_info_start_memory): Adjust to vector change.
2484 (traceframe_available_memory): Likewise.
2485 * tracefile-tfile.c (build_traceframe_info): Likewise.
2486 * ctf.c (ctf_traceframe_info): Likewise.
2487
d0d292a2
SM
24882017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
2489
2490 * tracepoint.h (struct traceframe_info) <tvars>: Change type to
2491 std::vector<int>.
2492 * tracepoint.c (free_traceframe_info): Deallocate with delete.
2493 (traceframe_info_start_tvar): Adjust to vector change.
2494 (parse_traceframe_info): Allocate with new.
2495 * ctf.c (ctf_traceframe_info): Allocate with new, adjust to
2496 vector change.
2497 * tracefile-tfile.c (build_traceframe_info): Adjust to vector
2498 change.
2499 tfile_traceframe_info): Allocate with new.
2500 * mi/mi-main.c (mi_cmd_trace_frame_collected): Adjust to vector
2501 change.
2502
8d3c73ef
SM
25032017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
2504
2505 * tracepoint.c (traceframe_info): Rename to...
2506 (current_traceframe_info): ...this.
2507 (clear_traceframe_info): Adjust.
2508 (get_traceframe_info): Adjust.
2509
b129dcac
SM
25102017-10-14 Simon Marchi <simon.marchi@ericsson.com>
2511
2512 * nat/linux-osdata.c: Include algorithm.
2513 (compare_processes): Remove.
2514 (struct pid_pgid_entry): New struct.
2515 (linux_xfer_osdata_processgroups): Use std::vector instead of
2516 XNEWVEC.
2517
af5bf4ad
SM
25182017-10-14 Simon Marchi <simon.marchi@ericsson.com>
2519
2520 * objfiles.h: Don't include symfile.h.
2521 (struct partial_symbol): Remove forward-declaration.
2522 (struct objfile) <global_psymbols, static_psymbols>: Change type
2523 to std::vector<partial_symbol *>.
2524 * objfiles.c (objfile::objfile): Don't memset those fields.
2525 (objfile::~objfile): Don't free those fields.
2526 * psympriv.h (struct psymbol_allocation_list): Remove
2527 forward-declaration.
2528 (add_psymbol_to_list): Change psymbol_allocation_list parameter
2529 to std::vector.
2530 (start_psymtab_common): Change parameters to std::vector.
2531 * psymtab.c: Include algorithm.
2532 (require_partial_symbols): Call shrink_to_fit.
2533 (find_pc_sect_psymbol): Adjust to vector change.
2534 (match_partial_symbol): Likewise.
2535 (lookup_partial_symbol): Likewise.
2536 (psym_relocate): Likewise.
2537 (dump_psymtab): Likewise.
2538 (recursively_search_psymtabs): Likewise.
2539 (compare_psymbols): Remove.
2540 (sort_pst_symbols): Adjust to vector change.
2541 (start_psymtab_common): Likewise.
2542 (end_psymtab_common): Likewise.
2543 (psymbol_bcache_full): De-constify return value.
2544 (add_psymbol_to_bcache): Likewise.
2545 (extend_psymbol_list): Remove.
2546 (append_psymbol_to_list): Adjust to vector change.
2547 (add_psymbol_to_list): Likewise.
2548 (init_psymbol_list): Likewise.
2549 (maintenance_info_psymtabs): Likewise.
2550 (maintenance_check_psymtabs): Likewise.
2551 * symfile.h (struct psymbol_allocation_list): Remove.
2552 * symfile.c (reread_symbols): Adjust to vector change.
2553 * dbxread.c (start_psymtab): Change type of parameters.
2554 (dbx_symfile_read): Adjust to vector change.
2555 (read_dbx_symtab): Likewise.
2556 (start_psymtab): Change type of parameters.
2557 * dwarf2read.c (dwarf2_build_psymtabs): Adjust to vector change.
2558 (create_partial_symtab): Likewise.
2559 (add_partial_symbol): Likewise.
2560 (write_one_signatured_type): Likewise.
2561 (recursively_write_psymbols): Likewise.
2562 * mdebugread.c (parse_partial_symbols): Likewise.
2563 * xcoffread.c (xcoff_start_psymtab): Change type of parameters.
2564 (scan_xcoff_symtab): Adjust to vector change.
2565 (xcoff_initial_scan): Likewise.
2566
3ec5942f
SM
25672017-10-13 Simon Marchi <simon.marchi@ericsson.com>
2568
2569 * ada-typeprint.c (print_dynamic_range_bound): Use std::string.
2570
2399fe6a
YQ
25712017-10-13 Yao Qi <yao.qi@linaro.org>
2572
2573 * features/Makefile: Remove tic6x-*-expedite, add tic6x-expedite.
2574 Remove s390x-*-expedite, add s390x-expedite.
2575
4bf3f4a8
YQ
25762017-10-13 Yao Qi <yao.qi@linaro.org>
2577
2578 * features/s390-gs-linux64.c: Regenerated.
2579 * features/s390x-gs-linux64.c: Regenerated.
2580
9e86da07
TT
25812017-10-13 Tom Tromey <tom@tromey.com>
2582
2583 * compile/compile-object-run.c (do_module_cleanup): Use delete.
2584 * solib.c (update_solib_list, reload_shared_libraries_1): Use
2585 delete.
2586 * symfile.c (symbol_file_add_with_addrs): Use new.
2587 (symbol_file_add_separate): Update comment.
2588 (syms_from_objfile_1, remove_symbol_file_command): Use delete.
2589 * jit.c (jit_object_close_impl): Use new.
2590 (jit_unregister_code): Use delete.
2591 * objfiles.c (objfile::objfile): Rename from allocate_objfile.
2592 (~objfile): Rename from free_objfile.
2593 (free_objfile_separate_debug, do_free_objfile_cleanup)
2594 (free_all_objfiles, objfile_purge_solibs): Use delete.
2595 * objfiles.h (struct objfile): Add constructor and destructor.
2596 Use DISABLE_COPY_AND_ASSIGN. Add initializers to data members.
2597 (allocate_objfile, free_objfile): Don't declare.
2598 (struct objstats): Add initializers.
2599
c2508e90
SM
26002017-10-12 Simon Marchi <simon.marchi@ericsson.com>
2601
2602 * arch-utils.h (simple_displaced_step_copy_insn): Remove.
2603 * arch-utils.c (simple_displaced_step_copy_insn): Remove.
2604 * gdbarch.sh (displaced_step_copy_insn): Adjust comment.
2605 * gdbarch.h: Regenerate.
2606 * i386-linux-tdep.c (i386_linux_displaced_step_copy_insn):
2607 Adjust comment.
2608 * i386-tdep.c (i386_displaced_step_copy_insn): Adjust comment.
2609 (i386_displaced_step_fixup): Adjust comment.
2610 * rs6000-tdep.c (ppc_displaced_step_copy_insn): Adjust comment.
2611
a900ff72
TT
26122017-10-12 Tom Tromey <tom@tromey.com>
2613
2614 * prologue-value.h (pv_area::store_would_trash): Return bool.
2615 (pv_area::find_reg): Likewise.
2616 * prologue-value.c (pv_area::store_would_trash): Return bool.
2617 (pv_area::find_reg): Likewise.
2618
f7b7ed97
TT
26192017-10-12 Tom Tromey <tom@tromey.com>
2620
2621 * s390-linux-tdep.c (s390_store, s390_load)
2622 (s390_check_for_saved, s390_analyze_prologue): Update.
2623 * rx-tdep.c (check_for_saved, rx_analyze_prologue): Update.
2624 * rl78-tdep.c (rl78_analyze_prologue, check_for_saved): Update.
2625 * prologue-value.h (class pv_area): Move from prologue-value.c.
2626 Change names of members. Add constructor, destructor, member
2627 functions.
2628 (make_pv_area, free_pv_area, make_cleanup_free_pv_area)
2629 (pv_area_store, pv_area_fetch, pv_area_store_would_trash)
2630 (pv_area_fetch, pv_area_scan): Don't declare.
2631 * prologue-value.c (struct pv_area::area_entry): Now member of
2632 pv_area.
2633 (struct pv_area): Move to prologue-value.h.
2634 (pv_area::pv_area): Rename from make_pv_area.
2635 (pv_area::~pv_area): Rename from free_pv_area.
2636 (do_free_pv_area_cleanup, make_cleanup_free_pv_area): Remove.
2637 (clear_entries, find_entry, overlaps, store_would_trash, store)
2638 (fetch, find_reg, scan): Now member of pv_area.
2639 Remove "area" argument. Update.
2640 * msp430-tdep.c (check_for_saved, msp430_analyze_prologue):
2641 Update.
2642 * mn10300-tdep.c (push_reg, check_for_saved)
2643 (mn10300_analyze_prologue): Update.
2644 * mep-tdep.c (is_arg_spill, check_for_saved)
2645 (mep_analyze_prologue): Update.
2646 * m32c-tdep.c (m32c_pv_push, m32c_srcdest_fetch)
2647 (m32c_srcdest_store, m32c_pv_enter, m32c_is_arg_spill)
2648 (m32c_is_struct_return, m32c_analyze_prologue): Update.
2649 * arm-tdep.c (thumb_analyze_prologue, arm_analyze_prologue):
2650 Update.
2651 * arc-tdep.c (arc_is_in_prologue, arc_analyze_prologue): Update.
2652 * aarch64-tdep.c (aarch64_analyze_prologue): Update.
2653
466eecee
SM
26542017-10-12 Simon Marchi <simon.marchi@ericsson.com>
2655
2656 * linux-nat.h (linux_nat_set_delete_thread): New declaration.
2657 * linux-nat.c (linux_nat_delete_thread): New variable.
2658 (lwp_free): Invoke linux_nat_delete_thread if set.
2659 (linux_nat_set_delete_thread): New function.
2660 * aarch64-linux-nat.c (_initialize_aarch64_linux_nat): Assign
2661 thread delete callback.
2662 * arm-linux-nat.c (arm_linux_delete_thread): New function.
2663 (_initialize_arm_linux_nat): Assign thread delete callback.
2664 * s390-linux-nat.c (s390_delete_thread): New function.
2665 (_initialize_s390_nat): Assign thread delete callback.
2666 * x86-linux-nat.c (x86_linux_add_target): Likewise.
2667 * nat/aarch64-linux.c (aarch64_linux_delete_thread): New
2668 function.
2669 * nat/aarch64-linux.h (aarch64_linux_delete_thread): New
2670 declaration.
2671 * nat/x86-linux.c (x86_linux_delete_thread): New function.
2672 * nat/x86-linux.h (x86_linux_delete_thread): New declaration.
2673
f71c8822
TT
26742017-10-09 Tom Tromey <tom@tromey.com>
2675
2676 * tui/tui-win.c (tui_set_win_height, parse_scrolling_args): Use
2677 std::string.
2678 * tui/tui-layout.c (enum tui_status): Use std::string.
2679
981a3fb3
TT
26802017-10-11 Tom Tromey <tom@tromey.com>
2681
2682 * gdbthread.h (thread_command): Constify.
2683 * inferior.h (detach_command): Constify.
2684 * top.h (set_history, show_history): Constify.
2685 * arm-tdep.c (set_arm_command, show_arm_command): Constify.
2686 * serial.c (serial_set_cmd, serial_show_cmd): Constify.
2687 * bsd-kvm.c (bsd_kvm_cmd): Constify.
2688 * printcmd.c (set_command): Constify.
2689 (non_const_set_command): New function.
2690 * dcache.c (set_dcache_command, show_dcache_command): Constify.
2691 * breakpoint.c (enable_command, disable_command, delete_command)
2692 (catch_command, tcatch_command, set_breakpoint_cmd)
2693 (show_breakpoint_cmd): Constify.
2694 * macrocmd.c (macro_command): Constify.
2695 * infcmd.c (unset_command, kill_command, detach_command)
2696 (info_proc_cmd): Constify.
2697 * i386-tdep.c (set_mpx_cmd, show_mpx_cmd): Constify.
2698 * auto-load.c (show_auto_load_cmd, set_auto_load_cmd)
2699 (info_auto_load_cmd): Constify.
2700 * target-descriptions.c (set_tdesc_cmd, show_tdesc_cmd)
2701 (unset_tdesc_cmd): Constify.
2702 * ada-lang.c (set_ada_command, show_ada_command)
2703 (maint_set_ada_cmd, maint_show_ada_cmd): Constify.
2704 * guile/guile.c (set_guile_command, show_guile_command)
2705 (info_guile_command): Constify.
2706 * tui/tui-win.c (tui_command, set_tui_cmd, show_tui_cmd):
2707 Constify.
2708 * skip.c (skip_command): Constify.
2709 * compile/compile.c (_initialize_compile): Constify.
2710 * dwarf2read.c (set_dwarf_cmd, show_dwarf_cmd): Constify.
2711 * btrace.c (maint_btrace_cmd, maint_btrace_set_cmd)
2712 (maint_btrace_show_cmd, maint_btrace_pt_set_cmd)
2713 (maint_btrace_pt_show_cmd): Constify.
2714 * remote.c (set_remote_cmd, show_remote_cmd, remote_command):
2715 Constify.
2716 * python/python.c (user_show_python, user_set_python): Constify.
2717 * mips-tdep.c (set_mips_command, show_mips_command)
2718 (set_mipsfpu_command): Constify.
2719 * record-btrace.c (cmd_record_btrace_start)
2720 (cmd_set_record_btrace, cmd_show_record_btrace)
2721 (cmd_set_record_btrace_bts, cmd_show_record_btrace_bts)
2722 (cmd_set_record_btrace_pt, cmd_show_record_btrace_pt): Constify.
2723 * rs6000-tdep.c (set_powerpc_command, show_powerpc_command):
2724 Constify.
2725 * symfile.c (overlay_command): Constify.
2726 * spu-tdep.c (set_spu_command, show_spu_command): Constify.
2727 * cli/cli-logging.c (set_logging_command, show_logging_command):
2728 Constify.
2729 * cli/cli-dump.c (dump_command, append_command)
2730 (srec_dump_command, ihex_dump_command, verilog_dump_command)
2731 (tekhex_dump_command, binary_dump_command)
2732 (binary_append_command): Constify.
2733 * cli/cli-decode.c (struct cmd_list_element): Change type of
2734 "fun".
2735 * cli/cli-cmds.c (info_command, show_command, set_debug)
2736 (show_debug): Constify.
2737 (show_command): Add non-const overload.
2738 * top.c (set_history, show_history): Constify.
2739 * sh-tdep.c (set_sh_command, show_sh_command): Constify.
2740 * command.h (add_prefix_cmd): Accept a cmd_const_cfunc_ftype.
2741 * target.c (target_command): Constify.
2742 * sparc64-tdep.c (info_adi_command): Constify.
2743 * record-full.c (cmd_record_full_start): Constify.
2744 (set_record_full_command): Constify. Fix typo.
2745 (show_record_full_command): Constify.
2746 * thread.c (thread_command, thread_apply_command): Constify.
2747 * memattr.c (dummy_cmd): Constify.
2748 * value.c (function_command): Constify.
2749 * frame.c (set_backtrace_cmd, show_backtrace_cmd): Constify.
2750 * probe.c (info_probes_command): Constify.
2751 * ser-tcp.c (set_tcp_cmd, show_tcp_cmd): Constify.
2752 * gnu-nat.c (set_task_cmd, show_task_cmd, set_thread_cmd)
2753 (show_thread_cmd, set_thread_default_cmd)
2754 (show_thread_default_cmd): Constify.
2755 (check_empty): Constify.
2756 * tracepoint.c (tfind_command): Constify.
2757 * cp-support.c (maint_cplus_command): Constify.
2758 * windows-tdep.c (info_w32_command): Constify.
2759 * record.c (cmd_record_start, set_record_command)
2760 (show_record_command, info_record_command, cmd_record_goto):
2761 Constify.
2762 * ravenscar-thread.c (set_ravenscar_command)
2763 (show_ravenscar_command): Constify.
2764 * utils.c (set_internal_problem_cmd, show_internal_problem_cmd):
2765 Constify.
2766 (add_internal_problem_command): Remove casts.
2767 * arc-tdep.c (maintenance_print_arc_command): Constify.
2768 * valprint.c (set_print, show_print, set_print_raw)
2769 (show_print_raw): Constify.
2770 * maint.c (maintenance_command, maintenance_info_command)
2771 (maintenance_print_command, maintenance_set_cmd)
2772 (maintenance_show_cmd, set_per_command_cmd)
2773 (show_per_command_cmd, maintenance_check_command): Constify.
2774 * language.c (set_check, show_check): Constify.
2775 * typeprint.c (show_print_type, set_print_type): Constify.
2776 * go32-nat.c (go32_info_dos_command): Constify.
2777
fdf44873
TT
27782017-10-11 Tom Tromey <tom@tromey.com>
2779
2780 * breakpoint.c (prepare_re_set_context): Remove.
2781 (breakpoint_re_set_one): Update. Don't use cleanups.
2782 (breakpoint_re_set): Use scoped_restore, std::string, and
2783 scoped_restore_current_language.
2784
81b1e71c
TT
27852017-10-11 Tom Tromey <tom@tromey.com>
2786
2787 * breakpoint.c (commands_command_1): Use std::string.
2788 (cleanup_executing_breakpoints): Remove.
2789 (bpstat_do_actions_1): Use scoped_restore.
2790 (bpstat_check_watchpoint): Use std::string.
2791 (decode_static_tracepoint_spec): Likewise.
2792 (break_range_command): Likewise.
2793 (watch_command_1): Likewise.
2794 (compare_breakpoints): Change argument types.
2795 (clear_command): Use std::vector.
2796 (cleanup_executing_breakpoints): Remove.
2797 (update_global_location_list): Use unique_xmalloc_ptr.
2798 (strace_command): Remove unused declaration.
2799
4f9d9906
JB
28002017-10-11 John Baldwin <jhb@FreeBSD.org>
2801
2802 * Makefile.in (ALLDEPFILES): Add arm-fbsd-nat.c.
2803 * NEWS: Mention new FreeBSD/arm native configuration.
2804 * configure.host: Add arm*-*-freebsd*.
2805 * configure.nat: Likewise.
2806 * arm-fbsd-nat.c: New file.
2807
7176dfd2
JB
28082017-10-11 John Baldwin <jhb@FreeBSD.org>
2809
2810 * Makefile.in (ALL_TARGET_OBS): Add arm-fbsd-tdep.o.
2811 (ALLDEPFILES): Add arm-fbsd-tdep.c.
2812 * NEWS: Mention new FreeBSD/arm target.
2813 * configure.tgt: Add arm*-*-freebsd*.
2814 * arm-fbsd-tdep.c: New file.
2815 * arm-fbsd-tdep.h: New file.
2816
fe220226
MR
28172017-10-11 Maciej W. Rozycki <macro@imgtec.com>
2818
2819 * linux-tdep.c (linux_make_corefile_notes): Remove call to
2820 `gdbarch_elfcore_write_linux_prpsinfo'.
2821 * gdbarch.sh (elfcore_write_linux_prpsinfo): Remove architecture
2822 method.
2823 (elf_internal_linux_prpsinfo): Remove declaration.
2824 * gdbarch.h: Regenerate.
2825 * gdbarch.c: Regenerate.
2826
a2f63b2e
MR
28272017-10-11 Maciej W. Rozycki <macro@imgtec.com>
2828
2829 * ppc-linux-tdep.c (ppc_linux_init_abi): Remove call to
2830 `set_gdbarch_elfcore_write_linux_prpsinfo'.
2831
458ca1d0
PA
28322017-10-11 Pedro Alves <palves@redhat.com>
2833
2834 * breakpoint.c (reattach_breakpoints): Delete.
2835 * breakpoint.h (reattach_breakpoints): Delete.
2836
905014d7
SM
28372017-10-11 Simon Marchi <simon.marchi@ericsson.com>
2838
2839 * symfile.c (registered_sym_fns): Make struct, not typedef.
2840 (DEF_VEC_O (registered_sym_fns)): Remove.
2841 (symtab_fns): Change type to std::vector.
2842 (add_symtab_fns): Adjust.
2843 (find_sym_fns): Adjust.
2844
56d704da
AK
28452017-10-11 Anton Kolesov <Anton.Kolesov@synopsys.com>
2846
2847 * arc-tdep.c (arc_gdbarch_init): Pass proper cpu value to disassembler.
2848 * arc-tdep.h (arc_arch_is_em): New function.
2849 (arc_arch_is_hs): Likewise.
2850
7fa29be9
EB
28512017-10-11 Egeyar Bagcioglu <egeyar.bagcioglu@oracle.com>
2852
2853 * macrotab.h (macro_lookup_inclusion): Remove unnecessary
2854 parentheses in the declaration.
2855 (macro_lookup_inclusion): Likewise.
2856 (macro_lookup_definition): Likewise.
2857 * p-lang.h (pascal_builtin_types): Likewise.
2858 * tui/tui-data.c (tui_win_list): Likewise.
2859 * tui/tui-data.h (tui_win_list): Likewise.
2860 * utils.h (make_cleanup_free_section_addr_info): Likewise.
2861
d9b477e3
KB
28622017-10-11 Mark Rages <markrages@gmail.com>
2863
2864 * target-memory.c (block_boundaries): Fix for block address not
2865 aligned on block size.
2866
65630365
PA
28672017-10-10 Pedro Alves <palves@redhat.com>
2868 Tom Tromey <tom@tromey.com>
2869
2870 * breakpoint.c (struct captured_breakpoint_query_args)
2871 (do_captured_breakpoint_query, gdb_breakpoint_query): Delete.
2872 (print_breakpoint): New.
2873 * breakpoint.h (print_breakpoint): Declare.
2874 * common/common-exceptions.h (enum return_reason): Remove
2875 references to catch_exceptions.
2876 * exceptions.c (catch_exceptions, catch_exceptions_with_msg):
2877 Delete.
2878 * exceptions.h (catch_exceptions_ftype, catch_exceptions)
2879 (catch_exception_ftype, catch_exceptions_with_msg): Delete.
2880 * gdb.h: Delete.
2881 * gdbthread.h (thread_select): Declare.
2882 * mi/mi-cmd-break.c: Don't include gdb.h.
2883 (breakpoint_notify): Use print_breakpoint.
2884 * mi/mi-cmd-catch.c: Don't include gdb.h.
2885 * mi/mi-interp.c: Don't include gdb.h.
2886 (mi_print_breakpoint_for_event): New.
2887 (mi_breakpoint_created, mi_breakpoint_modified): Use
2888 mi_print_breakpoint_for_event.
2889 * mi/mi-main.c: Don't include gdb.h.
2890 (mi_cmd_thread_select): Parse the global thread ID here. Use
2891 thread_select instead of gdb_thread_select.
2892 (mi_cmd_thread_list_ids): Output "thread-ids" tuple here instead
2893 of using gdb_list_thread_ids.
2894 * remote-fileio.c (do_remote_fileio_request): Change type. Reply
2895 FILEIO_ENOSYS here.
2896 (remote_fileio_request): Use TRY/CATCH instead of
2897 catch_exceptions.
2898 * symfile-mem.c (struct symbol_file_add_from_memory_args)
2899 (symbol_file_add_from_memory_wrapper): Delete.
2900 (add_vsyscall_page): Use TRY/CATCH instead of catch_exceptions.
2901 * thread.c: Don't include gdb.h.
2902 (do_captured_list_thread_ids, gdb_list_thread_ids): Delete.
2903 (thread_alive): Use thread_select.
2904 (do_captured_thread_select): Delete, parts salvaged as ...
2905 (thread_select): ... this new function.
2906 (gdb_thread_select): Delete.
2907
bf469271
PA
29082017-10-10 Pedro Alves <palves@redhat.com>
2909 Tom Tromey <tom@tromey.com>
2910
2911 * breakpoint.c (breakpoint_cond_eval): Change return type to bool
2912 and reverse logic.
2913 (WP_DELETED, WP_VALUE_CHANGED, WP_VALUE_NOT_CHANGED, WP_IGNORE):
2914 No longer macros. Instead ...
2915 (enum wp_check_result): They're now values of this new
2916 enumeration.
2917 (watchpoint_check): Change return type to wp_check_result and
2918 parameter type to bpstat.
2919 (bpstat_check_watchpoint): Use TRY/CATCH instead of catch_errors.
2920 (bpstat_check_breakpoint_conditions): Use TRY/CATCH instead of
2921 catch_errors. Reverse logic of watchpoint_check call.
2922 (breakpoint_re_set_one): Now returns void and takes a breakpoint
2923 pointer as parameter.
2924 (breakpoint_re_set): Use TRY/CATCH instead of catch_errors.
2925 * common/common-exceptions.c (throw_exception_sjlj): Update
2926 comments to avoid mentioning catch_errors.
2927 * exceptions.c (catch_errors): Delete.
2928 * exceptions.h: Update comments to avoid mentioning catch_errors.
2929 (catch_errors_ftype, catch_errors): Delete.
2930 * infrun.c (normal_stop): Use TRY/CATCH instead of catch_errors.
2931 (hook_stop_stub): Delete.
2932 (restore_selected_frame): Change return type to void, and
2933 parameter type to const frame_id &.
2934 (restore_infcall_control_state): Use TRY/CATCH instead of
2935 catch_errors.
2936 * main.c (captured_command_loop): Return void and remove
2937 parameter. Remove references to catch_errors.
2938 (captured_main): Use TRY/CATCH instead of catch_errors.
2939 * objc-lang.c (objc_submethod_helper_data)
2940 (find_objc_msgcall_submethod_helper): Delete.
2941 (find_objc_msgcall_submethod): Use TRY/CATCH instead of
2942 catch_errors.
2943 * record-full.c (record_full_message): Return void.
2944 (record_full_message_args, record_full_message_wrapper): Delete.
2945 (record_full_message_wrapper_safe): Return bool and use TRY/CATCH
2946 instead of catch_errors.
2947 * solib-aix.c (solib_aix_open_symbol_file_object): Change
2948 parameter type to int.
2949 * solib-darwin.c (open_symbol_file_object): Ditto.
2950 * solib-dsbt.c (open_symbol_file_object): Ditto.
2951 * solib-frv.c (open_symbol_file_object): Ditto.
2952 * solib-svr4.c (open_symbol_file_object): Ditto.
2953 * solib-target.c (solib_target_open_symbol_file_object): Ditto.
2954 * solib.c (update_solib_list): Use TRY/CATCH instead of
2955 catch_errors.
2956 * solist.h (struct target_so_ops) <open_symbol_file_object>:
2957 Change type.
2958 * symmisc.c (struct print_symbol_args): Remove.
2959 (dump_symtab_1): Use TRY/CATCH instead of catch_errors.
2960 (print_symbol): Change type.
2961 * windows-nat.c (handle_load_dll, handle_unload_dll): Return void
2962 and remove parameters.
2963 (catch_errors): New.
2964 (get_windows_debug_event): Adjust.
2965
1a56bfa5
TT
29662017-10-09 Tom Tromey <tom@tromey.com>
2967
2968 * mi/mi-main.c (free_splay_tree): Remove.
2969 (list_available_thread_groups): Use splay_tree_up.
2970 * common/gdb_splay_tree.h: New file.
2971
0c478e2d
TT
29722017-10-09 Tom Tromey <tom@tromey.com>
2973
2974 * mi/mi-main.c (do_nothing): Remove.
2975 (list_available_thread_groups): Update.
2976
cbd2b4e3
PA
29772017-10-09 Pedro Alves <palves@redhat.com>
2978
2979 * infrun.c (handle_inferior_event_1) <TARGET_WAITKIND_EXECD>: Skip
2980 reading registers when switching context.
2981
a181c0bf
JB
29822017-10-09 John Baldwin <jhb@FreeBSD.org>
2983
2984 * fbsd-nat.c (fbsd_siginfo_size): Use gdbarch_long_bit.
2985 (fbsd_convert_siginfo): Likewise.
2986 * fbsd-tdep.c (fbsd_core_xfer_siginfo): Likewise.
2987
6e66f753
SM
29882017-10-09 Simon Marchi <simon.marchi@polymtl.ca>
2989
2990 * configure.ac (try_guile_versions): Remove guile-2.2.
2991 * configure: Regenerate.
2992
890e9790
TT
29932017-10-09 Tom Tromey <tom@tromey.com>
2994
2995 * Makefile.in (COMPILE.post, POSTCOMPILE): Restore $(basename).
2996 (COMPILE.pre): Use $(CXX).
2997
109483d9
PA
29982017-10-09 Pedro Alves <palves@redhat.com>
2999
3000 * cp-support.c (cp_remove_params): Return a gdb::unique_xmalloc_ptr.
3001 Use bool.
3002 (overload_list_add_symbol): Adjust to use gdb::unique_xmalloc_ptr.
3003 * cp-support.h (cp_remove_params): Now returns a
3004 gdb::unique_xmalloc_ptr.
3005 * dwarf2read.c (find_slot_in_mapped_hash): Now returns bool.
3006 Adjust to cp_remove_params returning a gdb::unique_xmalloc_ptr.
3007 * psymtab.c (psymtab_search_name): Adjust to cp_remove_params
3008 returning a gdb::unique_xmalloc_ptr.
3009 (lookup_partial_symbol): Adjust to use gdb::unique_xmalloc_ptr.
3010 * stack.c (find_frame_funname): Adjust to cp_remove_params
3011 returning a gdb::unique_xmalloc_ptr.
3012
791afaa2
TT
30132017-10-08 Tom Tromey <tom@tromey.com>
3014
3015 * dwarf2read.c (dwarf2_get_dwz_file): Use
3016 gdb::unique_xmalloc_ptr.
3017 (find_slot_in_mapped_hash): Likewise.
3018 (dwarf2_physname): Likewise.
3019 (create_dwo_unit_in_dwp_v1): Use std::string.
3020 (create_dwo_unit_in_dwp_v2): Likewise.
3021 (lookup_dwo_cutu): Likewise.
3022 (inherit_abstract_dies): Use std::vector.
3023 (read_array_type): Likewise.
3024 (dwarf_decode_macros): Remove unused declaration.
3025 (unsigned_int_compar): Remove.
3026 (dwarf2_build_psymtabs_hard): Use scoped_restore.
3027 (psymtabs_addrmap_cleanup): Remove.
3028
30a9c02f
TT
30292017-10-08 Tom Tromey <tom@tromey.com>
3030
3031 * frame-unwind.c (frame_unwind_try_unwinder): Update.
3032 * frame.h (frame_cleanup_after_sniffer): Declare.
3033 (frame_prepare_for_sniffer): Return void.
3034 * frame.c (frame_cleanup_after_sniffer): No longer static. Change
3035 type of argument.
3036 (frame_prepare_for_sniffer): Return void.
3037
757325a3
TT
30382017-10-08 Tom Tromey <tom@tromey.com>
3039
3040 * utils.h (make_cleanup_value_free): Remove.
3041 * utils.c (do_value_free, struct cleanup): Remove.
3042 * dwarf2loc.c (dwarf2_evaluate_loc_desc_full) <DWARF_VALUE_STACK>:
3043 Use gdb_value_up.
3044 * value.h (struct value_deleter): New.
3045 (gdb_value_up): New typedef.
3046
b9c04fb2
TT
30472017-10-08 Tom Tromey <tom@tromey.com>
3048
3049 * symtab.c (free_search_symbols, do_free_search_symbols_cleanup)
3050 (make_cleanup_free_search_symbols): Remove.
3051 (search_symbols): Return std::vector.
3052 (symbol_search::compare_search_syms): Now member of
3053 symbol_search. Change arguments.
3054 (sort_search_symbols_remove_dups): Change arguments. Rewrite.
3055 (symtab_symbol_info, rbreak_command): Update.
3056 * symtab.h (struct symbol_search) <next>: Remove.
3057 Add constructors.
3058 (symbol_search::operator<): New function.
3059 (symbol_search::operator==): New function.
3060 (search_symbols): Remove std::vector.
3061 (free_search_symbols, make_cleanup_free_search_symbols): Remove.
3062 (symbol_search::compare_search_syms): Declare.
3063
0d28b0a5
YQ
30642017-10-06 Yao Qi <yao.qi@linaro.org>
3065
3066 * Makefile.in (ALL_64_TARGET_OBS): Replace aarch64-insn.o with
3067 arch/aarch64-insn.o.
3068 Remove one rule.
3069 * configure.tgt: Replace aarch64-insn.o with arch/aarch64-insn.o.
3070
71917808
YQ
30712017-10-06 Yao Qi <yao.qi@linaro.org>
3072
3073 * Makefile.in (ALL_TARGET_OBS): Replace arm.o, arm-get-next-pcs.o,
3074 and arm-linux.o with arch/arm.o, arch/arm-get-next-pcs.o and
3075 arch/arm-linux.o respectively.
3076 * configure.tgt: Likewise.
3077
2081b2b2
YQ
30782017-10-06 Yao Qi <yao.qi@linaro.org>
3079
3080 * Makefile.in (ALL_TARGET_OBS): Rename i386.o to arch/i386.o.
3081 * configure.tgt (i386_tobjs): Replace i386.o with arch/i386.o.
3082
a1b85d28
PA
30832017-10-06 Pedro Alves <palves@redhat.com>
3084
3085 * windows-nat.c: Include <algorithm>.
3086
d97987e2
YQ
30872017-10-06 Yao Qi <yao.qi@linaro.org>
3088
3089 * configure.tgt (i386_tobjs): New variable.
3090 (amd64_tobjs): New variable.
3091 Set $cpu_obs and $os_obs.
3092
f38307f5
YQ
30932017-10-06 Yao Qi <yao.qi@linaro.org>
3094
3095 * Makefile.in (CONFIG_SRC_SUBDIR): New.
3096 (ALL_64_TARGET_OBS): Replace amd64.o with arch/amd64.o.
3097 (clean): Remove object files and dependency files.
3098 (distclean): Remove the directory.
3099 * configure.ac: Invoke AC_CONFIG_COMMANDS.
3100 * configure: Re-generated.
3101 * configure.tgt: Replace amd64.o with arch/amd64.o.
3102
2f924de6
JM
31032017-10-05 Jose E. Marchesi <jose.marchesi@oracle.com>
3104
3105 PR build/22188
3106 * arm-tdep.c (arm_decode_misc_memhint_neon): Fix decoding of CPS
3107 and SETEND.
3108
2fd9d7ca
PA
31092017-10-05 Pedro Alves <palves@redhat.com>
3110
3111 * linux-nat.c (linux_child_follow_fork): When following the parent
3112 and detaching the child, consult the parent thread's architecture
3113 instead of the child's.
3114
d13b8493
UW
31152017-10-05 Ulrich Weigand <uweigand@de.ibm.com>
3116
3117 * ax.h: Do not include "doublest.h".
3118 (union agent_val): Remove.
3119
3b4b2f16
UW
31202017-10-05 Ulrich Weigand <uweigand@de.ibm.com>
3121
3122 * dfp.h (MAX_DECIMAL_STRING): Move to dfp.c.
3123 (decimal_to_string): Return std::string object.
3124 (decimal_from_string): Accept std::string object. Return bool.
3125 (decimal_from_integral, decimal_from_doublest): Remove.
3126 (decimal_from_longest): Add prototype.
3127 (decimal_from_ulongest): Likewise.
3128 (decimal_to_longest): Likewise.
3129 (decimal_from_doublest): Likewise.
3130 * dfp.c: Do not include "gdbtypes.h" or "value.h".
3131 (MAX_DECIMAL_STRING): Move here.
3132 (decimal_to_string): Return std::string object.
3133 (decimal_from_string): Accept std::string object. Return bool.
3134 (decimal_from_integral): Remove, replace by ...
3135 (decimal_from_longest, decimal_from_ulongest): ... these new functions.
3136 (decimal_to_longest): New function.
3137 (decimal_from_floating): Remove, replace by ...
3138 (decimal_from_doublest): ... this new function.
3139 (decimal_to_doublest): Update to new decimal_to_string interface.
3140
3141 * value.c (unpack_long): Use decimal_to_longest.
3142 * valops.c (value_cast): Use decimal_from_doublest instead of
3143 decimal_from_floating. Use decimal_from_[u]longest isntead of
3144 decimal_from_integral.
3145 * valarith.c (value_args_as_decimal): Likewise.
3146 * valprint.c (print_decimal_floating): Update to new
3147 decimal_to_string interface.
3148 * printcmd.c (printf_decfloat): Likewise.
3149 * c-exp.y (parse_number): Update to new decimal_from_string interface.
3150
1841ee5d
UW
31512017-10-05 Ulrich Weigand <uweigand@de.ibm.com>
3152
3153 * doublest.h: Do not include "floatformat.h". Remove stale comments.
3154 * gdbtypes.c: Include "floatformat.h".
3155 * value.c: Likewise.
3156 * m68k-tdep.c: Likewise.
3157
3158 * findvar.c: Do not include "floatformat.h".
3159 * amd64-darwin-tdep.c: Likewise.
3160 * arm-linux-tdep.c: Likewise.
3161 * i386-darwin-tdep.c: Likewise.
3162 * i387-tdep.c: Likewise.
3163 * m68k-linux-tdep.c: Likewise.
3164 * mep-tdep.c: Likewise.
3165 * mips-tdep.c: Likewise.
3166 * nios2-tdep.c: Likewise.
3167 * s390-linux-tdep.c: Likewise.
3168 * sparc-obsd-tdep.c: Likewise.
3169 * sparc-tdep.c: Likewise.
3170 * sparc64-tdep.c: Likewise.
3171 * spu-tdep.c: Likewise.
3172 * tic6x-tdep.c: Likewise.
3173 * tilegx-tdep.c: Likewise.
3174 * vax-tdep.c: Likewise.
3175 * xstormy16-tdep.c: Likewise.
3176 * xtensa-tdep.c: Likewise.
3177
3178 * top.c: Do not include "doublest.h".
3179 * aarch64-tdep.c: Likewise.
3180 * alpha-tdep.c: Likewise.
3181 * arm-linux-tdep.c: Likewise.
3182 * m68k-linux-tdep.c: Likewise.
3183 * tilegx-tdep.c: Likewise.
3184 * xstormy16-tdep.c: Likewise.
3185
a80a6471
JB
31862017-10-05 John Baldwin <jhb@FreeBSD.org>
3187
3188 * mips-fbsd-tdep.c (MIPS_INST_ADDIU_A0_SP_N32): Define.
3189 (mipsn32_fbsd_sigframe): Define.
3190 (mips_fbsd_init_abi): Install mipsn32_fbsd_sigframe unwinder
3191 for FreeBSD/mipsn32.
3192
12c4bd7f
JB
31932017-10-05 John Baldwin <jhb@FreeBSD.org>
3194
3195 * fbsd-tdep.c (fbsd_print_auxv_entry): Handle AT_EHDRFLAGS and
3196 AT_HWCAP.
3197
c91933e9
TG
31982017-10-05 Tristan Gingold <tgingold@free.fr>
3199
3200 * MAINTAINERS (Misc): Update my email address.
3201
5cd63fda
PA
32022017-10-04 Pedro Alves <palves@redhat.com>
3203
3204 * remote.c (get_remote_arch_state): New 'gdbarch' parameter. Use
3205 it instead of target_gdbarch.
3206 (get_remote_state, get_remote_packet_size): Adjust
3207 get_remote_arch_state calls, passing down target_gdbarch
3208 explicitly.
3209 (packet_reg_from_regnum, packet_reg_from_pnum): New parameter
3210 'gdbarch' and use it instead of target_gdbarch.
3211 (get_memory_packet_size): Adjust get_remote_arch_state calls,
3212 passing down target_gdbarch explicitly.
3213 (struct stop_reply) <arch>: New field.
3214 (remote_parse_stop_reply): Use the stopped thread's architecture,
3215 not the current inferior's. Save the architecture in the
3216 stop_reply.
3217 (process_stop_reply): Use the stop reply's architecture.
3218 (process_g_packet, remote_fetch_registers)
3219 (remote_prepare_to_store, store_registers_using_G)
3220 (remote_store_registers): Adjust get_remote_arch_state calls,
3221 using the regcache's architecture.
3222 (remote_get_trace_status): Adjust get_remote_arch_state calls,
3223 passing down target_gdbarch explicitly.
3224 * spu-multiarch.c (spu_thread_architecture): Defer to the target
3225 beneath instead of calling target_gdbarch.
3226 * target.c (default_thread_architecture): Use the specified
3227 inferior's architecture, instead of the current inferior's
3228 architecture (via target_gdbarch).
3229
ed4227b7
PA
32302017-10-04 Pedro Alves <palves@redhat.com>
3231
3232 * regcache.c (get_thread_arch_regcache): Remove null_ptid special
3233 case.
3234 (regcache_print): Handle !target_has_registers here instead.
3235
55b11ddf
PA
32362017-10-04 Pedro Alves <palves@redhat.com>
3237
3238 * frame.c (create_test_frame): Delete.
3239 * frame.h (create_test_frame): Delete.
3240 * gdbarch-selftests.c: Include gdbthread.h and target.h.
3241 (class regcache_test): Delete.
3242 (test_target_has_registers, test_target_has_stack)
3243 (test_target_has_memory, test_target_prepare_to_store)
3244 (test_target_store_registers): New functions.
3245 (test_target_ops): New class.
3246 (register_to_value_test): Error out if there's already a
3247 process_stratum (or higher) target pushed. Create a fuller mock
3248 environment, with mock target_ops, inferior, address space, thread
3249 and inferior_ptid.
3250 * progspace.c (struct address_space): Move to ...
3251 * progspace.h (struct address_space): ... here.
3252 * regcache.h (regcache::~regcache, regcache::raw_write)
3253 [GDB_SELF_TEST]: No longer virtual.
3254
4c71c105
SM
32552017-10-04 Simon Marchi <simon.marchi@ericsson.com>
3256
3257 * mi/mi-main.c (list_available_thread_groups): Reverse filter logic.
3258
73dcd72d
PA
32592017-10-04 Pedro Alves <palves@redhat.com>
3260
3261 * guile/scm-breakpoint.c (gdbscm_breakpoint_commands): Move code
3262 out of 'between TRY and CATCH'.
3263
44704526
PA
32642017-10-04 Pedro Alves <palves@redhat.com>
3265
3266 * cli/cli-cmds.c (complete_command): Add missing END_CATCH.
3267 * common/common-exceptions.h (TRY): Open an outermost scope.
3268 Expand intro comment.
3269 (CATCH): Reindent.
3270 (END_CATCH): Close the outermost scope.
3271 * completer.c (complete_line_internal): Add missing END_CATCH.
3272
bc3b087d
SDJ
32732017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
3274
3275 * NEWS (Changes since GDB 8.0): Add entry about new
3276 'set-cwd-on-gdbserver' feature.
3277 (New remote packets): Add entry for QSetWorkingDir.
3278 * common/common-inferior.h (set_inferior_cwd): New prototype.
3279 * infcmd.c (set_inferior_cwd): Remove "static".
3280 (show_cwd_command): Expand text to include remote debugging.
3281 * remote.c: Add PACKET_QSetWorkingDir.
3282 (remote_protocol_features) <QSetWorkingDir>: New entry for
3283 PACKET_QSetWorkingDir.
3284 (extended_remote_set_inferior_cwd): New function.
3285 (extended_remote_create_inferior): Call
3286 "extended_remote_set_inferior_cwd".
3287 (_initialize_remote): Call "add_packet_config_cmd" for
3288 QSetWorkingDir.
3289
d092c5a2
SDJ
32902017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
3291
3292 * NEWS (New commands): Mention "set/show cwd".
3293 * cli/cli-cmds.c (_initialize_cli_cmds): Mention "set cwd" on
3294 "cd" command's help text.
3295 * common/common-inferior.h (get_inferior_cwd): New prototype.
3296 * infcmd.c (inferior_cwd_scratch): New global variable.
3297 (set_inferior_cwd): New function.
3298 (get_inferior_cwd): Likewise.
3299 (set_cwd_command): Likewise.
3300 (show_cwd_command): Likewise.
3301 (_initialize_infcmd): Add "set/show cwd" commands.
3302 * inferior.h (class inferior) <cwd>: New field.
3303 * nat/fork-inferior.c: Include "gdb_tilde_expand.h".
3304 (fork_inferior): Change inferior's cwd before its execution.
3305 * windows-nat.c (windows_create_inferior): Pass inferior's cwd
3306 to CreateProcess.
3307
7da0a886
SDJ
33082017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
3309
3310 * Makefile.in (SFILES): Add gdb_tilde_expand.c.
3311 (HFILES_NO_SRCDIR): Add gdb_tilde_expand.h.
3312 (COMMON_OBS): Add gdb_tilde_expand.o.
3313 * common/gdb_tilde_expand.c: New file.
3314 * common/gdb_tilde_expand.h: Likewise.
3315
db8dd160
MR
33162017-10-03 Maciej W. Rozycki <macro@imgtec.com>
3317
3318 * gdbarch.sh (objfile): Remove duplicate declaration.
3319 * gdbarch.h: Regenerate.
3320
f8bfbf22
TT
33212017-10-03 Tom Tromey <tom@tromey.com>
3322
3323 * utils.c (internal_vproblem): Use string_vprintf.
3324
5178ed48
TT
33252017-10-03 Tom Tromey <tom@tromey.com>
3326
3327 * printcmd.c (info_symbol_command): Use std::string.
3328
8cff8730
TT
33292017-10-03 Tom Tromey <tom@tromey.com>
3330
3331 * top.c (gdb_safe_append_history): Use std::string.
3332
895b8f30
TT
33332017-10-03 Tom Tromey <tom@tromey.com>
3334
3335 * event-top.c (stdin_event_handler): Update.
3336 * main.c (captured_main_1): Update.
3337 * top.h (make_delete_ui_cleanup): Remove.
3338 (struct ui): Add constructor and destructor.
3339 (new_ui, delete_ui): Remove.
3340 * top.c (make_delete_ui_cleanup): Remove.
3341 (new_ui_command): Use std::unique_ptr.
3342 (delete_ui_cleanup): Remove.
3343 (ui::ui): Rename from new_ui. Update.
3344 (free_ui): Remove.
3345 (ui::~ui): Rename from delete_ui. Update.
3346
0efef640
TT
33472017-10-03 Tom Tromey <tom@tromey.com>
3348
3349 * symfile.c (load_progress): Use gdb::byte_vector.
3350
245ad7d3
TT
33512017-10-03 Tom Tromey <tom@tromey.com>
3352
3353 * mi/mi-main.c (mi_cmd_trace_frame_collected): Remove unused
3354 declaration.
3355 * printcmd.c (x_command): Remove unused declaration.
3356 * symfile.c (symbol_file_command): Remove unused declaration.
3357
e05550d7
TT
33582017-10-03 Tom Tromey <tom@tromey.com>
3359
3360 * utils.c (internal_vproblem): Use std::string.
3361 (defaulted_query): Likewise.
3362
b95de2b7
TT
33632017-10-03 Tom Tromey <tom@tromey.com>
3364
3365 * guile/scm-ports.c (ioscm_with_output_to_port_worker): Update.
3366 * top.c (execute_command_to_string): Update.
3367 * utils.c (make_cleanup_restore_page_info): Remove.
3368 (do_restore_page_info_cleanup): Remove.
3369 (set_batch_flag_and_restore_page_info):
3370 New.
3371 (make_cleanup_restore_page_info): Remove.
3372 (set_batch_flag_and_make_cleanup_restore_page_info): Remove.
3373 (~set_batch_flag_and_restore_page_info): New
3374 (make_cleanup_restore_uinteger): Remove.
3375 (make_cleanup_restore_integer): Remove.
3376 (struct restore_integer_closure): Remove.
3377 (restore_integer): Remove.
3378 * utils.h (struct set_batch_flag_and_restore_page_info): New
3379 class.
3380 (set_batch_flag_and_make_cleanup_restore_page_info): Remove.
3381 (make_cleanup_restore_page_info): Remove.
3382 (make_cleanup_restore_uinteger) Remove.
3383 (make_cleanup_restore_integer) Remove.
3384
07036511
TT
33852017-10-03 Tom Tromey <tom@tromey.com>
3386
3387 * record-full.h (record_full_gdb_operation_disable_set): Return
3388 scoped_restore_tmpl<int>.
3389 * infrun.c (adjust_pc_after_break): Update.
3390 (handle_signal_stop): Update.
3391 * record-full.c (record_full_gdb_operation_disable_set): Return
3392 scoped_restore_tmpl<int>.
3393 (record_full_wait_1, record_full_insert_breakpoint)
3394 (record_full_remove_breakpoint, record_full_save)
3395 (record_full_goto_insn): Update.
3396
45320ffa
TT
33972017-10-02 Tom Tromey <tom@tromey.com>
3398
3399 PR rust/22236:
3400 * rust-lang.c (rust_val_print_str): New function.
3401 (val_print_struct): Call it.
3402 (rust_subscript): Preserve name of slice type.
3403
b3e3859b
TT
34042017-10-02 Tom Tromey <tom@tromey.com>
3405
3406 * rust-lang.c (rust_subscript): Handle slices in
3407 EVAL_AVOID_SIDE_EFFECTS case.
3408
01af5e0d
TT
34092017-10-02 Tom Tromey <tom@tromey.com>
3410
3411 * rust-lang.c (rust_slice_type_p): Recognize &str as a slice type.
3412
888e3ddb
TT
34132017-10-02 Tom Tromey <tom@tromey.com>
3414
3415 * rust-lang.h (rust_slice_type): Add "extern".
3416
cc536b21
PA
34172017-10-02 Tom Tromey <tom@tromey.com>
3418 Pedro Alves <palves@redhat.com>
3419
3420 * ada-lang.h (ada_exc_info::operator<): Make const.
3421 (ada_exc_info::operator==): Make const.
3422 * ada-lang.c (ada_exc_info::operator<, ada_exc_info::operator==):
3423 Make const.
3424
386c8614
TT
34252017-09-29 Tom Tromey <tom@tromey.com>
3426
3427 * target.c (read_whatever_is_readable): Change type of "result".
3428 Update.
3429 (free_memory_read_result_vector): Remove.
3430 (read_memory_robust): Change return type. Update.
3431 * mi/mi-main.c (mi_cmd_data_read_memory_bytes): Update. Use
3432 bin2hex, std::string.
3433 * target.h (memory_read_result_s): Remove typedef.
3434 (free_memory_read_result_vector): Remove.
3435 (read_memory_robust): Return std::vector.
3436
789c4b5e
TT
34372017-09-29 Tom Tromey <tom@tromey.com>
3438
3439 * mi/mi-main.c (captured_mi_execute_command): Use scope_restore.
3440
ab816a27
TT
34412017-09-29 Tom Tromey <tom@tromey.com>
3442
3443 * mi/mi-cmd-info.c (mi_cmd_info_ada_exceptions): Update.
3444 * ada-lang.h (struct ada_exc_info): Remove typedef. Declare
3445 operator< and operator==.
3446 (ada_exceptions_list): Return a std::vector.
3447 * ada-lang.c (ada_exc_info::operator<): Rename from
3448 compare_ada_exception_info.
3449 (ada_exc_info::operator==): New.
3450 (sort_remove_dups_ada_exceptions_list): Change type of
3451 "exceptions".
3452 (ada_add_standard_exceptions, ada_add_exceptions_from_frame)
3453 (ada_add_global_exceptions): Likewise.
3454 (ada_exceptions_list_1): Return a std::vector.
3455 (ada_exceptions_list): Likewise.
3456
52f9abe4
TT
34572017-09-29 Tom Tromey <tom@tromey.com>
3458
3459 * mi/mi-main.c (struct print_one_inferior_data) <inferiors>: Now a
3460 'std::set *'.
3461 (print_one_inferior): Update.
3462 (free_vector_of_ints): Remove.
3463 (list_available_thread_groups): Change "ids" to std::set.
3464 (mi_cmd_list_thread_groups): Update.
3465 (struct collect_cores_data) <core>: Now a std::set.
3466 (collect_cores): Update.
3467 (unique): Remove.
3468 (print_one_inferior): Update.
3469
dcd5ddcc
TT
34702017-09-29 Tom Tromey <tom@tromey.com>
3471
3472 * mi/mi-main.c (mi_execute_cli_command): Use std::string.
3473 (mi_execute_async_cli_command): Likewise.
3474 (mi_cmd_trace_frame_collected): Use field_fmt.
3475
45d288cc
TT
34762017-09-29 Tom Tromey <tom@tromey.com>
3477
3478 * mi/mi-main.c (mi_cmd_data_write_memory_bytes): Use
3479 gdb::byte_vector.
3480
6afe2f4a
TT
34812017-09-29 Tom Tromey <tom@tromey.com>
3482
3483 * mi/mi-parse.c (mi_parse): Remove unused declaration.
3484
9813429a
TT
34852017-09-29 Tom Tromey <tom@tromey.com>
3486
3487 * mi/mi-cmd-disas.c (mi_cmd_disassemble): Don't copy "oarg".
3488
2d6960b4
TT
34892017-09-29 Tom Tromey <tom@tromey.com>
3490
3491 * varobj.h (varobj_gen_name): Return std::string.
3492 * varobj.c (varobj_gen_name): Return std::string.
3493 * mi/mi-cmd-var.c (mi_cmd_var_create): Use std::string.
3494 (mi_cmd_var_delete): Don't copy "name".
3495
784c453a
TT
34962017-09-29 Tom Tromey <tom@tromey.com>
3497
3498 * mi/mi-cmd-break.c (mi_argv_to_format): Return std::string.
3499 (mi_cmd_break_insert_1): Update.
3500
a9bc57b9
TT
35012017-09-29 Tom Tromey <tom@tromey.com>
3502
3503 * target.h (make_scoped_defer_target_commit_resume): Update.
3504 * target.c (make_scoped_defer_target_commit_resume): Rename from
3505 make_cleanup_defer_target_commit_resume. Return a
3506 scoped_restore.
3507 * infrun.c (proceed): Use make_scoped_defer_target_commit_resume.
3508
9754d8c4
TT
35092017-09-29 Tom Tromey <tom@tromey.com>
3510
3511 * main.c (captured_main_1): Remove unused declaration.
3512 * spu-multiarch.c (parse_spufs_run): Remove unused declaration.
3513
99ef965c
TT
35142017-09-29 Tom Tromey <tom@tromey.com>
3515
3516 * symtab.c (search_symbols): Remove unused outer cleanup.
3517 (make_source_files_completion_list): Remove unused declaration.
3518
42518ba7
TT
35192017-09-29 Tom Tromey <tom@tromey.com>
3520
3521 * mt-tdep.c (mt_push_dummy_call): Use gdb::byte_vector.
3522
726b2169
TT
35232017-09-29 Tom Tromey <tom@tromey.com>
3524
3525 * xstormy16-tdep.c (xstormy16_push_dummy_call): Use
3526 gdb::byte_vector.
3527
55b06432
TT
35282017-09-29 Tom Tromey <tom@tromey.com>
3529
3530 * complaints.c (vcomplaint): Use std::string.
3531
8abcee91
TT
35322017-09-29 Tom Tromey <tom@tromey.com>
3533
3534 * tracepoint.c (trace_variable_command): Use std::string.
3535 (encode_actions_1): Remove unused declarations.
3536 (create_tsv_from_upload): Use std::string.
3537
6ad94bc7
TT
35382017-09-29 Tom Tromey <tom@tromey.com>
3539
3540 * cp-support.c (gdb_demangle): Use std::string.
3541
2003f3d8
TT
35422017-09-29 Tom Tromey <tom@tromey.com>
3543
3544 * stack.c (parse_frame_specification): Use std::string
3545 (info_frame_command): Use gdb::unique_xmalloc_ptr.
3546
8f8accb5
TT
35472017-09-29 Tom Tromey <tom@tromey.com>
3548
3549 * tilegx-tdep.c (tilegx_push_dummy_call): Use gdb::byte_vector.
3550
200aa7b1
TT
35512017-09-29 Tom Tromey <tom@tromey.com>
3552
3553 * utils.c (vfprintf_maybe_filtered): Use std::string.
3554 (vfprintf_unfiltered): Likewise.
3555
606aae8a
TT
35562017-09-29 Tom Tromey <tom@tromey.com>
3557
3558 * event-top.c (top_level_prompt): Return std::string.
3559 (display_gdb_prompt): Update.
3560
bd413795
TT
35612017-09-29 Tom Tromey <tom@tromey.com>
3562
3563 * unittests/common-utils-selftests.c (format): New function.
3564 (string_vprintf_tests): New function.
3565 (_initialize_common_utils_selftests): Register new tests.
3566 * common/common-utils.c (string_vprintf): New function.
3567 * common/common-utils.h (string_vprintf): Declare.
3568
256642e8
PA
35692017-09-29 Pedro Alves <palves@redhat.com>
3570
3571 * common/rsp-low.c (unpack_varlen_hex): Constify.
3572 * common/rsp-low.h (unpack_varlen_hex): Constify.
3573 * linux-nat.c (linux_child_static_tracepoint_markers_by_strid):
3574 Constify.
3575 * remote.c (remote_set_permissions, read_ptid)
3576 (remote_current_thread, remote_get_threads_with_qthreadinfo)
3577 (remote_static_tracepoint_marker_at)
3578 (remote_static_tracepoint_markers_by_strid)
3579 (stop_reply_extract_thread, remote_parse_stop_reply): Constify.
3580 * tracepoint.c (parse_trace_status, parse_tracepoint_status)
3581 (parse_tracepoint_definition, parse_tsv_definition)
3582 (parse_static_tracepoint_marker_definition): Constify.
3583 * tracepoint.h (parse_static_tracepoint_marker_definition)
3584 (parse_trace_status, parse_tracepoint_status)
3585 (parse_tracepoint_definition, parse_tsv_definition): Constify.
3586
b6bb3468
PA
35872017-09-29 Pedro Alves <palves@redhat.com>
3588
3589 * remote.c (target_buf, target_buf_size): Delete.
3590 (remote_get_noisy_reply): Remove buf_p and sizeof_buf parameters.
3591 Use the connection's packet buffer instead.
3592 All callers adjusted.
3593 (_initialize_remote): Remove references to target_buf and
3594 target_buf_size.
3595
b2f8eb7a
PA
35962017-09-28 Pedro Alves <palves@redhat.com>
3597
3598 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
3599 unittests/common-utils-selftests.c.
3600 (SUBDIR_UNITTESTS_OBS): Add common-utils-selftests.o.
3601 (COMMON_OBS): Remove utils-selftests.o.
3602 * utils-selftests.c: Move to ...
3603 * unittests/common-utils-selftests.c: ... here and rename self
3604 test to "string_printf".
3605
08302ed2
DE
36062017-09-28 Alexander Shaposhnikov <alexander.v.shaposhnikov@gmail.com> (tiny patch)
3607
3608 * dwarf2read.c (open_and_init_dwp_file): Protect against dwp_file
3609 having NULL cus or tus.
3610
96a5a1d3
UW
36112017-09-27 Ulrich Weigand <uweigand@de.ibm.com>
3612
3613 * arm-tdep.c: (convert_from_extended): Remove.
3614 (convert_to_extended): Likewise.
3615 (arm_extract_return_value): Use convert_typed_floating.
3616 (arm_store_return_value): Likewise.
3617
3618 * sh-tdep.h (struct gdbarch_tdep): Add sh_littlebyte_bigword_type.
3619 * sh-tdep.c: Do not include "floatformat.h".
3620 (sh_littlebyte_bigword_type): New function.
3621 (sh_register_convert_to_virtual): Use convert_typed_floating.
3622 (sh_register_convert_to_raw): Likewise.
3623 * sh64-tdep.c: (struct gdbarch_tdep): Add sh_littlebyte_bigword_type.
3624 (sh64_littlebyte_bigword_type): New function.
3625 (sh64_extract_return_value): Use convert_typed_floating.
3626 (sh64_register_convert_to_virtual): Likewise.
3627 (sh64_register_convert_to_raw): Likewise.
3628
0db7851f
UW
36292017-09-27 Ulrich Weigand <uweigand@de.ibm.com>
3630
3631 * doublest.h (floatformat_from_type): Move to gdbtypes.h.
3632 * doublest.c (floatformat_from_type): Move to gdbtypes.c.
3633
3634 * gdbtypes.h (union type_specific): Make field floatformat hold
3635 just a single struct floatformat, not an array.
3636 (floatformat_from_type): Move here.
3637 * gdbtypes.c (floatformat_from_type): Move here. Update to
3638 changed TYPE_FLOATFORMAT definition.
3639 (verify_floatformat): Update to changed TYPE_FLOATFORMAT.
3640 (recursive_dump_type): Likewise.
3641 (init_float_type): Install correct floatformat for byte order.
3642 (arch_float_type): Likewise.
3643
77b7c781
UW
36442017-09-27 Ulrich Weigand <uweigand@de.ibm.com>
3645
3646 * gdbtypes.c (init_type): Change incoming argument from
3647 length-in-bytes to length-in-bits. Assert length is a
3648 multiple of TARGET_CHAR_BITS.
3649 (arch_type, arch_flags_type): Likewise.
3650 (init_integer_type): Update call to init_type.
3651 (init_character_type): Likewise.
3652 (init_boolean_type): Likewise.
3653 (init_float_type): Likewise.
3654 (init_decfloat_type): Likewise.
3655 (init_complex_type): Likewise.
3656 (init_pointer_type): Likewise.
3657 (objfile_type): Likewise.
3658 (arch_integer_type): Update call to arch_type.
3659 (arch_character_type): Likewise.
3660 (arch_boolean_type): Likewise.
3661 (arch_float_type): Likewise.
3662 (arch_decfloat_type): Likewise.
3663 (arch_complex_type): Likewise.
3664 (arch_pointer_type): Likewise.
3665 (gdbtypes_post_init): Likewise.
3666
3667 * dwarf2read.c (dwarf2_init_float_type): Update call to init_type.
3668 (read_base_type): Likewise.
3669 * mdebugread.c (basic_type): Likewise.
3670 * stabsread.c (dbx_init_float_type): Likewise.
3671 (rs6000_builtin_type): Likewise.
3672 (read_range_type): Likewise. Also, fix call to init_integer_type
3673 with erroneous length argument.
3674
3675 * ada-lang.c (ada_language_arch_info): Update call to arch_type.
3676 * d-lang.c (build_d_types): Likewise.
3677 * f-lang.c (build_fortran_types): Likewise.
3678 * go-lang.c (build_go_types): Likewise.
3679 * opencl-lang.c (build_opencl_types): Likewise.
3680 * jit.c (finalize_symtab): Likewise.
3681 * gnu-v3-abi.c (build_gdb_vtable_type): Likewise.
3682 (build_std_type_info_type): Likewise.
3683 * target-descriptions.c (tdesc_gdb_type): Likewise. Also,
3684 update call to arch_flags_type.
3685
3686 * linux-tdep.c (linux_get_siginfo_type_with_fields): Update call to
3687 arch_type.
3688 * fbsd-tdep.c (fbsd_get_siginfo_type): Likewise.
3689 * windows-tdep.c (windows_get_tlb_type): Likewise.
3690
3691 * avr-tdep.c (avr_gdbarch_init): Update call to arch_type.
3692 * ft32-tdep.c (ft32_gdbarch_init): Likewise.
3693 * m32c-tdep.c (make_types): Likewise.
3694 * rl78-tdep.c (rl78_gdbarch_init): Likewise.
3695 (rl78_psw_type): Update call to arch_flags_type.
3696 * m68k-tdep.c (m68k_ps_type): Update call to arch_flags_type.
3697 * rx-tdep.c (rx_psw_type): Likewise.
3698 (rx_fpsw_type): Likewise.
3699 * sparc-tdep.c (sparc_psr_type): Likewise.
3700 (sparc_fsr_type): Likewise.
3701 * sparc64-tdep.c (sparc64_pstate_type): Likewise.
3702 (sparc64_ccr_type): Likewise.
3703 (sparc64_fsr_type): Likewise.
3704 (sparc64_fprs_type): Likewise.
3705
f21b4d5c
TT
37062017-09-27 Tom Tromey <tom@tromey.com>
3707
3708 * findcmd.c (find_command): Constify.
3709
643c2ffa
TT
37102017-09-27 Tom Tromey <tom@tromey.com>
3711
3712 * ada-tasks.c (task_command_1, task_command): Constify.
3713
510e5e56
TT
37142017-09-27 Tom Tromey <tom@tromey.com>
3715
3716 * symtab.c (maintenance_print_symbol_cache)
3717 (maintenance_flush_symbol_cache)
3718 (maintenance_print_symbol_cache_statistics): Constify.
3719
e503b191
TT
37202017-09-27 Tom Tromey <tom@tromey.com>
3721
3722 * inferior.c (detach_inferior_command, kill_inferior_command)
3723 (inferior_command): Constify.
3724
4e001312
TT
37252017-09-27 Tom Tromey <tom@tromey.com>
3726
3727 * regcache.c (regcache_print, maintenance_print_registers)
3728 (maintenance_print_raw_registers)
3729 (maintenance_print_cooked_registers)
3730 (maintenance_print_register_groups)
3731 (maintenance_print_remote_registers): Constify.
3732
77763700
TT
37332017-09-27 Tom Tromey <tom@tromey.com>
3734
3735 * printcmd.c (map_display_numbers, undisplay_command)
3736 (enable_disable_display_command, enable_display_command)
3737 (disable_display_command): Constify.
3738
4495129a
TT
37392017-09-27 Tom Tromey <tom@tromey.com>
3740
3741 * breakpoint.h (delete_command): Don't declare.
3742 * breakpoint.c (delete_command, enable_once_command)
3743 (enable_count_command, enable_delete_command, breakpoint_1)
3744 (maintenance_info_breakpoints, stopin_command, stopat_command)
3745 (delete_command, delete_trace_command, save_breakpoints)
3746 (save_breakpoints_command, save_tracepoints_command): Constify.
3747
3088cf40
TT
37482017-09-27 Tom Tromey <tom@tromey.com>
3749
3750 * macrocmd.c (macro_expand_command, macro_expand_once_command)
3751 (skip_ws, extract_identifier, macro_define_command)
3752 (macro_undef_command, macro_list_command): Constify.
3753
69f476a3
TT
37542017-09-27 Tom Tromey <tom@tromey.com>
3755
3756 * infcmd.c (environment_info, set_environment_command)
3757 (unset_environment_command, path_info, info_proc_cmd_1)
3758 (info_proc_cmd_mappings, info_proc_cmd_stat)
3759 (info_proc_cmd_status, info_proc_cmd_cwd, info_proc_cmd_cmdline)
3760 (info_proc_cmd_exe, info_proc_cmd_all): Constify.
3761
c4a3e68e
TT
37622017-09-27 Tom Tromey <tom@tromey.com>
3763
3764 * i386-tdep.c (i386_mpx_info_bounds, i386_mpx_set_bounds):
3765 Constify.
3766
c9d31bd6
TT
37672017-09-27 Tom Tromey <tom@tromey.com>
3768
3769 * symfile-mem.c (add_symbol_file_from_memory_command): Constify.
3770
1f3f85eb
TT
37712017-09-27 Tom Tromey <tom@tromey.com>
3772
3773 * demangle.c (demangle_command): Constify.
3774
9c504b5d
TT
37752017-09-27 Tom Tromey <tom@tromey.com>
3776
3777 * progspace.c (maintenance_info_program_spaces_command):
3778 Constify.
3779
6663cf91
TT
37802017-09-27 Tom Tromey <tom@tromey.com>
3781
3782 * compile/compile.c (check_raw_argument, compile_file_command)
3783 (compile_code_command, compile_print_command): Constify.
3784
34e5fa26
TT
37852017-09-27 Tom Tromey <tom@tromey.com>
3786
3787 * reggroups.c (maintenance_print_reggroups): Constify.
3788
8384c356
TT
37892017-09-27 Tom Tromey <tom@tromey.com>
3790
3791 * dwarf2read.c (save_gdb_index_command): Constify.
3792
884beb0c
TT
37932017-09-27 Tom Tromey <tom@tromey.com>
3794
3795 * stap-probe.c (info_probes_stap_command): Constify.
3796
e0b2930c
TT
37972017-09-27 Tom Tromey <tom@tromey.com>
3798
3799 * fork-child.c (unset_exec_wrapper_command): Constify.
3800
f938677d
TT
38012017-09-27 Tom Tromey <tom@tromey.com>
3802
3803 * btrace.c (get_uint, get_context_size, no_chunk)
3804 (maint_btrace_packet_history_cmd)
3805 (maint_btrace_clear_packet_history_cmd, maint_btrace_clear_cmd)
3806 (maint_info_btrace_cmd): Constify.
3807
8949cb87
TT
38082017-09-27 Tom Tromey <tom@tromey.com>
3809
3810 * reverse.c (delete_bookmark_command): Constify.
3811
ac88e2de
TT
38122017-09-27 Tom Tromey <tom@tromey.com>
3813
3814 * remote.c (set_memory_packet_size)
3815 (set_memory_write_packet_size, show_memory_write_packet_size)
3816 (set_memory_read_packet_size, show_memory_read_packet_size)
3817 (compare_sections_command, packet_command, remote_put_command)
3818 (remote_get_command, remote_delete_command): Constify.
3819
bd4c9dfe
TT
38202017-09-27 Tom Tromey <tom@tromey.com>
3821
3822 * mips-tdep.c (show_mipsfpu_command, set_mipsfpu_single_command)
3823 (set_mipsfpu_double_command, set_mipsfpu_none_command)
3824 (set_mipsfpu_auto_command): Constify.
3825
5e93d4c6
TT
38262017-09-27 Tom Tromey <tom@tromey.com>
3827
3828 * cli/cli-cmds.h (cd_command): Constify.
3829 * cli/cli-cmds.c (cd_command): Constify.
3830
fc41a75b
TT
38312017-09-27 Tom Tromey <tom@tromey.com>
3832
3833 * thread.c (thread_name_command, thread_find_command): Constify.
3834
67810076
TT
38352017-09-27 Tom Tromey <tom@tromey.com>
3836
3837 * probe.c (enable_probes_command, disable_probes_command):
3838 Constify.
3839
1d8b34a7
TT
38402017-09-27 Tom Tromey <tom@tromey.com>
3841
3842 * symfile.c (symbol_file_command): Constify.
3843 * gdbcore.h (deprecated_file_changed_hook): Constify.
3844 * exec.c (deprecated_file_changed_hook, exec_file_command)
3845 (file_command): Constify.
3846 * defs.h (symbol_file_command): Constify.
3847
442019e1
TT
38482017-09-27 Tom Tromey <tom@tromey.com>
3849
3850 * remote-fileio.c (set_system_call_allowed)
3851 (show_system_call_allowed): Constify.
3852
2983f7cb
TT
38532017-09-27 Tom Tromey <tom@tromey.com>
3854
3855 * tracepoint.c (delete_trace_variable_command)
3856 (tfind_end_command, tfind_start_command, tfind_pc_command)
3857 (tfind_tracepoint_command, tfind_line_command)
3858 (tfind_range_command, tfind_outside_command): Constify.
3859
4fd41b24
TT
38602017-09-27 Tom Tromey <tom@tromey.com>
3861
3862 * ax-gdb.c (maint_agent_printf_command, agent_command)
3863 (agent_eval_command): Constify.
3864
f2fc3015
TT
38652017-09-27 Tom Tromey <tom@tromey.com>
3866
3867 * tracepoint.c (info_scope_command): Constify.
3868 * python/python.c (gdbpy_decode_line): Constify.
3869 * python/py-breakpoint.c (bppy_init): Constify.
3870 * mi/mi-cmd-break.c (mi_cmd_break_insert_1): Constify.
3871 * location.h: (new_linespec_location)
3872 (string_to_event_location_basic, string_to_event_location):
3873 Constify.
3874 * location.c (new_linespec_location)
3875 (string_to_event_location_basic, string_to_event_location):
3876 Constify.
3877 * linespec.h (decode_line_with_current_source)
3878 (decode_line_with_last_displayed, linespec_lex_to_end): Constify.
3879 * linespec.c (linespec_lex_to_end)
3880 (decode_line_with_current_source)
3881 (decode_line_with_last_displayed): Constify.
3882 * guile/scm-breakpoint.c (gdbscm_register_breakpoint_x):
3883 Constify.
3884 * cli/cli-cmds.c (edit_command, list_command): Constify.
3885 * breakpoint.h (until_break_command, watch_command_wrapper)
3886 (awatch_command_wrapper, rwatch_command_wrapper)
3887 (init_ada_exception_breakpoint): Constify.
3888 * breakpoint.c (break_command_1, dprintf_command)
3889 (break_range_command, watch_command_wrapper)
3890 (rwatch_command_wrapper, awatch_command_wrapper)
3891 (until_break_command, init_ada_exception_breakpoint)
3892 (strace_marker_create_sals_from_location, trace_command)
3893 (ftrace_command, strace_command, struct tracepoint): Constify.
3894 * ax-gdb.c (agent_command_1): Constify.
3895 * ada-lang.c (ada_exception_sal): Constify.
3896
8c2f95f4
TT
38972017-09-27 Tom Tromey <tom@tromey.com>
3898
3899 * record.c (cmd_record_delete, cmd_record_stop, cmd_record_save)
3900 (cmd_record_goto_begin, cmd_record_goto_end, get_insn_number)
3901 (get_context_size, no_chunk, get_insn_history_modifiers)
3902 (cmd_record_insn_history, get_call_history_modifiers)
3903 (cmd_record_call_history): Constify.
3904
a0d65762
TT
39052017-09-27 Tom Tromey <tom@tromey.com>
3906
3907 * source.c (show_substitute_path_command)
3908 (unset_substitute_path_command, set_substitute_path_command):
3909 Constify.
3910
58971144
TT
39112017-09-27 Tom Tromey <tom@tromey.com>
3912
3913 * typeprint.c (maintenance_print_type): Constify.
3914 * maint.c (maintenance_dump_me, maintenance_demangle)
3915 (maintenance_time_display, maintenance_info_sections)
3916 (maintenance_print_statistics, maintenance_deprecate)
3917 (maintenance_undeprecate): Constify.
3918 (maintenance_do_deprecate): Constify. Use std::string.
3919 (maintenance_selftest): Constify.
3920 * gdbtypes.h (maintenance_print_type): Constify.
3921
c482f52c
TT
39222017-09-27 Tom Tromey <tom@tromey.com>
3923
3924 * hppa-tdep.c (unwind_command): Constify.
3925
e100df1a
TT
39262017-09-27 Tom Tromey <tom@tromey.com>
3927
3928 * target-descriptions.c (unset_tdesc_filename_cmd)
3929 (maint_print_c_tdesc_cmd, maintenance_check_xml_descriptions):
3930 Constify.
3931
31d56ade
TT
39322017-09-27 Tom Tromey <tom@tromey.com>
3933
3934 * dummy-frame.c (maintenance_print_dummy_frames): Constify.
3935
b961da0b
TT
39362017-09-27 Tom Tromey <tom@tromey.com>
3937
3938 * tui/tui.c (tui_enable_command, tui_disable_command): Constify.
3939
e2d8ae16
TT
39402017-09-27 Tom Tromey <tom@tromey.com>
3941
3942 * tui/tui-regs.c (tui_reg_command): Constify.
3943
863779b0
TT
39442017-09-27 Tom Tromey <tom@tromey.com>
3945
3946 * skip.c (skip_file_command, skip_function_command)
3947 (skip_enable_command, skip_disable_command, skip_delete_command):
3948 Constify.
3949
cdb34d4a
TT
39502017-09-27 Tom Tromey <tom@tromey.com>
3951
3952 * record-btrace.c (cmd_record_btrace_bts_start)
3953 (cmd_record_btrace_pt_start): Constify.
3954
e99c83e7
TT
39552017-09-27 Tom Tromey <tom@tromey.com>
3956
3957 * symmisc.c (maintenance_print_symbols)
3958 (maintenance_print_msymbols, maintenance_print_objfiles)
3959 (maintenance_info_symtabs, maintenance_check_symtabs)
3960 (maintenance_expand_symtabs, maintenance_info_line_tables):
3961 Constify.
3962
32faf971
TT
39632017-09-27 Tom Tromey <tom@tromey.com>
3964
3965 * top.c (new_ui_command): Constify.
3966
2cf311eb
TT
39672017-09-27 Tom Tromey <tom@tromey.com>
3968
3969 * symfile.c (add_symbol_file_command)
3970 (remove_symbol_file_command, list_overlays_command)
3971 (map_overlay_command, unmap_overlay_command)
3972 (overlay_auto_command, overlay_manual_command)
3973 (overlay_off_command, overlay_load_command): Constify.
3974
e6738699
TT
39752017-09-27 Tom Tromey <tom@tromey.com>
3976
3977 * spu-tdep.c (info_spu_event_command, info_spu_signal_command)
3978 (info_spu_mailbox_command, info_spu_dma_command)
3979 (info_spu_proxydma_command): Constify.
3980
aa360cd5
TT
39812017-09-27 Tom Tromey <tom@tromey.com>
3982
3983 * cli/cli-logging.c (set_logging_on, set_logging_off): Constify.
3984
898241a5
TT
39852017-09-27 Tom Tromey <tom@tromey.com>
3986
3987 * cli/cli-script.c (user_defined_command): Constify.
3988
2d0ac106
TT
39892017-09-27 Tom Tromey <tom@tromey.com>
3990
3991 * cli/cli-dump.c (dump_memory_command, dump_value_command)
3992 (dump_srec_memory, dump_srec_value, dump_ihex_memory)
3993 (dump_ihex_value, dump_verilog_memory, dump_verilog_value)
3994 (dump_tekhex_memory, dump_tekhex_value, dump_binary_memory)
3995 (dump_binary_value, append_binary_memory, append_binary_value):
3996 Constify.
3997 (struct dump_context) <func>: Constify.
3998 (add_dump_command): Update.
3999
dede02ce
TT
40002017-09-27 Tom Tromey <tom@tromey.com>
4001
4002 * cli/cli-cmds.c (show_version, show_configuration)
4003 (source_command, show_user): Constify.
4004
d3cb6b99
TT
40052017-09-27 Tom Tromey <tom@tromey.com>
4006
4007 * target.c (maintenance_print_target_stack): Constify.
4008
1970a12f
TT
40092017-09-27 Tom Tromey <tom@tromey.com>
4010
4011 * interps.c (interpreter_exec_cmd): Constify.
4012
41243651
TT
40132017-09-27 Tom Tromey <tom@tromey.com>
4014
4015 * record-full.c (cmd_record_full_restore): Constify.
4016
4465d9db
TT
40172017-09-27 Tom Tromey <tom@tromey.com>
4018
4019 * memattr.c (enable_mem_command, disable_mem_command)
4020 (delete_mem_command): Constify.
4021
ad25e423
TT
40222017-09-27 Tom Tromey <tom@tromey.com>
4023
4024 * value.c (show_convenience): Constify.
4025
d64097b1
TT
40262017-09-27 Tom Tromey <tom@tromey.com>
4027
4028 * gdbcore.h (core_file_command): Update.
4029 * corefile.c (core_file_command): Constify.
4030
4d4589ef
TT
40312017-09-27 Tom Tromey <tom@tromey.com>
4032
4033 * user-regs.c (maintenance_print_user_registers): Constify.
4034
32a7bf17
TT
40352017-09-27 Tom Tromey <tom@tromey.com>
4036
4037 * cp-namespace.c (maintenance_cplus_namespace): Constify.
4038
4a475551
TT
40392017-09-27 Tom Tromey <tom@tromey.com>
4040
4041 * cp-support.c (first_component_command): Constify.
4042
990b9f9f
TT
40432017-09-27 Tom Tromey <tom@tromey.com>
4044
4045 * psymtab.c (maintenance_print_psymbols)
4046 (maintenance_info_psymtabs, maintenance_check_psymtabs):
4047 Constify.
4048
c281872e
TT
40492017-09-27 Tom Tromey <tom@tromey.com>
4050
4051 * windows-tdep.c (display_tib): Constify.
4052
5b64bf74
TT
40532017-09-27 Tom Tromey <tom@tromey.com>
4054
4055 * linux-fork.c (delete_checkpoint_command)
4056 (detach_checkpoint_command): Constify.
4057
4ada038f
TT
40582017-09-27 Tom Tromey <tom@tromey.com>
4059
4060 * cp-abi.c (set_cp_abi_cmd, show_cp_abi_cmd): Constify.
4061
57f5a81b
TT
40622017-09-27 Tom Tromey <tom@tromey.com>
4063
4064 * arc-tdep.c (dump_arc_instruction_command): Constify.
4065
b0a8e6c4
TT
40662017-09-27 Tom Tromey <tom@tromey.com>
4067
4068 * valprint.c (set_radix, show_radix): Constify.
4069
8d97dc1c
TT
40702017-09-27 Tom Tromey <tom@tromey.com>
4071
4072 * dtrace-probe.c (info_probes_dtrace_command): Constify.
4073
eb7c454d
TT
40742017-09-27 Tom Tromey <tom@tromey.com>
4075
4076 * command.h (not_just_help_class_command): Update.
4077 * cli/cli-decode.h (not_just_help_class_command): Update.
4078 * cli/cli-decode.c (not_just_help_class_command): Constify.
4079
e4e33335
TT
40802017-09-27 Tom Tromey <tom@tromey.com>
4081
4082 * gdb_bfd.c (maintenance_info_bfds): Constify.
4083
0450cc4c
TT
40842017-09-27 Tom Tromey <tom@tromey.com>
4085
4086 * cli/cli-decode.c (add_cmd, set_cmd_cfunc): New function
4087 overloads.
4088 (do_add_cmd): Rename from add_cmd. Don't call set_cmd_cfunc.
4089 (do_const_cfunc): New function.
4090 (cmd_cfunc_eq): New overload.
4091 (cli_user_command_p): Check do_const_cfunc.
4092 * cli/cli-decode.h (struct cmd_list_element) <function>: New field
4093 const_cfunc.
4094 * command.h (add_cmd): Add const overload and no-function
4095 overload.
4096 (set_cmd_cfunc): Add const overload.
4097 (cmd_const_cfunc_ftype): Declare.
4098 (cmd_cfunc_eq): Add const overload.
4099 * breakpoint.c, cli-cmds.c, cli-dump.c, guile/scm-cmd.c,
4100 python/py-cmd.c, target.c, tracepoint.c: Use no-function add_cmd
4101 overload.
4102
a9bbfbd8
TT
41032017-09-27 Tom Tromey <tom@tromey.com>
4104
4105 * macroexp.c (get_next_token_for_substitution): New function.
4106 (substitute_args): Call it. Check for __VA_OPT__.
4107
5230b05a
WT
41082017-09-26 Walfred Tedeschi <walfred.tedeschi@intel.com>
4109 Pedro Alves <palves@redhat.com>
4110
4111 * dwarf2read.c (dwarf2_cu): Remove field producer_is_icc and add
4112 producer_is_icc_lt_14.
4113 (producer_is_icc_lt_14): New function.
4114 (check_producer): Add code for checking version of ICC.
4115 (producer_is_icc): Move to producer.c.
4116 (read_structure_type): Restrict ICC workaround to ICC<14.
4117 * producer.c: Include selftest.h.
4118 (producer_is_icc, producer_parsing_tests, _initialize_producer):
4119 New functions.
4120 * producer.h (producer_is_icc): New declaration.
4121
b32b108a
WT
41222017-09-26 Walfred Tedeschi <walfred.tedeschi@intel.com>
4123
4124 * Makefile.in (SFILES): Add producer.c.
4125 (COMMON_OBS): Add producer.o
4126 * amd64-tdep.c (producer.h): Add new include.
4127 * dwarf2read.c (producer.h): Add new include.
4128 * producer.c: New file.
4129 * producer.h: New file.
4130 * utils.c (producer_is_gcc, producer_is_gcc_ge_4): Move to
4131 producer.c.
4132 * utils.h (producer_is_gcc, producer_is_gcc_ge_4): Move to
4133 producer.h.
4134
5007d765
MK
41352017-09-26 Matthias Klose <doko@ubuntu.com>
4136
4137 * configure.ac: Search ncursesw before ncurses.
4138 Check ncursesw/ncurses.h before ncurses/ncurses.h.
4139 * gdb_curses.h: Include <ncursesw/ncurses.h>
4140 * config.in, configure: Regenerate.
4141
281c4447
RO
41422017-09-26 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
4143
4144 PR gdb/22185
4145 * configure.host <*-*-solaris2.[01], *-*-solaris2.[2-9]*>: Mark as
4146 obsolete.
4147 Use gdb_host sol2 for i[34567]86-*-solaris2*, x86_64-*-solaris2*.
4148 Remove i386sol2 support.
4149 * configure.nat <i386sol2>: Remove.
4150 <sol2-64>: Fold into ...
4151 <sol2>: ... this.
4152 Move common settings to default section.
4153 Add sol-thread.o.
4154 * configure.tgt <i[34567]86-*-solaris2.1[0-9]*,
4155 x86_64-*-solaris2.1[0-9]*>: Rename to ...
4156 <i[34567]86-*-solaris2*, x86_64-*-solaris2*>: ... this.
4157 <i[34567]86-*-solaris*>: Remove.
4158 <sparc-*-solaris2.[0-6], sparc-*-solaris2.[0-6].*>: Remove.
4159
4160 * configure.ac: Remove wctype in libw check.
4161 (_MSE_INT_H): Don't define on Solaris 7-9.
4162 <solaris*>: Remove libthread_db.so.1 check.
4163 * configure: Regenerate.
4164 * config.in: Regenerate.
4165
4166 * proc-service.c: Remove PROC_SERVICE_IS_OLD handling.
4167 (gdb_ps_prochandle_t, gdb_ps_read_buf_t, gdb_ps_write_buf_t)
4168 (gdb_ps_size_t): Remove.
4169 Use base types in users.
4170 * sol-thread.c: Likewise, also for gdb_ps_addr_t.
4171
4172 * NEWS (Changes since GDB 8.0): Document Solaris 2.0-9 removal.
4173
39b06c20
RO
41742017-09-26 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
4175
4176 PR build/22206
4177 * sparc64-tdep.c (adi_tag_fd): Print pid as long.
4178 (adi_is_addr_mapped): Likewise.
4179 (PSR_ICC): Don't redefine.
4180 (PSR_IMPL): Likewise.
4181
6c3e20f1
TT
41822017-09-25 Tom Tromey <tom@tromey.com>
4183
4184 * regcache.c (regcache::dump): Use string_printf.
4185
b292235f
TT
41862017-09-25 Tom Tromey <tom@tromey.com>
4187
4188 * regcache.c (class regcache_invalidator): New.
4189 (struct register_to_invalidate): Remove.
4190 (make_cleanup_regcache_invalidate): Remove.
4191 (regcache::raw_write): Use regcache_invalidator.
4192
9ac86b52
TT
41932017-09-25 Tom Tromey <tom@tromey.com>
4194
4195 * spu-tdep.c (spu2ppu_sniffer): Update.
4196 * regcache.h (make_cleanup_regcache_xfree): Don't declare.
4197 * regcache.c (do_regcache_xfree, make_cleanup_regcache_xfree):
4198 Remove.
4199 * ppc-linux-tdep.c (ppu2spu_sniffer): Update.
4200 * mi/mi-main.c (mi_cmd_data_list_changed_registers): Update.
4201 * frame.h (frame_save_as_regcache): Return std::unique_ptr.
4202 * frame.c (frame_save_as_regcache): Return std::unique_ptr.
4203 (frame_pop): Update.
4204
c0e383c6
TT
42052017-09-25 Tom Tromey <tom@tromey.com>
4206
4207 * spu-tdep.c (spu2ppu_dealloc_cache): Use delete.
4208 * regcache.h (regcache_xfree): Don't declare.
4209 * regcache.c (regcache_xfree): Remove.
4210 (do_regcache_xfree): Use delete.
4211 * ppc-linux-tdep.c (ppu2spu_dealloc_cache): Use delete.
4212 * linux-fork.c (free_fork): Use delete.
4213 (fork_save_infrun_state): Likewise.
4214 * jit.c (jit_dealloc_cache): Use delete.
4215 * infrun.c (discard_infcall_suspend_state): Use delete.
4216
791199cc
TT
42172017-09-25 Tom Tromey <tom@tromey.com>
4218
4219 * regcache.h (regcache_xmalloc): Don't declare.
4220 (regcache_raw_set_cached_value): Update comment.
4221 * regcache.c (regcache_xmalloc): Remove.
4222 * ppc-linux-tdep.c (ppu2spu_sniffer): Use new.
4223 * jit.c (jit_frame_sniffer): Use new.
4224 * frame.c (frame_save_as_regcache): Use new.
4225
289e23aa
AA
42262017-09-25 Andreas Arnez <arnez@linux.vnet.ibm.com>
4227
4228 * NEWS: Advertise support for guarded-storage registers on IBM z.
4229
1b63490c
AA
42302017-09-25 Andreas Arnez <arnez@linux.vnet.ibm.com>
4231
4232 * s390-linux-nat.c (have_regset_gs): New static variable.
4233 (s390_linux_fetch_inferior_registers): Handle guarded-storage
4234 control block and guarded-storage broadcast control regsets.
4235 (s390_read_description): Detect whether the target has
4236 guarded-storage support, return appropriate tdesc.
4237 * s390-linux-tdep.c (features/s390-gs-linux64.c): New include.
4238 (features/s390x-gs-linux64.c): Likewise.
4239 (struct gdbarch_tdep) <have_gs>: New field.
4240 (s390_regmap_gs, s390_regmap_gsbc, s390_gs_regset)
4241 (s390_gsbc_regset): New variables.
4242 (s390_iterate_over_regset_sections): Iterate over s390_gs_regset
4243 and s390_gsbc_regset, if applicable.
4244 (s390_core_read_description): Check whether core file was from a
4245 target with guarded-storage support; include appropriate regsets.
4246 (s390_gdbarch_init): Add registers for guarded-storage support.
4247 (_initialize_s390_tdep): Initialize new target descriptions that
4248 include registers for guarded-storage support.
4249 * s390-linux-tdep.h (HWCAP_S390_GS, S390_GSD_REGNUM)
4250 (S390_GSSM_REGNUM, S390_GSEPLA_REGNUM)
4251 (S390_BC_GSD_REGNUM, S390_BC_GSSM_REGNUM): New defines.
4252 (S390_NUM_REGS): Adjust macro definition.
4253 (s390_gs_regset, s390_gsbc_regset, tdesc_s390_gs_linux64)
4254 (tdesc_s390x_gs_linux64): New declarations.
4255
96235dc1
AA
42562017-09-25 Andreas Arnez <arnez@linux.vnet.ibm.com>
4257
4258 * features/s390-gs-linux64.xml: New file.
4259 * features/s390-gs.xml: New file.
4260 * features/s390-gsbc.xml: New file.
4261 * features/s390x-gs-linux64.xml: New file.
4262 * features/Makefile (WHICH): Add s390-gs-linux64 and
4263 s390x-gs-linux64.
4264 (s390-gs-linux64-expedite, s390x-gs-linux64-expedite): New macros.
4265 (XMLTOC): Add s390-gs-linux64.xml and s390x-linux64.xml.
4266 * features/s390-gs-linux64.c: New generated file.
4267 * features/s390x-gs-linux64.c: New file.
4268 * regformats/s390-gs-linux64.dat: New file.
4269 * regformats/s390x-gs-linux64.dat: New file.
4270
b4a7c699
TT
42712017-09-23 Tom Tromey <tom@tromey.com>
4272
4273 * defs.h (make_cleanup_override_quit_handler): Don't declare.
4274
c2f97536
TT
42752017-09-22 Tom Tromey <tom@tromey.com>
4276
4277 * utils.c (class scoped_input_handler) <m_quit_handler>: Change
4278 type to scoped_restore_tmpl.
4279 <scoped_input_handler>: Initialize m_quit_handler directly.
4280
43573013
SDJ
42812017-09-22 Sergio Durigan Junior <sergiodj@redhat.com>
4282
4283 * cli/cli-cmds.c (pwd_command): Use "getcwd (NULL, 0)".
4284 (cd_command): Likewise. Free "current_directory" before
4285 assigning to it.
4286 * main.c (captured_main_1): Use "getcwd (NULL, 0)".
4287 * mi/mi-cmd-env.c (mi_cmd_env_pwd): Likewise.
4288 * top.c (gdb_dirbuf): Remove global declaration.
4289 * top.h (gdb_dirbuf): Likewise.
4290
6ec2e0f5
SDJ
42912017-09-22 Sergio Durigan Junior <sergiodj@redhat.com>
4292
4293 * gnulib/aclocal.m4: Regenerate.
4294 * gnulib/config.in: Regenerate.
4295 * gnulib/configure: Regenerate.
4296 * gnulib/import/Makefile.am: Regenerate.
4297 * gnulib/import/Makefile.in: Regenerate.
4298 * gnulib/import/assure.h: New file.
4299 * gnulib/import/at-func.c: Likewise
4300 * gnulib/import/chdir-long.c: New file.
4301 * gnulib/import/chdir-long.h: New file.
4302 * gnulib/import/cloexec.c: New file.
4303 * gnulib/import/cloexec.h: New file.
4304 * gnulib/import/close.c: New file.
4305 * gnulib/import/closedir.c: New file.
4306 * gnulib/import/dirent-private.h: New file.
4307 * gnulib/import/dup-safer.c: New file.
4308 * gnulib/import/dup.c: New file.
4309 * gnulib/import/dup2.c: New file.
4310 * gnulib/import/error.c: New file.
4311 * gnulib/import/error.h: New file.
4312 * gnulib/import/exitfail.c: New file.
4313 * gnulib/import/exitfail.h: New file.
4314 * gnulib/import/fchdir.c: New file.
4315 * gnulib/import/fcntl.c: New file.
4316 * gnulib/import/fcntl.in.h: New file.
4317 * gnulib/import/fd-hook.c: New file.
4318 * gnulib/import/fd-hook.h: New file.
4319 * gnulib/import/fd-safer.c: New file.
4320 * gnulib/import/fdopendir.c: New file.
4321 * gnulib/import/filename.h: New file.
4322 * gnulib/import/filenamecat-lgpl.c: New file.
4323 * gnulib/import/filenamecat.h: New file.
4324 * gnulib/import/fstat.c: New file.
4325 * gnulib/import/fstatat.c: New file.
4326 * gnulib/import/getcwd-lgpl.c: New file.
4327 * gnulib/import/getcwd.c: New file.
4328 * gnulib/import/getdtablesize.c: New file.
4329 * gnulib/import/getlogin_r.c: New file.
4330 * gnulib/import/getprogname.c: New file.
4331 * gnulib/import/getprogname.h: New file.
4332 * gnulib/import/gettext.h: New file.
4333 * gnulib/import/glob-libc.h: New file.
4334 * gnulib/import/glob.c: New file.
4335 * gnulib/import/glob.in.h: New file.
4336 * gnulib/import/intprops.h: New file.
4337 * gnulib/import/m4/chdir-long.m4: New file.
4338 * gnulib/import/m4/close.m4: New file.
4339 * gnulib/import/m4/closedir.m4: New file.
4340 * gnulib/import/m4/d-ino.m4: New file.
4341 * gnulib/import/m4/d-type.m4: New file.
4342 * gnulib/import/m4/dup.m4: New file.
4343 * gnulib/import/m4/dup2.m4: New file.
4344 * gnulib/import/m4/error.m4: New file.
4345 * gnulib/import/m4/fchdir.m4: New file.
4346 * gnulib/import/m4/fcntl.m4: New file.
4347 * gnulib/import/m4/fcntl_h.m4: New file.
4348 * gnulib/import/m4/fdopendir.m4: New file.
4349 * gnulib/import/m4/filenamecat.m4: New file.
4350 * gnulib/import/m4/fstat.m4: New file.
4351 * gnulib/import/m4/fstatat.m4: New file.
4352 * gnulib/import/m4/getcwd-abort-bug.m4: New file.
4353 * gnulib/import/m4/getcwd-path-max.m4: New file.
4354 * gnulib/import/m4/getcwd.m4: New file.
4355 * gnulib/import/m4/getdtablesize.m4: New file.
4356 * gnulib/import/m4/getlogin_r.m4: New file.
4357 * gnulib/import/m4/getprogname.m4: New file.
4358 * gnulib/import/m4/glob.m4: New file.
4359 * gnulib/import/m4/gnulib-cache.m4: Regenerate.
4360 * gnulib/import/m4/gnulib-comp.m4: Regenerate.
4361 * gnulib/import/m4/mempcpy.m4: New file.
4362 * gnulib/import/m4/memrchr.m4: New file.
4363 * gnulib/import/m4/mode_t.m4: New file.
4364 * gnulib/import/m4/msvc-inval.m4: New file.
4365 * gnulib/import/m4/msvc-nothrow.m4: New file.
4366 * gnulib/import/m4/open.m4: New file.
4367 * gnulib/import/m4/openat.m4: New file.
4368 * gnulib/import/m4/opendir.m4: New file.
4369 * gnulib/import/m4/readdir.m4: New file.
4370 * gnulib/import/m4/realloc.m4: New file.
4371 * gnulib/import/m4/rewinddir.m4: New file.
4372 * gnulib/import/m4/save-cwd.m4: New file.
4373 * gnulib/import/m4/strdup.m4: New file.
4374 * gnulib/import/m4/strerror.m4: New file.
4375 * gnulib/import/m4/unistd-safer.m4: New file.
4376 * gnulib/import/mempcpy.c: New file.
4377 * gnulib/import/memrchr.c: New file.
4378 * gnulib/import/msvc-inval.c: New file.
4379 * gnulib/import/msvc-inval.h: New file.
4380 * gnulib/import/msvc-nothrow.c: New file.
4381 * gnulib/import/msvc-nothrow.h: New file.
4382 * gnulib/import/open.c: New file.
4383 * gnulib/import/openat-die.c: New file.
4384 * gnulib/import/openat-priv.h: New file.
4385 * gnulib/import/openat-proc.c: New file.
4386 * gnulib/import/openat.c: New file.
4387 * gnulib/import/openat.h: New file.
4388 * gnulib/import/opendir.c: New file.
4389 * gnulib/import/pipe-safer.c: New file.
4390 * gnulib/import/readdir.c: New file.
4391 * gnulib/import/realloc.c: New file.
4392 * gnulib/import/rewinddir.c: New file.
4393 * gnulib/import/save-cwd.c: New file.
4394 * gnulib/import/save-cwd.h: New file.
4395 * gnulib/import/strdup.c: New file.
4396 * gnulib/import/strerror-override.c: New file.
4397 * gnulib/import/strerror-override.h: New file.
4398 * gnulib/import/strerror.c: New file.
4399 * gnulib/import/unistd--.h: New file.
4400 * gnulib/import/unistd-safer.h: New file.
4401 * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add
4402 "getcwd" and "glob".
4403 * ser-tcp.c: Undefine "close" before redefining it.
4404
432ae719
SM
44052017-09-21 Simon Marchi <simon.marchi@ericsson.com>
4406
4407 * guile/scm-value.c (gdbscm_value_address): Initialize address,
4408 get rid of res_val.
4409
4fa7574e
RO
44102017-09-22 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
4411
4412 * configure.nat <i386sol2,i386>: Add fork-inferior.o to NATDEPFILES.
4413 <sol2,sparc>: Likewise.
4414 <sol2-64,i386>: Likewise.
4415
4416 * warning.m4 (AM_GDB_WARNINGS): Disable -Wunknown-pragmas,
4417 -Wdeprecated-declarations on *-*-solaris*.
4418 * configure: Regenerate.
4419
4420 * procfs.c: Include "nat/inferior.h".
4421 (procfs_info_proc): Fix typo.
4422
f6327dcb
KB
44232017-09-21 Kevin Buettner <kevinb@redhat.com>
4424
4425 * remote.c (vector): Include.
4426 (struct private_thread_info): Add field, thread_handle.
4427 (free_private_thread_info): Deallocate storage associated with
4428 thread handle.
4429 (get_private_info_thread): Initialize `thread_handle' field.
4430 (struct thread_item): Add field, thread_handle.
4431 (clear_threads_listing_context): Deallocate storage associated
4432 with thread handle.
4433 (start_thread): Add support for "handle" attribute.
4434 (thread_attributes): Add "handle".
4435 (remote_get_threads_with_qthreadinfo): Initialize thread_handle
4436 field.
4437 (remote_update_thread_list): Update thread_handle.
4438 (remote_thread_handle_to_thread_info): New function.
4439 (init_remote_ops): Initialize to_thread_handle_to_thread_info.
4440
fbbe5337
KB
44412017-09-21 Kevin Buettner <kevinb@redhat.com>
4442
4443 * python/py-inferior.c (gdbpy_thread_from_thread_handle): New
4444 function.
4445 (inferior_object_methods): Add gdbpy_thread_from_thread_handle.
4446 * python/python-internal.h (thread_object_type): Declare.
4447
e04ee09e
KB
44482017-09-21 Kevin Buettner <kevinb@redhat.com>
4449
4450 * target.h (struct target_ops): Add to_thread_handle_to_thread_info.
4451 (target_thread_handle_to_thread_info): Declare.
4452 * target.c (target_thread_handle_to_thread_info): New function.
4453 * target-delegates.c: Regenerate.
4454 * gdbthread.h (find_thread_by_handle): Declare.
4455 * thread.c (find_thread_by_handle): New function.
4456 * linux-thread-db.c (thread_db_thread_handle_to_thread_info): New
4457 function.
4458 (init_thread_db_ops): Register thread_db_thread_handle_to_thread_info.
4459
1e5b66ed
SM
44602017-09-21 Simon Marchi <simon.marchi@ericsson.com>
4461
4462 * nat/linux-waitpid.c (linux_debug): Add ATTRIBUTE_PRINTF.
4463
ebe48ba0
SM
44642017-09-21 Simon Marchi <simon.marchi@ericsson.com>
4465
4466 * microblaze-tdep.c (microblaze_debug): Add ATTRIBUTE_PRINTF.
4467
0a0bf5dc
YQ
44682017-09-21 Yao Qi <yao.qi@linaro.org>
4469
4470 * configure.tgt (aarch64*-*-freebsd*): Add fbsd-tdep.o solib-svr4.o
4471 to gdb_target_obs.
4472
d1b0a7bf
TT
44732017-09-20 Tom Tromey <tom@tromey.com>
4474
4475 * breakpoint.c (struct counted_command_line): Remove.
4476 (breakpoint_commands): Update.
4477 (alloc_counted_command_line, incref_counted_command_line)
4478 (decref_counted_command_line, do_cleanup_counted_command_line)
4479 (make_cleanup_decref_counted_command_line): Remove.
4480 (breakpoint_set_commands, commands_command_1, ~bpstats, bpstats)
4481 (bpstat_clear_actions, bpstat_do_actions_1, watchpoint_check)
4482 (bpstat_stop_status, print_one_breakpoint_location, ~breakpoint)
4483 (save_breakpoints): Update.
4484 * breakpoint.h (counted_command_line): Now a typedef to
4485 shared_ptr.
4486 (struct breakpoint) <commands>: Now a counted_command_line.
4487 (struct bpstats) <command>: Likewise.
4488
48649e1b
TT
44892017-09-20 Tom Tromey <tom@tromey.com>
4490
4491 * breakpoint.c (struct commands_info, do_map_commands_command):
4492 Remove.
4493 (commands_command_1): Update.
4494 (iterate_over_related_breakpoints): Take a function_view.
4495 (do_delete_breakpoint, do_map_delete_breakpoint): Remove.
4496 (delete_command): Update.
4497 (map_breakpoint_numbers): Take a function_view.
4498 (do_disable_breakpoint, do_map_delete_breakpoint): Remove.
4499 (disable_command): Update.
4500 (do_enable_breakpoint, do_map_enable_breakpoint): Remove.
4501 (enable_command): Update.
4502 (struct disp_data, do_enable_breakpoint_disp)
4503 (do_map_enable_once_breakpoint, do_map_enable_count_breakpoint)
4504 (do_map_enable_delete_breakpoint): Remove.
4505 (enable_once_command, enable_count_command, enable_delete_command)
4506 (delete_trace_variable_command): Update.
4507
04afa70c
TT
45082017-09-20 Tom Tromey <tom@tromey.com>
4509
4510 * breakpoint.c (~bpstats): Rename from bpstat_free. Update.
4511 (bpstat_clear): Use delete.
4512 (bpstats): New constructors.
4513 (bpstat_copy, bpstat_stop_status): Use new.
4514 (dprintf_after_condition_true): Update.
4515 * breakpoint.h (bpstats::bpstats): Add constructors.
4516 (bpstats::~bpstats): Add destructor.
4517
c83833f4
PA
45182017-09-20 Pedro Alves <palves@redhat.com>
4519
4520 * eval.c (make_params): Delete, refactored as ...
4521 (class fake_method): ... this new type's ctor.
4522 (fake_method::~fake_method): New.
4523 (evaluate_subexp_standard): Use 'fake_method'.
4524
223ffa71
TT
45252017-09-20 Tom Tromey <tom@tromey.com>
4526
4527 * windows-nat.c (get_windows_debug_event, windows_wait)
4528 (do_initial_windows_stuff, windows_attach): Update.
4529 * utils.c (vwarning, internal_vproblem): Update.
4530 (ui_unregister_input_event_handler_cleanup)
4531 (prepare_to_handle_input): Remove.
4532 (class scoped_input_handler): New.
4533 (defaulted_query, prompt_for_continue): Update.
4534 * tui/tui-hooks.c (tui_refresh_frame_and_register_information):
4535 Update.
4536 * top.c (undo_terminal_modifications_before_exit): Update.
4537 * target/target.h (target_terminal_init, target_terminal_inferior)
4538 (target_terminal_ours): Don't declare.
4539 (class target_terminal): New.
4540 * target.h (target_terminal_is_inferior, target_terminal_is_ours)
4541 (target_terminal_ours_for_output)
4542 (make_cleanup_restore_target_terminal): Don't declare.
4543 (target_terminal_info): Remove.
4544 * target.c (enum terminal_state, terminal_state): Remove.
4545 (target_terminal::terminal_state): Define.
4546 (target_terminal::init): Rename from target_terminal_init.
4547 (target_terminal::inferior): Rename from
4548 target_terminal_inferior.
4549 (target_terminal::ours): Rename from target_terminal_ours.
4550 (target_terminal::ours_for_output): Rename from
4551 target_terminal_ours_for_output.
4552 (target_terminal::info): New method.
4553 (cleanup_restore_target_terminal)
4554 (make_cleanup_restore_target_terminal): Remove.
4555 * solib.c (handle_solib_event): Update.
4556 * remote.c (remote_serial_quit_handler): Update.
4557 (remote_terminal_inferior, remote_wait_as): Update.
4558 * record-full.c (record_full_wait_1): Update.
4559 * nto-procfs.c (procfs_create_inferior): Update.
4560 * nat/fork-inferior.c (startup_inferior): Update.
4561 * mi/mi-interp.c (mi_new_thread, mi_thread_exit)
4562 (mi_record_changed, mi_inferior_added, mi_inferior_appeared)
4563 (mi_inferior_exit, mi_inferior_removed, mi_traceframe_changed)
4564 (mi_tsv_created, mi_tsv_deleted, mi_tsv_modified)
4565 (mi_breakpoint_created, mi_breakpoint_deleted)
4566 (mi_breakpoint_modified, mi_on_resume, mi_solib_loaded)
4567 (mi_solib_unloaded, mi_command_param_changed, mi_memory_changed)
4568 (mi_user_selected_context_changed, report_initial_inferior):
4569 Update.
4570 * linux-nat.c (linux_nat_attach, linux_nat_terminal_ours)
4571 (linux_nat_terminal_inferior): Update.
4572 * infrun.c (follow_fork_inferior)
4573 (handle_vfork_child_exec_or_exit, do_target_resume)
4574 (check_curr_ui_sync_execution_done, handle_inferior_event_1)
4575 (handle_signal_stop, maybe_remove_breakpoints, normal_stop):
4576 Update.
4577 * inflow.c (child_terminal_init, info_terminal_command): Update.
4578 * infcmd.c (post_create_inferior, continue_1, prepare_one_step)
4579 (attach_command): Update.
4580 * infcall.c (call_thread_fsm_should_stop): Update.
4581 * gnu-nat.c (gnu_attach): Update.
4582 * extension.c (struct active_ext_lang_state)
4583 (restore_active_ext_lang): Update.
4584 * exceptions.c (print_flush): Update.
4585 * event-top.c (async_enable_stdin, default_quit_handler): Update.
4586 (struct quit_handler_cleanup_data, restore_quit_handler)
4587 (restore_quit_handler_dtor, make_cleanup_override_quit_handler):
4588 Remove.
4589 * cp-support.c (gdb_demangle): Update.
4590 * breakpoint.c (update_inserted_breakpoint_locations)
4591 (insert_breakpoint_locations, handle_jit_event)
4592 (disable_breakpoints_in_unloaded_shlib): Update.
4593 * annotate.c (annotate_breakpoints_invalid)
4594 (annotate_frames_invalid): Update.
4595
013af3fc
TT
45962017-09-20 Tom Tromey <tom@tromey.com>
4597
4598 * main.c (catch_command_errors): Rename from
4599 catch_command_errors_const.
4600 (captured_main_1): Update.
4601
06871ae8
PA
46022017-09-20 Pedro Alves <palves@redhat.com>
4603
4604 * cli/cli-cmds.c (list_command): Use print_sal_location.
4605 (print_sal_location): New function.
4606 (ambiguous_line_spec): Use print_sal_location.
4607 * linespec.c (symbol_to_sal): Record the symbol in the sal.
4608 * symtab.c (find_function_start_sal): Likewise.
4609 * symtab.h (symtab_and_line::symbol): New field.
4610
e5f25bc5
PA
46112017-09-20 Pedro Alves <palves@redhat.com>
4612
4613 * linespec.c (minsym_found): Handle non-text minsyms.
4614 (symbol_to_sal): Record a sal.pc for non-block, non-label symbols.
4615
1b7fa39e
WT
46162017-09-20 Walfred Tedeschi <walfred.tedeschi@intel.com>
4617
4618 * features/Makefile (i386-avx-mpx-avx512-pku.dat): Add missing
4619 backslash.
4620
37dd0825
WT
46212017-09-20 Walfred Tedeschi <walfred.tedeschi@intel.com>
4622
4623 * gdb.arch/i386-avx512.c (move_zmm_data_to_reg): Use
4624 vmovups instead vmovaps.
4625 (move_zmm_data_to_memory): Use vmovups instead vmovaps.
4626
4e5a4f58
JB
46272017-09-19 John Baldwin <jhb@FreeBSD.org>
4628
4629 * NEWS (Changes since GDB 8.0): Add starti.
4630 * infcmd.c (enum run_break): New.
4631 (run_command_1): Queue pending event for RUN_STOP_AT_FIRST_INSN
4632 case.
4633 (run_command): Use enum run_how.
4634 (start_command): Likewise.
4635 (starti_command): New function.
4636 (RUN_ARGS_HELP): New macro.
4637 (_initialize_infcmd): Use RUN_ARGS_HELP for run and start
4638 commands. Add starti command.
4639
aa70c9f1
YQ
46402017-09-19 Yao Qi <yao.qi@linaro.org>
4641
4642 * Makefile.in (monitor.o): Remove the rule.
4643
d6541620
YQ
46442017-09-19 Yao Qi <yao.qi@linaro.org>
4645
4646 * annotate.h (struct annotate_arg_emitter): Use
4647 DISABLE_COPY_AND_ASSIGN.
4648 * common/refcounted-object.h (refcounted_object): Likewise.
4649 * completer.h (struct completion_result): Likewise.
4650 * dwarf2read.c (struct dwarf2_per_objfile): Likewise.
4651 * filename-seen-cache.h (filename_seen_cache): Likewise.
4652 * gdbcore.h (thread_section_name): Likewise.
4653 * gdb_regex.h (compiled_regex): Likewise.
4654 * gdbthread.h (scoped_restore_current_thread): Likewise.
4655 * inferior.h (scoped_restore_current_inferior): Likewise.
4656 * jit.c (jit_reader): Likewise.
4657 * linespec.h (struct linespec_result): Likewise.
4658 * mi/mi-parse.h (struct mi_parse): Likewise.
4659 * nat/fork-inferior.c (execv_argv): Likewise.
4660 * progspace.h (scoped_restore_current_program_space): Likewise.
4661 * python/python-internal.h (class gdbpy_enter): Likewise.
4662 * regcache.h (regcache): Likewise.
4663 * target-descriptions.c (struct tdesc_reg): Likewise.
4664 (struct tdesc_type): Likewise.
4665 (struct tdesc_feature): Likewise.
4666 * ui-out.h (ui_out_emit_type): Likewise.
4667
0615127c
SM
46682017-09-18 Simon Marchi <simon.marchi@ericsson.com>
4669
4670 * dwarf2expr.c (dwarf_expr_context::execute_stack_op): Remove
4671 label abort_expression.
4672
5e187554
SM
46732017-09-16 Simon Marchi <simon.marchi@ericsson.com>
4674
4675 * common/buffer.c (buffer_xml_printf): Adjust.
4676 * common/xml-utils.c (xml_escape_text): Change return type to
4677 std::string, update code accordingly.
4678 * common/xml-utils.h (xml_escape_text): Change return type to
4679 std::string.
4680 * rs6000-aix-tdep.c (rs6000_aix_shared_library_to_xml): Adjust.
4681 * windows-tdep.c (windows_xfer_shared_library): Adjust.
4682 * unittests/xml-utils-selftests.c (test_xml_escape_text):
4683 Adjust.
4684
c3d7b541
SM
46852017-09-16 Simon Marchi <simon.marchi@ericsson.com>
4686
4687 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add new source file.
4688 (SUBDIR_UNITTESTS_OBS): Add new object file.
4689 * unittests/xml-utils-selftests.c: New file.
4690
1526853e
SM
46912017-09-16 Simon Marchi <simon.marchi@ericsson.com>
4692
4693 * common/selftest.h (selftest): New struct/interface.
4694 (register_test): Add name parameter, add new overload.
4695 (run_tests): Add filter parameter.
4696 (for_each_selftest_ftype): New typedef.
4697 (for_each_selftest): New declaration.
4698 * common/selftest.c (tests): Change type to
4699 map<string, unique_ptr<selftest>>.
4700 (simple_selftest): New struct.
4701 (register_test): New function.
4702 (register_test): Add name parameter and use it.
4703 (run_tests): Add filter parameter and use it. Add prints.
4704 Adjust to vector -> map change.
4705 * aarch64-tdep.c (_initialize_aarch64_tdep): Add names when
4706 registering selftests.
4707 * arm-tdep.c (_initialize_arm_tdep): Likewise.
4708 * disasm-selftests.c (_initialize_disasm_selftests): Likewise.
4709 * dwarf2-frame.c (_initialize_dwarf2_frame): Likewise.
4710 * dwarf2loc.c (_initialize_dwarf2loc): Likewise.
4711 * findvar.c (_initialize_findvar): Likewise.
4712 * gdbarch-selftests.c (_initialize_gdbarch_selftests): Likewise.
4713 * maint.c (maintenance_selftest): Update call to run_tests.
4714 (maintenance_info_selftests): New function.
4715 (_initialize_maint_cmds): Register "maintenance info selftests"
4716 command. Update "maintenance selftest" doc.
4717 * regcache.c (_initialize_regcache): Add names when registering
4718 selftests.
4719 * rust-exp.y (_initialize_rust_exp): Likewise.
4720 * selftest-arch.c (gdbarch_selftest): New struct.
4721 (gdbarch_tests): Remove.
4722 (register_test_foreach_arch): Add name parameter. Call
4723 register_test.
4724 (tests_with_arch): Remove, move most content to
4725 gdbarch_selftest::operator().
4726 (_initialize_selftests_foreach_arch): Remove.
4727 * selftest-arch.h (register_test_foreach_arch): Add name
4728 parameter.
4729 (run_tests_with_arch): New declaration.
4730 * utils-selftests.c (_initialize_utils_selftests): Add names
4731 when registering selftests.
4732 * utils.c (_initialize_utils): Likewise.
4733 * unittests/array-view-selftests.c
4734 (_initialize_array_view_selftests): Likewise.
4735 * unittests/environ-selftests.c (_initialize_environ_selftests):
4736 Likewise.
4737 * unittests/function-view-selftests.c
4738 (_initialize_function_view_selftests): Likewise.
4739 * unittests/offset-type-selftests.c
4740 (_initialize_offset_type_selftests): Likewise.
4741 * unittests/optional-selftests.c
4742 (_initialize_optional_selftests): Likewise.
4743 * unittests/scoped_restore-selftests.c
4744 (_initialize_scoped_restore_selftests): Likewise.
4745 * NEWS: Document "maintenance selftest" and "maint info
4746 selftests".
4747
5846367a
SM
47482017-09-16 Simon Marchi <simon.marchi@ericsson.com>
4749
4750 * mi/mi-main.c (mi_load_progress): Restore current_uiout using a
4751 scoped_restore.
4752
bd77e8ff
SM
47532017-09-16 Simon Marchi <simon.marchi@ericsson.com>
4754
4755 * mi/mi-main.c (mi_load_progress): Make uiout variable
4756 a unique_ptr.
4757
26a67918
PA
47582017-09-15 Pedro Alves <palves@redhat.com>
4759
4760 * compile/compile-c-types.c (convert_enum, convert_int)
4761 (convert_float): Adjust to refer to int_type_v0 and float_type_v0.
4762
3f8a7804
SM
47632017-09-15 Simon Marchi <simon.marchi@ericsson.com>
4764
4765 * dwarf2read.c (copy_string): Remove.
4766 (parse_macro_definition): Replace copy_string with savestring.
4767
8d200706
YQ
47682017-09-15 Yao Qi <yao.qi@linaro.org>
4769
4770 * configure.tgt (i[34567]86-*-darwin*): Append amd64.o to
4771 gdb_target_obs.
4772 (i[34567]86-*-solaris2.1[0-9]* | x86_64-*-solaris2.1[0-9]*):
4773 Likewise.
4774 (i[34567]86-*-linux*): Likewise.
4775
d185219d
SM
47762017-09-14 Simon Marchi <simon.marchi@ericsson.com>
4777
4778 * dwarf2expr.h (dwarf_stack_value): Add constructor.
4779 (dwarf_expr_context) <~dwarf_expr_context>: Define as default.
4780 <stack>: Change type to std::vector.
4781 <stack_len, stack_allocated>: Remove.
4782 <grow_stack>: Remove.
4783 * dwarf2expr.c (dwarf_expr_context::dwarf_expr_context): Adjust.
4784 (dwarf_expr_context::~dwarf_expr_context): Remove.
4785 (dwarf_expr_context::grow_stack): Remove.
4786 (dwarf_expr_context::push): Adjust.
4787 (dwarf_expr_context::pop): Adjust.
4788 (dwarf_expr_context::fetch): Adjust.
4789 (dwarf_expr_context::fetch_in_stack_memory): Adjust.
4790 (dwarf_expr_context::stack_empty_p): Adjust.
4791 (dwarf_expr_context::execute_stack_op): Adjust.
4792
eccd80d6
SM
47932017-09-14 Simon Marchi <simon.marchi@ericsson.com>
4794
4795 * dwarf2expr.h (dwarf_expr_context) <stack_empty_p>: Change
4796 return type to bool.
4797 * dwarf2expr.c (dwarf_expr_context::stack_empty_p): Likewise.
4798
69009882
SM
47992017-09-14 Simon Marchi <simon.marchi@ericsson.com>
4800
4801 * dwarf2expr.h (dwarf_expr_piece) <v.mem.in_stack_memory>:
4802 Change type to bool.
4803 (dwarf_stack_value) <in_stack_memory>: Likewise.
4804 (dwarf_expr_context) <push_address>: Change parameter type to
4805 bool.
4806 <fetch_in_stack_memory>: Change return type to bool.
4807 <push>: Change parameter type to bool.
4808 * dwarf2expr.c (dwarf_expr_context::push): Change parameter type
4809 to bool.
4810 (dwarf_expr_context::push_address): Likewise.
4811 (dwarf_expr_context::fetch_in_stack_memory): Change return type
4812 to bool.
4813 (dwarf_expr_context::execute_stack_op): Adjust.
4814 * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Adjust.
4815
1e467161
SM
48162017-09-14 Simon Marchi <simon.marchi@ericsson.com>
4817
4818 * dwarf2expr.h (struct dwarf_expr_piece): Move up.
4819 (struct dwarf_expr_context) <n_pieces>: Remove.
4820 <pieces>: Change type to std::vector.
4821 * dwarf2expr.c (dwarf_expr_context::dwarf_expr_context): Adjust.
4822 (dwarf_expr_context::~dwarf_expr_context): Don't manually free
4823 pieces.
4824 (dwarf_expr_context::add_piece): Adjust.
4825 * dwarf2loc.c (struct piece_closure): Initialize fields.
4826 <n_pieces>: Remove.
4827 <pieces>: Change type to std::vector.
4828 (allocate_piece_closure): Adjust, change parameter to
4829 std::vector rvalue and std::move it to piece_closure.
4830 (rw_pieced_value): Adjust.
4831 (check_pieced_synthetic_pointer): Adjust.
4832 (indirect_synthetic_pointer): Adjust.
4833 (coerce_pieced_ref): Adjust.
4834 (free_pieced_value_closure): Adjust. Use delete to free
4835 piece_closure.
4836 (dwarf2_evaluate_loc_desc_full): Adjust. std::move ctx.pieces
4837 to allocate_piece_closure.
4838 (dwarf2_loc_desc_get_symbol_read_needs): Adjust.
4839
0782db84
SM
48402017-09-12 Simon Marchi <simon.marchi@ericsson.com>
4841
4842 * probe.h (probe_ops_cp): Remove typedef.
4843 (DEF_VEC_P (probe_ops_cp)): Remove.
4844 (all_probe_ops): Change type to std::vector.
4845 * probe.c (info_probes_for_ops): Adjust to vector change.
4846 (probe_linespec_to_ops): Likewise.
4847 (all_probe_ops): Change type to std::vector.
4848 (_initialize_probe): Adjust to vector change.
4849 * dtrace-probe.c (_initialize_dtrace_probe): Likewise.
4850 * elfread.c (elf_get_probes): Likewise.
4851 * stap-probe.c (_initialize_stap_probe): Likewise.
4852
1eac6bea
SM
48532017-09-12 Simon Marchi <simon.marchi@ericsson.com>
4854
4855 * probe.h (struct bound_probe): Define constructors.
4856 * probe.c (bound_probe_s): Remove typedef.
4857 (DEF_VEC_O (bound_probe_s)): Remove VEC.
4858 (collect_probes): Change return type to std::vector, remove
4859 cleanup.
4860 (compare_probes): Return bool, change parameter type. Change
4861 semantic to "less than".
4862 (gen_ui_out_table_header_info): Change parameter to std::vector
4863 and update.
4864 (exists_probe_with_pops): Likewise.
4865 (info_probes_for_ops): Update to std::vector change.
4866 (enable_probes_command): Likewise.
4867 (disable_probes_command): Likewise.
4868
aaa63a31
SM
48692017-09-12 Simon Marchi <simon.marchi@ericsson.com>
4870
4871 * probe.h (struct probe_ops) <get_probes>: Change parameter from
4872 vec to std::vector.
4873 * probe.c (parse_probes_in_pspace): Update.
4874 (find_probes_in_objfile): Update.
4875 (find_probe_by_pc): Update.
4876 (collect_probes): Update.
4877 (probe_any_get_probes): Update.
4878 * symfile.h (struct sym_probe_fns) <sym_get_probes> Change
4879 return type to reference to std::vector.
4880 * dtrace-probe.c (dtrace_process_dof_probe): Change parameter to
4881 std::vector and update.
4882 (dtrace_process_dof): Likewise.
4883 (dtrace_get_probes): Likewise.
4884 * elfread.c (elf_get_probes): Change return type to std::vector,
4885 store an std::vector in bfd_data.
4886 (probe_key_free): Update to std::vector.
4887 * stap-probe.c (handle_stap_probe): Change parameter to
4888 std::vector and update.
4889 (stap_get_probes): Likewise.
4890 * symfile-debug.c (debug_sym_get_probes): Change return type to
4891 std::vector and update.
4892
cb85b21b
TT
48932017-09-11 Tom Tromey <tom@tromey.com>
4894
4895 * breakpoint.c (program_breakpoint_here_p): Update.
4896 * target.c (make_scoped_restore_show_memory_breakpoints): Rename
4897 from make_show_memory_breakpoints_cleanup. Return a
4898 scoped_restore_tmpl<int>.
4899 (restore_show_memory_breakpoints): Remove.
4900 * ppc-linux-tdep.c (ppc_linux_memory_remove_breakpoint): Update.
4901 * mem-break.c (memory_validate_breakpoint): Update.
4902 * ia64-tdep.c (ia64_memory_insert_breakpoint): Update.
4903 (ia64_memory_remove_breakpoint): Update.
4904 (ia64_breakpoint_from_pc): Update.
4905 * target.h (make_scoped_restore_show_memory_breakpoints): Rename
4906 from make_show_memory_breakpoints_cleanup.
4907
8fbc99ef
TT
49082017-09-11 Tom Tromey <tom@tromey.com>
4909
4910 * d-namespace.c (d_lookup_symbol): Use std::string.
4911 (find_symbol_in_baseclass): Likewise.
4912
50feb4bd
TT
49132017-09-11 Tom Tromey <tom@tromey.com>
4914
4915 * ctf.c (ctf_start): Use std::string.
4916
c6dc63a1
TT
49172017-09-11 Tom Tromey <tom@tromey.com>
4918
4919 * ada-lang.c (is_known_support_routine): Update.
4920 (ada_unhandled_exception_name_addr_from_raise): Update.
4921 * guile/scm-frame.c (gdbscm_frame_name): Update.
4922 * python/py-frame.c (frapy_name): Update.
4923 (frapy_function): Update.
4924 * stack.h (find_frame_funname): Update.
4925 * stack.c (find_frame_funname): Return unique_xmalloc_ptr.
4926 (print_frame): Update.
4927
d6b9b80f
TT
49282017-09-11 Tom Tromey <tom@tromey.com>
4929
4930 * findcmd.c (put_bits): Take a gdb::byte_vector.
4931 (parse_find_args): Return gdb::byte_vector. "args" now const.
4932 Remove "pattern_bufp" and "pattern_lenp" parameters. Remove
4933 cleanups.
4934 (find_command): Update.
4935
a9921622
TT
49362017-09-11 Tom Tromey <tom@tromey.com>
4937
4938 * cli/cli-script.c (class scoped_restore_hook_in): New.
4939 (clear_hook_in_cleanup): Remove.
4940 (execute_cmd_pre_hook, execute_cmd_post_hook): Use
4941 scoped_restore_hook_in.
4942
be0d7abb
TT
49432017-09-11 Tom Tromey <tom@tromey.com>
4944
4945 * cli/cli-script.c (restore_interp): Remove.
4946 (read_command_lines): Use scoped_restore_interp.
4947 * interps.c (scoped_restore_interp::set_temp): Rename from
4948 interp_set_temp.
4949 * interps.h (class scoped_restore_interp): New.
4950 (interp_set_temp): Remove.
4951
00f675ff
TT
49522017-09-11 Tom Tromey <tom@tromey.com>
4953
4954 * mi/mi-cmd-catch.c (mi_cmd_catch_assert)
4955 (mi_cmd_catch_exception, mi_catch_load_unload): Update.
4956 * mi/mi-cmd-break.c (setup_breakpoint_reporting): Return a
4957 scoped_restore.
4958 (mi_cmd_break_insert_1): Update.
4959 * mi/mi-cmd-break.h (setup_breakpoint_reporting): Return a
4960 scoped_restore.
4961
cb791d59
TT
49622017-09-11 Tom Tromey <tom@tromey.com>
4963
4964 * demangle.c (demangle_command): Update.
4965 * breakpoint.c (disable_command): Update.
4966 (enable_command): Update.
4967 (find_location_by_number): Make "number" const. Use
4968 get_number_trailer.
4969 * cli/cli-utils.c (extract_arg): Return std::string.
4970 * probe.c (parse_probe_linespec): Update. Change types.
4971 (collect_probes): Take string arguments.
4972 (parse_probe_linespec): Likewise.
4973 (info_probes_for_ops): Update.
4974 (enable_probes_command): Update.
4975 (disable_probes_command): Update.
4976 * break-catch-sig.c (catch_signal_split_args): Update.
4977 * mi/mi-parse.c (mi_parse): Update.
4978
2039bd9f
TT
49792017-09-11 Tom Tromey <tom@tromey.com>
4980
4981 * language.h (language_enum): Make argument const.
4982 * language.c (language_enum): Make argument const.
4983
f1735a53
TT
49842017-09-11 Tom Tromey <tom@tromey.com>
4985
4986 * common/common-utils.h (skip_to_space): Remove macro, redeclare
4987 as function.
4988 (skip_to_space): Rename from skip_to_space_const.
4989 * common/common-utils.c (skip_to_space): New function.
4990 (skip_to_space): Rename from skip_to_space_const.
4991 * cli/cli-utils.h (get_number): Rename from get_number_const.
4992 (extract_arg): Rename from extract_arg_const.
4993 * cli/cli-utils.c (get_number): Rename from get_number_const.
4994 (extract_arg): Rename from extract_arg_const.
4995 (number_or_range_parser::get_number): Use ::get_number.
4996 * aarch64-linux-tdep.c, ada-lang.c, arm-linux-tdep.c, ax-gdb.c,
4997 break-catch-throw.c, breakpoint.c, cli/cli-cmds.c, cli/cli-dump.c,
4998 cli/cli-script.c, cli/cli-setshow.c, compile/compile.c,
4999 completer.c, demangle.c, disasm.c, findcmd.c, linespec.c,
5000 linux-tdep.c, linux-thread-db.c, location.c, mi/mi-parse.c,
5001 minsyms.c, nat/linux-procfs.c, printcmd.c, probe.c,
5002 python/py-breakpoint.c, record.c, rust-exp.y, serial.c, stack.c,
5003 stap-probe.c, tid-parse.c, tracepoint.c: Update all callers.
5004
7d221d74
TT
50052017-09-11 Tom Tromey <tom@tromey.com>
5006
5007 * python/python.c (do_start_initialization): Use
5008 py-event-types.def to initialize types.
5009 Define all object type structures.
5010 * python/python-internal.h: Don't declare event initialization
5011 functions.
5012 * python/py-threadevent.c (thread_event_object_type): Don't
5013 define.
5014 * python/py-stopevent.c (stop_event_object_type): Don't define.
5015 * python/py-signalevent.c (signal_event_object_type): Don't
5016 declare or define.
5017 * python/py-newobjfileevent.c (new_objfile_event_object_type)
5018 (clear_objfiles_event_object_type): Don't declare or define.
5019 * python/py-infevents.c (inferior_call_pre_event_object_type)
5020 (inferior_call_post_event_object_type)
5021 (register_changed_event_object_type)
5022 (memory_changed_event_object_type): Don't declare or define.
5023 * python/py-inferior.c (new_thread_event_object_type)
5024 (new_inferior_event_object_type)
5025 (inferior_deleted_event_object_type): Don't declare or define.
5026 * python/py-exitedevent.c (exited_event_object_type): Don't
5027 declare or define.
5028 * python/py-evts.c (gdbpy_initialize_py_events): Use
5029 py-all-events.def.
5030 * python/py-events.h (thread_event_object_type): Don't declare.
5031 (events_object): Use py-all-events.def.
5032 * python/py-event.h (GDBPY_NEW_EVENT_TYPE): Remove. Use
5033 py-event-types.def.
5034 * python/py-event-types.def: New file.
5035 * python/py-continueevent.c (create_continue_event_object): Don't
5036 declare or define.
5037 * python/py-bpevent.c (breakpoint_event_object_type): Don't
5038 declare or define.
5039 * python/py-all-events.def: New file.
5040
35c61a1d
TT
50412017-09-11 Tom Tromey <tom@tromey.com>
5042
5043 * python/py-threadevent.c (create_thread_event_object): Return
5044 gdbpy_ref.
5045 * python/py-stopevent.h (create_stop_event_object)
5046 (create_breakpoint_event_object, create_signal_event_object):
5047 Update.
5048 * python/py-stopevent.c (create_stop_event_object): Return
5049 gdbpy_ref.
5050 (emit_stop_event): Update.
5051 * python/py-signalevent.c (create_signal_event_object): Return
5052 gdbpy_ref.
5053 * python/py-infevents.c (create_inferior_call_event_object):
5054 Update.
5055 * python/py-event.h (create_event_object)
5056 (create_thread_event_object): Update.
5057 * python/py-event.c (create_event_object): Return gdbpy_ref.
5058 * python/py-continueevent.c: Return gdbpy_ref.
5059 * python/py-bpevent.c (create_breakpoint_event_object): Return
5060 gdbpy_ref.
5061
7c96f8c1
TT
50622017-09-11 Tom Tromey <tom@tromey.com>
5063
5064 PR python/15622:
5065 * NEWS: Add entry.
5066 * python/python.c (do_start_initialization): Initialize new event
5067 types.
5068 * python/python-internal.h (gdbpy_initialize_new_inferior_event)
5069 (gdbpy_initialize_inferior_deleted_event)
5070 (gdbpy_initialize_new_thread_event): Declare.
5071 * python/py-threadevent.c (create_thread_event_object): Add option
5072 "thread" parameter.
5073 * python/py-inferior.c (new_thread_event_object_type)
5074 (new_inferior_event_object_type)
5075 (inferior_deleted_event_object_type): Declare.
5076 (python_new_inferior, python_inferior_deleted): New functions.
5077 (add_thread_object): Emit new_thread event.
5078 (gdbpy_initialize_inferior): Attach new functions to corresponding
5079 observers.
5080 (new_thread, new_inferior, inferior_deleted): Define new event
5081 types.
5082 * python/py-evts.c (gdbpy_initialize_py_events): Add new
5083 registries.
5084 * python/py-events.h (events_object) <new_inferior,
5085 inferior_deleted, new_thread>: New fields.
5086 * python/py-event.h (create_thread_event_breakpoint): Add optional
5087 "thread" parameter.
5088
72542b8e
AB
50892017-09-10 Andrew Burgess <andrew.burgess@embecosm.com>
5090
5091 * utils.c (abort_with_message): Don't compare gdb_stderr to NULL,
5092 check current_ui instead.
5093 (internal_vproblem): Likewise.
5094
0d64823e
SM
50952017-09-09 Simon Marchi <simon.marchi@ericsson.com>
5096
5097 * thread.c (print_thread_info_1): Remove unnecessary calls to
5098 uiout->is_mi_like_p.
5099
eb1e02fd
TT
51002017-09-09 Tom Tromey <tom@tromey.com>
5101
5102 * namespace.h (add_using_directive): Update.
5103 * namespace.c (add_using_directive): Change type of excludes to
5104 std::vector.
5105 * dwarf2read.c (read_import_statement): Use std::vector.
5106 (read_namespace): Update.
5107 * cp-namespace.c (cp_scan_for_anonymous_namespaces): Update.
5108
0fc21fd8
TT
51092017-09-09 Tom Tromey <tom@tromey.com>
5110
5111 * linespec.c (create_sals_line_offset): Use gdb::def_vector.
5112
49663d05
TT
51132017-09-09 Tom Tromey <tom@tromey.com>
5114
5115 * p-valprint.c (pascal_object_print_value): Use gdb::byte_vector.
5116
0b868b60
TT
51172017-09-09 Tom Tromey <tom@tromey.com>
5118
5119 * stack.c (func_command): Use gdb::def_vector.
5120
c0470d48
TT
51212017-09-09 Tom Tromey <tom@tromey.com>
5122
5123 * mi/mi-cmd-var.c (mi_cmd_var_list_children): Use gdb::optional,
5124 ui_out_emit_list, ui_out_emit_tuple.
5125 (mi_cmd_var_update): Likewise.
5126
ca5909c7
TT
51272017-09-09 Tom Tromey <tom@tromey.com>
5128
5129 * mi/mi-interp.c (mi_user_selected_context_changed): Use
5130 ui_out_redirect_pop.
5131 * guile/scm-ports.c (ioscm_with_output_to_port_worker): Use
5132 ui_out_redirect_pop.
5133 * utils.c (do_ui_out_redirect_pop)
5134 (make_cleanup_ui_out_redirect_pop): Remove.
5135 * top.c (execute_command_to_string): Use ui_out_redirect_pop.
5136 * utils.h (make_cleanup_ui_out_redirect_pop): Remove.
5137 * ui-out.h (ui_out_redirect_pop): New class.
5138
e6a2252a
TT
51392017-09-09 Tom Tromey <tom@tromey.com>
5140
5141 * mi/mi-main.c (output_cores): Use ui_out_emit_list.
5142 (list_available_thread_groups, mi_cmd_list_thread_groups)
5143 (mi_cmd_data_list_changed_registers, mi_cmd_data_read_memory)
5144 (mi_cmd_data_read_memory_bytes, mi_cmd_trace_frame_collected):
5145 Likewise.
5146
393702cd
TT
51472017-09-09 Tom Tromey <tom@tromey.com>
5148
5149 * disasm.c (gdb_pretty_print_disassembler::pretty_print_insn): Use
5150 ui_out_emit_tuple.
5151
76f9c9cf
TT
51522017-09-09 Tom Tromey <tom@tromey.com>
5153
5154 * target.c (flash_erase_command): Use ui_out_emit_tuple.
5155 * stack.c (print_frame): Use ui_out_emit_tuple.
5156 * spu-tdep.c (info_spu_event_command): Use ui_out_emit_tuple.
5157 (info_spu_mailbox_command, info_spu_dma_command)
5158 (info_spu_proxydma_command): Likewise.
5159 * mi/mi-main.c (mi_cmd_trace_frame_collected): Use
5160 ui_out_emit_tuple, gdb::byte_vector, bin2hex.
5161 * mi/mi-cmd-file.c (mi_cmd_file_list_shared_libraries): Use
5162 ui_out_emit_tuple.
5163 * breakpoint.c (print_it_watchpoint): Use ui_out_emit_tuple.
5164
dc9fe180
TT
51652017-09-09 Tom Tromey <tom@tromey.com>
5166
5167 * ui-out.h (make_cleanup_ui_out_table_begin_end): Remove.
5168 (class ui_out_emit_table): Update comment.
5169 * ui-out.c (do_cleanup_table_end)
5170 (make_cleanup_ui_out_table_begin_end): Remove.
5171 * spu-tdep.c (info_spu_mailbox_list): Use ui_out_emit_table.
5172 (info_spu_dma_cmdlist): Likewise.
5173 * probe.c (info_probes_for_ops): Use ui_out_emit_table.
5174 * darwin-nat-info.c (darwin_debug_regions_recurse): Use
5175 ui_out_emit_table.
5176
f8cc3da6
TT
51772017-09-09 Tom Tromey <tom@tromey.com>
5178
5179 * thread.c (print_thread_info_1): Use ui_out_emit_table,
5180 ui_out_emit_list, gdb::optional.
5181
481695ed
JB
51822017-09-09 John Baldwin <jhb@FreeBSD.org>
5183
5184 * aarch64-linux-nat.c: Remove _initialize_aarch64_linux_nat
5185 prototype.
5186 * aarch64-linux-tdep.c: Remove _initialize_aarch64_linux_tdep
5187 prototype.
5188 * aarch64-newlib-tdep.c: Remove _initialize_aarch64_newlib_tdep
5189 prototype.
5190 * aarch64-tdep.c: Remove _initialize_aarch64_tdep prototype.
5191 * ada-exp.y: Remove _initialize_ada_exp prototype.
5192 * ada-lang.c: Remove _initialize_ada_language prototype.
5193 * ada-tasks.c: Remove _initialize_tasks prototype.
5194 * addrmap.c: Remove _initialize_addrmap prototype.
5195 * agent.c: Remove _initialize_agent prototype.
5196 * aix-thread.c: Remove _initialize_aix_thread prototype.
5197 * alpha-bsd-nat.c: Remove _initialize_alphabsd_nat prototype.
5198 * alpha-linux-nat.c: Remove _initialize_alpha_linux_nat prototype.
5199 * alpha-linux-tdep.c: Remove _initialize_alpha_linux_tdep
5200 prototype.
5201 * alpha-nbsd-tdep.c: Remove _initialize_alphanbsd_tdep prototype.
5202 * alpha-obsd-tdep.c: Remove _initialize_alphaobsd_tdep prototype.
5203 * alpha-tdep.c: Remove _initialize_alpha_tdep prototype.
5204 * amd64-darwin-tdep.c: Remove _initialize_amd64_darwin_tdep
5205 prototype.
5206 * amd64-dicos-tdep.c: Remove _initialize_amd64_dicos_tdep
5207 prototype.
5208 * amd64-fbsd-nat.c: Remove _initialize_amd64fbsd_nat prototype.
5209 * amd64-fbsd-tdep.c: Remove _initialize_amd64fbsd_tdep prototype.
5210 * amd64-linux-nat.c: Remove _initialize_amd64_linux_nat prototype.
5211 * amd64-linux-tdep.c: Remove _initialize_amd64_linux_tdep
5212 prototype.
5213 * amd64-nbsd-nat.c: Remove _initialize_amd64nbsd_nat prototype.
5214 * amd64-nbsd-tdep.c: Remove _initialize_amd64nbsd_tdep prototype.
5215 * amd64-obsd-nat.c: Remove _initialize_amd64obsd_nat prototype.
5216 * amd64-obsd-tdep.c: Remove _initialize_amd64obsd_tdep prototype.
5217 * amd64-sol2-tdep.c: Remove _initialize_amd64_sol2_tdep prototype.
5218 * amd64-tdep.c: Remove _initialize_amd64_tdep prototype.
5219 * amd64-windows-nat.c: Remove _initialize_amd64_windows_nat
5220 prototype.
5221 * amd64-windows-tdep.c: Remove _initialize_amd64_windows_tdep
5222 prototype.
5223 * annotate.c: Remove _initialize_annotate prototype.
5224 * arc-newlib-tdep.c: Remove _initialize_arc_newlib_tdep prototype.
5225 * arc-tdep.c: Remove _initialize_arc_tdep prototype.
5226 * arch-utils.c: Remove _initialize_gdbarch_utils prototype.
5227 * arm-linux-nat.c: Remove _initialize_arm_linux_nat prototype.
5228 * arm-linux-tdep.c: Remove _initialize_arm_linux_tdep prototype.
5229 * arm-nbsd-tdep.c: Remove _initialize_arm_netbsd_tdep prototype.
5230 * arm-obsd-tdep.c: Remove _initialize_armobsd_tdep prototype.
5231 * arm-symbian-tdep.c: Remove _initialize_arm_symbian_tdep
5232 prototype.
5233 * arm-tdep.c: Remove _initialize_arm_tdep prototype.
5234 * arm-wince-tdep.c: Remove _initialize_arm_wince_tdep prototype.
5235 * auto-load.c: Remove _initialize_auto_load prototype.
5236 * auxv.c: Remove _initialize_auxv prototype.
5237 * avr-tdep.c: Remove _initialize_avr_tdep prototype.
5238 * ax-gdb.c: Remove _initialize_ax_gdb prototype.
5239 * bfin-linux-tdep.c: Remove _initialize_bfin_linux_tdep prototype.
5240 * bfin-tdep.c: Remove _initialize_bfin_tdep prototype.
5241 * break-catch-sig.c: Remove _initialize_break_catch_sig prototype.
5242 * break-catch-syscall.c: Remove _initialize_break_catch_syscall
5243 prototype.
5244 * break-catch-throw.c: Remove _initialize_break_catch_throw
5245 prototype.
5246 * breakpoint.c: Remove _initialize_breakpoint prototype.
5247 * bsd-uthread.c: Remove _initialize_bsd_uthread prototype.
5248 * btrace.c: Remove _initialize_btrace prototype.
5249 * charset.c: Remove _initialize_charset prototype.
5250 * cli/cli-cmds.c: Remove _initialize_cli_cmds prototype.
5251 * cli/cli-dump.c: Remove _initialize_cli_dump prototype.
5252 * cli/cli-interp.c: Remove _initialize_cli_interp prototype.
5253 * cli/cli-logging.c: Remove _initialize_cli_logging prototype.
5254 * cli/cli-script.c: Remove _initialize_cli_script prototype.
5255 * coff-pe-read.c: Remove _initialize_coff_pe_read prototype.
5256 * coffread.c: Remove _initialize_coffread prototype.
5257 * compile/compile.c: Remove _initialize_compile prototype.
5258 * complaints.c: Remove _initialize_complaints prototype.
5259 * completer.c: Remove _initialize_completer prototype.
5260 * copying.awk: Remove _initialize_copying prototype.
5261 * copying.c: Regenerate.
5262 * core-regset.c: Remove _initialize_core_regset prototype.
5263 * corefile.c: Remove _initialize_core prototype.
5264 * corelow.c: Remove _initialize_corelow prototype.
5265 * cp-abi.c: Remove _initialize_cp_abi prototype.
5266 * cp-namespace.c: Remove _initialize_cp_namespace prototype.
5267 * cp-support.c: Remove _initialize_cp_support prototype.
5268 * cp-valprint.c: Remove _initialize_cp_valprint prototype.
5269 * cris-linux-tdep.c: Remove _initialize_cris_linux_tdep prototype.
5270 * cris-tdep.c: Remove _initialize_cris_tdep prototype.
5271 * ctf.c: Remove _initialize_ctf prototype.
5272 * d-lang.c: Remove _initialize_d_language prototype.
5273 * darwin-nat-info.c: Remove _initialize_darwin_info_commands
5274 prototype.
5275 * darwin-nat.c: Remove _initialize_darwin_inferior prototype.
5276 * dbxread.c: Remove _initialize_dbxread prototype.
5277 * dcache.c: Remove _initialize_dcache prototype.
5278 * demangle.c: Remove _initialize_demangler prototype.
5279 * disasm-selftests.c: Remove _initialize_disasm_selftests
5280 prototype.
5281 * disasm.c: Remove _initialize_disasm prototype.
5282 * dtrace-probe.c: Remove _initialize_dtrace_probe prototype.
5283 * dummy-frame.c: Remove _initialize_dummy_frame prototype.
5284 * dwarf2-frame-tailcall.c: Remove _initialize_tailcall_frame
5285 prototype.
5286 * dwarf2-frame.c: Remove _initialize_dwarf2_frame prototype.
5287 * dwarf2expr.c: Remove _initialize_dwarf2expr prototype.
5288 * dwarf2loc.c: Remove _initialize_dwarf2loc prototype.
5289 * dwarf2read.c: Remove _initialize_dwarf2_read prototype.
5290 * elfread.c: Remove _initialize_elfread prototype.
5291 * exec.c: Remove _initialize_exec prototype.
5292 * extension.c: Remove _initialize_extension prototype.
5293 * f-lang.c: Remove _initialize_f_language prototype.
5294 * f-valprint.c: Remove _initialize_f_valprint prototype.
5295 * fbsd-nat.c: Remove _initialize_fbsd_nat prototype.
5296 * fbsd-tdep.c: Remove _initialize_fbsd_tdep prototype.
5297 * filesystem.c: Remove _initialize_filesystem prototype.
5298 * findcmd.c: Remove _initialize_mem_search prototype.
5299 * fork-child.c: Remove _initialize_fork_child prototype.
5300 * frame-base.c: Remove _initialize_frame_base prototype.
5301 * frame-unwind.c: Remove _initialize_frame_unwind prototype.
5302 * frame.c: Remove _initialize_frame prototype.
5303 * frv-linux-tdep.c: Remove _initialize_frv_linux_tdep prototype.
5304 * frv-tdep.c: Remove _initialize_frv_tdep prototype.
5305 * ft32-tdep.c: Remove _initialize_ft32_tdep prototype.
5306 * gcore.c: Remove _initialize_gcore prototype.
5307 * gdb_bfd.c: Remove _initialize_gdb_bfd prototype.
5308 * gdbarch.c: Regenerate.
5309 * gdbarch.sh: Remove _initialize_gdbarch prototype.
5310 * gdbtypes.c: Remove _initialize_gdbtypes prototype.
5311 * gnu-nat.c: Remove _initialize_gnu_nat prototype.
5312 * gnu-v2-abi.c: Remove _initialize_gnu_v2_abi prototype.
5313 * gnu-v3-abi.c: Remove _initialize_gnu_v3_abi prototype.
5314 * go-lang.c: Remove _initialize_go_language prototype.
5315 * go32-nat.c: Remove _initialize_go32_nat prototype.
5316 * guile/guile.c: Remove _initialize_guile prototype.
5317 * h8300-tdep.c: Remove _initialize_h8300_tdep prototype.
5318 * hppa-linux-nat.c: Remove _initialize_hppa_linux_nat prototype.
5319 * hppa-linux-tdep.c: Remove _initialize_hppa_linux_tdep prototype.
5320 * hppa-nbsd-nat.c: Remove _initialize_hppanbsd_nat prototype.
5321 * hppa-nbsd-tdep.c: Remove _initialize_hppanbsd_tdep prototype.
5322 * hppa-obsd-nat.c: Remove _initialize_hppaobsd_nat prototype.
5323 * hppa-obsd-tdep.c: Remove _initialize_hppaobsd_tdep prototype.
5324 * hppa-tdep.c: Remove _initialize_hppa_tdep prototype.
5325 * i386-bsd-nat.c: Remove _initialize_i386bsd_nat prototype.
5326 * i386-cygwin-tdep.c: Remove _initialize_i386_cygwin_tdep
5327 prototype.
5328 * i386-darwin-tdep.c: Remove _initialize_i386_darwin_tdep
5329 prototype.
5330 * i386-dicos-tdep.c: Remove _initialize_i386_dicos_tdep prototype.
5331 * i386-fbsd-nat.c: Remove _initialize_i386fbsd_nat prototype.
5332 * i386-fbsd-tdep.c: Remove _initialize_i386fbsd_tdep prototype.
5333 * i386-gnu-nat.c: Remove _initialize_i386gnu_nat prototype.
5334 * i386-gnu-tdep.c: Remove _initialize_i386gnu_tdep prototype.
5335 * i386-linux-nat.c: Remove _initialize_i386_linux_nat prototype.
5336 * i386-linux-tdep.c: Remove _initialize_i386_linux_tdep prototype.
5337 * i386-nbsd-nat.c: Remove _initialize_i386nbsd_nat prototype.
5338 * i386-nbsd-tdep.c: Remove _initialize_i386nbsd_tdep prototype.
5339 * i386-nto-tdep.c: Remove _initialize_i386nto_tdep prototype.
5340 * i386-obsd-nat.c: Remove _initialize_i386obsd_nat prototype.
5341 * i386-obsd-tdep.c: Remove _initialize_i386obsd_tdep prototype.
5342 * i386-sol2-nat.c: Remove _initialize_amd64_sol2_nat prototype.
5343 * i386-sol2-tdep.c: Remove _initialize_amd64_sol2_tdep prototype.
5344 * i386-tdep.c: Remove _initialize_i386_tdep prototype.
5345 * i386-windows-nat.c: Remove _initialize_i386_windows_nat
5346 prototype.
5347 * ia64-libunwind-tdep.c: Remove _initialize_libunwind_frame
5348 prototype.
5349 * ia64-linux-nat.c: Remove _initialize_ia64_linux_nat prototype.
5350 * ia64-linux-tdep.c: Remove _initialize_ia64_linux_tdep prototype.
5351 * ia64-tdep.c: Remove _initialize_ia64_tdep prototype.
5352 * ia64-vms-tdep.c: Remove _initialize_ia64_vms_tdep prototype.
5353 * infcall.c: Remove _initialize_infcall prototype.
5354 * infcmd.c: Remove _initialize_infcmd prototype.
5355 * inferior.c: Remove _initialize_inferiors prototype.
5356 * inflow.c: Remove _initialize_inflow prototype.
5357 * infrun.c: Remove _initialize_infrun prototype.
5358 * interps.c: Remove _initialize_interpreter prototype.
5359 * iq2000-tdep.c: Remove _initialize_iq2000_tdep prototype.
5360 * jit.c: Remove _initialize_jit prototype.
5361 * language.c: Remove _initialize_language prototype.
5362 * linux-fork.c: Remove _initialize_linux_fork prototype.
5363 * linux-nat.c: Remove _initialize_linux_nat prototype.
5364 * linux-tdep.c: Remove _initialize_linux_tdep prototype.
5365 * linux-thread-db.c: Remove _initialize_thread_db prototype.
5366 * lm32-tdep.c: Remove _initialize_lm32_tdep prototype.
5367 * m2-lang.c: Remove _initialize_m2_language prototype.
5368 * m32c-tdep.c: Remove _initialize_m32c_tdep prototype.
5369 * m32r-linux-nat.c: Remove _initialize_m32r_linux_nat prototype.
5370 * m32r-linux-tdep.c: Remove _initialize_m32r_linux_tdep prototype.
5371 * m32r-tdep.c: Remove _initialize_m32r_tdep prototype.
5372 * m68hc11-tdep.c: Remove _initialize_m68hc11_tdep prototype.
5373 * m68k-bsd-nat.c: Remove _initialize_m68kbsd_nat prototype.
5374 * m68k-bsd-tdep.c: Remove _initialize_m68kbsd_tdep prototype.
5375 * m68k-linux-nat.c: Remove _initialize_m68k_linux_tdep prototype.
5376 * m68k-linux-tdep.c: Remove _initialize_m68k_linux_tdep prototype.
5377 * m68k-tdep.c: Remove _initialize_m68k_tdep prototype.
5378 * m88k-bsd-nat.c: Remove _initialize_m68kbsd_nat prototype.
5379 * m88k-tdep.c: Remove _initialize_m68kbsd_tdep prototype.
5380 * machoread.c: Remove _initialize_machoread prototype.
5381 * macrocmd.c: Remove _initialize_macrocmd prototype.
5382 * macroscope.c: Remove _initialize_macroscope prototype.
5383 * maint.c: Remove _initialize_maint_cmds prototype.
5384 * mdebugread.c: Remove _initialize_mdebugread prototype.
5385 * memattr.c: Remove _initialize_mem prototype.
5386 * mep-tdep.c: Remove _initialize_mep_tdep prototype.
5387 * mi/mi-cmd-env.c: Remove _initialize_mi_cmd_env prototype.
5388 * mi/mi-cmds.c: Remove _initialize_mi_cmds prototype.
5389 * mi/mi-interp.c: Remove _initialize_mi_interp prototype.
5390 * mi/mi-main.c: Remove _initialize_mi_main prototype.
5391 * microblaze-linux-tdep.c: Remove
5392 _initialize_microblaze_linux_tdep prototype.
5393 * microblaze-tdep.c: Remove _initialize_microblaze_tdep prototype.
5394 * mips-fbsd-nat.c: Remove _initialize_mips_fbsd_nat prototype.
5395 * mips-fbsd-tdep.c: Remove _initialize_mips_fbsd_tdep prototype.
5396 * mips-linux-nat.c: Remove _initialize_mips_linux_nat prototype.
5397 * mips-linux-tdep.c: Remove _initialize_mips_linux_tdep prototype.
5398 * mips-nbsd-nat.c: Remove _initialize_mipsnbsd_nat prototype.
5399 * mips-nbsd-tdep.c: Remove _initialize_mipsnbsd_tdep prototype.
5400 * mips-sde-tdep.c: Remove _initialize_mips_sde_tdep prototype.
5401 * mips-tdep.c: Remove _initialize_mips_tdep prototype.
5402 * mips64-obsd-nat.c: Remove _initialize_mips64obsd_nat prototype.
5403 * mips64-obsd-tdep.c: Remove _initialize_mips64obsd_tdep
5404 prototype.
5405 * mipsread.c: Remove _initialize_mipsread prototype.
5406 * mn10300-linux-tdep.c: Remove _initialize_mn10300_linux_tdep
5407 prototype.
5408 * mn10300-tdep.c: Remove _initialize_mn10300_tdep prototype.
5409 * moxie-tdep.c: Remove _initialize_moxie_tdep prototype.
5410 * msp430-tdep.c: Remove _initialize_msp430_tdep prototype.
5411 * mt-tdep.c: Remove _initialize_mt_tdep prototype.
5412 * nds32-tdep.c: Remove _initialize_nds32_tdep prototype.
5413 * nios2-linux-tdep.c: Remove _initialize_nios2_linux_tdep
5414 prototype.
5415 * nios2-tdep.c: Remove _initialize_nios2_tdep prototype.
5416 * nto-procfs.c: Remove _initialize_procfs prototype.
5417 * nto-tdep.c: Remove _initialize_nto_tdep prototype.
5418 * objc-lang.c: Remove _initialize_objc_language prototype.
5419 * objfiles.c: Remove _initialize_objfiles prototype.
5420 * observer.c: Remove observer_test_first_notification_function,
5421 observer_test_second_notification_function,
5422 observer_test_third_notification_function, and
5423 _initialize_observer prototypes.
5424 * opencl-lang.c: Remove _initialize_opencl_language prototypes.
5425 * osabi.c: Remove _initialize_gdb_osabi prototype.
5426 * osdata.c: Remove _initialize_osdata prototype.
5427 * p-valprint.c: Remove _initialize_pascal_valprint prototype.
5428 * parse.c: Remove _initialize_parse prototype.
5429 * ppc-fbsd-nat.c: Remove _initialize_ppcfbsd_nat prototype.
5430 * ppc-fbsd-tdep.c: Remove _initialize_ppcfbsd_tdep prototype.
5431 * ppc-linux-nat.c: Remove _initialize_ppc_linux_nat prototype.
5432 * ppc-linux-tdep.c: Remove _initialize_ppc_linux_tdep prototype.
5433 * ppc-nbsd-nat.c: Remove _initialize_ppcnbsd_nat prototype.
5434 * ppc-nbsd-tdep.c: Remove _initialize_ppcnbsd_tdep prototype.
5435 * ppc-obsd-nat.c: Remove _initialize_ppcobsd_nat prototype.
5436 * ppc-obsd-tdep.c: Remove _initialize_ppcobsd_tdep prototype.
5437 * printcmd.c: Remove _initialize_printcmd prototype.
5438 * probe.c: Remove _initialize_probe prototype.
5439 * proc-api.c: Remove _initialize_proc_api prototype.
5440 * proc-events.c: Remove _initialize_proc_events prototype.
5441 * proc-service.c: Remove _initialize_proc_service prototype.
5442 * procfs.c: Remove _initialize_procfs prototype.
5443 * psymtab.c: Remove _initialize_psymtab prototype.
5444 * python/python.c: Remove _initialize_python prototype.
5445 * ravenscar-thread.c: Remove _initialize_ravenscar prototype.
5446 * record-btrace.c: Remove _initialize_record_btrace prototype.
5447 * record-full.c: Remove _initialize_record_full prototype.
5448 * record.c: Remove _initialize_record prototype.
5449 * regcache.c: Remove _initialize_regcache prototype.
5450 * reggroups.c: Remove _initialize_reggroup prototype.
5451 * remote-notif.c: Remove _initialize_notif prototype.
5452 * remote-sim.c: Remove _initialize_remote_sim prototype.
5453 * remote.c: Remove _initialize_remote prototype.
5454 * reverse.c: Remove _initialize_reverse prototype.
5455 * rl78-tdep.c: Remove _initialize_rl78_tdep prototype.
5456 * rs6000-aix-tdep.c: Remove _initialize_rs6000_aix_tdep prototype.
5457 * rs6000-lynx178-tdep.c: Remove _initialize_rs6000_lynx178_tdep
5458 prototype.
5459 * rs6000-nat.c: Remove _initialize_rs6000_nat prototype.
5460 * rs6000-tdep.c: Remove _initialize_rs6000_tdep prototype.
5461 * rust-exp.y: Remove _initialize_rust_exp prototype.
5462 * rx-tdep.c: Remove _initialize_rx_tdep prototype.
5463 * s390-linux-nat.c: Remove _initialize_s390_nat prototype.
5464 * s390-linux-tdep.c: Remove _initialize_s390_tdep prototype.
5465 * score-tdep.c: Remove _initialize_score_tdep prototype.
5466 * selftest-arch.c: Remove _initialize_selftests_foreach_arch
5467 prototype.
5468 * ser-go32.c: Remove _initialize_ser_dos prototype.
5469 * ser-mingw.c: Remove _initialize_ser_windows prototype.
5470 * ser-pipe.c: Remove _initialize_ser_pipe prototype.
5471 * ser-tcp.c: Remove _initialize_ser_tcp prototype.
5472 * ser-unix.c: Remove _initialize_ser_hardwire prototype.
5473 * serial.c: Remove _initialize_serial prototype.
5474 * sh-linux-tdep.c: Remove _initialize_sh_linux_tdep prototype.
5475 * sh-nbsd-nat.c: Remove _initialize_shnbsd_nat prototype.
5476 * sh-nbsd-tdep.c: Remove _initialize_shnbsd_tdep prototype.
5477 * sh-tdep.c: Remove _initialize_sh_tdep prototype.
5478 * skip.c: Remove _initialize_step_skip prototype.
5479 * sol-thread.c: Remove _initialize_sol_thread prototype.
5480 * solib-aix.c: Remove _initialize_solib_aix prototype.
5481 * solib-darwin.c: Remove _initialize_darwin_solib prototype.
5482 * solib-dsbt.c: Remove _initialize_dsbt_solib prototype.
5483 * solib-frv.c: Remove _initialize_frv_solib prototype.
5484 * solib-spu.c: Remove _initialize_spu_solib prototype.
5485 * solib-svr4.c: Remove _initialize_svr4_solib prototype.
5486 * solib-target.c: Remove _initialize_solib_target prototype.
5487 * solib.c: Remove _initialize_solib prototype.
5488 * source.c: Remove _initialize_source prototype.
5489 * sparc-linux-nat.c: Remove _initialize_sparc_linux_nat prototype.
5490 * sparc-linux-tdep.c: Remove _initialize_sparc_linux_tdep
5491 prototype.
5492 * sparc-nat.c: Remove _initialize_sparc_nat prototype.
5493 * sparc-nbsd-nat.c: Remove _initialize_sparcnbsd_nat prototype.
5494 * sparc-nbsd-tdep.c: Remove _initialize_sparcnbsd_tdep prototype.
5495 * sparc-obsd-tdep.c: Remove _initialize_sparc32obsd_tdep
5496 prototype.
5497 * sparc-sol2-nat.c: Remove _initialize_sparc_sol2_nat prototype.
5498 * sparc-sol2-tdep.c: Remove _initialize_sparc_sol2_tdep prototype.
5499 * sparc-tdep.c: Remove _initialize_sparc_tdep prototype.
5500 * sparc64-fbsd-nat.c: Remove _initialize_sparc64fbsd_nat
5501 prototype.
5502 * sparc64-fbsd-tdep.c: Remove _initialize_sparc64fbsd_tdep
5503 prototype.
5504 * sparc64-linux-nat.c: Remove _initialize_sparc64_linux_nat
5505 prototype.
5506 * sparc64-linux-tdep.c: Remove _initialize_sparc64_linux_tdep
5507 prototype.
5508 * sparc64-nat.c: Remove _initialize_sparc64_nat prototype.
5509 * sparc64-nbsd-nat.c: Remove _initialize_sparc64nbsd_nat
5510 prototype.
5511 * sparc64-nbsd-tdep.c: Remove _initialize_sparc64nbsd_tdep
5512 prototype.
5513 * sparc64-obsd-nat.c: Remove _initialize_sparc64obsd_nat
5514 prototype.
5515 * sparc64-obsd-tdep.c: Remove _initialize_sparc64obsd_tdep
5516 prototype.
5517 * sparc64-sol2-tdep.c: Remove _initialize_sparc64_sol2_tdep
5518 prototype.
5519 * spu-linux-nat.c: Remove _initialize_spu_nat prototype.
5520 * spu-multiarch.c: Remove _initialize_spu_multiarch prototype.
5521 * spu-tdep.c: Remove _initialize_spu_tdep prototype.
5522 * stabsread.c: Remove _initialize_stabsread prototype.
5523 * stack.c: Remove _initialize_stack prototype.
5524 * stap-probe.c: Remove _initialize_stap_probe prototype.
5525 * std-regs.c: Remove _initialize_frame_reg prototype.
5526 * symfile-debug.c: Remove _initialize_symfile_debug prototype.
5527 * symfile-mem.c: Remove _initialize_symfile_mem prototype.
5528 * symfile.c: Remove _initialize_symfile prototype.
5529 * symmisc.c: Remove _initialize_symmisc prototype.
5530 * symtab.c: Remove _initialize_symtab prototype.
5531 * target-dcache.c: Remove _initialize_target_dcache prototype.
5532 * target-descriptions.c: Remove _initialize_target_descriptions
5533 prototype.
5534 * thread.c: Remove _initialize_thread prototype.
5535 * tic6x-linux-tdep.c: Remove _initialize_tic6x_linux_tdep
5536 prototype.
5537 * tic6x-tdep.c: Remove _initialize_tic6x_tdep prototype.
5538 * tilegx-linux-nat.c: Remove _initialize_tile_linux_nat prototype.
5539 * tilegx-linux-tdep.c: Remove _initialize_tilegx_linux_tdep
5540 prototype.
5541 * tilegx-tdep.c: Remove _initialize_tilegx_tdep prototype.
5542 * tracefile-tfile.c: Remove _initialize_tracefile_tfile prototype.
5543 * tracefile.c: Remove _initialize_tracefile prototype.
5544 * tracepoint.c: Remove _initialize_tracepoint prototype.
5545 * tui/tui-hooks.c: Remove _initialize_tui_hooks prototype.
5546 * tui/tui-interp.c: Remove _initialize_tui_interp prototype.
5547 * tui/tui-layout.c: Remove _initialize_tui_layout prototype.
5548 * tui/tui-regs.c: Remove _initialize_tui_regs prototype.
5549 * tui/tui-stack.c: Remove _initialize_tui_stack prototype.
5550 * tui/tui-win.c: Remove _initialize_tui_win prototype.
5551 * tui/tui.c: Remove _initialize_tui prototype.
5552 * typeprint.c: Remove _initialize_typeprint prototype.
5553 * user-regs.c: Remove _initialize_user_regs prototype.
5554 * utils.c: Remove _initialize_utils prototype.
5555 * v850-tdep.c: Remove _initialize_v850_tdep prototype.
5556 * valarith.c: Remove _initialize_valarith prototype.
5557 * valops.c: Remove _initialize_valops prototype.
5558 * valprint.c: Remove _initialize_valprint prototype.
5559 * value.c: Remove _initialize_values prototype.
5560 * varobj.c: Remove _initialize_varobj prototype.
5561 * vax-bsd-nat.c: Remove _initialize_vaxbsd_nat prototype.
5562 * vax-nbsd-tdep.c: Remove _initialize_vaxnbsd_tdep prototype.
5563 * vax-tdep.c: Remove _initialize_vax_tdep prototype.
5564 * windows-nat.c: Remove _initialize_windows_nat,
5565 _initialize_check_for_gdb_ini, and _initialize_loadable
5566 prototypes.
5567 * windows-tdep.c: Remove _initialize_windows_tdep prototype.
5568 * xcoffread.c: Remove _initialize_xcoffread prototype.
5569 * xml-support.c: Remove _initialize_xml_support prototype.
5570 * xstormy16-tdep.c: Remove _initialize_xstormy16_tdep prototype.
5571 * xtensa-linux-nat.c: Remove _initialize_xtensa_linux_nat
5572 prototype.
5573 * xtensa-linux-tdep.c: Remove _initialize_xtensa_linux_tdep
5574 prototype.
5575 * xtensa-tdep.c: Remove _initialize_xtensa_tdep prototype.
5576
a611b5cb
KS
55772017-09-08 Keith Seitz <keiths@redhat.com>
5578
5579 * dwarf2read.c (struct field_info) <fnfields>: Remove unused
5580 field.
5581
469412dd
CW
55822017-09-08 Christoph Weinmann <christoph.t.weinmann@intel.com>
5583
5584 * f-valprint.c (f_val_print): Remove check for one byte
5585 sized integers. Remove printing of character type.
5586
a5ad232b
FP
55872017-09-08 Frank Penczek <frank.penczek@intel.com>
5588 Christoph Weinmann <christoph.t.weinmann@intel.com>
5589 Bernhard Heckel <bernhard.heckel@intel.com>
5590
5591 * f-typeprint.c (f_type_print_base): Use fprintfi_filtered
5592 to maintain proper indentation when printing pointers/refs.
5593
e5014227
JB
55942017-09-07 Joel Brobecker <brobecker@adacore.com>
5595
5596 GDB 8.0.1 released.
5597
63c99141
JB
55982017-09-07 Joel Brobecker <brobecker@adacore.com>
5599
5600 * NEWS (Changes in GDB 7.11): Remove entry for QStartupWithShell.
5601
69c1e056
TT
56022017-09-05 Tom Tromey <tom@tromey.com>
5603
5604 * parse.c (funcall_chain): Now a std::vector.
5605 (start_arglist, end_arglist): Simplify.
5606 (free_funcalls): Remove.
5607 (parse_exp_in_context_1): Remove cleanup.
5608
fef704bf
TT
56092017-09-05 Tom Tromey <tom@tromey.com>
5610
5611 * go-exp.y (go_parse): Don't create a cleanup.
5612
5613c585
TT
56132017-09-05 Tom Tromey <tom@tromey.com>
5614
5615 * d-exp.y (PrimaryExpression): Use std::string.
5616 (d_parse): Don't create a cleanup.
5617
eae49211
TT
56182017-09-05 Tom Tromey <tom@tromey.com>
5619
5620 * utils.c (do_clear_parser_state): Remove.
5621 (make_cleanup_clear_parser_state): Remove.
5622 * p-exp.y (pascal_parse): Use scoped_restore.
5623 * m2-exp.y (m2_parse): Use scoped_restore.
5624 * f-exp.y (f_parse): Use scoped_restore.
5625 * d-exp.y (d_parse): Use scoped_restore.
5626 * c-exp.y (c_parse): Use scoped_restore.
5627 * ada-exp.y (ada_parse): Use scoped_restore.
5628 * utils.h (make_cleanup_clear_parser_state): Remove.
5629
73b9be8b
KS
56302017-09-06 Keith Seitz <keiths@redhat.com>
5631
5632 * dwarf2read.c (dw2_linkage_name_attr): New function.
5633 (dw2_linkage_name): New function.
5634 (dwarf2_compute_name, dwarf2_physname, read_call_site_scope)
5635 (guess_full_die_structure_name, dwarf2_name): Use dw2_linkage_name.
5636 (anonymous_struct_prefix, dwarf2_name): Use dw2_linkage_name_attr.
5637
a102602b
KR
56382017-09-06 Kamil Rytarowski <n54@gmx.com>
5639
5640 * config/djgpp/djconfig.sh: Correct shell portability issue.
5641
28ad437d
KR
56422017-09-06 Kamil Rytarowski <n54@gmx.com>
5643
5644 * configure.nat: Define HAVE_NATIVE_GCORE_HOST on NetBSD.
5645
351787dd
JB
56462017-09-06 John Baldwin <jhb@FreeBSD.org>
5647
5648 * Makefile.in (ALLDEPFILES): Add mips-fbsd-nat.c.
5649 * NEWS: Mention new FreeBSD/mips native configuration.
5650 * configure.host: Add aarch64*-*-freebsd*.
5651 * configure.nat: Likewise.
5652 * aarch64-fbsd-nat.c: New file.
5653
c0f84956
JB
56542017-09-06 John Baldwin <jhb@FreeBSD.org>
5655
5656 * Makefile.in (ALL_64_TARGET_OBS): Add aarch64-fbsd-tdep.o.
5657 (ALLDEPFILES): Add aarch64-fbsd-tdep.c.
5658 * NEWS: Mention new FreeBSD/aarch64 target.
5659 * configure.tgt: Add aarch64*-*-freebsd*.
5660 * aarch64-fbsd-tdep.c: New file.
5661 * aarch64-fbsd-tdep.h: New file.
5662
7610297a
KR
56632017-09-06 Kamil Rytarowski <n54@gmx.com>
5664
5665 * MAINTAINERS (Write After Approval): Add Kamil Rytarowski.
5666
fbd1b771
JK
56672017-09-06 Jan Kratochvil <jan.kratochvil@redhat.com>
5668
5669 * parse.c (find_minsym_type_and_address): Don't relocate addresses
5670 of TLS symbols.
5671
5ca79eae
PW
56722017-09-05 Philippe Waroquiers <philippe.waroquiers@skynet.be>
5673
5674 * objfiles.c (get_objfile_bfd_data): Remove useless obstack_init
5675 call.
5676
bf93d7ba
SM
56772017-09-05 Simon Marchi <simon.marchi@ericsson.com>
5678
5679 * infrun.c (follow_exec): Call add_thread after
5680 target_find_description.
5681
1bb7c059
SM
56822017-09-05 Simon Marchi <simon.marchi@ericsson.com>
5683
5684 * infrun.c (handle_inferior_event_1): When exec'ing, read
5685 stop_pc after follow_exec.
5686
fc809827
SM
56872017-09-05 Simon Marchi <simon.marchi@ericsson.com>
5688
5689 * remote.c (process_g_packet): Update error message.
5690
d2fcdd85
YQ
56912017-09-05 Yao Qi <yao.qi@linaro.org>
5692
5693 * configure.tgt (gdb_target_obs): Add i386.o for x86_64-*
5694 targets.
5695
e69570ee
PA
56962017-09-05 Pedro Alves <palves@redhat.com>
5697
5698 * eval.c (eval_call, evaluate_funcall): New functions, factored
5699 out from ...
5700 (evaluate_subexp_standard): ... this.
5701
22916b07
YQ
57022017-09-05 Yao Qi <yao.qi@linaro.org>
5703
5704 * amd64-tdep.c (amd64_target_description): Create target
5705 descriptions.
5706 (_initialize_amd64_tdep): Don't call functions
5707 initialize_tdesc_amd64_*. Add self tests.
5708 * arch/amd64.c (amd64_create_target_description): Add parameter
5709 is_linux. Call set_tdesc_osabi if is_linux is true.
5710 * arch/amd64.h (amd64_create_target_description): Update the
5711 declaration.
5712 * arch/i386.c (i386_create_target_description): Add parameter
5713 is_linux. Call set_tdesc_osabi if is_linux is true.
5714 * arch/i386.h (i386_create_target_description): Update
5715 declaration.
5716 * configure.tgt: Add i386.o to gdb_target_obs.
5717 * features/Makefile (XMLTOC): Remove i386/*.xml.
5718 * features/i386/amd64-avx-avx512.c: Remove.
5719 * features/i386/amd64-avx-mpx-avx512-pku.c: Remove.
5720 * features/i386/amd64-avx-mpx.c: Remove.
5721 * features/i386/amd64-avx.c: Remove.
5722 * features/i386/amd64-mpx.c: Remove.
5723 * features/i386/amd64.c: Remove.
5724 * features/i386/i386-avx-avx512.c: Remove.
5725 * features/i386/i386-avx-mpx-avx512-pku.c: Remove.
5726 * features/i386/i386-avx-mpx.c: Remove.
5727 * features/i386/i386-avx.c: Remove.
5728 * features/i386/i386-mmx.c: Remove.
5729 * features/i386/i386-mpx.c: Remove.
5730 * features/i386/i386.c: Remove.
5731 * i386-tdep.c: Don't include features/i386/i386*.c., include
5732 target-descriptions.h and arch/i386.h.
5733 (i386_target_description): Create target descriptions.
5734 (i386_gdbarch_init): Don't call initialize_tdesc_i386_*
5735 functions. Do self tests.
5736
0854b7b1
YQ
57372017-09-05 Yao Qi <yao.qi@linaro.org>
5738
5739 * features/Makefile (XMLTOC): Remove i386/amd64XXX-linux.xml.
5740 * features/i386/amd64-avx-avx512-linux.c: Removed.
5741 * features/i386/amd64-avx-linux.c: Removed.
5742 * features/i386/amd64-avx-mpx-avx512-pku-linux.c: Removed.
5743 * features/i386/amd64-avx-mpx-linux.c: Removed.
5744 * features/i386/amd64-linux.c: Removed.
5745 * features/i386/amd64-mpx-linux.c: Removed.
5746 * features/i386/x32-avx-avx512-linux.c: Removed.
5747 * features/i386/x32-avx-linux.c: Removed.
5748 * features/i386/x32-linux.c: Removed.
5749
b4570e4b
YQ
57502017-09-05 Yao Qi <yao.qi@linaro.org>
5751
5752 * amd64-linux-tdep.c: Include arch/amd64.h. Don't include
5753 features/i386/*.c.
5754 (amd64_linux_read_description): Call
5755 amd64_create_target_description.
5756 * arch/amd64.c: New file.
5757 * arch/amd64.h: New file.
5758 * configure.tgt (x86_64-*-linux*): Append amd64.o.
5759 * Makefile.in (ALL_64_TARGET_OBS): Append amd64.o.
5760
6c73f67f
YQ
57612017-09-05 Yao Qi <yao.qi@linaro.org>
5762
5763 * amd64-linux-tdep.c: Don't include amd64-XXX-linux and
5764 x32-XXX-linux.c. Include 64bit-XX.c and x32-XX.c.
5765 (amd64_linux_read_description): Create target descriptions.
5766 (_initialize_amd64_linux_tdep): Don't call initialize_tdesc_XXX
5767 functions. Add unit tests.
5768 * features/Makefile (FEATURE_XMLFILES): Append 64bit-XXX.xml and
5769 x32-core.xml.
5770 * features/i386/64bit-avx.c: Generated.
5771 * features/i386/64bit-avx512.c: Generated.
5772 * features/i386/64bit-core.c: Generated.
5773 * features/i386/64bit-linux.c: Generated.
5774 * features/i386/64bit-mpx.c: Generated.
5775 * features/i386/64bit-pkeys.c: Generated.
5776 * features/i386/64bit-segments.c: Generated.
5777 * features/i386/64bit-sse.c: Generated.
5778 * features/i386/x32-core.c: Generated.
5779 * target-descriptions.c (maint_print_c_tdesc_cmd): Print feature
5780 c files for amd64-linux and x32-linux.
5781
9d3d478b
YQ
57822017-09-05 Yao Qi <yao.qi@linaro.org>
5783
5784 * amd64-linux-tdep.c (amd64_linux_read_description): New
5785 function.
5786 (amd64_linux_core_read_description): Call
5787 amd64_linux_read_description.
5788 (amd64_linux_init_abi): Likewise.
5789 (amd64_x32_linux_init_abi): Likewise.
5790 * amd64-linux-tdep.h (amd64_linux_read_description): Declare.
5791 * x86-linux-nat.c (x86_linux_read_description): Call
5792 amd64_linux_read_description.
5793
b9f1d50f
YQ
57942017-09-05 Yao Qi <yao.qi@linaro.org>
5795
5796 * amd64-linux-tdep.c (amd64_linux_core_read_description): Update
5797 comments.
5798
188c9e6d
YQ
57992017-09-05 Yao Qi <yao.qi@linaro.org>
5800
5801 * features/Makefile (XMLTOC): Remove i386/i386-XX-linux.xml.
5802 * features/i386/i386-avx-avx512-linux.c: Remove.
5803 * features/i386/i386-avx-linux.c: Remove.
5804 * features/i386/i386-avx-mpx-avx512-pku-linux.c: Remove.
5805 * features/i386/i386-avx-mpx-linux.c: Remove.
5806 * features/i386/i386-linux.c: Remove.
5807 * features/i386/i386-mmx-linux.c: Remove.
5808 * features/i386/i386-mpx-linux.c: Remove.
5809
5f035c07
YQ
58102017-09-05 Yao Qi <yao.qi@linaro.org>
5811
5812 * Makefile.in (ALL_TARGET_OBS): Add i386.o.
5813 (SFILES): Add arch/i386.c.
5814 (HFILES_NO_SRCDIR): Add arch/i386.h.
5815 * arch/i386.c: New file.
5816 * arch/i386.h: New file.
5817 * arch/tdesc.h (allocate_target_description): Declare.
5818 (set_tdesc_architecture): Declare.
5819 (set_tdesc_osabi): Declare.
5820 * configure.tgt (i[34567]86-*-linux*): Add i386.o.
5821 * i386-linux-tdep.c: Don't include ../features/i386/32bit-XXX.c.
5822 include arch/i386.h.
5823 (i386_linux_read_description): Remove code and call
5824 i386_create_target_description.
5825 (set_tdesc_architecture): New function.
5826 (set_tdesc_osabi): New function.
5827 * target-descriptions.h (allocate_target_description): Remove.
5828
0abe8a89
YQ
58292017-09-05 Yao Qi <yao.qi@linaro.org>
5830
5831 * arch/tdesc.h (tdesc_create_feature): Add an argument xml.
5832 * target-descriptions.c (tdesc_create_feature): Likewise, and
5833 adjust code.
5834 * features/i386/32bit-avx.c: Re-generated.
5835 * features/i386/32bit-avx512.c: Re-generated.
5836 * features/i386/32bit-core.c: Re-generated.
5837 * features/i386/32bit-linux.c: Re-generated.
5838 * features/i386/32bit-mpx.c: Re-generated.
5839 * features/i386/32bit-pkeys.c: Re-generated.
5840 * features/i386/32bit-sse.c: Re-generated.
5841
0a188386
YQ
58422017-09-05 Yao Qi <yao.qi@linaro.org>
5843
5844 * regformats/regdef.h (struct reg): Override operator == and !=.
5845
f49ff000
YQ
58462017-09-05 Yao Qi <yao.qi@linaro.org>
5847
5848 * arch/tdesc.h: New file.
5849 * regformats/regdat.sh: Generate code using tdesc_create_reg.
5850 * target-descriptions.c: Update comments.
5851 * target-descriptions.h: Include "arch/tdesc.h". Remove the
5852 declarations.
5853 * features/i386/32bit-avx.c: Re-generated.
5854 * features/i386/32bit-avx512.c: Re-generated.
5855 * features/i386/32bit-core.c: Re-generated.
5856 * features/i386/32bit-linux.c: Re-generated.
5857 * features/i386/32bit-mpx.c: Re-generated.
5858 * features/i386/32bit-pkeys.c: Re-generated.
5859 * features/i386/32bit-sse.c: Re-generated.
5860
f7000548
YQ
58612017-09-05 Yao Qi <yao.qi@linaro.org>
5862
5863 * regformats/regdat.sh: Update generated code.
5864
c9a5e2a5
YQ
58652017-09-05 Yao Qi <yao.qi@linaro.org>
5866
5867 * regformats/regdat.sh: Adjust code order.
5868
d6b687ac
SM
58692017-09-05 Simon Marchi <simon.marchi@ericsson.com>
5870
5871 * expprint.c (dump_subexp_body_standard): Use constant format
5872 string in fprintf_filtered call.
5873
a379bfd0
JB
58742017-09-04 John Baldwin <jhb@FreeBSD.org>
5875
5876 * configure.nat: Add "x86-nat.o x86-dregs.o" for NetBSD/amd64 and
5877 NetBSD/i386.
5878 * x86-bsd-nat.c [!DBREG_DRX && __NetBSD__]: Define DBREG_DRX.
5879
f7efc967
JB
58802017-09-04 John Baldwin <jhb@FreeBSD.org>
5881
5882 * bsd-kvm.o: Make <sys/user.h> conditional on HAVE_SYS_USER_H.
5883
c49fbc6c
JB
58842017-09-04 John Baldwin <jhb@FreeBSD.org>
5885
5886 * bsd-kvm.o: Define _KMEMUSER.
5887 * configure.ac: Define _KMEMUSER when checking for "struct lwp".
5888 * configure: Regenerate.
5889
26562e73
JB
58902017-09-04 John Baldwin <jhb@FreeBSD.org>
5891
5892 * amd64-fbsd-nat.c: Add include of "x86-xstate.h".
5893 * i386-fbsd-nat.c: Likewise.
5894
31cf1487
JB
58952017-09-04 John Baldwin <jhb@FreeBSD.org>
5896
5897 * unittests/array-view-selftests.c: Add include of <array>.
5898
5b9f8a7c
JB
58992017-09-04 John Baldwin <jhb@FreeBSD.org>
5900
5901 * spu-tdep.c (flush_ea_cache): Add missing argument to
5902 call_function_by_hand.
5903
d69cf9b2
PA
59042017-09-04 Pedro Alves <palves@redhat.com>
5905
5906 * NEWS (Safer support for debugging with no debug info): New.
5907
3693fdb3
PA
59082017-09-04 Pedro Alves <palves@redhat.com>
5909
5910 * c-exp.y (function_method, function_method_void): Add current
5911 instance flags to TYPE_INSTANCE.
5912 * dwarf2read.c (check_modifier): New.
5913 (compute_delayed_physnames): Assert that only C++ adds delayed
5914 physnames. Mark fn_fields as const/volatile depending on
5915 physname.
5916 * eval.c (make_params): New type_instance_flags parameter. Use
5917 it as the new type's instance flags.
5918 (evaluate_subexp_standard) <TYPE_INSTANCE>: Extract the instance
5919 flags element and pass it to make_params.
5920 * expprint.c (print_subexp_standard) <TYPE_INSTANCE>: Handle
5921 instance flags element.
5922 (dump_subexp_body_standard) <TYPE_INSTANCE>: Likewise.
5923 * gdbtypes.h: Include "enum-flags.h".
5924 (type_instance_flags): New enum-flags type.
5925 (TYPE_CONST, TYPE_VOLATILE, TYPE_RESTRICT, TYPE_ATOMIC)
5926 (TYPE_CODE_SPACE, TYPE_DATA_SPACE): Return boolean.
5927 * parse.c (operator_length_standard) <TYPE_INSTANCE>: Adjust.
5928 (follow_type_instance_flags): New function.
5929 (operator_check_standard) <TYPE_INSTANCE>: Adjust.
5930 * parser-defs.h (follow_type_instance_flags): Declare.
5931 * valops.c (value_struct_elt_for_reference): const/volatile must
5932 match too.
5933
e68cb8e0
PA
59342017-09-04 Pedro Alves <palves@redhat.com>
5935
5936 * cp-namespace.c (cp_search_static_and_baseclasses): Handle
5937 function/method scopes; lookup the nested name as a function local
5938 static variable.
5939
858be34c
PA
59402017-09-04 Pedro Alves <palves@redhat.com>
5941
5942 (%type <voidval>): Add function_method.
5943 * c-exp.y (exp): New production for calls with no arguments.
5944 (function_method, function_method_void_or_typelist): New
5945 productions.
5946 (exp): New production for "method()::static_var".
5947 * eval.c (evaluate_subexp_standard): Handle OP_FUNC_STATIC_VAR.
5948 * expprint.c (print_subexp_standard, dump_subexp_body_standard):
5949 Handle OP_FUNC_STATIC_VAR.
5950 * parse.c (operator_length_standard):
5951 Handle OP_FUNC_STATIC_VAR.
5952
dd5901a6
PA
59532017-09-04 Pedro Alves <palves@redhat.com>
5954
5955 * eval.c (evaluate_subexp_standard): Remove UNOP_MEMVAL_TLS
5956 handling.
5957 * expprint.c (print_subexp_standard, dump_subexp_body_standard):
5958 Ditto.
5959 * parse.c (operator_length_standard, operator_check_standard):
5960 Ditto.
5961 * std-operator.def (UNOP_MEMVAL_TLS): Delete.
5962
46a4882b
PA
59632017-09-04 Pedro Alves <palves@redhat.com>
5964
5965 * ax-gdb.c: Include "typeprint.h".
5966 (gen_expr_for_cast): New function.
5967 (gen_expr) <OP_CAST, OP_CAST_TYPE>: Use it.
5968 <OP_VAR_VALUE, OP_MSYM_VAR_VALUE>: Error out if the variable's
5969 type is unknown.
5970 * dwarf2read.c (new_symbol_full): Fallback to int instead of
5971 nodebug_data_symbol.
5972 * eval.c: Include "typeprint.h".
5973 (evaluate_subexp_standard) <OP_VAR_VALUE, OP_VAR_MSYM_VALUE>:
5974 Error out if symbol has unknown type.
5975 <UNOP_CAST, UNOP_CAST_TYPE>: Common bits factored out to
5976 evaluate_subexp_for_cast.
5977 (evaluate_subexp_for_address, evaluate_subexp_for_sizeof): Handle
5978 OP_VAR_MSYM_VALUE.
5979 (evaluate_subexp_for_cast): New function.
5980 * gdbtypes.c (init_nodebug_var_type): New function.
5981 (objfile_type): Use it to initialize types of variables with no
5982 debug info.
5983 * typeprint.c (error_unknown_type): New.
5984 * typeprint.h (error_unknown_type): New declaration.
5985 * compile/compile-c-types.c (convert_type_basic): Handle
5986 TYPE_CODE_ERROR; warn and fallback to int for variables with
5987 unknown type.
5988
fe13dfec
PA
59892017-09-04 Pedro Alves <palves@redhat.com>
5990
5991 * eval.c (evaluate_var_value): New function, factored out from ...
5992 (evaluate_subexp_standard): ... here.
5993
d008ee21
PA
59942017-09-04 Pedro Alves <palves@redhat.com>
5995
5996 * eval.c (evaluate_subexp_standard) <UNOP_COMPLEMENT, UNOP_ADDR>:
5997 Remove useless assignments to 'op'.
5998
827d0c51
PA
59992017-09-04 Pedro Alves <palves@redhat.com>
6000
6001 * eval.c (eval_skip_value): New function.
6002 (evaluate_subexp_standard): Use it.
6003
2c5a2be1
PA
60042017-09-04 Pedro Alves <palves@redhat.com>
6005
6006 * eval.c (evaluate_subexp_standard): <OP_FUNCALL>: Extract
6007 function name from symbol/minsym and pass it to
6008 error_call_unknown_return_type.
6009
74ea4be4
PA
60102017-09-04 Pedro Alves <palves@redhat.com>
6011
6012 * ada-lang.c (resolve_subexp): Handle OP_VAR_MSYM_VALUE.
6013 * ax-gdb.c (gen_msym_var_ref): New function.
6014 (gen_expr): Handle OP_VAR_MSYM_VALUE.
6015 * eval.c (evaluate_var_msym_value): New function.
6016 * eval.c (evaluate_subexp_standard): Handle OP_VAR_MSYM_VALUE.
6017 <OP_FUNCALL>: Extract function name from symbol/minsym and pass it
6018 to call_function_by_hand.
6019 * expprint.c (print_subexp_standard, dump_subexp_body_standard):
6020 Handle OP_VAR_MSYM_VALUE.
6021 (union exp_element) <msymbol>: New field.
6022 * minsyms.h (struct type): Forward declare.
6023 (find_minsym_type_and_address): Declare.
6024 * parse.c (write_exp_elt_msym): New function.
6025 (write_exp_msymbol): Delete, refactored as ...
6026 (find_minsym_type_and_address): ... this new function.
6027 (write_exp_msymbol): Reimplement using OP_VAR_MSYM_VALUE.
6028 (operator_length_standard, operator_check_standard): Handle
6029 OP_VAR_MSYM_VALUE.
6030 * std-operator.def (OP_VAR_MSYM_VALUE): New.
6031
7022349d
PA
60322017-09-04 Pedro Alves <palves@redhat.com>
6033
6034 * ada-lang.c (ada_evaluate_subexp) <TYPE_CODE_FUNC>: Don't handle
6035 TYPE_GNU_IFUNC specially here. Throw error if return type is
6036 unknown.
6037 * ada-typeprint.c (print_func_type): Handle functions with unknown
6038 return type.
6039 * c-typeprint.c (c_type_print_base): Handle functions and methods
6040 with unknown return type.
6041 * compile/compile-c-symbols.c (convert_symbol_bmsym)
6042 <mst_text_gnu_ifunc>: Use nodebug_text_gnu_ifunc_symbol.
6043 * compile/compile-c-types.c: Include "objfiles.h".
6044 (convert_func): For functions with unknown return type, warn and
6045 default to int.
6046 * compile/compile-object-run.c (compile_object_run): Adjust call
6047 to call_function_by_hand_dummy.
6048 * elfread.c (elf_gnu_ifunc_resolve_addr): Adjust call to
6049 call_function_by_hand.
6050 * eval.c (evaluate_subexp_standard): Adjust calls to
6051 call_function_by_hand. Handle functions and methods with unknown
6052 return type. Pass expect_type to call_function_by_hand.
6053 * f-typeprint.c (f_type_print_base): Handle functions with unknown
6054 return type.
6055 * gcore.c (call_target_sbrk): Adjust call to
6056 call_function_by_hand.
6057 * gdbtypes.c (objfile_type): Leave nodebug text symbol with NULL
6058 return type instead of int. Make nodebug_text_gnu_ifunc_symbol be
6059 an integer address type instead of nodebug.
6060 * guile/scm-value.c (gdbscm_value_call): Adjust call to
6061 call_function_by_hand.
6062 * infcall.c (error_call_unknown_return_type): New function.
6063 (call_function_by_hand): New "default_return_type" parameter.
6064 Pass it down.
6065 (call_function_by_hand_dummy): New "default_return_type"
6066 parameter. Use it instead of defaulting to int. If there's no
6067 default and the return type is unknown, throw an error. If
6068 there's a default return type, and the called function has no
6069 debug info, then assume the function is prototyped.
6070 * infcall.h (call_function_by_hand, call_function_by_hand_dummy):
6071 New "default_return_type" parameter.
6072 (error_call_unknown_return_type): New declaration.
6073 * linux-fork.c (call_lseek): Cast return type of lseek.
6074 (inferior_call_waitpid, checkpoint_command): Adjust calls to
6075 call_function_by_hand.
6076 * linux-tdep.c (linux_infcall_mmap, linux_infcall_munmap): Adjust
6077 calls to call_function_by_hand.
6078 * m2-typeprint.c (m2_procedure): Handle functions with unknown
6079 return type.
6080 * objc-lang.c (lookup_objc_class, lookup_child_selector)
6081 (value_nsstring, print_object_command): Adjust calls to
6082 call_function_by_hand.
6083 * p-typeprint.c (pascal_type_print_varspec_prefix): Handle
6084 functions with unknown return type.
6085 (pascal_type_print_func_varspec_suffix): New function.
6086 (pascal_type_print_varspec_suffix) <TYPE_CODE_FUNC,
6087 TYPE_CODE_METHOD>: Use it.
6088 * python/py-value.c (valpy_call): Adjust call to
6089 call_function_by_hand.
6090 * rust-lang.c (rust_evaluate_funcall): Adjust call to
6091 call_function_by_hand.
6092 * valarith.c (value_x_binop, value_x_unop): Adjust calls to
6093 call_function_by_hand.
6094 * valops.c (value_allocate_space_in_inferior): Adjust call to
6095 call_function_by_hand.
6096 * typeprint.c (type_print_unknown_return_type): New function.
6097 * typeprint.h (type_print_unknown_return_type): New declaration.
6098
54990598
PA
60992017-09-04 Pedro Alves <palves@redhat.com>
6100
6101 * gdbtypes.c (lookup_function_type_with_arguments): Mark function
6102 types with more than one parameter as prototyped.
6103
9a24775b
PA
61042017-09-04 Pedro Alves <palves@redhat.com>
6105
6106 * cli/cli-cmds.c (print_disassembly, disassemble_current_function)
6107 (disassemble_command): Use gdb_disassembly_flags instead of bare
6108 int.
6109 * disasm.c (gdb_pretty_print_disassembler::pretty_print_insn)
6110 (dump_insns, do_mixed_source_and_assembly_deprecated)
6111 (do_mixed_source_and_assembly, do_assembly_only, gdb_disassembly):
6112 Use gdb_disassembly_flags instead of bare int.
6113 * disasm.h (DISASSEMBLY_SOURCE_DEPRECATED, DISASSEMBLY_RAW_INSN)
6114 (DISASSEMBLY_OMIT_FNAME, DISASSEMBLY_FILENAME)
6115 (DISASSEMBLY_OMIT_PC, DISASSEMBLY_SOURCE)
6116 (DISASSEMBLY_SPECULATIVE): No longer macros. Instead they're...
6117 (enum gdb_disassembly_flag): ... values of this new enumeration.
6118 (gdb_disassembly_flags): Define.
6119 (gdb_disassembly)
6120 (gdb_pretty_print_disassembler::pretty_print_insn): Use it.
6121 * mi/mi-cmd-disas.c (mi_cmd_disassemble): Use
6122 gdb_disassembly_flags instead of bare int.
6123 * record-btrace.c (btrace_insn_history)
6124 (record_btrace_insn_history, record_btrace_insn_history_range)
6125 (record_btrace_insn_history_from): Use gdb_disassembly_flags
6126 instead of bare int.
6127 * record.c (get_insn_history_modifiers, cmd_record_insn_history):
6128 Use gdb_disassembly_flags instead of bare int.
6129 * target-debug.h (target_debug_print_gdb_disassembly_flags):
6130 Define.
6131 * target-delegates.c: Regenerate.
6132 * target.c (target_insn_history, target_insn_history_from)
6133 (target_insn_history_range): Use gdb_disassembly_flags instead of
6134 bare int.
6135 * target.h: Include "disasm.h".
6136 (struct target_ops) <to_insn_history, to_insn_history_from,
6137 to_insn_history_range>: Use gdb_disassembly_flags instead of bare
6138 int.
6139 (target_insn_history, target_insn_history_from)
6140 (target_insn_history_range): Use gdb_disassembly_flags instead of
6141 bare int.
6142
80a65e9b
SM
61432017-09-04 Simon Marchi <simon.marchi@ericsson.com>
6144
6145 * cli/cli-script.c (build_command_line): For if/while commands,
6146 check whether args is empty.
6147
6b66338c
SM
61482017-09-04 Simon Marchi <simon.marchi@ericsson.com>
6149
6150 * cli/cli-script.h (enum misc_command_type): Move from defs.h.
6151 (enum command_control_type): Likewise.
6152 (struct command_line): Likewise.
6153 (free_command_lines): Likewise.
6154 (struct command_lines_deleter): Likewise.
6155 (command_line_up): Likewise.
6156 (read_command_lines): Likewise.
6157 (read_command_lines_1): Likewise.
6158 * defs.h (enum misc_command_type): Move to cli/cli-script.h.
6159 (enum command_control_type): Likewise.
6160 (struct command_line): Likewise.
6161 (free_command_lines): Likewise.
6162 (struct command_lines_deleter): Likewise.
6163 (command_line_up): Likewise.
6164 (read_command_lines): Likewise.
6165 (read_command_lines_1): Likewise.
6166 * breakpoint.h: Include cli/cli-script.h.
6167 * extension-priv.h: Likewise.
6168 * gdbcmd.h: Likewise.
6169
51abb421
PA
61702017-09-04 Pedro Alves <palves@redhat.com>
6171
6172 * ada-lang.c (is_known_support_routine): Move sal declaration to
6173 where it is initialized.
6174 * breakpoint.c (create_internal_breakpoint, init_catchpoint)
6175 (parse_breakpoint_sals, decode_static_tracepoint_spec)
6176 (clear_command, update_static_tracepoint): Remove init_sal
6177 references. Move declarations closer to initializations.
6178 * cli/cli-cmds.c (list_command): Move sal declarations closer to
6179 initializations.
6180 * elfread.c (elf_gnu_ifunc_resolver_stop): Remove init_sal
6181 references. Move sal declarations closer to initializations.
6182 * frame.c (find_frame_sal): Return a symtab_and_line via function
6183 return instead of output parameter. Remove init_sal references.
6184 * frame.h (find_frame_sal): Return a symtab_and_line via function
6185 return instead of output parameter.
6186 * guile/scm-frame.c (gdbscm_frame_sal): Adjust.
6187 * guile/scm-symtab.c (stscm_make_sal_smob): Use in-place new
6188 instead of memset.
6189 (gdbscm_find_pc_line): Remove init_sal reference.
6190 * infcall.c (call_function_by_hand_dummy): Remove init_sal
6191 references. Move declarations closer to initializations.
6192 * infcmd.c (set_step_frame): Update. Move declarations closer to
6193 initializations.
6194 (finish_backward): Remove init_sal references. Move declarations
6195 closer to initializations.
6196 * infrun.c (process_event_stop_test, handle_step_into_function)
6197 (insert_hp_step_resume_breakpoint_at_frame)
6198 (insert_step_resume_breakpoint_at_caller): Likewise.
6199 * linespec.c (create_sals_line_offset, decode_digits_ordinary)
6200 (symbol_to_sal): Likewise.
6201 * probe.c (parse_probes_in_pspace): Remove init_sal reference.
6202 * python/py-frame.c (frapy_find_sal): Move sal declaration closer
6203 to its initialization.
6204 * reverse.c (save_bookmark_command): Use new/delete. Remove
6205 init_sal references. Move declarations closer to initializations.
6206 * source.c (get_current_source_symtab_and_line): Remove brace
6207 initialization.
6208 (set_current_source_symtab_and_line): Now takes the sal by const
6209 reference. Remove brace initialization.
6210 (line_info): Remove init_sal reference.
6211 * source.h (set_current_source_symtab_and_line): Now takes a
6212 symtab_and_line via const reference.
6213 * stack.c (set_current_sal_from_frame): Adjust.
6214 (print_frame_info): Adjust.
6215 (get_last_displayed_sal): Return the sal via function return
6216 instead of via output parameter. Simplify.
6217 (frame_info): Adjust.
6218 * stack.h (get_last_displayed_sal): Return the sal via function
6219 return instead of via output parameter.
6220 * symtab.c (init_sal): Delete.
6221 (find_pc_sect_line): Remove init_sal references. Move
6222 declarations closer to initializations.
6223 (find_function_start_sal): Remove init_sal references. Move
6224 declarations closer to initializations.
6225 * symtab.h (struct symtab_and_line): In-class initialize all
6226 fields.
6227 * tracepoint.c (set_traceframe_context)
6228 (print_one_static_tracepoint_marker): Remove init_sal references.
6229 Move declarations closer to initializations.
6230 * tui/tui-disasm.c (tui_show_disassem_and_update_source): Adjust.
6231 * tui/tui-stack.c (tui_show_frame_info): Adjust. Move
6232 declarations closer to initializations.
6233 * tui/tui-winsource.c (tui_update_source_window_as_is): Remove
6234 init_sal references. Adjust.
6235
6c5b2ebe
PA
62362017-09-04 Pedro Alves <palves@redhat.com>
6237
6238 * ax-gdb.c (agent_command_1): Use range-for.
6239 * break-catch-throw.c (re_set_exception_catchpoint): Update.
6240 * breakpoint.c: Include "common/array-view.h".
6241 (init_breakpoint_sal, create_breakpoint_sal): Change sals
6242 parameter from struct symtabs_and_lines to
6243 array_view<symtab_and_line>. Adjust. Use range-for. Update.
6244 (breakpoint_sals_to_pc): Change sals parameter from struct
6245 symtabs_and_lines to std::vector reference.
6246 (check_fast_tracepoint_sals): Change sals parameter from struct
6247 symtabs_and_lines to std::array_view. Use range-for.
6248 (decode_static_tracepoint_spec): Return a std::vector instead of
6249 symtabs_and_lines. Update.
6250 (create_breakpoint): Update.
6251 (break_range_command, until_break_command, clear_command): Update.
6252 (base_breakpoint_decode_location, bkpt_decode_location)
6253 (bkpt_probe_create_sals_from_location)
6254 (bkpt_probe_decode_location, tracepoint_decode_location)
6255 (tracepoint_probe_decode_location)
6256 (strace_marker_create_sals_from_location): Return a std::vector
6257 instead of symtabs_and_lines.
6258 (strace_marker_create_breakpoints_sal): Update.
6259 (strace_marker_decode_location): Return a std::vector instead of
6260 symtabs_and_lines. Update.
6261 (update_breakpoint_locations): Change struct symtabs_and_lines
6262 parameters to gdb::array_view. Adjust.
6263 (location_to_sals): Return a std::vector instead of
6264 symtabs_and_lines. Update.
6265 (breakpoint_re_set_default): Use std::vector instead of struct
6266 symtabs_and_lines.
6267 (decode_location_default): Return a std::vector instead of
6268 symtabs_and_lines. Update.
6269 * breakpoint.h: Include "common/array-view.h".
6270 (struct breakpoint_ops) <decode_location>: Now returns a
6271 std::vector instead of returning a symtabs_and_lines via output
6272 parameter.
6273 (update_breakpoint_locations): Change sals parameters to use
6274 gdb::array_view.
6275 * cli/cli-cmds.c (edit_command, list_command): Update to use
6276 std::vector and gdb::array_view.
6277 (ambiguous_line_spec): Adjust to use gdb::array_view and
6278 range-for.
6279 (compare_symtabs): Rename to ...
6280 (cmp_symtabs): ... this. Change parameters to symtab_and_line
6281 const reference and adjust.
6282 (filter_sals): Rewrite using std::vector and standard algorithms.
6283 * elfread.c (elf_gnu_ifunc_resolver_return_stop): Simplify.
6284 (jump_command): Update to use std::vector.
6285 * linespec.c (struct linespec_state) <canonical_names>: Update
6286 comment.
6287 (add_sal_to_sals_basic): Delete.
6288 (add_sal_to_sals, filter_results, convert_results_to_lsals)
6289 (decode_line_2, create_sals_line_offset)
6290 (convert_address_location_to_sals, convert_linespec_to_sals)
6291 (convert_explicit_location_to_sals, parse_linespec)
6292 (event_location_to_sals, decode_line_full, decode_line_1)
6293 (decode_line_with_current_source)
6294 (decode_line_with_last_displayed, decode_objc)
6295 (decode_digits_list_mode, decode_digits_ordinary, minsym_found)
6296 (linespec_result::~linespec_result): Adjust to use std::vector
6297 instead of symtabs_and_lines.
6298 * linespec.h (linespec_sals::sals): Now a std::vector.
6299 (struct linespec_result): Use std::vector, bool, and in-class
6300 initialization.
6301 (decode_line_1, decode_line_with_current_source)
6302 (decode_line_with_last_displayed): Return std::vector.
6303 * macrocmd.c (info_macros_command): Use std::vector.
6304 * mi/mi-main.c (mi_cmd_trace_find): Use std::vector.
6305 * probe.c (parse_probes_in_pspace, parse_probes): Adjust to use
6306 std::vector.
6307 * probe.h (parse_probes): Return a std::vector.
6308 * python/python.c (gdbpy_decode_line): Use std::vector and
6309 gdb::array_view.
6310 * source.c (select_source_symtab, line_info): Use std::vector.
6311 * stack.c (func_command): Use std::vector.
6312 * symtab.h (struct symtabs_and_lines): Delete.
6313 * tracepoint.c (tfind_line_command, scope_info): Use std::vector.
6314
7c44b49c
PA
63152017-09-04 Pedro Alves <palves@redhat.com>
6316
6317 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
6318 unittests/array-view-selftests.c.
6319 (SUBDIR_UNITTESTS_OBS): Add array-view-selftests.o.
6320 * common/array-view.h: New file.
6321 * unittests/array-view-selftests.c: New file.
6322
e439fa14
PA
63232017-09-04 Pedro Alves <palves@redhat.com>
6324
6325 * cli/cli-cmds.c (edit_command): Pass message to
6326 ambiguous_line_spec.
6327 (list_command): Pass message to ambiguous_line_spec. Say
6328 "first"/"last" instead of "start" and "end" to be consistent with
6329 the manual.
6330 (ambiguous_line_spec): Add 'format' and vararg parameters. Use
6331 them to print formatted message.
6332
7525b645
PA
63332017-09-04 Pedro Alves <palves@redhat.com>
6334
6335 * btrace.c (ftrace_add_pt): Pass btrace_insn to
6336 ftrace_update_insns by reference instead of pointer.
6337
badc0020
YQ
63382017-09-04 Yao Qi <yao.qi@linaro.org>
6339
6340 * i386-go32-tdep.c: Include x86-xstate.h.
6341 (i386_go32_init_abi): Call i386_target_description.
6342 * i386-tdep.c (i386_target_description): Return tdesc_i386_mmx
6343 if xcr0 is X86_XSTATE_X87_MASK.
6344 * i386-tdep.h (tdesc_i386): Remove the declaration.
6345 (tdesc_i386_mmx): Likewise.
6346
d78bdb54
YQ
63472017-09-04 Yao Qi <yao.qi@linaro.org>
6348
6349 * i386-fbsd-tdep.c (i386fbsd_core_read_xcr0): Return
6350 X86_XSTATE_SSE_MASK instead of 0.
6351
ca1fa5ee
YQ
63522017-09-04 Yao Qi <yao.qi@linaro.org>
6353
6354 * amd64-fbsd-nat.c (amd64fbsd_read_description): Call
6355 i386_target_description.
6356 * i386-fbsd-nat.c (i386fbsd_read_description): Call
6357 i386_target_description.
6358 * i386-tdep.c (i386_gdbarch_init): Likewise.
6359
2434b019
YQ
63602017-09-04 Yao Qi <yao.qi@linaro.org>
6361
6362 * amd64-darwin-tdep.c: Include "x86-xstate.h".
6363 (x86_darwin_init_abi_64): Call amd64_target_description.
6364 * amd64-dicos-tdep.c: Likewise.
6365 * amd64-fbsd-nat.c: Likewise.
6366 * amd64-fbsd-tdep.c: Likewise.
6367 * amd64-nbsd-tdep.c: Likewise.
6368 * amd64-obsd-tdep.c: Likewise.
6369 * amd64-sol2-tdep.c: Likewise.
6370 * amd64-windows-tdep.c: Likewise.
6371 * amd64-tdep.h (tdesc_amd64): Remove the declaration.
6372
0860c437
SM
63732017-09-04 Simon Marchi <simon.marchi@ericsson.com>
6374
6375 * btrace.h (btrace_insn_s, DEF_VEC_O (btrace_insn_s)): Remove.
6376 (btrace_function) <insn>: Change type to use std::vector.
6377 * btrace.c (ftrace_debug, ftrace_call_num_insn,
6378 ftrace_find_call, ftrace_new_gap, ftrace_update_function,
6379 ftrace_update_insns, ftrace_compute_global_level_offset,
6380 btrace_stitch_bts, btrace_clear, btrace_insn_get,
6381 btrace_insn_end, btrace_insn_next, btrace_insn_prev): Adjust to
6382 change to std::vector.
6383 (ftrace_update_insns): Adjust to change to std::vector, change
6384 type of INSN parameter.
6385 (btrace_compute_ftrace_bts): Adjust call to ftrace_update_insns.
6386 * record-btrace.c (btrace_call_history_insn_range,
6387 btrace_compute_src_line_range,
6388 record_btrace_frame_prev_register): Adjust to change to
6389 std::vector.
6390 * python/py-record-btrace.c (recpy_bt_func_instructions): Adjust
6391 to change to std::vector.
6392
0638b7f9
TT
63932017-09-03 Tom Tromey <tom@tromey.com>
6394
6395 * corefile.c (reopen_exec_file): Use std::string.
6396
8f84fb0e
TT
63972017-09-03 Tom Tromey <tom@tromey.com>
6398
6399 * compile/compile.c (compile_register_name_mangled): Return
6400 std::string.
6401 * compile/compile-loc2c.c (pushf_register_address): Update.
6402 (pushf_register): Update.
6403 * compile/compile-c-types.c (convert_array): Update.
6404 * compile/compile-c-symbols.c (generate_vla_size): Update.
6405 (error_symbol_once): Use a gdb::unique_xmalloc_ptr.
6406 (symbol_substitution_name): Return a gdb::unique_xmalloc_ptr.
6407 (convert_one_symbol): Update.
6408 (generate_c_for_for_one_variable): Update.
6409 * compile/compile-c-support.c (c_get_range_decl_name): Return a
6410 std::string.
6411 (generate_register_struct): Update.
6412 * compile/compile-internal.h (c_get_range_decl_name): Return a
6413 std::string.
6414 (compile_register_name_mangled): Return std::string.
6415
18e9961f
TT
64162017-09-03 Tom Tromey <tom@tromey.com>
6417
6418 * utils.c (perror_string): Return a std::string.
6419 (throw_perror_with_name, perror_warning_with_name): Update.
6420
45343786
TT
64212017-09-03 Tom Tromey <tom@tromey.com>
6422
6423 * demangle.c (demangle_command): Use std::string,
6424 unique_xmalloc_ptr.
6425
b57af503
TT
64262017-09-03 Tom Tromey <tom@tromey.com>
6427
6428 * cli/cli-setshow.c (do_set_command): Use std::string.
6429
6eecf35f
TT
64302017-09-03 Tom Tromey <tom@tromey.com>
6431
6432 * cli/cli-cmds.c (cd_command): Use gdb::unique_xmalloc_ptr.
6433
56496dd4
TT
64342017-09-03 Tom Tromey <tom@tromey.com>
6435
6436 * mi/mi-interp.c (mi_cmd_interpreter_exec): Use std::string.
6437
e91a1fa7
TT
64382017-09-03 Tom Tromey <tom@tromey.com>
6439
6440 * mi/mi-cmd-env.c (env_execute_cli_command): Use
6441 gdb::unique_xmalloc_ptr.
6442
7ffd83d7
TT
64432017-09-03 Tom Tromey <tom@tromey.com>
6444
6445 * thread.c (print_thread_info_1): Use string_printf.
6446 (thread_apply_command, thread_apply_all_command): Use
6447 std::string.
6448
1ccbe998
TT
64492017-09-03 Tom Tromey <tom@tromey.com>
6450
6451 * valprint.c (val_print_string): Update.
6452 * gdbcore.h (memory_error_message): Return std::string.
6453 * corefile.c (memory_error_message): Return std::string.
6454 (memory_error): Update.
6455 * breakpoint.c (insert_bp_location): Update.
6456
23fdd69e
SM
64572017-09-03 Simon Marchi <simon.marchi@ericsson.com>
6458
6459 * target/waitstatus.h (target_waitstatus_to_string): Change
6460 return type to std::string.
6461 * target/waitstatus.c (target_waitstatus_to_string): Return
6462 std::string.
6463 * target.h (target_waitstatus_to_string): Remove declaration.
6464 * infrun.c (resume, clear_proceed_status_thread,
6465 print_target_wait_results, do_target_wait, save_waitstatus,
6466 stop_all_threads): Adjust.
6467 * record-btrace.c (record_btrace_wait): Adjust.
6468 * target-debug.h
6469 (target_debug_print_struct_target_waitstatus_p): Adjust.
6470
5c811d30
JK
64712017-09-01 Jan Kratochvil <jan.kratochvil@redhat.com>
6472
6473 PR gdb/22046
6474 * nat/linux-procfs.c (parse_proc_status_state): Fix PROC_STATE_STOPPED
6475 detection.
6476
0a2dde4a
SDJ
64772017-08-31 Sergio Durigan Junior <sergiodj@redhat.com>
6478
6479 * NEWS (Changes since GDB 8.0): Add entry mentioning new support
6480 for setting/unsetting environment variables on the remote target.
6481 (New remote packets): Add entries for QEnvironmentHexEncoded,
6482 QEnvironmentUnset and QEnvironmentReset.
6483 * common/environ.c (gdb_environ::operator=): Extend method to
6484 handle m_user_set_env_list and m_user_unset_env_list.
6485 (gdb_environ::clear): Likewise.
6486 (match_var_in_string): Change type of first parameter from 'char
6487 *' to 'const char *'.
6488 (gdb_environ::set): Extend method to handle
6489 m_user_set_env_list and m_user_unset_env_list.
6490 (gdb_environ::unset): Likewise.
6491 (gdb_environ::clear_user_set_env): New method.
6492 (gdb_environ::user_set_envp): Likewise.
6493 (gdb_environ::user_unset_envp): Likewise.
6494 * common/environ.h (gdb_environ): Handle m_user_set_env_list and
6495 m_user_unset_env_list on move constructor/assignment.
6496 (unset): Add new default parameter 'update_unset_list = true'.
6497 (clear_user_set_env): New method.
6498 (user_set_envp): Likewise.
6499 (user_unset_envp): Likewise.
6500 (m_user_set_env_list): New std::set.
6501 (m_user_unset_env_list): Likewise.
6502 * common/rsp-low.c (hex2str): New function.
6503 (bin2hex): New overload for bin2hex function.
6504 * common/rsp-low.c (hex2str): New prototype.
6505 (str2hex): New overload prototype.
6506 * remote.c: Include "environ.h". Add QEnvironmentHexEncoded,
6507 QEnvironmentUnset and QEnvironmentReset.
6508 (remote_protocol_features): Add QEnvironmentHexEncoded,
6509 QEnvironmentUnset and QEnvironmentReset packets.
6510 (send_environment_packet): New function.
6511 (extended_remote_environment_support): Likewise.
6512 (extended_remote_create_inferior): Call
6513 extended_remote_environment_support.
6514 (_initialize_remote): Add QEnvironmentHexEncoded,
6515 QEnvironmentUnset and QEnvironmentReset packet configs.
6516 * unittests/environ-selftests.c (gdb_selftest_env_var):
6517 New variable.
6518 (test_vector_initialization): New function.
6519 (test_init_from_host_environ): Likewise.
6520 (test_reinit_from_host_environ): Likewise.
6521 (test_set_A_unset_B_unset_A_cannot_find_A_can_find_B):
6522 Likewise.
6523 (test_unset_set_empty_vector): Likewise.
6524 (test_vector_clear): Likewise.
6525 (test_std_move): Likewise.
6526 (test_move_constructor):
6527 (test_self_move): Likewise.
6528 (test_set_unset_reset): Likewise.
6529 (run_tests): Rewrite in terms of the functions above.
6530
654670a4
WP
65312017-08-31 Weimin Pan <weimin.pan@oracle.com>
6532
6533 * sparc64-tdep.c (adi_stat_t): Fix comment formatting.
6534 (adi_available): Use a temp variable of type CORE_ADDR as argument
6535 3 when calling target_auxv_search.
6536 (adi_normalize_address): Use masks and xor operators to calculate
6537 normalized address.
6538 (adi_read_versions, adi_write_versions, adi_print_versions)
6539 (do_examine, do_assign): Use paddress.
6540
7755ddb7
JB
65412017-08-29 John Baldwin <jhb@FreeBSD.org>
6542
6543 * mips-fbsd-nat.c (getfpregs_supplies): Return true for FIR.
6544 * mips-fbsd-tdep.c (mips_fbsd_supply_fpregs): Split supply of FSR
6545 out of loop and add supply of FIR.
6546 (mips_fbsd_collect_fpregs): Split collect of FSR out of loop and
6547 add collect of FIR.
6548
fd437cbc
SM
65492017-08-28 Simon Marchi <simon.marchi@ericsson.com>
6550
3804a343 6551 PR gdb/21827
fd437cbc
SM
6552 * cli/cli-script.c (define_command): Don't convert command name
6553 to lower case.
6554
988f6b3d
JB
65552017-08-25 Joel Brobecker <brobecker@adacore.com>
6556
6557 * ada-lang.c (ada_lookup_struct_elt_type): Remove parameter "dispp".
6558 Update all callers accordingly. Remove all code blocks handling
6559 the case where DISPP is not NULL.
6560
663c44ac
JK
65612017-08-24 Jan Kratochvil <jan.kratochvil@redhat.com>
6562
6563 PR symtab/22003
6564 * dwarf2read.c (dwarf2_const_value_attr, dump_die_shallow)
6565 (dwarf2_get_attr_constant_value, dwarf2_fetch_constant_bytes)
6566 (skip_form_bytes, attr_form_is_constant): Handle DW_FORM_implicit_const.
6567
f1902523
JK
65682017-08-24 Jan Kratochvil <jan.kratochvil@redhat.com>
6569
6570 * dwarf2read.c (build_type_psymtabs_reader): New prototype.
6571 (process_psymtab_comp_unit): Accept IS_DEBUG_TYPES.
6572 (read_comp_units_from_section): New parameter abbrev_section, use
6573 read_and_check_comp_unit_head, allocate signatured_type if needed.
6574 (create_all_comp_units): Update read_comp_units_from_section caller.
6575
87215ad1
SDJ
65762017-08-23 Pedro Alves <palves@redhat.com>
6577
6578 PR remote/21852
6579 * remote.c (add_current_inferior_and_thread): Set inferior_ptid
6580 to null_ptid and switch to thread without reading the registers
6581 after adding the inferior.
6582
6e41ddec
JK
65832017-08-23 Jan Kratochvil <jan.kratochvil@redhat.com>
6584
6585 * NEWS (Changes since GDB 8.0): Add set compile-gcc and show
6586 compile-gcc.
6587 * compile/compile.c (compile_gcc, show_compile_gcc): New.
6588 (compile_to_object): Implement compile_gcc.
6589 (_initialize_compile): Install "set compile-gcc". Initialize
6590 compile_gcc.
6591
e68c32d5
JK
65922017-08-23 Jan Kratochvil <jan.kratochvil@redhat.com>
6593
6594 * compile/compile.c (compile_to_object): Conditionally call
6595 set_verbose. Conditionally call compile or compile_v0.
6596
58afddc6
WP
65972017-08-07 Weimin Pan <weimin.pan@oracle.com>
6598
6599 * sparc64-tdep.h: (adi_normalize_address): New export.
6600 * sparc-nat.h: (open_adi_tag_fd): New export.
6601 * sparc64-linux-nat.c: (open_adi_tag_fd): New function.
6602 * sparc64-linux-tdep.c:
6603 (SEGV_ACCADI, SEGV_ADIDERR, SEGV_ADIPERR) New defines.
6604 (sparc64_linux_handle_segmentation_fault): New function.
6605 (sparc64_linux_init_abi): Register
6606 sparc64_linux_handle_segmentation_fault
6607 * sparc64-tdep.c: Include cli-utils.h,gdbcmd.h,auxv.h.
6608 (sparc64_addr_bits_remove): New function.
6609 (sparc64_init_abi): Register sparc64_addr_bits_remove.
6610 (MAX_PROC_NAME_SIZE): New macro.
6611 (AT_ADI_BLKSZ, AT_ADI_NBITS, AT_ADI_UEONADI) New defines.
6612 (sparc64adilist): New variable.
6613 (adi_proc_list): New variable.
6614 (find_adi_info): New function.
6615 (add_adi_info): New function.
6616 (get_adi_info_proc): New function.
6617 (get_adi_info): New function.
6618 (info_adi_command): New function.
6619 (read_maps_entry): New function.
6620 (adi_available): New function.
6621 (adi_normalize_address): New function.
6622 (adi_align_address): New function.
6623 (adi_convert_byte_count): New function.
6624 (adi_tag_fd): New function.
6625 (adi_is_addr_mapped): New function.
6626 (adi_read_versions): New function.
6627 (adi_write_versions): New function.
6628 (adi_print_versions): New function.
6629 (do_examine): New function.
6630 (do_assign): New function.
6631 (adi_examine_command): New function.
6632 (adi_assign_command): New function.
6633 (_initialize_sparc64_adi_tdep): New function.
6634
11db9430
SM
66352017-08-22 Simon Marchi <simon.marchi@ericsson.com>
6636
6637 * breakpoint.c (breakpoints_info): Rename to ...
6638 (info_breakpoints_command): ... this.
6639 (watchpoints_info): Rename to ...
6640 (info_watchpoints_command): ... this.
6641 (tracepoints_info): Rename to ...
6642 (info_tracepoints_command): ... this.
6643 (_initialize_breakpoint): Adjust.
6644 * dcache.c (dcache_info): Rename to ...
6645 (info_display_command): ... this.
6646 (_initialize_dcache): Adjust.
6647 * frame.h (args_info): Rename to ...
6648 (info_args_command): ... this.
6649 (locals_info): Rename to ...
6650 (info_locals_command): ... this.
6651 * infcmd.c (nofp_registers_info): Rename to ...
6652 (info_registers_command): ... this.
6653 (float_info): Rename to ...
6654 (info_float_command): ... this.
6655 (program_info): Rename to ...
6656 (info_program_command): ... this.
6657 (all_registers_info): Rename to ...
6658 (info_all_registers_command): ... this.
6659 (vector_info): Rename to ...
6660 (info_vector_command): ... this.
6661 (float_info): Rename to ...
6662 (info_float_command): ... this.
6663 (_initialize_infcmd): Adjust.
6664 * inferior.h (term_info): Rename to ...
6665 (info_terminal_command): ... this.
6666 * inflow.c (term_info): Rename to ...
6667 (info_terminal_command): ... this.
6668 (_initialize_inflow): Adjust.
6669 * infrun.c (signals_info): Rename to ...
6670 (info_signals_command): ... this.
6671 (_initialize_infrun): Adjust.
6672 * objc-lang.c (classes_info): Rename to ...
6673 (info_classes_command): ... this.
6674 (selectors_info): Rename to ...
6675 (info_selectors_command): ... this.
6676 (_initialize_objc_language): Adjust.
6677 * printcmd.c (sym_info): Rename to ...
6678 (info_symbol_command): ... this.
6679 (address_info): Rename to ...
6680 (info_address_command): ... this.
6681 (display_info): Rename to ...
6682 (info_display_command): ... this.
6683 (_initialize_printcmd): Adjust.
6684 * reverse.c (bookmarks_info): Rename to ...
6685 (info_breakpoints_command): ... this.
6686 (_initialize_reverse): Adjust.
6687 * ser-go32.c (dos_info): Rename to ...
6688 (info_serial_command): ... this.
6689 (_initialize_ser_dos): Adjust.
6690 * skip.c (skip_info): Rename to ...
6691 (info_skip_command): ... this.
6692 (_initialize_step_skip): Adjust.
6693 * source.c (line_info): Rename to ...
6694 (info_line_command): ... this.
6695 (source_info): Rename to ...
6696 (info_source_command)
6697 * stack.c (frame_info): Rename to ...
6698 (info_frame_command): ... this.
6699 (locals_info): Rename to ...
6700 (info_locals_command): ... this.
6701 (args_info): Rename to ...
6702 (info_args_command): ... this.
6703 (_initialize_stack): Adjust.
6704 * symtab.c (sources_info): Rename to ...
6705 (info_sources_command): ... this.
6706 (variables_info): Rename to ...
6707 (info_variables_command): ... this.
6708 (functions_info): Rename to ...
6709 (info_functions_command): ... this.
6710 (types_info): Rename to ...
6711 (info_types_command): ... this.
6712 (_initialize_symtab): Adjust.
6713 * target.c (target_info): Rename to ...
6714 (info_target_command): ... this.
6715 (initialize_targets): Adjust.
6716 * tracepoint.c (tvariables_info): Rename to ...
6717 (info_tvariables_command): ... this.
6718 (scope_info): Rename to ...
6719 (info_scope_command): ... this.
6720 (trace_dump_actions): Adjust.
6721 (_initialize_tracepoint): Adjust.
6722
b270e6f9
TT
67232017-08-22 Tom Tromey <tom@tromey.com>
6724
6725 * breakpoint.h (install_breakpoint): Update.
6726 * breakpoint.c (add_solib_catchpoint): Update.
6727 (install_breakpoint): Change argument to a std::unique_ptr.
6728 (create_fork_vfork_event_catchpoint): Use std::unique_ptr.
6729 (create_breakpoint_sal, create_breakpoint): Update.
6730 (watch_command_1, catch_exec_command_1)
6731 (strace_marker_create_breakpoints_sal): Use std::unique_ptr.
6732 (add_to_breakpoint_chain): Change argument to a std::unique_ptr.
6733 Return the breakpoint.
6734 (set_raw_breakpoint_without_location, set_raw_breakpoint)
6735 (new_single_step_breakpoint): Update.
6736 * break-catch-throw.c (handle_gnu_v3_exceptions): Use
6737 std::unique_ptr.
6738 * break-catch-syscall.c (create_syscall_event_catchpoint): Use
6739 std::unique_ptr.
6740 * break-catch-sig.c (create_signal_catchpoint): Use
6741 std::unique_ptr.
6742 * ada-lang.c (create_ada_exception_catchpoint): Use
6743 std::unique_ptr.
6744
36bd8eaa
TT
67452017-08-22 Tom Tromey <tom@tromey.com>
6746
6747 * breakpoint.c (add_solib_catchpoint): Use std::unique_ptr.
6748
56f37645
TT
67492017-08-22 Tom Tromey <tom@tromey.com>
6750
6751 * psymtab.c (psymtab_search_name): Return a unique_xmalloc_ptr.
6752 (lookup_partial_symbol): Update.
6753
0b581c69
TT
67542017-08-22 Tom Tromey <tom@tromey.com>
6755
6756 * source.h (rewrite_source_path): Return a unique_xmalloc_ptr.
6757 * source.c (rewrite_source_path): Return a unique_xmalloc_ptr.
6758 (find_and_open_source, symtab_to_fullname): Update.
6759 * psymtab.c (psymtab_to_fullname): Update.
6760
14278e1f
TT
67612017-08-22 Tom Tromey <tom@tromey.com>
6762
6763 * exec.c (exec_file_attach): Update.
6764 * linux-thread-db.c (try_thread_db_load): Update.
6765 * guile/scm-safe-call.c (gdbscm_safe_source_script): Update.
6766 * utils.c (gdb_realpath): Change return type.
6767 (gdb_realpath_keepfile): Update.
6768 (gdb_realpath_check_trailer, gdb_realpath_tests): New functions.
6769 (_initialize_utils): Register the new self test.
6770 * source.c (openp): Update.
6771 (find_and_open_source): Update.
6772 * nto-tdep.c (nto_find_and_open_solib): Update.
6773 * main.c (set_gdb_data_directory): Update.
6774 (captured_main_1): Update.
6775 * dwarf2read.c (dwarf2_get_dwz_file): Update
6776 (dw2_map_symbol_filenames): Update.
6777 * auto-load.c (auto_load_safe_path_vec_update): Update.
6778 (filename_is_in_auto_load_safe_path_vec): Change type of
6779 "filename_realp".
6780 (auto_load_objfile_script): Update.
6781 (file_is_auto_load_safe): Update. Use std::string.
6782 * utils.h (gdb_realpath): Return a gdb::unique_xmalloc_ptr.
6783
4971c9a7
TT
67842017-08-22 Tom Tromey <tom@tromey.com>
6785
6786 * utils.c (gdb_realpath_keepfile): Return a
6787 gdb::unique_xmalloc_ptr.
6788 * exec.c (exec_file_attach): Update.
6789 * utils.h (gdb_realpath_keepfile): Return a
6790 gdb::unique_xmalloc_ptr.
6791
e3e41d58
TT
67922017-08-22 Tom Tromey <tom@tromey.com>
6793
6794 * compile/compile.c (compile_file_command): Use
6795 gdb::unique_xmalloc_ptr, std::string.
6796 * utils.c (gdb_abspath): Change return type.
6797 * source.c (openp): Update.
6798 * objfiles.c (allocate_objfile): Update.
6799 * main.c (set_gdb_data_directory): Update.
6800 * utils.h (gdb_abspath): Return a gdb::unique_xmalloc_ptr.
6801
0d999a6e
ZZ
68022017-08-22 Zhouyi Zhou <zhouzhouyi@gmail.com>
6803
6804 * cli-cmds.c (list_commands): List actual code around more than
6805 one location.
6806
329d5e7e
JB
68072017-08-21 John Baldwin <jhb@FreeBSD.org>
6808
6809 * fbsd-nat.c (fbsd_add_threads): Use array type for `lwps'.
6810
bf223d3e
PA
68112017-08-21 Pedro Alves <palves@redhat.com>
6812
6813 PR gdb/19487
6814 * c-exp.y (variable production): Handle function aliases.
6815 * minsyms.c (msymbol_is_text): New function.
6816 * minsyms.h (msymbol_is_text): Declare.
6817 * symtab.c (find_function_alias_target): New function.
6818 * symtab.h (find_function_alias_target): Declare.
6819
c973d0aa
PA
68202017-08-21 Pedro Alves <palves@redhat.com>
6821
6822 * eval.c (evaluate_subexp_standard) <OP_TYPE>: Don't dig past
6823 typedefs.
6824 * typeprint.c (whatis_exp): If handling "whatis", and expression
6825 is OP_TYPE, strip one typedef level. Otherwise don't strip
6826 typedefs here.
6827 * valops.c (value_cast): Save "to" type before resolving
6828 stubs/typedefs. Use that type as resulting value's type.
6829
2989a365
TT
68302017-08-18 Tom Tromey <tom@tromey.com>
6831 Pedro Alves <palves@redhat.com>
6832
6833 * spu-multiarch.c (parse_spufs_run): Use scoped_restore.
6834 * sol-thread.c (sol_thread_resume, sol_thread_wait)
6835 (sol_thread_xfer_partial, rw_common): Use scoped_restore.
6836 * procfs.c (procfs_do_thread_registers): Use scoped_restore.
6837 * proc-service.c (ps_xfer_memory): Use scoped_restore.
6838 * linux-tdep.c (linux_corefile_thread): Remove a cleanup.
6839 (linux_get_siginfo_data): Add "thread" argument. Use
6840 scoped_restore.
6841 * linux-nat.c (linux_child_follow_fork)
6842 (check_stopped_by_watchpoint): Use scoped_restore.
6843 * infrun.c (displaced_step_prepare_throw, write_memory_ptid)
6844 (THREAD_STOPPED_BY, handle_signal_stop): Use scoped_restore.
6845 (restore_inferior_ptid, save_inferior_ptid): Remove.
6846 * btrace.c (btrace_fetch): Use scoped_restore.
6847 * bsd-uthread.c (bsd_uthread_fetch_registers)
6848 (bsd_uthread_store_registers): Use scoped_restore.
6849 * breakpoint.c (reattach_breakpoints, detach_breakpoints): Use
6850 scoped_restore.
6851 * aix-thread.c (aix_thread_resume, aix_thread_wait)
6852 (aix_thread_xfer_partial): Use scoped_restore.
6853 * inferior.h (save_inferior_ptid): Remove.
6854
e60eb288
YQ
68552017-08-18 Yao Qi <yao.qi@linaro.org>
6856
6857 PR tdep/21818
6858 * arm-tdep.c (gdb_print_insn_arm): Mark
6859 USER_SPECIFIED_MACHINE_TYPE if exec_bfd isn't NULL.
6860
6d580b63
YQ
68612017-08-18 Yao Qi <yao.qi@linaro.org>
6862
6863 * NEWS: Mention GDBserver's new option "--selftest".
6864 * Makefile.in (SFILES): Remove selftest.c, add common/selftest.c.
6865 * selftest.c: Move it to common/selftest.c.
6866 * selftest.h: Move it to common/selftest.h.
6867 * selftest-arch.c (reset): New function.
6868 (tests_with_arch): Call reset.
6869
86dcbf50
YQ
68702017-08-18 Yao Qi <yao.qi@linaro.org>
6871
6872 * selftest.c (run_tests): Don't call QUIT. Call debug_printf
6873 instead of exception_fprintf and printf_filtered.
6874
7649770c
YQ
68752017-08-18 Yao Qi <yao.qi@linaro.org>
6876
6877 * selftest.c (register_self_test): Rename it to
6878 selftests::register_test.
6879 (run_self_tests): selftest::run_tests.
6880 * selftest.h: Update declarations.
6881 * selftest-arch.c (register_self_test_foreach_arch): Rename it to
6882 selftests::register_test_foreach_arch.
6883 * selftest-arch.h: Update declaration.
6884 * aarch64-tdep.c: Update.
6885 * arm-tdep.c: Likewise.
6886 * disasm-selftests.c: Likewise.
6887 * dwarf2loc.c: Likewise.
6888 * dwarf2-frame.c: Likewise.
6889 * findvar.c: Likewise.
6890 * gdbarch-selftests.c: Likewise.
6891 * maint.c (maintenance_selftest): Likewise.
6892 * regcache.c: Likewise.
6893 * rust-exp.y: Likewise.
6894 * selftest-arch.c: Likewise.
6895 * unittests/environ-selftests.c: Likewise.
6896 * unittests/function-view-selftests.c: Likewise.
6897 * unittests/offset-type-selftests.c: Likewise.
6898 * unittests/optional-selftests.c: Likewise.
6899 * unittests/scoped_restore-selftests.c: Likewise.
6900 * utils-selftests.c: Likewise.
6901
b0cba12e
PA
69022017-08-17 Pedro Alves <palves@redhat.com>
6903
6904 * cli/cli-cmds.c (source_command): Delete 'old_source_verbose'
6905 local.
6906
4c8aa72d
PA
69072017-08-17 Pedro Alves <palves@redhat.com>
6908
6909 * dwarf2read.c (struct dwarf2_cu) <line_header_die_owner>: New
6910 field.
6911 (reset_die_in_process): Delete, replaced by ...
6912 (process_die_scope): ... this new class. Make it responsible for
6913 freeing cu->line_header too.
6914 (process_die): Use process_die_scope.
6915 (handle_DW_AT_stmt_list): Record the line header's owner CU/DIE in
6916 cu->line_header_die_owner. Don't release the line header if it's
6917 owned by the CU.
6918 (setup_type_unit_groups): Make the CU/DIE own the line header.
6919 Don't release the line header here.
6920
ba713918
AL
69212017-08-17 Alex Lindsay <alexlindsay239@gmail.com> (tiny change)
6922
6923 * elfread.c (elf_read_minimal_symbols): xfree synthsyms.
6924
44d0fb3a
RK
69252017-08-17 Ruslan Kabatsayev <b7.10110111@gmail.com>
6926
6927 * NEWS: Mention new shortcuts for nexti and stepi in TUI
6928 Single-Key mode
6929
a5afdb16
RK
69302017-08-16 Ruslan Kabatsayev <b7.10110111@gmail.com>
6931
6932 * tui/tui.c (tui_commands): Add "nexti" and "stepi" to the Single-Key
6933 mode command list.
6934
47613aeb
SH
69352017-08-15 Stafford Horne <shorne@gmail.com>
6936
6937 * MAINTAINERS (Write After Approval): Add Stafford Horne.
6938
9c3cc999
SH
69392017-08-15 Stafford Horne <shorne@gmail.com>
6940
6941 * xtensa-tdep.c (xtensa_init_reggroups): Use xstrdup for cpname.
6942
206726fb
SDJ
69432017-08-15 Sergio Durigan Junior <sergiodj@redhat.com>
6944
6945 PR gdb/21954
6946 * infcmd.c (unset_environment_command): Use the 'clear' method on
6947 the environment instead of resetting it.
6948
0335ac6d
JB
69492017-08-15 John Baldwin <jhb@FreeBSD.org>
6950
6951 * fbsd-nat.c (fbsd_convert_siginfo): Fix compile on big-endian
6952 platforms.
6953
d3abe1c8
TT
69542017-08-14 Tom Tromey <tom@tromey.com>
6955
6956 * valprint.c (print_octal_chars): Use HOST_CHAR_BIT.
6957 (print_binary_chars): Likewise.
6958 (BITS_IN_BYTES): Remove.
6959
d6382fff
TT
69602017-08-14 Tom Tromey <tom@tromey.com>
6961
6962 PR gdb/21675
6963 * valprint.c (LOW_ZERO): Change value to 034.
6964 (print_octal_chars): Add static_asserts for octal constants.
6965 * printcmd.c (print_scalar_formatted): Add 'd' case.
6966
f978cb06
TT
69672017-08-11 Tom Tromey <tom@tromey.com>
6968
6969 * symfile.c (add_symbol_file_command): Use std::vector.
6970
2f5404b3
TT
69712017-08-14 Tom Tromey <tom@tromey.com>
6972
6973 * break-catch-throw.c (handle_gnu_v3_exceptions): Use std::move.
6974 * break-catch-syscall.c (create_syscall_event_catchpoint): Use
6975 std::move.
6976 * break-catch-sig.c (create_signal_catchpoint): Use std::move.
6977
de7985c3
PA
69782017-08-11 Pedro Alves <palves@redhat.com>
6979
6980 * infrun.c (process_event_stop_test): Adjust
6981 function_name_is_marked_for_skip call.
6982 * skip.c: Include <list>.
6983 (skiplist_entry): Make it a class with private fields, and
6984 getters/setters.
6985 (skiplist_entry_chain): Delete.
6986 (skiplist_entries): New.
6987 (skiplist_entry_count): Delete.
6988 (highest_skiplist_entry_num): New.
6989 (ALL_SKIPLIST_ENTRIES, ALL_SKIPLIST_ENTRIES_SAFE): Delete.
6990 (add_skiplist_entry): Delete.
6991 (skiplist_entry::skiplist_entry): New.
6992 (skiplist_entry::add_entry): New.
6993 (skip_file_command, skip_function): Adjust.
6994 (compile_skip_regexp): Delete.
6995 (skip_command): Don't compile regexp here. Adjust to use
6996 skiplist_entry::add_entry.
6997 (skip_info): Adjust to use range-for and getters.
6998 (skip_enable_command, skip_disable_command): Adjust to use
6999 range-for and setters.
7000 (skip_delete_command): Adjust to use std::list.
7001 (add_skiplist_entry): Delete.
7002 (skip_file_p): Delete, refactored as ...
7003 (skiplist_entry::do_skip_file_p): ... this new method.
7004 (skip_gfile_p): Delete, refactored as ...
7005 (skiplist_entry::do_gskip_file_p): ... this new method.
7006 (skip_function_p, skip_rfunction_p): Delete, refactored as ...
7007 (skiplist_entry::skip_function_p): ... this new method.
7008 (function_name_is_marked_for_skip): Now returns bool, and takes
7009 the function sal by const reference. Adjust to use range-for and
7010 skiplist_entry methods.
7011 (_initialize_step_skip): Remove references to
7012 skiplist_entry_chain, skiplist_entry_count.
7013 * skip.h (function_name_is_marked_for_skip): Now returns bool, and
7014 takes the function sal by const reference.
7015
be7d3cd5
YQ
70162017-08-11 Yao Qi <yao.qi@linaro.org>
7017
7018 * dwarf2-frame.c (clear_pointer_cleanup): Remove.
7019 (dwarf2_frame_cache): Remove reset_cache_cleanup.
7020 (dwarf2_frame_cache):
7021 * frame-unwind.c (frame_unwind_try_unwinder): Catch
7022 RETURN_MASK_ALL and set *this_case to NULL.
7023 * frame-unwind.h: Update comments.
7024
1c90d9f0
YQ
70252017-08-11 Yao Qi <yao.qi@linaro.org>
7026
7027 * dwarf2-frame.c (dwarf2_frame_state_alloc_regs): Remove.
7028 (dwarf2_frame_state_copy_regs): Remove.
7029 (dwarf2_frame_state_free_regs): Remove.
7030 (dwarf2_frame_state::~dwarf2_frame_state): Remove.
7031 (dwarf2_restore_rule): Call method .alloc_regs instead of
7032 dwarf2_frame_state_alloc_regs.
7033 (execute_cfa_program): Likewise. Call dwarf2_frame_state_reg_info
7034 constructor. Call std::move.
7035 (dwarf2_fetch_cfa_info): Don't call dwarf2_frame_state_copy_regs.
7036 (dwarf2_frame_cache): Likewise.
7037
7038 [GDB_SELF_TEST]: Include selftest.h and
7039 selftest-arch.h.
7040 [GDB_SELF_TEST] (execute_cfa_program_test): New function.
7041 (_initialize_dwarf2_frame) [GDB_SELF_TEST]: Register
7042 execute_cfa_program_test.
7043
7044 * dwarf2-frame.h (dwarf2_frame_state_reg_info): Add ctor, dtor,
7045 copy ctor, assignment operator, move assignment.
7046 <alloc_regs>: New method.
7047 <swap>: New method.
7048 (struct dwarf2_frame_state): Delete dtor.
7049 (dwarf2_frame_state_alloc_regs): Remove declaration.
7050 * sparc-tdep.c (sparc_execute_dwarf_cfa_vendor_op): Don't call
7051 dwarf2_frame_state_alloc_regs, use .alloc_regs instead.
7052
afe37d6b
YQ
70532017-08-11 Yao Qi <yao.qi@linaro.org>
7054
7055 * dwarf2-frame.c (dwarf2_frame_state_free): Remove.
7056 (dwarf2_frame_state::dwarf2_frame_state): New.
7057 (dwarf2_frame_state::~dwarf2_frame_state): New.
7058 (dwarf2_fetch_cfa_info): Update.
7059 (dwarf2_frame_cache): Remove old_chain. Change 'fs' to an object
7060 rather than a pointer. Update code.
7061 * dwarf2-frame.h (struct dwarf2_frame_state): Declare ctor and
7062 dtor.
7063 <data_align, code_align, retaddr_column>: Change them to const.
7064 <armcc_cfa_offsets_sf, armcc_cfa_offsets_reversed>: Change them
7065 to bool.
7066
b348037f
YQ
70672017-08-11 Yao Qi <yao.qi@linaro.org>
7068
7069 * dwarf2-frame.h (struct dwarf2_frame_state_reg) <exp_len>: Remove.
7070 <loc.exp>: New field.
7071 * dwarf2-frame.c (execute_cfa_program): Update.
7072 (dwarf2_frame_prev_register): Update.
7073
e7c9de26
PA
70742017-08-10 Pedro Alves <palves@redhat.com>
7075
7076 * common/gdb_unique_ptr.h (xfree_deleter<T[]>): Define.
7077
e8c6b620
JB
70782017-08-09 John Baldwin <jhb@FreeBSD.org>
7079
7080 * fbsd-nat.c (struct fbsd_fork_info): Remove.
7081 (fbsd_pending_children): Use std::list.
7082 (fbsd_remember_child): Likewise.
7083 (fbsd_is_child_pending): Likewise.
7084 (fbsd_pending_vfork_done): Use std::forward_list.
7085 (fbsd_add_vfork_done): Likewise.
7086 (fbsd_is_vfork_done_pending): Likewise.
7087 (fbsd_next_vfork_done): Likewise.
7088
e4a26669
JB
70892017-08-09 John Baldwin <jhb@FreeBSD.org>
7090
7091 * fbsd-nat.c [HAVE_KINFO_GETVMMAP] (struct free_deleter): New.
7092 (fbsd_find_memory_regions): Use free_deleter with std::unique_ptr.
7093 [!HAVE_KINFO_GETVMMAP] (fbsd_find_memory_regions): Use std::string
7094 for `mapfilename'.
7095 (fbsd_xfer_partial): Use gdb::byte_vector.
af3881e6 7096 (fbsd_add_threads): Use gdb::unique_xmalloc_ptr.
e4a26669 7097
142311d3
JB
70982017-08-09 John Baldwin <jhb@FreeBSD.org>
7099
7100 * fbsd-nat.c: [!HAVE_KINFO_GETVMMAP]: Include <sys/user.h> and
7101 "filestuff.h".
7102 (fbsd_find_memory_regions): Fix `mapfile' initialization.
7103
42fa2e0e
TT
71042017-08-09 Tom Tromey <tom@tromey.com>
7105
7106 * skip.c (skiplist_entry): New constructor.
7107 (skiplist_entry::enabled, skiplist_entry::function_is_regexp)
7108 (skiplist_entry::file_is_glob): Now bool.
7109 (skiplist_entry::file, skiplist_entry::function): Now
7110 std::string.
7111 (make_skip_entry): Return a unique_ptr. Use new.
7112 (free_skiplist_entry, free_skiplist_entry_cleanup)
7113 (make_free_skiplist_entry_cleanup): Remove.
7114 (skip_command, skip_disable_command, add_skiplist_entry)
7115 (skip_form_bytes, compile_skip_regexp, skip_command, skip_info)
7116 (skip_file_p, skip_gfile_p, skip_function_p, skip_rfunction_p)
7117 (function_name_is_marked_for_skip): Update.
7118 (skip_delete_command): Update. Use delete.
7119
cd3af38d
JW
71202017-08-09 Jiong Wang <jiong.wang@arm.com>
7121
7122 * aarch64-linux-tdep.c: Include "auxv.h" and "elf/common.h".
7123 (aarch64_linux_core_read_description): New function.
7124 (aarch64_linux_init_abi): Register gdbarch_core_read_description.
7125
29592bde
PA
71262017-08-09 Pedro Alves <palves@redhat.com>
7127
7128 * cp-name-parser.y (cp_comp_to_string): Return a
7129 gdb::unique_xmalloc_ptr<char>.
7130 * cp-support.c (replace_typedefs_qualified_name)
7131 (replace_typedefs): Adjust to use gdb::unique_xmalloc_ptr<char>.
7132 (cp_canonicalize_string_full): Use op= instead of explicit
7133 convertion.
7134 (cp_class_name_from_physname, method_name_from_physname)
7135 (cp_func_name, cp_remove_params): Adjust to use
7136 gdb::unique_xmalloc_ptr<char>.
7137 * cp-support.h (cp_comp_to_string): Return a
7138 gdb::unique_xmalloc_ptr<char>.
7139 * python/py-type.c (typy_lookup_type): Adjust to use
7140 gdb::unique_xmalloc_ptr<char>.
7141
b3340438
L
71422017-08-09 H.J. Lu <hongjiu.lu@intel.com>
7143
7144 * dwarf2read.c (dwarf2_string_attr): Fix a typo.
7145
e88e8651
YQ
71462017-08-09 Alex Lindsay <alexlindsay239@gmail.com>
7147 Yao Qi <yao.qi@linaro.org>
7148
7149 * cp-support.c (cp_canonicalize_string_full): Use
7150 gdb::unique_xmalloc_ptr<char>.
7151 (cp_canonicalize_string): Likewise.
7152
f5a29eb0
YQ
71532017-08-09 Yao Qi <yao.qi@linaro.org>
7154
7155 * features/Makefile (WHICH): Remove i386/ non-linux stuff.
7156 * regformats/i386/amd64-avx-avx512.dat: Remove.
7157 * regformats/i386/amd64-avx-mpx-avx512-pku.dat: Remove.
7158 * regformats/i386/amd64-avx-mpx.dat:Remove.
7159 * regformats/i386/amd64-avx.dat: Remove.
7160 * regformats/i386/amd64-mpx.dat: Remove.
7161 * regformats/i386/i386-avx-avx512.dat: Remove.
7162 * regformats/i386/i386-avx-mpx-avx512-pku.dat: Remove.
7163 * regformats/i386/i386-avx-mpx.dat: Remove.
7164 * regformats/i386/i386-mmx.dat: Remove.
7165 * regformats/i386/i386-mpx.dat: Remove.
7166
57757c2f
YQ
71672017-08-09 Yao Qi <yao.qi@linaro.org>
7168
7169 * amd64-tdep.h (tdesc_x32): Remove the declaration.
7170 * amd64-tdep.c: Don't include features/i386/x32*.c.
7171 (_initialize_amd64_tdep): Don't call initialize_tdesc_x32*
7172 functions.
7173 * features/Makefile (WHICH): Remove i386/x32, i386/x32-avx,
7174 and i386/x32-avx-avx512.
7175 (XMLTOC): Remove i386/x32-avx.xml, i386/x32-avx-avx512.xml,
7176 and i386/x32.xml.
7177 * features/i386/x32-avx-avx512.c: Removed.
7178 * features/i386/x32-avx-avx512.xml: Removed.
7179 * features/i386/x32-avx.c: Removed.
7180 * features/i386/x32-avx.xml: Removed.
7181 * features/i386/x32.c: Removed.
7182 * features/i386/x32.xml: Removed.
7183 * regformats/i386/x32-avx-avx512.dat: Removed.
7184 * regformats/i386/x32-avx.dat: Removed.
7185 * regformats/i386/x32.dat: Removed.
7186
ba7b109b
MR
71872017-08-07 Maciej W. Rozycki <macro@imgtec.com>
7188
7189 PR breakpoints/21886
7190 * mem-break.c (default_memory_insert_breakpoint): Use
7191 `->placed_address' rather than `->reqstd_address' for the
7192 breakpoint location.
7193
e347efc3
MR
71942017-08-07 Maciej W. Rozycki <macro@imgtec.com>
7195
7196 * arch-utils.c (default_print_insn): Remove arch/mach/endian
7197 assertions.
7198
0dba2a6c
MR
71992017-08-07 Maciej W. Rozycki <macro@imgtec.com>
7200
7201 * gdbarch.sh (gdbarch_info): Replace the `tdep_info' member with
7202 a union of `tdep_info', `tdesc_data' and `id'.
7203 * aarch64-tdep.c (aarch64_gdbarch_init): Use `info.tdesc_data'
7204 rather than `info.tdep_info'.
7205 * amd64-linux-tdep.c (amd64_linux_init_abi): Likewise.
7206 * i386-linux-tdep.c (i386_linux_init_abi): Likewise.
7207 * i386-tdep.c (i386_gdbarch_init): Likewise.
7208 * mips-linux-tdep.c (mips_linux_init_abi): Likewise.
7209 * mips-tdep.c (mips_gdbarch_init): Likewise.
7210 * nds32-tdep.c (nds32_gdbarch_init): Likewise.
7211 * rs6000-tdep.c (rs6000_gdbarch_init): Likewise.
7212 * ppc-linux-tdep.c (ppu2spu_sniffer): Use `info.id' rather than
7213 `info.tdep_info'.
7214 (ppc_linux_init_abi): Use `info.tdesc_data' rather than
7215 `info.tdep_info'.
7216 * sparc-tdep.c (sparc32_gdbarch_init): Likewise.
7217 * spu-multiarch.c (spu_gdbarch): Use `info.id' rather than
7218 `info.tdep_info'.
7219 * spu-tdep.c (spu_gdbarch_init): Likewise.
7220 * gdbarch.h: Regenerate.
7221
16eb6b2d
LS
72222017-08-07 Leszek Swirski <leszeks@google.com>
7223
7b005726 7224 PR symtab/20899
16eb6b2d
LS
7225 * dwarf2read.c (dwarf2_string_attr): Allow DW_FORM_GNU_strp_alt.
7226
74cbb09e
SM
72272017-08-07 Simon Marchi <simon.marchi@ericsson.com>
7228
7229 * remote-sim.c (gdbsim_load): Remove char **argv local variable.
7230 (gdbsim_open): Rename gdb_argv args object to argv.
7231
ee0c3293
TT
72322017-08-05 Tom Tromey <tom@tromey.com>
7233
7234 * compile/compile-object-load.c (compile_object_load): Use
7235 gdb::unique_xmalloc_ptr.
7236 * cli/cli-dump.c (scan_filename): Rename from
7237 scan_filename_with_cleanup. Change return type.
7238 (scan_expression): Rename from scan_expression_with_cleanup.
7239 Change return type.
7240 (dump_memory_to_file, dump_value_to_file, restore_command):
7241 Use gdb::unique_xmalloc_ptr. Update.
7242 * cli/cli-cmds.c (find_and_open_script): Use
7243 gdb::unique_xmalloc_ptr.
7244 * tracefile-tfile.c (tfile_open): Use gdb::unique_xmalloc_ptr.
7245 * symmisc.c (maintenance_print_symbols)
7246 (maintenance_print_msymbols): Use gdb::unique_xmalloc_ptr.
7247 * symfile.c (symfile_bfd_open, generic_load)
7248 (add_symbol_file_command, remove_symbol_file_command): Use
7249 gdb::unique_xmalloc_ptr.
7250 * source.c (openp): Use gdb::unique_xmalloc_ptr.
7251 * psymtab.c (maintenance_print_psymbols): Use
7252 gdb::unique_xmalloc_ptr.
7253 * corelow.c (core_open): Use gdb::unique_xmalloc_ptr.
7254 * breakpoint.c (save_breakpoints): Use gdb::unique_xmalloc_ptr.
7255 * solib.c (solib_map_sections): Use gdb::unique_xmalloc_ptr.
7256 (reload_shared_libraries_1): Likewise.
7257
3232fabd
TT
72582017-08-05 Tom Tromey <tom@tromey.com>
7259
7260 * rust-exp.y (rust_op_ptr, set_field): Remove typedefs.
7261 (rust_op_vector, rust_set_vector): New typedefs.
7262 (current_parser): New global.
7263 (work_obstack): Change to pointer type. Update all users.
7264 (rust_ast, pstate): Remove globals.
7265 (struct rust_parser): New.
7266 (%union) <params, field_inits>: Change type.
7267 (start, tuple_expr, unit_expr, struct_expr_list, literal)
7268 (field_expr, expr_list, maybe_expr_list, type_list): Update.
7269 (ast_call_ish, ast_path, ast_function_type, ast_tuple_type)
7270 (convert_params_to_types, convert_params_to_expression): Change
7271 type of "params".
7272 (ast_string): Change type of "fields".
7273 (rust_parse): Make a rust_parser. Remove cleanups.
7274 (rust_lex_tests): Make and install an auto_obstack.
7275
f02fd774
YQ
72762017-08-04 Yao Qi <yao.qi@linaro.org>
7277
7278 * configure.srv (ipa_x32_linux_regobj): New.
7279 * linux-amd64-ipa.c (get_ipa_tdesc): Use X86_TDESC_AVX_AVX512
7280 instead of X86_TDESC_AVX512.
7281 (initialize_low_tracepoint): Call
7282 init_registers_x32_avx_avx512_linux.
7283
91975afd
YQ
72842017-08-04 Yao Qi <yao.qi@linaro.org>
7285
7286 * utils.h (gdb_argv): Add namespace std for nullptr_t.
7287
2331fa3a
RK
72882017-08-03 Ruslan Kabatsayev <b7.10110111@gmail.com>
7289
7290 * MAINTAINERS (Write After Approval): Add Ruslan Kabatsayev.
7291
744e4fe1
TT
72922017-08-03 Tom Tromey <tom@tromey.com>
7293
7294 * utils.c (make_cleanup_freeargv, do_freeargv, gdb_buildargv):
7295 Remove.
7296 * utils.h (make_cleanup_freeargv, gdb_buildargv): Remove.
7297
1c034b67
TT
72982017-08-03 Tom Tromey <tom@tromey.com>
7299
7300 * python/py-param.c (compute_enum_values): Use gdb_argv.
7301
773a1edc
TT
73022017-08-03 Tom Tromey <tom@tromey.com>
7303
7304 * utils.h (struct gdb_argv_deleter): New.
7305 (gdb_argv): New class.
7306 * utils.c (gdb_argv::reset): New method.
7307 * tracepoint.c (delete_trace_variable_command): Use gdb_argv.
7308 * tracefile.c (tsave_command): Use gdb_argv.
7309 * top.c (new_ui_command): Use gdb_argv.
7310 * symmisc.c (maintenance_print_symbols)
7311 (maintenance_print_msymbols, maintenance_expand_symtabs): Use gdb_argv.
7312 * symfile.c (symbol_file_command, generic_load)
7313 (remove_symbol_file_command): Use gdb_argv.
7314 * stack.c (backtrace_command): Use gdb_argv.
7315 * source.c (add_path, show_substitute_path_command)
7316 (unset_substitute_path_command, set_substitute_path_command):
7317 Use gdb_argv.
7318 * skip.c (skip_command): Use gdb_argv. Use gdb_buildargv.
7319 * ser-mingw.c (pipe_windows_open): Use gdb_argv.
7320 * remote.c (extended_remote_run, remote_put_command)
7321 (remote_get_command, remote_delete_command): Use gdb_argv.
7322 * remote-sim.c (gdbsim_load, gdbsim_create_inferior)
7323 (gdbsim_open): Use gdb_argv.
7324 * python/py-cmd.c (gdbpy_string_to_argv): Use gdb_argv.
7325 * psymtab.c (maintenance_print_psymbols): Use gdb_argv.
7326 * procfs.c (procfs_info_proc): Use gdb_argv.
7327 * interps.c (interpreter_exec_cmd): Use gdb_argv.
7328 * infrun.c (handle_command): Use gdb_argv.
7329 * inferior.c (add_inferior_command, clone_inferior_command):
7330 Use gdb_argv.
7331 * guile/scm-string.c (gdbscm_string_to_argv): Use gdb_argv.
7332 * exec.c (exec_file_command): Use gdb_argv.
7333 * cli/cli-cmds.c (alias_command): Use gdb_argv.
7334 * compile/compile.c (build_argc_argv): Use gdb_argv.
7335
0d50bde3
TT
73362017-08-03 Tom Tromey <tom@tromey.com>
7337
7338 * python/python.c (gdbpy_decode_line): Use unique_xmalloc_ptr.
7339
7f968c89
TT
73402017-08-03 Tom Tromey <tom@tromey.com>
7341
7342 * python/python.c (compute_python_string): Return std::string.
7343 (gdbpy_eval_from_control_command): Update.
7344 (do_start_initialization): Use std::string.
7345 * python/py-varobj.c (py_varobj_iter_next): Use string_printf, not
7346 xstrprintf.
7347 * python/py-breakpoint.c (local_setattro): Use string_printf, not
7348 xstrprintf.
7349
3c9ebddd
TT
73502017-08-03 Tom Tromey <tom@tromey.com>
7351
7352 * top.h (do_restore_instream_cleanup): Remove.
7353 * top.c (do_restore_instream_cleanup): Remove.
7354 (read_command_file): Use scoped_restore.
7355 * cli/cli-script.c (execute_user_command): Use scoped_restore.
7356
b51b225e
TT
73572017-08-03 Tom Tromey <tom@tromey.com>
7358
7359 * cli/cli-script.c (execute_user_command)
7360 (execute_control_command): Use scoped_restore.
7361
ac991630
TT
73622017-08-03 Tom Tromey <tom@tromey.com>
7363
7364 * cli/cli-script.c (do_restore_user_call_depth): Remove.
7365 (execute_user_command): Remove user_call_depth; use
7366 user_args_stack's size instead.
7367
898e0c8e
TT
73682017-08-03 Tom Tromey <tom@tromey.com>
7369
7370 * top.h (in_user_command): Remove.
7371 * top.c (in_user_command): Remove.
7372 * cli/cli-script.c (do_restore_user_call_depth)
7373 (execute_user_command): Update.
7374
26fcd5d7
TT
73752017-08-03 Tom Tromey <tom@tromey.com>
7376
7377 * valops.c (search_struct_method): Use gdb::byte_vector.
7378 * valarith.c (value_concat): Use std::vector.
7379 * target.c (memory_xfer_partial): Use gdb::byte_vector.
7380 (simple_search_memory): Likewise.
7381 * printcmd.c (find_string_backward): Use gdb::byte_vector.
7382 * mi/mi-main.c (mi_cmd_data_write_memory): Use gdb::byte_vector.
7383 * gcore.c (gcore_copy_callback): Use gdb::byte_vector.
7384 * elfread.c (elf_rel_plt_read): Use std::string.
7385 * cp-valprint.c (cp_print_value): Use gdb::byte_vector.
7386 * cli/cli-dump.c (restore_section_callback): Use
7387 gdb::byte_vector.
7388
7c218e6c
TT
73892017-08-03 Tom Tromey <tom@tromey.com>
7390
7391 * jit.c (jit_reader_load_command): Use unique_xmalloc_ptr.
7392
31b68d4a
TT
73932017-08-03 Tom Tromey <tom@tromey.com>
7394
7395 * tui/tui-regs.c (tui_restore_gdbout): Remove.
7396 (tui_register_format): Use scoped_restore.
7397
2ec845e7
TT
73982017-08-03 Tom Tromey <tom@tromey.com>
7399
7400 * reverse.c (exec_direction_default): Remove.
7401 (exec_reverse_once): Use scoped_restore.
7402 * remote.c (restore_remote_timeout): Remove.
7403 (remote_flash_erase, remote_flash_write, remote_flash_done)
7404 (readchar, remote_serial_write): Use scoped_restore.
7405 * cli/cli-script.c (struct source_cleanup_lines_args)
7406 (source_cleanup_lines): Remove.
7407 (script_from_file): Use scoped_restore.
7408 * cli/cli-cmds.c (source_verbose_cleanup): Remove.
7409 (source_command): Use scoped_restore.
7410
b3bc8453
TT
74112017-08-03 Tom Tromey <tom@tromey.com>
7412
7413 * utils.h (make_cleanup_free_so): Remove.
7414 * utils.c (do_free_so, make_cleanup_free_so): Remove.
7415 * solist.h (struct so_deleter): New.
7416 (so_list_up): New typedef.
7417 * solib-svr4.c (svr4_read_so_list): Use so_list_up.
7418
e3ad2841
TT
74192017-08-03 Tom Tromey <tom@tromey.com>
7420
7421 * utils.h (make_cleanup_restore_current_language): Remove.
7422 * utils.c (do_restore_current_language)
7423 (make_cleanup_restore_current_language): Remove.
7424 * parse.c (parse_exp_in_context_1)
7425 (parse_expression_with_language): Use
7426 scoped_restore_current_language.
7427 * mi/mi-main.c (mi_cmd_execute): Use
7428 scoped_restore_current_language.
7429 * language.h (scoped_restore_current_language): New class.
7430
b80cf838
TT
74312017-08-03 Tom Tromey <tom@tromey.com>
7432
7433 * compile/compile.c (cleanup_unlink_file): Remove.
7434 (compile_to_object): Use gdb::unlinker.
7435 (eval_compile_command): Likewise.
7436
fad0444a
TT
74372017-08-03 Tom Tromey <tom@tromey.com>
7438
7439 * utils.h (make_cleanup_fclose): Remove.
7440 * utils.c (do_fclose_cleanup, make_cleanup_fclose): Remove.
7441
6e7bc05c
TT
74422017-08-03 Tom Tromey <tom@tromey.com>
7443
7444 * top.c (open_terminal_stream): Return gdb_file_up.
7445 (new_ui_command): Update.
7446
4a45905b
TT
74472017-08-03 Tom Tromey <tom@tromey.com>
7448
7449 * source.c (print_source_lines_base, forward_search_command)
7450 (reverse_search_command): Use gdb_file_up.
7451
7cd06d6e
TT
74522017-08-03 Tom Tromey <tom@tromey.com>
7453
7454 * fbsd-nat.c (fbsd_find_memory_regions): Update.
7455
ed166945
TT
74562017-08-03 Tom Tromey <tom@tromey.com>
7457
7458 * cli/cli-cmds.c (find_and_open_script): Change return type.
7459 Remove "streamp" and "full_path" parameters.
7460 (source_script_with_search): Update.
7461 * auto-load.c (source_script_file): Update.
7462 * cli/cli-cmds.h (find_and_open_script): Change type.
7463 (open_script): New struct.
7464
d419f42d
TT
74652017-08-03 Tom Tromey <tom@tromey.com>
7466
7467 * xml-support.c (xml_fetch_content_from_file): Update.
7468 * ui-file.c (stdio_file::open): Update.
7469 * tracefile-tfile.c (tfile_start): Update.
7470 * remote.c (remote_file_put, remote_file_get): Update.
7471 * nat/linux-procfs.c (linux_proc_get_int)
7472 (linux_proc_pid_get_state, linux_proc_tid_get_name): Update.
7473 * nat/linux-osdata.c (linux_common_core_of_thread): Update.
7474 (command_from_pid, commandline_from_pid, linux_xfer_osdata_cpus)
7475 (print_sockets, linux_xfer_osdata_shm, linux_xfer_osdata_sem)
7476 (linux_xfer_osdata_msg, linux_xfer_osdata_modules): Update.
7477 * nat/linux-btrace.c (linux_determine_kernel_start): Update.
7478 * linux-nat.c (linux_proc_pending_signals): Update.
7479 * dwarf2read.c (write_psymtabs_to_index): Use gdb_file_up.
7480 (file_closer): Remove.
7481 * compile/compile.c (compile_to_object): Update.
7482 * common/filestuff.h (struct gdb_file_deleter): New.
7483 (gdb_file_up): New typedef.
7484 (gdb_fopen_cloexec): Change return type.
7485 * common/filestuff.c (gdb_fopen_cloexec): Return gdb_file_up.
7486 * cli/cli-dump.c (fopen_with_cleanup): Remove.
7487 (dump_binary_file, restore_binary_file): Update.
7488 * auto-load.c (auto_load_objfile_script_1): Update.
7489
4a2b031d
TT
74902017-08-03 Tom Tromey <tom@tromey.com>
7491
7492 * tracepoint.c (tvariables_info_1): Use ui_out_emit_table.
7493 (info_static_tracepoint_markers_command): Likewise.
7494 * solib.c (info_sharedlibrary_command): Use ui_out_emit_table.
7495 * skip.c (skip_info): Use ui_out_emit_table.
7496 * progspace.c (print_program_space): Use ui_out_emit_table.
7497 * osdata.c (info_osdata): Use ui_out_emit_table.
7498 * mi/mi-cmd-info.c (mi_cmd_info_ada_exceptions): Use
7499 ui_out_emit_table.
7500 * linux-thread-db.c (info_auto_load_libthread_db): Use
7501 ui_out_emit_table.
7502 * inferior.c (print_inferior): Use ui_out_emit_table.
7503 * gdb_bfd.c (maintenance_info_bfds): Use ui_out_emit_table.
7504 * breakpoint.c (breakpoint_1): Use ui_out_emit_table.
7505 * auto-load.c (auto_load_info_scripts): Use ui_out_emit_table.
7506 * ada-tasks.c (print_ada_task_info): Use ui_out_emit_table.
7507 * ui-out.h (class ui_out_emit_table): New.
7508
a4f320fd
MR
75092017-08-02 Maciej W. Rozycki <macro@imgtec.com>
7510
7511 * mips-tdep.c (mips_fpu_type_str): New function.
7512 (mips_dump_tdep): Call it.
7513
a2f1f308
MR
75142017-08-01 Maciej W. Rozycki <macro@imgtec.com>
7515
7516 * mips-tdep.c (mips_gdbarch_init): Use MIPS_FPU_TYPE to access
7517 `->mips_fpu_type'.
7518
7e5ed83b
XR
75192017-07-31 Xavier Roirand <roirand@adacore.com>
7520
7521 * solib-darwin.c (DYLD_VERSION_MAX): Increase value.
7522
4c9dc811
XR
75232017-07-27 Xavier Roirand <roirand@adacore.com>
7524
7525 * MAINTAINERS (Write After Approval): Add Xavier Roirand.
7526
27d41eac
YQ
75272017-07-26 Yao Qi <yao.qi@linaro.org>
7528
7529 * cli/cli-cmds.c (maintenancechecklist): New variable.
7530 * gdbcmd.h (maintenancechecklist): Declare it.
7531 * i386-linux-tdep.c (_initialize_i386_linux_tdep) [GDB_SELF_TEST]:
7532 Call i386_linux_read_description with different masks.
7533 * maint.c (maintenance_check_command): New function.
7534 (_initialize_maint_cmds): Call add_prefix_cmd.
7535 * target-descriptions.c (tdesc_reg): override operator != and ==.
7536 (tdesc_type): Likewise.
7537 (tdesc_feature): Likewise.
7538 (target_desc): Likewise.
7539 [GDB_SELF_TEST] (selftests::record_xml_tdesc): New function.
7540 (maintenance_check_xml_descriptions): New function.
7541 (_initialize_target_descriptions) Add command "xml-descriptions".
7542 * target-descriptions.h (selftests::record_xml_tdesc): Declare.
7543
ea03d0d3
YQ
75442017-07-26 Yao Qi <yao.qi@linaro.org>
7545
7546 * i386-linux-tdep.c: Don't include features/i386/i386-*linux.c.
7547 Include features/i386/32bit-*.c.
7548 (i386_linux_read_description): Generate target description if it
7549 doesn't exist.
7550 (_initialize_i386_linux_tdep): Don't call _initialize_tdesc_i386
7551 functions.
7552 * features/i386/32bit-linux.c: Re-generated.
7553 * features/i386/32bit-sse.c: Likewise.
7554 * target-descriptions.c (print_c_feature::visit): Print code to
7555 set register number if needed.
7556 (print_c_feature) <m_next_regnum>: New field.
7557
25aa13e5
YQ
75582017-07-26 Yao Qi <yao.qi@linaro.org>
7559
7560 * features/Makefile (CFILES): Rename with TDESC_CFILES.
7561 (FEATURE_XMLFILES): New.
7562 (FEATURE_CFILES): New.
7563 New rules.
7564 (clean-cfiles): Remove generated c files.
7565 * features/i386/32bit-avx.c: Generated.
7566 * features/i386/32bit-avx512.c: Generated.
7567 * features/i386/32bit-core.c: Generated.
7568 * features/i386/32bit-linux.c: Generated.
7569 * features/i386/32bit-mpx.c: Generated.
7570 * features/i386/32bit-pkeys.c: Generated.
7571 * features/i386/32bit-sse.c: Generated.
7572 * target-descriptions.c: Include algorithm.
7573 (tdesc_element_visitor): Add method visit_end.
7574 (print_c_tdesc): Implement visit_end.
7575 (print_c_tdesc:: m_filename_after_features): Move it to
7576 protected.
7577 (print_c_feature): New class.
7578 (maint_print_c_tdesc_cmd): Use print_c_feature if XML file
7579 name starts with "i386/32bit-".
7580
6eb1e6a8
YQ
75812017-07-26 Yao Qi <yao.qi@linaro.org>
7582
7583 * target-descriptions.c (tdesc_element_visitor): New class.
7584 (tdesc_element): New class.
7585 (tdesc_reg): Inherit from tdesc_element.
7586 (tdesc_reg::accept): New function.
7587 (tdesc_type): Inherit from tdesc_element.
7588 (tdesc_type::accept): New function.
7589 (tdesc_feature): Inherit from tdesc_element.
7590 (tdesc_feature::accept): New function.
7591 (target_desc): Inherit from tdesc_element.
7592 (target_desc::target_desc): New.
7593 (target_desc::~target_desc): New.
7594 (target_desc::accept): New.
7595 (allocate_target_description): Use new.
7596 (free_target_description): Use delete.
7597 (print_c_tdesc): New class.
7598 (maint_print_c_tdesc_cmd): Adjust.
7599
7600 * features/aarch64.c: Re-generated.
7601 * features/arc-arcompact.c: Re-generated.
7602 * features/arc-v2.c: Re-generated.
7603 * features/arm/arm-with-iwmmxt.c: Re-generated.
7604 * features/arm/arm-with-m.c: Re-generated.
7605 * features/arm/arm-with-m-fpa-layout.c: Re-generated.
7606 * features/arm/arm-with-m-vfp-d16.c: Re-generated.
7607 * features/arm/arm-with-neon.c: Re-generated.
7608 * features/arm/arm-with-vfpv2.c: Re-generated.
7609 * features/arm/arm-with-vfpv3.c: Re-generated.
7610 * features/i386/amd64-avx-avx512.c: Re-generated.
7611 * features/i386/amd64-avx-avx512-linux.c: Re-generated.
7612 * features/i386/amd64-avx.c: Re-generated.
7613 * features/i386/amd64-avx-linux.c: Re-generated.
7614 * features/i386/amd64-avx-mpx-avx512-pku.c: Re-generated.
7615 * features/i386/amd64-avx-mpx-avx512-pku-linux.c: Re-generated.
7616 * features/i386/amd64-avx-mpx.c: Re-generated.
7617 * features/i386/amd64-avx-mpx-linux.c: Re-generated.
7618 * features/i386/amd64.c: Re-generated.
7619 * features/i386/amd64-linux.c: Re-generated.
7620 * features/i386/amd64-mpx.c: Re-generated.
7621 * features/i386/amd64-mpx-linux.c: Re-generated.
7622 * features/i386/i386-avx-avx512.c: Re-generated.
7623 * features/i386/i386-avx-avx512-linux.c: Re-generated.
7624 * features/i386/i386-avx.c: Re-generated.
7625 * features/i386/i386-avx-linux.c: Re-generated.
7626 * features/i386/i386-avx-mpx-avx512-pku.c: Re-generated.
7627 * features/i386/i386-avx-mpx-avx512-pku-linux.c: Re-generated.
7628 * features/i386/i386-avx-mpx.c: Re-generated.
7629 * features/i386/i386-avx-mpx-linux.c: Re-generated.
7630 * features/i386/i386.c: Re-generated.
7631 * features/i386/i386-linux.c: Re-generated.
7632 * features/i386/i386-mmx.c: Re-generated.
7633 * features/i386/i386-mmx-linux.c: Re-generated.
7634 * features/i386/i386-mpx.c: Re-generated.
7635 * features/i386/i386-mpx-linux.c: Re-generated.
7636 * features/i386/x32-avx-avx512.c: Re-generated.
7637 * features/i386/x32-avx-avx512-linux.c: Re-generated.
7638 * features/i386/x32-avx.c: Re-generated.
7639 * features/i386/x32-avx-linux.c: Re-generated.
7640 * features/i386/x32.c: Re-generated.
7641 * features/i386/x32-linux.c: Re-generated.
7642 * features/microblaze.c: Re-generated.
7643 * features/microblaze-with-stack-protect.c: Re-generated.
7644 * features/mips64-dsp-linux.c: Re-generated.
7645 * features/mips64-linux.c: Re-generated.
7646 * features/mips-dsp-linux.c: Re-generated.
7647 * features/mips-linux.c: Re-generated.
7648 * features/nds32.c: Re-generated.
7649 * features/nios2.c: Re-generated.
7650 * features/nios2-linux.c: Re-generated.
7651 * features/rs6000/powerpc-32.c: Re-generated.
7652 * features/rs6000/powerpc-32l.c: Re-generated.
7653 * features/rs6000/powerpc-403.c: Re-generated.
7654 * features/rs6000/powerpc-403gc.c : Re-generated.
7655 * features/rs6000/powerpc-405.c: Re-generated.
7656 * features/rs6000/powerpc-505.c: Re-generated.
7657 * features/rs6000/powerpc-601.c: Re-generated.
7658 * features/rs6000/powerpc-602.c: Re-generated.
7659 * features/rs6000/powerpc-603.c: Re-generated.
7660 * features/rs6000/powerpc-604.c: Re-generated.
7661 * features/rs6000/powerpc-64.c: Re-generated.
7662 * features/rs6000/powerpc-64l.c: Re-generated.
7663 * features/rs6000/powerpc-7400.c: Re-generated.
7664 * features/rs6000/powerpc-750.c: Re-generated.
7665 * features/rs6000/powerpc-860.c: Re-generated.
7666 * features/rs6000/powerpc-altivec32.c: Re-generated.
7667 * features/rs6000/powerpc-altivec32l.c: Re-generated.
7668 * features/rs6000/powerpc-altivec64.c: Re-generated.
7669 * features/rs6000/powerpc-altivec64l.c: Re-generated.
7670 * features/rs6000/powerpc-cell32l.c: Re-generated.
7671 * features/rs6000/powerpc-cell64l.c: Re-generated.
7672 * features/rs6000/powerpc-e500.c: Re-generated.
7673 * features/rs6000/powerpc-e500l.c: Re-generated.
7674 * features/rs6000/powerpc-isa205-32l.c: Re-generated.
7675 * features/rs6000/powerpc-isa205-64l.c: Re-generated.
7676 * features/rs6000/powerpc-isa205-altivec32l.c: Re-generated.
7677 * features/rs6000/powerpc-isa205-altivec64l.c: Re-generated.
7678 * features/rs6000/powerpc-isa205-vsx32l.c: Re-generated.
7679 * features/rs6000/powerpc-isa205-vsx64l.c: Re-generated.
7680 * features/rs6000/powerpc-vsx32.c: Re-generated.
7681 * features/rs6000/powerpc-vsx32l.c: Re-generated.
7682 * features/rs6000/powerpc-vsx64.c: Re-generated.
7683 * features/rs6000/powerpc-vsx64l.c: Re-generated.
7684 * features/rs6000/rs6000.c: Re-generated.
7685 * features/s390-linux32.c: Re-generated.
7686 * features/s390-linux32v1.c: Re-generated.
7687 * features/s390-linux32v2.c: Re-generated.
7688 * features/s390-linux64.c: Re-generated.
7689 * features/s390-linux64v1.c: Re-generated.
7690 * features/s390-linux64v2.c: Re-generated.
7691 * features/s390-te-linux64.c: Re-generated.
7692 * features/s390-tevx-linux64.c: Re-generated.
7693 * features/s390-vx-linux64.c: Re-generated.
7694 * features/s390x-linux64.c: Re-generated.
7695 * features/s390x-linux64v1.c: Re-generated.
7696 * features/s390x-linux64v2.c: Re-generated.
7697 * features/s390x-te-linux64.c: Re-generated.
7698 * features/s390x-tevx-linux64.c: Re-generated.
7699 * features/s390x-vx-linux64.c: Re-generated.
7700 * features/sparc/sparc32-solaris.c: Re-generated.
7701 * features/sparc/sparc64-solaris.c: Re-generated.
7702 * features/tic6x-c62x.c: Re-generated.
7703 * features/tic6x-c62x-linux.c: Re-generated.
7704 * features/tic6x-c64x.c: Re-generated.
7705 * features/tic6x-c64x-linux.c: Re-generated.
7706 * features/tic6x-c64xp.c: Re-generated.
7707 * features/tic6x-c64xp-linux.c: Re-generated.
7708
35b4818d
YQ
77092017-07-26 Yao Qi <yao.qi@linaro.org>
7710
7711 * i386-linux-tdep.c (i386_linux_read_description): New function.
7712 (i386_linux_core_read_description): Call
7713 i386_linux_read_description.
7714 * i386-linux-tdep.h (i386_linux_read_description): Declare.
7715 (tdesc_i386_linux, tdesc_i386_mmx_linux): Remove declarations.
7716 (tdesc_i386_avx_linux, tdesc_i386_mpx_linux): Likewise
7717 (tdesc_i386_avx_mpx_linux, tdesc_i386_avx_avx512_linux): Likewise.
7718 (tdesc_i386_avx_mpx_avx512_pku_linux): Likewise.
7719 * x86-linux-nat.c (x86_linux_read_description): Call
7720 i386_linux_read_description.
7721
8e2141c6
YQ
77222017-07-26 Yao Qi <yao.qi@linaro.org>
7723
7724 * NEWS: Mention it.
7725 * features/Makefile (%.c: %.xml): Pass the xml file name to
7726 command "maint print c-tdesc".
7727 * target-descriptions.c (maint_print_c_tdesc_cmd): Get file
7728 name from 'arg'.
7729
b468ff4c
YQ
77302017-07-26 Yao Qi <yao.qi@linaro.org>
7731
7732 * target-descriptions.c (target_desc): Add ctor and dtor. Do
7733 in-class initialization.
7734 (tdesc_create_feature): Call new instead of XCNEW.
7735 (free_target_description): Ue delete.
7736
b9c0e1b4
JB
77372017-07-25 John Baldwin <jhb@FreeBSD.org>
7738
7739 * configure.nat: Add "-lkvm" for NetBSD/sparc64 and fix typo.
7740
a04b5337
YQ
77412017-07-25 Yao Qi <yao.qi@linaro.org>
7742
7743 * amd64-tdep.c (amd64_init_abi): Make argument default_tdesc
7744 constant.
7745 (amd64_x32_init_abi): Likewise.
7746 * amd64-tdep.h (amd64_init_abi): Update declaration.
7747 (amd64_x32_init_abi): Likewise.
7748
02ad7fc2
YQ
77492017-07-25 Yao Qi <yao.qi@linaro.org>
7750
7751 PR tdep/21717
7752 * arm-linux-nat.c (arm_linux_fetch_inferior_registers): Update
7753 condition for FPSCR.
7754 (arm_linux_store_inferior_registers): Likewise.
7755
b6f48cb0
TT
77562017-07-22 Tom Tromey <tom@tromey.com>
7757
7758 * break-catch-syscall.c (struct catch_syscall_inferior_data)
7759 <syscalls_counts>: Now a std::vector.
7760 (get_catch_syscall_inferior_data): Use "new".
7761 (catch_syscall_inferior_data_cleanup): Use "delete".
7762 (insert_catch_syscall, remove_catch_syscall)
7763 (clear_syscall_counts): Update.
7764
e12c9b7a
TT
77652017-07-22 Tom Tromey <tom@tromey.com>
7766
7767 * break-catch-syscall.c (syscall_catchpoint)
7768 <syscalls_to_be_caught>: Now a std::vector<int>
7769 (~syscall_catchpoint): Remove.
7770 (insert_catch_syscall, remove_catch_syscall)
7771 (breakpoint_hit_catch_syscall, print_one_catch_syscall)
7772 (print_mention_catch_syscall, print_recreate_catch_syscall):
7773 Update.
7774 (create_syscall_event_catchpoint): Change type of "filter"
7775 parameter.
7776 (catch_syscall_split_args): Return a std::vector.
7777 (catch_syscall_command_1, catching_syscall_number_1): Update.
7778
4fa8aeac
TT
77792017-07-22 Tom Tromey <tom@tromey.com>
7780
7781 * break-catch-throw.c (struct exception_catchpoint)
7782 <exception_rx>: Now a std::string.
7783 (~exception_catchpoint): Remove.
7784 (print_one_detail_exception_catchpoint): Update.
7785 (handle_gnu_v3_exceptions): Change type of except_rx.
7786 (extract_exception_regexp): Return a std::string.
7787 (catch_exception_command_1): Update.
7788
f746a154
TT
77892017-07-22 Tom Tromey <tom@tromey.com>
7790
7791 * break-catch-sig.c (gdb_signal_type): Remove typedef.
7792 (struct signal_catchpoint) <signals_to_be_caught>: Now a
7793 std::vector.
7794 <catch_all>: Now a bool.
7795 (~signal_catchpoint): Remove.
7796 (signal_catchpoint_insert_location)
7797 (signal_catchpoint_remove_location)
7798 (signal_catchpoint_breakpoint_hit, signal_catchpoint_print_one)
7799 (signal_catchpoint_print_mention)
7800 (signal_catchpoint_print_recreate)
7801 (signal_catchpoint_explains_signal): Update.
7802 (create_signal_catchpoint): Change type of "filter" and
7803 "catch_all".
7804 (catch_signal_split_args): Return a std::vector. Change type of
7805 "catch_all".
7806 (catch_signal_command): Update.
7807
47e77640
PA
78082017-07-20 Pedro Alves <palves@redhat.com>
7809
7810 * ada-lang.c (ada_language_defn): Make extern.
7811 (_initialize_ada_language): Remove add_language call.
7812 * c-lang.c (c_language_defn, cplus_language_defn)
7813 (asm_language_defn, minimal_language_defn): Make extern.
7814 (_initialize_c_language): Delete.
7815 * completer.c (compare_cstrings): Delete, moved to utils.h.
7816 * d-lang.c (d_language_defn): Make extern.
7817 (_initialize_d_language): Remove add_language calls.
7818 * defs.h (enum language): Add comment.
7819 * f-lang.c (f_language_defn): Make extern.
7820 (_initialize_f_language): Remove add_language call.
7821 * go-lang.c (go_language_defn): Make extern.
7822 (_initialize_go_language): Remove add_language call.
7823 * language.c: Include <algorithm>.
7824 (languages): Redefine as const array.
7825 (languages_size, languages_allocsize, DEFAULT_ALLOCSIZE): Delete.
7826 (set_language_command): Handle "local". Use for-range loop.
7827 (set_language): Remove loop.
7828 (language_enum): Rewrite.
7829 (language_def, language_str): Remove loops.
7830 (add_language): Delete.
7831 (add_set_language_command): New, based on add_languages.
7832 (skip_language_trampoline): Adjust.
7833 (local_language_defn): Delete.
7834 (language_gdbarch_post_init): Adjust.
7835 (_initialize_language): Remove add_language calls. Call
7836 add_set_language_command.
7837 * language.h (add_language): Delete.
7838 (auto_language_defn)
7839 (unknown_language_defn, minimal_language_defn, ada_language_defn)
7840 (asm_language_defn, c_language_defn, cplus_language_defn)
7841 (d_language_defn, f_language_defn, go_language_defn)
7842 (m2_language_defn, objc_language_defn, opencl_language_defn)
7843 (pascal_language_defn, rust_language_defn): Declare.
7844 * m2-lang.c (m2_language_defn): Make extern.
7845 (_initialize_m2_language): Remove add_language call.
7846 * objc-lang.c (objc_language_defn): Make extern.
7847 (_initialize_objc_language): Remove add_language call.
7848 * opencl-lang.c (opencl_language_defn): Make extern.
7849 (_initialize_opencl_language): Remove add_language call.
7850 * p-lang.c (pascal_language_defn): Make extern.
7851 (_initialize_pascal_language): Delete.
7852 * rust-lang.c (rust_language_defn): Make extern.
7853 (_initialize_rust_language): Delete.
7854 * utils.h (compare_cstrings): New static inline function.
7855
edb0c9cb
PA
78562017-07-20 Pedro Alves <palves@redhat.com>
7857
7858 * ada-lang.c (ada_to_fixed_type_1): Adjust.
7859 (get_var_value): Constify parameters.
7860 (get_int_var_value): Change prototype.
7861 (to_fixed_range_type): Adjust.
7862 * ada-lang.h (get_int_var_value): Change prototype.
7863
a778f165
PA
78642017-07-20 Pedro Alves <palves@redhat.com>
7865
7866 * dwarf2read.c (dw2_lookup_symbol): Use
7867 SYMBOL_MATCHES_SEARCH_NAME.
7868 * psymtab.c (psym_lookup_symbol): Use SYMBOL_MATCHES_SEARCH_NAME.
7869
42edd901
PA
78702017-07-20 Pedro Alves <palves@redhat.com>
7871
7872 * block.c (block_iter_name_step, block_iter_name_first)
7873 (block_iter_name_next): Delete.
7874 (block_lookup_symbol_primary): Adjust to use
7875 dict_iter_match_first/dict_iter_match_next.
7876 * block.h (block_iter_name_first, block_iter_name_next): Delete
7877 declarations.
7878 (ALL_BLOCK_SYMBOLS_WITH_NAME): Adjust to use
7879 dict_iter_match_first/dict_iter_match_next.
7880
cf325299
PA
78812017-07-20 Pedro Alves <palves@redhat.com>
7882
7883 * cp-support.c (cp_find_first_component_aux): Add missing case for
7884 end of string.
7885
c5ed0576
DB
78862017-07-18 David Blaikie <dblaikie@gmail.com>
7887
7888 * dwarf2read.c (create_cus_hash_table): Re-add lost initialization
7889 of dwo_cu's dwo_file.
7890
27841e76
YQ
78912017-07-18 Yao Qi <yao.qi@linaro.org>
7892
7893 * remote.c (store_registers_using_G): Remove one line comment.
7894
cfb7e58b
YQ
78952017-07-18 Yao Qi <yao.qi@linaro.org>
7896
7897 * regcache.c (regcache_cpy): Simplify it.
7898 (regcache::cpy_no_passthrough): Remove it.
7899 * regcache.h (cpy_no_passthrough): Remove it.
7900 (regcache_dup, regcache_cpy): Update comments.
7901
386535dd
PA
79022017-07-18 Pedro Alves <palves@redhat.com>
7903
7904 * remote-sim.c (sim_command_completer): Adjust to work with a
7905 completion_tracker instead of a VEC.
7906
c45ec17c
PA
79072017-07-17 Pedro Alves <palves@redhat.com>
7908
7909 * completer.c (complete_source_filenames): New function.
7910 (complete_address_and_linespec_locations): New function.
7911 (location_completer): Use complete_address_and_linespec_locations.
7912 (completion_tracker::build_completion_result): Honor the tracker's
7913 request to suppress append.
7914 * completer.h (completion_tracker::suppress_append_ws)
7915 (completion_tracker::set_suppress_append_ws): New methods.
7916 (completion_tracker::m_suppress_append_ws): New field.
7917 (complete_source_filenames): New declaration.
7918 * linespec.c (linespec_complete_what): New.
7919 (struct ls_parser) <complete_what, completion_word,
7920 completion_quote_char, completion_quote_end, completion_tracker>:
7921 New fields.
7922 (string_find_incomplete_keyword_at_end): New.
7923 (linespec_lexer_lex_string): Record quote char. If in completion
7924 mode, don't throw.
7925 (linespec_lexer_consume_token): Advance the completion word point.
7926 (linespec_lexer_peek_token): Save/restore completion info.
7927 (save_stream_and_consume_token): New.
7928 (set_completion_after_number): New.
7929 (linespec_parse_basic): Set what to complete next depending on
7930 token. Handle function and label completions specially.
7931 (parse_linespec): Disable objc shortcut in completion mode. Set
7932 what to complete next depending on token type. Skip keyword if in
7933 completion mode.
7934 (complete_linespec_component, linespec_complete): New.
7935 * linespec.h (linespec_complete): Declare.
7936
be966d42
PA
79372017-07-17 Pedro Alves <palves@redhat.com>
7938
7939 * linespec.c (linespec_lexer_lex_string, find_toplevel_char):
7940 Handle 'operator<' / 'operator<<'.
7941
a2459270
PA
79422017-07-17 Pedro Alves <palves@redhat.com>
7943
7944 * completer.c (collect_explicit_location_matches): Handle
7945 MATCH_LABEL.
7946 (convert_explicit_location_to_linespec): New, factored out from
7947 ...
7948 (convert_explicit_location_to_sals): ... this.
7949 (complete_label): New.
7950 (linespec_complete_label, find_label_symbols_in_block): New.
7951 (find_label_symbols): Add completion_mode parameter and adjust to
7952 call find_label_symbols_in_block.
7953 * linespec.h (linespec_complete_label): Declare.
7954
c6756f62
PA
79552017-07-17 Pedro Alves <palves@redhat.com>
7956
7957 * ada-lang.c (ada_collect_symbol_completion_matches): Add
7958 complete_symbol_mode parameter.
7959 * cli/cli-cmds.c (complete_command): Get the completion result out
7960 of the handle_brkchars tracker if used a custom word point.
7961 * completer.c: Include "linespec.h".
7962 (enum explicit_location_match_type) <MATCH_LINE>: New enumerator.
7963 (advance_to_expression_complete_word_point): New.
7964 (completion_tracker::completes_to_completion_word): New.
7965 (complete_files_symbols): Pass down
7966 complete_symbol_mode::EXPRESSION.
7967 (explicit_options, probe_options): New.
7968 (collect_explicit_location_matches): Complete on the
7969 explictit_loc->foo instead of word. Use
7970 linespec_complete_function. Handle MATCH_LINE. Handle offering
7971 keyword and options completions.
7972 (backup_text_ptr): Delete.
7973 (skip_keyword): New.
7974 (complete_explicit_location): Remove 'word' parameter. Add
7975 language, quoted_arg_start and quoted_arg_end parameters.
7976 Rewrite, parsing left to right.
7977 (location_completer): Rewrite.
7978 (location_completer_handle_brkchars): New function.
7979 (symbol_completer): Pass down complete_symbol_mode::EXPRESSION.
7980 (enum complete_line_internal_reason): Adjust comments.
7981 (completion_tracker::discard_completions): New.
7982 (completer_handle_brkchars_func_for_completer): Handle
7983 location_completer.
7984 (gdb_custom_word_point_brkchars)
7985 (gdb_org_rl_basic_quote_characters): New.
7986 (gdb_completion_word_break_characters_throw)
7987 (completion_find_completion_word): Handle trackers that use a
7988 custom word point.
7989 (completion_tracker::advance_custom_word_point_by): New.
7990 (completion_tracker::build_completion_result): Don't rely on
7991 readline appending the quote char.
7992 (gdb_rl_attempted_completion_function_throw): Handle trackers that
7993 use a custom word point.
7994 (gdb_rl_attempted_completion_function): Restore
7995 rl_basic_quote_characters.
7996 * completer.h (class completion_tracker): Extend intro comment.
7997 (completion_tracker::set_quote_char)
7998 (completion_tracker::quote_char)
7999 (completion_tracker::set_use_custom_word_point)
8000 (completion_tracker::use_custom_word_point)
8001 (completion_tracker::custom_word_point)
8002 (completion_tracker::set_custom_word_point)
8003 (completion_tracker::advance_custom_word_point_by)
8004 (completion_tracker::completes_to_completion_word)
8005 (completion_tracker::discard_completions): New methods.
8006 (completion_tracker::m_quote_char)
8007 (completion_tracker::m_use_custom_word_point)
8008 (completion_tracker::m_custom_word_point): New fields.
8009 (advance_to_expression_complete_word_point): Declare.
8010 * f-lang.c (f_collect_symbol_completion_matches): Add
8011 complete_symbol_mode parameter.
8012 * language.h (struct language_defn)
8013 <la_collect_symbol_completion_matches>: Add complete_symbol_mode
8014 parameter.
8015 * linespec.c (linespec_keywords): Add NULL terminator. Make extern.
8016 (linespec_complete_function): New function.
8017 (linespec_lexer_lex_keyword): Adjust.
8018 * linespec.h (linespec_keywords, linespec_complete_function): New
8019 declarations.
8020 * location.c (find_end_quote): New function.
8021 (explicit_location_lex_one): Add explicit_completion_info
8022 parameter. Save quoting info. Don't throw if being called for
8023 completion. Don't handle Ada operators here.
8024 (is_cp_operator, skip_op_false_positives, first_of)
8025 (explicit_location_lex_one_function): New function.
8026 (string_to_explicit_location): Replace 'dont_throw' parameter with
8027 an explicit_completion_info pointer parameter. Handle it. Don't
8028 use explicit_location_lex_one to lex function names. Use
8029 explicit_location_lex_one_function instead.
8030 * location.h (struct explicit_completion_info): New.
8031 (string_to_explicit_location): Replace 'dont_throw' parameter with
8032 an explicit_completion_info pointer parameter.
8033 * symtab.c (default_collect_symbol_completion_matches_break_on):
8034 Add complete_symbol_mode parameter. Handle LINESPEC mode.
8035 (default_collect_symbol_completion_matches)
8036 (collect_symbol_completion_matches): Add complete_symbol_mode
8037 parameter.
8038 (collect_symbol_completion_matches_type): Pass down
8039 complete_symbol_mode::EXPRESSION.
8040 (collect_file_symbol_completion_matches): Add complete_symbol_mode
8041 parameter. Handle LINESPEC mode.
8042 * symtab.h (complete_symbol_mode): New.
8043 (default_collect_symbol_completion_matches_break_on)
8044 (default_collect_symbol_completion_matches)
8045 (collect_symbol_completion_matches)
8046 (collect_file_symbol_completion_matches): Add complete_symbol_mode
8047 parameter.
8048
1d550c82
PA
80492017-07-17 Pedro Alves <palves@redhat.com>
8050
8051 * utils.c (enum class strncmp_iw_mode): New.
8052 (strcmp_iw): Rename to ...
8053 (strncmp_iw_with_mode): ... this. Add string2_len and mode
8054 parameters. Handle them.
8055 (strncmp_iw): New.
8056 (strcmp_iw): Reimplement as wrapper around strncmp_iw_with_mode.
8057 * utils.h (strncmp_iw): Declare.
8058 (strcmp_iw): Move describing comments here.
8059
8090b426
PA
80602017-07-17 Pedro Alves <palves@redhat.com>
8061
8062 * c-exp.y (operator_stoken): Use CP_OPERATOR_LEN and
8063 CP_OPERATOR_STR.
8064 * c-typeprint.c (is_type_conversion_operator): Use
8065 CP_OPERATOR_STR.
8066 * cp-support.c (LENGTH_OF_OPERATOR): Delete.
8067 (cp_find_first_component_aux): Use CP_OPERATOR_STR and
8068 CP_OPERATOR_LEN.
8069 * cp-support.h (CP_OPERATOR_STR, CP_OPERATOR_LEN): New.
8070 * gnu-v2-abi.c (gnuv2_is_operator_name): Use CP_OPERATOR_STR.
8071 * gnu-v3-abi.c (gnuv3_is_operator_name): Use CP_OPERATOR_STR.
8072 * linespec.c (linespec_lexer_lex_string): Use CP_OPERATOR_LEN and
8073 CP_OPERATOR_STR.
8074 * location.c: Include "cp-support.h".
8075 (explicit_location_lex_one): Use CP_OPERATOR_LEN and
8076 CP_OPERATOR_STR.
8077 * symtab.c (operator_chars): Use CP_OPERATOR_STR and
8078 CP_OPERATOR_LEN.
8079
6a2c1b87
PA
80802017-07-17 Pedro Alves <palves@redhat.com>
8081
8082 * cli/cli-cmds.c (complete_command): Use a completion tracker
8083 along with completion_find_completion_word for handle_brkchars
8084 phase.
8085 * completer.c (RL_QF_SINGLE_QUOTE, RL_QF_DOUBLE_QUOTE)
8086 (RL_QF_BACKSLASH, RL_QF_OTHER_QUOTE): New.
8087 (struct gdb_rl_completion_word_info): New.
8088 (gdb_rl_find_completion_word): New.
8089 (completion_find_completion_word): New.
8090 * completer.h (completion_find_completion_word): Declare.
8091
eb3ff9a5
PA
80922017-07-17 Pedro Alves <palves@redhat.com>
8093
8094 * ada-lang.c (symbol_completion_match): Adjust comments.
8095 (symbol_completion_add): Replace vector parameter with
8096 completion_tracker parameter. Use it.
8097 (ada_make_symbol_completion_list): Rename to...
8098 (ada_collect_symbol_completion_matches): ... this. Add
8099 completion_tracker parameter and use it.
8100 (ada_language_defn): Adjust.
8101 * break-catch-syscall.c (catch_syscall_completer): Adjust
8102 prototype and work with completion_tracker instead of VEC.
8103 * breakpoint.c (condition_completer): Adjust prototype and work
8104 with completion_tracker instead of VEC.
8105 * c-lang.c (c_language_defn, cplus_language_defn)
8106 (asm_language_defn, minimal_language_defn): Adjust to renames.
8107 * cli/cli-cmds.c (complete_command): Rework using
8108 completion_tracker. Catch exceptions when completing.
8109 * cli/cli-decode.c (integer_unlimited_completer)
8110 (complete_on_cmdlist, complete_on_enum): Adjust prototype and work
8111 with completion_tracker instead of VEC.
8112 * command.h (struct completion_tracker): Forward declare.
8113 (completer_ftype, completer_handle_brkchars_ftype): Change
8114 types.
8115 (complete_on_cmdlist, complete_on_enum): Adjust.
8116 * completer.c: Include <algorithm>.
8117 (struct gdb_completer_state): New.
8118 (current_completion): New global.
8119 (readline_line_completion_function): Delete.
8120 (noop_completer, filename_completer)
8121 (filename_completer_handle_brkchars, complete_files_symbols)
8122 (linespec_location_completer): Adjust to work with a
8123 completion_tracker instead of a VEC.
8124 (string_or_empty): New.
8125 (collect_explicit_location_matches): Adjust to work with a
8126 completion_tracker instead of a VEC.
8127 (explicit_location_completer): Rename to ...
8128 (complete_explicit_location): ... this and adjust to work with a
8129 completion_tracker instead of a VEC.
8130 (location_completer): Adjust to work with a completion_tracker
8131 instead of a VEC.
8132 (add_struct_fields): Adjust to work with a completion_list instead
8133 of VEC.
8134 (expression_completer): Rename to ...
8135 (complete_expression): ... this and adjust to work with a
8136 completion_tracker instead of a VEC. Use complete_files_symbols.
8137 (expression_completer): Reimplement on top of complete_expression.
8138 (symbol_completer): Adjust to work with a completion_tracker
8139 instead of a VEC.
8140 (enum complete_line_internal_reason): Add describing comments.
8141 (complete_line_internal_normal_command): Adjust to work with a
8142 completion_tracker instead of a VEC.
8143 (complete_line_internal): Rename to ...
8144 (complete_line_internal_1): ... this and adjust to work with a
8145 completion_tracker instead of a VEC. Assert TEXT is NULL in the
8146 handle_brkchars phase.
8147 (new_completion_tracker): Delete.
8148 (complete_line_internal): Reimplement as TRY/CATCH wrapper around
8149 complete_line_internal_1.
8150 (free_completion_tracker): Delete.
8151 (INITIAL_COMPLETION_HTAB_SIZE): New.
8152 (completion_tracker::completion_tracker)
8153 (completion_tracker::~completion_tracker): New.
8154 (maybe_add_completion): Delete.
8155 (completion_tracker::maybe_add_completion)
8156 (completion_tracker::add_completion)
8157 (completion_tracker::add_completions): New.
8158 (throw_max_completions_reached_error): Delete.
8159 (complete_line): Adjust to work with a completion_tracker instead
8160 of a VEC. Don't create a completion_tracker_t or check for max
8161 completions here.
8162 (command_completer, command_completer_handle_brkchars)
8163 (signal_completer, reg_or_group_completer_1)
8164 (reg_or_group_completer, default_completer_handle_brkchars):
8165 Adjust to work with a completion_tracker.
8166 (gdb_completion_word_break_characters_throw): New.
8167 (gdb_completion_word_break_characters): Reimplement.
8168 (line_completion_function): Delete.
8169 (completion_tracker::recompute_lowest_common_denominator)
8170 (expand_preserving_ws)
8171 (completion_tracker::build_completion_result)
8172 (completion_result::completion_result)
8173 (completion_result::completion_result)
8174 (completion_result::~completion_result)
8175 (completion_result::completion_result)
8176 (completion_result::release_match_list, compare_cstrings)
8177 (completion_result::sort_match_list)
8178 (completion_result::reset_match_list)
8179 (gdb_rl_attempted_completion_function_throw)
8180 (gdb_rl_attempted_completion_function): New.
8181 * completer.h (completion_list, struct completion_result)
8182 (class completion_tracker): New.
8183 (complete_line): Add completion_tracker parameter.
8184 (readline_line_completion_function): Delete.
8185 (gdb_rl_attempted_completion_function): New.
8186 (noop_completer, filename_completer, expression_completer)
8187 (location_completer, symbol_completer, command_completer)
8188 (signal_completer, reg_or_group_completer): Update prototypes.
8189 (completion_tracker_t, new_completion_tracker)
8190 (make_cleanup_free_completion_tracker): Delete.
8191 (enum maybe_add_completion_enum): Delete.
8192 (maybe_add_completion): Delete.
8193 (throw_max_completions_reached_error): Delete.
8194 * corefile.c (complete_set_gnutarget): Adjust to work with a
8195 completion_tracker instead of a VEC.
8196 * cp-abi.c (cp_abi_completer): Adjust to work with a
8197 completion_tracker instead of a VEC.
8198 * d-lang.c (d_language_defn): Adjust.
8199 * disasm.c (disassembler_options_completer): Adjust to work with a
8200 completion_tracker instead of a VEC.
8201 * f-lang.c (f_make_symbol_completion_list): Rename to ...
8202 (f_collect_symbol_completion_matches): ... this. Adjust to work
8203 with a completion_tracker instead of a VEC.
8204 (f_language_defn): Adjust.
8205 * go-lang.c (go_language_defn): Adjust.
8206 * guile/scm-cmd.c (cmdscm_add_completion, cmdscm_completer):
8207 Adjust to work with a completion_tracker instead of a VEC.
8208 * infrun.c (handle_completer): Likewise.
8209 * interps.c (interpreter_completer): Likewise.
8210 * interps.h (interpreter_completer): Likewise.
8211 * language.c (unknown_language_defn, auto_language_defn)
8212 (local_language_defn): Adjust.
8213 * language.h (language_defn::la_make_symbol_completion_list):
8214 Rename to ...
8215 (language_defn::la_collect_symbol_completion_matches): ... this
8216 and adjust to work with a completion_tracker instead of a VEC.
8217 * m2-lang.c (m2_language_defn): Adjust.
8218 * objc-lang.c (objc_language_defn): Adjust.
8219 * opencl-lang.c (opencl_language_defn): Adjust.
8220 * p-lang.c (pascal_language_defn): Adjust.
8221 * python/py-cmd.c (cmdpy_completer_helper): Handle NULL word.
8222 (cmdpy_completer_handle_brkchars, cmdpy_completer): Adjust to work
8223 with a completion_tracker.
8224 * rust-lang.c (rust_language_defn): Adjust.
8225 * symtab.c (free_completion_list, do_free_completion_list)
8226 (return_val, completion_tracker): Delete.
8227 (completion_list_add_name, completion_list_add_symbol)
8228 (completion_list_add_msymbol, completion_list_objc_symbol)
8229 (completion_list_add_fields, add_symtab_completions): Add
8230 completion_tracker parameter and use it.
8231 (default_make_symbol_completion_list_break_on_1): Rename to...
8232 (default_collect_symbol_completion_matches_break_on): ... this.
8233 Add completion_tracker parameter and use it instead of allocating
8234 a completion tracker here.
8235 (default_make_symbol_completion_list_break_on): Delete old
8236 implementation.
8237 (default_make_symbol_completion_list): Delete.
8238 (default_collect_symbol_completion_matches): New.
8239 (make_symbol_completion_list): Delete.
8240 (collect_symbol_completion_matches): New.
8241 (make_symbol_completion_type): Rename to ...
8242 (collect_symbol_completion_matches_type): ... this. Add
8243 completion_tracker parameter and use it instead of VEC.
8244 (make_file_symbol_completion_list_1): Rename to...
8245 (collect_file_symbol_completion_matches): ... this. Add
8246 completion_tracker parameter and use it instead of VEC.
8247 (make_file_symbol_completion_list): Delete.
8248 (add_filename_to_list): Use completion_list instead of a VEC.
8249 (add_partial_filename_data::list): Now a completion_list.
8250 (make_source_files_completion_list): Work with a completion_list
8251 instead of a VEC.
8252 * symtab.h: Include "completer.h".
8253 (default_make_symbol_completion_list_break_on)
8254 (default_make_symbol_completion_list, make_symbol_completion_list)
8255 (make_symbol_completion_type, make_file_symbol_completion_list)
8256 (make_source_files_completion_list): Delete.
8257 (default_collect_symbol_completion_matches_break_on)
8258 (default_collect_symbol_completion_matches)
8259 (collect_symbol_completion_matches)
8260 (collect_symbol_completion_matches_type)
8261 (collect_file_symbol_completion_matches)
8262 (make_source_files_completion_list): New.
8263 * top.c (init_main): Don't install a rl_completion_entry_function
8264 hook. Install a rl_attempted_completion_function hook instead.
8265 * tui/tui-layout.c (layout_completer): Adjust to work with a
8266 completion_tracker.
8267 * tui/tui-regs.c (tui_reggroup_completer):
8268 * tui/tui-win.c (window_name_completer, focus_completer)
8269 (winheight_completer): Adjust to work with a completion_tracker.
8270 * value.c: Include "completer.h".
8271 (complete_internalvar): Adjust to work with a completion_tracker.
8272 * value.h (complete_internalvar): Likewise.
8273
6e1dbf8c
PA
82742017-07-17 Pedro Alves <palves@redhat.com>
8275
8276 * cli/cli-decode.c (set_cmd_completer_handle_brkchars): Adjust to
8277 renames.
8278 * cli/cli-decode.h (struct cmd_list_element) <completer>: Move
8279 comments to completer_ftype's declaration.
8280 <completer_handle_brkchars>: Change type to
8281 completer_handle_brkchars_ftype.
8282 * command.h (completer_ftype): Add describing comment and give
8283 names to parameters.
8284 (completer_ftype_void): Rename to ...
8285 (completer_handle_brkchars_ftype) ... this. Add describing comment.
8286 (set_cmd_completer_handle_brkchars): Adjust.
8287 * completer.c (filename_completer_handle_brkchars): New function.
8288 (complete_line_internal_normal_command): New function, factored
8289 out from ...
8290 (complete_line_internal): ... here.
8291 (command_completer_handle_brkchars)
8292 (default_completer_handle_brkchars)
8293 (completer_handle_brkchars_func_for_completer): New functions.
8294 * completer.h (set_gdb_completion_word_break_characters): Delete
8295 declaration.
8296 (completer_handle_brkchars_func_for_completer): New declaration.
8297 * python/py-cmd.c (cmdpy_completer_handle_brkchars): Adjust to use
8298 completer_handle_brkchars_func_for_completer.
8299
78b13106
PA
83002017-07-17 Pedro Alves <palves@redhat.com>
8301
8302 * completer.c (symbol_completer): New function, based on
8303 make_symbol_completion_list_fn.
8304 * completer.h (symbol_completer): New declaration.
8305 * guile/scm-cmd.c (cmdscm_completers): Adjust.
8306 * python/py-cmd.c (completers): Adjust.
8307 * symtab.c (make_symbol_completion_list_fn): Delete.
8308 * symtab.h (make_symbol_completion_list_fn): Delete.
8309 * cli/cli-decode.c (add_cmd): Adjust.
8310
bbf2f4df
PA
83112017-07-17 Pedro Alves <palves@redhat.com>
8312
8313 * Makefile.in (COMMON_OBS): Add filename-seen-cache.o.
8314 * dwarf2read.c: Include "filename-seen-cache.h".
8315 * dwarf2read.c (dwarf2_per_objfile) <filenames_cache>: New field.
8316 (dw2_map_symbol_filenames): Build and use a filenames_seen_cache.
8317 * filename-seen-cache.c: New file.
8318 * filename-seen-cache.h: New file.
8319 * symtab.c: Include "filename-seen-cache.h".
8320 (struct filename_seen_cache, INITIAL_FILENAME_SEEN_CACHE_SIZE)
8321 (create_filename_seen_cache, clear_filename_seen_cache)
8322 (delete_filename_seen_cache, filename_seen): Delete, parts moved
8323 to filename-seen-cache.h/filename-seen-cache.c.
8324 (output_source_filename, sources_info)
8325 (maybe_add_partial_symtab_filename)
8326 (make_source_files_completion_list): Adjust to use
8327 filename_seen_cache.
8328
330cdd98
PA
83292017-07-17 Pedro Alves <palves@redhat.com>
8330
8331 * dwarf2read.c (dwarf2_per_objfile): In-class initialize all
8332 fields.
8333 (dwarf2_per_objfile::dwarf2_per_objfile(objfile*, const
8334 dwarf2_debug_sections*)): New.
8335 (dwarf2_per_objfile::dwarf2_per_objfile(const
8336 dwarf2_per_objfile&)): Declare as deleted.
8337 (dwarf2_per_objfile::operator=): Declare as deleted.
8338 (dwarf2_per_objfile::dwarf2_per_objfile)
8339 (dwarf2_per_objfile::~dwarf2_per_objfile)
8340 (dwarf2_per_objfile::free_cached_comp_units): New.
8341 (dwarf2_has_info): dwarf2_per_objfile initialization code moved to
8342 ctor. Call dwarf2_per_objfile's ctor manually.
8343 (dwarf2_locate_sections): Deleted/refactored as ...
8344 (dwarf2_per_objfile::locate_sections): ... this new method.
8345 (free_cached_comp_units): Defer to
8346 dwarf2_per_objfile::free_cached_comp_units.
8347 (dwarf2_free_objfile): Call dwarf2_per_objfile's dtor manually.
8348
8880f2a9
TT
83492017-07-14 Tom Tromey <tom@tromey.com>
8350
8351 PR rust/21764:
8352 * rust-exp.y (convert_ast_to_expression): Add "want_type"
8353 parameter.
8354 <UNOP_SIZEOF>: Split into separate case.
8355 <UNOP_VAR_VALUE>: Handle want_type. Add error case.
8356
65547233
TT
83572017-07-14 Tom Tromey <tom@tromey.com>
8358
8359 PR rust/21763:
8360 * symtab.c (symbol_matches_domain): Add language_rust to special
8361 case.
8362 * rust-exp.y (convert_ast_to_expression) <OP_VAR_VALUE>: Don't
8363 treat LOC_TYPEDEF symbols as variables.
8364
8f14146e
PA
83652017-07-14 Pedro Alves <palves@redhat.com>
8366
8367 * symtab.c (make_file_symbol_completion_list_1): Iterate over
8368 symtabs matching all symtabs with SRCFILE as file name instead of
8369 only considering the first hit, with lookup_symtab.
8370
2347965c
SM
83712017-07-14 Simon Marchi <simon.marchi@ericsson.com>
8372
8373 * ax-gdb.c (gen_aggregate_elt_ref): Remove operand_name and
8374 operator_name parameters.
8375 (gen_expr): Update function call.
8376
40f4af28
SM
83772017-07-14 Simon Marchi <simon.marchi@ericsson.com>
8378
8379 * dwarf2loc.h (dwarf2_compile_expr_to_ax): Remove gdbarch
8380 parameter.
8381 * symtab.h (struct symbol_computed_ops::tracepoint_var_ref):
8382 Likewise.
8383 * dwarf2loc.c (dwarf2_compile_expr_to_ax): Remove gdbarch
8384 parameter, use agent_expr::gdbarch instead, update function
8385 calls.
8386 (locexpr_tracepoint_var_ref): Likewise.
8387 (loclist_tracepoint_var_ref): Likewise.
8388 * ax-gdb.c (gen_trace_static_fields): Likewise.
8389 (gen_traced_pop): Likewise.
8390 (gen_frame_args_address): Likewise.
8391 (gen_frame_locals_address): Likewise.
8392 (gen_var_ref): Likewise.
8393 (gen_struct_ref_recursive): Likewise.
8394 (gen_static_field): Likewise.
8395 (gen_maybe_namespace_elt): Likewise.
8396 (gen_expr): Likewise.
8397 (gen_trace_for_var): Likewise.
8398 (gen_trace_for_expr): Likewise.
8399 (gen_trace_for_return_address): Likewise.
8400
053f8057
SM
84012017-07-14 Simon Marchi <simon.marchi@ericsson.com>
8402
8403 * ax-gdb.c (gen_deref, gen_address_of): Remove unused ax
8404 parameter.
8405 (gen_struct_ref, gen_expr, gen_expr_binop_rest): Update call.
8406
6661ad48
SM
84072017-07-14 Simon Marchi <simon.marchi@ericsson.com>
8408
8409 * ax-gdb.c (gen_usual_unary): Remove exp parameter, get gdbarch
8410 from ax, update calls.
8411 (gen_usual_arithmetic): Likewise.
8412 (gen_integral_promotions): Likewise.
8413 (gen_bitfield_ref): Likewise.
8414 (gen_primitive_field): Likewise.
8415 (gen_struct_ref_recursive): Likewise.
8416 (gen_struct_ref): Likewise.
8417 (gen_maybe_namespace_elt): Likewise.
8418 (gen_struct_elt_for_reference): Likewise.
8419 (gen_namespace_elt): Likewise.
8420 (gen_aggregate_elt_ref): Likewise.
8421 (gen_expr): Get gdbarch from ax, update calls.
8422 (gen_expr_binop_rest): Likewise.
8423
c55a47e7
PA
84242017-07-13 Pedro Alves <palves@redhat.com>
8425
8426 * amd64-darwin-tdep.c (x86_darwin_init_abi_64): Pass tdesc_amd64
8427 as default tdesc.
8428 * amd64-dicos-tdep.c (amd64_dicos_init_abi):
8429 * amd64-fbsd-tdep.c (amd64fbsd_init_abi):
8430 * amd64-linux-tdep.c (amd64_linux_init_abi): Pass
8431 tdesc_amd64_linux as default tdesc. Get final tdesc from the
8432 tdep.
8433 (amd64_x32_linux_init_abi): Pass tdesc_x32_linux as default tdesc.
8434 Get final tdesc from the tdep.
8435 * amd64-nbsd-tdep.c (amd64nbsd_init_abi): Pass tdesc_amd64 as
8436 default tdesc.
8437 * amd64-obsd-tdep.c (amd64obsd_init_abi): Likewise.
8438 * amd64-sol2-tdep.c (amd64_sol2_init_abi): Likewise.
8439 * amd64-tdep.c (amd64_init_abi): Add 'default_tdesc' parameter.
8440 Use it as default tdesc.
8441 (amd64_x32_init_abi): Add 'default_tdesc' parameter, and pass it
8442 down to amd_init_abi. No longer handle fallback tdesc here.
8443 * amd64-tdep.h (tdesc_x32): Declare.
8444 (amd64_init_abi, amd64_x32_init_abi): Add 'default_tdesc'
8445 parameter.
8446 * amd64-windows-tdep.c (amd64_windows_init_abi): Pass tdesc_amd64
8447 as default tdesc.
8448
55efceab
AA
84492017-07-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
8450
8451 * s390-linux-tdep.c (s390_process_record): Add support for
8452 instructions new in arch12.
8453
0aa37b65
JB
84542017-07-11 John Baldwin <jhb@FreeBSD.org>
8455
8456 * amd64-bsd-nat.c (amd64bsd_fetch_inferior_registers): Use
8457 PT_GETFSBASE and PT_GETGSBASE.
8458 (amd64bsd_store_inferior_registers): Use PT_SETFSBASE and
8459 PT_SETGSBASE.
8460
48aeef91
JB
84612017-07-11 John Baldwin <jhb@FreeBSD.org>
8462
8463 * features/Makefile (amd64.dat, amd64-avx.dat, amd64-mpx.dat)
8464 (amd64-avx-mpx.dat, amd64-avx-avx512.dat)
8465 (amd64-avx-mpx-avx512-pku.dat): Add i386/64bit-segments.xml in
8466 those rules.
8467 * features/i386/amd64-avx-avx512.xml: Add 64bit-segments.xml.
8468 * features/i386/amd64-avx-mpx-avx512-pku.xml: Add 64bit-segments.xml.
8469 * features/i386/amd64-avx-mpx.xml: Add 64bit-segments.xml.
8470 * features/i386/amd64-avx.xml: Add 64bit-segments.xml.
8471 * features/i386/amd64-mpx.xml: Add 64bit-segments.xml.
8472 * features/i386/amd64.xml: Add 64bit-segments.xml.
8473 * features/i386/amd64-avx-avx512.c: Regenerated.
8474 * features/i386/amd64-avx-mpx-avx512-pku.c: Regenerated.
8475 * features/i386/amd64-avx-mpx.c: Regenerated.
8476 * features/i386/amd64-avx.c: Regenerated.
8477 * features/i386/amd64-mpx.c: Regenerated.
8478 * features/i386/amd64.c: Regenerated.
8479 * regformats/i386/amd64-avx-avx512.dat: Regenerated.
8480 * regformats/i386/amd64-avx-mpx-avx512-pku.dat: Regenerated.
8481 * regformats/i386/amd64-avx-mpx.dat: Regenerated.
8482 * regformats/i386/amd64-avx.dat: Regenerated.
8483 * regformats/i386/amd64-mpx.dat: Regenerated.
8484 * regformats/i386/amd64.dat: Regenerated.
8485
77c501bc
YQ
84862017-07-10 Yao Qi <yao.qi@linaro.org>
8487
8488 * features/i386/amd64-avx-avx512-linux.c: Re-generated.
8489 * features/i386/amd64-avx-mpx-avx512-pku-linux.c: Re-generated.
8490
6dc8d757
AK
84912017-07-10 Anton Kolesov <Anton.Kolesov@synopsys.com>
8492
8493 * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add setenv and
8494 unsetenv.
8495 * gnulib/aclocal.m4: Regenerate.
8496 * gnulib/config.in: Regenerate.
8497 * gnulib/configure: Regenerate.
8498 * gnulib/import/Makefile.am: Regenerate.
8499 * gnulib/import/Makefile.in: Regenerate.
8500 * gnulib/import/m4/gnulib-cache.m4: Regenerate.
8501 * gnulib/import/m4/gnulib-comp.m4: Regenerate.
8502 * gnulib/import/m4/environ.m4: New file.
8503 * gnulib/import/m4/setenv.m4: New file.
8504 * gnulib/import/setenv.c: New file.
8505 * gnulib/import/unsetenv.c: New file.
8506
266934d1
SM
85072017-07-09 Simon Marchi <simon.marchi@ericsson.com>
8508
8509 * compile/compile-loc2c.c (do_compile_dwarf_expr_to_c): Read
8510 address when op is DW_OP_addr.
8511
03278692
TT
85122017-07-09 Tom Tromey <tom@tromey.com>
8513
8514 * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Reverse size
8515 check and apply to outer type.
8516
4b654465
JB
85172017-07-07 John Baldwin <jhb@FreeBSD.org>
8518
8519 * fbsd-tdep.c (LWPINFO_OFFSET, LWPINFO_PL_FLAGS)
8520 (LWPINFO64_PL_SIGINFO, LWPINFO32_PL_SIGINFO, PL_FLAG_SI)
8521 (SIZE64_SIGINFO_T, SIZE32_SIGINFO_T, fbsd_core_xfer_siginfo): New.
8522 (fbsd_init_abi): Install gdbarch "core_xfer_siginfo" method.
8523
2af9fc44
JB
85242017-07-07 John Baldwin <jhb@FreeBSD.org>
8525
8526 * fbsd-tdep.c (fbsd_core_thread_name): Use thread_section_name.
8527
382b69bb
JB
85282017-07-07 John Baldwin <jhb@FreeBSD.org>
8529
8530 * corelow.c (get_core_siginfo): Remove.
8531 (core_xfer_partial): Use the gdbarch "core_xfer_siginfo" method
8532 instead of get_core_siginfo.
8533 * gdbarch.sh (core_xfer_siginfo): New gdbarch callback.
8534 * gdbarch.h: Re-generate.
8535 * gdbarch.c: Re-generate.
8536 * linux-tdep.c (linux_core_xfer_siginfo): New.
8537 (linux_init_abi): Install gdbarch "core_xfer_siginfo" method.
8538
6e5eab33
JB
85392017-07-07 John Baldwin <jhb@FreeBSD.org>
8540
8541 * corelow.c (thread_section_name): Move to ...
8542 * gdbcore.h (thread_section_name): ... here.
8543
929edea9
JB
85442017-07-07 John Baldwin <jhb@FreeBSD.org>
8545
8546 * fbsd-nat.c [PT_LWPINFO && __LP64__] (union sigval32)
8547 (struct siginfo32): New.
8548 [PT_LWPINFO] (fbsd_siginfo_size, fbsd_convert_siginfo): New.
8549 (fbsd_xfer_partial) [PT_LWPINFO]: Handle TARGET_OBJECT_SIGNAL_INFO
8550 via ptrace(PT_LWPINFO).
8551
762c974a
JB
85522017-07-07 John Baldwin <jhb@FreeBSD.org>
8553
8554 * fbsd-tdep.c (fbsd_gdbarch_data_handle, struct fbsd_gdbarch_data)
8555 (init_fbsd_gdbarch_data, get_fbsd_gdbarch_data)
8556 (fbsd_get_siginfo_type): New.
8557 (fbsd_init_abi): Install gdbarch "get_siginfo_type" method.
8558 (_initialize_fbsd_tdep): New.
8559
33c5cd75
DB
85602017-07-06 David Blaikie <dblaikie@gmail.com>
8561
8562 * dwarf2read.c (struct dwo_file): Use a htab of dwo_unit* (rather than
8563 a singular dwo_unit*) to support multiple CUs in the same way that
8564 multiple TUs are supported.
8565 (create_cus_hash_table): Replace create_dwo_cu with a function for
8566 parsing multiple CUs from a DWO file.
8567 (open_and_init_dwo_file): Use create_cus_hash_table rather than
8568 create_dwo_cu.
8569 (lookup_dwo_cutu): Lookup CU in the hash table in the dwo_file with
8570 htab_find, rather than comparing the signature to a singleton CU in
8571 the dwo_file.
8572
8455d262
PA
85732017-07-06 Pedro Alves <palves@redhat.com>
8574
8575 * python/py-unwind.c (pyuw_dealloc_cache): Fix for loop condition.
8576
4da3eb35
PA
85772017-07-04 Pedro Alves <palves@redhat.com>
8578
8579 * gdbtypes.c (recursive_dump_type): Don't reference TYPE_STATIC.
8580 * gdbtypes.h (TYPE_STATIC): Delete.
8581 (struct fn_field) <is_public, is_abstract, is_static, is_final,
8582 is_synchronized, is_native>: Delete.
8583 <dummy>: Bump.
8584 (TYPE_FN_FIELD_PUBLIC, TYPE_FN_FIELD_STATIC, TYPE_FN_FIELD_FINAL)
8585 (TYPE_FN_FIELD_SYNCHRONIZED, TYPE_FN_FIELD_NATIVE)
8586 (TYPE_FN_FIELD_ABSTRACT): Delete.
8587
5bfd255c
SM
85882017-07-03 Simon Marchi <simon.marchi@ericsson.com>
8589
8590 * buffer.h (buffer_finish): Fix spelling mistakes.
8591
25c54127
EZ
85922017-07-01 Eli Zaretskii <eliz@gnu.org>
8593
8594 * .dir-locals.el: Automatically switch to C-style comments in
8595 versions of Emacs that support the feature.
8596
dc4bde35
SDJ
85972017-06-30 Sergio Durigan Junior <sergiodj@redhat.com>
8598 Pedro Alves <palves@redhat.com>
8599
8600 PR cli/21688
8601 * cli/cli-script.c (command_name_equals_not_inline): Remove function.
8602 (process_next_line): New variable 'inline_cmd'.
8603 Adjust 'if' clauses for "python", "compile" and "guile" to use
8604 'command_name_equals' and check for '!inline_cmd'.
8605
51ed89aa
SDJ
86062017-06-30 Sergio Durigan Junior <sergiodj@redhat.com>
8607
8608 PR cli/21688
8609 * cli/cli-script.c (command_name_equals_not_inline): New function.
8610 (process_next_line): Adjust 'if' clauses for "python", "compile"
8611 and "guile" to use command_name_equals_not_inline.
8612
eb17d413
PA
86132017-06-29 Pedro Alves <palves@redhat.com>
8614
8615 * completer.c (expression_completer): Call
8616 linespec_location_completer instead of location_completer.
8617
195bcdd5
PA
86182017-06-29 Pedro Alves <palves@redhat.com>
8619
8620 * completer.c (expression_completer): Remove code that recomputes
8621 'text' from 'word'.
8622
adc764e7
YQ
86232017-06-29 Yao Qi <yao.qi@linaro.org>
8624
8625 * regformats/regdat.sh: Generate code with
8626 "ifndef IN_PROCESS_AGENT".
8627
6e75794e
PA
86282017-06-28 Pedro Alves <palves@redhat.com>
8629
8630 * command.h: Include "common/scoped_restore.h".
8631
bc491f2e
YQ
86322017-06-28 Yao Qi <yao.qi@linaro.org>
8633
8634 * mi/mi-cmd-break.c (mi_argv_to_format): Use obstack_grow_str
8635 instead of obstack_grow.
8636
41664b45
DG
86372017-06-28 Doug Gilmore <Doug.Gilmore@imgtec.com>
8638
8639 PR gdb/21337
8640 * symfile.c (reread_symbols): Call objfiles_changed just before
8641 read_symbols.
8642
6da67eb1
PA
86432017-06-27 Pedro Alves <palves@redhat.com>
8644
8645 * symtab.c (COMPLETION_LIST_ADD_SYMBOL)
8646 (MCOMPLETION_LIST_ADD_SYMBOL): Delete macros, replace with ...
8647 (completion_list_add_symbol, completion_list_add_msymbol):
8648 ... these new functions.
8649 (add_symtab_completions)
8650 (default_make_symbol_completion_list_break_on_1): Adjust.
8651
23732b1e
PA
86522017-06-27 Pedro Alves <palves@redhat.com>
8653
8654 * objfiles.c (get_objfile_bfd_data): Call bfd_alloc instead of
8655 bfd_zalloc. Call objfile_per_bfd_storage's ctor.
8656 (free_objfile_per_bfd_storage): Call objfile_per_bfd_storage's
8657 dtor.
8658 * objfiles.h (objfile_per_bfd_storage): Add ctor. Make
8659 'storage_obstack' field an auto_obstack. In-class initialize all
8660 non-bitfield fields. Make minsyms_read bool.
8661 * symfile.c (read_symbols): Adjust.
8662
a4d1e79a
AH
86632017-06-27 Alan Hayward <alan.hayward@arm.com>
8664
8665 * remote-sim.c (gdbsim_fetch_register): Use byte_vector.
8666 (gdbsim_store_register): Likewise.
8667
8268c778
PA
86682017-06-27 Pedro Alves <palves@redhat.com>
8669
8670 * c-exp.y (name_obstack): Now an auto_obstack.
8671 (yylex): Use auto_obstack::clear.
8672 (c_parse): Use auto_obstack::clear instead of reinitializing and
8673 freeing the obstack.
8674 * c-lang.c (evaluate_subexp_c): Use auto_obstack.
8675 * d-exp.y (name_obstack): Now an auto_obstack.
8676 (yylex): Use auto_obstack::clear.
8677 (d_parse): Use auto_obstack::clear instead of reinitializing and
8678 freeing the obstack.
8679 * dwarf2loc.c (fetch_const_value_from_synthetic_pointer): Use
8680 auto_obstack.
8681 * dwarf2read.c (create_addrmap_from_index)
8682 (dwarf2_build_psymtabs_hard)
8683 (update_enumeration_type_from_children): Likewise.
8684 * gdb_obstack.h (auto_obstack): New type.
8685 * go-exp.y (name_obstack): Now an auto_obstack.
8686 (build_packaged_name): Use auto_obstack::clear.
8687 (go_parse): Use auto_obstack::clear instead of reinitializing and
8688 freeing the obstack.
8689 * linux-tdep.c (linux_make_mappings_corefile_notes): Use
8690 auto_obstack.
8691 * printcmd.c (printf_wide_c_string, ui_printf): Use auto_obstack.
8692 * rust-exp.y (work_obstack): Now an auto_obstack.
8693 (rust_parse, rust_lex_tests): Use auto_obstack::clear instead of
8694 reinitializing and freeing the obstack.
8695 * utils.c (do_obstack_free, make_cleanup_obstack_free): Delete.
8696 (host_char_to_target): Use auto_obstack.
8697 * utils.h (make_cleanup_obstack_free): Delete declaration.
8698 * valprint.c (generic_emit_char, generic_printstr): Use
8699 auto_obstack.
8700
db665f42
SM
87012017-06-27 Simon Marchi <simon.marchi@ericsson.com>
8702
8703 * darwin-nat.c (darwin_check_new_threads): Don't handle dummy
8704 thread.
8705 (darwin_init_thread_list): Don't update dummy thread.
8706 (darwin_create_inferior, darwin_attach): Don't add a dummy thread.
8707
873c0814
SM
87082017-06-26 Simon Marchi <simon.marchi@ericsson.com>
8709
8710 * record-full.c (netorder16): Remove.
8711
8b5a7a6e
SM
87122017-06-26 Simon Marchi <simon.marchi@ericsson.com>
8713
8714 * common/diagnostics.h: Define macros for GCC.
8715 (DIAGNOSTIC_IGNORE_UNUSED_FUNCTION): New macro.
8716 * common/vec.h: Include diagnostics.h.
8717 (DIAGNOSTIC_IGNORE_UNUSED_VEC_FUNCTION): New macro.
8718 (DEF_VEC_I, DEF_VEC_P, DEF_VEC_O): Ignore -Wunused-function
8719 warning.
8720
d1435379
SM
87212017-06-26 Simon Marchi <simon.marchi@ericsson.com>
8722
8723 * common/diagnostics.h (DIAGNOSTIC_IGNORE_DEPRECATED_REGISTER):
8724 New macro.
8725 * ada-lex.l: Ignore deprecated register warnings.
8726
cc75e0fd
SM
87272017-06-25 Simon Marchi <simon.marchi@ericsson.com>
8728
8729 * main.c (get_init_files): Replace "SYSTEM_GDBINIT +
8730 datadir_len" with "&SYSTEM_GDBINIT[datadir_len]".
8731
07809eaf
SM
87322017-06-25 Simon Marchi <simon.marchi@ericsson.com>
8733
8734 * dtrace-probe.c (dtrace_process_dof_probe): Put semi-colon on
8735 its own line.
8736
f076f034
SM
87372017-06-25 Simon Marchi <simon.marchi@ericsson.com>
8738
8739 * nat/x86-dregs.c (x86_show_dr): Print registers one per line.
8740
0dd5cbc5
AH
87412017-06-23 Alan Hayward <alan.hayward@arm.com>
8742
8743 * xtensa-tdep.c (XTENSA_MAX_REGISTER_SIZE): Add.
8744 (xtensa_register_write_masked): Use XTENSA_MAX_REGISTER_SIZE.
8745 (xtensa_register_read_masked): Likewise.
8746
d4c6ce5b
SDJ
87472017-06-22 Sergio Durigan Junior <sergiodj@redhat.com>
8748
8749 * common/environ.c (gdb_environ::unset): Update comment.
8750
16892a03
AH
87512017-06-22 Alan Hayward <alan.hayward@arm.com>
8752
8753 * python/py-unwind.c (pyuw_sniffer): Allocate space for
8754 registers.
8755
d7dcbefc
AH
87562017-06-22 Alan Hayward <alan.hayward@arm.com>
8757
8758 * record-full.c (record_full_exec_insn): Use byte_vector.
8759
b30ff123
YQ
87602017-06-22 Yao Qi <yao.qi@linaro.org>
8761
8762 * regformats/i386/amd64-avx-mpx-avx512-pku-linux.dat: Regenerated.
8763 * regformats/i386/amd64-avx-mpx-avx512-pku.dat: Regenerated.
8764
4fa847d7
AH
87652017-06-22 Alan Hayward <alan.hayward@arm.com>
8766
8767 * remote.c (cached_reg): Move from here...
8768 * regcache.h (cached_reg): ...to here.
8769 * python/py-unwind.c (struct reg_info): Remove.
8770 (cached_frame_info): Use cached_reg_t.
8771 (pyuw_prev_register): Likewise.
8772 (pyuw_sniffer): Use cached_reg_t and allocate registers.
8773 (pyuw_dealloc_cache): Free all registers.
8774
f4906a9a
PA
87752017-06-22 Pedro Alves <palves@redhat.com>
8776 Simon Marchi <simon.marchi@ericsson.com>
8777
8778 * unittests/environ-selftests.c (run_tests): Ignore -Wself-move
8779 warning.
8780 * common/diagnostics.h: New file.
8781
b45a1208
PA
87822017-06-22 Pedro Alves <palves@redhat.com>
8783
8784 * common/agent.h: Add include guards.
8785
e4da2c61
SM
87862017-06-21 Simon Marchi <simon.marchi@ericsson.com>
8787
8788 * target.h (struct target_ops) <to_xfer_partial>: Update doc to
8789 talk about addressable units instead of bytes.
8790
96160d60
SDJ
87912017-06-20 Sergio Durigan Junior <sergiodj@redhat.com>
8792
8793 * common/environ.c (gdb_environ::unset): Use '::iterator' instead
8794 of '::const_iterator'.
8795
9a6c7d9c
SDJ
87962017-06-20 Sergio Durigan Junior <sergiodj@redhat.com>
8797
8798 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
8799 'unittests/environ-selftests.c'.
8800 (SUBDIR_UNITTESTS_OBS): Add 'environ-selftests.o'.
8801 * charset.c (find_charset_names): Declare object 'iconv_env'.
8802 Update code to use 'iconv_env' object. Remove call to
8803 'free_environ'.
8804 * common/environ.c: Include <utility>.
8805 (make_environ): Delete function.
8806 (free_environ): Delete function.
8807 (gdb_environ::clear): New function.
8808 (gdb_environ::operator=): New function.
8809 (gdb_environ::get): Likewise.
8810 (environ_vector): Delete function.
8811 (set_in_environ): Delete function.
8812 (gdb_environ::set): New function.
8813 (unset_in_environ): Delete function.
8814 (gdb_environ::unset): New function.
8815 (gdb_environ::envp): Likewise.
8816 * common/environ.h: Include <vector>.
8817 (struct gdb_environ): Delete; transform into...
8818 (class gdb_environ): ... this class.
8819 (free_environ): Delete prototype.
8820 (init_environ, get_in_environ, set_in_environ, unset_in_environ,
8821 environ_vector): Likewise.
8822 * infcmd.c (run_command_1): Update code to call
8823 'envp' from 'gdb_environ' class.
8824 (environment_info): Update code to call methods from 'gdb_environ'
8825 class.
8826 (unset_environment_command): Likewise.
8827 (path_info): Likewise.
8828 (path_command): Likewise.
8829 * inferior.c (inferior::~inferior): Delete call to 'free_environ'.
8830 (inferior::inferior): Initialize 'environment' using the host's
8831 information.
8832 * inferior.h: Remove forward declaration of 'struct gdb_environ'.
8833 Include "environ.h".
8834 (class inferior) <environment>: Change type from 'struct
8835 gdb_environ' to 'gdb_environ'.
8836 * mi/mi-cmd-env.c (mi_cmd_env_path): Update code to call
8837 methods from 'gdb_environ' class.
8838 * solib.c (solib_find_1): Likewise
8839 * unittests/environ-selftests.c: New file.
8840
75c554cf
YQ
88412017-06-20 Yao Qi <yao.qi@linaro.org>
8842
8843 * features/i386/i386-linux.xml: Exchange the order of including
8844 32bit-linux.xml and 32bit-sse.xml.
8845 * features/i386/i386-linux.c: Regenerated.
8846
72ddacb7
YQ
88472017-06-20 Yao Qi <yao.qi@linaro.org>
8848
8849 * target-descriptions.c (tdesc_reg): Add ctor, dtor.
8850 Delete copy ctor and assignment operator.
8851 (tdesc_type): Likewise.
8852 (tdesc_feature): Likewise.
8853 (tdesc_free_reg): Remove.
8854 (tdesc_create_reg): Use new.
8855 (tdesc_free_type): Remove.
8856 (tdesc_create_vector): Use new.
8857 (tdesc_create_union): Likewise.
8858 (tdesc_create_flags): Likewise.
8859 (tdesc_create_enum): Likewise.
8860 (tdesc_free_feature): Delete.
8861 (free_target_description): Use delete.
8862
325c9fd4
JB
88632017-06-19 John Baldwin <jhb@FreeBSD.org>
8864
8865 * mips-tdep.c (print_gp_register_row): Don't error for unavailable
8866 registers.
8867
16b7a719
PA
88682017-06-19 Pedro Alves <palves@redhat.com>
8869
8870 * dwarf2read.c (write_psymtabs_to_index): Construct file_closer
8871 after gdb::unlinker.
8872
1c8e01c9
SDJ
88732017-06-19 Sergio Durigan Junior <sergiodj@redhat.com>
8874
8875 * mi/mi-cm-env.c (_initialize_mi_cmd_env): Use getenv instead of
8876 gdb_environ to access an environment variable.
8877
ffce45d2
TP
88782017-06-18 Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
8879
8880 * nat/linux-ptrace.c (linux_fork_to_function): Add cast to
8881 gdb_byte*.
8882
1d4fbac9
SM
88832017-06-17 Simon Marchi <simon.marchi@ericsson.com>
8884
8885 * nat/fork-inferior.h (trace_start_error): Add ATTRIBUTE_PRINTF.
8886
8465943a
SM
88872017-06-17 Simon Marchi <simon.marchi@ericsson.com>
8888
8889 * configure: Re-generate.
8890 * warning.m4 (build_warnings): Add -Wno-mismatched-tags.
8891
3e019bdc
SM
88922017-06-17 Simon Marchi <simon.marchi@ericsson.com>
8893
8894 * configure: Re-generate.
8895 * warning.m4: Pass -Werror to compiler when checking for
8896 supported warning flags.
8897
cf0dd6f0
SM
88982017-06-17 Simon Marchi <simon.marchi@ericsson.com>
8899
8900 * Makefile.in (COMPILE.pre): Add "-x c++".
8901
6f98355c
YQ
89022017-06-16 Alan Hayward <alan.hayward@arm.com>
8903 Pedro Alves <palves@redhat.com>
8904 Yao Qi <yao.qi@linaro.org>
8905
8906 * defs.h (RequireLongest): New.
8907 (extract_integer): Declare function template.
8908 (extract_signed_integer): Remove the declaration, but define it
8909 static inline.
8910 (extract_unsigned_integer): Likewise.
8911 (store_integer): Declare function template.
8912 (store_signed_integer): Remove the declaration, but define it
8913 static inline.
8914 (store_unsigned_integer): Likewise.
8915 * findvar.c (extract_integer): New function template.
8916 (extract_signed_integer): Remove.
8917 (extract_unsigned_integer): Remove.
8918 (extract_integer<LONGEST>, extract_integer<ULONGEST>): Explicit
8919 instantiations.
8920 (store_integer): New function template.
8921 (store_signed_integer): Remove.
8922 (store_unsigned_integer): Remove.
8923 (store_integer): Explicit instantiations.
8924 * regcache.c (regcache_raw_read_signed): Update.
8925 (regcache::raw_read): New function.
8926 (regcache::raw_read_signed): Remove.
8927 (regcache::raw_read_unsigned): Remove.
8928 (regcache_raw_read_unsigned): Update.
8929 (regcache_raw_write_unsigned): Update.
8930 (regcache::raw_write_signed): Remove.
8931 (regcache::raw_write): New function.
8932 (regcache_cooked_read_signed): Update.
8933 (regcache::raw_write_unsigned): Remove.
8934 (regcache::cooked_read_signed): Remove.
8935 (regcache_cooked_read_unsigned): Update.
8936 (regcache::cooked_read_unsigned): Remove.
8937 (regcache_cooked_write_signed): Update.
8938 (regcache_cooked_write_unsigned): Update.
8939 * regcache.h (regcache) <raw_read_signed>: Remove.
8940 <raw_write_signed, raw_read_unsigned, raw_write_unsigned>: Remove.
8941 <raw_read, raw_write>: New.
8942 <cooked_read_signed, cooked_write_signed>: Remove.
8943 <cooked_write_unsigned, cooked_read_unsigned>: Remove.
8944 <cooked_read, cooked_write>: New.
8945 * sh64-tdep.c (sh64_pseudo_register_read): Update.
8946 (sh64_pseudo_register_write): Update.
8947
a87dc45a
AK
89482017-06-16 Anton Kolesov <anton.kolesov@synopsys.com>
8949
8950 * arc-tdep.c (arc_disassembler_options): New variable.
8951 (arc_gdbarch_init): Set and use it. Use arc_delayed_print_insn instead
8952 of default_print_insn.
8953 (arc_delayed_print_insn): Set info->section when needed,
8954 use default_print_insn to retrieve a disassembler.
8955
45159d6a
SDJ
89562017-06-14 Sergio Durigan Junior <sergiodj@redhat.com>
8957
8958 PR gdb/21574
8959 * infcmd.c (_initialize_infcmd): Expand "help run" documentation
8960 to mention $SHELL and startup-with-shell.
8961
b46c4cf0
MF
89622017-06-14 Max Filippov <jcmvbkbc@gmail.com>
8963
8964 * MAINTAINERS: Move Maxim Grigoriev to the Past Maintainers.
8965
6394c606
YQ
89662017-06-14 Yao Qi <yao.qi@linaro.org>
8967
8968 * aarch64-tdep.c (aarch64_gdb_print_insn): Call
8969 default_print_insn instead of print_insn_aarch64.
8970 * arm-tdep.c (gdb_print_insn_arm): Call
8971 default_print_insn instead of print_insn_big_arm
8972 and print_insn_little_arm.
8973 * i386-tdep.c (i386_print_insn): Call default_print_insn
8974 instead of print_insn_i386.
8975 * ia64-tdep.c (ia64_print_insn): Call
8976 default_print_insn instead of print_insn_ia64.
8977 * mips-tdep.c (gdb_print_insn_mips): Call
8978 default_print_insn instead of print_insn_big_mips
8979 and print_insn_little_mips.
8980 * spu-tdep.c (gdb_print_insn_spu): Call default_print_insn
8981 instead of print_insn_spu.
8982
d5722aa2
PA
89832017-06-14 Pedro Alves <palves@redhat.com>
8984
8985 * ada-lang.c: Include "common/byte-vector.h".
8986 (ada_value_primitive_packed_val): Use gdb::byte_vector.
8987 * charset.c (wchar_iterator::iterate): Resize the vector instead
8988 of reserving it.
8989 * common/byte-vector.h: Include "common/def-vector.h".
8990 (wchar_iterator::m_out): Now a gdb::def_vector<gdb_wchar_t>.
8991 * cli/cli-dump.c: Include "common/byte-vector.h".
8992 (dump_memory_to_file, restore_binary_file): Use gdb::byte_vector.
8993 * common/byte-vector.h: New file.
8994 * common/def-vector.h: New file.
8995 * common/default-init-alloc.h: New file.
8996 * dwarf2loc.c: Include "common/byte-vector.h".
8997 (rw_pieced_value): Use gdb::byte_vector, and resize the vector
8998 instead of reserving it.
8999 * dwarf2read.c: Include "common/byte-vector.h".
9000 (data_buf::m_vec): Now a gdb::byte_vector.
9001 * gdb_regex.c: Include "common/def-vector.h".
9002 (compiled_regex::compiled_regex): Use gdb::def_vector<char>.
9003 * mi/mi-main.c: Include "common/byte-vector.h".
9004 (mi_cmd_data_read_memory): Use gdb::byte_vector.
9005 * printcmd.c: Include "common/byte-vector.h".
9006 (print_scalar_formatted): Use gdb::byte_vector.
9007 * valprint.c: Include "common/byte-vector.h".
9008 (maybe_negate_by_bytes, print_decimal_chars): Use
9009 gdb::byte_vector.
9010
01ec7a27
SM
90112017-06-13 Simon Marchi <simon.marchi@ericsson.com>
9012
9013 * darwin-nat.c: Include "nat/fork-inferior.h".
9014
848d9074
SM
90152017-06-13 Simon Marchi <simon.marchi@ericsson.com>
9016
9017 * configure.nat: Factor out Darwin bits that are not
9018 architecture-specific. Add fork-inferior.o.
9019
3b912944
SM
90202017-06-13 Simon Marchi <simon.marchi@ericsson.com>
9021
9022 * configure.nat: Factor out AIX bits that are not
9023 architecture-specific. Add fork-inferior.o.
9024
55acdf22
AA
90252017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
9026
9027 * dwarf2loc.c (rw_pieced_value): New. Merge logic from...
9028 (read_pieced_value, write_pieced_value): ...here. Reduce to
9029 wrappers that just call rw_pieced_value.
9030
f65e2044
AA
90312017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
9032
9033 * dwarf2loc.c (write_pieced_value): When writing the data for a
9034 memory piece, use write_memory_with_notification instead of
9035 write_memory.
9036
23f945bf
AA
90372017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
9038
9039 * valops.c (read_value_memory): Change embedded_offset to
9040 represent a bit offset instead of a byte offset.
9041 * value.h (read_value_memory): Adjust comment.
9042
f236533e
AA
90432017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
9044
9045 * dwarf2loc.c (read_pieced_value): Remove unnecessary variables
9046 dest_offset_bits and source_offset_bits.
9047 (write_pieced_value): Likewise.
9048
65d84b76
AA
90492017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
9050
9051 * dwarf2loc.c (read_pieced_value): Respect the piece offset, as
9052 given by DW_OP_bit_piece.
9053 (write_pieced_value): Likewise.
9054
242d31ab
AA
90552017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
9056
9057 * dwarf2loc.c (read_pieced_value): Move the buffer allocation and
9058 some other preparations to the places where sufficient information
9059 is available.
9060 (write_pieced_value): Likewise.
9061
03c8af18
AA
90622017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
9063
9064 * dwarf2loc.c (bits_to_bytes): New function.
9065 (read_pieced_value): Fix offset calculations for register pieces
9066 on big-endian targets.
9067 (write_pieced_value): Likewise.
9068
840989c1
AA
90692017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
9070
9071 * dwarf2loc.c (read_pieced_value): Remove buffer_size variable.
9072 (write_pieced_value): Likewise.
9073
359b19bb
AA
90742017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
9075
9076 * dwarf2loc.c (write_pieced_value): When writing to a bit-field,
9077 transfer the source value's least significant bits, instead of its
9078 lowest-addressed ones. Rename type_len to max_offset.
9079 (read_pieced_value): Mirror above changes to write_pieced_value as
9080 applicable.
9081
07c9ca3b
AA
90822017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
9083
9084 * dwarf2loc.c (write_pieced_value): In DWARF_VALUE_MEMORY,
9085 truncate full bytes from dest_offset_bits before using it as an
9086 offset into the buffer.
9087
f1cc9874
AA
90882017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
9089
9090 * dwarf2loc.c (write_pieced_value): Include transfer size in
9091 byte-wise check.
9092
cdaac320
AA
90932017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
9094
9095 * dwarf2loc.c (write_pieced_value): Fix copy/paste error in the
9096 calculation of this_size.
9097
af547a96
AA
90982017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
9099
9100 * dwarf2loc.c (read_pieced_value): Respect parent value's offset
9101 when targeting a bit-field.
9102 (write_pieced_value): Likewise.
9103
ddd7882a
AA
91042017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
9105
9106 * dwarf2loc.c (struct piece_closure) <addr_size>: Remove field.
9107 (allocate_piece_closure): Drop addr_size parameter.
9108 (dwarf2_evaluate_loc_desc_full): Adjust call to
9109 allocate_piece_closure.
9110
e9352324
AA
91112017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
9112
9113 PR gdb/21226
9114 * dwarf2loc.c (read_pieced_value): Anchor stack value pieces at
9115 the LSB end, independent of endianness.
9116
d5d1163e
AA
91172017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
9118
9119 * dwarf2loc.c (write_pieced_value): Fix order of calculations for
9120 size capping.
9121
032bb6ea
YQ
91222017-06-13 Yao Qi <yao.qi@linaro.org>
9123
9124 * mips-linux-nat.c: Move include features/mips*-linux.c to
9125 mips-linux-tdep.c.
9126 (_initialize_mips_linux_nat): Move initialize_tdesc_mips* calls
9127 to mips-linux-tdep.c.
9128 * mips-linux-tdep.c: Include features/mips*-linux.c
9129 (_initialize_mips_linux_tdep): Call initialize_tdesc_mips*
9130 functions.
9131 * mips-linux-tdep.h (tdesc_mips_linux): Declare.
9132 (tdesc_mips_dsp_linux, tdesc_mips64_linux): Declare.
9133 (tdesc_mips64_dsp_linux): Declare.
9134
f12f6bad
TT
91352017-06-12 Tom Tromey <tom@tromey.com>
9136
9137 * valprint.h (val_print_type_code_int): Remove.
9138 * valprint.c (generic_val_print_int): Always call
9139 val_print_scalar_formatted.
9140 (val_print_type_code_int): Remove.
9141 * printcmd.c (print_scalar_formatted): Handle options->format==0.
9142 * f-valprint.c (f_val_print): Use val_print_scalar_formatted.
9143 * c-valprint.c (c_val_print_int): Use val_print_scalar_formatted.
9144 * ada-valprint.c (ada_val_print_num): Use
9145 val_print_scalar_formatted.
9146
d9109c80
TT
91472017-06-12 Tom Tromey <tom@tromey.com>
9148
9149 * printcmd.c (print_scalar_formatted): Unify the two switches.
9150 Don't convert scalars to LONGEST.
9151
4ac0cb1c
TT
91522017-06-12 Tom Tromey <tom@tromey.com>
9153
9154 PR exp/16225:
9155 * valprint.h (print_decimal_chars): Update.
9156 * valprint.c (maybe_negate_by_bytes): New function.
9157 (print_decimal_chars): Add "is_signed" argument.
9158 * printcmd.c (print_scalar_formatted): Update.
9159
30a25466
TT
91602017-06-12 Tom Tromey <tom@tromey.com>
9161
9162 PR exp/16225:
9163 * valprint.h (print_binary_chars, print_hex_chars): Update.
9164 * valprint.c (val_print_type_code_int): Update.
9165 (print_binary_chars): Add "zero_pad" argument.
9166 (emit_octal_digit): New function.
9167 (print_octal_chars): Don't zero-pad.
9168 (print_decimal_chars): Likewise.
9169 (print_hex_chars): Add "zero_pad" argument.
9170 * sh64-tdep.c (sh64_do_fp_register): Update.
9171 * regcache.c (regcache::dump): Update.
9172 * printcmd.c (print_scalar_formatted): Update.
9173 * infcmd.c (default_print_one_register_info): Update.
9174
b3464d03
PA
91752017-06-12 Pedro Alves <palves@redhat.com>
9176 Alan Hayward <alan.hayward@arm.com>
9177
9178 * mips-tdep.c (MAX_MIPS_ABI_REGSIZE): New.
9179 (mips_eabi_push_dummy_call): Rename local 'regsize' to
9180 'abi_regsize'. Rename local array 'valbuf' to 'ref_valbuf', and
9181 use MAX_MIPS_ABI_REGSIZE instead of MAX_REGISTER_SIZE to size it.
9182 Assert that abi_regsize bytes fit in 'ref_valbuf'.
9183
4b76cda9
PA
91842017-06-12 Pedro Alves <palves@redhat.com>
9185
9186 * dwarf2read.c (mapped_symtab::data): Now a vector of
9187 symtab_index_entry instead of vector of
9188 std::unique_ptr<symtab_index_entry>. All users adjusted to check
9189 whether an element's name is NULL instead of checking whether the
9190 element itself is NULL.
9191 (find_slot): Change return type. Adjust.
9192 (hash_expand, , add_index_entry, uniquify_cu_indices)
9193 (write_hash_table): Adjust.
9194
e8f8bcb3
PA
91952017-06-12 Pedro Alves <palves@redhat.com>
9196
9197 * dwarf2read.c (recursively_count_psymbols): New function.
9198 (write_psymtabs_to_index): Call it to compute number of psyms and
9199 pass estimate size of psyms_seen to unordered_set's ctor.
9200
70a1152b
PA
92012017-06-12 Pedro Alves <palves@redhat.com>
9202
9203 * dwarf2read.c (write_hash_table): Check if key already exists
9204 before emplacing.
9205
c2f134ac
PA
92062017-06-12 Pedro Alves <palves@redhat.com>
9207
9208 * dwarf2read.c (data_buf::append_space): Rename to...
9209 (data_buf::grow): ... this, and make private. Adjust all callers.
9210 (data_buf::append_uint): New method.
9211 (add_address_entry, write_one_signatured_type)
9212 (write_psymtabs_to_index): Use it.
9213
a81e6d4d
PA
92142017-06-12 Pedro Alves <palves@redhat.com>
9215
9216 * dwarf2read.c (file_write(FILE *, const void *, size_t)): Delete.
9217 (file_write (FILE *, const std::vector<Elem>&)): Delete.
9218 (data_buf::file_write): Call ::fwrite directly.
9219
6fd931f2
PA
92202017-06-12 Pedro Alves <palves@redhat.com>
9221
9222 * dwarf2read.c (uniquify_cu_indices): Use std::unique and
9223 std::vector::erase.
9224
bc8f2430
JK
92252017-06-12 Jan Kratochvil <jan.kratochvil@redhat.com>
9226
9227 Code cleanup: C++ify .gdb_index producer.
9228 * dwarf2read.c: Include <unordered_set> and <unordered_map>.
9229 (MAYBE_SWAP) [WORDS_BIGENDIAN]: Cast to offset_type.
9230 (struct strtab_entry, hash_strtab_entry, eq_strtab_entry)
9231 (create_strtab, add_string): Remove.
9232 (file_write, data_buf): New.
9233 (struct symtab_index_entry): Use std::vector for cu_indices.
9234 (struct mapped_symtab): Use std::vector for data.
9235 (hash_symtab_entry, eq_symtab_entry, delete_symtab_entry)
9236 (create_symbol_hash_table, create_mapped_symtab, cleanup_mapped_symtab):
9237 Remove.
9238 (find_slot): Change return type. Update it to the new data structures.
9239 (hash_expand, add_index_entry): Update it to the new data structures.
9240 (offset_type_compare): Remove.
9241 (uniquify_cu_indices): Update it to the new data structures.
9242 (c_str_view, c_str_view_hasher, vector_hasher): New.
9243 (add_indices_to_cpool): Remove.
9244 (write_hash_table): Update it to the new data structures.
9245 (struct psymtab_cu_index_map, hash_psymtab_cu_index)
9246 (eq_psymtab_cu_index): Remove.
9247 (psym_index_map): New typedef.
9248 (struct addrmap_index_data): Change addr_obstack pointer to data_buf
9249 reference and std::unordered_map for cu_index_htab.
9250 (add_address_entry, add_address_entry_worker, write_address_map)
9251 (write_psymbols): Update it to the new data structures.
9252 (write_obstack): Remove.
9253 (struct signatured_type_index_data): Change types_list to a data_buf
9254 reference and psyms_seen to a std::unordered_set reference.
9255 (write_one_signatured_type, recursively_write_psymbols)
9256 (write_psymtabs_to_index): Update it to the new data structures.
9257
c4dcb155
SM
92582017-06-11 Simon Marchi <simon.marchi@ericsson.com>
9259
9260 * NEWS (Changes since GDB 8.0): Announce {set,show} debug
9261 separate-debug-file commands.
9262 * symfile.h (separate_debug_file_debug): New global.
9263 * symfile.c (separate_debug_file_debug): New global.
9264 (separate_debug_file_exists, find_separate_debug_file): Add
9265 debug output.
9266 (_initialize_symfile): Add "set debug separate-debug-file"
9267 command.
9268 * build-id.c (build_id_to_debug_bfd,
9269 find_separate_debug_file_by_buildid): Add debug output.
9270
6d45d4b4
SM
92712017-06-10 Simon Marchi <simon.marchi@polymtl.ca>
9272
9273 * gdbarch.sh (displaced_step_free_closure): Remove.
9274 * gdbarch.h, gdbarch.c: Re-generate.
9275 * aarch64-linux-tdep.c (aarch64_linux_init_abi): Don't set
9276 displaced_step_free_closure.
9277 * amd64-linux-tdep.c (amd64_linux_init_abi_common): Likewise.
9278 * arm-linux-tdep.c (arm_linux_init_abi): Likewise.
9279 * i386-linux-tdep.c (i386_linux_init_abi): Likewise.
9280 * rs6000-aix-tdep.c (rs6000_aix_init_osabi): Likewise.
9281 * rs6000-tdep.c (rs6000_gdbarch_init): Likewise.
9282 * s390-linux-tdep.c (s390_gdbarch_init): Likewise.
9283 * arch-utils.h (simple_displaced_step_free_closure): Remove.
9284 * arch-utils.c (simple_displaced_step_free_closure): Remove.
9285 * infrun.c (displaced_step_clear): Call xfree instead of
9286 gdbarch_displaced_step_free_closure.
9287
2f91880f
SDJ
92882017-06-08 Sergio Durigan Junior <sergiodj@redhat.com>
9289
9290 * common/common-utils.c (stringify_argv): Check for "arg[0] !=
9291 NULL".
9292
b8b6e72f
AH
92932017-06-08 Alan Hayward <alan.hayward@arm.com>
9294
9295 * mn10300-tdep.c (MN10300_MAX_REGISTER_SIZE): Add.
9296 (mn10300_extract_return_value): Use MN10300_MAX_REGISTER_SIZE.
9297 (mn10300_push_dummy_call): Likewise.
9298
5369082e
AH
92992017-06-08 Alan Hayward <alan.hayward@arm.com>
9300
9301 * mi/mi-main.c (register_changed_p): Use value_contents_eq.
9302
ff4ca5ac
AH
93032017-06-08 Alan Hayward <alan.hayward@arm.com>
9304
9305 * mi/mi-main.c (register_changed_p): Use cooked_read_value.
9306
aefd8b33
SDJ
93072017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
9308
9309 * NEWS (Changes since GDB 8.0): Announce that GDBserver is now
9310 able to start inferiors using a shell.
9311 (New remote packets): Announce new packet "QStartupWithShell".
9312 * remote.c: Add PACKET_QStartupWithShell.
9313 (extended_remote_create_inferior): Handle new
9314 PACKET_QStartupWithShell.
9315 (remote_protocol_features) <QStartupWithShell>: New entry for
9316 PACKET_QStartupWithShell.
9317 (_initialize_remote): Call "add_packet_config_cmd" for
9318 QStartupShell.
9319
2090129c
SDJ
93202017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
9321 Pedro Alves <palves@redhat.com>
9322
9323 * Makefile.in (HFILES_NO_SRCDIR): Add "common/common-inferior.h"
9324 and "nat/fork-inferior.h".
9325 * common/common-inferior.h: New file, with contents from
9326 "gdb/inferior.h".
9327 * commom/common-utils.c: Include "common-utils.h".
9328 (stringify_argv): New function.
9329 * common/common-utils.h (stringify_argv): New prototype.
9330 * configure.nat: Add "fork-inferior.o" as a dependency for
9331 "*linux*", "fbsd*" and "nbsd*" hosts.
9332 * corefile.c (get_exec_file): Update comment.
9333 * darwin-nat.c (darwin_ptrace_him): Call "gdb_startup_inferior"
9334 instead of "startup_inferior".
9335 (darwin_create_inferior): Call "add_thread_silent" after
9336 "fork_inferior".
9337 * fork-child.c: Cleanup unnecessary includes.
9338 (SHELL_FILE): Move to "common/common-fork-child.c".
9339 (environ): Likewise.
9340 (exec_wrapper): Initialize.
9341 (get_exec_wrapper): New function.
9342 (breakup_args): Move to "common/common-fork-child.c"; rename to
9343 "breakup_args_for_exec".
9344 (escape_bang_in_quoted_argument): Move to
9345 "common/common-fork-child.c".
9346 (saved_ui): New variable.
9347 (prefork_hook): New function.
9348 (postfork_hook): Likewise.
9349 (postfork_child_hook): Likewise.
9350 (gdb_startup_inferior): Likewise.
9351 (fork_inferior): Move to "common/common-fork-child.c". Update
9352 function to support gdbserver.
9353 (startup_inferior): Likewise.
9354 * gdbcore.h (get_exec_file): Remove declaration.
9355 * gnu-nat.c (gnu_create_inferior): Call "gdb_startup_inferior"
9356 instead of "startup_inferior". Call "add_thread_silent" after
9357 "fork_inferior".
9358 * inf-ptrace.c: Include "nat/fork-inferior.h" and "utils.h".
9359 (inf_ptrace_create_inferior): Call "gdb_startup_inferior"
9360 instead of "startup_inferior". Call "add_thread_silent" after
9361 "fork_inferior".
9362 * inferior.h: Include "common-inferior.h".
9363 (trace_start_error): Move to "common/common-utils.h".
9364 (trace_start_error_with_name): Likewise.
9365 (fork_inferior): Move prototype to "nat/fork-inferior.h".
9366 (startup_inferior): Likewise.
9367 (gdb_startup_inferior): New prototype.
9368 * nat/fork-inferior.c: New file, with contents from "fork-child.c".
9369 * nat/fork-inferior.h: New file.
9370 * procfs.c (procfs_init_inferior): Call "gdb_startup_inferior"
9371 instead of "startup_inferior". Call "add_thread_silent" after
9372 "fork_inferior".
9373 * target.h (target_terminal_init): Move prototype to
9374 "target/target.h".
9375 (target_terminal_inferior): Likewise.
9376 (target_terminal_ours): Likewise.
9377 * target/target.h (target_terminal_init): New prototype, moved
9378 from "target.h".
9379 (target_terminal_inferior): Likewise.
9380 (target_terminal_ours): Likewise.
9381 * utils.c (gdb_flush_out_err): New function.
9382
043a4934
SDJ
93832017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
9384
9385 * Makefile.in (HFILES_NO_SRCDIR): Add "common/common-gdbthread.h".
9386 * common/common-gdbthread.h: New file, with parts from
9387 "gdb/gdbthread.h".
9388 * gdbthread.h: Include "common-gdbthread.h".
9389 (switch_to_thread): Moved to "common/common-gdbthread.h".
9390
15652511
SDJ
93912017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
9392
9393 * Makefile.in (SFILES): Add "common/job-control.c".
9394 (HFILES_NO_SRCDIR): Add "common/job-control.h".
9395 (COMMON_OBS): Add "job-control.o".
9396 * common/job-control.c: New file, with contents from
9397 "gdb/inflow.c".
9398 * common/job-control.h: New file, with contents from "terminal.h".
9399 * fork-child.c: Include "job-control.h".
9400 * inflow.c: Include "job-control.h".
9401 (gdb_setpgid): Move to "common/common-inflow.c".
9402 (_initialize_inflow): Move setting of "job_control" to
9403 "handle_job_control".
9404 * terminal.h (job_control): Moved to "common/common-terminal.h".
9405 (gdb_setpgid): Likewise.
9406 * top.c: Include "job_control.h".
9407 * utils.c: Likewise.
9408 (job_control): Moved to "job-control.c".
9409
2d7cc5c7
PA
94102017-06-07 Pedro Alves <palves@redhat.com>
9411
9412 * Makefile.in (SFILES): Add gdb_regex.c.
9413 (COMMON_OBS): Add gdb_regex.o.
9414 * ada-lang.c (ada_add_standard_exceptions)
9415 (ada_add_exceptions_from_frame, name_matches_regex)
9416 (ada_add_global_exceptions, ada_exceptions_list_1): Change regex
9417 parameter type to compiled_regex. Adjust.
9418 (ada_exceptions_list): Use compiled_regex.
9419 * break-catch-throw.c (exception_catchpoint::pattern): Now a
9420 std::unique_ptr<compiled_regex>.
9421 (exception_catchpoint::~exception_catchpoint): Remove regfree
9422 call.
9423 (check_status_exception_catchpoint): Adjust to use compiled_regex.
9424 (handle_gnu_v3_exceptions): Adjust to use compiled_regex.
9425 * breakpoint.c (solib_catchpoint::compiled): Now a
9426 std::unique_ptr<compiled_regex>.
9427 (solib_catchpoint::~solib_catchpoint): Remove regfree call.
9428 (check_status_catch_solib): Adjust to use compiled_regex.
9429 (add_solib_catchpoint): Adjust to use compiled_regex.
9430 * cli/cli-cmds.c (apropos_command): Use compiled_regex.
9431 * cli/cli-decode.c (apropos_cmd): Change regex parameter to
9432 compiled_regex reference. Adjust to use it.
9433 * cli/cli-decode.h: Remove struct re_pattern_buffer forward
9434 declaration. Include "gdb_regex.h".
9435 (apropos_cmd): Change regex parameter to compiled_regex reference.
9436 * gdb_regex.c: New file.
9437 * gdb_regex.h (make_regfree_cleanup, get_regcomp_error): Delete
9438 declarations.
9439 (class compiled_regex): New.
9440 * linux-tdep.c: Include "common/gdb_optional.h".
9441 (struct mapping_regexes): New, factored out from
9442 mapping_is_anonymous_p, and adjusted to use compiled_regex.
9443 (mapping_is_anonymous_p): Use mapping_regexes wrapped in a
9444 gdb::optional and remove cleanups. Adjust to compiled_regex.
9445 * probe.c: Include "common/gdb_optional.h".
9446 (collect_probes): Use compiled_regex and gdb::optional and remove
9447 cleanups.
9448 * skip.c: Include "common/gdb_optional.h".
9449 (skiplist_entry::compiled_function_regexp): Now a
9450 gdb::optional<compiled_regex>.
9451 (skiplist_entry::compiled_function_regexp_is_valid): Delete field.
9452 (free_skiplist_entry): Remove regfree call.
9453 (compile_skip_regexp, skip_rfunction_p): Adjust to use
9454 compiled_regex and gdb::optional.
9455 * symtab.c: Include "common/gdb_optional.h".
9456 (search_symbols): Use compiled_regex and gdb::optional.
9457 * utils.c (do_regfree_cleanup, make_regfree_cleanup)
9458 (get_regcomp_error, compile_rx_or_error): Delete. Some bits moved
9459 to gdb_regex.c.
9460
50d6adef
AH
94612017-06-07 Alan Hayward <alan.hayward@arm.com>
9462
9463 * regcache.c (regcache::save): Avoid buffer use.
9464 (regcache::dump): Likewise.
9465
4a8a33c8
AH
94662017-06-07 Alan Hayward <alan.hayward@arm.com>
9467
9468 * sh-tdep.c (sh_pseudo_register_read): Remove
9469 MAX_REGISTER_SIZE.
9470 (sh_pseudo_register_write): Likewise.
9471 * sh64-tdep.c (sh64_pseudo_register_read): Likewise.
9472 (sh64_pseudo_register_write): Likewise
9473
d1be909e
AH
94742017-06-07 Alan Hayward <alan.hayward@arm.com>
9475
9476 * aarch64-tdep.c (aarch64_store_return_value): Use
9477 V_REGISTER_SIZE.
9478 (aarch64_pseudo_read_value): Likewise.
9479 (aarch64_pseudo_write): Likewise.
9480
f4a65042
YQ
94812017-06-06 Yao Qi <yao.qi@linaro.org>
9482
9483 * regformats/regdef.h (set_register_cache): Remove the
9484 declaration.
9485
9f7fb0aa
AH
94862017-06-06 Alan Hayward <alan.hayward@arm.com>
9487
9488 * frame.c (frame_unwind_register_signed): Use
9489 frame_unwind_register_value.
9490
e1e01040
PA
94912017-06-06 Pedro Alves <palves@redhat.com>
9492
9493 PR breakpoints/21553
9494 * breakpoint.c (create_breakpoints_sal_default)
9495 (init_breakpoint_sal, create_breakpoint_sal): Use
9496 gdb::unique_xmalloc_ptr for string parameters.
9497 (create_breakpoint): Constify 'extra_string' and 'cond_string'
9498 parameters. Replace cleanups with gdb::unique_xmalloc_ptr.
9499 (base_breakpoint_create_breakpoints_sal)
9500 (bkpt_create_breakpoints_sal, tracepoint_create_breakpoints_sal)
9501 (strace_marker_create_breakpoints_sal)
9502 (create_breakpoints_sal_default): Use gdb::unique_xmalloc_ptr for
9503 string parameters.
9504 * breakpoint.h (breakpoint_ops::create_breakpoints_sal): Use
9505 gdb::unique_xmalloc_ptr for string parameters.
9506 (create_breakpoint): Constify 'extra_string' and 'cond_string'
9507 parameters.
9508
fbe654c8
AH
95092017-06-06 Alan Hayward <alan.hayward@arm.com>
9510
9511 * alpha-tdep.c (alpha_register_to_value): Use
9512 get_frame_register_value.
9513 (alpha_value_to_register): Use ALPHA_REGISTER_SIZE.
9514
ae0d01d6
AH
95152017-06-06 Alan Hayward <alan.hayward@arm.com>
9516
9517 * ia64-tdep.c (IA64_MAX_FP_REGISTER_SIZE) Add.
9518 (ia64_register_to_value): Use IA64_MAX_FP_REGISTER_SIZE.
9519 (ia64_value_to_register): Likewise.
9520 (ia64_extract_return_value): Likewise.
9521 (ia64_store_return_value): Likewise.
9522 (ia64_push_dummy_call): Likewise.
9523
49cf576c
JB
95242017-06-04 Joel Brobecker <brobecker@adacore.com>
9525
9526 GDB 8.0 released.
9527
26b6a6ab
SM
95282017-06-03 Simon Marchi <simon.marchi@ericsson.com>
9529
9530 * x86-linux-nat.c (struct arch_lwp_info): Remove.
9531
22827c51
SM
95322017-06-03 Simon Marchi <simon.marchi@polymtl.ca>
9533
9534 * linux-nat.c (linux_nat_post_attach_wait): Remove FIRST
9535 parameter.
9536 (linux_nat_attach): Adjust call to linux_nat_post_attach_wait.
9537
0e05cf3a
SM
95382017-06-02 Simon Marchi <simon.marchi@ericsson.com>
9539
9540 * event-loop.c (poll_timers): Unallocate timer using delete
9541 instead of xfree.
9542
c1fc2657
SM
95432017-06-02 Simon Marchi <simon.marchi@polymtl.ca>
9544
9545 * breakpoint.h (struct breakpoint_ops) <dtor>: Remove.
9546 (struct breakpoint) <~breakpoint>: New.
9547 (struct watchpoint): Inherit from breakpoint.
9548 <~watchpoint>: New.
9549 <base>: Remove.
9550 (struct tracepoint): Inherit from breakpoint.
9551 <base>: Remove.
9552 * breakpoint.c (longjmp_breakpoint_ops): Remove.
9553 (struct longjmp_breakpoint): Inherit from breakpoint.
9554 <~longjmp_breakpoint>: New.
9555 <base>: Remove.
9556 (new_breakpoint_from_type): Remove casts.
9557 (watchpoint_in_thread_scope): Remove reference to base field.
9558 (watchpoint_del_at_next_stop): Likewise.
9559 (update_watchpoint): Likewise.
9560 (watchpoint_check): Likewise.
9561 (bpstat_check_watchpoint): Likewise.
9562 (set_longjmp_breakpoint): Likewise.
9563 (struct fork_catchpoint): Inherit from breakpoint.
9564 <base>: Remove.
9565 (struct solib_catchpoint): Inherit from breakpoint.
9566 <~solib_catchpoint>: New.
9567 <base>: Remove.
9568 (dtor_catch_solib): Change to ...
9569 (solib_catchpoint::~solib_catchpoint): ... this.
9570 (breakpoint_hit_catch_solib): Remove reference to base field.
9571 (add_solib_catchpoint): Likewise.
9572 (create_fork_vfork_event_catchpoint): Likewise.
9573 (struct exec_catchpoint): Inherit from breakpoint.
9574 <~exec_catchpoint>: New.
9575 <base>: Remove.
9576 (dtor_catch_exec): Change to ...
9577 (exec_catchpoint::~exec_catchpoint): ... this.
9578 (dtor_watchpoint): Change to ...
9579 (watchpoint::~watchpoint): ... this.
9580 (watch_command_1): Remove reference to base field.
9581 (catch_exec_command_1): Likewise.
9582 (base_breakpoint_dtor): Change to ...
9583 (breakpoint::~breakpoint): ... this.
9584 (base_breakpoint_ops): Remove dtor field value.
9585 (longjmp_bkpt_dtor): Change to ...
9586 (longjmp_breakpoint::~longjmp_breakpoint): ... this.
9587 (strace_marker_create_breakpoints_sal): Remove reference to base
9588 field.
9589 (delete_breakpoint): Don't manually call breakpoint destructor.
9590 (create_tracepoint_from_upload): Remove reference to base field.
9591 (trace_pass_set_count): Likewise.
9592 (initialize_breakpoint_ops): Don't initialize
9593 momentary_breakpoint_ops, don't set dtors.
9594 * ada-lang.c (struct ada_catchpoint): Inherit from breakpoint.
9595 <~ada_catchpoint>: New.
9596 <base>: Remove.
9597 (create_excep_cond_exprs): Remove reference to base field.
9598 (dtor_exception): Change to ...
9599 (ada_catchpoint::~ada_catchpoint): ... this.
9600 (dtor_catch_exception): Remove.
9601 (dtor_catch_exception_unhandled): Remove.
9602 (dtor_catch_assert): Remove.
9603 (create_ada_exception_catchpoint): Remove reference to base
9604 field.
9605 (initialize_ada_catchpoint_ops): Don't set dtors.
9606 * break-catch-sig.c (struct signal_catchpoint): Inherit from
9607 breakpoint.
9608 <~signal_catchpoint>: New.
9609 <base>: Remove.
9610 (signal_catchpoint_dtor): Change to ...
9611 (signal_catchpoint::~signal_catchpoint): ... this.
9612 (create_signal_catchpoint): Remove reference to base field.
9613 (initialize_signal_catchpoint_ops): Don't set dtor.
9614 * break-catch-syscall.c (struct syscall_catchpoint): Inherit
9615 from breakpoint.
9616 <~syscall_catchpoint>: New.
9617 <base>: Remove.
9618 (dtor_catch_syscall): Change to ...
9619 (syscall_catchpoint::~syscall_catchpoint): ... this.
9620 (create_syscall_event_catchpoint): Remove reference to base
9621 field.
9622 (initialize_syscall_catchpoint_ops): Don't set dtor.
9623 * break-catch-throw.c (struct exception_catchpoint): Inherit
9624 from breakpoint.
9625 <~exception_catchpoint>: New.
9626 <base>: Remove.
9627 (dtor_exception_catchpoint): Change to ...
9628 (exception_catchpoint::~exception_catchpoint): ... this.
9629 (handle_gnu_v3_exceptions): Remove reference to base field.
9630 (initialize_throw_catchpoint_ops): Don't set dtor.
9631 * ctf.c (ctf_get_traceframe_address): Remove reference to base
9632 field.
9633 * remote.c (remote_get_tracepoint_status): Likewise.
9634 * tracefile-tfile.c (tfile_get_traceframe_address): Likewise.
9635 * tracefile.c (tracefile_fetch_registers): Likewise.
9636 * tracepoint.c (actions_command): Likewise.
9637 (validate_actionline): Likewise.
9638 (tfind_1): Likewise.
9639 (get_traceframe_location): Likewise.
9640 (find_matching_tracepoint_location): Likewise.
9641 (parse_tracepoint_status): Likewise.
9642 * mi/mi-cmd-break.c (mi_cmd_break_passcount): Likewise.
9643
3b0871f4
SM
96442017-06-02 Simon Marchi <simon.marchi@polymtl.ca>
9645
9646 * breakpoint.c (struct longjmp_breakpoint): New struct.
9647 (is_tracepoint_type): Change return type to bool.
9648 (is_longjmp_type): New function.
9649 (new_breakpoint_from_type): Handle longjmp kinds of breakpoints.
9650 (set_raw_breakpoint_without_location): Use
9651 new_breakpoint_from_type.
9652 (set_raw_breakpoint): Likewise.
9653
a5e364af
SM
96542017-06-02 Simon Marchi <simon.marchi@polymtl.ca>
9655
9656 * breakpoint.c (new_breakpoint_from_type): New function.
9657 (create_breakpoint_sal): Use new_breakpoint_from_type and
9658 unique_ptr.
9659 (create_breakpoint): Likewise.
9660
ae3b3f34
SM
96612017-05-31 Simon Marchi <simon.marchi@ericsson.com>
9662
9663 * memattr.c (mem_info_command): Rename to ...
9664 (info_mem_command): ... this.
9665 (mem_enable_command): Rename to ...
9666 (enable_mem_command): ... this.
9667 (mem_disable_command): Rename to ...
9668 (disable_mem_command): ... this.
9669 (mem_delete_command): Rename to ...
9670 (delete_mem_command): ... this.
9671 (_initialize_mem): Adjust function names.
9672
13ace077
MM
96732017-05-31 Markus Metzger <markus.t.metzger@intel.com>
9674
9675 * btrace.c (handle_pt_insn_events): New.
9676 (ftrace_add_pt): Call handle_pt_insn_events. Rename ERRCODE into
9677 STATUS. Split into this and ...
9678 (handle_pt_insn_event_flags): ... this.
9679
c56ccc05
MM
96802017-05-31 Markus Metzger <markus.t.metzger@intel.com>
9681
9682 * configure.ac: Check for pt_insn_event, struct pt_insn.enabled,
9683 and struct pt_insn.resynced.
9684 * configure: Regenerated.
9685 * config.in: Regenerated.
9686
08c3f6d2
TW
96872017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
9688
9689 * btrace.c (ftrace_find_call_by_number): New function.
9690 (ftrace_new_function): Store objects, not pointers.
9691 (ftrace_find_call_by_number, ftrace_new_return, ftrace_new_switch,
9692 ftrace_new_gap, ftrace_update_function,
9693 ftrace_compute_global_level_offset, btrace_stich_bts, btrace_clear,
9694 btrace_insn_get, btrace_insn_get_error, btrace_insn_end,
9695 btrace_insn_next, btrace_insn_prev, ptrace_find_insn_by_number,
9696 btrace_ends_with_single_insn, btrace_call_get): Account for
9697 btrace_thread_info::functions now storing objects.
9698 * btrace.h (struct btrace_thread_info): Add constructor.
9699 (struct btrace_thread_info) <functions>: Make std::vector.
9700 (struct btrace_thread_info) <prev, next, up, insn, errcode, flags):
9701 Initialize with default values.
9702 * record-btrace.c (record_btrace_frame_sniffer): Account for
9703 btrace_thread_info::functions now storing objects.
9704
8ffd39f2
TW
97052017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
9706
9707 * btrace.c: Remove typedef bfun_s.
9708 (ftrace_new_gap): Directly add gaps to the list of gaps.
9709 (btrace_bridge_gaps, btrace_compute_ftrace_bts, pt_btrace_insn_flags,
9710 ftrace_add_pt, btrace_compute_ftrace_pt, btrace_compute_ftrace_1,
9711 btrace_finalize_ftrace, btrace_compute_ftrace): Use std::vector
9712 instead of gdb VEC.
9713
4aeb0dfc
TW
97142017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
9715
9716 * btrace.c (ftrace_fixup_caller, ftrace_new_return, ftrace_connect_bfun,
9717 ftrace_bridge_gap): Replace references to btrace_thread_info::segment
9718 with btrace_thread_info::next_segment and
9719 btrace_thread_info::prev_segment.
9720 * btrace.h: Remove struct btrace_func_link.
9721 (struct btrace_function): Replace pair of function segment pointers
9722 with pair of indices.
9723 * python/py-record-btrace.c (btpy_call_prev_sibling,
9724 btpy_call_next_sibling): Replace references to
9725 btrace_thread_info::segment with btrace_thread_info::next_segment and
9726 btrace_thread_info::prev_segment.
9727 * record-btrace.c (record_btrace_frame_this_id): Use
9728 btrace_find_call_by_number.
9729
eb8f2b9c
TW
97302017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
9731
9732 * btrace.c (ftrace_new_function, ftrace_fixup_level,
9733 ftrace_connect_bfun, ftrace_bridge_gap, btrace_bridge_gaps,
9734 btrace_insn_next, btrace_insn_prev): Remove references to
9735 btrace_thread_info::flow.
9736 * btrace.h (struct btrace_function): Remove FLOW.
9737
42bfe59e
TW
97382017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
9739
9740 * btrace.c (ftrace_find_call_by_number): New function.
9741 (ftrace_update_caller, ftrace_new_call, ftrace_new_tailcall,
9742 ftrace_get_caller, ftrace_find_call, ftrace_new_return,
9743 ftrace_match_backtrace, ftrace_connect_bfun, ftrace_connect_backtrace,
9744 ftrace_bridge_gap, btrace_bridge_gaps): Use btrace_function::up as an
9745 index.
9746 * btrace.h (struct btrace_function): Turn UP into an index.
9747 * python/py-record-btrace.c (btpy_call_up): Use btrace_function::up
9748 as an index.
9749 * record-btrace.c (record_btrace_frame_unwind_stop_reason,
9750 record_btrace_frame_prev_register, record_btrace_frame_sniffer,
9751 record_btrace_tailcall_frame_sniffe): Use btrace_find_call_by_number.
9752
b54b03bd
TW
97532017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
9754
9755 * btrace.c (ftrace_new_function, ftrace_new_call, ftrace_new_tailcall,
9756 ftrace_new_return, ftrace_new_switch, ftrace_new_gap,
9757 ftrace_update_function, ftrace_compute_global_level_offset,
9758 btrace_compute_ftrace_bts, ftrace_add_pt, btrace_compute_ftrace_pt,
9759 btrace_stitch_bts, btrace_fetch, btrace_clear, btrace_insn_number,
9760 btrace_insn_end, btrace_is_empty): Remove references to
9761 btrace_thread_info::begin and btrace_thread_info::end.
9762 * btrace.h (struct btrace_thread_info): Remove BEGIN and END.
9763 (struct btrace_thread_info) <functions>: Adjust comment.
9764 * record-btrace.c (record_btrace_start_replaying): Remove reference to
9765 btrace_thread_info::begin.
9766
8286623c
TW
97672017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
9768
9769 * btrace.c (ftrace_new_function, ftrace_new_call, ftrace_new_tailcall,
9770 ftrace_new_return, ftrace_new_switch, ftrace_new_gap,
9771 ftrace_update_function): Remove arguments that implicitly were always
9772 BTINFO->END.
9773 (btrace_compute_ftrace_bts, ftrace_add_pt, btrace_compute_ftrace_pt):
9774 Don't pass BTINFO->END.
9775
a0f1b963
TW
97762017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
9777
9778 * btrace.c: (btrace_insn_get, btrace_insn_get_error, btrace_insn_number,
9779 btrace_insn_begin, btrace_insn_end, btrace_insn_next, btrace_insn_prev,
9780 btrace_find_insn_by_number): Replace function segment pointer with
9781 index.
9782 (btrace_insn_cmp): Simplify.
9783 * btrace.h: (struct btrace_insn_iterator) Rename index to
9784 insn_index. Replace function segment pointer with index into function
9785 segment vector.
9786 * record-btrace.c (record_btrace_call_history): Replace function
9787 segment pointer use with index.
9788 (record_btrace_frame_sniffer): Retrieve function call segment through
9789 vector.
9790 (record_btrace_set_replay): Remove defunc't safety check.
9791
f158f208
TW
97922017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
9793
9794 * btrace.c (btrace_ends_with_single_insn): New function.
9795 (btrace_call_get, btrace_call_number, btrace_call_begin,
9796 btrace_call_end, btrace_call_next, btrace_call_prev,
9797 btrace_find_call_by_number): Use index into call segment vector
9798 instead of pointer.
9799 (btrace_call_cmp): Simplify.
9800 * btrace.h (struct btrace_call_iterator): Replace function call segment
9801 pointer with index into vector.
9802 * record-btrace.c (record_btrace_call_history): Use index instead of
9803 pointer.
9804
521103fd
TW
98052017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
9806
9807 * btrace.c (btrace_insn_begin, btrace_insn_end,
9808 btrace_find_insn_by_number): Add btinfo to iterator.
9809 * btrace.h (struct btrace_insn_iterator): Add btinfo.
9810
17b89b34
TW
98112017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
9812
9813 * btrace.c (ftrace_new_function): Add btrace_thread_info to arguments
9814 and save pointers directly.
9815 (ftrace_new_call, ftrace_new_tailcall, ftrace_new_return,
9816 ftrace_new_switch, ftrace_new_gap, ftrace_update_function,
9817 ftrace_add_pt): Add btrace_thread_info to arguments. Adjust for
9818 changed signature of functions.
9819 (btrace_compute_ftrace_pt): Adjust for changed signature of functions.
9820 (btrace_fetch): Remove code that adds btrace_function pointers to
9821 vector of btrace_functions.
9822 (btrace_clear): Simplify freeing vector of btrace_functions.
9823
2b51eddc
TW
98242017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
9825
9826 * btrace.c (btrace_fetch, btrace_clear, btrace_find_insn_by_number):
9827 Replace VEC_* with std::vector functions.
9828 * btrace.h: Add include: vector. Remove typedef for DEF_VEC_P.
9829 (struct btrace_thread_info)<functions>: Change type to std::vector.
9830
db6be0d5
SM
98312017-05-30 Simon Marchi <simon.marchi@ericsson.com>
9832
9833 * NEWS (Changes in GDB 8.0): Remove extra empty line. Move
9834 "Removed targets and native configurations" up. Merge duplicate
9835 "New commands" sub-sections. Add "New options" sub-sections.
9836
b057297a
AH
98372017-05-26 Alan Hayward <alan.hayward@arm.com>
9838
9839 * defs.h (copy_integer_to_size): New declaration.
9840 * findvar.c (copy_integer_to_size): New function.
9841 (do_cint_test): New selftest function.
9842 (copy_integer_to_size_test): Likewise.
9843 (_initialize_findvar): Likewise.
9844 * mips-fbsd-tdep.c (mips_fbsd_supply_reg): Use raw_supply_integer.
9845 (mips_fbsd_collect_reg): Use raw_collect_integer.
9846 * mips-linux-tdep.c (supply_32bit_reg): Use raw_supply_integer.
9847 (mips64_fill_gregset): Use raw_collect_integer
9848 (mips64_fill_fpregset): Use raw_supply_integer.
9849 * regcache.c (regcache::raw_supply_integer): New function.
9850 (regcache::raw_collect_integer): Likewise.
9851 * regcache.h: (regcache::raw_supply_integer): New declaration.
9852 (regcache::raw_collect_integer): Likewise.
9853
b77b02a5
YQ
98542017-05-24 Yao Qi <yao.qi@linaro.org>
9855
9856 * Makefile.in (SFILES): Add gdbarch-selftests.c.
9857 (COMMON_OBS): Add gdbarch-selftests.o.
9858 * frame.c [GDB_SELF_TESTS] (create_new_frame): New function.
9859 * frame.h [GDB_SELF_TESTS] (create_new_frame): Declare.
9860 * gdbarch-selftests.c: New file.
9861 * regcache.h (regcache) <~regcache>: Mark it virtual if
9862 GDB_SELF_TEST.
9863 <raw_write>: Likewise.
9864
e521e87e
YQ
98652017-05-24 Yao Qi <yao.qi@linaro.org>
9866
9867 * regcache.c (current_regcache): Change it to
9868 regcache::current_regcache.
9869 (regcache_observer_target_changed): Update.
9870 (regcache_thread_ptid_changed): Make it a regcache static
9871 method.
9872 (regcache_thread_ptid_changed): Update.
9873 (class regcache_access): New.
9874 (current_regcache_test): Update.
9875 (_initialize_regcache): Update.
9876 * regcache.h: Include forward_list.
9877 (regcache): Declare regcache_thread_ptid_changed and declare
9878 registers_changed_ptid as friend.
9879
d8e07dda
YQ
98802017-05-24 Yao Qi <yao.qi@linaro.org>
9881
9882 * i387-tdep.c (i387_register_to_value): Use register_size
9883 instead of TYPE_LENGTH.
9884 * m68k-tdep.c (m68k_register_to_value): Likewise.
9885
8c8f9122
YQ
98862017-05-24 Yao Qi <yao.qi@linaro.org>
9887
9888 * i387-tdep.c (i387_convert_register_p): Return false if type
9889 code isn't TYPE_CODE_FLT.
9890
68fce50f
YQ
98912017-05-24 Yao Qi <yao.qi@linaro.org>
9892
9893 * alpha-tdep.c (alpha_convert_register_p): Return true if type
9894 length is 4.
9895 (alpha_register_to_value): Remove type length check.
9896 (alpha_value_to_register): Likewise.
9897
88954b49
YQ
98982017-05-24 Yao Qi <yao.qi@linaro.org>
9899
9900 * ia64-tdep.c (ia64_convert_register_p): Check type's code is
9901 TYPE_CODE_FLT.
9902
e3ec9b69
YQ
99032017-05-24 Yao Qi <yao.qi@linaro.org>
9904
9905 * m68k-tdep.c (m68k_convert_register_p): Check type's code is
9906 TYPE_CODE_FLT or not.
9907
cdd238da
YQ
99082017-05-24 Yao Qi <yao.qi@linaro.org>
9909
9910 * alpha-tdep.c (alpha_gdbarch_init): Use XCNEW instead of XNEW.
9911 * avr-tdep.c (avr_gdbarch_init): Likewise.
9912 * bfin-tdep.c (bfin_gdbarch_init): Likewise.
9913 * cris-tdep.c (cris_gdbarch_init): Likewise.
9914 * ft32-tdep.c (ft32_gdbarch_init): Likewise.
9915 * lm32-tdep.c (lm32_gdbarch_init): Likewise.
9916 * m32r-tdep.c (m32r_gdbarch_init): Likewise.
9917 * m68hc11-tdep.c (m68hc11_gdbarch_init): Likewise.
9918 * mep-tdep.c (mep_gdbarch_init): Likewise.
9919 * microblaze-tdep.c (microblaze_gdbarch_init): Likewise.
9920 * mips-tdep.c (mips_gdbarch_init): Likewise.
9921 * mn10300-tdep.c (mn10300_gdbarch_init): Likewise.
9922 * moxie-tdep.c (moxie_gdbarch_init): Likewise.
9923 * msp430-tdep.c (msp430_gdbarch_init): Likewise.
9924 * sh64-tdep.c (sh64_gdbarch_init): Likewise.
9925 * v850-tdep.c (v850_gdbarch_init): Likewise.
9926
7a3929c4
YQ
99272017-05-24 Yao Qi <yao.qi@linaro.org>
9928
9929 * selftest-arch.c (tests_with_arch): Call registers_changed
9930 and reinit_frame_cache.
9931 * selftest.c (run_self_tests): Likewise.
9932
f4985dba
YQ
99332017-05-24 Yao Qi <yao.qi@linaro.org>
9934
9935 * rs6000-tdep.c (gdb_print_insn_powerpc): Remove.
9936 (rs6000_gdbarch_init): Don't call set_gdbarch_print_insn.
9937
ab20fa4a
YQ
99382017-05-24 Yao Qi <yao.qi@linaro.org>
9939
9940 * rl78-tdep.c (rl78_gdbarch_init): Don't call
9941 set_gdbarch_print_insn.
9942
f532ab94
YQ
99432017-05-24 Yao Qi <yao.qi@linaro.org>
9944
9945 * h8300-tdep.c (h8300_gdbarch_init): Don't call
9946 set_gdbarch_print_insn.
9947
39503f82
YQ
99482017-05-24 Yao Qi <yao.qi@linaro.org>
9949
9950 * alpha-tdep.c (alpha_gdbarch_init): Don't call
9951 set_gdbarch_print_insn.
9952 * arc-tdep.c (arc_gdbarch_init): Likewise.
9953 * arch-utils.c: include dis-asm.h.
9954 (default_print_insn): New function.
9955 * arch-utils.h (default_print_insn): Declare.
9956 * avr-tdep.c (avr_gdbarch_init): Don't call set_gdbarch_print_insn.
9957 * bfin-tdep.c (bfin_gdbarch_init): Likewise.
9958 * cris-tdep.c (cris_delayed_get_disassembler): Remove.
9959 (cris_gdbarch_init): Don't call set_gdbarch_print_insn.
9960 * frv-tdep.c (frv_gdbarch_init): Likewise.
9961 * ft32-tdep.c (ft32_gdbarch_init): Likewise.
9962 * gdbarch.sh (print_insn): Use default_print_insn.
9963 * gdbarch.c: Regenerated.
9964 * hppa-tdep.c (hppa_gdbarch_init): Likewise.
9965 * iq2000-tdep.c (iq2000_gdbarch_init): Likewise.
9966 * lm32-tdep.c (lm32_gdbarch_init): Likewise.
9967 * m32c-tdep.c (m32c_gdbarch_init): Likewise.
9968 * m32r-tdep.c (m32r_gdbarch_init): Likewise.
9969 * m68hc11-tdep.c (gdb_print_insn_m68hc11): Remove.
9970 (m68hc11_gdbarch_init): Don't call set_gdbarch_print_insn.
9971 * m68k-tdep.c (m68k_gdbarch_init): Likewise.
9972 * m88k-tdep.c (m88k_gdbarch_init): Likewise.
9973 * microblaze-tdep.c (microblaze_gdbarch_init): Likewise.
9974 * mn10300-tdep.c (mn10300_gdbarch_init): Likewise.
9975 * moxie-tdep.c (moxie_gdbarch_init): Likewise.
9976 * msp430-tdep.c (msp430_gdbarch_init): Likewise.
9977 * mt-tdep.c (mt_gdbarch_init): Likewise.
9978 * nds32-tdep.c (nds32_gdbarch_init): Likewise.
9979 * nios2-tdep.c (nios2_print_insn): Remove.
9980 (nios2_gdbarch_init): Don't call set_gdbarch_print_insn.
9981 * rx-tdep.c (rx_gdbarch_init): Likewise.
9982 * s390-linux-tdep.c (s390_gdbarch_init): Likewise.
9983 * score-tdep.c (score_print_insn): Remove.
9984 (score_gdbarch_init): Don't call set_gdbarch_print_insn.
9985 * sh-tdep.c (sh_gdbarch_init): Likewise.
9986 * sh64-tdep.c (sh64_gdbarch_init): Likewise.
9987 * sparc-tdep.c (sparc32_gdbarch_init): Likewise.
9988 * tic6x-tdep.c (tic6x_print_insn): Remove.
9989 (tic6x_gdbarch_init): Don't call set_gdbarch_print_insn.
9990 * tilegx-tdep.c (tilegx_gdbarch_init): Likewise.
9991 * v850-tdep.c (v850_gdbarch_init): Likewise.
9992 * vax-tdep.c (vax_gdbarch_init): Likewise.
9993 * xstormy16-tdep.c (xstormy16_gdbarch_init): Likewise.
9994 * xtensa-tdep.c (xtensa_gdbarch_init): Likewise.
9995
f7241d4f
JB
99962017-05-23 John Baldwin <jhb@FreeBSD.org>
9997
9998 * mips-fbsd-tdep.c (MIPS_PC_REGNUM): Remove.
9999 (MIPS_FP0_REGNUM): Remove.
10000 (MIPS_FSR_REGNUM): Remove.
10001 (mips_fbsd_supply_fpregs): Use mips_regnum.
10002 (mips_fbsd_supply_gregs): Likewise.
10003 (mips_fbsd_collect_fpregs): Likewise.
10004 (mips_fbsd_collect_gregs): Likewise.
10005
d489d81d
JB
100062017-05-23 John Baldwin <jhb@FreeBSD.org>
10007
10008 * mips-fbsd-nat.c (getregs_supplies): Fix upper bound comparison.
10009 (getpfpregs_supplies): New function.
10010 (mips_fbsd_fetch_inferior_registers): Remove early exit and use
10011 getfpregs_supplies.
10012 (mips_fbsd_store_inferior_registers): Likewise.
10013
e11b3cdc
PA
100142017-05-22 Pedro Alves <palves@redhat.com>
10015
10016 * MAINTAINERS (Host/Native): Add John Baldwin as FreeBSD
10017 maintainer.
10018
0f068fb5
AH
100192017-05-22 Alan Hayward <alan.hayward@arm.com>
10020
10021 * ppc-linux-nat.c (fetch_register): Use PPC_MAX_REGISTER_SIZE.
10022 (store_register): Likewise.
10023 * ppc-sysv-tdep.c (ppc_sysv_abi_push_dummy_call): Likewise.
10024 (get_decimal_float_return_value): Likewise.
10025 (do_ppc_sysv_return_value): Likewise.
10026 (ppc64_sysv_abi_push_integer): Likewise.
10027 (ppc64_sysv_abi_push_freg): Likewise.
10028 (ppc64_sysv_abi_return_value_base): Likewise.
10029 (ppc64_sysv_abi_return_value): Likewise.
10030 * rs6000-aix-tdep.c (rs6000_push_dummy_call): Likewise.
10031 * rs6000-lynx178-tdep.c (rs6000_lynx178_push_dummy_call): Likewise.
10032 * rs6000-nat.c: Likewise.
10033 * rs6000-tdep.c (rs6000_register_to_value): Likewise.
10034 (rs6000_value_to_register): Likewise.
10035 * ppc-tdep.h (PPC_MAX_REGISTER_SIZE): Add.
10036
e6cf65f2
TT
100372017-05-21 Tom Tromey <tom@tromey.com>
10038
10039 PR rust/21466:
10040 * rust-lang.c (rust_print_type) <TYPE_CODE_ARRAY>: Print unsized
10041 arrays as "[T]", not "[T; ]".
10042
43cc5389
TT
100432017-05-19 Tom Tromey <tom@tromey.com>
10044
10045 PR rust/21484:
10046 * rust-lang.c (exp_descriptor_rust): New function.
10047 (rust_language_defn): Use it.
10048 * p-lang.c (pascal_language_defn): Update.
10049 * opencl-lang.c (opencl_language_defn): Update.
10050 * objc-lang.c (objc_language_defn): Update.
10051 * m2-lang.c (m2_language_defn): Update.
10052 * language.h (struct language_defn)
10053 <la_watch_location_expression>: New member.
10054 * language.c (unknown_language_defn, auto_language_defn)
10055 (local_language_defn): Update.
10056 * go-lang.c (go_language_defn): Update.
10057 * f-lang.c (f_language_defn): Update.
10058 * d-lang.c (d_language_defn): Update.
10059 * c-lang.h (c_watch_location_expression): Declare.
10060 * c-lang.c (c_watch_location_expression): New function.
10061 (c_language_defn, cplus_language_defn, asm_language_defn)
10062 (minimal_language_defn): Use it.
10063 * breakpoint.c (watch_command_1): Call
10064 la_watch_location_expression.
10065 * ada-lang.c (ada_language_defn): Update.
10066
7a6e7fcc
RO
100672017-05-19 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
10068
6e7e1744
RO
10069 PR tui/21482
10070 * gdb_curses.h (NOMACROS): Define.
10071 (NCURSES_NOMACROS): Define.
10072
100732017-05-19 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
10074
10075 PR tui/21482
7a6e7fcc
RO
10076 * tui/tui-windata.c (tui_erase_data_content): Cast last mvwaddstr
10077 arg to char *.
10078 * tui/tui-wingeneral.c (box_win): Likewise.
10079 * tui/tui-winsource.c (tui_erase_source_content): Likewise.
10080 (tui_show_source_line): Likewise.
10081 (tui_show_exec_info_content): Likewise.
10082
1933fd8e
VM
100832017-05-19 Vladimir Mezentsev <vladimir.mezentsev@oracle.com>
10084
10085 * sparc-tdep.c (sparc_structure_return_p)
10086 (sparc_arg_on_registers_p): New functions.
10087 (sparc32_store_arguments): Use them.
10088 * sparc64-tdep.c (sparc64_16_byte_align_p)
10089 (sparc64_store_floating_fields, sparc64_extract_floating_fields):
10090 Handle TYPE_CODE_ARRAY.
10091
21873064
YQ
100922017-05-17 Yao Qi <yao.qi@linaro.org>
10093
10094 * cli/cli-decode.c (add_alias_cmd): New function.
10095 * command.h (add_alias_cmd): Declare.
10096 * infcmd.c (_initialize_infcmd): Don't call add_com_alias,
10097 instead call add_alias_cmd.
10098
2b351b19
PA
100992017-05-17 Pedro Alves <palves@redhat.com>
10100
10101 * Makefile.in (nat_extra_makefile_frag): Rename to ...
10102 (nat_makefile_frag): ... this. All references updated.
10103 * configure.ac: Likewise.
10104 * configure.nat: Likewise. Enhance comments.
10105 * configure: Regenerate.
10106
5f2ad7a3
RO
101072017-05-15 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
10108
10109 * procfs.c (procfs_create_inferior): Change prototype to match
10110 definition.
10111
adf3dde5
EZ
101122017-05-13 Eli Zaretskii <eliz@gnu.org>
10113
10114 * tui/tui.c (tui_enable): Cast "unknown" to 'char *' to avoid a
10115 C++ compiler warning.
10116
6830f270
TT
101172017-05-12 Tom Tromey <tom@tromey.com>
10118
10119 PR rust/21483:
10120 * rust-lang.c (rust_evaluate_subexp) <STRUCTOP_STRUCT>: Don't
10121 recurse, just call value_struct_elt directly.
10122
68f2f2e3
TT
101232017-05-12 Tom Tromey <tom@tromey.com>
10124
10125 * rust-lang.c (rust_dump_subexp_body) <STRUCTOP_ANONYMOUS,
10126 OP_RUST_ARRAY>: Fix.
10127
256afbc2
TT
101282017-05-12 Tom Tromey <tom@tromey.com>
10129
10130 * rust-lang.c (rust_print_subexp): Replace "return" with "break".
10131
94bb8dfe
YQ
101322017-05-09 Yao Qi <yao.qi@linaro.org>
10133
10134 * regcache.c: Include <forward_list>.
10135 (struct regcache_list): Remove.
10136 (current_regcache): Update.
10137 (get_thread_arch_aspace_regcache): Update for std::forward_list.
10138 (regcache_thread_ptid_changed): Likewise.
10139 (registers_changed_ptid): Likewise.
10140 (current_regcache_size): Likewise.
10141
8248946c
YQ
101422017-05-09 Yao Qi <yao.qi@linaro.org>
10143
10144 * regcache.c [GDB_SELF_TEST]: Include selftest.h.
10145 (current_regcache_size): New function.
10146 (current_regcache_test): New function.
10147 (_initialize_regcache) [GDB_SELF_TEST]: Register the unit test.
10148
313c5961
AH
101492017-05-08 Alan Hayward <alan.hayward@arm.com>
10150
10151 * mips-tdep.c (mips_o32_return_value): Remove unused buffer.
10152 (print_gp_register_row): Use get_frame_register_value.
10153
27bfc1d1
AH
101542017-05-08 Alan Hayward <alan.hayward@arm.com>
10155
10156 * mips-linux-tdep.c (mips_supply_gregset): Use raw_supply_zeroed.
10157 (mips_supply_fpregset): Likewise.
10158 (mips64_supply_gregset): Likewise.
10159
146e6c5c
AH
101602017-05-08 Alan Hayward <alan.hayward@arm.com>
10161
10162 * mn10300-linux-tdep.c (am33_supply_gregset_method): Use
10163 regcache->raw_supply_zeroed.
10164
e50f25ec
SDJ
101652017-05-06 Sergio Durigan Junior <sergiodj@redhat.com>
10166
10167 * configure.nat: Rearrange 'case' statements to match
10168 host before cpu.
10169
21ea5acd
SDJ
101702017-05-06 Sergio Durigan Junior <sergiodj@redhat.com>
10171
10172 * Makefile.in: Remove "@host_makefile_frag@". Add variables
10173 NAT_FILE, NATDEPFILES, NAT_CDEPS, LOADLIBES, MH_CFLAGS, XM_CLIBS,
10174 NAT_GENERATED_FILES, HAVE_NATIVE_GCORE_HOST. Add
10175 "@nat_extra_makefile_frag@".
10176 (Makefile): Remove dependency on "@frags@".
10177 ($(GNULIB_BUILDDIR)/Makefile): Likewise.
10178 (data-directory/Makefile): Likewise.
10179 * config/aarch64/linux.mh: Deleted; moved contents to
10180 "gdb/configure.nat".
10181 * config/alpha/alpha-linux.mh: Likewise.
10182 * config/alpha/nbsd.mh: Likewise.
10183 * config/arm/linux.mh: Likewise.
10184 * config/arm/nbsdelf.mh: Likewise.
10185 * config/i386/cygwin.mh: Likewise.
10186 * config/i386/cygwin64.mh: Likewise.
10187 * config/i386/darwin.mh: Likewise.
10188 * config/i386/fbsd.mh: Likewise.
10189 * config/i386/fbsd64.mh: Likewise.
10190 * config/i386/go32.mh: Likewise.
10191 * config/i386/i386gnu.mh: Likewise.
10192 * config/i386/i386sol2.mh: Likewise.
10193 * config/i386/linux.mh: Likewise.
10194 * config/i386/linux64.mh: Likewise.
10195 * config/i386/mingw.mh: Likewise.
10196 * config/i386/mingw64.mh: Likewise.
10197 * config/i386/nbsd64.mh: Likewise.
10198 * config/i386/nbsdelf.mh: Likewise.
10199 * config/i386/nto.mh: Likewise.
10200 * config/i386/obsd.mh: Likewise.
10201 * config/i386/obsd64.mh: Likewise.
10202 * config/i386/sol2-64.mh: Likewise.
10203 * config/ia64/linux.mh: Likewise.
10204 * config/m32r/linux.mh: Likewise.
10205 * config/m68k/linux.mh: Likewise.
10206 * config/m68k/nbsdelf.mh: Likewise.
10207 * config/m68k/obsd.mh: Likewise.
10208 * config/m88k/obsd.mh: Likewise.
10209 * config/mips/fbsd.mh: Likewise.
10210 * config/mips/linux.mh: Likewise.
10211 * config/mips/nbsd.mh: Likewise.
10212 * config/mips/obsd64.mh: Likewise.
10213 * config/pa/linux.mh: Likewise.
10214 * config/pa/nbsd.mh: Likewise.
10215 * config/pa/obsd.mh: Likewise.
10216 * config/powerpc/aix.mh: Likewise.
10217 * config/powerpc/fbsd.mh: Likewise.
10218 * config/powerpc/linux.mh: Likewise.
10219 * config/powerpc/nbsd.mh: Likewise.
10220 * config/powerpc/obsd.mh: Likewise.
10221 * config/powerpc/ppc64-linux.mh: Likewise.
10222 * config/powerpc/spu-linux.mh: Likewise.
10223 * config/s390/linux.mh: Likewise.
10224 * config/sh/nbsd.mh: Likewise.
10225 * config/sparc/fbsd.mh: Likewise.
10226 * config/sparc/linux.mh: Likewise.
10227 * config/sparc/linux64.mh: Likewise.
10228 * config/sparc/nbsd64.mh: Likewise.
10229 * config/sparc/nbsdelf.mh: Likewise.
10230 * config/sparc/obsd64.mh: Likewise.
10231 * config/sparc/sol2.mh: Likewise.
10232 * config/tilegx/linux.mh: Likewise.
10233 * config/vax/nbsdelf.mh: Likewise.
10234 * config/vax/obsd.mh: Likewise.
10235 * config/xtensa/linux.mh: Likewise.
10236 * config/i386/i386gnu.mn: New file, with excerpts from
10237 "config/i386/i386gnu.mh".
10238 * configure: Regenerate.
10239 * configure.ac: Rewrite code to use "gdb/configure.nat" instead of
10240 *.mh files under "gdb/config".
10241 * configure.nat: New file, with contents from the
10242 "gdb/config/*/*.mh" files.
10243
7ed1acaf
TW
102442017-05-05 Tim Wiederhake <tim.wiederhake@intel.com>
10245
10246 * btrace.c (btrace_clear): Free insn vector.
10247
e13cb306
PA
102482017-05-05 Pedro Alves <palves@redhat.com>
10249
10250 * warning.m4 (build_warnings): Add -Wno-error=maybe-uninitialized.
10251 * configure: Regenerate.
10252
5ed8105e
PA
102532017-05-04 Pedro Alves <palves@redhat.com>
10254
10255 * Makefile.in (SFILES): Add progspace-and-thread.c.
10256 (HFILES_NO_SRCDIR): Add progspace-and-thread.h.
10257 (COMMON_OBS): Add progspace-and-thread.o.
10258 * breakpoint.c: Include "progspace-and-thread.h".
10259 (update_inserted_breakpoint_locations)
10260 (insert_breakpoint_locations, create_longjmp_master_breakpoint):
10261 Use scoped_restore_current_pspace_and_thread.
10262 (create_std_terminate_master_breakpoint): Use
10263 scoped_restore_current_program_space.
10264 (remove_breakpoint): Use scoped_restore_current_pspace_and_thread.
10265 (print_breakpoint_location): Use
10266 scoped_restore_current_program_space.
10267 (bp_loc_is_permanent): Use
10268 scoped_restore_current_pspace_and_thread.
10269 (resolve_sal_pc): Use scoped_restore_current_pspace_and_thread.
10270 (download_tracepoint_locations): Use
10271 scoped_restore_current_pspace_and_thread.
10272 (breakpoint_re_set): Use scoped_restore_current_pspace_and_thread.
10273 * exec.c (exec_close_1): Use scoped_restore_current_program_space.
10274 (enum step_over_calls_kind): Moved from inferior.h.
10275 (class scoped_restore_current_thread): New class.
10276 * gdbthread.h (make_cleanup_restore_current_thread): Delete
10277 declaration.
10278 (scoped_restore_current_thread): New class.
10279 * infcmd.c: Include "common/gdb_optional.h".
10280 (continue_1, proceed_after_attach): Use
10281 scoped_restore_current_thread.
10282 (notice_new_inferior): Use scoped_restore_current_thread.
10283 * inferior.c: Include "progspace-and-thread.h".
10284 (restore_inferior, save_current_inferior): Delete.
10285 (add_inferior_command, clone_inferior_command): Use
10286 scoped_restore_current_pspace_and_thread.
10287 * inferior.h (scoped_restore_current_inferior): New class.
10288 * infrun.c: Include "progspace-and-thread.h" and
10289 "common/gdb_optional.h".
10290 (follow_fork_inferior): Use
10291 scoped_restore_current_pspace_and_thread.
10292 (scoped_restore_exited_inferior): New class.
10293 (handle_vfork_child_exec_or_exit): Use
10294 scoped_restore_exited_inferior,
10295 scoped_restore_current_pspace_and_thread,
10296 scoped_restore_current_thread and scoped_restore.
10297 (fetch_inferior_event): Use scoped_restore_current_thread.
10298 * linespec.c (decode_line_full, decode_line_1): Use
10299 scoped_restore_current_program_space.
10300 * mi/mi-main.c: Include "progspace-and-thread.h".
10301 (exec_continue): Use scoped_restore_current_thread.
10302 (mi_cmd_exec_run): Use scoped_restore_current_pspace_and_thread.
10303 (mi_cmd_trace_frame_collected): Use scoped_restore_current_thread.
10304 * proc-service.c (ps_pglobal_lookup): Use
10305 scoped_restore_current_program_space.
10306 * progspace-and-thread.c: New file.
10307 * progspace-and-thread.h: New file.
10308 * progspace.c (release_program_space, clone_program_space): Use
10309 scoped_restore_current_program_space.
10310 (restore_program_space, save_current_program_space)
10311 (save_current_space_and_thread): Delete.
10312 (switch_to_program_space_and_thread): Moved to
10313 progspace-and-thread.c.
10314 * progspace.h (save_current_program_space)
10315 (save_current_space_and_thread): Delete declarations.
10316 (scoped_restore_current_program_space): New class.
10317 * remote.c (remote_btrace_maybe_reopen): Use
10318 scoped_restore_current_thread.
10319 * symtab.c: Include "progspace-and-thread.h".
10320 (skip_prologue_sal): Use scoped_restore_current_pspace_and_thread.
10321 * thread.c (print_thread_info_1): Use
10322 scoped_restore_current_thread.
10323 (struct current_thread_cleanup): Delete.
10324 (do_restore_current_thread_cleanup)
10325 (restore_current_thread_cleanup_dtor): Rename/convert both to ...
10326 (scoped_restore_current_thread::~scoped_restore_current_thread):
10327 ... this new dtor.
10328 (make_cleanup_restore_current_thread): Rename/convert to ...
10329 (scoped_restore_current_thread::scoped_restore_current_thread):
10330 ... this new ctor.
10331 (thread_apply_all_command): Use scoped_restore_current_thread.
10332 (thread_apply_command): Use scoped_restore_current_thread.
10333 * tracepoint.c (tdump_command): Use scoped_restore_current_thread.
10334 * varobj.c (value_of_root_1): Use scoped_restore_current_thread.
10335
f6223dbb
PA
103362017-05-04 Pedro Alves <palves@redhat.com>
10337
10338 * thread.c (make_cleanup_restore_current_thread): Move
10339 find_thread_ptid call before the is_stopped call. Assert that the
10340 thread is found. Replace is_stopped call by checking the thread's
10341 state directly. Remove unnecessary NULL-thread check.
10342
3c3ae77e
PA
103432017-05-04 Pedro Alves <palves@redhat.com>
10344
10345 * corelow.c (thread_section_name): New class.
10346 (get_core_register_section, get_core_siginfo): Use it.
10347
45eba0ab
AA
103482017-05-04 Andreas Arnez <arnez@linux.vnet.ibm.com>
10349
10350 * corelow.c (sniff_core_bfd): Remove extra semicolon.
10351 (get_core_register_section): Remove xfree of NULL pointer.
10352
f81fdd35
AH
103532017-05-03 Alan Hayward <alan.hayward@arm.com>
10354
10355 * frv-linux-tdep.c (frv_linux_supply_gregset): Use raw_supply_zeroed.
10356 * regcache.c (regcache::raw_supply_zeroed): New function.
10357 * regcache.h (regcache::raw_supply_zeroed): New declaration.
10358
35837774
SM
103592017-05-03 Simon Marchi <simon.marchi@ericsson.com>
10360
10361 * gdbarch.sh: Remove commented out definition of
10362 TARGET_CHAR_BIT.
10363 * gdbarch.h: Re-generate.
10364
c94fee56
SDJ
103652017-05-03 Sergio Durigan Junior <sergiodj@redhat.com>
10366
10367 * configure: Regenerate.
10368
d17f7b36
SM
103692017-05-02 Simon Marchi <simon.marchi@ericsson.com>
10370
10371 * solib-target.c (solib_target_relocate_section_addresses):
10372 Remove num_section_bases, num_bases, segment_bases variables.
10373
b560ebd6
SM
103742017-05-02 Simon Marchi <simon.marchi@polymtl.ca>
10375
10376 * common/gdb_vecs.h (DEF_VEC_I (CORE_ADDR)): Remove.
10377
f2f46dfc
SM
103782017-05-02 Simon Marchi <simon.marchi@polymtl.ca>
10379
10380 * solib-target.c: Include <vector>
10381 (struct lm_info_target) <~lm_info_target>: Remove.
10382 <segment_bases, section_bases>: Change type to
10383 std::vector<CORE_ADDR>.
10384 (library_list_start_segment, library_list_start_section,
10385 library_list_end_library,
10386 solib_target_relocate_section_addresses): Adjust.
10387
a0ff9e1a
SM
103882017-05-02 Simon Marchi <simon.marchi@polymtl.ca>
10389
10390 * gdbarch.sh (software_single_step): Change return type to
10391 std::vector<CORE_ADDR>.
10392 * gdbarch.c, gdbarch.h: Re-generate.
10393 * arch/arm-get-next-pcs.c (thumb_deal_with_atomic_sequence_raw):
10394 Adjust.
10395 (arm_deal_with_atomic_sequence_raw): Adjust.
10396 (thumb_get_next_pcs_raw): Adjust.
10397 (arm_get_next_pcs_raw): Adjust.
10398 (arm_get_next_pcs): Adjust.
10399 * arch/arm-get-next-pcs.h (arm_get_next_pcs): Adjust.
10400 * aarch64-tdep.c (aarch64_software_single_step): Adjust.
10401 * alpha-tdep.c (alpha_deal_with_atomic_sequence): Adjust.
10402 (alpha_software_single_step): Adjust.
10403 * alpha-tdep.h (alpha_software_single_step): Adjust.
10404 * arm-linux-tdep.c (arm_linux_software_single_step): Adjust.
10405 * arm-tdep.c (arm_software_single_step): Adjust.
10406 (arm_breakpoint_kind_from_current_state): Adjust.
10407 * arm-tdep.h (arm_software_single_step): Adjust.
10408 * breakpoint.c (insert_single_step_breakpoint): Adjust.
10409 * cris-tdep.c (cris_software_single_step): Adjust.
10410 * mips-tdep.c (mips_deal_with_atomic_sequence): Adjust.
10411 (micromips_deal_with_atomic_sequence): Adjust.
10412 (deal_with_atomic_sequence): Adjust.
10413 (mips_software_single_step): Adjust.
10414 * mips-tdep.h (mips_software_single_step): Adjust.
10415 * moxie-tdep.c (moxie_software_single_step): Adjust.
10416 * nios2-tdep.c (nios2_software_single_step): Adjust.
10417 * ppc-tdep.h (ppc_deal_with_atomic_sequence): Adjust.
10418 * rs6000-aix-tdep.c (rs6000_software_single_step): Adjust.
10419 * rs6000-tdep.c (ppc_deal_with_atomic_sequence): Adjust.
10420 * s390-linux-tdep.c (s390_software_single_step): Adjust.
10421 * sparc-tdep.c (sparc_software_single_step): Adjust.
10422 * spu-tdep.c (spu_software_single_step): Adjust.
10423 * tic6x-tdep.c (tic6x_software_single_step): Adjust.
10424
ea480a30
SM
104252017-05-02 Simon Marchi <simon.marchi@polymtl.ca>
10426
10427 * gdbarch.sh: Use semi-colon as field separator instead of colon.
10428 * gdbarch.h: Re-generate.
10429
d050f7d7
TW
104302017-05-01 Tim Wiederhake <tim.wiederhake@intel.com>
10431
10432 * Makefile.in (SUBDIR_PYTHON_OBS): Add py-instruction.o.
10433 (SUBDIR_PYTHON_SRCS): Add py-instruction.c.
10434 * python/py-instruction.c, python/py-instruction.h: New file.
10435 * python/py-record.c: Add py-instruction.h include.
10436 (gdbpy_initialize_record): Make gdb.Instruction a super class of
10437 gdb.RecordInstruction.
10438 * python/python-internal.h: Add gdbpy_initialize_instruction
10439 declaration.
10440 * python/python.c (do_start_initialization): Add
10441 gdbpy_initialize_instruction.
10442
14f819c8
TW
104432017-05-01 Tim Wiederhake <tim.wiederhake@intel.com>
10444
10445 * python/py-record-btrace.c (BTPY_REQUIRE_VALID_CALL, btpy_call_type):
10446 Remove.
10447 (btrace_func_from_recpy_func): New function.
10448 (btpy_call_new, btpy_number, btpy_hash, btpy_richcompare): Remove.
10449 (btpy_call_level, btpy_call_symbol, btpy_call_instructions,
10450 btpy_call_up, btpy_call_prev_sibling, btpy_call_next_sibling): Rename to ...
10451 (recpy_bt_func_level, recpy_bt_func_symbol, recpy_bt_func_instructions,
10452 recpy_bt_func_up, recpy_bt_func_prev, recpy_bt_func_next): This.
10453 Also, use new helper functions.
10454 (btpy_list_item): Use new helper functions.
10455 (recpy_bt_function_call_history): Use new type name.
10456 (btpy_call_getset): Remove.
10457 (gdbpy_initialize_btrace): Remove code to initialize
10458 gdb.BtraceFunctionCall.
10459 * python/py-record-btrace.h (recpy_bt_func_number, recpy_btb_func_level,
10460 recpy_btb_func_symbol, recpy_bt_func_instructions, recpy_bt_func_up,
10461 recpy_bt_func_prev, recpy_bt_func_next): New export.
10462 * python/py-record.c (recpy_func_type): New static object.
10463 (recpy_func_new, recpy_func_level, recpy_func_symbol,
10464 recpy_func_instructions, recpy_func_up, recpy_func_prev,
10465 recpy_func_next): New function.
10466 (recpy_element_hash, recpy_element_richcompare): Updated comment.
10467 (recpy_func_getset): New static object.
10468 (gdbpy_initialize_record): Add code to initialize gdb.RecordInstruction.
10469 * python/py-record.h (recpy_func_type, recpy_func_new): New export.
10470
0ed5da75
TW
104712017-05-01 Tim Wiederhake <tim.wiederhake@intel.com>
10472
10473 * python/py-record-btrace.c (BTPY_REQUIRE_VALID_INSN): Remove.
10474 (btpy_object, btpy_insn_type, btpy_new): Remove.
10475 (btpy_list_object): Use gdb.RecordInstruction type instead of
10476 gdb.BtraceInstruction type.
10477 (btrace_insn_from_recpy_insn): New function.
10478 (btpy_insn_or_gap_new): Adjust comment. Use recpy_insn_new instead of
10479 btpy_new.
10480 (btpy_call_new, btpy_list_item): Do not use btpy_new anymore.
10481 (btpy_number, btpy_hash, btpy_call_level, btpy_call_symbol,
10482 btpy_call_instructions, btpy_call_up, btpy_call_prev_sibling,
10483 btpy_call_next_sibling, btpy_richcompare): Use recpy_element_object
10484 instead of btpy_object.
10485 (btpy_insn_sal, btpy_insn_pc, btpy_insn_size, btpy_insn_is_speculative,
10486 btpy_insn_data, btpy_insn_decode): Rename to ...
10487 (recpy_bt_insn_sal, recpy_bt_insn_pc, recpy_bt_insn_size,
10488 recpy_bt_insn_is_speculative, recpy_bt_insn_data,
10489 recpy_bt_insn_decode): This. Also, use new helper functions.
10490 (btpy_list_position, recpy_bt_goto): Use recpy_element_object and
10491 recpy_insn_type.
10492 (btpy_insn_getset): Remove.
10493 (gdbpy_initialize_btrace): Remove code to initialize
10494 gdb.BtraceInstruction. Use recpy_element_object.
10495 * python/py-record-btrace.h (recpy_bt_insn_number, recpy_bt_insn_sal,
10496 recpy_bt_insn_pc, recpy_bt_insn_data, recpy_bt_insn_decoded,
10497 recpy_bt_insn_size, recpy_bt_insn_is_speculative): New export.
10498 * python/py-record.c (recpy_insn_type): New static object.
10499 (recpy_insn_new, recpy_insn_sal, recpy_insn_pc, recpy_insn_data,
10500 recpy_insn_decoded, recpy_insn_size, recpy_insn_is_speculative,
10501 recpy_element_number, recpy_element_hash, recpy_element_richcompare):
10502 New function.
10503 (recpy_insn_getset): New static object.
10504 (gdbpy_initialize_record): Initialize gdb.RecordInstruction.
10505 * python/py-record.h (recpy_element_object): New typedef.
10506 (recpy_insn_type, recpy_insn_new): New export.
10507
913aeadd
TW
105082017-05-01 Tim Wiederhake <tim.wiederhake@intel.com>
10509
10510 * py-record-btrace.c (btpy_insn_new): Removed.
10511 (btpy_insn_or_gap_new): New function.
10512 (btpy_insn_error): Removed.
10513 (btpy_insn_sal, btpy_insn_pc, btpy_insn_size, btpy_insn_is_speculative,
10514 btpy_insn_data, btpy_insn_decode): Remove code path for gaps.
10515 (recpy_bt_replay_position, recpy_bt_begin, recpy_bt_end): Call
10516 btpy_insn_or_gap_new instead of btpy_insn_new.
10517 (btpy_insn_getset): Remove btpy_insn_error.
10518 * py-record.c (recpy_gap_type): New static object.
10519 (recpy_gap_object): New typedef.
10520 (recpy_gap_new, recpy_gap_number, recpy_gap_reason_code,
10521 recpy_gap_reason_string): New function.
10522 (recpy_gap_getset): New static object.
10523 (gdbpy_initialize_record): Initialize gdb.RecordGap type.
10524 * py-record.h (recpy_gap_new): New export.
10525
a3be24ad
TW
105262017-05-01 Tim Wiederhake <tim.wiederhake@intel.com>
10527
10528 * python/py-record.c (recpy_ptid): Remove.
10529 (recpy_record_getset): Remove recpy_ptid.
10530
ae20e79a
TW
105312017-05-01 Tim Wiederhake <tim.wiederhake@intel.com>
10532
10533 * btrace.c (btrace_fetch): Set inferior_ptid.
10534 * python/py-record-btrace.c: Add "py-record.h" include.
10535 (recpy_bt_format, recpy_bt_replay_position, recpy_bt_begin,
10536 recpy_bt_end, recpy_bt_instruction_history,
10537 recpy_bt_function_call_history, recpy_bt_goto): Use ptid stored
10538 in gdb.Record object instead of current ptid.
10539 * python/py-record.c: Include new "py-record.h" file.
10540 (recpy_record_object): Moved to py-record.h.
10541 * python/py-record.h: New file.
10542
8d0050ea
TW
105432017-05-01 Tim Wiederhake <tim.wiederhake@intel.com>
10544
10545 * python/py-record-btrace.c (BTPY_REQUIRE_VALID_INSN,
10546 BTPY_REQUIRE_VALID_CALL, recpy_bt_function_call_history): Fix
10547 indentation.
10548
3f380b50
JB
105492017-05-01 Joel Brobecker <brobecker@adacore.com>
10550
10551 * MAINTAINERS: Move Daniel Jacobowitz and Mark Kettenis to
10552 the past maintainers section.
10553
07495424
YQ
105542017-04-28 Yao Qi <yao.qi@linaro.org>
10555
10556 * infcmd.c (get_return_value): Use regcache ctor, and remove
10557 cleanup.
10558
deb1fa3e
YQ
105592017-04-28 Yao Qi <yao.qi@linaro.org>
10560 Pedro Alves <palves@redhat.com>
10561
10562 * regcache.c (regcache::regcache): New tag dispatch ctor.
10563 (do_cooked_read): Moved above.
10564 (regcache_dup): Use the tag dispatch ctor..
10565 * regcache.h (regcache): Declare ctor, delete copy ctor and
10566 assignment operator, remove friend regcache_dup.
10567
b421c83c
YQ
105682017-04-28 Yao Qi <yao.qi@linaro.org>
10569
10570 * regcache.c (regcache_dup): Assert !src->m_readonly_p and
10571 call method save instead of regcache_cpy.
10572 * regcache.h (struct regcache): Make regcache_dup a friend.
10573
ef79d9a3
YQ
105742017-04-28 Yao Qi <yao.qi@linaro.org>
10575
10576 * regcache.c (struct regcache): Move to regcache.h
10577 (regcache::arch): New method.
10578 (regcache_get_ptid): Update.
10579 (get_regcache_arch): Call arch method.
10580 (get_regcache_aspace): Call method aspace.
10581 (register_buffer): Change it to method.
10582 (regcache_save): Change it to regcache::save.
10583 (regcache_restore): Likewise.
10584 (regcache_cpy_no_passthrough): Remove the declaration.
10585 (regcache_cpy): Call methods restore and cpy_no_passthrough.
10586 (regcache_cpy_no_passthrough): Change it to method
10587 cpy_no_passthrough.
10588 (regcache_register_status): Change it to method
10589 get_register_status.
10590 (regcache_invalidate): Change it to method invalidate.
10591 (regcache_thread_ptid_changed): Use methods ptid and set_ptid.
10592 (regcache_raw_update): Change it to method raw_update.
10593 (regcache_raw_read): Likewise.
10594 (regcache_raw_read_signed): Likewise.
10595 (regcache_raw_read_unsigned): Likewise.
10596 (regcache_raw_write_signed): Likewise.
10597 (regcache_raw_write_unsigned): Likewise.
10598 (regcache_cooked_read): Likewise.
10599 (regcache_cooked_read_value): Likewise.
10600 (regcache_cooked_read_signed): Likewise.
10601 (regcache_cooked_read_unsigned): Likewise.
10602 (regcache_cooked_write_signed): Likewise.
10603 (regcache_cooked_write_unsigned): Likewise.
10604 (regcache_raw_set_cached_value): Likewise.
10605 (regcache_raw_write): Likewise.
10606 (regcache_cooked_write): Likewise.
10607 (regcache_xfer_part): Likewise.
10608 (regcache_raw_read_part): Likewise.
10609 (regcache_raw_write_part): Likewise.
10610 (regcache_cooked_read_part): Likewise.
10611 (regcache_cooked_write_part): Likewise.
10612 (regcache_raw_supply): Likewise.
10613 (regcache_raw_collect): Likewise.
10614 (regcache_transfer_regset): Likewise.
10615 (regcache_supply_regset): Likewise.
10616 (regcache_collect_regset): Likewise.
10617 (regcache_debug_print_register): Likewise.
10618 (enum regcache_dump_what): Move it to regcache.h.
10619 (regcache_dump): Change it to method dump.
10620 * regcache.h (enum regcache_dump_what): New.
10621 (class regcache): New.
10622 * target.c (target_fetch_registers): Call method
10623 debug_print_register.
10624 (target_store_registers): Likewise.
10625
f8fdb78e
SM
106262017-04-28 Simon Marchi <simon.marchi@ericsson.com>
10627
10628 * windows-nat.c (struct lm_info_windows): Initialize field.
10629 (windows_make_so): Allocate lm_info_windows with new.
10630 (windows_free_so): Free lm_info_windows with delete.
10631
9ccbfd7b
SM
106322017-04-28 Simon Marchi <simon.marchi@ericsson.com>
10633
10634 * solib-darwin.c (struct lm_info_darwin): Initialize field.
10635 (darwin_current_sos): Allocate lm_info_darwin with new, remove
10636 cleanup.
10637 (darwin_free_so): Free lm_info_darwin with delete.
10638
76e75227
SM
106392017-04-28 Simon Marchi <simon.marchi@ericsson.com>
10640
10641 * solib-svr4.h (struct lm_info_svr4): Initialize fields.
10642 <l_addr_p>: Change type to bool.
10643 * solib-svr4.c (lm_info_read): Allocate lm_info_svr4 with new.
10644 (svr4_free_so): Free lm_info_svr4 with delete.
10645 (svr4_copy_library_list): Replace memcpy with call to copy
10646 constructor.
10647 (library_list_start_library, svr4_default_sos): Allocate
10648 lm_info_svr4 with new.
10649
51046d9e
SM
106502017-04-28 Simon Marchi <simon.marchi@ericsson.com>
10651
10652 * solib-target.c (struct lm_info_target): Add destructor,
10653 initialize fields.
10654 <name>: Change type to std::string.
10655 (library_list_start_library): Allocate lm_info_target with new.
10656 (solib_target_free_library_list): Free lm_info_target with
10657 delete.
10658 (solib_target_current_sos): Adapt to std::string.
10659 (solib_target_free_so): Free lm_info_target with delete.
10660
4023ae76
SM
106612017-04-28 Simon Marchi <simon.marchi@ericsson.com>
10662
10663 * solib-frv.c (struct lm_info_frv): Add destructor, initialize
10664 fields.
10665 (frv_current_sos): Allocate lm_info_frv with new.
10666 (frv_relocate_main_executable): Free lm_info_frv with delete,
10667 allocate with new.
10668 (frv_clear_solib, frv_free_so): Free lm_info_frv with delete.
10669
af43057b
SM
106702017-04-28 Simon Marchi <simon.marchi@ericsson.com>
10671
10672 * solib-frv.c (struct lm_info_frv): Fix indentation.
10673
b0911207
SM
106742017-04-28 Simon Marchi <simon.marchi@ericsson.com>
10675
10676 * solib-dsbt.c (struct lm_info_dsbt): Add destructor, initialize
10677 map field.
10678 (dsbt_current_sos): Allocate lm_info_dsbt with new.
10679 (dsbt_relocate_main_executable): Free lm_info_dsbt with delete
10680 and allocate with new.
10681 (dsbt_clear_solib, dsbt_free_so): Free lm_info_dsbt with delete.
10682
6c401f72
SM
106832017-04-28 Simon Marchi <simon.marchi@ericsson.com>
10684
10685 * solib-aix.c (struct lm_info_aix): Initialize fields in-class.
10686 <filename, member_name>: Change type to std::string.
10687 (solib_aix_new_lm_info, solib_aix_xfree_lm_info): Remove.
10688 (library_list_start_library): Allocate lm_info_aix with new.
10689 (solib_aix_free_library_list, solib_aix_free_so): Free with delete.
10690 (solib_aix_current_sos): Adapt to std::string, copy lm_info_aix
10691 with copy constructor.
10692
d0e449a1
SM
106932017-04-28 Simon Marchi <simon.marchi@ericsson.com>
10694
10695 * solist.h (struct lm_info): Remove.
10696 (struct lm_info_base): New class.
10697 (struct so_list) <lm_info>: Change type to lm_info_base *.
10698 * nto-tdep.c (struct lm_info): Remove.
10699 (lm_addr): Adjust.
10700 * solib-aix.c (struct lm_info): Rename to ...
10701 (struct lm_info_aix): ... this. Extend lm_info_base.
10702 (lm_info_p): Rename to ...
10703 (lm_info_aix_p): ... this, and adjust.
10704 (solib_aix_new_lm_info, solib_aix_xfree_lm_info,
10705 solib_aix_parse_libraries, library_list_start_library,
10706 solib_aix_free_library_list, solib_aix_parse_libraries,
10707 solib_aix_get_library_list,
10708 solib_aix_relocate_section_addresses, solib_aix_free_so,
10709 solib_aix_get_section_offsets,
10710 solib_aix_solib_create_inferior_hook, solib_aix_current_sos):
10711 Adjust.
10712 (struct solib_aix_inferior_data) <library_list>: Adjust.
10713 * solib-darwin.c (struct lm_info): Rename to ...
10714 (struct lm_info_darwin): ... this. Extend lm_info_base.
10715 (darwin_current_sos, darwin_relocate_section_addresses): Adjust.
10716 * solib-dsbt.c (struct lm_info): Rename to ...
10717 (struct lm_info_dsbt): ... this. Extend lm_info_base.
10718 (struct dsbt_info) <main_executable_lm_info): Adjust.
10719 (dsbt_current_sos, dsbt_relocate_main_executable, dsbt_free_so,
10720 dsbt_relocate_section_addresses): Adjust.
10721 * solib-frv.c (struct lm_info): Rename to ...
10722 (struct lm_info_frv): ... this. Extend lm_info_base.
10723 (main_executable_lm_info): Adjust.
10724 (frv_current_sos, frv_relocate_main_executable, frv_free_so,
10725 frv_relocate_section_addresses, frv_fdpic_find_global_pointer,
10726 find_canonical_descriptor_in_load_object,
10727 frv_fdpic_find_canonical_descriptor): Adjust.
10728 * solib-svr4.c (struct lm_info): Move to solib-svr4.h, renamed
10729 to lm_info_svr4.
10730 (lm_info_read, lm_addr_check, svr4_keep_data_in_core,
10731 svr4_clear_so, svr4_copy_library_list,
10732 library_list_start_library, svr4_default_sos, svr4_read_so_list,
10733 svr4_current_sos, svr4_fetch_objfile_link_map,
10734 solist_update_incremental): Adjust.
10735 * solib-svr4.h (struct lm_info_svr4): Move here from
10736 solib-svr4.c.
10737 * solib-target.c (struct lm_info): Rename to ...
10738 (struct lm_info_target): ... this. Extend lm_info_base.
10739 (lm_info_p): Rename to ...
10740 (lm_info_target_p): ... this.
10741 (solib_target_parse_libraries, library_list_start_segment,
10742 library_list_start_section, library_list_start_library,
10743 library_list_end_library, solib_target_free_library_list,
10744 solib_target_current_sos, solib_target_free_so,
10745 solib_target_relocate_section_addresses): Adjust.
10746 * windows-nat.c (struct lm_info): Rename to ...
10747 (struct lm_info_windows): ... this. Extend lm_info_base.
10748 (windows_make_so, handle_load_dll, handle_unload_dll,
10749 windows_xfer_shared_libraries): Adjust.
10750
434a4023
SM
107512017-04-28 Simon Marchi <simon.marchi@ericsson.com>
10752
10753 * solib-darwin.c (struct darwin_so_list): Remove.
10754 (darwin_current_sos): Allocate an so_list object instead of a
10755 darwin_so_list, separately allocate an lm_info object.
10756 (darwin_free_so): Free lm_info.
10757
428544e8
JB
107582017-04-28 John Baldwin <jhb@FreeBSD.org>
10759
10760 * mips-tdep.c (print_gp_register_row): Replace printf_filtered
10761 with fprintf_filtered.
10762
4621115f
YQ
107632017-04-28 Yao Qi <yao.qi@linaro.org>
10764
10765 * regcache.c (regcache::regcache): New function.
10766 (regcache::~regcache): New function.
10767 (regcache_xmalloc_1): Remove.
10768 (regcache_xmalloc): Call new regcache.
10769 (regcache_xfree): Call delete regcache.
10770 (get_thread_arch_aspace_regcache): Call new regcache.
10771
339053c2
YQ
107722017-04-28 Yao Qi <yao.qi@linaro.org>
10773
10774 * mips-linux-nat.c (mips_linux_new_thread): Use ptid method
10775 lwp instead of ptid_get_lwp.
10776
7974a605
YQ
107772017-04-28 Yao Qi <yao.qi@linaro.org>
10778
10779 * mips-linux-nat.c (mips_linux_new_thread): Get lwpid from
10780 lwp_info instead of getting from inferior_ptid.
10781
e15c3eb4
KS
107822017-04-27 Keith Seitz <keiths@redhat.com>
10783
10784 * gdbtypes.c (LVALUE_REFERENCE_TO_RVALUE_BINDING_BADNESS)
10785 DIFFERENT_REFERENCE_TYPE_BADNESS): Remove.
10786 (CV_CONVERSION_BADNESS): Define.
10787 (rank_one_type): Remove overly restrictive rvalue reference
10788 rank checks.
10789 Add cv-qualifier checks and subranks for type equality.
10790 * gdbtypes.h (REFERENCE_CONVERSION_RVALUE,
10791 REFERENCE_CONVERSION_CONST_LVALUE, CV_CONVERSION_BADNESS,
10792 CV_CONVERSION_CONST, CV_CONVERSION_VOLATILE): Declare.
10793
72bc1d24
SM
107942017-04-27 Simon Marchi <simon.marchi@ericsson.com>
10795
10796 * python/py-inferior.c (inferior_to_inferior_object): Increment reference
10797 count when creating the object.
10798
55bcecda
UW
107992017-04-27 Sangamesh Mallayya <sangamesh.swamy@in.ibm.com>
10800 Ulrich Weigand <uweigand@de.ibm.com>
10801
10802 * xcoffread.c (read_xcoff_symtab): Read correct function auxiliary
10803 entry if xlc -qfuncsect or gcc -ffunction-sections compiler option
10804 is used in AIX.
10805 (read_xcoff_symtab): Handle C_WEAKEXT storage class.
10806 (process_xcoff_symbol): Likewise.
10807 (scan_xcoff_symtab): Likewise.
10808
5c99fcf8
AH
108092017-04-26 Alan Hayward <alan.hayward@arm.com>
10810
10811 * ia64-tdep.c (examine_prologue): Use get_frame_register_unsigned.
10812 (ia64_sigtramp_frame_prev_register): Use read_memory_unsigned_integer.
10813 (ia64_access_reg): Use get_frame_register_unsigned.
10814 (ia64_access_rse_reg): Likewise.
10815 (ia64_libunwind_frame_prev_register): Likewise.
10816
b41c5a85
JW
108172017-04-26 Jiong Wang <jiong.wang@arm.com>
10818
10819 * gdbarch.sh: New gdbarch method execute_dwarf_cfa_vendor_op.
10820 * gdbarch.c: Regenerated.
10821 * gdbarch.h: Regenerated.
10822 * dwarf2-frame.c (dwarf2_frame_state_alloc_regs): Made the
10823 visibility external.
10824 (execute_cfa_program): Call execute_dwarf_cfa_vendor_op for CFI
10825 between DW_CFA_lo_user and DW_CFA_high_user inclusive.
10826 (enum cfa_how_kind): Move to ...
10827 (struct dwarf2_frame_state_reg_info): Likewise.
10828 (struct dwarf2_frame_state): Likewise.
10829 * dwarf2-frame.h: ... here.
10830 (dwarf2_frame_state_alloc_regs): New declaration.
10831 * sparc-tdep.c (sparc_execute_dwarf_cfa_vendor_op): New function.
10832 (sparc32_gdbarch_init): Register execute_dwarf_cfa_vendor_op hook.
10833
c185f580
AH
108342017-04-26 Alan Hayward <alan.hayward@arm.com>
10835
10836 * xtensa-tdep.c (xtensa_pseudo_register_read): Use
10837 regcache_raw_read_unsigned.
10838 (xtensa_pseudo_register_write): Likewise.
10839
19c45594
AH
108402017-04-26 Alan Hayward <alan.hayward@arm.com>
10841
10842 * nds32-tdep.c (nds32_pseudo_register_read): Abort on errors.
10843 (nds32_pseudo_register_write): Likewise.
10844
4658f12e
YQ
108452017-04-25 Yao Qi <yao.qi@linaro.org>
10846
10847 * regcache.c (struct regcache) <readonly_p>: Change its type
10848 to bool.
10849 (regcache_xmalloc_1): Update parameter type and callers update.
10850
d581dda8
YQ
108512017-04-25 Yao Qi <yao.qi@linaro.org>
10852
10853 * aarch64-tdep.c (aarch64_gdbarch_init): Don't call
10854 set_gdbarch_wchar_bit.
10855 * arm-tdep.c (arm_gdbarch_init): Likewise.
10856
debed3db
PA
108572017-04-25 Pedro Alves <palves@redhat.com>
10858
10859 * common/poison.h [!HAVE_IS_TRIVIALLY_COPYABLE] (IsRelocatable)
10860 (BothAreRelocatable, memcopy, memmove): Don't define.
10861 * common/traits.h (__has_feature, HAVE_IS_TRIVIALLY_COPYABLE): New
10862 macros.
10863
b0b92aeb
PA
108642017-04-25 Pedro Alves <palves@redhat.com>
10865
10866 * common/common-defs.h: Include "common/poison.h".
10867 * common/function-view.h: (Not, Or, Requires): Move to traits.h
10868 and adjust.
10869 * common/poison.h: New file.
10870 * common/traits.h: Include <type_traits>.
10871 (Not, Or, Requires): New, moved from common/function-view.h.
10872
16c4d54a
PA
108732017-04-25 Pedro Alves <palves@redhat.com>
10874
10875 * breakpoint.h (struct breakpoint): In-class initialize all
10876 fields. Make boolean fields "bool".
10877 * breakpoint.c (init_raw_breakpoint_without_location): Remove
10878 memset call and initializations no longer necessary.
10879
b5c36682
PA
108802017-04-25 Pedro Alves <palves@redhat.com>
10881
10882 * btrace.c (pt_btrace_insn_flags): Change parameter type to
10883 reference.
10884 (pt_btrace_insn): New function.
10885 (ftrace_add_pt): Remove memset call and use pt_btrace_insn.
10886
5625a286
PA
108872017-04-25 Pedro Alves <palves@redhat.com>
10888
10889 * ada-lang.c (ada_catchpoint_location): Now a "class". Remove
10890 "base" field and inherit from "bp_location" instead. Add
10891 non-default ctor.
10892 (allocate_location_exception): Use new non-default ctor.
10893 * breakpoint.c (get_first_locp_gte_addr): Remove memset call.
10894 (init_bp_location): Convert to ...
10895 (bp_location::bp_location): ... this new ctor, and remove memset
10896 call.
10897 (base_breakpoint_allocate_location): Use the new non-default ctor.
10898 * breakpoint.h (bp_location): Now a class. Declare default and
10899 non-default ctors. In-class initialize all members.
10900 (init_bp_location): Remove declaration.
10901
23bcc18f
PA
109022017-04-25 Pedro Alves <palves@redhat.com>
10903
10904 * common/enum-flags.h (enum_flags): Don't implement copy ctor and
10905 assignment operator.
10906
e1ba3053
YQ
109072017-04-24 Yao Qi <yao.qi@linaro.org>
10908
10909 * doublest.c (convert_doublest_to_floatformat): Call
10910 floatformat_totalsize_bytes.
10911
10f489e5
TT
109122017-04-22 Tom Tromey <tom@tromey.com>
10913
10914 * mi/mi-cmd-file.c (mi_cmd_file_list_shared_libraries): Use
10915 ui_out_emit_list.
10916 * stack.c (print_frame): Use ui_out_emit_list.
10917 * mi/mi-symbol-cmds.c (mi_cmd_symbol_list_lines): Use
10918 ui_out_emit_list.
10919 * mi/mi-main.c (print_one_inferior)
10920 (mi_cmd_data_list_register_names)
10921 (mi_cmd_data_list_register_values, mi_cmd_list_features)
10922 (mi_cmd_list_target_features, mi_cmd_trace_frame_collected): Use
10923 ui_out_emit_list.
10924 * mi/mi-interp.c (mi_on_normal_stop_1): Use ui_out_emit_list.
10925 (mi_output_solib_attribs): Use ui_out_emit_list,
10926 ui_out_emit_tuple.
10927 * mi/mi-cmd-var.c (varobj_update_one): Use ui_out_emit_list.
10928 * mi/mi-cmd-stack.c (mi_cmd_stack_list_frames)
10929 (mi_cmd_stack_list_args, list_args_or_locals): Use
10930 ui_out_emit_list.
10931 * disasm.c (do_assembly_only): Use ui_out_emit_list.
10932 * breakpoint.c (print_solib_event, output_thread_groups): Use
10933 ui_out_emit_list.
10934
0092b74d
TT
109352017-04-22 Tom Tromey <tom@tromey.com>
10936
10937 * mi/mi-main.c (print_variable_or_computed): Use ui_out_emit_tuple.
10938 * mi/mi-cmd-var.c (varobj_update_one): Use ui_out_emit_tuple.
10939 * mi/mi-cmd-stack.c (list_arg_or_local): Use ui_out_emit_tuple.
10940
a14a62dd
TT
109412017-04-22 Tom Tromey <tom@tromey.com>
10942
10943 * tracepoint.c (tvariables_info_1)
10944 (print_one_static_tracepoint_marker): Use ui_out_emit_tuple.
10945
46b9c129
TT
109462017-04-22 Tom Tromey <tom@tromey.com>
10947
10948 * stack.c (print_frame_arg): Use ui_out_emit_tuple,
10949 annotate_arg_emitter.
10950 * breakpoint.c (print_mention_watchpoint)
10951 (print_mention_masked_watchpoint): Use ui_out_emit_tuple.
10952 * annotate.h (struct annotate_arg_emitter): New.
10953
2e783024
TT
109542017-04-22 Tom Tromey <tom@tromey.com>
10955
10956 * record-btrace.c (record_btrace_insn_history)
10957 (record_btrace_insn_history_range, record_btrace_call_history)
10958 (record_btrace_call_history_range): Use ui_out_emit_tuple.
10959 * thread.c (do_captured_list_thread_ids, print_thread_info_1): Use
10960 ui_out_emit_tuple.
10961 * stack.c (print_frame_info): Use ui_out_emit_tuple.
10962 * solib.c (info_sharedlibrary_command): Use ui_out_emit_tuple.
10963 * skip.c (skip_info): Use ui_out_emit_tuple.
10964 * remote.c (show_remote_cmd): Use ui_out_emit_tuple.
10965 * progspace.c (print_program_space): Use ui_out_emit_tuple.
10966 * probe.c (info_probes_for_ops): Use ui_out_emit_tuple.
10967 * osdata.c (info_osdata): Use ui_out_emit_tuple.
10968 * mi/mi-symbol-cmds.c (mi_cmd_symbol_list_lines): Use
10969 ui_out_emit_tuple.
10970 * mi/mi-main.c (print_one_inferior, list_available_thread_groups)
10971 (output_register, mi_cmd_data_read_memory)
10972 (mi_cmd_data_read_memory_bytes, mi_load_progress)
10973 (mi_cmd_trace_frame_collected): Use ui_out_emit_tuple.
10974 * mi/mi-cmd-var.c (mi_cmd_var_list_children, varobj_update_one):
10975 Use ui_out_emit_tuple.
10976 * mi/mi-cmd-stack.c (mi_cmd_stack_list_args): Use
10977 ui_out_emit_tuple.
10978 * mi/mi-cmd-info.c (mi_cmd_info_ada_exceptions)
10979 (mi_cmd_info_gdb_mi_command): Use ui_out_emit_tuple.
10980 * linux-thread-db.c (info_auto_load_libthread_db): Use
10981 ui_out_emit_tuple.
10982 * inferior.c (print_inferior): Use ui_out_emit_tuple.
10983 * gdb_bfd.c (print_one_bfd): Use ui_out_emit_tuple.
10984 * disasm.c (do_mixed_source_and_assembly_deprecated)
10985 (do_mixed_source_and_assembly): Use ui_out_emit_tuple.
10986 * cp-abi.c (list_cp_abis): Use ui_out_emit_tuple.
10987 * cli/cli-setshow.c (cmd_show_list): Use ui_out_emit_tuple.
10988 * breakpoint.c (print_one_breakpoint_location)
10989 (print_one_breakpoint): Use ui_out_emit_tuple.
10990 * auto-load.c (print_script, info_auto_load_cmd): Use
10991 ui_out_emit_tuple.
10992 * ada-tasks.c (print_ada_task_info): Use ui_out_emit_tuple.
10993
9be21bb4
SM
109942017-04-21 Simon Marchi <simon.marchi@ericsson.com>
10995
10996 * thread.c (print_thread_info_1): Remove dead code.
10997
0d4c07af
JK
109982017-04-21 Jan Kratochvil <jan.kratochvil@redhat.com>
10999
11000 * aarch64-tdep.c (selftests::aarch64_process_record_test): Make it #if
11001 GDB_SELF_TEST.
11002 * arm-tdep.c (selftests::arm_record_test): Likewise.
11003
4daf993d
YQ
110042017-04-21 Yao Qi <yao.qi@linaro.org>
11005
11006 * regcache.c (regcache_restore): Remove argument 2. Replace
11007 argument 3 with regcache. Get register status from
11008 src->register_status and get register contents from
11009 register_buffer (src, regnum).
11010 (regcache_cpy): Update.
11011
a6c21d4a
PA
110122017-04-19 Pedro Alves <palves@redhat.com>
11013
11014 * gdbthread.h (thread): Add missing closing parenthesis in
11015 comment.
11016
3a3fd0fd
PA
110172017-04-19 Pedro Alves <palves@redhat.com>
11018
11019 * common/refcounted-object.h: New file.
11020 * gdbthread.h: Include "common/refcounted-object.h".
11021 (thread_info): Inherit from refcounted_object and add comments.
11022 (thread_info::incref, thread_info::decref)
11023 (thread_info::m_refcount): Delete.
11024 (thread_info::deletable): Use the refcounted_object::refcount()
11025 method.
11026 * inferior.c (current_inferior_): Add comment.
11027 (set_current_inferior): Increment/decrement refcounts.
11028 (prune_inferiors, remove_inferior_command): Skip inferiors marked
11029 not-deletable instead of comparing with the current inferior.
11030 (initialize_inferiors): Increment the initial inferior's refcount.
11031 * inferior.h (struct inferior): Forward declare.
11032 Include "common/refcounted-object.h".
11033 (current_inferior, set_current_inferior): Move declaration to
11034 before struct inferior's definition, and fix comment.
11035 (inferior): Inherit from refcounted_object. Add comments.
11036 * thread.c (switch_to_thread_no_regs): Reference the thread's
11037 inferior pointer directly instead of doing a ptid lookup.
11038 (switch_to_no_thread): New function.
11039 (switch_to_thread(thread_info *)): New function, factored out
11040 from ...
11041 (switch_to_thread(ptid_t)): ... this.
11042 (restore_current_thread): Delete.
11043 (current_thread_cleanup): Remove 'inf_id' and 'was_removable'
11044 fields, and add 'inf' field.
11045 (do_restore_current_thread_cleanup): Check whether old->inf is
11046 alive instead of looking up an inferior by ptid. Use
11047 switch_to_thread and switch_to_no_thread.
11048 (restore_current_thread_cleanup_dtor): Use old->inf directly
11049 instead of lookup up an inferior by id. Decref the inferior.
11050 Don't restore 'removable'.
11051 (make_cleanup_restore_current_thread): Same the inferior pointer
11052 in old, instead of the inferior number. Incref the inferior.
11053 Don't save/clear 'removable'.
11054
9bcb1f16
PA
110552017-04-19 Pedro Alves <palves@redhat.com>
11056
11057 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
11058 unittests/scoped_restore-selftests.c.
11059 (SUBDIR_UNITTESTS_OBS): Add scoped_restore-selftests.o.
11060 * common/scoped_restore.h (scoped_restore_base): Make "class".
11061 (scoped_restore_base::release): New public method.
11062 (scoped_restore_base::scoped_restore_base): New protected ctor.
11063 (scoped_restore_base::m_saved_var): New protected field.
11064 (scoped_restore_tmpl::scoped_restore_tmpl(T*)): Initialize the
11065 scoped_restore_base base class instead of m_saved_var directly.
11066 (scoped_restore_tmpl::scoped_restore_tmpl(T*, T2)): Likewise.
11067 (scoped_restore_tmpl::scoped_restore_tmpl(const
11068 scoped_restore_tmpl<T>&)): Likewise.
11069 (scoped_restore_tmpl::~scoped_restore_tmpl): Use the saved_var
11070 method.
11071 (scoped_restore_tmpl::saved_var): New method.
11072 (scoped_restore_tmpl::m_saved_var): Delete.
11073 * inferior.h (inferior::detaching): Now a bool.
11074 * infrun.c (prepare_for_detach): Use a scoped_restore instead of a
11075 cleanup.
11076 * unittests/scoped_restore-selftests.c: New file.
11077
26fcd539
PA
110782017-04-19 Pedro Alves <palves@redhat.com>
11079
11080 * Makefile.in (SUBDIR_UNITTESTS_SRCS, SUBDIR_UNITTESTS_OBS):
11081 Re-sort in alphabetic order.
11082
fdd243b0
PA
110832017-04-18 Pedro Alves <palves@redhat.com>
11084
11085 * xml-support.c (obstack_xml_printf): Delete.
11086 * xml-support.h (obstack_xml_printf): Delete.
11087
4895cde2
PA
110882017-04-18 Pedro Alves <palves@redhat.com>
11089
11090 * xml-support.c (gdb_xml_parser) <use_dtd, dtd_name, parse,
11091 vdebug, verror, body_text, start_element, end_element, name,
11092 user_data, set_is_xinclude, set_error, expat_parser>: New methods.
11093 <name, user_data, expat_parser, scopes, error, last_line, dtd_name,
11094 is_xinclude>: Make private and add m_ prefix.
11095 (gdb_xml_parser::body_text): New method, based on ...
11096 (gdb_xml_body_text): ... this. Adjust.
11097 (gdb_xml_parser::vdebug): New method, based on ...
11098 (gdb_xml_debug): ... this. Adjust.
11099 (gdb_xml_parser::verror): New method, based on ...
11100 (gdb_xml_error): ... this. Adjust.
11101 (gdb_xml_parser::start_element): New method, based on ...
11102 (gdb_xml_start_element): ... this. Adjust.
11103 (gdb_xml_start_element_wrapper): Defer to
11104 gdb_xml_parser::start_element and gdb_xml_parser::set_error.
11105 (gdb_xml_parser::end_element): New method, based on ...
11106 (gdb_xml_end_element_wrapper): ... this. Adjust.
11107 (gdb_xml_parser::~gdb_xml_parser): Adjust.
11108 (gdb_xml_parser::gdb_xml_parser): Adjust to field renames.
11109 (gdb_xml_parser::use_dtd): New method, based on ...
11110 (gdb_xml_use_dtd): ... this. Adjust.
11111 (gdb_xml_parser::parse): New method, based on ...
11112 (gdb_xml_parse): ... this. Adjust.
11113 (gdb_xml_parse_quick): Adjust to call the parser's parse method.
11114 (xinclude_start_include): Adjust to call the parser's name method.
11115 (xml_xinclude_default, xml_xinclude_start_doctype)
11116 (xml_xinclude_end_doctype): Adjust to call the parser's user_data
11117 method.
11118 (xml_process_xincludes): Adjust to call parser methods.
11119 * xml-support.h (gdb_xml_use_dtd, gdb_xml_parse): Delete
11120 declarations.
11121
bd8a901f
PA
111222017-04-18 Pedro Alves <palves@redhat.com>
11123
11124 * tracefile-tfile.c (tfile_write_tdesc): Adjust to use
11125 gdb::optional<std::string>.
11126 * xml-support.c: Include <string>.
11127 (scope_level::scope_level(scope_level &&))
11128 (scope_level::~scope_level): Delete.
11129 (scope_level::body): Now a std::string.
11130 (gdb_xml_body_text, gdb_xml_end_element): Adjust.
11131 (xinclude_parsing_data::xinclude_parsing_data): Add 'output'
11132 parameter.
11133 (xinclude_parsing_data::~xinclude_parsing_data): Delete.
11134 (xinclude_parsing_data::output): Now a std::string reference.
11135 (xinclude_start_include): Adjust.
11136 (xml_xinclude_default): Adjust.
11137 (xml_process_xincludes): Add 'output' parameter, and return bool.
11138 * xml-support.h (xml_process_xincludes): Add 'output' parameter,
11139 and return bool.
11140 * xml-tdesc.c: Include <unordered_map> and <string>.
11141 (tdesc_xml_cache): Delete.
11142 (tdesc_xml_cache_s): Delete.
11143 (xml_cache): Now an std::unordered_map.
11144 (tdesc_parse_xml): Adjust to use std::string and unordered_map.
11145 (target_fetch_description_xml): Change return type to
11146 gdb::optional<std::string>, and adjust.
11147 * xml-tdesc.h: Include "common/gdb_optional.h" and <string>.
11148 (target_fetch_description_xml): Change return type to
11149 gdb::optional<std::string>.
11150
d35d1958
PA
111512017-04-18 Pedro Alves <palves@redhat.com>
11152
11153 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
11154 unittests/optional-selftests.c.
11155 (SUBDIR_UNITTESTS_OBS): Add optional-selftests.o.
11156 * unittests/optional-selftests.c: New file.
11157 * unittests/optional/assignment/1.cc: New file.
11158 * unittests/optional/assignment/2.cc: New file.
11159 * unittests/optional/assignment/3.cc: New file.
11160 * unittests/optional/assignment/4.cc: New file.
11161 * unittests/optional/assignment/5.cc: New file.
11162 * unittests/optional/assignment/6.cc: New file.
11163 * unittests/optional/assignment/7.cc: New file.
11164 * unittests/optional/cons/copy.cc: New file.
11165 * unittests/optional/cons/default.cc: New file.
11166 * unittests/optional/cons/move.cc: New file.
11167 * unittests/optional/cons/value.cc: New file.
11168 * unittests/optional/in_place.cc: New file.
11169 * unittests/optional/observers/1.cc: New file.
11170 * unittests/optional/observers/2.cc: New file.
11171
22796e97
PA
111722017-04-18 Pedro Alves <palves@redhat.com>
11173
11174 * common/gdb_optional.h: Include common/traits.h.
11175 (in_place_t): New type.
11176 (in_place): New constexpr variable.
11177 (optional::optional): Remove member initialization of
11178 m_instantiated.
11179 (optional::optional(in_place_t...)): New constructor.
11180 (optional::~optional): Use reset.
11181 (optional::optional(const optional&)): New.
11182 (optional::optional(const optional&&)): New.
11183 (optional::optional(T &)): New.
11184 (optional::optional(T &&)): New.
11185 (operator::operator=(const optional &)): New.
11186 (operator::operator=(optional &&)): New.
11187 (operator::operator= (const T &))
11188 (operator::operator= (T &&))
11189 (operator::emplace (Args &&... args)): Return a T&. Use reset.
11190 (operator::reset): New.
11191 (operator::m_instantiated):: Add in-class initializer.
11192 * common/traits.h: Include <type_traits>.
11193 (struct And): New types.
11194
a7fc9b61
PA
111952017-04-18 Pedro Alves <palves@redhat.com>
11196
11197 * xml-support.c: Include <vector>.
11198 (scope_level::scope_level(const gdb_xml_element *))
11199 (scope_level::scope_level(scope_level&&)): New.
11200 (scope_level::~scope_level): New.
11201 (scope_level_s): Delete.
11202 (gdb_xml_parser::scopes): Now a std::vector.
11203 (gdb_xml_body_text, gdb_xml_start_element, gdb_xml_end_element):
11204 Use std::vector.
11205 (gdb_xml_parser::~gdb_xml_parser): Remove now unnecessary
11206 scope cleanup code.
11207 (gdb_xml_parser::gdb_xml_parser): Remove explicit initialization
11208 of the scopes member. Use std::vector::emplace_back.
11209
010151c9
PA
112102017-04-18 Pedro Alves <palves@redhat.com>
11211
11212 * xml-support.c (gdb_xml_parser): Add ctor/dtor. Make is_xinclude
11213 a bool.
11214 (gdb_xml_end_element): Change type of first parameter.
11215 (gdb_xml_cleanup): Rename to ...
11216 (gdb_xml_parser::~gdb_xml_parser): ... this.
11217 (gdb_xml_create_parser_and_cleanup): Delete with ...
11218 (gdb_xml_parser::gdb_xml_parser): ... creation parts factored out
11219 to this new ctor.
11220 (gdb_xml_parse_quick): Create a local gdb_xml_parser instead of
11221 using gdb_xml_create_parser_and_cleanup.
11222 (xinclude_parsing_data): Add ctor/dtor.
11223 (xml_xinclude_cleanup): Delete.
11224 (xml_process_xincludes): Create a local xinclude_parsing_data
11225 instead of heap-allocating one. Create a local gdb_xml_parser
11226 instead of heap-allocating one with
11227 gdb_xml_create_parser_and_cleanup.
11228
d56060f0
JB
112292017-04-18 John Baldwin <jhb@FreeBSD.org>
11230
11231 PR threads/20743
11232 * fbsd-nat.c (resume_one_thread_cb): Remove.
11233 (resume_all_threads_cb): Remove.
11234 (fbsd_resume): Use ALL_NON_EXITED_THREADS instead of
11235 iterate_over_threads.
11236
305d16a9
JB
112372017-04-17 Joel Brobecker <brobecker@adacore.com>
11238
11239 * NEWS: Create a new section for the next release branch.
11240 Rename the section of the current branch, now that it has
11241 been cut.
11242
8bb57231
JB
112432017-04-17 Joel Brobecker <brobecker@adacore.com>
11244
11245 GDB 8.0 branch created (725bf5cf125783c2a7ca4ab63d3768e220bab2db):
11246 * version.in: Bump version to 8.0.50.DATE-git.
11247
096c92dd
SDJ
112482017-04-13 Sergio Durigan Junior <sergiodj@redhat.com>
11249
11250 PR gdb/21385
11251 * windows-nat.c (windows_create_inferior): Declare 'allargs'
11252 independently of the host, and fix build breakage on Cygwin.
11253
0550c955
PA
112542017-04-13 Pedro Alves <palves@redhat.com>
11255
11256 * inferior.c (free_inferior): Convert to ...
11257 (inferior::~inferior): ... this dtor.
11258 (inferior::inferior): New ctor, factored out from ...
11259 (add_inferior_silent): ... here. Allocate the inferior with a new
11260 expression.
11261 (delete_inferior): Call delete instead of free_inferior.
11262 * inferior.h (gdb_environ, continuation): Forward declare.
11263 (inferior): Now a class. Add in-class initialization to all
11264 members. Make boolean fields bool, except 'detaching'.
11265 (inferior::inferior): New explicit ctor.
11266 (inferior::~inferior): New.
11267
e3d60dfc
PA
112682017-04-13 Pedro Alves <palves@redhat.com>
11269
11270 * inferior.c (init_inferior_list): Delete.
11271 * inferior.h (init_inferior_list): Delete.
11272
5fd69d0a
PA
112732017-04-13 Pedro Alves <palves@redhat.com>
11274
11275 PR threads/13217
11276 * gdb.threads/threadapply.exp (thr_apply_detach): New procedure.
11277 (top level): Call it twice, with different thread sets.
11278
c6609450
PA
112792017-04-13 Pedro Alves <palves@redhat.com>
11280
11281 * thread.c: Include <algorithm>.
11282 (thread_array_cleanup): Delete.
11283 (scoped_inc_dec_ref): New class.
11284 (live_threads_count): New function.
11285 (set_thread_refcount): Delete.
11286 (tp_array_compar_ascending): Now a bool.
11287 (tp_array_compar): Convert to a std::sort comparison function.
11288 (thread_apply_all_command): Use std::vector and scoped_inc_dec_ref
11289 and live_threads_count.
11290
2a00d7ce
PA
112912017-04-13 Pedro Alves <palves@redhat.com>
11292
11293 * infrun.c (follow_fork_inferior): Also switch the current
11294 inferior.
11295
441d7c93
PA
112962017-04-13 Pedro Alves <palves@redhat.com>
11297
11298 * breakpoint.c (watch_command_1): Save watchpoint-frame info
11299 before calling create_internal_breakpoint.
11300
808480f6
PA
113012017-04-13 Pedro Alves <palves@redhat.com>
11302
11303 * fork-child.c (execv_argv): New class.
11304 (breakup_args): Refactored as ...
11305 (execv_argv::init_for_no_shell): .. this method of execv_argv.
11306 Copy arguments to storage and replace separators with NULL
11307 terminators in place.
11308 (escape_bang_in_quoted_argument): Adjust to return bool.
11309 (execv_argv::execv_argv): New ctor.
11310 (execv_argv::init_for_shell): New method, factored out from
11311 fork_inferior. Don't strdup strings into the vector.
11312 (fork_inferior): Eliminate "shell" local and use execv_argv. Use
11313 Remove free_vector_argv call.
11314
ad3d022a
YQ
113152017-04-13 Yao Qi <yao.qi@linaro.org>
11316
11317 * rx-tdep.c (rx_fpsw_type): Check tdep->rx_fpsw_type instead of
11318 tdep->rx_psw_type.
11319
e6ddc3bf
YQ
113202017-04-13 Yao Qi <yao.qi@linaro.org>
11321
11322 * rl78-tdep.c (rl78_gdbarch_init): Use XCNEW instead of XNEW.
11323 * rx-tdep.c (rx_gdbarch_init): Likewise.
11324
bfb8cf90
PA
113252017-04-13 Pedro Alves <palves@redhat.com>
11326
11327 * breakpoint.h (struct breakpoint): Reindent.
11328
f5336ca5
PA
113292017-04-13 Pedro Alves <palves@redhat.com>
11330
11331 * breakpoint.c (bp_location): Rename to ...
11332 (bp_locations): ... this. All references updated.
11333 (bp_location_count): Rename to ...
11334 (bp_locations_count): ... this. All references updated.
11335 (bp_location_placed_address_before_address_max): Rename to ...
11336 (bp_locations_placed_address_before_address_max): ... this. All
11337 references updated.
11338 (bp_location_shadow_len_after_address_max): Rename to ...
11339 (bp_locations_shadow_len_after_address_max): ... this. All
11340 references updated.
11341 (bp_location_compare_addrs): Rename to ...
11342 (bp_locations_compare_addrs): ... this. All references updated.
11343 (bp_location_compare):Rename to ...
11344 (bp_locations_compare): ... this. All references updated.
11345 (bp_location_target_extensions_update): Rename to ...
11346 (bp_locations_target_extensions_update): ... this. All references
11347 updated.
11348
be628ab8
SDJ
113492017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
11350
11351 * Makefile.in (HFILES_NO_SRCDIR): Add "common/gdb_termios.h".
11352 * common/common.m4: Check headers 'termios.h', 'termio.h' and
11353 'sgtty.h'.
11354 * common/gdb_termios.h: New file, with parts of "terminal.h".
11355 * inflow.c: Include "gdb_termios.h".
11356 * ser-unix.c: Include "gdb_termios.h".
11357 * terminal.h: Move terminal-related defines to
11358 "common/gdb_termios.h".
11359
8e9e35b1
TT
113602017-04-12 Tom Tromey <tom@tromey.com>
11361
11362 * probe.c (parse_probes): Update.
11363 * location.h (delete_event_location): Don't declare.
11364 (event_location_deleter::operator()): Update.
11365 * location.c (event_location_deleter::operator()): Rename from
11366 delete_event_location.
11367 * linespec.h (linespec_result) <location>: Change type to
11368 event_location_up.
11369 * linespec.c (canonicalize_linespec, event_location_to_sals)
11370 (decode_objc): Update.
11371 (linespec_result): Don't call delete_event_location.
11372 * breakpoint.c (create_breakpoints_sal)
11373 (bkpt_probe_create_sals_from_location)
11374 (strace_marker_create_sals_from_location): Update.
11375
16e802b9
TT
113762017-04-12 Tom Tromey <tom@tromey.com>
11377
11378 * linespec.h (struct linespec_result): Add constructor and
11379 destructor.
11380 (init_linespec_result, destroy_linespec_result)
11381 (make_cleanup_destroy_linespec_result): Don't declare.
11382 * linespec.c (init_linespec_result): Remove.
11383 (linespec_result::~linespec_result): Rename from
11384 destroy_linespec_result. Update.
11385 (cleanup_linespec_result, make_cleanup_destroy_linespec_result):
11386 Remove.
11387 * breakpoint.c (create_breakpoint, break_range_command)
11388 (decode_location_default): Update.
11389 * ax-gdb.c (agent_command_1): Update.
11390
d28cd78a
TT
113912017-04-12 Tom Tromey <tom@tromey.com>
11392
11393 * remote.c (remote_download_tracepoint): Update.
11394 * python/py-breakpoint.c (bppy_get_location): Update.
11395 * guile/scm-breakpoint.c (bpscm_print_breakpoint_smob)
11396 (gdbscm_breakpoint_location): Update.
11397 * elfread.c (elf_gnu_ifunc_resolver_return_stop): Update.
11398 * breakpoint.h (struct breakpoint) <location, location_range_end>:
11399 Change type to event_location_up.
11400 * breakpoint.c (create_overlay_event_breakpoint)
11401 (create_longjmp_master_breakpoint)
11402 (create_std_terminate_master_breakpoint)
11403 (create_exception_master_breakpoint)
11404 (breakpoint_event_location_empty_p, print_breakpoint_location)
11405 (print_one_breakpoint_location, create_thread_event_breakpoint)
11406 (init_breakpoint_sal, create_breakpoint)
11407 (print_recreate_ranged_breakpoint, break_range_command)
11408 (init_ada_exception_breakpoint, say_where): Update.
11409 (base_breakpoint_dtor): Don't call delete_event_location.
11410 (bkpt_print_recreate, tracepoint_print_recreate)
11411 (dprintf_print_recreate, update_static_tracepoint)
11412 (breakpoint_re_set_default): Update.
11413
711799d5
TT
114142017-04-12 Tom Tromey <tom@tromey.com>
11415
11416 * compile/compile-loc2c.c (compute_stack_depth_worker): Change
11417 type of "to_do". Update.
11418 (compute_stack_depth): Use std::vector.
11419
52d214d3
TT
114202017-04-12 Tom Tromey <tom@tromey.com>
11421
11422 * printcmd.c (find_instruction_backward): Use std::vector.
11423
4c404b8b
TT
114242017-04-12 Tom Tromey <tom@tromey.com>
11425
11426 * symfile.c (objfilep): Remove typedef.
11427 (reread_symbols): Use a std::vector.
11428
156d9eab
TT
114292017-04-12 Tom Tromey <tom@tromey.com>
11430
11431 * mi/mi-main.c (exec_direction_forward): Remove.
11432 (exec_reverse_continue, mi_execute_command): Use scoped_restore.
11433 * guile/scm-ports.c (ioscm_with_output_to_port_worker): Use
11434 scoped_restore.
11435 * guile/guile.c (guile_repl_command, guile_command)
11436 (gdbscm_execute_gdb_command): Use scoped_restore.
11437 * go-exp.y (go_parse): Use scoped_restore.
11438 * d-exp.y (d_parse): Use scoped_restore.
11439 * cli/cli-decode.c (cmd_func): Use scoped_restore.
11440 * c-exp.y (c_parse): Use scoped_restore.
11441
4d89769a
TT
114422017-04-12 Tom Tromey <tom@tromey.com>
11443
11444 * mi/mi-parse.h (struct mi_parse): Add constructor, destructor.
11445 (mi_parse): Update return type.
11446 (mi_parse_free): Remove.
11447 * mi/mi-parse.c (mi_parse::mi_parse): New constructor.
11448 (mi_parse::~mi_parse): Rename from mi_parse_free.
11449 (mi_parse_cleanup): Remove.
11450 (mi_parse): Return a unique_ptr. Use new.
11451 * mi/mi-main.c (mi_execute_command): Update.
11452
4b217cc7
TT
114532017-04-12 Tom Tromey <tom@tromey.com>
11454
11455 * location.c (explicit_location_lex_one): Return a
11456 unique_xmalloc_ptr.
11457 (string_to_explicit_location): Update. Remove cleanups.
11458
59d3651b
TT
114592017-04-12 Tom Tromey <tom@tromey.com>
11460
11461 * gnu-v3-abi.c (value_and_voffset_p): Remove typedef.
11462 (compare_value_and_voffset): Change type. Update.
11463 (compute_vtable_size): Change type of "offset_vec".
11464 (gnuv3_print_vtable): Use std::vector. Remove cleanups.
11465 (gnuv3_get_typeid): Remove extraneous declaration.
11466
b24b0d6c
TT
114672017-04-12 Tom Tromey <tom@tromey.com>
11468
11469 * charset.h (wchar_iterator): Fix comment.
11470
80a3b8c5
TT
114712017-04-12 Tom Tromey <tom@tromey.com>
11472
11473 * charset.c (iconv_wrapper): New class.
11474 (cleanup_iconv): Remove.
11475 (convert_between_encodings): Use it.
11476
c83dd867
TT
114772017-04-12 Tom Tromey <tom@tromey.com>
11478
11479 * symfile.h (increment_reading_symtab): Update type.
11480 * symfile.c (decrement_reading_symtab): Remove.
11481 (increment_reading_symtab): Return a scoped_restore_tmpl<int>.
11482 * psymtab.c (psymtab_to_symtab): Update.
11483 * dwarf2read.c (dw2_instantiate_symtab): Update.
11484
0e8621a0
TT
114852017-04-12 Tom Tromey <tom@tromey.com>
11486
11487 * jit.c (struct jit_reader): Declare separately. Add constructor
11488 and destructor. Change type of "handle".
11489 (loaded_jit_reader): Define separately.
11490 (jit_reader_load): Update. New "new".
11491 (jit_reader_unload_command): Use "delete".
11492 * gdb-dlfcn.h (struct dlclose_deleter): New.
11493 (gdb_dlhandle_up): New typedef.
11494 (gdb_dlopen, gdb_dlsym): Update types.
11495 (gdb_dlclose): Remove.
11496 * gdb-dlfcn.c (gdb_dlopen): Return a gdb_dlhandle_up.
11497 (gdb_dlsym): Change type of "handle".
11498 (make_cleanup_dlclose): Remove.
11499 (dlclose_deleter::operator()): Rename from gdb_dlclose.
11500 * compile/compile-c-support.c (load_libcc): Update.
11501
67d89901
TT
115022017-04-12 Tom Tromey <tom@tromey.com>
11503
11504 * symtab.h (find_pcs_for_symtab_line): Change return type.
11505 * symtab.c (find_pcs_for_symtab_line): Change return type.
11506 * python/py-linetable.c (build_line_table_tuple_from_pcs): Change
11507 type of "vec". Update.
11508 (ltpy_get_pcs_for_line): Update.
11509 * linespec.c (decode_digits_ordinary): Update.
11510
93921405
TT
115112017-04-12 Tom Tromey <tom@tromey.com>
11512
11513 * tracepoint.c (actions_command): Update.
11514 * python/python.c (python_command, python_interactive_command):
11515 Update.
11516 * mi/mi-cmd-break.c (mi_cmd_break_commands): Update.
11517 * guile/guile.c (guile_command): Update.
11518 * defs.h (read_command_lines, read_command_lines_1): Return
11519 command_line_up.
11520 (command_lines_deleter): New struct.
11521 (command_line_up): New typedef.
11522 * compile/compile.c (compile_code_command)
11523 (compile_print_command): Update.
11524 * cli/cli-script.h (get_command_line, copy_command_lines): Return
11525 command_line_up.
11526 (make_cleanup_free_command_lines): Remove.
11527 * cli/cli-script.c (get_command_line, read_command_lines_1)
11528 (copy_command_lines): Return command_line_up.
11529 (while_command, if_command, read_command_lines, define_command)
11530 (document_command): Update.
11531 (do_free_command_lines_cleanup, make_cleanup_free_command_lines):
11532 Remove.
11533 * breakpoint.h (breakpoint_set_commands): Change type of
11534 "commands".
11535 * breakpoint.c (breakpoint_set_commands): Change type of
11536 "commands". Update.
11537 (do_map_commands_command, update_dprintf_command_list)
11538 (create_tracepoint_from_upload): Update.
11539
ffc2605c
TT
115402017-04-12 Tom Tromey <tom@tromey.com>
11541
11542 * tracepoint.c (scope_info): Update.
11543 * spu-tdep.c (spu_catch_start): Update.
11544 * python/python.c (gdbpy_decode_line): Update.
11545 * python/py-finishbreakpoint.c (bpfinishpy_init): Update.
11546 * python/py-breakpoint.c (bppy_init): Update.
11547 * probe.c (parse_probes): Update.
11548 * mi/mi-cmd-break.c (mi_cmd_break_insert_1): Update.
11549 * location.h (event_location_deleter): New struct.
11550 (event_location_up): New typedef.
11551 (new_linespec_location, new_address_location, new_probe_location)
11552 (new_explicit_location, copy_event_location)
11553 (string_to_event_location, string_to_event_location_basic)
11554 (string_to_explicit_location): Update return type.
11555 (make_cleanup_delete_event_location): Remove.
11556 * location.c (new_linespec_location, new_address_location)
11557 (new_probe_location, new_explicit_location, copy_event_location):
11558 Return event_location_up.
11559 (delete_event_location_cleanup)
11560 (make_cleanup_delete_event_location): Remove.
11561 (string_to_explicit_location, string_to_event_location_basic)
11562 (string_to_event_location): Return event_location_up.
11563 * linespec.c (canonicalize_linespec, event_location_to_sals)
11564 (decode_line_with_current_source)
11565 (decode_line_with_last_displayed, decode_objc): Update.
11566 * guile/scm-breakpoint.c (gdbscm_register_breakpoint_x): Update.
11567 * completer.c (location_completer): Update.
11568 * cli/cli-cmds.c (edit_command, list_command): Update.
11569 * breakpoint.c (create_overlay_event_breakpoint)
11570 (create_longjmp_master_breakpoint)
11571 (create_std_terminate_master_breakpoint)
11572 (create_exception_master_breakpoint)
11573 (create_thread_event_breakpoint): Update.
11574 (init_breakpoint_sal): Update. Remove some dead code.
11575 (create_breakpoint_sal): Change type of "location". Update.
11576 (create_breakpoints_sal, create_breakpoint, break_command_1)
11577 (dprintf_command, break_range_command, until_break_command)
11578 (init_ada_exception_breakpoint)
11579 (strace_marker_create_sals_from_location)
11580 (update_static_tracepoint, trace_command, ftrace_command)
11581 (strace_command, create_tracepoint_from_upload): Update.
11582 * break-catch-throw.c (re_set_exception_catchpoint): Update.
11583 * ax-gdb.c (agent_command_1): Update.
11584
8f10c932
PA
115852017-04-12 Pedro Alves <palves@redhat.com>
11586
11587 * Makefile.in (ALL_TARGET_OBS): Add i386-go32-tdep.o.
11588 * configure.tgt: Handle i[34567]86-*-go32* and
11589 i[34567]86-*-msdosdjgpp*.
11590 * i386-tdep.c (i386_svr4_reg_to_regnum):
11591 Make extern.
11592 (i386_go32_init_abi, i386_coff_osabi_sniffer): Moved to
11593 i386-go32-tdep.c.
11594 (_initialize_i386_tdep): DJGPP bits moved to i386-go32-tdep.c.
11595 * i386-go32-tdep.c: New file.
11596 * i386-tdep.h (tdesc_i386_mmx, i386_svr4_reg_to_regnum): New
11597 declarations.
11598
0a31ccfb
SM
115992017-04-12 Simon Marchi <simon.marchi@ericsson.com>
11600
11601 * aix-thread.c (pd_status2str): Change return type to const char *.
11602
e9bb3fbb
PA
116032017-04-12 Pedro Alves <palves@redhat.com>
11604
11605 * i386-tdep.c (i386_elf_init_abi, i386_go32_init_abi): Remove
11606 calls to set_gdbarch_gnu_triplet_regexp.
11607
53375380
PA
116082017-04-12 Pedro Alves <palves@redhat.com>
11609
11610 PR gdb/21323
11611 * c-lang.c (cplus_primitive_types) <cplus_primitive_type_wchar_t>:
11612 New enum value.
11613 (cplus_language_arch_info): Register cplus_primitive_type_wchar_t.
11614 * gdbtypes.h (struct builtin_type) <builtin_wchar>: New field.
11615 * gdbtypes.c (gdbtypes_post_init): Create the "wchar_t" type.
11616 * gdbarch.sh (wchar_bit, wchar_signed): New per-arch values.
11617 * gdbarch.h, gdbarch.c: Regenerate.
11618 * aarch64-tdep.c (aarch64_gdbarch_init): Override
11619 gdbarch_wchar_bit and gdbarch_wchar_signed.
11620 * alpha-tdep.c (alpha_gdbarch_init): Likewise.
11621 * arm-tdep.c (arm_gdbarch_init): Likewise.
11622 * avr-tdep.c (avr_gdbarch_init): Likewise.
11623 * h8300-tdep.c (h8300_gdbarch_init): Likewise.
11624 * i386-nto-tdep.c (i386nto_init_abi): Likewise.
11625 * i386-tdep.c (i386_go32_init_abi): Likewise.
11626 * m32r-tdep.c (m32r_gdbarch_init): Likewise.
11627 * moxie-tdep.c (moxie_gdbarch_init): Likewise.
11628 * nds32-tdep.c (nds32_gdbarch_init): Likewise.
11629 * rs6000-aix-tdep.c (rs6000_aix_init_osabi): Likewise.
11630 * sh-tdep.c (sh_gdbarch_init): Likewise.
11631 * sparc-tdep.c (sparc32_gdbarch_init): Likewise.
11632 * sparc64-tdep.c (sparc64_init_abi): Likewise.
11633 * windows-tdep.c (windows_init_abi): Likewise.
11634 * xstormy16-tdep.c (xstormy16_gdbarch_init): Likewise.
11635
53e710ac
PA
116362017-04-12 Pedro Alves <palves@redhat.com>
11637
11638 PR c++/21323
11639 * c-lang.c (cplus_primitive_types) <cplus_primitive_type_char16_t,
11640 cplus_primitive_type_char32_t>: New enum values.
11641 (cplus_language_arch_info): Register cplus_primitive_type_char16_t
11642 and cplus_primitive_type_char32_t.
11643 * dwarf2read.c (read_base_type) <DW_ATE_UTF>: If bit size is 16 or
11644 32, use the archtecture's built-in type for char16_t and char32_t,
11645 respectively. Otherwise, fallback to init_integer_type as before,
11646 but make the type unsigned, and issue a complaint.
11647 * gdbtypes.c (gdbtypes_post_init): Make char16_t and char32_t unsigned.
11648
ab0538b8
AH
116492017-04-12 Alan Hayward <alan.hayward@arm.com>
11650
5e0e0422 11651 * m32r-tdep.c (M32R_ARG_REGISTER_SIZE): Added.
ab0538b8
AH
11652 (m32r_push_dummy_call): Use M32R_ARG_REGISTER_SIZE.
11653
5430098f
SDJ
116542017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
11655
11656 * windows-nat.c (windows_create_inferior): Declare 'toexec' as
11657 'const char *'.
11658
7c5ded6a
SDJ
116592017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
11660
11661 * common/common-utils.c (free_vector_argv): New function.
11662 * common/common-utils.h: Include <vector>.
11663 (free_vector_argv): New prototype.
11664 * darwin-nat.c (darwin_create_inferior): Rewrite function
11665 prototype in order to constify "exec_file" and accept a
11666 "std::string" for "allargs".
11667 * fork-child.c: Include <vector>.
11668 (breakup_args): Rewrite function, using C++.
11669 (fork_inferior): Rewrite function header, constify "exec_file_arg"
11670 and accept "std::string" for "allargs". Update the code to
11671 calculate "argv" based on "allargs". Update calls to "exec_fun"
11672 and "execvp".
11673 * gnu-nat.c (gnu_create_inferior): Rewrite function prototype in
11674 order to constify "exec_file" and accept a "std::string" for
11675 "allargs".
11676 * go32-nat.c (go32_create_inferior): Likewise.
11677 * inf-ptrace.c (inf_ptrace_create_inferior): Likewise.
11678 * infcmd.c (run_command_1): Constify "exec_file". Use
11679 "std::string" for inferior arguments.
11680 * inferior.h (fork_inferior): Update prototype.
11681 * linux-nat.c (linux_nat_create_inferior): Rewrite function
11682 prototype in order to constify "exec_file" and accept a
11683 "std::string" for "allargs".
11684 * nto-procfs.c (procfs_create_inferior): Likewise.
11685 * procfs.c (procfs_create_inferior): Likewise.
11686 * remote-sim.c (gdbsim_create_inferior): Likewise.
11687 * remote.c (extended_remote_run): Update code to accept
11688 "std::string" as argument.
11689 (extended_remote_create_inferior): Rewrite function prototype in
11690 order to constify "exec_file" and accept a "std::string" for
11691 "allargs".
11692 * rs6000-nat.c (super_create_inferior): Likewise.
11693 (rs6000_create_inferior): Likewise.
11694 * target.h (struct target_ops) <to_create_inferior>: Likewise.
11695 * windows-nat.c (windows_create_inferior): Likewise.
11696
ae0eee42
PA
116972017-04-11 Pedro Alves <palves@redhat.com>
11698
11699 * thread.c: Fix whitespace throughout.
11700
a6acac06
PR
117012017-04-11 Philipp Rudo <prudo@linux.vnet.ibm.com>
11702
11703 * linux-nat.c (linux_nat_detach): Remove delete_lwp call.
11704
64403bd1
AH
117052017-04-11 Alan Hayward <alan.hayward@arm.com>
11706
11707 * arm-tdep.c (arm_store_return_value): Use FP_REGISTER_SIZE
11708
a5bef50f
SDJ
117092017-04-10 Sergio Durigan Junior <sergiodj@redhat.com>
11710
11711 PR gdb/21364
11712 * osdata.c (info_osdata): Check if 'type' is an empty string
11713 instead of NULL.
11714
9295a5a9
PA
117152017-04-10 Pedro Alves <palves@redhat.com>
11716
11717 * thread.c (add_thread_silent, delete_thread_1, find_thread_ptid)
11718 (ptid_to_global_thread_id, in_thread_list)
11719 (do_captured_list_thread_ids, set_resumed, set_running)
11720 (set_executing, set_stop_requested, finish_thread_state)
11721 (validate_registers_access, can_access_registers_ptid)
11722 (print_thread_info_1, switch_to_thread)
11723 (do_restore_current_thread_cleanup)
11724 (make_cleanup_restore_current_thread, thread_command)
11725 (thread_name_command): Use operator== instead of ptid_equal.
11726
996812e3
PA
117272017-04-10 Pedro Alves <palves@redhat.com>
11728
11729 * thread.c (struct current_thread_cleanup) <next>: Delete field.
11730 (current_thread_cleanup_chain): Delete.
11731 (restore_current_thread_cleanup_dtor)
11732 (make_cleanup_restore_current_thread): Remove references to
11733 current_thread_cleanup_chain.
11734
845b344f
AH
117352017-04-10 Alan Hayward <alan.hayward@arm.com>
11736
11737 * msp430-tdep.c (msp430_pseudo_register_read): Never return
11738 REG_UNKNOWN.
11739
803bdfe4
YQ
117402017-04-10 Yao Qi <yao.qi@linaro.org>
11741
11742 PR gdb/19942
11743 * gdbthread.h (thread_info::deletable): New method.
11744 (thread_info::incref): New method.
11745 (thread_info::decref): New method.
11746 (thread_info::refcount): Move it to private.
11747 * infrun.c (save_stop_context): Call inc_refcount.
11748 (release_stop_context_cleanup): Likewise.
11749 * thread.c (set_thread_exited): New function.
11750 (init_thread_list): Delete "tp" only it is deletable, otherwise
11751 call set_thread_exited.
11752 (delete_thread_1): Call set_thread_exited.
11753 (current_thread_cleanup) <inferior_pid>: Remove.
11754 <thread>: New field.
11755 (restore_current_thread_ptid_changed): Removed.
11756 (do_restore_current_thread_cleanup): Adjust.
11757 (restore_current_thread_cleanup_dtor): Don't call
11758 find_thread_ptid.
11759 (set_thread_refcount): Use dec_refcount.
11760 (make_cleanup_restore_current_thread): Adjust.
11761 (thread_apply_all_command): Call inc_refcount.
11762 (_initialize_thread): Don't call
11763 observer_attach_thread_ptid_changed.
11764
8c25b497
YQ
117652017-04-10 Yao Qi <yao.qi@linaro.org>
11766
11767 * thread.c (delete_thread_1): Hoist code on marking thread as
11768 exited.
11769
8473b447
SM
117702017-04-09 Simon Marchi <simon.marchi@polymtl.ca>
11771
11772 * windows-nat.c (windows_detach): Initialize ptid with
11773 minus_one_ptid.
11774
6670ec13
SM
117752017-04-07 Simon Marchi <simon.marchi@ericsson.com>
11776
11777 * unittests/ptid-selftests.c: Fix erroneous assert messages.
11778
ba2f91bb
AH
117792017-04-07 Alan Hayward <alan.hayward@arm.com>
11780
11781 * bfin-tdep.c (BFIN_MAX_REGISTER_SIZE): Add.
11782 (bfin_pseudo_register_read): Use BFIN_MAX_REGISTER_SIZE.
11783 (bfin_pseudo_register_write): Likewise
11784
436252de
SM
117852017-04-06 Simon Marchi <simon.marchi@ericsson.com>
11786
11787 * common/ptid.h (struct ptid): Change to...
11788 (class ptid_t): ... this.
11789 <ptid_t>: New constructors.
11790 <pid, lwp_p, lwp, tid_p, tid, is_pid, operator==, operator!=,
11791 matches>: New methods.
11792 <make_null, make_minus_one>: New static methods.
11793 <pid>: Rename to...
11794 <m_pid>: ...this.
11795 <lwp>: Rename to...
11796 <m_lwp>: ...this.
11797 <tid>: Rename to...
11798 <m_tid>: ...this.
11799 (ptid_build, ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal,
11800 ptid_is_pid, ptid_lwp_p, ptid_tid_p, ptid_match): Take ptid arguments
11801 as references, move comment to class ptid_t.
11802 * common/ptid.c (null_ptid, minus_one_ptid): Initialize with
11803 ptid_t static methods.
11804 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_tid,
11805 ptid_equal, ptid_is_pid, ptid_lwp_p, ptid_tid_p, ptid_match):
11806 Take ptid arguments as references, implement using ptid_t methods.
11807 * unittests/ptid-selftests.c: New file.
11808 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
11809 unittests/ptid-selftests.c.
11810 (SUBDIR_UNITTESTS_OBS): Add unittests/ptid-selftests.o.
11811
0dedf377
TP
118122017-04-06 Thomas Preud'homme <thomas.preudhomme@arm.com>
11813
11814 * python/python.c (python_run_simple_file): Cast mode literal to
11815 non-const char pointer as expected by PyFile_FromString.
11816
4e9868d4
SM
118172017-04-05 Simon Marchi <simon.marchi@ericsson.com>
11818
11819 * common/ptid.c (ptid_lwp_p, ptid_tid_p): Remove comparison with
11820 minus_one_ptid and null_ptid.
11821
9bf2a700
PA
118222017-04-05 Pedro Alves <palves@redhat.com>
11823
11824 * warning.m4 (build_warnings): Remove -Wno-write-strings.
11825 * configure: Regenerate.
11826
a121b7c1
PA
118272017-04-05 Pedro Alves <palves@redhat.com>
11828
11829 * ada-exp.y (yyerror): Constify.
11830 * ada-lang.c (bound_name, get_selections)
11831 (ada_variant_discrim_type)
11832 (ada_variant_discrim_name, ada_value_struct_elt)
11833 (ada_lookup_struct_elt_type, is_unchecked_variant)
11834 (ada_which_variant_applies, standard_exc, ada_get_next_arg)
11835 (catch_ada_exception_command_split)
11836 (catch_ada_assert_command_split, catch_assert_command)
11837 (ada_op_name): Constify.
11838 * ada-lang.h (ada_yyerror, get_selections)
11839 (ada_variant_discrim_name, ada_value_struct_elt): Constify.
11840 * arc-tdep.c (arc_print_frame_cache): Constify.
11841 * arm-tdep.c (arm_skip_stub): Constify.
11842 * ax-gdb.c (gen_binop, gen_struct_ref_recursive, gen_struct_ref)
11843 (gen_aggregate_elt_ref): Constify.
11844 * bcache.c (print_bcache_statistics): Constify.
11845 * bcache.h (print_bcache_statistics): Constify.
11846 * break-catch-throw.c (catch_exception_command_1):
11847 * breakpoint.c (struct ep_type_description::description):
11848 Constify.
11849 (add_solib_catchpoint): Constify.
11850 (catch_fork_command_1): Add cast.
11851 (add_catch_command): Constify.
11852 * breakpoint.h (add_catch_command, add_solib_catchpoint):
11853 Constify.
11854 * bsd-uthread.c (bsd_uthread_state): Constify.
11855 * buildsym.c (patch_subfile_names): Constify.
11856 * buildsym.h (next_symbol_text_func, patch_subfile_names):
11857 Constify.
11858 * c-exp.y (yyerror): Constify.
11859 (token::oper): Constify.
11860 * c-lang.h (c_yyerror, cp_print_class_member): Constify.
11861 * c-varobj.c (cplus_describe_child): Constify.
11862 * charset.c (find_charset_names): Add cast.
11863 (find_charset_names): Constify array and add const_cast.
11864 * cli/cli-cmds.c (complete_command, cd_command): Constify.
11865 (edit_command): Constify.
11866 * cli/cli-decode.c (lookup_cmd): Constify.
11867 * cli/cli-dump.c (dump_memory_command, dump_value_command):
11868 Constify.
11869 (struct dump_context): Constify.
11870 (add_dump_command, restore_command): Constify.
11871 * cli/cli-script.c (get_command_line): Constify.
11872 * cli/cli-script.h (get_command_line): Constify.
11873 * cli/cli-utils.c (check_for_argument): Constify.
11874 * cli/cli-utils.h (check_for_argument): Constify.
11875 * coff-pe-read.c (struct read_pe_section_data): Constify.
11876 * command.h (lookup_cmd): Constify.
11877 * common/print-utils.c (decimal2str): Constify.
11878 * completer.c (gdb_print_filename): Constify.
11879 * corefile.c (set_gnutarget): Constify.
11880 * cp-name-parser.y (yyerror): Constify.
11881 * cp-valprint.c (cp_print_class_member): Constify.
11882 * cris-tdep.c (cris_register_name, crisv32_register_name):
11883 Constify.
11884 * d-exp.y (yyerror): Constify.
11885 (struct token::oper): Constify.
11886 * d-lang.h (d_yyerror): Constify.
11887 * dbxread.c (struct header_file_location::name): Constify.
11888 (add_old_header_file, add_new_header_file, last_function_name)
11889 (dbx_next_symbol_text, add_bincl_to_list)
11890 (find_corresponding_bincl_psymtab, set_namestring)
11891 (find_stab_function_addr, read_dbx_symtab, start_psymtab)
11892 (dbx_end_psymtab, read_ofile_symtab, process_one_symbol):
11893 * defs.h (command_line_input, print_address_symbolic)
11894 (deprecated_readline_begin_hook): Constify.
11895 * dwarf2read.c (anonymous_struct_prefix, dwarf_bool_name):
11896 Constify.
11897 * event-top.c (handle_line_of_input): Constify and add cast.
11898 * exceptions.c (catch_errors): Constify.
11899 * exceptions.h (catch_errors): Constify.
11900 * expprint.c (print_subexp_standard, op_string, op_name)
11901 (op_name_standard, dump_raw_expression, dump_raw_expression):
11902 * expression.h (op_name, op_string, dump_raw_expression):
11903 Constify.
11904 * f-exp.y (yyerror): Constify.
11905 (struct token::oper): Constify.
11906 (struct f77_boolean_val::name): Constify.
11907 * f-lang.c (f_word_break_characters): Constify.
11908 * f-lang.h (f_yyerror): Constify.
11909 * fork-child.c (fork_inferior): Add cast.
11910 * frv-tdep.c (struct gdbarch_tdep::register_names): Constify.
11911 (new_variant): Constify.
11912 * gdbarch.sh (pstring_ptr, pstring_list): Constify.
11913 * gdbarch.c: Regenerate.
11914 * gdbcore.h (set_gnutarget): Constify.
11915 * go-exp.y (yyerror): Constify.
11916 (token::oper): Constify.
11917 * go-lang.h (go_yyerror): Constify.
11918 * go32-nat.c (go32_sysinfo): Constify.
11919 * guile/scm-breakpoint.c (gdbscm_breakpoint_expression): Constify.
11920 * guile/scm-cmd.c (cmdscm_function): Constify.
11921 * guile/scm-param.c (pascm_param_value): Constify.
11922 * h8300-tdep.c (h8300_register_name, h8300s_register_name)
11923 (h8300sx_register_name): Constify.
11924 * hppa-tdep.c (hppa32_register_name, hppa64_register_name):
11925 Constify.
11926 * ia64-tdep.c (ia64_register_names): Constify.
11927 * infcmd.c (construct_inferior_arguments): Constify.
11928 (path_command, attach_post_wait): Constify.
11929 * language.c (show_range_command, show_case_command)
11930 (unk_lang_error): Constify.
11931 * language.h (language_defn::la_error)
11932 (language_defn::la_name_of_this): Constify.
11933 * linespec.c (decode_line_2): Constify.
11934 * linux-thread-db.c (thread_db_err_str): Constify.
11935 * lm32-tdep.c (lm32_register_name): Constify.
11936 * m2-exp.y (yyerror): Constify.
11937 * m2-lang.h (m2_yyerror): Constify.
11938 * m32r-tdep.c (m32r_register_names): Constify and make static.
11939 * m68hc11-tdep.c (m68hc11_register_names): Constify.
11940 * m88k-tdep.c (m88k_register_name): Constify.
11941 * macroexp.c (appendmem): Constify.
11942 * mdebugread.c (fdr_name, add_data_symbol, parse_type)
11943 (upgrade_type, parse_external, parse_partial_symbols)
11944 (mdebug_next_symbol_text, cross_ref, mylookup_symbol, new_psymtab)
11945 (new_symbol): Constify.
11946 * memattr.c (mem_info_command): Constify.
11947 * mep-tdep.c (register_name_from_keyword): Constify.
11948 * mi/mi-cmd-env.c (mi_cmd_env_path, _initialize_mi_cmd_env):
11949 Constify.
11950 * mi/mi-cmd-stack.c (list_args_or_locals): Constify.
11951 * mi/mi-cmd-var.c (mi_cmd_var_show_attributes): Constify.
11952 * mi/mi-main.c (captured_mi_execute_command): Constify and add
11953 cast.
11954 (mi_execute_async_cli_command): Constify.
11955 * mips-tdep.c (mips_register_name): Constify.
11956 * mn10300-tdep.c (register_name, mn10300_generic_register_name)
11957 (am33_register_name, am33_2_register_name)
11958 * moxie-tdep.c (moxie_register_names): Constify.
11959 * nat/linux-osdata.c (osdata_type): Constify fields.
11960 * nto-tdep.c (nto_parse_redirection): Constify.
11961 * objc-lang.c (lookup_struct_typedef, lookup_objc_class)
11962 (lookup_child_selector): Constify.
11963 (objc_methcall::name): Constify.
11964 * objc-lang.h (lookup_objc_class, lookup_child_selector)
11965 (lookup_struct_typedef): Constify.
11966 * objfiles.c (pc_in_section): Constify.
11967 * objfiles.h (pc_in_section): Constify.
11968 * p-exp.y (struct token::oper): Constify.
11969 (yyerror): Constify.
11970 * p-lang.h (pascal_yyerror): Constify.
11971 * parser-defs.h (op_name_standard): Constify.
11972 (op_print::string): Constify.
11973 (exp_descriptor::op_name): Constify.
11974 * printcmd.c (print_address_symbolic): Constify.
11975 * psymtab.c (print_partial_symbols): Constify.
11976 * python/py-breakpoint.c (stop_func): Constify.
11977 (bppy_get_expression): Constify.
11978 * python/py-cmd.c (cmdpy_completer::name): Constify.
11979 (cmdpy_function): Constify.
11980 * python/py-event.c (evpy_add_attribute)
11981 (gdbpy_initialize_event_generic): Constify.
11982 * python/py-event.h (evpy_add_attribute)
11983 (gdbpy_initialize_event_generic): Constify.
11984 * python/py-evts.c (add_new_registry): Constify.
11985 * python/py-finishbreakpoint.c (outofscope_func): Constify.
11986 * python/py-framefilter.c (get_py_iter_from_func): Constify.
11987 * python/py-inferior.c (get_buffer): Add cast.
11988 * python/py-param.c (parm_constant::name): Constify.
11989 * python/py-unwind.c (fprint_frame_id): Constify.
11990 * python/python.c (gdbpy_parameter_value): Constify.
11991 * remote-fileio.c (remote_fio_func_map): Make 'name' const.
11992 * remote.c (memory_packet_config::name): Constify.
11993 (show_packet_config_cmd, remote_write_bytes)
11994 (remote_buffer_add_string):
11995 * reverse.c (exec_reverse_once): Constify.
11996 * rs6000-tdep.c (variant::name, variant::description): Constify.
11997 * rust-exp.y (rustyyerror): Constify.
11998 * rust-lang.c (rust_op_name): Constify.
11999 * rust-lang.h (rustyyerror): Constify.
12000 * serial.h (serial_ops::name): Constify.
12001 * sh-tdep.c (sh_sh_register_name, sh_sh3_register_name)
12002 (sh_sh3e_register_name, sh_sh2e_register_name)
12003 (sh_sh2a_register_name, sh_sh2a_nofpu_register_name)
12004 (sh_sh_dsp_register_name, sh_sh3_dsp_register_name)
12005 (sh_sh4_register_name, sh_sh4_nofpu_register_name)
12006 (sh_sh4al_dsp_register_name): Constify.
12007 * sh64-tdep.c (sh64_register_name): Constify.
12008 * solib-darwin.c (lookup_symbol_from_bfd): Constify.
12009 * spu-tdep.c (spu_register_name, info_spu_dma_cmdlist): Constify.
12010 * stabsread.c (patch_block_stabs, read_type_number)
12011 (ref_map::stabs, ref_add, process_reference)
12012 (symbol_reference_defined, define_symbol, define_symbol)
12013 (error_type, read_type, read_member_functions, read_cpp_abbrev)
12014 (read_one_struct_field, read_struct_fields, read_baseclasses)
12015 (read_tilde_fields, read_struct_type, read_array_type)
12016 (read_enum_type, read_sun_builtin_type, read_sun_floating_type)
12017 (read_huge_number, read_range_type, read_args, common_block_start)
12018 (find_name_end): Constify.
12019 * stabsread.h (common_block_start, define_symbol)
12020 (process_one_symbol, symbol_reference_defined, ref_add):
12021 * symfile.c (get_section_index, add_symbol_file_command):
12022 * symfile.h (get_section_index): Constify.
12023 * target-descriptions.c (tdesc_type::name): Constify.
12024 (tdesc_free_type): Add cast.
12025 * target.c (find_default_run_target):
12026 (add_deprecated_target_alias, find_default_run_target)
12027 (target_announce_detach): Constify.
12028 (do_option): Constify.
12029 * target.h (add_deprecated_target_alias): Constify.
12030 * thread.c (print_thread_info_1): Constify.
12031 * top.c (deprecated_readline_begin_hook, command_line_input):
12032 Constify.
12033 (init_main): Add casts.
12034 * top.h (handle_line_of_input): Constify.
12035 * tracefile-tfile.c (tfile_write_uploaded_tsv): Constify.
12036 * tracepoint.c (tvariables_info_1, trace_status_mi): Constify.
12037 (tfind_command): Rename to ...
12038 (tfind_command_1): ... this and constify.
12039 (tfind_command): New function.
12040 (tfind_end_command, tfind_start_command): Adjust.
12041 (encode_source_string): Constify.
12042 * tracepoint.h (encode_source_string): Constify.
12043 * tui/tui-data.c (tui_partial_win_by_name): Constify.
12044 * tui/tui-data.h (tui_partial_win_by_name): Constify.
12045 * tui/tui-source.c (tui_set_source_content_nil): Constify.
12046 * tui/tui-source.h (tui_set_source_content_nil): Constify.
12047 * tui/tui-win.c (parse_scrolling_args): Constify.
12048 * tui/tui-windata.c (tui_erase_data_content): Constify.
12049 * tui/tui-windata.h (tui_erase_data_content): Constify.
12050 * tui/tui-winsource.c (tui_erase_source_content): Constify.
12051 * tui/tui.c (tui_enable): Add cast.
12052 * utils.c (defaulted_query): Constify.
12053 (init_page_info): Add cast.
12054 (puts_debug, subset_compare): Constify.
12055 * utils.h (subset_compare): Constify.
12056 * varobj.c (varobj_format_string): Constify.
12057 * varobj.h (varobj_format_string): Constify.
12058 * vax-tdep.c (vax_register_name): Constify.
12059 * windows-nat.c (windows_detach): Constify.
12060 * xcoffread.c (process_linenos, xcoff_next_symbol_text): Constify.
12061 * xml-support.c (gdb_xml_end_element): Constify.
12062 * xml-tdesc.c (tdesc_start_reg): Constify.
12063 * xstormy16-tdep.c (xstormy16_register_name): Constify.
12064 * xtensa-tdep.c (xtensa_find_register_by_name): Constify.
12065 * xtensa-tdep.h (xtensa_register_t::name): Constify.
12066
995816ba
PA
120672017-04-05 Pedro Alves <palves@redhat.com>
12068
12069 * proc-api.c (struct trans): Constify.
12070 (procfs_note): Constify.
12071 * proc-events.c (struct trans, syscall_table):
12072 * proc-flags.c (struct trans): Constify.
12073 * proc-utils.h (procfs_note): Constify.
12074 * proc-why.c (struct trans): Constify.
12075 * procfs.c (dead_procinfo, find_syscall, proc_warn, proc_error)
12076 (procfs_detach): Constify.
12077 * sol-thread.c (struct string_map): Constify.
12078 (td_err_string, td_state_string): Constify.
12079
3e83a920
PA
120802017-04-05 Pedro Alves <palves@redhat.com>
12081
12082 * proc-api.c (procfs_filename): Don't initialize
12083 procfs_filename.
12084 (prepare_to_trace): Assume procfs_filename is non-NULL.
12085 (_initialize_proc_api): Give procfs_filename a default value here.
12086
63160a43
PA
120872017-04-05 Pedro Alves <palves@redhat.com>
12088
12089 * break-catch-throw.c (handle_gnu_v3_exceptions): Constify
12090 'cond_string' parameter.
12091 (extract_exception_regexp): Constify 'string' parameter.
12092 (catch_exception_command_1): Constify.
12093 * breakpoint.c (init_catchpoint)
12094 (create_fork_vfork_event_catchpoint): Constify 'cond_string'
12095 parameter.
12096 (ep_parse_optional_if_clause, catch_fork_command_1)
12097 (catch_exec_command_1): Constify.
12098 * breakpoint.h (init_catchpoint): Constify 'cond_string'
12099 parameter.
12100 (ep_parse_optional_if_clause): Constify.
12101 * cli/cli-utils.c (remove_trailing_whitespace)
12102 (check_for_argument): Constify.
12103 * cli/cli-utils.h (remove_trailing_whitespace): Constify and add
12104 non-const overload.
12105 (check_for_argument): Likewise.
12106
9b2eba3d
PA
121072017-04-05 Pedro Alves <palves@redhat.com>
12108
12109 * event-top.c (command_line_handler): Add cast to execute_command
12110 call.
12111 * record-btrace.c (cmd_record_btrace_bts_start)
12112 (cmd_record_btrace_pt_start, cmd_record_btrace_start)
12113 (cmd_record_btrace_start): Add cast to execute_command call.
12114 * record-full.c (record_full_goto_insn):
12115 * record.c (record_start, record_stop): Add cast to
12116 execute_command_to_string calls.
12117 (cmd_record_start): Add cast to execute_command calls.
12118
2adadf51
PA
121192017-04-05 Pedro Alves <palves@redhat.com>
12120
12121 * python/python-internal.h (gdb_PyArg_ParseTupleAndKeywords): New
12122 static inline function.
12123 * python/py-arch.c (archpy_disassemble): Constify 'keywords'
12124 array and use gdb_PyArg_ParseTupleAndKeywords.
12125 * python/py-cmd.c (cmdpy_init): Likewise.
12126 * python/py-finishbreakpoint.c (bpfinishpy_init): Likewise.
12127 * python/py-inferior.c (infpy_read_memory, infpy_write_memory)
12128 (infpy_search_memory): Likewise.
12129 * python/py-objfile.c (objfpy_add_separate_debug_file)
12130 (gdbpy_lookup_objfile): Likewise.
12131 * python/py-symbol.c (gdbpy_lookup_symbol)
12132 (gdbpy_lookup_global_symbol): Likewise.
12133 * python/py-type.c (gdbpy_lookup_type): Likewise.
12134 * python/py-value.c (valpy_lazy_string, valpy_string): Likewise.
12135 * python/python.c (execute_gdb_command, gdbpy_write, gdbpy_flush):
12136 Likewise.
12137
0d1f4ceb
PA
121382017-04-05 Pedro Alves <palves@redhat.com>
12139
12140 * python/python-internal.h (gdb_PyGetSetDef): New type.
12141 * python/py-block.c (block_object_getset)
12142 (breakpoint_object_getset): Now a gdb_PyGetSetDef array.
12143 * python/py-event.c (event_object_getset)
12144 (finish_breakpoint_object_getset): Likewise.
12145 * python/py-inferior.c (inferior_object_getset): Likewise.
12146 * python/py-infthread.c (thread_object_getset): Likewise.
12147 * python/py-lazy-string.c (lazy_string_object_getset): Likewise.
12148 * python/py-linetable.c (linetable_entry_object_getset): Likewise.
12149 * python/py-objfile.c (objfile_getset): Likewise.
12150 * python/py-progspace.c (pspace_getset): Likewise.
12151 * python/py-record-btrace.c (btpy_insn_getset, btpy_call_getset):
12152 Likewise.
12153 * python/py-record.c (recpy_record_getset): Likewise.
12154 * python/py-symbol.c (symbol_object_getset): Likewise.
12155 * python/py-symtab.c (symtab_object_getset, sal_object_getset):
12156 Likewise.
12157 * python/py-type.c (type_object_getset, field_object_getset):
12158 Likewise.
12159 * python/py-value.c (value_object_getset): Likewise.
12160
4d759979
PA
121612017-04-05 Pedro Alves <palves@redhat.com>
12162
12163 * python/python-internal.h (gdb_PyObject_CallMethod)
12164 (gdb_PyErr_NewException, gdb_PySys_GetObject, gdb_PySys_SetPath):
12165 New functions.
12166 (GDB_PYSYS_SETPATH_CHAR, PyObject_CallMethod, PyErr_NewException)
12167 (PySys_GetObject, PySys_SetPath): New macros.
12168
fdf9e36f
PA
121692017-04-05 Pedro Alves <palves@redhat.com>
12170
12171 * mi/mi-cmd-info.c (mi_cmd_info_os): Call info_osdata instead of
12172 info_osdata_command.
12173 * osdata.c (info_osdata_command): Rename to ...
12174 (info_osdata): ... this. Constify 'type' parameter, and remove
12175 the 'from_tty' parameter. Accept NULL TYPE.
12176 (info_osdata_command): New function.
12177 * osdata.h (info_osdata_command): Remove declaration.
12178 (info_osdata): New declaration.
12179
9f33b8b7
PA
121802017-04-05 Pedro Alves <palves@redhat.com>
12181
12182 * mi/mi-cmd-break.c (mi_cmd_break_insert_1, mi_cmd_break_insert)
12183 (mi_cmd_dprintf_insert, mi_cmd_break_passcount)
12184 (mi_cmd_break_watch, mi_cmd_break_commands): Constify 'command'
12185 parameter.
12186 * mi/mi-cmd-catch.c (mi_cmd_catch_assert, mi_cmd_catch_exception)
12187 (mi_cmd_catch_load, mi_cmd_catch_unload): Constify cmd' parameter.
12188 * mi/mi-cmd-disas.c (mi_cmd_disassemble): Constify 'command'
12189 parameter.
12190 * mi/mi-cmd-env.c (mi_cmd_env_pwd, mi_cmd_env_cd, mi_cmd_env_path)
12191 (mi_cmd_env_dir, mi_cmd_inferior_tty_set, _cmd_inferior_tty_show)
12192 * mi/mi-cmd-file.c (mi_cmd_file_list_exec_source_file)
12193 (mi_cmd_file_list_exec_source_files)
12194 (mi_cmd_file_list_shared_libraries): Constify 'command' parameter.
12195 * mi/mi-cmd-info.c (mi_cmd_info_ada_exceptions)
12196 (mi_cmd_info_gdb_mi_command, mi_cmd_info_os): Constify 'command'
12197 parameter.
12198 * mi/mi-cmd-stack.c (mi_cmd_enable_frame_filters)
12199 (mi_cmd_stack_list_frames, mi_cmd_stack_info_depth)
12200 (mi_cmd_stack_list_locals, mi_cmd_stack_list_args)
12201 (mi_cmd_stack_list_variables, mi_cmd_stack_select_frame)
12202 (mi_cmd_stack_info_frame): Constify 'command' parameter.
12203 * mi/mi-cmd-target.c (mi_cmd_target_file_get)
12204 (mi_cmd_target_file_put, mi_cmd_target_file_delete): Constify
12205 'command' parameter.
12206 * mi/mi-cmd-var.c (mi_cmd_var_create, mi_cmd_var_delete)
12207 (mi_cmd_var_set_format, mi_cmd_var_set_visualizer)
12208 (mi_cmd_var_set_frozen, mi_cmd_var_show_format)
12209 (mi_cmd_var_info_num_children, mi_cmd_var_list_children)
12210 (mi_cmd_var_info_type, mi_cmd_var_info_path_expression)
12211 (mi_cmd_var_info_expression, mi_cmd_var_show_attributes)
12212 (mi_cmd_var_evaluate_expression, mi_cmd_var_assign)
12213 (mi_cmd_var_update, mi_cmd_enable_pretty_printing)
12214 (mi_cmd_var_set_update_range): Constify 'command' parameter.
12215 * mi/mi-cmds.h (mi_cmd_argv_ftype): Constify 'command' parameter.
12216 * mi/mi-interp.c (mi_cmd_interpreter_exec): Constify 'command'
12217 parameter.
12218 * mi/mi-main.c (mi_cmd_gdb_exit, mi_cmd_exec_next)
12219 (mi_cmd_exec_next_instruction, mi_cmd_exec_step)
12220 (mi_cmd_exec_step_instruction, mi_cmd_exec_finish)
12221 (mi_cmd_exec_return ,mi_cmd_exec_jump, mi_cmd_exec_continue)
12222 (mi_cmd_exec_interrupt, mi_cmd_exec_run, mi_cmd_target_detach)
12223 (mi_cmd_target_flash_erase, mi_cmd_thread_select)
12224 (mi_cmd_thread_list_ids, mi_cmd_thread_info)
12225 (mi_cmd_list_thread_groups, mi_cmd_data_list_register_names)
12226 (mi_cmd_data_list_changed_registers)
12227 (mi_cmd_data_write_register_values)
12228 (mi_cmd_data_evaluate_expression, mi_cmd_data_read_memory)
12229 (mi_cmd_data_read_memory_bytes, mi_cmd_data_write_memory)
12230 (mi_cmd_data_write_memory_bytes, mi_cmd_enable_timings)
12231 (mi_cmd_list_features, mi_cmd_list_target_features)
12232 (mi_cmd_add_inferior, mi_cmd_remove_inferior)
12233 (mi_cmd_trace_define_variable, mi_cmd_trace_list_variables)
12234 (mi_cmd_trace_find, mi_cmd_trace_save, mi_cmd_trace_start)
12235 (mi_cmd_trace_status, mi_cmd_trace_stop, mi_cmd_ada_task_info)
12236 (mi_cmd_trace_frame_collected): Constify 'command'
12237 parameter.
12238 * mi/mi-symbol-cmds.c (mi_cmd_symbol_list_lines): Constify
12239 'command' parameter.
12240
67cb5b2d
PA
122412017-04-05 Pedro Alves <palves@redhat.com>
12242
12243 * ada-lang.c (ada_completer_word_break_characters): Now a const
12244 array.
12245 (ada_get_gdb_completer_word_break_characters): Constify.
12246 * completer.c (gdb_completer_command_word_break_characters)
12247 (gdb_completer_file_name_break_characters)
12248 (gdb_completer_quote_characters): Now const arrays.
12249 (get_gdb_completer_quote_characters): Constify.
12250 (set_rl_completer_word_break_characters): New function.
12251 (set_gdb_completion_word_break_characters)
12252 (complete_line_internal): Use it.
12253 * completer.h (get_gdb_completer_quote_characters): Constify.
12254 (set_rl_completer_word_break_characters): Declare.
12255 * f-lang.c (f_word_break_characters): Constify.
12256 * language.c (default_word_break_characters): Constify.
12257 * language.h (language_defn::la_word_break_characters): Constify.
12258 (default_word_break_characters): Constify.
12259 * top.c (init_main): Use set_rl_completer_word_break_characters.
12260
7a114964
PA
122612017-04-05 Pedro Alves <palves@redhat.com>
12262
12263 * aix-thread.c (aix_thread_pid_to_str)
12264 (aix_thread_extra_thread_info): Constify.
12265 * bsd-kvm.c (bsd_kvm_pid_to_str): Constify.
12266 * bsd-uthread.c (bsd_uthread_extra_thread_info)
12267 (bsd_uthread_pid_to_str): Constify.
12268 * corelow.c (core_pid_to_str): Constify.
12269 * darwin-nat.c (darwin_pid_to_str): Constify.
12270 * fbsd-nat.c (fbsd_pid_to_str): Constify.
12271 * fbsd-tdep.c (fbsd_core_pid_to_str, gdbarch_core_pid_to_str):
12272 Constify.
12273 * gnu-nat.c (gnu_pid_to_str): Constify.
12274 * go32-nat.c (go32_pid_to_str): Constify.
12275 * i386-cygwin-tdep.c (i386_windows_core_pid_to_str): Constify.
12276 * inf-ptrace.c (inf_ptrace_pid_to_str): Constify.
12277 * inferior.c (inferior_pid_to_str): Constify.
12278 * linux-nat.c (linux_nat_pid_to_str): Constify.
12279 * linux-tdep.c (linux_core_pid_to_str): Constify.
12280 * linux-thread-db.c (thread_db_pid_to_str)
12281 (thread_db_extra_thread_info): Constify.
12282 * nto-tdep.c (nto_extra_thread_info): Constify.
12283 * nto-tdep.h (nto_extra_thread_info): Constify.
12284 * obsd-nat.c (obsd_pid_to_str): Constify.
12285 * procfs.c (procfs_pid_to_str): Constify.
12286 * ravenscar-thread.c (ravenscar_extra_thread_info)
12287 (ravenscar_pid_to_str): Constify.
12288 * remote-sim.c (gdbsim_pid_to_str): Constify.
12289 * remote.c (remote_threads_extra_info, remote_pid_to_str):
12290 Constify.
12291 * sol-thread.c (solaris_pid_to_str): Constify.
12292 * sol2-tdep.c (sol2_core_pid_to_str): Constify.
12293 * sol2-tdep.h (sol2_core_pid_to_str): Constify.
12294 * target.c (default_pid_to_str, target_pid_to_str)
12295 (normal_pid_to_str, default_pid_to_str): Constify.
12296 * target.h (target_ops::to_pid_to_str)
12297 (target_ops::to_extra_thread_info): Constify.
12298 (target_pid_to_str, normal_pid_to_str): Constify.
12299 * windows-nat.c (windows_pid_to_str): Constify.
12300 * gdbarch.sh (core_pid_to_str): Constify.
12301 * target-delegates.c: Regenerate.
12302 * gdbarch.h, gdbarch.c: Regenerate.
12303
69bbf465
PA
123042017-04-05 Pedro Alves <palves@redhat.com>
12305
12306 * main.c (captured_main_1): Use gdb::unique_xmalloc_ptr to manage
12307 the memory of the temporary warning_pre_print override.
12308 * utils.c (warning_pre_print): Constify.
12309 * utils.h (warning_pre_print): Constify.
12310
be47f9e8
PA
123112017-04-05 Pedro Alves <palves@redhat.com>
12312
12313 * cli/cli-cmds.c (shell_escape): Constify 'arg' parameter.
12314 (shell_command): New function.
12315 (make_command): Use std::string.
12316 (init_cli_cmds): Register shell_command instead of shell_escape.
12317
bde6261a
PA
123182017-04-05 Pedro Alves <palves@redhat.com>
12319
12320 * breakpoint.c (dprintf_function, dprintf_channel): Don't initialize.
12321 * tracepoint.c (default_collect): Don't initialize.
12322
b38ef47f
PA
123232017-04-05 Pedro Alves <palves@redhat.com>
12324
12325 * macroexp.c (macro_buffer::shared): Now a bool.
12326 (init_buffer): Update.
12327 (init_shared_buffer): Constify 'addr' parameter.
12328 (substitute_args, expand, macro_expand, macro_expand_next): Remove
12329 casts.
12330
f995bbe8
PA
123312017-04-05 Pedro Alves <palves@redhat.com>
12332
12333 * arm-tdep.c (show_disassembly_style_sfunc): Constify local.
12334 * disasm.c (set_disassembler_options): Constify local.
12335 * i386-tdep.c (i386_print_insn): Remove cast and FIXME comment.
12336
4a596fe2
SDJ
123372017-04-05 Sergio Durigan Junior <sergiodj@redhat.com>
12338
12339 PR gdb/21352
12340 * tracefile.c (tsave_command): Fix argument parsing for '-r'
12341 option.
12342
2cad08ea
YQ
123432017-04-05 Yao Qi <yao.qi@linaro.org>
12344
12345 * frame.c (frame_unwind_register_unsigned): Call
12346 frame_unwind_register_value.
12347
55a98976
YQ
123482017-04-05 Yao Qi <yao.qi@linaro.org>
12349
12350 * gdb.threads/thread-specific-bp.exp (check_thread_specific_breakpoint):
12351 Use gdb_test_multiple, and don't match anchor.
12352
4ac40124
PA
123532017-04-05 Pedro Alves <palves@redhat.com>
12354
12355 * MAINTAINERS (Global Maintainers): Add Simon Marchi.
12356 (Write After Approval): Remove Simon Marchi.
12357
c053b654
PA
123582017-04-05 Pedro Alves <palves@redhat.com>
12359
12360 * common/gdb_optional.h (optional::optional): Make constexpr and
12361 initialize m_dummy.
12362
4c7bf4f9
JB
123632017-04-04 John Baldwin <jhb@FreeBSD.org>
12364
12365 * amd64-fbsd-tdep.c: Remove "bsd-uthread.h" include.
12366 (amd64fbsd_jmp_buf_reg_offset): Remove.
12367 (amd64fbsd_supply_uthread): Remove function.
12368 (amd64fbsd_collect_uthread): Remove function.
12369 (amd64fbsd_init_abi): Don't set bsd-uthread callbacks.
12370 * configure.tgt (i[34567]86-*-freebsd*): Remove bsd-uthread.o.
12371 (x86_64-*-freebsd*): Remove bsd-uthread.o.
12372 (fbsd-nat.c): Update comment.
12373 * i386-fbsd-tdep.c: Remove "bsd-uthread.h" include.
12374 (i386fbsd_jmp_buf_reg_offset): Remove.
12375 (i386fbsd_supply_uthread): Remove function.
12376 (i386fbsd_collect_uthread): Remove function.
12377 (i386fbsd_init_abi): Don't set bsd-uthread callbacks.
12378
1e1a8bef
JB
123792017-04-04 John Baldwin <jhb@FreeBSD.org>
12380
12381 * Makefile.in (ALL_64_TARGET_OBS): Remove alpha-fbsd-tdep.o.
12382 (ALLDEPFILES): Remove alpha-fbsd-tdep.c
12383 * NEWS: Mention that support for FreeBSD/alpha was removed.
12384 * alpha-fbsd-tdep.c: Delete file.
12385 * config/alpha/fbsd.mh: Delete file.
12386 * configure.host: Delete alpha*-*-freebsd* and
12387 alpha*-*-kfreebsd*-gnu.
12388 * configure.tgt: Delete alpha*-*-freebsd* and
12389 alpha*-*-kfreebsd*-gnu.
12390
49907934
JB
123912017-04-04 John Baldwin <jhb@FreeBSD.org>
12392
12393 * amd64-bsd-nat.c (amd64bsd_fetch_inferior_registers,
12394 amd64bsd_store_inferior_registers): Use ptid from regcache.
12395
6f77053d
PA
123962017-04-04 Pedro Alves <palves@redhat.com>
12397
12398 * dwarf2read.c (lnp_state_machine): Now a class. Initialize all
12399 data fields, make them private and add "m_" prefixes.
12400 (lnp_state_machine::lnp_state_machine): New ctor.
12401 (record_line, check_line_address, handle_set_discriminator)
12402 (handle_set_address, handle_advance_pc, handle_special_opcode)
12403 (handle_advance_line, handle_set_file, handle_negate_stmt)
12404 (handle_const_add_pc, handle_fixed_advance_pc, handle_copy)
12405 (end_sequence, advance_line): New methods.
12406 (m_gdbarch, m_record_lines_p): New fields.
12407 (lnp_reader_state): Delete.
12408 (dwarf_record_line): Rename to ...
12409 (lnp_state_machine::record_line): ... adjust.
12410 (init_lnp_state_machine): Delete.
12411 (lnp_state_machine::lnp_state_machine): New.
12412 (check_line_address): Rename to ...
12413 (lnp_state_machine::check_line_address): This.
12414 (dwarf_decode_lines_1): Remove reference to "reader_state".
12415 Adjust lnp_state_machine having a non-default ctor. Use bool.
12416 State machine internal state manipulation moved to
12417 lnp_state_machine methods.
12418
9c541725
PA
124192017-04-04 Pedro Alves <palves@redhat.com>
12420
12421 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
12422 unittests/offset-type-selftests.c.
12423 (SUBDIR_UNITTESTS_OBS): Add offset-type-selftests.o.
12424 * common/offset-type.h: New file.
12425 * common/preprocessor.h: New file.
12426 * common/traits.h: New file.
12427 * common/valid-expr.h: New file.
12428 * dwarf2expr.c: Include "common/underlying.h". Adjust to use
12429 sect_offset and cu_offset strong typedefs throughout.
12430 * dwarf2expr.h: Adjust to use sect_offset and cu_offset strong
12431 typedefs throughout.
12432 * dwarf2loc.c: Include "common/underlying.h". Adjust to use
12433 sect_offset and cu_offset strong typedefs throughout.
12434 * dwarf2read.c: Adjust to use sect_offset and cu_offset strong
12435 typedefs throughout.
12436 * gdbtypes.h: Include "common/offset-type.h".
12437 (cu_offset): Now an offset type (strong typedef) instead of a
12438 struct.
12439 (sect_offset): Likewise.
12440 (union call_site_parameter_u): Rename "param_offset" field to
12441 "param_cu_off".
12442 * unittests/offset-type-selftests.c: New file.
12443
ecfb656c
PA
124442017-04-04 Pedro Alves <palves@redhat.com>
12445
12446 * common/underlying.h: New file.
12447 * dwarf2read.c: Include "common/gdb_optional.h" and
12448 "common/underlying.h".
12449 (dir_index, file_name_index): New types.
12450 (file_entry): Use them.
12451 (file_entry::include): Use to_underlying.
12452 (line_header::add_file_name): Use dir_index.
12453 (read_formatted_entries): Use gdb::optional. Read form before
12454 writting to file_entry.
12455 (dwarf_decode_line_header): Use dir_index.
12456 (lnp_state_machine::current_file): Use to_underlying.
12457 (lnp_state_machine::file): Change type to file_name_index.
12458 (dwarf_record_line): Use to_underlying.
12459 (init_lnp_state_machine): Use file_name_index.
12460 (dwarf_decode_lines_1): Use dir_index and file_name_index.
12461
d194f1fe
PA
124622017-04-04 Pedro Alves <palves@redhat.com>
12463
12464 * common/gdb_optional.h (gdb::optiona): Add operator->, operator*,
12465 operator bool, has_value and get methods.
12466
fff8551c
PA
124672017-04-04 Pedro Alves <palves@redhat.com>
12468
12469 * dwarf2read.c (struct file_entry): Add ctors, and initialize all
12470 fields.
12471 (line_header): Initialize all data fields. Change type of
12472 standard_opcode_lengths to std::unique_ptr<unsigned char[]>.
12473 Change type of include_dirs to std::vector<const char *>. Remove
12474 num_include_dirs, include_dirs_size. Change type of file_names to
12475 std::vector<file_entry>. Remove num_file_names, file_names_size.
12476 (line_header::line_header): New.
12477 (line_header::add_include_dir, line_header::add_file_name): New
12478 methods.
12479 (line_header::include_dir_at): Remove NULL check.
12480 (line_header::file_name_at): Add const overload.
12481 (line_header_up): New unique_ptr typedef.
12482 (dw2_get_file_names_reader): Use line_header_up. Adjust to use
12483 std::vector. Remove free_line_header call.
12484 (dwarf2_build_include_psymtabs): Use line_header_up. Remove
12485 free_line_header call.
12486 (free_cu_line_header): Delete.
12487 (handle_DW_AT_stmt_list, handle_DW_AT_stmt_list)
12488 (setup_type_unit_groups): Use line_header_up instead of cleanups.
12489 Adjust to use std::vector.
12490 (free_line_header): Delete.
12491 (free_line_header_voidp): Use delete.
12492 (add_include_dir): Replace with ...
12493 (line_header::add_include_dir): ... this method. Use std::vector.
12494 (add_file_name): Replace with ...
12495 (line_header::add_file_name): ... this method. Use std::vector.
12496 (add_include_dir_stub): Delete.
12497 (read_formatted_entries): Remove memset.
12498 (dwarf_decode_line_header): Return a line_header_up instead of a
12499 raw pointer. Remove cleanup handling. Pass lambdas to
12500 read_formatted_entries. Adjust to use line_header methods.
12501 (dwarf_decode_lines_1): Adjust to use line_header methods.
12502 (dwarf_decode_lines, file_file_name, file_full_name): Adjust to
12503 use std::vector.
12504
d62a8ae2
SM
125052017-04-04 Simon Marchi <simon.marchi@polymtl.ca>
12506
12507 * remote.c (set_general_thread, set_continue_thread): Use ptid_t
12508 instead of struct ptid.
12509
db3a1dc7
AH
125102017-05-04 Alan Hayward <alan.hayward@arm.com>
12511
12512 * frame.c (get_frame_register_bytes): Unwind using value.
12513 (put_frame_register_bytes): Likewise.
12514
b1b45502
IB
125152017-03-30 Iain Buclaw <ibuclaw@gdcproject.org>
12516
12517 * d-exp.y (type_aggregate_p): Treat TYPE_CODE_MODULE as being
12518 aggregate-like.
12519
ec13808e
JK
125202017-03-29 Jan Kratochvil <jan.kratochvil@redhat.com>
12521
12522 * auto-load.c (auto_load_section_scripts): Check SEC_HAS_CONTENTS.
12523
12316564
YQ
125242017-03-29 Yao Qi <yao.qi@linaro.org>
12525
12526 * gdbthread.h (struct thread_info): Declare constructor and
12527 destructor. Add some in-class member initializers.
12528 * thread.c (free_thread): Remove.
12529 (init_thread_list): Call delete instead of free_thread.
12530 (new_thread): Call thread_info constructor.
12531 (thread_info::thread_info): New function.
12532 (thread_info::~thread_info): New function.
12533 (delete_thread_1): Call delete instead of free_thread.
12534 (make_cleanup_restore_current_thread): Move tp and frame to
12535 inner block.
12536
fe5f7374
AK
125372017-03-28 Anton Kolesov <anton.kolesov@synopsys.com>
12538
12539 * arc-tdep.c (arc_frame_cache): Add support for prologue analysis.
12540 (arc_skip_prologue): Likewise.
12541 (arc_make_frame_cache): Likewise.
12542 (arc_pv_get_operand): New function.
12543 (arc_is_in_prologue): Likewise.
12544 (arc_analyze_prologue): Likewise.
12545 (arc_print_frame_cache): Likewise.
12546 (MAX_PROLOGUE_LENGTH): New constant.
12547
eea78757
AK
125482017-03-28 Anton Kolesov <anton.kolesov@synopsys.com>
12549
12550 * configure.tgt: Add arc-insn.o.
12551 * arc-tdep.c (arc_delayed_print_insn): Make non-static.
12552 (dump_arc_instruction_command): New function.
12553 (arc_fprintf_disasm): Likewise.
12554 (arc_disassemble_info): Likewise.
12555 (arc_insn_get_operand_value): Likewise.
12556 (arc_insn_get_operand_value_signed): Likewise.
12557 (arc_insn_get_memory_base_reg): Likewise.
12558 (arc_insn_get_memory_offset): Likewise.
12559 (arc_insn_get_branch_target): Likewise.
12560 (arc_insn_dump): Likewise.
12561 (arc_insn_get_linear_next_pc): Likewise.
12562 * arc-tdep.h (arc_delayed_print_insn): Add function declaration.
12563 (arc_disassemble_info): Likewise.
12564 (arc_insn_get_branch_target): Likewise.
12565 (arc_insn_get_linear_next_pc): Likewise.
12566 * NEWS: Mention new "maint print arc arc-instruction".
12567
3be78afd
AK
125682017-03-28 Anton Kolesov <anton.kolesov@synopsys.com>
12569
12570 * arc-tdep (maintenance_print_arc_list): New variable.
12571 (maintenance_print_arc_command): New function.
12572
296ec4fa
AK
125732017-03-28 Anton Kolesov <anton.kolesov@synopsys.com>
12574
12575 * arc-tdep.c (core_v2_register_names, core_arcompact_register_names)
12576 Add "limm" and "reserved".
12577 (arc_cannot_fetch_register, arc_cannot_store_register): Add
12578 ARC_RESERVED_REGNUM and ARC_LIMM_REGNUM.
12579 * arc-tdep.h (arc_regnum): Likewise.
12580
f74f865e
MF
125812017-03-27 Max Filippov <jcmvbkbc@gmail.com>
12582
12583 * xtensa-linux-nat.c (fill_gregset): Call regcache_raw_collect
12584 for THREADPTR register.
12585 (supply_gregset_reg): Call regcache_raw_supply for THREADPTR
12586 register.
12587 * xtensa-tdep.c (XTENSA_DBREGN_UREG): New definition.
12588 (xtensa_derive_tdep): Initialize tdep->threadptr_regnum.
12589 * xtensa-tdep.h (gdbarch_tdep::threadptr_regnum): New field.
12590
0d0bf81a
MF
125912017-03-27 Max Filippov <jcmvbkbc@gmail.com>
12592
12593 * xtensa-tdep.c (xtensa_pseudo_register_read): Treat all
12594 registers above gdbarch_num_regs (gdbarch) as privileged in
12595 call0 ABI.
12596
0ce4291e
MF
125972017-03-27 Max Filippov <jcmvbkbc@gmail.com>
12598
12599 * xtensa-linux-nat.c (fill_gregset): Call regcache_raw_collect
12600 for a single specified register or for all registers in
12601 a0_base..a0_base + C0_NREGS range.
12602 (supply_gregset_reg): Call regcache_raw_supply for a single
12603 specified register or for all registers in a0_base..a0_base +
12604 C0_NREGS range.
12605
c56054f9
MF
126062017-03-27 Max Filippov <jcmvbkbc@gmail.com>
12607
12608 * arch/xtensa.h (C0_NREGS): Add definition.
12609 * xtensa-tdep.c (C0_NREGS): Remove definition.
12610
a4398628
MF
126112017-03-27 Max Filippov <jcmvbkbc@gmail.com>
12612
12613 * xtensa-tdep.c (xtensa_scan_prologue, call0_analyze_prologue):
12614 Drop xtensa_default_isa initialization.
12615 (xtensa_gdbarch_init): Initialize xtensa_default_isa.
12616
8c43009f
PA
126172017-03-27 Pedro Alves <palves@redhat.com>
12618
12619 * dwarf2read.c (file_entry) <dir_index>: Add comment.
12620 (file_entry::include_dir): New method.
12621 (line_header::include_dir_at, line_header::file_name_at): New
12622 methods.
12623 (setup_type_unit_groups, setup_type_unit_groups)
12624 (psymtab_include_file_name): Simplify using the new methods.
12625 (lnp_state_machine) <the_line_header>: New field.
12626 <file>: Add comment.
12627 (lnp_state_machine::current_file): New method.
12628 (dwarf_record_line): Simplify using the new methods.
12629 (init_lnp_state_machine): Initialize the "the_line_header" field.
12630 (dwarf_decode_lines_1, dwarf_decode_lines, file_file_name):
12631 Simplify using the new methods.
12632
a7e80b9e
PA
126332017-03-27 Pedro Alves <palves@redhat.com>
12634
12635 * cp-name-parser.y (make_empty): Delete.
12636 (demangler_special, nested_name, ptr_operator, array_indicator)
12637 (direct_declarator, declarator_1): Use fill_comp instead of
12638 make_empty.
12639
21047726
PA
126402017-03-27 Pedro Alves <palves@redhat.com>
12641
12642 * xml-support.h (gdb_xml_debug): Pass a "first-to-check" argument
12643 to ATTRIBUTE_PRINTF.
12644 * solib-target.c (library_list_start_list): Print "string" not
12645 "version".
12646 * xml-tdesc.c (tdesc_start_field): Pass "field_name" to
12647 gdb_xml_error call.
12648
d721ba37
PA
126492017-03-27 Pedro Alves <palves@redhat.com>
12650
12651 * dwarf2read.c (struct file_and_directory): New.
12652 (dwarf2_get_dwz_file): Adjust to use std::string.
12653 (dw2_get_file_names_reader): Adjust to use file_and_directory.
12654 (find_file_and_directory): Adjust to return a file_and_directory
12655 object.
12656 (read_file_scope): Adjust to use file_and_directory. Remove
12657 make_cleanup/do_cleanups calls.
12658 (open_and_init_dwp_file): Adjust to use std::string. Remove
12659 make_cleanup/do_cleanups calls.
12660 * python/python.c (do_start_initialization): Adjust to ldirname
12661 returning a std::string.
12662 * utils.c (ldirname): Now returns a std::string.
12663 * utils.h (ldirname): Change return type to std::string.
12664 * xml-syscall.c (xml_init_syscalls_info): Adjust to ldirname
12665 returning a std::string.
12666 * xml-tdesc.c (file_read_description_xml): Likewise.
12667
ed771251
AH
126682017-03-24 Alan Hayward <alan.hayward@arm.com>
12669
12670 * regcache.c (regcache_debug_print_register): New function.
12671 * regcache.h (regcache_debug_print_register): New declaration.
12672 * target.c (debug_print_register): Remove.
12673 (target_fetch_registers): Call regcache_debug_print_register.
12674 (target_store_registers): Likewise.
12675
568c1b9f
PB
126762017-03-24 Pádraig Brady <pbrady@fb.com>
12677
12678 * dwarf2read.c (setup_type_unit_groups): Ensure dir_index doesn't
12679 reference beyond the 'lh->include_dirs' array before accessing to
12680 it.
12681 (psymtab_include_file_name): Likewise.
12682 (dwarf_decode_lines_1): Likewise.
12683 (dwarf_decode_lines): Likewise.
12684 (file_file_name): Likewise.
12685
3e00d44f
SM
126862017-03-23 Simon Marchi <simon.marchi@ericsson.com>
12687
12688 * fbsd-tdep.c (fbsd_corefile_thread): Don't set/restore
12689 inferior_ptid.
12690 * proc-service.c (ps_lgetregs, ps_lsetregs, ps_lgetfpregs,
12691 ps_lsetfpregs): Likewise.
12692 * regcache.c (regcache_raw_update, regcache_raw_write): Likewise.
12693 * sol-thread.c (ps_lgetregs, ps_lsetregs, ps_lgetfpregs,
12694 ps_lsetfpregs): Likewise.
12695 * target.c (target_fetch_registers, target_store_registers):
12696 Remove asserts.
12697
077ae656
AH
126982017-03-23 Alan Hayward <alan.hayward@arm.com>
12699
12700 * sol-thread.c (sol_thread_store_registers): Remove regcache calls.
12701
1e2b521d
YQ
127022017-03-23 Yao Qi <yao.qi@linaro.org>
12703
12704 * aarch64-tdep.c (aarch64_process_record_test): Declare.
12705 (_initialize_aarch64_tdep): Register it.
12706 (aarch64_record_load_store): Handle PRFM instruction.
12707 (aarch64_process_record_test): New function.
12708
33877125
YQ
127092017-03-23 Yao Qi <yao.qi@linaro.org>
12710
12711 * aarch64-tdep.c (aarch64_record_load_store): Fix code
12712 indentation.
12713
a0eef940
YQ
127142017-03-23 Yao Qi <yao.qi@linaro.org>
12715
12716 * aarch64-tdep.c: Remove AARCH64_RECORD_FAILURE.
12717
3f2a3564
PR
127182017-03-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
12719
12720 python/python.c (do_start_initialization): Fix memory leak.
12721
b67aeab0
SM
127222017-03-22 Simon Marchi <simon.marchi@polymtl.ca>
12723
12724 * inf-ptrace.c (inf_ptrace_xfer_partial): Get pid from ptid
12725 using get_ptrace_pid.
12726 * linux-nat.c (linux_nat_xfer_partial): Don't set/restore
12727 inferior_ptid.
12728 (linux_proc_xfer_partial, linux_proc_xfer_spu): Use lwp of
12729 inferior_ptid instead of pid.
12730
ffdbe864
YQ
127312017-03-22 Yao Qi <yao.qi@linaro.org>
12732
12733 * aarch64-tdep.c: Wrap locally used classes in anonymous
12734 namespace.
12735 * arm-tdep.c: Likewise.
12736 * linespec.c: Likewise.
12737 * ui-out.c: Likewise.
12738
9d736fbf
JG
127392017-03-22 Jonah Graham <jonah@kichwacoders.com>
12740
12741 PR gdb/19637
12742 * python/lib/gdb/printer/bound_registers.py: Import sys.
12743
3de88e9a
SM
127442017-03-21 Simon Marchi <simon.marchi@ericsson.com>
12745
12746 * windows-nat.c (do_windows_fetch_inferior_registers): Add
12747 windows_thread_info parameter and use it instead of
12748 current_thread.
12749 (windows_fetch_inferior_registers): Don't set current_thread,
12750 pass the thread to do_windows_fetch_inferior_registers. Use
12751 ptid from regcache instead of inferior_ptid.
12752 (do_windows_store_inferior_registers): Add windows_thread_info
12753 parameter and use it instead of current_thread.
12754 (windows_store_inferior_registers): Don't set current_thread,
12755 pass the thread to do_windows_store_inferior_registers. Use
12756 ptid from regcache instead of inferior_ptid.
12757
0e7b8f61
SM
127582017-03-21 Simon Marchi <simon.marchi@ericsson.com>
12759
12760 * ser-mingw.c (ser_windows_raw): Remove reference to
12761 struct serial::current_timeout.
12762
5badf10a
IR
127632017-03-21 Ivo Raisr <ivo.raisr@oracle.com>
12764
12765 PR tdep/20928
12766 * gdb/sparc-tdep.h (gdbarch_tdep) <sparc64_ccr_type>: New field.
12767 * gdb/sparc64-tdep.c (sparc64_ccr_type): New function.
12768 (sparc64_fsr_type): Fix %fsr decoding.
12769
cee59b3f
TW
127702017-03-21 Tim Wiederhake <tim.wiederhake@intel.com>
12771
12772 * python/py-record-btrace.c (btpy_insn_data): Change return type
12773 for Python 2.
12774
639a9038
SM
127752017-03-20 Simon Marchi <simon.marchi@polymtl.ca>
12776
12777 * spu-linux-nat.c (spu_fetch_inferior_registers,
12778 spu_store_inferior_registers): Use ptid from regcache, set and
12779 restore inferior_ptid.
12780 * spu-multiarch.c (spu_fetch_registers, spu_store_registers):
12781 Likewise.
12782
bcc0c096
SM
127832017-03-20 Simon Marchi <simon.marchi@polymtl.ca>
12784
12785 * i386-linux-nat.c (fetch_register, store_register,
12786 i386_linux_fetch_inferior_registers,
12787 i386_linux_store_inferior_registers): Use ptid from regcache.
12788 * ia64-linux-nat.c (ia64_linux_fetch_register,
12789 ia64_linux_store_register): Likewise.
12790 * inf-ptrace.c (inf_ptrace_fetch_register,
12791 inf_ptrace_store_register): Likewise.
12792 * m32r-linux-nat.c (m32r_linux_fetch_inferior_registers,
12793 m32r_linux_store_inferior_registers): Likewise.
12794 * m68k-bsd-nat.c (m68kbsd_fetch_inferior_registers,
12795 m68kbsd_store_inferior_registers): Likewise.
12796 * m68k-linux-nat.c (fetch_register, store_register,
12797 m68k_linux_fetch_inferior_registers,
12798 m68k_linux_store_inferior_registers): Likewise.
12799 * m88k-bsd-nat.c (m88kbsd_fetch_inferior_registers,
12800 m88kbsd_store_inferior_registers): Likewise.
12801 * mips-fbsd-nat.c (mips_fbsd_fetch_inferior_registers,
12802 mips_fbsd_store_inferior_registers): Likewise.
12803 * mips-linux-nat.c (mips64_linux_regsets_fetch_registers,
12804 mips64_linux_regsets_store_registers): Likewise.
12805 * mips-nbsd-nat.c (mipsnbsd_fetch_inferior_registers,
12806 mipsnbsd_store_inferior_registers): Likewise.
12807 * mips-obsd-nat.c (mips64obsd_fetch_inferior_registers,
12808 mips64obsd_store_inferior_registers): Likewise.
12809 * nto-procfs.c (procfs_fetch_registers, procfs_store_registers):
12810 Likewise.
12811 * ppc-fbsd-nat.c (ppcfbsd_fetch_inferior_registers,
12812 ppcfbsd_store_inferior_registers): Likewise.
12813 * ppc-linux-nat.c (ppc_linux_fetch_inferior_registers,
12814 ppc_linux_store_inferior_registers): Likewise.
12815 * ppc-nbsd-nat.c (ppcnbsd_fetch_inferior_registers,
12816 ppcnbsd_store_inferior_registers): Likewise.
12817 * ppc-obsd-nat.c (ppcobsd_fetch_registers,
12818 ppcobsd_store_registers): Likewise.
12819 * procfs.c (procfs_fetch_registers, procfs_store_registers):
12820 Likewise.
12821 * ravenscar-thread.c (ravenscar_fetch_registers,
12822 ravenscar_store_registers, ravenscar_prepare_to_store):
12823 Likewise.
12824 * record-btrace.c (record_btrace_fetch_registers,
12825 record_btrace_store_registers, record_btrace_prepare_to_store):
12826 Likewise.
12827 * remote-sim.c (gdbsim_fetch_register, gdbsim_store_register):
12828 Lookup inferior using ptid from regcache, instead of
12829 current_inferior.
12830 * remote.c (remote_fetch_registers, remote_store_registers): Use
12831 ptid from regcache.
12832 * rs6000-nat.c (fetch_register, store_register): Likewise.
12833 * s390-linux-nat.c (s390_linux_fetch_inferior_registers,
12834 s390_linux_store_inferior_registers): Likewise.
12835 * sh-nbsd-nat.c (shnbsd_fetch_inferior_registers,
12836 shnbsd_store_inferior_registers): Likewise.
12837 * sol-thread.c (sol_thread_fetch_registers,
12838 sol_thread_store_registers): Likewise.
12839 * sparc-nat.c (sparc_fetch_inferior_registers,
12840 sparc_store_inferior_registers): Likewise.
12841 * tilegx-linux-nat.c (fetch_inferior_registers,
12842 store_inferior_registers): Likewise.
12843 * vax-bsd-nat.c (vaxbsd_fetch_inferior_registers,
12844 vaxbsd_store_inferior_registers): Likewise.
12845 * xtensa-linux-nat.c (fetch_gregs, store_gregs, fetch_xtregs,
12846 store_xtregs): Likewise.
12847
c0f55cc6
AV
128482017-03-20 Artemiy Volkov <artemiyv@acm.org>
12849
12850 PR gdb/14441
12851 * NEWS: Mention support for rvalue references in GDB and python.
12852 * doc/gdb.texinfo (C Plus Plus Expressions): Mention that GDB
12853 supports both lvalue and rvalue references.
12854
15c0a2a9
AV
128552017-03-20 Artemiy Volkov <artemiyv@acm.org>
12856
12857 PR gdb/14441
12858 * gdbtypes.c (rank_one_type): Implement overloading
12859 resolution rules regarding rvalue references.
12860
aa006118
AV
128612017-03-20 Artemiy Volkov <artemiyv@acm.org>
12862
12863 PR gdb/14441
12864 * aarch64-tdep.c (aarch64_type_align)
12865 (aarch64_extract_return_value, aarch64_store_return_value): Change
12866 lvalue reference type checks to general reference type checks.
12867 * amd64-tdep.c (amd64_classify): Likewise.
12868 * amd64-windows-tdep.c (amd64_windows_passed_by_integer_register):
12869 Likewise.
12870 * arm-tdep.c (arm_type_align, arm_extract_return_value)
12871 (arm_store_return_value): Likewise.
12872 * ax-gdb.c (gen_fetch, gen_cast): Likewise.
12873 * c-typeprint.c (c_print_type): Likewise.
12874 * c-varobj.c (adjust_value_for_child_access, c_value_of_variable)
12875 (cplus_number_of_children, cplus_describe_child): Likewise.
12876 * compile/compile-c-symbols.c (generate_vla_size): Likewise.
12877 * completer.c (expression_completer): Likewise.
12878 * cp-support.c (make_symbol_overload_list_adl_namespace):
12879 Likewise.
12880 * darwin-nat-info.c (info_mach_region_command): Likewise.
12881 * dwarf2loc.c (entry_data_value_coerce_ref)
12882 (value_of_dwarf_reg_entry): Likewise.
12883 * eval.c (ptrmath_type_p, evaluate_subexp_standard)
12884 (evaluate_subexp_for_address, evaluate_subexp_for_sizeof):
12885 Likewise.
12886 * findvar.c (extract_typed_address, store_typed_address):
12887 Likewise.
12888 * gdbtypes.c (rank_one_type): Likewise.
12889 * hppa-tdep.c (hppa64_integral_or_pointer_p): Likewise.
12890 * infcall.c (value_arg_coerce): Likewise.
12891 * language.c (pointer_type): Likewise.
12892 * m32c-tdep.c (m32c_reg_arg_type, m32c_m16c_address_to_pointer):
12893 Likewise.
12894 * m88k-tdep.c (m88k_integral_or_pointer_p): Likewise.
12895 * mn10300-tdep.c (mn10300_type_align): Likewise.
12896 * msp430-tdep.c (msp430_push_dummy_call): Likewise.
12897 * ppc-sysv-tdep.c (do_ppc_sysv_return_value)
12898 (ppc64_sysv_abi_push_param, ppc64_sysv_abi_return_value):
12899 Likewise.
12900 * printcmd.c (print_formatted, x_command): Likewise.
12901 * python/py-type.c (typy_get_composite, typy_template_argument):
12902 Likewise.
12903 * python/py-value.c (valpy_referenced_value)
12904 (valpy_get_dynamic_type, value_has_field): Likewise.
12905 * s390-linux-tdep.c (s390_function_arg_integer): Likewise.
12906 * sparc-tdep.c (sparc_integral_or_pointer_p): Likewise.
12907 * sparc64-tdep.c (sparc64_integral_or_pointer_p): Likewise.
12908 * spu-tdep.c (spu_scalar_value_p): Likewise.
12909 * symtab.c (lookup_symbol_aux): Likewise.
12910 * typeprint.c (whatis_exp, print_type_scalar): Likewise.
12911 * valarith.c (binop_types_user_defined_p, unop_user_defined_p):
12912 Likewise.
12913 * valops.c (value_cast_pointers, value_cast)
12914 (value_reinterpret_cast, value_dynamic_cast, value_addr, typecmp)
12915 (value_struct_elt, value_struct_elt_bitpos)
12916 (value_find_oload_method_list, find_overload_match)
12917 (value_rtti_indirect_type): Likewise.
12918 * valprint.c (val_print_scalar_type_p, generic_val_print):
12919 Likewise.
12920 * value.c (value_actual_type, value_as_address, unpack_long)
12921 (pack_long, pack_unsigned_long, coerce_ref_if_computed)
12922 (coerce_ref): Likewise.
12923 * varobj.c (varobj_get_value_type): Likewise.
12924
3fcf899d
AV
129252017-03-20 Artemiy Volkov <artemiyv@acm.org>
12926
12927 PR gdb/14441
12928 * doc/python.texi (Types in Python): Add TYPE_CODE_RVALUE_REF to
12929 table of constants.
12930 * python/lib/gdb/command/explore.py: Support exploring values
12931 of rvalue reference types.
12932 * python/lib/gdb/types.py: Implement get_basic_type() for
12933 rvalue reference types.
12934 * python/py-type.c (pyty_codes) <TYPE_CODE_RVALUE_REF>: New
12935 constant.
12936 * python/py-value.c (valpy_getitem): Add an rvalue reference
12937 check.
12938 (valpy_reference_value): Add new parameter "refcode".
12939 (valpy_lvalue_reference_value, valpy_rvalue_reference_value):
12940 New wrappers for valpy_reference_value().
12941 * python/py-xmethods.c (gdbpy_get_xmethod_result_type)
12942 (gdbpy_invoke_xmethod): Likewise.
12943
4297a3f0
AV
129442017-03-20 Artemiy Volkov <artemiyv@acm.org>
12945
12946 PR gdb/14441
12947 * dwarf2read.c (process_die, read_type_die_1): Handle the
12948 DW_TAG_rvalue_reference_type DIE.
12949 (read_tag_reference_type): Add new parameter "refcode".
12950
e1cb3213
AV
129512017-03-20 Artemiy Volkov <artemiyv@acm.org>
12952
12953 PR gdb/14441
12954 * c-typeprint.c (c_print_type, c_type_print_varspec_prefix)
12955 (c_type_print_modifier, c_type_print_varspec_suffix)
12956 (c_type_print_base): Support printing rvalue reference types.
12957 * c-valprint.c (c_val_print, c_value_print): Support printing
12958 rvalue reference values.
12959
e4347c89
AV
129602017-03-20 Artemiy Volkov <artemiyv@acm.org>
12961
12962 PR gdb/14441
12963 * cp-name-parser.y (ptr_operator): Handle the '&&' token in
12964 typename.
12965 * cp-support.c (replace_typedefs): Handle
12966 DEMANGLE_COMPONENT_RVALUE_REFERENCE.
12967 * python/py-type.c (typy_lookup_type): Likewise.
12968
53cc15f5
AV
129692017-03-20 Artemiy Volkov <artemiyv@acm.org>
12970
12971 PR gdb/14441
12972 * c-exp.y (ptr_operator): Handle the '&&' token in the typename.
12973 * parse.c (insert_type): Change assert statement.
12974 (follow_types): Handle rvalue reference types.
12975 * parser-defs.h (enum type_pieces) <tp_rvalue_reference>: New
12976 constant.
12977
a65cfae5
AV
129782017-03-20 Artemiy Volkov <artemiyv@acm.org>
12979
12980 PR gdb/14441
12981 * ada-lang.c (ada_evaluate_subexp): Adhere to the new
12982 value_ref() interface.
12983 * c-valprint.c (c_value_print): Likewise.
12984 * infcall.c (value_arg_coerce): Likewise.
12985 * python/py-value.c (valpy_reference_value): Likewise.
12986 * valops.c (value_cast, value_reinterpret_cast)
12987 (value_dynamic_cast, typecmp): Likewise.
12988 (value_ref): Parameterize by kind of return value reference type.
12989 * value.h (value_ref): Add new parameter "refcode".
12990
3b224330
AV
129912017-03-20 Artemiy Volkov <artemiyv@acm.org>
12992
12993 PR gdb/14441
12994 * dwarf2read.c (read_tag_reference_type): Use
12995 lookup_lvalue_reference_type() instead of lookup_reference_type().
12996 * eval.c (evaluate_subexp_standard): Likewise.
12997 * f-exp.y: Likewise.
12998 * gdbtypes.c (make_reference_type, lookup_reference_type):
12999 Generalize with rvalue reference types.
13000 (lookup_lvalue_reference_type, lookup_rvalue_reference_type): New
13001 convenience wrappers for lookup_reference_type().
13002 * gdbtypes.h (make_reference_type, lookup_reference_type): Add a
13003 reference kind parameter.
13004 (lookup_lvalue_reference_type, lookup_rvalue_reference_type): Add
13005 wrappers for lookup_reference_type().
13006 * guile/scm-type.c (gdbscm_type_reference): Use
13007 lookup_lvalue_reference_type() instead of lookup_reference_type().
13008 * guile/scm-value.c (gdbscm_value_dynamic_type): Likewise.
13009 * parse.c (follow_types): Likewise.
13010 * python/py-type.c (typy_reference, typy_lookup_type): Likewise.
13011 * python/py-value.c (valpy_get_dynamic_type, valpy_getitem):
13012 Likewise.
13013 * python/py-xmethods.c (gdbpy_get_xmethod_result_type)
13014 (gdbpy_invoke_xmethod): Likewise.
13015 * stabsread.c: Provide extra argument to make_reference_type()
13016 call.
13017 * valops.c (value_ref, value_rtti_indirect_type): Use
13018 lookup_lvalue_reference_type() instead of lookup_reference_type().
13019
f9aeb8d4
AV
130202017-03-20 Artemiy Volkov <artemiyv@acm.org>
13021
13022 PR gdb/14441
13023 * gdbtypes.h (enum type_code) <TYPE_CODE_RVALUE_REF>: New constant.
13024 (TYPE_IS_REFERENCE): New macro.
13025 (struct type): Add rvalue_reference_type field.
13026 (TYPE_RVALUE_REFERENCE_TYPE): New macro.
13027
51457a05
MAL
130282017-03-20 Marc-Andre Laperle <marc-andre.laperle@ericsson.com>
13029
13030 * NEWS: Add an entry about new '-file-list-shared-libraries' command.
13031 * mi/mi-cmd-file.c (mi_cmd_file_list_shared_libraries):
13032 New function definition.
13033 * mi/mi-cmds.c (mi_cmds): Add -file-list-shared-libraries command.
13034 * mi/mi-cmds.h (mi_cmd_file_list_shared_libraries):
13035 New function declaration.
13036 * mi/mi-interp.c (mi_output_solib_attribs): New Function.
13037 * mi/mi-interp.h: New file.
13038 * solib.c (info_sharedlibrary_command): Replace for loop with
13039 ALL_SO_LIBS macro
13040 * solib.h (update_solib_list): New function declaration.
13041 (so_list_head): Move macro.
13042 * solist.h (ALL_SO_LIBS): New macro.
13043
e696b3ad
MAL
130442017-03-20 Marc-Andre Laperle <marc-andre.laperle@ericsson.com>
13045
13046 * infcmd.c (post_create_inferior): Remove unused argument in
13047 call to solib_add.
13048 * remote.c (remote_start_remote): Likewise.
13049 * solib-frv.c (frv_fetch_objfile_link_map): Likewise.
13050 * solib-svr4.c: (svr4_fetch_objfile_link_map): Likewise.
13051 (enable_break): Likewise.
13052 * solib.c (update_solib_list): Remove unused target argument
13053 and its documentation.
13054 (solib_add): Remove unused target argument. Remove unused
13055 argument in call to update_solib_list.
13056 (info_sharedlibrary_command): Remove unused argument in call
13057 to update_solib_list.
13058 (sharedlibrary_command): Remove unused argument in call to
13059 solib_add.
13060 (handle_solib_event): Likewise.
13061 (reload_shared_libraries): Likewise.
13062 * solib.h (solib_add): Remove unused target argument.
13063
dcb84eda
AA
130642017-03-20 Andreas Arnez <arnez@linux.vnet.ibm.com>
13065
13066 * s390-linux-tdep.c (is_rsi, is_rie): Remove functions.
13067 (s390_displaced_step_fixup): Cover relative branches with the
13068 default fixup handling. This fixes lack of support for some
13069 relative branch instructions.
13070
d9cb6cdc
SM
130712017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
13072
13073 * i386-gnu-nat.c (gnu_fetch_registers, gnu_store_registers): Use
13074 ptid from regcache.
13075
1afaf9f4
SM
130762017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
13077
13078 * i386-darwin-nat.c (i386_darwin_fetch_inferior_registers,
13079 i386_darwin_store_inferior_registers): Use ptid from regcache.
13080
aac12e24
SM
130812017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
13082
13083 * i386-bsd-nat.c (i386bsd_fetch_inferior_registers,
13084 i386bsd_store_inferior_registers): Use ptid from regcache.
13085
bbe1eef1
SM
130862017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
13087
13088 * hppa-obsd-nat.c (hppaobsd_fetch_registers,
13089 hppaobsd_store_registers): Use ptid from regcache.
13090
10799020
SM
130912017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
13092
13093 * hppa-nbsd-nat.c (hppanbsd_fetch_registers,
13094 hppanbsd_store_registers): Use ptid from regcache.
13095
00204cf7
SM
130962017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
13097
13098 * hppa-linux-nat.c (fetch_register, store_register): Use ptid
13099 from regcache. Use get_ptrace_pid.
13100
11a33714
SM
131012017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
13102
13103 * corelow.c (get_core_register_section): Use ptid from regcache,
13104 update doc.
13105
317cd492
SM
131062017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
13107
13108 * bsd-uthread.c (bsd_uthread_fetch_registers,
13109 bsd_uthread_store_registers): Use ptid from regcache, set and
13110 restore inferior_ptid.
13111
9ac8a7c2
SM
131122017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
13113
13114 * arm-nbsd-nat.c (fetch_register, fetch_regs, fetch_fp_register,
13115 fetch_fp_regs, store_register, store_regs, store_fp_register,
13116 store_fp_regs): Use ptid from regcache.
13117
4ac4bb6a
SM
131182017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
13119
13120 * arm-linux-nat.c (fetch_fpregs, store_fpregs, fetch_regs,
13121 store_regs, fetch_wmmx_regs, store_wmmx_regs, fetch_vfp_regs,
13122 store_vfp_regs): Use ptid from regcache.
13123
9bcbdca8
PA
131242017-03-17 Pedro Alves <palves@redhat.com>
13125
13126 PR remote/21188
13127 * ser-base.c (ser_base_wait_for): Add comment.
13128 (do_ser_base_readchar): Improve comment based on the ser-unix.c's
13129 version.
13130 * ser-unix.c (hardwire_raw): Remove reference to
13131 scb->current_timeout.
13132 (wait_for, do_hardwire_readchar, hardwire_readchar): Delete.
13133 (hardwire_ops): Install ser_base_readchar instead of
13134 hardwire_readchar.
13135 * serial.h (struct serial) <current_timeout, timeout_remaining>:
13136 Remove fields.
13137
7503099f
JG
131382017-03-17 Jonah Graham <jonah@kichwacoders.com>
13139
13140 PR gdb/19637
13141 * python/lib/gdb/printer/bound_registers.py: Add support for
13142 Python 3.
13143
7942e96e
AA
131442017-03-16 Andreas Arnez <arnez@linux.vnet.ibm.com>
13145
13146 * dwarf2loc.c (indirect_synthetic_pointer): Get data type of
13147 pointed-to DIE and pass it to dwarf2_evaluate_loc_desc_full.
13148 (dwarf2_evaluate_loc_desc_full): New parameter subobj_type; rename
13149 byte_offset to subobj_byte_offset. Fix the handling of
13150 DWARF_VALUE_STACK on big-endian targets when coming via an
13151 implicit pointer.
13152 (dwarf2_evaluate_loc_desc): Adjust call to
13153 dwarf2_evaluate_loc_desc_full.
13154 * dwarf2loc.h (dwarf2_fetch_die_type_sect_off): New declaration.
13155 * dwarf2read.c (dwarf2_fetch_die_type_sect_off): New function.
13156
ba14f379
YQ
131572017-03-16 Yao Qi <yao.qi@linaro.org>
13158
13159 * arm-tdep.c (thumb_record_misc): Decode CBNZ, CBZ, REV16,
13160 and REVSH instructions.
13161
b121eeb9
YQ
131622017-03-16 Yao Qi <yao.qi@linaro.org>
13163
13164 * arm-tdep.c [GDB_SELF_TEST]: include "selftests.h".
13165 (arm_record_test): Declare.
13166 (_initialize_arm_tdep) [GDB_SELF_TEST]: call register_self_test.
13167 (thumb_record_ld_st_reg_offset): Rewrite the opcode matching to
13168 align with the manual.
13169 (thumb_record_misc): Adjust the code order to align with the
13170 manual.
13171 (thumb2_record_decode_insn_handler): Fix instruction matching.
13172 (instruction_reader_thumb): New class.
13173 (arm_record_test): New function.
13174
728a7913
YQ
131752017-03-16 Yao Qi <yao.qi@linaro.org>
13176
13177 * arm-tdep.c (abstract_memory_reader): New class.
13178 (instruction_reader): New class.
13179 (extract_arm_insn): Add argument 'reader'. Callers updated.
13180 (decode_insn): Likewise.
13181
34b43320
DE
131822017-03-16 Doug Evans <dje@google.com>
13183
a7c0469f
DE
13184 * guile/scm-lazy-string.c (lazy_string_smob): Clarify use of LENGTH
13185 member. Change type of TYPE member to SCM. All uses updated.
13186 (lsscm_make_lazy_string_smob): Add assert.
13187 (lsscm_make_lazy_string): Flag bad length values.
13188 (lsscm_elt_type): New function.
13189 (gdbscm_lazy_string_to_value): Rewrite to use
13190 lsscm_safe_lazy_string_to_value.
13191 (lsscm_safe_lazy_string_to_value): Fix handling of TYPE_CODE_PTR.
13192 * guile/scm-value.c (gdbscm_value_to_lazy_string): Flag bad length
13193 values. Fix TYPE_CODE_PTR. Handle TYPE_CODE_ARRAY. Handle typedefs
13194 in incoming type.
13195 * guile/guile-internal.h (tyscm_scm_to_type): Declare.
13196 * guile/scm-type.c (tyscm_scm_to_type): New function.
13197
131982017-03-15 Doug Evans <dje@google.com>
13199
34b43320
DE
13200 PR python/17728, python/18439, python/18779
13201 * python/py-lazy-string.c (lazy_string_object): Clarify use of LENGTH
13202 member. Change type of TYPE member to PyObject *. All uses updated.
13203 (stpy_convert_to_value): Fix handling of TYPE_CODE_PTR.
13204 (gdbpy_create_lazy_string_object): Flag bad length values.
13205 Handle TYPE_CODE_ARRAY with possibly different user-provided length.
13206 Handle typedefs in incoming type.
13207 (stpy_lazy_string_elt_type): New function.
13208 (gdbpy_extract_lazy_string): Call it.
13209 * python/py-value.c (valpy_lazy_string): Flag bad length values.
13210 Fix handling of TYPE_CODE_PTR. Handle TYPE_CODE_ARRAY. Handle
13211 typedefs in incoming type.
13212
a3a5fecc
DE
132132017-03-16 Doug Evans <dje@google.com>
13214
13215 * guile/guile-internal.h (tyscm_scm_to_type): Declare.
13216 * guile/scm-type.c (tyscm_scm_to_type): New function.
13217
28f1c605
JW
132182017-03-16 Jiong Wang <jiong.wang@arm.com>
13219
13220 * inf-ptrace.c (inf_ptrace_peek_poke): Change the type to
13221 "ULONGEST" for "skip".
13222
87c336f6
AA
132232017-03-14 Andreas Arnez <arnez@linux.vnet.ibm.com>
13224
13225 PR gdb/21220
13226 * inf-ptrace.c (inf_ptrace_xfer_partial): In "case
13227 TARGET_OBJECT_MEMORY", extract the logic for ptrace peek/poke...
13228 (inf_ptrace_peek_poke): ...here. New function. Now also loop
13229 over ptrace peek/poke until end of buffer or error.
13230
cf81cf60
SM
132312017-03-14 Simon Marchi <simon.marchi@ericsson.com>
13232
13233 * parse.c (length_of_subexp): Make static.
13234 * parser-defs.h (length_of_subexp): Remove.
13235
a379284a
AA
132362017-03-14 Andreas Arnez <arnez@linux.vnet.ibm.com>
13237
13238 * linux-nat.c (linux_proc_xfer_partial): Handle write operations
13239 as well.
13240
8a6200ba
PA
132412017-03-14 Pedro Alves <palves@redhat.com>
13242
13243 * cp-name-parser.y (cp_demangled_name_to_comp): Update comment.
13244 (main): Use std::unique_ptr. Remove calls to
13245 cp_demangled_name_parse_free.
13246
f79ec206
SM
132472017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
13248
13249 * alpha-bsd-nat.c (alphabsd_fetch_inferior_registers,
13250 alphabsd_store_inferior_registers): Use regcache->ptid instead
13251 of inferior_ptid.
13252
edb5fb00
SM
132532017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
13254
13255 * aix-thread.c (aix_thread_fetch_registers,
13256 aix_thread_store_registers): Use regcache->ptid instead of
13257 inferior_ptid.
13258
55119686
SM
132592017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
13260
13261 * aarch64-linux-nat.c (fetch_gregs_from_thread,
13262 store_gregs_to_thread, fetch_fpregs_from_thread,
13263 store_fpregs_to_thread): Use regcache->ptid instead of
13264 inferior_ptid.
13265
6a06fbb7
SM
132662017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
13267
13268 * amd64-linux-nat.c (amd64_linux_fetch_inferior_registers,
13269 amd64_linux_fetch_inferior_registers): Use regcache->ptid
13270 instead of inferior_ptid.
13271
c6386875
SM
132722017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
13273
13274 * target.c (target_fetch_registers, target_store_registers): Add
13275 assert.
13276
ddaaf0fb
SM
132772017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
13278
13279 * regcache.h (regcache_get_ptid): New function.
13280 * regcache.c (regcache_get_ptid): New function.
13281
b9da89d1 132822017-03-13 Mark Wielaard <mark@klomp.org>
13283
13284 * cp-name-parser.y (make_empty): Initialize d_printing to zero.
13285
5f4d1085
KS
132862017-03-10 Keith Seitz <keiths@redhat.com>
13287
13288 PR c++/8218
13289 * c-typeprint.c (cp_type_print_method_args): Skip artificial arguments.
13290
c65d6b55
PA
132912017-03-08 Pedro Alves <palves@redhat.com>
13292
13293 PR gdb/18360
13294 * infrun.c (start_step_over, do_target_resume, resume)
13295 (restart_threads): Assert we're not resuming a thread that is
13296 meant to be stopped.
13297 (infrun_thread_stop_requested_callback): Delete.
13298 (infrun_thread_stop_requested): If the thread is internally
13299 stopped, queue a pending stop event and clear the thread's
13300 inline-frame state.
13301 (handle_stop_requested): New function.
13302 (handle_syscall_event, handle_inferior_event_1): Use
13303 handle_stop_requested.
13304 (handle_stop_requested): New function.
13305 (handle_signal_stop): Set the thread's stop_signal here instead of
13306 at caller.
13307 (finish_step_over): Clear step over info unconditionally.
13308 (handle_signal_stop): If the user had interrupted the event
13309 thread, consider the stop a random signal.
13310 (handle_signal_stop) <signal arrived while stepping over
13311 breakpoint>: Don't restart threads here.
13312 (stop_waiting): Don't clear step-over info here.
13313
15c22686
PA
133142017-03-08 Pedro Alves <palves@redhat.com>
13315
13316 PR 21206
13317 * common/gdb_unlinker.h (unlinker::unlinker): Attribute nonnull
13318 goes to argument 2, not 1.
13319
6e5d74e7
PA
133202017-03-08 Pedro Alves <palves@redhat.com>
13321
13322 PR cli/21218
13323 * top.c (gdb_readline_wrapper): Avoid passing NULL to
13324 display_gdb_prompt.
13325 (command_line_input): Add comment.
13326
9753a2f6
PA
133272017-03-08 Pedro Alves <palves@redhat.com>
13328
13329 PR tui/21216
13330 * tui/tui-file.c (tui_file::write): New.
13331 * tui/tui-file.h (tui_file): Override "write".
13332 * tui/tui-io.c (do_tui_putc, update_start_line): New functions,
13333 factored out from ...
13334 (tui_puts): ... here.
13335 (tui_putc): Use them.
13336 (tui_write): New function.
13337 * tui/tui-io.h (tui_write): Declare.
13338
1672e0d9
SDJ
133392017-03-07 Sergio Durigan Junior <sergiodj@redhat.com>
13340
13341 * Makefile.in (SFILES): Replace "environ.c" with
13342 "common/environ.c".
13343 (HFILES_NO_SRCDIR): Likewise, for "environ.h".
13344 * environ.c: Include "common-defs.h" instead of "defs.h. Moved
13345 to...
13346 * common/environ.c: ... here.
13347 * environ.h: Moved to...
13348 * common/environ.h: ... here.
13349
f7bb4e3a
PB
133502017-03-07 Peter Bergner <bergner@vnet.ibm.com>
13351
13352 * gdbarch.sh (pstring_ptr): New static function.
13353 (gdbarch_disassembler_options): Use it.
13354 (gdbarch_verify_disassembler_options): Print valid_disassembler_options,
13355 not valid_disassembler_option->name.
13356 * gdbarch.c: Regenerate.
13357
e45ced6c
PB
133582017-03-07 Peter Bergner <bergner@vnet.ibm.com>
13359
13360 * config/powerpc/ppc64-linux.mh (MH_CFLAGS): Delete.
13361
5f6fd321
PA
133622017-03-07 Pedro Alves <palves@redhat.com>
13363
13364 * tui/tui-regs.c (tui_restore_gdbout): Don't delete gdb_stdout.
13365
6dbb839a 133662017-03-07 Walfred Tedeschi <walfred.tedeschi@intel.com>
4a612d6f
WT
13367
13368 * i387-tdep.h (i387_reset_bnd_regs): Add function definition.
13369 * i387-tdep.c (i387_reset_bnd_regs): Add function implementation.
13370 * i386-tdep.c (i386_push_dummy_call): Call i387_reset_bnd_regs.
6dbb839a 13371 * amd64-tdep.c (amd64_push_dummy_call): Call i387_reset_bnd_regs.
4a612d6f 13372
d274ecf4
SM
133732017-03-06 Simon Marchi <simon.marchi@ericsson.com>
13374
13375 * xtensa-linux-nat.c (fetch_gregs): Remove const.
13376
df97be55
SM
133772017-03-03 Simon Marchi <simon.marchi@ericsson.com>
13378
13379 * remote.c (remote_add_target_side_commands): Use range-based
13380 for loop.
13381
7d45f3df
YQ
133822017-03-03 Yao Qi <yao.qi@linaro.org>
13383
13384 PR gdb/21165
13385 * ada-valprint.c (ada_val_print_ref): Call value_fetch_lazy if
13386 value is lazy.
13387 * valprint.c (common_val_print): Likewise.
13388
65b48a81
PB
133892017-02-28 Peter Bergner <bergner@vnet.ibm.com>
13390
13391 * NEWS: Mention new set/show disassembler-options commands.
13392 * doc/gdb.texinfo: Document new set/show disassembler-options commands.
13393 * disasm.c: Include "arch-utils.h", "gdbcmd.h" and "safe-ctype.h".
13394 (prospective_options): New static variable.
13395 (gdb_disassembler::gdb_disassembler): Initialize
13396 m_di.disassembler_options.
13397 (gdb_buffered_insn_length_init_dis): Initilize di->disassembler_options.
13398 (get_disassembler_options): New function.
13399 (set_disassembler_options): Likewise.
13400 (set_disassembler_options_sfunc): Likewise.
13401 (show_disassembler_options_sfunc): Likewise.
13402 (disassembler_options_completer): Likewise.
13403 (_initialize_disasm): Likewise.
13404 * disasm.h (get_disassembler_options): New prototype.
13405 (set_disassembler_options): Likewise.
13406 * gdbarch.sh (gdbarch_disassembler_options): New variable.
13407 (gdbarch_verify_disassembler_options): Likewise.
13408 * gdbarch.c: Regenerate.
13409 * gdbarch.h: Likewise.
13410 * arm-tdep.c (num_disassembly_options): Delete.
13411 (set_disassembly_style): Likewise.
13412 (arm_disassembler_options): New static variable.
13413 (set_disassembly_style_sfunc): Convert short style name into long
13414 option name. Call set_disassembler_options.
13415 (show_disassembly_style_sfunc): New function.
13416 (arm_gdbarch_init): Call set_gdbarch_disassembler_options and
13417 set_gdbarch_verify_disassembler_options.
13418 (_initialize_arm_tdep): Delete regnames variable and update callers.
13419 (arm_disassembler_options): Initialize.
13420 (disasm_options): New variable.
13421 (num_disassembly_options): Rename from this...
13422 (num_disassembly_styles): ...to this. Compute by scanning through
13423 disasm_options.
13424 (valid_disassembly_styles): Initialize using disasm_options.
13425 Remove calls to parse_arm_disassembler_option, get_arm_regnames and
13426 set_arm_regname_option.
13427 Pass show_disassembly_style_sfunc to the "disassembler" setshow command.
13428 * rs6000-tdep.c (powerpc_disassembler_options): New static variable.
13429 (rs6000_gdbarch_init): Call set_gdbarch_disassembler_options and
13430 set_gdbarch_verify_disassembler_options.
13431 * s390-tdep.c (s390_disassembler_options): New static variable.
13432 (s390_gdbarch_init):all set_gdbarch_disassembler_options and
13433 set_gdbarch_verify_disassembler_options.
13434
d538e36d
SM
134352017-02-27 Simon Marchi <simon.marchi@ericsson.com>
13436
13437 * remote.c (remote_add_target_side_condition): Remove "struct"
13438 keyword from range-based for loop.
13439
83621223
SM
134402017-02-27 Simon Marchi <simon.marchi@ericsson.com>
13441
13442 * remote.c (remote_add_target_side_condition): Use range-based
13443 for loop. Update comment.
13444
2123df0e
YQ
134452017-02-27 Yao Qi <yao.qi@linaro.org>
13446
13447 * f-typeprint.c (f_print_type): Check "varstring" is empty first.
13448
8e368124
AH
134492017-02-26 Alan Hayward <alan.hayward@arm.com>
13450
13451 * regcache.c (regcache_raw_update): New function.
13452 (regcache_raw_read): Move code to regcache_raw_update.
13453 * regcache.h (regcache_raw_update): New declaration.
13454 * remote.c (remote_prepare_to_store): Call regcache_raw_update.
13455
a49dd8dd
JK
134562017-02-26 Jan Kratochvil <jan.kratochvil@redhat.com>
13457
13458 * dwarf2read.c (create_debug_type_hash_table): Initialize
13459 header.signature and header.type_offset_in_tu.
13460
34e4bae9
PA
134612017-02-24 Pedro Alves <palves@redhat.com>
13462
13463 * symtab.c (make_file_symbol_completion_list_1): Use
13464 add_symtab_completions.
13465
b0e4b369
AH
134662017-02-24 Alan Hayward <alan.hayward@arm.com>
13467
13468 * stack.c (frame_info): Use frame_unwind_register_value to avoid buf.
13469
975c21ab
AH
134702017-02-24 Alan Hayward <alan.hayward@arm.com>
13471
13472 * i386-tdep.c (i386_pseudo_register_read_into_value): Use
13473 I386_MAX_REGISTER_SIZE.
13474 (i386_pseudo_register_write): Likewise.
13475 (i386_process_record): Likewise.
13476 * i387-tdep.c (i387_supply_xsave): Likewise.
13477 * m68k-linux-nat.c (fetch_register): Use M68K_MAX_REGISTER_SIZE.
13478 (store_register): Likewise.
13479
14bc53a8
PA
134802017-02-23 Pedro Alves <palves@redhat.com>
13481
13482 * ada-lang.c: Include "common/function-view.h".
13483 (ada_iterate_over_symbols): Adjust to use function_view as
13484 callback type.
13485 (struct add_partial_datum, ada_complete_symbol_matcher): Delete.
13486 (ada_make_symbol_completion_list): Use a lambda.
13487 (ada_exc_search_name_matches): Delete.
13488 (name_matches_regex): New.
13489 (ada_add_global_exceptions): Use a lambda and name_matches_regex.
13490 * compile/compile-c-support.c: Include "common/function-view.h".
13491 (print_one_macro): Change prototype to accept a ui_file pointer.
13492 (write_macro_definitions): Use a lambda.
13493 * dwarf2read.c: Include "common/function-view.h".
13494 (dw2_map_expand_apply, dw2_map_symtabs_matching_filename)
13495 (dw2_expand_symtabs_matching): Adjust to use function_view as
13496 callback type.
13497 * language.h: Include "common/function-view.h".
13498 (struct language_defn) <la_iterate_over_symbols>: Adjust to use
13499 function_view as callback type.
13500 (LA_ITERATE_OVER_SYMBOLS): Remove DATA parameter.
13501 * linespec.c: Include "common/function-view.h".
13502 (collect_info::add_symbol): New method.
13503 (struct symbol_and_data_callback, iterate_inline_only, struct
13504 symbol_matcher_data, iterate_name_matcher): Delete.
13505 (iterate_over_all_matching_symtabs): Adjust to use function_view
13506 as callback type and lambdas.
13507 (iterate_over_file_blocks): Adjust to use function_view as
13508 callback type.
13509 (decode_compound_collector): Now a class with private fields.
13510 (decode_compound_collector::release_symbols): New method.
13511 (collect_one_symbol): Rename to...
13512 (decode_compound_collector::operator()): ... this and adjust.
13513 (lookup_prefix_sym): decode_compound_collector construction bits
13514 move to decode_compound_collector ctor. Pass the
13515 decode_compound_collector object directly as callback. Remove
13516 cleanups and use decode_compound_collector::release_symbols
13517 instead.
13518 (symtab_collector): Now a class with private fields.
13519 (symtab_collector::release_symtabs): New method.
13520 (add_symtabs_to_list): Rename to...
13521 (symtab_collector::operator()): ... this and adjust.
13522 (collect_symtabs_from_filename): symtab_collector construction
13523 bits move to symtab_collector ctor. Pass the symtab_collector
13524 object directly as callback. Remove cleanups and use
13525 symtab_collector::release_symtabs instead.
13526 (collect_symbols): Delete.
13527 (add_matching_symbols_to_info): Use lambdas.
13528 * macrocmd.c (print_macro_callback): Delete.
13529 (info_macro_command): Use a lambda.
13530 (info_macros_command): Pass print_macro_definition as callable
13531 directly.
13532 (print_one_macro): Remove 'ignore' parameter.
13533 (macro_list_command): Adjust.
13534 * macrotab.c (macro_for_each_data::fn): Now a function_view.
13535 (macro_for_each_data::user_data): Delete field.
13536 (foreach_macro): Adjust to call the function_view.
13537 (macro_for_each): Adjust to use function_view as callback type.
13538 (foreach_macro_in_scope): Adjust to call the function_view.
13539 (macro_for_each_in_scope): Adjust to use function_view as callback
13540 type.
13541 * macrotab.h: Include "common/function-view.h".
13542 (macro_callback_fn): Declare a prototype instead of a pointer.
13543 Remove "user_data" parameter.
13544 (macro_for_each, macro_for_each_in_scope): Adjust to use
13545 function_view as callback type.
13546 * psymtab.c (partial_map_expand_apply)
13547 (psym_map_symtabs_matching_filename, recursively_search_psymtabs):
13548 Adjust to use function_view as callback type and to return bool.
13549 (psym_expand_symtabs_matching): Adjust to use function_view as
13550 callback types.
13551 * symfile-debug.c (debug_qf_map_symtabs_matching_filename): Adjust
13552 to use function_view as callback type and to return bool.
13553 (debug_qf_expand_symtabs_matching): Adjust to use function_view as
13554 callback types.
13555 * symfile.c (expand_symtabs_matching): Adjust to use function_view
13556 as callback types.
13557 * symfile.h: Include "common/function-view.h".
13558 (expand_symtabs_file_matcher_ftype)
13559 (expand_symtabs_symbol_matcher_ftype)
13560 (expand_symtabs_exp_notify_ftype): Remove "data" parameter and
13561 return bool.
13562 (quick_symbol_functions::map_symtabs_matching_filename)
13563 (quick_symbol_functions::expand_symtabs_matching): Adjust to use
13564 function_view as callback type and return bool.
13565 (expand_symtabs_matching): Adjust to use function_view as callback
13566 type.
13567 (maintenance_expand_name_matcher)
13568 (maintenance_expand_file_matcher): Delete.
13569 (maintenance_expand_symtabs): Use lambdas.
13570 * symtab.c (iterate_over_some_symtabs): Adjust to use
13571 function_view as callback types and return bool.
13572 (iterate_over_symtabs): Likewise. Use unique_xmalloc_ptr instead
13573 of a cleanup.
13574 (lookup_symtab_callback): Delete.
13575 (lookup_symtab): Use a lambda.
13576 (iterate_over_symbols): Adjust to use function_view as callback
13577 type.
13578 (struct search_symbols_data, search_symbols_file_matches)
13579 (search_symbols_name_matches): Delete.
13580 (search_symbols): Use a pair of lambdas.
13581 (struct add_name_data, add_macro_name, symbol_completion_matcher)
13582 (symtab_expansion_callback): Delete.
13583 (default_make_symbol_completion_list_break_on_1): Use lambdas.
13584 * symtab.h: Include "common/function-view.h".
13585 (iterate_over_some_symtabs): Adjust to use function_view as
13586 callback type and return bool.
13587 (iterate_over_symtabs): Adjust to use function_view as callback
13588 type.
13589 (symbol_found_callback_ftype): Remove 'data' parameter and return
13590 bool.
13591 (iterate_over_symbols): Adjust to use function_view as callback
13592 type.
13593
07e253aa
PA
135942017-02-23 Pedro Alves <palves@redhat.com>
13595
13596 * Makefile.in (SUBDIR_UNITTESTS_SRCS, SUBDIR_UNITTESTS_OBS): New.
13597 (%.o) <unittests/%.c>: New pattern.
13598 * configure.ac ($development): Add $(SUBDIR_UNITTESTS_OBS) to
13599 CONFIG_OBS, and $(SUBDIR_UNITTESTS_SRCS) to CONFIG_SRCS.
13600 * common/function-view.h: New file.
13601 * unittests/function-view-selftests.c: New file.
13602 * configure: Regenerate.
13603
8eaf5320
SM
136042017-02-23 Simon Marchi <simon.marchi@ericsson.com>
13605
13606 * bsd-uthread.c (bsd_uthread_thread_alive): Use ptid instead of
13607 inferior_ptid.
13608 * go32-nat.c (go32_thread_alive): Likewise.
13609
38768751
YQ
136102017-02-23 Yao Qi <yao.qi@linaro.org>
13611
13612 * varobj-iter.h (varobj_iter_delete): Call xfree instead of
13613 delete.
13614
0a8beaba
YQ
136152017-02-23 Yao Qi <yao.qi@linaro.org>
13616
13617 * varobj.c (varobj_clear_saved_item): Use delete instead of
13618 xfree.
13619 (update_dynamic_varobj_children): Likewise.
13620
58fdfd2c
JK
136212017-02-21 Jan Kratochvil <jan.kratochvil@redhat.com>
13622
13623 * dwarf2read.c (dwarf2_record_block_ranges): Add forgotten BASEADDR.
13624
1b90b139
SM
136252017-02-21 Simon Marchi <simon.marchi@ericsson.com>
13626
13627 * common/enum-flags.h (enum_flags::enum_flags): Initialize
13628 m_enum_value to 0 in default constructor.
13629
2039d74e
EBM
136302017-02-21 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
13631
13632 * rs6000-tdep.c (LOAD_AND_RESERVE_MASK): Rename from LWARX_MASK.
13633 (STORE_CONDITIONAL_MASK): Rename from STWCX_MASK.
13634 (LBARX_INSTRUCTION, LHARX_INSTRUCTION, LQARX_INSTRUCTION,
13635 STBCX_INSTRUCTION, STHCX_INSTRUCTION, STQCX_INSTRUCTION): New defines.
13636 (IS_LOAD_AND_RESERVE_INSN, IS_STORE_CONDITIONAL_INSN): New macros.
13637 (ppc_displaced_step_copy_insn): Use IS_LOAD_AND_RESERVE_INSN.
13638 (ppc_deal_with_atomic_sequence): Use IS_LOAD_AND_RESERVE_INSN and
13639 IS_STORE_CONDITIONAL_INSN.
13640
7814882a
JK
136412017-02-21 Jan Kratochvil <jan.kratochvil@redhat.com>
13642
13643 * dwarf2_rnglists_process: Initialize range_beginning and range_end.
13644
0ae60b63
JK
136452017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
13646
13647 * NEWS (Changes since GDB 7.12): Add DWARF-5.
13648
0224619f
JK
136492017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
13650
13651 * dwarf2read.c (skip_one_die, read_attribute_value)
13652 (dwarf2_const_value_attr, dump_die_shallow)
13653 (dwarf2_get_attr_constant_value, dwarf2_fetch_constant_bytes)
13654 (skip_form_bytes, attr_form_is_constant): Handle DW_FORM_data16.
13655
0af92d60
JK
136562017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
13657
13658 * dwarf2read.c (read_file_scope): Rename DW_MACRO_GNU_*.
13659 (dwarf_parse_macro_header): Accept DWARF version 5.
13660 (dwarf_decode_macro_bytes, dwarf_decode_macros): Rename DW_MACRO_GNU_*.
13661
216f72a1
JK
136622017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
13663
13664 * block.c (call_site_for_pc): Rename DW_OP_GNU_*, DW_TAG_GNU_* and
13665 DW_AT_GNU_*.
13666 * common/common-exceptions.h (enum errors): Likewise.
13667 * dwarf2-frame.c (class dwarf_expr_executor): Likewise.
13668 * dwarf2expr.c (dwarf_block_to_dwarf_reg)
13669 (dwarf_expr_context::execute_stack_op): Likewise.
13670 * dwarf2expr.h (struct dwarf_expr_context, struct dwarf_expr_piece):
13671 Likewise.
13672 * dwarf2loc.c (dwarf_evaluate_loc_desc::get_base_type)
13673 (dwarf_evaluate_loc_desc::push_dwarf_reg_entry_value)
13674 (show_entry_values_debug, call_site_to_target_addr)
13675 (func_addr_to_tail_call_list, func_verify_no_selftailcall)
13676 (dwarf_expr_reg_to_entry_parameter, dwarf_entry_parameter_to_value)
13677 (entry_data_value_free_closure, value_of_dwarf_reg_entry)
13678 (value_of_dwarf_block_entry, indirect_pieced_value)
13679 (symbol_needs_eval_context::push_dwarf_reg_entry_value):
13680 (disassemble_dwarf_expression): Likewise.
13681 * dwarf2read.c (process_die, inherit_abstract_dies)
13682 (read_call_site_scope): Likewise.
13683 * gdbtypes.h (struct func_type, struct call_site_parameter)
13684 (struct call_site): Likewise.
13685 * stack.c (read_frame_arg): Likewise.
13686 * std-operator.def (OP_VAR_ENTRY_VALUE): Likewise.
13687
43988095
JK
136882017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
13689
13690 * defs.h (read_unsigned_leb128): New declaration.
13691 * dwarf2loc.c (decode_debug_loclists_addresses): New function.
13692 (decode_debug_loc_dwo_addresses): Update DEBUG_LOC_* to DW_LLE_*.
13693 (dwarf2_find_location_expression): Call also
13694 decode_debug_loclists_addresses. Handle DWARF-5 ULEB128 length.
13695 * dwarf2loc.h (dwarf2_version): New declaration.
13696 * dwarf2read.c (struct dwarf2_per_objfile): Add loclists, line_str,
13697 rnglists.
13698 (dwarf2_elf_names): Add .debug_loclists, .debug_line_str,
13699 .debug_rnglists.
13700 (struct dwop_section_names): Add loclists_dwo.
13701 (dwop_section_names): Add .debug_loclists.dwo.
13702 (struct comp_unit_head): Add unit_type, signature, type_offset_in_tu.
13703 (struct dwarf2_per_cu_data): Add dwarf_version.
13704 (struct dwo_sections): Add loclists.
13705 (struct attr_abbrev): Add implicit_const.
13706 (read_indirect_line_string): New declaration.
13707 (read_unsigned_leb128): Delete declaration.
13708 (rcuh_kind): New definition.
13709 (read_and_check_comp_unit_head): Change parameter
13710 is_debug_types_section to section_kind.
13711 (dwarf2_locate_sections): Handle loclists, line_str and rnglists.
13712 (read_comp_unit_head): Change parameter abfd to section, add parameter
13713 section_kind. Handle DWARF-5.
13714 (error_check_comp_unit_head): Accept also DWARF version 5.
13715 (read_and_check_comp_unit_head): Change parameter
13716 is_debug_types_section to section_kind.
13717 (read_and_check_type_unit_head): Delete function.
13718 (read_abbrev_offset): Handle DWARF-5.
13719 (create_debug_type_hash_table): Add parameter section_kind. Process
13720 only DW_UT_type. Use signature and type_offset_in_tu from struct
13721 comp_unit_head.
13722 (create_debug_types_hash_table): Update create_debug_type_hash_table
13723 caller.
13724 (create_all_type_units): Call create_debug_type_hash_table.
13725 (read_cutu_die_from_dwo, init_cutu_and_read_dies): Change
13726 read_and_check_type_unit_head caller to read_and_check_comp_unit_head
13727 caller.
13728 (skip_one_die): Handle DW_FORM_implicit_const.
13729 (dwarf2_rnglists_process): New function.
13730 (dwarf2_ranges_process): Call dwarf2_rnglists_process for DWARF-5.
13731 (abbrev_table_read_table): Handle DW_FORM_implicit_const.
13732 (read_attribute_value): Handle DW_FORM_implicit_const,
13733 DW_FORM_line_strp.
13734 (read_attribute): Handle DW_FORM_implicit_const.
13735 (read_indirect_string_at_offset_from): New function from
13736 read_indirect_string_at_offset.
13737 (read_indirect_string_at_offset): Call
13738 read_indirect_string_at_offset_from.
13739 (read_indirect_line_string_at_offset): New function.
13740 (read_indirect_string): New function comment.
13741 (read_indirect_line_string): New function.
13742 (read_unsigned_leb128): Make it global.
13743 (dwarf2_string_attr): Handle DWARF-5.
13744 (add_include_dir_stub, read_formatted_entries): New functions.
13745 (dwarf_decode_line_header, dump_die_shallow, cu_debug_loc_section):
13746 Handle DWARF-5.
13747 (per_cu_header_read_in): Update read_comp_unit_head caller.
13748 (dwarf2_version): New function.
13749 * symfile.h (struct dwarf2_debug_sections): Add loclists, line_str and
13750 rnglists.
13751 * xcoffread.c (dwarf2_xcoff_names): Update struct dwarf2_debug_sections
13752 fields.
13753
22d2f3ab
JK
137542017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
13755
13756 * dwarf2read.c (abbrev_table_read_table): Read the data only once.
13757
5f46c5a5
JK
137582017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
13759
13760 * dwarf2read.c (dwarf2_ranges_process): New function from
13761 dwarf2_ranges_read.
13762 (dwarf2_ranges_read, dwarf2_record_block_ranges): Use
13763 dwarf2_ranges_process.
13764
78d4d2c5
JK
137652017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
13766
13767 * dwarf2read.c (create_debug_type_hash_table): New function from
13768 create_debug_types_hash_table.
13769 (create_debug_types_hash_table): Call create_debug_type_hash_table.
13770 (create_all_type_units, open_and_init_dwo_file): Update
13771 create_debug_types_hash_table callers.
13772
1b076f25
SDJ
137732017-02-20 Sergio Durigan Junior <sergiodj@redhat.com>
13774
13775 PR gdb/16188
13776 * fork-child.c (trace_start_error): Fix thinko. va_end should
13777 refer to 'ap', not 'args'.
13778
0db8980c
SDJ
137792017-02-20 Sergio Durigan Junior <sergiodj@redhat.com>
13780 Pedro Alves <palves@redhat.com>
13781
13782 PR gdb/16188
13783 * darwin-nat.c (darwin_ptrace_me): Check if calls to system
13784 calls succeeded.
13785 * fork-child.c (trace_start_error): New function.
13786 (trace_start_error_with_name): Likewise.
13787 * gnu-nat.c (gnu_ptrace_me): Check if call to PTRACE succeeded.
13788 * inf-ptrace.c (inf_ptrace_me): Likewise.
13789 * inferior.h (trace_start_error): New prototype.
13790 (trace_start_error_with_name): Likewise.
13791
99e8a4f9
SDJ
137922017-02-15 Sergio Durigan Junior <sergiodj@redhat.com>
13793
13794 PR gdb/21164
13795 * psymtab.c (maintenance_print_psymbols): Verify if 'argv' is not
13796 NULL before using it.
13797 * symmisc.c (maintenance_print_symbols): Likewise.
13798 (maintenance_print_msymbols): Likewise.
13799
4e746bb6
TW
138002017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
13801
13802 * NEWS: Add record Python bindings entry.
13803
138042017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
13805
13806 * Makefile.in (SUBDIR_PYTHON_OBS): Add py-record-btrace.o,
13807 py-record-full.o.
13808 (SUBDIR_PYTHON_SRCS): Add py-record-btrace.c, py-record-full.c.
13809 * python/py-record-btrace.c, python/py-record-btrace.h,
13810 python/py-record-full.c, python/py-record-full.h: New file.
13811 * python/py-record.c: Add include for py-record-btrace.h and
13812 py-record-full.h.
13813 (recpy_method, recpy_format, recpy_goto, recpy_replay_position,
13814 recpy_instruction_history, recpy_function_call_history, recpy_begin,
13815 recpy_end): Use functions from py-record-btrace.c and py-record-full.c.
13816 * python/python-internal.h (PyInt_FromSsize_t, PyInt_AsSsize_t):
13817 New definition.
13818 (gdbpy_initialize_btrace): New export.
13819 * python/python.c (_initialize_python): Add gdbpy_initialize_btrace.
13820
138212017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
13822
13823 * Makefile.in (SUBDIR_PYTHON_OBS): Add python/py-record.o.
13824 (SUBDIR_PYTHON_SRCS): Add python/py-record.c.
13825 * python/py-record.c: New file.
13826 * python/python-internal.h (gdbpy_start_recording,
13827 gdbpy_current_recording, gdpy_stop_recording,
13828 gdbpy_initialize_record): New export.
13829 * python/python.c (_initialize_python): Add gdbpy_initialize_record.
13830 (python_GdbMethods): Add gdbpy_start_recording,
13831 gdbpy_current_recording and gdbpy_stop_recording.
13832
138332017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
13834
13835 * record-btrace.c (record_btrace_record_method): New function.
13836 (init_record_btrace_ops): Initialize to_record_method.
13837 * record-full.c (record_full_record_method): New function.
13838 (init_record_full_ops, init_record_full_core_ops): Add
13839 record_full_record_method.
13840 * record.h (enum record_method): New enum.
13841 * target-debug.h (target_debug_print_enum_record_method: New define.
13842 * target-delegates.c: Regenerate.
13843 * target.c (target_record_method): New function.
13844 * target.h: Include record.h.
13845 (struct target_ops) <to_record_method>: New field.
13846 (target_record_method): New export.
13847
138482017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
13849
13850 * record.h (record_start, record_stop): New export.
13851 * record.c (record_start, record_stop): New function.
13852
138532017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
13854
13855 * btrace.c (btrace_fetch): Copy function call segments pointer
13856 into a vector.
13857 (btrace_clear): Clear the vector.
13858 (btrace_find_insn_by_number): Use binary search to find the correct
13859 function call segment.
13860 * btrace.h (brace_fun_p): New typedef.
13861 (struct btrace_thread_info) <functions>: New field.
13862
138632017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
13864
13865 * record-btrace.c (btrace_ui_out_decode_error): Move most of it ...
13866 * btrace.c (btrace_decode_error): ... here. New function.
13867 * btrace.h (btrace_decode_error): New export.
13868
138692017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
13870
13871 * btrace.c (ftrace_call_num_insn, btrace_insn_get_error): New function.
13872 (ftrace_new_function, btrace_insn_number, btrace_insn_cmp,
13873 btrace_find_insn_by_number): Remove special case for gaps.
13874 * btrace.h (btrace_insn_get_error): New export.
13875 (btrace_insn_number, btrace_find_insn_by_number): Adjust comment.
13876 * record-btrace.c (btrace_insn_history): Print number for gaps.
13877 (record_btrace_info, record_btrace_goto): Handle gaps.
13878
3f77c769
TT
138792017-02-14 Tom Tromey <tom@tromey.com>
13880
13881 PR python/13598:
13882 * python/python.c (gdbpy_before_prompt_hook): Emit before_prompt
13883 event.
13884 * python/py-evts.c (gdbpy_initialize_py_events): Add
13885 before_prompt registry.
13886 * python/py-events.h (events_object) <before_prompt>: New field.
13887
4c2c7ac6
MM
138882017-02-14 Markus Metzger <markus.t.metzger@intel.com>
13889
13890 * btrace.c (ftrace_new_switch): Preserve up link and flags.
13891
5cf30ebf
LM
138922017-02-13 Luis Machado <lgustavo@codesourcery.com>
13893
13894 * symfile (_initialize_symfile): Add usage text to the load command's
13895 help text.
13896
26a06916
SM
138972017-02-10 Simon Marchi <simon.marchi@ericsson.com>
13898
13899 * utils.c (defaulted_query): Don't query on secondary UIs.
13900
0b145e37
TT
139012017-02-10 Tom Tromey <tom@tromey.com>
13902
13903 * rust-lang.c (rust_get_disr_info): Remove unused variable.
13904
2d8365c4
TT
139052017-02-10 Tom Tromey <tom@tromey.com>
13906
13907 * python/py-value.c (valpy_richcompare_throw): Remove unnecessary
13908 "cleanup" local.
13909 * python/py-type.c (typy_legacy_template_argument): Remove
13910 unnecessary "cleanup" local.
13911
2bb8f231
TT
139122017-02-10 Tom Tromey <tom@tromey.com>
13913
13914 * python/python.c (do_start_initialization): New function, from
13915 _initialize_python.
13916 (_initialize_python): Call do_start_initialization.
13917 * python/py-linetable.c (ltpy_iternext): Use explicit returns, not
13918 goto.
13919
1bdfaf42
TT
139202017-02-10 Tom Tromey <tom@tromey.com>
13921
13922 * python/py-prettyprint.c (pretty_print_one_value): Use
13923 gdbpy_ref.
13924
88b6faea
TT
139252017-02-10 Tom Tromey <tom@tromey.com>
13926
13927 * python/py-cmd.c (cmdpy_destroyer): Use gdbpy_ref.
13928 * python/py-breakpoint.c (gdbpy_breakpoint_deleted): Use
13929 gdbpy_ref.
13930 * python/py-type.c (field_new): Use gdbpy_ref.
13931 * python/py-symtab.c (symtab_and_line_to_sal_object): Use
13932 gdbpy_ref.
13933 * python/py-progspace.c (pspy_new): Use gdbpy_ref.
13934 (py_free_pspace): Likewise.
13935 (pspace_to_pspace_object): Likewise.
13936 * python/py-objfile.c (objfpy_new): Use gdbpy_ref.
13937 (py_free_objfile): Likewise.
13938 (objfile_to_objfile_object): Likewise.
13939 * python/py-inferior.c (delete_thread_object): Use
13940 gdbpy_ref.
13941 (infpy_read_memory): Likewise.
13942 (py_free_inferior): Likewise.
13943 * python/py-evtregistry.c (create_eventregistry_object): Use
13944 gdbpy_ref.
13945 * python/py-event.c (create_event_object): Use gdbpy_ref.
13946
7780f186
TT
139472017-02-10 Tom Tromey <tom@tromey.com>
13948
13949 * python/py-ref.h (gdbpy_ref_policy): Now a template.
13950 (gdbpy_ref): Now a template; allow subclasses of PyObject to be
13951 used.
13952 * python/py-arch.c, python/py-bpevent.c, python/py-breakpoint.c,
13953 python/py-cmd.c, python/py-continueevent.c, python/py-event.c,
13954 python/py-exitedevent.c, python/py-finishbreakpoint.c,
13955 python/py-framefilter.c, python/py-function.c,
13956 python/py-inferior.c, python/py-infevents.c,
13957 python/py-linetable.c, python/py-newobjfileevent.c,
13958 python/py-param.c, python/py-prettyprint.c, python/py-ref.h,
13959 python/py-signalevent.c, python/py-stopevent.c,
13960 python/py-symbol.c, python/py-threadevent.c, python/py-type.c,
13961 python/py-unwind.c, python/py-utils.c, python/py-value.c,
13962 python/py-varobj.c, python/py-xmethods.c, python/python.c,
13963 varobj.c: Change gdbpy_ref to gdbpy_ref<>.
13964
d4b0bb18
TT
139652017-02-10 Tom Tromey <tom@tromey.com>
13966
13967 * ui-out.h (ui_out_emit_type): New class.
13968 (ui_out_emit_tuple, ui_out_emit_list): New typedefs.
13969 * python/py-framefilter.c (py_print_single_arg): Use gdb::optional
13970 and ui_out_emit_tuple.
13971 (enumerate_locals): Likewise.
13972 (py_mi_print_variables, py_print_locals, py_print_args): Use
13973 ui_out_emit_list.
13974 (py_print_frame): Use gdb::optional, ui_out_emit_tuple,
13975 ui_out_emit_list.
13976 * common/gdb_optional.h: New file.
13977
f67f945c
MG
139782017-02-10 Martin Galvan <martingalvan@sourceware.org>
13979
13980 * MAINTAINERS (Write After Approval): Update my e-mail address.
13981
18da0c51
MG
139822017-02-10 Martin Galvan <martingalvan@sourceware.org>
13983
13984 PR gdb/21122
13985 * breakpoint.c (_initialize_breakpoint): Update the help description
13986 of the 'commands' command to indicate that it takes a list argument.
13987
62c14536
SM
139882017-02-09 Simon Marchi <simon.marchi@ericsson.com>
13989
13990 * interps.c (current_interp_set_logging): Remove "return".
13991
ff6fa247
GB
139922017-02-09 Gary Benson <gbenson@redhat.com>
13993
13994 * symtab.c (add_symtab_completions): Prevent NULL pointer
13995 dereference.
13996
a474bd8e
PA
139972017-02-08 Pedro Alves <palves@redhat.com>
13998
13999 * interps.c (interp::interp): Remove reference to quiet_p.
14000 (interp_set): Make static. Remove dead "Switching to" output
14001 code.
14002 (interp_quiet_p, interp_set_quiet): Delete.
14003 (interpreter_exec_cmd): Don't set the interpreter quiet.
14004 * interps.h (interp_quiet_p): Make static.
14005 (class interp) <quiet_p>: Remove field
14006
3d7b173c
JG
140072017-02-08 Jerome Guitton <guitton@adacore.com>
14008
604c4576
JG
14009 * cli/cli-decode.c (find_command_name_length): Make it extern.
14010 * cli/cli-decode.h (find_command_name_length): Declare.
14011 * cli/cli-script.c (command_name_equals, line_first_arg):
14012 New functions.
14013 (process_next_line): Use cli-decode to parse command names.
14014 (build_command_line): Make args a constant pointer.
14015
140162017-02-08 Jerome Guitton <guitton@adacore.com>
6dbb839a 14017
3d7b173c
JG
14018 * cli-decode.c (lookup_cmd_1, lookup_cmd_composition):
14019 Remove case-insensitive search.
14020
1291063d
JM
140212017-02-07 Jose E. Marchesi <jose.marchesi@oracle.com>
14022
14023 * sparc-tdep.c (sparc32_gdbarch_init): Do not place a + operator
14024 at the end of the line. Avoids an ARI warning.
14025
20b477a7
LM
140262017-02-06 Luis Machado <lgustavo@codesourcery.com>
14027
14028 * NEWS: Mention support for record/replay of Intel 64 rdrand and
14029 rdseed instructions.
14030 i386-tdep.c (i386_process_record): Handle Intel 64 rdrand and rseed.
14031
3f7b46f2
IR
140322017-02-06 Ivo Raisr <ivo.raisr@oracle.com>
14033
14034 PR tdep/20936
14035 Provide and use sparc32 and sparc64 target description XML files.
14036 * features/sparc/sparc32-cp0.xml, features/sparc/sparc32-cpu.xml,
14037 features/sparc/sparc32-fpu.xml: New files for sparc 32-bit.
14038 * features/sparc/sparc64-cp0.xml, features/sparc/sparc64-cpu.xml,
14039 features/sparc/sparc64-fpu.xml: New files for sparc 64-bit.
14040 * features/sparc/sparc32-solaris.xml: New file.
14041 * features/sparc/sparc64-solaris.xml: New file.
14042 * features/sparc/sparc32-solaris.c: Generated.
14043 * features/sparc/sparc64-solaris.c: Generated.
14044 * sparc-tdep.h: Account for differences in target descriptions.
14045 * sparc-tdep.c (sparc32_register_name): Use target provided registers.
14046 (sparc32_register_type): Use target provided registers.
14047 (validate_tdesc_registers): New function.
14048 (sparc32_gdbarch_init): Use tdesc_has_registers.
14049 Set pseudoregister functions.
14050 * sparc64-tdep.c (sparc64_register_name): Use target provided registers.
14051 (sparc64_register_type): Use target provided registers.
14052 (sparc64_init_abi): Set pseudoregister functions.
14053
f0fd41c1
TT
140542017-02-03 Tom Tromey <tom@tromey.com>
14055
14056 PR rust/21097:
14057 * rust-lang.c (rust_print_type) <TYPE_CODE_UNION>: Handle enums
14058 with a single member.
14059
d6f9b0fb
PA
140602017-02-03 Pedro Alves <palves@redhat.com>
14061
14062 * cli/cli-interp.c (cli_interp_base::cli_interp_base)
14063 (cli_interp_base::~cli_interp_base): New.
14064 (cli_interp): New struct.
14065 (as_cli_interp): Cast the interp itself to cli_interp.
14066 (cli_interpreter_pre_command_loop): Rename to ...
14067 (cli_interp_base::pre_command_loop): ... this. Remove 'self'
14068 parameter.
14069 (cli_interpreter_init): Rename to ...
14070 (cli_interp::init): ... this. Remove 'self' parameter. Use
14071 boolean. Make extern.
14072 (cli_interpreter_resume): Rename to ...
14073 (cli_interp::resume): ... this. Remove 'data' parameter. Make
14074 extern.
14075 (cli_interpreter_suspend): Rename to ...
14076 (cli_interp::suspend): ... this. Remove 'data' parameter. Make
14077 extern.
14078 (cli_interpreter_exec): Rename to ...
14079 (cli_interp::exec): ... this. Remove 'data' parameter. Make
14080 extern.
14081 (cli_interpreter_supports_command_editing): Rename to ...
14082 (cli_interp_base::supports_command_editing): ... this. Remove
14083 'interp' parameter. Make extern.
14084 (cli_ui_out): Rename to ...
14085 (cli_interp::interp_ui_out): ... this. Remove 'interp' parameter.
14086 Make extern.
14087 (cli_set_logging): Rename to ...
14088 (cli_interp_base::set_logging): ... this. Remove 'interp'
14089 parameter. Make extern.
14090 (cli_interp_procs): Delete.
14091 (cli_interp_factory): Adjust to use "new".
14092 * cli/cli-interp.h: Include "interps.h".
14093 (struct cli_interp_base): New struct.
14094 * interps.c (struct interp): Delete. Fields moved to interps.h.
14095 (interp_new): Delete.
14096 (interp::interp, interp::~interp): New.
14097 (interp_set): Use bool, and return void. Assume the interpreter
14098 has suspend, init and resume methods, and that the all return
14099 void.
14100 (set_top_level_interpreter): interp_set returns void.
14101 (interp_ui_out): Adapt.
14102 (current_interp_set_logging): Adapt.
14103 (interp_data): Delete.
14104 (interp_pre_command_loop, interp_supports_command_editing): Adapt.
14105 (interp_exec): Adapt.
14106 (top_level_interpreter_data): Delete.
14107 * interps.h (interp_init_ftype, interp_resume_ftype)
14108 (interp_suspend_ftype, interp_exec_ftype)
14109 (interp_pre_command_loop_ftype, interp_ui_out_ftype): Delete.
14110 (class interp): New.
14111 (interp_new): Delete.
14112 (interp_set): Now returns void. Use bool.
14113 (interp_data, top_level_interpreter_data): Delete.
14114 * mi/mi-common.h: Include interps.h.
14115 (class mi_interp): Inherit from interp. Define a ctor. Declare
14116 init, resume, suspect, exec, interp_ui_out, set_logging and
14117 pre_command_loop methods.
14118 * mi/mi-interp.c (as_mi_interp): Cast the interp itself.
14119 (mi_interpreter_init): Rename to ...
14120 (mi_interp::init): ... this. Remove the 'interp' parameter, use
14121 bool, return void and make extern. Adjust.
14122 (mi_interpreter_resume): ... Rename to ...
14123 (mi_interp::resume): ... this. Remove the 'data' parameter,
14124 return void and make extern. Adjust.
14125 (mi_interpreter_suspend): ... Rename to ...
14126 (mi_interp::suspend): ... this. Remove the 'data' parameter,
14127 return void and make extern. Adjust.
14128 (mi_interpreter_exec): ... Rename to ...
14129 (mi_interp::exec): ... this. Remove the 'data' parameter and make
14130 extern. Adjust.
14131 (mi_interpreter_pre_command_loop): ... Rename to ...
14132 (mi_interp::pre_command_loop): ... this. Remove the 'self'
14133 parameter and make extern.
14134 (mi_on_normal_stop_1): Adjust.
14135 (mi_ui_out): Rename to ...
14136 (mi_interp::interp_ui_out): ... this. Remove the 'interp'
14137 parameter and make extern. Adjust.
14138 (mi_set_logging): Rename to ...
14139 (mi_interp::set_logging): ... this. Remove the 'interp'
14140 parameter and make extern. Adjust.
14141 (mi_interp_procs): Delete.
14142 (mi_interp_factory): Adjust to use 'new'.
14143 * mi/mi-main.c (mi_cmd_gdb_exit, captured_mi_execute_command)
14144 (mi_print_exception, mi_execute_command, mi_load_progress):
14145 Adjust.
14146 * tui/tui-interp.c (tui_interp): New class.
14147 (as_tui_interp): Return a tui_interp pointer.
14148 (tui_on_normal_stop, tui_on_signal_received)
14149 (tui_on_end_stepping_range, tui_on_signal_exited, tui_on_exited)
14150 (tui_on_no_history, tui_on_user_selected_context_changed): Adjust
14151 to use interp::interp_ui_out.
14152 (tui_init): Rename to ...
14153 (tui_interp::init): ... this. Remove the 'self' parameter, use
14154 bool, return void and make extern. Adjust.
14155 (tui_resume): Rename to ...
14156 (tui_interp::resume): ... this. Remove the 'data' parameter,
14157 return void and make extern. Adjust.
14158 (tui_suspend): Rename to ...
14159 (tui_interp::suspend): ... this. Remove the 'data' parameter,
14160 return void and make extern. Adjust.
14161 (tui_ui_out): Rename to ...
14162 (tui_interp::interp_ui_out): ... this. Remove the 'self'
14163 parameter, and make extern. Adjust.
14164 (tui_exec): Rename to ...
14165 (tui_interp::exec): ... this. Remove the 'data' parameter and
14166 make extern.
14167 (tui_interp_procs): Delete.
14168 (tui_interp_factory): Use "new".
14169
65c40c95
TT
141702017-02-02 Tom Tromey <tom@tromey.com>
14171
14172 * rust-exp.y (ends_raw_string, space_then_number)
14173 (rust_identifier_start_p): Return bool.
14174 * rust-lang.c (rust_tuple_type_p, rust_underscore_fields)
14175 (rust_tuple_struct_type_p, rust_tuple_variant_type_p)
14176 (rust_slice_type_p, rust_range_type_p, rust_u8_type_p)
14177 (rust_chartype_p): Return bool.
14178 (val_print_struct, rust_print_struct_def, rust_print_type):
14179 Update.
14180 * rust-lang.h (rust_tuple_type_p, rust_tuple_struct_type_p):
14181 Return bool.
14182
b50f188d
TT
141832017-02-02 Tom Tromey <tom@tromey.com>
14184
14185 * rust-lang.c: Reindent.
14186
03c85b11
TT
141872017-02-02 Tom Tromey <tom@tromey.com>
14188
14189 * rust-lang.h (rust_crate_for_block): Update.
14190 * rust-lang.c (rust_crate_for_block): Return std::string.
14191 (rust_get_disr_info): Use std:;string, not
14192 gdb::unique_xmalloc_ptr.
14193 * rust-exp.y (crate_name): Update.
14194
9b6da501
PA
141952017-02-02 Pedro Alves <palves@redhat.com>
14196
14197 * disasm-selftests.c (print_one_insn_test): Move the "verbose"
14198 field out of gdb_disassembler_test and make it static.
14199
ec4cb20b
PA
142002017-02-02 Pedro Alves <palves@redhat.com>
14201
14202 * mi/mi-common.h (struct mi_interp): Delete the mi2_interp,
14203 mi1_interp and mi_interp fields.
14204
5be5dbf0
PA
142052017-02-02 Pedro Alves <palves@redhat.com>
14206
616268b6
PA
14207 * cli/cli-interp.c (struct saved_output_files, saved_output):
14208 Moved from cli/cli-logging.c.
14209 (cli_set_logging): New function.
14210 (cli_interp_procs): Install cli_set_logging.
14211 * cli/cli-interp.h (make_logging_output, cli_set_logging):
14212 Declare.
14213 * cli/cli-logging.c (struct saved_output_files, saved_output):
14214 Moved to cli/cli-interp.c.
14215 (pop_output_files): Don't save outputs here.
14216 (make_logging_output): New function.
14217 (handle_redirections): Don't build tee nor save previous outputs
14218 here.
14219 * interps.c (current_interp_set_logging): Change prototype.
14220 Assume there's always a set_logging_proc method installed.
14221 * interps.h (interp_set_logging_ftype): Change prototype.
14222 (current_interp_set_logging): Change prototype and adjust comment.
14223 * mi/mi-interp.c (mi_set_logging): Change protototype. Adjust to
14224 use make_logging_output.
14225 * tui/tui-interp.c (tui_interp_procs): Install cli_set_logging.
142262017-02-02 Pedro Alves <palves@redhat.com>
14227
5be5dbf0
PA
14228 * cli/cli-logging.c (maybe_warn_already_logging): New factored out
14229 from ...
14230 (set_logging_overwrite): ... here.
14231 (logging_no_redirect_file): Delete.
14232 (set_logging_redirect): Don't handle redirection on the fly.
14233 Instead warn that "logging off" / "logging on" is necessary.
14234 (pop_output_files): Delete references to logging_no_redirect_file.
14235 (show_logging_command): Always speak in terms of what will happen
14236 once logging is reenabled.
14237
c99cc448
PA
142382017-02-02 Pedro Alves <palves@redhat.com>
14239
14240 * disasm.h (gdb_pretty_print_disassembler): Tweak intro comment.
14241
8b172ce7
PA
142422017-02-02 Pedro Alves <palves@redhat.com>
14243
14244 * disasm.c (gdb_pretty_print_insn): Rename to ...
14245 (gdb_pretty_print_disassembler::pretty_print_insn): ... this.
14246 Remove gdbarch parameter. Adapt to clear the object's buffers
14247 instead of allocating new buffers, and to print using the object's
14248 gdb_disassembler instead of calling gdb_print_insn.
14249 (dump_insns): Use gdb_pretty_print_disassembler.
14250 * disasm.h (gdb_pretty_print_insn): Delete declaration.
14251 (gdb_pretty_print_disassembler): New class.
14252 * record-btrace.c (btrace_insn_history): Use
14253 gdb_pretty_print_disassembler.
14254
d7e74731
PA
142552017-02-02 Pedro Alves <palves@redhat.com>
14256
14257 * ada-lang.c (type_as_string): Use string_file.
14258 * ada-valprint.c (ada_print_floating): Use string_file.
14259 * ada-varobj.c (ada_varobj_scalar_image)
14260 (ada_varobj_get_value_image): Use string_file.
14261 * aix-thread.c (aix_thread_extra_thread_info): Use string_file.
14262 * arm-tdep.c (_initialize_arm_tdep): Use string_printf.
14263 * breakpoint.c (update_inserted_breakpoint_locations)
14264 (insert_breakpoint_locations, reattach_breakpoints)
14265 (print_breakpoint_location, print_one_detail_ranged_breakpoint)
14266 (print_it_watchpoint): Use string_file.
14267 (save_breakpoints): Use stdio_file.
14268 * c-exp.y (oper): Use string_file.
14269 * cli/cli-logging.c (set_logging_redirect): Use ui_file_up and
14270 tee_file.
14271 (pop_output_files): Use delete.
14272 (handle_redirections): Use stdio_file and tee_file.
14273 * cli/cli-setshow.c (do_show_command): Use string_file.
14274 * compile/compile-c-support.c (c_compute_program): Use
14275 string_file.
14276 * compile/compile-c-symbols.c (generate_vla_size): Take a
14277 'string_file &' instead of a 'ui_file *'.
14278 (generate_c_for_for_one_variable): Take a 'string_file &' instead
14279 of a 'ui_file *'. Use string_file.
14280 (generate_c_for_variable_locations): Take a 'string_file &'
14281 instead of a 'ui_file *'.
14282 * compile/compile-internal.h (generate_c_for_for_one_variable):
14283 Take a 'string_file &' instead of a 'ui_file *'.
14284 * compile/compile-loc2c.c (push, pushf, unary, binary)
14285 (print_label, pushf_register_address, pushf_register)
14286 (do_compile_dwarf_expr_to_c): Take a 'string_file &' instead of a
14287 'ui_file *'. Adjust.
14288 * compile/compile.c (compile_to_object): Use string_file.
14289 * compile/compile.h (compile_dwarf_expr_to_c)
14290 (compile_dwarf_bounds_to_c): Take a 'string_file &' instead of a
14291 'ui_file *'.
14292 * cp-support.c (inspect_type): Use string_file and obstack_copy0.
14293 (replace_typedefs_qualified_name): Use string_file and
14294 obstack_copy0.
14295 * disasm.c (gdb_pretty_print_insn): Use string_file.
14296 (gdb_disassembly): Adjust reference the null_stream global.
14297 (do_ui_file_delete): Delete.
14298 (gdb_insn_length): Use null_stream.
14299 * dummy-frame.c (maintenance_print_dummy_frames): Use stdio_file.
14300 * dwarf2loc.c (dwarf2_compile_property_to_c)
14301 (locexpr_generate_c_location, loclist_generate_c_location): Take a
14302 'string_file &' instead of a 'ui_file *'.
14303 * dwarf2loc.h (dwarf2_compile_property_to_c): Likewise.
14304 * dwarf2read.c (do_ui_file_peek_last): Delete.
14305 (dwarf2_compute_name): Use string_file.
14306 * event-top.c (gdb_setup_readline): Use stdio_file.
14307 * gdbarch.sh (verify_gdbarch): Use string_file.
14308 * gdbtypes.c (safe_parse_type): Use null_stream.
14309 * guile/scm-breakpoint.c (gdbscm_breakpoint_commands): Use
14310 string_file.
14311 * guile/scm-disasm.c (gdbscm_print_insn_from_port): Take a
14312 'string_file *' instead of a 'ui_file *'.
14313 (gdbscm_arch_disassemble): Use string_file.
14314 * guile/scm-frame.c (frscm_print_frame_smob): Use string_file.
14315 * guile/scm-ports.c (class ioscm_file_port): Now a class that
14316 inherits from ui_file.
14317 (ioscm_file_port_delete, ioscm_file_port_rewind)
14318 (ioscm_file_port_put): Delete.
14319 (ioscm_file_port_write): Rename to ...
14320 (ioscm_file_port::write): ... this. Remove file_port_magic
14321 checks.
14322 (ioscm_file_port_new): Delete.
14323 (ioscm_with_output_to_port_worker): Use ioscm_file_port and
14324 ui_file_up.
14325 * guile/scm-type.c (tyscm_type_name): Use string_file.
14326 * guile/scm-value.c (vlscm_print_value_smob, gdbscm_value_print):
14327 Use string_file.
14328 * infcmd.c (print_return_value_1): Use string_file.
14329 * infrun.c (print_target_wait_results): Use string_file.
14330 * language.c (add_language): Use string_file.
14331 * location.c (explicit_to_string_internal): Use string_file.
14332 * main.c (captured_main_1): Use null_file.
14333 * maint.c (maintenance_print_architecture): Use stdio_file.
14334 * mi/mi-cmd-stack.c (list_arg_or_local): Use string_file.
14335 * mi/mi-common.h (struct mi_interp) <out, err, log, targ,
14336 event_channel>: Change type to mi_console_file pointer.
14337 * mi/mi-console.c (mi_console_file_fputs, mi_console_file_flush)
14338 (mi_console_file_delete): Delete.
14339 (struct mi_console_file): Delete.
14340 (mi_console_file_magic): Delete.
14341 (mi_console_file_new): Delete.
14342 (mi_console_file::mi_console_file): New.
14343 (mi_console_file_delete): Delete.
14344 (mi_console_file_fputs): Delete.
14345 (mi_console_file::write): New.
14346 (mi_console_raw_packet): Delete.
14347 (mi_console_file::flush): New.
14348 (mi_console_file_flush): Delete.
14349 (mi_console_set_raw): Rename to ...
14350 (mi_console_file::set_raw): ... this.
14351 * mi/mi-console.h (class mi_console_file): New class.
14352 (mi_console_file_new, mi_console_set_raw): Delete.
14353 * mi/mi-interp.c (mi_interpreter_init): Use mi_console_file.
14354 (mi_set_logging): Use delete and tee_file. Adjust.
14355 * mi/mi-main.c (output_register): Use string_file.
14356 (mi_cmd_data_evaluate_expression): Use string_file.
14357 (mi_cmd_data_read_memory): Use string_file.
14358 (mi_cmd_execute, print_variable_or_computed): Use string_file.
14359 * mi/mi-out.c (mi_ui_out::main_stream): New.
14360 (mi_ui_out::rewind): Use main_stream and
14361 string_file.
14362 (mi_ui_out::put): Use main_stream and string_file.
14363 (mi_ui_out::mi_ui_out): Remove 'stream' parameter.
14364 Allocate a 'string_file' instead.
14365 (mi_out_new): Don't allocate a mem_fileopen stream here.
14366 * mi/mi-out.h (mi_ui_out::mi_ui_out): Remove 'stream' parameter.
14367 (mi_ui_out::main_stream): Declare method.
14368 * printcmd.c (eval_command): Use string_file.
14369 * psymtab.c (maintenance_print_psymbols): Use stdio_file.
14370 * python/py-arch.c (archpy_disassemble): Use string_file.
14371 * python/py-breakpoint.c (bppy_get_commands): Use string_file.
14372 * python/py-frame.c (frapy_str): Use string_file.
14373 * python/py-framefilter.c (py_print_type, py_print_single_arg):
14374 Use string_file.
14375 * python/py-type.c (typy_str): Use string_file.
14376 * python/py-unwind.c (unwind_infopy_str): Use string_file.
14377 * python/py-value.c (valpy_str): Use string_file.
14378 * record-btrace.c (btrace_insn_history): Use string_file.
14379 * regcache.c (regcache_print): Use stdio_file.
14380 * reggroups.c (maintenance_print_reggroups): Use stdio_file.
14381 * remote.c (escape_buffer): Use string_file.
14382 * rust-lang.c (rust_get_disr_info): Use string_file.
14383 * serial.c (serial_open_ops_1): Use stdio_file.
14384 (do_serial_close): Use delete.
14385 * stack.c (print_frame_arg): Use string_file.
14386 (print_frame_args): Remove local mem_fileopen stream, not used.
14387 (print_frame): Use string_file.
14388 * symmisc.c (maintenance_print_symbols): Use stdio_file.
14389 * symtab.h (struct symbol_computed_ops) <generate_c_location>:
14390 Take a 'string_file *' instead of a 'ui_file *'.
14391 * top.c (new_ui): Use stdio_file and stderr_file.
14392 (free_ui): Use delete.
14393 (execute_command_to_string): Use string_file.
14394 (quit_confirm): Use string_file.
14395 * tracepoint.c (collection_list::append_exp): Use string_file.
14396 * tui/tui-disasm.c (tui_disassemble): Use string_file.
14397 * tui/tui-file.c: Don't include "ui-file.h".
14398 (enum streamtype, struct tui_stream): Delete.
14399 (tui_file_new, tui_file_delete, tui_fileopen, tui_sfileopen)
14400 (tui_file_isatty, tui_file_rewind, tui_file_put): Delete.
14401 (tui_file::tui_file): New method.
14402 (tui_file_fputs): Delete.
14403 (tui_file_get_strbuf): Delete.
14404 (tui_file::puts): New method.
14405 (tui_file_adjust_strbuf): Delete.
14406 (tui_file_flush): Delete.
14407 (tui_file::flush): New method.
14408 * tui/tui-file.h: Tweak intro comment.
14409 Include ui-file.h.
14410 (tui_fileopen, tui_sfileopen, tui_file_get_strbuf)
14411 (tui_file_adjust_strbuf): Delete declarations.
14412 (class tui_file): New class.
14413 * tui/tui-io.c (tui_initialize_io): Use tui_file.
14414 * tui/tui-regs.c (tui_restore_gdbout): Use delete.
14415 (tui_register_format): Use string_stream.
14416 * tui/tui-stack.c (tui_make_status_line): Use string_file.
14417 (tui_get_function_from_frame): Use string_file.
14418 * typeprint.c (type_to_string): Use string_file.
14419 * ui-file.c (struct ui_file, ui_file_magic, ui_file_new): Delete.
14420 (null_stream): New global.
14421 (ui_file_delete): Delete.
14422 (ui_file::ui_file): New.
14423 (null_file_isatty): Delete.
14424 (ui_file::~ui_file): New.
14425 (null_file_rewind): Delete.
14426 (ui_file::printf): New.
14427 (null_file_put): Delete.
14428 (null_file_flush): Delete.
14429 (ui_file::putstr): New.
14430 (null_file_write): Delete.
14431 (ui_file::putstrn): New.
14432 (null_file_read): Delete.
14433 (ui_file::putc): New.
14434 (null_file_fputs): Delete.
14435 (null_file_write_async_safe): Delete.
14436 (ui_file::vprintf): New.
14437 (null_file_delete): Delete.
14438 (null_file::write): New.
14439 (null_file_fseek): Delete.
14440 (null_file::puts): New.
14441 (ui_file_data): Delete.
14442 (null_file::write_async_safe): New.
14443 (gdb_flush, ui_file_isatty): Adjust.
14444 (ui_file_put, ui_file_rewind): Delete.
14445 (ui_file_write): Adjust.
14446 (ui_file_write_for_put): Delete.
14447 (ui_file_write_async_safe, ui_file_read): Adjust.
14448 (ui_file_fseek): Delete.
14449 (fputs_unfiltered): Adjust.
14450 (set_ui_file_flush, set_ui_file_isatty, set_ui_file_rewind)
14451 (set_ui_file_put, set_ui_file_write, set_ui_file_write_async_safe)
14452 (set_ui_file_read, set_ui_file_fputs, set_ui_file_fseek)
14453 (set_ui_file_data): Delete.
14454 (string_file::~string_file, string_file::write)
14455 (struct accumulated_ui_file, do_ui_file_xstrdup, ui_file_xstrdup)
14456 (do_ui_file_as_string, ui_file_as_string): Delete.
14457 (do_ui_file_obsavestring, ui_file_obsavestring): Delete.
14458 (struct mem_file): Delete.
14459 (mem_file_new): Delete.
14460 (stdio_file::stdio_file): New.
14461 (mem_file_delete): Delete.
14462 (stdio_file::stdio_file): New.
14463 (mem_fileopen): Delete.
14464 (stdio_file::~stdio_file): New.
14465 (mem_file_rewind): Delete.
14466 (stdio_file::set_stream): New.
14467 (mem_file_put): Delete.
14468 (stdio_file::open): New.
14469 (mem_file_write): Delete.
14470 (stdio_file_magic, struct stdio_file): Delete.
14471 (stdio_file_new, stdio_file_delete, stdio_file_flush): Delete.
14472 (stdio_file::flush): New.
14473 (stdio_file_read): Rename to ...
14474 (stdio_file::read): ... this. Adjust.
14475 (stdio_file_write): Rename to ...
14476 (stdio_file::write): ... this. Adjust.
14477 (stdio_file_write_async_safe): Rename to ...
14478 (stdio_file::write_async_safe) ... this. Adjust.
14479 (stdio_file_fputs): Rename to ...
14480 (stdio_file::puts) ... this. Adjust.
14481 (stdio_file_isatty): Delete.
14482 (stdio_file_fseek): Delete.
14483 (stdio_file::isatty): New.
14484 (stderr_file_write): Rename to ...
14485 (stderr_file::write) ... this. Adjust.
14486 (stderr_file_fputs): Rename to ...
14487 (stderr_file::puts) ... this. Adjust.
14488 (stderr_fileopen, stdio_fileopen, gdb_fopen): Delete.
14489 (stderr_file::stderr_file): New.
14490 (tee_file_magic): Delete.
14491 (struct tee_file): Delete.
14492 (tee_file::tee_file): New.
14493 (tee_file_new): Delete.
14494 (tee_file::~tee_file): New.
14495 (tee_file_delete): Delete.
14496 (tee_file_flush): Rename to ...
14497 (tee_file::flush): ... this. Adjust.
14498 (tee_file_write): Rename to ...
14499 (tee_file::write): ... this. Adjust.
14500 (tee_file::write_async_safe): New.
14501 (tee_file_fputs): Rename to ...
14502 (tee_file::puts): ... this. Adjust.
14503 (tee_file_isatty): Rename to ...
14504 (tee_file::isatty): ... this. Adjust.
14505 * ui-file.h (struct obstack, struct ui_file): Don't
14506 forward-declare.
14507 (ui_file_new, ui_file_flush_ftype, set_ui_file_flush)
14508 (ui_file_write_ftype)
14509 (set_ui_file_write, ui_file_fputs_ftype, set_ui_file_fputs)
14510 (ui_file_write_async_safe_ftype, set_ui_file_write_async_safe)
14511 (ui_file_read_ftype, set_ui_file_read, ui_file_isatty_ftype)
14512 (set_ui_file_isatty, ui_file_rewind_ftype, set_ui_file_rewind)
14513 (ui_file_put_method_ftype, ui_file_put_ftype, set_ui_file_put)
14514 (ui_file_delete_ftype, set_ui_file_data, ui_file_fseek_ftype)
14515 (set_ui_file_fseek): Delete.
14516 (ui_file_data, ui_file_delete, ui_file_rewind)
14517 (struct ui_file): New.
14518 (ui_file_up): New.
14519 (class null_file): New.
14520 (null_stream): Declare.
14521 (ui_file_write_for_put, ui_file_put): Delete.
14522 (ui_file_xstrdup, ui_file_as_string, ui_file_obsavestring):
14523 Delete.
14524 (ui_file_fseek, mem_fileopen, stdio_fileopen, stderr_fileopen)
14525 (gdb_fopen, tee_file_new): Delete.
14526 (struct string_file): New.
14527 (struct stdio_file): New.
14528 (stdio_file_up): New.
14529 (struct stderr_file): New.
14530 (class tee_file): New.
14531 * ui-out.c (ui_out::field_stream): Take a 'string_file &' instead
14532 of a 'ui_file *'. Adjust.
14533 * ui-out.h (class ui_out) <field_stream>: Likewise.
14534 * utils.c (do_ui_file_delete, make_cleanup_ui_file_delete)
14535 (null_stream): Delete.
14536 (error_stream): Take a 'string_file &' instead of a 'ui_file *'.
14537 Adjust.
14538 * utils.h (struct ui_file): Delete forward declaration..
14539 (make_cleanup_ui_file_delete, null_stream): Delete declarations.
14540 (error_stream): Take a 'string_file &' instead of a
14541 'ui_file *'.
14542 * varobj.c (varobj_value_get_print_value): Use string_file.
14543 * xtensa-tdep.c (xtensa_verify_config): Use string_file.
14544 * gdbarch.c: Regenerate.
14545
187808b0
PA
145462017-02-02 Pedro Alves <palves@redhat.com>
14547
14548 * disasm.c (gdb_disassembler::pretty_print_insn): Rename to...
14549 (gdb_pretty_print_insn): ... this. Now a free function. Add back
14550 a 'gdbarch' parameter. Allocate a mem_fileopen stream here.
14551 Adjust to call gdb_print_insn instead of
14552 gdb_disassembler::print_insn.
14553 (dump_insns, do_mixed_source_and_assembly_deprecated)
14554 (do_mixed_source_and_assembly, do_assembly_only): Add back a
14555 'gdbarch' parameter. Remove gdb_disassembler parameter.
14556 (gdb_disassembly): Don't allocate a gdb_disassembler here.
14557 * disasm.h (gdb_disassembler::pretty_print_insn): Delete
14558 declaration.
14559 (gdb_pretty_print_insn): Re-add declaration.
14560 * record-btrace.c (btrace_insn_history): Don't allocate a
14561 gdb_disassembler here. Adjust to call gdb_pretty_print_insn.
14562
7a8eb317
SM
145632017-02-01 Simon Marchi <simon.marchi@polymtl.ca>
14564
14565 * disasm.h (gdb_disassembly): Remove file_string parameter.
14566 * disasm.c (gdb_disassembly): Likewise.
14567 * cli/cli-cmds.c (print_disassembly): Adapt.
14568 * mi/mi-cmd-disas.c (mi_cmd_disassemble): Likewise.
14569 * stack.c (do_gdb_disassembly): Likewise.
14570
7346ef59
AA
145712017-02-01 Andreas Arnez <arnez@linux.vnet.ibm.com>
14572
14573 * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): For
14574 DWARF_VALUE_LITERAL, no longer ignore the offset on big-endian
14575 targets. And if the implicit value is longer than needed, extract
14576 the first bytes instead of the "least significant" ones.
14577
cd4007e4
MM
145782017-02-01 Markus Metzger <markus.t.metzger@intel.com>
14579
14580 * btrace.c (btrace_enable): Do not call btrace_add_pc for
14581 BTRACE_FORMAT_PT or if can_access_registers_ptid returns false.
14582 (btrace_fetch): Assert can_access_registers_ptid.
14583 * record-btrace.c (require_btrace_thread, record_btrace_info): Call
14584 validate_registers_access.
14585
cf77c34e
MM
145862017-02-01 Markus Metzger <markus.t.metzger@intel.com>
14587
14588 * gdbthread.h (can_access_registers_ptid): New.
14589 * thread.c (can_access_registers_ptid): New.
14590
be85ce7d
PA
145912017-02-01 Pedro Alves <palves@redhat.com>
14592
14593 * i386-tdep.c (i386_fast_tracepoint_valid_at): Use gdb_insn_length.
14594
29b0b251
PA
145952017-01-31 Pedro Alves <palves@redhat.com>
14596
14597 * mi/mi-interp.c (mi_breakpoint_created, mi_breakpoint_modified):
14598 Fix typos.
14599
289b5b24
PA
146002017-01-31 Pedro Alves <palves@redhat.com>
14601
14602 * stack.c (print_frame_args): Remove local mem_fileopen stream,
14603 not used.
14604
b47413b4
PA
146052017-01-31 Pedro Alves <palves@redhat.com>
14606
14607 * varobj.c (varobj_value_get_print_value): Remove xstrdup call.
14608
60adb36c
PA
146092017-01-31 Pedro Alves <palves@redhat.com>
14610
14611 * common/scoped_restore.h
14612 (scoped_restore_tmpl::scoped_restore_tmpl): Template on T2, and
14613 change the value's parameter type to T2.
14614 (make_scoped_restore): Likewise.
14615
2735833d
WT
146162017-01-27 Walfred Tedeschi <walfred.tedeschi@intel.com>
14617 Richard Henderson <rth@redhat.com>
14618
14619 * amd64-linux-nat.c (PTRACE_ARCH_PRCTL): New define.
14620 (amd64_linux_fetch_inferior_registers): Add case to fetch FS_BASE
14621 GS_BASE for older kernels.
14622 (amd64_linux_store_inferior_registers): Add case to store FS_BASE
14623 GS_BASE for older kernels.
14624 * amd64-linux-tdep.c (amd64_linux_gregset_reg_offset): Add FS_BASE
14625 and GS_BASE to the offset table.
14626 (amd64_linux_register_reggroup_p): Add FS_BASE and GS_BASE to the
14627 system register group.
14628 * amd64-nat.c (amd64_native_gregset_reg_offset): Implements case
14629 for older kernels.
14630 * amd64-tdep.c (amd64_init_abi): Add segment registers for the
14631 amd64 ABI.
14632 * amd64-tdep.h (amd64_regnum): Add AMD64_FSBASE_REGNUM and
14633 AMD64_GSBASE_REGNUM.
14634 (AMD64_NUM_REGS): Set to AMD64_GSBASE_REGNUM + 1.
14635 * features/Makefile (amd64-linux.dat, amd64-avx-linux.dat)
14636 (amd64-mpx-linux.dat, amd64-avx512-linux.dat, x32-linux.dat)
14637 (x32-avx-linux.dat, x32-avx512-linux.dat): Add
14638 i386/64bit-segments.xml in those rules.
14639 * features/i386/64bit-segments.xml: New file.
14640 * features/i386/amd64-avx-mpx-linux.xml: Add 64bit-segments.xml.
14641 * features/i386/amd64-avx-linux.xml: Add 64bit-segments.xml.
14642 * features/i386/amd64-avx512-linux.xml: Add 64bit-segments.xml.
14643 * features/i386/amd64-mpx-linux.xml: Add 64bit-segments.xml.
14644 * features/i386/x32-avx512-linux.xml: Add 64bit-segments.xml.
14645 * features/i386/x32-avx-linux.xml: Add 64bit-segments.xml.
14646 * features/i386/amd64-linux.xml: Add 64bit-segments.xml.
14647 * features/i386/amd64-avx-linux.c: Regenerated.
14648 * features/i386/amd64-avx-mpx-linux.c: Regenerated.
14649 * features/i386/amd64-avx-mpx.c: Regenerated.
14650 * features/i386/amd64-avx512-linux.c: Regenerated.
14651 * features/i386/amd64-linux.c: Regenerated.
14652 * features/i386/amd64-mpx-linux.c: Regenerated.
14653 * features/i386/i386-avx-mpx-linux.c: Regenerated.
14654 * features/i386/i386-avx-mpx.c: Regenerated.
14655 * features/i386/x32-avx-linux.c: Regenerated.
14656 * features/i386/x32-avx512-linux.c: Regenerated.
14657 * regformats/i386/amd64-avx-linux.dat: Regenerated.
14658 * regformats/i386/amd64-avx-mpx-linux.dat: Regenerated.
14659 * regformats/i386/amd64-avx512-linux.dat: Regenerated.
14660 * regformats/i386/amd64-linux.dat: Regenerated.
14661 * regformats/i386/amd64-mpx-linux.dat: Regenerated.
14662 * regformats/i386/x32-avx-linux.dat: Regenerated.
14663 * regformats/i386/x32-avx512-linux.dat: Regenerated.
14664 * regformats/i386/x32-linux.dat: Regenerated.
14665
8884e97e
WT
146662017-01-27 Walfred Tedeschi <walfred.tedeschi@intel.com>
14667
14668 * amd64-linux-tdep.h (AMD64_LINUX_ORIG_RAX_REGNUM):
14669 Set to AMD64_NUM_REGS.
14670
7005d26a
WT
146712017-01-27 Walfred Tedeschi <walfred.tedeschi@intel.com>
14672
14673 * amd64-nat.c (amd64_native_gregset_reg_offset): Simplify logic
14674 that checks validity of a register number.
14675
4bd2e1b2
KC
146762017-01-27 Kees Cook <keescook@google.com>
14677
14678 * gdb/arm-linux-nat.c (arm_linux_fetch_inferior_registers): Call
14679 fetch_fpregs if target has fpa registers.
14680 (arm_linux_store_inferior_registers): Call store_fpregs if target
14681 has fpa registers.
14682
7cf1de6c
AA
146832017-01-26 Andreas Arnez <arnez@linux.vnet.ibm.com>
14684
14685 * cris-tdep.c (cris_gdbarch_init): Remove check for
14686 info.byte_order and force it to BFD_ENDIAN_LITTLE.
14687
874a1c8c
AT
146882017-01-26 Antoine Tremblay <antoine.tremblay@ericsson.com>
14689
14690 * corelow.c (get_core_register_section): Check for regset
14691 existence before checking for REGSET_VARIABLE_SIZE.
14692
d8b49cf0
YQ
146932017-01-26 Yao Qi <yao.qi@linaro.org>
14694 Pedro Alves <palves@redhat.com>
14695
14696 PR gdb/20939
14697 * disasm.c (gdb_disassembler::dis_asm_memory_error): Don't
14698 call memory_error, save memaddr instead.
14699 (gdb_disassembler::print_insn): If gdbarch_print_insn returns
14700 negative, cal memory_error.
14701 * disasm.h (gdb_disassembler) <m_err_memaddr>: New field.
14702
658ca58c
YQ
147032017-01-26 Yao Qi <yao.qi@linaro.org>
14704
14705 * disasm-selftests.c (memory_error_test): New function.
14706 (_initialize_disasm_selftests): Register memory_error_test.
14707
79843d45
YQ
147082017-01-26 Yao Qi <yao.qi@linaro.org>
14709
14710 * Makefile.in (SFILES): Add disasm-selftests.c and
14711 selftest-arch.c.
14712 (COMMON_OBS): Add disasm-selftests.o and selftest-arch.o.
14713 * disasm-selftests.c: New file.
14714 * selftest-arch.c: New file.
14715 * selftest-arch.h: New file.
14716
8cafda32
YQ
147172017-01-26 Yao Qi <yao.qi@linaro.org>
14718
14719 * mep-tdep.c (mep_gdb_print_insn): Set info->arch
14720 to bfd_arch_mep. Don't return 0 if section is not
14721 found. Call print_insn_mep.
14722
e47ad6c0
YQ
147232017-01-26 Pedro Alves <palves@redhat.com>
14724 Yao Qi <yao.qi@linaro.org>
14725
14726 * arm-tdep.c: Include "disasm.h".
14727 (gdb_print_insn_arm): Update code to get gdbarch.
14728 * disasm.c (dis_asm_read_memory): Change it to
14729 gdb_disassembler::dis_asm_read_memory.
14730 (dis_asm_memory_error): Likewise.
14731 (dis_asm_print_address): Likewise.
14732 (gdb_pretty_print_insn): Change it to
14733 gdb_disassembler::pretty_print_insn.
14734 (dump_insns): Add one argument gdb_disassemlber. All
14735 callers updated.
14736 (do_mixed_source_and_assembly_deprecated): Likewise.
14737 (do_mixed_source_and_assembly): Likewise.
14738 (do_assembly_only): Likewise.
14739 (gdb_disassembler::gdb_disassembler): New.
14740 (gdb_disassembler::print_insn): New.
14741 * disasm.h (class gdb_disassembler): New.
14742 (gdb_pretty_print_insn): Remove declaration.
14743 (gdb_disassemble_info): Likewise.
14744 * guile/scm-disasm.c (class gdbscm_disassembler): New.
14745 (gdbscm_disasm_read_memory_worker): Update.
14746 (gdbscm_disasm_read_memory): Update.
14747 (gdbscm_disasm_memory_error): Remove.
14748 (gdbscm_disasm_print_address): Remove.
14749 (gdbscm_disassembler::gdbscm_disassembler): New.
14750 (gdbscm_print_insn_from_port): Update.
14751 * mips-tdep.c: Include disasm.h.
14752 (gdb_print_insn_mips): Update code to get gdbarch.
14753 * record-btrace.c (btrace_insn_history): Update.
14754 * spu-tdep.c: Include disasm.h.
14755 (struct spu_dis_asm_data): Remove.
14756 (struct spu_dis_asm_info): New.
14757 (spu_dis_asm_print_address): Use spu_dis_asm_info to get
14758 SPU id.
14759 (gdb_print_insn_spu): Cast disassemble_info to
14760 spu_dis_asm_info.
14761
80d75874
YQ
147622017-01-26 Yao Qi <yao.qi@linaro.org>
14763
14764 * disasm.c (do_ui_file_delete): Delete.
14765 (gdb_insn_length): Move code creating stream to ...
14766 * utils.c (null_stream): ... here. New function.
14767 * utils.h (null_stream): Declare.
14768
60685cd0
SM
147692017-01-23 Simon Marchi <simon.marchi@polymtl.ca>
14770
14771 * python/py-inferior.c (find_thread_object): Return directly
14772 from the loop. Remove "found" variable.
14773
eb1cdb62
JB
147742017-01-21 Joel Brobecker <brobecker@adacore.com>
14775
14776 GDB 7.12.1 released.
14777
b1ce6568
SM
147782017-01-20 Simon Marchi <simon.marchi@ericsson.com>
14779
14780 * python/py-function.c (fnpy_call): Reorder declarations to have
14781 the gdbpy_enter object declared first.
14782 * python/py-xmethods.c (gdbpy_get_xmethod_arg_types): Likewise.
14783
6f8b0407
SM
147842017-01-20 Simon Marchi <simon.marchi@ericsson.com>
14785
fec93fb1 14786 PR python/21068
6f8b0407
SM
14787 * python/python-internal.h (PyMem_RawMalloc): Define for
14788 Python < 3.4.
14789 * python/py-gdb-readline.c (gdbpy_readline_wrapper): Use
14790 PyMem_RawMalloc instead of PyMem_Malloc.
14791
78cbbba8
LM
147922017-01-20 Mike Wrighton <mike_wrighton@codesourcery.com>
14793 Luis Machado <lgustavo@codesourcery.com>
14794
14795 * NEWS (New commands): Mention flash-erase.
14796 (New MI commands): Mention target-flash-erase.
14797 * mi/mi-cmds.c (mi_cmd_target_flash_erase): Add target-flash-erase MI
14798 command.
14799 * mi/mi-cmds.h (mi_cmd_target_flash_erase): New declaration.
14800 * mi/mi-main.c (mi_cmd_target_flash_erase): New function.
14801 * target.c (flash_erase_command): New function.
14802 (initialize_targets): Add new flash-erase command.
14803 * target.h (flash_erase_command): New declaration.
14804
2132fe85
JB
148052017-01-20 Joel Brobecker <brobecker@adacore.com>
14806
14807 * nat/linux-ptrace.c: Only include <sys/procfs.h> if
14808 HAVE_SYS_PROCFS_H is defined.
14809
d1dff226
AH
148102017-01-18 Alan Hayward <alan.hayward@arm.com>
14811
14812 * remote.c (struct cached_reg): Change data into a pointer.
14813 * (stop_reply_dtr): Free data pointers before deleting vector.
14814 (process_stop_reply): Likewise.
14815 (remote_parse_stop_reply): Allocate space for data
14816
9890e433
AH
148172017-01-18 Alan Hayward <alan.hayward@arm.com>
14818
14819 * amd64-tdep.c (amd64_pseudo_register_read_value): remove
14820 MAX_REGISTER_SIZE.
14821 (amd64_pseudo_register_read_value): Likewise.
14822 * remote.c (fetch_register_using_p): Remove MAX_REGISTER_SIZE.
14823 (store_register_using_P): Likewise.
14824 * regcache.c (regcache_xfer_part): Likewise.
14825
7a36499a
IR
148262017-01-16 Ivo Raisr <ivo.raisr@oracle.com>
14827
14828 Split real and pseudo registers.
14829 * sparc-tdep.h (SPARC_CORE_REGISTERS): New macro.
14830 (sparc32_pseudo_regnum): New enum.
14831 * sparc64-tdep.h (sparc64_pseudo_regnum): New enum.
14832 * sparc-tdep.c (SPARC32_FPU_REGISTERS): New macro.
14833 (SPARC32_CP0_REGISTERS): New macro.
14834 (sparc32_pseudo_register_name): New function.
14835 (sparc32_register_name): Use sparc32_pseudo_register_name.
14836 (sparc32_pseudo_register_type): New function.
14837 (sparc32_register_type): Use sparc32_pseudo_register_type.
14838 (sparc32_pseudo_register_read, sparc32_pseudo_register_write): Handle
14839 pseudo register numbers.
14840 * sparc64-tdep.c SPARC64_FPU_REGISTERS): New macro.
14841 (SPARC64_CP0_REGISTERS): New macro.
14842 (sparc64_pseudo_register_name): New function.
14843 (sparc64_register_name): Use sparc64_pseudo_register_name.
14844 (sparc64_pseudo_register_type): New function.
14845 (sparc64_register_type): Use sparc64_pseudo_register_type.
14846 (sparc64_pseudo_register_read, sparc64_pseudo_register_write): Handle
14847 pseudo register numbers.
14848 (sparc64_store_floating_fields, sparc64_extract_floating_fields,
14849 sparc64_store_arguments): Handle pseudo register numbers.
14850
6f8976bf
YQ
148512017-01-13 Yao Qi <yao.qi@linaro.org>
14852
14853 * remote.c (REMOTE_DEBUG_MAX_CHAR): New macro.
14854 (putpkt_binary): Print only REMOTE_DEBUG_MAX_CHAR chars in debug
14855 output.
14856 (getpkt_or_notif_sane_1): Likewise.
14857
e4241ace
YQ
148582017-01-13 Yao Qi <yao.qi@linaro.org>
14859
14860 * Makefile.in (checker-headers): Use CXX and CXX_DIALET instead
14861 of CC. Pass "-x c++-header" instead of "-x c".
14862
3015c064
SM
148632017-01-12 Simon Marchi <simon.marchi@ericsson.com>
14864
14865 * remote.c (remote_can_async_p): Update comment.
14866
fde1b17d
SM
148672017-01-12 Simon Marchi <simon.marchi@ericsson.com>
14868
14869 * linux-nat.c (linux_nat_can_async_p): Update comment.
14870
ca1ca08b
SM
148712017-01-12 Simon Marchi <simon.marchi@ericsson.com>
14872
14873 * serial.c (serial_open): Forget about "pc" and "lpt" serial interface.
14874
4ad2da73
SM
148752017-01-11 Simon Marchi <simon.marchi@ericsson.com>
14876
14877 * cli/cli-decode.c (lookup_cmd_1): Fix typo in comment.
14878
c8b23b3f
TT
148792017-01-10 Tom Tromey <tom@tromey.com>
14880
14881 * python/py-type.c (typy_legacy_template_argument): Update.
14882 * cp-support.h (struct demangle_parse_info) (demangle_parse_info,
14883 ~demangle_parse_info): Declare new members.
14884 (cp_demangled_name_to_comp): Return unique_ptr.
14885 (cp_demangled_name_parse_free)
14886 (make_cleanup_cp_demangled_name_parse_free)
14887 (cp_new_demangle_parse_info): Remove.
14888 * cp-support.c (do_demangled_name_parse_free_cleanup)
14889 (make_cleanup_cp_demangled_name_parse_free): Remove.
14890 (inspect_type, cp_canonicalize_string_full)
14891 (cp_canonicalize_string): Update.
14892 (mangled_name_to_comp): Change return type.
14893 (cp_class_name_from_physname, method_name_from_physname)
14894 (cp_func_name, cp_remove_params): Update.
14895 * cp-name-parser.y (demangle_parse_info): New constructor, from
14896 cp_new_demangle_parse_info.
14897 (~demangle_parse_info): New destructor, from
14898 cp_demangled_name_parse_free.
14899 (cp_merge_demangle_parse_infos): Update.
14900 (cp_demangled_name_to_comp): Change return type.
14901
1ac32117
TT
149022017-01-10 Tom Tromey <tom@tromey.com>
14903
14904 * top.c (prevent_dont_repeat): Change return type.
14905 * python/python.c (execute_gdb_command): Use std::string.
14906 Update.
14907 * guile/guile.c (gdbscm_execute_gdb_command): Update.
14908 * command.h (prevent_dont_repeat): Change return type.
14909 * breakpoint.c (bpstat_do_actions_1): Update.
14910
0cf08227
TT
149112017-01-10 Tom Tromey <tom@tromey.com>
14912
14913 * value.h (scoped_value_mark::~scoped_value_mark): Call
14914 free_to_mark.
14915 (scoped_value_mark::free_to_mark): New method.
14916 * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Use
14917 scoped_value_mark.
14918
eb115069
TT
149192017-01-10 Tom Tromey <tom@tromey.com>
14920
14921 * python/py-value.c (valpy_dereference, valpy_referenced_value)
14922 (valpy_reference_value, valpy_const_value, valpy_get_address)
14923 (valpy_get_dynamic_type, valpy_lazy_string, valpy_do_cast)
14924 (valpy_getitem, valpy_call, valpy_binop_throw, valpy_negative)
14925 (valpy_absolute, valpy_richcompare_throw): Use scoped_value_mark.
14926 * dwarf2loc.c (dwarf2_loc_desc_get_symbol_read_needs): Use
14927 scoped_value_mark.
14928 * dwarf2-frame.c (execute_stack_op): Use scoped_value_mark.
14929 * value.h (scoped_value_mark): New class.
14930
906768f9
TT
149312017-01-10 Tom Tromey <tom@tromey.com>
14932
14933 * dwarf2read.c (dwarf2_build_psymtabs): Use psymtab_discarder.
14934 * psympriv.h (make_cleanup_discard_psymtabs): Don't declare.
14935 * psymtab.c (discard_psymtabs_upto): Remove.
14936 (make_cleanup_discard_psymtabs): Remove.
14937 (struct psymtab_state): Remove.
14938
bef155c3
TT
149392017-01-10 Tom Tromey <tom@tromey.com>
14940
14941 * record-full.c (record_full_save_cleanups): Remove.
14942 (record_full_save): Use gdb::unlinker.
14943 * gcore.c (do_bfd_delete_cleanup): Remove.
14944 (gcore_command): Use gdb::unlinker, unique_xmalloc_ptr. Remove
14945 cleanups.
14946 * dwarf2read.c (unlink_if_set): Remove.
14947 (write_psymtabs_to_index): Use gdb::unlinker.
14948 * common/gdb_unlinker.h: New file.
14949
192b62ce
TT
149502017-01-10 Tom Tromey <tom@tromey.com>
14951
14952 * windows-tdep.c (windows_xfer_shared_library): Update.
14953 * windows-nat.c (windows_make_so): Update.
14954 * utils.h (make_cleanup_bfd_unref): Remove.
14955 * utils.c (do_bfd_close_cleanup, make_cleanup_bfd_unref): Remove.
14956 * symfile.h (symfile_bfd_open)
14957 (find_separate_debug_file_in_section): Return gdb_bfd_ref_ptr.
14958 * symfile.c (read_symbols, symbol_file_add)
14959 (separate_debug_file_exists): Update.
14960 (symfile_bfd_open): Return gdb_bfd_ref_ptr.
14961 (generic_load, reread_symbols): Update.
14962 * symfile-mem.c (symbol_file_add_from_memory): Update.
14963 * spu-linux-nat.c (spu_bfd_open): Return gdb_bfd_ref_ptr.
14964 (spu_symbol_file_add_from_memory): Update.
14965 * solist.h (struct target_so_ops) <bfd_open>: Return
14966 gdb_bfd_ref_ptr.
14967 (solib_bfd_fopen, solib_bfd_open): Return gdb_bfd_ref_ptr.
14968 * solib.c (solib_bfd_fopen, solib_bfd_open): Return
14969 gdb_bfd_ref_ptr.
14970 (solib_map_sections, reload_shared_libraries_1): Update.
14971 * solib-svr4.c (enable_break): Update.
14972 * solib-spu.c (spu_bfd_fopen): Return gdb_bfd_ref_ptr.
14973 * solib-frv.c (enable_break2): Update.
14974 * solib-dsbt.c (enable_break): Update.
14975 * solib-darwin.c (gdb_bfd_mach_o_fat_extract): Return
14976 gdb_bfd_ref_ptr.
14977 (darwin_solib_get_all_image_info_addr_at_init): Update.
14978 (darwin_bfd_open): Return gdb_bfd_ref_ptr.
14979 * solib-aix.c (solib_aix_bfd_open): Return gdb_bfd_ref_ptr.
14980 * record-full.c (record_full_save): Update.
14981 * python/py-objfile.c (objfpy_add_separate_debug_file): Update.
14982 * procfs.c (insert_dbx_link_bpt_in_file): Update.
14983 * minidebug.c (find_separate_debug_file_in_section): Return
14984 gdb_bfd_ref_ptr.
14985 * machoread.c (macho_add_oso_symfile): Change abfd to
14986 gdb_bfd_ref_ptr.
14987 (macho_symfile_read_all_oso): Update.
14988 (macho_check_dsym): Return gdb_bfd_ref_ptr.
14989 (macho_symfile_read): Update.
14990 * jit.c (bfd_open_from_target_memory): Return gdb_bfd_ref_ptr.
14991 (jit_bfd_try_read_symtab): Update.
14992 * gdb_bfd.h (gdb_bfd_open, gdb_bfd_fopen, gdb_bfd_openr)
14993 (gdb_bfd_openw, gdb_bfd_openr_iovec)
14994 (gdb_bfd_openr_next_archived_file, gdb_bfd_fdopenr): Return
14995 gdb_bfd_ref_ptr.
14996 (gdb_bfd_ref_policy): New struct.
14997 (gdb_bfd_ref_ptr): New typedef.
14998 * gdb_bfd.c (gdb_bfd_open, gdb_bfd_fopen, gdb_bfd_openr)
14999 (gdb_bfd_openw, gdb_bfd_openr_iovec)
15000 (gdb_bfd_openr_next_archived_file, gdb_bfd_fdopenr): Return
15001 gdb_bfd_ref_ptr.
15002 * gcore.h (create_gcore_bfd): Return gdb_bfd_ref_ptr.
15003 * gcore.c (create_gcore_bfd): Return gdb_bfd_ref_ptr.
15004 (gcore_command): Update.
15005 * exec.c (exec_file_attach): Update.
15006 * elfread.c (elf_symfile_read): Update.
15007 * dwarf2read.c (dwarf2_get_dwz_file): Update.
15008 (try_open_dwop_file, open_dwo_file): Return gdb_bfd_ref_ptr.
15009 (open_and_init_dwo_file): Update.
15010 (open_dwp_file): Return gdb_bfd_ref_ptr.
15011 (open_and_init_dwp_file): Update.
15012 * corelow.c (core_open): Update.
15013 * compile/compile-object-load.c (compile_object_load): Update.
15014 * common/gdb_ref_ptr.h (ref_ptr::operator->): New operator.
15015 * coffread.c (coff_symfile_read): Update.
15016 * cli/cli-dump.c (bfd_openr_or_error, bfd_openw_or_error): Return
15017 gdb_bfd_ref_ptr. Rename.
15018 (dump_bfd_file, restore_command): Update.
15019 * build-id.h (build_id_to_debug_bfd): Return gdb_bfd_ref_ptr.
15020 * build-id.c (build_id_to_debug_bfd): Return gdb_bfd_ref_ptr.
15021 (find_separate_debug_file_by_buildid): Update.
15022
50315b21
TT
150232017-01-10 Tom Tromey <tom@tromey.com>
15024
15025 * common/gdb_ref_ptr.h: New file.
15026 * python/py-ref.h (struct gdbpy_ref_policy): New.
15027 (gdbpy_ref): Now a typedef.
15028
fc4007c9
TT
150292017-01-10 Tom Tromey <tom@tromey.com>
15030
15031 * utils.h (make_cleanup_htab_delete): Don't declare.
15032 * utils.c (do_htab_delete_cleanup, make_cleanup_htab_delete):
15033 Remove.
15034 * linespec.c (decode_compound_collector): Add constructor,
15035 destructor.
15036 (lookup_prefix_sym): Remove cleanup.
15037 (symtab_collector): Add constructor, destructor.
15038 (collect_symtabs_from_filename): Remove cleanup.
15039 * disasm.c (do_mixed_source_and_assembly): Use htab_up.
15040 * compile/compile-c-symbols.c (generate_c_for_variable_locations):
15041 Use htab_up.
15042 * gnu-v3-abi.c (gnuv3_print_vtable): Use htab_up.
15043 * dwarf2read.c (dw2_expand_symtabs_matching)
15044 (dw2_map_symbol_filenames, dwarf_decode_macros)
15045 (write_psymtabs_to_index): Use htab_up.
15046 * dwarf2loc.c (func_verify_no_selftailcall)
15047 (call_site_find_chain_1, func_verify_no_selftailcall)
15048 (chain_candidate, call_site_find_chain_1): Use std::unordered_set,
15049 std::vector, gdb::unique_xmalloc_ptr.
15050 (call_sitep): Remove typedef.
15051 (dwarf2_locexpr_baton_eval): Remove unused variable.
15052
8dbcee67
TT
150532017-01-10 Tom Tromey <tom@tromey.com>
15054
15055 * python/python-internal.h (make_cleanup_py_decref)
15056 (make_cleanup_py_xdecref): Don't declare.
15057 * python/py-utils.c (py_decref, make_cleanup_py_decref)
15058 (py_xdecref, make_cleanup_py_xdecref): Remove.
15059
13df46cc
TT
150602017-01-10 Tom Tromey <tom@tromey.com>
15061
15062 * python/py-framefilter.c (py_mi_print_variables): Use gdbpy_ref.
15063 (py_print_locals, enumerate_locals, py_print_args): Use gdbpy_ref.
15064
06fc9bf7
TT
150652017-01-10 Tom Tromey <tom@tromey.com>
15066
15067 * python/py-framefilter.c (enumerate_args): Use gdbpy_ref.
15068
830a4934
TT
150692017-01-10 Tom Tromey <tom@tromey.com>
15070
15071 * python/py-utils.c (unicode_to_encoded_string)
15072 (python_string_to_target_string)
15073 (python_string_to_target_python_string)
15074 (python_string_to_host_string, gdbpy_obj_to_string)
15075 (get_addr_from_python): Use gdbpy_ref.
15076
4586d543
TT
150772017-01-10 Tom Tromey <tom@tromey.com>
15078
15079 * python/py-unwind.c (pyuw_object_attribute_to_pointer): Use
15080 gdbpy_ref.
15081
59876f8f
TT
150822017-01-10 Tom Tromey <tom@tromey.com>
15083
15084 * python/python.c (eval_python_command, gdbpy_decode_line)
15085 (gdbpy_run_events, gdbpy_start_type_printers)
15086 (gdbpy_apply_type_printers): Use gdbpy_ref.
15087
97d83487
TT
150882017-01-10 Tom Tromey <tom@tromey.com>
15089
15090 * python/py-param.c (get_doc_string, compute_enum_values): Use
15091 gdbpy_ref.
15092
9205649a
TT
150932017-01-10 Tom Tromey <tom@tromey.com>
15094
15095 * python/py-inferior.c (find_thread_object, build_inferior_list):
15096 Use gdbpy_ref.
15097
74c49d45
TT
150982017-01-10 Tom Tromey <tom@tromey.com>
15099
15100 * python/py-framefilter.c (py_print_frame): Use gdbpy_ref.
15101
16361ffb
TT
151022017-01-10 Tom Tromey <tom@tromey.com>
15103
15104 * python/py-finishbreakpoint.c (bpfinishpy_out_of_scope): Use
15105 gdbpy_ref.
15106
905f2cca
TT
151072017-01-10 Tom Tromey <tom@tromey.com>
15108
15109 * python/py-cmd.c (cmdpy_completer_helper): Use gdbpy_ref. Remove
15110 extra incref.
15111 (cmdpy_completer_handle_brkchars, cmdpy_completer, cmdpy_init):
15112 Use gdbpy_ref.
15113
64081434
TT
151142017-01-10 Tom Tromey <tom@tromey.com>
15115
15116 * python/py-breakpoint.c (gdbpy_breakpoint_cond_says_stop): Use
15117 gdbpy_ref.
15118
59e9e831
TT
151192017-01-10 Tom Tromey <tom@tromey.com>
15120
15121 * python/py-arch.c (archpy_disassemble): Use gdbpy_ref. Don't
15122 decref results of PyArg_ParseTupleAndKeywords.
15123
9de10f6d
TT
151242017-01-10 Tom Tromey <tom@tromey.com>
15125
15126 * python/python.c (python_run_simple_file): Use
15127 unique_xmalloc_ptr, gdbpy_ref.
15128
2bd5759d
TT
151292017-01-10 Tom Tromey <tom@tromey.com>
15130
15131 * python/py-prettyprint.c (print_stack_unless_memory_error)
15132 (print_string_repr, print_children): Use gdbpy_ref.
15133 (dummy_python_frame): New class.
15134 (dummy_python_frame::dummy_python_frame): Rename from
15135 push_dummy_python_frame.
15136 (py_restore_tstate): Remove.
15137
3b4e0e01
TT
151382017-01-10 Tom Tromey <tom@tromey.com>
15139
15140 * python/py-framefilter.c (py_print_frame): Use gdbpy_ref.
15141
17a22718
TT
151422017-01-10 Tom Tromey <tom@tromey.com>
15143
15144 * python/python.c (ensure_python_env, restore_python_env):
15145 Remove.
15146 * python/python-internal.h (ensure_python_env): Don't declare.
15147 * varobj.h (varobj_ensure_python_env): Don't declare.
15148 * varobj.c (varobj_ensure_python_env): Remove.
15149
68cdc557
TT
151502017-01-10 Tom Tromey <tom@tromey.com>
15151
15152 * varobj.c (varobj_value_get_print_value): Use
15153 gdbpy_enter_varobj.
15154
1eba6383
TT
151552017-01-10 Tom Tromey <tom@tromey.com>
15156
15157 * python/py-prettyprint.c (print_string_repr, print_children):
15158 Update.
15159 * python/py-lazy-string.c (gdbpy_extract_lazy_string): Change type
15160 of "encoding".
15161 * varobj.c (varobj_value_get_print_value): Update.
15162 * python/python-internal.h (gdbpy_extract_lazy_string): Update.
15163
bde7b3e3
TT
151642017-01-10 Tom Tromey <tom@tromey.com>
15165
15166 * varobj.c (varobj_get_display_hint)
15167 (dynamic_varobj_has_child_method, install_new_value_visualizer)
15168 (varobj_set_visualizer, free_variable): Use
15169 gdbpy_enter_varobj.
15170
a7785f8c
TT
151712017-01-10 Tom Tromey <tom@tromey.com>
15172
15173 * python/python.c (python_command): Use gdbpy_enter, gdbpy_ref.
15174 (do_finish_initialization): New function. Use gdbpy_ref.
15175 (gdbpy_finish_initialization): Use gdbpy_enter. Call
15176 do_finish_initialization.
15177
2865bfce
TT
151782017-01-10 Tom Tromey <tom@tromey.com>
15179
15180 * python/py-param.c (get_set_value, get_show_value): Use
15181 gdbpy_enter, gdbpy_ref.
15182
0e9dcc75
TT
151832017-01-10 Tom Tromey <tom@tromey.com>
15184
15185 * python/py-function.c (fnpy_call): Use gdbpy_enter, gdbpy_ref.
15186
12a5cedd
TT
151872017-01-10 Tom Tromey <tom@tromey.com>
15188
15189 * python/py-cmd.c (cmdpy_function): Use gdbpy_enter, gdbpy_ref.
15190
788f2586
TT
151912017-01-10 Tom Tromey <tom@tromey.com>
15192
15193 * python/py-varobj.c (py_varobj_iter_dtor, py_varobj_iter_next):
15194 Use gdbpy_enter_varobj.
15195
6cd67bea
TT
151962017-01-10 Tom Tromey <tom@tromey.com>
15197
15198 * varobj.c (gdbpy_enter_varobj): New constructor.
15199 * python/python-internal.h (gdbpy_enter_varobj): New class.
15200 * python/py-varobj.c (py_varobj_get_iterator): Use
15201 gdbpy_enter_varobj.
15202
14b122bf
TT
152032017-01-10 Tom Tromey <tom@tromey.com>
15204
15205 * python/py-xmethods.c (gdbpy_get_xmethod_result_type): Use
15206 gdbpy_enter, gdbpy_ref, unique_xmalloc_ptr.
15207 (gdbpy_invoke_xmethod): Use gdbpy_ref, gdbpy_enter.
15208 (gdbpy_get_xmethod_arg_types): Use gdbpy_ref,
15209 unique_xmalloc_ptr.
15210 (gdbpy_get_xmethod_arg_types): Use gdbpy_ref, gdbpy_enter.
15211
bf1ca3b9
TT
152122017-01-10 Tom Tromey <tom@tromey.com>
15213
15214 * python/py-xmethods.c (invoke_match_method): Use
15215 gdbpy_ref.
15216
572a5524
TT
152172017-01-10 Tom Tromey <tom@tromey.com>
15218
15219 * python/py-xmethods.c (gdbpy_get_matching_xmethod_workers): use
15220 gdbpy_enter, gdbpy_ref.
15221
396a78b6
TT
152222017-01-10 Tom Tromey <tom@tromey.com>
15223
15224 * python/python.c (python_interactive_command): Use gdbpy_enter.
15225
a88b13c7
TT
152262017-01-10 Tom Tromey <tom@tromey.com>
15227
15228 * python/python.c (gdbpy_before_prompt_hook): Use gdbpy_enter,
15229 gdbpy_ref.
15230
e9f0c363
TT
152312017-01-10 Tom Tromey <tom@tromey.com>
15232
15233 * python/py-prettyprint.c (gdbpy_apply_val_pretty_printer): Use
15234 gdbpy_enter, gdbpy_ref, unique_xmalloc_ptr.
15235
6349f452
TT
152362017-01-10 Tom Tromey <tom@tromey.com>
15237
15238 * utils.h (htab_deleter): New struct.
15239 (htab_up): New typedef.
15240 * python/py-framefilter.c (gdbpy_apply_frame_filter): Use
15241 gdbpy_enter, gdbpy_ref, htab_up.
15242
c0171de6
TT
152432017-01-10 Tom Tromey <tom@tromey.com>
15244
15245 * python/py-unwind.c (pending_frame_invalidate): Remove.
15246 (pyuw_sniffer): Use gdbpy_enter and gdbpy_ref.
15247
f18e226f
TT
152482017-01-10 Tom Tromey <tom@tromey.com>
15249
15250 * python/py-xmethods.c (gdbpy_free_xmethod_worker_data)
15251 (gdbpy_clone_xmethod_worker_data): Use gdbpy_enter.
15252
c57af3f1
TT
152532017-01-10 Tom Tromey <tom@tromey.com>
15254
15255 * python/py-type.c (save_objfile_types): Use gdbpy_enter.
15256
60e600ec
TT
152572017-01-10 Tom Tromey <tom@tromey.com>
15258
15259 * python/python.c (gdbpy_eval_from_control_command)
15260 (gdbpy_source_script, gdbpy_run_events)
15261 (gdbpy_source_objfile_script, gdbpy_execute_objfile_script)
15262 (gdbpy_free_type_printers, gdbpy_finish_initialization): Use
15263 gdbpy_enter.
15264
bf7da5b0
TT
152652017-01-10 Tom Tromey <tom@tromey.com>
15266
15267 * python/py-progspace.c (py_free_pspace): Use gdbpy_enter.
15268
2d38bced
TT
152692017-01-10 Tom Tromey <tom@tromey.com>
15270
15271 * python/py-objfile.c (py_free_objfile): Use gdbpy_enter.
15272
07bc7329
TT
152732017-01-10 Tom Tromey <tom@tromey.com>
15274
15275 * python/py-inferior.c (python_on_normal_stop, python_on_resume)
15276 (python_on_inferior_call_pre, python_on_inferior_call_post)
15277 (python_on_memory_change, python_on_register_change)
15278 (python_inferior_exit, python_new_objfile, add_thread_object)
15279 (delete_thread_object, py_free_inferior): Use gdbpy_enter.
15280
6e7c365e
TT
152812017-01-10 Tom Tromey <tom@tromey.com>
15282
15283 * python/py-finishbreakpoint.c (bpfinishpy_handle_stop)
15284 (bpfinishpy_handle_exit): Use gdbpy_enter.
15285
6ba0cd40
TT
152862017-01-10 Tom Tromey <tom@tromey.com>
15287
15288 * python/py-cmd.c (cmdpy_destroyer)
15289 (cmdpy_completer_handle_brkchars, cmdpy_completer): Use
15290 gdbpy_enter.
15291
de2dc875
TT
152922017-01-10 Tom Tromey <tom@tromey.com>
15293
15294 * python/py-breakpoint.c (gdbpy_breakpoint_cond_says_stop): Use
15295 gdbpy_enter.
15296 (gdbpy_breakpoint_has_cond): Likewise.
15297
4ecee2c4
TT
152982017-01-10 Tom Tromey <tom@tromey.com>
15299
15300 * python/python.c (gdbpy_enter): New constructor.
15301 (~gdbpy_enter): New destructor.
15302 (restore_python_env, ensure_python_env): Rewrite.
15303 * python/python-internal.h (gdbpy_enter): New class.
15304
37fce74f
TT
153052017-01-10 Tom Tromey <tom@tromey.com>
15306
15307 * python/py-symbol.c (gdbpy_lookup_symbol): Use gdbpy_ref.
15308
53a0cca3
TT
153092017-01-10 Tom Tromey <tom@tromey.com>
15310
15311 * python/py-value.c (value_has_field, get_field_flag)
15312 (get_field_type, valpy_getitem, convert_value_from_python): Use
15313 gdbpy_ref.
15314
ff3724f5
TT
153152017-01-10 Tom Tromey <tom@tromey.com>
15316
15317 * python/python.c (gdbpy_progspaces, gdbpy_objfiles): Use
15318 gdbpy_ref.
15319
0700aea5
TT
153202017-01-10 Tom Tromey <tom@tromey.com>
15321
15322 * python/py-prettyprint.c (search_pp_list)
15323 (find_pretty_printer_from_objfiles)
15324 (find_pretty_printer_from_progspace)
15325 (find_pretty_printer_from_gdb, find_pretty_printer)
15326 (gdbpy_get_display_hint, gdbpy_get_varobj_pretty_printer): Use
15327 gdbpy_ref.
15328
1bb44c9f
TT
153292017-01-10 Tom Tromey <tom@tromey.com>
15330
15331 * python/py-param.c (call_doc_function): Use gdbpy_ref.
15332
87ce03fd
TT
153332017-01-10 Tom Tromey <tom@tromey.com>
15334
15335 * python/py-linetable.c (build_line_table_tuple_from_pcs)
15336 (ltpy_get_all_source_lines): Use gdbpy_ref.
15337
ee0a3fb8
TT
153382017-01-10 Tom Tromey <tom@tromey.com>
15339
15340 * python/py-framefilter.c (extract_sym, extract_value)
15341 (get_py_iter_from_func, bootstrap_python_frame_filters): Use
15342 gdbpy_ref.
15343
bf2a52fa
TT
153442017-01-10 Tom Tromey <tom@tromey.com>
15345
15346 * python/py-breakpoint.c (gdbpy_breakpoints): Use gdbpy_ref.
15347
f59fe7f8
TT
153482017-01-10 Tom Tromey <tom@tromey.com>
15349
15350 * python/py-inferior.c (gdbpy_inferiors): Use gdbpy_ref.
15351
80bd970a
TT
153522017-01-10 Tom Tromey <tom@tromey.com>
15353
15354 * python/py-function.c (convert_values_to_python, fnpy_init): Use
15355 gdbpy_ref.
15356
d1b3de2e
TT
153572017-01-10 Tom Tromey <tom@tromey.com>
15358
15359 * python/py-cmd.c (gdbpy_string_to_argv): Use gdbpy_ref.
15360
3bb43384
TT
153612017-01-10 Tom Tromey <tom@tromey.com>
15362
15363 * python/py-type.c (convert_field, make_fielditem, typy_fields)
15364 (typy_range): Use gdbpy_ref.
15365
abf5651e
TT
153662017-01-10 Tom Tromey <tom@tromey.com>
15367
15368 * python/py-threadevent.c (create_thread_event_object): Use
15369 gdbpy_ref.
15370 * python/py-stopevent.c (create_stop_event_object): Simplify.
15371 (emit_stop_event): Use gdbpy_ref.
15372 * python/py-signalevent.c (create_signal_event_object): Use
15373 gdbpy_ref.
15374 * python/py-newobjfileevent.c (create_new_objfile_event_object)
15375 (emit_new_objfile_event, create_clear_objfiles_event_object)
15376 (emit_clear_objfiles_event): Use gdbpy_ref.
15377 * python/py-infevents.c (create_inferior_call_event_object)
15378 (create_register_changed_event_object)
15379 (create_memory_changed_event_object, emit_inferior_call_event)
15380 (emit_memory_changed_event, emit_register_changed_event): Use
15381 gdbpy_ref.
15382 * python/py-exitedevent.c (create_exited_event_object)
15383 (emit_exited_event): Use gdbpy_ref.
15384 * python/py-event.h (evpy_emit_event): Remove
15385 CPYCHECKER_STEALS_REFERENCE_TO_ARG annotation.
15386 * python/py-event.c (evpy_emit_event): Use gdbpy_ref.
15387 * python/py-continueevent.c (emit_continue_event): Use
15388 gdbpy_ref.
15389 * python/py-breakpoint.c (gdbpy_breakpoint_created)
15390 (gdbpy_breakpoint_deleted, gdbpy_breakpoint_modified): Use
15391 gdbpy_ref.
15392 * python/py-bpevent.c (create_breakpoint_event_object): Use
15393 gdbpy_ref.
15394
a68ff33e
TT
153952017-01-10 Tom Tromey <tom@tromey.com>
15396
15397 * python/py-ref.h: New file.
15398
7becfd03
SM
153992017-01-10 Simon Marchi <simon.marchi@ericsson.com>
15400
15401 * cli-out.c (cli_ui_out::do_redirect): Change return type to
15402 void.
15403 * cli-out.h (cli_ui_out::do_redirect): Likewise.
15404 * mi/mi-out.c (mi_ui_out::do_redirect): Likewise.
15405 * mi/mi-out.h (mi_ui_out::do_redirect): Likewise.
15406 * ui-out.c (ui_out::redirect): Likewise.
15407 * ui-out.h (ui_out::redirect, ui_out::do_redirect): Likewise.
15408 * cli/cli-logging.c (set_logging_redirect): Update call site of
15409 ui_out::redirect.
15410 (handle_redirections): Likewise.
15411 * scm-ports.c (ioscm_with_output_to_port_worker): Likewise.
15412 * top.c (execute_command_to_string): Likewise.
15413 * utils.c (do_ui_out_redirect_pop): Likewise.
15414
df294654
SM
154152017-01-10 Simon Marchi <simon.marchi@ericsson.com>
15416
15417 * stack.c (_initialize_stack): Update "frame" command help message.
15418
f5e6296e
IB
154192017-01-08 Iain Buclaw <ibuclaw@gdcproject.org>
15420
15421 * d-exp.y (CastExpression): Emit UNOP_CAST_TYPE.
15422
0e2d6fa6
YQ
154232017-01-06 Yao Qi <yao.qi@linaro.org>
15424
15425 * x86-linux-nat.h: Include gdb_proc_service.h.
15426
44d6d3f9
YQ
154272017-01-06 Yao Qi <yao.qi@linaro.org>
15428
15429 * ser-base.h: Include serial.h.
15430
656731fe
YQ
154312017-01-06 Yao Qi <yao.qi@linaro.org>
15432
15433 * ppc-linux-tdep.h: Include ppc-tdep.h.
15434
1ca8f924
YQ
154352017-01-06 Yao Qi <yao.qi@linaro.org>
15436
15437 * nat/amd64-linux-siginfo.h: Include signal.h.
15438
bc3008c4
YQ
154392017-01-06 Yao Qi <yao.qi@linaro.org>
15440
15441 * nat/aarch64-linux-hw-point.h: Include break-common.h.
15442
66c80d03
YQ
154432017-01-06 Yao Qi <yao.qi@linaro.org>
15444
15445 * mi/mi-parse.h: Include mi-cmds.h.
15446
051d2dda
YQ
154472017-01-06 Yao Qi <yao.qi@linaro.org>
15448
15449 * inf-loop.c: Don't include "target.h".
15450 * inf-loop.h: Include it here.
15451
8018d34f
YQ
154522017-01-06 Yao Qi <yao.qi@linaro.org>
15453
15454 * dfp.h: Include "dboulest.h" and "expression.h".
15455
c0b8369c
YQ
154562017-01-06 Yao Qi <yao.qi@linaro.org>
15457
15458 * ax-gdb.h: Include "ax.h".
15459
ad5cba2a
YQ
154602017-01-06 Yao Qi <yao.qi@linaro.org>
15461
15462 * Makefile.in (HFILES_NO_SRCDIR): Replace gdb_ptrace.h
15463 with nat/gdb_ptrace.h.
15464
1c33cd7f
YQ
154652017-01-05 Yao Qi <yao.qi@linaro.org>
15466
15467 * mips-fbsd-tdep.c (mips_fbsd_sigframe_init): Move && to
15468 new line.
15469 (mips64_fbsd_sigframe_init): Likewise.
15470
c988ac1d
JB
154712017-01-04 John Baldwin <jhb@FreeBSD.org>
15472
15473 * mips-fbsd-tdep.c (_initialize_mips_fbsd_tdep): Use
15474 GDB_OSABI_FREEBSD instead of GDB_OSABI_FREEBSD_ELF.
15475
b268007c
JB
154762017-01-04 John Baldwin <jhb@FreeBSD.org>
15477
15478 * Makefile.in (ALLDEPFILES): Add mips-fbsd-nat.c.
15479 * NEWS: Mention new FreeBSD/mips native configuration.
15480 * config/mips/fbsd.mh: New file.
15481 * configure.host: Add mips*-*-freebsd*.
15482 * mips-fbsd-nat.c: New file.
15483
387360da
JB
154842017-01-04 John Baldwin <jhb@FreeBSD.org>
15485
15486 * Makefile.in (ALL_TARGET_OBS): Add mips-fbsd-tdep.o.
15487 (ALLDEPFILES): Add mips-fbsd-tdep.c.
15488 * NEWS: Mention new FreeBSD/mips target.
15489 * configure.tgt: Add mips*-*-freebsd*.
15490 * mips-fbsd-tdep.c: New file.
15491 * mips-fbsd-tdep.h: New file.
15492
2aaaf250
YQ
154932017-01-04 Yao Qi <yao.qi@linaro.org>
15494
15495 * dwarf2loc.c (write_pieced_value): Don't use VALUE_FRAME_ID (to),
15496 use c->frame_id when the piece location is DWARF_VALUE_REGISTER.
15497
61baf725
JB
154982017-01-01 Joel Brobecker <brobecker@adacore.com>
15499
6dbb839a 15500 Update copyright year range in all GDB files.
61baf725 15501
c113e7ff 155022017-01-01 Joel Brobecker <brobecker@adacore.com>
ce0db137 15503
c113e7ff 15504 * config/djgpp/fnchange.lst: Add entry for gdb/ChangeLog-2016.
ce0db137 15505
c113e7ff 15506For older changes see ChangeLog-2016.
c906108c
SS
15507\f
15508Local Variables:
15509mode: change-log
15510left-margin: 8
15511fill-column: 74
15512version-control: never
57da7796 15513coding: utf-8
c906108c 15514End: