]> git.ipfire.org Git - thirdparty/binutils-gdb.git/blame - gdb/ChangeLog
(Ada) crash connecting to TSIM simulator
[thirdparty/binutils-gdb.git] / gdb / ChangeLog
CommitLineData
54aa6c67
JB
12017-11-21 Joel Brobecker <brobecker@adacore.com>
2
3 * ravenscar-thread.c (is_ravenscar_task): Also verify that
4 the ptid's TID is nonzero.
5
cf3fbed4
JB
62017-11-21 Joel Brobecker <brobecker@adacore.com>
7
8 * ada-lang.h (ada_get_tcb_types_info): Add declaration.
9 * ada-tasks.c (ada_get_tcb_types_info): Renames get_tcb_types_info.
10 Make non-static. Change return type to char *. Adjust code
11 accordingly. Rewrite the function's documentation.
12 (read_atcb): Adjust call to get_tcb_types_info accordingly.
13 * ravenscar-thread.c (ravenscar_inferior_created): Check that
14 we have enough debugging information in the runtime to support
15 Ada task debugging before we enable the ravenscar-thread layer.
16
9edcc12f
JB
172017-11-21 Joel Brobecker <brobecker@adacore.com>
18
19 * ada-lang.h (ada_get_task_info_from_ptid): Add declaration.
20 * ada-tasks.c (ada_get_task_info_from_ptid): New function.
21 * ravenscar-thread.c: Add into comment.
22 (base_magic_null_ptid): Delete.
23 (base_ptid): Change documentation.
24 (ravenscar_active_task): Renames ravenscar_running_thread.
25 All callers updated throughout.
26 (is_ravenscar_task, ravenscar_get_thread_base_cpu): New function.
27 (ravenscar_task_is_currently_active): Likewise.
28 (get_base_thread_from_ravenscar_task): Ditto.
29 (ravenscar_update_inferior_ptid): Adjust to handle multiple CPUs.
30 (ravenscar_runtime_initialized): Likewise.
31 (get_running_thread_id): Add new parameter "cpu". Adjust
32 implementation to handle this new parameter.
33 (ravenscar_fetch_registers): Small adjustment to use
34 is_ravenscar_task and ravenscar_task_is_currently_active in
35 order to decide whether to use the target beneath or this
36 module's arch_ops.
37 (ravenscar_store_registers, ravenscar_prepare_to_store): Likewise.
38 (ravenscar_stopped_by_sw_breakpoint): Use
39 get_base_thread_from_ravenscar_task to get the underlying
40 thread, rather than using base_ptid.
41 (ravenscar_stopped_by_hw_breakpoint, ravenscar_stopped_by_watchpoint)
42 (ravenscar_stopped_data_address, ravenscar_core_of_thread):
43 Likewise.
44 (ravenscar_inferior_created): Do not set base_magic_null_ptid.
45
65d40437
JB
462017-11-21 Joel Brobecker <brobecker@adacore.com>
47
48 * ada-lang.h (struct ada_task_info) <base_cpu>: New field.
49 * ada-lang.c (struct atcb_fieldno) <base_cpu>: New field.
50 (get_tcb_types_info): Set fieldnos.base_cpu.
51 (read_atcb): Set task_info->base_cpu.
52 (info_task): Print "Base CPU" info if set by runtime.
53
e02544b2
JB
542017-11-21 Joel Brobecker <brobecker@adacore.com>
55
56 * ravenscar-thread.c (ravenscar_stopped_by_sw_breakpoint)
57 (ravenscar_stopped_by_hw_breakpoint, ravenscar_stopped_by_watchpoint)
58 (ravenscar_stopped_data_address, ravenscar_core_of_thread):
59 New functions.
60 (init_ravenscar_thread_ops): Set the to_stopped_by_sw_breakpoint,
61 to_stopped_by_hw_breakpoint, to_stopped_by_watchpoint,
62 to_stopped_data_address and to_core_of_thread fields of
63 ravenscar_ops.
64
ed0f4273
UW
652017-11-21 Ulrich Weigand <uweigand@de.ibm.com>
66
67 * ppc-tdep.h (enum powerpc_long_double_abi): New data type.
68 (struct gdbarch_tdep): New member long_double_abi.
69 * rs6000-tdep.c (rs6000_gdbarch_init): Initialize long_double_abi
70 member of tdep struct based on Tag_GNU_Power_ABI_FP attribute.
71 * ppc-linux-tdep.c (ppc_linux_init_abi): Install long double data
72 format depending on long_double_abi tdep member.
73 (ppc_floatformat_for_type): Handle __ibm128 type.
74
0fc76421
SM
752017-11-20 Simon Marchi <simon.marchi@polymtl.ca>
76
77 * darwin-nat.c (set_enable_mach_exceptions): Constify parameter.
78
e6b2f5ef
PA
792017-11-21 Pedro Alves <palves@redhat.com>
80
81 * dwarf2read.c (mapped_index::find_name_components_bounds)
82 <completion mode, upper bound>: Use std::lower_bound instead of
83 std::upper_bound.
84 (test_mapped_index_find_name_component_bounds): Remove incorrect
85 "t1_fund" from expected symbols.
86
5c58de74
PA
872017-11-21 Pedro Alves <palves@redhat.com>
88
89 * dwarf2read.c (mapped_index::name_components_casing): New field.
90 (mapped_index) <build_name_components,
91 find_name_components_bounds): Declare new methods.
92 (mapped_index::find_name_components_bounds)
93 (mapped_index::build_name_components): New methods, factored out
94 from dw2_expand_symtabs_matching_symbol.
95 (check_find_bounds_finds)
96 (test_mapped_index_find_name_component_bounds): New.
97 (run_test): Rename to ...
98 (test_dw2_expand_symtabs_matching_symbol): ... this.
99 (run_test): Reimplement.
100
e1ef7d7a
PA
1012017-11-21 Pedro Alves <palves@redhat.com>
102
103 * cp-name-parser.y (cp_ident_is_alpha, cp_ident_is_alnum): New.
104 (symbol_end): Use cp_ident_is_alnum.
105 (yylex): Use cp_ident_is_alpha and cp_ident_is_alnum.
106 * dwarf2read.c (make_sort_after_prefix_name): New function.
107 (dw2_expand_symtabs_matching_symbol): Use it.
108 (test_symbols): Add more symbols.
109 (run_test): Add tests.
110
cf724bc9
TT
1112017-11-17 Tom Tromey <tom@tromey.com>
112
113 * symtab.h (enum symbol_subclass_kind): New.
114 (struct symbol) <is_cplus_template_function, is_rust_vtable>:
115 Remove.
116 <subclass>: New member.
117 (SYMBOL_IS_CPLUS_TEMPLATE_FUNCTION): Update.
118 * rust-lang.c (rust_get_trait_object_pointer): Update.
119 * dwarf2read.c (read_func_scope): Update.
120 (read_variable): Update.
121
68e745e3
TT
1222017-11-17 Tom Tromey <tom@tromey.com>
123
124 * dwarf2read.c (read_func_scope): Update.
125 * symtab.h (struct template_symbol): Derive from symbol.
126 <base>: Remove.
127
71a3c369
TT
1282017-11-17 Tom Tromey <tom@tromey.com>
129
130 * symtab.h (struct symbol) <is_rust_vtable>: New member.
131 (struct rust_vtable_symbol): New.
132 (find_symbol_at_address): Declare.
133 * symtab.c (find_symbol_at_address): New function.
134 * symfile.h (struct quick_symbol_functions)
135 <find_compunit_symtab_by_address>: New member.
136 * symfile-debug.c (debug_qf_find_compunit_symtab_by_address): New
137 function.
138 (debug_sym_quick_functions): Link to
139 debug_qf_find_compunit_symtab_by_address.
140 * rust-lang.c (rust_get_trait_object_pointer): New function.
141 (rust_evaluate_subexp) <case UNOP_IND>: New case. Call
142 rust_get_trait_object_pointer.
143 * psymtab.c (psym_relocate): Clear psymbol_map.
144 (psym_fill_psymbol_map, psym_find_compunit_symtab_by_address): New
145 functions.
146 (psym_functions): Link to psym_find_compunit_symtab_by_address.
147 * objfiles.h (struct objfile) <psymbol_map>: New member.
148 * dwarf2read.c (dwarf2_gdb_index_functions): Update.
149 (process_die) <DW_TAG_variable>: New case. Call read_variable.
150 (rust_containing_type, read_variable): New functions.
151
7468702d
SM
1522017-11-17 Simon Marchi <simon.marchi@polymtl.ca>
153
154 * common/gdb_vecs.h (DEF_VEC_I (int)): Remove.
155
37269bc9
SM
1562017-11-17 Simon Marchi <simon.marchi@polymtl.ca>
157
158 * common/filestuff.c: Include <algorithm>.
159 (open_fds): Change type to std::vector<int>.
160 (do_mark_open_fd): Adjust.
161 (unmark_fd_no_cloexec): Adjust.
162 (do_close): Adjust.
163
5c632425
SM
1642017-11-17 Simon Marchi <simon.marchi@polymtl.ca>
165
166 * breakpoint.c (output_thread_groups): Take an std::vector.
167 (print_one_breakpoint_location): Adjust.
168
ced9779b
JB
1692017-11-17 Joel Brobecker <brobecker@adacore.com>
170
171 * ada-lang.c (resolve_subexp): Add handling of OP_VAR_MSYM_VALUE.
172 (ada_evaluate_subexp_for_cast): New function.
173 (ada_evaluate_subexp) <UNOP_CAST>: Replace code by call to
174 ada_evaluate_subexp_for_cast.
175 (ada_evaluate_subexp) <nosideret>: Replace code by call to
176 eval_skip_value.
177 * eval.c (evaluate_var_value): Make non-static.
178 (evaluate_var_msym_value, eval_skip_value): Likewise.
179 * value.h (evaluate_var_value, evaluate_var_msym_value)
180 (eval_skip_value): Declare.
181
b7e22850
JB
1822017-11-16 Joel Brobecker <brobecker@adacore.com>
183
184 * ada-lang.c (ada_value_cast): Remove parameter "noside".
185 Update all callers.
186
9ccabccd
PA
1872017-11-16 Pedro Alves <palves@redhat.com>
188
189 * python/py-unwind.c (pyuw_sniffer): Translate
190 PyExc_KeyboardInterrupt to a GDB Quit exception.
191
d930703d
PA
1922017-11-16 Pedro Alves <palves@redhat.com>
193
194 * infrun.c (resume_cleanups): Delete.
195 (resume): No longer install a resume_cleanups cleanup nor call
196 QUIT.
197 (proceed): Pass the terminal to the inferior.
198 (keep_going_pass_signal): No longer install a resume_cleanups
199 cleanup.
200
38dc2859
PA
2012017-11-16 Pedro Alves <palves@redhat.com>
202
203 * inf-loop.c (inferior_event_handler): Don't swallow the exception
204 if the prompt is blocked.
205
688fca4f
PA
2062017-11-16 Pedro Alves <palves@redhat.com>
207
208 * breakpoint.c (insert_bp_location): Replace bp_err and
209 bp_err_message locals by a gdb_exception local.
210
e2c33ac7
PA
2112017-11-16 Pedro Alves <palves@redhat.com>
212
213 * inflow.c (scoped_ignore_sigttou): New class.
214 (child_terminal_ours_1, new_tty): Use it.
215
d7236961
UW
2162017-11-16 Ulrich Weigand <uweigand@de.ibm.com>
217
218 * target-float.c (decimal_from_number): Add byte_order argument and
219 call match_endianness. Error if unknown floating-point type.
220 (decimal_to_number): Add byte_order argument and call match_endianness.
221 (decimal_from_longest): Update call. Do not call match_endianness.
222 (decimal_from_ulongest): Likewise.
223 (decimal_binop): Likewise.
224 (decimal_is_zero): Likewise.
225 (decimal_compare): Likewise.
226 (decimal_convert): Likewise.
227
d8ae99a7
PM
2282017-11-16 Phil Muldoon <pmuldoon@redhat.com>
229
230 * python/python.c (gdbpy_rbreak): New function.
231 * NEWS: Document Python rbreak feature.
232
c632b645
YQ
2332017-11-16 Yao Qi <yao.qi@linaro.org>
234
235 * features/tic6x-c62x.xml: Remove.
236 * features/tic6x-c64x.xml: Remove.
237 * features/tic6x-c64xp.xml: Remove.
238
a014b87a
JB
2392017-11-15 John Baldwin <jhb@FreeBSD.org>
240
241 * symtab.h: Include <array>.
242
94765011
JB
2432017-11-15 John Baldwin <jhb@FreeBSD.org>
244
245 * bsd-kvm.c (bsd_kvm_cmd): Constify 'arg'.
246 (bsd_kvm_proc_cmd): Likewise.
247
625ad440
SM
2482017-11-15 Simon Marchi <simon.marchi@ericsson.com>
249
250 * tui/tui-win.c (window_name_completer): Replace VEC with
251 std::vector.
252
c0c11fa9
AC
2532017-11-15 Andrew Cagney <cagney@gnu.org>
254
255 * MAINTAINERS: Remove no-longer applicable entries.
256
34a7ebaf
AC
2572017-11-15 Andrew Cagney <cagney@gnu.org>
258
259 * MAINTAINERS: Move self to Past Maintainers.
260
5334ef39
YQ
2612017-11-15 Yao Qi <yao.qi@linaro.org>
262
263 * features/Makefile (XMLTOC): Remove nios2-linux.xml.
264 * features/nios2-linux.c: Remove.
265 * nios2-linux-tdep.c (_initialize_nios2_linux_tdep): Don't call
266 initialize_tdesc_nios2_linux.
267
a714b0d6
YQ
2682017-11-15 Yao Qi <yao.qi@linaro.org>
269
270 * m68hc11-tdep.c (M68HC11_NUM_REGS): Change it to
271 M68HC11_LAST_HARD_REG + 1.
272
92ffd475
PC
2732017-11-14 Paul Carroll <pcarroll@codesourcery.com>
274
275 PR gdb/22388
276 * remote.c (remote_write_bytes_aux, remote_read_bytes_1,
277 remote_read_bytes, remote_write_qxfer, remote_xfer_partial):
278 Return TARGET_XFER_EOF if size of returned data is 0.
279
07431908
SM
2802017-11-14 Simon Marchi <simon.marchi@ericsson.com>
281
282 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
283 memory-map-selftests.c.
284 (SUBDIR_UNITTESTS_OBS): Add memory-map-selftests.o.
285 * memory-map.c (memory_map_start_memory): Fix computation of hi
286 address.
287 * unittests/memory-map-selftests.c: New file.
288
31432a67
JB
2892017-11-09 Joel Brobecker <brobecker@adacore.com>
290
291 * ada-lang.c: Fix some typos in the general command documenting
292 how Ada expressions are being evaluated and how their result
293 is printed.
294
e793c052
TT
2952017-11-09 Tom Tromey <tom@tromey.com>
296
297 * psymtab.c (psymbol_hash): Do not hash string contents.
298 (psymbol_compare): Add comment.
299
7e8835c5
TT
3002017-11-09 Tom Tromey <tom@tromey.com>
301
302 * dictionary.c (dict_hash): Move "TKB" check into the "switch".
303
286acbb5
JB
3042017-11-08 Joel Brobecker <brobecker@adacore.com>
305
306 * ada-exp.y (write_var_from_sym): Remove parameter
307 "orig_left_context". Update all callers.
308
b44ec619
SM
3092017-11-08 Simon Marchi <simon.marchi@ericsson.com>
310
311 * tracepoint.h (class collection_list) <stringify>: Return
312 std::vector<std::string>.
313 (encode_actions_rsp): Change parameters to
314 std::vector<std::string> *.
315 * tracepoint.c (collection_list::stringify): Return
316 std::vector<std::string> and adjust accordingly.
317 (encode_actions_rsp): Changee parameters to
318 std::vector<std::string> and adjust accordingly.
319 * remote.c (free_actions_list),
320 free_actions_list_cleanup_wrapper): Remove.
321 (remote_download_tracepoint): Adjust to std::vector.
322
2f4732b0
TT
3232017-11-08 Tom Tromey <tom@tromey.com>
324
325 * dwarf2read.c (symbolp): Remove typedef.
326 (read_func_scope): Use std::vector.
327 (process_structure_scope): Use std::vector.
328
f9d67a22
PA
3292017-11-08 Pedro Alves <palves@redhat.com>
330
331 * ada-lang.c (ada_make_symbol_completion_list): Use
332 completion_skip_symbol.
333 * symtab.c (symbol_is_function_or_method(minimal_symbol*)): New.
334 (symbol_is_function_or_method(symbol*)): New.
335 (add_symtab_completions): Add complete_symbol_mode parameter. Use
336 completion_skip_symbol.
337 (default_collect_symbol_completion_matches_break_on): Use
338 completion_skip_symbol. Pass down mode.
339 (collect_file_symbol_completion_matches): Pass down mode.
340 * symtab.h (symbol_is_function_or_method): New declarations.
341 (completion_skip_symbol): New template function.
342
56d87ef7
PA
3432017-11-08 Pedro Alves <palves@redhat.com>
344
345 * linespec.c (iterate_over_all_matching_symtabs): Add
346 search_domain parameter. Pass it down to expand_symtabs_matching.
347 (decode_objc): Request FUNCTIONS_DOMAIN symbols only.
348 (lookup_prefix_sym): Adjust by passing ALL_DOMAIN as
349 search_domain.
350 (add_all_symbol_names_from_pspace): Add search_domain parameter.
351 Pass it down.
352 (find_method, find_function_symbols): Request FUNCTIONS_DOMAIN
353 symbols.
354 (add_matching_symbols_to_info): Add search_domain parameter. Pass
355 it down.
356
1b026119
PA
3572017-11-08 Pedro Alves <palves@redhat.com>
358
359 * ada-lang.c (ada_make_symbol_completion_list): Remove text and
360 text_len locals and don't pass them down.
361 * symtab.c (completion_list_add_name): Remove
362 sym_text/sym_text_len parameters and adjust.
363 (completion_list_add_symbol, completion_list_add_msymbol)
364 (completion_list_objc_symbol, completion_list_add_fields)
365 (add_symtab_completions): Likewise.
366 (default_collect_symbol_completion_matches_break_on)
367 (collect_file_symbol_completion_matches): Remove sym_text_len
368 local and don't pass it down.
369 * symtab.h (completion_list_add_name): Remove
370 sym_text/sym_text_len parameters.
371
c62446b1
PA
3722017-11-08 Pedro Alves <palves@redhat.com>
373
374 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
375 unittests/lookup_name_info-selftests.c.
376 (SUBDIR_UNITTESTS_OBS): Add lookup_name_info-selftests.o.
377 * cp-support.c: Include "selftest.h".
378 (cp_remove_params_1): Rename from cp_remove_params. Add
379 'require_param' parameter, and handle it.
380 (cp_remove_params): Reimplement.
381 (cp_remove_params_if_any): New.
382 (selftests::quote): New.
383 (selftests::check_remove_params): New.
384 (selftests::test_cp_remove_params): New.
385 (_initialize_cp_support): Install
386 selftests::test_cp_remove_params.
387 * cp-support.h (cp_remove_params_if_any): Declare.
388 * dwarf2read.c :Include "selftest.h".
389 (dw2_expand_symtabs_matching_symbol): Use
390 lookup_name_info::make_ignore_params.
391 (selftests::dw2_expand_symtabs_matching::mock_mapped_index)
392 (selftests::dw2_expand_symtabs_matching::string_or_null)
393 (selftests::dw2_expand_symtabs_matching::check_match)
394 (selftests::dw2_expand_symtabs_matching::test_symbols)
395 (selftests::dw2_expand_symtabs_matching::run_test): New.
396 (_initialize_dwarf2_read): Register
397 selftests::dw2_expand_symtabs_matching::run_test.
398 * psymtab.c (psym_expand_symtabs_matching): Use
399 lookup_name_info::make_ignore_params.
400 * symtab.c (demangle_for_lookup_info::demangle_for_lookup_info):
401 If the lookup name wants to ignore parameters, strip them.
402 (compare_symbol_name): Remove sym_text/sym_text_len parameters and
403 code handling '('.
404 (completion_list_add_name): Don't pass down sym_text/sym_text_len.
405 (default_collect_symbol_completion_matches_break_on): Don't try to
406 strip parameters.
407 * symtab.h (lookup_name_info::lookup_name_info): Add
408 'ignore_parameters' parameter.
409 (lookup_name_info::ignore_parameters)
410 (lookup_name_info::make_ignore_params): New methods.
411 (lookup_name_info::m_ignore_parameters): New field.
412 * unittests/lookup_name_info-selftests.c: New file.
413
61920122
PA
4142017-11-08 Pedro Alves <palves@redhat.com>
415
416 * dwarf2read.c (dw2_expand_marked_cus)
417 (dw2_expand_symtabs_matching_symbol): Remove forward declarations.
418 (dw2_expand_symtabs_matching): Move further below.
419 (dw2_expand_marked_cus): Reindent.
420
3f563c84
PA
4212017-11-08 Pedro Alves <palves@redhat.com>
422
423 * dwarf2read.c (byte_swap, MAYBE_SWAP): Move higher up in file.
424 (struct name_component): New.
425 (mapped_index::name_components): New field.
426 (mapped_index::symbol_name_at): New method.
427 (dwarf2_read_index): Call mapped_index ctor.
428 (dw2_map_matching_symbols): Add comment about name_components
429 table.
430 (dw2_expand_symtabs_matching): Factor part to...
431 (dw2_expand_symtabs_matching_symbol): ... this new function.
432 Build name components table, and lookup symbols in it before
433 calling the name matcher.
434 (dw2_expand_marked_cus): New, factored out from
435 dw2_expand_symtabs_matching.
436 (dwarf2_per_objfile_free): Call the mapped_index's dtor.
437
b5ec771e
PA
4382017-11-08 Pedro Alves <palves@redhat.com>
439
440 * ada-lang.c (ada_encode): Rename to ..
441 (ada_encode_1): ... this. Add throw_errors parameter and handle
442 it.
443 (ada_encode): Reimplement.
444 (match_name): Delete, folded into full_name.
445 (resolve_subexp): No longer pass the encoded name to
446 ada_lookup_symbol_list.
447 (should_use_wild_match): Delete.
448 (name_match_type_from_name): New.
449 (ada_lookup_simple_minsym): Use lookup_name_info and the
450 language's symbol_name_matcher_ftype.
451 (add_symbols_from_enclosing_procs, ada_add_local_symbols)
452 (ada_add_block_renamings): Adjust to use lookup_name_info.
453 (ada_lookup_name): New.
454 (add_nonlocal_symbols, ada_add_all_symbols)
455 (ada_lookup_symbol_list_worker, ada_lookup_symbol_list)
456 (ada_iterate_over_symbols): Adjust to use lookup_name_info.
457 (ada_name_for_lookup): Delete.
458 (ada_lookup_encoded_symbol): Construct a verbatim name.
459 (wild_match): Reverse sense of return type. Use bool.
460 (full_match): Reverse sense of return type. Inline bits of old
461 match_name here.
462 (ada_add_block_symbols): Adjust to use lookup_name_info.
463 (symbol_completion_match): Delete, folded into...
464 (ada_lookup_name_info::matches): ... .this new method.
465 (symbol_completion_add): Delete.
466 (ada_collect_symbol_completion_matches): Add name_match_type
467 parameter. Adjust to use lookup_name_info and
468 completion_list_add_name.
469 (get_var_value, ada_add_global_exceptions): Adjust to use
470 lookup_name_info.
471 (ada_get_symbol_name_cmp): Delete.
472 (do_wild_match, do_full_match): New functions.
473 (ada_lookup_name_info::ada_lookup_name_info): New method.
474 (ada_symbol_name_matches, ada_get_symbol_name_matcher): New
475 functions.
476 (ada_language_defn): Install ada_get_symbol_name_matcher.
477 * ada-lex.l (processId): If name starts with '<', copy it
478 verbatim.
479 * block.c (block_iter_match_step, block_iter_match_first)
480 (block_iter_match_next, block_lookup_symbol)
481 (block_lookup_symbol_primary, block_find_symbol): Adjust to use
482 lookup_name_info.
483 * block.h (block_iter_match_first, block_iter_match_next)
484 (ALL_BLOCK_SYMBOLS_WITH_NAME): Adjust to use lookup_name_info.
485 * c-lang.c (c_language_defn, cplus_language_defn)
486 (asm_language_defn, minimal_language_defn): Adjust comments to
487 refer to la_get_symbol_name_matcher.
488 * completer.c (complete_files_symbols)
489 (collect_explicit_location_matches, symbol_completer): Pass a
490 symbol_name_match_type down.
491 * completer.h (class completion_match, completion_match_result):
492 New classes.
493 (completion_tracker::reset_completion_match_result): New method.
494 (completion_tracker::m_completion_match_result): New field.
495 * cp-support.c (make_symbol_overload_list_block): Adjust to use
496 lookup_name_info.
497 (cp_fq_symbol_name_matches, cp_get_symbol_name_matcher): New
498 functions.
499 * cp-support.h (cp_get_symbol_name_matcher): New declaration.
500 * d-lang.c: Adjust comments to refer to
501 la_get_symbol_name_matcher.
502 * dictionary.c (dict_vector) <iter_match_first, iter_match_next>:
503 Adjust to use lookup_name_info.
504 (dict_iter_match_first, dict_iter_match_next)
505 (iter_match_first_hashed, iter_match_next_hashed)
506 (iter_match_first_linear, iter_match_next_linear): Adjust to work
507 with a lookup_name_info.
508 * dictionary.h (dict_iter_match_first, dict_iter_match_next):
509 Likewise.
510 * dwarf2read.c (dw2_lookup_symbol): Adjust to use lookup_name_info.
511 (dw2_map_matching_symbols): Adjust to use symbol_name_match_type.
512 (gdb_index_symbol_name_matcher): New class.
513 (dw2_expand_symtabs_matching) Adjust to use lookup_name_info and
514 gdb_index_symbol_name_matcher. Accept a NULL symbol_matcher.
515 * f-lang.c (f_collect_symbol_completion_matches): Adjust to work
516 with a symbol_name_match_type.
517 (f_language_defn): Adjust comments to refer to
518 la_get_symbol_name_matcher.
519 * go-lang.c (go_language_defn): Adjust comments to refer to
520 la_get_symbol_name_matcher.
521 * language.c (default_symbol_name_matcher)
522 (language_get_symbol_name_matcher): New functions.
523 (unknown_language_defn, auto_language_defn): Adjust comments to
524 refer to la_get_symbol_name_matcher.
525 * language.h (symbol_name_cmp_ftype): Delete.
526 (language_defn) <la_collect_symbol_completion_matches>: Add match
527 type parameter.
528 <la_get_symbol_name_cmp>: Delete field.
529 <la_get_symbol_name_matcher>: New field.
530 <la_iterate_over_symbols>: Adjust to use lookup_name_info.
531 (default_symbol_name_matcher, language_get_symbol_name_matcher):
532 Declare.
533 * linespec.c (iterate_over_all_matching_symtabs)
534 (iterate_over_file_blocks): Adjust to use lookup_name_info.
535 (find_methods): Add language parameter, and use lookup_name_info
536 and the language's symbol_name_matcher_ftype.
537 (linespec_complete_function): Adjust.
538 (lookup_prefix_sym): Use lookup_name_info.
539 (add_all_symbol_names_from_pspace): Adjust.
540 (find_superclass_methods): Add language parameter and pass it
541 down.
542 (find_method): Pass symbol language down.
543 (find_linespec_symbols): Don't demangle or Ada encode here.
544 (search_minsyms_for_name): Add lookup_name_info parameter.
545 (add_matching_symbols_to_info): Add name_match_type parameter.
546 Use lookup_name_info.
547 * m2-lang.c (m2_language_defn): Adjust comments to refer to
548 la_get_symbol_name_matcher.
549 * minsyms.c: Include <algorithm>.
550 (add_minsym_to_demangled_hash_table): Remove table parameter and
551 add objfile parameter. Use search_name_hash, and add language to
552 demangled languages vector.
553 (struct found_minimal_symbols): New struct.
554 (lookup_minimal_symbol_mangled, lookup_minimal_symbol_demangled):
555 New functions.
556 (lookup_minimal_symbol): Adjust to use them. Don't canonicalize
557 input names here. Use lookup_name_info instead. Lookup up
558 demangled names once for each language in the demangled names
559 vector.
560 (iterate_over_minimal_symbols): Use lookup_name_info. Lookup up
561 demangled names once for each language in the demangled names
562 vector.
563 (build_minimal_symbol_hash_tables): Adjust.
564 * minsyms.h (iterate_over_minimal_symbols): Adjust to pass down a
565 lookup_name_info.
566 * objc-lang.c (objc_language_defn): Adjust comment to refer to
567 la_get_symbol_name_matcher.
568 * objfiles.h: Include <vector>.
569 (objfile_per_bfd_storage) <demangled_hash_languages>: New field.
570 * opencl-lang.c (opencl_language_defn): Adjust comment to refer to
571 la_get_symbol_name_matcher.
572 * p-lang.c (pascal_language_defn): Adjust comment to refer to
573 la_get_symbol_name_matcher.
574 * psymtab.c (psym_lookup_symbol): Use lookup_name_info.
575 (match_partial_symbol): Use symbol_name_match_type,
576 lookup_name_info and psymbol_name_matches.
577 (lookup_partial_symbol): Use lookup_name_info.
578 (map_block): Use symbol_name_match_type and lookup_name_info.
579 (psym_map_matching_symbols): Use symbol_name_match_type.
580 (psymbol_name_matches): New.
581 (recursively_search_psymtabs): Use lookup_name_info and
582 psymbol_name_matches. Rename 'kind' parameter to 'domain'.
583 (psym_expand_symtabs_matching): Use lookup_name_info. Rename
584 'kind' parameter to 'domain'.
585 * rust-lang.c (rust_language_defn): Adjust comment to refer to
586 la_get_symbol_name_matcher.
587 * symfile-debug.c (debug_qf_map_matching_symbols)
588 (debug_qf_map_matching_symbols): Use symbol_name_match_type.
589 (debug_qf_expand_symtabs_matching): Use lookup_name_info.
590 * symfile.c (expand_symtabs_matching): Use lookup_name_info.
591 * symfile.h (quick_symbol_functions) <map_matching_symbols>:
592 Adjust to use symbol_name_match_type.
593 <expand_symtabs_matching>: Adjust to use lookup_name_info.
594 (expand_symtabs_matching): Adjust to use lookup_name_info.
595 * symmisc.c (maintenance_expand_symtabs): Use
596 lookup_name_info::match_any ().
597 * symtab.c (symbol_matches_search_name): New.
598 (eq_symbol_entry): Adjust to use lookup_name_info and the
599 language's matcher.
600 (demangle_for_lookup_info::demangle_for_lookup_info): New.
601 (lookup_name_info::match_any): New.
602 (iterate_over_symbols, search_symbols): Use lookup_name_info.
603 (compare_symbol_name): Add language, lookup_name_info and
604 completion_match_result parameters, and use them.
605 (completion_list_add_name): Make extern. Add language and
606 lookup_name_info parameters. Use them.
607 (completion_list_add_symbol, completion_list_add_msymbol)
608 (completion_list_objc_symbol): Add lookup_name_info parameters and
609 adjust. Pass down language.
610 (completion_list_add_fields): Add lookup_name_info parameters and
611 adjust. Pass down language.
612 (add_symtab_completions): Add lookup_name_info parameters and
613 adjust.
614 (default_collect_symbol_completion_matches_break_on): Add
615 name_match_type parameter, and use it. Use lookup_name_info.
616 (default_collect_symbol_completion_matches)
617 (collect_symbol_completion_matches): Add name_match_type
618 parameter, and pass it down.
619 (collect_symbol_completion_matches_type): Adjust.
620 (collect_file_symbol_completion_matches): Add name_match_type
621 parameter, and use lookup_name_info.
622 * symtab.h: Include <string> and "common/gdb_optional.h".
623 (enum class symbol_name_match_type): New.
624 (class ada_lookup_name_info): New.
625 (struct demangle_for_lookup_info): New.
626 (class lookup_name_info): New.
627 (symbol_name_matcher_ftype): New.
628 (SYMBOL_MATCHES_SEARCH_NAME): Use symbol_matches_search_name.
629 (symbol_matches_search_name): Declare.
630 (MSYMBOL_MATCHES_SEARCH_NAME): Delete.
631 (default_collect_symbol_completion_matches)
632 (collect_symbol_completion_matches)
633 (collect_file_symbol_completion_matches): Add name_match_type
634 parameter.
635 (iterate_over_symbols): Use lookup_name_info.
636 (completion_list_add_name): Declare.
637 * utils.c (enum class strncmp_iw_mode): Moved to utils.h.
638 (strncmp_iw_with_mode): Now extern.
639 * utils.h (enum class strncmp_iw_mode): Moved from utils.c.
640 (strncmp_iw_with_mode): Declare.
641
5ffa0793
PA
6422017-11-08 Keith Seitz <keiths@redhat.com>
643 Pedro Alves <palves@redhat.com>
644
645 * ada-lang.c (ada_language_defn): Install
646 default_search_name_hash.
647 * buildsym.c (struct buildsym_compunit): <language>: New field.
648 (finish_block_internal): Pass language when creating dictionaries.
649 (start_buildsym_compunit, start_symtab): New language parameters.
650 Use them.
651 (restart_symtab): Pass down compilation unit's language.
652 * buildsym.h (enum language): Forward declare.
653 (start_symtab): New 'language' parameter.
654 * c-lang.c (c_language_defn, cplus_language_defn)
655 (asm_language_defn, minimal_language_defn): Install
656 default_search_name_hash.
657 * coffread.c (coff_start_symtab): Adjust.
658 * d-lang.c (d_language_defn): Install default_search_name_hash.
659 * dbxread.c (struct symloc): Add 'pst_language' field.
660 (PST_LANGUAGE): Define.
661 (start_psymtab, read_ofile_symtab): Use it.
662 (process_one_symbol): New 'language' parameter. Pass it down.
663 * dictionary.c (struct dictionary) <language>: New field.
664 (DICT_LANGUAGE): Define.
665 (dict_create_hashed, dict_create_hashed_expandable)
666 (dict_create_linear, dict_create_linear_expandable): New parameter
667 'language'. Set the dictionary's language.
668 (iter_match_first_hashed): Adjust to rename.
669 (insert_symbol_hashed): Assert we don't see mismatching
670 languages. Adjust to rename.
671 (dict_hash): Rename to ...
672 (default_search_name_hash): ... this and make extern.
673 * dictionary.h (struct language_defn): Forward declare.
674 (dict_create_hashed): New parameter 'language'.
675 * dwarf2read.c (dwarf2_start_symtab): Pass down language.
676 * f-lang.c (f_language_defn): Install default_search_name_hash.
677 * go-lang.c (go_language_defn): Install default_search_name_hash.
678 * jit.c (finalize_symtab): Pass compunit's language to dictionary
679 creation.
680 * language.c (unknown_language_defn, auto_language_defn):
681 * language.h (language_defn::la_search_name_hash): New field.
682 (default_search_name_hash): Declare.
683 * m2-lang.c (m2_language_defn): Install default_search_name_hash.
684 * mdebugread.c (new_block): New parameter 'language'.
685 * mdebugread.c (parse_symbol): Pass symbol language to block
686 allocation.
687 (psymtab_to_symtab_1): Pass down language.
688 (new_symtab): Pass compunit's language to block allocation.
689 * objc-lang.c (objc_language_defn): Install
690 default_search_name_hash.
691 * opencl-lang.c (opencl_language_defn):
692 * p-lang.c (pascal_language_defn): Install
693 default_search_name_hash.
694 * rust-lang.c (rust_language_defn): Install
695 default_search_name_hash.
696 * stabsread.h (enum language): Forward declare.
697 (process_one_symbol): Add 'language' parameter.
698 * symtab.c (search_name_hash): New function.
699 * symtab.h (search_name_hash): Declare.
700 * xcoffread.c (read_xcoff_symtab): Pass language to start_symtab.
701
2a1dde5d
PA
7022017-11-08 Pedro Alves <palves@redhat.com>
703
704 * cp-name-parser.y (main): Don't initialize extra_chars.
705
95a6b0a1
TT
7062017-11-07 Tom Tromey <tom@tromey.com>
707
708 * event-top.h (command_handler): Constify.
709 * record-full.c (cmd_record_full_start): Update.
710 * thread.c (thread_apply_all_command): Update.
711 * printcmd.c (eval_command): Update.
712 * mi/mi-main.c (mi_execute_cli_command): Update.
713 (mi_execute_async_cli_command): Update.
714 * tui/tui-stack.c (tui_update_command): Update.
715 * cli/cli-interp.c (safe_execute_command): Constify.
716 * record.c (record_start): Update.
717 (record_start, record_stop, cmd_record_start): Update.
718 * record-btrace.c (cmd_record_btrace_bts_start): Update.
719 (cmd_record_btrace_pt_start): Update.
720 (cmd_record_btrace_start): Update.
721 (cmd_record_btrace_start): Update.
722 * reverse.c (exec_reverse_once): Update.
723 * python/python.c (execute_gdb_command): Don't copy the command.
724 * event-top.c (command_line_handler): Update.
725 (command_handler): Constify.
726 * defs.h (deprecated_call_command_hook): Constify.
727 * cli/cli-script.h (execute_user_command): Constify.
728 * cli/cli-script.c (execute_user_command): Constify.
729 (execute_cmd_pre_hook, execute_cmd_post_hook): Constify.
730 (enum command_control_type): Update.
731 * main.c (catch_command_errors): Remove non-const overload.
732 (catch_command_errors_ftype): Remove.
733 * python/py-cmd.c (cmdpy_function): Constify.
734 * guile/scm-cmd.c (cmdscm_function): Constify.
735 * cli/cli-dump.c (call_dump_func): Constify.
736 * cli/cli-decode.c (do_const_cfunc): Constify.
737 (do_sfunc): Constify.
738 (cmd_func): Constify.
739 * gdbcmd.h (execute_command, execute_command_to_string): Constify.
740 * top.h (execute_command): Constify.
741 * top.c (execute_command): Constify.
742 (execute_command_to_string): Constify.
743 (deprecated_call_command_hook): Constify.
744 * command.h (cmd_func): Constify.
745 * cli/cli-decode.h (struct cmd_list_element) <func>: Constify.
746
eb4c3f4a
TT
7472017-11-07 Tom Tromey <tom@tromey.com>
748
749 * ada-lang.c (catch_ada_exception_command): Constify.
750 (catch_assert_command): Constify.
751 * break-catch-throw.c (catch_catch_command, catch_throw_command)
752 (catch_rethrow_command): Constify.
753 (catch_exception_command_1): Constify.
754 * breakpoint.h (add_catch_command): Constify.
755 * break-catch-syscall.c (catch_syscall_command_1): Constify.
756 (catch_syscall_split_args): Constify.
757 * break-catch-sig.c (catch_signal_command): Constify.
758 (catch_signal_split_args): Constify.
759 * cli/cli-decode.h (struct cmd_list_element) <function>: Use
760 cmd_const_sfunc_ftype.
761 * cli/cli-decode.c (add_setshow_cmd_full): Constify.
762 (add_setshow_enum_cmd, add_setshow_auto_boolean_cmd)
763 (add_setshow_boolean_cmd, add_setshow_filename_cmd)
764 (add_setshow_string_cmd, struct cmd_list_element)
765 (add_setshow_optional_filename_cmd, add_setshow_integer_cmd)
766 (add_setshow_uinteger_cmd, add_setshow_zinteger_cmd)
767 (add_setshow_zuinteger_unlimited_cmd, add_setshow_zuinteger_cmd):
768 Constify.
769 (set_cmd_sfunc): Constify.
770 (empty_sfunc): Constify.
771 * command.h (add_setshow_enum_cmd, add_setshow_auto_boolean_cmd)
772 (add_setshow_boolean_cmd, add_setshow_filename_cmd)
773 (add_setshow_string_cmd, add_setshow_string_noescape_cmd)
774 (add_setshow_optional_filename_cmd, add_setshow_integer_cmd)
775 (add_setshow_uinteger_cmd, add_setshow_zinteger_cmd)
776 (add_setshow_zuinteger_cmd, add_setshow_zuinteger_unlimited_cmd):
777 Constify.
778 (set_cmd_sfunc): Constify.
779 (cmd_sfunc_ftype): Remove.
780 * compile/compile.c (set_compile_args): Constify.
781 * infrun.c (set_disable_randomization): Constify.
782 * infcmd.c (set_args_command, set_cwd_command): Constify.
783 * breakpoint.c (set_condition_evaluation_mode): Constify.
784 (add_catch_command): Constify.
785 (catch_fork_command_1, catch_exec_command_1)
786 (catch_load_command_1, catch_unload_command_1): Constify.
787 (catch_load_or_unload): Constify.
788 * guile/scm-param.c (pascm_set_func): Constify.
789 (add_setshow_generic): Constify.
790 * python/py-param.c (get_set_value): Constify.
791 * top.h (set_verbose): Constify.
792 * tui/tui-win.c (tui_set_var_cmd): Constify.
793 * mi/mi-main.c (set_mi_async_command): Constify.
794 * cli/cli-logging.c (set_logging_overwrite)
795 (set_logging_redirect): Constify.
796 * value.c (set_max_value_size): Constify.
797 * valprint.c (set_input_radix, set_output_radix): Constify.
798 * utils.c (set_width_command, set_height_command): Constify.
799 * typeprint.c (set_print_type_methods, set_print_type_typedefs): Constify.
800 * tracepoint.c (set_disconnected_tracing)
801 (set_circular_trace_buffer, set_trace_buffer_size)
802 (set_trace_user, set_trace_notes, set_trace_stop_notes): Constify.
803 * top.c (set_history_size_command, set_verbose, set_editing)
804 (set_gdb_datadir, set_history_filename): Constify.
805 * target.c (set_targetdebug, maint_set_target_async_command)
806 (maint_set_target_non_stop_command, set_target_permissions)
807 (set_write_memory_permission): Constify.
808 (open_target): Constify.
809 * target-descriptions.c (set_tdesc_filename_cmd): Constify.
810 * target-dcache.c (set_stack_cache, set_code_cache): Constify.
811 * symtab.c (set_symbol_cache_size_handler): Constify.
812 * symfile.c (set_ext_lang_command): Constify.
813 * symfile-debug.c (set_debug_symfile): Constify.
814 * source.c (set_directories_command): Constify.
815 * solib.c (reload_shared_libraries, gdb_sysroot_changed): Constify.
816 * serial.c (set_parity): Constify.
817 * rs6000-tdep.c (powerpc_set_soft_float, powerpc_set_vector_abi): Constify.
818 * remote.c (set_remote_exec_file, set_remotebreak)
819 (set_remote_protocol_Z_packet_cmd, set_range_stepping): Constify.
820 * record.c (set_record_insn_history_size)
821 (set_record_call_history_size): Constify.
822 * record-full.c (set_record_full_insn_max_num): Constify.
823 * proc-api.c (set_procfs_trace_cmd, set_procfs_file_cmd): Constify.
824 * osabi.c (set_osabi): Constify.
825 * mips-tdep.c (set_mips64_transfers_32bit_regs)
826 (reinit_frame_cache_sfunc, mips_abi_update): Constify.
827 * maint.c (maintenance_set_profile_cmd): Constify.
828 * linux-thread-db.c (set_libthread_db_search_path): Constify.
829 * language.c (set_language_command, set_range_command)
830 (set_case_command): Constify.
831 * infrun.c (set_non_stop, set_observer_mode)
832 (set_stop_on_solib_events, set_schedlock_func)
833 (set_exec_direction_func): Constify.
834 * infcmd.c (set_inferior_tty_command): Constify.
835 * disasm.c (set_disassembler_options_sfunc): Constify.
836 * demangle.c (set_demangling_command): Constify.
837 * dcache.c (set_dcache_size, set_dcache_line_size): Constify.
838 * cris-tdep.c (set_cris_version, set_cris_mode)
839 (set_cris_dwarf2_cfi): Constify.
840 * corefile.c (set_gnutarget_command): Constify.
841 * charset.c (set_host_charset_sfunc, set_target_charset_sfunc)
842 (set_target_wide_charset_sfunc): Constify.
843 * breakpoint.c (update_dprintf_commands): Constify.
844 * auto-load.c (set_auto_load_dir, set_auto_load_safe_path): Constify.
845 * arm-tdep.c (set_fp_model_sfunc, arm_set_abi)
846 (set_disassembly_style_sfunc): Constify.
847 * arch-utils.c (set_endian, set_architecture): Constify.
848 * alpha-tdep.c (reinit_frame_cache_sfunc): Constify.
849 * agent.c (set_can_use_agent): Constify.
850
5fed81ff
TT
8512017-11-07 Tom Tromey <tom@tromey.com>
852
853 * go32-nat.c (go32_sysinfo, go32_sldt, go32_sgdt, go32_sidt)
854 (go32_pde, go32_pte, go32_pte_for_address): Constify.
855 * gnu-nat.c (_parse_bool_arg, show_thread_default_pause_cmd)
856 (set_thread_default_pause_cmd, set_thread_default_run_cmd)
857 (show_thread_default_run_cmd, set_thread_default_detach_sc_cmd)
858 (parse_int_arg, show_thread_default_detach_sc_cmd)
859 (set_signals_cmd, show_signals_cmd, set_sig_thread_cmd)
860 (show_sig_thread_cmd, set_stopped_cmd, show_stopped_cmd)
861 (set_exceptions_cmd, show_exceptions_cmd, set_task_pause_cmd)
862 (show_task_pause_cmd, set_task_detach_sc_cmd)
863 (show_task_detach_sc_cmd, set_task_exc_port_cmd)
864 (set_noninvasive_cmd, set_thread_pause_cmd)
865 (show_thread_pause_cmd, set_thread_run_cmd, show_thread_run_cmd)
866 (set_thread_detach_sc_cmd, show_thread_detach_sc_cmd)
867 (set_thread_exc_port_cmd, thread_takeover_sc_cmd): Constify.
868 * windows-nat.c (display_selectors): Constify.
869 * cli/cli-decode.h (struct cmd_list_element) <function>: Remove
870 non-const "cfunc".
871 * cli/cli-decode.c (set_cmd_cfunc): Remove non-const overload.
872 (cmd_cfunc_eq): Likewise.
873 (struct cmd_list_element): Likewise.
874 (do_cfunc): Remove.
875 (cli_user_command_p): Update.
876 * command.h (add_cmd): Remove non-const overload.
877 (cmd_cfunc_ftype): Remove typedef.
878 (cmd_cfunc_eq): Remove non-const overload.
879 * value.c (show_values): Constify.
880 * thread.c (thread_apply_all_command): Constify.
881 * symfile.c (load_command): Constify.
882 * source.c (directory_command): Constify.
883 * maint.c (maintenance_internal_error)
884 (maintenance_demangler_warning, maintenance_space_display)
885 (maintenance_print_architecture, maintenance_translate_address)
886 (maintenance_info_selftests, maintenance_internal_warning):
887 Constify.
888 * breakpoint.c (disable_trace_command, enable_trace_command):
889 Constify.
890 * auto-load.c (info_auto_load_local_gdbinit, add_auto_load_dir):
891 Constify.
892 (add_auto_load_safe_path): Constify.
893 * guile/scm-auto-load.c (info_auto_load_guile_scripts): Constify.
894 * top.h (show_commands): Constify.
895 * linux-thread-db.c (info_auto_load_libthread_db): Constify.
896 * sparc64-tdep.c (adi_examine_command): Constify.
897 (adi_assign_command): Constify.
898
1d12d88f
TT
8992017-11-07 Tom Tromey <tom@tromey.com>
900
901 * frame.h (info_locals_command, info_args_command): Constify.
902 * auto-load.h (auto_load_info_scripts): Constify.
903 * inferior.h (registers_info): Constify.
904 * copying.c: Rebuild.
905 * copying.awk: Constify generated commands.
906 * auto-load.c (auto_load_info_scripts)
907 (info_auto_load_gdb_scripts): Constify.
908 * cli/cli-decode.c (struct cmd_list_element): Take a
909 cmd_const_cfunc_ftype.
910 * command.h (add_info): Take a cmd_const_cfunc_ftype.
911 * tui/tui-win.c (tui_all_windows_info): Constify.
912 * python/py-auto-load.c (info_auto_load_python_scripts):
913 Constify.
914 * cli/cli-cmds.c (show_command): Remove non-const overload.
915 * tracepoint.c (info_tvariables_command, info_scope_command):
916 Constify.
917 (info_static_tracepoint_markers_command): Constify.
918 * thread.c (info_threads_command): Constify.
919 (print_thread_info_1): Constify.
920 * target.c (info_target_command): Constify.
921 * symtab.c (info_sources_command, info_functions_command)
922 (info_types_command): Constify.
923 (info_variables_command): Remove non-const overload.
924 * symfile.c (info_ext_lang_command): Constify.
925 * stack.c (info_frame_command, info_locals_command)
926 (info_args_command): Constify.
927 (backtrace_command): Remove non-const overload.
928 * source.c (info_source_command, info_line_command): Constify.
929 * solib.c (info_sharedlibrary_command): Constify.
930 * skip.c (info_skip_command): Constify.
931 * ser-go32.c (info_serial_command): Constify.
932 * reverse.c (info_bookmarks_command): Constify.
933 * printcmd.c (info_symbol_command, info_address_command)
934 (info_display_command): Constify.
935 * osdata.c (info_osdata_command): Constify.
936 * objc-lang.c (info_selectors_command, info_classes_command):
937 Constify.
938 * nto-procfs.c (procfs_pidlist, procfs_meminfo): Constify.
939 * memattr.c (info_mem_command): Constify.
940 * macrocmd.c (info_macro_command, info_macros_command): Constify.
941 * linux-fork.c (info_checkpoints_command): Constify.
942 * infrun.c (info_signals_command): Constify.
943 * inflow.c (info_terminal_command): Constify.
944 * inferior.c (info_inferiors_command): Constify.
945 (print_inferior): Constify.
946 * infcmd.c (info_program_command, info_all_registers_command)
947 (info_registers_command, info_vector_command)
948 (info_float_command): Constify.
949 (registers_info): Constify.
950 * gnu-nat.c (info_send_rights_cmd, info_recv_rights_cmd)
951 (info_port_sets_cmd, info_dead_names_cmd, info_port_rights_cmd):
952 Constify.
953 * f-valprint.c (info_common_command): Constify.
954 * dcache.c (info_dcache_command): Constify.
955 (dcache_info_1): Constify.
956 * darwin-nat-info.c (info_mach_tasks_command)
957 (info_mach_task_command, info_mach_ports_command)
958 (info_mach_port_command, info_mach_threads_command)
959 (info_mach_thread_command, info_mach_regions_command)
960 (info_mach_regions_recurse_command, info_mach_region_command)
961 (info_mach_exceptions_command): Constify.
962 (get_task_from_args): Constify.
963 * cp-support.c (info_vtbl_command): Constify.
964 * breakpoint.c (info_watchpoints_command)
965 (info_tracepoints_command): Constify.
966 (info_breakpoints_command): Remove non-const overload.
967 * avr-tdep.c (avr_io_reg_read_command): Constify.
968 * auxv.c (info_auxv_command): Constify.
969 * ada-tasks.c (info_tasks_command): Constify.
970 (info_task): Constify.
971 * ada-lang.c (info_exceptions_command): Constify.
972
0b39b52e
TT
9732017-11-07 Tom Tromey <tom@tromey.com>
974
975 * solib.h (no_shared_libraries): Constify.
976 * frame.h (return_command): Constify.
977 * cli/cli-cmds.h (quit_command): Constify.
978 * top.h (quit_command, execute_command): Constify.
979 * target.h (flash_erase_command): Constify.
980 * inferior.h (set_inferior_args, attach_command): Constify.
981 * tracepoint.h (start_tracing, stop_tracing): Constify.
982 * breakpoint.h (break_command, tbreak_command)
983 (hbreak_command_wrapper, thbreak_command_wrapper)
984 (rbreak_command_wrapper, watch_command_wrapper)
985 (awatch_command_wrapper, rwatch_command_wrapper)
986 (get_tracepoint_by_number): Constify.
987 * symtab.c (info_variables_command, rbreak_command)
988 (symtab_symbol_info): Constify.
989 (info_variables_command): Add non-const overload.
990 * top.c (dont_repeat_command): Constify.
991 * breakpoint.c (ignore_command, commands_command)
992 (condition_command, tbreak_command, hbreak_command)
993 (thbreak_command, clear_command, break_command)
994 (info_breakpoints_command, watch_command, rwatch_command)
995 (awatch_command, trace_command, ftrace_command, strace_command)
996 (trace_pass_command, break_range_command, dprintf_command)
997 (agent_printf_command, get_tracepoint_by_number)
998 (watch_maybe_just_location, trace_pass_command): Constify.
999 (info_breakpoints_command): Add non-const overload.
1000 * tracefile.c (tsave_command): Constify.
1001 * infcmd.c (attach_command, disconnect_command, signal_command)
1002 (queue_signal_command, stepi_command, nexti_command)
1003 (finish_command, next_command, step_command, until_command)
1004 (advance_command, jump_command, continue_command, run_command)
1005 (start_command, starti_command, interrupt_command)
1006 (run_command_1, set_inferior_args, step_1): Constify.
1007 * inferior.c (add_inferior_command, remove_inferior_command)
1008 (clone_inferior_command): Constify.
1009 * linux-fork.c (checkpoint_command, restart_command): Constify.
1010 * windows-nat.c (signal_event_command): Constify.
1011 * guile/guile.c (guile_repl_command, guile_command): Constify.
1012 * printcmd.c (x_command, display_command, printf_command)
1013 (output_command, set_command, call_command, print_command)
1014 (eval_command): Constify.
1015 (non_const_set_command): Remove.
1016 (_initialize_printcmd): Update.
1017 * source.c (forward_search_command, reverse_search_command):
1018 Constify.
1019 * jit.c (jit_reader_load_command, jit_reader_unload_command):
1020 Constify.
1021 * infrun.c (handle_command): Constify.
1022 * memattr.c (mem_command): Constify.
1023 * stack.c (return_command, up_command, up_silently_command)
1024 (down_command, down_silently_command, frame_command)
1025 (backtrace_command, func_command, backtrace_command_1): Constify.
1026 (backtrace_command): Add non-const overload.
1027 * remote-sim.c (simulator_command): Constify.
1028 * exec.c (set_section_command): Constify.
1029 * tracepoint.c (tdump_command, trace_variable_command)
1030 (tstatus_command, tstop_command, tstart_command)
1031 (end_actions_pseudocommand, while_stepping_pseudocommand)
1032 (collect_pseudocommand, teval_pseudocommand, actions_command)
1033 (start_tracing, stop_tracing): Constify.
1034 * value.c (init_if_undefined_command): Constify.
1035 * tui/tui-stack.c (tui_update_command): Constify.
1036 * tui/tui-win.c (tui_refresh_all_command)
1037 (tui_set_tab_width_command, tui_set_win_height_command)
1038 (tui_set_focus_command, tui_scroll_forward_command)
1039 (tui_scroll_backward_command, tui_scroll_left_command)
1040 (tui_scroll_right_command, parse_scrolling_args, tui_set_focus)
1041 (tui_set_win_height): Constify.
1042 * tui/tui-layout.c (tui_layout_command): Constify.
1043 * procfs.c (proc_trace_syscalls, proc_trace_sysentry_cmd)
1044 (proc_trace_sysexit_cmd, proc_untrace_sysentry_cmd)
1045 (proc_untrace_sysexit_cmd): Constify.
1046 * remote.c (threadlist_test_cmd, threadinfo_test_cmd)
1047 (threadset_test_cmd, threadlist_update_test_cmd)
1048 (threadalive_test): Constify.
1049 * objc-lang.c (print_object_command): Constify.
1050 * command.h (add_com): Constify.
1051 * cli/cli-dump.c (restore_command): Constify.
1052 * cli/cli-cmds.c (pwd_command, echo_command, quit_command)
1053 (help_command, complete_command, shell_command, edit_command)
1054 (list_command, disassemble_command, make_command)
1055 (apropos_command, alias_command): Constify.
1056 * cli/cli-script.c (document_command, define_command)
1057 (while_command, if_command, validate_comname): Constify.
1058 * cli/cli-decode.c (struct cmd_list_element): Change type of
1059 "fun".
1060 * target.c (do_monitor_command, flash_erase_command): Constify.
1061 * regcache.c (reg_flush_command): Constify.
1062 * reverse.c (reverse_step, reverse_next, reverse_stepi)
1063 (reverse_nexti, reverse_continue, reverse_finish)
1064 (save_bookmark_command, goto_bookmark_command)
1065 (exec_reverse_once): Constify.
1066 * python/python.c (python_interactive_command, python_command):
1067 Constify.
1068 * typeprint.c (ptype_command, whatis_command, whatis_exp):
1069 Constify.
1070 * solib.c (sharedlibrary_command, no_shared_libraries): Constify.
1071 * gcore.c (gcore_command): Constify.
1072
85c4be7c
TT
10732017-11-07 Tom Tromey <tom@tromey.com>
1074
1075 * printcmd.c (x_command): Call set_repeat_arguments.
1076 * cli/cli-cmds.c (list_command): Call set_repeat_arguments.
1077 * top.c (repeat_arguments): New global.
1078 (set_repeat_arguments): New function.
1079 (execute_command): Handle repeat_arguments.
1080 (show_commands): Calls set_repeat_arguments.
1081 * command.h (set_repeat_arguments): Declare.
1082
022643b4
TT
10832017-11-07 Tom Tromey <tom@tromey.com>
1084
1085 * stack.c (backtrace_command): Use std::string.
1086 (backtrace_command_1): Make "count_exp" const.
1087
5614fb77
TT
10882017-11-07 Tom Tromey <tom@tromey.com>
1089
1090 * source.c (directory_switch, mod_path, add_path): Constify.
1091 * defs.h (add_path, mod_path, directory_switch): Constify.
1092 * mi/mi-cmd-env.c (env_mod_path): Constify.
1093
6be9a197
TT
10942017-11-07 Tom Tromey <tom@tromey.com>
1095
1096 * infcmd.c (strip_bg_char): Return gdb::unique_xmalloc_ptr.
1097 (run_command_1, continue_command, step_1, jump_command)
1098 (signal_command, until_command, advance_command, finish_command)
1099 (attach_command): Update.
1100
c2252c0d
TT
11012017-11-07 Tom Tromey <tom@tromey.com>
1102
1103 * command.h (set_cmd_cfunc): Don't declare.
1104 * cli/cli-decode.c (set_cmd_cfunc): Now static.
1105
1ee870c5
TT
11062017-11-07 Tom Tromey <tom@tromey.com>
1107
1108 * stack.c (select_frame_command): Constify.
1109 * cli/cli-decode.c (add_com_suppress_notification): Constify.
1110 * command.h (add_com_suppress_notification): Constify.
1111
ee7ddd71
TT
11122017-11-07 Tom Tromey <tom@tromey.com>
1113
1114 * breakpoint.c (stop_command): Constify.
1115 * cli/cli-decode.c (struct cmd_list_element): Constify.
1116 * command.h (add_abbrev_prefix_cmd): Constify.
1117
95e95a6d
PA
11182017-11-07 Pedro Alves <palves@redhat.com>
1119
1120 * breakpoint.c (extract_bp_kind): New enum.
1121 (extract_bp_num, extract_bp_or_bp_range): New functions, partially
1122 factored out from ...
1123 (extract_bp_number_and_location): ... here.
1124 * cli/cli-utils.c (get_number_trailer): Handle '-$variable'.
1125
cc638e86
PA
11262017-11-07 Pedro Alves <palves@redhat.com>
1127
1128 * breakpoint.c (extract_bp_number_and_location): Change return
1129 type to void. Throw error instead of warning.
1130 (enable_disable_command): Adjust.
1131
d0fe4701
XR
11322017-11-07 Xavier Roirand <roirand@adacore.com>
1133 Pedro Alves <palves@redhat.com>
1134
1135 * breakpoint.c (map_breakpoint_number_range): New, factored out
1136 from ...
1137 (map_breakpoint_numbers): ... here.
1138 (find_location_by_number): Change parameters from string to
1139 breakpoint number and location.
1140 (extract_bp_number_and_location): New function.
1141 (enable_disable_bp_num_loc)
1142 (enable_disable_breakpoint_location_range)
1143 (enable_disable_command): New functions, factored out ...
1144 (enable_command, disable_command): ... these functions, and
1145 adjusted to support ranges.
1146 * NEWS: Document enable/disable breakpoint location range feature.
1147
635dc5b2
LM
11482017-11-06 Luis Machado <luis.machado@linaro.org>
1149
1150 * MAINTAINERS (Write After Approval): Update my e-mail address.
1151
556e5da5
PA
11522017-11-06 Pedro Alves <palves@redhat.com>
1153
1154 * gnu-nat.c (gnu_terminal_init): Delete.
1155 (gnu_target): Don't install gnu_terminal_init.
1156 * inflow.c (child_terminal_init_with_pgrp): Delete, merged with ...
1157 (child_terminal_init): ... this function.
1158
d1928160
PA
11592017-11-06 Pedro Alves <palves@redhat.com>
1160
1161 * common/common.m4 (GDB_AC_COMMON): No longer check termio.h nor
1162 sgtty.h.
1163 * config.in, configure: Regenerate.
1164
6aa899ce
PA
11652017-11-06 Pedro Alves <palves@redhat.com>
1166
1167 * event-top.c: Check SIGTSTP instead of STOP_SIGNAL thoughout.
1168 (async_init_signals): Adjust.
1169 (handle_stop_sig): Rename to ...
1170 (handle_sigtstp): ... this.
1171 (async_stop_sig): Rename to ...
1172 (async_sigtstp_handler): ... this, and delete STOP_SIGNAL !=
1173 SIGTSTP path.
1174 * event-top.h: Move signal.h include to the top. Check SIGTSTP
1175 instead of STOP_SIGNAL thoughout.
1176 (handle_stop_sig): Rename to ...
1177 (handle_sigtstp): ... this.
1178 * top.c (command_line_input): Replace STOP_SIGNAL -> SIGTSTP.
1179
a94799ac
PA
11802017-11-06 Pedro Alves <palves@redhat.com>
1181
1182 * inflow.c (child_terminal_inferior, child_terminal_ours_1): No
1183 longer set flags twice in row.
1184
726e1356
PA
11852017-11-06 Pedro Alves <palves@redhat.com>
1186
1187 * Makefile.in (SER_HARDWIRE): Update comment.
1188 (HFILES_NO_SRCDIR): Remove gdb_termios.h.
1189 * common/gdb_termios.h: Delete file.
1190 * common/job-control.c: Include termios.h and unistd.h instead of
1191 gdb_termios.h.
1192 (gdb_setpgid): Remove HAVE_TERMIOS || TIOCGPGRP preprocessor
1193 check.
1194 (have_job_control): Check HAVE_TERMIOS_H instead of HAVE_TERMIOS.
1195 Remove sgtty code.
1196 * configure.ac: No longer check for termio.h and sgtty.h.
1197 * configure: Regenerate.
1198 * inflow.c: Include termios.h instead of gdb_termios.h. Replace
1199 PROCESS_GROUP_TYPE checks with HAVE_TERMIOS_H checks throughout.
1200 Replace PROCESS_GROUP_TYPE references with pid_t references
1201 throughout.
1202 (gdb_getpgrp): Delete.
1203 (set_initial_gdb_ttystate): Use tcgetpgrp instead of gdb_getpgrp.
1204 (child_terminal_inferior): Remove comment. Remove sgtty code.
1205 (child_terminal_ours_1): Use tcgetpgrp directly instead of
1206 gdb_getpgrp. Use serial_set_tty_state instead aof
1207 serial_noflush_set_tty_state. Remove sgtty code.
1208 * inflow.h: Include unistd.h instead of gdb_termios.h. Replace
1209 PROCESS_GROUP_TYPE check with HAVE_TERMIOS_H check.
1210 (inferior_process_group): Now returns pid_t.
1211 * ser-base.c (ser_base_noflush_set_tty_state): Delete.
1212 * ser-base.h (ser_base_noflush_set_tty_state): Delete.
1213 * ser-event.c (serial_event_ops): Update.
1214 * ser-go32.c (dos_noflush_set_tty_state): Delete.
1215 (dos_ops): Update.
1216 * ser-mingw.c (hardwire_ops, tty_ops, pipe_ops, tcp_ops): Update.
1217 * ser-pipe.c (pipe_ops): Update.
1218 * ser-tcp.c (tcp_ops): Update.
1219 * ser-unix.c: Include termios.h instead of gdb_termios.h. Remove
1220 HAVE_TERMIOS checks.
1221 [HAVE_TERMIO] (struct hardwire_ttystate): Delete.
1222 [HAVE_SGTTY] (struct hardwire_ttystate): Delete.
1223 (get_tty_state, set_tty_state): Drop termio and sgtty code, and
1224 assume termios.
1225 (hardwire_noflush_set_tty_state): Delete.
1226 (hardwire_print_tty_state, hardwire_drain_output)
1227 (hardwire_flush_output, hardwire_flush_input)
1228 (hardwire_send_break, hardwire_raw, hardwire_setbaudrate)
1229 (hardwire_setstopbits, hardwire_setparity): Drop termio and sgtty
1230 code, and assume termios.
1231 (hardwire_ops): Update.
1232 (_initialize_ser_hardwire): Remove HAVE_TERMIOS check.
1233 * serial.c (serial_noflush_set_tty_state): Delete.
1234 * serial.h (serial_noflush_set_tty_state): Delete.
1235 (serial_ops::noflush_set_tty_state): Delete.
1236
1cfb73db
UW
12372017-11-06 Ulrich Weigand <uweigand@de.ibm.com>
1238
1239 * Makefile.in (SFILES): Remove doublest.c and dfp.c.
1240 (HFILES_NO_SRCDIR): Remove doublest.h and dfp.h.
1241 (COMMON_OBS): Remove doublest.o and dfp.o.
1242 Do not build target-float.c (instead of doublest.c)
1243 with -Wformat-nonliteral.
1244
1245 * doublest.c: Remove file.
1246 * doublest.h: Remove file.
1247 * dfp.c: Remove file.
1248 * dfp.h: Remove file.
1249
1250 * target-float.c: Do not include "doublest.h" and "dfp.h".
1251 (DOUBLEST): Move here from doublest.h.
1252 (enum float_kind): Likewise.
1253 (FLOATFORMAT_CHAR_BIT): Likewise.
1254 (FLOATFORMAT_LARGEST_BYTES): Likewise.
1255 (floatformat_totalsize_bytes): Move here from doublest.c. Make static.
1256 (floatformat_precision): Likewise.
1257 (floatformat_normalize_byteorder, get_field, put_field): Likewise.
1258 (floatformat_is_negative, floatformat_classify, floatformat_mantissa):
1259 Likewise.
1260 (host_float_format, host_double_format, host_long_double_format):
1261 Likewise.
1262 (floatformat_to_string, floatformat_from_string): Likewise.
1263 (floatformat_to_doublest): Likewise. Also, inline the original
1264 convert_floatformat_to_doublest.
1265 (floatformat_from_doublest): Likewise. Also, inline the original
1266 convert_floatformat_from_doublest.
1267
1268 Include "dpd/decimal128.h", "dpd/decimal64.h", and "dpd/decimal32.h".
1269 (MAX_DECIMAL_STRING): Move here from dfp.c.
1270 (match_endianness): Likewise.
1271 (set_decnumber_context, decimal_check_errors): Likewise.
1272 (decimal_from_number, decimal_to_number): Likewise.
1273 (decimal_to_string, decimal_from_string): Likewise. Make static.
1274 (decimal_from_longest, decimal_from_ulongest): Likewise.
1275 (decimal_to_longest): Likewise.
1276 (decimal_binop, decimal_is_zero, decimal_compare): Likewise.
1277 (decimal_convert): Likewise.
1278
b07e9c46
UW
12792017-11-06 Ulrich Weigand <uweigand@de.ibm.com>
1280
1281 * doublest.c: Do not include "gdbtypes.h".
1282 (extract_typed_floating): Remove.
1283 (store_typed_floating): Remove.
1284 (convert_typed_floating): Remove.
1285 * doublest.h (struct type): Remove.
1286 (DOUBLEST_PRINT_FORMAT): Remove.
1287 (DOUBLEST_SCAN_FORMAT): Remove.
1288 (extract_typed_floating): Remove.
1289 (store_typed_floating): Remove.
1290 (convert_typed_floating): Remove.
1291
1292 * dfp.c (decimal_from_doublest): Remove.
1293 (decimal_to_doublest): Remove.
1294 * dfp.h: Do not include "doublest.h".
1295 (decimal_from_doublest): Remove.
1296 (decimal_to_doublest): Remove.
1297
1298 * value.c: Do not include "doublest.h" and "dfp.h".
1299 (value_as_double): Remove.
1300 (unpack_double): Remove.
1301 (value_from_double): Remove.
1302 (value_from_decfloat): Remove.
1303 * value.h: Do not include "doublest.h".
1304 (value_as_double): Remove.
1305 (unpack_double): Remove.
1306 (value_from_double): Remove.
1307 (value_from_decfloat): Remove.
1308
3b2ca824
UW
13092017-11-06 Ulrich Weigand <uweigand@de.ibm.com>
1310
1311 * i386-tdep.c: Include "target-float.h". Do not include "doublest.h".
1312 (i386_extract_return_value): Use target_float_convert.
1313 (i386_store_return_value): Likewise.
1314 * i387-tdep.c (i387_register_to_value): Use target_float_convert.
1315 (i387_value_to_register): Likewise.
1316 * ia64-tdep.c: Include "target-float.h". Do not include "doublest.h".
1317 (ia64_register_to_value): Use target_float_convert.
1318 (ia64_value_to_register): Likewise.
1319 (ia64_extract_return_value): Likewise.
1320 (ia64_store_return_value): Likewise.
1321 (ia64_push_dummy_call): Likewise.
1322 * m68k-tdep.c: Include "target-float.h".
1323 (m68k_register_to_value): Use target_float_convert.
1324 (m68k_value_to_register): Likewise.
1325 (m68k_svr4_extract_return_value): Likewise.
1326 (m68k_svr4_store_return_value): Likewise.
1327 * ppc-sysv-tdep.c: Include "target-float.h".
1328 (ppc_sysv_abi_push_dummy_call): Use target_float_convert.
1329 (do_ppc_sysv_return_value): Likewise.
1330 (ppc64_sysv_abi_push_freg): Likewise.
1331 (ppc64_sysv_abi_return_value_base): Likewise.
1332 * rs6000-aix-tdep.c: Include "target-float.h".
1333 (rs6000_push_dummy_call): Use target_float_convert.
1334 (rs6000_return_value): Likewise.
1335 * rs6000-lynx178-tdep.c: Include "target-float.h".
1336 (rs6000_lynx178_push_dummy_call): Use target_float_convert.
1337 (rs6000_lynx178_return_value): Likewise.
1338 * rs6000-tdep.c: Include "target-float.h". Do not include "doublest.h".
1339 (rs6000_register_to_value): Use target_float_convert.
1340 (rs6000_value_to_register): Likewise.
1341 * arm-tdep.c: Include "target-float.h". Do not include "doublest.h".
1342 (arm_extract_return_value): Use target_float_convert.
1343 (arm_store_return_value): Likewise.
1344 * sh-tdep.c: Include "target-float.h". Do not include "doublest.h".
1345 (sh_register_convert_to_virtual): Use target_float_convert.
1346 (sh_register_convert_to_raw): Likewise.
1347 * sh64-tdep.c: Include "target-float.h".
1348 (sh64_extract_return_value): Use target_float_convert.
1349 (sh64_register_convert_to_virtual): Likewise.
1350 (sh64_register_convert_to_raw): Likewise. Fix argument types.
1351
14ad9311
UW
13522017-11-06 Ulrich Weigand <uweigand@de.ibm.com>
1353
1354 * target-float.c (floatformat_to_host_double): New function.
1355 (floatformat_from_host_double): Likewise.
1356 (target_float_to_host_double): Likewise.
1357 (target_float_from_host_double): Likewise.
1358 * target-float.h (target_float_to_host_double): Add prototype.
1359 (target_float_from_host_double): Likewise.
1360
1361 * guile/scm-value.c: Include "target-float.h".
1362 (gdbscm_value_to_real): Use target_float_to_host_double.
1363 Handle integer source values via value_as_long.
1364 * guile/scm-math.c: Include "target-float.h". Do not include
1365 "doublest.h", "dfp.h", and "expression.h".
1366 (vlscm_convert_typed_number): Use target_float_from_host_double.
1367 (vlscm_convert_number): Likewise.
1368
1369 * python/py-value.c (valpy_float): Use target_float_to_host_double.
1370 (convert_value_from_python): Use target_float_from_host_double.
1371
50eff16b
UW
13722017-11-06 Ulrich Weigand <uweigand@de.ibm.com>
1373
1374 * ada-lang.c (cast_to_fixed): Reimplement in target arithmetic.
1375 (cast_from_fixed): Likewise.
1376 (ada_scaling_type): New function.
1377 (ada_delta): Return value instead of DOUBLEST. Perform target
1378 arithmetic instead of host arithmetic.
1379 (scaling_factor): Rename to ...
1380 (ada_scaling_factor) ... this. Make non-static. Return value instead
1381 of DOUBLEST. Perform target arithmetic instead of host arithmetic.
1382 (ada_fixed_to_float): Remove.
1383 (ada_float_to_fixed): Remove.
1384 * ada-lang.h (ada_fixed_to_float): Remove.
1385 (ada_float_to_fixed): Remove.
1386 (ada_delta): Return value instead of DOUBLEST.
1387 (ada_scaling_factor): Add prototype.
1388
1389 * ada-typeprint.c: Include "target-float.h".
1390 (print_fixed_point_type): Perform target arithmetic instead of
1391 host arithmetic.
1392 * ada-valprint.c: Include "target-float.h".
1393 (ada_val_print_num): Perform target arithmetic instead of
1394 host arithmetic for fixed-point types.
1395
66c02b9e
UW
13962017-11-06 Ulrich Weigand <uweigand@de.ibm.com>
1397
1398 * target-float.c: Include <math.h>.
1399 (floatformat_binop): New function.
1400 (floatformat_compare): Likewise.
1401 (target_float_binop): Likewise.
1402 (target_float_compare): Likewise.
1403 * target-float.h: Include "expression.h".
1404 (target_float_binop): Add prototype.
1405 (target_float_compare): Likewise.
1406
1407 * valarith.c: Do not include "doublest.h" and "dfp.h".
1408 Include "common/byte-vector.h".
1409 (value_args_as_decimal): Remove, replace by ...
1410 (value_args_as_target_float): ... this function. Handle both
1411 binary and decimal target floating-point formats.
1412 (scalar_binop): Handle both binary and decimal FP using
1413 value_args_as_target_float and target_float_binop.
1414 (value_equal): Handle both binary and decimal FP using
1415 value_args_as_target_float and target_float_compare.
1416 (value_less): Likewise.
1417 (value_pos): Handle all scalar types as simple copy.
1418 (value_neg): Handle all scalar types via BINOP_SUB from 0.
1419 * dfp.c (decimal_binop): Throw error instead of internal_error
1420 when called with an unsupported operation code.
1421
f69fdf9b
UW
14222017-11-06 Ulrich Weigand <uweigand@de.ibm.com>
1423
1424 * target-float.c (target_float_to_string): New function.
1425 (target_float_from_string): New function.
1426 * target-float.h (target_float_to_string): Add prototype.
1427 (target_float_from_string): Add prototype.
1428
1429 * valprint.c: Include "target-float.h". Do not include
1430 "doublest.h" and "dfp.h".
1431 (print_floating): Use target_float_to_string.
1432 * printcmd.c: Include "target-float.h". Do not include "dfp.h".
1433 (printf_floating): Use target_float_to_string.
1434 * i387-tdep.c: Include "target-float.h". Do not include "doublest.h".
1435 (print_i387_value): Use target_float_to_string.
1436 * mips-tdep.c: Include "target-float.h".
1437 (mips_print_fp_register): Use target_float_to_string.
1438 * sh64-tdep.c: Include "target-float.h".
1439 (sh64_do_fp_register): Use target_float_to_string.
1440
1441 * parse.c: Include "target-float.h". Do not include
1442 "doublest.h" and "dfp.h".
1443 (parse_float): Use target_float_from_string.
1444 * stabsread.c: Include "target-float.h". Do not include "doublest.h".
1445 (define_symbol): Use target_float_from_string.
1446 * gdbarch-selftests.c: Include "target-float.h".
1447 (register_to_value_test): Use target_float_from_string.
1448
70100014
UW
14492017-11-06 Ulrich Weigand <uweigand@de.ibm.com>
1450
1451 * Makefile.c (SFILES): Add target-float.c.
1452 (HFILES_NO_SRCDIR): Add target-float.h.
1453 (COMMON_OBS): Add target-float.o.
1454 * target-float.h: New file.
1455 * target-float.c: New file.
1456
1457 * doublest.c (floatformat_classify): Fix detection of float_zero.
1458
1459 * gdbtypes.c (is_floating_type): New function.
1460 * gdbtypes.h (is_floating_type): Add prototype.
1461
1462 * value.c: Do not include "floatformat.h".
1463 (unpack_double): Use target_float_is_valid.
1464 (is_floating_value): New function.
1465 * value.h (is_floating_value): Add prototype-
1466
1467 * valarith.c: Include "target-float.h".
1468 (value_logical_not): Use target_float_is_zero.
1469
1470 * python/py-value.c: Include "target-float.h".
1471 (valpy_nonzero): Use target_float_is_zero.
1472
ab4b1c46
TT
14732017-11-04 Tom Tromey <tom@tromey.com>
1474
1475 * h8300-tdep.c (h8300_push_dummy_call): Use std::vector.
1476
454dafbd
TT
14772017-11-04 Tom Tromey <tom@tromey.com>
1478
1479 * breakpoint.c (set_momentary_breakpoint): Return
1480 breakpoint_up.
1481 (until_break_command): Update.
1482 (new_until_break_fsm): Change argument types to
1483 breakpoint_up.
1484 (set_momentary_breakpoint_at_pc): Return breakpoint_up.
1485 (do_delete_breakpoint_cleanup, make_cleanup_delete_breakpoint):
1486 Remove.
1487 * infcmd.c (finish_forward): Update.
1488 * breakpoint.h (set_momentary_breakpoint)
1489 (set_momentary_breakpoint_at_pc): Return breakpoint_up.
1490 (make_cleanup_delete_breakpoint): Remove.
1491 (struct breakpoint_deleter): New.
1492 (breakpoint_up): New typedef.
1493 * infrun.c (insert_step_resume_breakpoint_at_sal_1): Update.
1494 (insert_exception_resume_breakpoint): Update.
1495 (insert_exception_resume_from_probe): Update.
1496 (insert_longjmp_resume_breakpoint): Update.
1497 * arm-linux-tdep.c (arm_linux_copy_svc): Update.
1498 * elfread.c (elf_gnu_ifunc_resolver_stop): Update.
1499 * infcall.c (call_function_by_hand_dummy): Update
1500
331b71e5
TT
15012017-11-04 Tom Tromey <tom@tromey.com>
1502
1503 * c-typeprint.c (c_type_print_base): Use gdb::unique_xmalloc_ptr.
1504
9f584b37
TT
15052017-11-04 Tom Tromey <tom@tromey.com>
1506
1507 * linux-tdep.c (linux_core_info_proc_mappings): Use
1508 gdb::def_vector.
1509 (linux_get_siginfo_data): Return gdb::byte_vector. Remove
1510 "size" argument.
1511 (linux_corefile_thread): Update.
1512 (linux_make_corefile_notes): Remove unused variable.
1513
779bc38e
TT
15142017-11-04 Tom Tromey <tom@tromey.com>
1515
1516 * ppc-linux-tdep.c (ppc_linux_get_syscall_number): Use
1517 gdb::byte_vector.
1518
ed2b3126
TT
15192017-11-04 Tom Tromey <tom@tromey.com>
1520
1521 * objfiles.c (do_free_objfile_cleanup): Remove.
1522 * compile/compile-object-load.c (compile_object_load): Update.
1523 * objfiles.h (make_cleanup_free_objfile): Remove.
1524
7f6743fd
TT
15252017-11-04 Tom Tromey <tom@tromey.com>
1526
1527 * sparc64-tdep.c (do_examine): Use gdb::def_vector.
1528 (adi_read_versions): Change "tags" to "gdb_byte *".
1529 (adi_print_versions): Likewise.
1530
c80049d3
TT
15312017-11-04 Tom Tromey <tom@tromey.com>
1532
1533 * breakpoint.c
1534 (scoped_rbreak_breakpoints::scoped_rbreak_breakpoints): Rename
1535 from start_rbreak_breakpoints.
1536 (scoped_rbreak_breakpoints): Rename from end_rbreak_breakpoints.
1537 * breakpoint.h (class scoped_rbreak_breakpoints): New.
1538 (start_rbreak_breakpoints, end_rbreak_breakpoints): Remove.
1539 * symtab.c (do_end_rbreak_breakpoints): Remove.
1540 (rbreak_command): Use scoped_rbreak_breakpoints, std::string.
1541
167b0be1
TT
15422017-11-04 Tom Tromey <tom@tromey.com>
1543
1544 * cp-namespace.c (reset_directive_searched): Remove.
1545 (cp_lookup_symbol_via_imports): Use scoped_restore.
1546 * cp-support.c (reset_directive_searched): Remove.
1547 (make_symbol_overload_list_using): Use scoped_restore.
1548 * d-namespace.c (d_lookup_symbol_imports): Use scoped_restore.
1549 (reset_directive_searched): Remove.
1550
5eae7aea
TT
15512017-11-04 Tom Tromey <tom@tromey.com>
1552
1553 * symfile.c (find_separate_debug_file_by_debuglink): Use
1554 unique_xmalloc_ptr.
1555
c6bcad5f
TT
15562017-11-04 Tom Tromey <tom@tromey.com>
1557
1558 * compile/compile-loc2c.c (compute_stack_depth_worker): Change
1559 type of "info".
1560 (compute_stack_depth): Likewise.
1561 (do_compile_dwarf_expr_to_c): Use std::vector.
1562
20dcd8ca
TT
15632017-11-04 Tom Tromey <tom@tromey.com>
1564
1565 * compile/compile-object-load.c (link_callbacks_einfo): Use
1566 std::string.
1567
33c7c59d
TT
15682017-11-04 Tom Tromey <tom@tromey.com>
1569
1570 * dwarf2read.c (process_full_comp_unit, process_full_type_unit):
1571 Use scoped_free_pendings.
1572 * dbxread.c (dbx_symfile_read, dbx_psymtab_to_symtab_1): Use
1573 scoped_free_pendings.
1574 * xcoffread.c (xcoff_psymtab_to_symtab_1): Use scoped_free_pendings.
1575 (xcoff_initial_scan): Likewise.
1576 * buildsym.c (reset_symtab_globals): Update comment.
1577 (scoped_free_pendings): Rename from really_free_pendings.
1578 (prepare_for_building): Update comment.
1579 (buildsym_init): Likewise.
1580 * buildsym.h (class scoped_free_pendings): New class.
1581 (really_free_pendings): Don't declare.
1582
67fa57cf
UW
15832017-11-03 Ulrich Weigand <uweigand@de.ibm.com>
1584
1585 * doublest.c (convert_doublest_to_floatformat): Fix uninitialized
1586 output when converting a zero value to a special byteorder format.
1587
f26ae15b
YQ
15882017-11-02 Yao Qi <yao.qi@linaro.org>
1589
1590 * frame.c (do_frame_register_read): Remove aspace.
1591 * jit.c (jit_frame_sniffer): Likwise.
1592 * ppc-linux-tdep.c (ppu2spu_sniffer): Likewise.
1593 * regcache.c (regcache::regcache): Pass nullptr.
1594 (regcache_print): Caller updated.
1595 * regcache.h (regcache::regcache): Remove one constructor
1596 parameter aspace.
1597
6c6e9412
YQ
15982017-11-02 Yao Qi <yao.qi@linaro.org>
1599
1600 * regcache.h (regcache) <m_readonly_p>: Change it to const bool.
1601
8b86c959
YQ
16022017-11-02 Yao Qi <yao.qi@linaro.org>
1603
1604 * breakpoint.c (insert_single_step_breakpoints): Update.
1605 * frame.c (struct frame_info) <aspace>: Add const.
1606 (frame_save_as_regcache): Add const.
1607 (get_frame_address_space): Return const address_space *.
1608 * frame.h (get_frame_address_space): Update declaration.
1609 * infrun.c (struct step_over_info) <aspace>: Add const.
1610 (set_step_over_info): Make aspace const.
1611 (displaced_step_prepare_throw): Change variable const.
1612 (resume): Likewise.
1613 (proceed): Likewise.
1614 (adjust_pc_after_break): Likewise.
1615 (save_waitstatus): Likewise.
1616 (handle_signal_stop): Likewise.
1617 (keep_going_pass_signal): Likewise.
1618 * jit.c (jit_frame_sniffer): Add const.
1619 * mips-tdep.c (mips_single_step_through_delay): Likewise.
1620 * ppc-linux-tdep.c (ppu2spu_sniffer): Likewise.
1621 * record-full.c (record_full_wait_1): Likewise.
1622 * regcache.c (regcache::regcache): Change parameter to const.
1623 * regcache.h (regcache::regcache): Likewise.
1624 (regcache::aspace): Return const address_space *.
1625 (regcache) <m_aspace>: Add const.
1626
a01bda52
YQ
16272017-11-02 Yao Qi <yao.qi@linaro.org>
1628
1629 * darwin-nat.c (cancel_breakpoint): Use regcache->aspace ().
1630 * frame.c (create_sentinel_frame): Likewise.
1631 * infrun.c (displaced_step_prepare_throw): Likewise.
1632 (resume): Likewise.
1633 (thread_still_needs_step_over_bp): Likewise.
1634 (proceed): Likewise.
1635 (do_target_wait): Likewise.
1636 (adjust_pc_after_break): Likewise.
1637 (handle_syscall_event): Likewise.
1638 (save_waitstatus): Likewise.
1639 (handle_inferior_event_1): Likewise.
1640 (handle_signal_stop): Likewise.
1641 (keep_going_pass_signal): Likewise.
1642 * linux-nat.c (status_callback): Likewise.
1643 (save_stop_reason): Likewise.
1644 (resume_stopped_resumed_lwps): Likewise.
1645 * record-full.c (record_full_exec_insn): Likewise.
1646 (record_full_wait_1): Likewise.
1647 * regcache.c (get_regcache_aspace): Remove.
1648 * regcache.h (get_regcache_aspace): Remove.
1649
d999647b
YQ
16502017-11-02 Yao Qi <yao.qi@linaro.org>
1651
1652 * regcache.c (struct regcache_descr) <nr_raw_registers>: Remove.
1653 (init_regcache_descr): Use gdbarch_num_regs.
1654 (regcache::regcache): Likewise.
1655 (regcache::get_register_status): Likewise.
1656 (regcache::assert_raw_regnum): Likewise.
1657 (regcache::cooked_read): Likewise.
1658 (regcache::cooked_read_value): Likewise.
1659 (regcache::cooked_write): Likewise.
1660 (regcache::dump): Likewise.
1661 (regcache::num_raw_registers): New method.
1662 * regcache.h (class regcache) <num_raw_registers>: New.
1663
4e888c28
YQ
16642017-11-02 Yao Qi <yao.qi@linaro.org>
1665
1666 * regcache.c (regcache::assert_regnum): New method.
1667 (regcache::invalidate): Call assert_regnum.
1668 (regcache::raw_update): Likewise.
1669 (regcache::raw_write): Likewise.
1670 (regcache::raw_read_part): Likewise.
1671 (regcache::raw_write_part): Likewise.
1672 (regcache::raw_supply): Likewise.
1673 (regcache::raw_supply_integer): Likewise.
1674 (regcache::raw_supply_zeroed): Likewise.
1675 (regcache::raw_collect): Likewise.
1676 (regcache::raw_collect_integer): Likewise.
1677 * regcache.h (regcache::assert_regnum): Declare.
1678
2e1b49b3
YQ
16792017-11-02 Yao Qi <yao.qi@linaro.org>
1680
1681 * regcache.c (regcache::dump): Remove code.
1682
6c5218df
YQ
16832017-11-02 Yao Qi <yao.qi@linaro.org>
1684
1685 * regcache.c (struct regcache_descr) <sizeof_raw_register_status>:
1686 Remove.
1687 <sizeof_cooked_register_status>: Remove.
1688 (init_regcache_descr): Update.
1689 (regcache::regcache): Use nr_cooked_registers and nr_raw_registers.
1690 (regcache::save): Likewise.
1691 (regcache::dump): Likewise.
1692
dcc31d28
JB
16932017-11-01 James Bowman <james.bowman@ftdichip.com>
1694
1695 * ft32-tdep.c (ft32_fetch_instruction): New function.
1696 (ft32_analyze_prologue): Use ft32_fetch_instruction().
1697
3a87ae65
SM
16982017-10-31 Simon Marchi <simon.marchi@polymtl.ca>
1699
1700 * cli/cli-script.c (execute_control_command): Rename to ...
1701 (execute_control_command_1): ... this.
1702 (execute_control_command): New function.
1703
09b847f3
SM
17042017-10-31 Simon Marchi <simon.marchi@ericsson.com>
1705
1706 * tracepoint.c (tfind_command): Remove const_cast.
1707
f871c485
MG
17082017-10-30 Mike Gulick <mgulick@mathworks.com>
1709
1710 * Makefile.in (HFILES_NO_SRCDIR): Remove reference to gdb.h.
1711
b020ff80
SM
17122017-10-30 Simon Marchi <simon.marchi@ericsson.com>
1713
1714 * common/common-utils.h (in_inclusive_range): New function.
1715 * arm-tdep.c (arm_record_extension_space): Use
1716 in_inclusive_range.
1717 (thumb_record_ld_st_reg_offset): Use in_inclusive_range.
1718 * cris-tdep.c (cris_spec_reg_applicable): Use
1719 in_inclusive_range.
1720
1b81856f
PA
17212017-10-30 Pedro Alves <palves@redhat.com>
1722 Simon Marchi <simon.marchi@ericsson.com>
1723
1724 * remote.c (remote_set_syscall_catchpoint): Build a std::string
1725 instead of a gdb::unique_xmalloc_ptr, using string_appendf.
1726
31b833b3
PA
17272017-10-30 Pedro Alves <palves@redhat.com>
1728
1729 * common/common-utils.c (string_appendf, string_vappendf): New
1730 functions.
1731 * common/common-utils.h (string_appendf, string_vappendf): New
1732 declarations.
1733 * unittests/common-utils-selftests.c (string_appendf_func)
1734 (test_appendf_func, string_vappendf_wrapper, string_appendf_tests)
1735 (string_vappendf_tests): New functions.
1736 (_initialize_common_utils_selftests): Register "string_appendf" and
1737 "string_vappendf tests".
1738
4a250334
PA
17392017-10-30 Pedro Alves <palves@redhat.com>
1740
1741 * unittests/common-utils-selftests.c (format_func): New typedef.
1742 (string_printf_tests, string_vprintf_tests): Tests factored out
1743 and merged to ...
1744 (test_format_func): ... this new function.
1745 (string_printf_tests, string_vprintf_tests): Reimplement on top of
1746 test_format_func.
1747
16c5c17e
SM
17482017-10-29 Simon Marchi <simon.marchi@ericsson.com>
1749
1750 * darwin-nat.c: Remove include of gdb.h.
1751
7ca51576
SM
17522017-10-29 Simon Marchi <simon.marchi@ericsson.com>
1753
1754 * xtensa-xtregs.c: Fix formatting issues.
1755
c1342859
SM
17562017-10-29 Simon Marchi <simon.marchi@ericsson.com>
1757
1758 * xtensa-xtregs.c (xtensa_regtable_t) <name>: Constify.
1759
484d8d36
MD
17602017-10-28 Maksim Dzabraev <dzabraew@gmail.com>
1761
1762 PR python/21213
1763 * python/py-infthread.c (thpy_get_inferior): Increment reference
1764 of inferior before returning it.
1765
b5540b5f
SM
17662017-10-27 Simon Marchi <simon.marchi@ericsson.com>
1767
1768 * unittests/common-utils-selftests.c (format): Add
1769 ATTRIBUTE_PRINTF.
1770
5a9dcda1
SM
17712017-10-27 Simon Marchi <simon.marchi@polymtl.ca>
1772
1773 * xml-syscall.c (struct syscall_desc): Add constructor.
1774 <name>: Change type to std::string.
1775 (syscall_desc_up): New typedef.
1776 (syscall_desc_p): Remove typeder.
1777 (DEF_VEC_P(syscall_desc_p)): Remove.
1778 (struct syscall_group_desc): Add constructor.
1779 <name>: Change type to std::string.
1780 <syscalls>: Change type to std::vector.
1781 (syscall_group_desc_up): New typedef.
1782 (syscall_group_desc_p): Remove typedef.
1783 (DEF_VEC_P(syscall_group_desc_p)): Remove.
1784 (struct syscalls_info) <syscalls>: Change type to std::vector of
1785 unique_ptr.
1786 <groups>: Likewise.
1787 <my_gdb_datadir>: Change type to std::string.
1788 (syscalls_info_up): New typedef.
1789 (allocate_syscalls_info): Remove.
1790 (syscalls_info_free_syscalls_desc): Remove.
1791 (syscalls_info_free_syscall_group_desc): Remove.
1792 (free_syscalls_info): Remove.
1793 (make_cleanup_free_syscalls_info): Remove.
1794 (syscall_group_create_syscall_group_desc): Adjust.
1795 (syscall_group_add_syscall): Adjust.
1796 (syscall_create_syscall_desc): Adjust.
1797 (syscall_parse_xml): Adjust, use unique_ptr instead of cleanup.
1798 (init_syscalls_info): Adjust.
1799 (syscall_group_get_group_by_name): Adjust.
1800 (xml_get_syscall_number): Adjust.
1801 (xml_get_syscall_name): Adjust.
1802 (xml_list_of_syscalls): Adjust.
1803 (xml_list_syscalls_by_group): Adjust.
1804 (xml_list_of_groups): Adjust.
1805
45461e0d
SM
18062017-10-27 Simon Marchi <simon.marchi@ericsson.com>
1807
1808 * probe.h: Don't include gdb_vecs.h.
1809 (DEF_VEC_P (probe_p)): Remove.
1810 (find_probes_in_objfile): Return an std::vector.
1811 * probe.c (find_probes_in_objfile): Likewise.
1812 * breakpoint.c (breakpoint_objfile_data)
1813 <longjmp_probes>: Change type to std::vector.
1814 <exception_probes>: Likewise.
1815 (free_breakpoint_probes): Don't manually free vectors.
1816 (create_longjmp_master_breakpoint): Adjust.
1817 (create_exception_master_breakpoint): Adjust.
1818 * solib-svr4.c (svr4_create_probe_breakpoints): Change
1819 parameter type, adjust.
1820 (svr4_create_solib_event_breakpoints): Adjust.
1821
43dce439
SM
18222017-10-27 Simon Marchi <simon.marchi@ericsson.com>
1823
1824 * breakpoint.c (breakpoint_objfile_data): Initialize fields.
1825 (get_breakpoint_objfile_data): Allocate breakpoint_objfile_data
1826 with new.
1827 (free_breakpoint_probes): Rename to ...
1828 (free_breakpoint_objfile_data): ... this, and call delete on
1829 bp_objfile_data..
1830
6a1b9516
SM
18312017-10-27 Simon Marchi <simon.marchi@polymtl.ca>
1832
1833 * auto-load.c: Don't include gdb_vecs.h, include algorithm.
1834 (loaded_script_ptr): Remove typedef.
1835 (DEF_VEC_P (loaded_script_ptr)): Remove.
1836 (struct collect_matching_scripts_data): Add constructor.
1837 <scripts_p>: Change type to (pointer to) std::vector.
1838 (collect_matching_scripts_data): Adjust.
1839 (sort_scripts_by_name): Make suitable for std::sort.
1840 (print_scripts): Don't sort vector, adjust to std::vector.
1841 (auto_load_info_scripts): Sort vectors, adjust to std::vector.
1842
593e3209
SM
18432017-10-27 Simon Marchi <simon.marchi@ericsson.com>
1844
1845 * symfile.c (filename_language): Make struct, not typedef. Add
1846 constructor.
1847 <ext>: Change type to std::string.
1848 (DEF_VEC_O (filename_language)): Remove.
1849 (filename_language_table): Change type to std::vector.
1850 (add_filename_language): Adjust.
1851 (set_ext_lang_command): Adjust.
1852 (info_ext_lang_command): Adjust.
1853 (deduce_language_from_filename): Adjust.
1854 (class scoped_restore_filename_language_table): Remove.
1855 (test_filename_language): Use scoped_restore.
1856 (test_set_ext_lang_command): Use scoped_restore, adjust to
1857 std::vector change.
1858
32fa66eb
SM
18592017-10-27 Simon Marchi <simon.marchi@ericsson.com>
1860
1861 * symfile.c: Include selftest.h.
1862 (class scoped_restore_filename_language_table): New.
1863 (test_filename_language): New test.
1864 (test_set_ext_lang_command): New test.
1865 (_initialize_symfile): Register tests.
1866
4a27f119
KS
18672017-10-27 Keith Seitz <keiths@redhat.com>
1868
1869 * breakpoint.c (print_breakpoint_location): Use the symbol saved
1870 in the bp_location, falling back to find_pc_sect_function when
1871 needed.
1872 (add_location_to_breakpoint): Save sal->symbol.
1873 * breakpoint.h (struct bp_location) <symbol>: New field.
1874 * symtab.c (find_function_start_sal): Save the symbol into the SaL.
1875 * symtab.h (struct symtab_and_line) <symbol>: New field.
1876
a43f3893
PF
18772017-10-26 Patrick Frants <osscontribute@gmail.com>
1878
7453e6b2 1879 PR gdb/13669
a43f3893
PF
1880 * cp-valprint.c (cp_print_value_fields): Use obstack_blank_fast
1881 to rewind obstack.
1882
23cc4e1b
PA
18832017-10-26 Pedro Alves <palves@redhat.com>
1884
1885 * remote.c (remote_async_terminal_ours_p): Delete.
1886 (remote_open_1, remote_terminal_inferior, remote_terminal_ours):
1887 Remove references to 'remote_async_terminal_ours_p'.
1888
6abc18bb
YQ
18892017-10-26 Yao Qi <yao.qi@linaro.org>
1890
1891 * breakpoint.h (regular_breakpoint_inserted_here_p): Remove.
1892
bd522513
YQ
18932017-10-26 Yao Qi <yao.qi@linaro.org>
1894
1895 * break-catch-sig.c (signal_catchpoint_breakpoint_hit): Make
1896 aspace const.
1897 * break-catch-syscall.c (breakpoint_hit_catch_syscall):
1898 Likewise.
1899 * breakpoint.c (bpstat_check_location): Remove cast.
1900 (breakpoint_hit_catch_fork): Make aspce const.
1901 (breakpoint_hit_catch_solib): Likewise.
1902 (breakpoint_hit_catch_exec): Likewise.
1903 (breakpoint_hit_ranged_breakpoint): Likewise.
1904 (breakpoint_hit_watchpoint): Likewise.
1905 (base_breakpoint_breakpoint_hit): Likewise.
1906 (bkpt_breakpoint_hit): Likewise.
1907 (dprintf_breakpoint_hit): Likewise.
1908 (tracepoint_breakpoint_hit): Likewise.
1909 * breakpoint.h (breakpoint_ops) <breakpoint_hit>: Likewise.
1910
accd0bcd
YQ
19112017-10-26 Yao Qi <yao.qi@linaro.org>
1912
1913 * breakpoint.c (breakpoint_location_address_match): Change
1914 "struct address_space *" to "const address_space".
1915 (breakpoint_location_address_range_overlap): Likewise.
1916 (breakpoint_here_p): Likewise.
1917 (breakpoint_in_range_p): Likewise.
1918 (moribund_breakpoint_here_p): Likewise.
1919 (bp_location_inserted_here_p): Likewise.
1920 (software_breakpoint_inserted_here_p): Likewise.
1921 (hardware_breakpoint_inserted_here_p): Likewise.
1922 (hardware_watchpoint_inserted_in_range): Likewise.
1923 (bpstat_check_location): Likewise.
1924 (bpstat_stop_status): Likewise.
1925 (breakpoint_address_match): Likewise.
1926 (breakpoint_address_match_range): Likewise.
1927 (breakpoint_location_address_match): Likewise.
1928 (breakpoint_location_address_range_overlap): Likewise.
1929 (insert_single_step_breakpoint): Likewise.
1930 (breakpoint_has_location_inserted_here): Likewise.
1931 (single_step_breakpoint_inserted_here_p): Likewise.
1932 (pc_at_non_inline_function): Likewise.
1933 * breakpoint.h (bpstat_stop_status): Update declaration.
1934 (breakpoint_here_p): Likewise.
1935 (breakpoint_in_range_p): Likewise.
1936 (moribund_breakpoint_here_p): Likewise.
1937 (breakpoint_inserted_here_p): Likewise.
1938 (software_breakpoint_inserted_here_p): Likewise.
1939 (hardware_breakpoint_inserted_here_p): Likewise.
1940 (breakpoint_has_location_inserted_here): Likewise.
1941 (single_step_breakpoint_inserted_here_p): Likewise.
1942 (hardware_watchpoint_inserted_in_range): Likewise.
1943 (breakpoint_address_match): Likewise.
1944 (insert_single_step_breakpoint): Likewise.
1945 (pc_at_non_inline_function): Likewise.
1946 * gdbthread.h (thread_has_single_step_breakpoint_here): Likewise.
1947 * record.c (record_check_stopped_by_breakpoint): Likewise.
1948 * record.h (record_check_stopped_by_breakpoint): Likewise.
1949 * thread.c (thread_has_single_step_breakpoint_here): Likewise.
1950
ac7936df
YQ
19512017-10-25 Yao Qi <yao.qi@linaro.org>
1952
1953 * aarch32-linux-nat.c (aarch32_gp_regcache_supply): Use
1954 regcache->arch () instead get_regcache_arch.
1955 * aarch64-fbsd-nat.c (aarch64_fbsd_fetch_inferior_registers):
1956 Likewise.
1957 (aarch64_fbsd_store_inferior_registers): Likewise.
1958 * aarch64-linux-nat.c (fetch_gregs_from_thread): Likewise.
1959 (store_gregs_to_thread): Likewise.
1960 (fetch_fpregs_from_thread): Likewise.
1961 (store_fpregs_to_thread): Likewise.
1962 * aarch64-tdep.c (aarch64_extract_return_value): Likewise.
1963 (aarch64_store_return_value): Likewise.
1964 (aarch64_software_single_step): Likewise.
1965 * aix-thread.c (aix_thread_wait): Likewise.
1966 (supply_reg32): Likewise.
1967 (supply_sprs64): Likewise.
1968 (supply_sprs32): Likewise.
1969 (fill_gprs64): Likewise.
1970 (fill_gprs32): Likewise.
1971 (fill_sprs64): Likewise.
1972 (fill_sprs32): Likewise.
1973 (store_regs_user_thread): Likewise.
1974 (store_regs_kernel_thread): Likewise.
1975 * alpha-bsd-nat.c (alphabsd_fetch_inferior_registers): Likewise.
1976 (alphabsd_store_inferior_registers): Likewise.
1977 * alpha-tdep.c (alpha_extract_return_value): Likewise.
1978 (alpha_store_return_value): Likewise.
1979 (alpha_deal_with_atomic_sequence): Likewise.
1980 (alpha_next_pc): Likewise.
1981 (alpha_software_single_step): Likewise.
1982 * amd64-bsd-nat.c (amd64bsd_fetch_inferior_registers): Likewise.
1983 (amd64bsd_store_inferior_registers): Likewise.
1984 * amd64-linux-nat.c (amd64_linux_fetch_inferior_registers):
1985 Likewise.
1986 (amd64_linux_store_inferior_registers): Likewise.
1987 * amd64-nat.c (amd64_supply_native_gregset): Likewise.
1988 (amd64_collect_native_gregset): Likewise.
1989 * amd64-obsd-tdep.c (amd64obsd_supply_uthread): Likewise.
1990 (amd64obsd_collect_uthread): Likewise.
1991 * amd64-tdep.c (amd64_supply_fpregset): Likewise.
1992 (amd64_collect_fpregset): Likewise.
1993 (amd64_supply_fxsave): Likewise.
1994 (amd64_supply_xsave): Likewise.
1995 (amd64_collect_fxsave): Likewise.
1996 (amd64_collect_xsave): Likewise.
1997 * arc-tdep.c (arc_write_pc): Likewise.
1998 * arch-utils.c (default_skip_permanent_breakpoint): Likewise.
1999 * arm-fbsd-nat.c (arm_fbsd_fetch_inferior_registers): Likewise.
2000 (arm_fbsd_store_inferior_registers): Likewise.
2001 * arm-linux-nat.c (fetch_vfp_regs): Likewise.
2002 (store_vfp_regs): Likewise.
2003 (arm_linux_fetch_inferior_registers): Likewise.
2004 (arm_linux_store_inferior_registers): Likewise.
2005 * arm-linux-tdep.c (arm_linux_supply_gregset): Likewise.
2006 (arm_linux_sigreturn_next_pc): Likewise.
2007 (arm_linux_get_next_pcs_syscall_next_pc): Likewise.
2008 * arm-nbsd-nat.c (arm_supply_gregset): Likewise.
2009 (fetch_register): Likewise.
2010 (store_register): Likewise.
2011 * arm-tdep.c (arm_is_thumb): Likewise.
2012 (displaced_in_arm_mode): Likewise.
2013 (bx_write_pc): Likewise.
2014 (arm_get_next_pcs_addr_bits_remove): Likewise.
2015 (arm_software_single_step): Likewise.
2016 (arm_extract_return_value): Likewise.
2017 (arm_store_return_value): Likewise.
2018 (arm_write_pc): Likewise.
2019 * bfin-tdep.c (bfin_extract_return_value): Likewise.
2020 * bsd-uthread.c (bsd_uthread_fetch_registers): Likewise.
2021 (bsd_uthread_store_registers): Likewise.
2022 * core-regset.c (fetch_core_registers): Likewise.
2023 * corelow.c (get_core_registers): Likewise.
2024 * cris-tdep.c (cris_store_return_value): Likewise.
2025 (cris_extract_return_value): Likewise.
2026 (find_step_target): Likewise.
2027 (find_step_target): Likewise.
2028 (cris_software_single_step): Likewise.
2029 * ctf.c (ctf_fetch_registers): Likewise.
2030 * darwin-nat.c (cancel_breakpoint): Likewise.
2031 * fbsd-tdep.c (fbsd_collect_thread_registers): Likewise.
2032 * frv-tdep.c (frv_extract_return_value): Likewise.
2033 * ft32-tdep.c (ft32_store_return_value): Likewise.
2034 (ft32_extract_return_value): Likewise.
2035 * go32-nat.c (fetch_register): Likewise.
2036 (go32_fetch_registers): Likewise.
2037 (go32_store_registers): Likewise.
2038 (store_register): Likewise.
2039 * h8300-tdep.c (h8300_extract_return_value): Likewise.
2040 (h8300_store_return_value): Likewise.
2041 * hppa-linux-nat.c (fetch_register): Likewise.
2042 (store_register): Likewise.
2043 (hppa_linux_fetch_inferior_registers): Likewise.
2044 (hppa_linux_store_inferior_registers): Likewise.
2045 * i386-darwin-nat.c (i386_darwin_fetch_inferior_registers): Likewise.
2046 (i386_darwin_store_inferior_registers): Likewise.
2047 * i386-gnu-nat.c (gnu_fetch_registers): Likewise.
2048 (gnu_store_registers): Likewise.
2049 * i386-linux-nat.c (fetch_register): Likewise.
2050 (store_register): Likewise.
2051 (supply_gregset): Likewise.
2052 (fill_gregset): Likewise.
2053 (i386_linux_fetch_inferior_registers): Likewise.
2054 (i386_linux_store_inferior_registers): Likewise.
2055 (i386_linux_resume): Likewise.
2056 * i386-linux-tdep.c (i386_linux_get_syscall_number_from_regcache):
2057 Likewise.
2058 * i386-nto-tdep.c (i386nto_supply_gregset): Likewise.
2059 * i386-obsd-nat.c (i386obsd_supply_pcb): Likewise.
2060 * i386-obsd-tdep.c (i386obsd_supply_uthread): Likewise.
2061 (i386obsd_collect_uthread): Likewise.
2062 * i386-tdep.c (i386_mmx_regnum_to_fp_regnum): Likewise.
2063 (i386_supply_gregset): Likewise.
2064 (i386_collect_gregset): Likewise.
2065 (i386_supply_fpregset): Likewise.
2066 (i386_collect_fpregset): Likewise.
2067 (i386_mpx_bd_base): Likewise.
2068 * i386-v4-nat.c (supply_fpregset): Likewise.
2069 (fill_fpregset): Likewise.
2070 * i387-tdep.c (i387_supply_fsave): Likewise.
2071 (i387_collect_fsave): Likewise.
2072 (i387_supply_fxsave): Likewise.
2073 (i387_collect_fxsave): Likewise.
2074 (i387_supply_xsave): Likewise.
2075 (i387_collect_xsave): Likewise.
2076 * ia64-linux-nat.c (ia64_linux_fetch_registers): Likewise.
2077 (ia64_linux_store_registers): Likewise.
2078 * ia64-tdep.c (ia64_access_rse_reg): Likewise.
2079 (ia64_extract_return_value): Likewise.
2080 (ia64_store_return_value): Likewise.
2081 (find_func_descr): Likewise.
2082 * inf-child.c (inf_child_fetch_inferior_registers): Likewise.
2083 * inf-ptrace.c (inf_ptrace_fetch_registers): Likewise.
2084 (inf_ptrace_store_registers): Likewise.
2085 * infrun.c (use_displaced_stepping): Likewise.
2086 (displaced_step_prepare_throw): Likewise.
2087 (resume): Likewise.
2088 (proceed): Likewise.
2089 (do_target_wait): Likewise.
2090 (adjust_pc_after_break): Likewise.
2091 (handle_inferior_event_1): Likewise.
2092 (handle_signal_stop): Likewise.
2093 (save_infcall_suspend_state): Likewise.
2094 (restore_infcall_suspend_state): Likewise.
2095 * iq2000-tdep.c (iq2000_extract_return_value): Likewise.
2096 * jit.c (jit_frame_prev_register): Likewise.
2097 * linux-nat.c (save_stop_reason): Likewise.
2098 (linux_nat_wait_1): Likewise.
2099 (resume_stopped_resumed_lwps): Likewise.
2100 * linux-record.c (record_linux_sockaddr): Likewise.
2101 (record_linux_msghdr): Likewise.
2102 (record_linux_system_call): Likewise.
2103 * linux-tdep.c (linux_collect_thread_registers): Likewise.
2104 * lm32-tdep.c (lm32_extract_return_value): Likewise.
2105 (lm32_store_return_value): Likewise.
2106 * m32c-tdep.c (m32c_read_flg): Likewise.
2107 (m32c_pseudo_register_read): Likewise.
2108 (m32c_pseudo_register_write): Likewise.
2109 * m32r-linux-tdep.c (m32r_linux_supply_gregset): Likewise.
2110 (m32r_linux_collect_gregset): Likewise.
2111 * m32r-tdep.c (m32r_store_return_value): Likewise.
2112 (m32r_extract_return_value): Likewise.
2113 * m68k-bsd-nat.c (m68kbsd_supply_fpregset): Likewise.
2114 (m68kbsd_collect_fpregset): Likewise.
2115 * m68k-bsd-tdep.c (m68kbsd_supply_fpregset): Likewise.
2116 * m68k-linux-nat.c (fetch_register): Likewise.
2117 (old_fetch_inferior_registers): Likewise.
2118 (old_store_inferior_registers): Likewise.
2119 (store_regs): Likewise.
2120 * m68k-tdep.c (m68k_svr4_extract_return_value): Likewise.
2121 (m68k_svr4_store_return_value): Likewise.
2122 * m88k-tdep.c (m88k_store_arguments): Likewise.
2123 * mi/mi-main.c (mi_cmd_data_list_changed_registers): Likewise.
2124 (mi_cmd_data_write_register_values): Likewise.
2125 * mips-fbsd-nat.c (mips_fbsd_fetch_inferior_registers): Likewise.
2126 (mips_fbsd_store_inferior_registers): Likewise.
2127 * mips-fbsd-tdep.c (mips_fbsd_supply_fpregs): Likewise.
2128 (mips_fbsd_supply_gregs): Likewise.
2129 (mips_fbsd_collect_fpregs): Likewise.
2130 (mips_fbsd_collect_gregs): Likewise.
2131 (mips_fbsd_supply_fpregset): Likewise.
2132 (mips_fbsd_collect_fpregset): Likewise.
2133 (mips_fbsd_supply_gregset): Likewise.
2134 (mips_fbsd_collect_gregset): Likewise.
2135 * mips-linux-nat.c (supply_gregset): Likewise.
2136 (fill_gregset): Likewise.
2137 (supply_fpregset): Likewise.
2138 (fill_fpregset): Likewise.
2139 * mips-linux-tdep.c (mips_supply_gregset): Likewise.
2140 (mips_fill_gregset): Likewise.
2141 (mips_supply_fpregset): Likewise.
2142 (mips_fill_fpregset): Likewise.
2143 (mips64_supply_gregset): Likewise.
2144 (micromips_linux_sigframe_validate): Likewise.
2145 * mips-nbsd-nat.c (mipsnbsd_fetch_inferior_registers): Likewise.
2146 (mipsnbsd_fetch_inferior_registers): Likewise.
2147 (mipsnbsd_store_inferior_registers): Likewise.
2148 * mips-nbsd-tdep.c (mipsnbsd_supply_fpregset): Likewise.
2149 (mipsnbsd_supply_gregset): Likewise.
2150 (mipsnbsd_iterate_over_regset_sections): Likewise.
2151 (mipsnbsd_supply_reg): Likewise.
2152 (mipsnbsd_supply_fpreg): Likewise.
2153 * mips-tdep.c (mips_in_frame_stub): Likewise.
2154 (mips_dummy_id): Likewise.
2155 (is_octeon_bbit_op): Likewise.
2156 (micromips_bc1_pc): Likewise.
2157 (extended_mips16_next_pc): Likewise.
2158 (mips16_next_pc): Likewise.
2159 (deal_with_atomic_sequence): Likewise.
2160 * moxie-tdep.c (moxie_process_readu): Likewise.
2161 * nios2-tdep.c (nios2_get_next_pc): Likewise.
2162 * nto-procfs.c (procfs_store_registers): Likewise.
2163 * ppc-fbsd-nat.c (ppcfbsd_fetch_inferior_registers): Likewise.
2164 (ppcfbsd_store_inferior_registers): Likewise.
2165 * ppc-linux-nat.c (fetch_vsx_register): Likewise.
2166 (fetch_altivec_register): Likewise.
2167 (get_spe_registers): Likewise.
2168 (fetch_spe_register): Likewise.
2169 (fetch_altivec_registers): Likewise.
2170 (fetch_all_gp_regs): Likewise.
2171 (fetch_all_fp_regs): Likewise.
2172 (store_vsx_register): Likewise.
2173 (store_altivec_register): Likewise.
2174 (set_spe_registers): Likewise.
2175 (store_spe_register): Likewise.
2176 (store_altivec_registers): Likewise.
2177 (store_all_gp_regs): Likewise.
2178 (store_all_fp_regs): Likewise.
2179 * ppc-linux-tdep.c (ppc_linux_supply_gregset): Likewise.
2180 (ppc_linux_collect_gregset): Likewise.
2181 (ppc_canonicalize_syscall): Likewise.
2182 (ppc_linux_record_signal): Likewise.
2183 (ppu2spu_prev_register): Likewise.
2184 * ppc-nbsd-nat.c (ppcnbsd_supply_pcb): Likewise.
2185 * ppc-obsd-nat.c (ppcobsd_fetch_registers): Likewise.
2186 (ppcobsd_store_registers): Likewise.
2187 * ppc-ravenscar-thread.c (ppc_ravenscar_generic_fetch_registers):
2188 Likewise.
2189 (ppc_ravenscar_generic_store_registers): Likewise.
2190 * procfs.c (procfs_fetch_registers): Likewise.
2191 (procfs_store_registers): Likewise.
2192 * ravenscar-thread.c (ravenscar_fetch_registers): Likewise.
2193 (ravenscar_store_registers): Likewise.
2194 (ravenscar_prepare_to_store): Likewise.
2195 * record-btrace.c (record_btrace_fetch_registers): Likewise.
2196 * record-full.c (record_full_wait_1): Likewise.
2197 (record_full_registers_change): Likewise.
2198 (record_full_store_registers): Likewise.
2199 (record_full_core_fetch_registers): Likewise.
2200 (record_full_save): Likewise.
2201 (record_full_goto_insn): Likewise.
2202 * regcache.c (regcache_register_size): Likewise.
2203 (get_regcache_arch): Remove.
2204 (regcache_read_pc): Likewise.
2205 * regcache.h (get_regcache_arch): Remove.
2206 * remote-sim.c (gdbsim_fetch_register): Likewise.
2207 (gdbsim_store_register): Likewise.
2208 * remote.c (fetch_register_using_p): Likewise.
2209 (send_g_packet): Likewise.
2210 (remote_prepare_to_store): Likewise.
2211 (store_registers_using_G): Likewise.
2212 * reverse.c (save_bookmark_command): Likewise.
2213 (goto_bookmark_command): Likewise.
2214 * rs6000-aix-tdep.c (branch_dest): Likewise.
2215 * rs6000-nat.c (rs6000_ptrace64): Likewise.
2216 (fetch_register): Likewise.
2217 * rs6000-tdep.c (ppc_supply_reg): Likewise.
2218 (ppc_collect_reg): Likewise.
2219 (ppc_collect_gregset): Likewise.
2220 (ppc_collect_fpregset): Likewise.
2221 (ppc_collect_vsxregset): Likewise.
2222 (ppc_collect_vrregset): Likewise.
2223 (ppc_displaced_step_hw_singlestep): Likewise.
2224 (rs6000_pseudo_register_read): Likewise.
2225 (rs6000_pseudo_register_write): Likewise.
2226 * s390-linux-nat.c (supply_gregset): Likewise.
2227 (fill_gregset): Likewise.
2228 (s390_linux_fetch_inferior_registers): Likewise.
2229 * s390-linux-tdep.c (s390_write_pc): Likewise.
2230 (s390_software_single_step): Likewise.
2231 (s390_all_but_pc_registers_record): Likewise.
2232 (s390_linux_syscall_record): Likewise.
2233 * sentinel-frame.c (sentinel_frame_prev_arch): Likewise.
2234 * sh-nbsd-nat.c (shnbsd_fetch_inferior_registers): Likewise.
2235 (shnbsd_store_inferior_registers): Likewise.
2236 * sh-tdep.c (sh_extract_return_value_nofpu): Likewise.
2237 (sh_extract_return_value_fpu): Likewise.
2238 (sh_store_return_value_nofpu): Likewise.
2239 (sh_corefile_supply_regset): Likewise.
2240 (sh_corefile_collect_regset): Likewise.
2241 * sh64-tdep.c (sh64_extract_return_value): Likewise.
2242 (sh64_store_return_value): Likewise.
2243 * sparc-linux-tdep.c (sparc32_linux_collect_core_fpregset): Likewise.
2244 * sparc-nat.c (sparc_fetch_inferior_registers): Likewise.
2245 (sparc_store_inferior_registers): Likewise.
2246 * sparc-ravenscar-thread.c (register_in_thread_descriptor_p): Likewise.
2247 (sparc_ravenscar_prepare_to_store): Likewise.
2248 * sparc-tdep.c (sparc32_store_arguments): Likewise.
2249 (sparc_analyze_control_transfer): Likewise.
2250 (sparc_step_trap): Likewise.
2251 (sparc_software_single_step): Likewise.
2252 (sparc32_gdbarch_init): Likewise.
2253 (sparc_supply_rwindow): Likewise.
2254 (sparc_collect_rwindow): Likewise.
2255 * sparc64-linux-tdep.c (sparc64_linux_collect_core_fpregset): Likewise.
2256 * sparc64-nbsd-nat.c (sparc64nbsd_supply_gregset): Likewise.
2257 (sparc64nbsd_collect_gregset): Likewise.
2258 (sparc64nbsd_supply_fpregset): Likewise.
2259 (sparc64nbsd_collect_fpregset): Likewise.
2260 * sparc64-tdep.c (sparc64_store_arguments): Likewise.
2261 (sparc64_supply_gregset): Likewise.
2262 (sparc64_collect_gregset): Likewise.
2263 (sparc64_supply_fpregset): Likewise.
2264 (sparc64_collect_fpregset): Likewise.
2265 * spu-linux-nat.c (spu_fetch_inferior_registers): Likewise.
2266 * spu-tdep.c (spu_unwind_sp): Likewise.
2267 (spu2ppu_prev_register): Likewise.
2268 (spu_memory_remove_breakpoint): Likewise.
2269 * stack.c (return_command): Likewise.
2270 * tic6x-tdep.c (tic6x_extract_signed_field): Likewise.
2271 * tracefile-tfile.c (tfile_fetch_registers): Likewise.
2272 * tracefile.c (trace_save_ctf): Likewise.
2273 * windows-nat.c (do_windows_fetch_inferior_registers): Likewise.
2274 (do_windows_store_inferior_registers): Likewise.
2275 (windows_resume): Likewise.
2276 * xtensa-linux-nat.c (fill_gregset): Likewise.
2277 (supply_gregset_reg): Likewise.
2278 * xtensa-tdep.c (xtensa_register_write_masked): Likewise.
2279 (xtensa_register_read_masked): Likewise.
2280 (xtensa_supply_gregset): Likewise.
2281 (xtensa_extract_return_value): Likewise.
2282 (xtensa_store_return_value): Likewise.
2283
edd079d9
UW
22842017-10-25 Ulrich Weigand <uweigand@de.ibm.com>
2285
2286 * doublest.c (floatformat_from_string): New function.
2287 * doublest.h (floatformat_from_string): Add prototype.
2288
2289 * std-operator.def (OP_DOUBLE, OP_DECFLOAT): Remove, replace by ...
2290 (OP_FLOAT): ... this.
2291 * expression.h: Do not include "doublest.h".
2292 (union exp_element): Replace doubleconst and decfloatconst by
2293 new element floatconst.
2294 * ada-lang.c (resolve_subexp): Handle OP_FLOAT instead of OP_DOUBLE.
2295 (ada_evaluate_subexp): Likewise.
2296 * eval.c (evaluate_subexp_standard): Handle OP_FLOAT instead of
2297 OP_DOUBLE and OP_DECFLOAT.
2298 * expprint.c (print_subexp_standard): Likewise.
2299 (dump_subexp_body_standard): Likewise.
2300 * breakpoint.c (watchpoint_exp_is_const): Likewise.
2301
2302 * parse.c: Include "dfp.h".
2303 (write_exp_elt_dblcst, write_exp_elt_decfloatcst): Remove.
2304 (write_exp_elt_floatcst): New function.
2305 (operator_length_standard): Handle OP_FLOAT instead of OP_DOUBLE
2306 and OP_DECFLOAT.
2307 (operator_check_standard): Likewise.
2308 (parse_float): Do not accept suffix. Take type as input. Return bool.
2309 Return target format buffer instead of host DOUBLEST.
2310 Use floatformat_from_string and decimal_from_string to parse
2311 either binary or decimal floating-point types.
2312 (parse_c_float): Remove.
2313 * parser-defs.h: Do not include "doublest.h".
2314 (write_exp_elt_dblcst, write_exp_elt_decfloatcst): Remove.
2315 (write_exp_elt_floatcst): Add prototype.
2316 (parse_float): Update prototype.
2317 (parse_c_float): Remove.
2318
2319 * c-exp.y: Do not include "dfp.h".
2320 (typed_val_float): Use byte buffer instead of DOUBLEST.
2321 (typed_val_decfloat): Remove.
2322 (DECFLOAT): Remove.
2323 (FLOAT): Use OP_FLOAT and write_exp_elt_floatcst.
2324 (parse_number): Update to new parse_float interface.
2325 Parse suffixes and determine type before calling parse_float.
2326 Handle decimal and binary FP types the same way.
2327
2328 * d-exp.y (typed_val_float): Use byte buffer instead of DOUBLEST.
2329 (FLOAT_LITERAL): Use OP_FLOAT and write_exp_elt_floatcst.
2330 (parse_number): Update to new parse_float interface.
2331 Parse suffixes and determine type before calling parse_float.
2332
2333 * f-exp.y: Replace dval by typed_val_float.
2334 (FLOAT): Use OP_FLOAT and write_exp_elt_floatcst.
2335 (parse_number): Use parse_float instead of atof.
2336
2337 * go-exp.y (typed_val_float): Use byte buffer instead of DOUBLEST.
2338 (parse_go_float): Remove.
2339 (FLOAT): Use OP_FLOAT and write_exp_elt_floatcst.
2340 (parse_number): Call parse_float instead of parse_go_float.
2341 Parse suffixes and determine type before calling parse_float.
2342
2343 * p-exp.y (typed_val_float): Use byte buffer instead of DOUBLEST.
2344 (FLOAT): Use OP_FLOAT and write_exp_elt_floatcst.
2345 (parse_number): Update to new parse_float interface.
2346 Parse suffixes and determine type before calling parse_float.
2347
2348 * m2-exp.y: Replace dval by byte buffer val.
2349 (FLOAT): Use OP_FLOAT and write_exp_elt_floatcst.
2350 (parse_number): Call parse_float instead of atof.
2351
2352 * rust-exp.y (typed_val_float): Use byte buffer instead of DOUBLEST.
2353 (lex_number): Call parse_float instead of strtod.
2354 (ast_dliteral): Use OP_FLOAT instead of OP_DOUBLE.
2355 (convert_ast_to_expression): Handle OP_FLOAT instead of OP_DOUBLE.
2356 Use write_exp_elt_floatcst.
2357 (unit_testing): Remove static variable.
2358 (rust_type): Do not check unit_testing.
2359 (rust_lex_tests): Do not set uint_testing. Set up dummy rust_parser.
2360
2361 * ada-exp.y (type_float, type_double): Remove.
2362 (typed_val_float): Use byte buffer instead of DOUBLEST.
2363 (FLOAT): Use OP_FLOAT and write_exp_elt_floatcst.
2364 * ada-lex.l (processReal): Use parse_float instead of sscanf.
2365
cc628f3d
AH
23662017-10-25 Alan Hayward <alan.hayward@arm.com>
2367
2368 * aarch64-tdep.h (enum aarch64_regnum): Remove.
2369 * arch/aarch64.h: New file.
2370
09a7c6aa
UW
23712017-10-24 Ulrich Weigand <uweigand@de.ibm.com>
2372
2373 * dfp.h (decimal_from_string): Use const reference for argument.
2374 * dfp.c (decimal_from_string): Likewise.
2375
8ba0dd51
UW
23762017-10-24 Ulrich Weigand <uweigand@de.ibm.com>
2377
2378 * i387-tdep.c (print_i387_value): Use floatformat_to_string.
2379 * sh64-tdep.c (sh64_do_fp_register): Likewise.
2380 * mips-tdep.c (mips_print_fp_register): Likewise.
2381
16e812b2
UW
23822017-10-24 Ulrich Weigand <uweigand@de.ibm.com>
2383
2384 * common/format.h (enum argclass): Replace decfloat_arg by
2385 dec32float_arg, dec64float_arg, and dec128float_arg.
2386 * common/format.c (parse_format_string): Update to return
2387 new decimal float argument classes.
2388
2389 * printcmd.c (printf_decfloat): Rename to ...
2390 (printf_floating): ... this. Add argclass argument, and use it
2391 instead of parsing the format string again. Add support for
2392 binary floating-point values, using floatformat_to_string.
2393 Convert value to the target format if it doesn't already match.
2394 (ui_printf): Call printf_floating instead of printf_decfloat,
2395 also for double_arg / long_double_arg. Pass argclass.
2396
2397 * dfp.c (decimal_to_string): Add format string argument.
2398 * dfp.h (decimal_to_string): Likewise.
2399
2400 * doublest.c (floatformat_to_string): Add format string argument.
2401 * doublest.h (floatformat_to_string): Likewise.
2402
fdf0cbc2
UW
24032017-10-24 Ulrich Weigand <uweigand@de.ibm.com>
2404
2405 * doublest.c (floatformat_precision): New routine.
2406 (floatformat_to_string): Likewise.
2407 * doublest.c (floatformat_to_string): Add prototype.
2408
2409 * printcmd.c (print_scalar_formatted): Only call print_floating
2410 on floating-point types.
2411 * valprint.c: Do not include "floatformat.h".
2412 (generic_val_print_decfloat): Remove.
2413 (generic_val_print): Call generic_val_print_float for both
2414 TYPE_CODE_FLT and TYPE_CODE_DECFLOAT.
2415 (print_floating): Use floatformat_to_string. Handle decimal float.
2416 (print_decimal_floating): Remove, merge into floatformat_to_string.
2417 * value.h (print_decimal_floating): Remove.
2418
2419 * Makefile.in: Do not build doublest.c with -Wformat-nonliteral.
2420
5033013f
UW
24212017-10-24 Ulrich Weigand <uweigand@de.ibm.com>
2422
2423 * buildsym.c (end_symtab_get_static_block): Use std::stable_sort.
2424
a664f67e
SM
24252017-10-21 Simon Marchi <simon.marchi@ericsson.com>
2426
2427 * memattr.h: Don't include vec.h.
2428 (struct mem_attrib): Initialize fields.
2429 <unknown>: New static method.
2430 (struct mem_region): Add constructors, operator<, initialize
2431 fields.
2432 * memattr.c: Include algorithm.
2433 (default_mem_attrib, unknown_mem_attrib): Remove.
2434 (user_mem_region_list): New global.
2435 (target_mem_region_list, mem_region_list): Change type to
2436 std::vector<mem_region>.
2437 (mem_use_target): Now a function.
2438 (target_mem_regions_valid): Change type to bool.
2439 (mem_region_lessthan, mem_region_cmp, mem_region_init): Remove.
2440 (require_user_regions): Adjust.
2441 (require_target_regions): Adjust.
2442 (create_mem_region): Adjust.
2443 (lookup_mem_region): Adjust.
2444 (invalidate_target_mem_regions): Adjust.
2445 (mem_clear): Rename to...
2446 (user_mem_clear): ... this, and adjust.
2447 (mem_command): Adjust.
2448 (info_mem_command): Adjust.
2449 (mem_enable, enable_mem_command, mem_disable,
2450 disable_mem_command): Adjust.
2451 (mem_delete): Adjust.
2452 (delete_mem_command): Adjust.
2453 * memory-map.h (parse_memory_map): Return an std::vector.
2454 * memory-map.c (parse_memory_map): Likewise.
2455 (struct memory_map_parsing_data): Add constructor.
2456 <memory_map>: Point to std::vector.
2457 (memory_map_start_memory): Adjust.
2458 (memory_map_end_memory): Adjust.
2459 (memory_map_end_property): Adjust.
2460 (clear_result): Remove.
2461 * remote.c (remote_memory_map): Return an std::vector.
2462 * target-debug.h (target_debug_print_VEC_mem_region_s__p):
2463 Remove.
2464 (target_debug_print_mem_region_vector): New.
2465 * target-delegates.c: Regenerate.
2466 * target.h (mem_region_vector): New typedef.
2467 (to_memory_map): Return mem_region_vector.
2468 (target_memory_map): Return an std::vector.
2469 * target.c (target_memory_map): Return an std::vector.
2470 (flash_erase_command): Adjust.
2471
6e17c565
SM
24722017-10-21 Simon Marchi <simon.marchi@ericsson.com>
2473
2474 * memory-map.c (struct memory_map_parsing_data) <property_name>:
2475 Change type to std::string.
2476 (memory_map_start_property): Adjust.
2477 (memory_map_end_property): Adjust.
2478
cfba9872
SM
24792017-10-21 Simon Marchi <simon.marchi@polymtl.ca>
2480
2481 * infrun.h: Include common/byte-vector.h.
2482 (struct displaced_step_closure): New struct.
2483 (struct buf_displaced_step_closure): New struct.
2484 * infrun.c (displaced_step_closure::~displaced_step_closure):
2485 Provide default implementation.
2486 (displaced_step_clear): Deallocate step closure with delete.
2487 * aarch64-tdep.c (displaced_step_closure): Rename to ...
2488 (aarch64_displaced_step_closure): ... this, extend
2489 displaced_step_closure.
2490 (aarch64_displaced_step_data) <dsc>: Change type to
2491 aarch64_displaced_step_closure.
2492 (aarch64_displaced_step_copy_insn): Adjust to type change, use
2493 unique_ptr.
2494 (aarch64_displaced_step_fixup): Add cast for displaced step
2495 closure.
2496 * amd64-tdep.c (displaced_step_closure): Rename to ...
2497 (amd64_displaced_step_closure): ... this, extend
2498 displaced_step_closure.
2499 <insn_buf>: Change type to std::vector<gdb_byte>.
2500 <max_len>: Remove.
2501 (fixup_riprel): Change type of DSC parameter, adjust to type
2502 change of insn_buf.
2503 (fixup_displaced_copy): Change type of DSC parameter.
2504 (amd64_displaced_step_copy_insn): Instantiate
2505 amd64_displaced_step_closure.
2506 (amd64_displaced_step_fixup): Add cast for closure type, adjust
2507 to type change of insn_buf.
2508 * arm-linux-tdep.c (arm_linux_cleanup_svc): Change type of
2509 parameter DSC.
2510 (arm_linux_copy_svc): Likewise.
2511 (cleanup_kernel_helper_return): Likewise.
2512 (arm_catch_kernel_helper_return): Likewise.
2513 (arm_linux_displaced_step_copy_insn): Instantiate
2514 arm_displaced_step_closure.
2515 * arm-tdep.c (arm_pc_is_thumb): Add cast for closure.
2516 (displaced_read_reg): Change type of parameter DSC.
2517 (branch_write_pc): Likewise.
2518 (load_write_pc): Likewise.
2519 (alu_write_pc): Likewise.
2520 (displaced_write_reg): Likewise.
2521 (arm_copy_unmodified): Likewise.
2522 (thumb_copy_unmodified_32bit): Likewise.
2523 (thumb_copy_unmodified_16bit): Likewise.
2524 (cleanup_preload): Likewise.
2525 (install_preload): Likewise.
2526 (arm_copy_preload): Likewise.
2527 (thumb2_copy_preload): Likewise.
2528 (install_preload_reg): Likewise.
2529 (arm_copy_preload_reg): Likewise.
2530 (cleanup_copro_load_store): Likewise.
2531 (install_copro_load_store): Likewise.
2532 (arm_copy_copro_load_store) Likewise.
2533 (thumb2_copy_copro_load_store): Likewise.
2534 (cleanup_branch): Likewise.
2535 (install_b_bl_blx): Likewise.
2536 (arm_copy_b_bl_blx): Likewise.
2537 (thumb2_copy_b_bl_blx): Likewise.
2538 (thumb_copy_b): Likewise.
2539 (install_bx_blx_reg): Likewise.
2540 (arm_copy_bx_blx_reg): Likewise.
2541 (thumb_copy_bx_blx_reg): Likewise.
2542 (cleanup_alu_imm): Likewise.
2543 (arm_copy_alu_imm): Likewise.
2544 (thumb2_copy_alu_imm): Likewise.
2545 (cleanup_alu_reg): Likewise.
2546 (install_alu_reg): Likewise.
2547 (arm_copy_alu_reg): Likewise.
2548 (thumb_copy_alu_reg): Likewise.
2549 (cleanup_alu_shifted_reg): Likewise.
2550 (install_alu_shifted_reg): Likewise.
2551 (arm_copy_alu_shifted_reg): Likewise.
2552 (cleanup_load): Likewise.
2553 (cleanup_store): Likewise.
2554 (arm_copy_extra_ld_st): Likewise.
2555 (install_load_store): Likewise.
2556 (thumb2_copy_load_literal): Likewise.
2557 (thumb2_copy_load_reg_imm): Likewise.
2558 (arm_copy_ldr_str_ldrb_strb): Likewise.
2559 (cleanup_block_load_all): Likewise.
2560 (cleanup_block_store_pc): Likewise.
2561 (cleanup_block_load_pc): Likewise.
2562 (arm_copy_block_xfer): Likewise.
2563 (thumb2_copy_block_xfer): Likewise.
2564 (cleanup_svc): Likewise.
2565 (install_svc): Likewise.
2566 (arm_copy_svc): Likewise.
2567 (thumb_copy_svc): Likewise.
2568 (arm_copy_undef): Likewise.
2569 (thumb_32bit_copy_undef): Likewise.
2570 (arm_copy_unpred): Likewise.
2571 (arm_decode_misc_memhint_neon): Likewise.
2572 (arm_decode_unconditional): Likewise.
2573 (arm_decode_miscellaneous): Likewise.
2574 (arm_decode_dp_misc): Likewise.
2575 (arm_decode_ld_st_word_ubyte): Likewise.
2576 (arm_decode_media): Likewise.
2577 (arm_decode_b_bl_ldmstm): Likewise.
2578 (arm_decode_ext_reg_ld_st): Likewise.
2579 (thumb2_decode_dp_shift_reg): Likewise.
2580 (thumb2_decode_ext_reg_ld_st): Likewise.
2581 (arm_decode_svc_copro): Likewise.
2582 (thumb2_decode_svc_copro): Likewise.
2583 (install_pc_relative): Likewise.
2584 (thumb_copy_pc_relative_16bit): Likewise.
2585 (thumb_decode_pc_relative_16bit): Likewise.
2586 (thumb_copy_pc_relative_32bit): Likewise.
2587 (thumb_copy_16bit_ldr_literal): Likewise.
2588 (thumb_copy_cbnz_cbz): Likewise.
2589 (thumb2_copy_table_branch): Likewise.
2590 (cleanup_pop_pc_16bit_all): Likewise.
2591 (thumb_copy_pop_pc_16bit): Likewise.
2592 (thumb_process_displaced_16bit_insn): Likewise.
2593 (decode_thumb_32bit_ld_mem_hints): Likewise.
2594 (thumb_process_displaced_32bit_insn): Likewise.
2595 (thumb_process_displaced_insn): Likewise.
2596 (arm_process_displaced_insn): Likewise.
2597 (arm_displaced_init_closure): Likewise.
2598 (arm_displaced_step_fixup): Add cast for closure.
2599 * arm-tdep.h: Include infrun.h.
2600 (displaced_step_closure): Rename to ...
2601 (arm_displaced_step_closure): ... this, extend
2602 displaced_step_closure.
2603 <u::svc::copy_svc_os>: Change type of parameter DSC.
2604 <cleanup>: Likewise.
2605 (arm_process_displaced_insn): Likewise.
2606 (arm_displaced_init_closure): Likewise.
2607 (displaced_read_reg): Likewise.
2608 (displaced_write_reg): Likewise.
2609 * i386-linux-tdep.c (i386_linux_displaced_step_copy_insn):
2610 Adjust.
2611 * i386-tdep.h: Include infrun.h.
2612 (i386_displaced_step_closure): New typedef.
2613 * i386-tdep.c (i386_displaced_step_copy_insn): Use
2614 i386_displaced_step_closure.
2615 (i386_displaced_step_fixup): Adjust.
2616 * rs6000-tdep.c (ppc_displaced_step_closure): New typedef.
2617 (ppc_displaced_step_copy_insn): Use ppc_displaced_step_closure
2618 and unique_ptr.
2619 (ppc_displaced_step_fixup): Adjust.
2620 * s390-linux-tdep.c (s390_displaced_step_closure): New typedef.
2621 (s390_displaced_step_copy_insn): Use s390_displaced_step_closure
2622 and unique_ptr.
2623 (s390_displaced_step_fixup): Adjust.
2624
b392b304
SM
26252017-10-21 Simon Marchi <simon.marchi@polymtl.ca>
2626
2627 * interps.h (interp_resume, interp_suspend, interp_set_temp):
2628 Remove declarations.
2629
d5833c62
TT
26302017-10-20 Tom Tromey <tom@tromey.com>
2631
2632 * gdb_bfd.c (struct gdb_bfd_data) <included_bfds>: Now a
2633 std::vector.
2634 (gdb_bfd_record_inclusion): Update.
2635 (bfdp): Remove typedef.
2636
06d5bbc8
TT
26372017-10-20 Tom Tromey <tom@tromey.com>
2638
2639 * gdb_bfd.c (gdb_bfd_ref): Use new.
2640 (struct gdb_bfd_data): Add constructor, destructor, and member
2641 initializers.
2642 (gdb_bfd_unref): Use delete.
2643
2712ce2e
TT
26442017-10-20 Tom Tromey <tom@tromey.com>
2645
2646 * exec.c (exec_file_attach): Use new_bfd_ref.
2647 * symfile-mem.c (symbol_file_add_from_memory): Use new_bfd_ref.
2648 * gdb_bfd.c (gdb_bfd_open, gdb_bfd_fopen, gdb_bfd_openr)
2649 (gdb_bfd_openw, gdb_bfd_openr_iovec, gdb_bfd_fdopenr): Use
2650 new_bfd_ref.
2651 * gdb_bfd.h (new_bfd_ref): New function.
2652
fcc8fb2f
PA
26532017-10-20 Pedro Alves <palves@redhat.com>
2654
2655 * main.c (captured_command_loop): Add attribute noinline.
2656
4c2287b0
SM
26572017-10-19 Simon Marchi <simon.marchi@ericsson.com>
2658
2659 * interps.c (struct interp_factory): Add constructor.
2660 (interp_factory_p): Remove typedef.
2661 (DEF_VEC_P(interp_factory_p)): Remove.
2662 (interpreter_factories): Change type to std::vector.
2663 (interp_factory_register): Adjust.
2664 (interp_lookup): Adjust.
2665 (interpreter_completer): Adjust.
2666
3d415c26
TT
26672017-10-19 Tom Tromey <tom@tromey.com>
2668
2669 * break-catch-syscall.c (catch_syscall_completer): Use
2670 std::string, gdb::unique_xmalloc_ptr.
2671
395423c4
TT
26722017-10-19 Tom Tromey <tom@tromey.com>
2673
2674 * infcall.c (call_function_by_hand_dummy): Use std::string.
2675
54f70bc1
TT
26762017-10-19 Tom Tromey <tom@tromey.com>
2677
2678 * mi/mi-main.c (mi_cmd_execute): Update.
2679 * top.h (prepare_execute_command): Return scoped_value_mark.
2680 * value.h (class scoped_value_mark): Use DISABLE_COPY_AND_ASSIGN.
2681 Add move constructor.
2682 * top.c (prepare_execute_command): Return scoped_value_mark.
2683 (execute_command): Update.
2684
63929e84
PA
26852017-10-19 Pedro Alves <palves@redhat.com>
2686
2687 * xml-support.c (xml_fetch_content_from_file): Check fread's
2688 return.
2689
a75868f5
PA
26902017-10-19 Pedro Alves <palves@redhat.com>
2691
2692 * ser-base.c (ser_base_read_error_fd): Delete the file handler if
2693 async.
2694 (handle_error_fd): New function.
2695 (ser_base_async): Add/delete an event loop file handler for
2696 error_fd.
2697
2edf834e
PA
26982017-10-19 Pedro Alves <palves@redhat.com>
2699
2700 * xml-support.c (xml_fetch_content_from_file): Don't read in
2701 chunks. Instead use fseek to determine the file's size, and read
2702 it in one go.
2703
c8ba13ad
KS
27042017-11-18 Keith Seitz <keiths@redhat.com>
2705
2706 * c-exp.y (oper): Canonicalize conversion operators of user-defined
2707 types.
2708 Add whitespace to front of type name.
2709
37534686
KS
27102017-10-18 Keith Seitz <keiths@redhat.com>
2711
2712 * dwarf2read.c (dwarf2_add_typedef): Issue a complaint on unhandled
2713 DW_AT_accessibility.
2714
28c7c158
YQ
27152017-10-18 Yao Qi <yao.qi@linaro.org>
2716
2717 * features/tic6x-c62x-linux.c: Remove.
2718
30f0b101
TT
27192017-10-17 Tom Tromey <tom@tromey.com>
2720
2721 * disasm.c (do_mixed_source_and_assembly_deprecated): Use
2722 gdb::optional, ui_out_emit_list, ui_out_emit_tuple.
2723 (do_mixed_source_and_assembly): Likewise.
2724
57e12da9
TT
27252017-10-17 Tom Tromey <tom@tromey.com>
2726
2727 * regcache.c (regcache::xfer_part): Remove assertion.
2728
7b700999
PA
27292017-10-17 Pedro Alves <palves@redhat.com>
2730
2731 * xml-support.c (xml_fetch_content_from_file): Call
2732 unique_ptr::release() instead unique_ptr::get() when passing
2733 through xrealloc.
2734
d3037ba6
YQ
27352017-10-17 Yao Qi <yao.qi@linaro.org>
2736
2737 * regcache.c (regcache::xfer_part): Remove parameters read and
2738 write, add parameter is_raw. All callers are updated.
2739
83d5a34d
KS
27402017-10-16 Keith Seitz <keiths@redhat.com>
2741
2742 * c-typeprint.c (enum access_specifier): Moved here from
2743 c_type_print_base.
2744 (output_access_specifier): New function.
2745 (c_type_print_base): Consider typedefs when assessing
2746 whether access labels are needed.
2747 Use output_access_specifier as needed.
2748 Output access specifier for typedefs, if needed.
2749 * dwarf2read.c (dwarf2_add_typedef): Record DW_AT_accessibility.
2750 * gdbtypes.h (struct typedef_field) <is_protected, is_private>: New
2751 fields.
2752 (TYPE_TYPEDEF_FIELD_PROTECTED, TYPE_TYPEDEF_FIELD_PRIVATE): New
2753 accessor macros.
2754
87028b87
TT
27552017-10-16 Tom Tromey <tom@tromey.com>
2756
2757 * linux-tdep.c (linux_info_proc, linux_find_memory_regions_full)
2758 (linux_fill_prpsinfo, linux_vsyscall_range_raw): Update.
2759 * target.c (target_fileio_read_stralloc): Update.
2760 * sparc64-tdep.c (adi_is_addr_mapped): Update.
2761 * target.h (target_fileio_read_stralloc): Return
2762 unique_xmalloc_ptr.
2763
b7b030ad
TT
27642017-10-16 Tom Tromey <tom@tromey.com>
2765
2766 * xml-syscall.c (xml_init_syscalls_info): Update.
2767 * xml-support.c (xinclude_start_include): Update.
2768 (xml_fetch_content_from_file): Return unique_xmalloc_ptr.
2769 * xml-support.h (xml_fetch_another): Return unique_xmalloc_ptr.
2770 (xml_fetch_content_from_file): Likewise.
2771 * osdata.c (get_osdata): Update.
2772 * target.h (target_read_stralloc, target_get_osdata): Return
2773 unique_xmalloc_ptr.
2774 * solib-aix.c (solib_aix_get_library_list): Update.
2775 * solib-target.c (solib_target_current_sos): Update.
2776 * solib-svr4.c (svr4_current_sos_via_xfer_libraries): Update.
2777 * xml-tdesc.c (fetch_available_features_from_target): Update.
2778 (target_fetch_description_xml): Update.
2779 (file_read_description_xml): Update.
2780 * remote.c (remote_get_threads_with_qxfer, remote_memory_map)
2781 (remote_traceframe_info, btrace_read_config, remote_read_btrace)
2782 (remote_pid_to_exec_file): Update.
2783 * target.c (target_read_stralloc): Return unique_xmalloc_ptr.
2784 (target_get_osdata): Likewise.
2785
b80406ac
TT
27862017-10-16 Tom Tromey <tom@tromey.com>
2787
2788 * remote.c (remote_register_number_and_offset): Use std::vector.
2789 (remote_set_syscall_catchpoint): Use gdb::unique_xmalloc_ptr.
2790 (putpkt_binary): Use gdb::def_vector.
2791 (compare_sections_command): Use gdb::byte_vector.
2792
a90ecff8
TT
27932017-10-16 Tom Tromey <tom@tromey.com>
2794
2795 * ppc-linux-nat.c (hwdebug_insert_point): Use
2796 gdb::unique_xmalloc_ptr, XDUP.
2797
2dc0e219
TT
27982017-10-16 Tom Tromey <tom@tromey.com>
2799
2800 * probe.c (parse_probes): Use std::string.
2801 (info_probes_for_ops, enable_probes_command)
2802 (disable_probes_command): Remove cleanups.
2803
b05628f0
TT
28042017-10-16 Tom Tromey <tom@tromey.com>
2805
2806 * buildsym.c (block_compar): Remove.
2807 (end_symtab_get_static_block): Use std::vector.
2808
a79b1bc6
SM
28092017-10-16 Simon Marchi <simon.marchi@ericsson.com>
2810
2811 * memrange.h (struct mem_range): Define operator< and operator==.
2812 (mem_range_s): Remove.
2813 (DEF_VEC_O (mem_range_s)): Remove.
2814 (normalize_mem_ranges): Change parameter type to std::vector.
2815 * memrange.c (compare_mem_ranges): Remove.
2816 (normalize_mem_ranges): Change parameter type to std::vector,
2817 adjust to vector change.
2818 * exec.c (section_table_available_memory): Return vector, remove
2819 parameter.
2820 (section_table_read_available_memory): Adjust to std::vector
2821 change.
2822 * remote.c (remote_read_bytes): Adjust to std::vector
2823 change.
2824 * tracepoint.h (traceframe_available_memory): Change parameter
2825 type to std::vector.
2826 * tracepoint.c (traceframe_available_memory): Change parameter
2827 type to std::vector, adjust.
2828 * gdb/mi/mi-main.c (mi_cmd_trace_frame_collected): Adjust to
2829 std::vector change.
2830 * gdb/Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
2831 unittests/memrange-selftests.c.
2832 (SUBDIR_UNITTESTS_OBS): Add memrange-selftests.o.
2833 * gdb/unittests/memrange-selftests.c: New file.
2834
63f0e930
PA
28352017-10-16 Pedro Alves <palves@redhat.com>
2836
2837 * elfread.c (probe_key_free): Rename range-for variable.
2838 * probe.c (parse_probes_in_pspace, find_probes_in_objfile)
2839 (find_probe_by_pc, collect_probes): Rename range-for variable.
2840
c40c7bfc
YQ
28412017-10-16 Yao Qi <yao.qi@linaro.org>
2842
2843 * features/Makefile (XMLTOC): Remove tic6x-*.xml.
2844 * features/tic6x-c62x.c: Remove.
2845 * features/tic6x-c64x-linux.c: Remove.
2846 * features/tic6x-c64x.c: Remove.
2847 * features/tic6x-c64xp-linux.c: Remove.
2848 * features/tic6x-c64xp.c: Remove.
2849 * tic6x-linux-tdep.c (_initialize_tic6x_linux_tdep): Don't call
2850 initialize_tdesc_tic6x_*_linux functions.
2851 * tic6x-tdep.c (_initialize_tic6x_tdep): Don't call
2852 initialize_tdesc_tic6x_* functions.
2853
df27ae6a
YQ
28542017-10-16 Yao Qi <yao.qi@linaro.org>
2855
2856 * features/Makefile (WHICH): Remove tic6x-c64xp, tic6x-c64x
2857 tic6x-c62x.
2858 * regformats/tic6x-c62x.dat: Remove.
2859 * regformats/tic6x-c64x.dat: Remove.
2860 * regformats/tic6x-c64xp.dat: Remove.
2861
86766165
SM
28622017-10-15 Simon Marchi <simon.marchi@ericsson.com>
2863
2864 * tracepoint.c (parse_traceframe_info): Return a unique_ptr
2865 (the !HAVE_LIBEXPAT version).
2866
824dfcc3
SM
28672017-10-14 Simon Marchi <simon.marchi@ericsson.com>
2868
2869 * nat/linux-osdata.c (struct pid_pgid_entry) <operator<>: Make
2870 const.
2871
2098b393
SM
28722017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
2873
2874 * target.h: Include tracepoint.h.
2875 (enum trace_find_type): Move to tracepoint.h.
2876 (struct target_ops) <to_traceframe_info>: Return a unique ptr.
2877 * tracepoint.h: Don't include target.h
2878 (enum trace_find_type): Move from target.h.
2879 (parse_traceframe_info): Return a unique ptr.
2880 * tracepoint.c (current_traceframe_info): Change type to unique
2881 ptr.
2882 (free_traceframe_info): Remove.
2883 (clear_traceframe_info): Don't manually free
2884 current_traceframe_info.
2885 (free_result): Remove.
2886 (parse_traceframe_info): Return a unique ptr.
2887 (get_traceframe_info): Adjust to unique ptr.
2888 * ctf.c (ctf_traceframe_info): Return a unique ptr.
2889 * remote.c (remote_traceframe_info): Return a unique ptr.
2890 * tracefile-tfile.c (tfile_traceframe_info): Return a unique
2891 ptr.
2892 * target-debug.h (target_debug_print_traceframe_info_up): New
2893 macro.
2894 * target-delegates.c: Regenerate.
2895
4cdd21a8
SM
28962017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
2897
2898 * memrange.h (struct mem_range): Add constructors.
2899 * tracepoint.h (struct traceframe_info) <memory>: Change type to
2900 std::vector<mem_range>.
2901 * tracepoint.c (free_traceframe_info): Don't manually free
2902 vector.
2903 (traceframe_info_start_memory): Adjust to vector change.
2904 (traceframe_available_memory): Likewise.
2905 * tracefile-tfile.c (build_traceframe_info): Likewise.
2906 * ctf.c (ctf_traceframe_info): Likewise.
2907
d0d292a2
SM
29082017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
2909
2910 * tracepoint.h (struct traceframe_info) <tvars>: Change type to
2911 std::vector<int>.
2912 * tracepoint.c (free_traceframe_info): Deallocate with delete.
2913 (traceframe_info_start_tvar): Adjust to vector change.
2914 (parse_traceframe_info): Allocate with new.
2915 * ctf.c (ctf_traceframe_info): Allocate with new, adjust to
2916 vector change.
2917 * tracefile-tfile.c (build_traceframe_info): Adjust to vector
2918 change.
2919 tfile_traceframe_info): Allocate with new.
2920 * mi/mi-main.c (mi_cmd_trace_frame_collected): Adjust to vector
2921 change.
2922
8d3c73ef
SM
29232017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
2924
2925 * tracepoint.c (traceframe_info): Rename to...
2926 (current_traceframe_info): ...this.
2927 (clear_traceframe_info): Adjust.
2928 (get_traceframe_info): Adjust.
2929
b129dcac
SM
29302017-10-14 Simon Marchi <simon.marchi@ericsson.com>
2931
2932 * nat/linux-osdata.c: Include algorithm.
2933 (compare_processes): Remove.
2934 (struct pid_pgid_entry): New struct.
2935 (linux_xfer_osdata_processgroups): Use std::vector instead of
2936 XNEWVEC.
2937
af5bf4ad
SM
29382017-10-14 Simon Marchi <simon.marchi@ericsson.com>
2939
2940 * objfiles.h: Don't include symfile.h.
2941 (struct partial_symbol): Remove forward-declaration.
2942 (struct objfile) <global_psymbols, static_psymbols>: Change type
2943 to std::vector<partial_symbol *>.
2944 * objfiles.c (objfile::objfile): Don't memset those fields.
2945 (objfile::~objfile): Don't free those fields.
2946 * psympriv.h (struct psymbol_allocation_list): Remove
2947 forward-declaration.
2948 (add_psymbol_to_list): Change psymbol_allocation_list parameter
2949 to std::vector.
2950 (start_psymtab_common): Change parameters to std::vector.
2951 * psymtab.c: Include algorithm.
2952 (require_partial_symbols): Call shrink_to_fit.
2953 (find_pc_sect_psymbol): Adjust to vector change.
2954 (match_partial_symbol): Likewise.
2955 (lookup_partial_symbol): Likewise.
2956 (psym_relocate): Likewise.
2957 (dump_psymtab): Likewise.
2958 (recursively_search_psymtabs): Likewise.
2959 (compare_psymbols): Remove.
2960 (sort_pst_symbols): Adjust to vector change.
2961 (start_psymtab_common): Likewise.
2962 (end_psymtab_common): Likewise.
2963 (psymbol_bcache_full): De-constify return value.
2964 (add_psymbol_to_bcache): Likewise.
2965 (extend_psymbol_list): Remove.
2966 (append_psymbol_to_list): Adjust to vector change.
2967 (add_psymbol_to_list): Likewise.
2968 (init_psymbol_list): Likewise.
2969 (maintenance_info_psymtabs): Likewise.
2970 (maintenance_check_psymtabs): Likewise.
2971 * symfile.h (struct psymbol_allocation_list): Remove.
2972 * symfile.c (reread_symbols): Adjust to vector change.
2973 * dbxread.c (start_psymtab): Change type of parameters.
2974 (dbx_symfile_read): Adjust to vector change.
2975 (read_dbx_symtab): Likewise.
2976 (start_psymtab): Change type of parameters.
2977 * dwarf2read.c (dwarf2_build_psymtabs): Adjust to vector change.
2978 (create_partial_symtab): Likewise.
2979 (add_partial_symbol): Likewise.
2980 (write_one_signatured_type): Likewise.
2981 (recursively_write_psymbols): Likewise.
2982 * mdebugread.c (parse_partial_symbols): Likewise.
2983 * xcoffread.c (xcoff_start_psymtab): Change type of parameters.
2984 (scan_xcoff_symtab): Adjust to vector change.
2985 (xcoff_initial_scan): Likewise.
2986
3ec5942f
SM
29872017-10-13 Simon Marchi <simon.marchi@ericsson.com>
2988
2989 * ada-typeprint.c (print_dynamic_range_bound): Use std::string.
2990
2399fe6a
YQ
29912017-10-13 Yao Qi <yao.qi@linaro.org>
2992
2993 * features/Makefile: Remove tic6x-*-expedite, add tic6x-expedite.
2994 Remove s390x-*-expedite, add s390x-expedite.
2995
4bf3f4a8
YQ
29962017-10-13 Yao Qi <yao.qi@linaro.org>
2997
2998 * features/s390-gs-linux64.c: Regenerated.
2999 * features/s390x-gs-linux64.c: Regenerated.
3000
9e86da07
TT
30012017-10-13 Tom Tromey <tom@tromey.com>
3002
3003 * compile/compile-object-run.c (do_module_cleanup): Use delete.
3004 * solib.c (update_solib_list, reload_shared_libraries_1): Use
3005 delete.
3006 * symfile.c (symbol_file_add_with_addrs): Use new.
3007 (symbol_file_add_separate): Update comment.
3008 (syms_from_objfile_1, remove_symbol_file_command): Use delete.
3009 * jit.c (jit_object_close_impl): Use new.
3010 (jit_unregister_code): Use delete.
3011 * objfiles.c (objfile::objfile): Rename from allocate_objfile.
3012 (~objfile): Rename from free_objfile.
3013 (free_objfile_separate_debug, do_free_objfile_cleanup)
3014 (free_all_objfiles, objfile_purge_solibs): Use delete.
3015 * objfiles.h (struct objfile): Add constructor and destructor.
3016 Use DISABLE_COPY_AND_ASSIGN. Add initializers to data members.
3017 (allocate_objfile, free_objfile): Don't declare.
3018 (struct objstats): Add initializers.
3019
c2508e90
SM
30202017-10-12 Simon Marchi <simon.marchi@ericsson.com>
3021
3022 * arch-utils.h (simple_displaced_step_copy_insn): Remove.
3023 * arch-utils.c (simple_displaced_step_copy_insn): Remove.
3024 * gdbarch.sh (displaced_step_copy_insn): Adjust comment.
3025 * gdbarch.h: Regenerate.
3026 * i386-linux-tdep.c (i386_linux_displaced_step_copy_insn):
3027 Adjust comment.
3028 * i386-tdep.c (i386_displaced_step_copy_insn): Adjust comment.
3029 (i386_displaced_step_fixup): Adjust comment.
3030 * rs6000-tdep.c (ppc_displaced_step_copy_insn): Adjust comment.
3031
a900ff72
TT
30322017-10-12 Tom Tromey <tom@tromey.com>
3033
3034 * prologue-value.h (pv_area::store_would_trash): Return bool.
3035 (pv_area::find_reg): Likewise.
3036 * prologue-value.c (pv_area::store_would_trash): Return bool.
3037 (pv_area::find_reg): Likewise.
3038
f7b7ed97
TT
30392017-10-12 Tom Tromey <tom@tromey.com>
3040
3041 * s390-linux-tdep.c (s390_store, s390_load)
3042 (s390_check_for_saved, s390_analyze_prologue): Update.
3043 * rx-tdep.c (check_for_saved, rx_analyze_prologue): Update.
3044 * rl78-tdep.c (rl78_analyze_prologue, check_for_saved): Update.
3045 * prologue-value.h (class pv_area): Move from prologue-value.c.
3046 Change names of members. Add constructor, destructor, member
3047 functions.
3048 (make_pv_area, free_pv_area, make_cleanup_free_pv_area)
3049 (pv_area_store, pv_area_fetch, pv_area_store_would_trash)
3050 (pv_area_fetch, pv_area_scan): Don't declare.
3051 * prologue-value.c (struct pv_area::area_entry): Now member of
3052 pv_area.
3053 (struct pv_area): Move to prologue-value.h.
3054 (pv_area::pv_area): Rename from make_pv_area.
3055 (pv_area::~pv_area): Rename from free_pv_area.
3056 (do_free_pv_area_cleanup, make_cleanup_free_pv_area): Remove.
3057 (clear_entries, find_entry, overlaps, store_would_trash, store)
3058 (fetch, find_reg, scan): Now member of pv_area.
3059 Remove "area" argument. Update.
3060 * msp430-tdep.c (check_for_saved, msp430_analyze_prologue):
3061 Update.
3062 * mn10300-tdep.c (push_reg, check_for_saved)
3063 (mn10300_analyze_prologue): Update.
3064 * mep-tdep.c (is_arg_spill, check_for_saved)
3065 (mep_analyze_prologue): Update.
3066 * m32c-tdep.c (m32c_pv_push, m32c_srcdest_fetch)
3067 (m32c_srcdest_store, m32c_pv_enter, m32c_is_arg_spill)
3068 (m32c_is_struct_return, m32c_analyze_prologue): Update.
3069 * arm-tdep.c (thumb_analyze_prologue, arm_analyze_prologue):
3070 Update.
3071 * arc-tdep.c (arc_is_in_prologue, arc_analyze_prologue): Update.
3072 * aarch64-tdep.c (aarch64_analyze_prologue): Update.
3073
466eecee
SM
30742017-10-12 Simon Marchi <simon.marchi@ericsson.com>
3075
3076 * linux-nat.h (linux_nat_set_delete_thread): New declaration.
3077 * linux-nat.c (linux_nat_delete_thread): New variable.
3078 (lwp_free): Invoke linux_nat_delete_thread if set.
3079 (linux_nat_set_delete_thread): New function.
3080 * aarch64-linux-nat.c (_initialize_aarch64_linux_nat): Assign
3081 thread delete callback.
3082 * arm-linux-nat.c (arm_linux_delete_thread): New function.
3083 (_initialize_arm_linux_nat): Assign thread delete callback.
3084 * s390-linux-nat.c (s390_delete_thread): New function.
3085 (_initialize_s390_nat): Assign thread delete callback.
3086 * x86-linux-nat.c (x86_linux_add_target): Likewise.
3087 * nat/aarch64-linux.c (aarch64_linux_delete_thread): New
3088 function.
3089 * nat/aarch64-linux.h (aarch64_linux_delete_thread): New
3090 declaration.
3091 * nat/x86-linux.c (x86_linux_delete_thread): New function.
3092 * nat/x86-linux.h (x86_linux_delete_thread): New declaration.
3093
f71c8822
TT
30942017-10-09 Tom Tromey <tom@tromey.com>
3095
3096 * tui/tui-win.c (tui_set_win_height, parse_scrolling_args): Use
3097 std::string.
3098 * tui/tui-layout.c (enum tui_status): Use std::string.
3099
981a3fb3
TT
31002017-10-11 Tom Tromey <tom@tromey.com>
3101
3102 * gdbthread.h (thread_command): Constify.
3103 * inferior.h (detach_command): Constify.
3104 * top.h (set_history, show_history): Constify.
3105 * arm-tdep.c (set_arm_command, show_arm_command): Constify.
3106 * serial.c (serial_set_cmd, serial_show_cmd): Constify.
3107 * bsd-kvm.c (bsd_kvm_cmd): Constify.
3108 * printcmd.c (set_command): Constify.
3109 (non_const_set_command): New function.
3110 * dcache.c (set_dcache_command, show_dcache_command): Constify.
3111 * breakpoint.c (enable_command, disable_command, delete_command)
3112 (catch_command, tcatch_command, set_breakpoint_cmd)
3113 (show_breakpoint_cmd): Constify.
3114 * macrocmd.c (macro_command): Constify.
3115 * infcmd.c (unset_command, kill_command, detach_command)
3116 (info_proc_cmd): Constify.
3117 * i386-tdep.c (set_mpx_cmd, show_mpx_cmd): Constify.
3118 * auto-load.c (show_auto_load_cmd, set_auto_load_cmd)
3119 (info_auto_load_cmd): Constify.
3120 * target-descriptions.c (set_tdesc_cmd, show_tdesc_cmd)
3121 (unset_tdesc_cmd): Constify.
3122 * ada-lang.c (set_ada_command, show_ada_command)
3123 (maint_set_ada_cmd, maint_show_ada_cmd): Constify.
3124 * guile/guile.c (set_guile_command, show_guile_command)
3125 (info_guile_command): Constify.
3126 * tui/tui-win.c (tui_command, set_tui_cmd, show_tui_cmd):
3127 Constify.
3128 * skip.c (skip_command): Constify.
3129 * compile/compile.c (_initialize_compile): Constify.
3130 * dwarf2read.c (set_dwarf_cmd, show_dwarf_cmd): Constify.
3131 * btrace.c (maint_btrace_cmd, maint_btrace_set_cmd)
3132 (maint_btrace_show_cmd, maint_btrace_pt_set_cmd)
3133 (maint_btrace_pt_show_cmd): Constify.
3134 * remote.c (set_remote_cmd, show_remote_cmd, remote_command):
3135 Constify.
3136 * python/python.c (user_show_python, user_set_python): Constify.
3137 * mips-tdep.c (set_mips_command, show_mips_command)
3138 (set_mipsfpu_command): Constify.
3139 * record-btrace.c (cmd_record_btrace_start)
3140 (cmd_set_record_btrace, cmd_show_record_btrace)
3141 (cmd_set_record_btrace_bts, cmd_show_record_btrace_bts)
3142 (cmd_set_record_btrace_pt, cmd_show_record_btrace_pt): Constify.
3143 * rs6000-tdep.c (set_powerpc_command, show_powerpc_command):
3144 Constify.
3145 * symfile.c (overlay_command): Constify.
3146 * spu-tdep.c (set_spu_command, show_spu_command): Constify.
3147 * cli/cli-logging.c (set_logging_command, show_logging_command):
3148 Constify.
3149 * cli/cli-dump.c (dump_command, append_command)
3150 (srec_dump_command, ihex_dump_command, verilog_dump_command)
3151 (tekhex_dump_command, binary_dump_command)
3152 (binary_append_command): Constify.
3153 * cli/cli-decode.c (struct cmd_list_element): Change type of
3154 "fun".
3155 * cli/cli-cmds.c (info_command, show_command, set_debug)
3156 (show_debug): Constify.
3157 (show_command): Add non-const overload.
3158 * top.c (set_history, show_history): Constify.
3159 * sh-tdep.c (set_sh_command, show_sh_command): Constify.
3160 * command.h (add_prefix_cmd): Accept a cmd_const_cfunc_ftype.
3161 * target.c (target_command): Constify.
3162 * sparc64-tdep.c (info_adi_command): Constify.
3163 * record-full.c (cmd_record_full_start): Constify.
3164 (set_record_full_command): Constify. Fix typo.
3165 (show_record_full_command): Constify.
3166 * thread.c (thread_command, thread_apply_command): Constify.
3167 * memattr.c (dummy_cmd): Constify.
3168 * value.c (function_command): Constify.
3169 * frame.c (set_backtrace_cmd, show_backtrace_cmd): Constify.
3170 * probe.c (info_probes_command): Constify.
3171 * ser-tcp.c (set_tcp_cmd, show_tcp_cmd): Constify.
3172 * gnu-nat.c (set_task_cmd, show_task_cmd, set_thread_cmd)
3173 (show_thread_cmd, set_thread_default_cmd)
3174 (show_thread_default_cmd): Constify.
3175 (check_empty): Constify.
3176 * tracepoint.c (tfind_command): Constify.
3177 * cp-support.c (maint_cplus_command): Constify.
3178 * windows-tdep.c (info_w32_command): Constify.
3179 * record.c (cmd_record_start, set_record_command)
3180 (show_record_command, info_record_command, cmd_record_goto):
3181 Constify.
3182 * ravenscar-thread.c (set_ravenscar_command)
3183 (show_ravenscar_command): Constify.
3184 * utils.c (set_internal_problem_cmd, show_internal_problem_cmd):
3185 Constify.
3186 (add_internal_problem_command): Remove casts.
3187 * arc-tdep.c (maintenance_print_arc_command): Constify.
3188 * valprint.c (set_print, show_print, set_print_raw)
3189 (show_print_raw): Constify.
3190 * maint.c (maintenance_command, maintenance_info_command)
3191 (maintenance_print_command, maintenance_set_cmd)
3192 (maintenance_show_cmd, set_per_command_cmd)
3193 (show_per_command_cmd, maintenance_check_command): Constify.
3194 * language.c (set_check, show_check): Constify.
3195 * typeprint.c (show_print_type, set_print_type): Constify.
3196 * go32-nat.c (go32_info_dos_command): Constify.
3197
fdf44873
TT
31982017-10-11 Tom Tromey <tom@tromey.com>
3199
3200 * breakpoint.c (prepare_re_set_context): Remove.
3201 (breakpoint_re_set_one): Update. Don't use cleanups.
3202 (breakpoint_re_set): Use scoped_restore, std::string, and
3203 scoped_restore_current_language.
3204
81b1e71c
TT
32052017-10-11 Tom Tromey <tom@tromey.com>
3206
3207 * breakpoint.c (commands_command_1): Use std::string.
3208 (cleanup_executing_breakpoints): Remove.
3209 (bpstat_do_actions_1): Use scoped_restore.
3210 (bpstat_check_watchpoint): Use std::string.
3211 (decode_static_tracepoint_spec): Likewise.
3212 (break_range_command): Likewise.
3213 (watch_command_1): Likewise.
3214 (compare_breakpoints): Change argument types.
3215 (clear_command): Use std::vector.
3216 (cleanup_executing_breakpoints): Remove.
3217 (update_global_location_list): Use unique_xmalloc_ptr.
3218 (strace_command): Remove unused declaration.
3219
4f9d9906
JB
32202017-10-11 John Baldwin <jhb@FreeBSD.org>
3221
3222 * Makefile.in (ALLDEPFILES): Add arm-fbsd-nat.c.
3223 * NEWS: Mention new FreeBSD/arm native configuration.
3224 * configure.host: Add arm*-*-freebsd*.
3225 * configure.nat: Likewise.
3226 * arm-fbsd-nat.c: New file.
3227
7176dfd2
JB
32282017-10-11 John Baldwin <jhb@FreeBSD.org>
3229
3230 * Makefile.in (ALL_TARGET_OBS): Add arm-fbsd-tdep.o.
3231 (ALLDEPFILES): Add arm-fbsd-tdep.c.
3232 * NEWS: Mention new FreeBSD/arm target.
3233 * configure.tgt: Add arm*-*-freebsd*.
3234 * arm-fbsd-tdep.c: New file.
3235 * arm-fbsd-tdep.h: New file.
3236
fe220226
MR
32372017-10-11 Maciej W. Rozycki <macro@imgtec.com>
3238
3239 * linux-tdep.c (linux_make_corefile_notes): Remove call to
3240 `gdbarch_elfcore_write_linux_prpsinfo'.
3241 * gdbarch.sh (elfcore_write_linux_prpsinfo): Remove architecture
3242 method.
3243 (elf_internal_linux_prpsinfo): Remove declaration.
3244 * gdbarch.h: Regenerate.
3245 * gdbarch.c: Regenerate.
3246
a2f63b2e
MR
32472017-10-11 Maciej W. Rozycki <macro@imgtec.com>
3248
3249 * ppc-linux-tdep.c (ppc_linux_init_abi): Remove call to
3250 `set_gdbarch_elfcore_write_linux_prpsinfo'.
3251
458ca1d0
PA
32522017-10-11 Pedro Alves <palves@redhat.com>
3253
3254 * breakpoint.c (reattach_breakpoints): Delete.
3255 * breakpoint.h (reattach_breakpoints): Delete.
3256
905014d7
SM
32572017-10-11 Simon Marchi <simon.marchi@ericsson.com>
3258
3259 * symfile.c (registered_sym_fns): Make struct, not typedef.
3260 (DEF_VEC_O (registered_sym_fns)): Remove.
3261 (symtab_fns): Change type to std::vector.
3262 (add_symtab_fns): Adjust.
3263 (find_sym_fns): Adjust.
3264
56d704da
AK
32652017-10-11 Anton Kolesov <Anton.Kolesov@synopsys.com>
3266
3267 * arc-tdep.c (arc_gdbarch_init): Pass proper cpu value to disassembler.
3268 * arc-tdep.h (arc_arch_is_em): New function.
3269 (arc_arch_is_hs): Likewise.
3270
7fa29be9
EB
32712017-10-11 Egeyar Bagcioglu <egeyar.bagcioglu@oracle.com>
3272
3273 * macrotab.h (macro_lookup_inclusion): Remove unnecessary
3274 parentheses in the declaration.
3275 (macro_lookup_inclusion): Likewise.
3276 (macro_lookup_definition): Likewise.
3277 * p-lang.h (pascal_builtin_types): Likewise.
3278 * tui/tui-data.c (tui_win_list): Likewise.
3279 * tui/tui-data.h (tui_win_list): Likewise.
3280 * utils.h (make_cleanup_free_section_addr_info): Likewise.
3281
d9b477e3
KB
32822017-10-11 Mark Rages <markrages@gmail.com>
3283
3284 * target-memory.c (block_boundaries): Fix for block address not
3285 aligned on block size.
3286
65630365
PA
32872017-10-10 Pedro Alves <palves@redhat.com>
3288 Tom Tromey <tom@tromey.com>
3289
3290 * breakpoint.c (struct captured_breakpoint_query_args)
3291 (do_captured_breakpoint_query, gdb_breakpoint_query): Delete.
3292 (print_breakpoint): New.
3293 * breakpoint.h (print_breakpoint): Declare.
3294 * common/common-exceptions.h (enum return_reason): Remove
3295 references to catch_exceptions.
3296 * exceptions.c (catch_exceptions, catch_exceptions_with_msg):
3297 Delete.
3298 * exceptions.h (catch_exceptions_ftype, catch_exceptions)
3299 (catch_exception_ftype, catch_exceptions_with_msg): Delete.
3300 * gdb.h: Delete.
3301 * gdbthread.h (thread_select): Declare.
3302 * mi/mi-cmd-break.c: Don't include gdb.h.
3303 (breakpoint_notify): Use print_breakpoint.
3304 * mi/mi-cmd-catch.c: Don't include gdb.h.
3305 * mi/mi-interp.c: Don't include gdb.h.
3306 (mi_print_breakpoint_for_event): New.
3307 (mi_breakpoint_created, mi_breakpoint_modified): Use
3308 mi_print_breakpoint_for_event.
3309 * mi/mi-main.c: Don't include gdb.h.
3310 (mi_cmd_thread_select): Parse the global thread ID here. Use
3311 thread_select instead of gdb_thread_select.
3312 (mi_cmd_thread_list_ids): Output "thread-ids" tuple here instead
3313 of using gdb_list_thread_ids.
3314 * remote-fileio.c (do_remote_fileio_request): Change type. Reply
3315 FILEIO_ENOSYS here.
3316 (remote_fileio_request): Use TRY/CATCH instead of
3317 catch_exceptions.
3318 * symfile-mem.c (struct symbol_file_add_from_memory_args)
3319 (symbol_file_add_from_memory_wrapper): Delete.
3320 (add_vsyscall_page): Use TRY/CATCH instead of catch_exceptions.
3321 * thread.c: Don't include gdb.h.
3322 (do_captured_list_thread_ids, gdb_list_thread_ids): Delete.
3323 (thread_alive): Use thread_select.
3324 (do_captured_thread_select): Delete, parts salvaged as ...
3325 (thread_select): ... this new function.
3326 (gdb_thread_select): Delete.
3327
bf469271
PA
33282017-10-10 Pedro Alves <palves@redhat.com>
3329 Tom Tromey <tom@tromey.com>
3330
3331 * breakpoint.c (breakpoint_cond_eval): Change return type to bool
3332 and reverse logic.
3333 (WP_DELETED, WP_VALUE_CHANGED, WP_VALUE_NOT_CHANGED, WP_IGNORE):
3334 No longer macros. Instead ...
3335 (enum wp_check_result): They're now values of this new
3336 enumeration.
3337 (watchpoint_check): Change return type to wp_check_result and
3338 parameter type to bpstat.
3339 (bpstat_check_watchpoint): Use TRY/CATCH instead of catch_errors.
3340 (bpstat_check_breakpoint_conditions): Use TRY/CATCH instead of
3341 catch_errors. Reverse logic of watchpoint_check call.
3342 (breakpoint_re_set_one): Now returns void and takes a breakpoint
3343 pointer as parameter.
3344 (breakpoint_re_set): Use TRY/CATCH instead of catch_errors.
3345 * common/common-exceptions.c (throw_exception_sjlj): Update
3346 comments to avoid mentioning catch_errors.
3347 * exceptions.c (catch_errors): Delete.
3348 * exceptions.h: Update comments to avoid mentioning catch_errors.
3349 (catch_errors_ftype, catch_errors): Delete.
3350 * infrun.c (normal_stop): Use TRY/CATCH instead of catch_errors.
3351 (hook_stop_stub): Delete.
3352 (restore_selected_frame): Change return type to void, and
3353 parameter type to const frame_id &.
3354 (restore_infcall_control_state): Use TRY/CATCH instead of
3355 catch_errors.
3356 * main.c (captured_command_loop): Return void and remove
3357 parameter. Remove references to catch_errors.
3358 (captured_main): Use TRY/CATCH instead of catch_errors.
3359 * objc-lang.c (objc_submethod_helper_data)
3360 (find_objc_msgcall_submethod_helper): Delete.
3361 (find_objc_msgcall_submethod): Use TRY/CATCH instead of
3362 catch_errors.
3363 * record-full.c (record_full_message): Return void.
3364 (record_full_message_args, record_full_message_wrapper): Delete.
3365 (record_full_message_wrapper_safe): Return bool and use TRY/CATCH
3366 instead of catch_errors.
3367 * solib-aix.c (solib_aix_open_symbol_file_object): Change
3368 parameter type to int.
3369 * solib-darwin.c (open_symbol_file_object): Ditto.
3370 * solib-dsbt.c (open_symbol_file_object): Ditto.
3371 * solib-frv.c (open_symbol_file_object): Ditto.
3372 * solib-svr4.c (open_symbol_file_object): Ditto.
3373 * solib-target.c (solib_target_open_symbol_file_object): Ditto.
3374 * solib.c (update_solib_list): Use TRY/CATCH instead of
3375 catch_errors.
3376 * solist.h (struct target_so_ops) <open_symbol_file_object>:
3377 Change type.
3378 * symmisc.c (struct print_symbol_args): Remove.
3379 (dump_symtab_1): Use TRY/CATCH instead of catch_errors.
3380 (print_symbol): Change type.
3381 * windows-nat.c (handle_load_dll, handle_unload_dll): Return void
3382 and remove parameters.
3383 (catch_errors): New.
3384 (get_windows_debug_event): Adjust.
3385
1a56bfa5
TT
33862017-10-09 Tom Tromey <tom@tromey.com>
3387
3388 * mi/mi-main.c (free_splay_tree): Remove.
3389 (list_available_thread_groups): Use splay_tree_up.
3390 * common/gdb_splay_tree.h: New file.
3391
0c478e2d
TT
33922017-10-09 Tom Tromey <tom@tromey.com>
3393
3394 * mi/mi-main.c (do_nothing): Remove.
3395 (list_available_thread_groups): Update.
3396
cbd2b4e3
PA
33972017-10-09 Pedro Alves <palves@redhat.com>
3398
3399 * infrun.c (handle_inferior_event_1) <TARGET_WAITKIND_EXECD>: Skip
3400 reading registers when switching context.
3401
a181c0bf
JB
34022017-10-09 John Baldwin <jhb@FreeBSD.org>
3403
3404 * fbsd-nat.c (fbsd_siginfo_size): Use gdbarch_long_bit.
3405 (fbsd_convert_siginfo): Likewise.
3406 * fbsd-tdep.c (fbsd_core_xfer_siginfo): Likewise.
3407
6e66f753
SM
34082017-10-09 Simon Marchi <simon.marchi@polymtl.ca>
3409
3410 * configure.ac (try_guile_versions): Remove guile-2.2.
3411 * configure: Regenerate.
3412
890e9790
TT
34132017-10-09 Tom Tromey <tom@tromey.com>
3414
3415 * Makefile.in (COMPILE.post, POSTCOMPILE): Restore $(basename).
3416 (COMPILE.pre): Use $(CXX).
3417
109483d9
PA
34182017-10-09 Pedro Alves <palves@redhat.com>
3419
3420 * cp-support.c (cp_remove_params): Return a gdb::unique_xmalloc_ptr.
3421 Use bool.
3422 (overload_list_add_symbol): Adjust to use gdb::unique_xmalloc_ptr.
3423 * cp-support.h (cp_remove_params): Now returns a
3424 gdb::unique_xmalloc_ptr.
3425 * dwarf2read.c (find_slot_in_mapped_hash): Now returns bool.
3426 Adjust to cp_remove_params returning a gdb::unique_xmalloc_ptr.
3427 * psymtab.c (psymtab_search_name): Adjust to cp_remove_params
3428 returning a gdb::unique_xmalloc_ptr.
3429 (lookup_partial_symbol): Adjust to use gdb::unique_xmalloc_ptr.
3430 * stack.c (find_frame_funname): Adjust to cp_remove_params
3431 returning a gdb::unique_xmalloc_ptr.
3432
791afaa2
TT
34332017-10-08 Tom Tromey <tom@tromey.com>
3434
3435 * dwarf2read.c (dwarf2_get_dwz_file): Use
3436 gdb::unique_xmalloc_ptr.
3437 (find_slot_in_mapped_hash): Likewise.
3438 (dwarf2_physname): Likewise.
3439 (create_dwo_unit_in_dwp_v1): Use std::string.
3440 (create_dwo_unit_in_dwp_v2): Likewise.
3441 (lookup_dwo_cutu): Likewise.
3442 (inherit_abstract_dies): Use std::vector.
3443 (read_array_type): Likewise.
3444 (dwarf_decode_macros): Remove unused declaration.
3445 (unsigned_int_compar): Remove.
3446 (dwarf2_build_psymtabs_hard): Use scoped_restore.
3447 (psymtabs_addrmap_cleanup): Remove.
3448
30a9c02f
TT
34492017-10-08 Tom Tromey <tom@tromey.com>
3450
3451 * frame-unwind.c (frame_unwind_try_unwinder): Update.
3452 * frame.h (frame_cleanup_after_sniffer): Declare.
3453 (frame_prepare_for_sniffer): Return void.
3454 * frame.c (frame_cleanup_after_sniffer): No longer static. Change
3455 type of argument.
3456 (frame_prepare_for_sniffer): Return void.
3457
757325a3
TT
34582017-10-08 Tom Tromey <tom@tromey.com>
3459
3460 * utils.h (make_cleanup_value_free): Remove.
3461 * utils.c (do_value_free, struct cleanup): Remove.
3462 * dwarf2loc.c (dwarf2_evaluate_loc_desc_full) <DWARF_VALUE_STACK>:
3463 Use gdb_value_up.
3464 * value.h (struct value_deleter): New.
3465 (gdb_value_up): New typedef.
3466
b9c04fb2
TT
34672017-10-08 Tom Tromey <tom@tromey.com>
3468
3469 * symtab.c (free_search_symbols, do_free_search_symbols_cleanup)
3470 (make_cleanup_free_search_symbols): Remove.
3471 (search_symbols): Return std::vector.
3472 (symbol_search::compare_search_syms): Now member of
3473 symbol_search. Change arguments.
3474 (sort_search_symbols_remove_dups): Change arguments. Rewrite.
3475 (symtab_symbol_info, rbreak_command): Update.
3476 * symtab.h (struct symbol_search) <next>: Remove.
3477 Add constructors.
3478 (symbol_search::operator<): New function.
3479 (symbol_search::operator==): New function.
3480 (search_symbols): Remove std::vector.
3481 (free_search_symbols, make_cleanup_free_search_symbols): Remove.
3482 (symbol_search::compare_search_syms): Declare.
3483
0d28b0a5
YQ
34842017-10-06 Yao Qi <yao.qi@linaro.org>
3485
3486 * Makefile.in (ALL_64_TARGET_OBS): Replace aarch64-insn.o with
3487 arch/aarch64-insn.o.
3488 Remove one rule.
3489 * configure.tgt: Replace aarch64-insn.o with arch/aarch64-insn.o.
3490
71917808
YQ
34912017-10-06 Yao Qi <yao.qi@linaro.org>
3492
3493 * Makefile.in (ALL_TARGET_OBS): Replace arm.o, arm-get-next-pcs.o,
3494 and arm-linux.o with arch/arm.o, arch/arm-get-next-pcs.o and
3495 arch/arm-linux.o respectively.
3496 * configure.tgt: Likewise.
3497
2081b2b2
YQ
34982017-10-06 Yao Qi <yao.qi@linaro.org>
3499
3500 * Makefile.in (ALL_TARGET_OBS): Rename i386.o to arch/i386.o.
3501 * configure.tgt (i386_tobjs): Replace i386.o with arch/i386.o.
3502
a1b85d28
PA
35032017-10-06 Pedro Alves <palves@redhat.com>
3504
3505 * windows-nat.c: Include <algorithm>.
3506
d97987e2
YQ
35072017-10-06 Yao Qi <yao.qi@linaro.org>
3508
3509 * configure.tgt (i386_tobjs): New variable.
3510 (amd64_tobjs): New variable.
3511 Set $cpu_obs and $os_obs.
3512
f38307f5
YQ
35132017-10-06 Yao Qi <yao.qi@linaro.org>
3514
3515 * Makefile.in (CONFIG_SRC_SUBDIR): New.
3516 (ALL_64_TARGET_OBS): Replace amd64.o with arch/amd64.o.
3517 (clean): Remove object files and dependency files.
3518 (distclean): Remove the directory.
3519 * configure.ac: Invoke AC_CONFIG_COMMANDS.
3520 * configure: Re-generated.
3521 * configure.tgt: Replace amd64.o with arch/amd64.o.
3522
2f924de6
JM
35232017-10-05 Jose E. Marchesi <jose.marchesi@oracle.com>
3524
3525 PR build/22188
3526 * arm-tdep.c (arm_decode_misc_memhint_neon): Fix decoding of CPS
3527 and SETEND.
3528
2fd9d7ca
PA
35292017-10-05 Pedro Alves <palves@redhat.com>
3530
3531 * linux-nat.c (linux_child_follow_fork): When following the parent
3532 and detaching the child, consult the parent thread's architecture
3533 instead of the child's.
3534
d13b8493
UW
35352017-10-05 Ulrich Weigand <uweigand@de.ibm.com>
3536
3537 * ax.h: Do not include "doublest.h".
3538 (union agent_val): Remove.
3539
3b4b2f16
UW
35402017-10-05 Ulrich Weigand <uweigand@de.ibm.com>
3541
3542 * dfp.h (MAX_DECIMAL_STRING): Move to dfp.c.
3543 (decimal_to_string): Return std::string object.
3544 (decimal_from_string): Accept std::string object. Return bool.
3545 (decimal_from_integral, decimal_from_doublest): Remove.
3546 (decimal_from_longest): Add prototype.
3547 (decimal_from_ulongest): Likewise.
3548 (decimal_to_longest): Likewise.
3549 (decimal_from_doublest): Likewise.
3550 * dfp.c: Do not include "gdbtypes.h" or "value.h".
3551 (MAX_DECIMAL_STRING): Move here.
3552 (decimal_to_string): Return std::string object.
3553 (decimal_from_string): Accept std::string object. Return bool.
3554 (decimal_from_integral): Remove, replace by ...
3555 (decimal_from_longest, decimal_from_ulongest): ... these new functions.
3556 (decimal_to_longest): New function.
3557 (decimal_from_floating): Remove, replace by ...
3558 (decimal_from_doublest): ... this new function.
3559 (decimal_to_doublest): Update to new decimal_to_string interface.
3560
3561 * value.c (unpack_long): Use decimal_to_longest.
3562 * valops.c (value_cast): Use decimal_from_doublest instead of
3563 decimal_from_floating. Use decimal_from_[u]longest isntead of
3564 decimal_from_integral.
3565 * valarith.c (value_args_as_decimal): Likewise.
3566 * valprint.c (print_decimal_floating): Update to new
3567 decimal_to_string interface.
3568 * printcmd.c (printf_decfloat): Likewise.
3569 * c-exp.y (parse_number): Update to new decimal_from_string interface.
3570
1841ee5d
UW
35712017-10-05 Ulrich Weigand <uweigand@de.ibm.com>
3572
3573 * doublest.h: Do not include "floatformat.h". Remove stale comments.
3574 * gdbtypes.c: Include "floatformat.h".
3575 * value.c: Likewise.
3576 * m68k-tdep.c: Likewise.
3577
3578 * findvar.c: Do not include "floatformat.h".
3579 * amd64-darwin-tdep.c: Likewise.
3580 * arm-linux-tdep.c: Likewise.
3581 * i386-darwin-tdep.c: Likewise.
3582 * i387-tdep.c: Likewise.
3583 * m68k-linux-tdep.c: Likewise.
3584 * mep-tdep.c: Likewise.
3585 * mips-tdep.c: Likewise.
3586 * nios2-tdep.c: Likewise.
3587 * s390-linux-tdep.c: Likewise.
3588 * sparc-obsd-tdep.c: Likewise.
3589 * sparc-tdep.c: Likewise.
3590 * sparc64-tdep.c: Likewise.
3591 * spu-tdep.c: Likewise.
3592 * tic6x-tdep.c: Likewise.
3593 * tilegx-tdep.c: Likewise.
3594 * vax-tdep.c: Likewise.
3595 * xstormy16-tdep.c: Likewise.
3596 * xtensa-tdep.c: Likewise.
3597
3598 * top.c: Do not include "doublest.h".
3599 * aarch64-tdep.c: Likewise.
3600 * alpha-tdep.c: Likewise.
3601 * arm-linux-tdep.c: Likewise.
3602 * m68k-linux-tdep.c: Likewise.
3603 * tilegx-tdep.c: Likewise.
3604 * xstormy16-tdep.c: Likewise.
3605
a80a6471
JB
36062017-10-05 John Baldwin <jhb@FreeBSD.org>
3607
3608 * mips-fbsd-tdep.c (MIPS_INST_ADDIU_A0_SP_N32): Define.
3609 (mipsn32_fbsd_sigframe): Define.
3610 (mips_fbsd_init_abi): Install mipsn32_fbsd_sigframe unwinder
3611 for FreeBSD/mipsn32.
3612
12c4bd7f
JB
36132017-10-05 John Baldwin <jhb@FreeBSD.org>
3614
3615 * fbsd-tdep.c (fbsd_print_auxv_entry): Handle AT_EHDRFLAGS and
3616 AT_HWCAP.
3617
c91933e9
TG
36182017-10-05 Tristan Gingold <tgingold@free.fr>
3619
3620 * MAINTAINERS (Misc): Update my email address.
3621
5cd63fda
PA
36222017-10-04 Pedro Alves <palves@redhat.com>
3623
3624 * remote.c (get_remote_arch_state): New 'gdbarch' parameter. Use
3625 it instead of target_gdbarch.
3626 (get_remote_state, get_remote_packet_size): Adjust
3627 get_remote_arch_state calls, passing down target_gdbarch
3628 explicitly.
3629 (packet_reg_from_regnum, packet_reg_from_pnum): New parameter
3630 'gdbarch' and use it instead of target_gdbarch.
3631 (get_memory_packet_size): Adjust get_remote_arch_state calls,
3632 passing down target_gdbarch explicitly.
3633 (struct stop_reply) <arch>: New field.
3634 (remote_parse_stop_reply): Use the stopped thread's architecture,
3635 not the current inferior's. Save the architecture in the
3636 stop_reply.
3637 (process_stop_reply): Use the stop reply's architecture.
3638 (process_g_packet, remote_fetch_registers)
3639 (remote_prepare_to_store, store_registers_using_G)
3640 (remote_store_registers): Adjust get_remote_arch_state calls,
3641 using the regcache's architecture.
3642 (remote_get_trace_status): Adjust get_remote_arch_state calls,
3643 passing down target_gdbarch explicitly.
3644 * spu-multiarch.c (spu_thread_architecture): Defer to the target
3645 beneath instead of calling target_gdbarch.
3646 * target.c (default_thread_architecture): Use the specified
3647 inferior's architecture, instead of the current inferior's
3648 architecture (via target_gdbarch).
3649
ed4227b7
PA
36502017-10-04 Pedro Alves <palves@redhat.com>
3651
3652 * regcache.c (get_thread_arch_regcache): Remove null_ptid special
3653 case.
3654 (regcache_print): Handle !target_has_registers here instead.
3655
55b11ddf
PA
36562017-10-04 Pedro Alves <palves@redhat.com>
3657
3658 * frame.c (create_test_frame): Delete.
3659 * frame.h (create_test_frame): Delete.
3660 * gdbarch-selftests.c: Include gdbthread.h and target.h.
3661 (class regcache_test): Delete.
3662 (test_target_has_registers, test_target_has_stack)
3663 (test_target_has_memory, test_target_prepare_to_store)
3664 (test_target_store_registers): New functions.
3665 (test_target_ops): New class.
3666 (register_to_value_test): Error out if there's already a
3667 process_stratum (or higher) target pushed. Create a fuller mock
3668 environment, with mock target_ops, inferior, address space, thread
3669 and inferior_ptid.
3670 * progspace.c (struct address_space): Move to ...
3671 * progspace.h (struct address_space): ... here.
3672 * regcache.h (regcache::~regcache, regcache::raw_write)
3673 [GDB_SELF_TEST]: No longer virtual.
3674
4c71c105
SM
36752017-10-04 Simon Marchi <simon.marchi@ericsson.com>
3676
3677 * mi/mi-main.c (list_available_thread_groups): Reverse filter logic.
3678
73dcd72d
PA
36792017-10-04 Pedro Alves <palves@redhat.com>
3680
3681 * guile/scm-breakpoint.c (gdbscm_breakpoint_commands): Move code
3682 out of 'between TRY and CATCH'.
3683
44704526
PA
36842017-10-04 Pedro Alves <palves@redhat.com>
3685
3686 * cli/cli-cmds.c (complete_command): Add missing END_CATCH.
3687 * common/common-exceptions.h (TRY): Open an outermost scope.
3688 Expand intro comment.
3689 (CATCH): Reindent.
3690 (END_CATCH): Close the outermost scope.
3691 * completer.c (complete_line_internal): Add missing END_CATCH.
3692
bc3b087d
SDJ
36932017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
3694
3695 * NEWS (Changes since GDB 8.0): Add entry about new
3696 'set-cwd-on-gdbserver' feature.
3697 (New remote packets): Add entry for QSetWorkingDir.
3698 * common/common-inferior.h (set_inferior_cwd): New prototype.
3699 * infcmd.c (set_inferior_cwd): Remove "static".
3700 (show_cwd_command): Expand text to include remote debugging.
3701 * remote.c: Add PACKET_QSetWorkingDir.
3702 (remote_protocol_features) <QSetWorkingDir>: New entry for
3703 PACKET_QSetWorkingDir.
3704 (extended_remote_set_inferior_cwd): New function.
3705 (extended_remote_create_inferior): Call
3706 "extended_remote_set_inferior_cwd".
3707 (_initialize_remote): Call "add_packet_config_cmd" for
3708 QSetWorkingDir.
3709
d092c5a2
SDJ
37102017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
3711
3712 * NEWS (New commands): Mention "set/show cwd".
3713 * cli/cli-cmds.c (_initialize_cli_cmds): Mention "set cwd" on
3714 "cd" command's help text.
3715 * common/common-inferior.h (get_inferior_cwd): New prototype.
3716 * infcmd.c (inferior_cwd_scratch): New global variable.
3717 (set_inferior_cwd): New function.
3718 (get_inferior_cwd): Likewise.
3719 (set_cwd_command): Likewise.
3720 (show_cwd_command): Likewise.
3721 (_initialize_infcmd): Add "set/show cwd" commands.
3722 * inferior.h (class inferior) <cwd>: New field.
3723 * nat/fork-inferior.c: Include "gdb_tilde_expand.h".
3724 (fork_inferior): Change inferior's cwd before its execution.
3725 * windows-nat.c (windows_create_inferior): Pass inferior's cwd
3726 to CreateProcess.
3727
7da0a886
SDJ
37282017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
3729
3730 * Makefile.in (SFILES): Add gdb_tilde_expand.c.
3731 (HFILES_NO_SRCDIR): Add gdb_tilde_expand.h.
3732 (COMMON_OBS): Add gdb_tilde_expand.o.
3733 * common/gdb_tilde_expand.c: New file.
3734 * common/gdb_tilde_expand.h: Likewise.
3735
db8dd160
MR
37362017-10-03 Maciej W. Rozycki <macro@imgtec.com>
3737
3738 * gdbarch.sh (objfile): Remove duplicate declaration.
3739 * gdbarch.h: Regenerate.
3740
f8bfbf22
TT
37412017-10-03 Tom Tromey <tom@tromey.com>
3742
3743 * utils.c (internal_vproblem): Use string_vprintf.
3744
5178ed48
TT
37452017-10-03 Tom Tromey <tom@tromey.com>
3746
3747 * printcmd.c (info_symbol_command): Use std::string.
3748
8cff8730
TT
37492017-10-03 Tom Tromey <tom@tromey.com>
3750
3751 * top.c (gdb_safe_append_history): Use std::string.
3752
895b8f30
TT
37532017-10-03 Tom Tromey <tom@tromey.com>
3754
3755 * event-top.c (stdin_event_handler): Update.
3756 * main.c (captured_main_1): Update.
3757 * top.h (make_delete_ui_cleanup): Remove.
3758 (struct ui): Add constructor and destructor.
3759 (new_ui, delete_ui): Remove.
3760 * top.c (make_delete_ui_cleanup): Remove.
3761 (new_ui_command): Use std::unique_ptr.
3762 (delete_ui_cleanup): Remove.
3763 (ui::ui): Rename from new_ui. Update.
3764 (free_ui): Remove.
3765 (ui::~ui): Rename from delete_ui. Update.
3766
0efef640
TT
37672017-10-03 Tom Tromey <tom@tromey.com>
3768
3769 * symfile.c (load_progress): Use gdb::byte_vector.
3770
245ad7d3
TT
37712017-10-03 Tom Tromey <tom@tromey.com>
3772
3773 * mi/mi-main.c (mi_cmd_trace_frame_collected): Remove unused
3774 declaration.
3775 * printcmd.c (x_command): Remove unused declaration.
3776 * symfile.c (symbol_file_command): Remove unused declaration.
3777
e05550d7
TT
37782017-10-03 Tom Tromey <tom@tromey.com>
3779
3780 * utils.c (internal_vproblem): Use std::string.
3781 (defaulted_query): Likewise.
3782
b95de2b7
TT
37832017-10-03 Tom Tromey <tom@tromey.com>
3784
3785 * guile/scm-ports.c (ioscm_with_output_to_port_worker): Update.
3786 * top.c (execute_command_to_string): Update.
3787 * utils.c (make_cleanup_restore_page_info): Remove.
3788 (do_restore_page_info_cleanup): Remove.
3789 (set_batch_flag_and_restore_page_info):
3790 New.
3791 (make_cleanup_restore_page_info): Remove.
3792 (set_batch_flag_and_make_cleanup_restore_page_info): Remove.
3793 (~set_batch_flag_and_restore_page_info): New
3794 (make_cleanup_restore_uinteger): Remove.
3795 (make_cleanup_restore_integer): Remove.
3796 (struct restore_integer_closure): Remove.
3797 (restore_integer): Remove.
3798 * utils.h (struct set_batch_flag_and_restore_page_info): New
3799 class.
3800 (set_batch_flag_and_make_cleanup_restore_page_info): Remove.
3801 (make_cleanup_restore_page_info): Remove.
3802 (make_cleanup_restore_uinteger) Remove.
3803 (make_cleanup_restore_integer) Remove.
3804
07036511
TT
38052017-10-03 Tom Tromey <tom@tromey.com>
3806
3807 * record-full.h (record_full_gdb_operation_disable_set): Return
3808 scoped_restore_tmpl<int>.
3809 * infrun.c (adjust_pc_after_break): Update.
3810 (handle_signal_stop): Update.
3811 * record-full.c (record_full_gdb_operation_disable_set): Return
3812 scoped_restore_tmpl<int>.
3813 (record_full_wait_1, record_full_insert_breakpoint)
3814 (record_full_remove_breakpoint, record_full_save)
3815 (record_full_goto_insn): Update.
3816
45320ffa
TT
38172017-10-02 Tom Tromey <tom@tromey.com>
3818
3819 PR rust/22236:
3820 * rust-lang.c (rust_val_print_str): New function.
3821 (val_print_struct): Call it.
3822 (rust_subscript): Preserve name of slice type.
3823
b3e3859b
TT
38242017-10-02 Tom Tromey <tom@tromey.com>
3825
3826 * rust-lang.c (rust_subscript): Handle slices in
3827 EVAL_AVOID_SIDE_EFFECTS case.
3828
01af5e0d
TT
38292017-10-02 Tom Tromey <tom@tromey.com>
3830
3831 * rust-lang.c (rust_slice_type_p): Recognize &str as a slice type.
3832
888e3ddb
TT
38332017-10-02 Tom Tromey <tom@tromey.com>
3834
3835 * rust-lang.h (rust_slice_type): Add "extern".
3836
cc536b21
PA
38372017-10-02 Tom Tromey <tom@tromey.com>
3838 Pedro Alves <palves@redhat.com>
3839
3840 * ada-lang.h (ada_exc_info::operator<): Make const.
3841 (ada_exc_info::operator==): Make const.
3842 * ada-lang.c (ada_exc_info::operator<, ada_exc_info::operator==):
3843 Make const.
3844
386c8614
TT
38452017-09-29 Tom Tromey <tom@tromey.com>
3846
3847 * target.c (read_whatever_is_readable): Change type of "result".
3848 Update.
3849 (free_memory_read_result_vector): Remove.
3850 (read_memory_robust): Change return type. Update.
3851 * mi/mi-main.c (mi_cmd_data_read_memory_bytes): Update. Use
3852 bin2hex, std::string.
3853 * target.h (memory_read_result_s): Remove typedef.
3854 (free_memory_read_result_vector): Remove.
3855 (read_memory_robust): Return std::vector.
3856
789c4b5e
TT
38572017-09-29 Tom Tromey <tom@tromey.com>
3858
3859 * mi/mi-main.c (captured_mi_execute_command): Use scope_restore.
3860
ab816a27
TT
38612017-09-29 Tom Tromey <tom@tromey.com>
3862
3863 * mi/mi-cmd-info.c (mi_cmd_info_ada_exceptions): Update.
3864 * ada-lang.h (struct ada_exc_info): Remove typedef. Declare
3865 operator< and operator==.
3866 (ada_exceptions_list): Return a std::vector.
3867 * ada-lang.c (ada_exc_info::operator<): Rename from
3868 compare_ada_exception_info.
3869 (ada_exc_info::operator==): New.
3870 (sort_remove_dups_ada_exceptions_list): Change type of
3871 "exceptions".
3872 (ada_add_standard_exceptions, ada_add_exceptions_from_frame)
3873 (ada_add_global_exceptions): Likewise.
3874 (ada_exceptions_list_1): Return a std::vector.
3875 (ada_exceptions_list): Likewise.
3876
52f9abe4
TT
38772017-09-29 Tom Tromey <tom@tromey.com>
3878
3879 * mi/mi-main.c (struct print_one_inferior_data) <inferiors>: Now a
3880 'std::set *'.
3881 (print_one_inferior): Update.
3882 (free_vector_of_ints): Remove.
3883 (list_available_thread_groups): Change "ids" to std::set.
3884 (mi_cmd_list_thread_groups): Update.
3885 (struct collect_cores_data) <core>: Now a std::set.
3886 (collect_cores): Update.
3887 (unique): Remove.
3888 (print_one_inferior): Update.
3889
dcd5ddcc
TT
38902017-09-29 Tom Tromey <tom@tromey.com>
3891
3892 * mi/mi-main.c (mi_execute_cli_command): Use std::string.
3893 (mi_execute_async_cli_command): Likewise.
3894 (mi_cmd_trace_frame_collected): Use field_fmt.
3895
45d288cc
TT
38962017-09-29 Tom Tromey <tom@tromey.com>
3897
3898 * mi/mi-main.c (mi_cmd_data_write_memory_bytes): Use
3899 gdb::byte_vector.
3900
6afe2f4a
TT
39012017-09-29 Tom Tromey <tom@tromey.com>
3902
3903 * mi/mi-parse.c (mi_parse): Remove unused declaration.
3904
9813429a
TT
39052017-09-29 Tom Tromey <tom@tromey.com>
3906
3907 * mi/mi-cmd-disas.c (mi_cmd_disassemble): Don't copy "oarg".
3908
2d6960b4
TT
39092017-09-29 Tom Tromey <tom@tromey.com>
3910
3911 * varobj.h (varobj_gen_name): Return std::string.
3912 * varobj.c (varobj_gen_name): Return std::string.
3913 * mi/mi-cmd-var.c (mi_cmd_var_create): Use std::string.
3914 (mi_cmd_var_delete): Don't copy "name".
3915
784c453a
TT
39162017-09-29 Tom Tromey <tom@tromey.com>
3917
3918 * mi/mi-cmd-break.c (mi_argv_to_format): Return std::string.
3919 (mi_cmd_break_insert_1): Update.
3920
a9bc57b9
TT
39212017-09-29 Tom Tromey <tom@tromey.com>
3922
3923 * target.h (make_scoped_defer_target_commit_resume): Update.
3924 * target.c (make_scoped_defer_target_commit_resume): Rename from
3925 make_cleanup_defer_target_commit_resume. Return a
3926 scoped_restore.
3927 * infrun.c (proceed): Use make_scoped_defer_target_commit_resume.
3928
9754d8c4
TT
39292017-09-29 Tom Tromey <tom@tromey.com>
3930
3931 * main.c (captured_main_1): Remove unused declaration.
3932 * spu-multiarch.c (parse_spufs_run): Remove unused declaration.
3933
99ef965c
TT
39342017-09-29 Tom Tromey <tom@tromey.com>
3935
3936 * symtab.c (search_symbols): Remove unused outer cleanup.
3937 (make_source_files_completion_list): Remove unused declaration.
3938
42518ba7
TT
39392017-09-29 Tom Tromey <tom@tromey.com>
3940
3941 * mt-tdep.c (mt_push_dummy_call): Use gdb::byte_vector.
3942
726b2169
TT
39432017-09-29 Tom Tromey <tom@tromey.com>
3944
3945 * xstormy16-tdep.c (xstormy16_push_dummy_call): Use
3946 gdb::byte_vector.
3947
55b06432
TT
39482017-09-29 Tom Tromey <tom@tromey.com>
3949
3950 * complaints.c (vcomplaint): Use std::string.
3951
8abcee91
TT
39522017-09-29 Tom Tromey <tom@tromey.com>
3953
3954 * tracepoint.c (trace_variable_command): Use std::string.
3955 (encode_actions_1): Remove unused declarations.
3956 (create_tsv_from_upload): Use std::string.
3957
6ad94bc7
TT
39582017-09-29 Tom Tromey <tom@tromey.com>
3959
3960 * cp-support.c (gdb_demangle): Use std::string.
3961
2003f3d8
TT
39622017-09-29 Tom Tromey <tom@tromey.com>
3963
3964 * stack.c (parse_frame_specification): Use std::string
3965 (info_frame_command): Use gdb::unique_xmalloc_ptr.
3966
8f8accb5
TT
39672017-09-29 Tom Tromey <tom@tromey.com>
3968
3969 * tilegx-tdep.c (tilegx_push_dummy_call): Use gdb::byte_vector.
3970
200aa7b1
TT
39712017-09-29 Tom Tromey <tom@tromey.com>
3972
3973 * utils.c (vfprintf_maybe_filtered): Use std::string.
3974 (vfprintf_unfiltered): Likewise.
3975
606aae8a
TT
39762017-09-29 Tom Tromey <tom@tromey.com>
3977
3978 * event-top.c (top_level_prompt): Return std::string.
3979 (display_gdb_prompt): Update.
3980
bd413795
TT
39812017-09-29 Tom Tromey <tom@tromey.com>
3982
3983 * unittests/common-utils-selftests.c (format): New function.
3984 (string_vprintf_tests): New function.
3985 (_initialize_common_utils_selftests): Register new tests.
3986 * common/common-utils.c (string_vprintf): New function.
3987 * common/common-utils.h (string_vprintf): Declare.
3988
256642e8
PA
39892017-09-29 Pedro Alves <palves@redhat.com>
3990
3991 * common/rsp-low.c (unpack_varlen_hex): Constify.
3992 * common/rsp-low.h (unpack_varlen_hex): Constify.
3993 * linux-nat.c (linux_child_static_tracepoint_markers_by_strid):
3994 Constify.
3995 * remote.c (remote_set_permissions, read_ptid)
3996 (remote_current_thread, remote_get_threads_with_qthreadinfo)
3997 (remote_static_tracepoint_marker_at)
3998 (remote_static_tracepoint_markers_by_strid)
3999 (stop_reply_extract_thread, remote_parse_stop_reply): Constify.
4000 * tracepoint.c (parse_trace_status, parse_tracepoint_status)
4001 (parse_tracepoint_definition, parse_tsv_definition)
4002 (parse_static_tracepoint_marker_definition): Constify.
4003 * tracepoint.h (parse_static_tracepoint_marker_definition)
4004 (parse_trace_status, parse_tracepoint_status)
4005 (parse_tracepoint_definition, parse_tsv_definition): Constify.
4006
b6bb3468
PA
40072017-09-29 Pedro Alves <palves@redhat.com>
4008
4009 * remote.c (target_buf, target_buf_size): Delete.
4010 (remote_get_noisy_reply): Remove buf_p and sizeof_buf parameters.
4011 Use the connection's packet buffer instead.
4012 All callers adjusted.
4013 (_initialize_remote): Remove references to target_buf and
4014 target_buf_size.
4015
b2f8eb7a
PA
40162017-09-28 Pedro Alves <palves@redhat.com>
4017
4018 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
4019 unittests/common-utils-selftests.c.
4020 (SUBDIR_UNITTESTS_OBS): Add common-utils-selftests.o.
4021 (COMMON_OBS): Remove utils-selftests.o.
4022 * utils-selftests.c: Move to ...
4023 * unittests/common-utils-selftests.c: ... here and rename self
4024 test to "string_printf".
4025
08302ed2
DE
40262017-09-28 Alexander Shaposhnikov <alexander.v.shaposhnikov@gmail.com> (tiny patch)
4027
4028 * dwarf2read.c (open_and_init_dwp_file): Protect against dwp_file
4029 having NULL cus or tus.
4030
96a5a1d3
UW
40312017-09-27 Ulrich Weigand <uweigand@de.ibm.com>
4032
4033 * arm-tdep.c: (convert_from_extended): Remove.
4034 (convert_to_extended): Likewise.
4035 (arm_extract_return_value): Use convert_typed_floating.
4036 (arm_store_return_value): Likewise.
4037
4038 * sh-tdep.h (struct gdbarch_tdep): Add sh_littlebyte_bigword_type.
4039 * sh-tdep.c: Do not include "floatformat.h".
4040 (sh_littlebyte_bigword_type): New function.
4041 (sh_register_convert_to_virtual): Use convert_typed_floating.
4042 (sh_register_convert_to_raw): Likewise.
4043 * sh64-tdep.c: (struct gdbarch_tdep): Add sh_littlebyte_bigword_type.
4044 (sh64_littlebyte_bigword_type): New function.
4045 (sh64_extract_return_value): Use convert_typed_floating.
4046 (sh64_register_convert_to_virtual): Likewise.
4047 (sh64_register_convert_to_raw): Likewise.
4048
0db7851f
UW
40492017-09-27 Ulrich Weigand <uweigand@de.ibm.com>
4050
4051 * doublest.h (floatformat_from_type): Move to gdbtypes.h.
4052 * doublest.c (floatformat_from_type): Move to gdbtypes.c.
4053
4054 * gdbtypes.h (union type_specific): Make field floatformat hold
4055 just a single struct floatformat, not an array.
4056 (floatformat_from_type): Move here.
4057 * gdbtypes.c (floatformat_from_type): Move here. Update to
4058 changed TYPE_FLOATFORMAT definition.
4059 (verify_floatformat): Update to changed TYPE_FLOATFORMAT.
4060 (recursive_dump_type): Likewise.
4061 (init_float_type): Install correct floatformat for byte order.
4062 (arch_float_type): Likewise.
4063
77b7c781
UW
40642017-09-27 Ulrich Weigand <uweigand@de.ibm.com>
4065
4066 * gdbtypes.c (init_type): Change incoming argument from
4067 length-in-bytes to length-in-bits. Assert length is a
4068 multiple of TARGET_CHAR_BITS.
4069 (arch_type, arch_flags_type): Likewise.
4070 (init_integer_type): Update call to init_type.
4071 (init_character_type): Likewise.
4072 (init_boolean_type): Likewise.
4073 (init_float_type): Likewise.
4074 (init_decfloat_type): Likewise.
4075 (init_complex_type): Likewise.
4076 (init_pointer_type): Likewise.
4077 (objfile_type): Likewise.
4078 (arch_integer_type): Update call to arch_type.
4079 (arch_character_type): Likewise.
4080 (arch_boolean_type): Likewise.
4081 (arch_float_type): Likewise.
4082 (arch_decfloat_type): Likewise.
4083 (arch_complex_type): Likewise.
4084 (arch_pointer_type): Likewise.
4085 (gdbtypes_post_init): Likewise.
4086
4087 * dwarf2read.c (dwarf2_init_float_type): Update call to init_type.
4088 (read_base_type): Likewise.
4089 * mdebugread.c (basic_type): Likewise.
4090 * stabsread.c (dbx_init_float_type): Likewise.
4091 (rs6000_builtin_type): Likewise.
4092 (read_range_type): Likewise. Also, fix call to init_integer_type
4093 with erroneous length argument.
4094
4095 * ada-lang.c (ada_language_arch_info): Update call to arch_type.
4096 * d-lang.c (build_d_types): Likewise.
4097 * f-lang.c (build_fortran_types): Likewise.
4098 * go-lang.c (build_go_types): Likewise.
4099 * opencl-lang.c (build_opencl_types): Likewise.
4100 * jit.c (finalize_symtab): Likewise.
4101 * gnu-v3-abi.c (build_gdb_vtable_type): Likewise.
4102 (build_std_type_info_type): Likewise.
4103 * target-descriptions.c (tdesc_gdb_type): Likewise. Also,
4104 update call to arch_flags_type.
4105
4106 * linux-tdep.c (linux_get_siginfo_type_with_fields): Update call to
4107 arch_type.
4108 * fbsd-tdep.c (fbsd_get_siginfo_type): Likewise.
4109 * windows-tdep.c (windows_get_tlb_type): Likewise.
4110
4111 * avr-tdep.c (avr_gdbarch_init): Update call to arch_type.
4112 * ft32-tdep.c (ft32_gdbarch_init): Likewise.
4113 * m32c-tdep.c (make_types): Likewise.
4114 * rl78-tdep.c (rl78_gdbarch_init): Likewise.
4115 (rl78_psw_type): Update call to arch_flags_type.
4116 * m68k-tdep.c (m68k_ps_type): Update call to arch_flags_type.
4117 * rx-tdep.c (rx_psw_type): Likewise.
4118 (rx_fpsw_type): Likewise.
4119 * sparc-tdep.c (sparc_psr_type): Likewise.
4120 (sparc_fsr_type): Likewise.
4121 * sparc64-tdep.c (sparc64_pstate_type): Likewise.
4122 (sparc64_ccr_type): Likewise.
4123 (sparc64_fsr_type): Likewise.
4124 (sparc64_fprs_type): Likewise.
4125
f21b4d5c
TT
41262017-09-27 Tom Tromey <tom@tromey.com>
4127
4128 * findcmd.c (find_command): Constify.
4129
643c2ffa
TT
41302017-09-27 Tom Tromey <tom@tromey.com>
4131
4132 * ada-tasks.c (task_command_1, task_command): Constify.
4133
510e5e56
TT
41342017-09-27 Tom Tromey <tom@tromey.com>
4135
4136 * symtab.c (maintenance_print_symbol_cache)
4137 (maintenance_flush_symbol_cache)
4138 (maintenance_print_symbol_cache_statistics): Constify.
4139
e503b191
TT
41402017-09-27 Tom Tromey <tom@tromey.com>
4141
4142 * inferior.c (detach_inferior_command, kill_inferior_command)
4143 (inferior_command): Constify.
4144
4e001312
TT
41452017-09-27 Tom Tromey <tom@tromey.com>
4146
4147 * regcache.c (regcache_print, maintenance_print_registers)
4148 (maintenance_print_raw_registers)
4149 (maintenance_print_cooked_registers)
4150 (maintenance_print_register_groups)
4151 (maintenance_print_remote_registers): Constify.
4152
77763700
TT
41532017-09-27 Tom Tromey <tom@tromey.com>
4154
4155 * printcmd.c (map_display_numbers, undisplay_command)
4156 (enable_disable_display_command, enable_display_command)
4157 (disable_display_command): Constify.
4158
4495129a
TT
41592017-09-27 Tom Tromey <tom@tromey.com>
4160
4161 * breakpoint.h (delete_command): Don't declare.
4162 * breakpoint.c (delete_command, enable_once_command)
4163 (enable_count_command, enable_delete_command, breakpoint_1)
4164 (maintenance_info_breakpoints, stopin_command, stopat_command)
4165 (delete_command, delete_trace_command, save_breakpoints)
4166 (save_breakpoints_command, save_tracepoints_command): Constify.
4167
3088cf40
TT
41682017-09-27 Tom Tromey <tom@tromey.com>
4169
4170 * macrocmd.c (macro_expand_command, macro_expand_once_command)
4171 (skip_ws, extract_identifier, macro_define_command)
4172 (macro_undef_command, macro_list_command): Constify.
4173
69f476a3
TT
41742017-09-27 Tom Tromey <tom@tromey.com>
4175
4176 * infcmd.c (environment_info, set_environment_command)
4177 (unset_environment_command, path_info, info_proc_cmd_1)
4178 (info_proc_cmd_mappings, info_proc_cmd_stat)
4179 (info_proc_cmd_status, info_proc_cmd_cwd, info_proc_cmd_cmdline)
4180 (info_proc_cmd_exe, info_proc_cmd_all): Constify.
4181
c4a3e68e
TT
41822017-09-27 Tom Tromey <tom@tromey.com>
4183
4184 * i386-tdep.c (i386_mpx_info_bounds, i386_mpx_set_bounds):
4185 Constify.
4186
c9d31bd6
TT
41872017-09-27 Tom Tromey <tom@tromey.com>
4188
4189 * symfile-mem.c (add_symbol_file_from_memory_command): Constify.
4190
1f3f85eb
TT
41912017-09-27 Tom Tromey <tom@tromey.com>
4192
4193 * demangle.c (demangle_command): Constify.
4194
9c504b5d
TT
41952017-09-27 Tom Tromey <tom@tromey.com>
4196
4197 * progspace.c (maintenance_info_program_spaces_command):
4198 Constify.
4199
6663cf91
TT
42002017-09-27 Tom Tromey <tom@tromey.com>
4201
4202 * compile/compile.c (check_raw_argument, compile_file_command)
4203 (compile_code_command, compile_print_command): Constify.
4204
34e5fa26
TT
42052017-09-27 Tom Tromey <tom@tromey.com>
4206
4207 * reggroups.c (maintenance_print_reggroups): Constify.
4208
8384c356
TT
42092017-09-27 Tom Tromey <tom@tromey.com>
4210
4211 * dwarf2read.c (save_gdb_index_command): Constify.
4212
884beb0c
TT
42132017-09-27 Tom Tromey <tom@tromey.com>
4214
4215 * stap-probe.c (info_probes_stap_command): Constify.
4216
e0b2930c
TT
42172017-09-27 Tom Tromey <tom@tromey.com>
4218
4219 * fork-child.c (unset_exec_wrapper_command): Constify.
4220
f938677d
TT
42212017-09-27 Tom Tromey <tom@tromey.com>
4222
4223 * btrace.c (get_uint, get_context_size, no_chunk)
4224 (maint_btrace_packet_history_cmd)
4225 (maint_btrace_clear_packet_history_cmd, maint_btrace_clear_cmd)
4226 (maint_info_btrace_cmd): Constify.
4227
8949cb87
TT
42282017-09-27 Tom Tromey <tom@tromey.com>
4229
4230 * reverse.c (delete_bookmark_command): Constify.
4231
ac88e2de
TT
42322017-09-27 Tom Tromey <tom@tromey.com>
4233
4234 * remote.c (set_memory_packet_size)
4235 (set_memory_write_packet_size, show_memory_write_packet_size)
4236 (set_memory_read_packet_size, show_memory_read_packet_size)
4237 (compare_sections_command, packet_command, remote_put_command)
4238 (remote_get_command, remote_delete_command): Constify.
4239
bd4c9dfe
TT
42402017-09-27 Tom Tromey <tom@tromey.com>
4241
4242 * mips-tdep.c (show_mipsfpu_command, set_mipsfpu_single_command)
4243 (set_mipsfpu_double_command, set_mipsfpu_none_command)
4244 (set_mipsfpu_auto_command): Constify.
4245
5e93d4c6
TT
42462017-09-27 Tom Tromey <tom@tromey.com>
4247
4248 * cli/cli-cmds.h (cd_command): Constify.
4249 * cli/cli-cmds.c (cd_command): Constify.
4250
fc41a75b
TT
42512017-09-27 Tom Tromey <tom@tromey.com>
4252
4253 * thread.c (thread_name_command, thread_find_command): Constify.
4254
67810076
TT
42552017-09-27 Tom Tromey <tom@tromey.com>
4256
4257 * probe.c (enable_probes_command, disable_probes_command):
4258 Constify.
4259
1d8b34a7
TT
42602017-09-27 Tom Tromey <tom@tromey.com>
4261
4262 * symfile.c (symbol_file_command): Constify.
4263 * gdbcore.h (deprecated_file_changed_hook): Constify.
4264 * exec.c (deprecated_file_changed_hook, exec_file_command)
4265 (file_command): Constify.
4266 * defs.h (symbol_file_command): Constify.
4267
442019e1
TT
42682017-09-27 Tom Tromey <tom@tromey.com>
4269
4270 * remote-fileio.c (set_system_call_allowed)
4271 (show_system_call_allowed): Constify.
4272
2983f7cb
TT
42732017-09-27 Tom Tromey <tom@tromey.com>
4274
4275 * tracepoint.c (delete_trace_variable_command)
4276 (tfind_end_command, tfind_start_command, tfind_pc_command)
4277 (tfind_tracepoint_command, tfind_line_command)
4278 (tfind_range_command, tfind_outside_command): Constify.
4279
4fd41b24
TT
42802017-09-27 Tom Tromey <tom@tromey.com>
4281
4282 * ax-gdb.c (maint_agent_printf_command, agent_command)
4283 (agent_eval_command): Constify.
4284
f2fc3015
TT
42852017-09-27 Tom Tromey <tom@tromey.com>
4286
4287 * tracepoint.c (info_scope_command): Constify.
4288 * python/python.c (gdbpy_decode_line): Constify.
4289 * python/py-breakpoint.c (bppy_init): Constify.
4290 * mi/mi-cmd-break.c (mi_cmd_break_insert_1): Constify.
4291 * location.h: (new_linespec_location)
4292 (string_to_event_location_basic, string_to_event_location):
4293 Constify.
4294 * location.c (new_linespec_location)
4295 (string_to_event_location_basic, string_to_event_location):
4296 Constify.
4297 * linespec.h (decode_line_with_current_source)
4298 (decode_line_with_last_displayed, linespec_lex_to_end): Constify.
4299 * linespec.c (linespec_lex_to_end)
4300 (decode_line_with_current_source)
4301 (decode_line_with_last_displayed): Constify.
4302 * guile/scm-breakpoint.c (gdbscm_register_breakpoint_x):
4303 Constify.
4304 * cli/cli-cmds.c (edit_command, list_command): Constify.
4305 * breakpoint.h (until_break_command, watch_command_wrapper)
4306 (awatch_command_wrapper, rwatch_command_wrapper)
4307 (init_ada_exception_breakpoint): Constify.
4308 * breakpoint.c (break_command_1, dprintf_command)
4309 (break_range_command, watch_command_wrapper)
4310 (rwatch_command_wrapper, awatch_command_wrapper)
4311 (until_break_command, init_ada_exception_breakpoint)
4312 (strace_marker_create_sals_from_location, trace_command)
4313 (ftrace_command, strace_command, struct tracepoint): Constify.
4314 * ax-gdb.c (agent_command_1): Constify.
4315 * ada-lang.c (ada_exception_sal): Constify.
4316
8c2f95f4
TT
43172017-09-27 Tom Tromey <tom@tromey.com>
4318
4319 * record.c (cmd_record_delete, cmd_record_stop, cmd_record_save)
4320 (cmd_record_goto_begin, cmd_record_goto_end, get_insn_number)
4321 (get_context_size, no_chunk, get_insn_history_modifiers)
4322 (cmd_record_insn_history, get_call_history_modifiers)
4323 (cmd_record_call_history): Constify.
4324
a0d65762
TT
43252017-09-27 Tom Tromey <tom@tromey.com>
4326
4327 * source.c (show_substitute_path_command)
4328 (unset_substitute_path_command, set_substitute_path_command):
4329 Constify.
4330
58971144
TT
43312017-09-27 Tom Tromey <tom@tromey.com>
4332
4333 * typeprint.c (maintenance_print_type): Constify.
4334 * maint.c (maintenance_dump_me, maintenance_demangle)
4335 (maintenance_time_display, maintenance_info_sections)
4336 (maintenance_print_statistics, maintenance_deprecate)
4337 (maintenance_undeprecate): Constify.
4338 (maintenance_do_deprecate): Constify. Use std::string.
4339 (maintenance_selftest): Constify.
4340 * gdbtypes.h (maintenance_print_type): Constify.
4341
c482f52c
TT
43422017-09-27 Tom Tromey <tom@tromey.com>
4343
4344 * hppa-tdep.c (unwind_command): Constify.
4345
e100df1a
TT
43462017-09-27 Tom Tromey <tom@tromey.com>
4347
4348 * target-descriptions.c (unset_tdesc_filename_cmd)
4349 (maint_print_c_tdesc_cmd, maintenance_check_xml_descriptions):
4350 Constify.
4351
31d56ade
TT
43522017-09-27 Tom Tromey <tom@tromey.com>
4353
4354 * dummy-frame.c (maintenance_print_dummy_frames): Constify.
4355
b961da0b
TT
43562017-09-27 Tom Tromey <tom@tromey.com>
4357
4358 * tui/tui.c (tui_enable_command, tui_disable_command): Constify.
4359
e2d8ae16
TT
43602017-09-27 Tom Tromey <tom@tromey.com>
4361
4362 * tui/tui-regs.c (tui_reg_command): Constify.
4363
863779b0
TT
43642017-09-27 Tom Tromey <tom@tromey.com>
4365
4366 * skip.c (skip_file_command, skip_function_command)
4367 (skip_enable_command, skip_disable_command, skip_delete_command):
4368 Constify.
4369
cdb34d4a
TT
43702017-09-27 Tom Tromey <tom@tromey.com>
4371
4372 * record-btrace.c (cmd_record_btrace_bts_start)
4373 (cmd_record_btrace_pt_start): Constify.
4374
e99c83e7
TT
43752017-09-27 Tom Tromey <tom@tromey.com>
4376
4377 * symmisc.c (maintenance_print_symbols)
4378 (maintenance_print_msymbols, maintenance_print_objfiles)
4379 (maintenance_info_symtabs, maintenance_check_symtabs)
4380 (maintenance_expand_symtabs, maintenance_info_line_tables):
4381 Constify.
4382
32faf971
TT
43832017-09-27 Tom Tromey <tom@tromey.com>
4384
4385 * top.c (new_ui_command): Constify.
4386
2cf311eb
TT
43872017-09-27 Tom Tromey <tom@tromey.com>
4388
4389 * symfile.c (add_symbol_file_command)
4390 (remove_symbol_file_command, list_overlays_command)
4391 (map_overlay_command, unmap_overlay_command)
4392 (overlay_auto_command, overlay_manual_command)
4393 (overlay_off_command, overlay_load_command): Constify.
4394
e6738699
TT
43952017-09-27 Tom Tromey <tom@tromey.com>
4396
4397 * spu-tdep.c (info_spu_event_command, info_spu_signal_command)
4398 (info_spu_mailbox_command, info_spu_dma_command)
4399 (info_spu_proxydma_command): Constify.
4400
aa360cd5
TT
44012017-09-27 Tom Tromey <tom@tromey.com>
4402
4403 * cli/cli-logging.c (set_logging_on, set_logging_off): Constify.
4404
898241a5
TT
44052017-09-27 Tom Tromey <tom@tromey.com>
4406
4407 * cli/cli-script.c (user_defined_command): Constify.
4408
2d0ac106
TT
44092017-09-27 Tom Tromey <tom@tromey.com>
4410
4411 * cli/cli-dump.c (dump_memory_command, dump_value_command)
4412 (dump_srec_memory, dump_srec_value, dump_ihex_memory)
4413 (dump_ihex_value, dump_verilog_memory, dump_verilog_value)
4414 (dump_tekhex_memory, dump_tekhex_value, dump_binary_memory)
4415 (dump_binary_value, append_binary_memory, append_binary_value):
4416 Constify.
4417 (struct dump_context) <func>: Constify.
4418 (add_dump_command): Update.
4419
dede02ce
TT
44202017-09-27 Tom Tromey <tom@tromey.com>
4421
4422 * cli/cli-cmds.c (show_version, show_configuration)
4423 (source_command, show_user): Constify.
4424
d3cb6b99
TT
44252017-09-27 Tom Tromey <tom@tromey.com>
4426
4427 * target.c (maintenance_print_target_stack): Constify.
4428
1970a12f
TT
44292017-09-27 Tom Tromey <tom@tromey.com>
4430
4431 * interps.c (interpreter_exec_cmd): Constify.
4432
41243651
TT
44332017-09-27 Tom Tromey <tom@tromey.com>
4434
4435 * record-full.c (cmd_record_full_restore): Constify.
4436
4465d9db
TT
44372017-09-27 Tom Tromey <tom@tromey.com>
4438
4439 * memattr.c (enable_mem_command, disable_mem_command)
4440 (delete_mem_command): Constify.
4441
ad25e423
TT
44422017-09-27 Tom Tromey <tom@tromey.com>
4443
4444 * value.c (show_convenience): Constify.
4445
d64097b1
TT
44462017-09-27 Tom Tromey <tom@tromey.com>
4447
4448 * gdbcore.h (core_file_command): Update.
4449 * corefile.c (core_file_command): Constify.
4450
4d4589ef
TT
44512017-09-27 Tom Tromey <tom@tromey.com>
4452
4453 * user-regs.c (maintenance_print_user_registers): Constify.
4454
32a7bf17
TT
44552017-09-27 Tom Tromey <tom@tromey.com>
4456
4457 * cp-namespace.c (maintenance_cplus_namespace): Constify.
4458
4a475551
TT
44592017-09-27 Tom Tromey <tom@tromey.com>
4460
4461 * cp-support.c (first_component_command): Constify.
4462
990b9f9f
TT
44632017-09-27 Tom Tromey <tom@tromey.com>
4464
4465 * psymtab.c (maintenance_print_psymbols)
4466 (maintenance_info_psymtabs, maintenance_check_psymtabs):
4467 Constify.
4468
c281872e
TT
44692017-09-27 Tom Tromey <tom@tromey.com>
4470
4471 * windows-tdep.c (display_tib): Constify.
4472
5b64bf74
TT
44732017-09-27 Tom Tromey <tom@tromey.com>
4474
4475 * linux-fork.c (delete_checkpoint_command)
4476 (detach_checkpoint_command): Constify.
4477
4ada038f
TT
44782017-09-27 Tom Tromey <tom@tromey.com>
4479
4480 * cp-abi.c (set_cp_abi_cmd, show_cp_abi_cmd): Constify.
4481
57f5a81b
TT
44822017-09-27 Tom Tromey <tom@tromey.com>
4483
4484 * arc-tdep.c (dump_arc_instruction_command): Constify.
4485
b0a8e6c4
TT
44862017-09-27 Tom Tromey <tom@tromey.com>
4487
4488 * valprint.c (set_radix, show_radix): Constify.
4489
8d97dc1c
TT
44902017-09-27 Tom Tromey <tom@tromey.com>
4491
4492 * dtrace-probe.c (info_probes_dtrace_command): Constify.
4493
eb7c454d
TT
44942017-09-27 Tom Tromey <tom@tromey.com>
4495
4496 * command.h (not_just_help_class_command): Update.
4497 * cli/cli-decode.h (not_just_help_class_command): Update.
4498 * cli/cli-decode.c (not_just_help_class_command): Constify.
4499
e4e33335
TT
45002017-09-27 Tom Tromey <tom@tromey.com>
4501
4502 * gdb_bfd.c (maintenance_info_bfds): Constify.
4503
0450cc4c
TT
45042017-09-27 Tom Tromey <tom@tromey.com>
4505
4506 * cli/cli-decode.c (add_cmd, set_cmd_cfunc): New function
4507 overloads.
4508 (do_add_cmd): Rename from add_cmd. Don't call set_cmd_cfunc.
4509 (do_const_cfunc): New function.
4510 (cmd_cfunc_eq): New overload.
4511 (cli_user_command_p): Check do_const_cfunc.
4512 * cli/cli-decode.h (struct cmd_list_element) <function>: New field
4513 const_cfunc.
4514 * command.h (add_cmd): Add const overload and no-function
4515 overload.
4516 (set_cmd_cfunc): Add const overload.
4517 (cmd_const_cfunc_ftype): Declare.
4518 (cmd_cfunc_eq): Add const overload.
4519 * breakpoint.c, cli-cmds.c, cli-dump.c, guile/scm-cmd.c,
4520 python/py-cmd.c, target.c, tracepoint.c: Use no-function add_cmd
4521 overload.
4522
a9bbfbd8
TT
45232017-09-27 Tom Tromey <tom@tromey.com>
4524
4525 * macroexp.c (get_next_token_for_substitution): New function.
4526 (substitute_args): Call it. Check for __VA_OPT__.
4527
5230b05a
WT
45282017-09-26 Walfred Tedeschi <walfred.tedeschi@intel.com>
4529 Pedro Alves <palves@redhat.com>
4530
4531 * dwarf2read.c (dwarf2_cu): Remove field producer_is_icc and add
4532 producer_is_icc_lt_14.
4533 (producer_is_icc_lt_14): New function.
4534 (check_producer): Add code for checking version of ICC.
4535 (producer_is_icc): Move to producer.c.
4536 (read_structure_type): Restrict ICC workaround to ICC<14.
4537 * producer.c: Include selftest.h.
4538 (producer_is_icc, producer_parsing_tests, _initialize_producer):
4539 New functions.
4540 * producer.h (producer_is_icc): New declaration.
4541
b32b108a
WT
45422017-09-26 Walfred Tedeschi <walfred.tedeschi@intel.com>
4543
4544 * Makefile.in (SFILES): Add producer.c.
4545 (COMMON_OBS): Add producer.o
4546 * amd64-tdep.c (producer.h): Add new include.
4547 * dwarf2read.c (producer.h): Add new include.
4548 * producer.c: New file.
4549 * producer.h: New file.
4550 * utils.c (producer_is_gcc, producer_is_gcc_ge_4): Move to
4551 producer.c.
4552 * utils.h (producer_is_gcc, producer_is_gcc_ge_4): Move to
4553 producer.h.
4554
5007d765
MK
45552017-09-26 Matthias Klose <doko@ubuntu.com>
4556
4557 * configure.ac: Search ncursesw before ncurses.
4558 Check ncursesw/ncurses.h before ncurses/ncurses.h.
4559 * gdb_curses.h: Include <ncursesw/ncurses.h>
4560 * config.in, configure: Regenerate.
4561
281c4447
RO
45622017-09-26 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
4563
4564 PR gdb/22185
4565 * configure.host <*-*-solaris2.[01], *-*-solaris2.[2-9]*>: Mark as
4566 obsolete.
4567 Use gdb_host sol2 for i[34567]86-*-solaris2*, x86_64-*-solaris2*.
4568 Remove i386sol2 support.
4569 * configure.nat <i386sol2>: Remove.
4570 <sol2-64>: Fold into ...
4571 <sol2>: ... this.
4572 Move common settings to default section.
4573 Add sol-thread.o.
4574 * configure.tgt <i[34567]86-*-solaris2.1[0-9]*,
4575 x86_64-*-solaris2.1[0-9]*>: Rename to ...
4576 <i[34567]86-*-solaris2*, x86_64-*-solaris2*>: ... this.
4577 <i[34567]86-*-solaris*>: Remove.
4578 <sparc-*-solaris2.[0-6], sparc-*-solaris2.[0-6].*>: Remove.
4579
4580 * configure.ac: Remove wctype in libw check.
4581 (_MSE_INT_H): Don't define on Solaris 7-9.
4582 <solaris*>: Remove libthread_db.so.1 check.
4583 * configure: Regenerate.
4584 * config.in: Regenerate.
4585
4586 * proc-service.c: Remove PROC_SERVICE_IS_OLD handling.
4587 (gdb_ps_prochandle_t, gdb_ps_read_buf_t, gdb_ps_write_buf_t)
4588 (gdb_ps_size_t): Remove.
4589 Use base types in users.
4590 * sol-thread.c: Likewise, also for gdb_ps_addr_t.
4591
4592 * NEWS (Changes since GDB 8.0): Document Solaris 2.0-9 removal.
4593
39b06c20
RO
45942017-09-26 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
4595
4596 PR build/22206
4597 * sparc64-tdep.c (adi_tag_fd): Print pid as long.
4598 (adi_is_addr_mapped): Likewise.
4599 (PSR_ICC): Don't redefine.
4600 (PSR_IMPL): Likewise.
4601
6c3e20f1
TT
46022017-09-25 Tom Tromey <tom@tromey.com>
4603
4604 * regcache.c (regcache::dump): Use string_printf.
4605
b292235f
TT
46062017-09-25 Tom Tromey <tom@tromey.com>
4607
4608 * regcache.c (class regcache_invalidator): New.
4609 (struct register_to_invalidate): Remove.
4610 (make_cleanup_regcache_invalidate): Remove.
4611 (regcache::raw_write): Use regcache_invalidator.
4612
9ac86b52
TT
46132017-09-25 Tom Tromey <tom@tromey.com>
4614
4615 * spu-tdep.c (spu2ppu_sniffer): Update.
4616 * regcache.h (make_cleanup_regcache_xfree): Don't declare.
4617 * regcache.c (do_regcache_xfree, make_cleanup_regcache_xfree):
4618 Remove.
4619 * ppc-linux-tdep.c (ppu2spu_sniffer): Update.
4620 * mi/mi-main.c (mi_cmd_data_list_changed_registers): Update.
4621 * frame.h (frame_save_as_regcache): Return std::unique_ptr.
4622 * frame.c (frame_save_as_regcache): Return std::unique_ptr.
4623 (frame_pop): Update.
4624
c0e383c6
TT
46252017-09-25 Tom Tromey <tom@tromey.com>
4626
4627 * spu-tdep.c (spu2ppu_dealloc_cache): Use delete.
4628 * regcache.h (regcache_xfree): Don't declare.
4629 * regcache.c (regcache_xfree): Remove.
4630 (do_regcache_xfree): Use delete.
4631 * ppc-linux-tdep.c (ppu2spu_dealloc_cache): Use delete.
4632 * linux-fork.c (free_fork): Use delete.
4633 (fork_save_infrun_state): Likewise.
4634 * jit.c (jit_dealloc_cache): Use delete.
4635 * infrun.c (discard_infcall_suspend_state): Use delete.
4636
791199cc
TT
46372017-09-25 Tom Tromey <tom@tromey.com>
4638
4639 * regcache.h (regcache_xmalloc): Don't declare.
4640 (regcache_raw_set_cached_value): Update comment.
4641 * regcache.c (regcache_xmalloc): Remove.
4642 * ppc-linux-tdep.c (ppu2spu_sniffer): Use new.
4643 * jit.c (jit_frame_sniffer): Use new.
4644 * frame.c (frame_save_as_regcache): Use new.
4645
289e23aa
AA
46462017-09-25 Andreas Arnez <arnez@linux.vnet.ibm.com>
4647
4648 * NEWS: Advertise support for guarded-storage registers on IBM z.
4649
1b63490c
AA
46502017-09-25 Andreas Arnez <arnez@linux.vnet.ibm.com>
4651
4652 * s390-linux-nat.c (have_regset_gs): New static variable.
4653 (s390_linux_fetch_inferior_registers): Handle guarded-storage
4654 control block and guarded-storage broadcast control regsets.
4655 (s390_read_description): Detect whether the target has
4656 guarded-storage support, return appropriate tdesc.
4657 * s390-linux-tdep.c (features/s390-gs-linux64.c): New include.
4658 (features/s390x-gs-linux64.c): Likewise.
4659 (struct gdbarch_tdep) <have_gs>: New field.
4660 (s390_regmap_gs, s390_regmap_gsbc, s390_gs_regset)
4661 (s390_gsbc_regset): New variables.
4662 (s390_iterate_over_regset_sections): Iterate over s390_gs_regset
4663 and s390_gsbc_regset, if applicable.
4664 (s390_core_read_description): Check whether core file was from a
4665 target with guarded-storage support; include appropriate regsets.
4666 (s390_gdbarch_init): Add registers for guarded-storage support.
4667 (_initialize_s390_tdep): Initialize new target descriptions that
4668 include registers for guarded-storage support.
4669 * s390-linux-tdep.h (HWCAP_S390_GS, S390_GSD_REGNUM)
4670 (S390_GSSM_REGNUM, S390_GSEPLA_REGNUM)
4671 (S390_BC_GSD_REGNUM, S390_BC_GSSM_REGNUM): New defines.
4672 (S390_NUM_REGS): Adjust macro definition.
4673 (s390_gs_regset, s390_gsbc_regset, tdesc_s390_gs_linux64)
4674 (tdesc_s390x_gs_linux64): New declarations.
4675
96235dc1
AA
46762017-09-25 Andreas Arnez <arnez@linux.vnet.ibm.com>
4677
4678 * features/s390-gs-linux64.xml: New file.
4679 * features/s390-gs.xml: New file.
4680 * features/s390-gsbc.xml: New file.
4681 * features/s390x-gs-linux64.xml: New file.
4682 * features/Makefile (WHICH): Add s390-gs-linux64 and
4683 s390x-gs-linux64.
4684 (s390-gs-linux64-expedite, s390x-gs-linux64-expedite): New macros.
4685 (XMLTOC): Add s390-gs-linux64.xml and s390x-linux64.xml.
4686 * features/s390-gs-linux64.c: New generated file.
4687 * features/s390x-gs-linux64.c: New file.
4688 * regformats/s390-gs-linux64.dat: New file.
4689 * regformats/s390x-gs-linux64.dat: New file.
4690
b4a7c699
TT
46912017-09-23 Tom Tromey <tom@tromey.com>
4692
4693 * defs.h (make_cleanup_override_quit_handler): Don't declare.
4694
c2f97536
TT
46952017-09-22 Tom Tromey <tom@tromey.com>
4696
4697 * utils.c (class scoped_input_handler) <m_quit_handler>: Change
4698 type to scoped_restore_tmpl.
4699 <scoped_input_handler>: Initialize m_quit_handler directly.
4700
43573013
SDJ
47012017-09-22 Sergio Durigan Junior <sergiodj@redhat.com>
4702
4703 * cli/cli-cmds.c (pwd_command): Use "getcwd (NULL, 0)".
4704 (cd_command): Likewise. Free "current_directory" before
4705 assigning to it.
4706 * main.c (captured_main_1): Use "getcwd (NULL, 0)".
4707 * mi/mi-cmd-env.c (mi_cmd_env_pwd): Likewise.
4708 * top.c (gdb_dirbuf): Remove global declaration.
4709 * top.h (gdb_dirbuf): Likewise.
4710
6ec2e0f5
SDJ
47112017-09-22 Sergio Durigan Junior <sergiodj@redhat.com>
4712
4713 * gnulib/aclocal.m4: Regenerate.
4714 * gnulib/config.in: Regenerate.
4715 * gnulib/configure: Regenerate.
4716 * gnulib/import/Makefile.am: Regenerate.
4717 * gnulib/import/Makefile.in: Regenerate.
4718 * gnulib/import/assure.h: New file.
4719 * gnulib/import/at-func.c: Likewise
4720 * gnulib/import/chdir-long.c: New file.
4721 * gnulib/import/chdir-long.h: New file.
4722 * gnulib/import/cloexec.c: New file.
4723 * gnulib/import/cloexec.h: New file.
4724 * gnulib/import/close.c: New file.
4725 * gnulib/import/closedir.c: New file.
4726 * gnulib/import/dirent-private.h: New file.
4727 * gnulib/import/dup-safer.c: New file.
4728 * gnulib/import/dup.c: New file.
4729 * gnulib/import/dup2.c: New file.
4730 * gnulib/import/error.c: New file.
4731 * gnulib/import/error.h: New file.
4732 * gnulib/import/exitfail.c: New file.
4733 * gnulib/import/exitfail.h: New file.
4734 * gnulib/import/fchdir.c: New file.
4735 * gnulib/import/fcntl.c: New file.
4736 * gnulib/import/fcntl.in.h: New file.
4737 * gnulib/import/fd-hook.c: New file.
4738 * gnulib/import/fd-hook.h: New file.
4739 * gnulib/import/fd-safer.c: New file.
4740 * gnulib/import/fdopendir.c: New file.
4741 * gnulib/import/filename.h: New file.
4742 * gnulib/import/filenamecat-lgpl.c: New file.
4743 * gnulib/import/filenamecat.h: New file.
4744 * gnulib/import/fstat.c: New file.
4745 * gnulib/import/fstatat.c: New file.
4746 * gnulib/import/getcwd-lgpl.c: New file.
4747 * gnulib/import/getcwd.c: New file.
4748 * gnulib/import/getdtablesize.c: New file.
4749 * gnulib/import/getlogin_r.c: New file.
4750 * gnulib/import/getprogname.c: New file.
4751 * gnulib/import/getprogname.h: New file.
4752 * gnulib/import/gettext.h: New file.
4753 * gnulib/import/glob-libc.h: New file.
4754 * gnulib/import/glob.c: New file.
4755 * gnulib/import/glob.in.h: New file.
4756 * gnulib/import/intprops.h: New file.
4757 * gnulib/import/m4/chdir-long.m4: New file.
4758 * gnulib/import/m4/close.m4: New file.
4759 * gnulib/import/m4/closedir.m4: New file.
4760 * gnulib/import/m4/d-ino.m4: New file.
4761 * gnulib/import/m4/d-type.m4: New file.
4762 * gnulib/import/m4/dup.m4: New file.
4763 * gnulib/import/m4/dup2.m4: New file.
4764 * gnulib/import/m4/error.m4: New file.
4765 * gnulib/import/m4/fchdir.m4: New file.
4766 * gnulib/import/m4/fcntl.m4: New file.
4767 * gnulib/import/m4/fcntl_h.m4: New file.
4768 * gnulib/import/m4/fdopendir.m4: New file.
4769 * gnulib/import/m4/filenamecat.m4: New file.
4770 * gnulib/import/m4/fstat.m4: New file.
4771 * gnulib/import/m4/fstatat.m4: New file.
4772 * gnulib/import/m4/getcwd-abort-bug.m4: New file.
4773 * gnulib/import/m4/getcwd-path-max.m4: New file.
4774 * gnulib/import/m4/getcwd.m4: New file.
4775 * gnulib/import/m4/getdtablesize.m4: New file.
4776 * gnulib/import/m4/getlogin_r.m4: New file.
4777 * gnulib/import/m4/getprogname.m4: New file.
4778 * gnulib/import/m4/glob.m4: New file.
4779 * gnulib/import/m4/gnulib-cache.m4: Regenerate.
4780 * gnulib/import/m4/gnulib-comp.m4: Regenerate.
4781 * gnulib/import/m4/mempcpy.m4: New file.
4782 * gnulib/import/m4/memrchr.m4: New file.
4783 * gnulib/import/m4/mode_t.m4: New file.
4784 * gnulib/import/m4/msvc-inval.m4: New file.
4785 * gnulib/import/m4/msvc-nothrow.m4: New file.
4786 * gnulib/import/m4/open.m4: New file.
4787 * gnulib/import/m4/openat.m4: New file.
4788 * gnulib/import/m4/opendir.m4: New file.
4789 * gnulib/import/m4/readdir.m4: New file.
4790 * gnulib/import/m4/realloc.m4: New file.
4791 * gnulib/import/m4/rewinddir.m4: New file.
4792 * gnulib/import/m4/save-cwd.m4: New file.
4793 * gnulib/import/m4/strdup.m4: New file.
4794 * gnulib/import/m4/strerror.m4: New file.
4795 * gnulib/import/m4/unistd-safer.m4: New file.
4796 * gnulib/import/mempcpy.c: New file.
4797 * gnulib/import/memrchr.c: New file.
4798 * gnulib/import/msvc-inval.c: New file.
4799 * gnulib/import/msvc-inval.h: New file.
4800 * gnulib/import/msvc-nothrow.c: New file.
4801 * gnulib/import/msvc-nothrow.h: New file.
4802 * gnulib/import/open.c: New file.
4803 * gnulib/import/openat-die.c: New file.
4804 * gnulib/import/openat-priv.h: New file.
4805 * gnulib/import/openat-proc.c: New file.
4806 * gnulib/import/openat.c: New file.
4807 * gnulib/import/openat.h: New file.
4808 * gnulib/import/opendir.c: New file.
4809 * gnulib/import/pipe-safer.c: New file.
4810 * gnulib/import/readdir.c: New file.
4811 * gnulib/import/realloc.c: New file.
4812 * gnulib/import/rewinddir.c: New file.
4813 * gnulib/import/save-cwd.c: New file.
4814 * gnulib/import/save-cwd.h: New file.
4815 * gnulib/import/strdup.c: New file.
4816 * gnulib/import/strerror-override.c: New file.
4817 * gnulib/import/strerror-override.h: New file.
4818 * gnulib/import/strerror.c: New file.
4819 * gnulib/import/unistd--.h: New file.
4820 * gnulib/import/unistd-safer.h: New file.
4821 * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add
4822 "getcwd" and "glob".
4823 * ser-tcp.c: Undefine "close" before redefining it.
4824
432ae719
SM
48252017-09-21 Simon Marchi <simon.marchi@ericsson.com>
4826
4827 * guile/scm-value.c (gdbscm_value_address): Initialize address,
4828 get rid of res_val.
4829
4fa7574e
RO
48302017-09-22 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
4831
4832 * configure.nat <i386sol2,i386>: Add fork-inferior.o to NATDEPFILES.
4833 <sol2,sparc>: Likewise.
4834 <sol2-64,i386>: Likewise.
4835
4836 * warning.m4 (AM_GDB_WARNINGS): Disable -Wunknown-pragmas,
4837 -Wdeprecated-declarations on *-*-solaris*.
4838 * configure: Regenerate.
4839
4840 * procfs.c: Include "nat/inferior.h".
4841 (procfs_info_proc): Fix typo.
4842
f6327dcb
KB
48432017-09-21 Kevin Buettner <kevinb@redhat.com>
4844
4845 * remote.c (vector): Include.
4846 (struct private_thread_info): Add field, thread_handle.
4847 (free_private_thread_info): Deallocate storage associated with
4848 thread handle.
4849 (get_private_info_thread): Initialize `thread_handle' field.
4850 (struct thread_item): Add field, thread_handle.
4851 (clear_threads_listing_context): Deallocate storage associated
4852 with thread handle.
4853 (start_thread): Add support for "handle" attribute.
4854 (thread_attributes): Add "handle".
4855 (remote_get_threads_with_qthreadinfo): Initialize thread_handle
4856 field.
4857 (remote_update_thread_list): Update thread_handle.
4858 (remote_thread_handle_to_thread_info): New function.
4859 (init_remote_ops): Initialize to_thread_handle_to_thread_info.
4860
fbbe5337
KB
48612017-09-21 Kevin Buettner <kevinb@redhat.com>
4862
4863 * python/py-inferior.c (gdbpy_thread_from_thread_handle): New
4864 function.
4865 (inferior_object_methods): Add gdbpy_thread_from_thread_handle.
4866 * python/python-internal.h (thread_object_type): Declare.
4867
e04ee09e
KB
48682017-09-21 Kevin Buettner <kevinb@redhat.com>
4869
4870 * target.h (struct target_ops): Add to_thread_handle_to_thread_info.
4871 (target_thread_handle_to_thread_info): Declare.
4872 * target.c (target_thread_handle_to_thread_info): New function.
4873 * target-delegates.c: Regenerate.
4874 * gdbthread.h (find_thread_by_handle): Declare.
4875 * thread.c (find_thread_by_handle): New function.
4876 * linux-thread-db.c (thread_db_thread_handle_to_thread_info): New
4877 function.
4878 (init_thread_db_ops): Register thread_db_thread_handle_to_thread_info.
4879
1e5b66ed
SM
48802017-09-21 Simon Marchi <simon.marchi@ericsson.com>
4881
4882 * nat/linux-waitpid.c (linux_debug): Add ATTRIBUTE_PRINTF.
4883
ebe48ba0
SM
48842017-09-21 Simon Marchi <simon.marchi@ericsson.com>
4885
4886 * microblaze-tdep.c (microblaze_debug): Add ATTRIBUTE_PRINTF.
4887
0a0bf5dc
YQ
48882017-09-21 Yao Qi <yao.qi@linaro.org>
4889
4890 * configure.tgt (aarch64*-*-freebsd*): Add fbsd-tdep.o solib-svr4.o
4891 to gdb_target_obs.
4892
d1b0a7bf
TT
48932017-09-20 Tom Tromey <tom@tromey.com>
4894
4895 * breakpoint.c (struct counted_command_line): Remove.
4896 (breakpoint_commands): Update.
4897 (alloc_counted_command_line, incref_counted_command_line)
4898 (decref_counted_command_line, do_cleanup_counted_command_line)
4899 (make_cleanup_decref_counted_command_line): Remove.
4900 (breakpoint_set_commands, commands_command_1, ~bpstats, bpstats)
4901 (bpstat_clear_actions, bpstat_do_actions_1, watchpoint_check)
4902 (bpstat_stop_status, print_one_breakpoint_location, ~breakpoint)
4903 (save_breakpoints): Update.
4904 * breakpoint.h (counted_command_line): Now a typedef to
4905 shared_ptr.
4906 (struct breakpoint) <commands>: Now a counted_command_line.
4907 (struct bpstats) <command>: Likewise.
4908
48649e1b
TT
49092017-09-20 Tom Tromey <tom@tromey.com>
4910
4911 * breakpoint.c (struct commands_info, do_map_commands_command):
4912 Remove.
4913 (commands_command_1): Update.
4914 (iterate_over_related_breakpoints): Take a function_view.
4915 (do_delete_breakpoint, do_map_delete_breakpoint): Remove.
4916 (delete_command): Update.
4917 (map_breakpoint_numbers): Take a function_view.
4918 (do_disable_breakpoint, do_map_delete_breakpoint): Remove.
4919 (disable_command): Update.
4920 (do_enable_breakpoint, do_map_enable_breakpoint): Remove.
4921 (enable_command): Update.
4922 (struct disp_data, do_enable_breakpoint_disp)
4923 (do_map_enable_once_breakpoint, do_map_enable_count_breakpoint)
4924 (do_map_enable_delete_breakpoint): Remove.
4925 (enable_once_command, enable_count_command, enable_delete_command)
4926 (delete_trace_variable_command): Update.
4927
04afa70c
TT
49282017-09-20 Tom Tromey <tom@tromey.com>
4929
4930 * breakpoint.c (~bpstats): Rename from bpstat_free. Update.
4931 (bpstat_clear): Use delete.
4932 (bpstats): New constructors.
4933 (bpstat_copy, bpstat_stop_status): Use new.
4934 (dprintf_after_condition_true): Update.
4935 * breakpoint.h (bpstats::bpstats): Add constructors.
4936 (bpstats::~bpstats): Add destructor.
4937
c83833f4
PA
49382017-09-20 Pedro Alves <palves@redhat.com>
4939
4940 * eval.c (make_params): Delete, refactored as ...
4941 (class fake_method): ... this new type's ctor.
4942 (fake_method::~fake_method): New.
4943 (evaluate_subexp_standard): Use 'fake_method'.
4944
223ffa71
TT
49452017-09-20 Tom Tromey <tom@tromey.com>
4946
4947 * windows-nat.c (get_windows_debug_event, windows_wait)
4948 (do_initial_windows_stuff, windows_attach): Update.
4949 * utils.c (vwarning, internal_vproblem): Update.
4950 (ui_unregister_input_event_handler_cleanup)
4951 (prepare_to_handle_input): Remove.
4952 (class scoped_input_handler): New.
4953 (defaulted_query, prompt_for_continue): Update.
4954 * tui/tui-hooks.c (tui_refresh_frame_and_register_information):
4955 Update.
4956 * top.c (undo_terminal_modifications_before_exit): Update.
4957 * target/target.h (target_terminal_init, target_terminal_inferior)
4958 (target_terminal_ours): Don't declare.
4959 (class target_terminal): New.
4960 * target.h (target_terminal_is_inferior, target_terminal_is_ours)
4961 (target_terminal_ours_for_output)
4962 (make_cleanup_restore_target_terminal): Don't declare.
4963 (target_terminal_info): Remove.
4964 * target.c (enum terminal_state, terminal_state): Remove.
4965 (target_terminal::terminal_state): Define.
4966 (target_terminal::init): Rename from target_terminal_init.
4967 (target_terminal::inferior): Rename from
4968 target_terminal_inferior.
4969 (target_terminal::ours): Rename from target_terminal_ours.
4970 (target_terminal::ours_for_output): Rename from
4971 target_terminal_ours_for_output.
4972 (target_terminal::info): New method.
4973 (cleanup_restore_target_terminal)
4974 (make_cleanup_restore_target_terminal): Remove.
4975 * solib.c (handle_solib_event): Update.
4976 * remote.c (remote_serial_quit_handler): Update.
4977 (remote_terminal_inferior, remote_wait_as): Update.
4978 * record-full.c (record_full_wait_1): Update.
4979 * nto-procfs.c (procfs_create_inferior): Update.
4980 * nat/fork-inferior.c (startup_inferior): Update.
4981 * mi/mi-interp.c (mi_new_thread, mi_thread_exit)
4982 (mi_record_changed, mi_inferior_added, mi_inferior_appeared)
4983 (mi_inferior_exit, mi_inferior_removed, mi_traceframe_changed)
4984 (mi_tsv_created, mi_tsv_deleted, mi_tsv_modified)
4985 (mi_breakpoint_created, mi_breakpoint_deleted)
4986 (mi_breakpoint_modified, mi_on_resume, mi_solib_loaded)
4987 (mi_solib_unloaded, mi_command_param_changed, mi_memory_changed)
4988 (mi_user_selected_context_changed, report_initial_inferior):
4989 Update.
4990 * linux-nat.c (linux_nat_attach, linux_nat_terminal_ours)
4991 (linux_nat_terminal_inferior): Update.
4992 * infrun.c (follow_fork_inferior)
4993 (handle_vfork_child_exec_or_exit, do_target_resume)
4994 (check_curr_ui_sync_execution_done, handle_inferior_event_1)
4995 (handle_signal_stop, maybe_remove_breakpoints, normal_stop):
4996 Update.
4997 * inflow.c (child_terminal_init, info_terminal_command): Update.
4998 * infcmd.c (post_create_inferior, continue_1, prepare_one_step)
4999 (attach_command): Update.
5000 * infcall.c (call_thread_fsm_should_stop): Update.
5001 * gnu-nat.c (gnu_attach): Update.
5002 * extension.c (struct active_ext_lang_state)
5003 (restore_active_ext_lang): Update.
5004 * exceptions.c (print_flush): Update.
5005 * event-top.c (async_enable_stdin, default_quit_handler): Update.
5006 (struct quit_handler_cleanup_data, restore_quit_handler)
5007 (restore_quit_handler_dtor, make_cleanup_override_quit_handler):
5008 Remove.
5009 * cp-support.c (gdb_demangle): Update.
5010 * breakpoint.c (update_inserted_breakpoint_locations)
5011 (insert_breakpoint_locations, handle_jit_event)
5012 (disable_breakpoints_in_unloaded_shlib): Update.
5013 * annotate.c (annotate_breakpoints_invalid)
5014 (annotate_frames_invalid): Update.
5015
013af3fc
TT
50162017-09-20 Tom Tromey <tom@tromey.com>
5017
5018 * main.c (catch_command_errors): Rename from
5019 catch_command_errors_const.
5020 (captured_main_1): Update.
5021
06871ae8
PA
50222017-09-20 Pedro Alves <palves@redhat.com>
5023
5024 * cli/cli-cmds.c (list_command): Use print_sal_location.
5025 (print_sal_location): New function.
5026 (ambiguous_line_spec): Use print_sal_location.
5027 * linespec.c (symbol_to_sal): Record the symbol in the sal.
5028 * symtab.c (find_function_start_sal): Likewise.
5029 * symtab.h (symtab_and_line::symbol): New field.
5030
e5f25bc5
PA
50312017-09-20 Pedro Alves <palves@redhat.com>
5032
5033 * linespec.c (minsym_found): Handle non-text minsyms.
5034 (symbol_to_sal): Record a sal.pc for non-block, non-label symbols.
5035
1b7fa39e
WT
50362017-09-20 Walfred Tedeschi <walfred.tedeschi@intel.com>
5037
5038 * features/Makefile (i386-avx-mpx-avx512-pku.dat): Add missing
5039 backslash.
5040
37dd0825
WT
50412017-09-20 Walfred Tedeschi <walfred.tedeschi@intel.com>
5042
5043 * gdb.arch/i386-avx512.c (move_zmm_data_to_reg): Use
5044 vmovups instead vmovaps.
5045 (move_zmm_data_to_memory): Use vmovups instead vmovaps.
5046
4e5a4f58
JB
50472017-09-19 John Baldwin <jhb@FreeBSD.org>
5048
5049 * NEWS (Changes since GDB 8.0): Add starti.
5050 * infcmd.c (enum run_break): New.
5051 (run_command_1): Queue pending event for RUN_STOP_AT_FIRST_INSN
5052 case.
5053 (run_command): Use enum run_how.
5054 (start_command): Likewise.
5055 (starti_command): New function.
5056 (RUN_ARGS_HELP): New macro.
5057 (_initialize_infcmd): Use RUN_ARGS_HELP for run and start
5058 commands. Add starti command.
5059
aa70c9f1
YQ
50602017-09-19 Yao Qi <yao.qi@linaro.org>
5061
5062 * Makefile.in (monitor.o): Remove the rule.
5063
d6541620
YQ
50642017-09-19 Yao Qi <yao.qi@linaro.org>
5065
5066 * annotate.h (struct annotate_arg_emitter): Use
5067 DISABLE_COPY_AND_ASSIGN.
5068 * common/refcounted-object.h (refcounted_object): Likewise.
5069 * completer.h (struct completion_result): Likewise.
5070 * dwarf2read.c (struct dwarf2_per_objfile): Likewise.
5071 * filename-seen-cache.h (filename_seen_cache): Likewise.
5072 * gdbcore.h (thread_section_name): Likewise.
5073 * gdb_regex.h (compiled_regex): Likewise.
5074 * gdbthread.h (scoped_restore_current_thread): Likewise.
5075 * inferior.h (scoped_restore_current_inferior): Likewise.
5076 * jit.c (jit_reader): Likewise.
5077 * linespec.h (struct linespec_result): Likewise.
5078 * mi/mi-parse.h (struct mi_parse): Likewise.
5079 * nat/fork-inferior.c (execv_argv): Likewise.
5080 * progspace.h (scoped_restore_current_program_space): Likewise.
5081 * python/python-internal.h (class gdbpy_enter): Likewise.
5082 * regcache.h (regcache): Likewise.
5083 * target-descriptions.c (struct tdesc_reg): Likewise.
5084 (struct tdesc_type): Likewise.
5085 (struct tdesc_feature): Likewise.
5086 * ui-out.h (ui_out_emit_type): Likewise.
5087
0615127c
SM
50882017-09-18 Simon Marchi <simon.marchi@ericsson.com>
5089
5090 * dwarf2expr.c (dwarf_expr_context::execute_stack_op): Remove
5091 label abort_expression.
5092
5e187554
SM
50932017-09-16 Simon Marchi <simon.marchi@ericsson.com>
5094
5095 * common/buffer.c (buffer_xml_printf): Adjust.
5096 * common/xml-utils.c (xml_escape_text): Change return type to
5097 std::string, update code accordingly.
5098 * common/xml-utils.h (xml_escape_text): Change return type to
5099 std::string.
5100 * rs6000-aix-tdep.c (rs6000_aix_shared_library_to_xml): Adjust.
5101 * windows-tdep.c (windows_xfer_shared_library): Adjust.
5102 * unittests/xml-utils-selftests.c (test_xml_escape_text):
5103 Adjust.
5104
c3d7b541
SM
51052017-09-16 Simon Marchi <simon.marchi@ericsson.com>
5106
5107 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add new source file.
5108 (SUBDIR_UNITTESTS_OBS): Add new object file.
5109 * unittests/xml-utils-selftests.c: New file.
5110
1526853e
SM
51112017-09-16 Simon Marchi <simon.marchi@ericsson.com>
5112
5113 * common/selftest.h (selftest): New struct/interface.
5114 (register_test): Add name parameter, add new overload.
5115 (run_tests): Add filter parameter.
5116 (for_each_selftest_ftype): New typedef.
5117 (for_each_selftest): New declaration.
5118 * common/selftest.c (tests): Change type to
5119 map<string, unique_ptr<selftest>>.
5120 (simple_selftest): New struct.
5121 (register_test): New function.
5122 (register_test): Add name parameter and use it.
5123 (run_tests): Add filter parameter and use it. Add prints.
5124 Adjust to vector -> map change.
5125 * aarch64-tdep.c (_initialize_aarch64_tdep): Add names when
5126 registering selftests.
5127 * arm-tdep.c (_initialize_arm_tdep): Likewise.
5128 * disasm-selftests.c (_initialize_disasm_selftests): Likewise.
5129 * dwarf2-frame.c (_initialize_dwarf2_frame): Likewise.
5130 * dwarf2loc.c (_initialize_dwarf2loc): Likewise.
5131 * findvar.c (_initialize_findvar): Likewise.
5132 * gdbarch-selftests.c (_initialize_gdbarch_selftests): Likewise.
5133 * maint.c (maintenance_selftest): Update call to run_tests.
5134 (maintenance_info_selftests): New function.
5135 (_initialize_maint_cmds): Register "maintenance info selftests"
5136 command. Update "maintenance selftest" doc.
5137 * regcache.c (_initialize_regcache): Add names when registering
5138 selftests.
5139 * rust-exp.y (_initialize_rust_exp): Likewise.
5140 * selftest-arch.c (gdbarch_selftest): New struct.
5141 (gdbarch_tests): Remove.
5142 (register_test_foreach_arch): Add name parameter. Call
5143 register_test.
5144 (tests_with_arch): Remove, move most content to
5145 gdbarch_selftest::operator().
5146 (_initialize_selftests_foreach_arch): Remove.
5147 * selftest-arch.h (register_test_foreach_arch): Add name
5148 parameter.
5149 (run_tests_with_arch): New declaration.
5150 * utils-selftests.c (_initialize_utils_selftests): Add names
5151 when registering selftests.
5152 * utils.c (_initialize_utils): Likewise.
5153 * unittests/array-view-selftests.c
5154 (_initialize_array_view_selftests): Likewise.
5155 * unittests/environ-selftests.c (_initialize_environ_selftests):
5156 Likewise.
5157 * unittests/function-view-selftests.c
5158 (_initialize_function_view_selftests): Likewise.
5159 * unittests/offset-type-selftests.c
5160 (_initialize_offset_type_selftests): Likewise.
5161 * unittests/optional-selftests.c
5162 (_initialize_optional_selftests): Likewise.
5163 * unittests/scoped_restore-selftests.c
5164 (_initialize_scoped_restore_selftests): Likewise.
5165 * NEWS: Document "maintenance selftest" and "maint info
5166 selftests".
5167
5846367a
SM
51682017-09-16 Simon Marchi <simon.marchi@ericsson.com>
5169
5170 * mi/mi-main.c (mi_load_progress): Restore current_uiout using a
5171 scoped_restore.
5172
bd77e8ff
SM
51732017-09-16 Simon Marchi <simon.marchi@ericsson.com>
5174
5175 * mi/mi-main.c (mi_load_progress): Make uiout variable
5176 a unique_ptr.
5177
26a67918
PA
51782017-09-15 Pedro Alves <palves@redhat.com>
5179
5180 * compile/compile-c-types.c (convert_enum, convert_int)
5181 (convert_float): Adjust to refer to int_type_v0 and float_type_v0.
5182
3f8a7804
SM
51832017-09-15 Simon Marchi <simon.marchi@ericsson.com>
5184
5185 * dwarf2read.c (copy_string): Remove.
5186 (parse_macro_definition): Replace copy_string with savestring.
5187
8d200706
YQ
51882017-09-15 Yao Qi <yao.qi@linaro.org>
5189
5190 * configure.tgt (i[34567]86-*-darwin*): Append amd64.o to
5191 gdb_target_obs.
5192 (i[34567]86-*-solaris2.1[0-9]* | x86_64-*-solaris2.1[0-9]*):
5193 Likewise.
5194 (i[34567]86-*-linux*): Likewise.
5195
d185219d
SM
51962017-09-14 Simon Marchi <simon.marchi@ericsson.com>
5197
5198 * dwarf2expr.h (dwarf_stack_value): Add constructor.
5199 (dwarf_expr_context) <~dwarf_expr_context>: Define as default.
5200 <stack>: Change type to std::vector.
5201 <stack_len, stack_allocated>: Remove.
5202 <grow_stack>: Remove.
5203 * dwarf2expr.c (dwarf_expr_context::dwarf_expr_context): Adjust.
5204 (dwarf_expr_context::~dwarf_expr_context): Remove.
5205 (dwarf_expr_context::grow_stack): Remove.
5206 (dwarf_expr_context::push): Adjust.
5207 (dwarf_expr_context::pop): Adjust.
5208 (dwarf_expr_context::fetch): Adjust.
5209 (dwarf_expr_context::fetch_in_stack_memory): Adjust.
5210 (dwarf_expr_context::stack_empty_p): Adjust.
5211 (dwarf_expr_context::execute_stack_op): Adjust.
5212
eccd80d6
SM
52132017-09-14 Simon Marchi <simon.marchi@ericsson.com>
5214
5215 * dwarf2expr.h (dwarf_expr_context) <stack_empty_p>: Change
5216 return type to bool.
5217 * dwarf2expr.c (dwarf_expr_context::stack_empty_p): Likewise.
5218
69009882
SM
52192017-09-14 Simon Marchi <simon.marchi@ericsson.com>
5220
5221 * dwarf2expr.h (dwarf_expr_piece) <v.mem.in_stack_memory>:
5222 Change type to bool.
5223 (dwarf_stack_value) <in_stack_memory>: Likewise.
5224 (dwarf_expr_context) <push_address>: Change parameter type to
5225 bool.
5226 <fetch_in_stack_memory>: Change return type to bool.
5227 <push>: Change parameter type to bool.
5228 * dwarf2expr.c (dwarf_expr_context::push): Change parameter type
5229 to bool.
5230 (dwarf_expr_context::push_address): Likewise.
5231 (dwarf_expr_context::fetch_in_stack_memory): Change return type
5232 to bool.
5233 (dwarf_expr_context::execute_stack_op): Adjust.
5234 * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Adjust.
5235
1e467161
SM
52362017-09-14 Simon Marchi <simon.marchi@ericsson.com>
5237
5238 * dwarf2expr.h (struct dwarf_expr_piece): Move up.
5239 (struct dwarf_expr_context) <n_pieces>: Remove.
5240 <pieces>: Change type to std::vector.
5241 * dwarf2expr.c (dwarf_expr_context::dwarf_expr_context): Adjust.
5242 (dwarf_expr_context::~dwarf_expr_context): Don't manually free
5243 pieces.
5244 (dwarf_expr_context::add_piece): Adjust.
5245 * dwarf2loc.c (struct piece_closure): Initialize fields.
5246 <n_pieces>: Remove.
5247 <pieces>: Change type to std::vector.
5248 (allocate_piece_closure): Adjust, change parameter to
5249 std::vector rvalue and std::move it to piece_closure.
5250 (rw_pieced_value): Adjust.
5251 (check_pieced_synthetic_pointer): Adjust.
5252 (indirect_synthetic_pointer): Adjust.
5253 (coerce_pieced_ref): Adjust.
5254 (free_pieced_value_closure): Adjust. Use delete to free
5255 piece_closure.
5256 (dwarf2_evaluate_loc_desc_full): Adjust. std::move ctx.pieces
5257 to allocate_piece_closure.
5258 (dwarf2_loc_desc_get_symbol_read_needs): Adjust.
5259
0782db84
SM
52602017-09-12 Simon Marchi <simon.marchi@ericsson.com>
5261
5262 * probe.h (probe_ops_cp): Remove typedef.
5263 (DEF_VEC_P (probe_ops_cp)): Remove.
5264 (all_probe_ops): Change type to std::vector.
5265 * probe.c (info_probes_for_ops): Adjust to vector change.
5266 (probe_linespec_to_ops): Likewise.
5267 (all_probe_ops): Change type to std::vector.
5268 (_initialize_probe): Adjust to vector change.
5269 * dtrace-probe.c (_initialize_dtrace_probe): Likewise.
5270 * elfread.c (elf_get_probes): Likewise.
5271 * stap-probe.c (_initialize_stap_probe): Likewise.
5272
1eac6bea
SM
52732017-09-12 Simon Marchi <simon.marchi@ericsson.com>
5274
5275 * probe.h (struct bound_probe): Define constructors.
5276 * probe.c (bound_probe_s): Remove typedef.
5277 (DEF_VEC_O (bound_probe_s)): Remove VEC.
5278 (collect_probes): Change return type to std::vector, remove
5279 cleanup.
5280 (compare_probes): Return bool, change parameter type. Change
5281 semantic to "less than".
5282 (gen_ui_out_table_header_info): Change parameter to std::vector
5283 and update.
5284 (exists_probe_with_pops): Likewise.
5285 (info_probes_for_ops): Update to std::vector change.
5286 (enable_probes_command): Likewise.
5287 (disable_probes_command): Likewise.
5288
aaa63a31
SM
52892017-09-12 Simon Marchi <simon.marchi@ericsson.com>
5290
5291 * probe.h (struct probe_ops) <get_probes>: Change parameter from
5292 vec to std::vector.
5293 * probe.c (parse_probes_in_pspace): Update.
5294 (find_probes_in_objfile): Update.
5295 (find_probe_by_pc): Update.
5296 (collect_probes): Update.
5297 (probe_any_get_probes): Update.
5298 * symfile.h (struct sym_probe_fns) <sym_get_probes> Change
5299 return type to reference to std::vector.
5300 * dtrace-probe.c (dtrace_process_dof_probe): Change parameter to
5301 std::vector and update.
5302 (dtrace_process_dof): Likewise.
5303 (dtrace_get_probes): Likewise.
5304 * elfread.c (elf_get_probes): Change return type to std::vector,
5305 store an std::vector in bfd_data.
5306 (probe_key_free): Update to std::vector.
5307 * stap-probe.c (handle_stap_probe): Change parameter to
5308 std::vector and update.
5309 (stap_get_probes): Likewise.
5310 * symfile-debug.c (debug_sym_get_probes): Change return type to
5311 std::vector and update.
5312
cb85b21b
TT
53132017-09-11 Tom Tromey <tom@tromey.com>
5314
5315 * breakpoint.c (program_breakpoint_here_p): Update.
5316 * target.c (make_scoped_restore_show_memory_breakpoints): Rename
5317 from make_show_memory_breakpoints_cleanup. Return a
5318 scoped_restore_tmpl<int>.
5319 (restore_show_memory_breakpoints): Remove.
5320 * ppc-linux-tdep.c (ppc_linux_memory_remove_breakpoint): Update.
5321 * mem-break.c (memory_validate_breakpoint): Update.
5322 * ia64-tdep.c (ia64_memory_insert_breakpoint): Update.
5323 (ia64_memory_remove_breakpoint): Update.
5324 (ia64_breakpoint_from_pc): Update.
5325 * target.h (make_scoped_restore_show_memory_breakpoints): Rename
5326 from make_show_memory_breakpoints_cleanup.
5327
8fbc99ef
TT
53282017-09-11 Tom Tromey <tom@tromey.com>
5329
5330 * d-namespace.c (d_lookup_symbol): Use std::string.
5331 (find_symbol_in_baseclass): Likewise.
5332
50feb4bd
TT
53332017-09-11 Tom Tromey <tom@tromey.com>
5334
5335 * ctf.c (ctf_start): Use std::string.
5336
c6dc63a1
TT
53372017-09-11 Tom Tromey <tom@tromey.com>
5338
5339 * ada-lang.c (is_known_support_routine): Update.
5340 (ada_unhandled_exception_name_addr_from_raise): Update.
5341 * guile/scm-frame.c (gdbscm_frame_name): Update.
5342 * python/py-frame.c (frapy_name): Update.
5343 (frapy_function): Update.
5344 * stack.h (find_frame_funname): Update.
5345 * stack.c (find_frame_funname): Return unique_xmalloc_ptr.
5346 (print_frame): Update.
5347
d6b9b80f
TT
53482017-09-11 Tom Tromey <tom@tromey.com>
5349
5350 * findcmd.c (put_bits): Take a gdb::byte_vector.
5351 (parse_find_args): Return gdb::byte_vector. "args" now const.
5352 Remove "pattern_bufp" and "pattern_lenp" parameters. Remove
5353 cleanups.
5354 (find_command): Update.
5355
a9921622
TT
53562017-09-11 Tom Tromey <tom@tromey.com>
5357
5358 * cli/cli-script.c (class scoped_restore_hook_in): New.
5359 (clear_hook_in_cleanup): Remove.
5360 (execute_cmd_pre_hook, execute_cmd_post_hook): Use
5361 scoped_restore_hook_in.
5362
be0d7abb
TT
53632017-09-11 Tom Tromey <tom@tromey.com>
5364
5365 * cli/cli-script.c (restore_interp): Remove.
5366 (read_command_lines): Use scoped_restore_interp.
5367 * interps.c (scoped_restore_interp::set_temp): Rename from
5368 interp_set_temp.
5369 * interps.h (class scoped_restore_interp): New.
5370 (interp_set_temp): Remove.
5371
00f675ff
TT
53722017-09-11 Tom Tromey <tom@tromey.com>
5373
5374 * mi/mi-cmd-catch.c (mi_cmd_catch_assert)
5375 (mi_cmd_catch_exception, mi_catch_load_unload): Update.
5376 * mi/mi-cmd-break.c (setup_breakpoint_reporting): Return a
5377 scoped_restore.
5378 (mi_cmd_break_insert_1): Update.
5379 * mi/mi-cmd-break.h (setup_breakpoint_reporting): Return a
5380 scoped_restore.
5381
cb791d59
TT
53822017-09-11 Tom Tromey <tom@tromey.com>
5383
5384 * demangle.c (demangle_command): Update.
5385 * breakpoint.c (disable_command): Update.
5386 (enable_command): Update.
5387 (find_location_by_number): Make "number" const. Use
5388 get_number_trailer.
5389 * cli/cli-utils.c (extract_arg): Return std::string.
5390 * probe.c (parse_probe_linespec): Update. Change types.
5391 (collect_probes): Take string arguments.
5392 (parse_probe_linespec): Likewise.
5393 (info_probes_for_ops): Update.
5394 (enable_probes_command): Update.
5395 (disable_probes_command): Update.
5396 * break-catch-sig.c (catch_signal_split_args): Update.
5397 * mi/mi-parse.c (mi_parse): Update.
5398
2039bd9f
TT
53992017-09-11 Tom Tromey <tom@tromey.com>
5400
5401 * language.h (language_enum): Make argument const.
5402 * language.c (language_enum): Make argument const.
5403
f1735a53
TT
54042017-09-11 Tom Tromey <tom@tromey.com>
5405
5406 * common/common-utils.h (skip_to_space): Remove macro, redeclare
5407 as function.
5408 (skip_to_space): Rename from skip_to_space_const.
5409 * common/common-utils.c (skip_to_space): New function.
5410 (skip_to_space): Rename from skip_to_space_const.
5411 * cli/cli-utils.h (get_number): Rename from get_number_const.
5412 (extract_arg): Rename from extract_arg_const.
5413 * cli/cli-utils.c (get_number): Rename from get_number_const.
5414 (extract_arg): Rename from extract_arg_const.
5415 (number_or_range_parser::get_number): Use ::get_number.
5416 * aarch64-linux-tdep.c, ada-lang.c, arm-linux-tdep.c, ax-gdb.c,
5417 break-catch-throw.c, breakpoint.c, cli/cli-cmds.c, cli/cli-dump.c,
5418 cli/cli-script.c, cli/cli-setshow.c, compile/compile.c,
5419 completer.c, demangle.c, disasm.c, findcmd.c, linespec.c,
5420 linux-tdep.c, linux-thread-db.c, location.c, mi/mi-parse.c,
5421 minsyms.c, nat/linux-procfs.c, printcmd.c, probe.c,
5422 python/py-breakpoint.c, record.c, rust-exp.y, serial.c, stack.c,
5423 stap-probe.c, tid-parse.c, tracepoint.c: Update all callers.
5424
7d221d74
TT
54252017-09-11 Tom Tromey <tom@tromey.com>
5426
5427 * python/python.c (do_start_initialization): Use
5428 py-event-types.def to initialize types.
5429 Define all object type structures.
5430 * python/python-internal.h: Don't declare event initialization
5431 functions.
5432 * python/py-threadevent.c (thread_event_object_type): Don't
5433 define.
5434 * python/py-stopevent.c (stop_event_object_type): Don't define.
5435 * python/py-signalevent.c (signal_event_object_type): Don't
5436 declare or define.
5437 * python/py-newobjfileevent.c (new_objfile_event_object_type)
5438 (clear_objfiles_event_object_type): Don't declare or define.
5439 * python/py-infevents.c (inferior_call_pre_event_object_type)
5440 (inferior_call_post_event_object_type)
5441 (register_changed_event_object_type)
5442 (memory_changed_event_object_type): Don't declare or define.
5443 * python/py-inferior.c (new_thread_event_object_type)
5444 (new_inferior_event_object_type)
5445 (inferior_deleted_event_object_type): Don't declare or define.
5446 * python/py-exitedevent.c (exited_event_object_type): Don't
5447 declare or define.
5448 * python/py-evts.c (gdbpy_initialize_py_events): Use
5449 py-all-events.def.
5450 * python/py-events.h (thread_event_object_type): Don't declare.
5451 (events_object): Use py-all-events.def.
5452 * python/py-event.h (GDBPY_NEW_EVENT_TYPE): Remove. Use
5453 py-event-types.def.
5454 * python/py-event-types.def: New file.
5455 * python/py-continueevent.c (create_continue_event_object): Don't
5456 declare or define.
5457 * python/py-bpevent.c (breakpoint_event_object_type): Don't
5458 declare or define.
5459 * python/py-all-events.def: New file.
5460
35c61a1d
TT
54612017-09-11 Tom Tromey <tom@tromey.com>
5462
5463 * python/py-threadevent.c (create_thread_event_object): Return
5464 gdbpy_ref.
5465 * python/py-stopevent.h (create_stop_event_object)
5466 (create_breakpoint_event_object, create_signal_event_object):
5467 Update.
5468 * python/py-stopevent.c (create_stop_event_object): Return
5469 gdbpy_ref.
5470 (emit_stop_event): Update.
5471 * python/py-signalevent.c (create_signal_event_object): Return
5472 gdbpy_ref.
5473 * python/py-infevents.c (create_inferior_call_event_object):
5474 Update.
5475 * python/py-event.h (create_event_object)
5476 (create_thread_event_object): Update.
5477 * python/py-event.c (create_event_object): Return gdbpy_ref.
5478 * python/py-continueevent.c: Return gdbpy_ref.
5479 * python/py-bpevent.c (create_breakpoint_event_object): Return
5480 gdbpy_ref.
5481
7c96f8c1
TT
54822017-09-11 Tom Tromey <tom@tromey.com>
5483
5484 PR python/15622:
5485 * NEWS: Add entry.
5486 * python/python.c (do_start_initialization): Initialize new event
5487 types.
5488 * python/python-internal.h (gdbpy_initialize_new_inferior_event)
5489 (gdbpy_initialize_inferior_deleted_event)
5490 (gdbpy_initialize_new_thread_event): Declare.
5491 * python/py-threadevent.c (create_thread_event_object): Add option
5492 "thread" parameter.
5493 * python/py-inferior.c (new_thread_event_object_type)
5494 (new_inferior_event_object_type)
5495 (inferior_deleted_event_object_type): Declare.
5496 (python_new_inferior, python_inferior_deleted): New functions.
5497 (add_thread_object): Emit new_thread event.
5498 (gdbpy_initialize_inferior): Attach new functions to corresponding
5499 observers.
5500 (new_thread, new_inferior, inferior_deleted): Define new event
5501 types.
5502 * python/py-evts.c (gdbpy_initialize_py_events): Add new
5503 registries.
5504 * python/py-events.h (events_object) <new_inferior,
5505 inferior_deleted, new_thread>: New fields.
5506 * python/py-event.h (create_thread_event_breakpoint): Add optional
5507 "thread" parameter.
5508
72542b8e
AB
55092017-09-10 Andrew Burgess <andrew.burgess@embecosm.com>
5510
5511 * utils.c (abort_with_message): Don't compare gdb_stderr to NULL,
5512 check current_ui instead.
5513 (internal_vproblem): Likewise.
5514
0d64823e
SM
55152017-09-09 Simon Marchi <simon.marchi@ericsson.com>
5516
5517 * thread.c (print_thread_info_1): Remove unnecessary calls to
5518 uiout->is_mi_like_p.
5519
eb1e02fd
TT
55202017-09-09 Tom Tromey <tom@tromey.com>
5521
5522 * namespace.h (add_using_directive): Update.
5523 * namespace.c (add_using_directive): Change type of excludes to
5524 std::vector.
5525 * dwarf2read.c (read_import_statement): Use std::vector.
5526 (read_namespace): Update.
5527 * cp-namespace.c (cp_scan_for_anonymous_namespaces): Update.
5528
0fc21fd8
TT
55292017-09-09 Tom Tromey <tom@tromey.com>
5530
5531 * linespec.c (create_sals_line_offset): Use gdb::def_vector.
5532
49663d05
TT
55332017-09-09 Tom Tromey <tom@tromey.com>
5534
5535 * p-valprint.c (pascal_object_print_value): Use gdb::byte_vector.
5536
0b868b60
TT
55372017-09-09 Tom Tromey <tom@tromey.com>
5538
5539 * stack.c (func_command): Use gdb::def_vector.
5540
c0470d48
TT
55412017-09-09 Tom Tromey <tom@tromey.com>
5542
5543 * mi/mi-cmd-var.c (mi_cmd_var_list_children): Use gdb::optional,
5544 ui_out_emit_list, ui_out_emit_tuple.
5545 (mi_cmd_var_update): Likewise.
5546
ca5909c7
TT
55472017-09-09 Tom Tromey <tom@tromey.com>
5548
5549 * mi/mi-interp.c (mi_user_selected_context_changed): Use
5550 ui_out_redirect_pop.
5551 * guile/scm-ports.c (ioscm_with_output_to_port_worker): Use
5552 ui_out_redirect_pop.
5553 * utils.c (do_ui_out_redirect_pop)
5554 (make_cleanup_ui_out_redirect_pop): Remove.
5555 * top.c (execute_command_to_string): Use ui_out_redirect_pop.
5556 * utils.h (make_cleanup_ui_out_redirect_pop): Remove.
5557 * ui-out.h (ui_out_redirect_pop): New class.
5558
e6a2252a
TT
55592017-09-09 Tom Tromey <tom@tromey.com>
5560
5561 * mi/mi-main.c (output_cores): Use ui_out_emit_list.
5562 (list_available_thread_groups, mi_cmd_list_thread_groups)
5563 (mi_cmd_data_list_changed_registers, mi_cmd_data_read_memory)
5564 (mi_cmd_data_read_memory_bytes, mi_cmd_trace_frame_collected):
5565 Likewise.
5566
393702cd
TT
55672017-09-09 Tom Tromey <tom@tromey.com>
5568
5569 * disasm.c (gdb_pretty_print_disassembler::pretty_print_insn): Use
5570 ui_out_emit_tuple.
5571
76f9c9cf
TT
55722017-09-09 Tom Tromey <tom@tromey.com>
5573
5574 * target.c (flash_erase_command): Use ui_out_emit_tuple.
5575 * stack.c (print_frame): Use ui_out_emit_tuple.
5576 * spu-tdep.c (info_spu_event_command): Use ui_out_emit_tuple.
5577 (info_spu_mailbox_command, info_spu_dma_command)
5578 (info_spu_proxydma_command): Likewise.
5579 * mi/mi-main.c (mi_cmd_trace_frame_collected): Use
5580 ui_out_emit_tuple, gdb::byte_vector, bin2hex.
5581 * mi/mi-cmd-file.c (mi_cmd_file_list_shared_libraries): Use
5582 ui_out_emit_tuple.
5583 * breakpoint.c (print_it_watchpoint): Use ui_out_emit_tuple.
5584
dc9fe180
TT
55852017-09-09 Tom Tromey <tom@tromey.com>
5586
5587 * ui-out.h (make_cleanup_ui_out_table_begin_end): Remove.
5588 (class ui_out_emit_table): Update comment.
5589 * ui-out.c (do_cleanup_table_end)
5590 (make_cleanup_ui_out_table_begin_end): Remove.
5591 * spu-tdep.c (info_spu_mailbox_list): Use ui_out_emit_table.
5592 (info_spu_dma_cmdlist): Likewise.
5593 * probe.c (info_probes_for_ops): Use ui_out_emit_table.
5594 * darwin-nat-info.c (darwin_debug_regions_recurse): Use
5595 ui_out_emit_table.
5596
f8cc3da6
TT
55972017-09-09 Tom Tromey <tom@tromey.com>
5598
5599 * thread.c (print_thread_info_1): Use ui_out_emit_table,
5600 ui_out_emit_list, gdb::optional.
5601
481695ed
JB
56022017-09-09 John Baldwin <jhb@FreeBSD.org>
5603
5604 * aarch64-linux-nat.c: Remove _initialize_aarch64_linux_nat
5605 prototype.
5606 * aarch64-linux-tdep.c: Remove _initialize_aarch64_linux_tdep
5607 prototype.
5608 * aarch64-newlib-tdep.c: Remove _initialize_aarch64_newlib_tdep
5609 prototype.
5610 * aarch64-tdep.c: Remove _initialize_aarch64_tdep prototype.
5611 * ada-exp.y: Remove _initialize_ada_exp prototype.
5612 * ada-lang.c: Remove _initialize_ada_language prototype.
5613 * ada-tasks.c: Remove _initialize_tasks prototype.
5614 * addrmap.c: Remove _initialize_addrmap prototype.
5615 * agent.c: Remove _initialize_agent prototype.
5616 * aix-thread.c: Remove _initialize_aix_thread prototype.
5617 * alpha-bsd-nat.c: Remove _initialize_alphabsd_nat prototype.
5618 * alpha-linux-nat.c: Remove _initialize_alpha_linux_nat prototype.
5619 * alpha-linux-tdep.c: Remove _initialize_alpha_linux_tdep
5620 prototype.
5621 * alpha-nbsd-tdep.c: Remove _initialize_alphanbsd_tdep prototype.
5622 * alpha-obsd-tdep.c: Remove _initialize_alphaobsd_tdep prototype.
5623 * alpha-tdep.c: Remove _initialize_alpha_tdep prototype.
5624 * amd64-darwin-tdep.c: Remove _initialize_amd64_darwin_tdep
5625 prototype.
5626 * amd64-dicos-tdep.c: Remove _initialize_amd64_dicos_tdep
5627 prototype.
5628 * amd64-fbsd-nat.c: Remove _initialize_amd64fbsd_nat prototype.
5629 * amd64-fbsd-tdep.c: Remove _initialize_amd64fbsd_tdep prototype.
5630 * amd64-linux-nat.c: Remove _initialize_amd64_linux_nat prototype.
5631 * amd64-linux-tdep.c: Remove _initialize_amd64_linux_tdep
5632 prototype.
5633 * amd64-nbsd-nat.c: Remove _initialize_amd64nbsd_nat prototype.
5634 * amd64-nbsd-tdep.c: Remove _initialize_amd64nbsd_tdep prototype.
5635 * amd64-obsd-nat.c: Remove _initialize_amd64obsd_nat prototype.
5636 * amd64-obsd-tdep.c: Remove _initialize_amd64obsd_tdep prototype.
5637 * amd64-sol2-tdep.c: Remove _initialize_amd64_sol2_tdep prototype.
5638 * amd64-tdep.c: Remove _initialize_amd64_tdep prototype.
5639 * amd64-windows-nat.c: Remove _initialize_amd64_windows_nat
5640 prototype.
5641 * amd64-windows-tdep.c: Remove _initialize_amd64_windows_tdep
5642 prototype.
5643 * annotate.c: Remove _initialize_annotate prototype.
5644 * arc-newlib-tdep.c: Remove _initialize_arc_newlib_tdep prototype.
5645 * arc-tdep.c: Remove _initialize_arc_tdep prototype.
5646 * arch-utils.c: Remove _initialize_gdbarch_utils prototype.
5647 * arm-linux-nat.c: Remove _initialize_arm_linux_nat prototype.
5648 * arm-linux-tdep.c: Remove _initialize_arm_linux_tdep prototype.
5649 * arm-nbsd-tdep.c: Remove _initialize_arm_netbsd_tdep prototype.
5650 * arm-obsd-tdep.c: Remove _initialize_armobsd_tdep prototype.
5651 * arm-symbian-tdep.c: Remove _initialize_arm_symbian_tdep
5652 prototype.
5653 * arm-tdep.c: Remove _initialize_arm_tdep prototype.
5654 * arm-wince-tdep.c: Remove _initialize_arm_wince_tdep prototype.
5655 * auto-load.c: Remove _initialize_auto_load prototype.
5656 * auxv.c: Remove _initialize_auxv prototype.
5657 * avr-tdep.c: Remove _initialize_avr_tdep prototype.
5658 * ax-gdb.c: Remove _initialize_ax_gdb prototype.
5659 * bfin-linux-tdep.c: Remove _initialize_bfin_linux_tdep prototype.
5660 * bfin-tdep.c: Remove _initialize_bfin_tdep prototype.
5661 * break-catch-sig.c: Remove _initialize_break_catch_sig prototype.
5662 * break-catch-syscall.c: Remove _initialize_break_catch_syscall
5663 prototype.
5664 * break-catch-throw.c: Remove _initialize_break_catch_throw
5665 prototype.
5666 * breakpoint.c: Remove _initialize_breakpoint prototype.
5667 * bsd-uthread.c: Remove _initialize_bsd_uthread prototype.
5668 * btrace.c: Remove _initialize_btrace prototype.
5669 * charset.c: Remove _initialize_charset prototype.
5670 * cli/cli-cmds.c: Remove _initialize_cli_cmds prototype.
5671 * cli/cli-dump.c: Remove _initialize_cli_dump prototype.
5672 * cli/cli-interp.c: Remove _initialize_cli_interp prototype.
5673 * cli/cli-logging.c: Remove _initialize_cli_logging prototype.
5674 * cli/cli-script.c: Remove _initialize_cli_script prototype.
5675 * coff-pe-read.c: Remove _initialize_coff_pe_read prototype.
5676 * coffread.c: Remove _initialize_coffread prototype.
5677 * compile/compile.c: Remove _initialize_compile prototype.
5678 * complaints.c: Remove _initialize_complaints prototype.
5679 * completer.c: Remove _initialize_completer prototype.
5680 * copying.awk: Remove _initialize_copying prototype.
5681 * copying.c: Regenerate.
5682 * core-regset.c: Remove _initialize_core_regset prototype.
5683 * corefile.c: Remove _initialize_core prototype.
5684 * corelow.c: Remove _initialize_corelow prototype.
5685 * cp-abi.c: Remove _initialize_cp_abi prototype.
5686 * cp-namespace.c: Remove _initialize_cp_namespace prototype.
5687 * cp-support.c: Remove _initialize_cp_support prototype.
5688 * cp-valprint.c: Remove _initialize_cp_valprint prototype.
5689 * cris-linux-tdep.c: Remove _initialize_cris_linux_tdep prototype.
5690 * cris-tdep.c: Remove _initialize_cris_tdep prototype.
5691 * ctf.c: Remove _initialize_ctf prototype.
5692 * d-lang.c: Remove _initialize_d_language prototype.
5693 * darwin-nat-info.c: Remove _initialize_darwin_info_commands
5694 prototype.
5695 * darwin-nat.c: Remove _initialize_darwin_inferior prototype.
5696 * dbxread.c: Remove _initialize_dbxread prototype.
5697 * dcache.c: Remove _initialize_dcache prototype.
5698 * demangle.c: Remove _initialize_demangler prototype.
5699 * disasm-selftests.c: Remove _initialize_disasm_selftests
5700 prototype.
5701 * disasm.c: Remove _initialize_disasm prototype.
5702 * dtrace-probe.c: Remove _initialize_dtrace_probe prototype.
5703 * dummy-frame.c: Remove _initialize_dummy_frame prototype.
5704 * dwarf2-frame-tailcall.c: Remove _initialize_tailcall_frame
5705 prototype.
5706 * dwarf2-frame.c: Remove _initialize_dwarf2_frame prototype.
5707 * dwarf2expr.c: Remove _initialize_dwarf2expr prototype.
5708 * dwarf2loc.c: Remove _initialize_dwarf2loc prototype.
5709 * dwarf2read.c: Remove _initialize_dwarf2_read prototype.
5710 * elfread.c: Remove _initialize_elfread prototype.
5711 * exec.c: Remove _initialize_exec prototype.
5712 * extension.c: Remove _initialize_extension prototype.
5713 * f-lang.c: Remove _initialize_f_language prototype.
5714 * f-valprint.c: Remove _initialize_f_valprint prototype.
5715 * fbsd-nat.c: Remove _initialize_fbsd_nat prototype.
5716 * fbsd-tdep.c: Remove _initialize_fbsd_tdep prototype.
5717 * filesystem.c: Remove _initialize_filesystem prototype.
5718 * findcmd.c: Remove _initialize_mem_search prototype.
5719 * fork-child.c: Remove _initialize_fork_child prototype.
5720 * frame-base.c: Remove _initialize_frame_base prototype.
5721 * frame-unwind.c: Remove _initialize_frame_unwind prototype.
5722 * frame.c: Remove _initialize_frame prototype.
5723 * frv-linux-tdep.c: Remove _initialize_frv_linux_tdep prototype.
5724 * frv-tdep.c: Remove _initialize_frv_tdep prototype.
5725 * ft32-tdep.c: Remove _initialize_ft32_tdep prototype.
5726 * gcore.c: Remove _initialize_gcore prototype.
5727 * gdb_bfd.c: Remove _initialize_gdb_bfd prototype.
5728 * gdbarch.c: Regenerate.
5729 * gdbarch.sh: Remove _initialize_gdbarch prototype.
5730 * gdbtypes.c: Remove _initialize_gdbtypes prototype.
5731 * gnu-nat.c: Remove _initialize_gnu_nat prototype.
5732 * gnu-v2-abi.c: Remove _initialize_gnu_v2_abi prototype.
5733 * gnu-v3-abi.c: Remove _initialize_gnu_v3_abi prototype.
5734 * go-lang.c: Remove _initialize_go_language prototype.
5735 * go32-nat.c: Remove _initialize_go32_nat prototype.
5736 * guile/guile.c: Remove _initialize_guile prototype.
5737 * h8300-tdep.c: Remove _initialize_h8300_tdep prototype.
5738 * hppa-linux-nat.c: Remove _initialize_hppa_linux_nat prototype.
5739 * hppa-linux-tdep.c: Remove _initialize_hppa_linux_tdep prototype.
5740 * hppa-nbsd-nat.c: Remove _initialize_hppanbsd_nat prototype.
5741 * hppa-nbsd-tdep.c: Remove _initialize_hppanbsd_tdep prototype.
5742 * hppa-obsd-nat.c: Remove _initialize_hppaobsd_nat prototype.
5743 * hppa-obsd-tdep.c: Remove _initialize_hppaobsd_tdep prototype.
5744 * hppa-tdep.c: Remove _initialize_hppa_tdep prototype.
5745 * i386-bsd-nat.c: Remove _initialize_i386bsd_nat prototype.
5746 * i386-cygwin-tdep.c: Remove _initialize_i386_cygwin_tdep
5747 prototype.
5748 * i386-darwin-tdep.c: Remove _initialize_i386_darwin_tdep
5749 prototype.
5750 * i386-dicos-tdep.c: Remove _initialize_i386_dicos_tdep prototype.
5751 * i386-fbsd-nat.c: Remove _initialize_i386fbsd_nat prototype.
5752 * i386-fbsd-tdep.c: Remove _initialize_i386fbsd_tdep prototype.
5753 * i386-gnu-nat.c: Remove _initialize_i386gnu_nat prototype.
5754 * i386-gnu-tdep.c: Remove _initialize_i386gnu_tdep prototype.
5755 * i386-linux-nat.c: Remove _initialize_i386_linux_nat prototype.
5756 * i386-linux-tdep.c: Remove _initialize_i386_linux_tdep prototype.
5757 * i386-nbsd-nat.c: Remove _initialize_i386nbsd_nat prototype.
5758 * i386-nbsd-tdep.c: Remove _initialize_i386nbsd_tdep prototype.
5759 * i386-nto-tdep.c: Remove _initialize_i386nto_tdep prototype.
5760 * i386-obsd-nat.c: Remove _initialize_i386obsd_nat prototype.
5761 * i386-obsd-tdep.c: Remove _initialize_i386obsd_tdep prototype.
5762 * i386-sol2-nat.c: Remove _initialize_amd64_sol2_nat prototype.
5763 * i386-sol2-tdep.c: Remove _initialize_amd64_sol2_tdep prototype.
5764 * i386-tdep.c: Remove _initialize_i386_tdep prototype.
5765 * i386-windows-nat.c: Remove _initialize_i386_windows_nat
5766 prototype.
5767 * ia64-libunwind-tdep.c: Remove _initialize_libunwind_frame
5768 prototype.
5769 * ia64-linux-nat.c: Remove _initialize_ia64_linux_nat prototype.
5770 * ia64-linux-tdep.c: Remove _initialize_ia64_linux_tdep prototype.
5771 * ia64-tdep.c: Remove _initialize_ia64_tdep prototype.
5772 * ia64-vms-tdep.c: Remove _initialize_ia64_vms_tdep prototype.
5773 * infcall.c: Remove _initialize_infcall prototype.
5774 * infcmd.c: Remove _initialize_infcmd prototype.
5775 * inferior.c: Remove _initialize_inferiors prototype.
5776 * inflow.c: Remove _initialize_inflow prototype.
5777 * infrun.c: Remove _initialize_infrun prototype.
5778 * interps.c: Remove _initialize_interpreter prototype.
5779 * iq2000-tdep.c: Remove _initialize_iq2000_tdep prototype.
5780 * jit.c: Remove _initialize_jit prototype.
5781 * language.c: Remove _initialize_language prototype.
5782 * linux-fork.c: Remove _initialize_linux_fork prototype.
5783 * linux-nat.c: Remove _initialize_linux_nat prototype.
5784 * linux-tdep.c: Remove _initialize_linux_tdep prototype.
5785 * linux-thread-db.c: Remove _initialize_thread_db prototype.
5786 * lm32-tdep.c: Remove _initialize_lm32_tdep prototype.
5787 * m2-lang.c: Remove _initialize_m2_language prototype.
5788 * m32c-tdep.c: Remove _initialize_m32c_tdep prototype.
5789 * m32r-linux-nat.c: Remove _initialize_m32r_linux_nat prototype.
5790 * m32r-linux-tdep.c: Remove _initialize_m32r_linux_tdep prototype.
5791 * m32r-tdep.c: Remove _initialize_m32r_tdep prototype.
5792 * m68hc11-tdep.c: Remove _initialize_m68hc11_tdep prototype.
5793 * m68k-bsd-nat.c: Remove _initialize_m68kbsd_nat prototype.
5794 * m68k-bsd-tdep.c: Remove _initialize_m68kbsd_tdep prototype.
5795 * m68k-linux-nat.c: Remove _initialize_m68k_linux_tdep prototype.
5796 * m68k-linux-tdep.c: Remove _initialize_m68k_linux_tdep prototype.
5797 * m68k-tdep.c: Remove _initialize_m68k_tdep prototype.
5798 * m88k-bsd-nat.c: Remove _initialize_m68kbsd_nat prototype.
5799 * m88k-tdep.c: Remove _initialize_m68kbsd_tdep prototype.
5800 * machoread.c: Remove _initialize_machoread prototype.
5801 * macrocmd.c: Remove _initialize_macrocmd prototype.
5802 * macroscope.c: Remove _initialize_macroscope prototype.
5803 * maint.c: Remove _initialize_maint_cmds prototype.
5804 * mdebugread.c: Remove _initialize_mdebugread prototype.
5805 * memattr.c: Remove _initialize_mem prototype.
5806 * mep-tdep.c: Remove _initialize_mep_tdep prototype.
5807 * mi/mi-cmd-env.c: Remove _initialize_mi_cmd_env prototype.
5808 * mi/mi-cmds.c: Remove _initialize_mi_cmds prototype.
5809 * mi/mi-interp.c: Remove _initialize_mi_interp prototype.
5810 * mi/mi-main.c: Remove _initialize_mi_main prototype.
5811 * microblaze-linux-tdep.c: Remove
5812 _initialize_microblaze_linux_tdep prototype.
5813 * microblaze-tdep.c: Remove _initialize_microblaze_tdep prototype.
5814 * mips-fbsd-nat.c: Remove _initialize_mips_fbsd_nat prototype.
5815 * mips-fbsd-tdep.c: Remove _initialize_mips_fbsd_tdep prototype.
5816 * mips-linux-nat.c: Remove _initialize_mips_linux_nat prototype.
5817 * mips-linux-tdep.c: Remove _initialize_mips_linux_tdep prototype.
5818 * mips-nbsd-nat.c: Remove _initialize_mipsnbsd_nat prototype.
5819 * mips-nbsd-tdep.c: Remove _initialize_mipsnbsd_tdep prototype.
5820 * mips-sde-tdep.c: Remove _initialize_mips_sde_tdep prototype.
5821 * mips-tdep.c: Remove _initialize_mips_tdep prototype.
5822 * mips64-obsd-nat.c: Remove _initialize_mips64obsd_nat prototype.
5823 * mips64-obsd-tdep.c: Remove _initialize_mips64obsd_tdep
5824 prototype.
5825 * mipsread.c: Remove _initialize_mipsread prototype.
5826 * mn10300-linux-tdep.c: Remove _initialize_mn10300_linux_tdep
5827 prototype.
5828 * mn10300-tdep.c: Remove _initialize_mn10300_tdep prototype.
5829 * moxie-tdep.c: Remove _initialize_moxie_tdep prototype.
5830 * msp430-tdep.c: Remove _initialize_msp430_tdep prototype.
5831 * mt-tdep.c: Remove _initialize_mt_tdep prototype.
5832 * nds32-tdep.c: Remove _initialize_nds32_tdep prototype.
5833 * nios2-linux-tdep.c: Remove _initialize_nios2_linux_tdep
5834 prototype.
5835 * nios2-tdep.c: Remove _initialize_nios2_tdep prototype.
5836 * nto-procfs.c: Remove _initialize_procfs prototype.
5837 * nto-tdep.c: Remove _initialize_nto_tdep prototype.
5838 * objc-lang.c: Remove _initialize_objc_language prototype.
5839 * objfiles.c: Remove _initialize_objfiles prototype.
5840 * observer.c: Remove observer_test_first_notification_function,
5841 observer_test_second_notification_function,
5842 observer_test_third_notification_function, and
5843 _initialize_observer prototypes.
5844 * opencl-lang.c: Remove _initialize_opencl_language prototypes.
5845 * osabi.c: Remove _initialize_gdb_osabi prototype.
5846 * osdata.c: Remove _initialize_osdata prototype.
5847 * p-valprint.c: Remove _initialize_pascal_valprint prototype.
5848 * parse.c: Remove _initialize_parse prototype.
5849 * ppc-fbsd-nat.c: Remove _initialize_ppcfbsd_nat prototype.
5850 * ppc-fbsd-tdep.c: Remove _initialize_ppcfbsd_tdep prototype.
5851 * ppc-linux-nat.c: Remove _initialize_ppc_linux_nat prototype.
5852 * ppc-linux-tdep.c: Remove _initialize_ppc_linux_tdep prototype.
5853 * ppc-nbsd-nat.c: Remove _initialize_ppcnbsd_nat prototype.
5854 * ppc-nbsd-tdep.c: Remove _initialize_ppcnbsd_tdep prototype.
5855 * ppc-obsd-nat.c: Remove _initialize_ppcobsd_nat prototype.
5856 * ppc-obsd-tdep.c: Remove _initialize_ppcobsd_tdep prototype.
5857 * printcmd.c: Remove _initialize_printcmd prototype.
5858 * probe.c: Remove _initialize_probe prototype.
5859 * proc-api.c: Remove _initialize_proc_api prototype.
5860 * proc-events.c: Remove _initialize_proc_events prototype.
5861 * proc-service.c: Remove _initialize_proc_service prototype.
5862 * procfs.c: Remove _initialize_procfs prototype.
5863 * psymtab.c: Remove _initialize_psymtab prototype.
5864 * python/python.c: Remove _initialize_python prototype.
5865 * ravenscar-thread.c: Remove _initialize_ravenscar prototype.
5866 * record-btrace.c: Remove _initialize_record_btrace prototype.
5867 * record-full.c: Remove _initialize_record_full prototype.
5868 * record.c: Remove _initialize_record prototype.
5869 * regcache.c: Remove _initialize_regcache prototype.
5870 * reggroups.c: Remove _initialize_reggroup prototype.
5871 * remote-notif.c: Remove _initialize_notif prototype.
5872 * remote-sim.c: Remove _initialize_remote_sim prototype.
5873 * remote.c: Remove _initialize_remote prototype.
5874 * reverse.c: Remove _initialize_reverse prototype.
5875 * rl78-tdep.c: Remove _initialize_rl78_tdep prototype.
5876 * rs6000-aix-tdep.c: Remove _initialize_rs6000_aix_tdep prototype.
5877 * rs6000-lynx178-tdep.c: Remove _initialize_rs6000_lynx178_tdep
5878 prototype.
5879 * rs6000-nat.c: Remove _initialize_rs6000_nat prototype.
5880 * rs6000-tdep.c: Remove _initialize_rs6000_tdep prototype.
5881 * rust-exp.y: Remove _initialize_rust_exp prototype.
5882 * rx-tdep.c: Remove _initialize_rx_tdep prototype.
5883 * s390-linux-nat.c: Remove _initialize_s390_nat prototype.
5884 * s390-linux-tdep.c: Remove _initialize_s390_tdep prototype.
5885 * score-tdep.c: Remove _initialize_score_tdep prototype.
5886 * selftest-arch.c: Remove _initialize_selftests_foreach_arch
5887 prototype.
5888 * ser-go32.c: Remove _initialize_ser_dos prototype.
5889 * ser-mingw.c: Remove _initialize_ser_windows prototype.
5890 * ser-pipe.c: Remove _initialize_ser_pipe prototype.
5891 * ser-tcp.c: Remove _initialize_ser_tcp prototype.
5892 * ser-unix.c: Remove _initialize_ser_hardwire prototype.
5893 * serial.c: Remove _initialize_serial prototype.
5894 * sh-linux-tdep.c: Remove _initialize_sh_linux_tdep prototype.
5895 * sh-nbsd-nat.c: Remove _initialize_shnbsd_nat prototype.
5896 * sh-nbsd-tdep.c: Remove _initialize_shnbsd_tdep prototype.
5897 * sh-tdep.c: Remove _initialize_sh_tdep prototype.
5898 * skip.c: Remove _initialize_step_skip prototype.
5899 * sol-thread.c: Remove _initialize_sol_thread prototype.
5900 * solib-aix.c: Remove _initialize_solib_aix prototype.
5901 * solib-darwin.c: Remove _initialize_darwin_solib prototype.
5902 * solib-dsbt.c: Remove _initialize_dsbt_solib prototype.
5903 * solib-frv.c: Remove _initialize_frv_solib prototype.
5904 * solib-spu.c: Remove _initialize_spu_solib prototype.
5905 * solib-svr4.c: Remove _initialize_svr4_solib prototype.
5906 * solib-target.c: Remove _initialize_solib_target prototype.
5907 * solib.c: Remove _initialize_solib prototype.
5908 * source.c: Remove _initialize_source prototype.
5909 * sparc-linux-nat.c: Remove _initialize_sparc_linux_nat prototype.
5910 * sparc-linux-tdep.c: Remove _initialize_sparc_linux_tdep
5911 prototype.
5912 * sparc-nat.c: Remove _initialize_sparc_nat prototype.
5913 * sparc-nbsd-nat.c: Remove _initialize_sparcnbsd_nat prototype.
5914 * sparc-nbsd-tdep.c: Remove _initialize_sparcnbsd_tdep prototype.
5915 * sparc-obsd-tdep.c: Remove _initialize_sparc32obsd_tdep
5916 prototype.
5917 * sparc-sol2-nat.c: Remove _initialize_sparc_sol2_nat prototype.
5918 * sparc-sol2-tdep.c: Remove _initialize_sparc_sol2_tdep prototype.
5919 * sparc-tdep.c: Remove _initialize_sparc_tdep prototype.
5920 * sparc64-fbsd-nat.c: Remove _initialize_sparc64fbsd_nat
5921 prototype.
5922 * sparc64-fbsd-tdep.c: Remove _initialize_sparc64fbsd_tdep
5923 prototype.
5924 * sparc64-linux-nat.c: Remove _initialize_sparc64_linux_nat
5925 prototype.
5926 * sparc64-linux-tdep.c: Remove _initialize_sparc64_linux_tdep
5927 prototype.
5928 * sparc64-nat.c: Remove _initialize_sparc64_nat prototype.
5929 * sparc64-nbsd-nat.c: Remove _initialize_sparc64nbsd_nat
5930 prototype.
5931 * sparc64-nbsd-tdep.c: Remove _initialize_sparc64nbsd_tdep
5932 prototype.
5933 * sparc64-obsd-nat.c: Remove _initialize_sparc64obsd_nat
5934 prototype.
5935 * sparc64-obsd-tdep.c: Remove _initialize_sparc64obsd_tdep
5936 prototype.
5937 * sparc64-sol2-tdep.c: Remove _initialize_sparc64_sol2_tdep
5938 prototype.
5939 * spu-linux-nat.c: Remove _initialize_spu_nat prototype.
5940 * spu-multiarch.c: Remove _initialize_spu_multiarch prototype.
5941 * spu-tdep.c: Remove _initialize_spu_tdep prototype.
5942 * stabsread.c: Remove _initialize_stabsread prototype.
5943 * stack.c: Remove _initialize_stack prototype.
5944 * stap-probe.c: Remove _initialize_stap_probe prototype.
5945 * std-regs.c: Remove _initialize_frame_reg prototype.
5946 * symfile-debug.c: Remove _initialize_symfile_debug prototype.
5947 * symfile-mem.c: Remove _initialize_symfile_mem prototype.
5948 * symfile.c: Remove _initialize_symfile prototype.
5949 * symmisc.c: Remove _initialize_symmisc prototype.
5950 * symtab.c: Remove _initialize_symtab prototype.
5951 * target-dcache.c: Remove _initialize_target_dcache prototype.
5952 * target-descriptions.c: Remove _initialize_target_descriptions
5953 prototype.
5954 * thread.c: Remove _initialize_thread prototype.
5955 * tic6x-linux-tdep.c: Remove _initialize_tic6x_linux_tdep
5956 prototype.
5957 * tic6x-tdep.c: Remove _initialize_tic6x_tdep prototype.
5958 * tilegx-linux-nat.c: Remove _initialize_tile_linux_nat prototype.
5959 * tilegx-linux-tdep.c: Remove _initialize_tilegx_linux_tdep
5960 prototype.
5961 * tilegx-tdep.c: Remove _initialize_tilegx_tdep prototype.
5962 * tracefile-tfile.c: Remove _initialize_tracefile_tfile prototype.
5963 * tracefile.c: Remove _initialize_tracefile prototype.
5964 * tracepoint.c: Remove _initialize_tracepoint prototype.
5965 * tui/tui-hooks.c: Remove _initialize_tui_hooks prototype.
5966 * tui/tui-interp.c: Remove _initialize_tui_interp prototype.
5967 * tui/tui-layout.c: Remove _initialize_tui_layout prototype.
5968 * tui/tui-regs.c: Remove _initialize_tui_regs prototype.
5969 * tui/tui-stack.c: Remove _initialize_tui_stack prototype.
5970 * tui/tui-win.c: Remove _initialize_tui_win prototype.
5971 * tui/tui.c: Remove _initialize_tui prototype.
5972 * typeprint.c: Remove _initialize_typeprint prototype.
5973 * user-regs.c: Remove _initialize_user_regs prototype.
5974 * utils.c: Remove _initialize_utils prototype.
5975 * v850-tdep.c: Remove _initialize_v850_tdep prototype.
5976 * valarith.c: Remove _initialize_valarith prototype.
5977 * valops.c: Remove _initialize_valops prototype.
5978 * valprint.c: Remove _initialize_valprint prototype.
5979 * value.c: Remove _initialize_values prototype.
5980 * varobj.c: Remove _initialize_varobj prototype.
5981 * vax-bsd-nat.c: Remove _initialize_vaxbsd_nat prototype.
5982 * vax-nbsd-tdep.c: Remove _initialize_vaxnbsd_tdep prototype.
5983 * vax-tdep.c: Remove _initialize_vax_tdep prototype.
5984 * windows-nat.c: Remove _initialize_windows_nat,
5985 _initialize_check_for_gdb_ini, and _initialize_loadable
5986 prototypes.
5987 * windows-tdep.c: Remove _initialize_windows_tdep prototype.
5988 * xcoffread.c: Remove _initialize_xcoffread prototype.
5989 * xml-support.c: Remove _initialize_xml_support prototype.
5990 * xstormy16-tdep.c: Remove _initialize_xstormy16_tdep prototype.
5991 * xtensa-linux-nat.c: Remove _initialize_xtensa_linux_nat
5992 prototype.
5993 * xtensa-linux-tdep.c: Remove _initialize_xtensa_linux_tdep
5994 prototype.
5995 * xtensa-tdep.c: Remove _initialize_xtensa_tdep prototype.
5996
a611b5cb
KS
59972017-09-08 Keith Seitz <keiths@redhat.com>
5998
5999 * dwarf2read.c (struct field_info) <fnfields>: Remove unused
6000 field.
6001
469412dd
CW
60022017-09-08 Christoph Weinmann <christoph.t.weinmann@intel.com>
6003
6004 * f-valprint.c (f_val_print): Remove check for one byte
6005 sized integers. Remove printing of character type.
6006
a5ad232b
FP
60072017-09-08 Frank Penczek <frank.penczek@intel.com>
6008 Christoph Weinmann <christoph.t.weinmann@intel.com>
6009 Bernhard Heckel <bernhard.heckel@intel.com>
6010
6011 * f-typeprint.c (f_type_print_base): Use fprintfi_filtered
6012 to maintain proper indentation when printing pointers/refs.
6013
e5014227
JB
60142017-09-07 Joel Brobecker <brobecker@adacore.com>
6015
6016 GDB 8.0.1 released.
6017
63c99141
JB
60182017-09-07 Joel Brobecker <brobecker@adacore.com>
6019
6020 * NEWS (Changes in GDB 7.11): Remove entry for QStartupWithShell.
6021
69c1e056
TT
60222017-09-05 Tom Tromey <tom@tromey.com>
6023
6024 * parse.c (funcall_chain): Now a std::vector.
6025 (start_arglist, end_arglist): Simplify.
6026 (free_funcalls): Remove.
6027 (parse_exp_in_context_1): Remove cleanup.
6028
fef704bf
TT
60292017-09-05 Tom Tromey <tom@tromey.com>
6030
6031 * go-exp.y (go_parse): Don't create a cleanup.
6032
5613c585
TT
60332017-09-05 Tom Tromey <tom@tromey.com>
6034
6035 * d-exp.y (PrimaryExpression): Use std::string.
6036 (d_parse): Don't create a cleanup.
6037
eae49211
TT
60382017-09-05 Tom Tromey <tom@tromey.com>
6039
6040 * utils.c (do_clear_parser_state): Remove.
6041 (make_cleanup_clear_parser_state): Remove.
6042 * p-exp.y (pascal_parse): Use scoped_restore.
6043 * m2-exp.y (m2_parse): Use scoped_restore.
6044 * f-exp.y (f_parse): Use scoped_restore.
6045 * d-exp.y (d_parse): Use scoped_restore.
6046 * c-exp.y (c_parse): Use scoped_restore.
6047 * ada-exp.y (ada_parse): Use scoped_restore.
6048 * utils.h (make_cleanup_clear_parser_state): Remove.
6049
73b9be8b
KS
60502017-09-06 Keith Seitz <keiths@redhat.com>
6051
6052 * dwarf2read.c (dw2_linkage_name_attr): New function.
6053 (dw2_linkage_name): New function.
6054 (dwarf2_compute_name, dwarf2_physname, read_call_site_scope)
6055 (guess_full_die_structure_name, dwarf2_name): Use dw2_linkage_name.
6056 (anonymous_struct_prefix, dwarf2_name): Use dw2_linkage_name_attr.
6057
a102602b
KR
60582017-09-06 Kamil Rytarowski <n54@gmx.com>
6059
6060 * config/djgpp/djconfig.sh: Correct shell portability issue.
6061
28ad437d
KR
60622017-09-06 Kamil Rytarowski <n54@gmx.com>
6063
6064 * configure.nat: Define HAVE_NATIVE_GCORE_HOST on NetBSD.
6065
351787dd
JB
60662017-09-06 John Baldwin <jhb@FreeBSD.org>
6067
6068 * Makefile.in (ALLDEPFILES): Add mips-fbsd-nat.c.
6069 * NEWS: Mention new FreeBSD/mips native configuration.
6070 * configure.host: Add aarch64*-*-freebsd*.
6071 * configure.nat: Likewise.
6072 * aarch64-fbsd-nat.c: New file.
6073
c0f84956
JB
60742017-09-06 John Baldwin <jhb@FreeBSD.org>
6075
6076 * Makefile.in (ALL_64_TARGET_OBS): Add aarch64-fbsd-tdep.o.
6077 (ALLDEPFILES): Add aarch64-fbsd-tdep.c.
6078 * NEWS: Mention new FreeBSD/aarch64 target.
6079 * configure.tgt: Add aarch64*-*-freebsd*.
6080 * aarch64-fbsd-tdep.c: New file.
6081 * aarch64-fbsd-tdep.h: New file.
6082
7610297a
KR
60832017-09-06 Kamil Rytarowski <n54@gmx.com>
6084
6085 * MAINTAINERS (Write After Approval): Add Kamil Rytarowski.
6086
fbd1b771
JK
60872017-09-06 Jan Kratochvil <jan.kratochvil@redhat.com>
6088
6089 * parse.c (find_minsym_type_and_address): Don't relocate addresses
6090 of TLS symbols.
6091
5ca79eae
PW
60922017-09-05 Philippe Waroquiers <philippe.waroquiers@skynet.be>
6093
6094 * objfiles.c (get_objfile_bfd_data): Remove useless obstack_init
6095 call.
6096
bf93d7ba
SM
60972017-09-05 Simon Marchi <simon.marchi@ericsson.com>
6098
6099 * infrun.c (follow_exec): Call add_thread after
6100 target_find_description.
6101
1bb7c059
SM
61022017-09-05 Simon Marchi <simon.marchi@ericsson.com>
6103
6104 * infrun.c (handle_inferior_event_1): When exec'ing, read
6105 stop_pc after follow_exec.
6106
fc809827
SM
61072017-09-05 Simon Marchi <simon.marchi@ericsson.com>
6108
6109 * remote.c (process_g_packet): Update error message.
6110
d2fcdd85
YQ
61112017-09-05 Yao Qi <yao.qi@linaro.org>
6112
6113 * configure.tgt (gdb_target_obs): Add i386.o for x86_64-*
6114 targets.
6115
e69570ee
PA
61162017-09-05 Pedro Alves <palves@redhat.com>
6117
6118 * eval.c (eval_call, evaluate_funcall): New functions, factored
6119 out from ...
6120 (evaluate_subexp_standard): ... this.
6121
22916b07
YQ
61222017-09-05 Yao Qi <yao.qi@linaro.org>
6123
6124 * amd64-tdep.c (amd64_target_description): Create target
6125 descriptions.
6126 (_initialize_amd64_tdep): Don't call functions
6127 initialize_tdesc_amd64_*. Add self tests.
6128 * arch/amd64.c (amd64_create_target_description): Add parameter
6129 is_linux. Call set_tdesc_osabi if is_linux is true.
6130 * arch/amd64.h (amd64_create_target_description): Update the
6131 declaration.
6132 * arch/i386.c (i386_create_target_description): Add parameter
6133 is_linux. Call set_tdesc_osabi if is_linux is true.
6134 * arch/i386.h (i386_create_target_description): Update
6135 declaration.
6136 * configure.tgt: Add i386.o to gdb_target_obs.
6137 * features/Makefile (XMLTOC): Remove i386/*.xml.
6138 * features/i386/amd64-avx-avx512.c: Remove.
6139 * features/i386/amd64-avx-mpx-avx512-pku.c: Remove.
6140 * features/i386/amd64-avx-mpx.c: Remove.
6141 * features/i386/amd64-avx.c: Remove.
6142 * features/i386/amd64-mpx.c: Remove.
6143 * features/i386/amd64.c: Remove.
6144 * features/i386/i386-avx-avx512.c: Remove.
6145 * features/i386/i386-avx-mpx-avx512-pku.c: Remove.
6146 * features/i386/i386-avx-mpx.c: Remove.
6147 * features/i386/i386-avx.c: Remove.
6148 * features/i386/i386-mmx.c: Remove.
6149 * features/i386/i386-mpx.c: Remove.
6150 * features/i386/i386.c: Remove.
6151 * i386-tdep.c: Don't include features/i386/i386*.c., include
6152 target-descriptions.h and arch/i386.h.
6153 (i386_target_description): Create target descriptions.
6154 (i386_gdbarch_init): Don't call initialize_tdesc_i386_*
6155 functions. Do self tests.
6156
0854b7b1
YQ
61572017-09-05 Yao Qi <yao.qi@linaro.org>
6158
6159 * features/Makefile (XMLTOC): Remove i386/amd64XXX-linux.xml.
6160 * features/i386/amd64-avx-avx512-linux.c: Removed.
6161 * features/i386/amd64-avx-linux.c: Removed.
6162 * features/i386/amd64-avx-mpx-avx512-pku-linux.c: Removed.
6163 * features/i386/amd64-avx-mpx-linux.c: Removed.
6164 * features/i386/amd64-linux.c: Removed.
6165 * features/i386/amd64-mpx-linux.c: Removed.
6166 * features/i386/x32-avx-avx512-linux.c: Removed.
6167 * features/i386/x32-avx-linux.c: Removed.
6168 * features/i386/x32-linux.c: Removed.
6169
b4570e4b
YQ
61702017-09-05 Yao Qi <yao.qi@linaro.org>
6171
6172 * amd64-linux-tdep.c: Include arch/amd64.h. Don't include
6173 features/i386/*.c.
6174 (amd64_linux_read_description): Call
6175 amd64_create_target_description.
6176 * arch/amd64.c: New file.
6177 * arch/amd64.h: New file.
6178 * configure.tgt (x86_64-*-linux*): Append amd64.o.
6179 * Makefile.in (ALL_64_TARGET_OBS): Append amd64.o.
6180
6c73f67f
YQ
61812017-09-05 Yao Qi <yao.qi@linaro.org>
6182
6183 * amd64-linux-tdep.c: Don't include amd64-XXX-linux and
6184 x32-XXX-linux.c. Include 64bit-XX.c and x32-XX.c.
6185 (amd64_linux_read_description): Create target descriptions.
6186 (_initialize_amd64_linux_tdep): Don't call initialize_tdesc_XXX
6187 functions. Add unit tests.
6188 * features/Makefile (FEATURE_XMLFILES): Append 64bit-XXX.xml and
6189 x32-core.xml.
6190 * features/i386/64bit-avx.c: Generated.
6191 * features/i386/64bit-avx512.c: Generated.
6192 * features/i386/64bit-core.c: Generated.
6193 * features/i386/64bit-linux.c: Generated.
6194 * features/i386/64bit-mpx.c: Generated.
6195 * features/i386/64bit-pkeys.c: Generated.
6196 * features/i386/64bit-segments.c: Generated.
6197 * features/i386/64bit-sse.c: Generated.
6198 * features/i386/x32-core.c: Generated.
6199 * target-descriptions.c (maint_print_c_tdesc_cmd): Print feature
6200 c files for amd64-linux and x32-linux.
6201
9d3d478b
YQ
62022017-09-05 Yao Qi <yao.qi@linaro.org>
6203
6204 * amd64-linux-tdep.c (amd64_linux_read_description): New
6205 function.
6206 (amd64_linux_core_read_description): Call
6207 amd64_linux_read_description.
6208 (amd64_linux_init_abi): Likewise.
6209 (amd64_x32_linux_init_abi): Likewise.
6210 * amd64-linux-tdep.h (amd64_linux_read_description): Declare.
6211 * x86-linux-nat.c (x86_linux_read_description): Call
6212 amd64_linux_read_description.
6213
b9f1d50f
YQ
62142017-09-05 Yao Qi <yao.qi@linaro.org>
6215
6216 * amd64-linux-tdep.c (amd64_linux_core_read_description): Update
6217 comments.
6218
188c9e6d
YQ
62192017-09-05 Yao Qi <yao.qi@linaro.org>
6220
6221 * features/Makefile (XMLTOC): Remove i386/i386-XX-linux.xml.
6222 * features/i386/i386-avx-avx512-linux.c: Remove.
6223 * features/i386/i386-avx-linux.c: Remove.
6224 * features/i386/i386-avx-mpx-avx512-pku-linux.c: Remove.
6225 * features/i386/i386-avx-mpx-linux.c: Remove.
6226 * features/i386/i386-linux.c: Remove.
6227 * features/i386/i386-mmx-linux.c: Remove.
6228 * features/i386/i386-mpx-linux.c: Remove.
6229
5f035c07
YQ
62302017-09-05 Yao Qi <yao.qi@linaro.org>
6231
6232 * Makefile.in (ALL_TARGET_OBS): Add i386.o.
6233 (SFILES): Add arch/i386.c.
6234 (HFILES_NO_SRCDIR): Add arch/i386.h.
6235 * arch/i386.c: New file.
6236 * arch/i386.h: New file.
6237 * arch/tdesc.h (allocate_target_description): Declare.
6238 (set_tdesc_architecture): Declare.
6239 (set_tdesc_osabi): Declare.
6240 * configure.tgt (i[34567]86-*-linux*): Add i386.o.
6241 * i386-linux-tdep.c: Don't include ../features/i386/32bit-XXX.c.
6242 include arch/i386.h.
6243 (i386_linux_read_description): Remove code and call
6244 i386_create_target_description.
6245 (set_tdesc_architecture): New function.
6246 (set_tdesc_osabi): New function.
6247 * target-descriptions.h (allocate_target_description): Remove.
6248
0abe8a89
YQ
62492017-09-05 Yao Qi <yao.qi@linaro.org>
6250
6251 * arch/tdesc.h (tdesc_create_feature): Add an argument xml.
6252 * target-descriptions.c (tdesc_create_feature): Likewise, and
6253 adjust code.
6254 * features/i386/32bit-avx.c: Re-generated.
6255 * features/i386/32bit-avx512.c: Re-generated.
6256 * features/i386/32bit-core.c: Re-generated.
6257 * features/i386/32bit-linux.c: Re-generated.
6258 * features/i386/32bit-mpx.c: Re-generated.
6259 * features/i386/32bit-pkeys.c: Re-generated.
6260 * features/i386/32bit-sse.c: Re-generated.
6261
0a188386
YQ
62622017-09-05 Yao Qi <yao.qi@linaro.org>
6263
6264 * regformats/regdef.h (struct reg): Override operator == and !=.
6265
f49ff000
YQ
62662017-09-05 Yao Qi <yao.qi@linaro.org>
6267
6268 * arch/tdesc.h: New file.
6269 * regformats/regdat.sh: Generate code using tdesc_create_reg.
6270 * target-descriptions.c: Update comments.
6271 * target-descriptions.h: Include "arch/tdesc.h". Remove the
6272 declarations.
6273 * features/i386/32bit-avx.c: Re-generated.
6274 * features/i386/32bit-avx512.c: Re-generated.
6275 * features/i386/32bit-core.c: Re-generated.
6276 * features/i386/32bit-linux.c: Re-generated.
6277 * features/i386/32bit-mpx.c: Re-generated.
6278 * features/i386/32bit-pkeys.c: Re-generated.
6279 * features/i386/32bit-sse.c: Re-generated.
6280
f7000548
YQ
62812017-09-05 Yao Qi <yao.qi@linaro.org>
6282
6283 * regformats/regdat.sh: Update generated code.
6284
c9a5e2a5
YQ
62852017-09-05 Yao Qi <yao.qi@linaro.org>
6286
6287 * regformats/regdat.sh: Adjust code order.
6288
d6b687ac
SM
62892017-09-05 Simon Marchi <simon.marchi@ericsson.com>
6290
6291 * expprint.c (dump_subexp_body_standard): Use constant format
6292 string in fprintf_filtered call.
6293
a379bfd0
JB
62942017-09-04 John Baldwin <jhb@FreeBSD.org>
6295
6296 * configure.nat: Add "x86-nat.o x86-dregs.o" for NetBSD/amd64 and
6297 NetBSD/i386.
6298 * x86-bsd-nat.c [!DBREG_DRX && __NetBSD__]: Define DBREG_DRX.
6299
f7efc967
JB
63002017-09-04 John Baldwin <jhb@FreeBSD.org>
6301
6302 * bsd-kvm.o: Make <sys/user.h> conditional on HAVE_SYS_USER_H.
6303
c49fbc6c
JB
63042017-09-04 John Baldwin <jhb@FreeBSD.org>
6305
6306 * bsd-kvm.o: Define _KMEMUSER.
6307 * configure.ac: Define _KMEMUSER when checking for "struct lwp".
6308 * configure: Regenerate.
6309
26562e73
JB
63102017-09-04 John Baldwin <jhb@FreeBSD.org>
6311
6312 * amd64-fbsd-nat.c: Add include of "x86-xstate.h".
6313 * i386-fbsd-nat.c: Likewise.
6314
31cf1487
JB
63152017-09-04 John Baldwin <jhb@FreeBSD.org>
6316
6317 * unittests/array-view-selftests.c: Add include of <array>.
6318
5b9f8a7c
JB
63192017-09-04 John Baldwin <jhb@FreeBSD.org>
6320
6321 * spu-tdep.c (flush_ea_cache): Add missing argument to
6322 call_function_by_hand.
6323
d69cf9b2
PA
63242017-09-04 Pedro Alves <palves@redhat.com>
6325
6326 * NEWS (Safer support for debugging with no debug info): New.
6327
3693fdb3
PA
63282017-09-04 Pedro Alves <palves@redhat.com>
6329
6330 * c-exp.y (function_method, function_method_void): Add current
6331 instance flags to TYPE_INSTANCE.
6332 * dwarf2read.c (check_modifier): New.
6333 (compute_delayed_physnames): Assert that only C++ adds delayed
6334 physnames. Mark fn_fields as const/volatile depending on
6335 physname.
6336 * eval.c (make_params): New type_instance_flags parameter. Use
6337 it as the new type's instance flags.
6338 (evaluate_subexp_standard) <TYPE_INSTANCE>: Extract the instance
6339 flags element and pass it to make_params.
6340 * expprint.c (print_subexp_standard) <TYPE_INSTANCE>: Handle
6341 instance flags element.
6342 (dump_subexp_body_standard) <TYPE_INSTANCE>: Likewise.
6343 * gdbtypes.h: Include "enum-flags.h".
6344 (type_instance_flags): New enum-flags type.
6345 (TYPE_CONST, TYPE_VOLATILE, TYPE_RESTRICT, TYPE_ATOMIC)
6346 (TYPE_CODE_SPACE, TYPE_DATA_SPACE): Return boolean.
6347 * parse.c (operator_length_standard) <TYPE_INSTANCE>: Adjust.
6348 (follow_type_instance_flags): New function.
6349 (operator_check_standard) <TYPE_INSTANCE>: Adjust.
6350 * parser-defs.h (follow_type_instance_flags): Declare.
6351 * valops.c (value_struct_elt_for_reference): const/volatile must
6352 match too.
6353
e68cb8e0
PA
63542017-09-04 Pedro Alves <palves@redhat.com>
6355
6356 * cp-namespace.c (cp_search_static_and_baseclasses): Handle
6357 function/method scopes; lookup the nested name as a function local
6358 static variable.
6359
858be34c
PA
63602017-09-04 Pedro Alves <palves@redhat.com>
6361
6362 (%type <voidval>): Add function_method.
6363 * c-exp.y (exp): New production for calls with no arguments.
6364 (function_method, function_method_void_or_typelist): New
6365 productions.
6366 (exp): New production for "method()::static_var".
6367 * eval.c (evaluate_subexp_standard): Handle OP_FUNC_STATIC_VAR.
6368 * expprint.c (print_subexp_standard, dump_subexp_body_standard):
6369 Handle OP_FUNC_STATIC_VAR.
6370 * parse.c (operator_length_standard):
6371 Handle OP_FUNC_STATIC_VAR.
6372
dd5901a6
PA
63732017-09-04 Pedro Alves <palves@redhat.com>
6374
6375 * eval.c (evaluate_subexp_standard): Remove UNOP_MEMVAL_TLS
6376 handling.
6377 * expprint.c (print_subexp_standard, dump_subexp_body_standard):
6378 Ditto.
6379 * parse.c (operator_length_standard, operator_check_standard):
6380 Ditto.
6381 * std-operator.def (UNOP_MEMVAL_TLS): Delete.
6382
46a4882b
PA
63832017-09-04 Pedro Alves <palves@redhat.com>
6384
6385 * ax-gdb.c: Include "typeprint.h".
6386 (gen_expr_for_cast): New function.
6387 (gen_expr) <OP_CAST, OP_CAST_TYPE>: Use it.
6388 <OP_VAR_VALUE, OP_MSYM_VAR_VALUE>: Error out if the variable's
6389 type is unknown.
6390 * dwarf2read.c (new_symbol_full): Fallback to int instead of
6391 nodebug_data_symbol.
6392 * eval.c: Include "typeprint.h".
6393 (evaluate_subexp_standard) <OP_VAR_VALUE, OP_VAR_MSYM_VALUE>:
6394 Error out if symbol has unknown type.
6395 <UNOP_CAST, UNOP_CAST_TYPE>: Common bits factored out to
6396 evaluate_subexp_for_cast.
6397 (evaluate_subexp_for_address, evaluate_subexp_for_sizeof): Handle
6398 OP_VAR_MSYM_VALUE.
6399 (evaluate_subexp_for_cast): New function.
6400 * gdbtypes.c (init_nodebug_var_type): New function.
6401 (objfile_type): Use it to initialize types of variables with no
6402 debug info.
6403 * typeprint.c (error_unknown_type): New.
6404 * typeprint.h (error_unknown_type): New declaration.
6405 * compile/compile-c-types.c (convert_type_basic): Handle
6406 TYPE_CODE_ERROR; warn and fallback to int for variables with
6407 unknown type.
6408
fe13dfec
PA
64092017-09-04 Pedro Alves <palves@redhat.com>
6410
6411 * eval.c (evaluate_var_value): New function, factored out from ...
6412 (evaluate_subexp_standard): ... here.
6413
d008ee21
PA
64142017-09-04 Pedro Alves <palves@redhat.com>
6415
6416 * eval.c (evaluate_subexp_standard) <UNOP_COMPLEMENT, UNOP_ADDR>:
6417 Remove useless assignments to 'op'.
6418
827d0c51
PA
64192017-09-04 Pedro Alves <palves@redhat.com>
6420
6421 * eval.c (eval_skip_value): New function.
6422 (evaluate_subexp_standard): Use it.
6423
2c5a2be1
PA
64242017-09-04 Pedro Alves <palves@redhat.com>
6425
6426 * eval.c (evaluate_subexp_standard): <OP_FUNCALL>: Extract
6427 function name from symbol/minsym and pass it to
6428 error_call_unknown_return_type.
6429
74ea4be4
PA
64302017-09-04 Pedro Alves <palves@redhat.com>
6431
6432 * ada-lang.c (resolve_subexp): Handle OP_VAR_MSYM_VALUE.
6433 * ax-gdb.c (gen_msym_var_ref): New function.
6434 (gen_expr): Handle OP_VAR_MSYM_VALUE.
6435 * eval.c (evaluate_var_msym_value): New function.
6436 * eval.c (evaluate_subexp_standard): Handle OP_VAR_MSYM_VALUE.
6437 <OP_FUNCALL>: Extract function name from symbol/minsym and pass it
6438 to call_function_by_hand.
6439 * expprint.c (print_subexp_standard, dump_subexp_body_standard):
6440 Handle OP_VAR_MSYM_VALUE.
6441 (union exp_element) <msymbol>: New field.
6442 * minsyms.h (struct type): Forward declare.
6443 (find_minsym_type_and_address): Declare.
6444 * parse.c (write_exp_elt_msym): New function.
6445 (write_exp_msymbol): Delete, refactored as ...
6446 (find_minsym_type_and_address): ... this new function.
6447 (write_exp_msymbol): Reimplement using OP_VAR_MSYM_VALUE.
6448 (operator_length_standard, operator_check_standard): Handle
6449 OP_VAR_MSYM_VALUE.
6450 * std-operator.def (OP_VAR_MSYM_VALUE): New.
6451
7022349d
PA
64522017-09-04 Pedro Alves <palves@redhat.com>
6453
6454 * ada-lang.c (ada_evaluate_subexp) <TYPE_CODE_FUNC>: Don't handle
6455 TYPE_GNU_IFUNC specially here. Throw error if return type is
6456 unknown.
6457 * ada-typeprint.c (print_func_type): Handle functions with unknown
6458 return type.
6459 * c-typeprint.c (c_type_print_base): Handle functions and methods
6460 with unknown return type.
6461 * compile/compile-c-symbols.c (convert_symbol_bmsym)
6462 <mst_text_gnu_ifunc>: Use nodebug_text_gnu_ifunc_symbol.
6463 * compile/compile-c-types.c: Include "objfiles.h".
6464 (convert_func): For functions with unknown return type, warn and
6465 default to int.
6466 * compile/compile-object-run.c (compile_object_run): Adjust call
6467 to call_function_by_hand_dummy.
6468 * elfread.c (elf_gnu_ifunc_resolve_addr): Adjust call to
6469 call_function_by_hand.
6470 * eval.c (evaluate_subexp_standard): Adjust calls to
6471 call_function_by_hand. Handle functions and methods with unknown
6472 return type. Pass expect_type to call_function_by_hand.
6473 * f-typeprint.c (f_type_print_base): Handle functions with unknown
6474 return type.
6475 * gcore.c (call_target_sbrk): Adjust call to
6476 call_function_by_hand.
6477 * gdbtypes.c (objfile_type): Leave nodebug text symbol with NULL
6478 return type instead of int. Make nodebug_text_gnu_ifunc_symbol be
6479 an integer address type instead of nodebug.
6480 * guile/scm-value.c (gdbscm_value_call): Adjust call to
6481 call_function_by_hand.
6482 * infcall.c (error_call_unknown_return_type): New function.
6483 (call_function_by_hand): New "default_return_type" parameter.
6484 Pass it down.
6485 (call_function_by_hand_dummy): New "default_return_type"
6486 parameter. Use it instead of defaulting to int. If there's no
6487 default and the return type is unknown, throw an error. If
6488 there's a default return type, and the called function has no
6489 debug info, then assume the function is prototyped.
6490 * infcall.h (call_function_by_hand, call_function_by_hand_dummy):
6491 New "default_return_type" parameter.
6492 (error_call_unknown_return_type): New declaration.
6493 * linux-fork.c (call_lseek): Cast return type of lseek.
6494 (inferior_call_waitpid, checkpoint_command): Adjust calls to
6495 call_function_by_hand.
6496 * linux-tdep.c (linux_infcall_mmap, linux_infcall_munmap): Adjust
6497 calls to call_function_by_hand.
6498 * m2-typeprint.c (m2_procedure): Handle functions with unknown
6499 return type.
6500 * objc-lang.c (lookup_objc_class, lookup_child_selector)
6501 (value_nsstring, print_object_command): Adjust calls to
6502 call_function_by_hand.
6503 * p-typeprint.c (pascal_type_print_varspec_prefix): Handle
6504 functions with unknown return type.
6505 (pascal_type_print_func_varspec_suffix): New function.
6506 (pascal_type_print_varspec_suffix) <TYPE_CODE_FUNC,
6507 TYPE_CODE_METHOD>: Use it.
6508 * python/py-value.c (valpy_call): Adjust call to
6509 call_function_by_hand.
6510 * rust-lang.c (rust_evaluate_funcall): Adjust call to
6511 call_function_by_hand.
6512 * valarith.c (value_x_binop, value_x_unop): Adjust calls to
6513 call_function_by_hand.
6514 * valops.c (value_allocate_space_in_inferior): Adjust call to
6515 call_function_by_hand.
6516 * typeprint.c (type_print_unknown_return_type): New function.
6517 * typeprint.h (type_print_unknown_return_type): New declaration.
6518
54990598
PA
65192017-09-04 Pedro Alves <palves@redhat.com>
6520
6521 * gdbtypes.c (lookup_function_type_with_arguments): Mark function
6522 types with more than one parameter as prototyped.
6523
9a24775b
PA
65242017-09-04 Pedro Alves <palves@redhat.com>
6525
6526 * cli/cli-cmds.c (print_disassembly, disassemble_current_function)
6527 (disassemble_command): Use gdb_disassembly_flags instead of bare
6528 int.
6529 * disasm.c (gdb_pretty_print_disassembler::pretty_print_insn)
6530 (dump_insns, do_mixed_source_and_assembly_deprecated)
6531 (do_mixed_source_and_assembly, do_assembly_only, gdb_disassembly):
6532 Use gdb_disassembly_flags instead of bare int.
6533 * disasm.h (DISASSEMBLY_SOURCE_DEPRECATED, DISASSEMBLY_RAW_INSN)
6534 (DISASSEMBLY_OMIT_FNAME, DISASSEMBLY_FILENAME)
6535 (DISASSEMBLY_OMIT_PC, DISASSEMBLY_SOURCE)
6536 (DISASSEMBLY_SPECULATIVE): No longer macros. Instead they're...
6537 (enum gdb_disassembly_flag): ... values of this new enumeration.
6538 (gdb_disassembly_flags): Define.
6539 (gdb_disassembly)
6540 (gdb_pretty_print_disassembler::pretty_print_insn): Use it.
6541 * mi/mi-cmd-disas.c (mi_cmd_disassemble): Use
6542 gdb_disassembly_flags instead of bare int.
6543 * record-btrace.c (btrace_insn_history)
6544 (record_btrace_insn_history, record_btrace_insn_history_range)
6545 (record_btrace_insn_history_from): Use gdb_disassembly_flags
6546 instead of bare int.
6547 * record.c (get_insn_history_modifiers, cmd_record_insn_history):
6548 Use gdb_disassembly_flags instead of bare int.
6549 * target-debug.h (target_debug_print_gdb_disassembly_flags):
6550 Define.
6551 * target-delegates.c: Regenerate.
6552 * target.c (target_insn_history, target_insn_history_from)
6553 (target_insn_history_range): Use gdb_disassembly_flags instead of
6554 bare int.
6555 * target.h: Include "disasm.h".
6556 (struct target_ops) <to_insn_history, to_insn_history_from,
6557 to_insn_history_range>: Use gdb_disassembly_flags instead of bare
6558 int.
6559 (target_insn_history, target_insn_history_from)
6560 (target_insn_history_range): Use gdb_disassembly_flags instead of
6561 bare int.
6562
80a65e9b
SM
65632017-09-04 Simon Marchi <simon.marchi@ericsson.com>
6564
6565 * cli/cli-script.c (build_command_line): For if/while commands,
6566 check whether args is empty.
6567
6b66338c
SM
65682017-09-04 Simon Marchi <simon.marchi@ericsson.com>
6569
6570 * cli/cli-script.h (enum misc_command_type): Move from defs.h.
6571 (enum command_control_type): Likewise.
6572 (struct command_line): Likewise.
6573 (free_command_lines): Likewise.
6574 (struct command_lines_deleter): Likewise.
6575 (command_line_up): Likewise.
6576 (read_command_lines): Likewise.
6577 (read_command_lines_1): Likewise.
6578 * defs.h (enum misc_command_type): Move to cli/cli-script.h.
6579 (enum command_control_type): Likewise.
6580 (struct command_line): Likewise.
6581 (free_command_lines): Likewise.
6582 (struct command_lines_deleter): Likewise.
6583 (command_line_up): Likewise.
6584 (read_command_lines): Likewise.
6585 (read_command_lines_1): Likewise.
6586 * breakpoint.h: Include cli/cli-script.h.
6587 * extension-priv.h: Likewise.
6588 * gdbcmd.h: Likewise.
6589
51abb421
PA
65902017-09-04 Pedro Alves <palves@redhat.com>
6591
6592 * ada-lang.c (is_known_support_routine): Move sal declaration to
6593 where it is initialized.
6594 * breakpoint.c (create_internal_breakpoint, init_catchpoint)
6595 (parse_breakpoint_sals, decode_static_tracepoint_spec)
6596 (clear_command, update_static_tracepoint): Remove init_sal
6597 references. Move declarations closer to initializations.
6598 * cli/cli-cmds.c (list_command): Move sal declarations closer to
6599 initializations.
6600 * elfread.c (elf_gnu_ifunc_resolver_stop): Remove init_sal
6601 references. Move sal declarations closer to initializations.
6602 * frame.c (find_frame_sal): Return a symtab_and_line via function
6603 return instead of output parameter. Remove init_sal references.
6604 * frame.h (find_frame_sal): Return a symtab_and_line via function
6605 return instead of output parameter.
6606 * guile/scm-frame.c (gdbscm_frame_sal): Adjust.
6607 * guile/scm-symtab.c (stscm_make_sal_smob): Use in-place new
6608 instead of memset.
6609 (gdbscm_find_pc_line): Remove init_sal reference.
6610 * infcall.c (call_function_by_hand_dummy): Remove init_sal
6611 references. Move declarations closer to initializations.
6612 * infcmd.c (set_step_frame): Update. Move declarations closer to
6613 initializations.
6614 (finish_backward): Remove init_sal references. Move declarations
6615 closer to initializations.
6616 * infrun.c (process_event_stop_test, handle_step_into_function)
6617 (insert_hp_step_resume_breakpoint_at_frame)
6618 (insert_step_resume_breakpoint_at_caller): Likewise.
6619 * linespec.c (create_sals_line_offset, decode_digits_ordinary)
6620 (symbol_to_sal): Likewise.
6621 * probe.c (parse_probes_in_pspace): Remove init_sal reference.
6622 * python/py-frame.c (frapy_find_sal): Move sal declaration closer
6623 to its initialization.
6624 * reverse.c (save_bookmark_command): Use new/delete. Remove
6625 init_sal references. Move declarations closer to initializations.
6626 * source.c (get_current_source_symtab_and_line): Remove brace
6627 initialization.
6628 (set_current_source_symtab_and_line): Now takes the sal by const
6629 reference. Remove brace initialization.
6630 (line_info): Remove init_sal reference.
6631 * source.h (set_current_source_symtab_and_line): Now takes a
6632 symtab_and_line via const reference.
6633 * stack.c (set_current_sal_from_frame): Adjust.
6634 (print_frame_info): Adjust.
6635 (get_last_displayed_sal): Return the sal via function return
6636 instead of via output parameter. Simplify.
6637 (frame_info): Adjust.
6638 * stack.h (get_last_displayed_sal): Return the sal via function
6639 return instead of via output parameter.
6640 * symtab.c (init_sal): Delete.
6641 (find_pc_sect_line): Remove init_sal references. Move
6642 declarations closer to initializations.
6643 (find_function_start_sal): Remove init_sal references. Move
6644 declarations closer to initializations.
6645 * symtab.h (struct symtab_and_line): In-class initialize all
6646 fields.
6647 * tracepoint.c (set_traceframe_context)
6648 (print_one_static_tracepoint_marker): Remove init_sal references.
6649 Move declarations closer to initializations.
6650 * tui/tui-disasm.c (tui_show_disassem_and_update_source): Adjust.
6651 * tui/tui-stack.c (tui_show_frame_info): Adjust. Move
6652 declarations closer to initializations.
6653 * tui/tui-winsource.c (tui_update_source_window_as_is): Remove
6654 init_sal references. Adjust.
6655
6c5b2ebe
PA
66562017-09-04 Pedro Alves <palves@redhat.com>
6657
6658 * ax-gdb.c (agent_command_1): Use range-for.
6659 * break-catch-throw.c (re_set_exception_catchpoint): Update.
6660 * breakpoint.c: Include "common/array-view.h".
6661 (init_breakpoint_sal, create_breakpoint_sal): Change sals
6662 parameter from struct symtabs_and_lines to
6663 array_view<symtab_and_line>. Adjust. Use range-for. Update.
6664 (breakpoint_sals_to_pc): Change sals parameter from struct
6665 symtabs_and_lines to std::vector reference.
6666 (check_fast_tracepoint_sals): Change sals parameter from struct
6667 symtabs_and_lines to std::array_view. Use range-for.
6668 (decode_static_tracepoint_spec): Return a std::vector instead of
6669 symtabs_and_lines. Update.
6670 (create_breakpoint): Update.
6671 (break_range_command, until_break_command, clear_command): Update.
6672 (base_breakpoint_decode_location, bkpt_decode_location)
6673 (bkpt_probe_create_sals_from_location)
6674 (bkpt_probe_decode_location, tracepoint_decode_location)
6675 (tracepoint_probe_decode_location)
6676 (strace_marker_create_sals_from_location): Return a std::vector
6677 instead of symtabs_and_lines.
6678 (strace_marker_create_breakpoints_sal): Update.
6679 (strace_marker_decode_location): Return a std::vector instead of
6680 symtabs_and_lines. Update.
6681 (update_breakpoint_locations): Change struct symtabs_and_lines
6682 parameters to gdb::array_view. Adjust.
6683 (location_to_sals): Return a std::vector instead of
6684 symtabs_and_lines. Update.
6685 (breakpoint_re_set_default): Use std::vector instead of struct
6686 symtabs_and_lines.
6687 (decode_location_default): Return a std::vector instead of
6688 symtabs_and_lines. Update.
6689 * breakpoint.h: Include "common/array-view.h".
6690 (struct breakpoint_ops) <decode_location>: Now returns a
6691 std::vector instead of returning a symtabs_and_lines via output
6692 parameter.
6693 (update_breakpoint_locations): Change sals parameters to use
6694 gdb::array_view.
6695 * cli/cli-cmds.c (edit_command, list_command): Update to use
6696 std::vector and gdb::array_view.
6697 (ambiguous_line_spec): Adjust to use gdb::array_view and
6698 range-for.
6699 (compare_symtabs): Rename to ...
6700 (cmp_symtabs): ... this. Change parameters to symtab_and_line
6701 const reference and adjust.
6702 (filter_sals): Rewrite using std::vector and standard algorithms.
6703 * elfread.c (elf_gnu_ifunc_resolver_return_stop): Simplify.
6704 (jump_command): Update to use std::vector.
6705 * linespec.c (struct linespec_state) <canonical_names>: Update
6706 comment.
6707 (add_sal_to_sals_basic): Delete.
6708 (add_sal_to_sals, filter_results, convert_results_to_lsals)
6709 (decode_line_2, create_sals_line_offset)
6710 (convert_address_location_to_sals, convert_linespec_to_sals)
6711 (convert_explicit_location_to_sals, parse_linespec)
6712 (event_location_to_sals, decode_line_full, decode_line_1)
6713 (decode_line_with_current_source)
6714 (decode_line_with_last_displayed, decode_objc)
6715 (decode_digits_list_mode, decode_digits_ordinary, minsym_found)
6716 (linespec_result::~linespec_result): Adjust to use std::vector
6717 instead of symtabs_and_lines.
6718 * linespec.h (linespec_sals::sals): Now a std::vector.
6719 (struct linespec_result): Use std::vector, bool, and in-class
6720 initialization.
6721 (decode_line_1, decode_line_with_current_source)
6722 (decode_line_with_last_displayed): Return std::vector.
6723 * macrocmd.c (info_macros_command): Use std::vector.
6724 * mi/mi-main.c (mi_cmd_trace_find): Use std::vector.
6725 * probe.c (parse_probes_in_pspace, parse_probes): Adjust to use
6726 std::vector.
6727 * probe.h (parse_probes): Return a std::vector.
6728 * python/python.c (gdbpy_decode_line): Use std::vector and
6729 gdb::array_view.
6730 * source.c (select_source_symtab, line_info): Use std::vector.
6731 * stack.c (func_command): Use std::vector.
6732 * symtab.h (struct symtabs_and_lines): Delete.
6733 * tracepoint.c (tfind_line_command, scope_info): Use std::vector.
6734
7c44b49c
PA
67352017-09-04 Pedro Alves <palves@redhat.com>
6736
6737 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
6738 unittests/array-view-selftests.c.
6739 (SUBDIR_UNITTESTS_OBS): Add array-view-selftests.o.
6740 * common/array-view.h: New file.
6741 * unittests/array-view-selftests.c: New file.
6742
e439fa14
PA
67432017-09-04 Pedro Alves <palves@redhat.com>
6744
6745 * cli/cli-cmds.c (edit_command): Pass message to
6746 ambiguous_line_spec.
6747 (list_command): Pass message to ambiguous_line_spec. Say
6748 "first"/"last" instead of "start" and "end" to be consistent with
6749 the manual.
6750 (ambiguous_line_spec): Add 'format' and vararg parameters. Use
6751 them to print formatted message.
6752
7525b645
PA
67532017-09-04 Pedro Alves <palves@redhat.com>
6754
6755 * btrace.c (ftrace_add_pt): Pass btrace_insn to
6756 ftrace_update_insns by reference instead of pointer.
6757
badc0020
YQ
67582017-09-04 Yao Qi <yao.qi@linaro.org>
6759
6760 * i386-go32-tdep.c: Include x86-xstate.h.
6761 (i386_go32_init_abi): Call i386_target_description.
6762 * i386-tdep.c (i386_target_description): Return tdesc_i386_mmx
6763 if xcr0 is X86_XSTATE_X87_MASK.
6764 * i386-tdep.h (tdesc_i386): Remove the declaration.
6765 (tdesc_i386_mmx): Likewise.
6766
d78bdb54
YQ
67672017-09-04 Yao Qi <yao.qi@linaro.org>
6768
6769 * i386-fbsd-tdep.c (i386fbsd_core_read_xcr0): Return
6770 X86_XSTATE_SSE_MASK instead of 0.
6771
ca1fa5ee
YQ
67722017-09-04 Yao Qi <yao.qi@linaro.org>
6773
6774 * amd64-fbsd-nat.c (amd64fbsd_read_description): Call
6775 i386_target_description.
6776 * i386-fbsd-nat.c (i386fbsd_read_description): Call
6777 i386_target_description.
6778 * i386-tdep.c (i386_gdbarch_init): Likewise.
6779
2434b019
YQ
67802017-09-04 Yao Qi <yao.qi@linaro.org>
6781
6782 * amd64-darwin-tdep.c: Include "x86-xstate.h".
6783 (x86_darwin_init_abi_64): Call amd64_target_description.
6784 * amd64-dicos-tdep.c: Likewise.
6785 * amd64-fbsd-nat.c: Likewise.
6786 * amd64-fbsd-tdep.c: Likewise.
6787 * amd64-nbsd-tdep.c: Likewise.
6788 * amd64-obsd-tdep.c: Likewise.
6789 * amd64-sol2-tdep.c: Likewise.
6790 * amd64-windows-tdep.c: Likewise.
6791 * amd64-tdep.h (tdesc_amd64): Remove the declaration.
6792
0860c437
SM
67932017-09-04 Simon Marchi <simon.marchi@ericsson.com>
6794
6795 * btrace.h (btrace_insn_s, DEF_VEC_O (btrace_insn_s)): Remove.
6796 (btrace_function) <insn>: Change type to use std::vector.
6797 * btrace.c (ftrace_debug, ftrace_call_num_insn,
6798 ftrace_find_call, ftrace_new_gap, ftrace_update_function,
6799 ftrace_update_insns, ftrace_compute_global_level_offset,
6800 btrace_stitch_bts, btrace_clear, btrace_insn_get,
6801 btrace_insn_end, btrace_insn_next, btrace_insn_prev): Adjust to
6802 change to std::vector.
6803 (ftrace_update_insns): Adjust to change to std::vector, change
6804 type of INSN parameter.
6805 (btrace_compute_ftrace_bts): Adjust call to ftrace_update_insns.
6806 * record-btrace.c (btrace_call_history_insn_range,
6807 btrace_compute_src_line_range,
6808 record_btrace_frame_prev_register): Adjust to change to
6809 std::vector.
6810 * python/py-record-btrace.c (recpy_bt_func_instructions): Adjust
6811 to change to std::vector.
6812
0638b7f9
TT
68132017-09-03 Tom Tromey <tom@tromey.com>
6814
6815 * corefile.c (reopen_exec_file): Use std::string.
6816
8f84fb0e
TT
68172017-09-03 Tom Tromey <tom@tromey.com>
6818
6819 * compile/compile.c (compile_register_name_mangled): Return
6820 std::string.
6821 * compile/compile-loc2c.c (pushf_register_address): Update.
6822 (pushf_register): Update.
6823 * compile/compile-c-types.c (convert_array): Update.
6824 * compile/compile-c-symbols.c (generate_vla_size): Update.
6825 (error_symbol_once): Use a gdb::unique_xmalloc_ptr.
6826 (symbol_substitution_name): Return a gdb::unique_xmalloc_ptr.
6827 (convert_one_symbol): Update.
6828 (generate_c_for_for_one_variable): Update.
6829 * compile/compile-c-support.c (c_get_range_decl_name): Return a
6830 std::string.
6831 (generate_register_struct): Update.
6832 * compile/compile-internal.h (c_get_range_decl_name): Return a
6833 std::string.
6834 (compile_register_name_mangled): Return std::string.
6835
18e9961f
TT
68362017-09-03 Tom Tromey <tom@tromey.com>
6837
6838 * utils.c (perror_string): Return a std::string.
6839 (throw_perror_with_name, perror_warning_with_name): Update.
6840
45343786
TT
68412017-09-03 Tom Tromey <tom@tromey.com>
6842
6843 * demangle.c (demangle_command): Use std::string,
6844 unique_xmalloc_ptr.
6845
b57af503
TT
68462017-09-03 Tom Tromey <tom@tromey.com>
6847
6848 * cli/cli-setshow.c (do_set_command): Use std::string.
6849
6eecf35f
TT
68502017-09-03 Tom Tromey <tom@tromey.com>
6851
6852 * cli/cli-cmds.c (cd_command): Use gdb::unique_xmalloc_ptr.
6853
56496dd4
TT
68542017-09-03 Tom Tromey <tom@tromey.com>
6855
6856 * mi/mi-interp.c (mi_cmd_interpreter_exec): Use std::string.
6857
e91a1fa7
TT
68582017-09-03 Tom Tromey <tom@tromey.com>
6859
6860 * mi/mi-cmd-env.c (env_execute_cli_command): Use
6861 gdb::unique_xmalloc_ptr.
6862
7ffd83d7
TT
68632017-09-03 Tom Tromey <tom@tromey.com>
6864
6865 * thread.c (print_thread_info_1): Use string_printf.
6866 (thread_apply_command, thread_apply_all_command): Use
6867 std::string.
6868
1ccbe998
TT
68692017-09-03 Tom Tromey <tom@tromey.com>
6870
6871 * valprint.c (val_print_string): Update.
6872 * gdbcore.h (memory_error_message): Return std::string.
6873 * corefile.c (memory_error_message): Return std::string.
6874 (memory_error): Update.
6875 * breakpoint.c (insert_bp_location): Update.
6876
23fdd69e
SM
68772017-09-03 Simon Marchi <simon.marchi@ericsson.com>
6878
6879 * target/waitstatus.h (target_waitstatus_to_string): Change
6880 return type to std::string.
6881 * target/waitstatus.c (target_waitstatus_to_string): Return
6882 std::string.
6883 * target.h (target_waitstatus_to_string): Remove declaration.
6884 * infrun.c (resume, clear_proceed_status_thread,
6885 print_target_wait_results, do_target_wait, save_waitstatus,
6886 stop_all_threads): Adjust.
6887 * record-btrace.c (record_btrace_wait): Adjust.
6888 * target-debug.h
6889 (target_debug_print_struct_target_waitstatus_p): Adjust.
6890
5c811d30
JK
68912017-09-01 Jan Kratochvil <jan.kratochvil@redhat.com>
6892
6893 PR gdb/22046
6894 * nat/linux-procfs.c (parse_proc_status_state): Fix PROC_STATE_STOPPED
6895 detection.
6896
0a2dde4a
SDJ
68972017-08-31 Sergio Durigan Junior <sergiodj@redhat.com>
6898
6899 * NEWS (Changes since GDB 8.0): Add entry mentioning new support
6900 for setting/unsetting environment variables on the remote target.
6901 (New remote packets): Add entries for QEnvironmentHexEncoded,
6902 QEnvironmentUnset and QEnvironmentReset.
6903 * common/environ.c (gdb_environ::operator=): Extend method to
6904 handle m_user_set_env_list and m_user_unset_env_list.
6905 (gdb_environ::clear): Likewise.
6906 (match_var_in_string): Change type of first parameter from 'char
6907 *' to 'const char *'.
6908 (gdb_environ::set): Extend method to handle
6909 m_user_set_env_list and m_user_unset_env_list.
6910 (gdb_environ::unset): Likewise.
6911 (gdb_environ::clear_user_set_env): New method.
6912 (gdb_environ::user_set_envp): Likewise.
6913 (gdb_environ::user_unset_envp): Likewise.
6914 * common/environ.h (gdb_environ): Handle m_user_set_env_list and
6915 m_user_unset_env_list on move constructor/assignment.
6916 (unset): Add new default parameter 'update_unset_list = true'.
6917 (clear_user_set_env): New method.
6918 (user_set_envp): Likewise.
6919 (user_unset_envp): Likewise.
6920 (m_user_set_env_list): New std::set.
6921 (m_user_unset_env_list): Likewise.
6922 * common/rsp-low.c (hex2str): New function.
6923 (bin2hex): New overload for bin2hex function.
6924 * common/rsp-low.c (hex2str): New prototype.
6925 (str2hex): New overload prototype.
6926 * remote.c: Include "environ.h". Add QEnvironmentHexEncoded,
6927 QEnvironmentUnset and QEnvironmentReset.
6928 (remote_protocol_features): Add QEnvironmentHexEncoded,
6929 QEnvironmentUnset and QEnvironmentReset packets.
6930 (send_environment_packet): New function.
6931 (extended_remote_environment_support): Likewise.
6932 (extended_remote_create_inferior): Call
6933 extended_remote_environment_support.
6934 (_initialize_remote): Add QEnvironmentHexEncoded,
6935 QEnvironmentUnset and QEnvironmentReset packet configs.
6936 * unittests/environ-selftests.c (gdb_selftest_env_var):
6937 New variable.
6938 (test_vector_initialization): New function.
6939 (test_init_from_host_environ): Likewise.
6940 (test_reinit_from_host_environ): Likewise.
6941 (test_set_A_unset_B_unset_A_cannot_find_A_can_find_B):
6942 Likewise.
6943 (test_unset_set_empty_vector): Likewise.
6944 (test_vector_clear): Likewise.
6945 (test_std_move): Likewise.
6946 (test_move_constructor):
6947 (test_self_move): Likewise.
6948 (test_set_unset_reset): Likewise.
6949 (run_tests): Rewrite in terms of the functions above.
6950
654670a4
WP
69512017-08-31 Weimin Pan <weimin.pan@oracle.com>
6952
6953 * sparc64-tdep.c (adi_stat_t): Fix comment formatting.
6954 (adi_available): Use a temp variable of type CORE_ADDR as argument
6955 3 when calling target_auxv_search.
6956 (adi_normalize_address): Use masks and xor operators to calculate
6957 normalized address.
6958 (adi_read_versions, adi_write_versions, adi_print_versions)
6959 (do_examine, do_assign): Use paddress.
6960
7755ddb7
JB
69612017-08-29 John Baldwin <jhb@FreeBSD.org>
6962
6963 * mips-fbsd-nat.c (getfpregs_supplies): Return true for FIR.
6964 * mips-fbsd-tdep.c (mips_fbsd_supply_fpregs): Split supply of FSR
6965 out of loop and add supply of FIR.
6966 (mips_fbsd_collect_fpregs): Split collect of FSR out of loop and
6967 add collect of FIR.
6968
fd437cbc
SM
69692017-08-28 Simon Marchi <simon.marchi@ericsson.com>
6970
3804a343 6971 PR gdb/21827
fd437cbc
SM
6972 * cli/cli-script.c (define_command): Don't convert command name
6973 to lower case.
6974
988f6b3d
JB
69752017-08-25 Joel Brobecker <brobecker@adacore.com>
6976
6977 * ada-lang.c (ada_lookup_struct_elt_type): Remove parameter "dispp".
6978 Update all callers accordingly. Remove all code blocks handling
6979 the case where DISPP is not NULL.
6980
663c44ac
JK
69812017-08-24 Jan Kratochvil <jan.kratochvil@redhat.com>
6982
6983 PR symtab/22003
6984 * dwarf2read.c (dwarf2_const_value_attr, dump_die_shallow)
6985 (dwarf2_get_attr_constant_value, dwarf2_fetch_constant_bytes)
6986 (skip_form_bytes, attr_form_is_constant): Handle DW_FORM_implicit_const.
6987
f1902523
JK
69882017-08-24 Jan Kratochvil <jan.kratochvil@redhat.com>
6989
6990 * dwarf2read.c (build_type_psymtabs_reader): New prototype.
6991 (process_psymtab_comp_unit): Accept IS_DEBUG_TYPES.
6992 (read_comp_units_from_section): New parameter abbrev_section, use
6993 read_and_check_comp_unit_head, allocate signatured_type if needed.
6994 (create_all_comp_units): Update read_comp_units_from_section caller.
6995
87215ad1
SDJ
69962017-08-23 Pedro Alves <palves@redhat.com>
6997
6998 PR remote/21852
6999 * remote.c (add_current_inferior_and_thread): Set inferior_ptid
7000 to null_ptid and switch to thread without reading the registers
7001 after adding the inferior.
7002
6e41ddec
JK
70032017-08-23 Jan Kratochvil <jan.kratochvil@redhat.com>
7004
7005 * NEWS (Changes since GDB 8.0): Add set compile-gcc and show
7006 compile-gcc.
7007 * compile/compile.c (compile_gcc, show_compile_gcc): New.
7008 (compile_to_object): Implement compile_gcc.
7009 (_initialize_compile): Install "set compile-gcc". Initialize
7010 compile_gcc.
7011
e68c32d5
JK
70122017-08-23 Jan Kratochvil <jan.kratochvil@redhat.com>
7013
7014 * compile/compile.c (compile_to_object): Conditionally call
7015 set_verbose. Conditionally call compile or compile_v0.
7016
58afddc6
WP
70172017-08-07 Weimin Pan <weimin.pan@oracle.com>
7018
7019 * sparc64-tdep.h: (adi_normalize_address): New export.
7020 * sparc-nat.h: (open_adi_tag_fd): New export.
7021 * sparc64-linux-nat.c: (open_adi_tag_fd): New function.
7022 * sparc64-linux-tdep.c:
7023 (SEGV_ACCADI, SEGV_ADIDERR, SEGV_ADIPERR) New defines.
7024 (sparc64_linux_handle_segmentation_fault): New function.
7025 (sparc64_linux_init_abi): Register
7026 sparc64_linux_handle_segmentation_fault
7027 * sparc64-tdep.c: Include cli-utils.h,gdbcmd.h,auxv.h.
7028 (sparc64_addr_bits_remove): New function.
7029 (sparc64_init_abi): Register sparc64_addr_bits_remove.
7030 (MAX_PROC_NAME_SIZE): New macro.
7031 (AT_ADI_BLKSZ, AT_ADI_NBITS, AT_ADI_UEONADI) New defines.
7032 (sparc64adilist): New variable.
7033 (adi_proc_list): New variable.
7034 (find_adi_info): New function.
7035 (add_adi_info): New function.
7036 (get_adi_info_proc): New function.
7037 (get_adi_info): New function.
7038 (info_adi_command): New function.
7039 (read_maps_entry): New function.
7040 (adi_available): New function.
7041 (adi_normalize_address): New function.
7042 (adi_align_address): New function.
7043 (adi_convert_byte_count): New function.
7044 (adi_tag_fd): New function.
7045 (adi_is_addr_mapped): New function.
7046 (adi_read_versions): New function.
7047 (adi_write_versions): New function.
7048 (adi_print_versions): New function.
7049 (do_examine): New function.
7050 (do_assign): New function.
7051 (adi_examine_command): New function.
7052 (adi_assign_command): New function.
7053 (_initialize_sparc64_adi_tdep): New function.
7054
11db9430
SM
70552017-08-22 Simon Marchi <simon.marchi@ericsson.com>
7056
7057 * breakpoint.c (breakpoints_info): Rename to ...
7058 (info_breakpoints_command): ... this.
7059 (watchpoints_info): Rename to ...
7060 (info_watchpoints_command): ... this.
7061 (tracepoints_info): Rename to ...
7062 (info_tracepoints_command): ... this.
7063 (_initialize_breakpoint): Adjust.
7064 * dcache.c (dcache_info): Rename to ...
7065 (info_display_command): ... this.
7066 (_initialize_dcache): Adjust.
7067 * frame.h (args_info): Rename to ...
7068 (info_args_command): ... this.
7069 (locals_info): Rename to ...
7070 (info_locals_command): ... this.
7071 * infcmd.c (nofp_registers_info): Rename to ...
7072 (info_registers_command): ... this.
7073 (float_info): Rename to ...
7074 (info_float_command): ... this.
7075 (program_info): Rename to ...
7076 (info_program_command): ... this.
7077 (all_registers_info): Rename to ...
7078 (info_all_registers_command): ... this.
7079 (vector_info): Rename to ...
7080 (info_vector_command): ... this.
7081 (float_info): Rename to ...
7082 (info_float_command): ... this.
7083 (_initialize_infcmd): Adjust.
7084 * inferior.h (term_info): Rename to ...
7085 (info_terminal_command): ... this.
7086 * inflow.c (term_info): Rename to ...
7087 (info_terminal_command): ... this.
7088 (_initialize_inflow): Adjust.
7089 * infrun.c (signals_info): Rename to ...
7090 (info_signals_command): ... this.
7091 (_initialize_infrun): Adjust.
7092 * objc-lang.c (classes_info): Rename to ...
7093 (info_classes_command): ... this.
7094 (selectors_info): Rename to ...
7095 (info_selectors_command): ... this.
7096 (_initialize_objc_language): Adjust.
7097 * printcmd.c (sym_info): Rename to ...
7098 (info_symbol_command): ... this.
7099 (address_info): Rename to ...
7100 (info_address_command): ... this.
7101 (display_info): Rename to ...
7102 (info_display_command): ... this.
7103 (_initialize_printcmd): Adjust.
7104 * reverse.c (bookmarks_info): Rename to ...
7105 (info_breakpoints_command): ... this.
7106 (_initialize_reverse): Adjust.
7107 * ser-go32.c (dos_info): Rename to ...
7108 (info_serial_command): ... this.
7109 (_initialize_ser_dos): Adjust.
7110 * skip.c (skip_info): Rename to ...
7111 (info_skip_command): ... this.
7112 (_initialize_step_skip): Adjust.
7113 * source.c (line_info): Rename to ...
7114 (info_line_command): ... this.
7115 (source_info): Rename to ...
7116 (info_source_command)
7117 * stack.c (frame_info): Rename to ...
7118 (info_frame_command): ... this.
7119 (locals_info): Rename to ...
7120 (info_locals_command): ... this.
7121 (args_info): Rename to ...
7122 (info_args_command): ... this.
7123 (_initialize_stack): Adjust.
7124 * symtab.c (sources_info): Rename to ...
7125 (info_sources_command): ... this.
7126 (variables_info): Rename to ...
7127 (info_variables_command): ... this.
7128 (functions_info): Rename to ...
7129 (info_functions_command): ... this.
7130 (types_info): Rename to ...
7131 (info_types_command): ... this.
7132 (_initialize_symtab): Adjust.
7133 * target.c (target_info): Rename to ...
7134 (info_target_command): ... this.
7135 (initialize_targets): Adjust.
7136 * tracepoint.c (tvariables_info): Rename to ...
7137 (info_tvariables_command): ... this.
7138 (scope_info): Rename to ...
7139 (info_scope_command): ... this.
7140 (trace_dump_actions): Adjust.
7141 (_initialize_tracepoint): Adjust.
7142
b270e6f9
TT
71432017-08-22 Tom Tromey <tom@tromey.com>
7144
7145 * breakpoint.h (install_breakpoint): Update.
7146 * breakpoint.c (add_solib_catchpoint): Update.
7147 (install_breakpoint): Change argument to a std::unique_ptr.
7148 (create_fork_vfork_event_catchpoint): Use std::unique_ptr.
7149 (create_breakpoint_sal, create_breakpoint): Update.
7150 (watch_command_1, catch_exec_command_1)
7151 (strace_marker_create_breakpoints_sal): Use std::unique_ptr.
7152 (add_to_breakpoint_chain): Change argument to a std::unique_ptr.
7153 Return the breakpoint.
7154 (set_raw_breakpoint_without_location, set_raw_breakpoint)
7155 (new_single_step_breakpoint): Update.
7156 * break-catch-throw.c (handle_gnu_v3_exceptions): Use
7157 std::unique_ptr.
7158 * break-catch-syscall.c (create_syscall_event_catchpoint): Use
7159 std::unique_ptr.
7160 * break-catch-sig.c (create_signal_catchpoint): Use
7161 std::unique_ptr.
7162 * ada-lang.c (create_ada_exception_catchpoint): Use
7163 std::unique_ptr.
7164
36bd8eaa
TT
71652017-08-22 Tom Tromey <tom@tromey.com>
7166
7167 * breakpoint.c (add_solib_catchpoint): Use std::unique_ptr.
7168
56f37645
TT
71692017-08-22 Tom Tromey <tom@tromey.com>
7170
7171 * psymtab.c (psymtab_search_name): Return a unique_xmalloc_ptr.
7172 (lookup_partial_symbol): Update.
7173
0b581c69
TT
71742017-08-22 Tom Tromey <tom@tromey.com>
7175
7176 * source.h (rewrite_source_path): Return a unique_xmalloc_ptr.
7177 * source.c (rewrite_source_path): Return a unique_xmalloc_ptr.
7178 (find_and_open_source, symtab_to_fullname): Update.
7179 * psymtab.c (psymtab_to_fullname): Update.
7180
14278e1f
TT
71812017-08-22 Tom Tromey <tom@tromey.com>
7182
7183 * exec.c (exec_file_attach): Update.
7184 * linux-thread-db.c (try_thread_db_load): Update.
7185 * guile/scm-safe-call.c (gdbscm_safe_source_script): Update.
7186 * utils.c (gdb_realpath): Change return type.
7187 (gdb_realpath_keepfile): Update.
7188 (gdb_realpath_check_trailer, gdb_realpath_tests): New functions.
7189 (_initialize_utils): Register the new self test.
7190 * source.c (openp): Update.
7191 (find_and_open_source): Update.
7192 * nto-tdep.c (nto_find_and_open_solib): Update.
7193 * main.c (set_gdb_data_directory): Update.
7194 (captured_main_1): Update.
7195 * dwarf2read.c (dwarf2_get_dwz_file): Update
7196 (dw2_map_symbol_filenames): Update.
7197 * auto-load.c (auto_load_safe_path_vec_update): Update.
7198 (filename_is_in_auto_load_safe_path_vec): Change type of
7199 "filename_realp".
7200 (auto_load_objfile_script): Update.
7201 (file_is_auto_load_safe): Update. Use std::string.
7202 * utils.h (gdb_realpath): Return a gdb::unique_xmalloc_ptr.
7203
4971c9a7
TT
72042017-08-22 Tom Tromey <tom@tromey.com>
7205
7206 * utils.c (gdb_realpath_keepfile): Return a
7207 gdb::unique_xmalloc_ptr.
7208 * exec.c (exec_file_attach): Update.
7209 * utils.h (gdb_realpath_keepfile): Return a
7210 gdb::unique_xmalloc_ptr.
7211
e3e41d58
TT
72122017-08-22 Tom Tromey <tom@tromey.com>
7213
7214 * compile/compile.c (compile_file_command): Use
7215 gdb::unique_xmalloc_ptr, std::string.
7216 * utils.c (gdb_abspath): Change return type.
7217 * source.c (openp): Update.
7218 * objfiles.c (allocate_objfile): Update.
7219 * main.c (set_gdb_data_directory): Update.
7220 * utils.h (gdb_abspath): Return a gdb::unique_xmalloc_ptr.
7221
0d999a6e
ZZ
72222017-08-22 Zhouyi Zhou <zhouzhouyi@gmail.com>
7223
7224 * cli-cmds.c (list_commands): List actual code around more than
7225 one location.
7226
329d5e7e
JB
72272017-08-21 John Baldwin <jhb@FreeBSD.org>
7228
7229 * fbsd-nat.c (fbsd_add_threads): Use array type for `lwps'.
7230
bf223d3e
PA
72312017-08-21 Pedro Alves <palves@redhat.com>
7232
7233 PR gdb/19487
7234 * c-exp.y (variable production): Handle function aliases.
7235 * minsyms.c (msymbol_is_text): New function.
7236 * minsyms.h (msymbol_is_text): Declare.
7237 * symtab.c (find_function_alias_target): New function.
7238 * symtab.h (find_function_alias_target): Declare.
7239
c973d0aa
PA
72402017-08-21 Pedro Alves <palves@redhat.com>
7241
7242 * eval.c (evaluate_subexp_standard) <OP_TYPE>: Don't dig past
7243 typedefs.
7244 * typeprint.c (whatis_exp): If handling "whatis", and expression
7245 is OP_TYPE, strip one typedef level. Otherwise don't strip
7246 typedefs here.
7247 * valops.c (value_cast): Save "to" type before resolving
7248 stubs/typedefs. Use that type as resulting value's type.
7249
2989a365
TT
72502017-08-18 Tom Tromey <tom@tromey.com>
7251 Pedro Alves <palves@redhat.com>
7252
7253 * spu-multiarch.c (parse_spufs_run): Use scoped_restore.
7254 * sol-thread.c (sol_thread_resume, sol_thread_wait)
7255 (sol_thread_xfer_partial, rw_common): Use scoped_restore.
7256 * procfs.c (procfs_do_thread_registers): Use scoped_restore.
7257 * proc-service.c (ps_xfer_memory): Use scoped_restore.
7258 * linux-tdep.c (linux_corefile_thread): Remove a cleanup.
7259 (linux_get_siginfo_data): Add "thread" argument. Use
7260 scoped_restore.
7261 * linux-nat.c (linux_child_follow_fork)
7262 (check_stopped_by_watchpoint): Use scoped_restore.
7263 * infrun.c (displaced_step_prepare_throw, write_memory_ptid)
7264 (THREAD_STOPPED_BY, handle_signal_stop): Use scoped_restore.
7265 (restore_inferior_ptid, save_inferior_ptid): Remove.
7266 * btrace.c (btrace_fetch): Use scoped_restore.
7267 * bsd-uthread.c (bsd_uthread_fetch_registers)
7268 (bsd_uthread_store_registers): Use scoped_restore.
7269 * breakpoint.c (reattach_breakpoints, detach_breakpoints): Use
7270 scoped_restore.
7271 * aix-thread.c (aix_thread_resume, aix_thread_wait)
7272 (aix_thread_xfer_partial): Use scoped_restore.
7273 * inferior.h (save_inferior_ptid): Remove.
7274
e60eb288
YQ
72752017-08-18 Yao Qi <yao.qi@linaro.org>
7276
7277 PR tdep/21818
7278 * arm-tdep.c (gdb_print_insn_arm): Mark
7279 USER_SPECIFIED_MACHINE_TYPE if exec_bfd isn't NULL.
7280
6d580b63
YQ
72812017-08-18 Yao Qi <yao.qi@linaro.org>
7282
7283 * NEWS: Mention GDBserver's new option "--selftest".
7284 * Makefile.in (SFILES): Remove selftest.c, add common/selftest.c.
7285 * selftest.c: Move it to common/selftest.c.
7286 * selftest.h: Move it to common/selftest.h.
7287 * selftest-arch.c (reset): New function.
7288 (tests_with_arch): Call reset.
7289
86dcbf50
YQ
72902017-08-18 Yao Qi <yao.qi@linaro.org>
7291
7292 * selftest.c (run_tests): Don't call QUIT. Call debug_printf
7293 instead of exception_fprintf and printf_filtered.
7294
7649770c
YQ
72952017-08-18 Yao Qi <yao.qi@linaro.org>
7296
7297 * selftest.c (register_self_test): Rename it to
7298 selftests::register_test.
7299 (run_self_tests): selftest::run_tests.
7300 * selftest.h: Update declarations.
7301 * selftest-arch.c (register_self_test_foreach_arch): Rename it to
7302 selftests::register_test_foreach_arch.
7303 * selftest-arch.h: Update declaration.
7304 * aarch64-tdep.c: Update.
7305 * arm-tdep.c: Likewise.
7306 * disasm-selftests.c: Likewise.
7307 * dwarf2loc.c: Likewise.
7308 * dwarf2-frame.c: Likewise.
7309 * findvar.c: Likewise.
7310 * gdbarch-selftests.c: Likewise.
7311 * maint.c (maintenance_selftest): Likewise.
7312 * regcache.c: Likewise.
7313 * rust-exp.y: Likewise.
7314 * selftest-arch.c: Likewise.
7315 * unittests/environ-selftests.c: Likewise.
7316 * unittests/function-view-selftests.c: Likewise.
7317 * unittests/offset-type-selftests.c: Likewise.
7318 * unittests/optional-selftests.c: Likewise.
7319 * unittests/scoped_restore-selftests.c: Likewise.
7320 * utils-selftests.c: Likewise.
7321
b0cba12e
PA
73222017-08-17 Pedro Alves <palves@redhat.com>
7323
7324 * cli/cli-cmds.c (source_command): Delete 'old_source_verbose'
7325 local.
7326
4c8aa72d
PA
73272017-08-17 Pedro Alves <palves@redhat.com>
7328
7329 * dwarf2read.c (struct dwarf2_cu) <line_header_die_owner>: New
7330 field.
7331 (reset_die_in_process): Delete, replaced by ...
7332 (process_die_scope): ... this new class. Make it responsible for
7333 freeing cu->line_header too.
7334 (process_die): Use process_die_scope.
7335 (handle_DW_AT_stmt_list): Record the line header's owner CU/DIE in
7336 cu->line_header_die_owner. Don't release the line header if it's
7337 owned by the CU.
7338 (setup_type_unit_groups): Make the CU/DIE own the line header.
7339 Don't release the line header here.
7340
ba713918
AL
73412017-08-17 Alex Lindsay <alexlindsay239@gmail.com> (tiny change)
7342
7343 * elfread.c (elf_read_minimal_symbols): xfree synthsyms.
7344
44d0fb3a
RK
73452017-08-17 Ruslan Kabatsayev <b7.10110111@gmail.com>
7346
7347 * NEWS: Mention new shortcuts for nexti and stepi in TUI
7348 Single-Key mode
7349
a5afdb16
RK
73502017-08-16 Ruslan Kabatsayev <b7.10110111@gmail.com>
7351
7352 * tui/tui.c (tui_commands): Add "nexti" and "stepi" to the Single-Key
7353 mode command list.
7354
47613aeb
SH
73552017-08-15 Stafford Horne <shorne@gmail.com>
7356
7357 * MAINTAINERS (Write After Approval): Add Stafford Horne.
7358
9c3cc999
SH
73592017-08-15 Stafford Horne <shorne@gmail.com>
7360
7361 * xtensa-tdep.c (xtensa_init_reggroups): Use xstrdup for cpname.
7362
206726fb
SDJ
73632017-08-15 Sergio Durigan Junior <sergiodj@redhat.com>
7364
7365 PR gdb/21954
7366 * infcmd.c (unset_environment_command): Use the 'clear' method on
7367 the environment instead of resetting it.
7368
0335ac6d
JB
73692017-08-15 John Baldwin <jhb@FreeBSD.org>
7370
7371 * fbsd-nat.c (fbsd_convert_siginfo): Fix compile on big-endian
7372 platforms.
7373
d3abe1c8
TT
73742017-08-14 Tom Tromey <tom@tromey.com>
7375
7376 * valprint.c (print_octal_chars): Use HOST_CHAR_BIT.
7377 (print_binary_chars): Likewise.
7378 (BITS_IN_BYTES): Remove.
7379
d6382fff
TT
73802017-08-14 Tom Tromey <tom@tromey.com>
7381
7382 PR gdb/21675
7383 * valprint.c (LOW_ZERO): Change value to 034.
7384 (print_octal_chars): Add static_asserts for octal constants.
7385 * printcmd.c (print_scalar_formatted): Add 'd' case.
7386
f978cb06
TT
73872017-08-11 Tom Tromey <tom@tromey.com>
7388
7389 * symfile.c (add_symbol_file_command): Use std::vector.
7390
2f5404b3
TT
73912017-08-14 Tom Tromey <tom@tromey.com>
7392
7393 * break-catch-throw.c (handle_gnu_v3_exceptions): Use std::move.
7394 * break-catch-syscall.c (create_syscall_event_catchpoint): Use
7395 std::move.
7396 * break-catch-sig.c (create_signal_catchpoint): Use std::move.
7397
de7985c3
PA
73982017-08-11 Pedro Alves <palves@redhat.com>
7399
7400 * infrun.c (process_event_stop_test): Adjust
7401 function_name_is_marked_for_skip call.
7402 * skip.c: Include <list>.
7403 (skiplist_entry): Make it a class with private fields, and
7404 getters/setters.
7405 (skiplist_entry_chain): Delete.
7406 (skiplist_entries): New.
7407 (skiplist_entry_count): Delete.
7408 (highest_skiplist_entry_num): New.
7409 (ALL_SKIPLIST_ENTRIES, ALL_SKIPLIST_ENTRIES_SAFE): Delete.
7410 (add_skiplist_entry): Delete.
7411 (skiplist_entry::skiplist_entry): New.
7412 (skiplist_entry::add_entry): New.
7413 (skip_file_command, skip_function): Adjust.
7414 (compile_skip_regexp): Delete.
7415 (skip_command): Don't compile regexp here. Adjust to use
7416 skiplist_entry::add_entry.
7417 (skip_info): Adjust to use range-for and getters.
7418 (skip_enable_command, skip_disable_command): Adjust to use
7419 range-for and setters.
7420 (skip_delete_command): Adjust to use std::list.
7421 (add_skiplist_entry): Delete.
7422 (skip_file_p): Delete, refactored as ...
7423 (skiplist_entry::do_skip_file_p): ... this new method.
7424 (skip_gfile_p): Delete, refactored as ...
7425 (skiplist_entry::do_gskip_file_p): ... this new method.
7426 (skip_function_p, skip_rfunction_p): Delete, refactored as ...
7427 (skiplist_entry::skip_function_p): ... this new method.
7428 (function_name_is_marked_for_skip): Now returns bool, and takes
7429 the function sal by const reference. Adjust to use range-for and
7430 skiplist_entry methods.
7431 (_initialize_step_skip): Remove references to
7432 skiplist_entry_chain, skiplist_entry_count.
7433 * skip.h (function_name_is_marked_for_skip): Now returns bool, and
7434 takes the function sal by const reference.
7435
be7d3cd5
YQ
74362017-08-11 Yao Qi <yao.qi@linaro.org>
7437
7438 * dwarf2-frame.c (clear_pointer_cleanup): Remove.
7439 (dwarf2_frame_cache): Remove reset_cache_cleanup.
7440 (dwarf2_frame_cache):
7441 * frame-unwind.c (frame_unwind_try_unwinder): Catch
7442 RETURN_MASK_ALL and set *this_case to NULL.
7443 * frame-unwind.h: Update comments.
7444
1c90d9f0
YQ
74452017-08-11 Yao Qi <yao.qi@linaro.org>
7446
7447 * dwarf2-frame.c (dwarf2_frame_state_alloc_regs): Remove.
7448 (dwarf2_frame_state_copy_regs): Remove.
7449 (dwarf2_frame_state_free_regs): Remove.
7450 (dwarf2_frame_state::~dwarf2_frame_state): Remove.
7451 (dwarf2_restore_rule): Call method .alloc_regs instead of
7452 dwarf2_frame_state_alloc_regs.
7453 (execute_cfa_program): Likewise. Call dwarf2_frame_state_reg_info
7454 constructor. Call std::move.
7455 (dwarf2_fetch_cfa_info): Don't call dwarf2_frame_state_copy_regs.
7456 (dwarf2_frame_cache): Likewise.
7457
7458 [GDB_SELF_TEST]: Include selftest.h and
7459 selftest-arch.h.
7460 [GDB_SELF_TEST] (execute_cfa_program_test): New function.
7461 (_initialize_dwarf2_frame) [GDB_SELF_TEST]: Register
7462 execute_cfa_program_test.
7463
7464 * dwarf2-frame.h (dwarf2_frame_state_reg_info): Add ctor, dtor,
7465 copy ctor, assignment operator, move assignment.
7466 <alloc_regs>: New method.
7467 <swap>: New method.
7468 (struct dwarf2_frame_state): Delete dtor.
7469 (dwarf2_frame_state_alloc_regs): Remove declaration.
7470 * sparc-tdep.c (sparc_execute_dwarf_cfa_vendor_op): Don't call
7471 dwarf2_frame_state_alloc_regs, use .alloc_regs instead.
7472
afe37d6b
YQ
74732017-08-11 Yao Qi <yao.qi@linaro.org>
7474
7475 * dwarf2-frame.c (dwarf2_frame_state_free): Remove.
7476 (dwarf2_frame_state::dwarf2_frame_state): New.
7477 (dwarf2_frame_state::~dwarf2_frame_state): New.
7478 (dwarf2_fetch_cfa_info): Update.
7479 (dwarf2_frame_cache): Remove old_chain. Change 'fs' to an object
7480 rather than a pointer. Update code.
7481 * dwarf2-frame.h (struct dwarf2_frame_state): Declare ctor and
7482 dtor.
7483 <data_align, code_align, retaddr_column>: Change them to const.
7484 <armcc_cfa_offsets_sf, armcc_cfa_offsets_reversed>: Change them
7485 to bool.
7486
b348037f
YQ
74872017-08-11 Yao Qi <yao.qi@linaro.org>
7488
7489 * dwarf2-frame.h (struct dwarf2_frame_state_reg) <exp_len>: Remove.
7490 <loc.exp>: New field.
7491 * dwarf2-frame.c (execute_cfa_program): Update.
7492 (dwarf2_frame_prev_register): Update.
7493
e7c9de26
PA
74942017-08-10 Pedro Alves <palves@redhat.com>
7495
7496 * common/gdb_unique_ptr.h (xfree_deleter<T[]>): Define.
7497
e8c6b620
JB
74982017-08-09 John Baldwin <jhb@FreeBSD.org>
7499
7500 * fbsd-nat.c (struct fbsd_fork_info): Remove.
7501 (fbsd_pending_children): Use std::list.
7502 (fbsd_remember_child): Likewise.
7503 (fbsd_is_child_pending): Likewise.
7504 (fbsd_pending_vfork_done): Use std::forward_list.
7505 (fbsd_add_vfork_done): Likewise.
7506 (fbsd_is_vfork_done_pending): Likewise.
7507 (fbsd_next_vfork_done): Likewise.
7508
e4a26669
JB
75092017-08-09 John Baldwin <jhb@FreeBSD.org>
7510
7511 * fbsd-nat.c [HAVE_KINFO_GETVMMAP] (struct free_deleter): New.
7512 (fbsd_find_memory_regions): Use free_deleter with std::unique_ptr.
7513 [!HAVE_KINFO_GETVMMAP] (fbsd_find_memory_regions): Use std::string
7514 for `mapfilename'.
7515 (fbsd_xfer_partial): Use gdb::byte_vector.
af3881e6 7516 (fbsd_add_threads): Use gdb::unique_xmalloc_ptr.
e4a26669 7517
142311d3
JB
75182017-08-09 John Baldwin <jhb@FreeBSD.org>
7519
7520 * fbsd-nat.c: [!HAVE_KINFO_GETVMMAP]: Include <sys/user.h> and
7521 "filestuff.h".
7522 (fbsd_find_memory_regions): Fix `mapfile' initialization.
7523
42fa2e0e
TT
75242017-08-09 Tom Tromey <tom@tromey.com>
7525
7526 * skip.c (skiplist_entry): New constructor.
7527 (skiplist_entry::enabled, skiplist_entry::function_is_regexp)
7528 (skiplist_entry::file_is_glob): Now bool.
7529 (skiplist_entry::file, skiplist_entry::function): Now
7530 std::string.
7531 (make_skip_entry): Return a unique_ptr. Use new.
7532 (free_skiplist_entry, free_skiplist_entry_cleanup)
7533 (make_free_skiplist_entry_cleanup): Remove.
7534 (skip_command, skip_disable_command, add_skiplist_entry)
7535 (skip_form_bytes, compile_skip_regexp, skip_command, skip_info)
7536 (skip_file_p, skip_gfile_p, skip_function_p, skip_rfunction_p)
7537 (function_name_is_marked_for_skip): Update.
7538 (skip_delete_command): Update. Use delete.
7539
cd3af38d
JW
75402017-08-09 Jiong Wang <jiong.wang@arm.com>
7541
7542 * aarch64-linux-tdep.c: Include "auxv.h" and "elf/common.h".
7543 (aarch64_linux_core_read_description): New function.
7544 (aarch64_linux_init_abi): Register gdbarch_core_read_description.
7545
29592bde
PA
75462017-08-09 Pedro Alves <palves@redhat.com>
7547
7548 * cp-name-parser.y (cp_comp_to_string): Return a
7549 gdb::unique_xmalloc_ptr<char>.
7550 * cp-support.c (replace_typedefs_qualified_name)
7551 (replace_typedefs): Adjust to use gdb::unique_xmalloc_ptr<char>.
7552 (cp_canonicalize_string_full): Use op= instead of explicit
7553 convertion.
7554 (cp_class_name_from_physname, method_name_from_physname)
7555 (cp_func_name, cp_remove_params): Adjust to use
7556 gdb::unique_xmalloc_ptr<char>.
7557 * cp-support.h (cp_comp_to_string): Return a
7558 gdb::unique_xmalloc_ptr<char>.
7559 * python/py-type.c (typy_lookup_type): Adjust to use
7560 gdb::unique_xmalloc_ptr<char>.
7561
b3340438
L
75622017-08-09 H.J. Lu <hongjiu.lu@intel.com>
7563
7564 * dwarf2read.c (dwarf2_string_attr): Fix a typo.
7565
e88e8651
YQ
75662017-08-09 Alex Lindsay <alexlindsay239@gmail.com>
7567 Yao Qi <yao.qi@linaro.org>
7568
7569 * cp-support.c (cp_canonicalize_string_full): Use
7570 gdb::unique_xmalloc_ptr<char>.
7571 (cp_canonicalize_string): Likewise.
7572
f5a29eb0
YQ
75732017-08-09 Yao Qi <yao.qi@linaro.org>
7574
7575 * features/Makefile (WHICH): Remove i386/ non-linux stuff.
7576 * regformats/i386/amd64-avx-avx512.dat: Remove.
7577 * regformats/i386/amd64-avx-mpx-avx512-pku.dat: Remove.
7578 * regformats/i386/amd64-avx-mpx.dat:Remove.
7579 * regformats/i386/amd64-avx.dat: Remove.
7580 * regformats/i386/amd64-mpx.dat: Remove.
7581 * regformats/i386/i386-avx-avx512.dat: Remove.
7582 * regformats/i386/i386-avx-mpx-avx512-pku.dat: Remove.
7583 * regformats/i386/i386-avx-mpx.dat: Remove.
7584 * regformats/i386/i386-mmx.dat: Remove.
7585 * regformats/i386/i386-mpx.dat: Remove.
7586
57757c2f
YQ
75872017-08-09 Yao Qi <yao.qi@linaro.org>
7588
7589 * amd64-tdep.h (tdesc_x32): Remove the declaration.
7590 * amd64-tdep.c: Don't include features/i386/x32*.c.
7591 (_initialize_amd64_tdep): Don't call initialize_tdesc_x32*
7592 functions.
7593 * features/Makefile (WHICH): Remove i386/x32, i386/x32-avx,
7594 and i386/x32-avx-avx512.
7595 (XMLTOC): Remove i386/x32-avx.xml, i386/x32-avx-avx512.xml,
7596 and i386/x32.xml.
7597 * features/i386/x32-avx-avx512.c: Removed.
7598 * features/i386/x32-avx-avx512.xml: Removed.
7599 * features/i386/x32-avx.c: Removed.
7600 * features/i386/x32-avx.xml: Removed.
7601 * features/i386/x32.c: Removed.
7602 * features/i386/x32.xml: Removed.
7603 * regformats/i386/x32-avx-avx512.dat: Removed.
7604 * regformats/i386/x32-avx.dat: Removed.
7605 * regformats/i386/x32.dat: Removed.
7606
ba7b109b
MR
76072017-08-07 Maciej W. Rozycki <macro@imgtec.com>
7608
7609 PR breakpoints/21886
7610 * mem-break.c (default_memory_insert_breakpoint): Use
7611 `->placed_address' rather than `->reqstd_address' for the
7612 breakpoint location.
7613
e347efc3
MR
76142017-08-07 Maciej W. Rozycki <macro@imgtec.com>
7615
7616 * arch-utils.c (default_print_insn): Remove arch/mach/endian
7617 assertions.
7618
0dba2a6c
MR
76192017-08-07 Maciej W. Rozycki <macro@imgtec.com>
7620
7621 * gdbarch.sh (gdbarch_info): Replace the `tdep_info' member with
7622 a union of `tdep_info', `tdesc_data' and `id'.
7623 * aarch64-tdep.c (aarch64_gdbarch_init): Use `info.tdesc_data'
7624 rather than `info.tdep_info'.
7625 * amd64-linux-tdep.c (amd64_linux_init_abi): Likewise.
7626 * i386-linux-tdep.c (i386_linux_init_abi): Likewise.
7627 * i386-tdep.c (i386_gdbarch_init): Likewise.
7628 * mips-linux-tdep.c (mips_linux_init_abi): Likewise.
7629 * mips-tdep.c (mips_gdbarch_init): Likewise.
7630 * nds32-tdep.c (nds32_gdbarch_init): Likewise.
7631 * rs6000-tdep.c (rs6000_gdbarch_init): Likewise.
7632 * ppc-linux-tdep.c (ppu2spu_sniffer): Use `info.id' rather than
7633 `info.tdep_info'.
7634 (ppc_linux_init_abi): Use `info.tdesc_data' rather than
7635 `info.tdep_info'.
7636 * sparc-tdep.c (sparc32_gdbarch_init): Likewise.
7637 * spu-multiarch.c (spu_gdbarch): Use `info.id' rather than
7638 `info.tdep_info'.
7639 * spu-tdep.c (spu_gdbarch_init): Likewise.
7640 * gdbarch.h: Regenerate.
7641
16eb6b2d
LS
76422017-08-07 Leszek Swirski <leszeks@google.com>
7643
7b005726 7644 PR symtab/20899
16eb6b2d
LS
7645 * dwarf2read.c (dwarf2_string_attr): Allow DW_FORM_GNU_strp_alt.
7646
74cbb09e
SM
76472017-08-07 Simon Marchi <simon.marchi@ericsson.com>
7648
7649 * remote-sim.c (gdbsim_load): Remove char **argv local variable.
7650 (gdbsim_open): Rename gdb_argv args object to argv.
7651
ee0c3293
TT
76522017-08-05 Tom Tromey <tom@tromey.com>
7653
7654 * compile/compile-object-load.c (compile_object_load): Use
7655 gdb::unique_xmalloc_ptr.
7656 * cli/cli-dump.c (scan_filename): Rename from
7657 scan_filename_with_cleanup. Change return type.
7658 (scan_expression): Rename from scan_expression_with_cleanup.
7659 Change return type.
7660 (dump_memory_to_file, dump_value_to_file, restore_command):
7661 Use gdb::unique_xmalloc_ptr. Update.
7662 * cli/cli-cmds.c (find_and_open_script): Use
7663 gdb::unique_xmalloc_ptr.
7664 * tracefile-tfile.c (tfile_open): Use gdb::unique_xmalloc_ptr.
7665 * symmisc.c (maintenance_print_symbols)
7666 (maintenance_print_msymbols): Use gdb::unique_xmalloc_ptr.
7667 * symfile.c (symfile_bfd_open, generic_load)
7668 (add_symbol_file_command, remove_symbol_file_command): Use
7669 gdb::unique_xmalloc_ptr.
7670 * source.c (openp): Use gdb::unique_xmalloc_ptr.
7671 * psymtab.c (maintenance_print_psymbols): Use
7672 gdb::unique_xmalloc_ptr.
7673 * corelow.c (core_open): Use gdb::unique_xmalloc_ptr.
7674 * breakpoint.c (save_breakpoints): Use gdb::unique_xmalloc_ptr.
7675 * solib.c (solib_map_sections): Use gdb::unique_xmalloc_ptr.
7676 (reload_shared_libraries_1): Likewise.
7677
3232fabd
TT
76782017-08-05 Tom Tromey <tom@tromey.com>
7679
7680 * rust-exp.y (rust_op_ptr, set_field): Remove typedefs.
7681 (rust_op_vector, rust_set_vector): New typedefs.
7682 (current_parser): New global.
7683 (work_obstack): Change to pointer type. Update all users.
7684 (rust_ast, pstate): Remove globals.
7685 (struct rust_parser): New.
7686 (%union) <params, field_inits>: Change type.
7687 (start, tuple_expr, unit_expr, struct_expr_list, literal)
7688 (field_expr, expr_list, maybe_expr_list, type_list): Update.
7689 (ast_call_ish, ast_path, ast_function_type, ast_tuple_type)
7690 (convert_params_to_types, convert_params_to_expression): Change
7691 type of "params".
7692 (ast_string): Change type of "fields".
7693 (rust_parse): Make a rust_parser. Remove cleanups.
7694 (rust_lex_tests): Make and install an auto_obstack.
7695
f02fd774
YQ
76962017-08-04 Yao Qi <yao.qi@linaro.org>
7697
7698 * configure.srv (ipa_x32_linux_regobj): New.
7699 * linux-amd64-ipa.c (get_ipa_tdesc): Use X86_TDESC_AVX_AVX512
7700 instead of X86_TDESC_AVX512.
7701 (initialize_low_tracepoint): Call
7702 init_registers_x32_avx_avx512_linux.
7703
91975afd
YQ
77042017-08-04 Yao Qi <yao.qi@linaro.org>
7705
7706 * utils.h (gdb_argv): Add namespace std for nullptr_t.
7707
2331fa3a
RK
77082017-08-03 Ruslan Kabatsayev <b7.10110111@gmail.com>
7709
7710 * MAINTAINERS (Write After Approval): Add Ruslan Kabatsayev.
7711
744e4fe1
TT
77122017-08-03 Tom Tromey <tom@tromey.com>
7713
7714 * utils.c (make_cleanup_freeargv, do_freeargv, gdb_buildargv):
7715 Remove.
7716 * utils.h (make_cleanup_freeargv, gdb_buildargv): Remove.
7717
1c034b67
TT
77182017-08-03 Tom Tromey <tom@tromey.com>
7719
7720 * python/py-param.c (compute_enum_values): Use gdb_argv.
7721
773a1edc
TT
77222017-08-03 Tom Tromey <tom@tromey.com>
7723
7724 * utils.h (struct gdb_argv_deleter): New.
7725 (gdb_argv): New class.
7726 * utils.c (gdb_argv::reset): New method.
7727 * tracepoint.c (delete_trace_variable_command): Use gdb_argv.
7728 * tracefile.c (tsave_command): Use gdb_argv.
7729 * top.c (new_ui_command): Use gdb_argv.
7730 * symmisc.c (maintenance_print_symbols)
7731 (maintenance_print_msymbols, maintenance_expand_symtabs): Use gdb_argv.
7732 * symfile.c (symbol_file_command, generic_load)
7733 (remove_symbol_file_command): Use gdb_argv.
7734 * stack.c (backtrace_command): Use gdb_argv.
7735 * source.c (add_path, show_substitute_path_command)
7736 (unset_substitute_path_command, set_substitute_path_command):
7737 Use gdb_argv.
7738 * skip.c (skip_command): Use gdb_argv. Use gdb_buildargv.
7739 * ser-mingw.c (pipe_windows_open): Use gdb_argv.
7740 * remote.c (extended_remote_run, remote_put_command)
7741 (remote_get_command, remote_delete_command): Use gdb_argv.
7742 * remote-sim.c (gdbsim_load, gdbsim_create_inferior)
7743 (gdbsim_open): Use gdb_argv.
7744 * python/py-cmd.c (gdbpy_string_to_argv): Use gdb_argv.
7745 * psymtab.c (maintenance_print_psymbols): Use gdb_argv.
7746 * procfs.c (procfs_info_proc): Use gdb_argv.
7747 * interps.c (interpreter_exec_cmd): Use gdb_argv.
7748 * infrun.c (handle_command): Use gdb_argv.
7749 * inferior.c (add_inferior_command, clone_inferior_command):
7750 Use gdb_argv.
7751 * guile/scm-string.c (gdbscm_string_to_argv): Use gdb_argv.
7752 * exec.c (exec_file_command): Use gdb_argv.
7753 * cli/cli-cmds.c (alias_command): Use gdb_argv.
7754 * compile/compile.c (build_argc_argv): Use gdb_argv.
7755
0d50bde3
TT
77562017-08-03 Tom Tromey <tom@tromey.com>
7757
7758 * python/python.c (gdbpy_decode_line): Use unique_xmalloc_ptr.
7759
7f968c89
TT
77602017-08-03 Tom Tromey <tom@tromey.com>
7761
7762 * python/python.c (compute_python_string): Return std::string.
7763 (gdbpy_eval_from_control_command): Update.
7764 (do_start_initialization): Use std::string.
7765 * python/py-varobj.c (py_varobj_iter_next): Use string_printf, not
7766 xstrprintf.
7767 * python/py-breakpoint.c (local_setattro): Use string_printf, not
7768 xstrprintf.
7769
3c9ebddd
TT
77702017-08-03 Tom Tromey <tom@tromey.com>
7771
7772 * top.h (do_restore_instream_cleanup): Remove.
7773 * top.c (do_restore_instream_cleanup): Remove.
7774 (read_command_file): Use scoped_restore.
7775 * cli/cli-script.c (execute_user_command): Use scoped_restore.
7776
b51b225e
TT
77772017-08-03 Tom Tromey <tom@tromey.com>
7778
7779 * cli/cli-script.c (execute_user_command)
7780 (execute_control_command): Use scoped_restore.
7781
ac991630
TT
77822017-08-03 Tom Tromey <tom@tromey.com>
7783
7784 * cli/cli-script.c (do_restore_user_call_depth): Remove.
7785 (execute_user_command): Remove user_call_depth; use
7786 user_args_stack's size instead.
7787
898e0c8e
TT
77882017-08-03 Tom Tromey <tom@tromey.com>
7789
7790 * top.h (in_user_command): Remove.
7791 * top.c (in_user_command): Remove.
7792 * cli/cli-script.c (do_restore_user_call_depth)
7793 (execute_user_command): Update.
7794
26fcd5d7
TT
77952017-08-03 Tom Tromey <tom@tromey.com>
7796
7797 * valops.c (search_struct_method): Use gdb::byte_vector.
7798 * valarith.c (value_concat): Use std::vector.
7799 * target.c (memory_xfer_partial): Use gdb::byte_vector.
7800 (simple_search_memory): Likewise.
7801 * printcmd.c (find_string_backward): Use gdb::byte_vector.
7802 * mi/mi-main.c (mi_cmd_data_write_memory): Use gdb::byte_vector.
7803 * gcore.c (gcore_copy_callback): Use gdb::byte_vector.
7804 * elfread.c (elf_rel_plt_read): Use std::string.
7805 * cp-valprint.c (cp_print_value): Use gdb::byte_vector.
7806 * cli/cli-dump.c (restore_section_callback): Use
7807 gdb::byte_vector.
7808
7c218e6c
TT
78092017-08-03 Tom Tromey <tom@tromey.com>
7810
7811 * jit.c (jit_reader_load_command): Use unique_xmalloc_ptr.
7812
31b68d4a
TT
78132017-08-03 Tom Tromey <tom@tromey.com>
7814
7815 * tui/tui-regs.c (tui_restore_gdbout): Remove.
7816 (tui_register_format): Use scoped_restore.
7817
2ec845e7
TT
78182017-08-03 Tom Tromey <tom@tromey.com>
7819
7820 * reverse.c (exec_direction_default): Remove.
7821 (exec_reverse_once): Use scoped_restore.
7822 * remote.c (restore_remote_timeout): Remove.
7823 (remote_flash_erase, remote_flash_write, remote_flash_done)
7824 (readchar, remote_serial_write): Use scoped_restore.
7825 * cli/cli-script.c (struct source_cleanup_lines_args)
7826 (source_cleanup_lines): Remove.
7827 (script_from_file): Use scoped_restore.
7828 * cli/cli-cmds.c (source_verbose_cleanup): Remove.
7829 (source_command): Use scoped_restore.
7830
b3bc8453
TT
78312017-08-03 Tom Tromey <tom@tromey.com>
7832
7833 * utils.h (make_cleanup_free_so): Remove.
7834 * utils.c (do_free_so, make_cleanup_free_so): Remove.
7835 * solist.h (struct so_deleter): New.
7836 (so_list_up): New typedef.
7837 * solib-svr4.c (svr4_read_so_list): Use so_list_up.
7838
e3ad2841
TT
78392017-08-03 Tom Tromey <tom@tromey.com>
7840
7841 * utils.h (make_cleanup_restore_current_language): Remove.
7842 * utils.c (do_restore_current_language)
7843 (make_cleanup_restore_current_language): Remove.
7844 * parse.c (parse_exp_in_context_1)
7845 (parse_expression_with_language): Use
7846 scoped_restore_current_language.
7847 * mi/mi-main.c (mi_cmd_execute): Use
7848 scoped_restore_current_language.
7849 * language.h (scoped_restore_current_language): New class.
7850
b80cf838
TT
78512017-08-03 Tom Tromey <tom@tromey.com>
7852
7853 * compile/compile.c (cleanup_unlink_file): Remove.
7854 (compile_to_object): Use gdb::unlinker.
7855 (eval_compile_command): Likewise.
7856
fad0444a
TT
78572017-08-03 Tom Tromey <tom@tromey.com>
7858
7859 * utils.h (make_cleanup_fclose): Remove.
7860 * utils.c (do_fclose_cleanup, make_cleanup_fclose): Remove.
7861
6e7bc05c
TT
78622017-08-03 Tom Tromey <tom@tromey.com>
7863
7864 * top.c (open_terminal_stream): Return gdb_file_up.
7865 (new_ui_command): Update.
7866
4a45905b
TT
78672017-08-03 Tom Tromey <tom@tromey.com>
7868
7869 * source.c (print_source_lines_base, forward_search_command)
7870 (reverse_search_command): Use gdb_file_up.
7871
7cd06d6e
TT
78722017-08-03 Tom Tromey <tom@tromey.com>
7873
7874 * fbsd-nat.c (fbsd_find_memory_regions): Update.
7875
ed166945
TT
78762017-08-03 Tom Tromey <tom@tromey.com>
7877
7878 * cli/cli-cmds.c (find_and_open_script): Change return type.
7879 Remove "streamp" and "full_path" parameters.
7880 (source_script_with_search): Update.
7881 * auto-load.c (source_script_file): Update.
7882 * cli/cli-cmds.h (find_and_open_script): Change type.
7883 (open_script): New struct.
7884
d419f42d
TT
78852017-08-03 Tom Tromey <tom@tromey.com>
7886
7887 * xml-support.c (xml_fetch_content_from_file): Update.
7888 * ui-file.c (stdio_file::open): Update.
7889 * tracefile-tfile.c (tfile_start): Update.
7890 * remote.c (remote_file_put, remote_file_get): Update.
7891 * nat/linux-procfs.c (linux_proc_get_int)
7892 (linux_proc_pid_get_state, linux_proc_tid_get_name): Update.
7893 * nat/linux-osdata.c (linux_common_core_of_thread): Update.
7894 (command_from_pid, commandline_from_pid, linux_xfer_osdata_cpus)
7895 (print_sockets, linux_xfer_osdata_shm, linux_xfer_osdata_sem)
7896 (linux_xfer_osdata_msg, linux_xfer_osdata_modules): Update.
7897 * nat/linux-btrace.c (linux_determine_kernel_start): Update.
7898 * linux-nat.c (linux_proc_pending_signals): Update.
7899 * dwarf2read.c (write_psymtabs_to_index): Use gdb_file_up.
7900 (file_closer): Remove.
7901 * compile/compile.c (compile_to_object): Update.
7902 * common/filestuff.h (struct gdb_file_deleter): New.
7903 (gdb_file_up): New typedef.
7904 (gdb_fopen_cloexec): Change return type.
7905 * common/filestuff.c (gdb_fopen_cloexec): Return gdb_file_up.
7906 * cli/cli-dump.c (fopen_with_cleanup): Remove.
7907 (dump_binary_file, restore_binary_file): Update.
7908 * auto-load.c (auto_load_objfile_script_1): Update.
7909
4a2b031d
TT
79102017-08-03 Tom Tromey <tom@tromey.com>
7911
7912 * tracepoint.c (tvariables_info_1): Use ui_out_emit_table.
7913 (info_static_tracepoint_markers_command): Likewise.
7914 * solib.c (info_sharedlibrary_command): Use ui_out_emit_table.
7915 * skip.c (skip_info): Use ui_out_emit_table.
7916 * progspace.c (print_program_space): Use ui_out_emit_table.
7917 * osdata.c (info_osdata): Use ui_out_emit_table.
7918 * mi/mi-cmd-info.c (mi_cmd_info_ada_exceptions): Use
7919 ui_out_emit_table.
7920 * linux-thread-db.c (info_auto_load_libthread_db): Use
7921 ui_out_emit_table.
7922 * inferior.c (print_inferior): Use ui_out_emit_table.
7923 * gdb_bfd.c (maintenance_info_bfds): Use ui_out_emit_table.
7924 * breakpoint.c (breakpoint_1): Use ui_out_emit_table.
7925 * auto-load.c (auto_load_info_scripts): Use ui_out_emit_table.
7926 * ada-tasks.c (print_ada_task_info): Use ui_out_emit_table.
7927 * ui-out.h (class ui_out_emit_table): New.
7928
a4f320fd
MR
79292017-08-02 Maciej W. Rozycki <macro@imgtec.com>
7930
7931 * mips-tdep.c (mips_fpu_type_str): New function.
7932 (mips_dump_tdep): Call it.
7933
a2f1f308
MR
79342017-08-01 Maciej W. Rozycki <macro@imgtec.com>
7935
7936 * mips-tdep.c (mips_gdbarch_init): Use MIPS_FPU_TYPE to access
7937 `->mips_fpu_type'.
7938
7e5ed83b
XR
79392017-07-31 Xavier Roirand <roirand@adacore.com>
7940
7941 * solib-darwin.c (DYLD_VERSION_MAX): Increase value.
7942
4c9dc811
XR
79432017-07-27 Xavier Roirand <roirand@adacore.com>
7944
7945 * MAINTAINERS (Write After Approval): Add Xavier Roirand.
7946
27d41eac
YQ
79472017-07-26 Yao Qi <yao.qi@linaro.org>
7948
7949 * cli/cli-cmds.c (maintenancechecklist): New variable.
7950 * gdbcmd.h (maintenancechecklist): Declare it.
7951 * i386-linux-tdep.c (_initialize_i386_linux_tdep) [GDB_SELF_TEST]:
7952 Call i386_linux_read_description with different masks.
7953 * maint.c (maintenance_check_command): New function.
7954 (_initialize_maint_cmds): Call add_prefix_cmd.
7955 * target-descriptions.c (tdesc_reg): override operator != and ==.
7956 (tdesc_type): Likewise.
7957 (tdesc_feature): Likewise.
7958 (target_desc): Likewise.
7959 [GDB_SELF_TEST] (selftests::record_xml_tdesc): New function.
7960 (maintenance_check_xml_descriptions): New function.
7961 (_initialize_target_descriptions) Add command "xml-descriptions".
7962 * target-descriptions.h (selftests::record_xml_tdesc): Declare.
7963
ea03d0d3
YQ
79642017-07-26 Yao Qi <yao.qi@linaro.org>
7965
7966 * i386-linux-tdep.c: Don't include features/i386/i386-*linux.c.
7967 Include features/i386/32bit-*.c.
7968 (i386_linux_read_description): Generate target description if it
7969 doesn't exist.
7970 (_initialize_i386_linux_tdep): Don't call _initialize_tdesc_i386
7971 functions.
7972 * features/i386/32bit-linux.c: Re-generated.
7973 * features/i386/32bit-sse.c: Likewise.
7974 * target-descriptions.c (print_c_feature::visit): Print code to
7975 set register number if needed.
7976 (print_c_feature) <m_next_regnum>: New field.
7977
25aa13e5
YQ
79782017-07-26 Yao Qi <yao.qi@linaro.org>
7979
7980 * features/Makefile (CFILES): Rename with TDESC_CFILES.
7981 (FEATURE_XMLFILES): New.
7982 (FEATURE_CFILES): New.
7983 New rules.
7984 (clean-cfiles): Remove generated c files.
7985 * features/i386/32bit-avx.c: Generated.
7986 * features/i386/32bit-avx512.c: Generated.
7987 * features/i386/32bit-core.c: Generated.
7988 * features/i386/32bit-linux.c: Generated.
7989 * features/i386/32bit-mpx.c: Generated.
7990 * features/i386/32bit-pkeys.c: Generated.
7991 * features/i386/32bit-sse.c: Generated.
7992 * target-descriptions.c: Include algorithm.
7993 (tdesc_element_visitor): Add method visit_end.
7994 (print_c_tdesc): Implement visit_end.
7995 (print_c_tdesc:: m_filename_after_features): Move it to
7996 protected.
7997 (print_c_feature): New class.
7998 (maint_print_c_tdesc_cmd): Use print_c_feature if XML file
7999 name starts with "i386/32bit-".
8000
6eb1e6a8
YQ
80012017-07-26 Yao Qi <yao.qi@linaro.org>
8002
8003 * target-descriptions.c (tdesc_element_visitor): New class.
8004 (tdesc_element): New class.
8005 (tdesc_reg): Inherit from tdesc_element.
8006 (tdesc_reg::accept): New function.
8007 (tdesc_type): Inherit from tdesc_element.
8008 (tdesc_type::accept): New function.
8009 (tdesc_feature): Inherit from tdesc_element.
8010 (tdesc_feature::accept): New function.
8011 (target_desc): Inherit from tdesc_element.
8012 (target_desc::target_desc): New.
8013 (target_desc::~target_desc): New.
8014 (target_desc::accept): New.
8015 (allocate_target_description): Use new.
8016 (free_target_description): Use delete.
8017 (print_c_tdesc): New class.
8018 (maint_print_c_tdesc_cmd): Adjust.
8019
8020 * features/aarch64.c: Re-generated.
8021 * features/arc-arcompact.c: Re-generated.
8022 * features/arc-v2.c: Re-generated.
8023 * features/arm/arm-with-iwmmxt.c: Re-generated.
8024 * features/arm/arm-with-m.c: Re-generated.
8025 * features/arm/arm-with-m-fpa-layout.c: Re-generated.
8026 * features/arm/arm-with-m-vfp-d16.c: Re-generated.
8027 * features/arm/arm-with-neon.c: Re-generated.
8028 * features/arm/arm-with-vfpv2.c: Re-generated.
8029 * features/arm/arm-with-vfpv3.c: Re-generated.
8030 * features/i386/amd64-avx-avx512.c: Re-generated.
8031 * features/i386/amd64-avx-avx512-linux.c: Re-generated.
8032 * features/i386/amd64-avx.c: Re-generated.
8033 * features/i386/amd64-avx-linux.c: Re-generated.
8034 * features/i386/amd64-avx-mpx-avx512-pku.c: Re-generated.
8035 * features/i386/amd64-avx-mpx-avx512-pku-linux.c: Re-generated.
8036 * features/i386/amd64-avx-mpx.c: Re-generated.
8037 * features/i386/amd64-avx-mpx-linux.c: Re-generated.
8038 * features/i386/amd64.c: Re-generated.
8039 * features/i386/amd64-linux.c: Re-generated.
8040 * features/i386/amd64-mpx.c: Re-generated.
8041 * features/i386/amd64-mpx-linux.c: Re-generated.
8042 * features/i386/i386-avx-avx512.c: Re-generated.
8043 * features/i386/i386-avx-avx512-linux.c: Re-generated.
8044 * features/i386/i386-avx.c: Re-generated.
8045 * features/i386/i386-avx-linux.c: Re-generated.
8046 * features/i386/i386-avx-mpx-avx512-pku.c: Re-generated.
8047 * features/i386/i386-avx-mpx-avx512-pku-linux.c: Re-generated.
8048 * features/i386/i386-avx-mpx.c: Re-generated.
8049 * features/i386/i386-avx-mpx-linux.c: Re-generated.
8050 * features/i386/i386.c: Re-generated.
8051 * features/i386/i386-linux.c: Re-generated.
8052 * features/i386/i386-mmx.c: Re-generated.
8053 * features/i386/i386-mmx-linux.c: Re-generated.
8054 * features/i386/i386-mpx.c: Re-generated.
8055 * features/i386/i386-mpx-linux.c: Re-generated.
8056 * features/i386/x32-avx-avx512.c: Re-generated.
8057 * features/i386/x32-avx-avx512-linux.c: Re-generated.
8058 * features/i386/x32-avx.c: Re-generated.
8059 * features/i386/x32-avx-linux.c: Re-generated.
8060 * features/i386/x32.c: Re-generated.
8061 * features/i386/x32-linux.c: Re-generated.
8062 * features/microblaze.c: Re-generated.
8063 * features/microblaze-with-stack-protect.c: Re-generated.
8064 * features/mips64-dsp-linux.c: Re-generated.
8065 * features/mips64-linux.c: Re-generated.
8066 * features/mips-dsp-linux.c: Re-generated.
8067 * features/mips-linux.c: Re-generated.
8068 * features/nds32.c: Re-generated.
8069 * features/nios2.c: Re-generated.
8070 * features/nios2-linux.c: Re-generated.
8071 * features/rs6000/powerpc-32.c: Re-generated.
8072 * features/rs6000/powerpc-32l.c: Re-generated.
8073 * features/rs6000/powerpc-403.c: Re-generated.
8074 * features/rs6000/powerpc-403gc.c : Re-generated.
8075 * features/rs6000/powerpc-405.c: Re-generated.
8076 * features/rs6000/powerpc-505.c: Re-generated.
8077 * features/rs6000/powerpc-601.c: Re-generated.
8078 * features/rs6000/powerpc-602.c: Re-generated.
8079 * features/rs6000/powerpc-603.c: Re-generated.
8080 * features/rs6000/powerpc-604.c: Re-generated.
8081 * features/rs6000/powerpc-64.c: Re-generated.
8082 * features/rs6000/powerpc-64l.c: Re-generated.
8083 * features/rs6000/powerpc-7400.c: Re-generated.
8084 * features/rs6000/powerpc-750.c: Re-generated.
8085 * features/rs6000/powerpc-860.c: Re-generated.
8086 * features/rs6000/powerpc-altivec32.c: Re-generated.
8087 * features/rs6000/powerpc-altivec32l.c: Re-generated.
8088 * features/rs6000/powerpc-altivec64.c: Re-generated.
8089 * features/rs6000/powerpc-altivec64l.c: Re-generated.
8090 * features/rs6000/powerpc-cell32l.c: Re-generated.
8091 * features/rs6000/powerpc-cell64l.c: Re-generated.
8092 * features/rs6000/powerpc-e500.c: Re-generated.
8093 * features/rs6000/powerpc-e500l.c: Re-generated.
8094 * features/rs6000/powerpc-isa205-32l.c: Re-generated.
8095 * features/rs6000/powerpc-isa205-64l.c: Re-generated.
8096 * features/rs6000/powerpc-isa205-altivec32l.c: Re-generated.
8097 * features/rs6000/powerpc-isa205-altivec64l.c: Re-generated.
8098 * features/rs6000/powerpc-isa205-vsx32l.c: Re-generated.
8099 * features/rs6000/powerpc-isa205-vsx64l.c: Re-generated.
8100 * features/rs6000/powerpc-vsx32.c: Re-generated.
8101 * features/rs6000/powerpc-vsx32l.c: Re-generated.
8102 * features/rs6000/powerpc-vsx64.c: Re-generated.
8103 * features/rs6000/powerpc-vsx64l.c: Re-generated.
8104 * features/rs6000/rs6000.c: Re-generated.
8105 * features/s390-linux32.c: Re-generated.
8106 * features/s390-linux32v1.c: Re-generated.
8107 * features/s390-linux32v2.c: Re-generated.
8108 * features/s390-linux64.c: Re-generated.
8109 * features/s390-linux64v1.c: Re-generated.
8110 * features/s390-linux64v2.c: Re-generated.
8111 * features/s390-te-linux64.c: Re-generated.
8112 * features/s390-tevx-linux64.c: Re-generated.
8113 * features/s390-vx-linux64.c: Re-generated.
8114 * features/s390x-linux64.c: Re-generated.
8115 * features/s390x-linux64v1.c: Re-generated.
8116 * features/s390x-linux64v2.c: Re-generated.
8117 * features/s390x-te-linux64.c: Re-generated.
8118 * features/s390x-tevx-linux64.c: Re-generated.
8119 * features/s390x-vx-linux64.c: Re-generated.
8120 * features/sparc/sparc32-solaris.c: Re-generated.
8121 * features/sparc/sparc64-solaris.c: Re-generated.
8122 * features/tic6x-c62x.c: Re-generated.
8123 * features/tic6x-c62x-linux.c: Re-generated.
8124 * features/tic6x-c64x.c: Re-generated.
8125 * features/tic6x-c64x-linux.c: Re-generated.
8126 * features/tic6x-c64xp.c: Re-generated.
8127 * features/tic6x-c64xp-linux.c: Re-generated.
8128
35b4818d
YQ
81292017-07-26 Yao Qi <yao.qi@linaro.org>
8130
8131 * i386-linux-tdep.c (i386_linux_read_description): New function.
8132 (i386_linux_core_read_description): Call
8133 i386_linux_read_description.
8134 * i386-linux-tdep.h (i386_linux_read_description): Declare.
8135 (tdesc_i386_linux, tdesc_i386_mmx_linux): Remove declarations.
8136 (tdesc_i386_avx_linux, tdesc_i386_mpx_linux): Likewise
8137 (tdesc_i386_avx_mpx_linux, tdesc_i386_avx_avx512_linux): Likewise.
8138 (tdesc_i386_avx_mpx_avx512_pku_linux): Likewise.
8139 * x86-linux-nat.c (x86_linux_read_description): Call
8140 i386_linux_read_description.
8141
8e2141c6
YQ
81422017-07-26 Yao Qi <yao.qi@linaro.org>
8143
8144 * NEWS: Mention it.
8145 * features/Makefile (%.c: %.xml): Pass the xml file name to
8146 command "maint print c-tdesc".
8147 * target-descriptions.c (maint_print_c_tdesc_cmd): Get file
8148 name from 'arg'.
8149
b468ff4c
YQ
81502017-07-26 Yao Qi <yao.qi@linaro.org>
8151
8152 * target-descriptions.c (target_desc): Add ctor and dtor. Do
8153 in-class initialization.
8154 (tdesc_create_feature): Call new instead of XCNEW.
8155 (free_target_description): Ue delete.
8156
b9c0e1b4
JB
81572017-07-25 John Baldwin <jhb@FreeBSD.org>
8158
8159 * configure.nat: Add "-lkvm" for NetBSD/sparc64 and fix typo.
8160
a04b5337
YQ
81612017-07-25 Yao Qi <yao.qi@linaro.org>
8162
8163 * amd64-tdep.c (amd64_init_abi): Make argument default_tdesc
8164 constant.
8165 (amd64_x32_init_abi): Likewise.
8166 * amd64-tdep.h (amd64_init_abi): Update declaration.
8167 (amd64_x32_init_abi): Likewise.
8168
02ad7fc2
YQ
81692017-07-25 Yao Qi <yao.qi@linaro.org>
8170
8171 PR tdep/21717
8172 * arm-linux-nat.c (arm_linux_fetch_inferior_registers): Update
8173 condition for FPSCR.
8174 (arm_linux_store_inferior_registers): Likewise.
8175
b6f48cb0
TT
81762017-07-22 Tom Tromey <tom@tromey.com>
8177
8178 * break-catch-syscall.c (struct catch_syscall_inferior_data)
8179 <syscalls_counts>: Now a std::vector.
8180 (get_catch_syscall_inferior_data): Use "new".
8181 (catch_syscall_inferior_data_cleanup): Use "delete".
8182 (insert_catch_syscall, remove_catch_syscall)
8183 (clear_syscall_counts): Update.
8184
e12c9b7a
TT
81852017-07-22 Tom Tromey <tom@tromey.com>
8186
8187 * break-catch-syscall.c (syscall_catchpoint)
8188 <syscalls_to_be_caught>: Now a std::vector<int>
8189 (~syscall_catchpoint): Remove.
8190 (insert_catch_syscall, remove_catch_syscall)
8191 (breakpoint_hit_catch_syscall, print_one_catch_syscall)
8192 (print_mention_catch_syscall, print_recreate_catch_syscall):
8193 Update.
8194 (create_syscall_event_catchpoint): Change type of "filter"
8195 parameter.
8196 (catch_syscall_split_args): Return a std::vector.
8197 (catch_syscall_command_1, catching_syscall_number_1): Update.
8198
4fa8aeac
TT
81992017-07-22 Tom Tromey <tom@tromey.com>
8200
8201 * break-catch-throw.c (struct exception_catchpoint)
8202 <exception_rx>: Now a std::string.
8203 (~exception_catchpoint): Remove.
8204 (print_one_detail_exception_catchpoint): Update.
8205 (handle_gnu_v3_exceptions): Change type of except_rx.
8206 (extract_exception_regexp): Return a std::string.
8207 (catch_exception_command_1): Update.
8208
f746a154
TT
82092017-07-22 Tom Tromey <tom@tromey.com>
8210
8211 * break-catch-sig.c (gdb_signal_type): Remove typedef.
8212 (struct signal_catchpoint) <signals_to_be_caught>: Now a
8213 std::vector.
8214 <catch_all>: Now a bool.
8215 (~signal_catchpoint): Remove.
8216 (signal_catchpoint_insert_location)
8217 (signal_catchpoint_remove_location)
8218 (signal_catchpoint_breakpoint_hit, signal_catchpoint_print_one)
8219 (signal_catchpoint_print_mention)
8220 (signal_catchpoint_print_recreate)
8221 (signal_catchpoint_explains_signal): Update.
8222 (create_signal_catchpoint): Change type of "filter" and
8223 "catch_all".
8224 (catch_signal_split_args): Return a std::vector. Change type of
8225 "catch_all".
8226 (catch_signal_command): Update.
8227
47e77640
PA
82282017-07-20 Pedro Alves <palves@redhat.com>
8229
8230 * ada-lang.c (ada_language_defn): Make extern.
8231 (_initialize_ada_language): Remove add_language call.
8232 * c-lang.c (c_language_defn, cplus_language_defn)
8233 (asm_language_defn, minimal_language_defn): Make extern.
8234 (_initialize_c_language): Delete.
8235 * completer.c (compare_cstrings): Delete, moved to utils.h.
8236 * d-lang.c (d_language_defn): Make extern.
8237 (_initialize_d_language): Remove add_language calls.
8238 * defs.h (enum language): Add comment.
8239 * f-lang.c (f_language_defn): Make extern.
8240 (_initialize_f_language): Remove add_language call.
8241 * go-lang.c (go_language_defn): Make extern.
8242 (_initialize_go_language): Remove add_language call.
8243 * language.c: Include <algorithm>.
8244 (languages): Redefine as const array.
8245 (languages_size, languages_allocsize, DEFAULT_ALLOCSIZE): Delete.
8246 (set_language_command): Handle "local". Use for-range loop.
8247 (set_language): Remove loop.
8248 (language_enum): Rewrite.
8249 (language_def, language_str): Remove loops.
8250 (add_language): Delete.
8251 (add_set_language_command): New, based on add_languages.
8252 (skip_language_trampoline): Adjust.
8253 (local_language_defn): Delete.
8254 (language_gdbarch_post_init): Adjust.
8255 (_initialize_language): Remove add_language calls. Call
8256 add_set_language_command.
8257 * language.h (add_language): Delete.
8258 (auto_language_defn)
8259 (unknown_language_defn, minimal_language_defn, ada_language_defn)
8260 (asm_language_defn, c_language_defn, cplus_language_defn)
8261 (d_language_defn, f_language_defn, go_language_defn)
8262 (m2_language_defn, objc_language_defn, opencl_language_defn)
8263 (pascal_language_defn, rust_language_defn): Declare.
8264 * m2-lang.c (m2_language_defn): Make extern.
8265 (_initialize_m2_language): Remove add_language call.
8266 * objc-lang.c (objc_language_defn): Make extern.
8267 (_initialize_objc_language): Remove add_language call.
8268 * opencl-lang.c (opencl_language_defn): Make extern.
8269 (_initialize_opencl_language): Remove add_language call.
8270 * p-lang.c (pascal_language_defn): Make extern.
8271 (_initialize_pascal_language): Delete.
8272 * rust-lang.c (rust_language_defn): Make extern.
8273 (_initialize_rust_language): Delete.
8274 * utils.h (compare_cstrings): New static inline function.
8275
edb0c9cb
PA
82762017-07-20 Pedro Alves <palves@redhat.com>
8277
8278 * ada-lang.c (ada_to_fixed_type_1): Adjust.
8279 (get_var_value): Constify parameters.
8280 (get_int_var_value): Change prototype.
8281 (to_fixed_range_type): Adjust.
8282 * ada-lang.h (get_int_var_value): Change prototype.
8283
a778f165
PA
82842017-07-20 Pedro Alves <palves@redhat.com>
8285
8286 * dwarf2read.c (dw2_lookup_symbol): Use
8287 SYMBOL_MATCHES_SEARCH_NAME.
8288 * psymtab.c (psym_lookup_symbol): Use SYMBOL_MATCHES_SEARCH_NAME.
8289
42edd901
PA
82902017-07-20 Pedro Alves <palves@redhat.com>
8291
8292 * block.c (block_iter_name_step, block_iter_name_first)
8293 (block_iter_name_next): Delete.
8294 (block_lookup_symbol_primary): Adjust to use
8295 dict_iter_match_first/dict_iter_match_next.
8296 * block.h (block_iter_name_first, block_iter_name_next): Delete
8297 declarations.
8298 (ALL_BLOCK_SYMBOLS_WITH_NAME): Adjust to use
8299 dict_iter_match_first/dict_iter_match_next.
8300
cf325299
PA
83012017-07-20 Pedro Alves <palves@redhat.com>
8302
8303 * cp-support.c (cp_find_first_component_aux): Add missing case for
8304 end of string.
8305
c5ed0576
DB
83062017-07-18 David Blaikie <dblaikie@gmail.com>
8307
8308 * dwarf2read.c (create_cus_hash_table): Re-add lost initialization
8309 of dwo_cu's dwo_file.
8310
27841e76
YQ
83112017-07-18 Yao Qi <yao.qi@linaro.org>
8312
8313 * remote.c (store_registers_using_G): Remove one line comment.
8314
cfb7e58b
YQ
83152017-07-18 Yao Qi <yao.qi@linaro.org>
8316
8317 * regcache.c (regcache_cpy): Simplify it.
8318 (regcache::cpy_no_passthrough): Remove it.
8319 * regcache.h (cpy_no_passthrough): Remove it.
8320 (regcache_dup, regcache_cpy): Update comments.
8321
386535dd
PA
83222017-07-18 Pedro Alves <palves@redhat.com>
8323
8324 * remote-sim.c (sim_command_completer): Adjust to work with a
8325 completion_tracker instead of a VEC.
8326
c45ec17c
PA
83272017-07-17 Pedro Alves <palves@redhat.com>
8328
8329 * completer.c (complete_source_filenames): New function.
8330 (complete_address_and_linespec_locations): New function.
8331 (location_completer): Use complete_address_and_linespec_locations.
8332 (completion_tracker::build_completion_result): Honor the tracker's
8333 request to suppress append.
8334 * completer.h (completion_tracker::suppress_append_ws)
8335 (completion_tracker::set_suppress_append_ws): New methods.
8336 (completion_tracker::m_suppress_append_ws): New field.
8337 (complete_source_filenames): New declaration.
8338 * linespec.c (linespec_complete_what): New.
8339 (struct ls_parser) <complete_what, completion_word,
8340 completion_quote_char, completion_quote_end, completion_tracker>:
8341 New fields.
8342 (string_find_incomplete_keyword_at_end): New.
8343 (linespec_lexer_lex_string): Record quote char. If in completion
8344 mode, don't throw.
8345 (linespec_lexer_consume_token): Advance the completion word point.
8346 (linespec_lexer_peek_token): Save/restore completion info.
8347 (save_stream_and_consume_token): New.
8348 (set_completion_after_number): New.
8349 (linespec_parse_basic): Set what to complete next depending on
8350 token. Handle function and label completions specially.
8351 (parse_linespec): Disable objc shortcut in completion mode. Set
8352 what to complete next depending on token type. Skip keyword if in
8353 completion mode.
8354 (complete_linespec_component, linespec_complete): New.
8355 * linespec.h (linespec_complete): Declare.
8356
be966d42
PA
83572017-07-17 Pedro Alves <palves@redhat.com>
8358
8359 * linespec.c (linespec_lexer_lex_string, find_toplevel_char):
8360 Handle 'operator<' / 'operator<<'.
8361
a2459270
PA
83622017-07-17 Pedro Alves <palves@redhat.com>
8363
8364 * completer.c (collect_explicit_location_matches): Handle
8365 MATCH_LABEL.
8366 (convert_explicit_location_to_linespec): New, factored out from
8367 ...
8368 (convert_explicit_location_to_sals): ... this.
8369 (complete_label): New.
8370 (linespec_complete_label, find_label_symbols_in_block): New.
8371 (find_label_symbols): Add completion_mode parameter and adjust to
8372 call find_label_symbols_in_block.
8373 * linespec.h (linespec_complete_label): Declare.
8374
c6756f62
PA
83752017-07-17 Pedro Alves <palves@redhat.com>
8376
8377 * ada-lang.c (ada_collect_symbol_completion_matches): Add
8378 complete_symbol_mode parameter.
8379 * cli/cli-cmds.c (complete_command): Get the completion result out
8380 of the handle_brkchars tracker if used a custom word point.
8381 * completer.c: Include "linespec.h".
8382 (enum explicit_location_match_type) <MATCH_LINE>: New enumerator.
8383 (advance_to_expression_complete_word_point): New.
8384 (completion_tracker::completes_to_completion_word): New.
8385 (complete_files_symbols): Pass down
8386 complete_symbol_mode::EXPRESSION.
8387 (explicit_options, probe_options): New.
8388 (collect_explicit_location_matches): Complete on the
8389 explictit_loc->foo instead of word. Use
8390 linespec_complete_function. Handle MATCH_LINE. Handle offering
8391 keyword and options completions.
8392 (backup_text_ptr): Delete.
8393 (skip_keyword): New.
8394 (complete_explicit_location): Remove 'word' parameter. Add
8395 language, quoted_arg_start and quoted_arg_end parameters.
8396 Rewrite, parsing left to right.
8397 (location_completer): Rewrite.
8398 (location_completer_handle_brkchars): New function.
8399 (symbol_completer): Pass down complete_symbol_mode::EXPRESSION.
8400 (enum complete_line_internal_reason): Adjust comments.
8401 (completion_tracker::discard_completions): New.
8402 (completer_handle_brkchars_func_for_completer): Handle
8403 location_completer.
8404 (gdb_custom_word_point_brkchars)
8405 (gdb_org_rl_basic_quote_characters): New.
8406 (gdb_completion_word_break_characters_throw)
8407 (completion_find_completion_word): Handle trackers that use a
8408 custom word point.
8409 (completion_tracker::advance_custom_word_point_by): New.
8410 (completion_tracker::build_completion_result): Don't rely on
8411 readline appending the quote char.
8412 (gdb_rl_attempted_completion_function_throw): Handle trackers that
8413 use a custom word point.
8414 (gdb_rl_attempted_completion_function): Restore
8415 rl_basic_quote_characters.
8416 * completer.h (class completion_tracker): Extend intro comment.
8417 (completion_tracker::set_quote_char)
8418 (completion_tracker::quote_char)
8419 (completion_tracker::set_use_custom_word_point)
8420 (completion_tracker::use_custom_word_point)
8421 (completion_tracker::custom_word_point)
8422 (completion_tracker::set_custom_word_point)
8423 (completion_tracker::advance_custom_word_point_by)
8424 (completion_tracker::completes_to_completion_word)
8425 (completion_tracker::discard_completions): New methods.
8426 (completion_tracker::m_quote_char)
8427 (completion_tracker::m_use_custom_word_point)
8428 (completion_tracker::m_custom_word_point): New fields.
8429 (advance_to_expression_complete_word_point): Declare.
8430 * f-lang.c (f_collect_symbol_completion_matches): Add
8431 complete_symbol_mode parameter.
8432 * language.h (struct language_defn)
8433 <la_collect_symbol_completion_matches>: Add complete_symbol_mode
8434 parameter.
8435 * linespec.c (linespec_keywords): Add NULL terminator. Make extern.
8436 (linespec_complete_function): New function.
8437 (linespec_lexer_lex_keyword): Adjust.
8438 * linespec.h (linespec_keywords, linespec_complete_function): New
8439 declarations.
8440 * location.c (find_end_quote): New function.
8441 (explicit_location_lex_one): Add explicit_completion_info
8442 parameter. Save quoting info. Don't throw if being called for
8443 completion. Don't handle Ada operators here.
8444 (is_cp_operator, skip_op_false_positives, first_of)
8445 (explicit_location_lex_one_function): New function.
8446 (string_to_explicit_location): Replace 'dont_throw' parameter with
8447 an explicit_completion_info pointer parameter. Handle it. Don't
8448 use explicit_location_lex_one to lex function names. Use
8449 explicit_location_lex_one_function instead.
8450 * location.h (struct explicit_completion_info): New.
8451 (string_to_explicit_location): Replace 'dont_throw' parameter with
8452 an explicit_completion_info pointer parameter.
8453 * symtab.c (default_collect_symbol_completion_matches_break_on):
8454 Add complete_symbol_mode parameter. Handle LINESPEC mode.
8455 (default_collect_symbol_completion_matches)
8456 (collect_symbol_completion_matches): Add complete_symbol_mode
8457 parameter.
8458 (collect_symbol_completion_matches_type): Pass down
8459 complete_symbol_mode::EXPRESSION.
8460 (collect_file_symbol_completion_matches): Add complete_symbol_mode
8461 parameter. Handle LINESPEC mode.
8462 * symtab.h (complete_symbol_mode): New.
8463 (default_collect_symbol_completion_matches_break_on)
8464 (default_collect_symbol_completion_matches)
8465 (collect_symbol_completion_matches)
8466 (collect_file_symbol_completion_matches): Add complete_symbol_mode
8467 parameter.
8468
1d550c82
PA
84692017-07-17 Pedro Alves <palves@redhat.com>
8470
8471 * utils.c (enum class strncmp_iw_mode): New.
8472 (strcmp_iw): Rename to ...
8473 (strncmp_iw_with_mode): ... this. Add string2_len and mode
8474 parameters. Handle them.
8475 (strncmp_iw): New.
8476 (strcmp_iw): Reimplement as wrapper around strncmp_iw_with_mode.
8477 * utils.h (strncmp_iw): Declare.
8478 (strcmp_iw): Move describing comments here.
8479
8090b426
PA
84802017-07-17 Pedro Alves <palves@redhat.com>
8481
8482 * c-exp.y (operator_stoken): Use CP_OPERATOR_LEN and
8483 CP_OPERATOR_STR.
8484 * c-typeprint.c (is_type_conversion_operator): Use
8485 CP_OPERATOR_STR.
8486 * cp-support.c (LENGTH_OF_OPERATOR): Delete.
8487 (cp_find_first_component_aux): Use CP_OPERATOR_STR and
8488 CP_OPERATOR_LEN.
8489 * cp-support.h (CP_OPERATOR_STR, CP_OPERATOR_LEN): New.
8490 * gnu-v2-abi.c (gnuv2_is_operator_name): Use CP_OPERATOR_STR.
8491 * gnu-v3-abi.c (gnuv3_is_operator_name): Use CP_OPERATOR_STR.
8492 * linespec.c (linespec_lexer_lex_string): Use CP_OPERATOR_LEN and
8493 CP_OPERATOR_STR.
8494 * location.c: Include "cp-support.h".
8495 (explicit_location_lex_one): Use CP_OPERATOR_LEN and
8496 CP_OPERATOR_STR.
8497 * symtab.c (operator_chars): Use CP_OPERATOR_STR and
8498 CP_OPERATOR_LEN.
8499
6a2c1b87
PA
85002017-07-17 Pedro Alves <palves@redhat.com>
8501
8502 * cli/cli-cmds.c (complete_command): Use a completion tracker
8503 along with completion_find_completion_word for handle_brkchars
8504 phase.
8505 * completer.c (RL_QF_SINGLE_QUOTE, RL_QF_DOUBLE_QUOTE)
8506 (RL_QF_BACKSLASH, RL_QF_OTHER_QUOTE): New.
8507 (struct gdb_rl_completion_word_info): New.
8508 (gdb_rl_find_completion_word): New.
8509 (completion_find_completion_word): New.
8510 * completer.h (completion_find_completion_word): Declare.
8511
eb3ff9a5
PA
85122017-07-17 Pedro Alves <palves@redhat.com>
8513
8514 * ada-lang.c (symbol_completion_match): Adjust comments.
8515 (symbol_completion_add): Replace vector parameter with
8516 completion_tracker parameter. Use it.
8517 (ada_make_symbol_completion_list): Rename to...
8518 (ada_collect_symbol_completion_matches): ... this. Add
8519 completion_tracker parameter and use it.
8520 (ada_language_defn): Adjust.
8521 * break-catch-syscall.c (catch_syscall_completer): Adjust
8522 prototype and work with completion_tracker instead of VEC.
8523 * breakpoint.c (condition_completer): Adjust prototype and work
8524 with completion_tracker instead of VEC.
8525 * c-lang.c (c_language_defn, cplus_language_defn)
8526 (asm_language_defn, minimal_language_defn): Adjust to renames.
8527 * cli/cli-cmds.c (complete_command): Rework using
8528 completion_tracker. Catch exceptions when completing.
8529 * cli/cli-decode.c (integer_unlimited_completer)
8530 (complete_on_cmdlist, complete_on_enum): Adjust prototype and work
8531 with completion_tracker instead of VEC.
8532 * command.h (struct completion_tracker): Forward declare.
8533 (completer_ftype, completer_handle_brkchars_ftype): Change
8534 types.
8535 (complete_on_cmdlist, complete_on_enum): Adjust.
8536 * completer.c: Include <algorithm>.
8537 (struct gdb_completer_state): New.
8538 (current_completion): New global.
8539 (readline_line_completion_function): Delete.
8540 (noop_completer, filename_completer)
8541 (filename_completer_handle_brkchars, complete_files_symbols)
8542 (linespec_location_completer): Adjust to work with a
8543 completion_tracker instead of a VEC.
8544 (string_or_empty): New.
8545 (collect_explicit_location_matches): Adjust to work with a
8546 completion_tracker instead of a VEC.
8547 (explicit_location_completer): Rename to ...
8548 (complete_explicit_location): ... this and adjust to work with a
8549 completion_tracker instead of a VEC.
8550 (location_completer): Adjust to work with a completion_tracker
8551 instead of a VEC.
8552 (add_struct_fields): Adjust to work with a completion_list instead
8553 of VEC.
8554 (expression_completer): Rename to ...
8555 (complete_expression): ... this and adjust to work with a
8556 completion_tracker instead of a VEC. Use complete_files_symbols.
8557 (expression_completer): Reimplement on top of complete_expression.
8558 (symbol_completer): Adjust to work with a completion_tracker
8559 instead of a VEC.
8560 (enum complete_line_internal_reason): Add describing comments.
8561 (complete_line_internal_normal_command): Adjust to work with a
8562 completion_tracker instead of a VEC.
8563 (complete_line_internal): Rename to ...
8564 (complete_line_internal_1): ... this and adjust to work with a
8565 completion_tracker instead of a VEC. Assert TEXT is NULL in the
8566 handle_brkchars phase.
8567 (new_completion_tracker): Delete.
8568 (complete_line_internal): Reimplement as TRY/CATCH wrapper around
8569 complete_line_internal_1.
8570 (free_completion_tracker): Delete.
8571 (INITIAL_COMPLETION_HTAB_SIZE): New.
8572 (completion_tracker::completion_tracker)
8573 (completion_tracker::~completion_tracker): New.
8574 (maybe_add_completion): Delete.
8575 (completion_tracker::maybe_add_completion)
8576 (completion_tracker::add_completion)
8577 (completion_tracker::add_completions): New.
8578 (throw_max_completions_reached_error): Delete.
8579 (complete_line): Adjust to work with a completion_tracker instead
8580 of a VEC. Don't create a completion_tracker_t or check for max
8581 completions here.
8582 (command_completer, command_completer_handle_brkchars)
8583 (signal_completer, reg_or_group_completer_1)
8584 (reg_or_group_completer, default_completer_handle_brkchars):
8585 Adjust to work with a completion_tracker.
8586 (gdb_completion_word_break_characters_throw): New.
8587 (gdb_completion_word_break_characters): Reimplement.
8588 (line_completion_function): Delete.
8589 (completion_tracker::recompute_lowest_common_denominator)
8590 (expand_preserving_ws)
8591 (completion_tracker::build_completion_result)
8592 (completion_result::completion_result)
8593 (completion_result::completion_result)
8594 (completion_result::~completion_result)
8595 (completion_result::completion_result)
8596 (completion_result::release_match_list, compare_cstrings)
8597 (completion_result::sort_match_list)
8598 (completion_result::reset_match_list)
8599 (gdb_rl_attempted_completion_function_throw)
8600 (gdb_rl_attempted_completion_function): New.
8601 * completer.h (completion_list, struct completion_result)
8602 (class completion_tracker): New.
8603 (complete_line): Add completion_tracker parameter.
8604 (readline_line_completion_function): Delete.
8605 (gdb_rl_attempted_completion_function): New.
8606 (noop_completer, filename_completer, expression_completer)
8607 (location_completer, symbol_completer, command_completer)
8608 (signal_completer, reg_or_group_completer): Update prototypes.
8609 (completion_tracker_t, new_completion_tracker)
8610 (make_cleanup_free_completion_tracker): Delete.
8611 (enum maybe_add_completion_enum): Delete.
8612 (maybe_add_completion): Delete.
8613 (throw_max_completions_reached_error): Delete.
8614 * corefile.c (complete_set_gnutarget): Adjust to work with a
8615 completion_tracker instead of a VEC.
8616 * cp-abi.c (cp_abi_completer): Adjust to work with a
8617 completion_tracker instead of a VEC.
8618 * d-lang.c (d_language_defn): Adjust.
8619 * disasm.c (disassembler_options_completer): Adjust to work with a
8620 completion_tracker instead of a VEC.
8621 * f-lang.c (f_make_symbol_completion_list): Rename to ...
8622 (f_collect_symbol_completion_matches): ... this. Adjust to work
8623 with a completion_tracker instead of a VEC.
8624 (f_language_defn): Adjust.
8625 * go-lang.c (go_language_defn): Adjust.
8626 * guile/scm-cmd.c (cmdscm_add_completion, cmdscm_completer):
8627 Adjust to work with a completion_tracker instead of a VEC.
8628 * infrun.c (handle_completer): Likewise.
8629 * interps.c (interpreter_completer): Likewise.
8630 * interps.h (interpreter_completer): Likewise.
8631 * language.c (unknown_language_defn, auto_language_defn)
8632 (local_language_defn): Adjust.
8633 * language.h (language_defn::la_make_symbol_completion_list):
8634 Rename to ...
8635 (language_defn::la_collect_symbol_completion_matches): ... this
8636 and adjust to work with a completion_tracker instead of a VEC.
8637 * m2-lang.c (m2_language_defn): Adjust.
8638 * objc-lang.c (objc_language_defn): Adjust.
8639 * opencl-lang.c (opencl_language_defn): Adjust.
8640 * p-lang.c (pascal_language_defn): Adjust.
8641 * python/py-cmd.c (cmdpy_completer_helper): Handle NULL word.
8642 (cmdpy_completer_handle_brkchars, cmdpy_completer): Adjust to work
8643 with a completion_tracker.
8644 * rust-lang.c (rust_language_defn): Adjust.
8645 * symtab.c (free_completion_list, do_free_completion_list)
8646 (return_val, completion_tracker): Delete.
8647 (completion_list_add_name, completion_list_add_symbol)
8648 (completion_list_add_msymbol, completion_list_objc_symbol)
8649 (completion_list_add_fields, add_symtab_completions): Add
8650 completion_tracker parameter and use it.
8651 (default_make_symbol_completion_list_break_on_1): Rename to...
8652 (default_collect_symbol_completion_matches_break_on): ... this.
8653 Add completion_tracker parameter and use it instead of allocating
8654 a completion tracker here.
8655 (default_make_symbol_completion_list_break_on): Delete old
8656 implementation.
8657 (default_make_symbol_completion_list): Delete.
8658 (default_collect_symbol_completion_matches): New.
8659 (make_symbol_completion_list): Delete.
8660 (collect_symbol_completion_matches): New.
8661 (make_symbol_completion_type): Rename to ...
8662 (collect_symbol_completion_matches_type): ... this. Add
8663 completion_tracker parameter and use it instead of VEC.
8664 (make_file_symbol_completion_list_1): Rename to...
8665 (collect_file_symbol_completion_matches): ... this. Add
8666 completion_tracker parameter and use it instead of VEC.
8667 (make_file_symbol_completion_list): Delete.
8668 (add_filename_to_list): Use completion_list instead of a VEC.
8669 (add_partial_filename_data::list): Now a completion_list.
8670 (make_source_files_completion_list): Work with a completion_list
8671 instead of a VEC.
8672 * symtab.h: Include "completer.h".
8673 (default_make_symbol_completion_list_break_on)
8674 (default_make_symbol_completion_list, make_symbol_completion_list)
8675 (make_symbol_completion_type, make_file_symbol_completion_list)
8676 (make_source_files_completion_list): Delete.
8677 (default_collect_symbol_completion_matches_break_on)
8678 (default_collect_symbol_completion_matches)
8679 (collect_symbol_completion_matches)
8680 (collect_symbol_completion_matches_type)
8681 (collect_file_symbol_completion_matches)
8682 (make_source_files_completion_list): New.
8683 * top.c (init_main): Don't install a rl_completion_entry_function
8684 hook. Install a rl_attempted_completion_function hook instead.
8685 * tui/tui-layout.c (layout_completer): Adjust to work with a
8686 completion_tracker.
8687 * tui/tui-regs.c (tui_reggroup_completer):
8688 * tui/tui-win.c (window_name_completer, focus_completer)
8689 (winheight_completer): Adjust to work with a completion_tracker.
8690 * value.c: Include "completer.h".
8691 (complete_internalvar): Adjust to work with a completion_tracker.
8692 * value.h (complete_internalvar): Likewise.
8693
6e1dbf8c
PA
86942017-07-17 Pedro Alves <palves@redhat.com>
8695
8696 * cli/cli-decode.c (set_cmd_completer_handle_brkchars): Adjust to
8697 renames.
8698 * cli/cli-decode.h (struct cmd_list_element) <completer>: Move
8699 comments to completer_ftype's declaration.
8700 <completer_handle_brkchars>: Change type to
8701 completer_handle_brkchars_ftype.
8702 * command.h (completer_ftype): Add describing comment and give
8703 names to parameters.
8704 (completer_ftype_void): Rename to ...
8705 (completer_handle_brkchars_ftype) ... this. Add describing comment.
8706 (set_cmd_completer_handle_brkchars): Adjust.
8707 * completer.c (filename_completer_handle_brkchars): New function.
8708 (complete_line_internal_normal_command): New function, factored
8709 out from ...
8710 (complete_line_internal): ... here.
8711 (command_completer_handle_brkchars)
8712 (default_completer_handle_brkchars)
8713 (completer_handle_brkchars_func_for_completer): New functions.
8714 * completer.h (set_gdb_completion_word_break_characters): Delete
8715 declaration.
8716 (completer_handle_brkchars_func_for_completer): New declaration.
8717 * python/py-cmd.c (cmdpy_completer_handle_brkchars): Adjust to use
8718 completer_handle_brkchars_func_for_completer.
8719
78b13106
PA
87202017-07-17 Pedro Alves <palves@redhat.com>
8721
8722 * completer.c (symbol_completer): New function, based on
8723 make_symbol_completion_list_fn.
8724 * completer.h (symbol_completer): New declaration.
8725 * guile/scm-cmd.c (cmdscm_completers): Adjust.
8726 * python/py-cmd.c (completers): Adjust.
8727 * symtab.c (make_symbol_completion_list_fn): Delete.
8728 * symtab.h (make_symbol_completion_list_fn): Delete.
8729 * cli/cli-decode.c (add_cmd): Adjust.
8730
bbf2f4df
PA
87312017-07-17 Pedro Alves <palves@redhat.com>
8732
8733 * Makefile.in (COMMON_OBS): Add filename-seen-cache.o.
8734 * dwarf2read.c: Include "filename-seen-cache.h".
8735 * dwarf2read.c (dwarf2_per_objfile) <filenames_cache>: New field.
8736 (dw2_map_symbol_filenames): Build and use a filenames_seen_cache.
8737 * filename-seen-cache.c: New file.
8738 * filename-seen-cache.h: New file.
8739 * symtab.c: Include "filename-seen-cache.h".
8740 (struct filename_seen_cache, INITIAL_FILENAME_SEEN_CACHE_SIZE)
8741 (create_filename_seen_cache, clear_filename_seen_cache)
8742 (delete_filename_seen_cache, filename_seen): Delete, parts moved
8743 to filename-seen-cache.h/filename-seen-cache.c.
8744 (output_source_filename, sources_info)
8745 (maybe_add_partial_symtab_filename)
8746 (make_source_files_completion_list): Adjust to use
8747 filename_seen_cache.
8748
330cdd98
PA
87492017-07-17 Pedro Alves <palves@redhat.com>
8750
8751 * dwarf2read.c (dwarf2_per_objfile): In-class initialize all
8752 fields.
8753 (dwarf2_per_objfile::dwarf2_per_objfile(objfile*, const
8754 dwarf2_debug_sections*)): New.
8755 (dwarf2_per_objfile::dwarf2_per_objfile(const
8756 dwarf2_per_objfile&)): Declare as deleted.
8757 (dwarf2_per_objfile::operator=): Declare as deleted.
8758 (dwarf2_per_objfile::dwarf2_per_objfile)
8759 (dwarf2_per_objfile::~dwarf2_per_objfile)
8760 (dwarf2_per_objfile::free_cached_comp_units): New.
8761 (dwarf2_has_info): dwarf2_per_objfile initialization code moved to
8762 ctor. Call dwarf2_per_objfile's ctor manually.
8763 (dwarf2_locate_sections): Deleted/refactored as ...
8764 (dwarf2_per_objfile::locate_sections): ... this new method.
8765 (free_cached_comp_units): Defer to
8766 dwarf2_per_objfile::free_cached_comp_units.
8767 (dwarf2_free_objfile): Call dwarf2_per_objfile's dtor manually.
8768
8880f2a9
TT
87692017-07-14 Tom Tromey <tom@tromey.com>
8770
8771 PR rust/21764:
8772 * rust-exp.y (convert_ast_to_expression): Add "want_type"
8773 parameter.
8774 <UNOP_SIZEOF>: Split into separate case.
8775 <UNOP_VAR_VALUE>: Handle want_type. Add error case.
8776
65547233
TT
87772017-07-14 Tom Tromey <tom@tromey.com>
8778
8779 PR rust/21763:
8780 * symtab.c (symbol_matches_domain): Add language_rust to special
8781 case.
8782 * rust-exp.y (convert_ast_to_expression) <OP_VAR_VALUE>: Don't
8783 treat LOC_TYPEDEF symbols as variables.
8784
8f14146e
PA
87852017-07-14 Pedro Alves <palves@redhat.com>
8786
8787 * symtab.c (make_file_symbol_completion_list_1): Iterate over
8788 symtabs matching all symtabs with SRCFILE as file name instead of
8789 only considering the first hit, with lookup_symtab.
8790
2347965c
SM
87912017-07-14 Simon Marchi <simon.marchi@ericsson.com>
8792
8793 * ax-gdb.c (gen_aggregate_elt_ref): Remove operand_name and
8794 operator_name parameters.
8795 (gen_expr): Update function call.
8796
40f4af28
SM
87972017-07-14 Simon Marchi <simon.marchi@ericsson.com>
8798
8799 * dwarf2loc.h (dwarf2_compile_expr_to_ax): Remove gdbarch
8800 parameter.
8801 * symtab.h (struct symbol_computed_ops::tracepoint_var_ref):
8802 Likewise.
8803 * dwarf2loc.c (dwarf2_compile_expr_to_ax): Remove gdbarch
8804 parameter, use agent_expr::gdbarch instead, update function
8805 calls.
8806 (locexpr_tracepoint_var_ref): Likewise.
8807 (loclist_tracepoint_var_ref): Likewise.
8808 * ax-gdb.c (gen_trace_static_fields): Likewise.
8809 (gen_traced_pop): Likewise.
8810 (gen_frame_args_address): Likewise.
8811 (gen_frame_locals_address): Likewise.
8812 (gen_var_ref): Likewise.
8813 (gen_struct_ref_recursive): Likewise.
8814 (gen_static_field): Likewise.
8815 (gen_maybe_namespace_elt): Likewise.
8816 (gen_expr): Likewise.
8817 (gen_trace_for_var): Likewise.
8818 (gen_trace_for_expr): Likewise.
8819 (gen_trace_for_return_address): Likewise.
8820
053f8057
SM
88212017-07-14 Simon Marchi <simon.marchi@ericsson.com>
8822
8823 * ax-gdb.c (gen_deref, gen_address_of): Remove unused ax
8824 parameter.
8825 (gen_struct_ref, gen_expr, gen_expr_binop_rest): Update call.
8826
6661ad48
SM
88272017-07-14 Simon Marchi <simon.marchi@ericsson.com>
8828
8829 * ax-gdb.c (gen_usual_unary): Remove exp parameter, get gdbarch
8830 from ax, update calls.
8831 (gen_usual_arithmetic): Likewise.
8832 (gen_integral_promotions): Likewise.
8833 (gen_bitfield_ref): Likewise.
8834 (gen_primitive_field): Likewise.
8835 (gen_struct_ref_recursive): Likewise.
8836 (gen_struct_ref): Likewise.
8837 (gen_maybe_namespace_elt): Likewise.
8838 (gen_struct_elt_for_reference): Likewise.
8839 (gen_namespace_elt): Likewise.
8840 (gen_aggregate_elt_ref): Likewise.
8841 (gen_expr): Get gdbarch from ax, update calls.
8842 (gen_expr_binop_rest): Likewise.
8843
c55a47e7
PA
88442017-07-13 Pedro Alves <palves@redhat.com>
8845
8846 * amd64-darwin-tdep.c (x86_darwin_init_abi_64): Pass tdesc_amd64
8847 as default tdesc.
8848 * amd64-dicos-tdep.c (amd64_dicos_init_abi):
8849 * amd64-fbsd-tdep.c (amd64fbsd_init_abi):
8850 * amd64-linux-tdep.c (amd64_linux_init_abi): Pass
8851 tdesc_amd64_linux as default tdesc. Get final tdesc from the
8852 tdep.
8853 (amd64_x32_linux_init_abi): Pass tdesc_x32_linux as default tdesc.
8854 Get final tdesc from the tdep.
8855 * amd64-nbsd-tdep.c (amd64nbsd_init_abi): Pass tdesc_amd64 as
8856 default tdesc.
8857 * amd64-obsd-tdep.c (amd64obsd_init_abi): Likewise.
8858 * amd64-sol2-tdep.c (amd64_sol2_init_abi): Likewise.
8859 * amd64-tdep.c (amd64_init_abi): Add 'default_tdesc' parameter.
8860 Use it as default tdesc.
8861 (amd64_x32_init_abi): Add 'default_tdesc' parameter, and pass it
8862 down to amd_init_abi. No longer handle fallback tdesc here.
8863 * amd64-tdep.h (tdesc_x32): Declare.
8864 (amd64_init_abi, amd64_x32_init_abi): Add 'default_tdesc'
8865 parameter.
8866 * amd64-windows-tdep.c (amd64_windows_init_abi): Pass tdesc_amd64
8867 as default tdesc.
8868
55efceab
AA
88692017-07-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
8870
8871 * s390-linux-tdep.c (s390_process_record): Add support for
8872 instructions new in arch12.
8873
0aa37b65
JB
88742017-07-11 John Baldwin <jhb@FreeBSD.org>
8875
8876 * amd64-bsd-nat.c (amd64bsd_fetch_inferior_registers): Use
8877 PT_GETFSBASE and PT_GETGSBASE.
8878 (amd64bsd_store_inferior_registers): Use PT_SETFSBASE and
8879 PT_SETGSBASE.
8880
48aeef91
JB
88812017-07-11 John Baldwin <jhb@FreeBSD.org>
8882
8883 * features/Makefile (amd64.dat, amd64-avx.dat, amd64-mpx.dat)
8884 (amd64-avx-mpx.dat, amd64-avx-avx512.dat)
8885 (amd64-avx-mpx-avx512-pku.dat): Add i386/64bit-segments.xml in
8886 those rules.
8887 * features/i386/amd64-avx-avx512.xml: Add 64bit-segments.xml.
8888 * features/i386/amd64-avx-mpx-avx512-pku.xml: Add 64bit-segments.xml.
8889 * features/i386/amd64-avx-mpx.xml: Add 64bit-segments.xml.
8890 * features/i386/amd64-avx.xml: Add 64bit-segments.xml.
8891 * features/i386/amd64-mpx.xml: Add 64bit-segments.xml.
8892 * features/i386/amd64.xml: Add 64bit-segments.xml.
8893 * features/i386/amd64-avx-avx512.c: Regenerated.
8894 * features/i386/amd64-avx-mpx-avx512-pku.c: Regenerated.
8895 * features/i386/amd64-avx-mpx.c: Regenerated.
8896 * features/i386/amd64-avx.c: Regenerated.
8897 * features/i386/amd64-mpx.c: Regenerated.
8898 * features/i386/amd64.c: Regenerated.
8899 * regformats/i386/amd64-avx-avx512.dat: Regenerated.
8900 * regformats/i386/amd64-avx-mpx-avx512-pku.dat: Regenerated.
8901 * regformats/i386/amd64-avx-mpx.dat: Regenerated.
8902 * regformats/i386/amd64-avx.dat: Regenerated.
8903 * regformats/i386/amd64-mpx.dat: Regenerated.
8904 * regformats/i386/amd64.dat: Regenerated.
8905
77c501bc
YQ
89062017-07-10 Yao Qi <yao.qi@linaro.org>
8907
8908 * features/i386/amd64-avx-avx512-linux.c: Re-generated.
8909 * features/i386/amd64-avx-mpx-avx512-pku-linux.c: Re-generated.
8910
6dc8d757
AK
89112017-07-10 Anton Kolesov <Anton.Kolesov@synopsys.com>
8912
8913 * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add setenv and
8914 unsetenv.
8915 * gnulib/aclocal.m4: Regenerate.
8916 * gnulib/config.in: Regenerate.
8917 * gnulib/configure: Regenerate.
8918 * gnulib/import/Makefile.am: Regenerate.
8919 * gnulib/import/Makefile.in: Regenerate.
8920 * gnulib/import/m4/gnulib-cache.m4: Regenerate.
8921 * gnulib/import/m4/gnulib-comp.m4: Regenerate.
8922 * gnulib/import/m4/environ.m4: New file.
8923 * gnulib/import/m4/setenv.m4: New file.
8924 * gnulib/import/setenv.c: New file.
8925 * gnulib/import/unsetenv.c: New file.
8926
266934d1
SM
89272017-07-09 Simon Marchi <simon.marchi@ericsson.com>
8928
8929 * compile/compile-loc2c.c (do_compile_dwarf_expr_to_c): Read
8930 address when op is DW_OP_addr.
8931
03278692
TT
89322017-07-09 Tom Tromey <tom@tromey.com>
8933
8934 * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Reverse size
8935 check and apply to outer type.
8936
4b654465
JB
89372017-07-07 John Baldwin <jhb@FreeBSD.org>
8938
8939 * fbsd-tdep.c (LWPINFO_OFFSET, LWPINFO_PL_FLAGS)
8940 (LWPINFO64_PL_SIGINFO, LWPINFO32_PL_SIGINFO, PL_FLAG_SI)
8941 (SIZE64_SIGINFO_T, SIZE32_SIGINFO_T, fbsd_core_xfer_siginfo): New.
8942 (fbsd_init_abi): Install gdbarch "core_xfer_siginfo" method.
8943
2af9fc44
JB
89442017-07-07 John Baldwin <jhb@FreeBSD.org>
8945
8946 * fbsd-tdep.c (fbsd_core_thread_name): Use thread_section_name.
8947
382b69bb
JB
89482017-07-07 John Baldwin <jhb@FreeBSD.org>
8949
8950 * corelow.c (get_core_siginfo): Remove.
8951 (core_xfer_partial): Use the gdbarch "core_xfer_siginfo" method
8952 instead of get_core_siginfo.
8953 * gdbarch.sh (core_xfer_siginfo): New gdbarch callback.
8954 * gdbarch.h: Re-generate.
8955 * gdbarch.c: Re-generate.
8956 * linux-tdep.c (linux_core_xfer_siginfo): New.
8957 (linux_init_abi): Install gdbarch "core_xfer_siginfo" method.
8958
6e5eab33
JB
89592017-07-07 John Baldwin <jhb@FreeBSD.org>
8960
8961 * corelow.c (thread_section_name): Move to ...
8962 * gdbcore.h (thread_section_name): ... here.
8963
929edea9
JB
89642017-07-07 John Baldwin <jhb@FreeBSD.org>
8965
8966 * fbsd-nat.c [PT_LWPINFO && __LP64__] (union sigval32)
8967 (struct siginfo32): New.
8968 [PT_LWPINFO] (fbsd_siginfo_size, fbsd_convert_siginfo): New.
8969 (fbsd_xfer_partial) [PT_LWPINFO]: Handle TARGET_OBJECT_SIGNAL_INFO
8970 via ptrace(PT_LWPINFO).
8971
762c974a
JB
89722017-07-07 John Baldwin <jhb@FreeBSD.org>
8973
8974 * fbsd-tdep.c (fbsd_gdbarch_data_handle, struct fbsd_gdbarch_data)
8975 (init_fbsd_gdbarch_data, get_fbsd_gdbarch_data)
8976 (fbsd_get_siginfo_type): New.
8977 (fbsd_init_abi): Install gdbarch "get_siginfo_type" method.
8978 (_initialize_fbsd_tdep): New.
8979
33c5cd75
DB
89802017-07-06 David Blaikie <dblaikie@gmail.com>
8981
8982 * dwarf2read.c (struct dwo_file): Use a htab of dwo_unit* (rather than
8983 a singular dwo_unit*) to support multiple CUs in the same way that
8984 multiple TUs are supported.
8985 (create_cus_hash_table): Replace create_dwo_cu with a function for
8986 parsing multiple CUs from a DWO file.
8987 (open_and_init_dwo_file): Use create_cus_hash_table rather than
8988 create_dwo_cu.
8989 (lookup_dwo_cutu): Lookup CU in the hash table in the dwo_file with
8990 htab_find, rather than comparing the signature to a singleton CU in
8991 the dwo_file.
8992
8455d262
PA
89932017-07-06 Pedro Alves <palves@redhat.com>
8994
8995 * python/py-unwind.c (pyuw_dealloc_cache): Fix for loop condition.
8996
4da3eb35
PA
89972017-07-04 Pedro Alves <palves@redhat.com>
8998
8999 * gdbtypes.c (recursive_dump_type): Don't reference TYPE_STATIC.
9000 * gdbtypes.h (TYPE_STATIC): Delete.
9001 (struct fn_field) <is_public, is_abstract, is_static, is_final,
9002 is_synchronized, is_native>: Delete.
9003 <dummy>: Bump.
9004 (TYPE_FN_FIELD_PUBLIC, TYPE_FN_FIELD_STATIC, TYPE_FN_FIELD_FINAL)
9005 (TYPE_FN_FIELD_SYNCHRONIZED, TYPE_FN_FIELD_NATIVE)
9006 (TYPE_FN_FIELD_ABSTRACT): Delete.
9007
5bfd255c
SM
90082017-07-03 Simon Marchi <simon.marchi@ericsson.com>
9009
9010 * buffer.h (buffer_finish): Fix spelling mistakes.
9011
25c54127
EZ
90122017-07-01 Eli Zaretskii <eliz@gnu.org>
9013
9014 * .dir-locals.el: Automatically switch to C-style comments in
9015 versions of Emacs that support the feature.
9016
dc4bde35
SDJ
90172017-06-30 Sergio Durigan Junior <sergiodj@redhat.com>
9018 Pedro Alves <palves@redhat.com>
9019
9020 PR cli/21688
9021 * cli/cli-script.c (command_name_equals_not_inline): Remove function.
9022 (process_next_line): New variable 'inline_cmd'.
9023 Adjust 'if' clauses for "python", "compile" and "guile" to use
9024 'command_name_equals' and check for '!inline_cmd'.
9025
51ed89aa
SDJ
90262017-06-30 Sergio Durigan Junior <sergiodj@redhat.com>
9027
9028 PR cli/21688
9029 * cli/cli-script.c (command_name_equals_not_inline): New function.
9030 (process_next_line): Adjust 'if' clauses for "python", "compile"
9031 and "guile" to use command_name_equals_not_inline.
9032
eb17d413
PA
90332017-06-29 Pedro Alves <palves@redhat.com>
9034
9035 * completer.c (expression_completer): Call
9036 linespec_location_completer instead of location_completer.
9037
195bcdd5
PA
90382017-06-29 Pedro Alves <palves@redhat.com>
9039
9040 * completer.c (expression_completer): Remove code that recomputes
9041 'text' from 'word'.
9042
adc764e7
YQ
90432017-06-29 Yao Qi <yao.qi@linaro.org>
9044
9045 * regformats/regdat.sh: Generate code with
9046 "ifndef IN_PROCESS_AGENT".
9047
6e75794e
PA
90482017-06-28 Pedro Alves <palves@redhat.com>
9049
9050 * command.h: Include "common/scoped_restore.h".
9051
bc491f2e
YQ
90522017-06-28 Yao Qi <yao.qi@linaro.org>
9053
9054 * mi/mi-cmd-break.c (mi_argv_to_format): Use obstack_grow_str
9055 instead of obstack_grow.
9056
41664b45
DG
90572017-06-28 Doug Gilmore <Doug.Gilmore@imgtec.com>
9058
9059 PR gdb/21337
9060 * symfile.c (reread_symbols): Call objfiles_changed just before
9061 read_symbols.
9062
6da67eb1
PA
90632017-06-27 Pedro Alves <palves@redhat.com>
9064
9065 * symtab.c (COMPLETION_LIST_ADD_SYMBOL)
9066 (MCOMPLETION_LIST_ADD_SYMBOL): Delete macros, replace with ...
9067 (completion_list_add_symbol, completion_list_add_msymbol):
9068 ... these new functions.
9069 (add_symtab_completions)
9070 (default_make_symbol_completion_list_break_on_1): Adjust.
9071
23732b1e
PA
90722017-06-27 Pedro Alves <palves@redhat.com>
9073
9074 * objfiles.c (get_objfile_bfd_data): Call bfd_alloc instead of
9075 bfd_zalloc. Call objfile_per_bfd_storage's ctor.
9076 (free_objfile_per_bfd_storage): Call objfile_per_bfd_storage's
9077 dtor.
9078 * objfiles.h (objfile_per_bfd_storage): Add ctor. Make
9079 'storage_obstack' field an auto_obstack. In-class initialize all
9080 non-bitfield fields. Make minsyms_read bool.
9081 * symfile.c (read_symbols): Adjust.
9082
a4d1e79a
AH
90832017-06-27 Alan Hayward <alan.hayward@arm.com>
9084
9085 * remote-sim.c (gdbsim_fetch_register): Use byte_vector.
9086 (gdbsim_store_register): Likewise.
9087
8268c778
PA
90882017-06-27 Pedro Alves <palves@redhat.com>
9089
9090 * c-exp.y (name_obstack): Now an auto_obstack.
9091 (yylex): Use auto_obstack::clear.
9092 (c_parse): Use auto_obstack::clear instead of reinitializing and
9093 freeing the obstack.
9094 * c-lang.c (evaluate_subexp_c): Use auto_obstack.
9095 * d-exp.y (name_obstack): Now an auto_obstack.
9096 (yylex): Use auto_obstack::clear.
9097 (d_parse): Use auto_obstack::clear instead of reinitializing and
9098 freeing the obstack.
9099 * dwarf2loc.c (fetch_const_value_from_synthetic_pointer): Use
9100 auto_obstack.
9101 * dwarf2read.c (create_addrmap_from_index)
9102 (dwarf2_build_psymtabs_hard)
9103 (update_enumeration_type_from_children): Likewise.
9104 * gdb_obstack.h (auto_obstack): New type.
9105 * go-exp.y (name_obstack): Now an auto_obstack.
9106 (build_packaged_name): Use auto_obstack::clear.
9107 (go_parse): Use auto_obstack::clear instead of reinitializing and
9108 freeing the obstack.
9109 * linux-tdep.c (linux_make_mappings_corefile_notes): Use
9110 auto_obstack.
9111 * printcmd.c (printf_wide_c_string, ui_printf): Use auto_obstack.
9112 * rust-exp.y (work_obstack): Now an auto_obstack.
9113 (rust_parse, rust_lex_tests): Use auto_obstack::clear instead of
9114 reinitializing and freeing the obstack.
9115 * utils.c (do_obstack_free, make_cleanup_obstack_free): Delete.
9116 (host_char_to_target): Use auto_obstack.
9117 * utils.h (make_cleanup_obstack_free): Delete declaration.
9118 * valprint.c (generic_emit_char, generic_printstr): Use
9119 auto_obstack.
9120
db665f42
SM
91212017-06-27 Simon Marchi <simon.marchi@ericsson.com>
9122
9123 * darwin-nat.c (darwin_check_new_threads): Don't handle dummy
9124 thread.
9125 (darwin_init_thread_list): Don't update dummy thread.
9126 (darwin_create_inferior, darwin_attach): Don't add a dummy thread.
9127
873c0814
SM
91282017-06-26 Simon Marchi <simon.marchi@ericsson.com>
9129
9130 * record-full.c (netorder16): Remove.
9131
8b5a7a6e
SM
91322017-06-26 Simon Marchi <simon.marchi@ericsson.com>
9133
9134 * common/diagnostics.h: Define macros for GCC.
9135 (DIAGNOSTIC_IGNORE_UNUSED_FUNCTION): New macro.
9136 * common/vec.h: Include diagnostics.h.
9137 (DIAGNOSTIC_IGNORE_UNUSED_VEC_FUNCTION): New macro.
9138 (DEF_VEC_I, DEF_VEC_P, DEF_VEC_O): Ignore -Wunused-function
9139 warning.
9140
d1435379
SM
91412017-06-26 Simon Marchi <simon.marchi@ericsson.com>
9142
9143 * common/diagnostics.h (DIAGNOSTIC_IGNORE_DEPRECATED_REGISTER):
9144 New macro.
9145 * ada-lex.l: Ignore deprecated register warnings.
9146
cc75e0fd
SM
91472017-06-25 Simon Marchi <simon.marchi@ericsson.com>
9148
9149 * main.c (get_init_files): Replace "SYSTEM_GDBINIT +
9150 datadir_len" with "&SYSTEM_GDBINIT[datadir_len]".
9151
07809eaf
SM
91522017-06-25 Simon Marchi <simon.marchi@ericsson.com>
9153
9154 * dtrace-probe.c (dtrace_process_dof_probe): Put semi-colon on
9155 its own line.
9156
f076f034
SM
91572017-06-25 Simon Marchi <simon.marchi@ericsson.com>
9158
9159 * nat/x86-dregs.c (x86_show_dr): Print registers one per line.
9160
0dd5cbc5
AH
91612017-06-23 Alan Hayward <alan.hayward@arm.com>
9162
9163 * xtensa-tdep.c (XTENSA_MAX_REGISTER_SIZE): Add.
9164 (xtensa_register_write_masked): Use XTENSA_MAX_REGISTER_SIZE.
9165 (xtensa_register_read_masked): Likewise.
9166
d4c6ce5b
SDJ
91672017-06-22 Sergio Durigan Junior <sergiodj@redhat.com>
9168
9169 * common/environ.c (gdb_environ::unset): Update comment.
9170
16892a03
AH
91712017-06-22 Alan Hayward <alan.hayward@arm.com>
9172
9173 * python/py-unwind.c (pyuw_sniffer): Allocate space for
9174 registers.
9175
d7dcbefc
AH
91762017-06-22 Alan Hayward <alan.hayward@arm.com>
9177
9178 * record-full.c (record_full_exec_insn): Use byte_vector.
9179
b30ff123
YQ
91802017-06-22 Yao Qi <yao.qi@linaro.org>
9181
9182 * regformats/i386/amd64-avx-mpx-avx512-pku-linux.dat: Regenerated.
9183 * regformats/i386/amd64-avx-mpx-avx512-pku.dat: Regenerated.
9184
4fa847d7
AH
91852017-06-22 Alan Hayward <alan.hayward@arm.com>
9186
9187 * remote.c (cached_reg): Move from here...
9188 * regcache.h (cached_reg): ...to here.
9189 * python/py-unwind.c (struct reg_info): Remove.
9190 (cached_frame_info): Use cached_reg_t.
9191 (pyuw_prev_register): Likewise.
9192 (pyuw_sniffer): Use cached_reg_t and allocate registers.
9193 (pyuw_dealloc_cache): Free all registers.
9194
f4906a9a
PA
91952017-06-22 Pedro Alves <palves@redhat.com>
9196 Simon Marchi <simon.marchi@ericsson.com>
9197
9198 * unittests/environ-selftests.c (run_tests): Ignore -Wself-move
9199 warning.
9200 * common/diagnostics.h: New file.
9201
b45a1208
PA
92022017-06-22 Pedro Alves <palves@redhat.com>
9203
9204 * common/agent.h: Add include guards.
9205
e4da2c61
SM
92062017-06-21 Simon Marchi <simon.marchi@ericsson.com>
9207
9208 * target.h (struct target_ops) <to_xfer_partial>: Update doc to
9209 talk about addressable units instead of bytes.
9210
96160d60
SDJ
92112017-06-20 Sergio Durigan Junior <sergiodj@redhat.com>
9212
9213 * common/environ.c (gdb_environ::unset): Use '::iterator' instead
9214 of '::const_iterator'.
9215
9a6c7d9c
SDJ
92162017-06-20 Sergio Durigan Junior <sergiodj@redhat.com>
9217
9218 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
9219 'unittests/environ-selftests.c'.
9220 (SUBDIR_UNITTESTS_OBS): Add 'environ-selftests.o'.
9221 * charset.c (find_charset_names): Declare object 'iconv_env'.
9222 Update code to use 'iconv_env' object. Remove call to
9223 'free_environ'.
9224 * common/environ.c: Include <utility>.
9225 (make_environ): Delete function.
9226 (free_environ): Delete function.
9227 (gdb_environ::clear): New function.
9228 (gdb_environ::operator=): New function.
9229 (gdb_environ::get): Likewise.
9230 (environ_vector): Delete function.
9231 (set_in_environ): Delete function.
9232 (gdb_environ::set): New function.
9233 (unset_in_environ): Delete function.
9234 (gdb_environ::unset): New function.
9235 (gdb_environ::envp): Likewise.
9236 * common/environ.h: Include <vector>.
9237 (struct gdb_environ): Delete; transform into...
9238 (class gdb_environ): ... this class.
9239 (free_environ): Delete prototype.
9240 (init_environ, get_in_environ, set_in_environ, unset_in_environ,
9241 environ_vector): Likewise.
9242 * infcmd.c (run_command_1): Update code to call
9243 'envp' from 'gdb_environ' class.
9244 (environment_info): Update code to call methods from 'gdb_environ'
9245 class.
9246 (unset_environment_command): Likewise.
9247 (path_info): Likewise.
9248 (path_command): Likewise.
9249 * inferior.c (inferior::~inferior): Delete call to 'free_environ'.
9250 (inferior::inferior): Initialize 'environment' using the host's
9251 information.
9252 * inferior.h: Remove forward declaration of 'struct gdb_environ'.
9253 Include "environ.h".
9254 (class inferior) <environment>: Change type from 'struct
9255 gdb_environ' to 'gdb_environ'.
9256 * mi/mi-cmd-env.c (mi_cmd_env_path): Update code to call
9257 methods from 'gdb_environ' class.
9258 * solib.c (solib_find_1): Likewise
9259 * unittests/environ-selftests.c: New file.
9260
75c554cf
YQ
92612017-06-20 Yao Qi <yao.qi@linaro.org>
9262
9263 * features/i386/i386-linux.xml: Exchange the order of including
9264 32bit-linux.xml and 32bit-sse.xml.
9265 * features/i386/i386-linux.c: Regenerated.
9266
72ddacb7
YQ
92672017-06-20 Yao Qi <yao.qi@linaro.org>
9268
9269 * target-descriptions.c (tdesc_reg): Add ctor, dtor.
9270 Delete copy ctor and assignment operator.
9271 (tdesc_type): Likewise.
9272 (tdesc_feature): Likewise.
9273 (tdesc_free_reg): Remove.
9274 (tdesc_create_reg): Use new.
9275 (tdesc_free_type): Remove.
9276 (tdesc_create_vector): Use new.
9277 (tdesc_create_union): Likewise.
9278 (tdesc_create_flags): Likewise.
9279 (tdesc_create_enum): Likewise.
9280 (tdesc_free_feature): Delete.
9281 (free_target_description): Use delete.
9282
325c9fd4
JB
92832017-06-19 John Baldwin <jhb@FreeBSD.org>
9284
9285 * mips-tdep.c (print_gp_register_row): Don't error for unavailable
9286 registers.
9287
16b7a719
PA
92882017-06-19 Pedro Alves <palves@redhat.com>
9289
9290 * dwarf2read.c (write_psymtabs_to_index): Construct file_closer
9291 after gdb::unlinker.
9292
1c8e01c9
SDJ
92932017-06-19 Sergio Durigan Junior <sergiodj@redhat.com>
9294
9295 * mi/mi-cm-env.c (_initialize_mi_cmd_env): Use getenv instead of
9296 gdb_environ to access an environment variable.
9297
ffce45d2
TP
92982017-06-18 Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
9299
9300 * nat/linux-ptrace.c (linux_fork_to_function): Add cast to
9301 gdb_byte*.
9302
1d4fbac9
SM
93032017-06-17 Simon Marchi <simon.marchi@ericsson.com>
9304
9305 * nat/fork-inferior.h (trace_start_error): Add ATTRIBUTE_PRINTF.
9306
8465943a
SM
93072017-06-17 Simon Marchi <simon.marchi@ericsson.com>
9308
9309 * configure: Re-generate.
9310 * warning.m4 (build_warnings): Add -Wno-mismatched-tags.
9311
3e019bdc
SM
93122017-06-17 Simon Marchi <simon.marchi@ericsson.com>
9313
9314 * configure: Re-generate.
9315 * warning.m4: Pass -Werror to compiler when checking for
9316 supported warning flags.
9317
cf0dd6f0
SM
93182017-06-17 Simon Marchi <simon.marchi@ericsson.com>
9319
9320 * Makefile.in (COMPILE.pre): Add "-x c++".
9321
6f98355c
YQ
93222017-06-16 Alan Hayward <alan.hayward@arm.com>
9323 Pedro Alves <palves@redhat.com>
9324 Yao Qi <yao.qi@linaro.org>
9325
9326 * defs.h (RequireLongest): New.
9327 (extract_integer): Declare function template.
9328 (extract_signed_integer): Remove the declaration, but define it
9329 static inline.
9330 (extract_unsigned_integer): Likewise.
9331 (store_integer): Declare function template.
9332 (store_signed_integer): Remove the declaration, but define it
9333 static inline.
9334 (store_unsigned_integer): Likewise.
9335 * findvar.c (extract_integer): New function template.
9336 (extract_signed_integer): Remove.
9337 (extract_unsigned_integer): Remove.
9338 (extract_integer<LONGEST>, extract_integer<ULONGEST>): Explicit
9339 instantiations.
9340 (store_integer): New function template.
9341 (store_signed_integer): Remove.
9342 (store_unsigned_integer): Remove.
9343 (store_integer): Explicit instantiations.
9344 * regcache.c (regcache_raw_read_signed): Update.
9345 (regcache::raw_read): New function.
9346 (regcache::raw_read_signed): Remove.
9347 (regcache::raw_read_unsigned): Remove.
9348 (regcache_raw_read_unsigned): Update.
9349 (regcache_raw_write_unsigned): Update.
9350 (regcache::raw_write_signed): Remove.
9351 (regcache::raw_write): New function.
9352 (regcache_cooked_read_signed): Update.
9353 (regcache::raw_write_unsigned): Remove.
9354 (regcache::cooked_read_signed): Remove.
9355 (regcache_cooked_read_unsigned): Update.
9356 (regcache::cooked_read_unsigned): Remove.
9357 (regcache_cooked_write_signed): Update.
9358 (regcache_cooked_write_unsigned): Update.
9359 * regcache.h (regcache) <raw_read_signed>: Remove.
9360 <raw_write_signed, raw_read_unsigned, raw_write_unsigned>: Remove.
9361 <raw_read, raw_write>: New.
9362 <cooked_read_signed, cooked_write_signed>: Remove.
9363 <cooked_write_unsigned, cooked_read_unsigned>: Remove.
9364 <cooked_read, cooked_write>: New.
9365 * sh64-tdep.c (sh64_pseudo_register_read): Update.
9366 (sh64_pseudo_register_write): Update.
9367
a87dc45a
AK
93682017-06-16 Anton Kolesov <anton.kolesov@synopsys.com>
9369
9370 * arc-tdep.c (arc_disassembler_options): New variable.
9371 (arc_gdbarch_init): Set and use it. Use arc_delayed_print_insn instead
9372 of default_print_insn.
9373 (arc_delayed_print_insn): Set info->section when needed,
9374 use default_print_insn to retrieve a disassembler.
9375
45159d6a
SDJ
93762017-06-14 Sergio Durigan Junior <sergiodj@redhat.com>
9377
9378 PR gdb/21574
9379 * infcmd.c (_initialize_infcmd): Expand "help run" documentation
9380 to mention $SHELL and startup-with-shell.
9381
b46c4cf0
MF
93822017-06-14 Max Filippov <jcmvbkbc@gmail.com>
9383
9384 * MAINTAINERS: Move Maxim Grigoriev to the Past Maintainers.
9385
6394c606
YQ
93862017-06-14 Yao Qi <yao.qi@linaro.org>
9387
9388 * aarch64-tdep.c (aarch64_gdb_print_insn): Call
9389 default_print_insn instead of print_insn_aarch64.
9390 * arm-tdep.c (gdb_print_insn_arm): Call
9391 default_print_insn instead of print_insn_big_arm
9392 and print_insn_little_arm.
9393 * i386-tdep.c (i386_print_insn): Call default_print_insn
9394 instead of print_insn_i386.
9395 * ia64-tdep.c (ia64_print_insn): Call
9396 default_print_insn instead of print_insn_ia64.
9397 * mips-tdep.c (gdb_print_insn_mips): Call
9398 default_print_insn instead of print_insn_big_mips
9399 and print_insn_little_mips.
9400 * spu-tdep.c (gdb_print_insn_spu): Call default_print_insn
9401 instead of print_insn_spu.
9402
d5722aa2
PA
94032017-06-14 Pedro Alves <palves@redhat.com>
9404
9405 * ada-lang.c: Include "common/byte-vector.h".
9406 (ada_value_primitive_packed_val): Use gdb::byte_vector.
9407 * charset.c (wchar_iterator::iterate): Resize the vector instead
9408 of reserving it.
9409 * common/byte-vector.h: Include "common/def-vector.h".
9410 (wchar_iterator::m_out): Now a gdb::def_vector<gdb_wchar_t>.
9411 * cli/cli-dump.c: Include "common/byte-vector.h".
9412 (dump_memory_to_file, restore_binary_file): Use gdb::byte_vector.
9413 * common/byte-vector.h: New file.
9414 * common/def-vector.h: New file.
9415 * common/default-init-alloc.h: New file.
9416 * dwarf2loc.c: Include "common/byte-vector.h".
9417 (rw_pieced_value): Use gdb::byte_vector, and resize the vector
9418 instead of reserving it.
9419 * dwarf2read.c: Include "common/byte-vector.h".
9420 (data_buf::m_vec): Now a gdb::byte_vector.
9421 * gdb_regex.c: Include "common/def-vector.h".
9422 (compiled_regex::compiled_regex): Use gdb::def_vector<char>.
9423 * mi/mi-main.c: Include "common/byte-vector.h".
9424 (mi_cmd_data_read_memory): Use gdb::byte_vector.
9425 * printcmd.c: Include "common/byte-vector.h".
9426 (print_scalar_formatted): Use gdb::byte_vector.
9427 * valprint.c: Include "common/byte-vector.h".
9428 (maybe_negate_by_bytes, print_decimal_chars): Use
9429 gdb::byte_vector.
9430
01ec7a27
SM
94312017-06-13 Simon Marchi <simon.marchi@ericsson.com>
9432
9433 * darwin-nat.c: Include "nat/fork-inferior.h".
9434
848d9074
SM
94352017-06-13 Simon Marchi <simon.marchi@ericsson.com>
9436
9437 * configure.nat: Factor out Darwin bits that are not
9438 architecture-specific. Add fork-inferior.o.
9439
3b912944
SM
94402017-06-13 Simon Marchi <simon.marchi@ericsson.com>
9441
9442 * configure.nat: Factor out AIX bits that are not
9443 architecture-specific. Add fork-inferior.o.
9444
55acdf22
AA
94452017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
9446
9447 * dwarf2loc.c (rw_pieced_value): New. Merge logic from...
9448 (read_pieced_value, write_pieced_value): ...here. Reduce to
9449 wrappers that just call rw_pieced_value.
9450
f65e2044
AA
94512017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
9452
9453 * dwarf2loc.c (write_pieced_value): When writing the data for a
9454 memory piece, use write_memory_with_notification instead of
9455 write_memory.
9456
23f945bf
AA
94572017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
9458
9459 * valops.c (read_value_memory): Change embedded_offset to
9460 represent a bit offset instead of a byte offset.
9461 * value.h (read_value_memory): Adjust comment.
9462
f236533e
AA
94632017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
9464
9465 * dwarf2loc.c (read_pieced_value): Remove unnecessary variables
9466 dest_offset_bits and source_offset_bits.
9467 (write_pieced_value): Likewise.
9468
65d84b76
AA
94692017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
9470
9471 * dwarf2loc.c (read_pieced_value): Respect the piece offset, as
9472 given by DW_OP_bit_piece.
9473 (write_pieced_value): Likewise.
9474
242d31ab
AA
94752017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
9476
9477 * dwarf2loc.c (read_pieced_value): Move the buffer allocation and
9478 some other preparations to the places where sufficient information
9479 is available.
9480 (write_pieced_value): Likewise.
9481
03c8af18
AA
94822017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
9483
9484 * dwarf2loc.c (bits_to_bytes): New function.
9485 (read_pieced_value): Fix offset calculations for register pieces
9486 on big-endian targets.
9487 (write_pieced_value): Likewise.
9488
840989c1
AA
94892017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
9490
9491 * dwarf2loc.c (read_pieced_value): Remove buffer_size variable.
9492 (write_pieced_value): Likewise.
9493
359b19bb
AA
94942017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
9495
9496 * dwarf2loc.c (write_pieced_value): When writing to a bit-field,
9497 transfer the source value's least significant bits, instead of its
9498 lowest-addressed ones. Rename type_len to max_offset.
9499 (read_pieced_value): Mirror above changes to write_pieced_value as
9500 applicable.
9501
07c9ca3b
AA
95022017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
9503
9504 * dwarf2loc.c (write_pieced_value): In DWARF_VALUE_MEMORY,
9505 truncate full bytes from dest_offset_bits before using it as an
9506 offset into the buffer.
9507
f1cc9874
AA
95082017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
9509
9510 * dwarf2loc.c (write_pieced_value): Include transfer size in
9511 byte-wise check.
9512
cdaac320
AA
95132017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
9514
9515 * dwarf2loc.c (write_pieced_value): Fix copy/paste error in the
9516 calculation of this_size.
9517
af547a96
AA
95182017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
9519
9520 * dwarf2loc.c (read_pieced_value): Respect parent value's offset
9521 when targeting a bit-field.
9522 (write_pieced_value): Likewise.
9523
ddd7882a
AA
95242017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
9525
9526 * dwarf2loc.c (struct piece_closure) <addr_size>: Remove field.
9527 (allocate_piece_closure): Drop addr_size parameter.
9528 (dwarf2_evaluate_loc_desc_full): Adjust call to
9529 allocate_piece_closure.
9530
e9352324
AA
95312017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
9532
9533 PR gdb/21226
9534 * dwarf2loc.c (read_pieced_value): Anchor stack value pieces at
9535 the LSB end, independent of endianness.
9536
d5d1163e
AA
95372017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
9538
9539 * dwarf2loc.c (write_pieced_value): Fix order of calculations for
9540 size capping.
9541
032bb6ea
YQ
95422017-06-13 Yao Qi <yao.qi@linaro.org>
9543
9544 * mips-linux-nat.c: Move include features/mips*-linux.c to
9545 mips-linux-tdep.c.
9546 (_initialize_mips_linux_nat): Move initialize_tdesc_mips* calls
9547 to mips-linux-tdep.c.
9548 * mips-linux-tdep.c: Include features/mips*-linux.c
9549 (_initialize_mips_linux_tdep): Call initialize_tdesc_mips*
9550 functions.
9551 * mips-linux-tdep.h (tdesc_mips_linux): Declare.
9552 (tdesc_mips_dsp_linux, tdesc_mips64_linux): Declare.
9553 (tdesc_mips64_dsp_linux): Declare.
9554
f12f6bad
TT
95552017-06-12 Tom Tromey <tom@tromey.com>
9556
9557 * valprint.h (val_print_type_code_int): Remove.
9558 * valprint.c (generic_val_print_int): Always call
9559 val_print_scalar_formatted.
9560 (val_print_type_code_int): Remove.
9561 * printcmd.c (print_scalar_formatted): Handle options->format==0.
9562 * f-valprint.c (f_val_print): Use val_print_scalar_formatted.
9563 * c-valprint.c (c_val_print_int): Use val_print_scalar_formatted.
9564 * ada-valprint.c (ada_val_print_num): Use
9565 val_print_scalar_formatted.
9566
d9109c80
TT
95672017-06-12 Tom Tromey <tom@tromey.com>
9568
9569 * printcmd.c (print_scalar_formatted): Unify the two switches.
9570 Don't convert scalars to LONGEST.
9571
4ac0cb1c
TT
95722017-06-12 Tom Tromey <tom@tromey.com>
9573
9574 PR exp/16225:
9575 * valprint.h (print_decimal_chars): Update.
9576 * valprint.c (maybe_negate_by_bytes): New function.
9577 (print_decimal_chars): Add "is_signed" argument.
9578 * printcmd.c (print_scalar_formatted): Update.
9579
30a25466
TT
95802017-06-12 Tom Tromey <tom@tromey.com>
9581
9582 PR exp/16225:
9583 * valprint.h (print_binary_chars, print_hex_chars): Update.
9584 * valprint.c (val_print_type_code_int): Update.
9585 (print_binary_chars): Add "zero_pad" argument.
9586 (emit_octal_digit): New function.
9587 (print_octal_chars): Don't zero-pad.
9588 (print_decimal_chars): Likewise.
9589 (print_hex_chars): Add "zero_pad" argument.
9590 * sh64-tdep.c (sh64_do_fp_register): Update.
9591 * regcache.c (regcache::dump): Update.
9592 * printcmd.c (print_scalar_formatted): Update.
9593 * infcmd.c (default_print_one_register_info): Update.
9594
b3464d03
PA
95952017-06-12 Pedro Alves <palves@redhat.com>
9596 Alan Hayward <alan.hayward@arm.com>
9597
9598 * mips-tdep.c (MAX_MIPS_ABI_REGSIZE): New.
9599 (mips_eabi_push_dummy_call): Rename local 'regsize' to
9600 'abi_regsize'. Rename local array 'valbuf' to 'ref_valbuf', and
9601 use MAX_MIPS_ABI_REGSIZE instead of MAX_REGISTER_SIZE to size it.
9602 Assert that abi_regsize bytes fit in 'ref_valbuf'.
9603
4b76cda9
PA
96042017-06-12 Pedro Alves <palves@redhat.com>
9605
9606 * dwarf2read.c (mapped_symtab::data): Now a vector of
9607 symtab_index_entry instead of vector of
9608 std::unique_ptr<symtab_index_entry>. All users adjusted to check
9609 whether an element's name is NULL instead of checking whether the
9610 element itself is NULL.
9611 (find_slot): Change return type. Adjust.
9612 (hash_expand, , add_index_entry, uniquify_cu_indices)
9613 (write_hash_table): Adjust.
9614
e8f8bcb3
PA
96152017-06-12 Pedro Alves <palves@redhat.com>
9616
9617 * dwarf2read.c (recursively_count_psymbols): New function.
9618 (write_psymtabs_to_index): Call it to compute number of psyms and
9619 pass estimate size of psyms_seen to unordered_set's ctor.
9620
70a1152b
PA
96212017-06-12 Pedro Alves <palves@redhat.com>
9622
9623 * dwarf2read.c (write_hash_table): Check if key already exists
9624 before emplacing.
9625
c2f134ac
PA
96262017-06-12 Pedro Alves <palves@redhat.com>
9627
9628 * dwarf2read.c (data_buf::append_space): Rename to...
9629 (data_buf::grow): ... this, and make private. Adjust all callers.
9630 (data_buf::append_uint): New method.
9631 (add_address_entry, write_one_signatured_type)
9632 (write_psymtabs_to_index): Use it.
9633
a81e6d4d
PA
96342017-06-12 Pedro Alves <palves@redhat.com>
9635
9636 * dwarf2read.c (file_write(FILE *, const void *, size_t)): Delete.
9637 (file_write (FILE *, const std::vector<Elem>&)): Delete.
9638 (data_buf::file_write): Call ::fwrite directly.
9639
6fd931f2
PA
96402017-06-12 Pedro Alves <palves@redhat.com>
9641
9642 * dwarf2read.c (uniquify_cu_indices): Use std::unique and
9643 std::vector::erase.
9644
bc8f2430
JK
96452017-06-12 Jan Kratochvil <jan.kratochvil@redhat.com>
9646
9647 Code cleanup: C++ify .gdb_index producer.
9648 * dwarf2read.c: Include <unordered_set> and <unordered_map>.
9649 (MAYBE_SWAP) [WORDS_BIGENDIAN]: Cast to offset_type.
9650 (struct strtab_entry, hash_strtab_entry, eq_strtab_entry)
9651 (create_strtab, add_string): Remove.
9652 (file_write, data_buf): New.
9653 (struct symtab_index_entry): Use std::vector for cu_indices.
9654 (struct mapped_symtab): Use std::vector for data.
9655 (hash_symtab_entry, eq_symtab_entry, delete_symtab_entry)
9656 (create_symbol_hash_table, create_mapped_symtab, cleanup_mapped_symtab):
9657 Remove.
9658 (find_slot): Change return type. Update it to the new data structures.
9659 (hash_expand, add_index_entry): Update it to the new data structures.
9660 (offset_type_compare): Remove.
9661 (uniquify_cu_indices): Update it to the new data structures.
9662 (c_str_view, c_str_view_hasher, vector_hasher): New.
9663 (add_indices_to_cpool): Remove.
9664 (write_hash_table): Update it to the new data structures.
9665 (struct psymtab_cu_index_map, hash_psymtab_cu_index)
9666 (eq_psymtab_cu_index): Remove.
9667 (psym_index_map): New typedef.
9668 (struct addrmap_index_data): Change addr_obstack pointer to data_buf
9669 reference and std::unordered_map for cu_index_htab.
9670 (add_address_entry, add_address_entry_worker, write_address_map)
9671 (write_psymbols): Update it to the new data structures.
9672 (write_obstack): Remove.
9673 (struct signatured_type_index_data): Change types_list to a data_buf
9674 reference and psyms_seen to a std::unordered_set reference.
9675 (write_one_signatured_type, recursively_write_psymbols)
9676 (write_psymtabs_to_index): Update it to the new data structures.
9677
c4dcb155
SM
96782017-06-11 Simon Marchi <simon.marchi@ericsson.com>
9679
9680 * NEWS (Changes since GDB 8.0): Announce {set,show} debug
9681 separate-debug-file commands.
9682 * symfile.h (separate_debug_file_debug): New global.
9683 * symfile.c (separate_debug_file_debug): New global.
9684 (separate_debug_file_exists, find_separate_debug_file): Add
9685 debug output.
9686 (_initialize_symfile): Add "set debug separate-debug-file"
9687 command.
9688 * build-id.c (build_id_to_debug_bfd,
9689 find_separate_debug_file_by_buildid): Add debug output.
9690
6d45d4b4
SM
96912017-06-10 Simon Marchi <simon.marchi@polymtl.ca>
9692
9693 * gdbarch.sh (displaced_step_free_closure): Remove.
9694 * gdbarch.h, gdbarch.c: Re-generate.
9695 * aarch64-linux-tdep.c (aarch64_linux_init_abi): Don't set
9696 displaced_step_free_closure.
9697 * amd64-linux-tdep.c (amd64_linux_init_abi_common): Likewise.
9698 * arm-linux-tdep.c (arm_linux_init_abi): Likewise.
9699 * i386-linux-tdep.c (i386_linux_init_abi): Likewise.
9700 * rs6000-aix-tdep.c (rs6000_aix_init_osabi): Likewise.
9701 * rs6000-tdep.c (rs6000_gdbarch_init): Likewise.
9702 * s390-linux-tdep.c (s390_gdbarch_init): Likewise.
9703 * arch-utils.h (simple_displaced_step_free_closure): Remove.
9704 * arch-utils.c (simple_displaced_step_free_closure): Remove.
9705 * infrun.c (displaced_step_clear): Call xfree instead of
9706 gdbarch_displaced_step_free_closure.
9707
2f91880f
SDJ
97082017-06-08 Sergio Durigan Junior <sergiodj@redhat.com>
9709
9710 * common/common-utils.c (stringify_argv): Check for "arg[0] !=
9711 NULL".
9712
b8b6e72f
AH
97132017-06-08 Alan Hayward <alan.hayward@arm.com>
9714
9715 * mn10300-tdep.c (MN10300_MAX_REGISTER_SIZE): Add.
9716 (mn10300_extract_return_value): Use MN10300_MAX_REGISTER_SIZE.
9717 (mn10300_push_dummy_call): Likewise.
9718
5369082e
AH
97192017-06-08 Alan Hayward <alan.hayward@arm.com>
9720
9721 * mi/mi-main.c (register_changed_p): Use value_contents_eq.
9722
ff4ca5ac
AH
97232017-06-08 Alan Hayward <alan.hayward@arm.com>
9724
9725 * mi/mi-main.c (register_changed_p): Use cooked_read_value.
9726
aefd8b33
SDJ
97272017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
9728
9729 * NEWS (Changes since GDB 8.0): Announce that GDBserver is now
9730 able to start inferiors using a shell.
9731 (New remote packets): Announce new packet "QStartupWithShell".
9732 * remote.c: Add PACKET_QStartupWithShell.
9733 (extended_remote_create_inferior): Handle new
9734 PACKET_QStartupWithShell.
9735 (remote_protocol_features) <QStartupWithShell>: New entry for
9736 PACKET_QStartupWithShell.
9737 (_initialize_remote): Call "add_packet_config_cmd" for
9738 QStartupShell.
9739
2090129c
SDJ
97402017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
9741 Pedro Alves <palves@redhat.com>
9742
9743 * Makefile.in (HFILES_NO_SRCDIR): Add "common/common-inferior.h"
9744 and "nat/fork-inferior.h".
9745 * common/common-inferior.h: New file, with contents from
9746 "gdb/inferior.h".
9747 * commom/common-utils.c: Include "common-utils.h".
9748 (stringify_argv): New function.
9749 * common/common-utils.h (stringify_argv): New prototype.
9750 * configure.nat: Add "fork-inferior.o" as a dependency for
9751 "*linux*", "fbsd*" and "nbsd*" hosts.
9752 * corefile.c (get_exec_file): Update comment.
9753 * darwin-nat.c (darwin_ptrace_him): Call "gdb_startup_inferior"
9754 instead of "startup_inferior".
9755 (darwin_create_inferior): Call "add_thread_silent" after
9756 "fork_inferior".
9757 * fork-child.c: Cleanup unnecessary includes.
9758 (SHELL_FILE): Move to "common/common-fork-child.c".
9759 (environ): Likewise.
9760 (exec_wrapper): Initialize.
9761 (get_exec_wrapper): New function.
9762 (breakup_args): Move to "common/common-fork-child.c"; rename to
9763 "breakup_args_for_exec".
9764 (escape_bang_in_quoted_argument): Move to
9765 "common/common-fork-child.c".
9766 (saved_ui): New variable.
9767 (prefork_hook): New function.
9768 (postfork_hook): Likewise.
9769 (postfork_child_hook): Likewise.
9770 (gdb_startup_inferior): Likewise.
9771 (fork_inferior): Move to "common/common-fork-child.c". Update
9772 function to support gdbserver.
9773 (startup_inferior): Likewise.
9774 * gdbcore.h (get_exec_file): Remove declaration.
9775 * gnu-nat.c (gnu_create_inferior): Call "gdb_startup_inferior"
9776 instead of "startup_inferior". Call "add_thread_silent" after
9777 "fork_inferior".
9778 * inf-ptrace.c: Include "nat/fork-inferior.h" and "utils.h".
9779 (inf_ptrace_create_inferior): Call "gdb_startup_inferior"
9780 instead of "startup_inferior". Call "add_thread_silent" after
9781 "fork_inferior".
9782 * inferior.h: Include "common-inferior.h".
9783 (trace_start_error): Move to "common/common-utils.h".
9784 (trace_start_error_with_name): Likewise.
9785 (fork_inferior): Move prototype to "nat/fork-inferior.h".
9786 (startup_inferior): Likewise.
9787 (gdb_startup_inferior): New prototype.
9788 * nat/fork-inferior.c: New file, with contents from "fork-child.c".
9789 * nat/fork-inferior.h: New file.
9790 * procfs.c (procfs_init_inferior): Call "gdb_startup_inferior"
9791 instead of "startup_inferior". Call "add_thread_silent" after
9792 "fork_inferior".
9793 * target.h (target_terminal_init): Move prototype to
9794 "target/target.h".
9795 (target_terminal_inferior): Likewise.
9796 (target_terminal_ours): Likewise.
9797 * target/target.h (target_terminal_init): New prototype, moved
9798 from "target.h".
9799 (target_terminal_inferior): Likewise.
9800 (target_terminal_ours): Likewise.
9801 * utils.c (gdb_flush_out_err): New function.
9802
043a4934
SDJ
98032017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
9804
9805 * Makefile.in (HFILES_NO_SRCDIR): Add "common/common-gdbthread.h".
9806 * common/common-gdbthread.h: New file, with parts from
9807 "gdb/gdbthread.h".
9808 * gdbthread.h: Include "common-gdbthread.h".
9809 (switch_to_thread): Moved to "common/common-gdbthread.h".
9810
15652511
SDJ
98112017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
9812
9813 * Makefile.in (SFILES): Add "common/job-control.c".
9814 (HFILES_NO_SRCDIR): Add "common/job-control.h".
9815 (COMMON_OBS): Add "job-control.o".
9816 * common/job-control.c: New file, with contents from
9817 "gdb/inflow.c".
9818 * common/job-control.h: New file, with contents from "terminal.h".
9819 * fork-child.c: Include "job-control.h".
9820 * inflow.c: Include "job-control.h".
9821 (gdb_setpgid): Move to "common/common-inflow.c".
9822 (_initialize_inflow): Move setting of "job_control" to
9823 "handle_job_control".
9824 * terminal.h (job_control): Moved to "common/common-terminal.h".
9825 (gdb_setpgid): Likewise.
9826 * top.c: Include "job_control.h".
9827 * utils.c: Likewise.
9828 (job_control): Moved to "job-control.c".
9829
2d7cc5c7
PA
98302017-06-07 Pedro Alves <palves@redhat.com>
9831
9832 * Makefile.in (SFILES): Add gdb_regex.c.
9833 (COMMON_OBS): Add gdb_regex.o.
9834 * ada-lang.c (ada_add_standard_exceptions)
9835 (ada_add_exceptions_from_frame, name_matches_regex)
9836 (ada_add_global_exceptions, ada_exceptions_list_1): Change regex
9837 parameter type to compiled_regex. Adjust.
9838 (ada_exceptions_list): Use compiled_regex.
9839 * break-catch-throw.c (exception_catchpoint::pattern): Now a
9840 std::unique_ptr<compiled_regex>.
9841 (exception_catchpoint::~exception_catchpoint): Remove regfree
9842 call.
9843 (check_status_exception_catchpoint): Adjust to use compiled_regex.
9844 (handle_gnu_v3_exceptions): Adjust to use compiled_regex.
9845 * breakpoint.c (solib_catchpoint::compiled): Now a
9846 std::unique_ptr<compiled_regex>.
9847 (solib_catchpoint::~solib_catchpoint): Remove regfree call.
9848 (check_status_catch_solib): Adjust to use compiled_regex.
9849 (add_solib_catchpoint): Adjust to use compiled_regex.
9850 * cli/cli-cmds.c (apropos_command): Use compiled_regex.
9851 * cli/cli-decode.c (apropos_cmd): Change regex parameter to
9852 compiled_regex reference. Adjust to use it.
9853 * cli/cli-decode.h: Remove struct re_pattern_buffer forward
9854 declaration. Include "gdb_regex.h".
9855 (apropos_cmd): Change regex parameter to compiled_regex reference.
9856 * gdb_regex.c: New file.
9857 * gdb_regex.h (make_regfree_cleanup, get_regcomp_error): Delete
9858 declarations.
9859 (class compiled_regex): New.
9860 * linux-tdep.c: Include "common/gdb_optional.h".
9861 (struct mapping_regexes): New, factored out from
9862 mapping_is_anonymous_p, and adjusted to use compiled_regex.
9863 (mapping_is_anonymous_p): Use mapping_regexes wrapped in a
9864 gdb::optional and remove cleanups. Adjust to compiled_regex.
9865 * probe.c: Include "common/gdb_optional.h".
9866 (collect_probes): Use compiled_regex and gdb::optional and remove
9867 cleanups.
9868 * skip.c: Include "common/gdb_optional.h".
9869 (skiplist_entry::compiled_function_regexp): Now a
9870 gdb::optional<compiled_regex>.
9871 (skiplist_entry::compiled_function_regexp_is_valid): Delete field.
9872 (free_skiplist_entry): Remove regfree call.
9873 (compile_skip_regexp, skip_rfunction_p): Adjust to use
9874 compiled_regex and gdb::optional.
9875 * symtab.c: Include "common/gdb_optional.h".
9876 (search_symbols): Use compiled_regex and gdb::optional.
9877 * utils.c (do_regfree_cleanup, make_regfree_cleanup)
9878 (get_regcomp_error, compile_rx_or_error): Delete. Some bits moved
9879 to gdb_regex.c.
9880
50d6adef
AH
98812017-06-07 Alan Hayward <alan.hayward@arm.com>
9882
9883 * regcache.c (regcache::save): Avoid buffer use.
9884 (regcache::dump): Likewise.
9885
4a8a33c8
AH
98862017-06-07 Alan Hayward <alan.hayward@arm.com>
9887
9888 * sh-tdep.c (sh_pseudo_register_read): Remove
9889 MAX_REGISTER_SIZE.
9890 (sh_pseudo_register_write): Likewise.
9891 * sh64-tdep.c (sh64_pseudo_register_read): Likewise.
9892 (sh64_pseudo_register_write): Likewise
9893
d1be909e
AH
98942017-06-07 Alan Hayward <alan.hayward@arm.com>
9895
9896 * aarch64-tdep.c (aarch64_store_return_value): Use
9897 V_REGISTER_SIZE.
9898 (aarch64_pseudo_read_value): Likewise.
9899 (aarch64_pseudo_write): Likewise.
9900
f4a65042
YQ
99012017-06-06 Yao Qi <yao.qi@linaro.org>
9902
9903 * regformats/regdef.h (set_register_cache): Remove the
9904 declaration.
9905
9f7fb0aa
AH
99062017-06-06 Alan Hayward <alan.hayward@arm.com>
9907
9908 * frame.c (frame_unwind_register_signed): Use
9909 frame_unwind_register_value.
9910
e1e01040
PA
99112017-06-06 Pedro Alves <palves@redhat.com>
9912
9913 PR breakpoints/21553
9914 * breakpoint.c (create_breakpoints_sal_default)
9915 (init_breakpoint_sal, create_breakpoint_sal): Use
9916 gdb::unique_xmalloc_ptr for string parameters.
9917 (create_breakpoint): Constify 'extra_string' and 'cond_string'
9918 parameters. Replace cleanups with gdb::unique_xmalloc_ptr.
9919 (base_breakpoint_create_breakpoints_sal)
9920 (bkpt_create_breakpoints_sal, tracepoint_create_breakpoints_sal)
9921 (strace_marker_create_breakpoints_sal)
9922 (create_breakpoints_sal_default): Use gdb::unique_xmalloc_ptr for
9923 string parameters.
9924 * breakpoint.h (breakpoint_ops::create_breakpoints_sal): Use
9925 gdb::unique_xmalloc_ptr for string parameters.
9926 (create_breakpoint): Constify 'extra_string' and 'cond_string'
9927 parameters.
9928
fbe654c8
AH
99292017-06-06 Alan Hayward <alan.hayward@arm.com>
9930
9931 * alpha-tdep.c (alpha_register_to_value): Use
9932 get_frame_register_value.
9933 (alpha_value_to_register): Use ALPHA_REGISTER_SIZE.
9934
ae0d01d6
AH
99352017-06-06 Alan Hayward <alan.hayward@arm.com>
9936
9937 * ia64-tdep.c (IA64_MAX_FP_REGISTER_SIZE) Add.
9938 (ia64_register_to_value): Use IA64_MAX_FP_REGISTER_SIZE.
9939 (ia64_value_to_register): Likewise.
9940 (ia64_extract_return_value): Likewise.
9941 (ia64_store_return_value): Likewise.
9942 (ia64_push_dummy_call): Likewise.
9943
49cf576c
JB
99442017-06-04 Joel Brobecker <brobecker@adacore.com>
9945
9946 GDB 8.0 released.
9947
26b6a6ab
SM
99482017-06-03 Simon Marchi <simon.marchi@ericsson.com>
9949
9950 * x86-linux-nat.c (struct arch_lwp_info): Remove.
9951
22827c51
SM
99522017-06-03 Simon Marchi <simon.marchi@polymtl.ca>
9953
9954 * linux-nat.c (linux_nat_post_attach_wait): Remove FIRST
9955 parameter.
9956 (linux_nat_attach): Adjust call to linux_nat_post_attach_wait.
9957
0e05cf3a
SM
99582017-06-02 Simon Marchi <simon.marchi@ericsson.com>
9959
9960 * event-loop.c (poll_timers): Unallocate timer using delete
9961 instead of xfree.
9962
c1fc2657
SM
99632017-06-02 Simon Marchi <simon.marchi@polymtl.ca>
9964
9965 * breakpoint.h (struct breakpoint_ops) <dtor>: Remove.
9966 (struct breakpoint) <~breakpoint>: New.
9967 (struct watchpoint): Inherit from breakpoint.
9968 <~watchpoint>: New.
9969 <base>: Remove.
9970 (struct tracepoint): Inherit from breakpoint.
9971 <base>: Remove.
9972 * breakpoint.c (longjmp_breakpoint_ops): Remove.
9973 (struct longjmp_breakpoint): Inherit from breakpoint.
9974 <~longjmp_breakpoint>: New.
9975 <base>: Remove.
9976 (new_breakpoint_from_type): Remove casts.
9977 (watchpoint_in_thread_scope): Remove reference to base field.
9978 (watchpoint_del_at_next_stop): Likewise.
9979 (update_watchpoint): Likewise.
9980 (watchpoint_check): Likewise.
9981 (bpstat_check_watchpoint): Likewise.
9982 (set_longjmp_breakpoint): Likewise.
9983 (struct fork_catchpoint): Inherit from breakpoint.
9984 <base>: Remove.
9985 (struct solib_catchpoint): Inherit from breakpoint.
9986 <~solib_catchpoint>: New.
9987 <base>: Remove.
9988 (dtor_catch_solib): Change to ...
9989 (solib_catchpoint::~solib_catchpoint): ... this.
9990 (breakpoint_hit_catch_solib): Remove reference to base field.
9991 (add_solib_catchpoint): Likewise.
9992 (create_fork_vfork_event_catchpoint): Likewise.
9993 (struct exec_catchpoint): Inherit from breakpoint.
9994 <~exec_catchpoint>: New.
9995 <base>: Remove.
9996 (dtor_catch_exec): Change to ...
9997 (exec_catchpoint::~exec_catchpoint): ... this.
9998 (dtor_watchpoint): Change to ...
9999 (watchpoint::~watchpoint): ... this.
10000 (watch_command_1): Remove reference to base field.
10001 (catch_exec_command_1): Likewise.
10002 (base_breakpoint_dtor): Change to ...
10003 (breakpoint::~breakpoint): ... this.
10004 (base_breakpoint_ops): Remove dtor field value.
10005 (longjmp_bkpt_dtor): Change to ...
10006 (longjmp_breakpoint::~longjmp_breakpoint): ... this.
10007 (strace_marker_create_breakpoints_sal): Remove reference to base
10008 field.
10009 (delete_breakpoint): Don't manually call breakpoint destructor.
10010 (create_tracepoint_from_upload): Remove reference to base field.
10011 (trace_pass_set_count): Likewise.
10012 (initialize_breakpoint_ops): Don't initialize
10013 momentary_breakpoint_ops, don't set dtors.
10014 * ada-lang.c (struct ada_catchpoint): Inherit from breakpoint.
10015 <~ada_catchpoint>: New.
10016 <base>: Remove.
10017 (create_excep_cond_exprs): Remove reference to base field.
10018 (dtor_exception): Change to ...
10019 (ada_catchpoint::~ada_catchpoint): ... this.
10020 (dtor_catch_exception): Remove.
10021 (dtor_catch_exception_unhandled): Remove.
10022 (dtor_catch_assert): Remove.
10023 (create_ada_exception_catchpoint): Remove reference to base
10024 field.
10025 (initialize_ada_catchpoint_ops): Don't set dtors.
10026 * break-catch-sig.c (struct signal_catchpoint): Inherit from
10027 breakpoint.
10028 <~signal_catchpoint>: New.
10029 <base>: Remove.
10030 (signal_catchpoint_dtor): Change to ...
10031 (signal_catchpoint::~signal_catchpoint): ... this.
10032 (create_signal_catchpoint): Remove reference to base field.
10033 (initialize_signal_catchpoint_ops): Don't set dtor.
10034 * break-catch-syscall.c (struct syscall_catchpoint): Inherit
10035 from breakpoint.
10036 <~syscall_catchpoint>: New.
10037 <base>: Remove.
10038 (dtor_catch_syscall): Change to ...
10039 (syscall_catchpoint::~syscall_catchpoint): ... this.
10040 (create_syscall_event_catchpoint): Remove reference to base
10041 field.
10042 (initialize_syscall_catchpoint_ops): Don't set dtor.
10043 * break-catch-throw.c (struct exception_catchpoint): Inherit
10044 from breakpoint.
10045 <~exception_catchpoint>: New.
10046 <base>: Remove.
10047 (dtor_exception_catchpoint): Change to ...
10048 (exception_catchpoint::~exception_catchpoint): ... this.
10049 (handle_gnu_v3_exceptions): Remove reference to base field.
10050 (initialize_throw_catchpoint_ops): Don't set dtor.
10051 * ctf.c (ctf_get_traceframe_address): Remove reference to base
10052 field.
10053 * remote.c (remote_get_tracepoint_status): Likewise.
10054 * tracefile-tfile.c (tfile_get_traceframe_address): Likewise.
10055 * tracefile.c (tracefile_fetch_registers): Likewise.
10056 * tracepoint.c (actions_command): Likewise.
10057 (validate_actionline): Likewise.
10058 (tfind_1): Likewise.
10059 (get_traceframe_location): Likewise.
10060 (find_matching_tracepoint_location): Likewise.
10061 (parse_tracepoint_status): Likewise.
10062 * mi/mi-cmd-break.c (mi_cmd_break_passcount): Likewise.
10063
3b0871f4
SM
100642017-06-02 Simon Marchi <simon.marchi@polymtl.ca>
10065
10066 * breakpoint.c (struct longjmp_breakpoint): New struct.
10067 (is_tracepoint_type): Change return type to bool.
10068 (is_longjmp_type): New function.
10069 (new_breakpoint_from_type): Handle longjmp kinds of breakpoints.
10070 (set_raw_breakpoint_without_location): Use
10071 new_breakpoint_from_type.
10072 (set_raw_breakpoint): Likewise.
10073
a5e364af
SM
100742017-06-02 Simon Marchi <simon.marchi@polymtl.ca>
10075
10076 * breakpoint.c (new_breakpoint_from_type): New function.
10077 (create_breakpoint_sal): Use new_breakpoint_from_type and
10078 unique_ptr.
10079 (create_breakpoint): Likewise.
10080
ae3b3f34
SM
100812017-05-31 Simon Marchi <simon.marchi@ericsson.com>
10082
10083 * memattr.c (mem_info_command): Rename to ...
10084 (info_mem_command): ... this.
10085 (mem_enable_command): Rename to ...
10086 (enable_mem_command): ... this.
10087 (mem_disable_command): Rename to ...
10088 (disable_mem_command): ... this.
10089 (mem_delete_command): Rename to ...
10090 (delete_mem_command): ... this.
10091 (_initialize_mem): Adjust function names.
10092
13ace077
MM
100932017-05-31 Markus Metzger <markus.t.metzger@intel.com>
10094
10095 * btrace.c (handle_pt_insn_events): New.
10096 (ftrace_add_pt): Call handle_pt_insn_events. Rename ERRCODE into
10097 STATUS. Split into this and ...
10098 (handle_pt_insn_event_flags): ... this.
10099
c56ccc05
MM
101002017-05-31 Markus Metzger <markus.t.metzger@intel.com>
10101
10102 * configure.ac: Check for pt_insn_event, struct pt_insn.enabled,
10103 and struct pt_insn.resynced.
10104 * configure: Regenerated.
10105 * config.in: Regenerated.
10106
08c3f6d2
TW
101072017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
10108
10109 * btrace.c (ftrace_find_call_by_number): New function.
10110 (ftrace_new_function): Store objects, not pointers.
10111 (ftrace_find_call_by_number, ftrace_new_return, ftrace_new_switch,
10112 ftrace_new_gap, ftrace_update_function,
10113 ftrace_compute_global_level_offset, btrace_stich_bts, btrace_clear,
10114 btrace_insn_get, btrace_insn_get_error, btrace_insn_end,
10115 btrace_insn_next, btrace_insn_prev, ptrace_find_insn_by_number,
10116 btrace_ends_with_single_insn, btrace_call_get): Account for
10117 btrace_thread_info::functions now storing objects.
10118 * btrace.h (struct btrace_thread_info): Add constructor.
10119 (struct btrace_thread_info) <functions>: Make std::vector.
10120 (struct btrace_thread_info) <prev, next, up, insn, errcode, flags):
10121 Initialize with default values.
10122 * record-btrace.c (record_btrace_frame_sniffer): Account for
10123 btrace_thread_info::functions now storing objects.
10124
8ffd39f2
TW
101252017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
10126
10127 * btrace.c: Remove typedef bfun_s.
10128 (ftrace_new_gap): Directly add gaps to the list of gaps.
10129 (btrace_bridge_gaps, btrace_compute_ftrace_bts, pt_btrace_insn_flags,
10130 ftrace_add_pt, btrace_compute_ftrace_pt, btrace_compute_ftrace_1,
10131 btrace_finalize_ftrace, btrace_compute_ftrace): Use std::vector
10132 instead of gdb VEC.
10133
4aeb0dfc
TW
101342017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
10135
10136 * btrace.c (ftrace_fixup_caller, ftrace_new_return, ftrace_connect_bfun,
10137 ftrace_bridge_gap): Replace references to btrace_thread_info::segment
10138 with btrace_thread_info::next_segment and
10139 btrace_thread_info::prev_segment.
10140 * btrace.h: Remove struct btrace_func_link.
10141 (struct btrace_function): Replace pair of function segment pointers
10142 with pair of indices.
10143 * python/py-record-btrace.c (btpy_call_prev_sibling,
10144 btpy_call_next_sibling): Replace references to
10145 btrace_thread_info::segment with btrace_thread_info::next_segment and
10146 btrace_thread_info::prev_segment.
10147 * record-btrace.c (record_btrace_frame_this_id): Use
10148 btrace_find_call_by_number.
10149
eb8f2b9c
TW
101502017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
10151
10152 * btrace.c (ftrace_new_function, ftrace_fixup_level,
10153 ftrace_connect_bfun, ftrace_bridge_gap, btrace_bridge_gaps,
10154 btrace_insn_next, btrace_insn_prev): Remove references to
10155 btrace_thread_info::flow.
10156 * btrace.h (struct btrace_function): Remove FLOW.
10157
42bfe59e
TW
101582017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
10159
10160 * btrace.c (ftrace_find_call_by_number): New function.
10161 (ftrace_update_caller, ftrace_new_call, ftrace_new_tailcall,
10162 ftrace_get_caller, ftrace_find_call, ftrace_new_return,
10163 ftrace_match_backtrace, ftrace_connect_bfun, ftrace_connect_backtrace,
10164 ftrace_bridge_gap, btrace_bridge_gaps): Use btrace_function::up as an
10165 index.
10166 * btrace.h (struct btrace_function): Turn UP into an index.
10167 * python/py-record-btrace.c (btpy_call_up): Use btrace_function::up
10168 as an index.
10169 * record-btrace.c (record_btrace_frame_unwind_stop_reason,
10170 record_btrace_frame_prev_register, record_btrace_frame_sniffer,
10171 record_btrace_tailcall_frame_sniffe): Use btrace_find_call_by_number.
10172
b54b03bd
TW
101732017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
10174
10175 * btrace.c (ftrace_new_function, ftrace_new_call, ftrace_new_tailcall,
10176 ftrace_new_return, ftrace_new_switch, ftrace_new_gap,
10177 ftrace_update_function, ftrace_compute_global_level_offset,
10178 btrace_compute_ftrace_bts, ftrace_add_pt, btrace_compute_ftrace_pt,
10179 btrace_stitch_bts, btrace_fetch, btrace_clear, btrace_insn_number,
10180 btrace_insn_end, btrace_is_empty): Remove references to
10181 btrace_thread_info::begin and btrace_thread_info::end.
10182 * btrace.h (struct btrace_thread_info): Remove BEGIN and END.
10183 (struct btrace_thread_info) <functions>: Adjust comment.
10184 * record-btrace.c (record_btrace_start_replaying): Remove reference to
10185 btrace_thread_info::begin.
10186
8286623c
TW
101872017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
10188
10189 * btrace.c (ftrace_new_function, ftrace_new_call, ftrace_new_tailcall,
10190 ftrace_new_return, ftrace_new_switch, ftrace_new_gap,
10191 ftrace_update_function): Remove arguments that implicitly were always
10192 BTINFO->END.
10193 (btrace_compute_ftrace_bts, ftrace_add_pt, btrace_compute_ftrace_pt):
10194 Don't pass BTINFO->END.
10195
a0f1b963
TW
101962017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
10197
10198 * btrace.c: (btrace_insn_get, btrace_insn_get_error, btrace_insn_number,
10199 btrace_insn_begin, btrace_insn_end, btrace_insn_next, btrace_insn_prev,
10200 btrace_find_insn_by_number): Replace function segment pointer with
10201 index.
10202 (btrace_insn_cmp): Simplify.
10203 * btrace.h: (struct btrace_insn_iterator) Rename index to
10204 insn_index. Replace function segment pointer with index into function
10205 segment vector.
10206 * record-btrace.c (record_btrace_call_history): Replace function
10207 segment pointer use with index.
10208 (record_btrace_frame_sniffer): Retrieve function call segment through
10209 vector.
10210 (record_btrace_set_replay): Remove defunc't safety check.
10211
f158f208
TW
102122017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
10213
10214 * btrace.c (btrace_ends_with_single_insn): New function.
10215 (btrace_call_get, btrace_call_number, btrace_call_begin,
10216 btrace_call_end, btrace_call_next, btrace_call_prev,
10217 btrace_find_call_by_number): Use index into call segment vector
10218 instead of pointer.
10219 (btrace_call_cmp): Simplify.
10220 * btrace.h (struct btrace_call_iterator): Replace function call segment
10221 pointer with index into vector.
10222 * record-btrace.c (record_btrace_call_history): Use index instead of
10223 pointer.
10224
521103fd
TW
102252017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
10226
10227 * btrace.c (btrace_insn_begin, btrace_insn_end,
10228 btrace_find_insn_by_number): Add btinfo to iterator.
10229 * btrace.h (struct btrace_insn_iterator): Add btinfo.
10230
17b89b34
TW
102312017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
10232
10233 * btrace.c (ftrace_new_function): Add btrace_thread_info to arguments
10234 and save pointers directly.
10235 (ftrace_new_call, ftrace_new_tailcall, ftrace_new_return,
10236 ftrace_new_switch, ftrace_new_gap, ftrace_update_function,
10237 ftrace_add_pt): Add btrace_thread_info to arguments. Adjust for
10238 changed signature of functions.
10239 (btrace_compute_ftrace_pt): Adjust for changed signature of functions.
10240 (btrace_fetch): Remove code that adds btrace_function pointers to
10241 vector of btrace_functions.
10242 (btrace_clear): Simplify freeing vector of btrace_functions.
10243
2b51eddc
TW
102442017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
10245
10246 * btrace.c (btrace_fetch, btrace_clear, btrace_find_insn_by_number):
10247 Replace VEC_* with std::vector functions.
10248 * btrace.h: Add include: vector. Remove typedef for DEF_VEC_P.
10249 (struct btrace_thread_info)<functions>: Change type to std::vector.
10250
db6be0d5
SM
102512017-05-30 Simon Marchi <simon.marchi@ericsson.com>
10252
10253 * NEWS (Changes in GDB 8.0): Remove extra empty line. Move
10254 "Removed targets and native configurations" up. Merge duplicate
10255 "New commands" sub-sections. Add "New options" sub-sections.
10256
b057297a
AH
102572017-05-26 Alan Hayward <alan.hayward@arm.com>
10258
10259 * defs.h (copy_integer_to_size): New declaration.
10260 * findvar.c (copy_integer_to_size): New function.
10261 (do_cint_test): New selftest function.
10262 (copy_integer_to_size_test): Likewise.
10263 (_initialize_findvar): Likewise.
10264 * mips-fbsd-tdep.c (mips_fbsd_supply_reg): Use raw_supply_integer.
10265 (mips_fbsd_collect_reg): Use raw_collect_integer.
10266 * mips-linux-tdep.c (supply_32bit_reg): Use raw_supply_integer.
10267 (mips64_fill_gregset): Use raw_collect_integer
10268 (mips64_fill_fpregset): Use raw_supply_integer.
10269 * regcache.c (regcache::raw_supply_integer): New function.
10270 (regcache::raw_collect_integer): Likewise.
10271 * regcache.h: (regcache::raw_supply_integer): New declaration.
10272 (regcache::raw_collect_integer): Likewise.
10273
b77b02a5
YQ
102742017-05-24 Yao Qi <yao.qi@linaro.org>
10275
10276 * Makefile.in (SFILES): Add gdbarch-selftests.c.
10277 (COMMON_OBS): Add gdbarch-selftests.o.
10278 * frame.c [GDB_SELF_TESTS] (create_new_frame): New function.
10279 * frame.h [GDB_SELF_TESTS] (create_new_frame): Declare.
10280 * gdbarch-selftests.c: New file.
10281 * regcache.h (regcache) <~regcache>: Mark it virtual if
10282 GDB_SELF_TEST.
10283 <raw_write>: Likewise.
10284
e521e87e
YQ
102852017-05-24 Yao Qi <yao.qi@linaro.org>
10286
10287 * regcache.c (current_regcache): Change it to
10288 regcache::current_regcache.
10289 (regcache_observer_target_changed): Update.
10290 (regcache_thread_ptid_changed): Make it a regcache static
10291 method.
10292 (regcache_thread_ptid_changed): Update.
10293 (class regcache_access): New.
10294 (current_regcache_test): Update.
10295 (_initialize_regcache): Update.
10296 * regcache.h: Include forward_list.
10297 (regcache): Declare regcache_thread_ptid_changed and declare
10298 registers_changed_ptid as friend.
10299
d8e07dda
YQ
103002017-05-24 Yao Qi <yao.qi@linaro.org>
10301
10302 * i387-tdep.c (i387_register_to_value): Use register_size
10303 instead of TYPE_LENGTH.
10304 * m68k-tdep.c (m68k_register_to_value): Likewise.
10305
8c8f9122
YQ
103062017-05-24 Yao Qi <yao.qi@linaro.org>
10307
10308 * i387-tdep.c (i387_convert_register_p): Return false if type
10309 code isn't TYPE_CODE_FLT.
10310
68fce50f
YQ
103112017-05-24 Yao Qi <yao.qi@linaro.org>
10312
10313 * alpha-tdep.c (alpha_convert_register_p): Return true if type
10314 length is 4.
10315 (alpha_register_to_value): Remove type length check.
10316 (alpha_value_to_register): Likewise.
10317
88954b49
YQ
103182017-05-24 Yao Qi <yao.qi@linaro.org>
10319
10320 * ia64-tdep.c (ia64_convert_register_p): Check type's code is
10321 TYPE_CODE_FLT.
10322
e3ec9b69
YQ
103232017-05-24 Yao Qi <yao.qi@linaro.org>
10324
10325 * m68k-tdep.c (m68k_convert_register_p): Check type's code is
10326 TYPE_CODE_FLT or not.
10327
cdd238da
YQ
103282017-05-24 Yao Qi <yao.qi@linaro.org>
10329
10330 * alpha-tdep.c (alpha_gdbarch_init): Use XCNEW instead of XNEW.
10331 * avr-tdep.c (avr_gdbarch_init): Likewise.
10332 * bfin-tdep.c (bfin_gdbarch_init): Likewise.
10333 * cris-tdep.c (cris_gdbarch_init): Likewise.
10334 * ft32-tdep.c (ft32_gdbarch_init): Likewise.
10335 * lm32-tdep.c (lm32_gdbarch_init): Likewise.
10336 * m32r-tdep.c (m32r_gdbarch_init): Likewise.
10337 * m68hc11-tdep.c (m68hc11_gdbarch_init): Likewise.
10338 * mep-tdep.c (mep_gdbarch_init): Likewise.
10339 * microblaze-tdep.c (microblaze_gdbarch_init): Likewise.
10340 * mips-tdep.c (mips_gdbarch_init): Likewise.
10341 * mn10300-tdep.c (mn10300_gdbarch_init): Likewise.
10342 * moxie-tdep.c (moxie_gdbarch_init): Likewise.
10343 * msp430-tdep.c (msp430_gdbarch_init): Likewise.
10344 * sh64-tdep.c (sh64_gdbarch_init): Likewise.
10345 * v850-tdep.c (v850_gdbarch_init): Likewise.
10346
7a3929c4
YQ
103472017-05-24 Yao Qi <yao.qi@linaro.org>
10348
10349 * selftest-arch.c (tests_with_arch): Call registers_changed
10350 and reinit_frame_cache.
10351 * selftest.c (run_self_tests): Likewise.
10352
f4985dba
YQ
103532017-05-24 Yao Qi <yao.qi@linaro.org>
10354
10355 * rs6000-tdep.c (gdb_print_insn_powerpc): Remove.
10356 (rs6000_gdbarch_init): Don't call set_gdbarch_print_insn.
10357
ab20fa4a
YQ
103582017-05-24 Yao Qi <yao.qi@linaro.org>
10359
10360 * rl78-tdep.c (rl78_gdbarch_init): Don't call
10361 set_gdbarch_print_insn.
10362
f532ab94
YQ
103632017-05-24 Yao Qi <yao.qi@linaro.org>
10364
10365 * h8300-tdep.c (h8300_gdbarch_init): Don't call
10366 set_gdbarch_print_insn.
10367
39503f82
YQ
103682017-05-24 Yao Qi <yao.qi@linaro.org>
10369
10370 * alpha-tdep.c (alpha_gdbarch_init): Don't call
10371 set_gdbarch_print_insn.
10372 * arc-tdep.c (arc_gdbarch_init): Likewise.
10373 * arch-utils.c: include dis-asm.h.
10374 (default_print_insn): New function.
10375 * arch-utils.h (default_print_insn): Declare.
10376 * avr-tdep.c (avr_gdbarch_init): Don't call set_gdbarch_print_insn.
10377 * bfin-tdep.c (bfin_gdbarch_init): Likewise.
10378 * cris-tdep.c (cris_delayed_get_disassembler): Remove.
10379 (cris_gdbarch_init): Don't call set_gdbarch_print_insn.
10380 * frv-tdep.c (frv_gdbarch_init): Likewise.
10381 * ft32-tdep.c (ft32_gdbarch_init): Likewise.
10382 * gdbarch.sh (print_insn): Use default_print_insn.
10383 * gdbarch.c: Regenerated.
10384 * hppa-tdep.c (hppa_gdbarch_init): Likewise.
10385 * iq2000-tdep.c (iq2000_gdbarch_init): Likewise.
10386 * lm32-tdep.c (lm32_gdbarch_init): Likewise.
10387 * m32c-tdep.c (m32c_gdbarch_init): Likewise.
10388 * m32r-tdep.c (m32r_gdbarch_init): Likewise.
10389 * m68hc11-tdep.c (gdb_print_insn_m68hc11): Remove.
10390 (m68hc11_gdbarch_init): Don't call set_gdbarch_print_insn.
10391 * m68k-tdep.c (m68k_gdbarch_init): Likewise.
10392 * m88k-tdep.c (m88k_gdbarch_init): Likewise.
10393 * microblaze-tdep.c (microblaze_gdbarch_init): Likewise.
10394 * mn10300-tdep.c (mn10300_gdbarch_init): Likewise.
10395 * moxie-tdep.c (moxie_gdbarch_init): Likewise.
10396 * msp430-tdep.c (msp430_gdbarch_init): Likewise.
10397 * mt-tdep.c (mt_gdbarch_init): Likewise.
10398 * nds32-tdep.c (nds32_gdbarch_init): Likewise.
10399 * nios2-tdep.c (nios2_print_insn): Remove.
10400 (nios2_gdbarch_init): Don't call set_gdbarch_print_insn.
10401 * rx-tdep.c (rx_gdbarch_init): Likewise.
10402 * s390-linux-tdep.c (s390_gdbarch_init): Likewise.
10403 * score-tdep.c (score_print_insn): Remove.
10404 (score_gdbarch_init): Don't call set_gdbarch_print_insn.
10405 * sh-tdep.c (sh_gdbarch_init): Likewise.
10406 * sh64-tdep.c (sh64_gdbarch_init): Likewise.
10407 * sparc-tdep.c (sparc32_gdbarch_init): Likewise.
10408 * tic6x-tdep.c (tic6x_print_insn): Remove.
10409 (tic6x_gdbarch_init): Don't call set_gdbarch_print_insn.
10410 * tilegx-tdep.c (tilegx_gdbarch_init): Likewise.
10411 * v850-tdep.c (v850_gdbarch_init): Likewise.
10412 * vax-tdep.c (vax_gdbarch_init): Likewise.
10413 * xstormy16-tdep.c (xstormy16_gdbarch_init): Likewise.
10414 * xtensa-tdep.c (xtensa_gdbarch_init): Likewise.
10415
f7241d4f
JB
104162017-05-23 John Baldwin <jhb@FreeBSD.org>
10417
10418 * mips-fbsd-tdep.c (MIPS_PC_REGNUM): Remove.
10419 (MIPS_FP0_REGNUM): Remove.
10420 (MIPS_FSR_REGNUM): Remove.
10421 (mips_fbsd_supply_fpregs): Use mips_regnum.
10422 (mips_fbsd_supply_gregs): Likewise.
10423 (mips_fbsd_collect_fpregs): Likewise.
10424 (mips_fbsd_collect_gregs): Likewise.
10425
d489d81d
JB
104262017-05-23 John Baldwin <jhb@FreeBSD.org>
10427
10428 * mips-fbsd-nat.c (getregs_supplies): Fix upper bound comparison.
10429 (getpfpregs_supplies): New function.
10430 (mips_fbsd_fetch_inferior_registers): Remove early exit and use
10431 getfpregs_supplies.
10432 (mips_fbsd_store_inferior_registers): Likewise.
10433
e11b3cdc
PA
104342017-05-22 Pedro Alves <palves@redhat.com>
10435
10436 * MAINTAINERS (Host/Native): Add John Baldwin as FreeBSD
10437 maintainer.
10438
0f068fb5
AH
104392017-05-22 Alan Hayward <alan.hayward@arm.com>
10440
10441 * ppc-linux-nat.c (fetch_register): Use PPC_MAX_REGISTER_SIZE.
10442 (store_register): Likewise.
10443 * ppc-sysv-tdep.c (ppc_sysv_abi_push_dummy_call): Likewise.
10444 (get_decimal_float_return_value): Likewise.
10445 (do_ppc_sysv_return_value): Likewise.
10446 (ppc64_sysv_abi_push_integer): Likewise.
10447 (ppc64_sysv_abi_push_freg): Likewise.
10448 (ppc64_sysv_abi_return_value_base): Likewise.
10449 (ppc64_sysv_abi_return_value): Likewise.
10450 * rs6000-aix-tdep.c (rs6000_push_dummy_call): Likewise.
10451 * rs6000-lynx178-tdep.c (rs6000_lynx178_push_dummy_call): Likewise.
10452 * rs6000-nat.c: Likewise.
10453 * rs6000-tdep.c (rs6000_register_to_value): Likewise.
10454 (rs6000_value_to_register): Likewise.
10455 * ppc-tdep.h (PPC_MAX_REGISTER_SIZE): Add.
10456
e6cf65f2
TT
104572017-05-21 Tom Tromey <tom@tromey.com>
10458
10459 PR rust/21466:
10460 * rust-lang.c (rust_print_type) <TYPE_CODE_ARRAY>: Print unsized
10461 arrays as "[T]", not "[T; ]".
10462
43cc5389
TT
104632017-05-19 Tom Tromey <tom@tromey.com>
10464
10465 PR rust/21484:
10466 * rust-lang.c (exp_descriptor_rust): New function.
10467 (rust_language_defn): Use it.
10468 * p-lang.c (pascal_language_defn): Update.
10469 * opencl-lang.c (opencl_language_defn): Update.
10470 * objc-lang.c (objc_language_defn): Update.
10471 * m2-lang.c (m2_language_defn): Update.
10472 * language.h (struct language_defn)
10473 <la_watch_location_expression>: New member.
10474 * language.c (unknown_language_defn, auto_language_defn)
10475 (local_language_defn): Update.
10476 * go-lang.c (go_language_defn): Update.
10477 * f-lang.c (f_language_defn): Update.
10478 * d-lang.c (d_language_defn): Update.
10479 * c-lang.h (c_watch_location_expression): Declare.
10480 * c-lang.c (c_watch_location_expression): New function.
10481 (c_language_defn, cplus_language_defn, asm_language_defn)
10482 (minimal_language_defn): Use it.
10483 * breakpoint.c (watch_command_1): Call
10484 la_watch_location_expression.
10485 * ada-lang.c (ada_language_defn): Update.
10486
7a6e7fcc
RO
104872017-05-19 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
10488
6e7e1744
RO
10489 PR tui/21482
10490 * gdb_curses.h (NOMACROS): Define.
10491 (NCURSES_NOMACROS): Define.
10492
104932017-05-19 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
10494
10495 PR tui/21482
7a6e7fcc
RO
10496 * tui/tui-windata.c (tui_erase_data_content): Cast last mvwaddstr
10497 arg to char *.
10498 * tui/tui-wingeneral.c (box_win): Likewise.
10499 * tui/tui-winsource.c (tui_erase_source_content): Likewise.
10500 (tui_show_source_line): Likewise.
10501 (tui_show_exec_info_content): Likewise.
10502
1933fd8e
VM
105032017-05-19 Vladimir Mezentsev <vladimir.mezentsev@oracle.com>
10504
10505 * sparc-tdep.c (sparc_structure_return_p)
10506 (sparc_arg_on_registers_p): New functions.
10507 (sparc32_store_arguments): Use them.
10508 * sparc64-tdep.c (sparc64_16_byte_align_p)
10509 (sparc64_store_floating_fields, sparc64_extract_floating_fields):
10510 Handle TYPE_CODE_ARRAY.
10511
21873064
YQ
105122017-05-17 Yao Qi <yao.qi@linaro.org>
10513
10514 * cli/cli-decode.c (add_alias_cmd): New function.
10515 * command.h (add_alias_cmd): Declare.
10516 * infcmd.c (_initialize_infcmd): Don't call add_com_alias,
10517 instead call add_alias_cmd.
10518
2b351b19
PA
105192017-05-17 Pedro Alves <palves@redhat.com>
10520
10521 * Makefile.in (nat_extra_makefile_frag): Rename to ...
10522 (nat_makefile_frag): ... this. All references updated.
10523 * configure.ac: Likewise.
10524 * configure.nat: Likewise. Enhance comments.
10525 * configure: Regenerate.
10526
5f2ad7a3
RO
105272017-05-15 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
10528
10529 * procfs.c (procfs_create_inferior): Change prototype to match
10530 definition.
10531
adf3dde5
EZ
105322017-05-13 Eli Zaretskii <eliz@gnu.org>
10533
10534 * tui/tui.c (tui_enable): Cast "unknown" to 'char *' to avoid a
10535 C++ compiler warning.
10536
6830f270
TT
105372017-05-12 Tom Tromey <tom@tromey.com>
10538
10539 PR rust/21483:
10540 * rust-lang.c (rust_evaluate_subexp) <STRUCTOP_STRUCT>: Don't
10541 recurse, just call value_struct_elt directly.
10542
68f2f2e3
TT
105432017-05-12 Tom Tromey <tom@tromey.com>
10544
10545 * rust-lang.c (rust_dump_subexp_body) <STRUCTOP_ANONYMOUS,
10546 OP_RUST_ARRAY>: Fix.
10547
256afbc2
TT
105482017-05-12 Tom Tromey <tom@tromey.com>
10549
10550 * rust-lang.c (rust_print_subexp): Replace "return" with "break".
10551
94bb8dfe
YQ
105522017-05-09 Yao Qi <yao.qi@linaro.org>
10553
10554 * regcache.c: Include <forward_list>.
10555 (struct regcache_list): Remove.
10556 (current_regcache): Update.
10557 (get_thread_arch_aspace_regcache): Update for std::forward_list.
10558 (regcache_thread_ptid_changed): Likewise.
10559 (registers_changed_ptid): Likewise.
10560 (current_regcache_size): Likewise.
10561
8248946c
YQ
105622017-05-09 Yao Qi <yao.qi@linaro.org>
10563
10564 * regcache.c [GDB_SELF_TEST]: Include selftest.h.
10565 (current_regcache_size): New function.
10566 (current_regcache_test): New function.
10567 (_initialize_regcache) [GDB_SELF_TEST]: Register the unit test.
10568
313c5961
AH
105692017-05-08 Alan Hayward <alan.hayward@arm.com>
10570
10571 * mips-tdep.c (mips_o32_return_value): Remove unused buffer.
10572 (print_gp_register_row): Use get_frame_register_value.
10573
27bfc1d1
AH
105742017-05-08 Alan Hayward <alan.hayward@arm.com>
10575
10576 * mips-linux-tdep.c (mips_supply_gregset): Use raw_supply_zeroed.
10577 (mips_supply_fpregset): Likewise.
10578 (mips64_supply_gregset): Likewise.
10579
146e6c5c
AH
105802017-05-08 Alan Hayward <alan.hayward@arm.com>
10581
10582 * mn10300-linux-tdep.c (am33_supply_gregset_method): Use
10583 regcache->raw_supply_zeroed.
10584
e50f25ec
SDJ
105852017-05-06 Sergio Durigan Junior <sergiodj@redhat.com>
10586
10587 * configure.nat: Rearrange 'case' statements to match
10588 host before cpu.
10589
21ea5acd
SDJ
105902017-05-06 Sergio Durigan Junior <sergiodj@redhat.com>
10591
10592 * Makefile.in: Remove "@host_makefile_frag@". Add variables
10593 NAT_FILE, NATDEPFILES, NAT_CDEPS, LOADLIBES, MH_CFLAGS, XM_CLIBS,
10594 NAT_GENERATED_FILES, HAVE_NATIVE_GCORE_HOST. Add
10595 "@nat_extra_makefile_frag@".
10596 (Makefile): Remove dependency on "@frags@".
10597 ($(GNULIB_BUILDDIR)/Makefile): Likewise.
10598 (data-directory/Makefile): Likewise.
10599 * config/aarch64/linux.mh: Deleted; moved contents to
10600 "gdb/configure.nat".
10601 * config/alpha/alpha-linux.mh: Likewise.
10602 * config/alpha/nbsd.mh: Likewise.
10603 * config/arm/linux.mh: Likewise.
10604 * config/arm/nbsdelf.mh: Likewise.
10605 * config/i386/cygwin.mh: Likewise.
10606 * config/i386/cygwin64.mh: Likewise.
10607 * config/i386/darwin.mh: Likewise.
10608 * config/i386/fbsd.mh: Likewise.
10609 * config/i386/fbsd64.mh: Likewise.
10610 * config/i386/go32.mh: Likewise.
10611 * config/i386/i386gnu.mh: Likewise.
10612 * config/i386/i386sol2.mh: Likewise.
10613 * config/i386/linux.mh: Likewise.
10614 * config/i386/linux64.mh: Likewise.
10615 * config/i386/mingw.mh: Likewise.
10616 * config/i386/mingw64.mh: Likewise.
10617 * config/i386/nbsd64.mh: Likewise.
10618 * config/i386/nbsdelf.mh: Likewise.
10619 * config/i386/nto.mh: Likewise.
10620 * config/i386/obsd.mh: Likewise.
10621 * config/i386/obsd64.mh: Likewise.
10622 * config/i386/sol2-64.mh: Likewise.
10623 * config/ia64/linux.mh: Likewise.
10624 * config/m32r/linux.mh: Likewise.
10625 * config/m68k/linux.mh: Likewise.
10626 * config/m68k/nbsdelf.mh: Likewise.
10627 * config/m68k/obsd.mh: Likewise.
10628 * config/m88k/obsd.mh: Likewise.
10629 * config/mips/fbsd.mh: Likewise.
10630 * config/mips/linux.mh: Likewise.
10631 * config/mips/nbsd.mh: Likewise.
10632 * config/mips/obsd64.mh: Likewise.
10633 * config/pa/linux.mh: Likewise.
10634 * config/pa/nbsd.mh: Likewise.
10635 * config/pa/obsd.mh: Likewise.
10636 * config/powerpc/aix.mh: Likewise.
10637 * config/powerpc/fbsd.mh: Likewise.
10638 * config/powerpc/linux.mh: Likewise.
10639 * config/powerpc/nbsd.mh: Likewise.
10640 * config/powerpc/obsd.mh: Likewise.
10641 * config/powerpc/ppc64-linux.mh: Likewise.
10642 * config/powerpc/spu-linux.mh: Likewise.
10643 * config/s390/linux.mh: Likewise.
10644 * config/sh/nbsd.mh: Likewise.
10645 * config/sparc/fbsd.mh: Likewise.
10646 * config/sparc/linux.mh: Likewise.
10647 * config/sparc/linux64.mh: Likewise.
10648 * config/sparc/nbsd64.mh: Likewise.
10649 * config/sparc/nbsdelf.mh: Likewise.
10650 * config/sparc/obsd64.mh: Likewise.
10651 * config/sparc/sol2.mh: Likewise.
10652 * config/tilegx/linux.mh: Likewise.
10653 * config/vax/nbsdelf.mh: Likewise.
10654 * config/vax/obsd.mh: Likewise.
10655 * config/xtensa/linux.mh: Likewise.
10656 * config/i386/i386gnu.mn: New file, with excerpts from
10657 "config/i386/i386gnu.mh".
10658 * configure: Regenerate.
10659 * configure.ac: Rewrite code to use "gdb/configure.nat" instead of
10660 *.mh files under "gdb/config".
10661 * configure.nat: New file, with contents from the
10662 "gdb/config/*/*.mh" files.
10663
7ed1acaf
TW
106642017-05-05 Tim Wiederhake <tim.wiederhake@intel.com>
10665
10666 * btrace.c (btrace_clear): Free insn vector.
10667
e13cb306
PA
106682017-05-05 Pedro Alves <palves@redhat.com>
10669
10670 * warning.m4 (build_warnings): Add -Wno-error=maybe-uninitialized.
10671 * configure: Regenerate.
10672
5ed8105e
PA
106732017-05-04 Pedro Alves <palves@redhat.com>
10674
10675 * Makefile.in (SFILES): Add progspace-and-thread.c.
10676 (HFILES_NO_SRCDIR): Add progspace-and-thread.h.
10677 (COMMON_OBS): Add progspace-and-thread.o.
10678 * breakpoint.c: Include "progspace-and-thread.h".
10679 (update_inserted_breakpoint_locations)
10680 (insert_breakpoint_locations, create_longjmp_master_breakpoint):
10681 Use scoped_restore_current_pspace_and_thread.
10682 (create_std_terminate_master_breakpoint): Use
10683 scoped_restore_current_program_space.
10684 (remove_breakpoint): Use scoped_restore_current_pspace_and_thread.
10685 (print_breakpoint_location): Use
10686 scoped_restore_current_program_space.
10687 (bp_loc_is_permanent): Use
10688 scoped_restore_current_pspace_and_thread.
10689 (resolve_sal_pc): Use scoped_restore_current_pspace_and_thread.
10690 (download_tracepoint_locations): Use
10691 scoped_restore_current_pspace_and_thread.
10692 (breakpoint_re_set): Use scoped_restore_current_pspace_and_thread.
10693 * exec.c (exec_close_1): Use scoped_restore_current_program_space.
10694 (enum step_over_calls_kind): Moved from inferior.h.
10695 (class scoped_restore_current_thread): New class.
10696 * gdbthread.h (make_cleanup_restore_current_thread): Delete
10697 declaration.
10698 (scoped_restore_current_thread): New class.
10699 * infcmd.c: Include "common/gdb_optional.h".
10700 (continue_1, proceed_after_attach): Use
10701 scoped_restore_current_thread.
10702 (notice_new_inferior): Use scoped_restore_current_thread.
10703 * inferior.c: Include "progspace-and-thread.h".
10704 (restore_inferior, save_current_inferior): Delete.
10705 (add_inferior_command, clone_inferior_command): Use
10706 scoped_restore_current_pspace_and_thread.
10707 * inferior.h (scoped_restore_current_inferior): New class.
10708 * infrun.c: Include "progspace-and-thread.h" and
10709 "common/gdb_optional.h".
10710 (follow_fork_inferior): Use
10711 scoped_restore_current_pspace_and_thread.
10712 (scoped_restore_exited_inferior): New class.
10713 (handle_vfork_child_exec_or_exit): Use
10714 scoped_restore_exited_inferior,
10715 scoped_restore_current_pspace_and_thread,
10716 scoped_restore_current_thread and scoped_restore.
10717 (fetch_inferior_event): Use scoped_restore_current_thread.
10718 * linespec.c (decode_line_full, decode_line_1): Use
10719 scoped_restore_current_program_space.
10720 * mi/mi-main.c: Include "progspace-and-thread.h".
10721 (exec_continue): Use scoped_restore_current_thread.
10722 (mi_cmd_exec_run): Use scoped_restore_current_pspace_and_thread.
10723 (mi_cmd_trace_frame_collected): Use scoped_restore_current_thread.
10724 * proc-service.c (ps_pglobal_lookup): Use
10725 scoped_restore_current_program_space.
10726 * progspace-and-thread.c: New file.
10727 * progspace-and-thread.h: New file.
10728 * progspace.c (release_program_space, clone_program_space): Use
10729 scoped_restore_current_program_space.
10730 (restore_program_space, save_current_program_space)
10731 (save_current_space_and_thread): Delete.
10732 (switch_to_program_space_and_thread): Moved to
10733 progspace-and-thread.c.
10734 * progspace.h (save_current_program_space)
10735 (save_current_space_and_thread): Delete declarations.
10736 (scoped_restore_current_program_space): New class.
10737 * remote.c (remote_btrace_maybe_reopen): Use
10738 scoped_restore_current_thread.
10739 * symtab.c: Include "progspace-and-thread.h".
10740 (skip_prologue_sal): Use scoped_restore_current_pspace_and_thread.
10741 * thread.c (print_thread_info_1): Use
10742 scoped_restore_current_thread.
10743 (struct current_thread_cleanup): Delete.
10744 (do_restore_current_thread_cleanup)
10745 (restore_current_thread_cleanup_dtor): Rename/convert both to ...
10746 (scoped_restore_current_thread::~scoped_restore_current_thread):
10747 ... this new dtor.
10748 (make_cleanup_restore_current_thread): Rename/convert to ...
10749 (scoped_restore_current_thread::scoped_restore_current_thread):
10750 ... this new ctor.
10751 (thread_apply_all_command): Use scoped_restore_current_thread.
10752 (thread_apply_command): Use scoped_restore_current_thread.
10753 * tracepoint.c (tdump_command): Use scoped_restore_current_thread.
10754 * varobj.c (value_of_root_1): Use scoped_restore_current_thread.
10755
f6223dbb
PA
107562017-05-04 Pedro Alves <palves@redhat.com>
10757
10758 * thread.c (make_cleanup_restore_current_thread): Move
10759 find_thread_ptid call before the is_stopped call. Assert that the
10760 thread is found. Replace is_stopped call by checking the thread's
10761 state directly. Remove unnecessary NULL-thread check.
10762
3c3ae77e
PA
107632017-05-04 Pedro Alves <palves@redhat.com>
10764
10765 * corelow.c (thread_section_name): New class.
10766 (get_core_register_section, get_core_siginfo): Use it.
10767
45eba0ab
AA
107682017-05-04 Andreas Arnez <arnez@linux.vnet.ibm.com>
10769
10770 * corelow.c (sniff_core_bfd): Remove extra semicolon.
10771 (get_core_register_section): Remove xfree of NULL pointer.
10772
f81fdd35
AH
107732017-05-03 Alan Hayward <alan.hayward@arm.com>
10774
10775 * frv-linux-tdep.c (frv_linux_supply_gregset): Use raw_supply_zeroed.
10776 * regcache.c (regcache::raw_supply_zeroed): New function.
10777 * regcache.h (regcache::raw_supply_zeroed): New declaration.
10778
35837774
SM
107792017-05-03 Simon Marchi <simon.marchi@ericsson.com>
10780
10781 * gdbarch.sh: Remove commented out definition of
10782 TARGET_CHAR_BIT.
10783 * gdbarch.h: Re-generate.
10784
c94fee56
SDJ
107852017-05-03 Sergio Durigan Junior <sergiodj@redhat.com>
10786
10787 * configure: Regenerate.
10788
d17f7b36
SM
107892017-05-02 Simon Marchi <simon.marchi@ericsson.com>
10790
10791 * solib-target.c (solib_target_relocate_section_addresses):
10792 Remove num_section_bases, num_bases, segment_bases variables.
10793
b560ebd6
SM
107942017-05-02 Simon Marchi <simon.marchi@polymtl.ca>
10795
10796 * common/gdb_vecs.h (DEF_VEC_I (CORE_ADDR)): Remove.
10797
f2f46dfc
SM
107982017-05-02 Simon Marchi <simon.marchi@polymtl.ca>
10799
10800 * solib-target.c: Include <vector>
10801 (struct lm_info_target) <~lm_info_target>: Remove.
10802 <segment_bases, section_bases>: Change type to
10803 std::vector<CORE_ADDR>.
10804 (library_list_start_segment, library_list_start_section,
10805 library_list_end_library,
10806 solib_target_relocate_section_addresses): Adjust.
10807
a0ff9e1a
SM
108082017-05-02 Simon Marchi <simon.marchi@polymtl.ca>
10809
10810 * gdbarch.sh (software_single_step): Change return type to
10811 std::vector<CORE_ADDR>.
10812 * gdbarch.c, gdbarch.h: Re-generate.
10813 * arch/arm-get-next-pcs.c (thumb_deal_with_atomic_sequence_raw):
10814 Adjust.
10815 (arm_deal_with_atomic_sequence_raw): Adjust.
10816 (thumb_get_next_pcs_raw): Adjust.
10817 (arm_get_next_pcs_raw): Adjust.
10818 (arm_get_next_pcs): Adjust.
10819 * arch/arm-get-next-pcs.h (arm_get_next_pcs): Adjust.
10820 * aarch64-tdep.c (aarch64_software_single_step): Adjust.
10821 * alpha-tdep.c (alpha_deal_with_atomic_sequence): Adjust.
10822 (alpha_software_single_step): Adjust.
10823 * alpha-tdep.h (alpha_software_single_step): Adjust.
10824 * arm-linux-tdep.c (arm_linux_software_single_step): Adjust.
10825 * arm-tdep.c (arm_software_single_step): Adjust.
10826 (arm_breakpoint_kind_from_current_state): Adjust.
10827 * arm-tdep.h (arm_software_single_step): Adjust.
10828 * breakpoint.c (insert_single_step_breakpoint): Adjust.
10829 * cris-tdep.c (cris_software_single_step): Adjust.
10830 * mips-tdep.c (mips_deal_with_atomic_sequence): Adjust.
10831 (micromips_deal_with_atomic_sequence): Adjust.
10832 (deal_with_atomic_sequence): Adjust.
10833 (mips_software_single_step): Adjust.
10834 * mips-tdep.h (mips_software_single_step): Adjust.
10835 * moxie-tdep.c (moxie_software_single_step): Adjust.
10836 * nios2-tdep.c (nios2_software_single_step): Adjust.
10837 * ppc-tdep.h (ppc_deal_with_atomic_sequence): Adjust.
10838 * rs6000-aix-tdep.c (rs6000_software_single_step): Adjust.
10839 * rs6000-tdep.c (ppc_deal_with_atomic_sequence): Adjust.
10840 * s390-linux-tdep.c (s390_software_single_step): Adjust.
10841 * sparc-tdep.c (sparc_software_single_step): Adjust.
10842 * spu-tdep.c (spu_software_single_step): Adjust.
10843 * tic6x-tdep.c (tic6x_software_single_step): Adjust.
10844
ea480a30
SM
108452017-05-02 Simon Marchi <simon.marchi@polymtl.ca>
10846
10847 * gdbarch.sh: Use semi-colon as field separator instead of colon.
10848 * gdbarch.h: Re-generate.
10849
d050f7d7
TW
108502017-05-01 Tim Wiederhake <tim.wiederhake@intel.com>
10851
10852 * Makefile.in (SUBDIR_PYTHON_OBS): Add py-instruction.o.
10853 (SUBDIR_PYTHON_SRCS): Add py-instruction.c.
10854 * python/py-instruction.c, python/py-instruction.h: New file.
10855 * python/py-record.c: Add py-instruction.h include.
10856 (gdbpy_initialize_record): Make gdb.Instruction a super class of
10857 gdb.RecordInstruction.
10858 * python/python-internal.h: Add gdbpy_initialize_instruction
10859 declaration.
10860 * python/python.c (do_start_initialization): Add
10861 gdbpy_initialize_instruction.
10862
14f819c8
TW
108632017-05-01 Tim Wiederhake <tim.wiederhake@intel.com>
10864
10865 * python/py-record-btrace.c (BTPY_REQUIRE_VALID_CALL, btpy_call_type):
10866 Remove.
10867 (btrace_func_from_recpy_func): New function.
10868 (btpy_call_new, btpy_number, btpy_hash, btpy_richcompare): Remove.
10869 (btpy_call_level, btpy_call_symbol, btpy_call_instructions,
10870 btpy_call_up, btpy_call_prev_sibling, btpy_call_next_sibling): Rename to ...
10871 (recpy_bt_func_level, recpy_bt_func_symbol, recpy_bt_func_instructions,
10872 recpy_bt_func_up, recpy_bt_func_prev, recpy_bt_func_next): This.
10873 Also, use new helper functions.
10874 (btpy_list_item): Use new helper functions.
10875 (recpy_bt_function_call_history): Use new type name.
10876 (btpy_call_getset): Remove.
10877 (gdbpy_initialize_btrace): Remove code to initialize
10878 gdb.BtraceFunctionCall.
10879 * python/py-record-btrace.h (recpy_bt_func_number, recpy_btb_func_level,
10880 recpy_btb_func_symbol, recpy_bt_func_instructions, recpy_bt_func_up,
10881 recpy_bt_func_prev, recpy_bt_func_next): New export.
10882 * python/py-record.c (recpy_func_type): New static object.
10883 (recpy_func_new, recpy_func_level, recpy_func_symbol,
10884 recpy_func_instructions, recpy_func_up, recpy_func_prev,
10885 recpy_func_next): New function.
10886 (recpy_element_hash, recpy_element_richcompare): Updated comment.
10887 (recpy_func_getset): New static object.
10888 (gdbpy_initialize_record): Add code to initialize gdb.RecordInstruction.
10889 * python/py-record.h (recpy_func_type, recpy_func_new): New export.
10890
0ed5da75
TW
108912017-05-01 Tim Wiederhake <tim.wiederhake@intel.com>
10892
10893 * python/py-record-btrace.c (BTPY_REQUIRE_VALID_INSN): Remove.
10894 (btpy_object, btpy_insn_type, btpy_new): Remove.
10895 (btpy_list_object): Use gdb.RecordInstruction type instead of
10896 gdb.BtraceInstruction type.
10897 (btrace_insn_from_recpy_insn): New function.
10898 (btpy_insn_or_gap_new): Adjust comment. Use recpy_insn_new instead of
10899 btpy_new.
10900 (btpy_call_new, btpy_list_item): Do not use btpy_new anymore.
10901 (btpy_number, btpy_hash, btpy_call_level, btpy_call_symbol,
10902 btpy_call_instructions, btpy_call_up, btpy_call_prev_sibling,
10903 btpy_call_next_sibling, btpy_richcompare): Use recpy_element_object
10904 instead of btpy_object.
10905 (btpy_insn_sal, btpy_insn_pc, btpy_insn_size, btpy_insn_is_speculative,
10906 btpy_insn_data, btpy_insn_decode): Rename to ...
10907 (recpy_bt_insn_sal, recpy_bt_insn_pc, recpy_bt_insn_size,
10908 recpy_bt_insn_is_speculative, recpy_bt_insn_data,
10909 recpy_bt_insn_decode): This. Also, use new helper functions.
10910 (btpy_list_position, recpy_bt_goto): Use recpy_element_object and
10911 recpy_insn_type.
10912 (btpy_insn_getset): Remove.
10913 (gdbpy_initialize_btrace): Remove code to initialize
10914 gdb.BtraceInstruction. Use recpy_element_object.
10915 * python/py-record-btrace.h (recpy_bt_insn_number, recpy_bt_insn_sal,
10916 recpy_bt_insn_pc, recpy_bt_insn_data, recpy_bt_insn_decoded,
10917 recpy_bt_insn_size, recpy_bt_insn_is_speculative): New export.
10918 * python/py-record.c (recpy_insn_type): New static object.
10919 (recpy_insn_new, recpy_insn_sal, recpy_insn_pc, recpy_insn_data,
10920 recpy_insn_decoded, recpy_insn_size, recpy_insn_is_speculative,
10921 recpy_element_number, recpy_element_hash, recpy_element_richcompare):
10922 New function.
10923 (recpy_insn_getset): New static object.
10924 (gdbpy_initialize_record): Initialize gdb.RecordInstruction.
10925 * python/py-record.h (recpy_element_object): New typedef.
10926 (recpy_insn_type, recpy_insn_new): New export.
10927
913aeadd
TW
109282017-05-01 Tim Wiederhake <tim.wiederhake@intel.com>
10929
10930 * py-record-btrace.c (btpy_insn_new): Removed.
10931 (btpy_insn_or_gap_new): New function.
10932 (btpy_insn_error): Removed.
10933 (btpy_insn_sal, btpy_insn_pc, btpy_insn_size, btpy_insn_is_speculative,
10934 btpy_insn_data, btpy_insn_decode): Remove code path for gaps.
10935 (recpy_bt_replay_position, recpy_bt_begin, recpy_bt_end): Call
10936 btpy_insn_or_gap_new instead of btpy_insn_new.
10937 (btpy_insn_getset): Remove btpy_insn_error.
10938 * py-record.c (recpy_gap_type): New static object.
10939 (recpy_gap_object): New typedef.
10940 (recpy_gap_new, recpy_gap_number, recpy_gap_reason_code,
10941 recpy_gap_reason_string): New function.
10942 (recpy_gap_getset): New static object.
10943 (gdbpy_initialize_record): Initialize gdb.RecordGap type.
10944 * py-record.h (recpy_gap_new): New export.
10945
a3be24ad
TW
109462017-05-01 Tim Wiederhake <tim.wiederhake@intel.com>
10947
10948 * python/py-record.c (recpy_ptid): Remove.
10949 (recpy_record_getset): Remove recpy_ptid.
10950
ae20e79a
TW
109512017-05-01 Tim Wiederhake <tim.wiederhake@intel.com>
10952
10953 * btrace.c (btrace_fetch): Set inferior_ptid.
10954 * python/py-record-btrace.c: Add "py-record.h" include.
10955 (recpy_bt_format, recpy_bt_replay_position, recpy_bt_begin,
10956 recpy_bt_end, recpy_bt_instruction_history,
10957 recpy_bt_function_call_history, recpy_bt_goto): Use ptid stored
10958 in gdb.Record object instead of current ptid.
10959 * python/py-record.c: Include new "py-record.h" file.
10960 (recpy_record_object): Moved to py-record.h.
10961 * python/py-record.h: New file.
10962
8d0050ea
TW
109632017-05-01 Tim Wiederhake <tim.wiederhake@intel.com>
10964
10965 * python/py-record-btrace.c (BTPY_REQUIRE_VALID_INSN,
10966 BTPY_REQUIRE_VALID_CALL, recpy_bt_function_call_history): Fix
10967 indentation.
10968
3f380b50
JB
109692017-05-01 Joel Brobecker <brobecker@adacore.com>
10970
10971 * MAINTAINERS: Move Daniel Jacobowitz and Mark Kettenis to
10972 the past maintainers section.
10973
07495424
YQ
109742017-04-28 Yao Qi <yao.qi@linaro.org>
10975
10976 * infcmd.c (get_return_value): Use regcache ctor, and remove
10977 cleanup.
10978
deb1fa3e
YQ
109792017-04-28 Yao Qi <yao.qi@linaro.org>
10980 Pedro Alves <palves@redhat.com>
10981
10982 * regcache.c (regcache::regcache): New tag dispatch ctor.
10983 (do_cooked_read): Moved above.
10984 (regcache_dup): Use the tag dispatch ctor..
10985 * regcache.h (regcache): Declare ctor, delete copy ctor and
10986 assignment operator, remove friend regcache_dup.
10987
b421c83c
YQ
109882017-04-28 Yao Qi <yao.qi@linaro.org>
10989
10990 * regcache.c (regcache_dup): Assert !src->m_readonly_p and
10991 call method save instead of regcache_cpy.
10992 * regcache.h (struct regcache): Make regcache_dup a friend.
10993
ef79d9a3
YQ
109942017-04-28 Yao Qi <yao.qi@linaro.org>
10995
10996 * regcache.c (struct regcache): Move to regcache.h
10997 (regcache::arch): New method.
10998 (regcache_get_ptid): Update.
10999 (get_regcache_arch): Call arch method.
11000 (get_regcache_aspace): Call method aspace.
11001 (register_buffer): Change it to method.
11002 (regcache_save): Change it to regcache::save.
11003 (regcache_restore): Likewise.
11004 (regcache_cpy_no_passthrough): Remove the declaration.
11005 (regcache_cpy): Call methods restore and cpy_no_passthrough.
11006 (regcache_cpy_no_passthrough): Change it to method
11007 cpy_no_passthrough.
11008 (regcache_register_status): Change it to method
11009 get_register_status.
11010 (regcache_invalidate): Change it to method invalidate.
11011 (regcache_thread_ptid_changed): Use methods ptid and set_ptid.
11012 (regcache_raw_update): Change it to method raw_update.
11013 (regcache_raw_read): Likewise.
11014 (regcache_raw_read_signed): Likewise.
11015 (regcache_raw_read_unsigned): Likewise.
11016 (regcache_raw_write_signed): Likewise.
11017 (regcache_raw_write_unsigned): Likewise.
11018 (regcache_cooked_read): Likewise.
11019 (regcache_cooked_read_value): Likewise.
11020 (regcache_cooked_read_signed): Likewise.
11021 (regcache_cooked_read_unsigned): Likewise.
11022 (regcache_cooked_write_signed): Likewise.
11023 (regcache_cooked_write_unsigned): Likewise.
11024 (regcache_raw_set_cached_value): Likewise.
11025 (regcache_raw_write): Likewise.
11026 (regcache_cooked_write): Likewise.
11027 (regcache_xfer_part): Likewise.
11028 (regcache_raw_read_part): Likewise.
11029 (regcache_raw_write_part): Likewise.
11030 (regcache_cooked_read_part): Likewise.
11031 (regcache_cooked_write_part): Likewise.
11032 (regcache_raw_supply): Likewise.
11033 (regcache_raw_collect): Likewise.
11034 (regcache_transfer_regset): Likewise.
11035 (regcache_supply_regset): Likewise.
11036 (regcache_collect_regset): Likewise.
11037 (regcache_debug_print_register): Likewise.
11038 (enum regcache_dump_what): Move it to regcache.h.
11039 (regcache_dump): Change it to method dump.
11040 * regcache.h (enum regcache_dump_what): New.
11041 (class regcache): New.
11042 * target.c (target_fetch_registers): Call method
11043 debug_print_register.
11044 (target_store_registers): Likewise.
11045
f8fdb78e
SM
110462017-04-28 Simon Marchi <simon.marchi@ericsson.com>
11047
11048 * windows-nat.c (struct lm_info_windows): Initialize field.
11049 (windows_make_so): Allocate lm_info_windows with new.
11050 (windows_free_so): Free lm_info_windows with delete.
11051
9ccbfd7b
SM
110522017-04-28 Simon Marchi <simon.marchi@ericsson.com>
11053
11054 * solib-darwin.c (struct lm_info_darwin): Initialize field.
11055 (darwin_current_sos): Allocate lm_info_darwin with new, remove
11056 cleanup.
11057 (darwin_free_so): Free lm_info_darwin with delete.
11058
76e75227
SM
110592017-04-28 Simon Marchi <simon.marchi@ericsson.com>
11060
11061 * solib-svr4.h (struct lm_info_svr4): Initialize fields.
11062 <l_addr_p>: Change type to bool.
11063 * solib-svr4.c (lm_info_read): Allocate lm_info_svr4 with new.
11064 (svr4_free_so): Free lm_info_svr4 with delete.
11065 (svr4_copy_library_list): Replace memcpy with call to copy
11066 constructor.
11067 (library_list_start_library, svr4_default_sos): Allocate
11068 lm_info_svr4 with new.
11069
51046d9e
SM
110702017-04-28 Simon Marchi <simon.marchi@ericsson.com>
11071
11072 * solib-target.c (struct lm_info_target): Add destructor,
11073 initialize fields.
11074 <name>: Change type to std::string.
11075 (library_list_start_library): Allocate lm_info_target with new.
11076 (solib_target_free_library_list): Free lm_info_target with
11077 delete.
11078 (solib_target_current_sos): Adapt to std::string.
11079 (solib_target_free_so): Free lm_info_target with delete.
11080
4023ae76
SM
110812017-04-28 Simon Marchi <simon.marchi@ericsson.com>
11082
11083 * solib-frv.c (struct lm_info_frv): Add destructor, initialize
11084 fields.
11085 (frv_current_sos): Allocate lm_info_frv with new.
11086 (frv_relocate_main_executable): Free lm_info_frv with delete,
11087 allocate with new.
11088 (frv_clear_solib, frv_free_so): Free lm_info_frv with delete.
11089
af43057b
SM
110902017-04-28 Simon Marchi <simon.marchi@ericsson.com>
11091
11092 * solib-frv.c (struct lm_info_frv): Fix indentation.
11093
b0911207
SM
110942017-04-28 Simon Marchi <simon.marchi@ericsson.com>
11095
11096 * solib-dsbt.c (struct lm_info_dsbt): Add destructor, initialize
11097 map field.
11098 (dsbt_current_sos): Allocate lm_info_dsbt with new.
11099 (dsbt_relocate_main_executable): Free lm_info_dsbt with delete
11100 and allocate with new.
11101 (dsbt_clear_solib, dsbt_free_so): Free lm_info_dsbt with delete.
11102
6c401f72
SM
111032017-04-28 Simon Marchi <simon.marchi@ericsson.com>
11104
11105 * solib-aix.c (struct lm_info_aix): Initialize fields in-class.
11106 <filename, member_name>: Change type to std::string.
11107 (solib_aix_new_lm_info, solib_aix_xfree_lm_info): Remove.
11108 (library_list_start_library): Allocate lm_info_aix with new.
11109 (solib_aix_free_library_list, solib_aix_free_so): Free with delete.
11110 (solib_aix_current_sos): Adapt to std::string, copy lm_info_aix
11111 with copy constructor.
11112
d0e449a1
SM
111132017-04-28 Simon Marchi <simon.marchi@ericsson.com>
11114
11115 * solist.h (struct lm_info): Remove.
11116 (struct lm_info_base): New class.
11117 (struct so_list) <lm_info>: Change type to lm_info_base *.
11118 * nto-tdep.c (struct lm_info): Remove.
11119 (lm_addr): Adjust.
11120 * solib-aix.c (struct lm_info): Rename to ...
11121 (struct lm_info_aix): ... this. Extend lm_info_base.
11122 (lm_info_p): Rename to ...
11123 (lm_info_aix_p): ... this, and adjust.
11124 (solib_aix_new_lm_info, solib_aix_xfree_lm_info,
11125 solib_aix_parse_libraries, library_list_start_library,
11126 solib_aix_free_library_list, solib_aix_parse_libraries,
11127 solib_aix_get_library_list,
11128 solib_aix_relocate_section_addresses, solib_aix_free_so,
11129 solib_aix_get_section_offsets,
11130 solib_aix_solib_create_inferior_hook, solib_aix_current_sos):
11131 Adjust.
11132 (struct solib_aix_inferior_data) <library_list>: Adjust.
11133 * solib-darwin.c (struct lm_info): Rename to ...
11134 (struct lm_info_darwin): ... this. Extend lm_info_base.
11135 (darwin_current_sos, darwin_relocate_section_addresses): Adjust.
11136 * solib-dsbt.c (struct lm_info): Rename to ...
11137 (struct lm_info_dsbt): ... this. Extend lm_info_base.
11138 (struct dsbt_info) <main_executable_lm_info): Adjust.
11139 (dsbt_current_sos, dsbt_relocate_main_executable, dsbt_free_so,
11140 dsbt_relocate_section_addresses): Adjust.
11141 * solib-frv.c (struct lm_info): Rename to ...
11142 (struct lm_info_frv): ... this. Extend lm_info_base.
11143 (main_executable_lm_info): Adjust.
11144 (frv_current_sos, frv_relocate_main_executable, frv_free_so,
11145 frv_relocate_section_addresses, frv_fdpic_find_global_pointer,
11146 find_canonical_descriptor_in_load_object,
11147 frv_fdpic_find_canonical_descriptor): Adjust.
11148 * solib-svr4.c (struct lm_info): Move to solib-svr4.h, renamed
11149 to lm_info_svr4.
11150 (lm_info_read, lm_addr_check, svr4_keep_data_in_core,
11151 svr4_clear_so, svr4_copy_library_list,
11152 library_list_start_library, svr4_default_sos, svr4_read_so_list,
11153 svr4_current_sos, svr4_fetch_objfile_link_map,
11154 solist_update_incremental): Adjust.
11155 * solib-svr4.h (struct lm_info_svr4): Move here from
11156 solib-svr4.c.
11157 * solib-target.c (struct lm_info): Rename to ...
11158 (struct lm_info_target): ... this. Extend lm_info_base.
11159 (lm_info_p): Rename to ...
11160 (lm_info_target_p): ... this.
11161 (solib_target_parse_libraries, library_list_start_segment,
11162 library_list_start_section, library_list_start_library,
11163 library_list_end_library, solib_target_free_library_list,
11164 solib_target_current_sos, solib_target_free_so,
11165 solib_target_relocate_section_addresses): Adjust.
11166 * windows-nat.c (struct lm_info): Rename to ...
11167 (struct lm_info_windows): ... this. Extend lm_info_base.
11168 (windows_make_so, handle_load_dll, handle_unload_dll,
11169 windows_xfer_shared_libraries): Adjust.
11170
434a4023
SM
111712017-04-28 Simon Marchi <simon.marchi@ericsson.com>
11172
11173 * solib-darwin.c (struct darwin_so_list): Remove.
11174 (darwin_current_sos): Allocate an so_list object instead of a
11175 darwin_so_list, separately allocate an lm_info object.
11176 (darwin_free_so): Free lm_info.
11177
428544e8
JB
111782017-04-28 John Baldwin <jhb@FreeBSD.org>
11179
11180 * mips-tdep.c (print_gp_register_row): Replace printf_filtered
11181 with fprintf_filtered.
11182
4621115f
YQ
111832017-04-28 Yao Qi <yao.qi@linaro.org>
11184
11185 * regcache.c (regcache::regcache): New function.
11186 (regcache::~regcache): New function.
11187 (regcache_xmalloc_1): Remove.
11188 (regcache_xmalloc): Call new regcache.
11189 (regcache_xfree): Call delete regcache.
11190 (get_thread_arch_aspace_regcache): Call new regcache.
11191
339053c2
YQ
111922017-04-28 Yao Qi <yao.qi@linaro.org>
11193
11194 * mips-linux-nat.c (mips_linux_new_thread): Use ptid method
11195 lwp instead of ptid_get_lwp.
11196
7974a605
YQ
111972017-04-28 Yao Qi <yao.qi@linaro.org>
11198
11199 * mips-linux-nat.c (mips_linux_new_thread): Get lwpid from
11200 lwp_info instead of getting from inferior_ptid.
11201
e15c3eb4
KS
112022017-04-27 Keith Seitz <keiths@redhat.com>
11203
11204 * gdbtypes.c (LVALUE_REFERENCE_TO_RVALUE_BINDING_BADNESS)
11205 DIFFERENT_REFERENCE_TYPE_BADNESS): Remove.
11206 (CV_CONVERSION_BADNESS): Define.
11207 (rank_one_type): Remove overly restrictive rvalue reference
11208 rank checks.
11209 Add cv-qualifier checks and subranks for type equality.
11210 * gdbtypes.h (REFERENCE_CONVERSION_RVALUE,
11211 REFERENCE_CONVERSION_CONST_LVALUE, CV_CONVERSION_BADNESS,
11212 CV_CONVERSION_CONST, CV_CONVERSION_VOLATILE): Declare.
11213
72bc1d24
SM
112142017-04-27 Simon Marchi <simon.marchi@ericsson.com>
11215
11216 * python/py-inferior.c (inferior_to_inferior_object): Increment reference
11217 count when creating the object.
11218
55bcecda
UW
112192017-04-27 Sangamesh Mallayya <sangamesh.swamy@in.ibm.com>
11220 Ulrich Weigand <uweigand@de.ibm.com>
11221
11222 * xcoffread.c (read_xcoff_symtab): Read correct function auxiliary
11223 entry if xlc -qfuncsect or gcc -ffunction-sections compiler option
11224 is used in AIX.
11225 (read_xcoff_symtab): Handle C_WEAKEXT storage class.
11226 (process_xcoff_symbol): Likewise.
11227 (scan_xcoff_symtab): Likewise.
11228
5c99fcf8
AH
112292017-04-26 Alan Hayward <alan.hayward@arm.com>
11230
11231 * ia64-tdep.c (examine_prologue): Use get_frame_register_unsigned.
11232 (ia64_sigtramp_frame_prev_register): Use read_memory_unsigned_integer.
11233 (ia64_access_reg): Use get_frame_register_unsigned.
11234 (ia64_access_rse_reg): Likewise.
11235 (ia64_libunwind_frame_prev_register): Likewise.
11236
b41c5a85
JW
112372017-04-26 Jiong Wang <jiong.wang@arm.com>
11238
11239 * gdbarch.sh: New gdbarch method execute_dwarf_cfa_vendor_op.
11240 * gdbarch.c: Regenerated.
11241 * gdbarch.h: Regenerated.
11242 * dwarf2-frame.c (dwarf2_frame_state_alloc_regs): Made the
11243 visibility external.
11244 (execute_cfa_program): Call execute_dwarf_cfa_vendor_op for CFI
11245 between DW_CFA_lo_user and DW_CFA_high_user inclusive.
11246 (enum cfa_how_kind): Move to ...
11247 (struct dwarf2_frame_state_reg_info): Likewise.
11248 (struct dwarf2_frame_state): Likewise.
11249 * dwarf2-frame.h: ... here.
11250 (dwarf2_frame_state_alloc_regs): New declaration.
11251 * sparc-tdep.c (sparc_execute_dwarf_cfa_vendor_op): New function.
11252 (sparc32_gdbarch_init): Register execute_dwarf_cfa_vendor_op hook.
11253
c185f580
AH
112542017-04-26 Alan Hayward <alan.hayward@arm.com>
11255
11256 * xtensa-tdep.c (xtensa_pseudo_register_read): Use
11257 regcache_raw_read_unsigned.
11258 (xtensa_pseudo_register_write): Likewise.
11259
19c45594
AH
112602017-04-26 Alan Hayward <alan.hayward@arm.com>
11261
11262 * nds32-tdep.c (nds32_pseudo_register_read): Abort on errors.
11263 (nds32_pseudo_register_write): Likewise.
11264
4658f12e
YQ
112652017-04-25 Yao Qi <yao.qi@linaro.org>
11266
11267 * regcache.c (struct regcache) <readonly_p>: Change its type
11268 to bool.
11269 (regcache_xmalloc_1): Update parameter type and callers update.
11270
d581dda8
YQ
112712017-04-25 Yao Qi <yao.qi@linaro.org>
11272
11273 * aarch64-tdep.c (aarch64_gdbarch_init): Don't call
11274 set_gdbarch_wchar_bit.
11275 * arm-tdep.c (arm_gdbarch_init): Likewise.
11276
debed3db
PA
112772017-04-25 Pedro Alves <palves@redhat.com>
11278
11279 * common/poison.h [!HAVE_IS_TRIVIALLY_COPYABLE] (IsRelocatable)
11280 (BothAreRelocatable, memcopy, memmove): Don't define.
11281 * common/traits.h (__has_feature, HAVE_IS_TRIVIALLY_COPYABLE): New
11282 macros.
11283
b0b92aeb
PA
112842017-04-25 Pedro Alves <palves@redhat.com>
11285
11286 * common/common-defs.h: Include "common/poison.h".
11287 * common/function-view.h: (Not, Or, Requires): Move to traits.h
11288 and adjust.
11289 * common/poison.h: New file.
11290 * common/traits.h: Include <type_traits>.
11291 (Not, Or, Requires): New, moved from common/function-view.h.
11292
16c4d54a
PA
112932017-04-25 Pedro Alves <palves@redhat.com>
11294
11295 * breakpoint.h (struct breakpoint): In-class initialize all
11296 fields. Make boolean fields "bool".
11297 * breakpoint.c (init_raw_breakpoint_without_location): Remove
11298 memset call and initializations no longer necessary.
11299
b5c36682
PA
113002017-04-25 Pedro Alves <palves@redhat.com>
11301
11302 * btrace.c (pt_btrace_insn_flags): Change parameter type to
11303 reference.
11304 (pt_btrace_insn): New function.
11305 (ftrace_add_pt): Remove memset call and use pt_btrace_insn.
11306
5625a286
PA
113072017-04-25 Pedro Alves <palves@redhat.com>
11308
11309 * ada-lang.c (ada_catchpoint_location): Now a "class". Remove
11310 "base" field and inherit from "bp_location" instead. Add
11311 non-default ctor.
11312 (allocate_location_exception): Use new non-default ctor.
11313 * breakpoint.c (get_first_locp_gte_addr): Remove memset call.
11314 (init_bp_location): Convert to ...
11315 (bp_location::bp_location): ... this new ctor, and remove memset
11316 call.
11317 (base_breakpoint_allocate_location): Use the new non-default ctor.
11318 * breakpoint.h (bp_location): Now a class. Declare default and
11319 non-default ctors. In-class initialize all members.
11320 (init_bp_location): Remove declaration.
11321
23bcc18f
PA
113222017-04-25 Pedro Alves <palves@redhat.com>
11323
11324 * common/enum-flags.h (enum_flags): Don't implement copy ctor and
11325 assignment operator.
11326
e1ba3053
YQ
113272017-04-24 Yao Qi <yao.qi@linaro.org>
11328
11329 * doublest.c (convert_doublest_to_floatformat): Call
11330 floatformat_totalsize_bytes.
11331
10f489e5
TT
113322017-04-22 Tom Tromey <tom@tromey.com>
11333
11334 * mi/mi-cmd-file.c (mi_cmd_file_list_shared_libraries): Use
11335 ui_out_emit_list.
11336 * stack.c (print_frame): Use ui_out_emit_list.
11337 * mi/mi-symbol-cmds.c (mi_cmd_symbol_list_lines): Use
11338 ui_out_emit_list.
11339 * mi/mi-main.c (print_one_inferior)
11340 (mi_cmd_data_list_register_names)
11341 (mi_cmd_data_list_register_values, mi_cmd_list_features)
11342 (mi_cmd_list_target_features, mi_cmd_trace_frame_collected): Use
11343 ui_out_emit_list.
11344 * mi/mi-interp.c (mi_on_normal_stop_1): Use ui_out_emit_list.
11345 (mi_output_solib_attribs): Use ui_out_emit_list,
11346 ui_out_emit_tuple.
11347 * mi/mi-cmd-var.c (varobj_update_one): Use ui_out_emit_list.
11348 * mi/mi-cmd-stack.c (mi_cmd_stack_list_frames)
11349 (mi_cmd_stack_list_args, list_args_or_locals): Use
11350 ui_out_emit_list.
11351 * disasm.c (do_assembly_only): Use ui_out_emit_list.
11352 * breakpoint.c (print_solib_event, output_thread_groups): Use
11353 ui_out_emit_list.
11354
0092b74d
TT
113552017-04-22 Tom Tromey <tom@tromey.com>
11356
11357 * mi/mi-main.c (print_variable_or_computed): Use ui_out_emit_tuple.
11358 * mi/mi-cmd-var.c (varobj_update_one): Use ui_out_emit_tuple.
11359 * mi/mi-cmd-stack.c (list_arg_or_local): Use ui_out_emit_tuple.
11360
a14a62dd
TT
113612017-04-22 Tom Tromey <tom@tromey.com>
11362
11363 * tracepoint.c (tvariables_info_1)
11364 (print_one_static_tracepoint_marker): Use ui_out_emit_tuple.
11365
46b9c129
TT
113662017-04-22 Tom Tromey <tom@tromey.com>
11367
11368 * stack.c (print_frame_arg): Use ui_out_emit_tuple,
11369 annotate_arg_emitter.
11370 * breakpoint.c (print_mention_watchpoint)
11371 (print_mention_masked_watchpoint): Use ui_out_emit_tuple.
11372 * annotate.h (struct annotate_arg_emitter): New.
11373
2e783024
TT
113742017-04-22 Tom Tromey <tom@tromey.com>
11375
11376 * record-btrace.c (record_btrace_insn_history)
11377 (record_btrace_insn_history_range, record_btrace_call_history)
11378 (record_btrace_call_history_range): Use ui_out_emit_tuple.
11379 * thread.c (do_captured_list_thread_ids, print_thread_info_1): Use
11380 ui_out_emit_tuple.
11381 * stack.c (print_frame_info): Use ui_out_emit_tuple.
11382 * solib.c (info_sharedlibrary_command): Use ui_out_emit_tuple.
11383 * skip.c (skip_info): Use ui_out_emit_tuple.
11384 * remote.c (show_remote_cmd): Use ui_out_emit_tuple.
11385 * progspace.c (print_program_space): Use ui_out_emit_tuple.
11386 * probe.c (info_probes_for_ops): Use ui_out_emit_tuple.
11387 * osdata.c (info_osdata): Use ui_out_emit_tuple.
11388 * mi/mi-symbol-cmds.c (mi_cmd_symbol_list_lines): Use
11389 ui_out_emit_tuple.
11390 * mi/mi-main.c (print_one_inferior, list_available_thread_groups)
11391 (output_register, mi_cmd_data_read_memory)
11392 (mi_cmd_data_read_memory_bytes, mi_load_progress)
11393 (mi_cmd_trace_frame_collected): Use ui_out_emit_tuple.
11394 * mi/mi-cmd-var.c (mi_cmd_var_list_children, varobj_update_one):
11395 Use ui_out_emit_tuple.
11396 * mi/mi-cmd-stack.c (mi_cmd_stack_list_args): Use
11397 ui_out_emit_tuple.
11398 * mi/mi-cmd-info.c (mi_cmd_info_ada_exceptions)
11399 (mi_cmd_info_gdb_mi_command): Use ui_out_emit_tuple.
11400 * linux-thread-db.c (info_auto_load_libthread_db): Use
11401 ui_out_emit_tuple.
11402 * inferior.c (print_inferior): Use ui_out_emit_tuple.
11403 * gdb_bfd.c (print_one_bfd): Use ui_out_emit_tuple.
11404 * disasm.c (do_mixed_source_and_assembly_deprecated)
11405 (do_mixed_source_and_assembly): Use ui_out_emit_tuple.
11406 * cp-abi.c (list_cp_abis): Use ui_out_emit_tuple.
11407 * cli/cli-setshow.c (cmd_show_list): Use ui_out_emit_tuple.
11408 * breakpoint.c (print_one_breakpoint_location)
11409 (print_one_breakpoint): Use ui_out_emit_tuple.
11410 * auto-load.c (print_script, info_auto_load_cmd): Use
11411 ui_out_emit_tuple.
11412 * ada-tasks.c (print_ada_task_info): Use ui_out_emit_tuple.
11413
9be21bb4
SM
114142017-04-21 Simon Marchi <simon.marchi@ericsson.com>
11415
11416 * thread.c (print_thread_info_1): Remove dead code.
11417
0d4c07af
JK
114182017-04-21 Jan Kratochvil <jan.kratochvil@redhat.com>
11419
11420 * aarch64-tdep.c (selftests::aarch64_process_record_test): Make it #if
11421 GDB_SELF_TEST.
11422 * arm-tdep.c (selftests::arm_record_test): Likewise.
11423
4daf993d
YQ
114242017-04-21 Yao Qi <yao.qi@linaro.org>
11425
11426 * regcache.c (regcache_restore): Remove argument 2. Replace
11427 argument 3 with regcache. Get register status from
11428 src->register_status and get register contents from
11429 register_buffer (src, regnum).
11430 (regcache_cpy): Update.
11431
a6c21d4a
PA
114322017-04-19 Pedro Alves <palves@redhat.com>
11433
11434 * gdbthread.h (thread): Add missing closing parenthesis in
11435 comment.
11436
3a3fd0fd
PA
114372017-04-19 Pedro Alves <palves@redhat.com>
11438
11439 * common/refcounted-object.h: New file.
11440 * gdbthread.h: Include "common/refcounted-object.h".
11441 (thread_info): Inherit from refcounted_object and add comments.
11442 (thread_info::incref, thread_info::decref)
11443 (thread_info::m_refcount): Delete.
11444 (thread_info::deletable): Use the refcounted_object::refcount()
11445 method.
11446 * inferior.c (current_inferior_): Add comment.
11447 (set_current_inferior): Increment/decrement refcounts.
11448 (prune_inferiors, remove_inferior_command): Skip inferiors marked
11449 not-deletable instead of comparing with the current inferior.
11450 (initialize_inferiors): Increment the initial inferior's refcount.
11451 * inferior.h (struct inferior): Forward declare.
11452 Include "common/refcounted-object.h".
11453 (current_inferior, set_current_inferior): Move declaration to
11454 before struct inferior's definition, and fix comment.
11455 (inferior): Inherit from refcounted_object. Add comments.
11456 * thread.c (switch_to_thread_no_regs): Reference the thread's
11457 inferior pointer directly instead of doing a ptid lookup.
11458 (switch_to_no_thread): New function.
11459 (switch_to_thread(thread_info *)): New function, factored out
11460 from ...
11461 (switch_to_thread(ptid_t)): ... this.
11462 (restore_current_thread): Delete.
11463 (current_thread_cleanup): Remove 'inf_id' and 'was_removable'
11464 fields, and add 'inf' field.
11465 (do_restore_current_thread_cleanup): Check whether old->inf is
11466 alive instead of looking up an inferior by ptid. Use
11467 switch_to_thread and switch_to_no_thread.
11468 (restore_current_thread_cleanup_dtor): Use old->inf directly
11469 instead of lookup up an inferior by id. Decref the inferior.
11470 Don't restore 'removable'.
11471 (make_cleanup_restore_current_thread): Same the inferior pointer
11472 in old, instead of the inferior number. Incref the inferior.
11473 Don't save/clear 'removable'.
11474
9bcb1f16
PA
114752017-04-19 Pedro Alves <palves@redhat.com>
11476
11477 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
11478 unittests/scoped_restore-selftests.c.
11479 (SUBDIR_UNITTESTS_OBS): Add scoped_restore-selftests.o.
11480 * common/scoped_restore.h (scoped_restore_base): Make "class".
11481 (scoped_restore_base::release): New public method.
11482 (scoped_restore_base::scoped_restore_base): New protected ctor.
11483 (scoped_restore_base::m_saved_var): New protected field.
11484 (scoped_restore_tmpl::scoped_restore_tmpl(T*)): Initialize the
11485 scoped_restore_base base class instead of m_saved_var directly.
11486 (scoped_restore_tmpl::scoped_restore_tmpl(T*, T2)): Likewise.
11487 (scoped_restore_tmpl::scoped_restore_tmpl(const
11488 scoped_restore_tmpl<T>&)): Likewise.
11489 (scoped_restore_tmpl::~scoped_restore_tmpl): Use the saved_var
11490 method.
11491 (scoped_restore_tmpl::saved_var): New method.
11492 (scoped_restore_tmpl::m_saved_var): Delete.
11493 * inferior.h (inferior::detaching): Now a bool.
11494 * infrun.c (prepare_for_detach): Use a scoped_restore instead of a
11495 cleanup.
11496 * unittests/scoped_restore-selftests.c: New file.
11497
26fcd539
PA
114982017-04-19 Pedro Alves <palves@redhat.com>
11499
11500 * Makefile.in (SUBDIR_UNITTESTS_SRCS, SUBDIR_UNITTESTS_OBS):
11501 Re-sort in alphabetic order.
11502
fdd243b0
PA
115032017-04-18 Pedro Alves <palves@redhat.com>
11504
11505 * xml-support.c (obstack_xml_printf): Delete.
11506 * xml-support.h (obstack_xml_printf): Delete.
11507
4895cde2
PA
115082017-04-18 Pedro Alves <palves@redhat.com>
11509
11510 * xml-support.c (gdb_xml_parser) <use_dtd, dtd_name, parse,
11511 vdebug, verror, body_text, start_element, end_element, name,
11512 user_data, set_is_xinclude, set_error, expat_parser>: New methods.
11513 <name, user_data, expat_parser, scopes, error, last_line, dtd_name,
11514 is_xinclude>: Make private and add m_ prefix.
11515 (gdb_xml_parser::body_text): New method, based on ...
11516 (gdb_xml_body_text): ... this. Adjust.
11517 (gdb_xml_parser::vdebug): New method, based on ...
11518 (gdb_xml_debug): ... this. Adjust.
11519 (gdb_xml_parser::verror): New method, based on ...
11520 (gdb_xml_error): ... this. Adjust.
11521 (gdb_xml_parser::start_element): New method, based on ...
11522 (gdb_xml_start_element): ... this. Adjust.
11523 (gdb_xml_start_element_wrapper): Defer to
11524 gdb_xml_parser::start_element and gdb_xml_parser::set_error.
11525 (gdb_xml_parser::end_element): New method, based on ...
11526 (gdb_xml_end_element_wrapper): ... this. Adjust.
11527 (gdb_xml_parser::~gdb_xml_parser): Adjust.
11528 (gdb_xml_parser::gdb_xml_parser): Adjust to field renames.
11529 (gdb_xml_parser::use_dtd): New method, based on ...
11530 (gdb_xml_use_dtd): ... this. Adjust.
11531 (gdb_xml_parser::parse): New method, based on ...
11532 (gdb_xml_parse): ... this. Adjust.
11533 (gdb_xml_parse_quick): Adjust to call the parser's parse method.
11534 (xinclude_start_include): Adjust to call the parser's name method.
11535 (xml_xinclude_default, xml_xinclude_start_doctype)
11536 (xml_xinclude_end_doctype): Adjust to call the parser's user_data
11537 method.
11538 (xml_process_xincludes): Adjust to call parser methods.
11539 * xml-support.h (gdb_xml_use_dtd, gdb_xml_parse): Delete
11540 declarations.
11541
bd8a901f
PA
115422017-04-18 Pedro Alves <palves@redhat.com>
11543
11544 * tracefile-tfile.c (tfile_write_tdesc): Adjust to use
11545 gdb::optional<std::string>.
11546 * xml-support.c: Include <string>.
11547 (scope_level::scope_level(scope_level &&))
11548 (scope_level::~scope_level): Delete.
11549 (scope_level::body): Now a std::string.
11550 (gdb_xml_body_text, gdb_xml_end_element): Adjust.
11551 (xinclude_parsing_data::xinclude_parsing_data): Add 'output'
11552 parameter.
11553 (xinclude_parsing_data::~xinclude_parsing_data): Delete.
11554 (xinclude_parsing_data::output): Now a std::string reference.
11555 (xinclude_start_include): Adjust.
11556 (xml_xinclude_default): Adjust.
11557 (xml_process_xincludes): Add 'output' parameter, and return bool.
11558 * xml-support.h (xml_process_xincludes): Add 'output' parameter,
11559 and return bool.
11560 * xml-tdesc.c: Include <unordered_map> and <string>.
11561 (tdesc_xml_cache): Delete.
11562 (tdesc_xml_cache_s): Delete.
11563 (xml_cache): Now an std::unordered_map.
11564 (tdesc_parse_xml): Adjust to use std::string and unordered_map.
11565 (target_fetch_description_xml): Change return type to
11566 gdb::optional<std::string>, and adjust.
11567 * xml-tdesc.h: Include "common/gdb_optional.h" and <string>.
11568 (target_fetch_description_xml): Change return type to
11569 gdb::optional<std::string>.
11570
d35d1958
PA
115712017-04-18 Pedro Alves <palves@redhat.com>
11572
11573 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
11574 unittests/optional-selftests.c.
11575 (SUBDIR_UNITTESTS_OBS): Add optional-selftests.o.
11576 * unittests/optional-selftests.c: New file.
11577 * unittests/optional/assignment/1.cc: New file.
11578 * unittests/optional/assignment/2.cc: New file.
11579 * unittests/optional/assignment/3.cc: New file.
11580 * unittests/optional/assignment/4.cc: New file.
11581 * unittests/optional/assignment/5.cc: New file.
11582 * unittests/optional/assignment/6.cc: New file.
11583 * unittests/optional/assignment/7.cc: New file.
11584 * unittests/optional/cons/copy.cc: New file.
11585 * unittests/optional/cons/default.cc: New file.
11586 * unittests/optional/cons/move.cc: New file.
11587 * unittests/optional/cons/value.cc: New file.
11588 * unittests/optional/in_place.cc: New file.
11589 * unittests/optional/observers/1.cc: New file.
11590 * unittests/optional/observers/2.cc: New file.
11591
22796e97
PA
115922017-04-18 Pedro Alves <palves@redhat.com>
11593
11594 * common/gdb_optional.h: Include common/traits.h.
11595 (in_place_t): New type.
11596 (in_place): New constexpr variable.
11597 (optional::optional): Remove member initialization of
11598 m_instantiated.
11599 (optional::optional(in_place_t...)): New constructor.
11600 (optional::~optional): Use reset.
11601 (optional::optional(const optional&)): New.
11602 (optional::optional(const optional&&)): New.
11603 (optional::optional(T &)): New.
11604 (optional::optional(T &&)): New.
11605 (operator::operator=(const optional &)): New.
11606 (operator::operator=(optional &&)): New.
11607 (operator::operator= (const T &))
11608 (operator::operator= (T &&))
11609 (operator::emplace (Args &&... args)): Return a T&. Use reset.
11610 (operator::reset): New.
11611 (operator::m_instantiated):: Add in-class initializer.
11612 * common/traits.h: Include <type_traits>.
11613 (struct And): New types.
11614
a7fc9b61
PA
116152017-04-18 Pedro Alves <palves@redhat.com>
11616
11617 * xml-support.c: Include <vector>.
11618 (scope_level::scope_level(const gdb_xml_element *))
11619 (scope_level::scope_level(scope_level&&)): New.
11620 (scope_level::~scope_level): New.
11621 (scope_level_s): Delete.
11622 (gdb_xml_parser::scopes): Now a std::vector.
11623 (gdb_xml_body_text, gdb_xml_start_element, gdb_xml_end_element):
11624 Use std::vector.
11625 (gdb_xml_parser::~gdb_xml_parser): Remove now unnecessary
11626 scope cleanup code.
11627 (gdb_xml_parser::gdb_xml_parser): Remove explicit initialization
11628 of the scopes member. Use std::vector::emplace_back.
11629
010151c9
PA
116302017-04-18 Pedro Alves <palves@redhat.com>
11631
11632 * xml-support.c (gdb_xml_parser): Add ctor/dtor. Make is_xinclude
11633 a bool.
11634 (gdb_xml_end_element): Change type of first parameter.
11635 (gdb_xml_cleanup): Rename to ...
11636 (gdb_xml_parser::~gdb_xml_parser): ... this.
11637 (gdb_xml_create_parser_and_cleanup): Delete with ...
11638 (gdb_xml_parser::gdb_xml_parser): ... creation parts factored out
11639 to this new ctor.
11640 (gdb_xml_parse_quick): Create a local gdb_xml_parser instead of
11641 using gdb_xml_create_parser_and_cleanup.
11642 (xinclude_parsing_data): Add ctor/dtor.
11643 (xml_xinclude_cleanup): Delete.
11644 (xml_process_xincludes): Create a local xinclude_parsing_data
11645 instead of heap-allocating one. Create a local gdb_xml_parser
11646 instead of heap-allocating one with
11647 gdb_xml_create_parser_and_cleanup.
11648
d56060f0
JB
116492017-04-18 John Baldwin <jhb@FreeBSD.org>
11650
11651 PR threads/20743
11652 * fbsd-nat.c (resume_one_thread_cb): Remove.
11653 (resume_all_threads_cb): Remove.
11654 (fbsd_resume): Use ALL_NON_EXITED_THREADS instead of
11655 iterate_over_threads.
11656
305d16a9
JB
116572017-04-17 Joel Brobecker <brobecker@adacore.com>
11658
11659 * NEWS: Create a new section for the next release branch.
11660 Rename the section of the current branch, now that it has
11661 been cut.
11662
8bb57231
JB
116632017-04-17 Joel Brobecker <brobecker@adacore.com>
11664
11665 GDB 8.0 branch created (725bf5cf125783c2a7ca4ab63d3768e220bab2db):
11666 * version.in: Bump version to 8.0.50.DATE-git.
11667
096c92dd
SDJ
116682017-04-13 Sergio Durigan Junior <sergiodj@redhat.com>
11669
11670 PR gdb/21385
11671 * windows-nat.c (windows_create_inferior): Declare 'allargs'
11672 independently of the host, and fix build breakage on Cygwin.
11673
0550c955
PA
116742017-04-13 Pedro Alves <palves@redhat.com>
11675
11676 * inferior.c (free_inferior): Convert to ...
11677 (inferior::~inferior): ... this dtor.
11678 (inferior::inferior): New ctor, factored out from ...
11679 (add_inferior_silent): ... here. Allocate the inferior with a new
11680 expression.
11681 (delete_inferior): Call delete instead of free_inferior.
11682 * inferior.h (gdb_environ, continuation): Forward declare.
11683 (inferior): Now a class. Add in-class initialization to all
11684 members. Make boolean fields bool, except 'detaching'.
11685 (inferior::inferior): New explicit ctor.
11686 (inferior::~inferior): New.
11687
e3d60dfc
PA
116882017-04-13 Pedro Alves <palves@redhat.com>
11689
11690 * inferior.c (init_inferior_list): Delete.
11691 * inferior.h (init_inferior_list): Delete.
11692
5fd69d0a
PA
116932017-04-13 Pedro Alves <palves@redhat.com>
11694
11695 PR threads/13217
11696 * gdb.threads/threadapply.exp (thr_apply_detach): New procedure.
11697 (top level): Call it twice, with different thread sets.
11698
c6609450
PA
116992017-04-13 Pedro Alves <palves@redhat.com>
11700
11701 * thread.c: Include <algorithm>.
11702 (thread_array_cleanup): Delete.
11703 (scoped_inc_dec_ref): New class.
11704 (live_threads_count): New function.
11705 (set_thread_refcount): Delete.
11706 (tp_array_compar_ascending): Now a bool.
11707 (tp_array_compar): Convert to a std::sort comparison function.
11708 (thread_apply_all_command): Use std::vector and scoped_inc_dec_ref
11709 and live_threads_count.
11710
2a00d7ce
PA
117112017-04-13 Pedro Alves <palves@redhat.com>
11712
11713 * infrun.c (follow_fork_inferior): Also switch the current
11714 inferior.
11715
441d7c93
PA
117162017-04-13 Pedro Alves <palves@redhat.com>
11717
11718 * breakpoint.c (watch_command_1): Save watchpoint-frame info
11719 before calling create_internal_breakpoint.
11720
808480f6
PA
117212017-04-13 Pedro Alves <palves@redhat.com>
11722
11723 * fork-child.c (execv_argv): New class.
11724 (breakup_args): Refactored as ...
11725 (execv_argv::init_for_no_shell): .. this method of execv_argv.
11726 Copy arguments to storage and replace separators with NULL
11727 terminators in place.
11728 (escape_bang_in_quoted_argument): Adjust to return bool.
11729 (execv_argv::execv_argv): New ctor.
11730 (execv_argv::init_for_shell): New method, factored out from
11731 fork_inferior. Don't strdup strings into the vector.
11732 (fork_inferior): Eliminate "shell" local and use execv_argv. Use
11733 Remove free_vector_argv call.
11734
ad3d022a
YQ
117352017-04-13 Yao Qi <yao.qi@linaro.org>
11736
11737 * rx-tdep.c (rx_fpsw_type): Check tdep->rx_fpsw_type instead of
11738 tdep->rx_psw_type.
11739
e6ddc3bf
YQ
117402017-04-13 Yao Qi <yao.qi@linaro.org>
11741
11742 * rl78-tdep.c (rl78_gdbarch_init): Use XCNEW instead of XNEW.
11743 * rx-tdep.c (rx_gdbarch_init): Likewise.
11744
bfb8cf90
PA
117452017-04-13 Pedro Alves <palves@redhat.com>
11746
11747 * breakpoint.h (struct breakpoint): Reindent.
11748
f5336ca5
PA
117492017-04-13 Pedro Alves <palves@redhat.com>
11750
11751 * breakpoint.c (bp_location): Rename to ...
11752 (bp_locations): ... this. All references updated.
11753 (bp_location_count): Rename to ...
11754 (bp_locations_count): ... this. All references updated.
11755 (bp_location_placed_address_before_address_max): Rename to ...
11756 (bp_locations_placed_address_before_address_max): ... this. All
11757 references updated.
11758 (bp_location_shadow_len_after_address_max): Rename to ...
11759 (bp_locations_shadow_len_after_address_max): ... this. All
11760 references updated.
11761 (bp_location_compare_addrs): Rename to ...
11762 (bp_locations_compare_addrs): ... this. All references updated.
11763 (bp_location_compare):Rename to ...
11764 (bp_locations_compare): ... this. All references updated.
11765 (bp_location_target_extensions_update): Rename to ...
11766 (bp_locations_target_extensions_update): ... this. All references
11767 updated.
11768
be628ab8
SDJ
117692017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
11770
11771 * Makefile.in (HFILES_NO_SRCDIR): Add "common/gdb_termios.h".
11772 * common/common.m4: Check headers 'termios.h', 'termio.h' and
11773 'sgtty.h'.
11774 * common/gdb_termios.h: New file, with parts of "terminal.h".
11775 * inflow.c: Include "gdb_termios.h".
11776 * ser-unix.c: Include "gdb_termios.h".
11777 * terminal.h: Move terminal-related defines to
11778 "common/gdb_termios.h".
11779
8e9e35b1
TT
117802017-04-12 Tom Tromey <tom@tromey.com>
11781
11782 * probe.c (parse_probes): Update.
11783 * location.h (delete_event_location): Don't declare.
11784 (event_location_deleter::operator()): Update.
11785 * location.c (event_location_deleter::operator()): Rename from
11786 delete_event_location.
11787 * linespec.h (linespec_result) <location>: Change type to
11788 event_location_up.
11789 * linespec.c (canonicalize_linespec, event_location_to_sals)
11790 (decode_objc): Update.
11791 (linespec_result): Don't call delete_event_location.
11792 * breakpoint.c (create_breakpoints_sal)
11793 (bkpt_probe_create_sals_from_location)
11794 (strace_marker_create_sals_from_location): Update.
11795
16e802b9
TT
117962017-04-12 Tom Tromey <tom@tromey.com>
11797
11798 * linespec.h (struct linespec_result): Add constructor and
11799 destructor.
11800 (init_linespec_result, destroy_linespec_result)
11801 (make_cleanup_destroy_linespec_result): Don't declare.
11802 * linespec.c (init_linespec_result): Remove.
11803 (linespec_result::~linespec_result): Rename from
11804 destroy_linespec_result. Update.
11805 (cleanup_linespec_result, make_cleanup_destroy_linespec_result):
11806 Remove.
11807 * breakpoint.c (create_breakpoint, break_range_command)
11808 (decode_location_default): Update.
11809 * ax-gdb.c (agent_command_1): Update.
11810
d28cd78a
TT
118112017-04-12 Tom Tromey <tom@tromey.com>
11812
11813 * remote.c (remote_download_tracepoint): Update.
11814 * python/py-breakpoint.c (bppy_get_location): Update.
11815 * guile/scm-breakpoint.c (bpscm_print_breakpoint_smob)
11816 (gdbscm_breakpoint_location): Update.
11817 * elfread.c (elf_gnu_ifunc_resolver_return_stop): Update.
11818 * breakpoint.h (struct breakpoint) <location, location_range_end>:
11819 Change type to event_location_up.
11820 * breakpoint.c (create_overlay_event_breakpoint)
11821 (create_longjmp_master_breakpoint)
11822 (create_std_terminate_master_breakpoint)
11823 (create_exception_master_breakpoint)
11824 (breakpoint_event_location_empty_p, print_breakpoint_location)
11825 (print_one_breakpoint_location, create_thread_event_breakpoint)
11826 (init_breakpoint_sal, create_breakpoint)
11827 (print_recreate_ranged_breakpoint, break_range_command)
11828 (init_ada_exception_breakpoint, say_where): Update.
11829 (base_breakpoint_dtor): Don't call delete_event_location.
11830 (bkpt_print_recreate, tracepoint_print_recreate)
11831 (dprintf_print_recreate, update_static_tracepoint)
11832 (breakpoint_re_set_default): Update.
11833
711799d5
TT
118342017-04-12 Tom Tromey <tom@tromey.com>
11835
11836 * compile/compile-loc2c.c (compute_stack_depth_worker): Change
11837 type of "to_do". Update.
11838 (compute_stack_depth): Use std::vector.
11839
52d214d3
TT
118402017-04-12 Tom Tromey <tom@tromey.com>
11841
11842 * printcmd.c (find_instruction_backward): Use std::vector.
11843
4c404b8b
TT
118442017-04-12 Tom Tromey <tom@tromey.com>
11845
11846 * symfile.c (objfilep): Remove typedef.
11847 (reread_symbols): Use a std::vector.
11848
156d9eab
TT
118492017-04-12 Tom Tromey <tom@tromey.com>
11850
11851 * mi/mi-main.c (exec_direction_forward): Remove.
11852 (exec_reverse_continue, mi_execute_command): Use scoped_restore.
11853 * guile/scm-ports.c (ioscm_with_output_to_port_worker): Use
11854 scoped_restore.
11855 * guile/guile.c (guile_repl_command, guile_command)
11856 (gdbscm_execute_gdb_command): Use scoped_restore.
11857 * go-exp.y (go_parse): Use scoped_restore.
11858 * d-exp.y (d_parse): Use scoped_restore.
11859 * cli/cli-decode.c (cmd_func): Use scoped_restore.
11860 * c-exp.y (c_parse): Use scoped_restore.
11861
4d89769a
TT
118622017-04-12 Tom Tromey <tom@tromey.com>
11863
11864 * mi/mi-parse.h (struct mi_parse): Add constructor, destructor.
11865 (mi_parse): Update return type.
11866 (mi_parse_free): Remove.
11867 * mi/mi-parse.c (mi_parse::mi_parse): New constructor.
11868 (mi_parse::~mi_parse): Rename from mi_parse_free.
11869 (mi_parse_cleanup): Remove.
11870 (mi_parse): Return a unique_ptr. Use new.
11871 * mi/mi-main.c (mi_execute_command): Update.
11872
4b217cc7
TT
118732017-04-12 Tom Tromey <tom@tromey.com>
11874
11875 * location.c (explicit_location_lex_one): Return a
11876 unique_xmalloc_ptr.
11877 (string_to_explicit_location): Update. Remove cleanups.
11878
59d3651b
TT
118792017-04-12 Tom Tromey <tom@tromey.com>
11880
11881 * gnu-v3-abi.c (value_and_voffset_p): Remove typedef.
11882 (compare_value_and_voffset): Change type. Update.
11883 (compute_vtable_size): Change type of "offset_vec".
11884 (gnuv3_print_vtable): Use std::vector. Remove cleanups.
11885 (gnuv3_get_typeid): Remove extraneous declaration.
11886
b24b0d6c
TT
118872017-04-12 Tom Tromey <tom@tromey.com>
11888
11889 * charset.h (wchar_iterator): Fix comment.
11890
80a3b8c5
TT
118912017-04-12 Tom Tromey <tom@tromey.com>
11892
11893 * charset.c (iconv_wrapper): New class.
11894 (cleanup_iconv): Remove.
11895 (convert_between_encodings): Use it.
11896
c83dd867
TT
118972017-04-12 Tom Tromey <tom@tromey.com>
11898
11899 * symfile.h (increment_reading_symtab): Update type.
11900 * symfile.c (decrement_reading_symtab): Remove.
11901 (increment_reading_symtab): Return a scoped_restore_tmpl<int>.
11902 * psymtab.c (psymtab_to_symtab): Update.
11903 * dwarf2read.c (dw2_instantiate_symtab): Update.
11904
0e8621a0
TT
119052017-04-12 Tom Tromey <tom@tromey.com>
11906
11907 * jit.c (struct jit_reader): Declare separately. Add constructor
11908 and destructor. Change type of "handle".
11909 (loaded_jit_reader): Define separately.
11910 (jit_reader_load): Update. New "new".
11911 (jit_reader_unload_command): Use "delete".
11912 * gdb-dlfcn.h (struct dlclose_deleter): New.
11913 (gdb_dlhandle_up): New typedef.
11914 (gdb_dlopen, gdb_dlsym): Update types.
11915 (gdb_dlclose): Remove.
11916 * gdb-dlfcn.c (gdb_dlopen): Return a gdb_dlhandle_up.
11917 (gdb_dlsym): Change type of "handle".
11918 (make_cleanup_dlclose): Remove.
11919 (dlclose_deleter::operator()): Rename from gdb_dlclose.
11920 * compile/compile-c-support.c (load_libcc): Update.
11921
67d89901
TT
119222017-04-12 Tom Tromey <tom@tromey.com>
11923
11924 * symtab.h (find_pcs_for_symtab_line): Change return type.
11925 * symtab.c (find_pcs_for_symtab_line): Change return type.
11926 * python/py-linetable.c (build_line_table_tuple_from_pcs): Change
11927 type of "vec". Update.
11928 (ltpy_get_pcs_for_line): Update.
11929 * linespec.c (decode_digits_ordinary): Update.
11930
93921405
TT
119312017-04-12 Tom Tromey <tom@tromey.com>
11932
11933 * tracepoint.c (actions_command): Update.
11934 * python/python.c (python_command, python_interactive_command):
11935 Update.
11936 * mi/mi-cmd-break.c (mi_cmd_break_commands): Update.
11937 * guile/guile.c (guile_command): Update.
11938 * defs.h (read_command_lines, read_command_lines_1): Return
11939 command_line_up.
11940 (command_lines_deleter): New struct.
11941 (command_line_up): New typedef.
11942 * compile/compile.c (compile_code_command)
11943 (compile_print_command): Update.
11944 * cli/cli-script.h (get_command_line, copy_command_lines): Return
11945 command_line_up.
11946 (make_cleanup_free_command_lines): Remove.
11947 * cli/cli-script.c (get_command_line, read_command_lines_1)
11948 (copy_command_lines): Return command_line_up.
11949 (while_command, if_command, read_command_lines, define_command)
11950 (document_command): Update.
11951 (do_free_command_lines_cleanup, make_cleanup_free_command_lines):
11952 Remove.
11953 * breakpoint.h (breakpoint_set_commands): Change type of
11954 "commands".
11955 * breakpoint.c (breakpoint_set_commands): Change type of
11956 "commands". Update.
11957 (do_map_commands_command, update_dprintf_command_list)
11958 (create_tracepoint_from_upload): Update.
11959
ffc2605c
TT
119602017-04-12 Tom Tromey <tom@tromey.com>
11961
11962 * tracepoint.c (scope_info): Update.
11963 * spu-tdep.c (spu_catch_start): Update.
11964 * python/python.c (gdbpy_decode_line): Update.
11965 * python/py-finishbreakpoint.c (bpfinishpy_init): Update.
11966 * python/py-breakpoint.c (bppy_init): Update.
11967 * probe.c (parse_probes): Update.
11968 * mi/mi-cmd-break.c (mi_cmd_break_insert_1): Update.
11969 * location.h (event_location_deleter): New struct.
11970 (event_location_up): New typedef.
11971 (new_linespec_location, new_address_location, new_probe_location)
11972 (new_explicit_location, copy_event_location)
11973 (string_to_event_location, string_to_event_location_basic)
11974 (string_to_explicit_location): Update return type.
11975 (make_cleanup_delete_event_location): Remove.
11976 * location.c (new_linespec_location, new_address_location)
11977 (new_probe_location, new_explicit_location, copy_event_location):
11978 Return event_location_up.
11979 (delete_event_location_cleanup)
11980 (make_cleanup_delete_event_location): Remove.
11981 (string_to_explicit_location, string_to_event_location_basic)
11982 (string_to_event_location): Return event_location_up.
11983 * linespec.c (canonicalize_linespec, event_location_to_sals)
11984 (decode_line_with_current_source)
11985 (decode_line_with_last_displayed, decode_objc): Update.
11986 * guile/scm-breakpoint.c (gdbscm_register_breakpoint_x): Update.
11987 * completer.c (location_completer): Update.
11988 * cli/cli-cmds.c (edit_command, list_command): Update.
11989 * breakpoint.c (create_overlay_event_breakpoint)
11990 (create_longjmp_master_breakpoint)
11991 (create_std_terminate_master_breakpoint)
11992 (create_exception_master_breakpoint)
11993 (create_thread_event_breakpoint): Update.
11994 (init_breakpoint_sal): Update. Remove some dead code.
11995 (create_breakpoint_sal): Change type of "location". Update.
11996 (create_breakpoints_sal, create_breakpoint, break_command_1)
11997 (dprintf_command, break_range_command, until_break_command)
11998 (init_ada_exception_breakpoint)
11999 (strace_marker_create_sals_from_location)
12000 (update_static_tracepoint, trace_command, ftrace_command)
12001 (strace_command, create_tracepoint_from_upload): Update.
12002 * break-catch-throw.c (re_set_exception_catchpoint): Update.
12003 * ax-gdb.c (agent_command_1): Update.
12004
8f10c932
PA
120052017-04-12 Pedro Alves <palves@redhat.com>
12006
12007 * Makefile.in (ALL_TARGET_OBS): Add i386-go32-tdep.o.
12008 * configure.tgt: Handle i[34567]86-*-go32* and
12009 i[34567]86-*-msdosdjgpp*.
12010 * i386-tdep.c (i386_svr4_reg_to_regnum):
12011 Make extern.
12012 (i386_go32_init_abi, i386_coff_osabi_sniffer): Moved to
12013 i386-go32-tdep.c.
12014 (_initialize_i386_tdep): DJGPP bits moved to i386-go32-tdep.c.
12015 * i386-go32-tdep.c: New file.
12016 * i386-tdep.h (tdesc_i386_mmx, i386_svr4_reg_to_regnum): New
12017 declarations.
12018
0a31ccfb
SM
120192017-04-12 Simon Marchi <simon.marchi@ericsson.com>
12020
12021 * aix-thread.c (pd_status2str): Change return type to const char *.
12022
e9bb3fbb
PA
120232017-04-12 Pedro Alves <palves@redhat.com>
12024
12025 * i386-tdep.c (i386_elf_init_abi, i386_go32_init_abi): Remove
12026 calls to set_gdbarch_gnu_triplet_regexp.
12027
53375380
PA
120282017-04-12 Pedro Alves <palves@redhat.com>
12029
12030 PR gdb/21323
12031 * c-lang.c (cplus_primitive_types) <cplus_primitive_type_wchar_t>:
12032 New enum value.
12033 (cplus_language_arch_info): Register cplus_primitive_type_wchar_t.
12034 * gdbtypes.h (struct builtin_type) <builtin_wchar>: New field.
12035 * gdbtypes.c (gdbtypes_post_init): Create the "wchar_t" type.
12036 * gdbarch.sh (wchar_bit, wchar_signed): New per-arch values.
12037 * gdbarch.h, gdbarch.c: Regenerate.
12038 * aarch64-tdep.c (aarch64_gdbarch_init): Override
12039 gdbarch_wchar_bit and gdbarch_wchar_signed.
12040 * alpha-tdep.c (alpha_gdbarch_init): Likewise.
12041 * arm-tdep.c (arm_gdbarch_init): Likewise.
12042 * avr-tdep.c (avr_gdbarch_init): Likewise.
12043 * h8300-tdep.c (h8300_gdbarch_init): Likewise.
12044 * i386-nto-tdep.c (i386nto_init_abi): Likewise.
12045 * i386-tdep.c (i386_go32_init_abi): Likewise.
12046 * m32r-tdep.c (m32r_gdbarch_init): Likewise.
12047 * moxie-tdep.c (moxie_gdbarch_init): Likewise.
12048 * nds32-tdep.c (nds32_gdbarch_init): Likewise.
12049 * rs6000-aix-tdep.c (rs6000_aix_init_osabi): Likewise.
12050 * sh-tdep.c (sh_gdbarch_init): Likewise.
12051 * sparc-tdep.c (sparc32_gdbarch_init): Likewise.
12052 * sparc64-tdep.c (sparc64_init_abi): Likewise.
12053 * windows-tdep.c (windows_init_abi): Likewise.
12054 * xstormy16-tdep.c (xstormy16_gdbarch_init): Likewise.
12055
53e710ac
PA
120562017-04-12 Pedro Alves <palves@redhat.com>
12057
12058 PR c++/21323
12059 * c-lang.c (cplus_primitive_types) <cplus_primitive_type_char16_t,
12060 cplus_primitive_type_char32_t>: New enum values.
12061 (cplus_language_arch_info): Register cplus_primitive_type_char16_t
12062 and cplus_primitive_type_char32_t.
12063 * dwarf2read.c (read_base_type) <DW_ATE_UTF>: If bit size is 16 or
12064 32, use the archtecture's built-in type for char16_t and char32_t,
12065 respectively. Otherwise, fallback to init_integer_type as before,
12066 but make the type unsigned, and issue a complaint.
12067 * gdbtypes.c (gdbtypes_post_init): Make char16_t and char32_t unsigned.
12068
ab0538b8
AH
120692017-04-12 Alan Hayward <alan.hayward@arm.com>
12070
5e0e0422 12071 * m32r-tdep.c (M32R_ARG_REGISTER_SIZE): Added.
ab0538b8
AH
12072 (m32r_push_dummy_call): Use M32R_ARG_REGISTER_SIZE.
12073
5430098f
SDJ
120742017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
12075
12076 * windows-nat.c (windows_create_inferior): Declare 'toexec' as
12077 'const char *'.
12078
7c5ded6a
SDJ
120792017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
12080
12081 * common/common-utils.c (free_vector_argv): New function.
12082 * common/common-utils.h: Include <vector>.
12083 (free_vector_argv): New prototype.
12084 * darwin-nat.c (darwin_create_inferior): Rewrite function
12085 prototype in order to constify "exec_file" and accept a
12086 "std::string" for "allargs".
12087 * fork-child.c: Include <vector>.
12088 (breakup_args): Rewrite function, using C++.
12089 (fork_inferior): Rewrite function header, constify "exec_file_arg"
12090 and accept "std::string" for "allargs". Update the code to
12091 calculate "argv" based on "allargs". Update calls to "exec_fun"
12092 and "execvp".
12093 * gnu-nat.c (gnu_create_inferior): Rewrite function prototype in
12094 order to constify "exec_file" and accept a "std::string" for
12095 "allargs".
12096 * go32-nat.c (go32_create_inferior): Likewise.
12097 * inf-ptrace.c (inf_ptrace_create_inferior): Likewise.
12098 * infcmd.c (run_command_1): Constify "exec_file". Use
12099 "std::string" for inferior arguments.
12100 * inferior.h (fork_inferior): Update prototype.
12101 * linux-nat.c (linux_nat_create_inferior): Rewrite function
12102 prototype in order to constify "exec_file" and accept a
12103 "std::string" for "allargs".
12104 * nto-procfs.c (procfs_create_inferior): Likewise.
12105 * procfs.c (procfs_create_inferior): Likewise.
12106 * remote-sim.c (gdbsim_create_inferior): Likewise.
12107 * remote.c (extended_remote_run): Update code to accept
12108 "std::string" as argument.
12109 (extended_remote_create_inferior): Rewrite function prototype in
12110 order to constify "exec_file" and accept a "std::string" for
12111 "allargs".
12112 * rs6000-nat.c (super_create_inferior): Likewise.
12113 (rs6000_create_inferior): Likewise.
12114 * target.h (struct target_ops) <to_create_inferior>: Likewise.
12115 * windows-nat.c (windows_create_inferior): Likewise.
12116
ae0eee42
PA
121172017-04-11 Pedro Alves <palves@redhat.com>
12118
12119 * thread.c: Fix whitespace throughout.
12120
a6acac06
PR
121212017-04-11 Philipp Rudo <prudo@linux.vnet.ibm.com>
12122
12123 * linux-nat.c (linux_nat_detach): Remove delete_lwp call.
12124
64403bd1
AH
121252017-04-11 Alan Hayward <alan.hayward@arm.com>
12126
12127 * arm-tdep.c (arm_store_return_value): Use FP_REGISTER_SIZE
12128
a5bef50f
SDJ
121292017-04-10 Sergio Durigan Junior <sergiodj@redhat.com>
12130
12131 PR gdb/21364
12132 * osdata.c (info_osdata): Check if 'type' is an empty string
12133 instead of NULL.
12134
9295a5a9
PA
121352017-04-10 Pedro Alves <palves@redhat.com>
12136
12137 * thread.c (add_thread_silent, delete_thread_1, find_thread_ptid)
12138 (ptid_to_global_thread_id, in_thread_list)
12139 (do_captured_list_thread_ids, set_resumed, set_running)
12140 (set_executing, set_stop_requested, finish_thread_state)
12141 (validate_registers_access, can_access_registers_ptid)
12142 (print_thread_info_1, switch_to_thread)
12143 (do_restore_current_thread_cleanup)
12144 (make_cleanup_restore_current_thread, thread_command)
12145 (thread_name_command): Use operator== instead of ptid_equal.
12146
996812e3
PA
121472017-04-10 Pedro Alves <palves@redhat.com>
12148
12149 * thread.c (struct current_thread_cleanup) <next>: Delete field.
12150 (current_thread_cleanup_chain): Delete.
12151 (restore_current_thread_cleanup_dtor)
12152 (make_cleanup_restore_current_thread): Remove references to
12153 current_thread_cleanup_chain.
12154
845b344f
AH
121552017-04-10 Alan Hayward <alan.hayward@arm.com>
12156
12157 * msp430-tdep.c (msp430_pseudo_register_read): Never return
12158 REG_UNKNOWN.
12159
803bdfe4
YQ
121602017-04-10 Yao Qi <yao.qi@linaro.org>
12161
12162 PR gdb/19942
12163 * gdbthread.h (thread_info::deletable): New method.
12164 (thread_info::incref): New method.
12165 (thread_info::decref): New method.
12166 (thread_info::refcount): Move it to private.
12167 * infrun.c (save_stop_context): Call inc_refcount.
12168 (release_stop_context_cleanup): Likewise.
12169 * thread.c (set_thread_exited): New function.
12170 (init_thread_list): Delete "tp" only it is deletable, otherwise
12171 call set_thread_exited.
12172 (delete_thread_1): Call set_thread_exited.
12173 (current_thread_cleanup) <inferior_pid>: Remove.
12174 <thread>: New field.
12175 (restore_current_thread_ptid_changed): Removed.
12176 (do_restore_current_thread_cleanup): Adjust.
12177 (restore_current_thread_cleanup_dtor): Don't call
12178 find_thread_ptid.
12179 (set_thread_refcount): Use dec_refcount.
12180 (make_cleanup_restore_current_thread): Adjust.
12181 (thread_apply_all_command): Call inc_refcount.
12182 (_initialize_thread): Don't call
12183 observer_attach_thread_ptid_changed.
12184
8c25b497
YQ
121852017-04-10 Yao Qi <yao.qi@linaro.org>
12186
12187 * thread.c (delete_thread_1): Hoist code on marking thread as
12188 exited.
12189
8473b447
SM
121902017-04-09 Simon Marchi <simon.marchi@polymtl.ca>
12191
12192 * windows-nat.c (windows_detach): Initialize ptid with
12193 minus_one_ptid.
12194
6670ec13
SM
121952017-04-07 Simon Marchi <simon.marchi@ericsson.com>
12196
12197 * unittests/ptid-selftests.c: Fix erroneous assert messages.
12198
ba2f91bb
AH
121992017-04-07 Alan Hayward <alan.hayward@arm.com>
12200
12201 * bfin-tdep.c (BFIN_MAX_REGISTER_SIZE): Add.
12202 (bfin_pseudo_register_read): Use BFIN_MAX_REGISTER_SIZE.
12203 (bfin_pseudo_register_write): Likewise
12204
436252de
SM
122052017-04-06 Simon Marchi <simon.marchi@ericsson.com>
12206
12207 * common/ptid.h (struct ptid): Change to...
12208 (class ptid_t): ... this.
12209 <ptid_t>: New constructors.
12210 <pid, lwp_p, lwp, tid_p, tid, is_pid, operator==, operator!=,
12211 matches>: New methods.
12212 <make_null, make_minus_one>: New static methods.
12213 <pid>: Rename to...
12214 <m_pid>: ...this.
12215 <lwp>: Rename to...
12216 <m_lwp>: ...this.
12217 <tid>: Rename to...
12218 <m_tid>: ...this.
12219 (ptid_build, ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal,
12220 ptid_is_pid, ptid_lwp_p, ptid_tid_p, ptid_match): Take ptid arguments
12221 as references, move comment to class ptid_t.
12222 * common/ptid.c (null_ptid, minus_one_ptid): Initialize with
12223 ptid_t static methods.
12224 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_tid,
12225 ptid_equal, ptid_is_pid, ptid_lwp_p, ptid_tid_p, ptid_match):
12226 Take ptid arguments as references, implement using ptid_t methods.
12227 * unittests/ptid-selftests.c: New file.
12228 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
12229 unittests/ptid-selftests.c.
12230 (SUBDIR_UNITTESTS_OBS): Add unittests/ptid-selftests.o.
12231
0dedf377
TP
122322017-04-06 Thomas Preud'homme <thomas.preudhomme@arm.com>
12233
12234 * python/python.c (python_run_simple_file): Cast mode literal to
12235 non-const char pointer as expected by PyFile_FromString.
12236
4e9868d4
SM
122372017-04-05 Simon Marchi <simon.marchi@ericsson.com>
12238
12239 * common/ptid.c (ptid_lwp_p, ptid_tid_p): Remove comparison with
12240 minus_one_ptid and null_ptid.
12241
9bf2a700
PA
122422017-04-05 Pedro Alves <palves@redhat.com>
12243
12244 * warning.m4 (build_warnings): Remove -Wno-write-strings.
12245 * configure: Regenerate.
12246
a121b7c1
PA
122472017-04-05 Pedro Alves <palves@redhat.com>
12248
12249 * ada-exp.y (yyerror): Constify.
12250 * ada-lang.c (bound_name, get_selections)
12251 (ada_variant_discrim_type)
12252 (ada_variant_discrim_name, ada_value_struct_elt)
12253 (ada_lookup_struct_elt_type, is_unchecked_variant)
12254 (ada_which_variant_applies, standard_exc, ada_get_next_arg)
12255 (catch_ada_exception_command_split)
12256 (catch_ada_assert_command_split, catch_assert_command)
12257 (ada_op_name): Constify.
12258 * ada-lang.h (ada_yyerror, get_selections)
12259 (ada_variant_discrim_name, ada_value_struct_elt): Constify.
12260 * arc-tdep.c (arc_print_frame_cache): Constify.
12261 * arm-tdep.c (arm_skip_stub): Constify.
12262 * ax-gdb.c (gen_binop, gen_struct_ref_recursive, gen_struct_ref)
12263 (gen_aggregate_elt_ref): Constify.
12264 * bcache.c (print_bcache_statistics): Constify.
12265 * bcache.h (print_bcache_statistics): Constify.
12266 * break-catch-throw.c (catch_exception_command_1):
12267 * breakpoint.c (struct ep_type_description::description):
12268 Constify.
12269 (add_solib_catchpoint): Constify.
12270 (catch_fork_command_1): Add cast.
12271 (add_catch_command): Constify.
12272 * breakpoint.h (add_catch_command, add_solib_catchpoint):
12273 Constify.
12274 * bsd-uthread.c (bsd_uthread_state): Constify.
12275 * buildsym.c (patch_subfile_names): Constify.
12276 * buildsym.h (next_symbol_text_func, patch_subfile_names):
12277 Constify.
12278 * c-exp.y (yyerror): Constify.
12279 (token::oper): Constify.
12280 * c-lang.h (c_yyerror, cp_print_class_member): Constify.
12281 * c-varobj.c (cplus_describe_child): Constify.
12282 * charset.c (find_charset_names): Add cast.
12283 (find_charset_names): Constify array and add const_cast.
12284 * cli/cli-cmds.c (complete_command, cd_command): Constify.
12285 (edit_command): Constify.
12286 * cli/cli-decode.c (lookup_cmd): Constify.
12287 * cli/cli-dump.c (dump_memory_command, dump_value_command):
12288 Constify.
12289 (struct dump_context): Constify.
12290 (add_dump_command, restore_command): Constify.
12291 * cli/cli-script.c (get_command_line): Constify.
12292 * cli/cli-script.h (get_command_line): Constify.
12293 * cli/cli-utils.c (check_for_argument): Constify.
12294 * cli/cli-utils.h (check_for_argument): Constify.
12295 * coff-pe-read.c (struct read_pe_section_data): Constify.
12296 * command.h (lookup_cmd): Constify.
12297 * common/print-utils.c (decimal2str): Constify.
12298 * completer.c (gdb_print_filename): Constify.
12299 * corefile.c (set_gnutarget): Constify.
12300 * cp-name-parser.y (yyerror): Constify.
12301 * cp-valprint.c (cp_print_class_member): Constify.
12302 * cris-tdep.c (cris_register_name, crisv32_register_name):
12303 Constify.
12304 * d-exp.y (yyerror): Constify.
12305 (struct token::oper): Constify.
12306 * d-lang.h (d_yyerror): Constify.
12307 * dbxread.c (struct header_file_location::name): Constify.
12308 (add_old_header_file, add_new_header_file, last_function_name)
12309 (dbx_next_symbol_text, add_bincl_to_list)
12310 (find_corresponding_bincl_psymtab, set_namestring)
12311 (find_stab_function_addr, read_dbx_symtab, start_psymtab)
12312 (dbx_end_psymtab, read_ofile_symtab, process_one_symbol):
12313 * defs.h (command_line_input, print_address_symbolic)
12314 (deprecated_readline_begin_hook): Constify.
12315 * dwarf2read.c (anonymous_struct_prefix, dwarf_bool_name):
12316 Constify.
12317 * event-top.c (handle_line_of_input): Constify and add cast.
12318 * exceptions.c (catch_errors): Constify.
12319 * exceptions.h (catch_errors): Constify.
12320 * expprint.c (print_subexp_standard, op_string, op_name)
12321 (op_name_standard, dump_raw_expression, dump_raw_expression):
12322 * expression.h (op_name, op_string, dump_raw_expression):
12323 Constify.
12324 * f-exp.y (yyerror): Constify.
12325 (struct token::oper): Constify.
12326 (struct f77_boolean_val::name): Constify.
12327 * f-lang.c (f_word_break_characters): Constify.
12328 * f-lang.h (f_yyerror): Constify.
12329 * fork-child.c (fork_inferior): Add cast.
12330 * frv-tdep.c (struct gdbarch_tdep::register_names): Constify.
12331 (new_variant): Constify.
12332 * gdbarch.sh (pstring_ptr, pstring_list): Constify.
12333 * gdbarch.c: Regenerate.
12334 * gdbcore.h (set_gnutarget): Constify.
12335 * go-exp.y (yyerror): Constify.
12336 (token::oper): Constify.
12337 * go-lang.h (go_yyerror): Constify.
12338 * go32-nat.c (go32_sysinfo): Constify.
12339 * guile/scm-breakpoint.c (gdbscm_breakpoint_expression): Constify.
12340 * guile/scm-cmd.c (cmdscm_function): Constify.
12341 * guile/scm-param.c (pascm_param_value): Constify.
12342 * h8300-tdep.c (h8300_register_name, h8300s_register_name)
12343 (h8300sx_register_name): Constify.
12344 * hppa-tdep.c (hppa32_register_name, hppa64_register_name):
12345 Constify.
12346 * ia64-tdep.c (ia64_register_names): Constify.
12347 * infcmd.c (construct_inferior_arguments): Constify.
12348 (path_command, attach_post_wait): Constify.
12349 * language.c (show_range_command, show_case_command)
12350 (unk_lang_error): Constify.
12351 * language.h (language_defn::la_error)
12352 (language_defn::la_name_of_this): Constify.
12353 * linespec.c (decode_line_2): Constify.
12354 * linux-thread-db.c (thread_db_err_str): Constify.
12355 * lm32-tdep.c (lm32_register_name): Constify.
12356 * m2-exp.y (yyerror): Constify.
12357 * m2-lang.h (m2_yyerror): Constify.
12358 * m32r-tdep.c (m32r_register_names): Constify and make static.
12359 * m68hc11-tdep.c (m68hc11_register_names): Constify.
12360 * m88k-tdep.c (m88k_register_name): Constify.
12361 * macroexp.c (appendmem): Constify.
12362 * mdebugread.c (fdr_name, add_data_symbol, parse_type)
12363 (upgrade_type, parse_external, parse_partial_symbols)
12364 (mdebug_next_symbol_text, cross_ref, mylookup_symbol, new_psymtab)
12365 (new_symbol): Constify.
12366 * memattr.c (mem_info_command): Constify.
12367 * mep-tdep.c (register_name_from_keyword): Constify.
12368 * mi/mi-cmd-env.c (mi_cmd_env_path, _initialize_mi_cmd_env):
12369 Constify.
12370 * mi/mi-cmd-stack.c (list_args_or_locals): Constify.
12371 * mi/mi-cmd-var.c (mi_cmd_var_show_attributes): Constify.
12372 * mi/mi-main.c (captured_mi_execute_command): Constify and add
12373 cast.
12374 (mi_execute_async_cli_command): Constify.
12375 * mips-tdep.c (mips_register_name): Constify.
12376 * mn10300-tdep.c (register_name, mn10300_generic_register_name)
12377 (am33_register_name, am33_2_register_name)
12378 * moxie-tdep.c (moxie_register_names): Constify.
12379 * nat/linux-osdata.c (osdata_type): Constify fields.
12380 * nto-tdep.c (nto_parse_redirection): Constify.
12381 * objc-lang.c (lookup_struct_typedef, lookup_objc_class)
12382 (lookup_child_selector): Constify.
12383 (objc_methcall::name): Constify.
12384 * objc-lang.h (lookup_objc_class, lookup_child_selector)
12385 (lookup_struct_typedef): Constify.
12386 * objfiles.c (pc_in_section): Constify.
12387 * objfiles.h (pc_in_section): Constify.
12388 * p-exp.y (struct token::oper): Constify.
12389 (yyerror): Constify.
12390 * p-lang.h (pascal_yyerror): Constify.
12391 * parser-defs.h (op_name_standard): Constify.
12392 (op_print::string): Constify.
12393 (exp_descriptor::op_name): Constify.
12394 * printcmd.c (print_address_symbolic): Constify.
12395 * psymtab.c (print_partial_symbols): Constify.
12396 * python/py-breakpoint.c (stop_func): Constify.
12397 (bppy_get_expression): Constify.
12398 * python/py-cmd.c (cmdpy_completer::name): Constify.
12399 (cmdpy_function): Constify.
12400 * python/py-event.c (evpy_add_attribute)
12401 (gdbpy_initialize_event_generic): Constify.
12402 * python/py-event.h (evpy_add_attribute)
12403 (gdbpy_initialize_event_generic): Constify.
12404 * python/py-evts.c (add_new_registry): Constify.
12405 * python/py-finishbreakpoint.c (outofscope_func): Constify.
12406 * python/py-framefilter.c (get_py_iter_from_func): Constify.
12407 * python/py-inferior.c (get_buffer): Add cast.
12408 * python/py-param.c (parm_constant::name): Constify.
12409 * python/py-unwind.c (fprint_frame_id): Constify.
12410 * python/python.c (gdbpy_parameter_value): Constify.
12411 * remote-fileio.c (remote_fio_func_map): Make 'name' const.
12412 * remote.c (memory_packet_config::name): Constify.
12413 (show_packet_config_cmd, remote_write_bytes)
12414 (remote_buffer_add_string):
12415 * reverse.c (exec_reverse_once): Constify.
12416 * rs6000-tdep.c (variant::name, variant::description): Constify.
12417 * rust-exp.y (rustyyerror): Constify.
12418 * rust-lang.c (rust_op_name): Constify.
12419 * rust-lang.h (rustyyerror): Constify.
12420 * serial.h (serial_ops::name): Constify.
12421 * sh-tdep.c (sh_sh_register_name, sh_sh3_register_name)
12422 (sh_sh3e_register_name, sh_sh2e_register_name)
12423 (sh_sh2a_register_name, sh_sh2a_nofpu_register_name)
12424 (sh_sh_dsp_register_name, sh_sh3_dsp_register_name)
12425 (sh_sh4_register_name, sh_sh4_nofpu_register_name)
12426 (sh_sh4al_dsp_register_name): Constify.
12427 * sh64-tdep.c (sh64_register_name): Constify.
12428 * solib-darwin.c (lookup_symbol_from_bfd): Constify.
12429 * spu-tdep.c (spu_register_name, info_spu_dma_cmdlist): Constify.
12430 * stabsread.c (patch_block_stabs, read_type_number)
12431 (ref_map::stabs, ref_add, process_reference)
12432 (symbol_reference_defined, define_symbol, define_symbol)
12433 (error_type, read_type, read_member_functions, read_cpp_abbrev)
12434 (read_one_struct_field, read_struct_fields, read_baseclasses)
12435 (read_tilde_fields, read_struct_type, read_array_type)
12436 (read_enum_type, read_sun_builtin_type, read_sun_floating_type)
12437 (read_huge_number, read_range_type, read_args, common_block_start)
12438 (find_name_end): Constify.
12439 * stabsread.h (common_block_start, define_symbol)
12440 (process_one_symbol, symbol_reference_defined, ref_add):
12441 * symfile.c (get_section_index, add_symbol_file_command):
12442 * symfile.h (get_section_index): Constify.
12443 * target-descriptions.c (tdesc_type::name): Constify.
12444 (tdesc_free_type): Add cast.
12445 * target.c (find_default_run_target):
12446 (add_deprecated_target_alias, find_default_run_target)
12447 (target_announce_detach): Constify.
12448 (do_option): Constify.
12449 * target.h (add_deprecated_target_alias): Constify.
12450 * thread.c (print_thread_info_1): Constify.
12451 * top.c (deprecated_readline_begin_hook, command_line_input):
12452 Constify.
12453 (init_main): Add casts.
12454 * top.h (handle_line_of_input): Constify.
12455 * tracefile-tfile.c (tfile_write_uploaded_tsv): Constify.
12456 * tracepoint.c (tvariables_info_1, trace_status_mi): Constify.
12457 (tfind_command): Rename to ...
12458 (tfind_command_1): ... this and constify.
12459 (tfind_command): New function.
12460 (tfind_end_command, tfind_start_command): Adjust.
12461 (encode_source_string): Constify.
12462 * tracepoint.h (encode_source_string): Constify.
12463 * tui/tui-data.c (tui_partial_win_by_name): Constify.
12464 * tui/tui-data.h (tui_partial_win_by_name): Constify.
12465 * tui/tui-source.c (tui_set_source_content_nil): Constify.
12466 * tui/tui-source.h (tui_set_source_content_nil): Constify.
12467 * tui/tui-win.c (parse_scrolling_args): Constify.
12468 * tui/tui-windata.c (tui_erase_data_content): Constify.
12469 * tui/tui-windata.h (tui_erase_data_content): Constify.
12470 * tui/tui-winsource.c (tui_erase_source_content): Constify.
12471 * tui/tui.c (tui_enable): Add cast.
12472 * utils.c (defaulted_query): Constify.
12473 (init_page_info): Add cast.
12474 (puts_debug, subset_compare): Constify.
12475 * utils.h (subset_compare): Constify.
12476 * varobj.c (varobj_format_string): Constify.
12477 * varobj.h (varobj_format_string): Constify.
12478 * vax-tdep.c (vax_register_name): Constify.
12479 * windows-nat.c (windows_detach): Constify.
12480 * xcoffread.c (process_linenos, xcoff_next_symbol_text): Constify.
12481 * xml-support.c (gdb_xml_end_element): Constify.
12482 * xml-tdesc.c (tdesc_start_reg): Constify.
12483 * xstormy16-tdep.c (xstormy16_register_name): Constify.
12484 * xtensa-tdep.c (xtensa_find_register_by_name): Constify.
12485 * xtensa-tdep.h (xtensa_register_t::name): Constify.
12486
995816ba
PA
124872017-04-05 Pedro Alves <palves@redhat.com>
12488
12489 * proc-api.c (struct trans): Constify.
12490 (procfs_note): Constify.
12491 * proc-events.c (struct trans, syscall_table):
12492 * proc-flags.c (struct trans): Constify.
12493 * proc-utils.h (procfs_note): Constify.
12494 * proc-why.c (struct trans): Constify.
12495 * procfs.c (dead_procinfo, find_syscall, proc_warn, proc_error)
12496 (procfs_detach): Constify.
12497 * sol-thread.c (struct string_map): Constify.
12498 (td_err_string, td_state_string): Constify.
12499
3e83a920
PA
125002017-04-05 Pedro Alves <palves@redhat.com>
12501
12502 * proc-api.c (procfs_filename): Don't initialize
12503 procfs_filename.
12504 (prepare_to_trace): Assume procfs_filename is non-NULL.
12505 (_initialize_proc_api): Give procfs_filename a default value here.
12506
63160a43
PA
125072017-04-05 Pedro Alves <palves@redhat.com>
12508
12509 * break-catch-throw.c (handle_gnu_v3_exceptions): Constify
12510 'cond_string' parameter.
12511 (extract_exception_regexp): Constify 'string' parameter.
12512 (catch_exception_command_1): Constify.
12513 * breakpoint.c (init_catchpoint)
12514 (create_fork_vfork_event_catchpoint): Constify 'cond_string'
12515 parameter.
12516 (ep_parse_optional_if_clause, catch_fork_command_1)
12517 (catch_exec_command_1): Constify.
12518 * breakpoint.h (init_catchpoint): Constify 'cond_string'
12519 parameter.
12520 (ep_parse_optional_if_clause): Constify.
12521 * cli/cli-utils.c (remove_trailing_whitespace)
12522 (check_for_argument): Constify.
12523 * cli/cli-utils.h (remove_trailing_whitespace): Constify and add
12524 non-const overload.
12525 (check_for_argument): Likewise.
12526
9b2eba3d
PA
125272017-04-05 Pedro Alves <palves@redhat.com>
12528
12529 * event-top.c (command_line_handler): Add cast to execute_command
12530 call.
12531 * record-btrace.c (cmd_record_btrace_bts_start)
12532 (cmd_record_btrace_pt_start, cmd_record_btrace_start)
12533 (cmd_record_btrace_start): Add cast to execute_command call.
12534 * record-full.c (record_full_goto_insn):
12535 * record.c (record_start, record_stop): Add cast to
12536 execute_command_to_string calls.
12537 (cmd_record_start): Add cast to execute_command calls.
12538
2adadf51
PA
125392017-04-05 Pedro Alves <palves@redhat.com>
12540
12541 * python/python-internal.h (gdb_PyArg_ParseTupleAndKeywords): New
12542 static inline function.
12543 * python/py-arch.c (archpy_disassemble): Constify 'keywords'
12544 array and use gdb_PyArg_ParseTupleAndKeywords.
12545 * python/py-cmd.c (cmdpy_init): Likewise.
12546 * python/py-finishbreakpoint.c (bpfinishpy_init): Likewise.
12547 * python/py-inferior.c (infpy_read_memory, infpy_write_memory)
12548 (infpy_search_memory): Likewise.
12549 * python/py-objfile.c (objfpy_add_separate_debug_file)
12550 (gdbpy_lookup_objfile): Likewise.
12551 * python/py-symbol.c (gdbpy_lookup_symbol)
12552 (gdbpy_lookup_global_symbol): Likewise.
12553 * python/py-type.c (gdbpy_lookup_type): Likewise.
12554 * python/py-value.c (valpy_lazy_string, valpy_string): Likewise.
12555 * python/python.c (execute_gdb_command, gdbpy_write, gdbpy_flush):
12556 Likewise.
12557
0d1f4ceb
PA
125582017-04-05 Pedro Alves <palves@redhat.com>
12559
12560 * python/python-internal.h (gdb_PyGetSetDef): New type.
12561 * python/py-block.c (block_object_getset)
12562 (breakpoint_object_getset): Now a gdb_PyGetSetDef array.
12563 * python/py-event.c (event_object_getset)
12564 (finish_breakpoint_object_getset): Likewise.
12565 * python/py-inferior.c (inferior_object_getset): Likewise.
12566 * python/py-infthread.c (thread_object_getset): Likewise.
12567 * python/py-lazy-string.c (lazy_string_object_getset): Likewise.
12568 * python/py-linetable.c (linetable_entry_object_getset): Likewise.
12569 * python/py-objfile.c (objfile_getset): Likewise.
12570 * python/py-progspace.c (pspace_getset): Likewise.
12571 * python/py-record-btrace.c (btpy_insn_getset, btpy_call_getset):
12572 Likewise.
12573 * python/py-record.c (recpy_record_getset): Likewise.
12574 * python/py-symbol.c (symbol_object_getset): Likewise.
12575 * python/py-symtab.c (symtab_object_getset, sal_object_getset):
12576 Likewise.
12577 * python/py-type.c (type_object_getset, field_object_getset):
12578 Likewise.
12579 * python/py-value.c (value_object_getset): Likewise.
12580
4d759979
PA
125812017-04-05 Pedro Alves <palves@redhat.com>
12582
12583 * python/python-internal.h (gdb_PyObject_CallMethod)
12584 (gdb_PyErr_NewException, gdb_PySys_GetObject, gdb_PySys_SetPath):
12585 New functions.
12586 (GDB_PYSYS_SETPATH_CHAR, PyObject_CallMethod, PyErr_NewException)
12587 (PySys_GetObject, PySys_SetPath): New macros.
12588
fdf9e36f
PA
125892017-04-05 Pedro Alves <palves@redhat.com>
12590
12591 * mi/mi-cmd-info.c (mi_cmd_info_os): Call info_osdata instead of
12592 info_osdata_command.
12593 * osdata.c (info_osdata_command): Rename to ...
12594 (info_osdata): ... this. Constify 'type' parameter, and remove
12595 the 'from_tty' parameter. Accept NULL TYPE.
12596 (info_osdata_command): New function.
12597 * osdata.h (info_osdata_command): Remove declaration.
12598 (info_osdata): New declaration.
12599
9f33b8b7
PA
126002017-04-05 Pedro Alves <palves@redhat.com>
12601
12602 * mi/mi-cmd-break.c (mi_cmd_break_insert_1, mi_cmd_break_insert)
12603 (mi_cmd_dprintf_insert, mi_cmd_break_passcount)
12604 (mi_cmd_break_watch, mi_cmd_break_commands): Constify 'command'
12605 parameter.
12606 * mi/mi-cmd-catch.c (mi_cmd_catch_assert, mi_cmd_catch_exception)
12607 (mi_cmd_catch_load, mi_cmd_catch_unload): Constify cmd' parameter.
12608 * mi/mi-cmd-disas.c (mi_cmd_disassemble): Constify 'command'
12609 parameter.
12610 * mi/mi-cmd-env.c (mi_cmd_env_pwd, mi_cmd_env_cd, mi_cmd_env_path)
12611 (mi_cmd_env_dir, mi_cmd_inferior_tty_set, _cmd_inferior_tty_show)
12612 * mi/mi-cmd-file.c (mi_cmd_file_list_exec_source_file)
12613 (mi_cmd_file_list_exec_source_files)
12614 (mi_cmd_file_list_shared_libraries): Constify 'command' parameter.
12615 * mi/mi-cmd-info.c (mi_cmd_info_ada_exceptions)
12616 (mi_cmd_info_gdb_mi_command, mi_cmd_info_os): Constify 'command'
12617 parameter.
12618 * mi/mi-cmd-stack.c (mi_cmd_enable_frame_filters)
12619 (mi_cmd_stack_list_frames, mi_cmd_stack_info_depth)
12620 (mi_cmd_stack_list_locals, mi_cmd_stack_list_args)
12621 (mi_cmd_stack_list_variables, mi_cmd_stack_select_frame)
12622 (mi_cmd_stack_info_frame): Constify 'command' parameter.
12623 * mi/mi-cmd-target.c (mi_cmd_target_file_get)
12624 (mi_cmd_target_file_put, mi_cmd_target_file_delete): Constify
12625 'command' parameter.
12626 * mi/mi-cmd-var.c (mi_cmd_var_create, mi_cmd_var_delete)
12627 (mi_cmd_var_set_format, mi_cmd_var_set_visualizer)
12628 (mi_cmd_var_set_frozen, mi_cmd_var_show_format)
12629 (mi_cmd_var_info_num_children, mi_cmd_var_list_children)
12630 (mi_cmd_var_info_type, mi_cmd_var_info_path_expression)
12631 (mi_cmd_var_info_expression, mi_cmd_var_show_attributes)
12632 (mi_cmd_var_evaluate_expression, mi_cmd_var_assign)
12633 (mi_cmd_var_update, mi_cmd_enable_pretty_printing)
12634 (mi_cmd_var_set_update_range): Constify 'command' parameter.
12635 * mi/mi-cmds.h (mi_cmd_argv_ftype): Constify 'command' parameter.
12636 * mi/mi-interp.c (mi_cmd_interpreter_exec): Constify 'command'
12637 parameter.
12638 * mi/mi-main.c (mi_cmd_gdb_exit, mi_cmd_exec_next)
12639 (mi_cmd_exec_next_instruction, mi_cmd_exec_step)
12640 (mi_cmd_exec_step_instruction, mi_cmd_exec_finish)
12641 (mi_cmd_exec_return ,mi_cmd_exec_jump, mi_cmd_exec_continue)
12642 (mi_cmd_exec_interrupt, mi_cmd_exec_run, mi_cmd_target_detach)
12643 (mi_cmd_target_flash_erase, mi_cmd_thread_select)
12644 (mi_cmd_thread_list_ids, mi_cmd_thread_info)
12645 (mi_cmd_list_thread_groups, mi_cmd_data_list_register_names)
12646 (mi_cmd_data_list_changed_registers)
12647 (mi_cmd_data_write_register_values)
12648 (mi_cmd_data_evaluate_expression, mi_cmd_data_read_memory)
12649 (mi_cmd_data_read_memory_bytes, mi_cmd_data_write_memory)
12650 (mi_cmd_data_write_memory_bytes, mi_cmd_enable_timings)
12651 (mi_cmd_list_features, mi_cmd_list_target_features)
12652 (mi_cmd_add_inferior, mi_cmd_remove_inferior)
12653 (mi_cmd_trace_define_variable, mi_cmd_trace_list_variables)
12654 (mi_cmd_trace_find, mi_cmd_trace_save, mi_cmd_trace_start)
12655 (mi_cmd_trace_status, mi_cmd_trace_stop, mi_cmd_ada_task_info)
12656 (mi_cmd_trace_frame_collected): Constify 'command'
12657 parameter.
12658 * mi/mi-symbol-cmds.c (mi_cmd_symbol_list_lines): Constify
12659 'command' parameter.
12660
67cb5b2d
PA
126612017-04-05 Pedro Alves <palves@redhat.com>
12662
12663 * ada-lang.c (ada_completer_word_break_characters): Now a const
12664 array.
12665 (ada_get_gdb_completer_word_break_characters): Constify.
12666 * completer.c (gdb_completer_command_word_break_characters)
12667 (gdb_completer_file_name_break_characters)
12668 (gdb_completer_quote_characters): Now const arrays.
12669 (get_gdb_completer_quote_characters): Constify.
12670 (set_rl_completer_word_break_characters): New function.
12671 (set_gdb_completion_word_break_characters)
12672 (complete_line_internal): Use it.
12673 * completer.h (get_gdb_completer_quote_characters): Constify.
12674 (set_rl_completer_word_break_characters): Declare.
12675 * f-lang.c (f_word_break_characters): Constify.
12676 * language.c (default_word_break_characters): Constify.
12677 * language.h (language_defn::la_word_break_characters): Constify.
12678 (default_word_break_characters): Constify.
12679 * top.c (init_main): Use set_rl_completer_word_break_characters.
12680
7a114964
PA
126812017-04-05 Pedro Alves <palves@redhat.com>
12682
12683 * aix-thread.c (aix_thread_pid_to_str)
12684 (aix_thread_extra_thread_info): Constify.
12685 * bsd-kvm.c (bsd_kvm_pid_to_str): Constify.
12686 * bsd-uthread.c (bsd_uthread_extra_thread_info)
12687 (bsd_uthread_pid_to_str): Constify.
12688 * corelow.c (core_pid_to_str): Constify.
12689 * darwin-nat.c (darwin_pid_to_str): Constify.
12690 * fbsd-nat.c (fbsd_pid_to_str): Constify.
12691 * fbsd-tdep.c (fbsd_core_pid_to_str, gdbarch_core_pid_to_str):
12692 Constify.
12693 * gnu-nat.c (gnu_pid_to_str): Constify.
12694 * go32-nat.c (go32_pid_to_str): Constify.
12695 * i386-cygwin-tdep.c (i386_windows_core_pid_to_str): Constify.
12696 * inf-ptrace.c (inf_ptrace_pid_to_str): Constify.
12697 * inferior.c (inferior_pid_to_str): Constify.
12698 * linux-nat.c (linux_nat_pid_to_str): Constify.
12699 * linux-tdep.c (linux_core_pid_to_str): Constify.
12700 * linux-thread-db.c (thread_db_pid_to_str)
12701 (thread_db_extra_thread_info): Constify.
12702 * nto-tdep.c (nto_extra_thread_info): Constify.
12703 * nto-tdep.h (nto_extra_thread_info): Constify.
12704 * obsd-nat.c (obsd_pid_to_str): Constify.
12705 * procfs.c (procfs_pid_to_str): Constify.
12706 * ravenscar-thread.c (ravenscar_extra_thread_info)
12707 (ravenscar_pid_to_str): Constify.
12708 * remote-sim.c (gdbsim_pid_to_str): Constify.
12709 * remote.c (remote_threads_extra_info, remote_pid_to_str):
12710 Constify.
12711 * sol-thread.c (solaris_pid_to_str): Constify.
12712 * sol2-tdep.c (sol2_core_pid_to_str): Constify.
12713 * sol2-tdep.h (sol2_core_pid_to_str): Constify.
12714 * target.c (default_pid_to_str, target_pid_to_str)
12715 (normal_pid_to_str, default_pid_to_str): Constify.
12716 * target.h (target_ops::to_pid_to_str)
12717 (target_ops::to_extra_thread_info): Constify.
12718 (target_pid_to_str, normal_pid_to_str): Constify.
12719 * windows-nat.c (windows_pid_to_str): Constify.
12720 * gdbarch.sh (core_pid_to_str): Constify.
12721 * target-delegates.c: Regenerate.
12722 * gdbarch.h, gdbarch.c: Regenerate.
12723
69bbf465
PA
127242017-04-05 Pedro Alves <palves@redhat.com>
12725
12726 * main.c (captured_main_1): Use gdb::unique_xmalloc_ptr to manage
12727 the memory of the temporary warning_pre_print override.
12728 * utils.c (warning_pre_print): Constify.
12729 * utils.h (warning_pre_print): Constify.
12730
be47f9e8
PA
127312017-04-05 Pedro Alves <palves@redhat.com>
12732
12733 * cli/cli-cmds.c (shell_escape): Constify 'arg' parameter.
12734 (shell_command): New function.
12735 (make_command): Use std::string.
12736 (init_cli_cmds): Register shell_command instead of shell_escape.
12737
bde6261a
PA
127382017-04-05 Pedro Alves <palves@redhat.com>
12739
12740 * breakpoint.c (dprintf_function, dprintf_channel): Don't initialize.
12741 * tracepoint.c (default_collect): Don't initialize.
12742
b38ef47f
PA
127432017-04-05 Pedro Alves <palves@redhat.com>
12744
12745 * macroexp.c (macro_buffer::shared): Now a bool.
12746 (init_buffer): Update.
12747 (init_shared_buffer): Constify 'addr' parameter.
12748 (substitute_args, expand, macro_expand, macro_expand_next): Remove
12749 casts.
12750
f995bbe8
PA
127512017-04-05 Pedro Alves <palves@redhat.com>
12752
12753 * arm-tdep.c (show_disassembly_style_sfunc): Constify local.
12754 * disasm.c (set_disassembler_options): Constify local.
12755 * i386-tdep.c (i386_print_insn): Remove cast and FIXME comment.
12756
4a596fe2
SDJ
127572017-04-05 Sergio Durigan Junior <sergiodj@redhat.com>
12758
12759 PR gdb/21352
12760 * tracefile.c (tsave_command): Fix argument parsing for '-r'
12761 option.
12762
2cad08ea
YQ
127632017-04-05 Yao Qi <yao.qi@linaro.org>
12764
12765 * frame.c (frame_unwind_register_unsigned): Call
12766 frame_unwind_register_value.
12767
55a98976
YQ
127682017-04-05 Yao Qi <yao.qi@linaro.org>
12769
12770 * gdb.threads/thread-specific-bp.exp (check_thread_specific_breakpoint):
12771 Use gdb_test_multiple, and don't match anchor.
12772
4ac40124
PA
127732017-04-05 Pedro Alves <palves@redhat.com>
12774
12775 * MAINTAINERS (Global Maintainers): Add Simon Marchi.
12776 (Write After Approval): Remove Simon Marchi.
12777
c053b654
PA
127782017-04-05 Pedro Alves <palves@redhat.com>
12779
12780 * common/gdb_optional.h (optional::optional): Make constexpr and
12781 initialize m_dummy.
12782
4c7bf4f9
JB
127832017-04-04 John Baldwin <jhb@FreeBSD.org>
12784
12785 * amd64-fbsd-tdep.c: Remove "bsd-uthread.h" include.
12786 (amd64fbsd_jmp_buf_reg_offset): Remove.
12787 (amd64fbsd_supply_uthread): Remove function.
12788 (amd64fbsd_collect_uthread): Remove function.
12789 (amd64fbsd_init_abi): Don't set bsd-uthread callbacks.
12790 * configure.tgt (i[34567]86-*-freebsd*): Remove bsd-uthread.o.
12791 (x86_64-*-freebsd*): Remove bsd-uthread.o.
12792 (fbsd-nat.c): Update comment.
12793 * i386-fbsd-tdep.c: Remove "bsd-uthread.h" include.
12794 (i386fbsd_jmp_buf_reg_offset): Remove.
12795 (i386fbsd_supply_uthread): Remove function.
12796 (i386fbsd_collect_uthread): Remove function.
12797 (i386fbsd_init_abi): Don't set bsd-uthread callbacks.
12798
1e1a8bef
JB
127992017-04-04 John Baldwin <jhb@FreeBSD.org>
12800
12801 * Makefile.in (ALL_64_TARGET_OBS): Remove alpha-fbsd-tdep.o.
12802 (ALLDEPFILES): Remove alpha-fbsd-tdep.c
12803 * NEWS: Mention that support for FreeBSD/alpha was removed.
12804 * alpha-fbsd-tdep.c: Delete file.
12805 * config/alpha/fbsd.mh: Delete file.
12806 * configure.host: Delete alpha*-*-freebsd* and
12807 alpha*-*-kfreebsd*-gnu.
12808 * configure.tgt: Delete alpha*-*-freebsd* and
12809 alpha*-*-kfreebsd*-gnu.
12810
49907934
JB
128112017-04-04 John Baldwin <jhb@FreeBSD.org>
12812
12813 * amd64-bsd-nat.c (amd64bsd_fetch_inferior_registers,
12814 amd64bsd_store_inferior_registers): Use ptid from regcache.
12815
6f77053d
PA
128162017-04-04 Pedro Alves <palves@redhat.com>
12817
12818 * dwarf2read.c (lnp_state_machine): Now a class. Initialize all
12819 data fields, make them private and add "m_" prefixes.
12820 (lnp_state_machine::lnp_state_machine): New ctor.
12821 (record_line, check_line_address, handle_set_discriminator)
12822 (handle_set_address, handle_advance_pc, handle_special_opcode)
12823 (handle_advance_line, handle_set_file, handle_negate_stmt)
12824 (handle_const_add_pc, handle_fixed_advance_pc, handle_copy)
12825 (end_sequence, advance_line): New methods.
12826 (m_gdbarch, m_record_lines_p): New fields.
12827 (lnp_reader_state): Delete.
12828 (dwarf_record_line): Rename to ...
12829 (lnp_state_machine::record_line): ... adjust.
12830 (init_lnp_state_machine): Delete.
12831 (lnp_state_machine::lnp_state_machine): New.
12832 (check_line_address): Rename to ...
12833 (lnp_state_machine::check_line_address): This.
12834 (dwarf_decode_lines_1): Remove reference to "reader_state".
12835 Adjust lnp_state_machine having a non-default ctor. Use bool.
12836 State machine internal state manipulation moved to
12837 lnp_state_machine methods.
12838
9c541725
PA
128392017-04-04 Pedro Alves <palves@redhat.com>
12840
12841 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
12842 unittests/offset-type-selftests.c.
12843 (SUBDIR_UNITTESTS_OBS): Add offset-type-selftests.o.
12844 * common/offset-type.h: New file.
12845 * common/preprocessor.h: New file.
12846 * common/traits.h: New file.
12847 * common/valid-expr.h: New file.
12848 * dwarf2expr.c: Include "common/underlying.h". Adjust to use
12849 sect_offset and cu_offset strong typedefs throughout.
12850 * dwarf2expr.h: Adjust to use sect_offset and cu_offset strong
12851 typedefs throughout.
12852 * dwarf2loc.c: Include "common/underlying.h". Adjust to use
12853 sect_offset and cu_offset strong typedefs throughout.
12854 * dwarf2read.c: Adjust to use sect_offset and cu_offset strong
12855 typedefs throughout.
12856 * gdbtypes.h: Include "common/offset-type.h".
12857 (cu_offset): Now an offset type (strong typedef) instead of a
12858 struct.
12859 (sect_offset): Likewise.
12860 (union call_site_parameter_u): Rename "param_offset" field to
12861 "param_cu_off".
12862 * unittests/offset-type-selftests.c: New file.
12863
ecfb656c
PA
128642017-04-04 Pedro Alves <palves@redhat.com>
12865
12866 * common/underlying.h: New file.
12867 * dwarf2read.c: Include "common/gdb_optional.h" and
12868 "common/underlying.h".
12869 (dir_index, file_name_index): New types.
12870 (file_entry): Use them.
12871 (file_entry::include): Use to_underlying.
12872 (line_header::add_file_name): Use dir_index.
12873 (read_formatted_entries): Use gdb::optional. Read form before
12874 writting to file_entry.
12875 (dwarf_decode_line_header): Use dir_index.
12876 (lnp_state_machine::current_file): Use to_underlying.
12877 (lnp_state_machine::file): Change type to file_name_index.
12878 (dwarf_record_line): Use to_underlying.
12879 (init_lnp_state_machine): Use file_name_index.
12880 (dwarf_decode_lines_1): Use dir_index and file_name_index.
12881
d194f1fe
PA
128822017-04-04 Pedro Alves <palves@redhat.com>
12883
12884 * common/gdb_optional.h (gdb::optiona): Add operator->, operator*,
12885 operator bool, has_value and get methods.
12886
fff8551c
PA
128872017-04-04 Pedro Alves <palves@redhat.com>
12888
12889 * dwarf2read.c (struct file_entry): Add ctors, and initialize all
12890 fields.
12891 (line_header): Initialize all data fields. Change type of
12892 standard_opcode_lengths to std::unique_ptr<unsigned char[]>.
12893 Change type of include_dirs to std::vector<const char *>. Remove
12894 num_include_dirs, include_dirs_size. Change type of file_names to
12895 std::vector<file_entry>. Remove num_file_names, file_names_size.
12896 (line_header::line_header): New.
12897 (line_header::add_include_dir, line_header::add_file_name): New
12898 methods.
12899 (line_header::include_dir_at): Remove NULL check.
12900 (line_header::file_name_at): Add const overload.
12901 (line_header_up): New unique_ptr typedef.
12902 (dw2_get_file_names_reader): Use line_header_up. Adjust to use
12903 std::vector. Remove free_line_header call.
12904 (dwarf2_build_include_psymtabs): Use line_header_up. Remove
12905 free_line_header call.
12906 (free_cu_line_header): Delete.
12907 (handle_DW_AT_stmt_list, handle_DW_AT_stmt_list)
12908 (setup_type_unit_groups): Use line_header_up instead of cleanups.
12909 Adjust to use std::vector.
12910 (free_line_header): Delete.
12911 (free_line_header_voidp): Use delete.
12912 (add_include_dir): Replace with ...
12913 (line_header::add_include_dir): ... this method. Use std::vector.
12914 (add_file_name): Replace with ...
12915 (line_header::add_file_name): ... this method. Use std::vector.
12916 (add_include_dir_stub): Delete.
12917 (read_formatted_entries): Remove memset.
12918 (dwarf_decode_line_header): Return a line_header_up instead of a
12919 raw pointer. Remove cleanup handling. Pass lambdas to
12920 read_formatted_entries. Adjust to use line_header methods.
12921 (dwarf_decode_lines_1): Adjust to use line_header methods.
12922 (dwarf_decode_lines, file_file_name, file_full_name): Adjust to
12923 use std::vector.
12924
d62a8ae2
SM
129252017-04-04 Simon Marchi <simon.marchi@polymtl.ca>
12926
12927 * remote.c (set_general_thread, set_continue_thread): Use ptid_t
12928 instead of struct ptid.
12929
db3a1dc7
AH
129302017-05-04 Alan Hayward <alan.hayward@arm.com>
12931
12932 * frame.c (get_frame_register_bytes): Unwind using value.
12933 (put_frame_register_bytes): Likewise.
12934
b1b45502
IB
129352017-03-30 Iain Buclaw <ibuclaw@gdcproject.org>
12936
12937 * d-exp.y (type_aggregate_p): Treat TYPE_CODE_MODULE as being
12938 aggregate-like.
12939
ec13808e
JK
129402017-03-29 Jan Kratochvil <jan.kratochvil@redhat.com>
12941
12942 * auto-load.c (auto_load_section_scripts): Check SEC_HAS_CONTENTS.
12943
12316564
YQ
129442017-03-29 Yao Qi <yao.qi@linaro.org>
12945
12946 * gdbthread.h (struct thread_info): Declare constructor and
12947 destructor. Add some in-class member initializers.
12948 * thread.c (free_thread): Remove.
12949 (init_thread_list): Call delete instead of free_thread.
12950 (new_thread): Call thread_info constructor.
12951 (thread_info::thread_info): New function.
12952 (thread_info::~thread_info): New function.
12953 (delete_thread_1): Call delete instead of free_thread.
12954 (make_cleanup_restore_current_thread): Move tp and frame to
12955 inner block.
12956
fe5f7374
AK
129572017-03-28 Anton Kolesov <anton.kolesov@synopsys.com>
12958
12959 * arc-tdep.c (arc_frame_cache): Add support for prologue analysis.
12960 (arc_skip_prologue): Likewise.
12961 (arc_make_frame_cache): Likewise.
12962 (arc_pv_get_operand): New function.
12963 (arc_is_in_prologue): Likewise.
12964 (arc_analyze_prologue): Likewise.
12965 (arc_print_frame_cache): Likewise.
12966 (MAX_PROLOGUE_LENGTH): New constant.
12967
eea78757
AK
129682017-03-28 Anton Kolesov <anton.kolesov@synopsys.com>
12969
12970 * configure.tgt: Add arc-insn.o.
12971 * arc-tdep.c (arc_delayed_print_insn): Make non-static.
12972 (dump_arc_instruction_command): New function.
12973 (arc_fprintf_disasm): Likewise.
12974 (arc_disassemble_info): Likewise.
12975 (arc_insn_get_operand_value): Likewise.
12976 (arc_insn_get_operand_value_signed): Likewise.
12977 (arc_insn_get_memory_base_reg): Likewise.
12978 (arc_insn_get_memory_offset): Likewise.
12979 (arc_insn_get_branch_target): Likewise.
12980 (arc_insn_dump): Likewise.
12981 (arc_insn_get_linear_next_pc): Likewise.
12982 * arc-tdep.h (arc_delayed_print_insn): Add function declaration.
12983 (arc_disassemble_info): Likewise.
12984 (arc_insn_get_branch_target): Likewise.
12985 (arc_insn_get_linear_next_pc): Likewise.
12986 * NEWS: Mention new "maint print arc arc-instruction".
12987
3be78afd
AK
129882017-03-28 Anton Kolesov <anton.kolesov@synopsys.com>
12989
12990 * arc-tdep (maintenance_print_arc_list): New variable.
12991 (maintenance_print_arc_command): New function.
12992
296ec4fa
AK
129932017-03-28 Anton Kolesov <anton.kolesov@synopsys.com>
12994
12995 * arc-tdep.c (core_v2_register_names, core_arcompact_register_names)
12996 Add "limm" and "reserved".
12997 (arc_cannot_fetch_register, arc_cannot_store_register): Add
12998 ARC_RESERVED_REGNUM and ARC_LIMM_REGNUM.
12999 * arc-tdep.h (arc_regnum): Likewise.
13000
f74f865e
MF
130012017-03-27 Max Filippov <jcmvbkbc@gmail.com>
13002
13003 * xtensa-linux-nat.c (fill_gregset): Call regcache_raw_collect
13004 for THREADPTR register.
13005 (supply_gregset_reg): Call regcache_raw_supply for THREADPTR
13006 register.
13007 * xtensa-tdep.c (XTENSA_DBREGN_UREG): New definition.
13008 (xtensa_derive_tdep): Initialize tdep->threadptr_regnum.
13009 * xtensa-tdep.h (gdbarch_tdep::threadptr_regnum): New field.
13010
0d0bf81a
MF
130112017-03-27 Max Filippov <jcmvbkbc@gmail.com>
13012
13013 * xtensa-tdep.c (xtensa_pseudo_register_read): Treat all
13014 registers above gdbarch_num_regs (gdbarch) as privileged in
13015 call0 ABI.
13016
0ce4291e
MF
130172017-03-27 Max Filippov <jcmvbkbc@gmail.com>
13018
13019 * xtensa-linux-nat.c (fill_gregset): Call regcache_raw_collect
13020 for a single specified register or for all registers in
13021 a0_base..a0_base + C0_NREGS range.
13022 (supply_gregset_reg): Call regcache_raw_supply for a single
13023 specified register or for all registers in a0_base..a0_base +
13024 C0_NREGS range.
13025
c56054f9
MF
130262017-03-27 Max Filippov <jcmvbkbc@gmail.com>
13027
13028 * arch/xtensa.h (C0_NREGS): Add definition.
13029 * xtensa-tdep.c (C0_NREGS): Remove definition.
13030
a4398628
MF
130312017-03-27 Max Filippov <jcmvbkbc@gmail.com>
13032
13033 * xtensa-tdep.c (xtensa_scan_prologue, call0_analyze_prologue):
13034 Drop xtensa_default_isa initialization.
13035 (xtensa_gdbarch_init): Initialize xtensa_default_isa.
13036
8c43009f
PA
130372017-03-27 Pedro Alves <palves@redhat.com>
13038
13039 * dwarf2read.c (file_entry) <dir_index>: Add comment.
13040 (file_entry::include_dir): New method.
13041 (line_header::include_dir_at, line_header::file_name_at): New
13042 methods.
13043 (setup_type_unit_groups, setup_type_unit_groups)
13044 (psymtab_include_file_name): Simplify using the new methods.
13045 (lnp_state_machine) <the_line_header>: New field.
13046 <file>: Add comment.
13047 (lnp_state_machine::current_file): New method.
13048 (dwarf_record_line): Simplify using the new methods.
13049 (init_lnp_state_machine): Initialize the "the_line_header" field.
13050 (dwarf_decode_lines_1, dwarf_decode_lines, file_file_name):
13051 Simplify using the new methods.
13052
a7e80b9e
PA
130532017-03-27 Pedro Alves <palves@redhat.com>
13054
13055 * cp-name-parser.y (make_empty): Delete.
13056 (demangler_special, nested_name, ptr_operator, array_indicator)
13057 (direct_declarator, declarator_1): Use fill_comp instead of
13058 make_empty.
13059
21047726
PA
130602017-03-27 Pedro Alves <palves@redhat.com>
13061
13062 * xml-support.h (gdb_xml_debug): Pass a "first-to-check" argument
13063 to ATTRIBUTE_PRINTF.
13064 * solib-target.c (library_list_start_list): Print "string" not
13065 "version".
13066 * xml-tdesc.c (tdesc_start_field): Pass "field_name" to
13067 gdb_xml_error call.
13068
d721ba37
PA
130692017-03-27 Pedro Alves <palves@redhat.com>
13070
13071 * dwarf2read.c (struct file_and_directory): New.
13072 (dwarf2_get_dwz_file): Adjust to use std::string.
13073 (dw2_get_file_names_reader): Adjust to use file_and_directory.
13074 (find_file_and_directory): Adjust to return a file_and_directory
13075 object.
13076 (read_file_scope): Adjust to use file_and_directory. Remove
13077 make_cleanup/do_cleanups calls.
13078 (open_and_init_dwp_file): Adjust to use std::string. Remove
13079 make_cleanup/do_cleanups calls.
13080 * python/python.c (do_start_initialization): Adjust to ldirname
13081 returning a std::string.
13082 * utils.c (ldirname): Now returns a std::string.
13083 * utils.h (ldirname): Change return type to std::string.
13084 * xml-syscall.c (xml_init_syscalls_info): Adjust to ldirname
13085 returning a std::string.
13086 * xml-tdesc.c (file_read_description_xml): Likewise.
13087
ed771251
AH
130882017-03-24 Alan Hayward <alan.hayward@arm.com>
13089
13090 * regcache.c (regcache_debug_print_register): New function.
13091 * regcache.h (regcache_debug_print_register): New declaration.
13092 * target.c (debug_print_register): Remove.
13093 (target_fetch_registers): Call regcache_debug_print_register.
13094 (target_store_registers): Likewise.
13095
568c1b9f
PB
130962017-03-24 Pádraig Brady <pbrady@fb.com>
13097
13098 * dwarf2read.c (setup_type_unit_groups): Ensure dir_index doesn't
13099 reference beyond the 'lh->include_dirs' array before accessing to
13100 it.
13101 (psymtab_include_file_name): Likewise.
13102 (dwarf_decode_lines_1): Likewise.
13103 (dwarf_decode_lines): Likewise.
13104 (file_file_name): Likewise.
13105
3e00d44f
SM
131062017-03-23 Simon Marchi <simon.marchi@ericsson.com>
13107
13108 * fbsd-tdep.c (fbsd_corefile_thread): Don't set/restore
13109 inferior_ptid.
13110 * proc-service.c (ps_lgetregs, ps_lsetregs, ps_lgetfpregs,
13111 ps_lsetfpregs): Likewise.
13112 * regcache.c (regcache_raw_update, regcache_raw_write): Likewise.
13113 * sol-thread.c (ps_lgetregs, ps_lsetregs, ps_lgetfpregs,
13114 ps_lsetfpregs): Likewise.
13115 * target.c (target_fetch_registers, target_store_registers):
13116 Remove asserts.
13117
077ae656
AH
131182017-03-23 Alan Hayward <alan.hayward@arm.com>
13119
13120 * sol-thread.c (sol_thread_store_registers): Remove regcache calls.
13121
1e2b521d
YQ
131222017-03-23 Yao Qi <yao.qi@linaro.org>
13123
13124 * aarch64-tdep.c (aarch64_process_record_test): Declare.
13125 (_initialize_aarch64_tdep): Register it.
13126 (aarch64_record_load_store): Handle PRFM instruction.
13127 (aarch64_process_record_test): New function.
13128
33877125
YQ
131292017-03-23 Yao Qi <yao.qi@linaro.org>
13130
13131 * aarch64-tdep.c (aarch64_record_load_store): Fix code
13132 indentation.
13133
a0eef940
YQ
131342017-03-23 Yao Qi <yao.qi@linaro.org>
13135
13136 * aarch64-tdep.c: Remove AARCH64_RECORD_FAILURE.
13137
3f2a3564
PR
131382017-03-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
13139
13140 python/python.c (do_start_initialization): Fix memory leak.
13141
b67aeab0
SM
131422017-03-22 Simon Marchi <simon.marchi@polymtl.ca>
13143
13144 * inf-ptrace.c (inf_ptrace_xfer_partial): Get pid from ptid
13145 using get_ptrace_pid.
13146 * linux-nat.c (linux_nat_xfer_partial): Don't set/restore
13147 inferior_ptid.
13148 (linux_proc_xfer_partial, linux_proc_xfer_spu): Use lwp of
13149 inferior_ptid instead of pid.
13150
ffdbe864
YQ
131512017-03-22 Yao Qi <yao.qi@linaro.org>
13152
13153 * aarch64-tdep.c: Wrap locally used classes in anonymous
13154 namespace.
13155 * arm-tdep.c: Likewise.
13156 * linespec.c: Likewise.
13157 * ui-out.c: Likewise.
13158
9d736fbf
JG
131592017-03-22 Jonah Graham <jonah@kichwacoders.com>
13160
13161 PR gdb/19637
13162 * python/lib/gdb/printer/bound_registers.py: Import sys.
13163
3de88e9a
SM
131642017-03-21 Simon Marchi <simon.marchi@ericsson.com>
13165
13166 * windows-nat.c (do_windows_fetch_inferior_registers): Add
13167 windows_thread_info parameter and use it instead of
13168 current_thread.
13169 (windows_fetch_inferior_registers): Don't set current_thread,
13170 pass the thread to do_windows_fetch_inferior_registers. Use
13171 ptid from regcache instead of inferior_ptid.
13172 (do_windows_store_inferior_registers): Add windows_thread_info
13173 parameter and use it instead of current_thread.
13174 (windows_store_inferior_registers): Don't set current_thread,
13175 pass the thread to do_windows_store_inferior_registers. Use
13176 ptid from regcache instead of inferior_ptid.
13177
0e7b8f61
SM
131782017-03-21 Simon Marchi <simon.marchi@ericsson.com>
13179
13180 * ser-mingw.c (ser_windows_raw): Remove reference to
13181 struct serial::current_timeout.
13182
5badf10a
IR
131832017-03-21 Ivo Raisr <ivo.raisr@oracle.com>
13184
13185 PR tdep/20928
13186 * gdb/sparc-tdep.h (gdbarch_tdep) <sparc64_ccr_type>: New field.
13187 * gdb/sparc64-tdep.c (sparc64_ccr_type): New function.
13188 (sparc64_fsr_type): Fix %fsr decoding.
13189
cee59b3f
TW
131902017-03-21 Tim Wiederhake <tim.wiederhake@intel.com>
13191
13192 * python/py-record-btrace.c (btpy_insn_data): Change return type
13193 for Python 2.
13194
639a9038
SM
131952017-03-20 Simon Marchi <simon.marchi@polymtl.ca>
13196
13197 * spu-linux-nat.c (spu_fetch_inferior_registers,
13198 spu_store_inferior_registers): Use ptid from regcache, set and
13199 restore inferior_ptid.
13200 * spu-multiarch.c (spu_fetch_registers, spu_store_registers):
13201 Likewise.
13202
bcc0c096
SM
132032017-03-20 Simon Marchi <simon.marchi@polymtl.ca>
13204
13205 * i386-linux-nat.c (fetch_register, store_register,
13206 i386_linux_fetch_inferior_registers,
13207 i386_linux_store_inferior_registers): Use ptid from regcache.
13208 * ia64-linux-nat.c (ia64_linux_fetch_register,
13209 ia64_linux_store_register): Likewise.
13210 * inf-ptrace.c (inf_ptrace_fetch_register,
13211 inf_ptrace_store_register): Likewise.
13212 * m32r-linux-nat.c (m32r_linux_fetch_inferior_registers,
13213 m32r_linux_store_inferior_registers): Likewise.
13214 * m68k-bsd-nat.c (m68kbsd_fetch_inferior_registers,
13215 m68kbsd_store_inferior_registers): Likewise.
13216 * m68k-linux-nat.c (fetch_register, store_register,
13217 m68k_linux_fetch_inferior_registers,
13218 m68k_linux_store_inferior_registers): Likewise.
13219 * m88k-bsd-nat.c (m88kbsd_fetch_inferior_registers,
13220 m88kbsd_store_inferior_registers): Likewise.
13221 * mips-fbsd-nat.c (mips_fbsd_fetch_inferior_registers,
13222 mips_fbsd_store_inferior_registers): Likewise.
13223 * mips-linux-nat.c (mips64_linux_regsets_fetch_registers,
13224 mips64_linux_regsets_store_registers): Likewise.
13225 * mips-nbsd-nat.c (mipsnbsd_fetch_inferior_registers,
13226 mipsnbsd_store_inferior_registers): Likewise.
13227 * mips-obsd-nat.c (mips64obsd_fetch_inferior_registers,
13228 mips64obsd_store_inferior_registers): Likewise.
13229 * nto-procfs.c (procfs_fetch_registers, procfs_store_registers):
13230 Likewise.
13231 * ppc-fbsd-nat.c (ppcfbsd_fetch_inferior_registers,
13232 ppcfbsd_store_inferior_registers): Likewise.
13233 * ppc-linux-nat.c (ppc_linux_fetch_inferior_registers,
13234 ppc_linux_store_inferior_registers): Likewise.
13235 * ppc-nbsd-nat.c (ppcnbsd_fetch_inferior_registers,
13236 ppcnbsd_store_inferior_registers): Likewise.
13237 * ppc-obsd-nat.c (ppcobsd_fetch_registers,
13238 ppcobsd_store_registers): Likewise.
13239 * procfs.c (procfs_fetch_registers, procfs_store_registers):
13240 Likewise.
13241 * ravenscar-thread.c (ravenscar_fetch_registers,
13242 ravenscar_store_registers, ravenscar_prepare_to_store):
13243 Likewise.
13244 * record-btrace.c (record_btrace_fetch_registers,
13245 record_btrace_store_registers, record_btrace_prepare_to_store):
13246 Likewise.
13247 * remote-sim.c (gdbsim_fetch_register, gdbsim_store_register):
13248 Lookup inferior using ptid from regcache, instead of
13249 current_inferior.
13250 * remote.c (remote_fetch_registers, remote_store_registers): Use
13251 ptid from regcache.
13252 * rs6000-nat.c (fetch_register, store_register): Likewise.
13253 * s390-linux-nat.c (s390_linux_fetch_inferior_registers,
13254 s390_linux_store_inferior_registers): Likewise.
13255 * sh-nbsd-nat.c (shnbsd_fetch_inferior_registers,
13256 shnbsd_store_inferior_registers): Likewise.
13257 * sol-thread.c (sol_thread_fetch_registers,
13258 sol_thread_store_registers): Likewise.
13259 * sparc-nat.c (sparc_fetch_inferior_registers,
13260 sparc_store_inferior_registers): Likewise.
13261 * tilegx-linux-nat.c (fetch_inferior_registers,
13262 store_inferior_registers): Likewise.
13263 * vax-bsd-nat.c (vaxbsd_fetch_inferior_registers,
13264 vaxbsd_store_inferior_registers): Likewise.
13265 * xtensa-linux-nat.c (fetch_gregs, store_gregs, fetch_xtregs,
13266 store_xtregs): Likewise.
13267
c0f55cc6
AV
132682017-03-20 Artemiy Volkov <artemiyv@acm.org>
13269
13270 PR gdb/14441
13271 * NEWS: Mention support for rvalue references in GDB and python.
13272 * doc/gdb.texinfo (C Plus Plus Expressions): Mention that GDB
13273 supports both lvalue and rvalue references.
13274
15c0a2a9
AV
132752017-03-20 Artemiy Volkov <artemiyv@acm.org>
13276
13277 PR gdb/14441
13278 * gdbtypes.c (rank_one_type): Implement overloading
13279 resolution rules regarding rvalue references.
13280
aa006118
AV
132812017-03-20 Artemiy Volkov <artemiyv@acm.org>
13282
13283 PR gdb/14441
13284 * aarch64-tdep.c (aarch64_type_align)
13285 (aarch64_extract_return_value, aarch64_store_return_value): Change
13286 lvalue reference type checks to general reference type checks.
13287 * amd64-tdep.c (amd64_classify): Likewise.
13288 * amd64-windows-tdep.c (amd64_windows_passed_by_integer_register):
13289 Likewise.
13290 * arm-tdep.c (arm_type_align, arm_extract_return_value)
13291 (arm_store_return_value): Likewise.
13292 * ax-gdb.c (gen_fetch, gen_cast): Likewise.
13293 * c-typeprint.c (c_print_type): Likewise.
13294 * c-varobj.c (adjust_value_for_child_access, c_value_of_variable)
13295 (cplus_number_of_children, cplus_describe_child): Likewise.
13296 * compile/compile-c-symbols.c (generate_vla_size): Likewise.
13297 * completer.c (expression_completer): Likewise.
13298 * cp-support.c (make_symbol_overload_list_adl_namespace):
13299 Likewise.
13300 * darwin-nat-info.c (info_mach_region_command): Likewise.
13301 * dwarf2loc.c (entry_data_value_coerce_ref)
13302 (value_of_dwarf_reg_entry): Likewise.
13303 * eval.c (ptrmath_type_p, evaluate_subexp_standard)
13304 (evaluate_subexp_for_address, evaluate_subexp_for_sizeof):
13305 Likewise.
13306 * findvar.c (extract_typed_address, store_typed_address):
13307 Likewise.
13308 * gdbtypes.c (rank_one_type): Likewise.
13309 * hppa-tdep.c (hppa64_integral_or_pointer_p): Likewise.
13310 * infcall.c (value_arg_coerce): Likewise.
13311 * language.c (pointer_type): Likewise.
13312 * m32c-tdep.c (m32c_reg_arg_type, m32c_m16c_address_to_pointer):
13313 Likewise.
13314 * m88k-tdep.c (m88k_integral_or_pointer_p): Likewise.
13315 * mn10300-tdep.c (mn10300_type_align): Likewise.
13316 * msp430-tdep.c (msp430_push_dummy_call): Likewise.
13317 * ppc-sysv-tdep.c (do_ppc_sysv_return_value)
13318 (ppc64_sysv_abi_push_param, ppc64_sysv_abi_return_value):
13319 Likewise.
13320 * printcmd.c (print_formatted, x_command): Likewise.
13321 * python/py-type.c (typy_get_composite, typy_template_argument):
13322 Likewise.
13323 * python/py-value.c (valpy_referenced_value)
13324 (valpy_get_dynamic_type, value_has_field): Likewise.
13325 * s390-linux-tdep.c (s390_function_arg_integer): Likewise.
13326 * sparc-tdep.c (sparc_integral_or_pointer_p): Likewise.
13327 * sparc64-tdep.c (sparc64_integral_or_pointer_p): Likewise.
13328 * spu-tdep.c (spu_scalar_value_p): Likewise.
13329 * symtab.c (lookup_symbol_aux): Likewise.
13330 * typeprint.c (whatis_exp, print_type_scalar): Likewise.
13331 * valarith.c (binop_types_user_defined_p, unop_user_defined_p):
13332 Likewise.
13333 * valops.c (value_cast_pointers, value_cast)
13334 (value_reinterpret_cast, value_dynamic_cast, value_addr, typecmp)
13335 (value_struct_elt, value_struct_elt_bitpos)
13336 (value_find_oload_method_list, find_overload_match)
13337 (value_rtti_indirect_type): Likewise.
13338 * valprint.c (val_print_scalar_type_p, generic_val_print):
13339 Likewise.
13340 * value.c (value_actual_type, value_as_address, unpack_long)
13341 (pack_long, pack_unsigned_long, coerce_ref_if_computed)
13342 (coerce_ref): Likewise.
13343 * varobj.c (varobj_get_value_type): Likewise.
13344
3fcf899d
AV
133452017-03-20 Artemiy Volkov <artemiyv@acm.org>
13346
13347 PR gdb/14441
13348 * doc/python.texi (Types in Python): Add TYPE_CODE_RVALUE_REF to
13349 table of constants.
13350 * python/lib/gdb/command/explore.py: Support exploring values
13351 of rvalue reference types.
13352 * python/lib/gdb/types.py: Implement get_basic_type() for
13353 rvalue reference types.
13354 * python/py-type.c (pyty_codes) <TYPE_CODE_RVALUE_REF>: New
13355 constant.
13356 * python/py-value.c (valpy_getitem): Add an rvalue reference
13357 check.
13358 (valpy_reference_value): Add new parameter "refcode".
13359 (valpy_lvalue_reference_value, valpy_rvalue_reference_value):
13360 New wrappers for valpy_reference_value().
13361 * python/py-xmethods.c (gdbpy_get_xmethod_result_type)
13362 (gdbpy_invoke_xmethod): Likewise.
13363
4297a3f0
AV
133642017-03-20 Artemiy Volkov <artemiyv@acm.org>
13365
13366 PR gdb/14441
13367 * dwarf2read.c (process_die, read_type_die_1): Handle the
13368 DW_TAG_rvalue_reference_type DIE.
13369 (read_tag_reference_type): Add new parameter "refcode".
13370
e1cb3213
AV
133712017-03-20 Artemiy Volkov <artemiyv@acm.org>
13372
13373 PR gdb/14441
13374 * c-typeprint.c (c_print_type, c_type_print_varspec_prefix)
13375 (c_type_print_modifier, c_type_print_varspec_suffix)
13376 (c_type_print_base): Support printing rvalue reference types.
13377 * c-valprint.c (c_val_print, c_value_print): Support printing
13378 rvalue reference values.
13379
e4347c89
AV
133802017-03-20 Artemiy Volkov <artemiyv@acm.org>
13381
13382 PR gdb/14441
13383 * cp-name-parser.y (ptr_operator): Handle the '&&' token in
13384 typename.
13385 * cp-support.c (replace_typedefs): Handle
13386 DEMANGLE_COMPONENT_RVALUE_REFERENCE.
13387 * python/py-type.c (typy_lookup_type): Likewise.
13388
53cc15f5
AV
133892017-03-20 Artemiy Volkov <artemiyv@acm.org>
13390
13391 PR gdb/14441
13392 * c-exp.y (ptr_operator): Handle the '&&' token in the typename.
13393 * parse.c (insert_type): Change assert statement.
13394 (follow_types): Handle rvalue reference types.
13395 * parser-defs.h (enum type_pieces) <tp_rvalue_reference>: New
13396 constant.
13397
a65cfae5
AV
133982017-03-20 Artemiy Volkov <artemiyv@acm.org>
13399
13400 PR gdb/14441
13401 * ada-lang.c (ada_evaluate_subexp): Adhere to the new
13402 value_ref() interface.
13403 * c-valprint.c (c_value_print): Likewise.
13404 * infcall.c (value_arg_coerce): Likewise.
13405 * python/py-value.c (valpy_reference_value): Likewise.
13406 * valops.c (value_cast, value_reinterpret_cast)
13407 (value_dynamic_cast, typecmp): Likewise.
13408 (value_ref): Parameterize by kind of return value reference type.
13409 * value.h (value_ref): Add new parameter "refcode".
13410
3b224330
AV
134112017-03-20 Artemiy Volkov <artemiyv@acm.org>
13412
13413 PR gdb/14441
13414 * dwarf2read.c (read_tag_reference_type): Use
13415 lookup_lvalue_reference_type() instead of lookup_reference_type().
13416 * eval.c (evaluate_subexp_standard): Likewise.
13417 * f-exp.y: Likewise.
13418 * gdbtypes.c (make_reference_type, lookup_reference_type):
13419 Generalize with rvalue reference types.
13420 (lookup_lvalue_reference_type, lookup_rvalue_reference_type): New
13421 convenience wrappers for lookup_reference_type().
13422 * gdbtypes.h (make_reference_type, lookup_reference_type): Add a
13423 reference kind parameter.
13424 (lookup_lvalue_reference_type, lookup_rvalue_reference_type): Add
13425 wrappers for lookup_reference_type().
13426 * guile/scm-type.c (gdbscm_type_reference): Use
13427 lookup_lvalue_reference_type() instead of lookup_reference_type().
13428 * guile/scm-value.c (gdbscm_value_dynamic_type): Likewise.
13429 * parse.c (follow_types): Likewise.
13430 * python/py-type.c (typy_reference, typy_lookup_type): Likewise.
13431 * python/py-value.c (valpy_get_dynamic_type, valpy_getitem):
13432 Likewise.
13433 * python/py-xmethods.c (gdbpy_get_xmethod_result_type)
13434 (gdbpy_invoke_xmethod): Likewise.
13435 * stabsread.c: Provide extra argument to make_reference_type()
13436 call.
13437 * valops.c (value_ref, value_rtti_indirect_type): Use
13438 lookup_lvalue_reference_type() instead of lookup_reference_type().
13439
f9aeb8d4
AV
134402017-03-20 Artemiy Volkov <artemiyv@acm.org>
13441
13442 PR gdb/14441
13443 * gdbtypes.h (enum type_code) <TYPE_CODE_RVALUE_REF>: New constant.
13444 (TYPE_IS_REFERENCE): New macro.
13445 (struct type): Add rvalue_reference_type field.
13446 (TYPE_RVALUE_REFERENCE_TYPE): New macro.
13447
51457a05
MAL
134482017-03-20 Marc-Andre Laperle <marc-andre.laperle@ericsson.com>
13449
13450 * NEWS: Add an entry about new '-file-list-shared-libraries' command.
13451 * mi/mi-cmd-file.c (mi_cmd_file_list_shared_libraries):
13452 New function definition.
13453 * mi/mi-cmds.c (mi_cmds): Add -file-list-shared-libraries command.
13454 * mi/mi-cmds.h (mi_cmd_file_list_shared_libraries):
13455 New function declaration.
13456 * mi/mi-interp.c (mi_output_solib_attribs): New Function.
13457 * mi/mi-interp.h: New file.
13458 * solib.c (info_sharedlibrary_command): Replace for loop with
13459 ALL_SO_LIBS macro
13460 * solib.h (update_solib_list): New function declaration.
13461 (so_list_head): Move macro.
13462 * solist.h (ALL_SO_LIBS): New macro.
13463
e696b3ad
MAL
134642017-03-20 Marc-Andre Laperle <marc-andre.laperle@ericsson.com>
13465
13466 * infcmd.c (post_create_inferior): Remove unused argument in
13467 call to solib_add.
13468 * remote.c (remote_start_remote): Likewise.
13469 * solib-frv.c (frv_fetch_objfile_link_map): Likewise.
13470 * solib-svr4.c: (svr4_fetch_objfile_link_map): Likewise.
13471 (enable_break): Likewise.
13472 * solib.c (update_solib_list): Remove unused target argument
13473 and its documentation.
13474 (solib_add): Remove unused target argument. Remove unused
13475 argument in call to update_solib_list.
13476 (info_sharedlibrary_command): Remove unused argument in call
13477 to update_solib_list.
13478 (sharedlibrary_command): Remove unused argument in call to
13479 solib_add.
13480 (handle_solib_event): Likewise.
13481 (reload_shared_libraries): Likewise.
13482 * solib.h (solib_add): Remove unused target argument.
13483
dcb84eda
AA
134842017-03-20 Andreas Arnez <arnez@linux.vnet.ibm.com>
13485
13486 * s390-linux-tdep.c (is_rsi, is_rie): Remove functions.
13487 (s390_displaced_step_fixup): Cover relative branches with the
13488 default fixup handling. This fixes lack of support for some
13489 relative branch instructions.
13490
d9cb6cdc
SM
134912017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
13492
13493 * i386-gnu-nat.c (gnu_fetch_registers, gnu_store_registers): Use
13494 ptid from regcache.
13495
1afaf9f4
SM
134962017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
13497
13498 * i386-darwin-nat.c (i386_darwin_fetch_inferior_registers,
13499 i386_darwin_store_inferior_registers): Use ptid from regcache.
13500
aac12e24
SM
135012017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
13502
13503 * i386-bsd-nat.c (i386bsd_fetch_inferior_registers,
13504 i386bsd_store_inferior_registers): Use ptid from regcache.
13505
bbe1eef1
SM
135062017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
13507
13508 * hppa-obsd-nat.c (hppaobsd_fetch_registers,
13509 hppaobsd_store_registers): Use ptid from regcache.
13510
10799020
SM
135112017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
13512
13513 * hppa-nbsd-nat.c (hppanbsd_fetch_registers,
13514 hppanbsd_store_registers): Use ptid from regcache.
13515
00204cf7
SM
135162017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
13517
13518 * hppa-linux-nat.c (fetch_register, store_register): Use ptid
13519 from regcache. Use get_ptrace_pid.
13520
11a33714
SM
135212017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
13522
13523 * corelow.c (get_core_register_section): Use ptid from regcache,
13524 update doc.
13525
317cd492
SM
135262017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
13527
13528 * bsd-uthread.c (bsd_uthread_fetch_registers,
13529 bsd_uthread_store_registers): Use ptid from regcache, set and
13530 restore inferior_ptid.
13531
9ac8a7c2
SM
135322017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
13533
13534 * arm-nbsd-nat.c (fetch_register, fetch_regs, fetch_fp_register,
13535 fetch_fp_regs, store_register, store_regs, store_fp_register,
13536 store_fp_regs): Use ptid from regcache.
13537
4ac4bb6a
SM
135382017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
13539
13540 * arm-linux-nat.c (fetch_fpregs, store_fpregs, fetch_regs,
13541 store_regs, fetch_wmmx_regs, store_wmmx_regs, fetch_vfp_regs,
13542 store_vfp_regs): Use ptid from regcache.
13543
9bcbdca8
PA
135442017-03-17 Pedro Alves <palves@redhat.com>
13545
13546 PR remote/21188
13547 * ser-base.c (ser_base_wait_for): Add comment.
13548 (do_ser_base_readchar): Improve comment based on the ser-unix.c's
13549 version.
13550 * ser-unix.c (hardwire_raw): Remove reference to
13551 scb->current_timeout.
13552 (wait_for, do_hardwire_readchar, hardwire_readchar): Delete.
13553 (hardwire_ops): Install ser_base_readchar instead of
13554 hardwire_readchar.
13555 * serial.h (struct serial) <current_timeout, timeout_remaining>:
13556 Remove fields.
13557
7503099f
JG
135582017-03-17 Jonah Graham <jonah@kichwacoders.com>
13559
13560 PR gdb/19637
13561 * python/lib/gdb/printer/bound_registers.py: Add support for
13562 Python 3.
13563
7942e96e
AA
135642017-03-16 Andreas Arnez <arnez@linux.vnet.ibm.com>
13565
13566 * dwarf2loc.c (indirect_synthetic_pointer): Get data type of
13567 pointed-to DIE and pass it to dwarf2_evaluate_loc_desc_full.
13568 (dwarf2_evaluate_loc_desc_full): New parameter subobj_type; rename
13569 byte_offset to subobj_byte_offset. Fix the handling of
13570 DWARF_VALUE_STACK on big-endian targets when coming via an
13571 implicit pointer.
13572 (dwarf2_evaluate_loc_desc): Adjust call to
13573 dwarf2_evaluate_loc_desc_full.
13574 * dwarf2loc.h (dwarf2_fetch_die_type_sect_off): New declaration.
13575 * dwarf2read.c (dwarf2_fetch_die_type_sect_off): New function.
13576
ba14f379
YQ
135772017-03-16 Yao Qi <yao.qi@linaro.org>
13578
13579 * arm-tdep.c (thumb_record_misc): Decode CBNZ, CBZ, REV16,
13580 and REVSH instructions.
13581
b121eeb9
YQ
135822017-03-16 Yao Qi <yao.qi@linaro.org>
13583
13584 * arm-tdep.c [GDB_SELF_TEST]: include "selftests.h".
13585 (arm_record_test): Declare.
13586 (_initialize_arm_tdep) [GDB_SELF_TEST]: call register_self_test.
13587 (thumb_record_ld_st_reg_offset): Rewrite the opcode matching to
13588 align with the manual.
13589 (thumb_record_misc): Adjust the code order to align with the
13590 manual.
13591 (thumb2_record_decode_insn_handler): Fix instruction matching.
13592 (instruction_reader_thumb): New class.
13593 (arm_record_test): New function.
13594
728a7913
YQ
135952017-03-16 Yao Qi <yao.qi@linaro.org>
13596
13597 * arm-tdep.c (abstract_memory_reader): New class.
13598 (instruction_reader): New class.
13599 (extract_arm_insn): Add argument 'reader'. Callers updated.
13600 (decode_insn): Likewise.
13601
34b43320
DE
136022017-03-16 Doug Evans <dje@google.com>
13603
a7c0469f
DE
13604 * guile/scm-lazy-string.c (lazy_string_smob): Clarify use of LENGTH
13605 member. Change type of TYPE member to SCM. All uses updated.
13606 (lsscm_make_lazy_string_smob): Add assert.
13607 (lsscm_make_lazy_string): Flag bad length values.
13608 (lsscm_elt_type): New function.
13609 (gdbscm_lazy_string_to_value): Rewrite to use
13610 lsscm_safe_lazy_string_to_value.
13611 (lsscm_safe_lazy_string_to_value): Fix handling of TYPE_CODE_PTR.
13612 * guile/scm-value.c (gdbscm_value_to_lazy_string): Flag bad length
13613 values. Fix TYPE_CODE_PTR. Handle TYPE_CODE_ARRAY. Handle typedefs
13614 in incoming type.
13615 * guile/guile-internal.h (tyscm_scm_to_type): Declare.
13616 * guile/scm-type.c (tyscm_scm_to_type): New function.
13617
136182017-03-15 Doug Evans <dje@google.com>
13619
34b43320
DE
13620 PR python/17728, python/18439, python/18779
13621 * python/py-lazy-string.c (lazy_string_object): Clarify use of LENGTH
13622 member. Change type of TYPE member to PyObject *. All uses updated.
13623 (stpy_convert_to_value): Fix handling of TYPE_CODE_PTR.
13624 (gdbpy_create_lazy_string_object): Flag bad length values.
13625 Handle TYPE_CODE_ARRAY with possibly different user-provided length.
13626 Handle typedefs in incoming type.
13627 (stpy_lazy_string_elt_type): New function.
13628 (gdbpy_extract_lazy_string): Call it.
13629 * python/py-value.c (valpy_lazy_string): Flag bad length values.
13630 Fix handling of TYPE_CODE_PTR. Handle TYPE_CODE_ARRAY. Handle
13631 typedefs in incoming type.
13632
a3a5fecc
DE
136332017-03-16 Doug Evans <dje@google.com>
13634
13635 * guile/guile-internal.h (tyscm_scm_to_type): Declare.
13636 * guile/scm-type.c (tyscm_scm_to_type): New function.
13637
28f1c605
JW
136382017-03-16 Jiong Wang <jiong.wang@arm.com>
13639
13640 * inf-ptrace.c (inf_ptrace_peek_poke): Change the type to
13641 "ULONGEST" for "skip".
13642
87c336f6
AA
136432017-03-14 Andreas Arnez <arnez@linux.vnet.ibm.com>
13644
13645 PR gdb/21220
13646 * inf-ptrace.c (inf_ptrace_xfer_partial): In "case
13647 TARGET_OBJECT_MEMORY", extract the logic for ptrace peek/poke...
13648 (inf_ptrace_peek_poke): ...here. New function. Now also loop
13649 over ptrace peek/poke until end of buffer or error.
13650
cf81cf60
SM
136512017-03-14 Simon Marchi <simon.marchi@ericsson.com>
13652
13653 * parse.c (length_of_subexp): Make static.
13654 * parser-defs.h (length_of_subexp): Remove.
13655
a379284a
AA
136562017-03-14 Andreas Arnez <arnez@linux.vnet.ibm.com>
13657
13658 * linux-nat.c (linux_proc_xfer_partial): Handle write operations
13659 as well.
13660
8a6200ba
PA
136612017-03-14 Pedro Alves <palves@redhat.com>
13662
13663 * cp-name-parser.y (cp_demangled_name_to_comp): Update comment.
13664 (main): Use std::unique_ptr. Remove calls to
13665 cp_demangled_name_parse_free.
13666
f79ec206
SM
136672017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
13668
13669 * alpha-bsd-nat.c (alphabsd_fetch_inferior_registers,
13670 alphabsd_store_inferior_registers): Use regcache->ptid instead
13671 of inferior_ptid.
13672
edb5fb00
SM
136732017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
13674
13675 * aix-thread.c (aix_thread_fetch_registers,
13676 aix_thread_store_registers): Use regcache->ptid instead of
13677 inferior_ptid.
13678
55119686
SM
136792017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
13680
13681 * aarch64-linux-nat.c (fetch_gregs_from_thread,
13682 store_gregs_to_thread, fetch_fpregs_from_thread,
13683 store_fpregs_to_thread): Use regcache->ptid instead of
13684 inferior_ptid.
13685
6a06fbb7
SM
136862017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
13687
13688 * amd64-linux-nat.c (amd64_linux_fetch_inferior_registers,
13689 amd64_linux_fetch_inferior_registers): Use regcache->ptid
13690 instead of inferior_ptid.
13691
c6386875
SM
136922017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
13693
13694 * target.c (target_fetch_registers, target_store_registers): Add
13695 assert.
13696
ddaaf0fb
SM
136972017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
13698
13699 * regcache.h (regcache_get_ptid): New function.
13700 * regcache.c (regcache_get_ptid): New function.
13701
b9da89d1 137022017-03-13 Mark Wielaard <mark@klomp.org>
13703
13704 * cp-name-parser.y (make_empty): Initialize d_printing to zero.
13705
5f4d1085
KS
137062017-03-10 Keith Seitz <keiths@redhat.com>
13707
13708 PR c++/8218
13709 * c-typeprint.c (cp_type_print_method_args): Skip artificial arguments.
13710
c65d6b55
PA
137112017-03-08 Pedro Alves <palves@redhat.com>
13712
13713 PR gdb/18360
13714 * infrun.c (start_step_over, do_target_resume, resume)
13715 (restart_threads): Assert we're not resuming a thread that is
13716 meant to be stopped.
13717 (infrun_thread_stop_requested_callback): Delete.
13718 (infrun_thread_stop_requested): If the thread is internally
13719 stopped, queue a pending stop event and clear the thread's
13720 inline-frame state.
13721 (handle_stop_requested): New function.
13722 (handle_syscall_event, handle_inferior_event_1): Use
13723 handle_stop_requested.
13724 (handle_stop_requested): New function.
13725 (handle_signal_stop): Set the thread's stop_signal here instead of
13726 at caller.
13727 (finish_step_over): Clear step over info unconditionally.
13728 (handle_signal_stop): If the user had interrupted the event
13729 thread, consider the stop a random signal.
13730 (handle_signal_stop) <signal arrived while stepping over
13731 breakpoint>: Don't restart threads here.
13732 (stop_waiting): Don't clear step-over info here.
13733
15c22686
PA
137342017-03-08 Pedro Alves <palves@redhat.com>
13735
13736 PR 21206
13737 * common/gdb_unlinker.h (unlinker::unlinker): Attribute nonnull
13738 goes to argument 2, not 1.
13739
6e5d74e7
PA
137402017-03-08 Pedro Alves <palves@redhat.com>
13741
13742 PR cli/21218
13743 * top.c (gdb_readline_wrapper): Avoid passing NULL to
13744 display_gdb_prompt.
13745 (command_line_input): Add comment.
13746
9753a2f6
PA
137472017-03-08 Pedro Alves <palves@redhat.com>
13748
13749 PR tui/21216
13750 * tui/tui-file.c (tui_file::write): New.
13751 * tui/tui-file.h (tui_file): Override "write".
13752 * tui/tui-io.c (do_tui_putc, update_start_line): New functions,
13753 factored out from ...
13754 (tui_puts): ... here.
13755 (tui_putc): Use them.
13756 (tui_write): New function.
13757 * tui/tui-io.h (tui_write): Declare.
13758
1672e0d9
SDJ
137592017-03-07 Sergio Durigan Junior <sergiodj@redhat.com>
13760
13761 * Makefile.in (SFILES): Replace "environ.c" with
13762 "common/environ.c".
13763 (HFILES_NO_SRCDIR): Likewise, for "environ.h".
13764 * environ.c: Include "common-defs.h" instead of "defs.h. Moved
13765 to...
13766 * common/environ.c: ... here.
13767 * environ.h: Moved to...
13768 * common/environ.h: ... here.
13769
f7bb4e3a
PB
137702017-03-07 Peter Bergner <bergner@vnet.ibm.com>
13771
13772 * gdbarch.sh (pstring_ptr): New static function.
13773 (gdbarch_disassembler_options): Use it.
13774 (gdbarch_verify_disassembler_options): Print valid_disassembler_options,
13775 not valid_disassembler_option->name.
13776 * gdbarch.c: Regenerate.
13777
e45ced6c
PB
137782017-03-07 Peter Bergner <bergner@vnet.ibm.com>
13779
13780 * config/powerpc/ppc64-linux.mh (MH_CFLAGS): Delete.
13781
5f6fd321
PA
137822017-03-07 Pedro Alves <palves@redhat.com>
13783
13784 * tui/tui-regs.c (tui_restore_gdbout): Don't delete gdb_stdout.
13785
6dbb839a 137862017-03-07 Walfred Tedeschi <walfred.tedeschi@intel.com>
4a612d6f
WT
13787
13788 * i387-tdep.h (i387_reset_bnd_regs): Add function definition.
13789 * i387-tdep.c (i387_reset_bnd_regs): Add function implementation.
13790 * i386-tdep.c (i386_push_dummy_call): Call i387_reset_bnd_regs.
6dbb839a 13791 * amd64-tdep.c (amd64_push_dummy_call): Call i387_reset_bnd_regs.
4a612d6f 13792
d274ecf4
SM
137932017-03-06 Simon Marchi <simon.marchi@ericsson.com>
13794
13795 * xtensa-linux-nat.c (fetch_gregs): Remove const.
13796
df97be55
SM
137972017-03-03 Simon Marchi <simon.marchi@ericsson.com>
13798
13799 * remote.c (remote_add_target_side_commands): Use range-based
13800 for loop.
13801
7d45f3df
YQ
138022017-03-03 Yao Qi <yao.qi@linaro.org>
13803
13804 PR gdb/21165
13805 * ada-valprint.c (ada_val_print_ref): Call value_fetch_lazy if
13806 value is lazy.
13807 * valprint.c (common_val_print): Likewise.
13808
65b48a81
PB
138092017-02-28 Peter Bergner <bergner@vnet.ibm.com>
13810
13811 * NEWS: Mention new set/show disassembler-options commands.
13812 * doc/gdb.texinfo: Document new set/show disassembler-options commands.
13813 * disasm.c: Include "arch-utils.h", "gdbcmd.h" and "safe-ctype.h".
13814 (prospective_options): New static variable.
13815 (gdb_disassembler::gdb_disassembler): Initialize
13816 m_di.disassembler_options.
13817 (gdb_buffered_insn_length_init_dis): Initilize di->disassembler_options.
13818 (get_disassembler_options): New function.
13819 (set_disassembler_options): Likewise.
13820 (set_disassembler_options_sfunc): Likewise.
13821 (show_disassembler_options_sfunc): Likewise.
13822 (disassembler_options_completer): Likewise.
13823 (_initialize_disasm): Likewise.
13824 * disasm.h (get_disassembler_options): New prototype.
13825 (set_disassembler_options): Likewise.
13826 * gdbarch.sh (gdbarch_disassembler_options): New variable.
13827 (gdbarch_verify_disassembler_options): Likewise.
13828 * gdbarch.c: Regenerate.
13829 * gdbarch.h: Likewise.
13830 * arm-tdep.c (num_disassembly_options): Delete.
13831 (set_disassembly_style): Likewise.
13832 (arm_disassembler_options): New static variable.
13833 (set_disassembly_style_sfunc): Convert short style name into long
13834 option name. Call set_disassembler_options.
13835 (show_disassembly_style_sfunc): New function.
13836 (arm_gdbarch_init): Call set_gdbarch_disassembler_options and
13837 set_gdbarch_verify_disassembler_options.
13838 (_initialize_arm_tdep): Delete regnames variable and update callers.
13839 (arm_disassembler_options): Initialize.
13840 (disasm_options): New variable.
13841 (num_disassembly_options): Rename from this...
13842 (num_disassembly_styles): ...to this. Compute by scanning through
13843 disasm_options.
13844 (valid_disassembly_styles): Initialize using disasm_options.
13845 Remove calls to parse_arm_disassembler_option, get_arm_regnames and
13846 set_arm_regname_option.
13847 Pass show_disassembly_style_sfunc to the "disassembler" setshow command.
13848 * rs6000-tdep.c (powerpc_disassembler_options): New static variable.
13849 (rs6000_gdbarch_init): Call set_gdbarch_disassembler_options and
13850 set_gdbarch_verify_disassembler_options.
13851 * s390-tdep.c (s390_disassembler_options): New static variable.
13852 (s390_gdbarch_init):all set_gdbarch_disassembler_options and
13853 set_gdbarch_verify_disassembler_options.
13854
d538e36d
SM
138552017-02-27 Simon Marchi <simon.marchi@ericsson.com>
13856
13857 * remote.c (remote_add_target_side_condition): Remove "struct"
13858 keyword from range-based for loop.
13859
83621223
SM
138602017-02-27 Simon Marchi <simon.marchi@ericsson.com>
13861
13862 * remote.c (remote_add_target_side_condition): Use range-based
13863 for loop. Update comment.
13864
2123df0e
YQ
138652017-02-27 Yao Qi <yao.qi@linaro.org>
13866
13867 * f-typeprint.c (f_print_type): Check "varstring" is empty first.
13868
8e368124
AH
138692017-02-26 Alan Hayward <alan.hayward@arm.com>
13870
13871 * regcache.c (regcache_raw_update): New function.
13872 (regcache_raw_read): Move code to regcache_raw_update.
13873 * regcache.h (regcache_raw_update): New declaration.
13874 * remote.c (remote_prepare_to_store): Call regcache_raw_update.
13875
a49dd8dd
JK
138762017-02-26 Jan Kratochvil <jan.kratochvil@redhat.com>
13877
13878 * dwarf2read.c (create_debug_type_hash_table): Initialize
13879 header.signature and header.type_offset_in_tu.
13880
34e4bae9
PA
138812017-02-24 Pedro Alves <palves@redhat.com>
13882
13883 * symtab.c (make_file_symbol_completion_list_1): Use
13884 add_symtab_completions.
13885
b0e4b369
AH
138862017-02-24 Alan Hayward <alan.hayward@arm.com>
13887
13888 * stack.c (frame_info): Use frame_unwind_register_value to avoid buf.
13889
975c21ab
AH
138902017-02-24 Alan Hayward <alan.hayward@arm.com>
13891
13892 * i386-tdep.c (i386_pseudo_register_read_into_value): Use
13893 I386_MAX_REGISTER_SIZE.
13894 (i386_pseudo_register_write): Likewise.
13895 (i386_process_record): Likewise.
13896 * i387-tdep.c (i387_supply_xsave): Likewise.
13897 * m68k-linux-nat.c (fetch_register): Use M68K_MAX_REGISTER_SIZE.
13898 (store_register): Likewise.
13899
14bc53a8
PA
139002017-02-23 Pedro Alves <palves@redhat.com>
13901
13902 * ada-lang.c: Include "common/function-view.h".
13903 (ada_iterate_over_symbols): Adjust to use function_view as
13904 callback type.
13905 (struct add_partial_datum, ada_complete_symbol_matcher): Delete.
13906 (ada_make_symbol_completion_list): Use a lambda.
13907 (ada_exc_search_name_matches): Delete.
13908 (name_matches_regex): New.
13909 (ada_add_global_exceptions): Use a lambda and name_matches_regex.
13910 * compile/compile-c-support.c: Include "common/function-view.h".
13911 (print_one_macro): Change prototype to accept a ui_file pointer.
13912 (write_macro_definitions): Use a lambda.
13913 * dwarf2read.c: Include "common/function-view.h".
13914 (dw2_map_expand_apply, dw2_map_symtabs_matching_filename)
13915 (dw2_expand_symtabs_matching): Adjust to use function_view as
13916 callback type.
13917 * language.h: Include "common/function-view.h".
13918 (struct language_defn) <la_iterate_over_symbols>: Adjust to use
13919 function_view as callback type.
13920 (LA_ITERATE_OVER_SYMBOLS): Remove DATA parameter.
13921 * linespec.c: Include "common/function-view.h".
13922 (collect_info::add_symbol): New method.
13923 (struct symbol_and_data_callback, iterate_inline_only, struct
13924 symbol_matcher_data, iterate_name_matcher): Delete.
13925 (iterate_over_all_matching_symtabs): Adjust to use function_view
13926 as callback type and lambdas.
13927 (iterate_over_file_blocks): Adjust to use function_view as
13928 callback type.
13929 (decode_compound_collector): Now a class with private fields.
13930 (decode_compound_collector::release_symbols): New method.
13931 (collect_one_symbol): Rename to...
13932 (decode_compound_collector::operator()): ... this and adjust.
13933 (lookup_prefix_sym): decode_compound_collector construction bits
13934 move to decode_compound_collector ctor. Pass the
13935 decode_compound_collector object directly as callback. Remove
13936 cleanups and use decode_compound_collector::release_symbols
13937 instead.
13938 (symtab_collector): Now a class with private fields.
13939 (symtab_collector::release_symtabs): New method.
13940 (add_symtabs_to_list): Rename to...
13941 (symtab_collector::operator()): ... this and adjust.
13942 (collect_symtabs_from_filename): symtab_collector construction
13943 bits move to symtab_collector ctor. Pass the symtab_collector
13944 object directly as callback. Remove cleanups and use
13945 symtab_collector::release_symtabs instead.
13946 (collect_symbols): Delete.
13947 (add_matching_symbols_to_info): Use lambdas.
13948 * macrocmd.c (print_macro_callback): Delete.
13949 (info_macro_command): Use a lambda.
13950 (info_macros_command): Pass print_macro_definition as callable
13951 directly.
13952 (print_one_macro): Remove 'ignore' parameter.
13953 (macro_list_command): Adjust.
13954 * macrotab.c (macro_for_each_data::fn): Now a function_view.
13955 (macro_for_each_data::user_data): Delete field.
13956 (foreach_macro): Adjust to call the function_view.
13957 (macro_for_each): Adjust to use function_view as callback type.
13958 (foreach_macro_in_scope): Adjust to call the function_view.
13959 (macro_for_each_in_scope): Adjust to use function_view as callback
13960 type.
13961 * macrotab.h: Include "common/function-view.h".
13962 (macro_callback_fn): Declare a prototype instead of a pointer.
13963 Remove "user_data" parameter.
13964 (macro_for_each, macro_for_each_in_scope): Adjust to use
13965 function_view as callback type.
13966 * psymtab.c (partial_map_expand_apply)
13967 (psym_map_symtabs_matching_filename, recursively_search_psymtabs):
13968 Adjust to use function_view as callback type and to return bool.
13969 (psym_expand_symtabs_matching): Adjust to use function_view as
13970 callback types.
13971 * symfile-debug.c (debug_qf_map_symtabs_matching_filename): Adjust
13972 to use function_view as callback type and to return bool.
13973 (debug_qf_expand_symtabs_matching): Adjust to use function_view as
13974 callback types.
13975 * symfile.c (expand_symtabs_matching): Adjust to use function_view
13976 as callback types.
13977 * symfile.h: Include "common/function-view.h".
13978 (expand_symtabs_file_matcher_ftype)
13979 (expand_symtabs_symbol_matcher_ftype)
13980 (expand_symtabs_exp_notify_ftype): Remove "data" parameter and
13981 return bool.
13982 (quick_symbol_functions::map_symtabs_matching_filename)
13983 (quick_symbol_functions::expand_symtabs_matching): Adjust to use
13984 function_view as callback type and return bool.
13985 (expand_symtabs_matching): Adjust to use function_view as callback
13986 type.
13987 (maintenance_expand_name_matcher)
13988 (maintenance_expand_file_matcher): Delete.
13989 (maintenance_expand_symtabs): Use lambdas.
13990 * symtab.c (iterate_over_some_symtabs): Adjust to use
13991 function_view as callback types and return bool.
13992 (iterate_over_symtabs): Likewise. Use unique_xmalloc_ptr instead
13993 of a cleanup.
13994 (lookup_symtab_callback): Delete.
13995 (lookup_symtab): Use a lambda.
13996 (iterate_over_symbols): Adjust to use function_view as callback
13997 type.
13998 (struct search_symbols_data, search_symbols_file_matches)
13999 (search_symbols_name_matches): Delete.
14000 (search_symbols): Use a pair of lambdas.
14001 (struct add_name_data, add_macro_name, symbol_completion_matcher)
14002 (symtab_expansion_callback): Delete.
14003 (default_make_symbol_completion_list_break_on_1): Use lambdas.
14004 * symtab.h: Include "common/function-view.h".
14005 (iterate_over_some_symtabs): Adjust to use function_view as
14006 callback type and return bool.
14007 (iterate_over_symtabs): Adjust to use function_view as callback
14008 type.
14009 (symbol_found_callback_ftype): Remove 'data' parameter and return
14010 bool.
14011 (iterate_over_symbols): Adjust to use function_view as callback
14012 type.
14013
07e253aa
PA
140142017-02-23 Pedro Alves <palves@redhat.com>
14015
14016 * Makefile.in (SUBDIR_UNITTESTS_SRCS, SUBDIR_UNITTESTS_OBS): New.
14017 (%.o) <unittests/%.c>: New pattern.
14018 * configure.ac ($development): Add $(SUBDIR_UNITTESTS_OBS) to
14019 CONFIG_OBS, and $(SUBDIR_UNITTESTS_SRCS) to CONFIG_SRCS.
14020 * common/function-view.h: New file.
14021 * unittests/function-view-selftests.c: New file.
14022 * configure: Regenerate.
14023
8eaf5320
SM
140242017-02-23 Simon Marchi <simon.marchi@ericsson.com>
14025
14026 * bsd-uthread.c (bsd_uthread_thread_alive): Use ptid instead of
14027 inferior_ptid.
14028 * go32-nat.c (go32_thread_alive): Likewise.
14029
38768751
YQ
140302017-02-23 Yao Qi <yao.qi@linaro.org>
14031
14032 * varobj-iter.h (varobj_iter_delete): Call xfree instead of
14033 delete.
14034
0a8beaba
YQ
140352017-02-23 Yao Qi <yao.qi@linaro.org>
14036
14037 * varobj.c (varobj_clear_saved_item): Use delete instead of
14038 xfree.
14039 (update_dynamic_varobj_children): Likewise.
14040
58fdfd2c
JK
140412017-02-21 Jan Kratochvil <jan.kratochvil@redhat.com>
14042
14043 * dwarf2read.c (dwarf2_record_block_ranges): Add forgotten BASEADDR.
14044
1b90b139
SM
140452017-02-21 Simon Marchi <simon.marchi@ericsson.com>
14046
14047 * common/enum-flags.h (enum_flags::enum_flags): Initialize
14048 m_enum_value to 0 in default constructor.
14049
2039d74e
EBM
140502017-02-21 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
14051
14052 * rs6000-tdep.c (LOAD_AND_RESERVE_MASK): Rename from LWARX_MASK.
14053 (STORE_CONDITIONAL_MASK): Rename from STWCX_MASK.
14054 (LBARX_INSTRUCTION, LHARX_INSTRUCTION, LQARX_INSTRUCTION,
14055 STBCX_INSTRUCTION, STHCX_INSTRUCTION, STQCX_INSTRUCTION): New defines.
14056 (IS_LOAD_AND_RESERVE_INSN, IS_STORE_CONDITIONAL_INSN): New macros.
14057 (ppc_displaced_step_copy_insn): Use IS_LOAD_AND_RESERVE_INSN.
14058 (ppc_deal_with_atomic_sequence): Use IS_LOAD_AND_RESERVE_INSN and
14059 IS_STORE_CONDITIONAL_INSN.
14060
7814882a
JK
140612017-02-21 Jan Kratochvil <jan.kratochvil@redhat.com>
14062
14063 * dwarf2_rnglists_process: Initialize range_beginning and range_end.
14064
0ae60b63
JK
140652017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
14066
14067 * NEWS (Changes since GDB 7.12): Add DWARF-5.
14068
0224619f
JK
140692017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
14070
14071 * dwarf2read.c (skip_one_die, read_attribute_value)
14072 (dwarf2_const_value_attr, dump_die_shallow)
14073 (dwarf2_get_attr_constant_value, dwarf2_fetch_constant_bytes)
14074 (skip_form_bytes, attr_form_is_constant): Handle DW_FORM_data16.
14075
0af92d60
JK
140762017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
14077
14078 * dwarf2read.c (read_file_scope): Rename DW_MACRO_GNU_*.
14079 (dwarf_parse_macro_header): Accept DWARF version 5.
14080 (dwarf_decode_macro_bytes, dwarf_decode_macros): Rename DW_MACRO_GNU_*.
14081
216f72a1
JK
140822017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
14083
14084 * block.c (call_site_for_pc): Rename DW_OP_GNU_*, DW_TAG_GNU_* and
14085 DW_AT_GNU_*.
14086 * common/common-exceptions.h (enum errors): Likewise.
14087 * dwarf2-frame.c (class dwarf_expr_executor): Likewise.
14088 * dwarf2expr.c (dwarf_block_to_dwarf_reg)
14089 (dwarf_expr_context::execute_stack_op): Likewise.
14090 * dwarf2expr.h (struct dwarf_expr_context, struct dwarf_expr_piece):
14091 Likewise.
14092 * dwarf2loc.c (dwarf_evaluate_loc_desc::get_base_type)
14093 (dwarf_evaluate_loc_desc::push_dwarf_reg_entry_value)
14094 (show_entry_values_debug, call_site_to_target_addr)
14095 (func_addr_to_tail_call_list, func_verify_no_selftailcall)
14096 (dwarf_expr_reg_to_entry_parameter, dwarf_entry_parameter_to_value)
14097 (entry_data_value_free_closure, value_of_dwarf_reg_entry)
14098 (value_of_dwarf_block_entry, indirect_pieced_value)
14099 (symbol_needs_eval_context::push_dwarf_reg_entry_value):
14100 (disassemble_dwarf_expression): Likewise.
14101 * dwarf2read.c (process_die, inherit_abstract_dies)
14102 (read_call_site_scope): Likewise.
14103 * gdbtypes.h (struct func_type, struct call_site_parameter)
14104 (struct call_site): Likewise.
14105 * stack.c (read_frame_arg): Likewise.
14106 * std-operator.def (OP_VAR_ENTRY_VALUE): Likewise.
14107
43988095
JK
141082017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
14109
14110 * defs.h (read_unsigned_leb128): New declaration.
14111 * dwarf2loc.c (decode_debug_loclists_addresses): New function.
14112 (decode_debug_loc_dwo_addresses): Update DEBUG_LOC_* to DW_LLE_*.
14113 (dwarf2_find_location_expression): Call also
14114 decode_debug_loclists_addresses. Handle DWARF-5 ULEB128 length.
14115 * dwarf2loc.h (dwarf2_version): New declaration.
14116 * dwarf2read.c (struct dwarf2_per_objfile): Add loclists, line_str,
14117 rnglists.
14118 (dwarf2_elf_names): Add .debug_loclists, .debug_line_str,
14119 .debug_rnglists.
14120 (struct dwop_section_names): Add loclists_dwo.
14121 (dwop_section_names): Add .debug_loclists.dwo.
14122 (struct comp_unit_head): Add unit_type, signature, type_offset_in_tu.
14123 (struct dwarf2_per_cu_data): Add dwarf_version.
14124 (struct dwo_sections): Add loclists.
14125 (struct attr_abbrev): Add implicit_const.
14126 (read_indirect_line_string): New declaration.
14127 (read_unsigned_leb128): Delete declaration.
14128 (rcuh_kind): New definition.
14129 (read_and_check_comp_unit_head): Change parameter
14130 is_debug_types_section to section_kind.
14131 (dwarf2_locate_sections): Handle loclists, line_str and rnglists.
14132 (read_comp_unit_head): Change parameter abfd to section, add parameter
14133 section_kind. Handle DWARF-5.
14134 (error_check_comp_unit_head): Accept also DWARF version 5.
14135 (read_and_check_comp_unit_head): Change parameter
14136 is_debug_types_section to section_kind.
14137 (read_and_check_type_unit_head): Delete function.
14138 (read_abbrev_offset): Handle DWARF-5.
14139 (create_debug_type_hash_table): Add parameter section_kind. Process
14140 only DW_UT_type. Use signature and type_offset_in_tu from struct
14141 comp_unit_head.
14142 (create_debug_types_hash_table): Update create_debug_type_hash_table
14143 caller.
14144 (create_all_type_units): Call create_debug_type_hash_table.
14145 (read_cutu_die_from_dwo, init_cutu_and_read_dies): Change
14146 read_and_check_type_unit_head caller to read_and_check_comp_unit_head
14147 caller.
14148 (skip_one_die): Handle DW_FORM_implicit_const.
14149 (dwarf2_rnglists_process): New function.
14150 (dwarf2_ranges_process): Call dwarf2_rnglists_process for DWARF-5.
14151 (abbrev_table_read_table): Handle DW_FORM_implicit_const.
14152 (read_attribute_value): Handle DW_FORM_implicit_const,
14153 DW_FORM_line_strp.
14154 (read_attribute): Handle DW_FORM_implicit_const.
14155 (read_indirect_string_at_offset_from): New function from
14156 read_indirect_string_at_offset.
14157 (read_indirect_string_at_offset): Call
14158 read_indirect_string_at_offset_from.
14159 (read_indirect_line_string_at_offset): New function.
14160 (read_indirect_string): New function comment.
14161 (read_indirect_line_string): New function.
14162 (read_unsigned_leb128): Make it global.
14163 (dwarf2_string_attr): Handle DWARF-5.
14164 (add_include_dir_stub, read_formatted_entries): New functions.
14165 (dwarf_decode_line_header, dump_die_shallow, cu_debug_loc_section):
14166 Handle DWARF-5.
14167 (per_cu_header_read_in): Update read_comp_unit_head caller.
14168 (dwarf2_version): New function.
14169 * symfile.h (struct dwarf2_debug_sections): Add loclists, line_str and
14170 rnglists.
14171 * xcoffread.c (dwarf2_xcoff_names): Update struct dwarf2_debug_sections
14172 fields.
14173
22d2f3ab
JK
141742017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
14175
14176 * dwarf2read.c (abbrev_table_read_table): Read the data only once.
14177
5f46c5a5
JK
141782017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
14179
14180 * dwarf2read.c (dwarf2_ranges_process): New function from
14181 dwarf2_ranges_read.
14182 (dwarf2_ranges_read, dwarf2_record_block_ranges): Use
14183 dwarf2_ranges_process.
14184
78d4d2c5
JK
141852017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
14186
14187 * dwarf2read.c (create_debug_type_hash_table): New function from
14188 create_debug_types_hash_table.
14189 (create_debug_types_hash_table): Call create_debug_type_hash_table.
14190 (create_all_type_units, open_and_init_dwo_file): Update
14191 create_debug_types_hash_table callers.
14192
1b076f25
SDJ
141932017-02-20 Sergio Durigan Junior <sergiodj@redhat.com>
14194
14195 PR gdb/16188
14196 * fork-child.c (trace_start_error): Fix thinko. va_end should
14197 refer to 'ap', not 'args'.
14198
0db8980c
SDJ
141992017-02-20 Sergio Durigan Junior <sergiodj@redhat.com>
14200 Pedro Alves <palves@redhat.com>
14201
14202 PR gdb/16188
14203 * darwin-nat.c (darwin_ptrace_me): Check if calls to system
14204 calls succeeded.
14205 * fork-child.c (trace_start_error): New function.
14206 (trace_start_error_with_name): Likewise.
14207 * gnu-nat.c (gnu_ptrace_me): Check if call to PTRACE succeeded.
14208 * inf-ptrace.c (inf_ptrace_me): Likewise.
14209 * inferior.h (trace_start_error): New prototype.
14210 (trace_start_error_with_name): Likewise.
14211
99e8a4f9
SDJ
142122017-02-15 Sergio Durigan Junior <sergiodj@redhat.com>
14213
14214 PR gdb/21164
14215 * psymtab.c (maintenance_print_psymbols): Verify if 'argv' is not
14216 NULL before using it.
14217 * symmisc.c (maintenance_print_symbols): Likewise.
14218 (maintenance_print_msymbols): Likewise.
14219
4e746bb6
TW
142202017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
14221
14222 * NEWS: Add record Python bindings entry.
14223
142242017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
14225
14226 * Makefile.in (SUBDIR_PYTHON_OBS): Add py-record-btrace.o,
14227 py-record-full.o.
14228 (SUBDIR_PYTHON_SRCS): Add py-record-btrace.c, py-record-full.c.
14229 * python/py-record-btrace.c, python/py-record-btrace.h,
14230 python/py-record-full.c, python/py-record-full.h: New file.
14231 * python/py-record.c: Add include for py-record-btrace.h and
14232 py-record-full.h.
14233 (recpy_method, recpy_format, recpy_goto, recpy_replay_position,
14234 recpy_instruction_history, recpy_function_call_history, recpy_begin,
14235 recpy_end): Use functions from py-record-btrace.c and py-record-full.c.
14236 * python/python-internal.h (PyInt_FromSsize_t, PyInt_AsSsize_t):
14237 New definition.
14238 (gdbpy_initialize_btrace): New export.
14239 * python/python.c (_initialize_python): Add gdbpy_initialize_btrace.
14240
142412017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
14242
14243 * Makefile.in (SUBDIR_PYTHON_OBS): Add python/py-record.o.
14244 (SUBDIR_PYTHON_SRCS): Add python/py-record.c.
14245 * python/py-record.c: New file.
14246 * python/python-internal.h (gdbpy_start_recording,
14247 gdbpy_current_recording, gdpy_stop_recording,
14248 gdbpy_initialize_record): New export.
14249 * python/python.c (_initialize_python): Add gdbpy_initialize_record.
14250 (python_GdbMethods): Add gdbpy_start_recording,
14251 gdbpy_current_recording and gdbpy_stop_recording.
14252
142532017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
14254
14255 * record-btrace.c (record_btrace_record_method): New function.
14256 (init_record_btrace_ops): Initialize to_record_method.
14257 * record-full.c (record_full_record_method): New function.
14258 (init_record_full_ops, init_record_full_core_ops): Add
14259 record_full_record_method.
14260 * record.h (enum record_method): New enum.
14261 * target-debug.h (target_debug_print_enum_record_method: New define.
14262 * target-delegates.c: Regenerate.
14263 * target.c (target_record_method): New function.
14264 * target.h: Include record.h.
14265 (struct target_ops) <to_record_method>: New field.
14266 (target_record_method): New export.
14267
142682017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
14269
14270 * record.h (record_start, record_stop): New export.
14271 * record.c (record_start, record_stop): New function.
14272
142732017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
14274
14275 * btrace.c (btrace_fetch): Copy function call segments pointer
14276 into a vector.
14277 (btrace_clear): Clear the vector.
14278 (btrace_find_insn_by_number): Use binary search to find the correct
14279 function call segment.
14280 * btrace.h (brace_fun_p): New typedef.
14281 (struct btrace_thread_info) <functions>: New field.
14282
142832017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
14284
14285 * record-btrace.c (btrace_ui_out_decode_error): Move most of it ...
14286 * btrace.c (btrace_decode_error): ... here. New function.
14287 * btrace.h (btrace_decode_error): New export.
14288
142892017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
14290
14291 * btrace.c (ftrace_call_num_insn, btrace_insn_get_error): New function.
14292 (ftrace_new_function, btrace_insn_number, btrace_insn_cmp,
14293 btrace_find_insn_by_number): Remove special case for gaps.
14294 * btrace.h (btrace_insn_get_error): New export.
14295 (btrace_insn_number, btrace_find_insn_by_number): Adjust comment.
14296 * record-btrace.c (btrace_insn_history): Print number for gaps.
14297 (record_btrace_info, record_btrace_goto): Handle gaps.
14298
3f77c769
TT
142992017-02-14 Tom Tromey <tom@tromey.com>
14300
14301 PR python/13598:
14302 * python/python.c (gdbpy_before_prompt_hook): Emit before_prompt
14303 event.
14304 * python/py-evts.c (gdbpy_initialize_py_events): Add
14305 before_prompt registry.
14306 * python/py-events.h (events_object) <before_prompt>: New field.
14307
4c2c7ac6
MM
143082017-02-14 Markus Metzger <markus.t.metzger@intel.com>
14309
14310 * btrace.c (ftrace_new_switch): Preserve up link and flags.
14311
5cf30ebf
LM
143122017-02-13 Luis Machado <lgustavo@codesourcery.com>
14313
14314 * symfile (_initialize_symfile): Add usage text to the load command's
14315 help text.
14316
26a06916
SM
143172017-02-10 Simon Marchi <simon.marchi@ericsson.com>
14318
14319 * utils.c (defaulted_query): Don't query on secondary UIs.
14320
0b145e37
TT
143212017-02-10 Tom Tromey <tom@tromey.com>
14322
14323 * rust-lang.c (rust_get_disr_info): Remove unused variable.
14324
2d8365c4
TT
143252017-02-10 Tom Tromey <tom@tromey.com>
14326
14327 * python/py-value.c (valpy_richcompare_throw): Remove unnecessary
14328 "cleanup" local.
14329 * python/py-type.c (typy_legacy_template_argument): Remove
14330 unnecessary "cleanup" local.
14331
2bb8f231
TT
143322017-02-10 Tom Tromey <tom@tromey.com>
14333
14334 * python/python.c (do_start_initialization): New function, from
14335 _initialize_python.
14336 (_initialize_python): Call do_start_initialization.
14337 * python/py-linetable.c (ltpy_iternext): Use explicit returns, not
14338 goto.
14339
1bdfaf42
TT
143402017-02-10 Tom Tromey <tom@tromey.com>
14341
14342 * python/py-prettyprint.c (pretty_print_one_value): Use
14343 gdbpy_ref.
14344
88b6faea
TT
143452017-02-10 Tom Tromey <tom@tromey.com>
14346
14347 * python/py-cmd.c (cmdpy_destroyer): Use gdbpy_ref.
14348 * python/py-breakpoint.c (gdbpy_breakpoint_deleted): Use
14349 gdbpy_ref.
14350 * python/py-type.c (field_new): Use gdbpy_ref.
14351 * python/py-symtab.c (symtab_and_line_to_sal_object): Use
14352 gdbpy_ref.
14353 * python/py-progspace.c (pspy_new): Use gdbpy_ref.
14354 (py_free_pspace): Likewise.
14355 (pspace_to_pspace_object): Likewise.
14356 * python/py-objfile.c (objfpy_new): Use gdbpy_ref.
14357 (py_free_objfile): Likewise.
14358 (objfile_to_objfile_object): Likewise.
14359 * python/py-inferior.c (delete_thread_object): Use
14360 gdbpy_ref.
14361 (infpy_read_memory): Likewise.
14362 (py_free_inferior): Likewise.
14363 * python/py-evtregistry.c (create_eventregistry_object): Use
14364 gdbpy_ref.
14365 * python/py-event.c (create_event_object): Use gdbpy_ref.
14366
7780f186
TT
143672017-02-10 Tom Tromey <tom@tromey.com>
14368
14369 * python/py-ref.h (gdbpy_ref_policy): Now a template.
14370 (gdbpy_ref): Now a template; allow subclasses of PyObject to be
14371 used.
14372 * python/py-arch.c, python/py-bpevent.c, python/py-breakpoint.c,
14373 python/py-cmd.c, python/py-continueevent.c, python/py-event.c,
14374 python/py-exitedevent.c, python/py-finishbreakpoint.c,
14375 python/py-framefilter.c, python/py-function.c,
14376 python/py-inferior.c, python/py-infevents.c,
14377 python/py-linetable.c, python/py-newobjfileevent.c,
14378 python/py-param.c, python/py-prettyprint.c, python/py-ref.h,
14379 python/py-signalevent.c, python/py-stopevent.c,
14380 python/py-symbol.c, python/py-threadevent.c, python/py-type.c,
14381 python/py-unwind.c, python/py-utils.c, python/py-value.c,
14382 python/py-varobj.c, python/py-xmethods.c, python/python.c,
14383 varobj.c: Change gdbpy_ref to gdbpy_ref<>.
14384
d4b0bb18
TT
143852017-02-10 Tom Tromey <tom@tromey.com>
14386
14387 * ui-out.h (ui_out_emit_type): New class.
14388 (ui_out_emit_tuple, ui_out_emit_list): New typedefs.
14389 * python/py-framefilter.c (py_print_single_arg): Use gdb::optional
14390 and ui_out_emit_tuple.
14391 (enumerate_locals): Likewise.
14392 (py_mi_print_variables, py_print_locals, py_print_args): Use
14393 ui_out_emit_list.
14394 (py_print_frame): Use gdb::optional, ui_out_emit_tuple,
14395 ui_out_emit_list.
14396 * common/gdb_optional.h: New file.
14397
f67f945c
MG
143982017-02-10 Martin Galvan <martingalvan@sourceware.org>
14399
14400 * MAINTAINERS (Write After Approval): Update my e-mail address.
14401
18da0c51
MG
144022017-02-10 Martin Galvan <martingalvan@sourceware.org>
14403
14404 PR gdb/21122
14405 * breakpoint.c (_initialize_breakpoint): Update the help description
14406 of the 'commands' command to indicate that it takes a list argument.
14407
62c14536
SM
144082017-02-09 Simon Marchi <simon.marchi@ericsson.com>
14409
14410 * interps.c (current_interp_set_logging): Remove "return".
14411
ff6fa247
GB
144122017-02-09 Gary Benson <gbenson@redhat.com>
14413
14414 * symtab.c (add_symtab_completions): Prevent NULL pointer
14415 dereference.
14416
a474bd8e
PA
144172017-02-08 Pedro Alves <palves@redhat.com>
14418
14419 * interps.c (interp::interp): Remove reference to quiet_p.
14420 (interp_set): Make static. Remove dead "Switching to" output
14421 code.
14422 (interp_quiet_p, interp_set_quiet): Delete.
14423 (interpreter_exec_cmd): Don't set the interpreter quiet.
14424 * interps.h (interp_quiet_p): Make static.
14425 (class interp) <quiet_p>: Remove field
14426
3d7b173c
JG
144272017-02-08 Jerome Guitton <guitton@adacore.com>
14428
604c4576
JG
14429 * cli/cli-decode.c (find_command_name_length): Make it extern.
14430 * cli/cli-decode.h (find_command_name_length): Declare.
14431 * cli/cli-script.c (command_name_equals, line_first_arg):
14432 New functions.
14433 (process_next_line): Use cli-decode to parse command names.
14434 (build_command_line): Make args a constant pointer.
14435
144362017-02-08 Jerome Guitton <guitton@adacore.com>
6dbb839a 14437
3d7b173c
JG
14438 * cli-decode.c (lookup_cmd_1, lookup_cmd_composition):
14439 Remove case-insensitive search.
14440
1291063d
JM
144412017-02-07 Jose E. Marchesi <jose.marchesi@oracle.com>
14442
14443 * sparc-tdep.c (sparc32_gdbarch_init): Do not place a + operator
14444 at the end of the line. Avoids an ARI warning.
14445
20b477a7
LM
144462017-02-06 Luis Machado <lgustavo@codesourcery.com>
14447
14448 * NEWS: Mention support for record/replay of Intel 64 rdrand and
14449 rdseed instructions.
14450 i386-tdep.c (i386_process_record): Handle Intel 64 rdrand and rseed.
14451
3f7b46f2
IR
144522017-02-06 Ivo Raisr <ivo.raisr@oracle.com>
14453
14454 PR tdep/20936
14455 Provide and use sparc32 and sparc64 target description XML files.
14456 * features/sparc/sparc32-cp0.xml, features/sparc/sparc32-cpu.xml,
14457 features/sparc/sparc32-fpu.xml: New files for sparc 32-bit.
14458 * features/sparc/sparc64-cp0.xml, features/sparc/sparc64-cpu.xml,
14459 features/sparc/sparc64-fpu.xml: New files for sparc 64-bit.
14460 * features/sparc/sparc32-solaris.xml: New file.
14461 * features/sparc/sparc64-solaris.xml: New file.
14462 * features/sparc/sparc32-solaris.c: Generated.
14463 * features/sparc/sparc64-solaris.c: Generated.
14464 * sparc-tdep.h: Account for differences in target descriptions.
14465 * sparc-tdep.c (sparc32_register_name): Use target provided registers.
14466 (sparc32_register_type): Use target provided registers.
14467 (validate_tdesc_registers): New function.
14468 (sparc32_gdbarch_init): Use tdesc_has_registers.
14469 Set pseudoregister functions.
14470 * sparc64-tdep.c (sparc64_register_name): Use target provided registers.
14471 (sparc64_register_type): Use target provided registers.
14472 (sparc64_init_abi): Set pseudoregister functions.
14473
f0fd41c1
TT
144742017-02-03 Tom Tromey <tom@tromey.com>
14475
14476 PR rust/21097:
14477 * rust-lang.c (rust_print_type) <TYPE_CODE_UNION>: Handle enums
14478 with a single member.
14479
d6f9b0fb
PA
144802017-02-03 Pedro Alves <palves@redhat.com>
14481
14482 * cli/cli-interp.c (cli_interp_base::cli_interp_base)
14483 (cli_interp_base::~cli_interp_base): New.
14484 (cli_interp): New struct.
14485 (as_cli_interp): Cast the interp itself to cli_interp.
14486 (cli_interpreter_pre_command_loop): Rename to ...
14487 (cli_interp_base::pre_command_loop): ... this. Remove 'self'
14488 parameter.
14489 (cli_interpreter_init): Rename to ...
14490 (cli_interp::init): ... this. Remove 'self' parameter. Use
14491 boolean. Make extern.
14492 (cli_interpreter_resume): Rename to ...
14493 (cli_interp::resume): ... this. Remove 'data' parameter. Make
14494 extern.
14495 (cli_interpreter_suspend): Rename to ...
14496 (cli_interp::suspend): ... this. Remove 'data' parameter. Make
14497 extern.
14498 (cli_interpreter_exec): Rename to ...
14499 (cli_interp::exec): ... this. Remove 'data' parameter. Make
14500 extern.
14501 (cli_interpreter_supports_command_editing): Rename to ...
14502 (cli_interp_base::supports_command_editing): ... this. Remove
14503 'interp' parameter. Make extern.
14504 (cli_ui_out): Rename to ...
14505 (cli_interp::interp_ui_out): ... this. Remove 'interp' parameter.
14506 Make extern.
14507 (cli_set_logging): Rename to ...
14508 (cli_interp_base::set_logging): ... this. Remove 'interp'
14509 parameter. Make extern.
14510 (cli_interp_procs): Delete.
14511 (cli_interp_factory): Adjust to use "new".
14512 * cli/cli-interp.h: Include "interps.h".
14513 (struct cli_interp_base): New struct.
14514 * interps.c (struct interp): Delete. Fields moved to interps.h.
14515 (interp_new): Delete.
14516 (interp::interp, interp::~interp): New.
14517 (interp_set): Use bool, and return void. Assume the interpreter
14518 has suspend, init and resume methods, and that the all return
14519 void.
14520 (set_top_level_interpreter): interp_set returns void.
14521 (interp_ui_out): Adapt.
14522 (current_interp_set_logging): Adapt.
14523 (interp_data): Delete.
14524 (interp_pre_command_loop, interp_supports_command_editing): Adapt.
14525 (interp_exec): Adapt.
14526 (top_level_interpreter_data): Delete.
14527 * interps.h (interp_init_ftype, interp_resume_ftype)
14528 (interp_suspend_ftype, interp_exec_ftype)
14529 (interp_pre_command_loop_ftype, interp_ui_out_ftype): Delete.
14530 (class interp): New.
14531 (interp_new): Delete.
14532 (interp_set): Now returns void. Use bool.
14533 (interp_data, top_level_interpreter_data): Delete.
14534 * mi/mi-common.h: Include interps.h.
14535 (class mi_interp): Inherit from interp. Define a ctor. Declare
14536 init, resume, suspect, exec, interp_ui_out, set_logging and
14537 pre_command_loop methods.
14538 * mi/mi-interp.c (as_mi_interp): Cast the interp itself.
14539 (mi_interpreter_init): Rename to ...
14540 (mi_interp::init): ... this. Remove the 'interp' parameter, use
14541 bool, return void and make extern. Adjust.
14542 (mi_interpreter_resume): ... Rename to ...
14543 (mi_interp::resume): ... this. Remove the 'data' parameter,
14544 return void and make extern. Adjust.
14545 (mi_interpreter_suspend): ... Rename to ...
14546 (mi_interp::suspend): ... this. Remove the 'data' parameter,
14547 return void and make extern. Adjust.
14548 (mi_interpreter_exec): ... Rename to ...
14549 (mi_interp::exec): ... this. Remove the 'data' parameter and make
14550 extern. Adjust.
14551 (mi_interpreter_pre_command_loop): ... Rename to ...
14552 (mi_interp::pre_command_loop): ... this. Remove the 'self'
14553 parameter and make extern.
14554 (mi_on_normal_stop_1): Adjust.
14555 (mi_ui_out): Rename to ...
14556 (mi_interp::interp_ui_out): ... this. Remove the 'interp'
14557 parameter and make extern. Adjust.
14558 (mi_set_logging): Rename to ...
14559 (mi_interp::set_logging): ... this. Remove the 'interp'
14560 parameter and make extern. Adjust.
14561 (mi_interp_procs): Delete.
14562 (mi_interp_factory): Adjust to use 'new'.
14563 * mi/mi-main.c (mi_cmd_gdb_exit, captured_mi_execute_command)
14564 (mi_print_exception, mi_execute_command, mi_load_progress):
14565 Adjust.
14566 * tui/tui-interp.c (tui_interp): New class.
14567 (as_tui_interp): Return a tui_interp pointer.
14568 (tui_on_normal_stop, tui_on_signal_received)
14569 (tui_on_end_stepping_range, tui_on_signal_exited, tui_on_exited)
14570 (tui_on_no_history, tui_on_user_selected_context_changed): Adjust
14571 to use interp::interp_ui_out.
14572 (tui_init): Rename to ...
14573 (tui_interp::init): ... this. Remove the 'self' parameter, use
14574 bool, return void and make extern. Adjust.
14575 (tui_resume): Rename to ...
14576 (tui_interp::resume): ... this. Remove the 'data' parameter,
14577 return void and make extern. Adjust.
14578 (tui_suspend): Rename to ...
14579 (tui_interp::suspend): ... this. Remove the 'data' parameter,
14580 return void and make extern. Adjust.
14581 (tui_ui_out): Rename to ...
14582 (tui_interp::interp_ui_out): ... this. Remove the 'self'
14583 parameter, and make extern. Adjust.
14584 (tui_exec): Rename to ...
14585 (tui_interp::exec): ... this. Remove the 'data' parameter and
14586 make extern.
14587 (tui_interp_procs): Delete.
14588 (tui_interp_factory): Use "new".
14589
65c40c95
TT
145902017-02-02 Tom Tromey <tom@tromey.com>
14591
14592 * rust-exp.y (ends_raw_string, space_then_number)
14593 (rust_identifier_start_p): Return bool.
14594 * rust-lang.c (rust_tuple_type_p, rust_underscore_fields)
14595 (rust_tuple_struct_type_p, rust_tuple_variant_type_p)
14596 (rust_slice_type_p, rust_range_type_p, rust_u8_type_p)
14597 (rust_chartype_p): Return bool.
14598 (val_print_struct, rust_print_struct_def, rust_print_type):
14599 Update.
14600 * rust-lang.h (rust_tuple_type_p, rust_tuple_struct_type_p):
14601 Return bool.
14602
b50f188d
TT
146032017-02-02 Tom Tromey <tom@tromey.com>
14604
14605 * rust-lang.c: Reindent.
14606
03c85b11
TT
146072017-02-02 Tom Tromey <tom@tromey.com>
14608
14609 * rust-lang.h (rust_crate_for_block): Update.
14610 * rust-lang.c (rust_crate_for_block): Return std::string.
14611 (rust_get_disr_info): Use std:;string, not
14612 gdb::unique_xmalloc_ptr.
14613 * rust-exp.y (crate_name): Update.
14614
9b6da501
PA
146152017-02-02 Pedro Alves <palves@redhat.com>
14616
14617 * disasm-selftests.c (print_one_insn_test): Move the "verbose"
14618 field out of gdb_disassembler_test and make it static.
14619
ec4cb20b
PA
146202017-02-02 Pedro Alves <palves@redhat.com>
14621
14622 * mi/mi-common.h (struct mi_interp): Delete the mi2_interp,
14623 mi1_interp and mi_interp fields.
14624
5be5dbf0
PA
146252017-02-02 Pedro Alves <palves@redhat.com>
14626
616268b6
PA
14627 * cli/cli-interp.c (struct saved_output_files, saved_output):
14628 Moved from cli/cli-logging.c.
14629 (cli_set_logging): New function.
14630 (cli_interp_procs): Install cli_set_logging.
14631 * cli/cli-interp.h (make_logging_output, cli_set_logging):
14632 Declare.
14633 * cli/cli-logging.c (struct saved_output_files, saved_output):
14634 Moved to cli/cli-interp.c.
14635 (pop_output_files): Don't save outputs here.
14636 (make_logging_output): New function.
14637 (handle_redirections): Don't build tee nor save previous outputs
14638 here.
14639 * interps.c (current_interp_set_logging): Change prototype.
14640 Assume there's always a set_logging_proc method installed.
14641 * interps.h (interp_set_logging_ftype): Change prototype.
14642 (current_interp_set_logging): Change prototype and adjust comment.
14643 * mi/mi-interp.c (mi_set_logging): Change protototype. Adjust to
14644 use make_logging_output.
14645 * tui/tui-interp.c (tui_interp_procs): Install cli_set_logging.
146462017-02-02 Pedro Alves <palves@redhat.com>
14647
5be5dbf0
PA
14648 * cli/cli-logging.c (maybe_warn_already_logging): New factored out
14649 from ...
14650 (set_logging_overwrite): ... here.
14651 (logging_no_redirect_file): Delete.
14652 (set_logging_redirect): Don't handle redirection on the fly.
14653 Instead warn that "logging off" / "logging on" is necessary.
14654 (pop_output_files): Delete references to logging_no_redirect_file.
14655 (show_logging_command): Always speak in terms of what will happen
14656 once logging is reenabled.
14657
c99cc448
PA
146582017-02-02 Pedro Alves <palves@redhat.com>
14659
14660 * disasm.h (gdb_pretty_print_disassembler): Tweak intro comment.
14661
8b172ce7
PA
146622017-02-02 Pedro Alves <palves@redhat.com>
14663
14664 * disasm.c (gdb_pretty_print_insn): Rename to ...
14665 (gdb_pretty_print_disassembler::pretty_print_insn): ... this.
14666 Remove gdbarch parameter. Adapt to clear the object's buffers
14667 instead of allocating new buffers, and to print using the object's
14668 gdb_disassembler instead of calling gdb_print_insn.
14669 (dump_insns): Use gdb_pretty_print_disassembler.
14670 * disasm.h (gdb_pretty_print_insn): Delete declaration.
14671 (gdb_pretty_print_disassembler): New class.
14672 * record-btrace.c (btrace_insn_history): Use
14673 gdb_pretty_print_disassembler.
14674
d7e74731
PA
146752017-02-02 Pedro Alves <palves@redhat.com>
14676
14677 * ada-lang.c (type_as_string): Use string_file.
14678 * ada-valprint.c (ada_print_floating): Use string_file.
14679 * ada-varobj.c (ada_varobj_scalar_image)
14680 (ada_varobj_get_value_image): Use string_file.
14681 * aix-thread.c (aix_thread_extra_thread_info): Use string_file.
14682 * arm-tdep.c (_initialize_arm_tdep): Use string_printf.
14683 * breakpoint.c (update_inserted_breakpoint_locations)
14684 (insert_breakpoint_locations, reattach_breakpoints)
14685 (print_breakpoint_location, print_one_detail_ranged_breakpoint)
14686 (print_it_watchpoint): Use string_file.
14687 (save_breakpoints): Use stdio_file.
14688 * c-exp.y (oper): Use string_file.
14689 * cli/cli-logging.c (set_logging_redirect): Use ui_file_up and
14690 tee_file.
14691 (pop_output_files): Use delete.
14692 (handle_redirections): Use stdio_file and tee_file.
14693 * cli/cli-setshow.c (do_show_command): Use string_file.
14694 * compile/compile-c-support.c (c_compute_program): Use
14695 string_file.
14696 * compile/compile-c-symbols.c (generate_vla_size): Take a
14697 'string_file &' instead of a 'ui_file *'.
14698 (generate_c_for_for_one_variable): Take a 'string_file &' instead
14699 of a 'ui_file *'. Use string_file.
14700 (generate_c_for_variable_locations): Take a 'string_file &'
14701 instead of a 'ui_file *'.
14702 * compile/compile-internal.h (generate_c_for_for_one_variable):
14703 Take a 'string_file &' instead of a 'ui_file *'.
14704 * compile/compile-loc2c.c (push, pushf, unary, binary)
14705 (print_label, pushf_register_address, pushf_register)
14706 (do_compile_dwarf_expr_to_c): Take a 'string_file &' instead of a
14707 'ui_file *'. Adjust.
14708 * compile/compile.c (compile_to_object): Use string_file.
14709 * compile/compile.h (compile_dwarf_expr_to_c)
14710 (compile_dwarf_bounds_to_c): Take a 'string_file &' instead of a
14711 'ui_file *'.
14712 * cp-support.c (inspect_type): Use string_file and obstack_copy0.
14713 (replace_typedefs_qualified_name): Use string_file and
14714 obstack_copy0.
14715 * disasm.c (gdb_pretty_print_insn): Use string_file.
14716 (gdb_disassembly): Adjust reference the null_stream global.
14717 (do_ui_file_delete): Delete.
14718 (gdb_insn_length): Use null_stream.
14719 * dummy-frame.c (maintenance_print_dummy_frames): Use stdio_file.
14720 * dwarf2loc.c (dwarf2_compile_property_to_c)
14721 (locexpr_generate_c_location, loclist_generate_c_location): Take a
14722 'string_file &' instead of a 'ui_file *'.
14723 * dwarf2loc.h (dwarf2_compile_property_to_c): Likewise.
14724 * dwarf2read.c (do_ui_file_peek_last): Delete.
14725 (dwarf2_compute_name): Use string_file.
14726 * event-top.c (gdb_setup_readline): Use stdio_file.
14727 * gdbarch.sh (verify_gdbarch): Use string_file.
14728 * gdbtypes.c (safe_parse_type): Use null_stream.
14729 * guile/scm-breakpoint.c (gdbscm_breakpoint_commands): Use
14730 string_file.
14731 * guile/scm-disasm.c (gdbscm_print_insn_from_port): Take a
14732 'string_file *' instead of a 'ui_file *'.
14733 (gdbscm_arch_disassemble): Use string_file.
14734 * guile/scm-frame.c (frscm_print_frame_smob): Use string_file.
14735 * guile/scm-ports.c (class ioscm_file_port): Now a class that
14736 inherits from ui_file.
14737 (ioscm_file_port_delete, ioscm_file_port_rewind)
14738 (ioscm_file_port_put): Delete.
14739 (ioscm_file_port_write): Rename to ...
14740 (ioscm_file_port::write): ... this. Remove file_port_magic
14741 checks.
14742 (ioscm_file_port_new): Delete.
14743 (ioscm_with_output_to_port_worker): Use ioscm_file_port and
14744 ui_file_up.
14745 * guile/scm-type.c (tyscm_type_name): Use string_file.
14746 * guile/scm-value.c (vlscm_print_value_smob, gdbscm_value_print):
14747 Use string_file.
14748 * infcmd.c (print_return_value_1): Use string_file.
14749 * infrun.c (print_target_wait_results): Use string_file.
14750 * language.c (add_language): Use string_file.
14751 * location.c (explicit_to_string_internal): Use string_file.
14752 * main.c (captured_main_1): Use null_file.
14753 * maint.c (maintenance_print_architecture): Use stdio_file.
14754 * mi/mi-cmd-stack.c (list_arg_or_local): Use string_file.
14755 * mi/mi-common.h (struct mi_interp) <out, err, log, targ,
14756 event_channel>: Change type to mi_console_file pointer.
14757 * mi/mi-console.c (mi_console_file_fputs, mi_console_file_flush)
14758 (mi_console_file_delete): Delete.
14759 (struct mi_console_file): Delete.
14760 (mi_console_file_magic): Delete.
14761 (mi_console_file_new): Delete.
14762 (mi_console_file::mi_console_file): New.
14763 (mi_console_file_delete): Delete.
14764 (mi_console_file_fputs): Delete.
14765 (mi_console_file::write): New.
14766 (mi_console_raw_packet): Delete.
14767 (mi_console_file::flush): New.
14768 (mi_console_file_flush): Delete.
14769 (mi_console_set_raw): Rename to ...
14770 (mi_console_file::set_raw): ... this.
14771 * mi/mi-console.h (class mi_console_file): New class.
14772 (mi_console_file_new, mi_console_set_raw): Delete.
14773 * mi/mi-interp.c (mi_interpreter_init): Use mi_console_file.
14774 (mi_set_logging): Use delete and tee_file. Adjust.
14775 * mi/mi-main.c (output_register): Use string_file.
14776 (mi_cmd_data_evaluate_expression): Use string_file.
14777 (mi_cmd_data_read_memory): Use string_file.
14778 (mi_cmd_execute, print_variable_or_computed): Use string_file.
14779 * mi/mi-out.c (mi_ui_out::main_stream): New.
14780 (mi_ui_out::rewind): Use main_stream and
14781 string_file.
14782 (mi_ui_out::put): Use main_stream and string_file.
14783 (mi_ui_out::mi_ui_out): Remove 'stream' parameter.
14784 Allocate a 'string_file' instead.
14785 (mi_out_new): Don't allocate a mem_fileopen stream here.
14786 * mi/mi-out.h (mi_ui_out::mi_ui_out): Remove 'stream' parameter.
14787 (mi_ui_out::main_stream): Declare method.
14788 * printcmd.c (eval_command): Use string_file.
14789 * psymtab.c (maintenance_print_psymbols): Use stdio_file.
14790 * python/py-arch.c (archpy_disassemble): Use string_file.
14791 * python/py-breakpoint.c (bppy_get_commands): Use string_file.
14792 * python/py-frame.c (frapy_str): Use string_file.
14793 * python/py-framefilter.c (py_print_type, py_print_single_arg):
14794 Use string_file.
14795 * python/py-type.c (typy_str): Use string_file.
14796 * python/py-unwind.c (unwind_infopy_str): Use string_file.
14797 * python/py-value.c (valpy_str): Use string_file.
14798 * record-btrace.c (btrace_insn_history): Use string_file.
14799 * regcache.c (regcache_print): Use stdio_file.
14800 * reggroups.c (maintenance_print_reggroups): Use stdio_file.
14801 * remote.c (escape_buffer): Use string_file.
14802 * rust-lang.c (rust_get_disr_info): Use string_file.
14803 * serial.c (serial_open_ops_1): Use stdio_file.
14804 (do_serial_close): Use delete.
14805 * stack.c (print_frame_arg): Use string_file.
14806 (print_frame_args): Remove local mem_fileopen stream, not used.
14807 (print_frame): Use string_file.
14808 * symmisc.c (maintenance_print_symbols): Use stdio_file.
14809 * symtab.h (struct symbol_computed_ops) <generate_c_location>:
14810 Take a 'string_file *' instead of a 'ui_file *'.
14811 * top.c (new_ui): Use stdio_file and stderr_file.
14812 (free_ui): Use delete.
14813 (execute_command_to_string): Use string_file.
14814 (quit_confirm): Use string_file.
14815 * tracepoint.c (collection_list::append_exp): Use string_file.
14816 * tui/tui-disasm.c (tui_disassemble): Use string_file.
14817 * tui/tui-file.c: Don't include "ui-file.h".
14818 (enum streamtype, struct tui_stream): Delete.
14819 (tui_file_new, tui_file_delete, tui_fileopen, tui_sfileopen)
14820 (tui_file_isatty, tui_file_rewind, tui_file_put): Delete.
14821 (tui_file::tui_file): New method.
14822 (tui_file_fputs): Delete.
14823 (tui_file_get_strbuf): Delete.
14824 (tui_file::puts): New method.
14825 (tui_file_adjust_strbuf): Delete.
14826 (tui_file_flush): Delete.
14827 (tui_file::flush): New method.
14828 * tui/tui-file.h: Tweak intro comment.
14829 Include ui-file.h.
14830 (tui_fileopen, tui_sfileopen, tui_file_get_strbuf)
14831 (tui_file_adjust_strbuf): Delete declarations.
14832 (class tui_file): New class.
14833 * tui/tui-io.c (tui_initialize_io): Use tui_file.
14834 * tui/tui-regs.c (tui_restore_gdbout): Use delete.
14835 (tui_register_format): Use string_stream.
14836 * tui/tui-stack.c (tui_make_status_line): Use string_file.
14837 (tui_get_function_from_frame): Use string_file.
14838 * typeprint.c (type_to_string): Use string_file.
14839 * ui-file.c (struct ui_file, ui_file_magic, ui_file_new): Delete.
14840 (null_stream): New global.
14841 (ui_file_delete): Delete.
14842 (ui_file::ui_file): New.
14843 (null_file_isatty): Delete.
14844 (ui_file::~ui_file): New.
14845 (null_file_rewind): Delete.
14846 (ui_file::printf): New.
14847 (null_file_put): Delete.
14848 (null_file_flush): Delete.
14849 (ui_file::putstr): New.
14850 (null_file_write): Delete.
14851 (ui_file::putstrn): New.
14852 (null_file_read): Delete.
14853 (ui_file::putc): New.
14854 (null_file_fputs): Delete.
14855 (null_file_write_async_safe): Delete.
14856 (ui_file::vprintf): New.
14857 (null_file_delete): Delete.
14858 (null_file::write): New.
14859 (null_file_fseek): Delete.
14860 (null_file::puts): New.
14861 (ui_file_data): Delete.
14862 (null_file::write_async_safe): New.
14863 (gdb_flush, ui_file_isatty): Adjust.
14864 (ui_file_put, ui_file_rewind): Delete.
14865 (ui_file_write): Adjust.
14866 (ui_file_write_for_put): Delete.
14867 (ui_file_write_async_safe, ui_file_read): Adjust.
14868 (ui_file_fseek): Delete.
14869 (fputs_unfiltered): Adjust.
14870 (set_ui_file_flush, set_ui_file_isatty, set_ui_file_rewind)
14871 (set_ui_file_put, set_ui_file_write, set_ui_file_write_async_safe)
14872 (set_ui_file_read, set_ui_file_fputs, set_ui_file_fseek)
14873 (set_ui_file_data): Delete.
14874 (string_file::~string_file, string_file::write)
14875 (struct accumulated_ui_file, do_ui_file_xstrdup, ui_file_xstrdup)
14876 (do_ui_file_as_string, ui_file_as_string): Delete.
14877 (do_ui_file_obsavestring, ui_file_obsavestring): Delete.
14878 (struct mem_file): Delete.
14879 (mem_file_new): Delete.
14880 (stdio_file::stdio_file): New.
14881 (mem_file_delete): Delete.
14882 (stdio_file::stdio_file): New.
14883 (mem_fileopen): Delete.
14884 (stdio_file::~stdio_file): New.
14885 (mem_file_rewind): Delete.
14886 (stdio_file::set_stream): New.
14887 (mem_file_put): Delete.
14888 (stdio_file::open): New.
14889 (mem_file_write): Delete.
14890 (stdio_file_magic, struct stdio_file): Delete.
14891 (stdio_file_new, stdio_file_delete, stdio_file_flush): Delete.
14892 (stdio_file::flush): New.
14893 (stdio_file_read): Rename to ...
14894 (stdio_file::read): ... this. Adjust.
14895 (stdio_file_write): Rename to ...
14896 (stdio_file::write): ... this. Adjust.
14897 (stdio_file_write_async_safe): Rename to ...
14898 (stdio_file::write_async_safe) ... this. Adjust.
14899 (stdio_file_fputs): Rename to ...
14900 (stdio_file::puts) ... this. Adjust.
14901 (stdio_file_isatty): Delete.
14902 (stdio_file_fseek): Delete.
14903 (stdio_file::isatty): New.
14904 (stderr_file_write): Rename to ...
14905 (stderr_file::write) ... this. Adjust.
14906 (stderr_file_fputs): Rename to ...
14907 (stderr_file::puts) ... this. Adjust.
14908 (stderr_fileopen, stdio_fileopen, gdb_fopen): Delete.
14909 (stderr_file::stderr_file): New.
14910 (tee_file_magic): Delete.
14911 (struct tee_file): Delete.
14912 (tee_file::tee_file): New.
14913 (tee_file_new): Delete.
14914 (tee_file::~tee_file): New.
14915 (tee_file_delete): Delete.
14916 (tee_file_flush): Rename to ...
14917 (tee_file::flush): ... this. Adjust.
14918 (tee_file_write): Rename to ...
14919 (tee_file::write): ... this. Adjust.
14920 (tee_file::write_async_safe): New.
14921 (tee_file_fputs): Rename to ...
14922 (tee_file::puts): ... this. Adjust.
14923 (tee_file_isatty): Rename to ...
14924 (tee_file::isatty): ... this. Adjust.
14925 * ui-file.h (struct obstack, struct ui_file): Don't
14926 forward-declare.
14927 (ui_file_new, ui_file_flush_ftype, set_ui_file_flush)
14928 (ui_file_write_ftype)
14929 (set_ui_file_write, ui_file_fputs_ftype, set_ui_file_fputs)
14930 (ui_file_write_async_safe_ftype, set_ui_file_write_async_safe)
14931 (ui_file_read_ftype, set_ui_file_read, ui_file_isatty_ftype)
14932 (set_ui_file_isatty, ui_file_rewind_ftype, set_ui_file_rewind)
14933 (ui_file_put_method_ftype, ui_file_put_ftype, set_ui_file_put)
14934 (ui_file_delete_ftype, set_ui_file_data, ui_file_fseek_ftype)
14935 (set_ui_file_fseek): Delete.
14936 (ui_file_data, ui_file_delete, ui_file_rewind)
14937 (struct ui_file): New.
14938 (ui_file_up): New.
14939 (class null_file): New.
14940 (null_stream): Declare.
14941 (ui_file_write_for_put, ui_file_put): Delete.
14942 (ui_file_xstrdup, ui_file_as_string, ui_file_obsavestring):
14943 Delete.
14944 (ui_file_fseek, mem_fileopen, stdio_fileopen, stderr_fileopen)
14945 (gdb_fopen, tee_file_new): Delete.
14946 (struct string_file): New.
14947 (struct stdio_file): New.
14948 (stdio_file_up): New.
14949 (struct stderr_file): New.
14950 (class tee_file): New.
14951 * ui-out.c (ui_out::field_stream): Take a 'string_file &' instead
14952 of a 'ui_file *'. Adjust.
14953 * ui-out.h (class ui_out) <field_stream>: Likewise.
14954 * utils.c (do_ui_file_delete, make_cleanup_ui_file_delete)
14955 (null_stream): Delete.
14956 (error_stream): Take a 'string_file &' instead of a 'ui_file *'.
14957 Adjust.
14958 * utils.h (struct ui_file): Delete forward declaration..
14959 (make_cleanup_ui_file_delete, null_stream): Delete declarations.
14960 (error_stream): Take a 'string_file &' instead of a
14961 'ui_file *'.
14962 * varobj.c (varobj_value_get_print_value): Use string_file.
14963 * xtensa-tdep.c (xtensa_verify_config): Use string_file.
14964 * gdbarch.c: Regenerate.
14965
187808b0
PA
149662017-02-02 Pedro Alves <palves@redhat.com>
14967
14968 * disasm.c (gdb_disassembler::pretty_print_insn): Rename to...
14969 (gdb_pretty_print_insn): ... this. Now a free function. Add back
14970 a 'gdbarch' parameter. Allocate a mem_fileopen stream here.
14971 Adjust to call gdb_print_insn instead of
14972 gdb_disassembler::print_insn.
14973 (dump_insns, do_mixed_source_and_assembly_deprecated)
14974 (do_mixed_source_and_assembly, do_assembly_only): Add back a
14975 'gdbarch' parameter. Remove gdb_disassembler parameter.
14976 (gdb_disassembly): Don't allocate a gdb_disassembler here.
14977 * disasm.h (gdb_disassembler::pretty_print_insn): Delete
14978 declaration.
14979 (gdb_pretty_print_insn): Re-add declaration.
14980 * record-btrace.c (btrace_insn_history): Don't allocate a
14981 gdb_disassembler here. Adjust to call gdb_pretty_print_insn.
14982
7a8eb317
SM
149832017-02-01 Simon Marchi <simon.marchi@polymtl.ca>
14984
14985 * disasm.h (gdb_disassembly): Remove file_string parameter.
14986 * disasm.c (gdb_disassembly): Likewise.
14987 * cli/cli-cmds.c (print_disassembly): Adapt.
14988 * mi/mi-cmd-disas.c (mi_cmd_disassemble): Likewise.
14989 * stack.c (do_gdb_disassembly): Likewise.
14990
7346ef59
AA
149912017-02-01 Andreas Arnez <arnez@linux.vnet.ibm.com>
14992
14993 * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): For
14994 DWARF_VALUE_LITERAL, no longer ignore the offset on big-endian
14995 targets. And if the implicit value is longer than needed, extract
14996 the first bytes instead of the "least significant" ones.
14997
cd4007e4
MM
149982017-02-01 Markus Metzger <markus.t.metzger@intel.com>
14999
15000 * btrace.c (btrace_enable): Do not call btrace_add_pc for
15001 BTRACE_FORMAT_PT or if can_access_registers_ptid returns false.
15002 (btrace_fetch): Assert can_access_registers_ptid.
15003 * record-btrace.c (require_btrace_thread, record_btrace_info): Call
15004 validate_registers_access.
15005
cf77c34e
MM
150062017-02-01 Markus Metzger <markus.t.metzger@intel.com>
15007
15008 * gdbthread.h (can_access_registers_ptid): New.
15009 * thread.c (can_access_registers_ptid): New.
15010
be85ce7d
PA
150112017-02-01 Pedro Alves <palves@redhat.com>
15012
15013 * i386-tdep.c (i386_fast_tracepoint_valid_at): Use gdb_insn_length.
15014
29b0b251
PA
150152017-01-31 Pedro Alves <palves@redhat.com>
15016
15017 * mi/mi-interp.c (mi_breakpoint_created, mi_breakpoint_modified):
15018 Fix typos.
15019
289b5b24
PA
150202017-01-31 Pedro Alves <palves@redhat.com>
15021
15022 * stack.c (print_frame_args): Remove local mem_fileopen stream,
15023 not used.
15024
b47413b4
PA
150252017-01-31 Pedro Alves <palves@redhat.com>
15026
15027 * varobj.c (varobj_value_get_print_value): Remove xstrdup call.
15028
60adb36c
PA
150292017-01-31 Pedro Alves <palves@redhat.com>
15030
15031 * common/scoped_restore.h
15032 (scoped_restore_tmpl::scoped_restore_tmpl): Template on T2, and
15033 change the value's parameter type to T2.
15034 (make_scoped_restore): Likewise.
15035
2735833d
WT
150362017-01-27 Walfred Tedeschi <walfred.tedeschi@intel.com>
15037 Richard Henderson <rth@redhat.com>
15038
15039 * amd64-linux-nat.c (PTRACE_ARCH_PRCTL): New define.
15040 (amd64_linux_fetch_inferior_registers): Add case to fetch FS_BASE
15041 GS_BASE for older kernels.
15042 (amd64_linux_store_inferior_registers): Add case to store FS_BASE
15043 GS_BASE for older kernels.
15044 * amd64-linux-tdep.c (amd64_linux_gregset_reg_offset): Add FS_BASE
15045 and GS_BASE to the offset table.
15046 (amd64_linux_register_reggroup_p): Add FS_BASE and GS_BASE to the
15047 system register group.
15048 * amd64-nat.c (amd64_native_gregset_reg_offset): Implements case
15049 for older kernels.
15050 * amd64-tdep.c (amd64_init_abi): Add segment registers for the
15051 amd64 ABI.
15052 * amd64-tdep.h (amd64_regnum): Add AMD64_FSBASE_REGNUM and
15053 AMD64_GSBASE_REGNUM.
15054 (AMD64_NUM_REGS): Set to AMD64_GSBASE_REGNUM + 1.
15055 * features/Makefile (amd64-linux.dat, amd64-avx-linux.dat)
15056 (amd64-mpx-linux.dat, amd64-avx512-linux.dat, x32-linux.dat)
15057 (x32-avx-linux.dat, x32-avx512-linux.dat): Add
15058 i386/64bit-segments.xml in those rules.
15059 * features/i386/64bit-segments.xml: New file.
15060 * features/i386/amd64-avx-mpx-linux.xml: Add 64bit-segments.xml.
15061 * features/i386/amd64-avx-linux.xml: Add 64bit-segments.xml.
15062 * features/i386/amd64-avx512-linux.xml: Add 64bit-segments.xml.
15063 * features/i386/amd64-mpx-linux.xml: Add 64bit-segments.xml.
15064 * features/i386/x32-avx512-linux.xml: Add 64bit-segments.xml.
15065 * features/i386/x32-avx-linux.xml: Add 64bit-segments.xml.
15066 * features/i386/amd64-linux.xml: Add 64bit-segments.xml.
15067 * features/i386/amd64-avx-linux.c: Regenerated.
15068 * features/i386/amd64-avx-mpx-linux.c: Regenerated.
15069 * features/i386/amd64-avx-mpx.c: Regenerated.
15070 * features/i386/amd64-avx512-linux.c: Regenerated.
15071 * features/i386/amd64-linux.c: Regenerated.
15072 * features/i386/amd64-mpx-linux.c: Regenerated.
15073 * features/i386/i386-avx-mpx-linux.c: Regenerated.
15074 * features/i386/i386-avx-mpx.c: Regenerated.
15075 * features/i386/x32-avx-linux.c: Regenerated.
15076 * features/i386/x32-avx512-linux.c: Regenerated.
15077 * regformats/i386/amd64-avx-linux.dat: Regenerated.
15078 * regformats/i386/amd64-avx-mpx-linux.dat: Regenerated.
15079 * regformats/i386/amd64-avx512-linux.dat: Regenerated.
15080 * regformats/i386/amd64-linux.dat: Regenerated.
15081 * regformats/i386/amd64-mpx-linux.dat: Regenerated.
15082 * regformats/i386/x32-avx-linux.dat: Regenerated.
15083 * regformats/i386/x32-avx512-linux.dat: Regenerated.
15084 * regformats/i386/x32-linux.dat: Regenerated.
15085
8884e97e
WT
150862017-01-27 Walfred Tedeschi <walfred.tedeschi@intel.com>
15087
15088 * amd64-linux-tdep.h (AMD64_LINUX_ORIG_RAX_REGNUM):
15089 Set to AMD64_NUM_REGS.
15090
7005d26a
WT
150912017-01-27 Walfred Tedeschi <walfred.tedeschi@intel.com>
15092
15093 * amd64-nat.c (amd64_native_gregset_reg_offset): Simplify logic
15094 that checks validity of a register number.
15095
4bd2e1b2
KC
150962017-01-27 Kees Cook <keescook@google.com>
15097
15098 * gdb/arm-linux-nat.c (arm_linux_fetch_inferior_registers): Call
15099 fetch_fpregs if target has fpa registers.
15100 (arm_linux_store_inferior_registers): Call store_fpregs if target
15101 has fpa registers.
15102
7cf1de6c
AA
151032017-01-26 Andreas Arnez <arnez@linux.vnet.ibm.com>
15104
15105 * cris-tdep.c (cris_gdbarch_init): Remove check for
15106 info.byte_order and force it to BFD_ENDIAN_LITTLE.
15107
874a1c8c
AT
151082017-01-26 Antoine Tremblay <antoine.tremblay@ericsson.com>
15109
15110 * corelow.c (get_core_register_section): Check for regset
15111 existence before checking for REGSET_VARIABLE_SIZE.
15112
d8b49cf0
YQ
151132017-01-26 Yao Qi <yao.qi@linaro.org>
15114 Pedro Alves <palves@redhat.com>
15115
15116 PR gdb/20939
15117 * disasm.c (gdb_disassembler::dis_asm_memory_error): Don't
15118 call memory_error, save memaddr instead.
15119 (gdb_disassembler::print_insn): If gdbarch_print_insn returns
15120 negative, cal memory_error.
15121 * disasm.h (gdb_disassembler) <m_err_memaddr>: New field.
15122
658ca58c
YQ
151232017-01-26 Yao Qi <yao.qi@linaro.org>
15124
15125 * disasm-selftests.c (memory_error_test): New function.
15126 (_initialize_disasm_selftests): Register memory_error_test.
15127
79843d45
YQ
151282017-01-26 Yao Qi <yao.qi@linaro.org>
15129
15130 * Makefile.in (SFILES): Add disasm-selftests.c and
15131 selftest-arch.c.
15132 (COMMON_OBS): Add disasm-selftests.o and selftest-arch.o.
15133 * disasm-selftests.c: New file.
15134 * selftest-arch.c: New file.
15135 * selftest-arch.h: New file.
15136
8cafda32
YQ
151372017-01-26 Yao Qi <yao.qi@linaro.org>
15138
15139 * mep-tdep.c (mep_gdb_print_insn): Set info->arch
15140 to bfd_arch_mep. Don't return 0 if section is not
15141 found. Call print_insn_mep.
15142
e47ad6c0
YQ
151432017-01-26 Pedro Alves <palves@redhat.com>
15144 Yao Qi <yao.qi@linaro.org>
15145
15146 * arm-tdep.c: Include "disasm.h".
15147 (gdb_print_insn_arm): Update code to get gdbarch.
15148 * disasm.c (dis_asm_read_memory): Change it to
15149 gdb_disassembler::dis_asm_read_memory.
15150 (dis_asm_memory_error): Likewise.
15151 (dis_asm_print_address): Likewise.
15152 (gdb_pretty_print_insn): Change it to
15153 gdb_disassembler::pretty_print_insn.
15154 (dump_insns): Add one argument gdb_disassemlber. All
15155 callers updated.
15156 (do_mixed_source_and_assembly_deprecated): Likewise.
15157 (do_mixed_source_and_assembly): Likewise.
15158 (do_assembly_only): Likewise.
15159 (gdb_disassembler::gdb_disassembler): New.
15160 (gdb_disassembler::print_insn): New.
15161 * disasm.h (class gdb_disassembler): New.
15162 (gdb_pretty_print_insn): Remove declaration.
15163 (gdb_disassemble_info): Likewise.
15164 * guile/scm-disasm.c (class gdbscm_disassembler): New.
15165 (gdbscm_disasm_read_memory_worker): Update.
15166 (gdbscm_disasm_read_memory): Update.
15167 (gdbscm_disasm_memory_error): Remove.
15168 (gdbscm_disasm_print_address): Remove.
15169 (gdbscm_disassembler::gdbscm_disassembler): New.
15170 (gdbscm_print_insn_from_port): Update.
15171 * mips-tdep.c: Include disasm.h.
15172 (gdb_print_insn_mips): Update code to get gdbarch.
15173 * record-btrace.c (btrace_insn_history): Update.
15174 * spu-tdep.c: Include disasm.h.
15175 (struct spu_dis_asm_data): Remove.
15176 (struct spu_dis_asm_info): New.
15177 (spu_dis_asm_print_address): Use spu_dis_asm_info to get
15178 SPU id.
15179 (gdb_print_insn_spu): Cast disassemble_info to
15180 spu_dis_asm_info.
15181
80d75874
YQ
151822017-01-26 Yao Qi <yao.qi@linaro.org>
15183
15184 * disasm.c (do_ui_file_delete): Delete.
15185 (gdb_insn_length): Move code creating stream to ...
15186 * utils.c (null_stream): ... here. New function.
15187 * utils.h (null_stream): Declare.
15188
60685cd0
SM
151892017-01-23 Simon Marchi <simon.marchi@polymtl.ca>
15190
15191 * python/py-inferior.c (find_thread_object): Return directly
15192 from the loop. Remove "found" variable.
15193
eb1cdb62
JB
151942017-01-21 Joel Brobecker <brobecker@adacore.com>
15195
15196 GDB 7.12.1 released.
15197
b1ce6568
SM
151982017-01-20 Simon Marchi <simon.marchi@ericsson.com>
15199
15200 * python/py-function.c (fnpy_call): Reorder declarations to have
15201 the gdbpy_enter object declared first.
15202 * python/py-xmethods.c (gdbpy_get_xmethod_arg_types): Likewise.
15203
6f8b0407
SM
152042017-01-20 Simon Marchi <simon.marchi@ericsson.com>
15205
fec93fb1 15206 PR python/21068
6f8b0407
SM
15207 * python/python-internal.h (PyMem_RawMalloc): Define for
15208 Python < 3.4.
15209 * python/py-gdb-readline.c (gdbpy_readline_wrapper): Use
15210 PyMem_RawMalloc instead of PyMem_Malloc.
15211
78cbbba8
LM
152122017-01-20 Mike Wrighton <mike_wrighton@codesourcery.com>
15213 Luis Machado <lgustavo@codesourcery.com>
15214
15215 * NEWS (New commands): Mention flash-erase.
15216 (New MI commands): Mention target-flash-erase.
15217 * mi/mi-cmds.c (mi_cmd_target_flash_erase): Add target-flash-erase MI
15218 command.
15219 * mi/mi-cmds.h (mi_cmd_target_flash_erase): New declaration.
15220 * mi/mi-main.c (mi_cmd_target_flash_erase): New function.
15221 * target.c (flash_erase_command): New function.
15222 (initialize_targets): Add new flash-erase command.
15223 * target.h (flash_erase_command): New declaration.
15224
2132fe85
JB
152252017-01-20 Joel Brobecker <brobecker@adacore.com>
15226
15227 * nat/linux-ptrace.c: Only include <sys/procfs.h> if
15228 HAVE_SYS_PROCFS_H is defined.
15229
d1dff226
AH
152302017-01-18 Alan Hayward <alan.hayward@arm.com>
15231
15232 * remote.c (struct cached_reg): Change data into a pointer.
15233 * (stop_reply_dtr): Free data pointers before deleting vector.
15234 (process_stop_reply): Likewise.
15235 (remote_parse_stop_reply): Allocate space for data
15236
9890e433
AH
152372017-01-18 Alan Hayward <alan.hayward@arm.com>
15238
15239 * amd64-tdep.c (amd64_pseudo_register_read_value): remove
15240 MAX_REGISTER_SIZE.
15241 (amd64_pseudo_register_read_value): Likewise.
15242 * remote.c (fetch_register_using_p): Remove MAX_REGISTER_SIZE.
15243 (store_register_using_P): Likewise.
15244 * regcache.c (regcache_xfer_part): Likewise.
15245
7a36499a
IR
152462017-01-16 Ivo Raisr <ivo.raisr@oracle.com>
15247
15248 Split real and pseudo registers.
15249 * sparc-tdep.h (SPARC_CORE_REGISTERS): New macro.
15250 (sparc32_pseudo_regnum): New enum.
15251 * sparc64-tdep.h (sparc64_pseudo_regnum): New enum.
15252 * sparc-tdep.c (SPARC32_FPU_REGISTERS): New macro.
15253 (SPARC32_CP0_REGISTERS): New macro.
15254 (sparc32_pseudo_register_name): New function.
15255 (sparc32_register_name): Use sparc32_pseudo_register_name.
15256 (sparc32_pseudo_register_type): New function.
15257 (sparc32_register_type): Use sparc32_pseudo_register_type.
15258 (sparc32_pseudo_register_read, sparc32_pseudo_register_write): Handle
15259 pseudo register numbers.
15260 * sparc64-tdep.c SPARC64_FPU_REGISTERS): New macro.
15261 (SPARC64_CP0_REGISTERS): New macro.
15262 (sparc64_pseudo_register_name): New function.
15263 (sparc64_register_name): Use sparc64_pseudo_register_name.
15264 (sparc64_pseudo_register_type): New function.
15265 (sparc64_register_type): Use sparc64_pseudo_register_type.
15266 (sparc64_pseudo_register_read, sparc64_pseudo_register_write): Handle
15267 pseudo register numbers.
15268 (sparc64_store_floating_fields, sparc64_extract_floating_fields,
15269 sparc64_store_arguments): Handle pseudo register numbers.
15270
6f8976bf
YQ
152712017-01-13 Yao Qi <yao.qi@linaro.org>
15272
15273 * remote.c (REMOTE_DEBUG_MAX_CHAR): New macro.
15274 (putpkt_binary): Print only REMOTE_DEBUG_MAX_CHAR chars in debug
15275 output.
15276 (getpkt_or_notif_sane_1): Likewise.
15277
e4241ace
YQ
152782017-01-13 Yao Qi <yao.qi@linaro.org>
15279
15280 * Makefile.in (checker-headers): Use CXX and CXX_DIALET instead
15281 of CC. Pass "-x c++-header" instead of "-x c".
15282
3015c064
SM
152832017-01-12 Simon Marchi <simon.marchi@ericsson.com>
15284
15285 * remote.c (remote_can_async_p): Update comment.
15286
fde1b17d
SM
152872017-01-12 Simon Marchi <simon.marchi@ericsson.com>
15288
15289 * linux-nat.c (linux_nat_can_async_p): Update comment.
15290
ca1ca08b
SM
152912017-01-12 Simon Marchi <simon.marchi@ericsson.com>
15292
15293 * serial.c (serial_open): Forget about "pc" and "lpt" serial interface.
15294
4ad2da73
SM
152952017-01-11 Simon Marchi <simon.marchi@ericsson.com>
15296
15297 * cli/cli-decode.c (lookup_cmd_1): Fix typo in comment.
15298
c8b23b3f
TT
152992017-01-10 Tom Tromey <tom@tromey.com>
15300
15301 * python/py-type.c (typy_legacy_template_argument): Update.
15302 * cp-support.h (struct demangle_parse_info) (demangle_parse_info,
15303 ~demangle_parse_info): Declare new members.
15304 (cp_demangled_name_to_comp): Return unique_ptr.
15305 (cp_demangled_name_parse_free)
15306 (make_cleanup_cp_demangled_name_parse_free)
15307 (cp_new_demangle_parse_info): Remove.
15308 * cp-support.c (do_demangled_name_parse_free_cleanup)
15309 (make_cleanup_cp_demangled_name_parse_free): Remove.
15310 (inspect_type, cp_canonicalize_string_full)
15311 (cp_canonicalize_string): Update.
15312 (mangled_name_to_comp): Change return type.
15313 (cp_class_name_from_physname, method_name_from_physname)
15314 (cp_func_name, cp_remove_params): Update.
15315 * cp-name-parser.y (demangle_parse_info): New constructor, from
15316 cp_new_demangle_parse_info.
15317 (~demangle_parse_info): New destructor, from
15318 cp_demangled_name_parse_free.
15319 (cp_merge_demangle_parse_infos): Update.
15320 (cp_demangled_name_to_comp): Change return type.
15321
1ac32117
TT
153222017-01-10 Tom Tromey <tom@tromey.com>
15323
15324 * top.c (prevent_dont_repeat): Change return type.
15325 * python/python.c (execute_gdb_command): Use std::string.
15326 Update.
15327 * guile/guile.c (gdbscm_execute_gdb_command): Update.
15328 * command.h (prevent_dont_repeat): Change return type.
15329 * breakpoint.c (bpstat_do_actions_1): Update.
15330
0cf08227
TT
153312017-01-10 Tom Tromey <tom@tromey.com>
15332
15333 * value.h (scoped_value_mark::~scoped_value_mark): Call
15334 free_to_mark.
15335 (scoped_value_mark::free_to_mark): New method.
15336 * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Use
15337 scoped_value_mark.
15338
eb115069
TT
153392017-01-10 Tom Tromey <tom@tromey.com>
15340
15341 * python/py-value.c (valpy_dereference, valpy_referenced_value)
15342 (valpy_reference_value, valpy_const_value, valpy_get_address)
15343 (valpy_get_dynamic_type, valpy_lazy_string, valpy_do_cast)
15344 (valpy_getitem, valpy_call, valpy_binop_throw, valpy_negative)
15345 (valpy_absolute, valpy_richcompare_throw): Use scoped_value_mark.
15346 * dwarf2loc.c (dwarf2_loc_desc_get_symbol_read_needs): Use
15347 scoped_value_mark.
15348 * dwarf2-frame.c (execute_stack_op): Use scoped_value_mark.
15349 * value.h (scoped_value_mark): New class.
15350
906768f9
TT
153512017-01-10 Tom Tromey <tom@tromey.com>
15352
15353 * dwarf2read.c (dwarf2_build_psymtabs): Use psymtab_discarder.
15354 * psympriv.h (make_cleanup_discard_psymtabs): Don't declare.
15355 * psymtab.c (discard_psymtabs_upto): Remove.
15356 (make_cleanup_discard_psymtabs): Remove.
15357 (struct psymtab_state): Remove.
15358
bef155c3
TT
153592017-01-10 Tom Tromey <tom@tromey.com>
15360
15361 * record-full.c (record_full_save_cleanups): Remove.
15362 (record_full_save): Use gdb::unlinker.
15363 * gcore.c (do_bfd_delete_cleanup): Remove.
15364 (gcore_command): Use gdb::unlinker, unique_xmalloc_ptr. Remove
15365 cleanups.
15366 * dwarf2read.c (unlink_if_set): Remove.
15367 (write_psymtabs_to_index): Use gdb::unlinker.
15368 * common/gdb_unlinker.h: New file.
15369
192b62ce
TT
153702017-01-10 Tom Tromey <tom@tromey.com>
15371
15372 * windows-tdep.c (windows_xfer_shared_library): Update.
15373 * windows-nat.c (windows_make_so): Update.
15374 * utils.h (make_cleanup_bfd_unref): Remove.
15375 * utils.c (do_bfd_close_cleanup, make_cleanup_bfd_unref): Remove.
15376 * symfile.h (symfile_bfd_open)
15377 (find_separate_debug_file_in_section): Return gdb_bfd_ref_ptr.
15378 * symfile.c (read_symbols, symbol_file_add)
15379 (separate_debug_file_exists): Update.
15380 (symfile_bfd_open): Return gdb_bfd_ref_ptr.
15381 (generic_load, reread_symbols): Update.
15382 * symfile-mem.c (symbol_file_add_from_memory): Update.
15383 * spu-linux-nat.c (spu_bfd_open): Return gdb_bfd_ref_ptr.
15384 (spu_symbol_file_add_from_memory): Update.
15385 * solist.h (struct target_so_ops) <bfd_open>: Return
15386 gdb_bfd_ref_ptr.
15387 (solib_bfd_fopen, solib_bfd_open): Return gdb_bfd_ref_ptr.
15388 * solib.c (solib_bfd_fopen, solib_bfd_open): Return
15389 gdb_bfd_ref_ptr.
15390 (solib_map_sections, reload_shared_libraries_1): Update.
15391 * solib-svr4.c (enable_break): Update.
15392 * solib-spu.c (spu_bfd_fopen): Return gdb_bfd_ref_ptr.
15393 * solib-frv.c (enable_break2): Update.
15394 * solib-dsbt.c (enable_break): Update.
15395 * solib-darwin.c (gdb_bfd_mach_o_fat_extract): Return
15396 gdb_bfd_ref_ptr.
15397 (darwin_solib_get_all_image_info_addr_at_init): Update.
15398 (darwin_bfd_open): Return gdb_bfd_ref_ptr.
15399 * solib-aix.c (solib_aix_bfd_open): Return gdb_bfd_ref_ptr.
15400 * record-full.c (record_full_save): Update.
15401 * python/py-objfile.c (objfpy_add_separate_debug_file): Update.
15402 * procfs.c (insert_dbx_link_bpt_in_file): Update.
15403 * minidebug.c (find_separate_debug_file_in_section): Return
15404 gdb_bfd_ref_ptr.
15405 * machoread.c (macho_add_oso_symfile): Change abfd to
15406 gdb_bfd_ref_ptr.
15407 (macho_symfile_read_all_oso): Update.
15408 (macho_check_dsym): Return gdb_bfd_ref_ptr.
15409 (macho_symfile_read): Update.
15410 * jit.c (bfd_open_from_target_memory): Return gdb_bfd_ref_ptr.
15411 (jit_bfd_try_read_symtab): Update.
15412 * gdb_bfd.h (gdb_bfd_open, gdb_bfd_fopen, gdb_bfd_openr)
15413 (gdb_bfd_openw, gdb_bfd_openr_iovec)
15414 (gdb_bfd_openr_next_archived_file, gdb_bfd_fdopenr): Return
15415 gdb_bfd_ref_ptr.
15416 (gdb_bfd_ref_policy): New struct.
15417 (gdb_bfd_ref_ptr): New typedef.
15418 * gdb_bfd.c (gdb_bfd_open, gdb_bfd_fopen, gdb_bfd_openr)
15419 (gdb_bfd_openw, gdb_bfd_openr_iovec)
15420 (gdb_bfd_openr_next_archived_file, gdb_bfd_fdopenr): Return
15421 gdb_bfd_ref_ptr.
15422 * gcore.h (create_gcore_bfd): Return gdb_bfd_ref_ptr.
15423 * gcore.c (create_gcore_bfd): Return gdb_bfd_ref_ptr.
15424 (gcore_command): Update.
15425 * exec.c (exec_file_attach): Update.
15426 * elfread.c (elf_symfile_read): Update.
15427 * dwarf2read.c (dwarf2_get_dwz_file): Update.
15428 (try_open_dwop_file, open_dwo_file): Return gdb_bfd_ref_ptr.
15429 (open_and_init_dwo_file): Update.
15430 (open_dwp_file): Return gdb_bfd_ref_ptr.
15431 (open_and_init_dwp_file): Update.
15432 * corelow.c (core_open): Update.
15433 * compile/compile-object-load.c (compile_object_load): Update.
15434 * common/gdb_ref_ptr.h (ref_ptr::operator->): New operator.
15435 * coffread.c (coff_symfile_read): Update.
15436 * cli/cli-dump.c (bfd_openr_or_error, bfd_openw_or_error): Return
15437 gdb_bfd_ref_ptr. Rename.
15438 (dump_bfd_file, restore_command): Update.
15439 * build-id.h (build_id_to_debug_bfd): Return gdb_bfd_ref_ptr.
15440 * build-id.c (build_id_to_debug_bfd): Return gdb_bfd_ref_ptr.
15441 (find_separate_debug_file_by_buildid): Update.
15442
50315b21
TT
154432017-01-10 Tom Tromey <tom@tromey.com>
15444
15445 * common/gdb_ref_ptr.h: New file.
15446 * python/py-ref.h (struct gdbpy_ref_policy): New.
15447 (gdbpy_ref): Now a typedef.
15448
fc4007c9
TT
154492017-01-10 Tom Tromey <tom@tromey.com>
15450
15451 * utils.h (make_cleanup_htab_delete): Don't declare.
15452 * utils.c (do_htab_delete_cleanup, make_cleanup_htab_delete):
15453 Remove.
15454 * linespec.c (decode_compound_collector): Add constructor,
15455 destructor.
15456 (lookup_prefix_sym): Remove cleanup.
15457 (symtab_collector): Add constructor, destructor.
15458 (collect_symtabs_from_filename): Remove cleanup.
15459 * disasm.c (do_mixed_source_and_assembly): Use htab_up.
15460 * compile/compile-c-symbols.c (generate_c_for_variable_locations):
15461 Use htab_up.
15462 * gnu-v3-abi.c (gnuv3_print_vtable): Use htab_up.
15463 * dwarf2read.c (dw2_expand_symtabs_matching)
15464 (dw2_map_symbol_filenames, dwarf_decode_macros)
15465 (write_psymtabs_to_index): Use htab_up.
15466 * dwarf2loc.c (func_verify_no_selftailcall)
15467 (call_site_find_chain_1, func_verify_no_selftailcall)
15468 (chain_candidate, call_site_find_chain_1): Use std::unordered_set,
15469 std::vector, gdb::unique_xmalloc_ptr.
15470 (call_sitep): Remove typedef.
15471 (dwarf2_locexpr_baton_eval): Remove unused variable.
15472
8dbcee67
TT
154732017-01-10 Tom Tromey <tom@tromey.com>
15474
15475 * python/python-internal.h (make_cleanup_py_decref)
15476 (make_cleanup_py_xdecref): Don't declare.
15477 * python/py-utils.c (py_decref, make_cleanup_py_decref)
15478 (py_xdecref, make_cleanup_py_xdecref): Remove.
15479
13df46cc
TT
154802017-01-10 Tom Tromey <tom@tromey.com>
15481
15482 * python/py-framefilter.c (py_mi_print_variables): Use gdbpy_ref.
15483 (py_print_locals, enumerate_locals, py_print_args): Use gdbpy_ref.
15484
06fc9bf7
TT
154852017-01-10 Tom Tromey <tom@tromey.com>
15486
15487 * python/py-framefilter.c (enumerate_args): Use gdbpy_ref.
15488
830a4934
TT
154892017-01-10 Tom Tromey <tom@tromey.com>
15490
15491 * python/py-utils.c (unicode_to_encoded_string)
15492 (python_string_to_target_string)
15493 (python_string_to_target_python_string)
15494 (python_string_to_host_string, gdbpy_obj_to_string)
15495 (get_addr_from_python): Use gdbpy_ref.
15496
4586d543
TT
154972017-01-10 Tom Tromey <tom@tromey.com>
15498
15499 * python/py-unwind.c (pyuw_object_attribute_to_pointer): Use
15500 gdbpy_ref.
15501
59876f8f
TT
155022017-01-10 Tom Tromey <tom@tromey.com>
15503
15504 * python/python.c (eval_python_command, gdbpy_decode_line)
15505 (gdbpy_run_events, gdbpy_start_type_printers)
15506 (gdbpy_apply_type_printers): Use gdbpy_ref.
15507
97d83487
TT
155082017-01-10 Tom Tromey <tom@tromey.com>
15509
15510 * python/py-param.c (get_doc_string, compute_enum_values): Use
15511 gdbpy_ref.
15512
9205649a
TT
155132017-01-10 Tom Tromey <tom@tromey.com>
15514
15515 * python/py-inferior.c (find_thread_object, build_inferior_list):
15516 Use gdbpy_ref.
15517
74c49d45
TT
155182017-01-10 Tom Tromey <tom@tromey.com>
15519
15520 * python/py-framefilter.c (py_print_frame): Use gdbpy_ref.
15521
16361ffb
TT
155222017-01-10 Tom Tromey <tom@tromey.com>
15523
15524 * python/py-finishbreakpoint.c (bpfinishpy_out_of_scope): Use
15525 gdbpy_ref.
15526
905f2cca
TT
155272017-01-10 Tom Tromey <tom@tromey.com>
15528
15529 * python/py-cmd.c (cmdpy_completer_helper): Use gdbpy_ref. Remove
15530 extra incref.
15531 (cmdpy_completer_handle_brkchars, cmdpy_completer, cmdpy_init):
15532 Use gdbpy_ref.
15533
64081434
TT
155342017-01-10 Tom Tromey <tom@tromey.com>
15535
15536 * python/py-breakpoint.c (gdbpy_breakpoint_cond_says_stop): Use
15537 gdbpy_ref.
15538
59e9e831
TT
155392017-01-10 Tom Tromey <tom@tromey.com>
15540
15541 * python/py-arch.c (archpy_disassemble): Use gdbpy_ref. Don't
15542 decref results of PyArg_ParseTupleAndKeywords.
15543
9de10f6d
TT
155442017-01-10 Tom Tromey <tom@tromey.com>
15545
15546 * python/python.c (python_run_simple_file): Use
15547 unique_xmalloc_ptr, gdbpy_ref.
15548
2bd5759d
TT
155492017-01-10 Tom Tromey <tom@tromey.com>
15550
15551 * python/py-prettyprint.c (print_stack_unless_memory_error)
15552 (print_string_repr, print_children): Use gdbpy_ref.
15553 (dummy_python_frame): New class.
15554 (dummy_python_frame::dummy_python_frame): Rename from
15555 push_dummy_python_frame.
15556 (py_restore_tstate): Remove.
15557
3b4e0e01
TT
155582017-01-10 Tom Tromey <tom@tromey.com>
15559
15560 * python/py-framefilter.c (py_print_frame): Use gdbpy_ref.
15561
17a22718
TT
155622017-01-10 Tom Tromey <tom@tromey.com>
15563
15564 * python/python.c (ensure_python_env, restore_python_env):
15565 Remove.
15566 * python/python-internal.h (ensure_python_env): Don't declare.
15567 * varobj.h (varobj_ensure_python_env): Don't declare.
15568 * varobj.c (varobj_ensure_python_env): Remove.
15569
68cdc557
TT
155702017-01-10 Tom Tromey <tom@tromey.com>
15571
15572 * varobj.c (varobj_value_get_print_value): Use
15573 gdbpy_enter_varobj.
15574
1eba6383
TT
155752017-01-10 Tom Tromey <tom@tromey.com>
15576
15577 * python/py-prettyprint.c (print_string_repr, print_children):
15578 Update.
15579 * python/py-lazy-string.c (gdbpy_extract_lazy_string): Change type
15580 of "encoding".
15581 * varobj.c (varobj_value_get_print_value): Update.
15582 * python/python-internal.h (gdbpy_extract_lazy_string): Update.
15583
bde7b3e3
TT
155842017-01-10 Tom Tromey <tom@tromey.com>
15585
15586 * varobj.c (varobj_get_display_hint)
15587 (dynamic_varobj_has_child_method, install_new_value_visualizer)
15588 (varobj_set_visualizer, free_variable): Use
15589 gdbpy_enter_varobj.
15590
a7785f8c
TT
155912017-01-10 Tom Tromey <tom@tromey.com>
15592
15593 * python/python.c (python_command): Use gdbpy_enter, gdbpy_ref.
15594 (do_finish_initialization): New function. Use gdbpy_ref.
15595 (gdbpy_finish_initialization): Use gdbpy_enter. Call
15596 do_finish_initialization.
15597
2865bfce
TT
155982017-01-10 Tom Tromey <tom@tromey.com>
15599
15600 * python/py-param.c (get_set_value, get_show_value): Use
15601 gdbpy_enter, gdbpy_ref.
15602
0e9dcc75
TT
156032017-01-10 Tom Tromey <tom@tromey.com>
15604
15605 * python/py-function.c (fnpy_call): Use gdbpy_enter, gdbpy_ref.
15606
12a5cedd
TT
156072017-01-10 Tom Tromey <tom@tromey.com>
15608
15609 * python/py-cmd.c (cmdpy_function): Use gdbpy_enter, gdbpy_ref.
15610
788f2586
TT
156112017-01-10 Tom Tromey <tom@tromey.com>
15612
15613 * python/py-varobj.c (py_varobj_iter_dtor, py_varobj_iter_next):
15614 Use gdbpy_enter_varobj.
15615
6cd67bea
TT
156162017-01-10 Tom Tromey <tom@tromey.com>
15617
15618 * varobj.c (gdbpy_enter_varobj): New constructor.
15619 * python/python-internal.h (gdbpy_enter_varobj): New class.
15620 * python/py-varobj.c (py_varobj_get_iterator): Use
15621 gdbpy_enter_varobj.
15622
14b122bf
TT
156232017-01-10 Tom Tromey <tom@tromey.com>
15624
15625 * python/py-xmethods.c (gdbpy_get_xmethod_result_type): Use
15626 gdbpy_enter, gdbpy_ref, unique_xmalloc_ptr.
15627 (gdbpy_invoke_xmethod): Use gdbpy_ref, gdbpy_enter.
15628 (gdbpy_get_xmethod_arg_types): Use gdbpy_ref,
15629 unique_xmalloc_ptr.
15630 (gdbpy_get_xmethod_arg_types): Use gdbpy_ref, gdbpy_enter.
15631
bf1ca3b9
TT
156322017-01-10 Tom Tromey <tom@tromey.com>
15633
15634 * python/py-xmethods.c (invoke_match_method): Use
15635 gdbpy_ref.
15636
572a5524
TT
156372017-01-10 Tom Tromey <tom@tromey.com>
15638
15639 * python/py-xmethods.c (gdbpy_get_matching_xmethod_workers): use
15640 gdbpy_enter, gdbpy_ref.
15641
396a78b6
TT
156422017-01-10 Tom Tromey <tom@tromey.com>
15643
15644 * python/python.c (python_interactive_command): Use gdbpy_enter.
15645
a88b13c7
TT
156462017-01-10 Tom Tromey <tom@tromey.com>
15647
15648 * python/python.c (gdbpy_before_prompt_hook): Use gdbpy_enter,
15649 gdbpy_ref.
15650
e9f0c363
TT
156512017-01-10 Tom Tromey <tom@tromey.com>
15652
15653 * python/py-prettyprint.c (gdbpy_apply_val_pretty_printer): Use
15654 gdbpy_enter, gdbpy_ref, unique_xmalloc_ptr.
15655
6349f452
TT
156562017-01-10 Tom Tromey <tom@tromey.com>
15657
15658 * utils.h (htab_deleter): New struct.
15659 (htab_up): New typedef.
15660 * python/py-framefilter.c (gdbpy_apply_frame_filter): Use
15661 gdbpy_enter, gdbpy_ref, htab_up.
15662
c0171de6
TT
156632017-01-10 Tom Tromey <tom@tromey.com>
15664
15665 * python/py-unwind.c (pending_frame_invalidate): Remove.
15666 (pyuw_sniffer): Use gdbpy_enter and gdbpy_ref.
15667
f18e226f
TT
156682017-01-10 Tom Tromey <tom@tromey.com>
15669
15670 * python/py-xmethods.c (gdbpy_free_xmethod_worker_data)
15671 (gdbpy_clone_xmethod_worker_data): Use gdbpy_enter.
15672
c57af3f1
TT
156732017-01-10 Tom Tromey <tom@tromey.com>
15674
15675 * python/py-type.c (save_objfile_types): Use gdbpy_enter.
15676
60e600ec
TT
156772017-01-10 Tom Tromey <tom@tromey.com>
15678
15679 * python/python.c (gdbpy_eval_from_control_command)
15680 (gdbpy_source_script, gdbpy_run_events)
15681 (gdbpy_source_objfile_script, gdbpy_execute_objfile_script)
15682 (gdbpy_free_type_printers, gdbpy_finish_initialization): Use
15683 gdbpy_enter.
15684
bf7da5b0
TT
156852017-01-10 Tom Tromey <tom@tromey.com>
15686
15687 * python/py-progspace.c (py_free_pspace): Use gdbpy_enter.
15688
2d38bced
TT
156892017-01-10 Tom Tromey <tom@tromey.com>
15690
15691 * python/py-objfile.c (py_free_objfile): Use gdbpy_enter.
15692
07bc7329
TT
156932017-01-10 Tom Tromey <tom@tromey.com>
15694
15695 * python/py-inferior.c (python_on_normal_stop, python_on_resume)
15696 (python_on_inferior_call_pre, python_on_inferior_call_post)
15697 (python_on_memory_change, python_on_register_change)
15698 (python_inferior_exit, python_new_objfile, add_thread_object)
15699 (delete_thread_object, py_free_inferior): Use gdbpy_enter.
15700
6e7c365e
TT
157012017-01-10 Tom Tromey <tom@tromey.com>
15702
15703 * python/py-finishbreakpoint.c (bpfinishpy_handle_stop)
15704 (bpfinishpy_handle_exit): Use gdbpy_enter.
15705
6ba0cd40
TT
157062017-01-10 Tom Tromey <tom@tromey.com>
15707
15708 * python/py-cmd.c (cmdpy_destroyer)
15709 (cmdpy_completer_handle_brkchars, cmdpy_completer): Use
15710 gdbpy_enter.
15711
de2dc875
TT
157122017-01-10 Tom Tromey <tom@tromey.com>
15713
15714 * python/py-breakpoint.c (gdbpy_breakpoint_cond_says_stop): Use
15715 gdbpy_enter.
15716 (gdbpy_breakpoint_has_cond): Likewise.
15717
4ecee2c4
TT
157182017-01-10 Tom Tromey <tom@tromey.com>
15719
15720 * python/python.c (gdbpy_enter): New constructor.
15721 (~gdbpy_enter): New destructor.
15722 (restore_python_env, ensure_python_env): Rewrite.
15723 * python/python-internal.h (gdbpy_enter): New class.
15724
37fce74f
TT
157252017-01-10 Tom Tromey <tom@tromey.com>
15726
15727 * python/py-symbol.c (gdbpy_lookup_symbol): Use gdbpy_ref.
15728
53a0cca3
TT
157292017-01-10 Tom Tromey <tom@tromey.com>
15730
15731 * python/py-value.c (value_has_field, get_field_flag)
15732 (get_field_type, valpy_getitem, convert_value_from_python): Use
15733 gdbpy_ref.
15734
ff3724f5
TT
157352017-01-10 Tom Tromey <tom@tromey.com>
15736
15737 * python/python.c (gdbpy_progspaces, gdbpy_objfiles): Use
15738 gdbpy_ref.
15739
0700aea5
TT
157402017-01-10 Tom Tromey <tom@tromey.com>
15741
15742 * python/py-prettyprint.c (search_pp_list)
15743 (find_pretty_printer_from_objfiles)
15744 (find_pretty_printer_from_progspace)
15745 (find_pretty_printer_from_gdb, find_pretty_printer)
15746 (gdbpy_get_display_hint, gdbpy_get_varobj_pretty_printer): Use
15747 gdbpy_ref.
15748
1bb44c9f
TT
157492017-01-10 Tom Tromey <tom@tromey.com>
15750
15751 * python/py-param.c (call_doc_function): Use gdbpy_ref.
15752
87ce03fd
TT
157532017-01-10 Tom Tromey <tom@tromey.com>
15754
15755 * python/py-linetable.c (build_line_table_tuple_from_pcs)
15756 (ltpy_get_all_source_lines): Use gdbpy_ref.
15757
ee0a3fb8
TT
157582017-01-10 Tom Tromey <tom@tromey.com>
15759
15760 * python/py-framefilter.c (extract_sym, extract_value)
15761 (get_py_iter_from_func, bootstrap_python_frame_filters): Use
15762 gdbpy_ref.
15763
bf2a52fa
TT
157642017-01-10 Tom Tromey <tom@tromey.com>
15765
15766 * python/py-breakpoint.c (gdbpy_breakpoints): Use gdbpy_ref.
15767
f59fe7f8
TT
157682017-01-10 Tom Tromey <tom@tromey.com>
15769
15770 * python/py-inferior.c (gdbpy_inferiors): Use gdbpy_ref.
15771
80bd970a
TT
157722017-01-10 Tom Tromey <tom@tromey.com>
15773
15774 * python/py-function.c (convert_values_to_python, fnpy_init): Use
15775 gdbpy_ref.
15776
d1b3de2e
TT
157772017-01-10 Tom Tromey <tom@tromey.com>
15778
15779 * python/py-cmd.c (gdbpy_string_to_argv): Use gdbpy_ref.
15780
3bb43384
TT
157812017-01-10 Tom Tromey <tom@tromey.com>
15782
15783 * python/py-type.c (convert_field, make_fielditem, typy_fields)
15784 (typy_range): Use gdbpy_ref.
15785
abf5651e
TT
157862017-01-10 Tom Tromey <tom@tromey.com>
15787
15788 * python/py-threadevent.c (create_thread_event_object): Use
15789 gdbpy_ref.
15790 * python/py-stopevent.c (create_stop_event_object): Simplify.
15791 (emit_stop_event): Use gdbpy_ref.
15792 * python/py-signalevent.c (create_signal_event_object): Use
15793 gdbpy_ref.
15794 * python/py-newobjfileevent.c (create_new_objfile_event_object)
15795 (emit_new_objfile_event, create_clear_objfiles_event_object)
15796 (emit_clear_objfiles_event): Use gdbpy_ref.
15797 * python/py-infevents.c (create_inferior_call_event_object)
15798 (create_register_changed_event_object)
15799 (create_memory_changed_event_object, emit_inferior_call_event)
15800 (emit_memory_changed_event, emit_register_changed_event): Use
15801 gdbpy_ref.
15802 * python/py-exitedevent.c (create_exited_event_object)
15803 (emit_exited_event): Use gdbpy_ref.
15804 * python/py-event.h (evpy_emit_event): Remove
15805 CPYCHECKER_STEALS_REFERENCE_TO_ARG annotation.
15806 * python/py-event.c (evpy_emit_event): Use gdbpy_ref.
15807 * python/py-continueevent.c (emit_continue_event): Use
15808 gdbpy_ref.
15809 * python/py-breakpoint.c (gdbpy_breakpoint_created)
15810 (gdbpy_breakpoint_deleted, gdbpy_breakpoint_modified): Use
15811 gdbpy_ref.
15812 * python/py-bpevent.c (create_breakpoint_event_object): Use
15813 gdbpy_ref.
15814
a68ff33e
TT
158152017-01-10 Tom Tromey <tom@tromey.com>
15816
15817 * python/py-ref.h: New file.
15818
7becfd03
SM
158192017-01-10 Simon Marchi <simon.marchi@ericsson.com>
15820
15821 * cli-out.c (cli_ui_out::do_redirect): Change return type to
15822 void.
15823 * cli-out.h (cli_ui_out::do_redirect): Likewise.
15824 * mi/mi-out.c (mi_ui_out::do_redirect): Likewise.
15825 * mi/mi-out.h (mi_ui_out::do_redirect): Likewise.
15826 * ui-out.c (ui_out::redirect): Likewise.
15827 * ui-out.h (ui_out::redirect, ui_out::do_redirect): Likewise.
15828 * cli/cli-logging.c (set_logging_redirect): Update call site of
15829 ui_out::redirect.
15830 (handle_redirections): Likewise.
15831 * scm-ports.c (ioscm_with_output_to_port_worker): Likewise.
15832 * top.c (execute_command_to_string): Likewise.
15833 * utils.c (do_ui_out_redirect_pop): Likewise.
15834
df294654
SM
158352017-01-10 Simon Marchi <simon.marchi@ericsson.com>
15836
15837 * stack.c (_initialize_stack): Update "frame" command help message.
15838
f5e6296e
IB
158392017-01-08 Iain Buclaw <ibuclaw@gdcproject.org>
15840
15841 * d-exp.y (CastExpression): Emit UNOP_CAST_TYPE.
15842
0e2d6fa6
YQ
158432017-01-06 Yao Qi <yao.qi@linaro.org>
15844
15845 * x86-linux-nat.h: Include gdb_proc_service.h.
15846
44d6d3f9
YQ
158472017-01-06 Yao Qi <yao.qi@linaro.org>
15848
15849 * ser-base.h: Include serial.h.
15850
656731fe
YQ
158512017-01-06 Yao Qi <yao.qi@linaro.org>
15852
15853 * ppc-linux-tdep.h: Include ppc-tdep.h.
15854
1ca8f924
YQ
158552017-01-06 Yao Qi <yao.qi@linaro.org>
15856
15857 * nat/amd64-linux-siginfo.h: Include signal.h.
15858
bc3008c4
YQ
158592017-01-06 Yao Qi <yao.qi@linaro.org>
15860
15861 * nat/aarch64-linux-hw-point.h: Include break-common.h.
15862
66c80d03
YQ
158632017-01-06 Yao Qi <yao.qi@linaro.org>
15864
15865 * mi/mi-parse.h: Include mi-cmds.h.
15866
051d2dda
YQ
158672017-01-06 Yao Qi <yao.qi@linaro.org>
15868
15869 * inf-loop.c: Don't include "target.h".
15870 * inf-loop.h: Include it here.
15871
8018d34f
YQ
158722017-01-06 Yao Qi <yao.qi@linaro.org>
15873
15874 * dfp.h: Include "dboulest.h" and "expression.h".
15875
c0b8369c
YQ
158762017-01-06 Yao Qi <yao.qi@linaro.org>
15877
15878 * ax-gdb.h: Include "ax.h".
15879
ad5cba2a
YQ
158802017-01-06 Yao Qi <yao.qi@linaro.org>
15881
15882 * Makefile.in (HFILES_NO_SRCDIR): Replace gdb_ptrace.h
15883 with nat/gdb_ptrace.h.
15884
1c33cd7f
YQ
158852017-01-05 Yao Qi <yao.qi@linaro.org>
15886
15887 * mips-fbsd-tdep.c (mips_fbsd_sigframe_init): Move && to
15888 new line.
15889 (mips64_fbsd_sigframe_init): Likewise.
15890
c988ac1d
JB
158912017-01-04 John Baldwin <jhb@FreeBSD.org>
15892
15893 * mips-fbsd-tdep.c (_initialize_mips_fbsd_tdep): Use
15894 GDB_OSABI_FREEBSD instead of GDB_OSABI_FREEBSD_ELF.
15895
b268007c
JB
158962017-01-04 John Baldwin <jhb@FreeBSD.org>
15897
15898 * Makefile.in (ALLDEPFILES): Add mips-fbsd-nat.c.
15899 * NEWS: Mention new FreeBSD/mips native configuration.
15900 * config/mips/fbsd.mh: New file.
15901 * configure.host: Add mips*-*-freebsd*.
15902 * mips-fbsd-nat.c: New file.
15903
387360da
JB
159042017-01-04 John Baldwin <jhb@FreeBSD.org>
15905
15906 * Makefile.in (ALL_TARGET_OBS): Add mips-fbsd-tdep.o.
15907 (ALLDEPFILES): Add mips-fbsd-tdep.c.
15908 * NEWS: Mention new FreeBSD/mips target.
15909 * configure.tgt: Add mips*-*-freebsd*.
15910 * mips-fbsd-tdep.c: New file.
15911 * mips-fbsd-tdep.h: New file.
15912
2aaaf250
YQ
159132017-01-04 Yao Qi <yao.qi@linaro.org>
15914
15915 * dwarf2loc.c (write_pieced_value): Don't use VALUE_FRAME_ID (to),
15916 use c->frame_id when the piece location is DWARF_VALUE_REGISTER.
15917
61baf725
JB
159182017-01-01 Joel Brobecker <brobecker@adacore.com>
15919
6dbb839a 15920 Update copyright year range in all GDB files.
61baf725 15921
c113e7ff 159222017-01-01 Joel Brobecker <brobecker@adacore.com>
ce0db137 15923
c113e7ff 15924 * config/djgpp/fnchange.lst: Add entry for gdb/ChangeLog-2016.
ce0db137 15925
c113e7ff 15926For older changes see ChangeLog-2016.
c906108c
SS
15927\f
15928Local Variables:
15929mode: change-log
15930left-margin: 8
15931fill-column: 74
15932version-control: never
57da7796 15933coding: utf-8
c906108c 15934End: