]> git.ipfire.org Git - thirdparty/binutils-gdb.git/blame - gdb/ChangeLog
problem debugging ravenscar programs if runtime is stripped
[thirdparty/binutils-gdb.git] / gdb / ChangeLog
CommitLineData
cf3fbed4
JB
12017-11-21 Joel Brobecker <brobecker@adacore.com>
2
3 * ada-lang.h (ada_get_tcb_types_info): Add declaration.
4 * ada-tasks.c (ada_get_tcb_types_info): Renames get_tcb_types_info.
5 Make non-static. Change return type to char *. Adjust code
6 accordingly. Rewrite the function's documentation.
7 (read_atcb): Adjust call to get_tcb_types_info accordingly.
8 * ravenscar-thread.c (ravenscar_inferior_created): Check that
9 we have enough debugging information in the runtime to support
10 Ada task debugging before we enable the ravenscar-thread layer.
11
9edcc12f
JB
122017-11-21 Joel Brobecker <brobecker@adacore.com>
13
14 * ada-lang.h (ada_get_task_info_from_ptid): Add declaration.
15 * ada-tasks.c (ada_get_task_info_from_ptid): New function.
16 * ravenscar-thread.c: Add into comment.
17 (base_magic_null_ptid): Delete.
18 (base_ptid): Change documentation.
19 (ravenscar_active_task): Renames ravenscar_running_thread.
20 All callers updated throughout.
21 (is_ravenscar_task, ravenscar_get_thread_base_cpu): New function.
22 (ravenscar_task_is_currently_active): Likewise.
23 (get_base_thread_from_ravenscar_task): Ditto.
24 (ravenscar_update_inferior_ptid): Adjust to handle multiple CPUs.
25 (ravenscar_runtime_initialized): Likewise.
26 (get_running_thread_id): Add new parameter "cpu". Adjust
27 implementation to handle this new parameter.
28 (ravenscar_fetch_registers): Small adjustment to use
29 is_ravenscar_task and ravenscar_task_is_currently_active in
30 order to decide whether to use the target beneath or this
31 module's arch_ops.
32 (ravenscar_store_registers, ravenscar_prepare_to_store): Likewise.
33 (ravenscar_stopped_by_sw_breakpoint): Use
34 get_base_thread_from_ravenscar_task to get the underlying
35 thread, rather than using base_ptid.
36 (ravenscar_stopped_by_hw_breakpoint, ravenscar_stopped_by_watchpoint)
37 (ravenscar_stopped_data_address, ravenscar_core_of_thread):
38 Likewise.
39 (ravenscar_inferior_created): Do not set base_magic_null_ptid.
40
65d40437
JB
412017-11-21 Joel Brobecker <brobecker@adacore.com>
42
43 * ada-lang.h (struct ada_task_info) <base_cpu>: New field.
44 * ada-lang.c (struct atcb_fieldno) <base_cpu>: New field.
45 (get_tcb_types_info): Set fieldnos.base_cpu.
46 (read_atcb): Set task_info->base_cpu.
47 (info_task): Print "Base CPU" info if set by runtime.
48
e02544b2
JB
492017-11-21 Joel Brobecker <brobecker@adacore.com>
50
51 * ravenscar-thread.c (ravenscar_stopped_by_sw_breakpoint)
52 (ravenscar_stopped_by_hw_breakpoint, ravenscar_stopped_by_watchpoint)
53 (ravenscar_stopped_data_address, ravenscar_core_of_thread):
54 New functions.
55 (init_ravenscar_thread_ops): Set the to_stopped_by_sw_breakpoint,
56 to_stopped_by_hw_breakpoint, to_stopped_by_watchpoint,
57 to_stopped_data_address and to_core_of_thread fields of
58 ravenscar_ops.
59
ed0f4273
UW
602017-11-21 Ulrich Weigand <uweigand@de.ibm.com>
61
62 * ppc-tdep.h (enum powerpc_long_double_abi): New data type.
63 (struct gdbarch_tdep): New member long_double_abi.
64 * rs6000-tdep.c (rs6000_gdbarch_init): Initialize long_double_abi
65 member of tdep struct based on Tag_GNU_Power_ABI_FP attribute.
66 * ppc-linux-tdep.c (ppc_linux_init_abi): Install long double data
67 format depending on long_double_abi tdep member.
68 (ppc_floatformat_for_type): Handle __ibm128 type.
69
0fc76421
SM
702017-11-20 Simon Marchi <simon.marchi@polymtl.ca>
71
72 * darwin-nat.c (set_enable_mach_exceptions): Constify parameter.
73
e6b2f5ef
PA
742017-11-21 Pedro Alves <palves@redhat.com>
75
76 * dwarf2read.c (mapped_index::find_name_components_bounds)
77 <completion mode, upper bound>: Use std::lower_bound instead of
78 std::upper_bound.
79 (test_mapped_index_find_name_component_bounds): Remove incorrect
80 "t1_fund" from expected symbols.
81
5c58de74
PA
822017-11-21 Pedro Alves <palves@redhat.com>
83
84 * dwarf2read.c (mapped_index::name_components_casing): New field.
85 (mapped_index) <build_name_components,
86 find_name_components_bounds): Declare new methods.
87 (mapped_index::find_name_components_bounds)
88 (mapped_index::build_name_components): New methods, factored out
89 from dw2_expand_symtabs_matching_symbol.
90 (check_find_bounds_finds)
91 (test_mapped_index_find_name_component_bounds): New.
92 (run_test): Rename to ...
93 (test_dw2_expand_symtabs_matching_symbol): ... this.
94 (run_test): Reimplement.
95
e1ef7d7a
PA
962017-11-21 Pedro Alves <palves@redhat.com>
97
98 * cp-name-parser.y (cp_ident_is_alpha, cp_ident_is_alnum): New.
99 (symbol_end): Use cp_ident_is_alnum.
100 (yylex): Use cp_ident_is_alpha and cp_ident_is_alnum.
101 * dwarf2read.c (make_sort_after_prefix_name): New function.
102 (dw2_expand_symtabs_matching_symbol): Use it.
103 (test_symbols): Add more symbols.
104 (run_test): Add tests.
105
cf724bc9
TT
1062017-11-17 Tom Tromey <tom@tromey.com>
107
108 * symtab.h (enum symbol_subclass_kind): New.
109 (struct symbol) <is_cplus_template_function, is_rust_vtable>:
110 Remove.
111 <subclass>: New member.
112 (SYMBOL_IS_CPLUS_TEMPLATE_FUNCTION): Update.
113 * rust-lang.c (rust_get_trait_object_pointer): Update.
114 * dwarf2read.c (read_func_scope): Update.
115 (read_variable): Update.
116
68e745e3
TT
1172017-11-17 Tom Tromey <tom@tromey.com>
118
119 * dwarf2read.c (read_func_scope): Update.
120 * symtab.h (struct template_symbol): Derive from symbol.
121 <base>: Remove.
122
71a3c369
TT
1232017-11-17 Tom Tromey <tom@tromey.com>
124
125 * symtab.h (struct symbol) <is_rust_vtable>: New member.
126 (struct rust_vtable_symbol): New.
127 (find_symbol_at_address): Declare.
128 * symtab.c (find_symbol_at_address): New function.
129 * symfile.h (struct quick_symbol_functions)
130 <find_compunit_symtab_by_address>: New member.
131 * symfile-debug.c (debug_qf_find_compunit_symtab_by_address): New
132 function.
133 (debug_sym_quick_functions): Link to
134 debug_qf_find_compunit_symtab_by_address.
135 * rust-lang.c (rust_get_trait_object_pointer): New function.
136 (rust_evaluate_subexp) <case UNOP_IND>: New case. Call
137 rust_get_trait_object_pointer.
138 * psymtab.c (psym_relocate): Clear psymbol_map.
139 (psym_fill_psymbol_map, psym_find_compunit_symtab_by_address): New
140 functions.
141 (psym_functions): Link to psym_find_compunit_symtab_by_address.
142 * objfiles.h (struct objfile) <psymbol_map>: New member.
143 * dwarf2read.c (dwarf2_gdb_index_functions): Update.
144 (process_die) <DW_TAG_variable>: New case. Call read_variable.
145 (rust_containing_type, read_variable): New functions.
146
7468702d
SM
1472017-11-17 Simon Marchi <simon.marchi@polymtl.ca>
148
149 * common/gdb_vecs.h (DEF_VEC_I (int)): Remove.
150
37269bc9
SM
1512017-11-17 Simon Marchi <simon.marchi@polymtl.ca>
152
153 * common/filestuff.c: Include <algorithm>.
154 (open_fds): Change type to std::vector<int>.
155 (do_mark_open_fd): Adjust.
156 (unmark_fd_no_cloexec): Adjust.
157 (do_close): Adjust.
158
5c632425
SM
1592017-11-17 Simon Marchi <simon.marchi@polymtl.ca>
160
161 * breakpoint.c (output_thread_groups): Take an std::vector.
162 (print_one_breakpoint_location): Adjust.
163
ced9779b
JB
1642017-11-17 Joel Brobecker <brobecker@adacore.com>
165
166 * ada-lang.c (resolve_subexp): Add handling of OP_VAR_MSYM_VALUE.
167 (ada_evaluate_subexp_for_cast): New function.
168 (ada_evaluate_subexp) <UNOP_CAST>: Replace code by call to
169 ada_evaluate_subexp_for_cast.
170 (ada_evaluate_subexp) <nosideret>: Replace code by call to
171 eval_skip_value.
172 * eval.c (evaluate_var_value): Make non-static.
173 (evaluate_var_msym_value, eval_skip_value): Likewise.
174 * value.h (evaluate_var_value, evaluate_var_msym_value)
175 (eval_skip_value): Declare.
176
b7e22850
JB
1772017-11-16 Joel Brobecker <brobecker@adacore.com>
178
179 * ada-lang.c (ada_value_cast): Remove parameter "noside".
180 Update all callers.
181
9ccabccd
PA
1822017-11-16 Pedro Alves <palves@redhat.com>
183
184 * python/py-unwind.c (pyuw_sniffer): Translate
185 PyExc_KeyboardInterrupt to a GDB Quit exception.
186
d930703d
PA
1872017-11-16 Pedro Alves <palves@redhat.com>
188
189 * infrun.c (resume_cleanups): Delete.
190 (resume): No longer install a resume_cleanups cleanup nor call
191 QUIT.
192 (proceed): Pass the terminal to the inferior.
193 (keep_going_pass_signal): No longer install a resume_cleanups
194 cleanup.
195
38dc2859
PA
1962017-11-16 Pedro Alves <palves@redhat.com>
197
198 * inf-loop.c (inferior_event_handler): Don't swallow the exception
199 if the prompt is blocked.
200
688fca4f
PA
2012017-11-16 Pedro Alves <palves@redhat.com>
202
203 * breakpoint.c (insert_bp_location): Replace bp_err and
204 bp_err_message locals by a gdb_exception local.
205
e2c33ac7
PA
2062017-11-16 Pedro Alves <palves@redhat.com>
207
208 * inflow.c (scoped_ignore_sigttou): New class.
209 (child_terminal_ours_1, new_tty): Use it.
210
d7236961
UW
2112017-11-16 Ulrich Weigand <uweigand@de.ibm.com>
212
213 * target-float.c (decimal_from_number): Add byte_order argument and
214 call match_endianness. Error if unknown floating-point type.
215 (decimal_to_number): Add byte_order argument and call match_endianness.
216 (decimal_from_longest): Update call. Do not call match_endianness.
217 (decimal_from_ulongest): Likewise.
218 (decimal_binop): Likewise.
219 (decimal_is_zero): Likewise.
220 (decimal_compare): Likewise.
221 (decimal_convert): Likewise.
222
d8ae99a7
PM
2232017-11-16 Phil Muldoon <pmuldoon@redhat.com>
224
225 * python/python.c (gdbpy_rbreak): New function.
226 * NEWS: Document Python rbreak feature.
227
c632b645
YQ
2282017-11-16 Yao Qi <yao.qi@linaro.org>
229
230 * features/tic6x-c62x.xml: Remove.
231 * features/tic6x-c64x.xml: Remove.
232 * features/tic6x-c64xp.xml: Remove.
233
a014b87a
JB
2342017-11-15 John Baldwin <jhb@FreeBSD.org>
235
236 * symtab.h: Include <array>.
237
94765011
JB
2382017-11-15 John Baldwin <jhb@FreeBSD.org>
239
240 * bsd-kvm.c (bsd_kvm_cmd): Constify 'arg'.
241 (bsd_kvm_proc_cmd): Likewise.
242
625ad440
SM
2432017-11-15 Simon Marchi <simon.marchi@ericsson.com>
244
245 * tui/tui-win.c (window_name_completer): Replace VEC with
246 std::vector.
247
c0c11fa9
AC
2482017-11-15 Andrew Cagney <cagney@gnu.org>
249
250 * MAINTAINERS: Remove no-longer applicable entries.
251
34a7ebaf
AC
2522017-11-15 Andrew Cagney <cagney@gnu.org>
253
254 * MAINTAINERS: Move self to Past Maintainers.
255
5334ef39
YQ
2562017-11-15 Yao Qi <yao.qi@linaro.org>
257
258 * features/Makefile (XMLTOC): Remove nios2-linux.xml.
259 * features/nios2-linux.c: Remove.
260 * nios2-linux-tdep.c (_initialize_nios2_linux_tdep): Don't call
261 initialize_tdesc_nios2_linux.
262
a714b0d6
YQ
2632017-11-15 Yao Qi <yao.qi@linaro.org>
264
265 * m68hc11-tdep.c (M68HC11_NUM_REGS): Change it to
266 M68HC11_LAST_HARD_REG + 1.
267
92ffd475
PC
2682017-11-14 Paul Carroll <pcarroll@codesourcery.com>
269
270 PR gdb/22388
271 * remote.c (remote_write_bytes_aux, remote_read_bytes_1,
272 remote_read_bytes, remote_write_qxfer, remote_xfer_partial):
273 Return TARGET_XFER_EOF if size of returned data is 0.
274
07431908
SM
2752017-11-14 Simon Marchi <simon.marchi@ericsson.com>
276
277 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
278 memory-map-selftests.c.
279 (SUBDIR_UNITTESTS_OBS): Add memory-map-selftests.o.
280 * memory-map.c (memory_map_start_memory): Fix computation of hi
281 address.
282 * unittests/memory-map-selftests.c: New file.
283
31432a67
JB
2842017-11-09 Joel Brobecker <brobecker@adacore.com>
285
286 * ada-lang.c: Fix some typos in the general command documenting
287 how Ada expressions are being evaluated and how their result
288 is printed.
289
e793c052
TT
2902017-11-09 Tom Tromey <tom@tromey.com>
291
292 * psymtab.c (psymbol_hash): Do not hash string contents.
293 (psymbol_compare): Add comment.
294
7e8835c5
TT
2952017-11-09 Tom Tromey <tom@tromey.com>
296
297 * dictionary.c (dict_hash): Move "TKB" check into the "switch".
298
286acbb5
JB
2992017-11-08 Joel Brobecker <brobecker@adacore.com>
300
301 * ada-exp.y (write_var_from_sym): Remove parameter
302 "orig_left_context". Update all callers.
303
b44ec619
SM
3042017-11-08 Simon Marchi <simon.marchi@ericsson.com>
305
306 * tracepoint.h (class collection_list) <stringify>: Return
307 std::vector<std::string>.
308 (encode_actions_rsp): Change parameters to
309 std::vector<std::string> *.
310 * tracepoint.c (collection_list::stringify): Return
311 std::vector<std::string> and adjust accordingly.
312 (encode_actions_rsp): Changee parameters to
313 std::vector<std::string> and adjust accordingly.
314 * remote.c (free_actions_list),
315 free_actions_list_cleanup_wrapper): Remove.
316 (remote_download_tracepoint): Adjust to std::vector.
317
2f4732b0
TT
3182017-11-08 Tom Tromey <tom@tromey.com>
319
320 * dwarf2read.c (symbolp): Remove typedef.
321 (read_func_scope): Use std::vector.
322 (process_structure_scope): Use std::vector.
323
f9d67a22
PA
3242017-11-08 Pedro Alves <palves@redhat.com>
325
326 * ada-lang.c (ada_make_symbol_completion_list): Use
327 completion_skip_symbol.
328 * symtab.c (symbol_is_function_or_method(minimal_symbol*)): New.
329 (symbol_is_function_or_method(symbol*)): New.
330 (add_symtab_completions): Add complete_symbol_mode parameter. Use
331 completion_skip_symbol.
332 (default_collect_symbol_completion_matches_break_on): Use
333 completion_skip_symbol. Pass down mode.
334 (collect_file_symbol_completion_matches): Pass down mode.
335 * symtab.h (symbol_is_function_or_method): New declarations.
336 (completion_skip_symbol): New template function.
337
56d87ef7
PA
3382017-11-08 Pedro Alves <palves@redhat.com>
339
340 * linespec.c (iterate_over_all_matching_symtabs): Add
341 search_domain parameter. Pass it down to expand_symtabs_matching.
342 (decode_objc): Request FUNCTIONS_DOMAIN symbols only.
343 (lookup_prefix_sym): Adjust by passing ALL_DOMAIN as
344 search_domain.
345 (add_all_symbol_names_from_pspace): Add search_domain parameter.
346 Pass it down.
347 (find_method, find_function_symbols): Request FUNCTIONS_DOMAIN
348 symbols.
349 (add_matching_symbols_to_info): Add search_domain parameter. Pass
350 it down.
351
1b026119
PA
3522017-11-08 Pedro Alves <palves@redhat.com>
353
354 * ada-lang.c (ada_make_symbol_completion_list): Remove text and
355 text_len locals and don't pass them down.
356 * symtab.c (completion_list_add_name): Remove
357 sym_text/sym_text_len parameters and adjust.
358 (completion_list_add_symbol, completion_list_add_msymbol)
359 (completion_list_objc_symbol, completion_list_add_fields)
360 (add_symtab_completions): Likewise.
361 (default_collect_symbol_completion_matches_break_on)
362 (collect_file_symbol_completion_matches): Remove sym_text_len
363 local and don't pass it down.
364 * symtab.h (completion_list_add_name): Remove
365 sym_text/sym_text_len parameters.
366
c62446b1
PA
3672017-11-08 Pedro Alves <palves@redhat.com>
368
369 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
370 unittests/lookup_name_info-selftests.c.
371 (SUBDIR_UNITTESTS_OBS): Add lookup_name_info-selftests.o.
372 * cp-support.c: Include "selftest.h".
373 (cp_remove_params_1): Rename from cp_remove_params. Add
374 'require_param' parameter, and handle it.
375 (cp_remove_params): Reimplement.
376 (cp_remove_params_if_any): New.
377 (selftests::quote): New.
378 (selftests::check_remove_params): New.
379 (selftests::test_cp_remove_params): New.
380 (_initialize_cp_support): Install
381 selftests::test_cp_remove_params.
382 * cp-support.h (cp_remove_params_if_any): Declare.
383 * dwarf2read.c :Include "selftest.h".
384 (dw2_expand_symtabs_matching_symbol): Use
385 lookup_name_info::make_ignore_params.
386 (selftests::dw2_expand_symtabs_matching::mock_mapped_index)
387 (selftests::dw2_expand_symtabs_matching::string_or_null)
388 (selftests::dw2_expand_symtabs_matching::check_match)
389 (selftests::dw2_expand_symtabs_matching::test_symbols)
390 (selftests::dw2_expand_symtabs_matching::run_test): New.
391 (_initialize_dwarf2_read): Register
392 selftests::dw2_expand_symtabs_matching::run_test.
393 * psymtab.c (psym_expand_symtabs_matching): Use
394 lookup_name_info::make_ignore_params.
395 * symtab.c (demangle_for_lookup_info::demangle_for_lookup_info):
396 If the lookup name wants to ignore parameters, strip them.
397 (compare_symbol_name): Remove sym_text/sym_text_len parameters and
398 code handling '('.
399 (completion_list_add_name): Don't pass down sym_text/sym_text_len.
400 (default_collect_symbol_completion_matches_break_on): Don't try to
401 strip parameters.
402 * symtab.h (lookup_name_info::lookup_name_info): Add
403 'ignore_parameters' parameter.
404 (lookup_name_info::ignore_parameters)
405 (lookup_name_info::make_ignore_params): New methods.
406 (lookup_name_info::m_ignore_parameters): New field.
407 * unittests/lookup_name_info-selftests.c: New file.
408
61920122
PA
4092017-11-08 Pedro Alves <palves@redhat.com>
410
411 * dwarf2read.c (dw2_expand_marked_cus)
412 (dw2_expand_symtabs_matching_symbol): Remove forward declarations.
413 (dw2_expand_symtabs_matching): Move further below.
414 (dw2_expand_marked_cus): Reindent.
415
3f563c84
PA
4162017-11-08 Pedro Alves <palves@redhat.com>
417
418 * dwarf2read.c (byte_swap, MAYBE_SWAP): Move higher up in file.
419 (struct name_component): New.
420 (mapped_index::name_components): New field.
421 (mapped_index::symbol_name_at): New method.
422 (dwarf2_read_index): Call mapped_index ctor.
423 (dw2_map_matching_symbols): Add comment about name_components
424 table.
425 (dw2_expand_symtabs_matching): Factor part to...
426 (dw2_expand_symtabs_matching_symbol): ... this new function.
427 Build name components table, and lookup symbols in it before
428 calling the name matcher.
429 (dw2_expand_marked_cus): New, factored out from
430 dw2_expand_symtabs_matching.
431 (dwarf2_per_objfile_free): Call the mapped_index's dtor.
432
b5ec771e
PA
4332017-11-08 Pedro Alves <palves@redhat.com>
434
435 * ada-lang.c (ada_encode): Rename to ..
436 (ada_encode_1): ... this. Add throw_errors parameter and handle
437 it.
438 (ada_encode): Reimplement.
439 (match_name): Delete, folded into full_name.
440 (resolve_subexp): No longer pass the encoded name to
441 ada_lookup_symbol_list.
442 (should_use_wild_match): Delete.
443 (name_match_type_from_name): New.
444 (ada_lookup_simple_minsym): Use lookup_name_info and the
445 language's symbol_name_matcher_ftype.
446 (add_symbols_from_enclosing_procs, ada_add_local_symbols)
447 (ada_add_block_renamings): Adjust to use lookup_name_info.
448 (ada_lookup_name): New.
449 (add_nonlocal_symbols, ada_add_all_symbols)
450 (ada_lookup_symbol_list_worker, ada_lookup_symbol_list)
451 (ada_iterate_over_symbols): Adjust to use lookup_name_info.
452 (ada_name_for_lookup): Delete.
453 (ada_lookup_encoded_symbol): Construct a verbatim name.
454 (wild_match): Reverse sense of return type. Use bool.
455 (full_match): Reverse sense of return type. Inline bits of old
456 match_name here.
457 (ada_add_block_symbols): Adjust to use lookup_name_info.
458 (symbol_completion_match): Delete, folded into...
459 (ada_lookup_name_info::matches): ... .this new method.
460 (symbol_completion_add): Delete.
461 (ada_collect_symbol_completion_matches): Add name_match_type
462 parameter. Adjust to use lookup_name_info and
463 completion_list_add_name.
464 (get_var_value, ada_add_global_exceptions): Adjust to use
465 lookup_name_info.
466 (ada_get_symbol_name_cmp): Delete.
467 (do_wild_match, do_full_match): New functions.
468 (ada_lookup_name_info::ada_lookup_name_info): New method.
469 (ada_symbol_name_matches, ada_get_symbol_name_matcher): New
470 functions.
471 (ada_language_defn): Install ada_get_symbol_name_matcher.
472 * ada-lex.l (processId): If name starts with '<', copy it
473 verbatim.
474 * block.c (block_iter_match_step, block_iter_match_first)
475 (block_iter_match_next, block_lookup_symbol)
476 (block_lookup_symbol_primary, block_find_symbol): Adjust to use
477 lookup_name_info.
478 * block.h (block_iter_match_first, block_iter_match_next)
479 (ALL_BLOCK_SYMBOLS_WITH_NAME): Adjust to use lookup_name_info.
480 * c-lang.c (c_language_defn, cplus_language_defn)
481 (asm_language_defn, minimal_language_defn): Adjust comments to
482 refer to la_get_symbol_name_matcher.
483 * completer.c (complete_files_symbols)
484 (collect_explicit_location_matches, symbol_completer): Pass a
485 symbol_name_match_type down.
486 * completer.h (class completion_match, completion_match_result):
487 New classes.
488 (completion_tracker::reset_completion_match_result): New method.
489 (completion_tracker::m_completion_match_result): New field.
490 * cp-support.c (make_symbol_overload_list_block): Adjust to use
491 lookup_name_info.
492 (cp_fq_symbol_name_matches, cp_get_symbol_name_matcher): New
493 functions.
494 * cp-support.h (cp_get_symbol_name_matcher): New declaration.
495 * d-lang.c: Adjust comments to refer to
496 la_get_symbol_name_matcher.
497 * dictionary.c (dict_vector) <iter_match_first, iter_match_next>:
498 Adjust to use lookup_name_info.
499 (dict_iter_match_first, dict_iter_match_next)
500 (iter_match_first_hashed, iter_match_next_hashed)
501 (iter_match_first_linear, iter_match_next_linear): Adjust to work
502 with a lookup_name_info.
503 * dictionary.h (dict_iter_match_first, dict_iter_match_next):
504 Likewise.
505 * dwarf2read.c (dw2_lookup_symbol): Adjust to use lookup_name_info.
506 (dw2_map_matching_symbols): Adjust to use symbol_name_match_type.
507 (gdb_index_symbol_name_matcher): New class.
508 (dw2_expand_symtabs_matching) Adjust to use lookup_name_info and
509 gdb_index_symbol_name_matcher. Accept a NULL symbol_matcher.
510 * f-lang.c (f_collect_symbol_completion_matches): Adjust to work
511 with a symbol_name_match_type.
512 (f_language_defn): Adjust comments to refer to
513 la_get_symbol_name_matcher.
514 * go-lang.c (go_language_defn): Adjust comments to refer to
515 la_get_symbol_name_matcher.
516 * language.c (default_symbol_name_matcher)
517 (language_get_symbol_name_matcher): New functions.
518 (unknown_language_defn, auto_language_defn): Adjust comments to
519 refer to la_get_symbol_name_matcher.
520 * language.h (symbol_name_cmp_ftype): Delete.
521 (language_defn) <la_collect_symbol_completion_matches>: Add match
522 type parameter.
523 <la_get_symbol_name_cmp>: Delete field.
524 <la_get_symbol_name_matcher>: New field.
525 <la_iterate_over_symbols>: Adjust to use lookup_name_info.
526 (default_symbol_name_matcher, language_get_symbol_name_matcher):
527 Declare.
528 * linespec.c (iterate_over_all_matching_symtabs)
529 (iterate_over_file_blocks): Adjust to use lookup_name_info.
530 (find_methods): Add language parameter, and use lookup_name_info
531 and the language's symbol_name_matcher_ftype.
532 (linespec_complete_function): Adjust.
533 (lookup_prefix_sym): Use lookup_name_info.
534 (add_all_symbol_names_from_pspace): Adjust.
535 (find_superclass_methods): Add language parameter and pass it
536 down.
537 (find_method): Pass symbol language down.
538 (find_linespec_symbols): Don't demangle or Ada encode here.
539 (search_minsyms_for_name): Add lookup_name_info parameter.
540 (add_matching_symbols_to_info): Add name_match_type parameter.
541 Use lookup_name_info.
542 * m2-lang.c (m2_language_defn): Adjust comments to refer to
543 la_get_symbol_name_matcher.
544 * minsyms.c: Include <algorithm>.
545 (add_minsym_to_demangled_hash_table): Remove table parameter and
546 add objfile parameter. Use search_name_hash, and add language to
547 demangled languages vector.
548 (struct found_minimal_symbols): New struct.
549 (lookup_minimal_symbol_mangled, lookup_minimal_symbol_demangled):
550 New functions.
551 (lookup_minimal_symbol): Adjust to use them. Don't canonicalize
552 input names here. Use lookup_name_info instead. Lookup up
553 demangled names once for each language in the demangled names
554 vector.
555 (iterate_over_minimal_symbols): Use lookup_name_info. Lookup up
556 demangled names once for each language in the demangled names
557 vector.
558 (build_minimal_symbol_hash_tables): Adjust.
559 * minsyms.h (iterate_over_minimal_symbols): Adjust to pass down a
560 lookup_name_info.
561 * objc-lang.c (objc_language_defn): Adjust comment to refer to
562 la_get_symbol_name_matcher.
563 * objfiles.h: Include <vector>.
564 (objfile_per_bfd_storage) <demangled_hash_languages>: New field.
565 * opencl-lang.c (opencl_language_defn): Adjust comment to refer to
566 la_get_symbol_name_matcher.
567 * p-lang.c (pascal_language_defn): Adjust comment to refer to
568 la_get_symbol_name_matcher.
569 * psymtab.c (psym_lookup_symbol): Use lookup_name_info.
570 (match_partial_symbol): Use symbol_name_match_type,
571 lookup_name_info and psymbol_name_matches.
572 (lookup_partial_symbol): Use lookup_name_info.
573 (map_block): Use symbol_name_match_type and lookup_name_info.
574 (psym_map_matching_symbols): Use symbol_name_match_type.
575 (psymbol_name_matches): New.
576 (recursively_search_psymtabs): Use lookup_name_info and
577 psymbol_name_matches. Rename 'kind' parameter to 'domain'.
578 (psym_expand_symtabs_matching): Use lookup_name_info. Rename
579 'kind' parameter to 'domain'.
580 * rust-lang.c (rust_language_defn): Adjust comment to refer to
581 la_get_symbol_name_matcher.
582 * symfile-debug.c (debug_qf_map_matching_symbols)
583 (debug_qf_map_matching_symbols): Use symbol_name_match_type.
584 (debug_qf_expand_symtabs_matching): Use lookup_name_info.
585 * symfile.c (expand_symtabs_matching): Use lookup_name_info.
586 * symfile.h (quick_symbol_functions) <map_matching_symbols>:
587 Adjust to use symbol_name_match_type.
588 <expand_symtabs_matching>: Adjust to use lookup_name_info.
589 (expand_symtabs_matching): Adjust to use lookup_name_info.
590 * symmisc.c (maintenance_expand_symtabs): Use
591 lookup_name_info::match_any ().
592 * symtab.c (symbol_matches_search_name): New.
593 (eq_symbol_entry): Adjust to use lookup_name_info and the
594 language's matcher.
595 (demangle_for_lookup_info::demangle_for_lookup_info): New.
596 (lookup_name_info::match_any): New.
597 (iterate_over_symbols, search_symbols): Use lookup_name_info.
598 (compare_symbol_name): Add language, lookup_name_info and
599 completion_match_result parameters, and use them.
600 (completion_list_add_name): Make extern. Add language and
601 lookup_name_info parameters. Use them.
602 (completion_list_add_symbol, completion_list_add_msymbol)
603 (completion_list_objc_symbol): Add lookup_name_info parameters and
604 adjust. Pass down language.
605 (completion_list_add_fields): Add lookup_name_info parameters and
606 adjust. Pass down language.
607 (add_symtab_completions): Add lookup_name_info parameters and
608 adjust.
609 (default_collect_symbol_completion_matches_break_on): Add
610 name_match_type parameter, and use it. Use lookup_name_info.
611 (default_collect_symbol_completion_matches)
612 (collect_symbol_completion_matches): Add name_match_type
613 parameter, and pass it down.
614 (collect_symbol_completion_matches_type): Adjust.
615 (collect_file_symbol_completion_matches): Add name_match_type
616 parameter, and use lookup_name_info.
617 * symtab.h: Include <string> and "common/gdb_optional.h".
618 (enum class symbol_name_match_type): New.
619 (class ada_lookup_name_info): New.
620 (struct demangle_for_lookup_info): New.
621 (class lookup_name_info): New.
622 (symbol_name_matcher_ftype): New.
623 (SYMBOL_MATCHES_SEARCH_NAME): Use symbol_matches_search_name.
624 (symbol_matches_search_name): Declare.
625 (MSYMBOL_MATCHES_SEARCH_NAME): Delete.
626 (default_collect_symbol_completion_matches)
627 (collect_symbol_completion_matches)
628 (collect_file_symbol_completion_matches): Add name_match_type
629 parameter.
630 (iterate_over_symbols): Use lookup_name_info.
631 (completion_list_add_name): Declare.
632 * utils.c (enum class strncmp_iw_mode): Moved to utils.h.
633 (strncmp_iw_with_mode): Now extern.
634 * utils.h (enum class strncmp_iw_mode): Moved from utils.c.
635 (strncmp_iw_with_mode): Declare.
636
5ffa0793
PA
6372017-11-08 Keith Seitz <keiths@redhat.com>
638 Pedro Alves <palves@redhat.com>
639
640 * ada-lang.c (ada_language_defn): Install
641 default_search_name_hash.
642 * buildsym.c (struct buildsym_compunit): <language>: New field.
643 (finish_block_internal): Pass language when creating dictionaries.
644 (start_buildsym_compunit, start_symtab): New language parameters.
645 Use them.
646 (restart_symtab): Pass down compilation unit's language.
647 * buildsym.h (enum language): Forward declare.
648 (start_symtab): New 'language' parameter.
649 * c-lang.c (c_language_defn, cplus_language_defn)
650 (asm_language_defn, minimal_language_defn): Install
651 default_search_name_hash.
652 * coffread.c (coff_start_symtab): Adjust.
653 * d-lang.c (d_language_defn): Install default_search_name_hash.
654 * dbxread.c (struct symloc): Add 'pst_language' field.
655 (PST_LANGUAGE): Define.
656 (start_psymtab, read_ofile_symtab): Use it.
657 (process_one_symbol): New 'language' parameter. Pass it down.
658 * dictionary.c (struct dictionary) <language>: New field.
659 (DICT_LANGUAGE): Define.
660 (dict_create_hashed, dict_create_hashed_expandable)
661 (dict_create_linear, dict_create_linear_expandable): New parameter
662 'language'. Set the dictionary's language.
663 (iter_match_first_hashed): Adjust to rename.
664 (insert_symbol_hashed): Assert we don't see mismatching
665 languages. Adjust to rename.
666 (dict_hash): Rename to ...
667 (default_search_name_hash): ... this and make extern.
668 * dictionary.h (struct language_defn): Forward declare.
669 (dict_create_hashed): New parameter 'language'.
670 * dwarf2read.c (dwarf2_start_symtab): Pass down language.
671 * f-lang.c (f_language_defn): Install default_search_name_hash.
672 * go-lang.c (go_language_defn): Install default_search_name_hash.
673 * jit.c (finalize_symtab): Pass compunit's language to dictionary
674 creation.
675 * language.c (unknown_language_defn, auto_language_defn):
676 * language.h (language_defn::la_search_name_hash): New field.
677 (default_search_name_hash): Declare.
678 * m2-lang.c (m2_language_defn): Install default_search_name_hash.
679 * mdebugread.c (new_block): New parameter 'language'.
680 * mdebugread.c (parse_symbol): Pass symbol language to block
681 allocation.
682 (psymtab_to_symtab_1): Pass down language.
683 (new_symtab): Pass compunit's language to block allocation.
684 * objc-lang.c (objc_language_defn): Install
685 default_search_name_hash.
686 * opencl-lang.c (opencl_language_defn):
687 * p-lang.c (pascal_language_defn): Install
688 default_search_name_hash.
689 * rust-lang.c (rust_language_defn): Install
690 default_search_name_hash.
691 * stabsread.h (enum language): Forward declare.
692 (process_one_symbol): Add 'language' parameter.
693 * symtab.c (search_name_hash): New function.
694 * symtab.h (search_name_hash): Declare.
695 * xcoffread.c (read_xcoff_symtab): Pass language to start_symtab.
696
2a1dde5d
PA
6972017-11-08 Pedro Alves <palves@redhat.com>
698
699 * cp-name-parser.y (main): Don't initialize extra_chars.
700
95a6b0a1
TT
7012017-11-07 Tom Tromey <tom@tromey.com>
702
703 * event-top.h (command_handler): Constify.
704 * record-full.c (cmd_record_full_start): Update.
705 * thread.c (thread_apply_all_command): Update.
706 * printcmd.c (eval_command): Update.
707 * mi/mi-main.c (mi_execute_cli_command): Update.
708 (mi_execute_async_cli_command): Update.
709 * tui/tui-stack.c (tui_update_command): Update.
710 * cli/cli-interp.c (safe_execute_command): Constify.
711 * record.c (record_start): Update.
712 (record_start, record_stop, cmd_record_start): Update.
713 * record-btrace.c (cmd_record_btrace_bts_start): Update.
714 (cmd_record_btrace_pt_start): Update.
715 (cmd_record_btrace_start): Update.
716 (cmd_record_btrace_start): Update.
717 * reverse.c (exec_reverse_once): Update.
718 * python/python.c (execute_gdb_command): Don't copy the command.
719 * event-top.c (command_line_handler): Update.
720 (command_handler): Constify.
721 * defs.h (deprecated_call_command_hook): Constify.
722 * cli/cli-script.h (execute_user_command): Constify.
723 * cli/cli-script.c (execute_user_command): Constify.
724 (execute_cmd_pre_hook, execute_cmd_post_hook): Constify.
725 (enum command_control_type): Update.
726 * main.c (catch_command_errors): Remove non-const overload.
727 (catch_command_errors_ftype): Remove.
728 * python/py-cmd.c (cmdpy_function): Constify.
729 * guile/scm-cmd.c (cmdscm_function): Constify.
730 * cli/cli-dump.c (call_dump_func): Constify.
731 * cli/cli-decode.c (do_const_cfunc): Constify.
732 (do_sfunc): Constify.
733 (cmd_func): Constify.
734 * gdbcmd.h (execute_command, execute_command_to_string): Constify.
735 * top.h (execute_command): Constify.
736 * top.c (execute_command): Constify.
737 (execute_command_to_string): Constify.
738 (deprecated_call_command_hook): Constify.
739 * command.h (cmd_func): Constify.
740 * cli/cli-decode.h (struct cmd_list_element) <func>: Constify.
741
eb4c3f4a
TT
7422017-11-07 Tom Tromey <tom@tromey.com>
743
744 * ada-lang.c (catch_ada_exception_command): Constify.
745 (catch_assert_command): Constify.
746 * break-catch-throw.c (catch_catch_command, catch_throw_command)
747 (catch_rethrow_command): Constify.
748 (catch_exception_command_1): Constify.
749 * breakpoint.h (add_catch_command): Constify.
750 * break-catch-syscall.c (catch_syscall_command_1): Constify.
751 (catch_syscall_split_args): Constify.
752 * break-catch-sig.c (catch_signal_command): Constify.
753 (catch_signal_split_args): Constify.
754 * cli/cli-decode.h (struct cmd_list_element) <function>: Use
755 cmd_const_sfunc_ftype.
756 * cli/cli-decode.c (add_setshow_cmd_full): Constify.
757 (add_setshow_enum_cmd, add_setshow_auto_boolean_cmd)
758 (add_setshow_boolean_cmd, add_setshow_filename_cmd)
759 (add_setshow_string_cmd, struct cmd_list_element)
760 (add_setshow_optional_filename_cmd, add_setshow_integer_cmd)
761 (add_setshow_uinteger_cmd, add_setshow_zinteger_cmd)
762 (add_setshow_zuinteger_unlimited_cmd, add_setshow_zuinteger_cmd):
763 Constify.
764 (set_cmd_sfunc): Constify.
765 (empty_sfunc): Constify.
766 * command.h (add_setshow_enum_cmd, add_setshow_auto_boolean_cmd)
767 (add_setshow_boolean_cmd, add_setshow_filename_cmd)
768 (add_setshow_string_cmd, add_setshow_string_noescape_cmd)
769 (add_setshow_optional_filename_cmd, add_setshow_integer_cmd)
770 (add_setshow_uinteger_cmd, add_setshow_zinteger_cmd)
771 (add_setshow_zuinteger_cmd, add_setshow_zuinteger_unlimited_cmd):
772 Constify.
773 (set_cmd_sfunc): Constify.
774 (cmd_sfunc_ftype): Remove.
775 * compile/compile.c (set_compile_args): Constify.
776 * infrun.c (set_disable_randomization): Constify.
777 * infcmd.c (set_args_command, set_cwd_command): Constify.
778 * breakpoint.c (set_condition_evaluation_mode): Constify.
779 (add_catch_command): Constify.
780 (catch_fork_command_1, catch_exec_command_1)
781 (catch_load_command_1, catch_unload_command_1): Constify.
782 (catch_load_or_unload): Constify.
783 * guile/scm-param.c (pascm_set_func): Constify.
784 (add_setshow_generic): Constify.
785 * python/py-param.c (get_set_value): Constify.
786 * top.h (set_verbose): Constify.
787 * tui/tui-win.c (tui_set_var_cmd): Constify.
788 * mi/mi-main.c (set_mi_async_command): Constify.
789 * cli/cli-logging.c (set_logging_overwrite)
790 (set_logging_redirect): Constify.
791 * value.c (set_max_value_size): Constify.
792 * valprint.c (set_input_radix, set_output_radix): Constify.
793 * utils.c (set_width_command, set_height_command): Constify.
794 * typeprint.c (set_print_type_methods, set_print_type_typedefs): Constify.
795 * tracepoint.c (set_disconnected_tracing)
796 (set_circular_trace_buffer, set_trace_buffer_size)
797 (set_trace_user, set_trace_notes, set_trace_stop_notes): Constify.
798 * top.c (set_history_size_command, set_verbose, set_editing)
799 (set_gdb_datadir, set_history_filename): Constify.
800 * target.c (set_targetdebug, maint_set_target_async_command)
801 (maint_set_target_non_stop_command, set_target_permissions)
802 (set_write_memory_permission): Constify.
803 (open_target): Constify.
804 * target-descriptions.c (set_tdesc_filename_cmd): Constify.
805 * target-dcache.c (set_stack_cache, set_code_cache): Constify.
806 * symtab.c (set_symbol_cache_size_handler): Constify.
807 * symfile.c (set_ext_lang_command): Constify.
808 * symfile-debug.c (set_debug_symfile): Constify.
809 * source.c (set_directories_command): Constify.
810 * solib.c (reload_shared_libraries, gdb_sysroot_changed): Constify.
811 * serial.c (set_parity): Constify.
812 * rs6000-tdep.c (powerpc_set_soft_float, powerpc_set_vector_abi): Constify.
813 * remote.c (set_remote_exec_file, set_remotebreak)
814 (set_remote_protocol_Z_packet_cmd, set_range_stepping): Constify.
815 * record.c (set_record_insn_history_size)
816 (set_record_call_history_size): Constify.
817 * record-full.c (set_record_full_insn_max_num): Constify.
818 * proc-api.c (set_procfs_trace_cmd, set_procfs_file_cmd): Constify.
819 * osabi.c (set_osabi): Constify.
820 * mips-tdep.c (set_mips64_transfers_32bit_regs)
821 (reinit_frame_cache_sfunc, mips_abi_update): Constify.
822 * maint.c (maintenance_set_profile_cmd): Constify.
823 * linux-thread-db.c (set_libthread_db_search_path): Constify.
824 * language.c (set_language_command, set_range_command)
825 (set_case_command): Constify.
826 * infrun.c (set_non_stop, set_observer_mode)
827 (set_stop_on_solib_events, set_schedlock_func)
828 (set_exec_direction_func): Constify.
829 * infcmd.c (set_inferior_tty_command): Constify.
830 * disasm.c (set_disassembler_options_sfunc): Constify.
831 * demangle.c (set_demangling_command): Constify.
832 * dcache.c (set_dcache_size, set_dcache_line_size): Constify.
833 * cris-tdep.c (set_cris_version, set_cris_mode)
834 (set_cris_dwarf2_cfi): Constify.
835 * corefile.c (set_gnutarget_command): Constify.
836 * charset.c (set_host_charset_sfunc, set_target_charset_sfunc)
837 (set_target_wide_charset_sfunc): Constify.
838 * breakpoint.c (update_dprintf_commands): Constify.
839 * auto-load.c (set_auto_load_dir, set_auto_load_safe_path): Constify.
840 * arm-tdep.c (set_fp_model_sfunc, arm_set_abi)
841 (set_disassembly_style_sfunc): Constify.
842 * arch-utils.c (set_endian, set_architecture): Constify.
843 * alpha-tdep.c (reinit_frame_cache_sfunc): Constify.
844 * agent.c (set_can_use_agent): Constify.
845
5fed81ff
TT
8462017-11-07 Tom Tromey <tom@tromey.com>
847
848 * go32-nat.c (go32_sysinfo, go32_sldt, go32_sgdt, go32_sidt)
849 (go32_pde, go32_pte, go32_pte_for_address): Constify.
850 * gnu-nat.c (_parse_bool_arg, show_thread_default_pause_cmd)
851 (set_thread_default_pause_cmd, set_thread_default_run_cmd)
852 (show_thread_default_run_cmd, set_thread_default_detach_sc_cmd)
853 (parse_int_arg, show_thread_default_detach_sc_cmd)
854 (set_signals_cmd, show_signals_cmd, set_sig_thread_cmd)
855 (show_sig_thread_cmd, set_stopped_cmd, show_stopped_cmd)
856 (set_exceptions_cmd, show_exceptions_cmd, set_task_pause_cmd)
857 (show_task_pause_cmd, set_task_detach_sc_cmd)
858 (show_task_detach_sc_cmd, set_task_exc_port_cmd)
859 (set_noninvasive_cmd, set_thread_pause_cmd)
860 (show_thread_pause_cmd, set_thread_run_cmd, show_thread_run_cmd)
861 (set_thread_detach_sc_cmd, show_thread_detach_sc_cmd)
862 (set_thread_exc_port_cmd, thread_takeover_sc_cmd): Constify.
863 * windows-nat.c (display_selectors): Constify.
864 * cli/cli-decode.h (struct cmd_list_element) <function>: Remove
865 non-const "cfunc".
866 * cli/cli-decode.c (set_cmd_cfunc): Remove non-const overload.
867 (cmd_cfunc_eq): Likewise.
868 (struct cmd_list_element): Likewise.
869 (do_cfunc): Remove.
870 (cli_user_command_p): Update.
871 * command.h (add_cmd): Remove non-const overload.
872 (cmd_cfunc_ftype): Remove typedef.
873 (cmd_cfunc_eq): Remove non-const overload.
874 * value.c (show_values): Constify.
875 * thread.c (thread_apply_all_command): Constify.
876 * symfile.c (load_command): Constify.
877 * source.c (directory_command): Constify.
878 * maint.c (maintenance_internal_error)
879 (maintenance_demangler_warning, maintenance_space_display)
880 (maintenance_print_architecture, maintenance_translate_address)
881 (maintenance_info_selftests, maintenance_internal_warning):
882 Constify.
883 * breakpoint.c (disable_trace_command, enable_trace_command):
884 Constify.
885 * auto-load.c (info_auto_load_local_gdbinit, add_auto_load_dir):
886 Constify.
887 (add_auto_load_safe_path): Constify.
888 * guile/scm-auto-load.c (info_auto_load_guile_scripts): Constify.
889 * top.h (show_commands): Constify.
890 * linux-thread-db.c (info_auto_load_libthread_db): Constify.
891 * sparc64-tdep.c (adi_examine_command): Constify.
892 (adi_assign_command): Constify.
893
1d12d88f
TT
8942017-11-07 Tom Tromey <tom@tromey.com>
895
896 * frame.h (info_locals_command, info_args_command): Constify.
897 * auto-load.h (auto_load_info_scripts): Constify.
898 * inferior.h (registers_info): Constify.
899 * copying.c: Rebuild.
900 * copying.awk: Constify generated commands.
901 * auto-load.c (auto_load_info_scripts)
902 (info_auto_load_gdb_scripts): Constify.
903 * cli/cli-decode.c (struct cmd_list_element): Take a
904 cmd_const_cfunc_ftype.
905 * command.h (add_info): Take a cmd_const_cfunc_ftype.
906 * tui/tui-win.c (tui_all_windows_info): Constify.
907 * python/py-auto-load.c (info_auto_load_python_scripts):
908 Constify.
909 * cli/cli-cmds.c (show_command): Remove non-const overload.
910 * tracepoint.c (info_tvariables_command, info_scope_command):
911 Constify.
912 (info_static_tracepoint_markers_command): Constify.
913 * thread.c (info_threads_command): Constify.
914 (print_thread_info_1): Constify.
915 * target.c (info_target_command): Constify.
916 * symtab.c (info_sources_command, info_functions_command)
917 (info_types_command): Constify.
918 (info_variables_command): Remove non-const overload.
919 * symfile.c (info_ext_lang_command): Constify.
920 * stack.c (info_frame_command, info_locals_command)
921 (info_args_command): Constify.
922 (backtrace_command): Remove non-const overload.
923 * source.c (info_source_command, info_line_command): Constify.
924 * solib.c (info_sharedlibrary_command): Constify.
925 * skip.c (info_skip_command): Constify.
926 * ser-go32.c (info_serial_command): Constify.
927 * reverse.c (info_bookmarks_command): Constify.
928 * printcmd.c (info_symbol_command, info_address_command)
929 (info_display_command): Constify.
930 * osdata.c (info_osdata_command): Constify.
931 * objc-lang.c (info_selectors_command, info_classes_command):
932 Constify.
933 * nto-procfs.c (procfs_pidlist, procfs_meminfo): Constify.
934 * memattr.c (info_mem_command): Constify.
935 * macrocmd.c (info_macro_command, info_macros_command): Constify.
936 * linux-fork.c (info_checkpoints_command): Constify.
937 * infrun.c (info_signals_command): Constify.
938 * inflow.c (info_terminal_command): Constify.
939 * inferior.c (info_inferiors_command): Constify.
940 (print_inferior): Constify.
941 * infcmd.c (info_program_command, info_all_registers_command)
942 (info_registers_command, info_vector_command)
943 (info_float_command): Constify.
944 (registers_info): Constify.
945 * gnu-nat.c (info_send_rights_cmd, info_recv_rights_cmd)
946 (info_port_sets_cmd, info_dead_names_cmd, info_port_rights_cmd):
947 Constify.
948 * f-valprint.c (info_common_command): Constify.
949 * dcache.c (info_dcache_command): Constify.
950 (dcache_info_1): Constify.
951 * darwin-nat-info.c (info_mach_tasks_command)
952 (info_mach_task_command, info_mach_ports_command)
953 (info_mach_port_command, info_mach_threads_command)
954 (info_mach_thread_command, info_mach_regions_command)
955 (info_mach_regions_recurse_command, info_mach_region_command)
956 (info_mach_exceptions_command): Constify.
957 (get_task_from_args): Constify.
958 * cp-support.c (info_vtbl_command): Constify.
959 * breakpoint.c (info_watchpoints_command)
960 (info_tracepoints_command): Constify.
961 (info_breakpoints_command): Remove non-const overload.
962 * avr-tdep.c (avr_io_reg_read_command): Constify.
963 * auxv.c (info_auxv_command): Constify.
964 * ada-tasks.c (info_tasks_command): Constify.
965 (info_task): Constify.
966 * ada-lang.c (info_exceptions_command): Constify.
967
0b39b52e
TT
9682017-11-07 Tom Tromey <tom@tromey.com>
969
970 * solib.h (no_shared_libraries): Constify.
971 * frame.h (return_command): Constify.
972 * cli/cli-cmds.h (quit_command): Constify.
973 * top.h (quit_command, execute_command): Constify.
974 * target.h (flash_erase_command): Constify.
975 * inferior.h (set_inferior_args, attach_command): Constify.
976 * tracepoint.h (start_tracing, stop_tracing): Constify.
977 * breakpoint.h (break_command, tbreak_command)
978 (hbreak_command_wrapper, thbreak_command_wrapper)
979 (rbreak_command_wrapper, watch_command_wrapper)
980 (awatch_command_wrapper, rwatch_command_wrapper)
981 (get_tracepoint_by_number): Constify.
982 * symtab.c (info_variables_command, rbreak_command)
983 (symtab_symbol_info): Constify.
984 (info_variables_command): Add non-const overload.
985 * top.c (dont_repeat_command): Constify.
986 * breakpoint.c (ignore_command, commands_command)
987 (condition_command, tbreak_command, hbreak_command)
988 (thbreak_command, clear_command, break_command)
989 (info_breakpoints_command, watch_command, rwatch_command)
990 (awatch_command, trace_command, ftrace_command, strace_command)
991 (trace_pass_command, break_range_command, dprintf_command)
992 (agent_printf_command, get_tracepoint_by_number)
993 (watch_maybe_just_location, trace_pass_command): Constify.
994 (info_breakpoints_command): Add non-const overload.
995 * tracefile.c (tsave_command): Constify.
996 * infcmd.c (attach_command, disconnect_command, signal_command)
997 (queue_signal_command, stepi_command, nexti_command)
998 (finish_command, next_command, step_command, until_command)
999 (advance_command, jump_command, continue_command, run_command)
1000 (start_command, starti_command, interrupt_command)
1001 (run_command_1, set_inferior_args, step_1): Constify.
1002 * inferior.c (add_inferior_command, remove_inferior_command)
1003 (clone_inferior_command): Constify.
1004 * linux-fork.c (checkpoint_command, restart_command): Constify.
1005 * windows-nat.c (signal_event_command): Constify.
1006 * guile/guile.c (guile_repl_command, guile_command): Constify.
1007 * printcmd.c (x_command, display_command, printf_command)
1008 (output_command, set_command, call_command, print_command)
1009 (eval_command): Constify.
1010 (non_const_set_command): Remove.
1011 (_initialize_printcmd): Update.
1012 * source.c (forward_search_command, reverse_search_command):
1013 Constify.
1014 * jit.c (jit_reader_load_command, jit_reader_unload_command):
1015 Constify.
1016 * infrun.c (handle_command): Constify.
1017 * memattr.c (mem_command): Constify.
1018 * stack.c (return_command, up_command, up_silently_command)
1019 (down_command, down_silently_command, frame_command)
1020 (backtrace_command, func_command, backtrace_command_1): Constify.
1021 (backtrace_command): Add non-const overload.
1022 * remote-sim.c (simulator_command): Constify.
1023 * exec.c (set_section_command): Constify.
1024 * tracepoint.c (tdump_command, trace_variable_command)
1025 (tstatus_command, tstop_command, tstart_command)
1026 (end_actions_pseudocommand, while_stepping_pseudocommand)
1027 (collect_pseudocommand, teval_pseudocommand, actions_command)
1028 (start_tracing, stop_tracing): Constify.
1029 * value.c (init_if_undefined_command): Constify.
1030 * tui/tui-stack.c (tui_update_command): Constify.
1031 * tui/tui-win.c (tui_refresh_all_command)
1032 (tui_set_tab_width_command, tui_set_win_height_command)
1033 (tui_set_focus_command, tui_scroll_forward_command)
1034 (tui_scroll_backward_command, tui_scroll_left_command)
1035 (tui_scroll_right_command, parse_scrolling_args, tui_set_focus)
1036 (tui_set_win_height): Constify.
1037 * tui/tui-layout.c (tui_layout_command): Constify.
1038 * procfs.c (proc_trace_syscalls, proc_trace_sysentry_cmd)
1039 (proc_trace_sysexit_cmd, proc_untrace_sysentry_cmd)
1040 (proc_untrace_sysexit_cmd): Constify.
1041 * remote.c (threadlist_test_cmd, threadinfo_test_cmd)
1042 (threadset_test_cmd, threadlist_update_test_cmd)
1043 (threadalive_test): Constify.
1044 * objc-lang.c (print_object_command): Constify.
1045 * command.h (add_com): Constify.
1046 * cli/cli-dump.c (restore_command): Constify.
1047 * cli/cli-cmds.c (pwd_command, echo_command, quit_command)
1048 (help_command, complete_command, shell_command, edit_command)
1049 (list_command, disassemble_command, make_command)
1050 (apropos_command, alias_command): Constify.
1051 * cli/cli-script.c (document_command, define_command)
1052 (while_command, if_command, validate_comname): Constify.
1053 * cli/cli-decode.c (struct cmd_list_element): Change type of
1054 "fun".
1055 * target.c (do_monitor_command, flash_erase_command): Constify.
1056 * regcache.c (reg_flush_command): Constify.
1057 * reverse.c (reverse_step, reverse_next, reverse_stepi)
1058 (reverse_nexti, reverse_continue, reverse_finish)
1059 (save_bookmark_command, goto_bookmark_command)
1060 (exec_reverse_once): Constify.
1061 * python/python.c (python_interactive_command, python_command):
1062 Constify.
1063 * typeprint.c (ptype_command, whatis_command, whatis_exp):
1064 Constify.
1065 * solib.c (sharedlibrary_command, no_shared_libraries): Constify.
1066 * gcore.c (gcore_command): Constify.
1067
85c4be7c
TT
10682017-11-07 Tom Tromey <tom@tromey.com>
1069
1070 * printcmd.c (x_command): Call set_repeat_arguments.
1071 * cli/cli-cmds.c (list_command): Call set_repeat_arguments.
1072 * top.c (repeat_arguments): New global.
1073 (set_repeat_arguments): New function.
1074 (execute_command): Handle repeat_arguments.
1075 (show_commands): Calls set_repeat_arguments.
1076 * command.h (set_repeat_arguments): Declare.
1077
022643b4
TT
10782017-11-07 Tom Tromey <tom@tromey.com>
1079
1080 * stack.c (backtrace_command): Use std::string.
1081 (backtrace_command_1): Make "count_exp" const.
1082
5614fb77
TT
10832017-11-07 Tom Tromey <tom@tromey.com>
1084
1085 * source.c (directory_switch, mod_path, add_path): Constify.
1086 * defs.h (add_path, mod_path, directory_switch): Constify.
1087 * mi/mi-cmd-env.c (env_mod_path): Constify.
1088
6be9a197
TT
10892017-11-07 Tom Tromey <tom@tromey.com>
1090
1091 * infcmd.c (strip_bg_char): Return gdb::unique_xmalloc_ptr.
1092 (run_command_1, continue_command, step_1, jump_command)
1093 (signal_command, until_command, advance_command, finish_command)
1094 (attach_command): Update.
1095
c2252c0d
TT
10962017-11-07 Tom Tromey <tom@tromey.com>
1097
1098 * command.h (set_cmd_cfunc): Don't declare.
1099 * cli/cli-decode.c (set_cmd_cfunc): Now static.
1100
1ee870c5
TT
11012017-11-07 Tom Tromey <tom@tromey.com>
1102
1103 * stack.c (select_frame_command): Constify.
1104 * cli/cli-decode.c (add_com_suppress_notification): Constify.
1105 * command.h (add_com_suppress_notification): Constify.
1106
ee7ddd71
TT
11072017-11-07 Tom Tromey <tom@tromey.com>
1108
1109 * breakpoint.c (stop_command): Constify.
1110 * cli/cli-decode.c (struct cmd_list_element): Constify.
1111 * command.h (add_abbrev_prefix_cmd): Constify.
1112
95e95a6d
PA
11132017-11-07 Pedro Alves <palves@redhat.com>
1114
1115 * breakpoint.c (extract_bp_kind): New enum.
1116 (extract_bp_num, extract_bp_or_bp_range): New functions, partially
1117 factored out from ...
1118 (extract_bp_number_and_location): ... here.
1119 * cli/cli-utils.c (get_number_trailer): Handle '-$variable'.
1120
cc638e86
PA
11212017-11-07 Pedro Alves <palves@redhat.com>
1122
1123 * breakpoint.c (extract_bp_number_and_location): Change return
1124 type to void. Throw error instead of warning.
1125 (enable_disable_command): Adjust.
1126
d0fe4701
XR
11272017-11-07 Xavier Roirand <roirand@adacore.com>
1128 Pedro Alves <palves@redhat.com>
1129
1130 * breakpoint.c (map_breakpoint_number_range): New, factored out
1131 from ...
1132 (map_breakpoint_numbers): ... here.
1133 (find_location_by_number): Change parameters from string to
1134 breakpoint number and location.
1135 (extract_bp_number_and_location): New function.
1136 (enable_disable_bp_num_loc)
1137 (enable_disable_breakpoint_location_range)
1138 (enable_disable_command): New functions, factored out ...
1139 (enable_command, disable_command): ... these functions, and
1140 adjusted to support ranges.
1141 * NEWS: Document enable/disable breakpoint location range feature.
1142
635dc5b2
LM
11432017-11-06 Luis Machado <luis.machado@linaro.org>
1144
1145 * MAINTAINERS (Write After Approval): Update my e-mail address.
1146
556e5da5
PA
11472017-11-06 Pedro Alves <palves@redhat.com>
1148
1149 * gnu-nat.c (gnu_terminal_init): Delete.
1150 (gnu_target): Don't install gnu_terminal_init.
1151 * inflow.c (child_terminal_init_with_pgrp): Delete, merged with ...
1152 (child_terminal_init): ... this function.
1153
d1928160
PA
11542017-11-06 Pedro Alves <palves@redhat.com>
1155
1156 * common/common.m4 (GDB_AC_COMMON): No longer check termio.h nor
1157 sgtty.h.
1158 * config.in, configure: Regenerate.
1159
6aa899ce
PA
11602017-11-06 Pedro Alves <palves@redhat.com>
1161
1162 * event-top.c: Check SIGTSTP instead of STOP_SIGNAL thoughout.
1163 (async_init_signals): Adjust.
1164 (handle_stop_sig): Rename to ...
1165 (handle_sigtstp): ... this.
1166 (async_stop_sig): Rename to ...
1167 (async_sigtstp_handler): ... this, and delete STOP_SIGNAL !=
1168 SIGTSTP path.
1169 * event-top.h: Move signal.h include to the top. Check SIGTSTP
1170 instead of STOP_SIGNAL thoughout.
1171 (handle_stop_sig): Rename to ...
1172 (handle_sigtstp): ... this.
1173 * top.c (command_line_input): Replace STOP_SIGNAL -> SIGTSTP.
1174
a94799ac
PA
11752017-11-06 Pedro Alves <palves@redhat.com>
1176
1177 * inflow.c (child_terminal_inferior, child_terminal_ours_1): No
1178 longer set flags twice in row.
1179
726e1356
PA
11802017-11-06 Pedro Alves <palves@redhat.com>
1181
1182 * Makefile.in (SER_HARDWIRE): Update comment.
1183 (HFILES_NO_SRCDIR): Remove gdb_termios.h.
1184 * common/gdb_termios.h: Delete file.
1185 * common/job-control.c: Include termios.h and unistd.h instead of
1186 gdb_termios.h.
1187 (gdb_setpgid): Remove HAVE_TERMIOS || TIOCGPGRP preprocessor
1188 check.
1189 (have_job_control): Check HAVE_TERMIOS_H instead of HAVE_TERMIOS.
1190 Remove sgtty code.
1191 * configure.ac: No longer check for termio.h and sgtty.h.
1192 * configure: Regenerate.
1193 * inflow.c: Include termios.h instead of gdb_termios.h. Replace
1194 PROCESS_GROUP_TYPE checks with HAVE_TERMIOS_H checks throughout.
1195 Replace PROCESS_GROUP_TYPE references with pid_t references
1196 throughout.
1197 (gdb_getpgrp): Delete.
1198 (set_initial_gdb_ttystate): Use tcgetpgrp instead of gdb_getpgrp.
1199 (child_terminal_inferior): Remove comment. Remove sgtty code.
1200 (child_terminal_ours_1): Use tcgetpgrp directly instead of
1201 gdb_getpgrp. Use serial_set_tty_state instead aof
1202 serial_noflush_set_tty_state. Remove sgtty code.
1203 * inflow.h: Include unistd.h instead of gdb_termios.h. Replace
1204 PROCESS_GROUP_TYPE check with HAVE_TERMIOS_H check.
1205 (inferior_process_group): Now returns pid_t.
1206 * ser-base.c (ser_base_noflush_set_tty_state): Delete.
1207 * ser-base.h (ser_base_noflush_set_tty_state): Delete.
1208 * ser-event.c (serial_event_ops): Update.
1209 * ser-go32.c (dos_noflush_set_tty_state): Delete.
1210 (dos_ops): Update.
1211 * ser-mingw.c (hardwire_ops, tty_ops, pipe_ops, tcp_ops): Update.
1212 * ser-pipe.c (pipe_ops): Update.
1213 * ser-tcp.c (tcp_ops): Update.
1214 * ser-unix.c: Include termios.h instead of gdb_termios.h. Remove
1215 HAVE_TERMIOS checks.
1216 [HAVE_TERMIO] (struct hardwire_ttystate): Delete.
1217 [HAVE_SGTTY] (struct hardwire_ttystate): Delete.
1218 (get_tty_state, set_tty_state): Drop termio and sgtty code, and
1219 assume termios.
1220 (hardwire_noflush_set_tty_state): Delete.
1221 (hardwire_print_tty_state, hardwire_drain_output)
1222 (hardwire_flush_output, hardwire_flush_input)
1223 (hardwire_send_break, hardwire_raw, hardwire_setbaudrate)
1224 (hardwire_setstopbits, hardwire_setparity): Drop termio and sgtty
1225 code, and assume termios.
1226 (hardwire_ops): Update.
1227 (_initialize_ser_hardwire): Remove HAVE_TERMIOS check.
1228 * serial.c (serial_noflush_set_tty_state): Delete.
1229 * serial.h (serial_noflush_set_tty_state): Delete.
1230 (serial_ops::noflush_set_tty_state): Delete.
1231
1cfb73db
UW
12322017-11-06 Ulrich Weigand <uweigand@de.ibm.com>
1233
1234 * Makefile.in (SFILES): Remove doublest.c and dfp.c.
1235 (HFILES_NO_SRCDIR): Remove doublest.h and dfp.h.
1236 (COMMON_OBS): Remove doublest.o and dfp.o.
1237 Do not build target-float.c (instead of doublest.c)
1238 with -Wformat-nonliteral.
1239
1240 * doublest.c: Remove file.
1241 * doublest.h: Remove file.
1242 * dfp.c: Remove file.
1243 * dfp.h: Remove file.
1244
1245 * target-float.c: Do not include "doublest.h" and "dfp.h".
1246 (DOUBLEST): Move here from doublest.h.
1247 (enum float_kind): Likewise.
1248 (FLOATFORMAT_CHAR_BIT): Likewise.
1249 (FLOATFORMAT_LARGEST_BYTES): Likewise.
1250 (floatformat_totalsize_bytes): Move here from doublest.c. Make static.
1251 (floatformat_precision): Likewise.
1252 (floatformat_normalize_byteorder, get_field, put_field): Likewise.
1253 (floatformat_is_negative, floatformat_classify, floatformat_mantissa):
1254 Likewise.
1255 (host_float_format, host_double_format, host_long_double_format):
1256 Likewise.
1257 (floatformat_to_string, floatformat_from_string): Likewise.
1258 (floatformat_to_doublest): Likewise. Also, inline the original
1259 convert_floatformat_to_doublest.
1260 (floatformat_from_doublest): Likewise. Also, inline the original
1261 convert_floatformat_from_doublest.
1262
1263 Include "dpd/decimal128.h", "dpd/decimal64.h", and "dpd/decimal32.h".
1264 (MAX_DECIMAL_STRING): Move here from dfp.c.
1265 (match_endianness): Likewise.
1266 (set_decnumber_context, decimal_check_errors): Likewise.
1267 (decimal_from_number, decimal_to_number): Likewise.
1268 (decimal_to_string, decimal_from_string): Likewise. Make static.
1269 (decimal_from_longest, decimal_from_ulongest): Likewise.
1270 (decimal_to_longest): Likewise.
1271 (decimal_binop, decimal_is_zero, decimal_compare): Likewise.
1272 (decimal_convert): Likewise.
1273
b07e9c46
UW
12742017-11-06 Ulrich Weigand <uweigand@de.ibm.com>
1275
1276 * doublest.c: Do not include "gdbtypes.h".
1277 (extract_typed_floating): Remove.
1278 (store_typed_floating): Remove.
1279 (convert_typed_floating): Remove.
1280 * doublest.h (struct type): Remove.
1281 (DOUBLEST_PRINT_FORMAT): Remove.
1282 (DOUBLEST_SCAN_FORMAT): Remove.
1283 (extract_typed_floating): Remove.
1284 (store_typed_floating): Remove.
1285 (convert_typed_floating): Remove.
1286
1287 * dfp.c (decimal_from_doublest): Remove.
1288 (decimal_to_doublest): Remove.
1289 * dfp.h: Do not include "doublest.h".
1290 (decimal_from_doublest): Remove.
1291 (decimal_to_doublest): Remove.
1292
1293 * value.c: Do not include "doublest.h" and "dfp.h".
1294 (value_as_double): Remove.
1295 (unpack_double): Remove.
1296 (value_from_double): Remove.
1297 (value_from_decfloat): Remove.
1298 * value.h: Do not include "doublest.h".
1299 (value_as_double): Remove.
1300 (unpack_double): Remove.
1301 (value_from_double): Remove.
1302 (value_from_decfloat): Remove.
1303
3b2ca824
UW
13042017-11-06 Ulrich Weigand <uweigand@de.ibm.com>
1305
1306 * i386-tdep.c: Include "target-float.h". Do not include "doublest.h".
1307 (i386_extract_return_value): Use target_float_convert.
1308 (i386_store_return_value): Likewise.
1309 * i387-tdep.c (i387_register_to_value): Use target_float_convert.
1310 (i387_value_to_register): Likewise.
1311 * ia64-tdep.c: Include "target-float.h". Do not include "doublest.h".
1312 (ia64_register_to_value): Use target_float_convert.
1313 (ia64_value_to_register): Likewise.
1314 (ia64_extract_return_value): Likewise.
1315 (ia64_store_return_value): Likewise.
1316 (ia64_push_dummy_call): Likewise.
1317 * m68k-tdep.c: Include "target-float.h".
1318 (m68k_register_to_value): Use target_float_convert.
1319 (m68k_value_to_register): Likewise.
1320 (m68k_svr4_extract_return_value): Likewise.
1321 (m68k_svr4_store_return_value): Likewise.
1322 * ppc-sysv-tdep.c: Include "target-float.h".
1323 (ppc_sysv_abi_push_dummy_call): Use target_float_convert.
1324 (do_ppc_sysv_return_value): Likewise.
1325 (ppc64_sysv_abi_push_freg): Likewise.
1326 (ppc64_sysv_abi_return_value_base): Likewise.
1327 * rs6000-aix-tdep.c: Include "target-float.h".
1328 (rs6000_push_dummy_call): Use target_float_convert.
1329 (rs6000_return_value): Likewise.
1330 * rs6000-lynx178-tdep.c: Include "target-float.h".
1331 (rs6000_lynx178_push_dummy_call): Use target_float_convert.
1332 (rs6000_lynx178_return_value): Likewise.
1333 * rs6000-tdep.c: Include "target-float.h". Do not include "doublest.h".
1334 (rs6000_register_to_value): Use target_float_convert.
1335 (rs6000_value_to_register): Likewise.
1336 * arm-tdep.c: Include "target-float.h". Do not include "doublest.h".
1337 (arm_extract_return_value): Use target_float_convert.
1338 (arm_store_return_value): Likewise.
1339 * sh-tdep.c: Include "target-float.h". Do not include "doublest.h".
1340 (sh_register_convert_to_virtual): Use target_float_convert.
1341 (sh_register_convert_to_raw): Likewise.
1342 * sh64-tdep.c: Include "target-float.h".
1343 (sh64_extract_return_value): Use target_float_convert.
1344 (sh64_register_convert_to_virtual): Likewise.
1345 (sh64_register_convert_to_raw): Likewise. Fix argument types.
1346
14ad9311
UW
13472017-11-06 Ulrich Weigand <uweigand@de.ibm.com>
1348
1349 * target-float.c (floatformat_to_host_double): New function.
1350 (floatformat_from_host_double): Likewise.
1351 (target_float_to_host_double): Likewise.
1352 (target_float_from_host_double): Likewise.
1353 * target-float.h (target_float_to_host_double): Add prototype.
1354 (target_float_from_host_double): Likewise.
1355
1356 * guile/scm-value.c: Include "target-float.h".
1357 (gdbscm_value_to_real): Use target_float_to_host_double.
1358 Handle integer source values via value_as_long.
1359 * guile/scm-math.c: Include "target-float.h". Do not include
1360 "doublest.h", "dfp.h", and "expression.h".
1361 (vlscm_convert_typed_number): Use target_float_from_host_double.
1362 (vlscm_convert_number): Likewise.
1363
1364 * python/py-value.c (valpy_float): Use target_float_to_host_double.
1365 (convert_value_from_python): Use target_float_from_host_double.
1366
50eff16b
UW
13672017-11-06 Ulrich Weigand <uweigand@de.ibm.com>
1368
1369 * ada-lang.c (cast_to_fixed): Reimplement in target arithmetic.
1370 (cast_from_fixed): Likewise.
1371 (ada_scaling_type): New function.
1372 (ada_delta): Return value instead of DOUBLEST. Perform target
1373 arithmetic instead of host arithmetic.
1374 (scaling_factor): Rename to ...
1375 (ada_scaling_factor) ... this. Make non-static. Return value instead
1376 of DOUBLEST. Perform target arithmetic instead of host arithmetic.
1377 (ada_fixed_to_float): Remove.
1378 (ada_float_to_fixed): Remove.
1379 * ada-lang.h (ada_fixed_to_float): Remove.
1380 (ada_float_to_fixed): Remove.
1381 (ada_delta): Return value instead of DOUBLEST.
1382 (ada_scaling_factor): Add prototype.
1383
1384 * ada-typeprint.c: Include "target-float.h".
1385 (print_fixed_point_type): Perform target arithmetic instead of
1386 host arithmetic.
1387 * ada-valprint.c: Include "target-float.h".
1388 (ada_val_print_num): Perform target arithmetic instead of
1389 host arithmetic for fixed-point types.
1390
66c02b9e
UW
13912017-11-06 Ulrich Weigand <uweigand@de.ibm.com>
1392
1393 * target-float.c: Include <math.h>.
1394 (floatformat_binop): New function.
1395 (floatformat_compare): Likewise.
1396 (target_float_binop): Likewise.
1397 (target_float_compare): Likewise.
1398 * target-float.h: Include "expression.h".
1399 (target_float_binop): Add prototype.
1400 (target_float_compare): Likewise.
1401
1402 * valarith.c: Do not include "doublest.h" and "dfp.h".
1403 Include "common/byte-vector.h".
1404 (value_args_as_decimal): Remove, replace by ...
1405 (value_args_as_target_float): ... this function. Handle both
1406 binary and decimal target floating-point formats.
1407 (scalar_binop): Handle both binary and decimal FP using
1408 value_args_as_target_float and target_float_binop.
1409 (value_equal): Handle both binary and decimal FP using
1410 value_args_as_target_float and target_float_compare.
1411 (value_less): Likewise.
1412 (value_pos): Handle all scalar types as simple copy.
1413 (value_neg): Handle all scalar types via BINOP_SUB from 0.
1414 * dfp.c (decimal_binop): Throw error instead of internal_error
1415 when called with an unsupported operation code.
1416
f69fdf9b
UW
14172017-11-06 Ulrich Weigand <uweigand@de.ibm.com>
1418
1419 * target-float.c (target_float_to_string): New function.
1420 (target_float_from_string): New function.
1421 * target-float.h (target_float_to_string): Add prototype.
1422 (target_float_from_string): Add prototype.
1423
1424 * valprint.c: Include "target-float.h". Do not include
1425 "doublest.h" and "dfp.h".
1426 (print_floating): Use target_float_to_string.
1427 * printcmd.c: Include "target-float.h". Do not include "dfp.h".
1428 (printf_floating): Use target_float_to_string.
1429 * i387-tdep.c: Include "target-float.h". Do not include "doublest.h".
1430 (print_i387_value): Use target_float_to_string.
1431 * mips-tdep.c: Include "target-float.h".
1432 (mips_print_fp_register): Use target_float_to_string.
1433 * sh64-tdep.c: Include "target-float.h".
1434 (sh64_do_fp_register): Use target_float_to_string.
1435
1436 * parse.c: Include "target-float.h". Do not include
1437 "doublest.h" and "dfp.h".
1438 (parse_float): Use target_float_from_string.
1439 * stabsread.c: Include "target-float.h". Do not include "doublest.h".
1440 (define_symbol): Use target_float_from_string.
1441 * gdbarch-selftests.c: Include "target-float.h".
1442 (register_to_value_test): Use target_float_from_string.
1443
70100014
UW
14442017-11-06 Ulrich Weigand <uweigand@de.ibm.com>
1445
1446 * Makefile.c (SFILES): Add target-float.c.
1447 (HFILES_NO_SRCDIR): Add target-float.h.
1448 (COMMON_OBS): Add target-float.o.
1449 * target-float.h: New file.
1450 * target-float.c: New file.
1451
1452 * doublest.c (floatformat_classify): Fix detection of float_zero.
1453
1454 * gdbtypes.c (is_floating_type): New function.
1455 * gdbtypes.h (is_floating_type): Add prototype.
1456
1457 * value.c: Do not include "floatformat.h".
1458 (unpack_double): Use target_float_is_valid.
1459 (is_floating_value): New function.
1460 * value.h (is_floating_value): Add prototype-
1461
1462 * valarith.c: Include "target-float.h".
1463 (value_logical_not): Use target_float_is_zero.
1464
1465 * python/py-value.c: Include "target-float.h".
1466 (valpy_nonzero): Use target_float_is_zero.
1467
ab4b1c46
TT
14682017-11-04 Tom Tromey <tom@tromey.com>
1469
1470 * h8300-tdep.c (h8300_push_dummy_call): Use std::vector.
1471
454dafbd
TT
14722017-11-04 Tom Tromey <tom@tromey.com>
1473
1474 * breakpoint.c (set_momentary_breakpoint): Return
1475 breakpoint_up.
1476 (until_break_command): Update.
1477 (new_until_break_fsm): Change argument types to
1478 breakpoint_up.
1479 (set_momentary_breakpoint_at_pc): Return breakpoint_up.
1480 (do_delete_breakpoint_cleanup, make_cleanup_delete_breakpoint):
1481 Remove.
1482 * infcmd.c (finish_forward): Update.
1483 * breakpoint.h (set_momentary_breakpoint)
1484 (set_momentary_breakpoint_at_pc): Return breakpoint_up.
1485 (make_cleanup_delete_breakpoint): Remove.
1486 (struct breakpoint_deleter): New.
1487 (breakpoint_up): New typedef.
1488 * infrun.c (insert_step_resume_breakpoint_at_sal_1): Update.
1489 (insert_exception_resume_breakpoint): Update.
1490 (insert_exception_resume_from_probe): Update.
1491 (insert_longjmp_resume_breakpoint): Update.
1492 * arm-linux-tdep.c (arm_linux_copy_svc): Update.
1493 * elfread.c (elf_gnu_ifunc_resolver_stop): Update.
1494 * infcall.c (call_function_by_hand_dummy): Update
1495
331b71e5
TT
14962017-11-04 Tom Tromey <tom@tromey.com>
1497
1498 * c-typeprint.c (c_type_print_base): Use gdb::unique_xmalloc_ptr.
1499
9f584b37
TT
15002017-11-04 Tom Tromey <tom@tromey.com>
1501
1502 * linux-tdep.c (linux_core_info_proc_mappings): Use
1503 gdb::def_vector.
1504 (linux_get_siginfo_data): Return gdb::byte_vector. Remove
1505 "size" argument.
1506 (linux_corefile_thread): Update.
1507 (linux_make_corefile_notes): Remove unused variable.
1508
779bc38e
TT
15092017-11-04 Tom Tromey <tom@tromey.com>
1510
1511 * ppc-linux-tdep.c (ppc_linux_get_syscall_number): Use
1512 gdb::byte_vector.
1513
ed2b3126
TT
15142017-11-04 Tom Tromey <tom@tromey.com>
1515
1516 * objfiles.c (do_free_objfile_cleanup): Remove.
1517 * compile/compile-object-load.c (compile_object_load): Update.
1518 * objfiles.h (make_cleanup_free_objfile): Remove.
1519
7f6743fd
TT
15202017-11-04 Tom Tromey <tom@tromey.com>
1521
1522 * sparc64-tdep.c (do_examine): Use gdb::def_vector.
1523 (adi_read_versions): Change "tags" to "gdb_byte *".
1524 (adi_print_versions): Likewise.
1525
c80049d3
TT
15262017-11-04 Tom Tromey <tom@tromey.com>
1527
1528 * breakpoint.c
1529 (scoped_rbreak_breakpoints::scoped_rbreak_breakpoints): Rename
1530 from start_rbreak_breakpoints.
1531 (scoped_rbreak_breakpoints): Rename from end_rbreak_breakpoints.
1532 * breakpoint.h (class scoped_rbreak_breakpoints): New.
1533 (start_rbreak_breakpoints, end_rbreak_breakpoints): Remove.
1534 * symtab.c (do_end_rbreak_breakpoints): Remove.
1535 (rbreak_command): Use scoped_rbreak_breakpoints, std::string.
1536
167b0be1
TT
15372017-11-04 Tom Tromey <tom@tromey.com>
1538
1539 * cp-namespace.c (reset_directive_searched): Remove.
1540 (cp_lookup_symbol_via_imports): Use scoped_restore.
1541 * cp-support.c (reset_directive_searched): Remove.
1542 (make_symbol_overload_list_using): Use scoped_restore.
1543 * d-namespace.c (d_lookup_symbol_imports): Use scoped_restore.
1544 (reset_directive_searched): Remove.
1545
5eae7aea
TT
15462017-11-04 Tom Tromey <tom@tromey.com>
1547
1548 * symfile.c (find_separate_debug_file_by_debuglink): Use
1549 unique_xmalloc_ptr.
1550
c6bcad5f
TT
15512017-11-04 Tom Tromey <tom@tromey.com>
1552
1553 * compile/compile-loc2c.c (compute_stack_depth_worker): Change
1554 type of "info".
1555 (compute_stack_depth): Likewise.
1556 (do_compile_dwarf_expr_to_c): Use std::vector.
1557
20dcd8ca
TT
15582017-11-04 Tom Tromey <tom@tromey.com>
1559
1560 * compile/compile-object-load.c (link_callbacks_einfo): Use
1561 std::string.
1562
33c7c59d
TT
15632017-11-04 Tom Tromey <tom@tromey.com>
1564
1565 * dwarf2read.c (process_full_comp_unit, process_full_type_unit):
1566 Use scoped_free_pendings.
1567 * dbxread.c (dbx_symfile_read, dbx_psymtab_to_symtab_1): Use
1568 scoped_free_pendings.
1569 * xcoffread.c (xcoff_psymtab_to_symtab_1): Use scoped_free_pendings.
1570 (xcoff_initial_scan): Likewise.
1571 * buildsym.c (reset_symtab_globals): Update comment.
1572 (scoped_free_pendings): Rename from really_free_pendings.
1573 (prepare_for_building): Update comment.
1574 (buildsym_init): Likewise.
1575 * buildsym.h (class scoped_free_pendings): New class.
1576 (really_free_pendings): Don't declare.
1577
67fa57cf
UW
15782017-11-03 Ulrich Weigand <uweigand@de.ibm.com>
1579
1580 * doublest.c (convert_doublest_to_floatformat): Fix uninitialized
1581 output when converting a zero value to a special byteorder format.
1582
f26ae15b
YQ
15832017-11-02 Yao Qi <yao.qi@linaro.org>
1584
1585 * frame.c (do_frame_register_read): Remove aspace.
1586 * jit.c (jit_frame_sniffer): Likwise.
1587 * ppc-linux-tdep.c (ppu2spu_sniffer): Likewise.
1588 * regcache.c (regcache::regcache): Pass nullptr.
1589 (regcache_print): Caller updated.
1590 * regcache.h (regcache::regcache): Remove one constructor
1591 parameter aspace.
1592
6c6e9412
YQ
15932017-11-02 Yao Qi <yao.qi@linaro.org>
1594
1595 * regcache.h (regcache) <m_readonly_p>: Change it to const bool.
1596
8b86c959
YQ
15972017-11-02 Yao Qi <yao.qi@linaro.org>
1598
1599 * breakpoint.c (insert_single_step_breakpoints): Update.
1600 * frame.c (struct frame_info) <aspace>: Add const.
1601 (frame_save_as_regcache): Add const.
1602 (get_frame_address_space): Return const address_space *.
1603 * frame.h (get_frame_address_space): Update declaration.
1604 * infrun.c (struct step_over_info) <aspace>: Add const.
1605 (set_step_over_info): Make aspace const.
1606 (displaced_step_prepare_throw): Change variable const.
1607 (resume): Likewise.
1608 (proceed): Likewise.
1609 (adjust_pc_after_break): Likewise.
1610 (save_waitstatus): Likewise.
1611 (handle_signal_stop): Likewise.
1612 (keep_going_pass_signal): Likewise.
1613 * jit.c (jit_frame_sniffer): Add const.
1614 * mips-tdep.c (mips_single_step_through_delay): Likewise.
1615 * ppc-linux-tdep.c (ppu2spu_sniffer): Likewise.
1616 * record-full.c (record_full_wait_1): Likewise.
1617 * regcache.c (regcache::regcache): Change parameter to const.
1618 * regcache.h (regcache::regcache): Likewise.
1619 (regcache::aspace): Return const address_space *.
1620 (regcache) <m_aspace>: Add const.
1621
a01bda52
YQ
16222017-11-02 Yao Qi <yao.qi@linaro.org>
1623
1624 * darwin-nat.c (cancel_breakpoint): Use regcache->aspace ().
1625 * frame.c (create_sentinel_frame): Likewise.
1626 * infrun.c (displaced_step_prepare_throw): Likewise.
1627 (resume): Likewise.
1628 (thread_still_needs_step_over_bp): Likewise.
1629 (proceed): Likewise.
1630 (do_target_wait): Likewise.
1631 (adjust_pc_after_break): Likewise.
1632 (handle_syscall_event): Likewise.
1633 (save_waitstatus): Likewise.
1634 (handle_inferior_event_1): Likewise.
1635 (handle_signal_stop): Likewise.
1636 (keep_going_pass_signal): Likewise.
1637 * linux-nat.c (status_callback): Likewise.
1638 (save_stop_reason): Likewise.
1639 (resume_stopped_resumed_lwps): Likewise.
1640 * record-full.c (record_full_exec_insn): Likewise.
1641 (record_full_wait_1): Likewise.
1642 * regcache.c (get_regcache_aspace): Remove.
1643 * regcache.h (get_regcache_aspace): Remove.
1644
d999647b
YQ
16452017-11-02 Yao Qi <yao.qi@linaro.org>
1646
1647 * regcache.c (struct regcache_descr) <nr_raw_registers>: Remove.
1648 (init_regcache_descr): Use gdbarch_num_regs.
1649 (regcache::regcache): Likewise.
1650 (regcache::get_register_status): Likewise.
1651 (regcache::assert_raw_regnum): Likewise.
1652 (regcache::cooked_read): Likewise.
1653 (regcache::cooked_read_value): Likewise.
1654 (regcache::cooked_write): Likewise.
1655 (regcache::dump): Likewise.
1656 (regcache::num_raw_registers): New method.
1657 * regcache.h (class regcache) <num_raw_registers>: New.
1658
4e888c28
YQ
16592017-11-02 Yao Qi <yao.qi@linaro.org>
1660
1661 * regcache.c (regcache::assert_regnum): New method.
1662 (regcache::invalidate): Call assert_regnum.
1663 (regcache::raw_update): Likewise.
1664 (regcache::raw_write): Likewise.
1665 (regcache::raw_read_part): Likewise.
1666 (regcache::raw_write_part): Likewise.
1667 (regcache::raw_supply): Likewise.
1668 (regcache::raw_supply_integer): Likewise.
1669 (regcache::raw_supply_zeroed): Likewise.
1670 (regcache::raw_collect): Likewise.
1671 (regcache::raw_collect_integer): Likewise.
1672 * regcache.h (regcache::assert_regnum): Declare.
1673
2e1b49b3
YQ
16742017-11-02 Yao Qi <yao.qi@linaro.org>
1675
1676 * regcache.c (regcache::dump): Remove code.
1677
6c5218df
YQ
16782017-11-02 Yao Qi <yao.qi@linaro.org>
1679
1680 * regcache.c (struct regcache_descr) <sizeof_raw_register_status>:
1681 Remove.
1682 <sizeof_cooked_register_status>: Remove.
1683 (init_regcache_descr): Update.
1684 (regcache::regcache): Use nr_cooked_registers and nr_raw_registers.
1685 (regcache::save): Likewise.
1686 (regcache::dump): Likewise.
1687
dcc31d28
JB
16882017-11-01 James Bowman <james.bowman@ftdichip.com>
1689
1690 * ft32-tdep.c (ft32_fetch_instruction): New function.
1691 (ft32_analyze_prologue): Use ft32_fetch_instruction().
1692
3a87ae65
SM
16932017-10-31 Simon Marchi <simon.marchi@polymtl.ca>
1694
1695 * cli/cli-script.c (execute_control_command): Rename to ...
1696 (execute_control_command_1): ... this.
1697 (execute_control_command): New function.
1698
09b847f3
SM
16992017-10-31 Simon Marchi <simon.marchi@ericsson.com>
1700
1701 * tracepoint.c (tfind_command): Remove const_cast.
1702
f871c485
MG
17032017-10-30 Mike Gulick <mgulick@mathworks.com>
1704
1705 * Makefile.in (HFILES_NO_SRCDIR): Remove reference to gdb.h.
1706
b020ff80
SM
17072017-10-30 Simon Marchi <simon.marchi@ericsson.com>
1708
1709 * common/common-utils.h (in_inclusive_range): New function.
1710 * arm-tdep.c (arm_record_extension_space): Use
1711 in_inclusive_range.
1712 (thumb_record_ld_st_reg_offset): Use in_inclusive_range.
1713 * cris-tdep.c (cris_spec_reg_applicable): Use
1714 in_inclusive_range.
1715
1b81856f
PA
17162017-10-30 Pedro Alves <palves@redhat.com>
1717 Simon Marchi <simon.marchi@ericsson.com>
1718
1719 * remote.c (remote_set_syscall_catchpoint): Build a std::string
1720 instead of a gdb::unique_xmalloc_ptr, using string_appendf.
1721
31b833b3
PA
17222017-10-30 Pedro Alves <palves@redhat.com>
1723
1724 * common/common-utils.c (string_appendf, string_vappendf): New
1725 functions.
1726 * common/common-utils.h (string_appendf, string_vappendf): New
1727 declarations.
1728 * unittests/common-utils-selftests.c (string_appendf_func)
1729 (test_appendf_func, string_vappendf_wrapper, string_appendf_tests)
1730 (string_vappendf_tests): New functions.
1731 (_initialize_common_utils_selftests): Register "string_appendf" and
1732 "string_vappendf tests".
1733
4a250334
PA
17342017-10-30 Pedro Alves <palves@redhat.com>
1735
1736 * unittests/common-utils-selftests.c (format_func): New typedef.
1737 (string_printf_tests, string_vprintf_tests): Tests factored out
1738 and merged to ...
1739 (test_format_func): ... this new function.
1740 (string_printf_tests, string_vprintf_tests): Reimplement on top of
1741 test_format_func.
1742
16c5c17e
SM
17432017-10-29 Simon Marchi <simon.marchi@ericsson.com>
1744
1745 * darwin-nat.c: Remove include of gdb.h.
1746
7ca51576
SM
17472017-10-29 Simon Marchi <simon.marchi@ericsson.com>
1748
1749 * xtensa-xtregs.c: Fix formatting issues.
1750
c1342859
SM
17512017-10-29 Simon Marchi <simon.marchi@ericsson.com>
1752
1753 * xtensa-xtregs.c (xtensa_regtable_t) <name>: Constify.
1754
484d8d36
MD
17552017-10-28 Maksim Dzabraev <dzabraew@gmail.com>
1756
1757 PR python/21213
1758 * python/py-infthread.c (thpy_get_inferior): Increment reference
1759 of inferior before returning it.
1760
b5540b5f
SM
17612017-10-27 Simon Marchi <simon.marchi@ericsson.com>
1762
1763 * unittests/common-utils-selftests.c (format): Add
1764 ATTRIBUTE_PRINTF.
1765
5a9dcda1
SM
17662017-10-27 Simon Marchi <simon.marchi@polymtl.ca>
1767
1768 * xml-syscall.c (struct syscall_desc): Add constructor.
1769 <name>: Change type to std::string.
1770 (syscall_desc_up): New typedef.
1771 (syscall_desc_p): Remove typeder.
1772 (DEF_VEC_P(syscall_desc_p)): Remove.
1773 (struct syscall_group_desc): Add constructor.
1774 <name>: Change type to std::string.
1775 <syscalls>: Change type to std::vector.
1776 (syscall_group_desc_up): New typedef.
1777 (syscall_group_desc_p): Remove typedef.
1778 (DEF_VEC_P(syscall_group_desc_p)): Remove.
1779 (struct syscalls_info) <syscalls>: Change type to std::vector of
1780 unique_ptr.
1781 <groups>: Likewise.
1782 <my_gdb_datadir>: Change type to std::string.
1783 (syscalls_info_up): New typedef.
1784 (allocate_syscalls_info): Remove.
1785 (syscalls_info_free_syscalls_desc): Remove.
1786 (syscalls_info_free_syscall_group_desc): Remove.
1787 (free_syscalls_info): Remove.
1788 (make_cleanup_free_syscalls_info): Remove.
1789 (syscall_group_create_syscall_group_desc): Adjust.
1790 (syscall_group_add_syscall): Adjust.
1791 (syscall_create_syscall_desc): Adjust.
1792 (syscall_parse_xml): Adjust, use unique_ptr instead of cleanup.
1793 (init_syscalls_info): Adjust.
1794 (syscall_group_get_group_by_name): Adjust.
1795 (xml_get_syscall_number): Adjust.
1796 (xml_get_syscall_name): Adjust.
1797 (xml_list_of_syscalls): Adjust.
1798 (xml_list_syscalls_by_group): Adjust.
1799 (xml_list_of_groups): Adjust.
1800
45461e0d
SM
18012017-10-27 Simon Marchi <simon.marchi@ericsson.com>
1802
1803 * probe.h: Don't include gdb_vecs.h.
1804 (DEF_VEC_P (probe_p)): Remove.
1805 (find_probes_in_objfile): Return an std::vector.
1806 * probe.c (find_probes_in_objfile): Likewise.
1807 * breakpoint.c (breakpoint_objfile_data)
1808 <longjmp_probes>: Change type to std::vector.
1809 <exception_probes>: Likewise.
1810 (free_breakpoint_probes): Don't manually free vectors.
1811 (create_longjmp_master_breakpoint): Adjust.
1812 (create_exception_master_breakpoint): Adjust.
1813 * solib-svr4.c (svr4_create_probe_breakpoints): Change
1814 parameter type, adjust.
1815 (svr4_create_solib_event_breakpoints): Adjust.
1816
43dce439
SM
18172017-10-27 Simon Marchi <simon.marchi@ericsson.com>
1818
1819 * breakpoint.c (breakpoint_objfile_data): Initialize fields.
1820 (get_breakpoint_objfile_data): Allocate breakpoint_objfile_data
1821 with new.
1822 (free_breakpoint_probes): Rename to ...
1823 (free_breakpoint_objfile_data): ... this, and call delete on
1824 bp_objfile_data..
1825
6a1b9516
SM
18262017-10-27 Simon Marchi <simon.marchi@polymtl.ca>
1827
1828 * auto-load.c: Don't include gdb_vecs.h, include algorithm.
1829 (loaded_script_ptr): Remove typedef.
1830 (DEF_VEC_P (loaded_script_ptr)): Remove.
1831 (struct collect_matching_scripts_data): Add constructor.
1832 <scripts_p>: Change type to (pointer to) std::vector.
1833 (collect_matching_scripts_data): Adjust.
1834 (sort_scripts_by_name): Make suitable for std::sort.
1835 (print_scripts): Don't sort vector, adjust to std::vector.
1836 (auto_load_info_scripts): Sort vectors, adjust to std::vector.
1837
593e3209
SM
18382017-10-27 Simon Marchi <simon.marchi@ericsson.com>
1839
1840 * symfile.c (filename_language): Make struct, not typedef. Add
1841 constructor.
1842 <ext>: Change type to std::string.
1843 (DEF_VEC_O (filename_language)): Remove.
1844 (filename_language_table): Change type to std::vector.
1845 (add_filename_language): Adjust.
1846 (set_ext_lang_command): Adjust.
1847 (info_ext_lang_command): Adjust.
1848 (deduce_language_from_filename): Adjust.
1849 (class scoped_restore_filename_language_table): Remove.
1850 (test_filename_language): Use scoped_restore.
1851 (test_set_ext_lang_command): Use scoped_restore, adjust to
1852 std::vector change.
1853
32fa66eb
SM
18542017-10-27 Simon Marchi <simon.marchi@ericsson.com>
1855
1856 * symfile.c: Include selftest.h.
1857 (class scoped_restore_filename_language_table): New.
1858 (test_filename_language): New test.
1859 (test_set_ext_lang_command): New test.
1860 (_initialize_symfile): Register tests.
1861
4a27f119
KS
18622017-10-27 Keith Seitz <keiths@redhat.com>
1863
1864 * breakpoint.c (print_breakpoint_location): Use the symbol saved
1865 in the bp_location, falling back to find_pc_sect_function when
1866 needed.
1867 (add_location_to_breakpoint): Save sal->symbol.
1868 * breakpoint.h (struct bp_location) <symbol>: New field.
1869 * symtab.c (find_function_start_sal): Save the symbol into the SaL.
1870 * symtab.h (struct symtab_and_line) <symbol>: New field.
1871
a43f3893
PF
18722017-10-26 Patrick Frants <osscontribute@gmail.com>
1873
7453e6b2 1874 PR gdb/13669
a43f3893
PF
1875 * cp-valprint.c (cp_print_value_fields): Use obstack_blank_fast
1876 to rewind obstack.
1877
23cc4e1b
PA
18782017-10-26 Pedro Alves <palves@redhat.com>
1879
1880 * remote.c (remote_async_terminal_ours_p): Delete.
1881 (remote_open_1, remote_terminal_inferior, remote_terminal_ours):
1882 Remove references to 'remote_async_terminal_ours_p'.
1883
6abc18bb
YQ
18842017-10-26 Yao Qi <yao.qi@linaro.org>
1885
1886 * breakpoint.h (regular_breakpoint_inserted_here_p): Remove.
1887
bd522513
YQ
18882017-10-26 Yao Qi <yao.qi@linaro.org>
1889
1890 * break-catch-sig.c (signal_catchpoint_breakpoint_hit): Make
1891 aspace const.
1892 * break-catch-syscall.c (breakpoint_hit_catch_syscall):
1893 Likewise.
1894 * breakpoint.c (bpstat_check_location): Remove cast.
1895 (breakpoint_hit_catch_fork): Make aspce const.
1896 (breakpoint_hit_catch_solib): Likewise.
1897 (breakpoint_hit_catch_exec): Likewise.
1898 (breakpoint_hit_ranged_breakpoint): Likewise.
1899 (breakpoint_hit_watchpoint): Likewise.
1900 (base_breakpoint_breakpoint_hit): Likewise.
1901 (bkpt_breakpoint_hit): Likewise.
1902 (dprintf_breakpoint_hit): Likewise.
1903 (tracepoint_breakpoint_hit): Likewise.
1904 * breakpoint.h (breakpoint_ops) <breakpoint_hit>: Likewise.
1905
accd0bcd
YQ
19062017-10-26 Yao Qi <yao.qi@linaro.org>
1907
1908 * breakpoint.c (breakpoint_location_address_match): Change
1909 "struct address_space *" to "const address_space".
1910 (breakpoint_location_address_range_overlap): Likewise.
1911 (breakpoint_here_p): Likewise.
1912 (breakpoint_in_range_p): Likewise.
1913 (moribund_breakpoint_here_p): Likewise.
1914 (bp_location_inserted_here_p): Likewise.
1915 (software_breakpoint_inserted_here_p): Likewise.
1916 (hardware_breakpoint_inserted_here_p): Likewise.
1917 (hardware_watchpoint_inserted_in_range): Likewise.
1918 (bpstat_check_location): Likewise.
1919 (bpstat_stop_status): Likewise.
1920 (breakpoint_address_match): Likewise.
1921 (breakpoint_address_match_range): Likewise.
1922 (breakpoint_location_address_match): Likewise.
1923 (breakpoint_location_address_range_overlap): Likewise.
1924 (insert_single_step_breakpoint): Likewise.
1925 (breakpoint_has_location_inserted_here): Likewise.
1926 (single_step_breakpoint_inserted_here_p): Likewise.
1927 (pc_at_non_inline_function): Likewise.
1928 * breakpoint.h (bpstat_stop_status): Update declaration.
1929 (breakpoint_here_p): Likewise.
1930 (breakpoint_in_range_p): Likewise.
1931 (moribund_breakpoint_here_p): Likewise.
1932 (breakpoint_inserted_here_p): Likewise.
1933 (software_breakpoint_inserted_here_p): Likewise.
1934 (hardware_breakpoint_inserted_here_p): Likewise.
1935 (breakpoint_has_location_inserted_here): Likewise.
1936 (single_step_breakpoint_inserted_here_p): Likewise.
1937 (hardware_watchpoint_inserted_in_range): Likewise.
1938 (breakpoint_address_match): Likewise.
1939 (insert_single_step_breakpoint): Likewise.
1940 (pc_at_non_inline_function): Likewise.
1941 * gdbthread.h (thread_has_single_step_breakpoint_here): Likewise.
1942 * record.c (record_check_stopped_by_breakpoint): Likewise.
1943 * record.h (record_check_stopped_by_breakpoint): Likewise.
1944 * thread.c (thread_has_single_step_breakpoint_here): Likewise.
1945
ac7936df
YQ
19462017-10-25 Yao Qi <yao.qi@linaro.org>
1947
1948 * aarch32-linux-nat.c (aarch32_gp_regcache_supply): Use
1949 regcache->arch () instead get_regcache_arch.
1950 * aarch64-fbsd-nat.c (aarch64_fbsd_fetch_inferior_registers):
1951 Likewise.
1952 (aarch64_fbsd_store_inferior_registers): Likewise.
1953 * aarch64-linux-nat.c (fetch_gregs_from_thread): Likewise.
1954 (store_gregs_to_thread): Likewise.
1955 (fetch_fpregs_from_thread): Likewise.
1956 (store_fpregs_to_thread): Likewise.
1957 * aarch64-tdep.c (aarch64_extract_return_value): Likewise.
1958 (aarch64_store_return_value): Likewise.
1959 (aarch64_software_single_step): Likewise.
1960 * aix-thread.c (aix_thread_wait): Likewise.
1961 (supply_reg32): Likewise.
1962 (supply_sprs64): Likewise.
1963 (supply_sprs32): Likewise.
1964 (fill_gprs64): Likewise.
1965 (fill_gprs32): Likewise.
1966 (fill_sprs64): Likewise.
1967 (fill_sprs32): Likewise.
1968 (store_regs_user_thread): Likewise.
1969 (store_regs_kernel_thread): Likewise.
1970 * alpha-bsd-nat.c (alphabsd_fetch_inferior_registers): Likewise.
1971 (alphabsd_store_inferior_registers): Likewise.
1972 * alpha-tdep.c (alpha_extract_return_value): Likewise.
1973 (alpha_store_return_value): Likewise.
1974 (alpha_deal_with_atomic_sequence): Likewise.
1975 (alpha_next_pc): Likewise.
1976 (alpha_software_single_step): Likewise.
1977 * amd64-bsd-nat.c (amd64bsd_fetch_inferior_registers): Likewise.
1978 (amd64bsd_store_inferior_registers): Likewise.
1979 * amd64-linux-nat.c (amd64_linux_fetch_inferior_registers):
1980 Likewise.
1981 (amd64_linux_store_inferior_registers): Likewise.
1982 * amd64-nat.c (amd64_supply_native_gregset): Likewise.
1983 (amd64_collect_native_gregset): Likewise.
1984 * amd64-obsd-tdep.c (amd64obsd_supply_uthread): Likewise.
1985 (amd64obsd_collect_uthread): Likewise.
1986 * amd64-tdep.c (amd64_supply_fpregset): Likewise.
1987 (amd64_collect_fpregset): Likewise.
1988 (amd64_supply_fxsave): Likewise.
1989 (amd64_supply_xsave): Likewise.
1990 (amd64_collect_fxsave): Likewise.
1991 (amd64_collect_xsave): Likewise.
1992 * arc-tdep.c (arc_write_pc): Likewise.
1993 * arch-utils.c (default_skip_permanent_breakpoint): Likewise.
1994 * arm-fbsd-nat.c (arm_fbsd_fetch_inferior_registers): Likewise.
1995 (arm_fbsd_store_inferior_registers): Likewise.
1996 * arm-linux-nat.c (fetch_vfp_regs): Likewise.
1997 (store_vfp_regs): Likewise.
1998 (arm_linux_fetch_inferior_registers): Likewise.
1999 (arm_linux_store_inferior_registers): Likewise.
2000 * arm-linux-tdep.c (arm_linux_supply_gregset): Likewise.
2001 (arm_linux_sigreturn_next_pc): Likewise.
2002 (arm_linux_get_next_pcs_syscall_next_pc): Likewise.
2003 * arm-nbsd-nat.c (arm_supply_gregset): Likewise.
2004 (fetch_register): Likewise.
2005 (store_register): Likewise.
2006 * arm-tdep.c (arm_is_thumb): Likewise.
2007 (displaced_in_arm_mode): Likewise.
2008 (bx_write_pc): Likewise.
2009 (arm_get_next_pcs_addr_bits_remove): Likewise.
2010 (arm_software_single_step): Likewise.
2011 (arm_extract_return_value): Likewise.
2012 (arm_store_return_value): Likewise.
2013 (arm_write_pc): Likewise.
2014 * bfin-tdep.c (bfin_extract_return_value): Likewise.
2015 * bsd-uthread.c (bsd_uthread_fetch_registers): Likewise.
2016 (bsd_uthread_store_registers): Likewise.
2017 * core-regset.c (fetch_core_registers): Likewise.
2018 * corelow.c (get_core_registers): Likewise.
2019 * cris-tdep.c (cris_store_return_value): Likewise.
2020 (cris_extract_return_value): Likewise.
2021 (find_step_target): Likewise.
2022 (find_step_target): Likewise.
2023 (cris_software_single_step): Likewise.
2024 * ctf.c (ctf_fetch_registers): Likewise.
2025 * darwin-nat.c (cancel_breakpoint): Likewise.
2026 * fbsd-tdep.c (fbsd_collect_thread_registers): Likewise.
2027 * frv-tdep.c (frv_extract_return_value): Likewise.
2028 * ft32-tdep.c (ft32_store_return_value): Likewise.
2029 (ft32_extract_return_value): Likewise.
2030 * go32-nat.c (fetch_register): Likewise.
2031 (go32_fetch_registers): Likewise.
2032 (go32_store_registers): Likewise.
2033 (store_register): Likewise.
2034 * h8300-tdep.c (h8300_extract_return_value): Likewise.
2035 (h8300_store_return_value): Likewise.
2036 * hppa-linux-nat.c (fetch_register): Likewise.
2037 (store_register): Likewise.
2038 (hppa_linux_fetch_inferior_registers): Likewise.
2039 (hppa_linux_store_inferior_registers): Likewise.
2040 * i386-darwin-nat.c (i386_darwin_fetch_inferior_registers): Likewise.
2041 (i386_darwin_store_inferior_registers): Likewise.
2042 * i386-gnu-nat.c (gnu_fetch_registers): Likewise.
2043 (gnu_store_registers): Likewise.
2044 * i386-linux-nat.c (fetch_register): Likewise.
2045 (store_register): Likewise.
2046 (supply_gregset): Likewise.
2047 (fill_gregset): Likewise.
2048 (i386_linux_fetch_inferior_registers): Likewise.
2049 (i386_linux_store_inferior_registers): Likewise.
2050 (i386_linux_resume): Likewise.
2051 * i386-linux-tdep.c (i386_linux_get_syscall_number_from_regcache):
2052 Likewise.
2053 * i386-nto-tdep.c (i386nto_supply_gregset): Likewise.
2054 * i386-obsd-nat.c (i386obsd_supply_pcb): Likewise.
2055 * i386-obsd-tdep.c (i386obsd_supply_uthread): Likewise.
2056 (i386obsd_collect_uthread): Likewise.
2057 * i386-tdep.c (i386_mmx_regnum_to_fp_regnum): Likewise.
2058 (i386_supply_gregset): Likewise.
2059 (i386_collect_gregset): Likewise.
2060 (i386_supply_fpregset): Likewise.
2061 (i386_collect_fpregset): Likewise.
2062 (i386_mpx_bd_base): Likewise.
2063 * i386-v4-nat.c (supply_fpregset): Likewise.
2064 (fill_fpregset): Likewise.
2065 * i387-tdep.c (i387_supply_fsave): Likewise.
2066 (i387_collect_fsave): Likewise.
2067 (i387_supply_fxsave): Likewise.
2068 (i387_collect_fxsave): Likewise.
2069 (i387_supply_xsave): Likewise.
2070 (i387_collect_xsave): Likewise.
2071 * ia64-linux-nat.c (ia64_linux_fetch_registers): Likewise.
2072 (ia64_linux_store_registers): Likewise.
2073 * ia64-tdep.c (ia64_access_rse_reg): Likewise.
2074 (ia64_extract_return_value): Likewise.
2075 (ia64_store_return_value): Likewise.
2076 (find_func_descr): Likewise.
2077 * inf-child.c (inf_child_fetch_inferior_registers): Likewise.
2078 * inf-ptrace.c (inf_ptrace_fetch_registers): Likewise.
2079 (inf_ptrace_store_registers): Likewise.
2080 * infrun.c (use_displaced_stepping): Likewise.
2081 (displaced_step_prepare_throw): Likewise.
2082 (resume): Likewise.
2083 (proceed): Likewise.
2084 (do_target_wait): Likewise.
2085 (adjust_pc_after_break): Likewise.
2086 (handle_inferior_event_1): Likewise.
2087 (handle_signal_stop): Likewise.
2088 (save_infcall_suspend_state): Likewise.
2089 (restore_infcall_suspend_state): Likewise.
2090 * iq2000-tdep.c (iq2000_extract_return_value): Likewise.
2091 * jit.c (jit_frame_prev_register): Likewise.
2092 * linux-nat.c (save_stop_reason): Likewise.
2093 (linux_nat_wait_1): Likewise.
2094 (resume_stopped_resumed_lwps): Likewise.
2095 * linux-record.c (record_linux_sockaddr): Likewise.
2096 (record_linux_msghdr): Likewise.
2097 (record_linux_system_call): Likewise.
2098 * linux-tdep.c (linux_collect_thread_registers): Likewise.
2099 * lm32-tdep.c (lm32_extract_return_value): Likewise.
2100 (lm32_store_return_value): Likewise.
2101 * m32c-tdep.c (m32c_read_flg): Likewise.
2102 (m32c_pseudo_register_read): Likewise.
2103 (m32c_pseudo_register_write): Likewise.
2104 * m32r-linux-tdep.c (m32r_linux_supply_gregset): Likewise.
2105 (m32r_linux_collect_gregset): Likewise.
2106 * m32r-tdep.c (m32r_store_return_value): Likewise.
2107 (m32r_extract_return_value): Likewise.
2108 * m68k-bsd-nat.c (m68kbsd_supply_fpregset): Likewise.
2109 (m68kbsd_collect_fpregset): Likewise.
2110 * m68k-bsd-tdep.c (m68kbsd_supply_fpregset): Likewise.
2111 * m68k-linux-nat.c (fetch_register): Likewise.
2112 (old_fetch_inferior_registers): Likewise.
2113 (old_store_inferior_registers): Likewise.
2114 (store_regs): Likewise.
2115 * m68k-tdep.c (m68k_svr4_extract_return_value): Likewise.
2116 (m68k_svr4_store_return_value): Likewise.
2117 * m88k-tdep.c (m88k_store_arguments): Likewise.
2118 * mi/mi-main.c (mi_cmd_data_list_changed_registers): Likewise.
2119 (mi_cmd_data_write_register_values): Likewise.
2120 * mips-fbsd-nat.c (mips_fbsd_fetch_inferior_registers): Likewise.
2121 (mips_fbsd_store_inferior_registers): Likewise.
2122 * mips-fbsd-tdep.c (mips_fbsd_supply_fpregs): Likewise.
2123 (mips_fbsd_supply_gregs): Likewise.
2124 (mips_fbsd_collect_fpregs): Likewise.
2125 (mips_fbsd_collect_gregs): Likewise.
2126 (mips_fbsd_supply_fpregset): Likewise.
2127 (mips_fbsd_collect_fpregset): Likewise.
2128 (mips_fbsd_supply_gregset): Likewise.
2129 (mips_fbsd_collect_gregset): Likewise.
2130 * mips-linux-nat.c (supply_gregset): Likewise.
2131 (fill_gregset): Likewise.
2132 (supply_fpregset): Likewise.
2133 (fill_fpregset): Likewise.
2134 * mips-linux-tdep.c (mips_supply_gregset): Likewise.
2135 (mips_fill_gregset): Likewise.
2136 (mips_supply_fpregset): Likewise.
2137 (mips_fill_fpregset): Likewise.
2138 (mips64_supply_gregset): Likewise.
2139 (micromips_linux_sigframe_validate): Likewise.
2140 * mips-nbsd-nat.c (mipsnbsd_fetch_inferior_registers): Likewise.
2141 (mipsnbsd_fetch_inferior_registers): Likewise.
2142 (mipsnbsd_store_inferior_registers): Likewise.
2143 * mips-nbsd-tdep.c (mipsnbsd_supply_fpregset): Likewise.
2144 (mipsnbsd_supply_gregset): Likewise.
2145 (mipsnbsd_iterate_over_regset_sections): Likewise.
2146 (mipsnbsd_supply_reg): Likewise.
2147 (mipsnbsd_supply_fpreg): Likewise.
2148 * mips-tdep.c (mips_in_frame_stub): Likewise.
2149 (mips_dummy_id): Likewise.
2150 (is_octeon_bbit_op): Likewise.
2151 (micromips_bc1_pc): Likewise.
2152 (extended_mips16_next_pc): Likewise.
2153 (mips16_next_pc): Likewise.
2154 (deal_with_atomic_sequence): Likewise.
2155 * moxie-tdep.c (moxie_process_readu): Likewise.
2156 * nios2-tdep.c (nios2_get_next_pc): Likewise.
2157 * nto-procfs.c (procfs_store_registers): Likewise.
2158 * ppc-fbsd-nat.c (ppcfbsd_fetch_inferior_registers): Likewise.
2159 (ppcfbsd_store_inferior_registers): Likewise.
2160 * ppc-linux-nat.c (fetch_vsx_register): Likewise.
2161 (fetch_altivec_register): Likewise.
2162 (get_spe_registers): Likewise.
2163 (fetch_spe_register): Likewise.
2164 (fetch_altivec_registers): Likewise.
2165 (fetch_all_gp_regs): Likewise.
2166 (fetch_all_fp_regs): Likewise.
2167 (store_vsx_register): Likewise.
2168 (store_altivec_register): Likewise.
2169 (set_spe_registers): Likewise.
2170 (store_spe_register): Likewise.
2171 (store_altivec_registers): Likewise.
2172 (store_all_gp_regs): Likewise.
2173 (store_all_fp_regs): Likewise.
2174 * ppc-linux-tdep.c (ppc_linux_supply_gregset): Likewise.
2175 (ppc_linux_collect_gregset): Likewise.
2176 (ppc_canonicalize_syscall): Likewise.
2177 (ppc_linux_record_signal): Likewise.
2178 (ppu2spu_prev_register): Likewise.
2179 * ppc-nbsd-nat.c (ppcnbsd_supply_pcb): Likewise.
2180 * ppc-obsd-nat.c (ppcobsd_fetch_registers): Likewise.
2181 (ppcobsd_store_registers): Likewise.
2182 * ppc-ravenscar-thread.c (ppc_ravenscar_generic_fetch_registers):
2183 Likewise.
2184 (ppc_ravenscar_generic_store_registers): Likewise.
2185 * procfs.c (procfs_fetch_registers): Likewise.
2186 (procfs_store_registers): Likewise.
2187 * ravenscar-thread.c (ravenscar_fetch_registers): Likewise.
2188 (ravenscar_store_registers): Likewise.
2189 (ravenscar_prepare_to_store): Likewise.
2190 * record-btrace.c (record_btrace_fetch_registers): Likewise.
2191 * record-full.c (record_full_wait_1): Likewise.
2192 (record_full_registers_change): Likewise.
2193 (record_full_store_registers): Likewise.
2194 (record_full_core_fetch_registers): Likewise.
2195 (record_full_save): Likewise.
2196 (record_full_goto_insn): Likewise.
2197 * regcache.c (regcache_register_size): Likewise.
2198 (get_regcache_arch): Remove.
2199 (regcache_read_pc): Likewise.
2200 * regcache.h (get_regcache_arch): Remove.
2201 * remote-sim.c (gdbsim_fetch_register): Likewise.
2202 (gdbsim_store_register): Likewise.
2203 * remote.c (fetch_register_using_p): Likewise.
2204 (send_g_packet): Likewise.
2205 (remote_prepare_to_store): Likewise.
2206 (store_registers_using_G): Likewise.
2207 * reverse.c (save_bookmark_command): Likewise.
2208 (goto_bookmark_command): Likewise.
2209 * rs6000-aix-tdep.c (branch_dest): Likewise.
2210 * rs6000-nat.c (rs6000_ptrace64): Likewise.
2211 (fetch_register): Likewise.
2212 * rs6000-tdep.c (ppc_supply_reg): Likewise.
2213 (ppc_collect_reg): Likewise.
2214 (ppc_collect_gregset): Likewise.
2215 (ppc_collect_fpregset): Likewise.
2216 (ppc_collect_vsxregset): Likewise.
2217 (ppc_collect_vrregset): Likewise.
2218 (ppc_displaced_step_hw_singlestep): Likewise.
2219 (rs6000_pseudo_register_read): Likewise.
2220 (rs6000_pseudo_register_write): Likewise.
2221 * s390-linux-nat.c (supply_gregset): Likewise.
2222 (fill_gregset): Likewise.
2223 (s390_linux_fetch_inferior_registers): Likewise.
2224 * s390-linux-tdep.c (s390_write_pc): Likewise.
2225 (s390_software_single_step): Likewise.
2226 (s390_all_but_pc_registers_record): Likewise.
2227 (s390_linux_syscall_record): Likewise.
2228 * sentinel-frame.c (sentinel_frame_prev_arch): Likewise.
2229 * sh-nbsd-nat.c (shnbsd_fetch_inferior_registers): Likewise.
2230 (shnbsd_store_inferior_registers): Likewise.
2231 * sh-tdep.c (sh_extract_return_value_nofpu): Likewise.
2232 (sh_extract_return_value_fpu): Likewise.
2233 (sh_store_return_value_nofpu): Likewise.
2234 (sh_corefile_supply_regset): Likewise.
2235 (sh_corefile_collect_regset): Likewise.
2236 * sh64-tdep.c (sh64_extract_return_value): Likewise.
2237 (sh64_store_return_value): Likewise.
2238 * sparc-linux-tdep.c (sparc32_linux_collect_core_fpregset): Likewise.
2239 * sparc-nat.c (sparc_fetch_inferior_registers): Likewise.
2240 (sparc_store_inferior_registers): Likewise.
2241 * sparc-ravenscar-thread.c (register_in_thread_descriptor_p): Likewise.
2242 (sparc_ravenscar_prepare_to_store): Likewise.
2243 * sparc-tdep.c (sparc32_store_arguments): Likewise.
2244 (sparc_analyze_control_transfer): Likewise.
2245 (sparc_step_trap): Likewise.
2246 (sparc_software_single_step): Likewise.
2247 (sparc32_gdbarch_init): Likewise.
2248 (sparc_supply_rwindow): Likewise.
2249 (sparc_collect_rwindow): Likewise.
2250 * sparc64-linux-tdep.c (sparc64_linux_collect_core_fpregset): Likewise.
2251 * sparc64-nbsd-nat.c (sparc64nbsd_supply_gregset): Likewise.
2252 (sparc64nbsd_collect_gregset): Likewise.
2253 (sparc64nbsd_supply_fpregset): Likewise.
2254 (sparc64nbsd_collect_fpregset): Likewise.
2255 * sparc64-tdep.c (sparc64_store_arguments): Likewise.
2256 (sparc64_supply_gregset): Likewise.
2257 (sparc64_collect_gregset): Likewise.
2258 (sparc64_supply_fpregset): Likewise.
2259 (sparc64_collect_fpregset): Likewise.
2260 * spu-linux-nat.c (spu_fetch_inferior_registers): Likewise.
2261 * spu-tdep.c (spu_unwind_sp): Likewise.
2262 (spu2ppu_prev_register): Likewise.
2263 (spu_memory_remove_breakpoint): Likewise.
2264 * stack.c (return_command): Likewise.
2265 * tic6x-tdep.c (tic6x_extract_signed_field): Likewise.
2266 * tracefile-tfile.c (tfile_fetch_registers): Likewise.
2267 * tracefile.c (trace_save_ctf): Likewise.
2268 * windows-nat.c (do_windows_fetch_inferior_registers): Likewise.
2269 (do_windows_store_inferior_registers): Likewise.
2270 (windows_resume): Likewise.
2271 * xtensa-linux-nat.c (fill_gregset): Likewise.
2272 (supply_gregset_reg): Likewise.
2273 * xtensa-tdep.c (xtensa_register_write_masked): Likewise.
2274 (xtensa_register_read_masked): Likewise.
2275 (xtensa_supply_gregset): Likewise.
2276 (xtensa_extract_return_value): Likewise.
2277 (xtensa_store_return_value): Likewise.
2278
edd079d9
UW
22792017-10-25 Ulrich Weigand <uweigand@de.ibm.com>
2280
2281 * doublest.c (floatformat_from_string): New function.
2282 * doublest.h (floatformat_from_string): Add prototype.
2283
2284 * std-operator.def (OP_DOUBLE, OP_DECFLOAT): Remove, replace by ...
2285 (OP_FLOAT): ... this.
2286 * expression.h: Do not include "doublest.h".
2287 (union exp_element): Replace doubleconst and decfloatconst by
2288 new element floatconst.
2289 * ada-lang.c (resolve_subexp): Handle OP_FLOAT instead of OP_DOUBLE.
2290 (ada_evaluate_subexp): Likewise.
2291 * eval.c (evaluate_subexp_standard): Handle OP_FLOAT instead of
2292 OP_DOUBLE and OP_DECFLOAT.
2293 * expprint.c (print_subexp_standard): Likewise.
2294 (dump_subexp_body_standard): Likewise.
2295 * breakpoint.c (watchpoint_exp_is_const): Likewise.
2296
2297 * parse.c: Include "dfp.h".
2298 (write_exp_elt_dblcst, write_exp_elt_decfloatcst): Remove.
2299 (write_exp_elt_floatcst): New function.
2300 (operator_length_standard): Handle OP_FLOAT instead of OP_DOUBLE
2301 and OP_DECFLOAT.
2302 (operator_check_standard): Likewise.
2303 (parse_float): Do not accept suffix. Take type as input. Return bool.
2304 Return target format buffer instead of host DOUBLEST.
2305 Use floatformat_from_string and decimal_from_string to parse
2306 either binary or decimal floating-point types.
2307 (parse_c_float): Remove.
2308 * parser-defs.h: Do not include "doublest.h".
2309 (write_exp_elt_dblcst, write_exp_elt_decfloatcst): Remove.
2310 (write_exp_elt_floatcst): Add prototype.
2311 (parse_float): Update prototype.
2312 (parse_c_float): Remove.
2313
2314 * c-exp.y: Do not include "dfp.h".
2315 (typed_val_float): Use byte buffer instead of DOUBLEST.
2316 (typed_val_decfloat): Remove.
2317 (DECFLOAT): Remove.
2318 (FLOAT): Use OP_FLOAT and write_exp_elt_floatcst.
2319 (parse_number): Update to new parse_float interface.
2320 Parse suffixes and determine type before calling parse_float.
2321 Handle decimal and binary FP types the same way.
2322
2323 * d-exp.y (typed_val_float): Use byte buffer instead of DOUBLEST.
2324 (FLOAT_LITERAL): Use OP_FLOAT and write_exp_elt_floatcst.
2325 (parse_number): Update to new parse_float interface.
2326 Parse suffixes and determine type before calling parse_float.
2327
2328 * f-exp.y: Replace dval by typed_val_float.
2329 (FLOAT): Use OP_FLOAT and write_exp_elt_floatcst.
2330 (parse_number): Use parse_float instead of atof.
2331
2332 * go-exp.y (typed_val_float): Use byte buffer instead of DOUBLEST.
2333 (parse_go_float): Remove.
2334 (FLOAT): Use OP_FLOAT and write_exp_elt_floatcst.
2335 (parse_number): Call parse_float instead of parse_go_float.
2336 Parse suffixes and determine type before calling parse_float.
2337
2338 * p-exp.y (typed_val_float): Use byte buffer instead of DOUBLEST.
2339 (FLOAT): Use OP_FLOAT and write_exp_elt_floatcst.
2340 (parse_number): Update to new parse_float interface.
2341 Parse suffixes and determine type before calling parse_float.
2342
2343 * m2-exp.y: Replace dval by byte buffer val.
2344 (FLOAT): Use OP_FLOAT and write_exp_elt_floatcst.
2345 (parse_number): Call parse_float instead of atof.
2346
2347 * rust-exp.y (typed_val_float): Use byte buffer instead of DOUBLEST.
2348 (lex_number): Call parse_float instead of strtod.
2349 (ast_dliteral): Use OP_FLOAT instead of OP_DOUBLE.
2350 (convert_ast_to_expression): Handle OP_FLOAT instead of OP_DOUBLE.
2351 Use write_exp_elt_floatcst.
2352 (unit_testing): Remove static variable.
2353 (rust_type): Do not check unit_testing.
2354 (rust_lex_tests): Do not set uint_testing. Set up dummy rust_parser.
2355
2356 * ada-exp.y (type_float, type_double): Remove.
2357 (typed_val_float): Use byte buffer instead of DOUBLEST.
2358 (FLOAT): Use OP_FLOAT and write_exp_elt_floatcst.
2359 * ada-lex.l (processReal): Use parse_float instead of sscanf.
2360
cc628f3d
AH
23612017-10-25 Alan Hayward <alan.hayward@arm.com>
2362
2363 * aarch64-tdep.h (enum aarch64_regnum): Remove.
2364 * arch/aarch64.h: New file.
2365
09a7c6aa
UW
23662017-10-24 Ulrich Weigand <uweigand@de.ibm.com>
2367
2368 * dfp.h (decimal_from_string): Use const reference for argument.
2369 * dfp.c (decimal_from_string): Likewise.
2370
8ba0dd51
UW
23712017-10-24 Ulrich Weigand <uweigand@de.ibm.com>
2372
2373 * i387-tdep.c (print_i387_value): Use floatformat_to_string.
2374 * sh64-tdep.c (sh64_do_fp_register): Likewise.
2375 * mips-tdep.c (mips_print_fp_register): Likewise.
2376
16e812b2
UW
23772017-10-24 Ulrich Weigand <uweigand@de.ibm.com>
2378
2379 * common/format.h (enum argclass): Replace decfloat_arg by
2380 dec32float_arg, dec64float_arg, and dec128float_arg.
2381 * common/format.c (parse_format_string): Update to return
2382 new decimal float argument classes.
2383
2384 * printcmd.c (printf_decfloat): Rename to ...
2385 (printf_floating): ... this. Add argclass argument, and use it
2386 instead of parsing the format string again. Add support for
2387 binary floating-point values, using floatformat_to_string.
2388 Convert value to the target format if it doesn't already match.
2389 (ui_printf): Call printf_floating instead of printf_decfloat,
2390 also for double_arg / long_double_arg. Pass argclass.
2391
2392 * dfp.c (decimal_to_string): Add format string argument.
2393 * dfp.h (decimal_to_string): Likewise.
2394
2395 * doublest.c (floatformat_to_string): Add format string argument.
2396 * doublest.h (floatformat_to_string): Likewise.
2397
fdf0cbc2
UW
23982017-10-24 Ulrich Weigand <uweigand@de.ibm.com>
2399
2400 * doublest.c (floatformat_precision): New routine.
2401 (floatformat_to_string): Likewise.
2402 * doublest.c (floatformat_to_string): Add prototype.
2403
2404 * printcmd.c (print_scalar_formatted): Only call print_floating
2405 on floating-point types.
2406 * valprint.c: Do not include "floatformat.h".
2407 (generic_val_print_decfloat): Remove.
2408 (generic_val_print): Call generic_val_print_float for both
2409 TYPE_CODE_FLT and TYPE_CODE_DECFLOAT.
2410 (print_floating): Use floatformat_to_string. Handle decimal float.
2411 (print_decimal_floating): Remove, merge into floatformat_to_string.
2412 * value.h (print_decimal_floating): Remove.
2413
2414 * Makefile.in: Do not build doublest.c with -Wformat-nonliteral.
2415
5033013f
UW
24162017-10-24 Ulrich Weigand <uweigand@de.ibm.com>
2417
2418 * buildsym.c (end_symtab_get_static_block): Use std::stable_sort.
2419
a664f67e
SM
24202017-10-21 Simon Marchi <simon.marchi@ericsson.com>
2421
2422 * memattr.h: Don't include vec.h.
2423 (struct mem_attrib): Initialize fields.
2424 <unknown>: New static method.
2425 (struct mem_region): Add constructors, operator<, initialize
2426 fields.
2427 * memattr.c: Include algorithm.
2428 (default_mem_attrib, unknown_mem_attrib): Remove.
2429 (user_mem_region_list): New global.
2430 (target_mem_region_list, mem_region_list): Change type to
2431 std::vector<mem_region>.
2432 (mem_use_target): Now a function.
2433 (target_mem_regions_valid): Change type to bool.
2434 (mem_region_lessthan, mem_region_cmp, mem_region_init): Remove.
2435 (require_user_regions): Adjust.
2436 (require_target_regions): Adjust.
2437 (create_mem_region): Adjust.
2438 (lookup_mem_region): Adjust.
2439 (invalidate_target_mem_regions): Adjust.
2440 (mem_clear): Rename to...
2441 (user_mem_clear): ... this, and adjust.
2442 (mem_command): Adjust.
2443 (info_mem_command): Adjust.
2444 (mem_enable, enable_mem_command, mem_disable,
2445 disable_mem_command): Adjust.
2446 (mem_delete): Adjust.
2447 (delete_mem_command): Adjust.
2448 * memory-map.h (parse_memory_map): Return an std::vector.
2449 * memory-map.c (parse_memory_map): Likewise.
2450 (struct memory_map_parsing_data): Add constructor.
2451 <memory_map>: Point to std::vector.
2452 (memory_map_start_memory): Adjust.
2453 (memory_map_end_memory): Adjust.
2454 (memory_map_end_property): Adjust.
2455 (clear_result): Remove.
2456 * remote.c (remote_memory_map): Return an std::vector.
2457 * target-debug.h (target_debug_print_VEC_mem_region_s__p):
2458 Remove.
2459 (target_debug_print_mem_region_vector): New.
2460 * target-delegates.c: Regenerate.
2461 * target.h (mem_region_vector): New typedef.
2462 (to_memory_map): Return mem_region_vector.
2463 (target_memory_map): Return an std::vector.
2464 * target.c (target_memory_map): Return an std::vector.
2465 (flash_erase_command): Adjust.
2466
6e17c565
SM
24672017-10-21 Simon Marchi <simon.marchi@ericsson.com>
2468
2469 * memory-map.c (struct memory_map_parsing_data) <property_name>:
2470 Change type to std::string.
2471 (memory_map_start_property): Adjust.
2472 (memory_map_end_property): Adjust.
2473
cfba9872
SM
24742017-10-21 Simon Marchi <simon.marchi@polymtl.ca>
2475
2476 * infrun.h: Include common/byte-vector.h.
2477 (struct displaced_step_closure): New struct.
2478 (struct buf_displaced_step_closure): New struct.
2479 * infrun.c (displaced_step_closure::~displaced_step_closure):
2480 Provide default implementation.
2481 (displaced_step_clear): Deallocate step closure with delete.
2482 * aarch64-tdep.c (displaced_step_closure): Rename to ...
2483 (aarch64_displaced_step_closure): ... this, extend
2484 displaced_step_closure.
2485 (aarch64_displaced_step_data) <dsc>: Change type to
2486 aarch64_displaced_step_closure.
2487 (aarch64_displaced_step_copy_insn): Adjust to type change, use
2488 unique_ptr.
2489 (aarch64_displaced_step_fixup): Add cast for displaced step
2490 closure.
2491 * amd64-tdep.c (displaced_step_closure): Rename to ...
2492 (amd64_displaced_step_closure): ... this, extend
2493 displaced_step_closure.
2494 <insn_buf>: Change type to std::vector<gdb_byte>.
2495 <max_len>: Remove.
2496 (fixup_riprel): Change type of DSC parameter, adjust to type
2497 change of insn_buf.
2498 (fixup_displaced_copy): Change type of DSC parameter.
2499 (amd64_displaced_step_copy_insn): Instantiate
2500 amd64_displaced_step_closure.
2501 (amd64_displaced_step_fixup): Add cast for closure type, adjust
2502 to type change of insn_buf.
2503 * arm-linux-tdep.c (arm_linux_cleanup_svc): Change type of
2504 parameter DSC.
2505 (arm_linux_copy_svc): Likewise.
2506 (cleanup_kernel_helper_return): Likewise.
2507 (arm_catch_kernel_helper_return): Likewise.
2508 (arm_linux_displaced_step_copy_insn): Instantiate
2509 arm_displaced_step_closure.
2510 * arm-tdep.c (arm_pc_is_thumb): Add cast for closure.
2511 (displaced_read_reg): Change type of parameter DSC.
2512 (branch_write_pc): Likewise.
2513 (load_write_pc): Likewise.
2514 (alu_write_pc): Likewise.
2515 (displaced_write_reg): Likewise.
2516 (arm_copy_unmodified): Likewise.
2517 (thumb_copy_unmodified_32bit): Likewise.
2518 (thumb_copy_unmodified_16bit): Likewise.
2519 (cleanup_preload): Likewise.
2520 (install_preload): Likewise.
2521 (arm_copy_preload): Likewise.
2522 (thumb2_copy_preload): Likewise.
2523 (install_preload_reg): Likewise.
2524 (arm_copy_preload_reg): Likewise.
2525 (cleanup_copro_load_store): Likewise.
2526 (install_copro_load_store): Likewise.
2527 (arm_copy_copro_load_store) Likewise.
2528 (thumb2_copy_copro_load_store): Likewise.
2529 (cleanup_branch): Likewise.
2530 (install_b_bl_blx): Likewise.
2531 (arm_copy_b_bl_blx): Likewise.
2532 (thumb2_copy_b_bl_blx): Likewise.
2533 (thumb_copy_b): Likewise.
2534 (install_bx_blx_reg): Likewise.
2535 (arm_copy_bx_blx_reg): Likewise.
2536 (thumb_copy_bx_blx_reg): Likewise.
2537 (cleanup_alu_imm): Likewise.
2538 (arm_copy_alu_imm): Likewise.
2539 (thumb2_copy_alu_imm): Likewise.
2540 (cleanup_alu_reg): Likewise.
2541 (install_alu_reg): Likewise.
2542 (arm_copy_alu_reg): Likewise.
2543 (thumb_copy_alu_reg): Likewise.
2544 (cleanup_alu_shifted_reg): Likewise.
2545 (install_alu_shifted_reg): Likewise.
2546 (arm_copy_alu_shifted_reg): Likewise.
2547 (cleanup_load): Likewise.
2548 (cleanup_store): Likewise.
2549 (arm_copy_extra_ld_st): Likewise.
2550 (install_load_store): Likewise.
2551 (thumb2_copy_load_literal): Likewise.
2552 (thumb2_copy_load_reg_imm): Likewise.
2553 (arm_copy_ldr_str_ldrb_strb): Likewise.
2554 (cleanup_block_load_all): Likewise.
2555 (cleanup_block_store_pc): Likewise.
2556 (cleanup_block_load_pc): Likewise.
2557 (arm_copy_block_xfer): Likewise.
2558 (thumb2_copy_block_xfer): Likewise.
2559 (cleanup_svc): Likewise.
2560 (install_svc): Likewise.
2561 (arm_copy_svc): Likewise.
2562 (thumb_copy_svc): Likewise.
2563 (arm_copy_undef): Likewise.
2564 (thumb_32bit_copy_undef): Likewise.
2565 (arm_copy_unpred): Likewise.
2566 (arm_decode_misc_memhint_neon): Likewise.
2567 (arm_decode_unconditional): Likewise.
2568 (arm_decode_miscellaneous): Likewise.
2569 (arm_decode_dp_misc): Likewise.
2570 (arm_decode_ld_st_word_ubyte): Likewise.
2571 (arm_decode_media): Likewise.
2572 (arm_decode_b_bl_ldmstm): Likewise.
2573 (arm_decode_ext_reg_ld_st): Likewise.
2574 (thumb2_decode_dp_shift_reg): Likewise.
2575 (thumb2_decode_ext_reg_ld_st): Likewise.
2576 (arm_decode_svc_copro): Likewise.
2577 (thumb2_decode_svc_copro): Likewise.
2578 (install_pc_relative): Likewise.
2579 (thumb_copy_pc_relative_16bit): Likewise.
2580 (thumb_decode_pc_relative_16bit): Likewise.
2581 (thumb_copy_pc_relative_32bit): Likewise.
2582 (thumb_copy_16bit_ldr_literal): Likewise.
2583 (thumb_copy_cbnz_cbz): Likewise.
2584 (thumb2_copy_table_branch): Likewise.
2585 (cleanup_pop_pc_16bit_all): Likewise.
2586 (thumb_copy_pop_pc_16bit): Likewise.
2587 (thumb_process_displaced_16bit_insn): Likewise.
2588 (decode_thumb_32bit_ld_mem_hints): Likewise.
2589 (thumb_process_displaced_32bit_insn): Likewise.
2590 (thumb_process_displaced_insn): Likewise.
2591 (arm_process_displaced_insn): Likewise.
2592 (arm_displaced_init_closure): Likewise.
2593 (arm_displaced_step_fixup): Add cast for closure.
2594 * arm-tdep.h: Include infrun.h.
2595 (displaced_step_closure): Rename to ...
2596 (arm_displaced_step_closure): ... this, extend
2597 displaced_step_closure.
2598 <u::svc::copy_svc_os>: Change type of parameter DSC.
2599 <cleanup>: Likewise.
2600 (arm_process_displaced_insn): Likewise.
2601 (arm_displaced_init_closure): Likewise.
2602 (displaced_read_reg): Likewise.
2603 (displaced_write_reg): Likewise.
2604 * i386-linux-tdep.c (i386_linux_displaced_step_copy_insn):
2605 Adjust.
2606 * i386-tdep.h: Include infrun.h.
2607 (i386_displaced_step_closure): New typedef.
2608 * i386-tdep.c (i386_displaced_step_copy_insn): Use
2609 i386_displaced_step_closure.
2610 (i386_displaced_step_fixup): Adjust.
2611 * rs6000-tdep.c (ppc_displaced_step_closure): New typedef.
2612 (ppc_displaced_step_copy_insn): Use ppc_displaced_step_closure
2613 and unique_ptr.
2614 (ppc_displaced_step_fixup): Adjust.
2615 * s390-linux-tdep.c (s390_displaced_step_closure): New typedef.
2616 (s390_displaced_step_copy_insn): Use s390_displaced_step_closure
2617 and unique_ptr.
2618 (s390_displaced_step_fixup): Adjust.
2619
b392b304
SM
26202017-10-21 Simon Marchi <simon.marchi@polymtl.ca>
2621
2622 * interps.h (interp_resume, interp_suspend, interp_set_temp):
2623 Remove declarations.
2624
d5833c62
TT
26252017-10-20 Tom Tromey <tom@tromey.com>
2626
2627 * gdb_bfd.c (struct gdb_bfd_data) <included_bfds>: Now a
2628 std::vector.
2629 (gdb_bfd_record_inclusion): Update.
2630 (bfdp): Remove typedef.
2631
06d5bbc8
TT
26322017-10-20 Tom Tromey <tom@tromey.com>
2633
2634 * gdb_bfd.c (gdb_bfd_ref): Use new.
2635 (struct gdb_bfd_data): Add constructor, destructor, and member
2636 initializers.
2637 (gdb_bfd_unref): Use delete.
2638
2712ce2e
TT
26392017-10-20 Tom Tromey <tom@tromey.com>
2640
2641 * exec.c (exec_file_attach): Use new_bfd_ref.
2642 * symfile-mem.c (symbol_file_add_from_memory): Use new_bfd_ref.
2643 * gdb_bfd.c (gdb_bfd_open, gdb_bfd_fopen, gdb_bfd_openr)
2644 (gdb_bfd_openw, gdb_bfd_openr_iovec, gdb_bfd_fdopenr): Use
2645 new_bfd_ref.
2646 * gdb_bfd.h (new_bfd_ref): New function.
2647
fcc8fb2f
PA
26482017-10-20 Pedro Alves <palves@redhat.com>
2649
2650 * main.c (captured_command_loop): Add attribute noinline.
2651
4c2287b0
SM
26522017-10-19 Simon Marchi <simon.marchi@ericsson.com>
2653
2654 * interps.c (struct interp_factory): Add constructor.
2655 (interp_factory_p): Remove typedef.
2656 (DEF_VEC_P(interp_factory_p)): Remove.
2657 (interpreter_factories): Change type to std::vector.
2658 (interp_factory_register): Adjust.
2659 (interp_lookup): Adjust.
2660 (interpreter_completer): Adjust.
2661
3d415c26
TT
26622017-10-19 Tom Tromey <tom@tromey.com>
2663
2664 * break-catch-syscall.c (catch_syscall_completer): Use
2665 std::string, gdb::unique_xmalloc_ptr.
2666
395423c4
TT
26672017-10-19 Tom Tromey <tom@tromey.com>
2668
2669 * infcall.c (call_function_by_hand_dummy): Use std::string.
2670
54f70bc1
TT
26712017-10-19 Tom Tromey <tom@tromey.com>
2672
2673 * mi/mi-main.c (mi_cmd_execute): Update.
2674 * top.h (prepare_execute_command): Return scoped_value_mark.
2675 * value.h (class scoped_value_mark): Use DISABLE_COPY_AND_ASSIGN.
2676 Add move constructor.
2677 * top.c (prepare_execute_command): Return scoped_value_mark.
2678 (execute_command): Update.
2679
63929e84
PA
26802017-10-19 Pedro Alves <palves@redhat.com>
2681
2682 * xml-support.c (xml_fetch_content_from_file): Check fread's
2683 return.
2684
a75868f5
PA
26852017-10-19 Pedro Alves <palves@redhat.com>
2686
2687 * ser-base.c (ser_base_read_error_fd): Delete the file handler if
2688 async.
2689 (handle_error_fd): New function.
2690 (ser_base_async): Add/delete an event loop file handler for
2691 error_fd.
2692
2edf834e
PA
26932017-10-19 Pedro Alves <palves@redhat.com>
2694
2695 * xml-support.c (xml_fetch_content_from_file): Don't read in
2696 chunks. Instead use fseek to determine the file's size, and read
2697 it in one go.
2698
c8ba13ad
KS
26992017-11-18 Keith Seitz <keiths@redhat.com>
2700
2701 * c-exp.y (oper): Canonicalize conversion operators of user-defined
2702 types.
2703 Add whitespace to front of type name.
2704
37534686
KS
27052017-10-18 Keith Seitz <keiths@redhat.com>
2706
2707 * dwarf2read.c (dwarf2_add_typedef): Issue a complaint on unhandled
2708 DW_AT_accessibility.
2709
28c7c158
YQ
27102017-10-18 Yao Qi <yao.qi@linaro.org>
2711
2712 * features/tic6x-c62x-linux.c: Remove.
2713
30f0b101
TT
27142017-10-17 Tom Tromey <tom@tromey.com>
2715
2716 * disasm.c (do_mixed_source_and_assembly_deprecated): Use
2717 gdb::optional, ui_out_emit_list, ui_out_emit_tuple.
2718 (do_mixed_source_and_assembly): Likewise.
2719
57e12da9
TT
27202017-10-17 Tom Tromey <tom@tromey.com>
2721
2722 * regcache.c (regcache::xfer_part): Remove assertion.
2723
7b700999
PA
27242017-10-17 Pedro Alves <palves@redhat.com>
2725
2726 * xml-support.c (xml_fetch_content_from_file): Call
2727 unique_ptr::release() instead unique_ptr::get() when passing
2728 through xrealloc.
2729
d3037ba6
YQ
27302017-10-17 Yao Qi <yao.qi@linaro.org>
2731
2732 * regcache.c (regcache::xfer_part): Remove parameters read and
2733 write, add parameter is_raw. All callers are updated.
2734
83d5a34d
KS
27352017-10-16 Keith Seitz <keiths@redhat.com>
2736
2737 * c-typeprint.c (enum access_specifier): Moved here from
2738 c_type_print_base.
2739 (output_access_specifier): New function.
2740 (c_type_print_base): Consider typedefs when assessing
2741 whether access labels are needed.
2742 Use output_access_specifier as needed.
2743 Output access specifier for typedefs, if needed.
2744 * dwarf2read.c (dwarf2_add_typedef): Record DW_AT_accessibility.
2745 * gdbtypes.h (struct typedef_field) <is_protected, is_private>: New
2746 fields.
2747 (TYPE_TYPEDEF_FIELD_PROTECTED, TYPE_TYPEDEF_FIELD_PRIVATE): New
2748 accessor macros.
2749
87028b87
TT
27502017-10-16 Tom Tromey <tom@tromey.com>
2751
2752 * linux-tdep.c (linux_info_proc, linux_find_memory_regions_full)
2753 (linux_fill_prpsinfo, linux_vsyscall_range_raw): Update.
2754 * target.c (target_fileio_read_stralloc): Update.
2755 * sparc64-tdep.c (adi_is_addr_mapped): Update.
2756 * target.h (target_fileio_read_stralloc): Return
2757 unique_xmalloc_ptr.
2758
b7b030ad
TT
27592017-10-16 Tom Tromey <tom@tromey.com>
2760
2761 * xml-syscall.c (xml_init_syscalls_info): Update.
2762 * xml-support.c (xinclude_start_include): Update.
2763 (xml_fetch_content_from_file): Return unique_xmalloc_ptr.
2764 * xml-support.h (xml_fetch_another): Return unique_xmalloc_ptr.
2765 (xml_fetch_content_from_file): Likewise.
2766 * osdata.c (get_osdata): Update.
2767 * target.h (target_read_stralloc, target_get_osdata): Return
2768 unique_xmalloc_ptr.
2769 * solib-aix.c (solib_aix_get_library_list): Update.
2770 * solib-target.c (solib_target_current_sos): Update.
2771 * solib-svr4.c (svr4_current_sos_via_xfer_libraries): Update.
2772 * xml-tdesc.c (fetch_available_features_from_target): Update.
2773 (target_fetch_description_xml): Update.
2774 (file_read_description_xml): Update.
2775 * remote.c (remote_get_threads_with_qxfer, remote_memory_map)
2776 (remote_traceframe_info, btrace_read_config, remote_read_btrace)
2777 (remote_pid_to_exec_file): Update.
2778 * target.c (target_read_stralloc): Return unique_xmalloc_ptr.
2779 (target_get_osdata): Likewise.
2780
b80406ac
TT
27812017-10-16 Tom Tromey <tom@tromey.com>
2782
2783 * remote.c (remote_register_number_and_offset): Use std::vector.
2784 (remote_set_syscall_catchpoint): Use gdb::unique_xmalloc_ptr.
2785 (putpkt_binary): Use gdb::def_vector.
2786 (compare_sections_command): Use gdb::byte_vector.
2787
a90ecff8
TT
27882017-10-16 Tom Tromey <tom@tromey.com>
2789
2790 * ppc-linux-nat.c (hwdebug_insert_point): Use
2791 gdb::unique_xmalloc_ptr, XDUP.
2792
2dc0e219
TT
27932017-10-16 Tom Tromey <tom@tromey.com>
2794
2795 * probe.c (parse_probes): Use std::string.
2796 (info_probes_for_ops, enable_probes_command)
2797 (disable_probes_command): Remove cleanups.
2798
b05628f0
TT
27992017-10-16 Tom Tromey <tom@tromey.com>
2800
2801 * buildsym.c (block_compar): Remove.
2802 (end_symtab_get_static_block): Use std::vector.
2803
a79b1bc6
SM
28042017-10-16 Simon Marchi <simon.marchi@ericsson.com>
2805
2806 * memrange.h (struct mem_range): Define operator< and operator==.
2807 (mem_range_s): Remove.
2808 (DEF_VEC_O (mem_range_s)): Remove.
2809 (normalize_mem_ranges): Change parameter type to std::vector.
2810 * memrange.c (compare_mem_ranges): Remove.
2811 (normalize_mem_ranges): Change parameter type to std::vector,
2812 adjust to vector change.
2813 * exec.c (section_table_available_memory): Return vector, remove
2814 parameter.
2815 (section_table_read_available_memory): Adjust to std::vector
2816 change.
2817 * remote.c (remote_read_bytes): Adjust to std::vector
2818 change.
2819 * tracepoint.h (traceframe_available_memory): Change parameter
2820 type to std::vector.
2821 * tracepoint.c (traceframe_available_memory): Change parameter
2822 type to std::vector, adjust.
2823 * gdb/mi/mi-main.c (mi_cmd_trace_frame_collected): Adjust to
2824 std::vector change.
2825 * gdb/Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
2826 unittests/memrange-selftests.c.
2827 (SUBDIR_UNITTESTS_OBS): Add memrange-selftests.o.
2828 * gdb/unittests/memrange-selftests.c: New file.
2829
63f0e930
PA
28302017-10-16 Pedro Alves <palves@redhat.com>
2831
2832 * elfread.c (probe_key_free): Rename range-for variable.
2833 * probe.c (parse_probes_in_pspace, find_probes_in_objfile)
2834 (find_probe_by_pc, collect_probes): Rename range-for variable.
2835
c40c7bfc
YQ
28362017-10-16 Yao Qi <yao.qi@linaro.org>
2837
2838 * features/Makefile (XMLTOC): Remove tic6x-*.xml.
2839 * features/tic6x-c62x.c: Remove.
2840 * features/tic6x-c64x-linux.c: Remove.
2841 * features/tic6x-c64x.c: Remove.
2842 * features/tic6x-c64xp-linux.c: Remove.
2843 * features/tic6x-c64xp.c: Remove.
2844 * tic6x-linux-tdep.c (_initialize_tic6x_linux_tdep): Don't call
2845 initialize_tdesc_tic6x_*_linux functions.
2846 * tic6x-tdep.c (_initialize_tic6x_tdep): Don't call
2847 initialize_tdesc_tic6x_* functions.
2848
df27ae6a
YQ
28492017-10-16 Yao Qi <yao.qi@linaro.org>
2850
2851 * features/Makefile (WHICH): Remove tic6x-c64xp, tic6x-c64x
2852 tic6x-c62x.
2853 * regformats/tic6x-c62x.dat: Remove.
2854 * regformats/tic6x-c64x.dat: Remove.
2855 * regformats/tic6x-c64xp.dat: Remove.
2856
86766165
SM
28572017-10-15 Simon Marchi <simon.marchi@ericsson.com>
2858
2859 * tracepoint.c (parse_traceframe_info): Return a unique_ptr
2860 (the !HAVE_LIBEXPAT version).
2861
824dfcc3
SM
28622017-10-14 Simon Marchi <simon.marchi@ericsson.com>
2863
2864 * nat/linux-osdata.c (struct pid_pgid_entry) <operator<>: Make
2865 const.
2866
2098b393
SM
28672017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
2868
2869 * target.h: Include tracepoint.h.
2870 (enum trace_find_type): Move to tracepoint.h.
2871 (struct target_ops) <to_traceframe_info>: Return a unique ptr.
2872 * tracepoint.h: Don't include target.h
2873 (enum trace_find_type): Move from target.h.
2874 (parse_traceframe_info): Return a unique ptr.
2875 * tracepoint.c (current_traceframe_info): Change type to unique
2876 ptr.
2877 (free_traceframe_info): Remove.
2878 (clear_traceframe_info): Don't manually free
2879 current_traceframe_info.
2880 (free_result): Remove.
2881 (parse_traceframe_info): Return a unique ptr.
2882 (get_traceframe_info): Adjust to unique ptr.
2883 * ctf.c (ctf_traceframe_info): Return a unique ptr.
2884 * remote.c (remote_traceframe_info): Return a unique ptr.
2885 * tracefile-tfile.c (tfile_traceframe_info): Return a unique
2886 ptr.
2887 * target-debug.h (target_debug_print_traceframe_info_up): New
2888 macro.
2889 * target-delegates.c: Regenerate.
2890
4cdd21a8
SM
28912017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
2892
2893 * memrange.h (struct mem_range): Add constructors.
2894 * tracepoint.h (struct traceframe_info) <memory>: Change type to
2895 std::vector<mem_range>.
2896 * tracepoint.c (free_traceframe_info): Don't manually free
2897 vector.
2898 (traceframe_info_start_memory): Adjust to vector change.
2899 (traceframe_available_memory): Likewise.
2900 * tracefile-tfile.c (build_traceframe_info): Likewise.
2901 * ctf.c (ctf_traceframe_info): Likewise.
2902
d0d292a2
SM
29032017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
2904
2905 * tracepoint.h (struct traceframe_info) <tvars>: Change type to
2906 std::vector<int>.
2907 * tracepoint.c (free_traceframe_info): Deallocate with delete.
2908 (traceframe_info_start_tvar): Adjust to vector change.
2909 (parse_traceframe_info): Allocate with new.
2910 * ctf.c (ctf_traceframe_info): Allocate with new, adjust to
2911 vector change.
2912 * tracefile-tfile.c (build_traceframe_info): Adjust to vector
2913 change.
2914 tfile_traceframe_info): Allocate with new.
2915 * mi/mi-main.c (mi_cmd_trace_frame_collected): Adjust to vector
2916 change.
2917
8d3c73ef
SM
29182017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
2919
2920 * tracepoint.c (traceframe_info): Rename to...
2921 (current_traceframe_info): ...this.
2922 (clear_traceframe_info): Adjust.
2923 (get_traceframe_info): Adjust.
2924
b129dcac
SM
29252017-10-14 Simon Marchi <simon.marchi@ericsson.com>
2926
2927 * nat/linux-osdata.c: Include algorithm.
2928 (compare_processes): Remove.
2929 (struct pid_pgid_entry): New struct.
2930 (linux_xfer_osdata_processgroups): Use std::vector instead of
2931 XNEWVEC.
2932
af5bf4ad
SM
29332017-10-14 Simon Marchi <simon.marchi@ericsson.com>
2934
2935 * objfiles.h: Don't include symfile.h.
2936 (struct partial_symbol): Remove forward-declaration.
2937 (struct objfile) <global_psymbols, static_psymbols>: Change type
2938 to std::vector<partial_symbol *>.
2939 * objfiles.c (objfile::objfile): Don't memset those fields.
2940 (objfile::~objfile): Don't free those fields.
2941 * psympriv.h (struct psymbol_allocation_list): Remove
2942 forward-declaration.
2943 (add_psymbol_to_list): Change psymbol_allocation_list parameter
2944 to std::vector.
2945 (start_psymtab_common): Change parameters to std::vector.
2946 * psymtab.c: Include algorithm.
2947 (require_partial_symbols): Call shrink_to_fit.
2948 (find_pc_sect_psymbol): Adjust to vector change.
2949 (match_partial_symbol): Likewise.
2950 (lookup_partial_symbol): Likewise.
2951 (psym_relocate): Likewise.
2952 (dump_psymtab): Likewise.
2953 (recursively_search_psymtabs): Likewise.
2954 (compare_psymbols): Remove.
2955 (sort_pst_symbols): Adjust to vector change.
2956 (start_psymtab_common): Likewise.
2957 (end_psymtab_common): Likewise.
2958 (psymbol_bcache_full): De-constify return value.
2959 (add_psymbol_to_bcache): Likewise.
2960 (extend_psymbol_list): Remove.
2961 (append_psymbol_to_list): Adjust to vector change.
2962 (add_psymbol_to_list): Likewise.
2963 (init_psymbol_list): Likewise.
2964 (maintenance_info_psymtabs): Likewise.
2965 (maintenance_check_psymtabs): Likewise.
2966 * symfile.h (struct psymbol_allocation_list): Remove.
2967 * symfile.c (reread_symbols): Adjust to vector change.
2968 * dbxread.c (start_psymtab): Change type of parameters.
2969 (dbx_symfile_read): Adjust to vector change.
2970 (read_dbx_symtab): Likewise.
2971 (start_psymtab): Change type of parameters.
2972 * dwarf2read.c (dwarf2_build_psymtabs): Adjust to vector change.
2973 (create_partial_symtab): Likewise.
2974 (add_partial_symbol): Likewise.
2975 (write_one_signatured_type): Likewise.
2976 (recursively_write_psymbols): Likewise.
2977 * mdebugread.c (parse_partial_symbols): Likewise.
2978 * xcoffread.c (xcoff_start_psymtab): Change type of parameters.
2979 (scan_xcoff_symtab): Adjust to vector change.
2980 (xcoff_initial_scan): Likewise.
2981
3ec5942f
SM
29822017-10-13 Simon Marchi <simon.marchi@ericsson.com>
2983
2984 * ada-typeprint.c (print_dynamic_range_bound): Use std::string.
2985
2399fe6a
YQ
29862017-10-13 Yao Qi <yao.qi@linaro.org>
2987
2988 * features/Makefile: Remove tic6x-*-expedite, add tic6x-expedite.
2989 Remove s390x-*-expedite, add s390x-expedite.
2990
4bf3f4a8
YQ
29912017-10-13 Yao Qi <yao.qi@linaro.org>
2992
2993 * features/s390-gs-linux64.c: Regenerated.
2994 * features/s390x-gs-linux64.c: Regenerated.
2995
9e86da07
TT
29962017-10-13 Tom Tromey <tom@tromey.com>
2997
2998 * compile/compile-object-run.c (do_module_cleanup): Use delete.
2999 * solib.c (update_solib_list, reload_shared_libraries_1): Use
3000 delete.
3001 * symfile.c (symbol_file_add_with_addrs): Use new.
3002 (symbol_file_add_separate): Update comment.
3003 (syms_from_objfile_1, remove_symbol_file_command): Use delete.
3004 * jit.c (jit_object_close_impl): Use new.
3005 (jit_unregister_code): Use delete.
3006 * objfiles.c (objfile::objfile): Rename from allocate_objfile.
3007 (~objfile): Rename from free_objfile.
3008 (free_objfile_separate_debug, do_free_objfile_cleanup)
3009 (free_all_objfiles, objfile_purge_solibs): Use delete.
3010 * objfiles.h (struct objfile): Add constructor and destructor.
3011 Use DISABLE_COPY_AND_ASSIGN. Add initializers to data members.
3012 (allocate_objfile, free_objfile): Don't declare.
3013 (struct objstats): Add initializers.
3014
c2508e90
SM
30152017-10-12 Simon Marchi <simon.marchi@ericsson.com>
3016
3017 * arch-utils.h (simple_displaced_step_copy_insn): Remove.
3018 * arch-utils.c (simple_displaced_step_copy_insn): Remove.
3019 * gdbarch.sh (displaced_step_copy_insn): Adjust comment.
3020 * gdbarch.h: Regenerate.
3021 * i386-linux-tdep.c (i386_linux_displaced_step_copy_insn):
3022 Adjust comment.
3023 * i386-tdep.c (i386_displaced_step_copy_insn): Adjust comment.
3024 (i386_displaced_step_fixup): Adjust comment.
3025 * rs6000-tdep.c (ppc_displaced_step_copy_insn): Adjust comment.
3026
a900ff72
TT
30272017-10-12 Tom Tromey <tom@tromey.com>
3028
3029 * prologue-value.h (pv_area::store_would_trash): Return bool.
3030 (pv_area::find_reg): Likewise.
3031 * prologue-value.c (pv_area::store_would_trash): Return bool.
3032 (pv_area::find_reg): Likewise.
3033
f7b7ed97
TT
30342017-10-12 Tom Tromey <tom@tromey.com>
3035
3036 * s390-linux-tdep.c (s390_store, s390_load)
3037 (s390_check_for_saved, s390_analyze_prologue): Update.
3038 * rx-tdep.c (check_for_saved, rx_analyze_prologue): Update.
3039 * rl78-tdep.c (rl78_analyze_prologue, check_for_saved): Update.
3040 * prologue-value.h (class pv_area): Move from prologue-value.c.
3041 Change names of members. Add constructor, destructor, member
3042 functions.
3043 (make_pv_area, free_pv_area, make_cleanup_free_pv_area)
3044 (pv_area_store, pv_area_fetch, pv_area_store_would_trash)
3045 (pv_area_fetch, pv_area_scan): Don't declare.
3046 * prologue-value.c (struct pv_area::area_entry): Now member of
3047 pv_area.
3048 (struct pv_area): Move to prologue-value.h.
3049 (pv_area::pv_area): Rename from make_pv_area.
3050 (pv_area::~pv_area): Rename from free_pv_area.
3051 (do_free_pv_area_cleanup, make_cleanup_free_pv_area): Remove.
3052 (clear_entries, find_entry, overlaps, store_would_trash, store)
3053 (fetch, find_reg, scan): Now member of pv_area.
3054 Remove "area" argument. Update.
3055 * msp430-tdep.c (check_for_saved, msp430_analyze_prologue):
3056 Update.
3057 * mn10300-tdep.c (push_reg, check_for_saved)
3058 (mn10300_analyze_prologue): Update.
3059 * mep-tdep.c (is_arg_spill, check_for_saved)
3060 (mep_analyze_prologue): Update.
3061 * m32c-tdep.c (m32c_pv_push, m32c_srcdest_fetch)
3062 (m32c_srcdest_store, m32c_pv_enter, m32c_is_arg_spill)
3063 (m32c_is_struct_return, m32c_analyze_prologue): Update.
3064 * arm-tdep.c (thumb_analyze_prologue, arm_analyze_prologue):
3065 Update.
3066 * arc-tdep.c (arc_is_in_prologue, arc_analyze_prologue): Update.
3067 * aarch64-tdep.c (aarch64_analyze_prologue): Update.
3068
466eecee
SM
30692017-10-12 Simon Marchi <simon.marchi@ericsson.com>
3070
3071 * linux-nat.h (linux_nat_set_delete_thread): New declaration.
3072 * linux-nat.c (linux_nat_delete_thread): New variable.
3073 (lwp_free): Invoke linux_nat_delete_thread if set.
3074 (linux_nat_set_delete_thread): New function.
3075 * aarch64-linux-nat.c (_initialize_aarch64_linux_nat): Assign
3076 thread delete callback.
3077 * arm-linux-nat.c (arm_linux_delete_thread): New function.
3078 (_initialize_arm_linux_nat): Assign thread delete callback.
3079 * s390-linux-nat.c (s390_delete_thread): New function.
3080 (_initialize_s390_nat): Assign thread delete callback.
3081 * x86-linux-nat.c (x86_linux_add_target): Likewise.
3082 * nat/aarch64-linux.c (aarch64_linux_delete_thread): New
3083 function.
3084 * nat/aarch64-linux.h (aarch64_linux_delete_thread): New
3085 declaration.
3086 * nat/x86-linux.c (x86_linux_delete_thread): New function.
3087 * nat/x86-linux.h (x86_linux_delete_thread): New declaration.
3088
f71c8822
TT
30892017-10-09 Tom Tromey <tom@tromey.com>
3090
3091 * tui/tui-win.c (tui_set_win_height, parse_scrolling_args): Use
3092 std::string.
3093 * tui/tui-layout.c (enum tui_status): Use std::string.
3094
981a3fb3
TT
30952017-10-11 Tom Tromey <tom@tromey.com>
3096
3097 * gdbthread.h (thread_command): Constify.
3098 * inferior.h (detach_command): Constify.
3099 * top.h (set_history, show_history): Constify.
3100 * arm-tdep.c (set_arm_command, show_arm_command): Constify.
3101 * serial.c (serial_set_cmd, serial_show_cmd): Constify.
3102 * bsd-kvm.c (bsd_kvm_cmd): Constify.
3103 * printcmd.c (set_command): Constify.
3104 (non_const_set_command): New function.
3105 * dcache.c (set_dcache_command, show_dcache_command): Constify.
3106 * breakpoint.c (enable_command, disable_command, delete_command)
3107 (catch_command, tcatch_command, set_breakpoint_cmd)
3108 (show_breakpoint_cmd): Constify.
3109 * macrocmd.c (macro_command): Constify.
3110 * infcmd.c (unset_command, kill_command, detach_command)
3111 (info_proc_cmd): Constify.
3112 * i386-tdep.c (set_mpx_cmd, show_mpx_cmd): Constify.
3113 * auto-load.c (show_auto_load_cmd, set_auto_load_cmd)
3114 (info_auto_load_cmd): Constify.
3115 * target-descriptions.c (set_tdesc_cmd, show_tdesc_cmd)
3116 (unset_tdesc_cmd): Constify.
3117 * ada-lang.c (set_ada_command, show_ada_command)
3118 (maint_set_ada_cmd, maint_show_ada_cmd): Constify.
3119 * guile/guile.c (set_guile_command, show_guile_command)
3120 (info_guile_command): Constify.
3121 * tui/tui-win.c (tui_command, set_tui_cmd, show_tui_cmd):
3122 Constify.
3123 * skip.c (skip_command): Constify.
3124 * compile/compile.c (_initialize_compile): Constify.
3125 * dwarf2read.c (set_dwarf_cmd, show_dwarf_cmd): Constify.
3126 * btrace.c (maint_btrace_cmd, maint_btrace_set_cmd)
3127 (maint_btrace_show_cmd, maint_btrace_pt_set_cmd)
3128 (maint_btrace_pt_show_cmd): Constify.
3129 * remote.c (set_remote_cmd, show_remote_cmd, remote_command):
3130 Constify.
3131 * python/python.c (user_show_python, user_set_python): Constify.
3132 * mips-tdep.c (set_mips_command, show_mips_command)
3133 (set_mipsfpu_command): Constify.
3134 * record-btrace.c (cmd_record_btrace_start)
3135 (cmd_set_record_btrace, cmd_show_record_btrace)
3136 (cmd_set_record_btrace_bts, cmd_show_record_btrace_bts)
3137 (cmd_set_record_btrace_pt, cmd_show_record_btrace_pt): Constify.
3138 * rs6000-tdep.c (set_powerpc_command, show_powerpc_command):
3139 Constify.
3140 * symfile.c (overlay_command): Constify.
3141 * spu-tdep.c (set_spu_command, show_spu_command): Constify.
3142 * cli/cli-logging.c (set_logging_command, show_logging_command):
3143 Constify.
3144 * cli/cli-dump.c (dump_command, append_command)
3145 (srec_dump_command, ihex_dump_command, verilog_dump_command)
3146 (tekhex_dump_command, binary_dump_command)
3147 (binary_append_command): Constify.
3148 * cli/cli-decode.c (struct cmd_list_element): Change type of
3149 "fun".
3150 * cli/cli-cmds.c (info_command, show_command, set_debug)
3151 (show_debug): Constify.
3152 (show_command): Add non-const overload.
3153 * top.c (set_history, show_history): Constify.
3154 * sh-tdep.c (set_sh_command, show_sh_command): Constify.
3155 * command.h (add_prefix_cmd): Accept a cmd_const_cfunc_ftype.
3156 * target.c (target_command): Constify.
3157 * sparc64-tdep.c (info_adi_command): Constify.
3158 * record-full.c (cmd_record_full_start): Constify.
3159 (set_record_full_command): Constify. Fix typo.
3160 (show_record_full_command): Constify.
3161 * thread.c (thread_command, thread_apply_command): Constify.
3162 * memattr.c (dummy_cmd): Constify.
3163 * value.c (function_command): Constify.
3164 * frame.c (set_backtrace_cmd, show_backtrace_cmd): Constify.
3165 * probe.c (info_probes_command): Constify.
3166 * ser-tcp.c (set_tcp_cmd, show_tcp_cmd): Constify.
3167 * gnu-nat.c (set_task_cmd, show_task_cmd, set_thread_cmd)
3168 (show_thread_cmd, set_thread_default_cmd)
3169 (show_thread_default_cmd): Constify.
3170 (check_empty): Constify.
3171 * tracepoint.c (tfind_command): Constify.
3172 * cp-support.c (maint_cplus_command): Constify.
3173 * windows-tdep.c (info_w32_command): Constify.
3174 * record.c (cmd_record_start, set_record_command)
3175 (show_record_command, info_record_command, cmd_record_goto):
3176 Constify.
3177 * ravenscar-thread.c (set_ravenscar_command)
3178 (show_ravenscar_command): Constify.
3179 * utils.c (set_internal_problem_cmd, show_internal_problem_cmd):
3180 Constify.
3181 (add_internal_problem_command): Remove casts.
3182 * arc-tdep.c (maintenance_print_arc_command): Constify.
3183 * valprint.c (set_print, show_print, set_print_raw)
3184 (show_print_raw): Constify.
3185 * maint.c (maintenance_command, maintenance_info_command)
3186 (maintenance_print_command, maintenance_set_cmd)
3187 (maintenance_show_cmd, set_per_command_cmd)
3188 (show_per_command_cmd, maintenance_check_command): Constify.
3189 * language.c (set_check, show_check): Constify.
3190 * typeprint.c (show_print_type, set_print_type): Constify.
3191 * go32-nat.c (go32_info_dos_command): Constify.
3192
fdf44873
TT
31932017-10-11 Tom Tromey <tom@tromey.com>
3194
3195 * breakpoint.c (prepare_re_set_context): Remove.
3196 (breakpoint_re_set_one): Update. Don't use cleanups.
3197 (breakpoint_re_set): Use scoped_restore, std::string, and
3198 scoped_restore_current_language.
3199
81b1e71c
TT
32002017-10-11 Tom Tromey <tom@tromey.com>
3201
3202 * breakpoint.c (commands_command_1): Use std::string.
3203 (cleanup_executing_breakpoints): Remove.
3204 (bpstat_do_actions_1): Use scoped_restore.
3205 (bpstat_check_watchpoint): Use std::string.
3206 (decode_static_tracepoint_spec): Likewise.
3207 (break_range_command): Likewise.
3208 (watch_command_1): Likewise.
3209 (compare_breakpoints): Change argument types.
3210 (clear_command): Use std::vector.
3211 (cleanup_executing_breakpoints): Remove.
3212 (update_global_location_list): Use unique_xmalloc_ptr.
3213 (strace_command): Remove unused declaration.
3214
4f9d9906
JB
32152017-10-11 John Baldwin <jhb@FreeBSD.org>
3216
3217 * Makefile.in (ALLDEPFILES): Add arm-fbsd-nat.c.
3218 * NEWS: Mention new FreeBSD/arm native configuration.
3219 * configure.host: Add arm*-*-freebsd*.
3220 * configure.nat: Likewise.
3221 * arm-fbsd-nat.c: New file.
3222
7176dfd2
JB
32232017-10-11 John Baldwin <jhb@FreeBSD.org>
3224
3225 * Makefile.in (ALL_TARGET_OBS): Add arm-fbsd-tdep.o.
3226 (ALLDEPFILES): Add arm-fbsd-tdep.c.
3227 * NEWS: Mention new FreeBSD/arm target.
3228 * configure.tgt: Add arm*-*-freebsd*.
3229 * arm-fbsd-tdep.c: New file.
3230 * arm-fbsd-tdep.h: New file.
3231
fe220226
MR
32322017-10-11 Maciej W. Rozycki <macro@imgtec.com>
3233
3234 * linux-tdep.c (linux_make_corefile_notes): Remove call to
3235 `gdbarch_elfcore_write_linux_prpsinfo'.
3236 * gdbarch.sh (elfcore_write_linux_prpsinfo): Remove architecture
3237 method.
3238 (elf_internal_linux_prpsinfo): Remove declaration.
3239 * gdbarch.h: Regenerate.
3240 * gdbarch.c: Regenerate.
3241
a2f63b2e
MR
32422017-10-11 Maciej W. Rozycki <macro@imgtec.com>
3243
3244 * ppc-linux-tdep.c (ppc_linux_init_abi): Remove call to
3245 `set_gdbarch_elfcore_write_linux_prpsinfo'.
3246
458ca1d0
PA
32472017-10-11 Pedro Alves <palves@redhat.com>
3248
3249 * breakpoint.c (reattach_breakpoints): Delete.
3250 * breakpoint.h (reattach_breakpoints): Delete.
3251
905014d7
SM
32522017-10-11 Simon Marchi <simon.marchi@ericsson.com>
3253
3254 * symfile.c (registered_sym_fns): Make struct, not typedef.
3255 (DEF_VEC_O (registered_sym_fns)): Remove.
3256 (symtab_fns): Change type to std::vector.
3257 (add_symtab_fns): Adjust.
3258 (find_sym_fns): Adjust.
3259
56d704da
AK
32602017-10-11 Anton Kolesov <Anton.Kolesov@synopsys.com>
3261
3262 * arc-tdep.c (arc_gdbarch_init): Pass proper cpu value to disassembler.
3263 * arc-tdep.h (arc_arch_is_em): New function.
3264 (arc_arch_is_hs): Likewise.
3265
7fa29be9
EB
32662017-10-11 Egeyar Bagcioglu <egeyar.bagcioglu@oracle.com>
3267
3268 * macrotab.h (macro_lookup_inclusion): Remove unnecessary
3269 parentheses in the declaration.
3270 (macro_lookup_inclusion): Likewise.
3271 (macro_lookup_definition): Likewise.
3272 * p-lang.h (pascal_builtin_types): Likewise.
3273 * tui/tui-data.c (tui_win_list): Likewise.
3274 * tui/tui-data.h (tui_win_list): Likewise.
3275 * utils.h (make_cleanup_free_section_addr_info): Likewise.
3276
d9b477e3
KB
32772017-10-11 Mark Rages <markrages@gmail.com>
3278
3279 * target-memory.c (block_boundaries): Fix for block address not
3280 aligned on block size.
3281
65630365
PA
32822017-10-10 Pedro Alves <palves@redhat.com>
3283 Tom Tromey <tom@tromey.com>
3284
3285 * breakpoint.c (struct captured_breakpoint_query_args)
3286 (do_captured_breakpoint_query, gdb_breakpoint_query): Delete.
3287 (print_breakpoint): New.
3288 * breakpoint.h (print_breakpoint): Declare.
3289 * common/common-exceptions.h (enum return_reason): Remove
3290 references to catch_exceptions.
3291 * exceptions.c (catch_exceptions, catch_exceptions_with_msg):
3292 Delete.
3293 * exceptions.h (catch_exceptions_ftype, catch_exceptions)
3294 (catch_exception_ftype, catch_exceptions_with_msg): Delete.
3295 * gdb.h: Delete.
3296 * gdbthread.h (thread_select): Declare.
3297 * mi/mi-cmd-break.c: Don't include gdb.h.
3298 (breakpoint_notify): Use print_breakpoint.
3299 * mi/mi-cmd-catch.c: Don't include gdb.h.
3300 * mi/mi-interp.c: Don't include gdb.h.
3301 (mi_print_breakpoint_for_event): New.
3302 (mi_breakpoint_created, mi_breakpoint_modified): Use
3303 mi_print_breakpoint_for_event.
3304 * mi/mi-main.c: Don't include gdb.h.
3305 (mi_cmd_thread_select): Parse the global thread ID here. Use
3306 thread_select instead of gdb_thread_select.
3307 (mi_cmd_thread_list_ids): Output "thread-ids" tuple here instead
3308 of using gdb_list_thread_ids.
3309 * remote-fileio.c (do_remote_fileio_request): Change type. Reply
3310 FILEIO_ENOSYS here.
3311 (remote_fileio_request): Use TRY/CATCH instead of
3312 catch_exceptions.
3313 * symfile-mem.c (struct symbol_file_add_from_memory_args)
3314 (symbol_file_add_from_memory_wrapper): Delete.
3315 (add_vsyscall_page): Use TRY/CATCH instead of catch_exceptions.
3316 * thread.c: Don't include gdb.h.
3317 (do_captured_list_thread_ids, gdb_list_thread_ids): Delete.
3318 (thread_alive): Use thread_select.
3319 (do_captured_thread_select): Delete, parts salvaged as ...
3320 (thread_select): ... this new function.
3321 (gdb_thread_select): Delete.
3322
bf469271
PA
33232017-10-10 Pedro Alves <palves@redhat.com>
3324 Tom Tromey <tom@tromey.com>
3325
3326 * breakpoint.c (breakpoint_cond_eval): Change return type to bool
3327 and reverse logic.
3328 (WP_DELETED, WP_VALUE_CHANGED, WP_VALUE_NOT_CHANGED, WP_IGNORE):
3329 No longer macros. Instead ...
3330 (enum wp_check_result): They're now values of this new
3331 enumeration.
3332 (watchpoint_check): Change return type to wp_check_result and
3333 parameter type to bpstat.
3334 (bpstat_check_watchpoint): Use TRY/CATCH instead of catch_errors.
3335 (bpstat_check_breakpoint_conditions): Use TRY/CATCH instead of
3336 catch_errors. Reverse logic of watchpoint_check call.
3337 (breakpoint_re_set_one): Now returns void and takes a breakpoint
3338 pointer as parameter.
3339 (breakpoint_re_set): Use TRY/CATCH instead of catch_errors.
3340 * common/common-exceptions.c (throw_exception_sjlj): Update
3341 comments to avoid mentioning catch_errors.
3342 * exceptions.c (catch_errors): Delete.
3343 * exceptions.h: Update comments to avoid mentioning catch_errors.
3344 (catch_errors_ftype, catch_errors): Delete.
3345 * infrun.c (normal_stop): Use TRY/CATCH instead of catch_errors.
3346 (hook_stop_stub): Delete.
3347 (restore_selected_frame): Change return type to void, and
3348 parameter type to const frame_id &.
3349 (restore_infcall_control_state): Use TRY/CATCH instead of
3350 catch_errors.
3351 * main.c (captured_command_loop): Return void and remove
3352 parameter. Remove references to catch_errors.
3353 (captured_main): Use TRY/CATCH instead of catch_errors.
3354 * objc-lang.c (objc_submethod_helper_data)
3355 (find_objc_msgcall_submethod_helper): Delete.
3356 (find_objc_msgcall_submethod): Use TRY/CATCH instead of
3357 catch_errors.
3358 * record-full.c (record_full_message): Return void.
3359 (record_full_message_args, record_full_message_wrapper): Delete.
3360 (record_full_message_wrapper_safe): Return bool and use TRY/CATCH
3361 instead of catch_errors.
3362 * solib-aix.c (solib_aix_open_symbol_file_object): Change
3363 parameter type to int.
3364 * solib-darwin.c (open_symbol_file_object): Ditto.
3365 * solib-dsbt.c (open_symbol_file_object): Ditto.
3366 * solib-frv.c (open_symbol_file_object): Ditto.
3367 * solib-svr4.c (open_symbol_file_object): Ditto.
3368 * solib-target.c (solib_target_open_symbol_file_object): Ditto.
3369 * solib.c (update_solib_list): Use TRY/CATCH instead of
3370 catch_errors.
3371 * solist.h (struct target_so_ops) <open_symbol_file_object>:
3372 Change type.
3373 * symmisc.c (struct print_symbol_args): Remove.
3374 (dump_symtab_1): Use TRY/CATCH instead of catch_errors.
3375 (print_symbol): Change type.
3376 * windows-nat.c (handle_load_dll, handle_unload_dll): Return void
3377 and remove parameters.
3378 (catch_errors): New.
3379 (get_windows_debug_event): Adjust.
3380
1a56bfa5
TT
33812017-10-09 Tom Tromey <tom@tromey.com>
3382
3383 * mi/mi-main.c (free_splay_tree): Remove.
3384 (list_available_thread_groups): Use splay_tree_up.
3385 * common/gdb_splay_tree.h: New file.
3386
0c478e2d
TT
33872017-10-09 Tom Tromey <tom@tromey.com>
3388
3389 * mi/mi-main.c (do_nothing): Remove.
3390 (list_available_thread_groups): Update.
3391
cbd2b4e3
PA
33922017-10-09 Pedro Alves <palves@redhat.com>
3393
3394 * infrun.c (handle_inferior_event_1) <TARGET_WAITKIND_EXECD>: Skip
3395 reading registers when switching context.
3396
a181c0bf
JB
33972017-10-09 John Baldwin <jhb@FreeBSD.org>
3398
3399 * fbsd-nat.c (fbsd_siginfo_size): Use gdbarch_long_bit.
3400 (fbsd_convert_siginfo): Likewise.
3401 * fbsd-tdep.c (fbsd_core_xfer_siginfo): Likewise.
3402
6e66f753
SM
34032017-10-09 Simon Marchi <simon.marchi@polymtl.ca>
3404
3405 * configure.ac (try_guile_versions): Remove guile-2.2.
3406 * configure: Regenerate.
3407
890e9790
TT
34082017-10-09 Tom Tromey <tom@tromey.com>
3409
3410 * Makefile.in (COMPILE.post, POSTCOMPILE): Restore $(basename).
3411 (COMPILE.pre): Use $(CXX).
3412
109483d9
PA
34132017-10-09 Pedro Alves <palves@redhat.com>
3414
3415 * cp-support.c (cp_remove_params): Return a gdb::unique_xmalloc_ptr.
3416 Use bool.
3417 (overload_list_add_symbol): Adjust to use gdb::unique_xmalloc_ptr.
3418 * cp-support.h (cp_remove_params): Now returns a
3419 gdb::unique_xmalloc_ptr.
3420 * dwarf2read.c (find_slot_in_mapped_hash): Now returns bool.
3421 Adjust to cp_remove_params returning a gdb::unique_xmalloc_ptr.
3422 * psymtab.c (psymtab_search_name): Adjust to cp_remove_params
3423 returning a gdb::unique_xmalloc_ptr.
3424 (lookup_partial_symbol): Adjust to use gdb::unique_xmalloc_ptr.
3425 * stack.c (find_frame_funname): Adjust to cp_remove_params
3426 returning a gdb::unique_xmalloc_ptr.
3427
791afaa2
TT
34282017-10-08 Tom Tromey <tom@tromey.com>
3429
3430 * dwarf2read.c (dwarf2_get_dwz_file): Use
3431 gdb::unique_xmalloc_ptr.
3432 (find_slot_in_mapped_hash): Likewise.
3433 (dwarf2_physname): Likewise.
3434 (create_dwo_unit_in_dwp_v1): Use std::string.
3435 (create_dwo_unit_in_dwp_v2): Likewise.
3436 (lookup_dwo_cutu): Likewise.
3437 (inherit_abstract_dies): Use std::vector.
3438 (read_array_type): Likewise.
3439 (dwarf_decode_macros): Remove unused declaration.
3440 (unsigned_int_compar): Remove.
3441 (dwarf2_build_psymtabs_hard): Use scoped_restore.
3442 (psymtabs_addrmap_cleanup): Remove.
3443
30a9c02f
TT
34442017-10-08 Tom Tromey <tom@tromey.com>
3445
3446 * frame-unwind.c (frame_unwind_try_unwinder): Update.
3447 * frame.h (frame_cleanup_after_sniffer): Declare.
3448 (frame_prepare_for_sniffer): Return void.
3449 * frame.c (frame_cleanup_after_sniffer): No longer static. Change
3450 type of argument.
3451 (frame_prepare_for_sniffer): Return void.
3452
757325a3
TT
34532017-10-08 Tom Tromey <tom@tromey.com>
3454
3455 * utils.h (make_cleanup_value_free): Remove.
3456 * utils.c (do_value_free, struct cleanup): Remove.
3457 * dwarf2loc.c (dwarf2_evaluate_loc_desc_full) <DWARF_VALUE_STACK>:
3458 Use gdb_value_up.
3459 * value.h (struct value_deleter): New.
3460 (gdb_value_up): New typedef.
3461
b9c04fb2
TT
34622017-10-08 Tom Tromey <tom@tromey.com>
3463
3464 * symtab.c (free_search_symbols, do_free_search_symbols_cleanup)
3465 (make_cleanup_free_search_symbols): Remove.
3466 (search_symbols): Return std::vector.
3467 (symbol_search::compare_search_syms): Now member of
3468 symbol_search. Change arguments.
3469 (sort_search_symbols_remove_dups): Change arguments. Rewrite.
3470 (symtab_symbol_info, rbreak_command): Update.
3471 * symtab.h (struct symbol_search) <next>: Remove.
3472 Add constructors.
3473 (symbol_search::operator<): New function.
3474 (symbol_search::operator==): New function.
3475 (search_symbols): Remove std::vector.
3476 (free_search_symbols, make_cleanup_free_search_symbols): Remove.
3477 (symbol_search::compare_search_syms): Declare.
3478
0d28b0a5
YQ
34792017-10-06 Yao Qi <yao.qi@linaro.org>
3480
3481 * Makefile.in (ALL_64_TARGET_OBS): Replace aarch64-insn.o with
3482 arch/aarch64-insn.o.
3483 Remove one rule.
3484 * configure.tgt: Replace aarch64-insn.o with arch/aarch64-insn.o.
3485
71917808
YQ
34862017-10-06 Yao Qi <yao.qi@linaro.org>
3487
3488 * Makefile.in (ALL_TARGET_OBS): Replace arm.o, arm-get-next-pcs.o,
3489 and arm-linux.o with arch/arm.o, arch/arm-get-next-pcs.o and
3490 arch/arm-linux.o respectively.
3491 * configure.tgt: Likewise.
3492
2081b2b2
YQ
34932017-10-06 Yao Qi <yao.qi@linaro.org>
3494
3495 * Makefile.in (ALL_TARGET_OBS): Rename i386.o to arch/i386.o.
3496 * configure.tgt (i386_tobjs): Replace i386.o with arch/i386.o.
3497
a1b85d28
PA
34982017-10-06 Pedro Alves <palves@redhat.com>
3499
3500 * windows-nat.c: Include <algorithm>.
3501
d97987e2
YQ
35022017-10-06 Yao Qi <yao.qi@linaro.org>
3503
3504 * configure.tgt (i386_tobjs): New variable.
3505 (amd64_tobjs): New variable.
3506 Set $cpu_obs and $os_obs.
3507
f38307f5
YQ
35082017-10-06 Yao Qi <yao.qi@linaro.org>
3509
3510 * Makefile.in (CONFIG_SRC_SUBDIR): New.
3511 (ALL_64_TARGET_OBS): Replace amd64.o with arch/amd64.o.
3512 (clean): Remove object files and dependency files.
3513 (distclean): Remove the directory.
3514 * configure.ac: Invoke AC_CONFIG_COMMANDS.
3515 * configure: Re-generated.
3516 * configure.tgt: Replace amd64.o with arch/amd64.o.
3517
2f924de6
JM
35182017-10-05 Jose E. Marchesi <jose.marchesi@oracle.com>
3519
3520 PR build/22188
3521 * arm-tdep.c (arm_decode_misc_memhint_neon): Fix decoding of CPS
3522 and SETEND.
3523
2fd9d7ca
PA
35242017-10-05 Pedro Alves <palves@redhat.com>
3525
3526 * linux-nat.c (linux_child_follow_fork): When following the parent
3527 and detaching the child, consult the parent thread's architecture
3528 instead of the child's.
3529
d13b8493
UW
35302017-10-05 Ulrich Weigand <uweigand@de.ibm.com>
3531
3532 * ax.h: Do not include "doublest.h".
3533 (union agent_val): Remove.
3534
3b4b2f16
UW
35352017-10-05 Ulrich Weigand <uweigand@de.ibm.com>
3536
3537 * dfp.h (MAX_DECIMAL_STRING): Move to dfp.c.
3538 (decimal_to_string): Return std::string object.
3539 (decimal_from_string): Accept std::string object. Return bool.
3540 (decimal_from_integral, decimal_from_doublest): Remove.
3541 (decimal_from_longest): Add prototype.
3542 (decimal_from_ulongest): Likewise.
3543 (decimal_to_longest): Likewise.
3544 (decimal_from_doublest): Likewise.
3545 * dfp.c: Do not include "gdbtypes.h" or "value.h".
3546 (MAX_DECIMAL_STRING): Move here.
3547 (decimal_to_string): Return std::string object.
3548 (decimal_from_string): Accept std::string object. Return bool.
3549 (decimal_from_integral): Remove, replace by ...
3550 (decimal_from_longest, decimal_from_ulongest): ... these new functions.
3551 (decimal_to_longest): New function.
3552 (decimal_from_floating): Remove, replace by ...
3553 (decimal_from_doublest): ... this new function.
3554 (decimal_to_doublest): Update to new decimal_to_string interface.
3555
3556 * value.c (unpack_long): Use decimal_to_longest.
3557 * valops.c (value_cast): Use decimal_from_doublest instead of
3558 decimal_from_floating. Use decimal_from_[u]longest isntead of
3559 decimal_from_integral.
3560 * valarith.c (value_args_as_decimal): Likewise.
3561 * valprint.c (print_decimal_floating): Update to new
3562 decimal_to_string interface.
3563 * printcmd.c (printf_decfloat): Likewise.
3564 * c-exp.y (parse_number): Update to new decimal_from_string interface.
3565
1841ee5d
UW
35662017-10-05 Ulrich Weigand <uweigand@de.ibm.com>
3567
3568 * doublest.h: Do not include "floatformat.h". Remove stale comments.
3569 * gdbtypes.c: Include "floatformat.h".
3570 * value.c: Likewise.
3571 * m68k-tdep.c: Likewise.
3572
3573 * findvar.c: Do not include "floatformat.h".
3574 * amd64-darwin-tdep.c: Likewise.
3575 * arm-linux-tdep.c: Likewise.
3576 * i386-darwin-tdep.c: Likewise.
3577 * i387-tdep.c: Likewise.
3578 * m68k-linux-tdep.c: Likewise.
3579 * mep-tdep.c: Likewise.
3580 * mips-tdep.c: Likewise.
3581 * nios2-tdep.c: Likewise.
3582 * s390-linux-tdep.c: Likewise.
3583 * sparc-obsd-tdep.c: Likewise.
3584 * sparc-tdep.c: Likewise.
3585 * sparc64-tdep.c: Likewise.
3586 * spu-tdep.c: Likewise.
3587 * tic6x-tdep.c: Likewise.
3588 * tilegx-tdep.c: Likewise.
3589 * vax-tdep.c: Likewise.
3590 * xstormy16-tdep.c: Likewise.
3591 * xtensa-tdep.c: Likewise.
3592
3593 * top.c: Do not include "doublest.h".
3594 * aarch64-tdep.c: Likewise.
3595 * alpha-tdep.c: Likewise.
3596 * arm-linux-tdep.c: Likewise.
3597 * m68k-linux-tdep.c: Likewise.
3598 * tilegx-tdep.c: Likewise.
3599 * xstormy16-tdep.c: Likewise.
3600
a80a6471
JB
36012017-10-05 John Baldwin <jhb@FreeBSD.org>
3602
3603 * mips-fbsd-tdep.c (MIPS_INST_ADDIU_A0_SP_N32): Define.
3604 (mipsn32_fbsd_sigframe): Define.
3605 (mips_fbsd_init_abi): Install mipsn32_fbsd_sigframe unwinder
3606 for FreeBSD/mipsn32.
3607
12c4bd7f
JB
36082017-10-05 John Baldwin <jhb@FreeBSD.org>
3609
3610 * fbsd-tdep.c (fbsd_print_auxv_entry): Handle AT_EHDRFLAGS and
3611 AT_HWCAP.
3612
c91933e9
TG
36132017-10-05 Tristan Gingold <tgingold@free.fr>
3614
3615 * MAINTAINERS (Misc): Update my email address.
3616
5cd63fda
PA
36172017-10-04 Pedro Alves <palves@redhat.com>
3618
3619 * remote.c (get_remote_arch_state): New 'gdbarch' parameter. Use
3620 it instead of target_gdbarch.
3621 (get_remote_state, get_remote_packet_size): Adjust
3622 get_remote_arch_state calls, passing down target_gdbarch
3623 explicitly.
3624 (packet_reg_from_regnum, packet_reg_from_pnum): New parameter
3625 'gdbarch' and use it instead of target_gdbarch.
3626 (get_memory_packet_size): Adjust get_remote_arch_state calls,
3627 passing down target_gdbarch explicitly.
3628 (struct stop_reply) <arch>: New field.
3629 (remote_parse_stop_reply): Use the stopped thread's architecture,
3630 not the current inferior's. Save the architecture in the
3631 stop_reply.
3632 (process_stop_reply): Use the stop reply's architecture.
3633 (process_g_packet, remote_fetch_registers)
3634 (remote_prepare_to_store, store_registers_using_G)
3635 (remote_store_registers): Adjust get_remote_arch_state calls,
3636 using the regcache's architecture.
3637 (remote_get_trace_status): Adjust get_remote_arch_state calls,
3638 passing down target_gdbarch explicitly.
3639 * spu-multiarch.c (spu_thread_architecture): Defer to the target
3640 beneath instead of calling target_gdbarch.
3641 * target.c (default_thread_architecture): Use the specified
3642 inferior's architecture, instead of the current inferior's
3643 architecture (via target_gdbarch).
3644
ed4227b7
PA
36452017-10-04 Pedro Alves <palves@redhat.com>
3646
3647 * regcache.c (get_thread_arch_regcache): Remove null_ptid special
3648 case.
3649 (regcache_print): Handle !target_has_registers here instead.
3650
55b11ddf
PA
36512017-10-04 Pedro Alves <palves@redhat.com>
3652
3653 * frame.c (create_test_frame): Delete.
3654 * frame.h (create_test_frame): Delete.
3655 * gdbarch-selftests.c: Include gdbthread.h and target.h.
3656 (class regcache_test): Delete.
3657 (test_target_has_registers, test_target_has_stack)
3658 (test_target_has_memory, test_target_prepare_to_store)
3659 (test_target_store_registers): New functions.
3660 (test_target_ops): New class.
3661 (register_to_value_test): Error out if there's already a
3662 process_stratum (or higher) target pushed. Create a fuller mock
3663 environment, with mock target_ops, inferior, address space, thread
3664 and inferior_ptid.
3665 * progspace.c (struct address_space): Move to ...
3666 * progspace.h (struct address_space): ... here.
3667 * regcache.h (regcache::~regcache, regcache::raw_write)
3668 [GDB_SELF_TEST]: No longer virtual.
3669
4c71c105
SM
36702017-10-04 Simon Marchi <simon.marchi@ericsson.com>
3671
3672 * mi/mi-main.c (list_available_thread_groups): Reverse filter logic.
3673
73dcd72d
PA
36742017-10-04 Pedro Alves <palves@redhat.com>
3675
3676 * guile/scm-breakpoint.c (gdbscm_breakpoint_commands): Move code
3677 out of 'between TRY and CATCH'.
3678
44704526
PA
36792017-10-04 Pedro Alves <palves@redhat.com>
3680
3681 * cli/cli-cmds.c (complete_command): Add missing END_CATCH.
3682 * common/common-exceptions.h (TRY): Open an outermost scope.
3683 Expand intro comment.
3684 (CATCH): Reindent.
3685 (END_CATCH): Close the outermost scope.
3686 * completer.c (complete_line_internal): Add missing END_CATCH.
3687
bc3b087d
SDJ
36882017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
3689
3690 * NEWS (Changes since GDB 8.0): Add entry about new
3691 'set-cwd-on-gdbserver' feature.
3692 (New remote packets): Add entry for QSetWorkingDir.
3693 * common/common-inferior.h (set_inferior_cwd): New prototype.
3694 * infcmd.c (set_inferior_cwd): Remove "static".
3695 (show_cwd_command): Expand text to include remote debugging.
3696 * remote.c: Add PACKET_QSetWorkingDir.
3697 (remote_protocol_features) <QSetWorkingDir>: New entry for
3698 PACKET_QSetWorkingDir.
3699 (extended_remote_set_inferior_cwd): New function.
3700 (extended_remote_create_inferior): Call
3701 "extended_remote_set_inferior_cwd".
3702 (_initialize_remote): Call "add_packet_config_cmd" for
3703 QSetWorkingDir.
3704
d092c5a2
SDJ
37052017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
3706
3707 * NEWS (New commands): Mention "set/show cwd".
3708 * cli/cli-cmds.c (_initialize_cli_cmds): Mention "set cwd" on
3709 "cd" command's help text.
3710 * common/common-inferior.h (get_inferior_cwd): New prototype.
3711 * infcmd.c (inferior_cwd_scratch): New global variable.
3712 (set_inferior_cwd): New function.
3713 (get_inferior_cwd): Likewise.
3714 (set_cwd_command): Likewise.
3715 (show_cwd_command): Likewise.
3716 (_initialize_infcmd): Add "set/show cwd" commands.
3717 * inferior.h (class inferior) <cwd>: New field.
3718 * nat/fork-inferior.c: Include "gdb_tilde_expand.h".
3719 (fork_inferior): Change inferior's cwd before its execution.
3720 * windows-nat.c (windows_create_inferior): Pass inferior's cwd
3721 to CreateProcess.
3722
7da0a886
SDJ
37232017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
3724
3725 * Makefile.in (SFILES): Add gdb_tilde_expand.c.
3726 (HFILES_NO_SRCDIR): Add gdb_tilde_expand.h.
3727 (COMMON_OBS): Add gdb_tilde_expand.o.
3728 * common/gdb_tilde_expand.c: New file.
3729 * common/gdb_tilde_expand.h: Likewise.
3730
db8dd160
MR
37312017-10-03 Maciej W. Rozycki <macro@imgtec.com>
3732
3733 * gdbarch.sh (objfile): Remove duplicate declaration.
3734 * gdbarch.h: Regenerate.
3735
f8bfbf22
TT
37362017-10-03 Tom Tromey <tom@tromey.com>
3737
3738 * utils.c (internal_vproblem): Use string_vprintf.
3739
5178ed48
TT
37402017-10-03 Tom Tromey <tom@tromey.com>
3741
3742 * printcmd.c (info_symbol_command): Use std::string.
3743
8cff8730
TT
37442017-10-03 Tom Tromey <tom@tromey.com>
3745
3746 * top.c (gdb_safe_append_history): Use std::string.
3747
895b8f30
TT
37482017-10-03 Tom Tromey <tom@tromey.com>
3749
3750 * event-top.c (stdin_event_handler): Update.
3751 * main.c (captured_main_1): Update.
3752 * top.h (make_delete_ui_cleanup): Remove.
3753 (struct ui): Add constructor and destructor.
3754 (new_ui, delete_ui): Remove.
3755 * top.c (make_delete_ui_cleanup): Remove.
3756 (new_ui_command): Use std::unique_ptr.
3757 (delete_ui_cleanup): Remove.
3758 (ui::ui): Rename from new_ui. Update.
3759 (free_ui): Remove.
3760 (ui::~ui): Rename from delete_ui. Update.
3761
0efef640
TT
37622017-10-03 Tom Tromey <tom@tromey.com>
3763
3764 * symfile.c (load_progress): Use gdb::byte_vector.
3765
245ad7d3
TT
37662017-10-03 Tom Tromey <tom@tromey.com>
3767
3768 * mi/mi-main.c (mi_cmd_trace_frame_collected): Remove unused
3769 declaration.
3770 * printcmd.c (x_command): Remove unused declaration.
3771 * symfile.c (symbol_file_command): Remove unused declaration.
3772
e05550d7
TT
37732017-10-03 Tom Tromey <tom@tromey.com>
3774
3775 * utils.c (internal_vproblem): Use std::string.
3776 (defaulted_query): Likewise.
3777
b95de2b7
TT
37782017-10-03 Tom Tromey <tom@tromey.com>
3779
3780 * guile/scm-ports.c (ioscm_with_output_to_port_worker): Update.
3781 * top.c (execute_command_to_string): Update.
3782 * utils.c (make_cleanup_restore_page_info): Remove.
3783 (do_restore_page_info_cleanup): Remove.
3784 (set_batch_flag_and_restore_page_info):
3785 New.
3786 (make_cleanup_restore_page_info): Remove.
3787 (set_batch_flag_and_make_cleanup_restore_page_info): Remove.
3788 (~set_batch_flag_and_restore_page_info): New
3789 (make_cleanup_restore_uinteger): Remove.
3790 (make_cleanup_restore_integer): Remove.
3791 (struct restore_integer_closure): Remove.
3792 (restore_integer): Remove.
3793 * utils.h (struct set_batch_flag_and_restore_page_info): New
3794 class.
3795 (set_batch_flag_and_make_cleanup_restore_page_info): Remove.
3796 (make_cleanup_restore_page_info): Remove.
3797 (make_cleanup_restore_uinteger) Remove.
3798 (make_cleanup_restore_integer) Remove.
3799
07036511
TT
38002017-10-03 Tom Tromey <tom@tromey.com>
3801
3802 * record-full.h (record_full_gdb_operation_disable_set): Return
3803 scoped_restore_tmpl<int>.
3804 * infrun.c (adjust_pc_after_break): Update.
3805 (handle_signal_stop): Update.
3806 * record-full.c (record_full_gdb_operation_disable_set): Return
3807 scoped_restore_tmpl<int>.
3808 (record_full_wait_1, record_full_insert_breakpoint)
3809 (record_full_remove_breakpoint, record_full_save)
3810 (record_full_goto_insn): Update.
3811
45320ffa
TT
38122017-10-02 Tom Tromey <tom@tromey.com>
3813
3814 PR rust/22236:
3815 * rust-lang.c (rust_val_print_str): New function.
3816 (val_print_struct): Call it.
3817 (rust_subscript): Preserve name of slice type.
3818
b3e3859b
TT
38192017-10-02 Tom Tromey <tom@tromey.com>
3820
3821 * rust-lang.c (rust_subscript): Handle slices in
3822 EVAL_AVOID_SIDE_EFFECTS case.
3823
01af5e0d
TT
38242017-10-02 Tom Tromey <tom@tromey.com>
3825
3826 * rust-lang.c (rust_slice_type_p): Recognize &str as a slice type.
3827
888e3ddb
TT
38282017-10-02 Tom Tromey <tom@tromey.com>
3829
3830 * rust-lang.h (rust_slice_type): Add "extern".
3831
cc536b21
PA
38322017-10-02 Tom Tromey <tom@tromey.com>
3833 Pedro Alves <palves@redhat.com>
3834
3835 * ada-lang.h (ada_exc_info::operator<): Make const.
3836 (ada_exc_info::operator==): Make const.
3837 * ada-lang.c (ada_exc_info::operator<, ada_exc_info::operator==):
3838 Make const.
3839
386c8614
TT
38402017-09-29 Tom Tromey <tom@tromey.com>
3841
3842 * target.c (read_whatever_is_readable): Change type of "result".
3843 Update.
3844 (free_memory_read_result_vector): Remove.
3845 (read_memory_robust): Change return type. Update.
3846 * mi/mi-main.c (mi_cmd_data_read_memory_bytes): Update. Use
3847 bin2hex, std::string.
3848 * target.h (memory_read_result_s): Remove typedef.
3849 (free_memory_read_result_vector): Remove.
3850 (read_memory_robust): Return std::vector.
3851
789c4b5e
TT
38522017-09-29 Tom Tromey <tom@tromey.com>
3853
3854 * mi/mi-main.c (captured_mi_execute_command): Use scope_restore.
3855
ab816a27
TT
38562017-09-29 Tom Tromey <tom@tromey.com>
3857
3858 * mi/mi-cmd-info.c (mi_cmd_info_ada_exceptions): Update.
3859 * ada-lang.h (struct ada_exc_info): Remove typedef. Declare
3860 operator< and operator==.
3861 (ada_exceptions_list): Return a std::vector.
3862 * ada-lang.c (ada_exc_info::operator<): Rename from
3863 compare_ada_exception_info.
3864 (ada_exc_info::operator==): New.
3865 (sort_remove_dups_ada_exceptions_list): Change type of
3866 "exceptions".
3867 (ada_add_standard_exceptions, ada_add_exceptions_from_frame)
3868 (ada_add_global_exceptions): Likewise.
3869 (ada_exceptions_list_1): Return a std::vector.
3870 (ada_exceptions_list): Likewise.
3871
52f9abe4
TT
38722017-09-29 Tom Tromey <tom@tromey.com>
3873
3874 * mi/mi-main.c (struct print_one_inferior_data) <inferiors>: Now a
3875 'std::set *'.
3876 (print_one_inferior): Update.
3877 (free_vector_of_ints): Remove.
3878 (list_available_thread_groups): Change "ids" to std::set.
3879 (mi_cmd_list_thread_groups): Update.
3880 (struct collect_cores_data) <core>: Now a std::set.
3881 (collect_cores): Update.
3882 (unique): Remove.
3883 (print_one_inferior): Update.
3884
dcd5ddcc
TT
38852017-09-29 Tom Tromey <tom@tromey.com>
3886
3887 * mi/mi-main.c (mi_execute_cli_command): Use std::string.
3888 (mi_execute_async_cli_command): Likewise.
3889 (mi_cmd_trace_frame_collected): Use field_fmt.
3890
45d288cc
TT
38912017-09-29 Tom Tromey <tom@tromey.com>
3892
3893 * mi/mi-main.c (mi_cmd_data_write_memory_bytes): Use
3894 gdb::byte_vector.
3895
6afe2f4a
TT
38962017-09-29 Tom Tromey <tom@tromey.com>
3897
3898 * mi/mi-parse.c (mi_parse): Remove unused declaration.
3899
9813429a
TT
39002017-09-29 Tom Tromey <tom@tromey.com>
3901
3902 * mi/mi-cmd-disas.c (mi_cmd_disassemble): Don't copy "oarg".
3903
2d6960b4
TT
39042017-09-29 Tom Tromey <tom@tromey.com>
3905
3906 * varobj.h (varobj_gen_name): Return std::string.
3907 * varobj.c (varobj_gen_name): Return std::string.
3908 * mi/mi-cmd-var.c (mi_cmd_var_create): Use std::string.
3909 (mi_cmd_var_delete): Don't copy "name".
3910
784c453a
TT
39112017-09-29 Tom Tromey <tom@tromey.com>
3912
3913 * mi/mi-cmd-break.c (mi_argv_to_format): Return std::string.
3914 (mi_cmd_break_insert_1): Update.
3915
a9bc57b9
TT
39162017-09-29 Tom Tromey <tom@tromey.com>
3917
3918 * target.h (make_scoped_defer_target_commit_resume): Update.
3919 * target.c (make_scoped_defer_target_commit_resume): Rename from
3920 make_cleanup_defer_target_commit_resume. Return a
3921 scoped_restore.
3922 * infrun.c (proceed): Use make_scoped_defer_target_commit_resume.
3923
9754d8c4
TT
39242017-09-29 Tom Tromey <tom@tromey.com>
3925
3926 * main.c (captured_main_1): Remove unused declaration.
3927 * spu-multiarch.c (parse_spufs_run): Remove unused declaration.
3928
99ef965c
TT
39292017-09-29 Tom Tromey <tom@tromey.com>
3930
3931 * symtab.c (search_symbols): Remove unused outer cleanup.
3932 (make_source_files_completion_list): Remove unused declaration.
3933
42518ba7
TT
39342017-09-29 Tom Tromey <tom@tromey.com>
3935
3936 * mt-tdep.c (mt_push_dummy_call): Use gdb::byte_vector.
3937
726b2169
TT
39382017-09-29 Tom Tromey <tom@tromey.com>
3939
3940 * xstormy16-tdep.c (xstormy16_push_dummy_call): Use
3941 gdb::byte_vector.
3942
55b06432
TT
39432017-09-29 Tom Tromey <tom@tromey.com>
3944
3945 * complaints.c (vcomplaint): Use std::string.
3946
8abcee91
TT
39472017-09-29 Tom Tromey <tom@tromey.com>
3948
3949 * tracepoint.c (trace_variable_command): Use std::string.
3950 (encode_actions_1): Remove unused declarations.
3951 (create_tsv_from_upload): Use std::string.
3952
6ad94bc7
TT
39532017-09-29 Tom Tromey <tom@tromey.com>
3954
3955 * cp-support.c (gdb_demangle): Use std::string.
3956
2003f3d8
TT
39572017-09-29 Tom Tromey <tom@tromey.com>
3958
3959 * stack.c (parse_frame_specification): Use std::string
3960 (info_frame_command): Use gdb::unique_xmalloc_ptr.
3961
8f8accb5
TT
39622017-09-29 Tom Tromey <tom@tromey.com>
3963
3964 * tilegx-tdep.c (tilegx_push_dummy_call): Use gdb::byte_vector.
3965
200aa7b1
TT
39662017-09-29 Tom Tromey <tom@tromey.com>
3967
3968 * utils.c (vfprintf_maybe_filtered): Use std::string.
3969 (vfprintf_unfiltered): Likewise.
3970
606aae8a
TT
39712017-09-29 Tom Tromey <tom@tromey.com>
3972
3973 * event-top.c (top_level_prompt): Return std::string.
3974 (display_gdb_prompt): Update.
3975
bd413795
TT
39762017-09-29 Tom Tromey <tom@tromey.com>
3977
3978 * unittests/common-utils-selftests.c (format): New function.
3979 (string_vprintf_tests): New function.
3980 (_initialize_common_utils_selftests): Register new tests.
3981 * common/common-utils.c (string_vprintf): New function.
3982 * common/common-utils.h (string_vprintf): Declare.
3983
256642e8
PA
39842017-09-29 Pedro Alves <palves@redhat.com>
3985
3986 * common/rsp-low.c (unpack_varlen_hex): Constify.
3987 * common/rsp-low.h (unpack_varlen_hex): Constify.
3988 * linux-nat.c (linux_child_static_tracepoint_markers_by_strid):
3989 Constify.
3990 * remote.c (remote_set_permissions, read_ptid)
3991 (remote_current_thread, remote_get_threads_with_qthreadinfo)
3992 (remote_static_tracepoint_marker_at)
3993 (remote_static_tracepoint_markers_by_strid)
3994 (stop_reply_extract_thread, remote_parse_stop_reply): Constify.
3995 * tracepoint.c (parse_trace_status, parse_tracepoint_status)
3996 (parse_tracepoint_definition, parse_tsv_definition)
3997 (parse_static_tracepoint_marker_definition): Constify.
3998 * tracepoint.h (parse_static_tracepoint_marker_definition)
3999 (parse_trace_status, parse_tracepoint_status)
4000 (parse_tracepoint_definition, parse_tsv_definition): Constify.
4001
b6bb3468
PA
40022017-09-29 Pedro Alves <palves@redhat.com>
4003
4004 * remote.c (target_buf, target_buf_size): Delete.
4005 (remote_get_noisy_reply): Remove buf_p and sizeof_buf parameters.
4006 Use the connection's packet buffer instead.
4007 All callers adjusted.
4008 (_initialize_remote): Remove references to target_buf and
4009 target_buf_size.
4010
b2f8eb7a
PA
40112017-09-28 Pedro Alves <palves@redhat.com>
4012
4013 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
4014 unittests/common-utils-selftests.c.
4015 (SUBDIR_UNITTESTS_OBS): Add common-utils-selftests.o.
4016 (COMMON_OBS): Remove utils-selftests.o.
4017 * utils-selftests.c: Move to ...
4018 * unittests/common-utils-selftests.c: ... here and rename self
4019 test to "string_printf".
4020
08302ed2
DE
40212017-09-28 Alexander Shaposhnikov <alexander.v.shaposhnikov@gmail.com> (tiny patch)
4022
4023 * dwarf2read.c (open_and_init_dwp_file): Protect against dwp_file
4024 having NULL cus or tus.
4025
96a5a1d3
UW
40262017-09-27 Ulrich Weigand <uweigand@de.ibm.com>
4027
4028 * arm-tdep.c: (convert_from_extended): Remove.
4029 (convert_to_extended): Likewise.
4030 (arm_extract_return_value): Use convert_typed_floating.
4031 (arm_store_return_value): Likewise.
4032
4033 * sh-tdep.h (struct gdbarch_tdep): Add sh_littlebyte_bigword_type.
4034 * sh-tdep.c: Do not include "floatformat.h".
4035 (sh_littlebyte_bigword_type): New function.
4036 (sh_register_convert_to_virtual): Use convert_typed_floating.
4037 (sh_register_convert_to_raw): Likewise.
4038 * sh64-tdep.c: (struct gdbarch_tdep): Add sh_littlebyte_bigword_type.
4039 (sh64_littlebyte_bigword_type): New function.
4040 (sh64_extract_return_value): Use convert_typed_floating.
4041 (sh64_register_convert_to_virtual): Likewise.
4042 (sh64_register_convert_to_raw): Likewise.
4043
0db7851f
UW
40442017-09-27 Ulrich Weigand <uweigand@de.ibm.com>
4045
4046 * doublest.h (floatformat_from_type): Move to gdbtypes.h.
4047 * doublest.c (floatformat_from_type): Move to gdbtypes.c.
4048
4049 * gdbtypes.h (union type_specific): Make field floatformat hold
4050 just a single struct floatformat, not an array.
4051 (floatformat_from_type): Move here.
4052 * gdbtypes.c (floatformat_from_type): Move here. Update to
4053 changed TYPE_FLOATFORMAT definition.
4054 (verify_floatformat): Update to changed TYPE_FLOATFORMAT.
4055 (recursive_dump_type): Likewise.
4056 (init_float_type): Install correct floatformat for byte order.
4057 (arch_float_type): Likewise.
4058
77b7c781
UW
40592017-09-27 Ulrich Weigand <uweigand@de.ibm.com>
4060
4061 * gdbtypes.c (init_type): Change incoming argument from
4062 length-in-bytes to length-in-bits. Assert length is a
4063 multiple of TARGET_CHAR_BITS.
4064 (arch_type, arch_flags_type): Likewise.
4065 (init_integer_type): Update call to init_type.
4066 (init_character_type): Likewise.
4067 (init_boolean_type): Likewise.
4068 (init_float_type): Likewise.
4069 (init_decfloat_type): Likewise.
4070 (init_complex_type): Likewise.
4071 (init_pointer_type): Likewise.
4072 (objfile_type): Likewise.
4073 (arch_integer_type): Update call to arch_type.
4074 (arch_character_type): Likewise.
4075 (arch_boolean_type): Likewise.
4076 (arch_float_type): Likewise.
4077 (arch_decfloat_type): Likewise.
4078 (arch_complex_type): Likewise.
4079 (arch_pointer_type): Likewise.
4080 (gdbtypes_post_init): Likewise.
4081
4082 * dwarf2read.c (dwarf2_init_float_type): Update call to init_type.
4083 (read_base_type): Likewise.
4084 * mdebugread.c (basic_type): Likewise.
4085 * stabsread.c (dbx_init_float_type): Likewise.
4086 (rs6000_builtin_type): Likewise.
4087 (read_range_type): Likewise. Also, fix call to init_integer_type
4088 with erroneous length argument.
4089
4090 * ada-lang.c (ada_language_arch_info): Update call to arch_type.
4091 * d-lang.c (build_d_types): Likewise.
4092 * f-lang.c (build_fortran_types): Likewise.
4093 * go-lang.c (build_go_types): Likewise.
4094 * opencl-lang.c (build_opencl_types): Likewise.
4095 * jit.c (finalize_symtab): Likewise.
4096 * gnu-v3-abi.c (build_gdb_vtable_type): Likewise.
4097 (build_std_type_info_type): Likewise.
4098 * target-descriptions.c (tdesc_gdb_type): Likewise. Also,
4099 update call to arch_flags_type.
4100
4101 * linux-tdep.c (linux_get_siginfo_type_with_fields): Update call to
4102 arch_type.
4103 * fbsd-tdep.c (fbsd_get_siginfo_type): Likewise.
4104 * windows-tdep.c (windows_get_tlb_type): Likewise.
4105
4106 * avr-tdep.c (avr_gdbarch_init): Update call to arch_type.
4107 * ft32-tdep.c (ft32_gdbarch_init): Likewise.
4108 * m32c-tdep.c (make_types): Likewise.
4109 * rl78-tdep.c (rl78_gdbarch_init): Likewise.
4110 (rl78_psw_type): Update call to arch_flags_type.
4111 * m68k-tdep.c (m68k_ps_type): Update call to arch_flags_type.
4112 * rx-tdep.c (rx_psw_type): Likewise.
4113 (rx_fpsw_type): Likewise.
4114 * sparc-tdep.c (sparc_psr_type): Likewise.
4115 (sparc_fsr_type): Likewise.
4116 * sparc64-tdep.c (sparc64_pstate_type): Likewise.
4117 (sparc64_ccr_type): Likewise.
4118 (sparc64_fsr_type): Likewise.
4119 (sparc64_fprs_type): Likewise.
4120
f21b4d5c
TT
41212017-09-27 Tom Tromey <tom@tromey.com>
4122
4123 * findcmd.c (find_command): Constify.
4124
643c2ffa
TT
41252017-09-27 Tom Tromey <tom@tromey.com>
4126
4127 * ada-tasks.c (task_command_1, task_command): Constify.
4128
510e5e56
TT
41292017-09-27 Tom Tromey <tom@tromey.com>
4130
4131 * symtab.c (maintenance_print_symbol_cache)
4132 (maintenance_flush_symbol_cache)
4133 (maintenance_print_symbol_cache_statistics): Constify.
4134
e503b191
TT
41352017-09-27 Tom Tromey <tom@tromey.com>
4136
4137 * inferior.c (detach_inferior_command, kill_inferior_command)
4138 (inferior_command): Constify.
4139
4e001312
TT
41402017-09-27 Tom Tromey <tom@tromey.com>
4141
4142 * regcache.c (regcache_print, maintenance_print_registers)
4143 (maintenance_print_raw_registers)
4144 (maintenance_print_cooked_registers)
4145 (maintenance_print_register_groups)
4146 (maintenance_print_remote_registers): Constify.
4147
77763700
TT
41482017-09-27 Tom Tromey <tom@tromey.com>
4149
4150 * printcmd.c (map_display_numbers, undisplay_command)
4151 (enable_disable_display_command, enable_display_command)
4152 (disable_display_command): Constify.
4153
4495129a
TT
41542017-09-27 Tom Tromey <tom@tromey.com>
4155
4156 * breakpoint.h (delete_command): Don't declare.
4157 * breakpoint.c (delete_command, enable_once_command)
4158 (enable_count_command, enable_delete_command, breakpoint_1)
4159 (maintenance_info_breakpoints, stopin_command, stopat_command)
4160 (delete_command, delete_trace_command, save_breakpoints)
4161 (save_breakpoints_command, save_tracepoints_command): Constify.
4162
3088cf40
TT
41632017-09-27 Tom Tromey <tom@tromey.com>
4164
4165 * macrocmd.c (macro_expand_command, macro_expand_once_command)
4166 (skip_ws, extract_identifier, macro_define_command)
4167 (macro_undef_command, macro_list_command): Constify.
4168
69f476a3
TT
41692017-09-27 Tom Tromey <tom@tromey.com>
4170
4171 * infcmd.c (environment_info, set_environment_command)
4172 (unset_environment_command, path_info, info_proc_cmd_1)
4173 (info_proc_cmd_mappings, info_proc_cmd_stat)
4174 (info_proc_cmd_status, info_proc_cmd_cwd, info_proc_cmd_cmdline)
4175 (info_proc_cmd_exe, info_proc_cmd_all): Constify.
4176
c4a3e68e
TT
41772017-09-27 Tom Tromey <tom@tromey.com>
4178
4179 * i386-tdep.c (i386_mpx_info_bounds, i386_mpx_set_bounds):
4180 Constify.
4181
c9d31bd6
TT
41822017-09-27 Tom Tromey <tom@tromey.com>
4183
4184 * symfile-mem.c (add_symbol_file_from_memory_command): Constify.
4185
1f3f85eb
TT
41862017-09-27 Tom Tromey <tom@tromey.com>
4187
4188 * demangle.c (demangle_command): Constify.
4189
9c504b5d
TT
41902017-09-27 Tom Tromey <tom@tromey.com>
4191
4192 * progspace.c (maintenance_info_program_spaces_command):
4193 Constify.
4194
6663cf91
TT
41952017-09-27 Tom Tromey <tom@tromey.com>
4196
4197 * compile/compile.c (check_raw_argument, compile_file_command)
4198 (compile_code_command, compile_print_command): Constify.
4199
34e5fa26
TT
42002017-09-27 Tom Tromey <tom@tromey.com>
4201
4202 * reggroups.c (maintenance_print_reggroups): Constify.
4203
8384c356
TT
42042017-09-27 Tom Tromey <tom@tromey.com>
4205
4206 * dwarf2read.c (save_gdb_index_command): Constify.
4207
884beb0c
TT
42082017-09-27 Tom Tromey <tom@tromey.com>
4209
4210 * stap-probe.c (info_probes_stap_command): Constify.
4211
e0b2930c
TT
42122017-09-27 Tom Tromey <tom@tromey.com>
4213
4214 * fork-child.c (unset_exec_wrapper_command): Constify.
4215
f938677d
TT
42162017-09-27 Tom Tromey <tom@tromey.com>
4217
4218 * btrace.c (get_uint, get_context_size, no_chunk)
4219 (maint_btrace_packet_history_cmd)
4220 (maint_btrace_clear_packet_history_cmd, maint_btrace_clear_cmd)
4221 (maint_info_btrace_cmd): Constify.
4222
8949cb87
TT
42232017-09-27 Tom Tromey <tom@tromey.com>
4224
4225 * reverse.c (delete_bookmark_command): Constify.
4226
ac88e2de
TT
42272017-09-27 Tom Tromey <tom@tromey.com>
4228
4229 * remote.c (set_memory_packet_size)
4230 (set_memory_write_packet_size, show_memory_write_packet_size)
4231 (set_memory_read_packet_size, show_memory_read_packet_size)
4232 (compare_sections_command, packet_command, remote_put_command)
4233 (remote_get_command, remote_delete_command): Constify.
4234
bd4c9dfe
TT
42352017-09-27 Tom Tromey <tom@tromey.com>
4236
4237 * mips-tdep.c (show_mipsfpu_command, set_mipsfpu_single_command)
4238 (set_mipsfpu_double_command, set_mipsfpu_none_command)
4239 (set_mipsfpu_auto_command): Constify.
4240
5e93d4c6
TT
42412017-09-27 Tom Tromey <tom@tromey.com>
4242
4243 * cli/cli-cmds.h (cd_command): Constify.
4244 * cli/cli-cmds.c (cd_command): Constify.
4245
fc41a75b
TT
42462017-09-27 Tom Tromey <tom@tromey.com>
4247
4248 * thread.c (thread_name_command, thread_find_command): Constify.
4249
67810076
TT
42502017-09-27 Tom Tromey <tom@tromey.com>
4251
4252 * probe.c (enable_probes_command, disable_probes_command):
4253 Constify.
4254
1d8b34a7
TT
42552017-09-27 Tom Tromey <tom@tromey.com>
4256
4257 * symfile.c (symbol_file_command): Constify.
4258 * gdbcore.h (deprecated_file_changed_hook): Constify.
4259 * exec.c (deprecated_file_changed_hook, exec_file_command)
4260 (file_command): Constify.
4261 * defs.h (symbol_file_command): Constify.
4262
442019e1
TT
42632017-09-27 Tom Tromey <tom@tromey.com>
4264
4265 * remote-fileio.c (set_system_call_allowed)
4266 (show_system_call_allowed): Constify.
4267
2983f7cb
TT
42682017-09-27 Tom Tromey <tom@tromey.com>
4269
4270 * tracepoint.c (delete_trace_variable_command)
4271 (tfind_end_command, tfind_start_command, tfind_pc_command)
4272 (tfind_tracepoint_command, tfind_line_command)
4273 (tfind_range_command, tfind_outside_command): Constify.
4274
4fd41b24
TT
42752017-09-27 Tom Tromey <tom@tromey.com>
4276
4277 * ax-gdb.c (maint_agent_printf_command, agent_command)
4278 (agent_eval_command): Constify.
4279
f2fc3015
TT
42802017-09-27 Tom Tromey <tom@tromey.com>
4281
4282 * tracepoint.c (info_scope_command): Constify.
4283 * python/python.c (gdbpy_decode_line): Constify.
4284 * python/py-breakpoint.c (bppy_init): Constify.
4285 * mi/mi-cmd-break.c (mi_cmd_break_insert_1): Constify.
4286 * location.h: (new_linespec_location)
4287 (string_to_event_location_basic, string_to_event_location):
4288 Constify.
4289 * location.c (new_linespec_location)
4290 (string_to_event_location_basic, string_to_event_location):
4291 Constify.
4292 * linespec.h (decode_line_with_current_source)
4293 (decode_line_with_last_displayed, linespec_lex_to_end): Constify.
4294 * linespec.c (linespec_lex_to_end)
4295 (decode_line_with_current_source)
4296 (decode_line_with_last_displayed): Constify.
4297 * guile/scm-breakpoint.c (gdbscm_register_breakpoint_x):
4298 Constify.
4299 * cli/cli-cmds.c (edit_command, list_command): Constify.
4300 * breakpoint.h (until_break_command, watch_command_wrapper)
4301 (awatch_command_wrapper, rwatch_command_wrapper)
4302 (init_ada_exception_breakpoint): Constify.
4303 * breakpoint.c (break_command_1, dprintf_command)
4304 (break_range_command, watch_command_wrapper)
4305 (rwatch_command_wrapper, awatch_command_wrapper)
4306 (until_break_command, init_ada_exception_breakpoint)
4307 (strace_marker_create_sals_from_location, trace_command)
4308 (ftrace_command, strace_command, struct tracepoint): Constify.
4309 * ax-gdb.c (agent_command_1): Constify.
4310 * ada-lang.c (ada_exception_sal): Constify.
4311
8c2f95f4
TT
43122017-09-27 Tom Tromey <tom@tromey.com>
4313
4314 * record.c (cmd_record_delete, cmd_record_stop, cmd_record_save)
4315 (cmd_record_goto_begin, cmd_record_goto_end, get_insn_number)
4316 (get_context_size, no_chunk, get_insn_history_modifiers)
4317 (cmd_record_insn_history, get_call_history_modifiers)
4318 (cmd_record_call_history): Constify.
4319
a0d65762
TT
43202017-09-27 Tom Tromey <tom@tromey.com>
4321
4322 * source.c (show_substitute_path_command)
4323 (unset_substitute_path_command, set_substitute_path_command):
4324 Constify.
4325
58971144
TT
43262017-09-27 Tom Tromey <tom@tromey.com>
4327
4328 * typeprint.c (maintenance_print_type): Constify.
4329 * maint.c (maintenance_dump_me, maintenance_demangle)
4330 (maintenance_time_display, maintenance_info_sections)
4331 (maintenance_print_statistics, maintenance_deprecate)
4332 (maintenance_undeprecate): Constify.
4333 (maintenance_do_deprecate): Constify. Use std::string.
4334 (maintenance_selftest): Constify.
4335 * gdbtypes.h (maintenance_print_type): Constify.
4336
c482f52c
TT
43372017-09-27 Tom Tromey <tom@tromey.com>
4338
4339 * hppa-tdep.c (unwind_command): Constify.
4340
e100df1a
TT
43412017-09-27 Tom Tromey <tom@tromey.com>
4342
4343 * target-descriptions.c (unset_tdesc_filename_cmd)
4344 (maint_print_c_tdesc_cmd, maintenance_check_xml_descriptions):
4345 Constify.
4346
31d56ade
TT
43472017-09-27 Tom Tromey <tom@tromey.com>
4348
4349 * dummy-frame.c (maintenance_print_dummy_frames): Constify.
4350
b961da0b
TT
43512017-09-27 Tom Tromey <tom@tromey.com>
4352
4353 * tui/tui.c (tui_enable_command, tui_disable_command): Constify.
4354
e2d8ae16
TT
43552017-09-27 Tom Tromey <tom@tromey.com>
4356
4357 * tui/tui-regs.c (tui_reg_command): Constify.
4358
863779b0
TT
43592017-09-27 Tom Tromey <tom@tromey.com>
4360
4361 * skip.c (skip_file_command, skip_function_command)
4362 (skip_enable_command, skip_disable_command, skip_delete_command):
4363 Constify.
4364
cdb34d4a
TT
43652017-09-27 Tom Tromey <tom@tromey.com>
4366
4367 * record-btrace.c (cmd_record_btrace_bts_start)
4368 (cmd_record_btrace_pt_start): Constify.
4369
e99c83e7
TT
43702017-09-27 Tom Tromey <tom@tromey.com>
4371
4372 * symmisc.c (maintenance_print_symbols)
4373 (maintenance_print_msymbols, maintenance_print_objfiles)
4374 (maintenance_info_symtabs, maintenance_check_symtabs)
4375 (maintenance_expand_symtabs, maintenance_info_line_tables):
4376 Constify.
4377
32faf971
TT
43782017-09-27 Tom Tromey <tom@tromey.com>
4379
4380 * top.c (new_ui_command): Constify.
4381
2cf311eb
TT
43822017-09-27 Tom Tromey <tom@tromey.com>
4383
4384 * symfile.c (add_symbol_file_command)
4385 (remove_symbol_file_command, list_overlays_command)
4386 (map_overlay_command, unmap_overlay_command)
4387 (overlay_auto_command, overlay_manual_command)
4388 (overlay_off_command, overlay_load_command): Constify.
4389
e6738699
TT
43902017-09-27 Tom Tromey <tom@tromey.com>
4391
4392 * spu-tdep.c (info_spu_event_command, info_spu_signal_command)
4393 (info_spu_mailbox_command, info_spu_dma_command)
4394 (info_spu_proxydma_command): Constify.
4395
aa360cd5
TT
43962017-09-27 Tom Tromey <tom@tromey.com>
4397
4398 * cli/cli-logging.c (set_logging_on, set_logging_off): Constify.
4399
898241a5
TT
44002017-09-27 Tom Tromey <tom@tromey.com>
4401
4402 * cli/cli-script.c (user_defined_command): Constify.
4403
2d0ac106
TT
44042017-09-27 Tom Tromey <tom@tromey.com>
4405
4406 * cli/cli-dump.c (dump_memory_command, dump_value_command)
4407 (dump_srec_memory, dump_srec_value, dump_ihex_memory)
4408 (dump_ihex_value, dump_verilog_memory, dump_verilog_value)
4409 (dump_tekhex_memory, dump_tekhex_value, dump_binary_memory)
4410 (dump_binary_value, append_binary_memory, append_binary_value):
4411 Constify.
4412 (struct dump_context) <func>: Constify.
4413 (add_dump_command): Update.
4414
dede02ce
TT
44152017-09-27 Tom Tromey <tom@tromey.com>
4416
4417 * cli/cli-cmds.c (show_version, show_configuration)
4418 (source_command, show_user): Constify.
4419
d3cb6b99
TT
44202017-09-27 Tom Tromey <tom@tromey.com>
4421
4422 * target.c (maintenance_print_target_stack): Constify.
4423
1970a12f
TT
44242017-09-27 Tom Tromey <tom@tromey.com>
4425
4426 * interps.c (interpreter_exec_cmd): Constify.
4427
41243651
TT
44282017-09-27 Tom Tromey <tom@tromey.com>
4429
4430 * record-full.c (cmd_record_full_restore): Constify.
4431
4465d9db
TT
44322017-09-27 Tom Tromey <tom@tromey.com>
4433
4434 * memattr.c (enable_mem_command, disable_mem_command)
4435 (delete_mem_command): Constify.
4436
ad25e423
TT
44372017-09-27 Tom Tromey <tom@tromey.com>
4438
4439 * value.c (show_convenience): Constify.
4440
d64097b1
TT
44412017-09-27 Tom Tromey <tom@tromey.com>
4442
4443 * gdbcore.h (core_file_command): Update.
4444 * corefile.c (core_file_command): Constify.
4445
4d4589ef
TT
44462017-09-27 Tom Tromey <tom@tromey.com>
4447
4448 * user-regs.c (maintenance_print_user_registers): Constify.
4449
32a7bf17
TT
44502017-09-27 Tom Tromey <tom@tromey.com>
4451
4452 * cp-namespace.c (maintenance_cplus_namespace): Constify.
4453
4a475551
TT
44542017-09-27 Tom Tromey <tom@tromey.com>
4455
4456 * cp-support.c (first_component_command): Constify.
4457
990b9f9f
TT
44582017-09-27 Tom Tromey <tom@tromey.com>
4459
4460 * psymtab.c (maintenance_print_psymbols)
4461 (maintenance_info_psymtabs, maintenance_check_psymtabs):
4462 Constify.
4463
c281872e
TT
44642017-09-27 Tom Tromey <tom@tromey.com>
4465
4466 * windows-tdep.c (display_tib): Constify.
4467
5b64bf74
TT
44682017-09-27 Tom Tromey <tom@tromey.com>
4469
4470 * linux-fork.c (delete_checkpoint_command)
4471 (detach_checkpoint_command): Constify.
4472
4ada038f
TT
44732017-09-27 Tom Tromey <tom@tromey.com>
4474
4475 * cp-abi.c (set_cp_abi_cmd, show_cp_abi_cmd): Constify.
4476
57f5a81b
TT
44772017-09-27 Tom Tromey <tom@tromey.com>
4478
4479 * arc-tdep.c (dump_arc_instruction_command): Constify.
4480
b0a8e6c4
TT
44812017-09-27 Tom Tromey <tom@tromey.com>
4482
4483 * valprint.c (set_radix, show_radix): Constify.
4484
8d97dc1c
TT
44852017-09-27 Tom Tromey <tom@tromey.com>
4486
4487 * dtrace-probe.c (info_probes_dtrace_command): Constify.
4488
eb7c454d
TT
44892017-09-27 Tom Tromey <tom@tromey.com>
4490
4491 * command.h (not_just_help_class_command): Update.
4492 * cli/cli-decode.h (not_just_help_class_command): Update.
4493 * cli/cli-decode.c (not_just_help_class_command): Constify.
4494
e4e33335
TT
44952017-09-27 Tom Tromey <tom@tromey.com>
4496
4497 * gdb_bfd.c (maintenance_info_bfds): Constify.
4498
0450cc4c
TT
44992017-09-27 Tom Tromey <tom@tromey.com>
4500
4501 * cli/cli-decode.c (add_cmd, set_cmd_cfunc): New function
4502 overloads.
4503 (do_add_cmd): Rename from add_cmd. Don't call set_cmd_cfunc.
4504 (do_const_cfunc): New function.
4505 (cmd_cfunc_eq): New overload.
4506 (cli_user_command_p): Check do_const_cfunc.
4507 * cli/cli-decode.h (struct cmd_list_element) <function>: New field
4508 const_cfunc.
4509 * command.h (add_cmd): Add const overload and no-function
4510 overload.
4511 (set_cmd_cfunc): Add const overload.
4512 (cmd_const_cfunc_ftype): Declare.
4513 (cmd_cfunc_eq): Add const overload.
4514 * breakpoint.c, cli-cmds.c, cli-dump.c, guile/scm-cmd.c,
4515 python/py-cmd.c, target.c, tracepoint.c: Use no-function add_cmd
4516 overload.
4517
a9bbfbd8
TT
45182017-09-27 Tom Tromey <tom@tromey.com>
4519
4520 * macroexp.c (get_next_token_for_substitution): New function.
4521 (substitute_args): Call it. Check for __VA_OPT__.
4522
5230b05a
WT
45232017-09-26 Walfred Tedeschi <walfred.tedeschi@intel.com>
4524 Pedro Alves <palves@redhat.com>
4525
4526 * dwarf2read.c (dwarf2_cu): Remove field producer_is_icc and add
4527 producer_is_icc_lt_14.
4528 (producer_is_icc_lt_14): New function.
4529 (check_producer): Add code for checking version of ICC.
4530 (producer_is_icc): Move to producer.c.
4531 (read_structure_type): Restrict ICC workaround to ICC<14.
4532 * producer.c: Include selftest.h.
4533 (producer_is_icc, producer_parsing_tests, _initialize_producer):
4534 New functions.
4535 * producer.h (producer_is_icc): New declaration.
4536
b32b108a
WT
45372017-09-26 Walfred Tedeschi <walfred.tedeschi@intel.com>
4538
4539 * Makefile.in (SFILES): Add producer.c.
4540 (COMMON_OBS): Add producer.o
4541 * amd64-tdep.c (producer.h): Add new include.
4542 * dwarf2read.c (producer.h): Add new include.
4543 * producer.c: New file.
4544 * producer.h: New file.
4545 * utils.c (producer_is_gcc, producer_is_gcc_ge_4): Move to
4546 producer.c.
4547 * utils.h (producer_is_gcc, producer_is_gcc_ge_4): Move to
4548 producer.h.
4549
5007d765
MK
45502017-09-26 Matthias Klose <doko@ubuntu.com>
4551
4552 * configure.ac: Search ncursesw before ncurses.
4553 Check ncursesw/ncurses.h before ncurses/ncurses.h.
4554 * gdb_curses.h: Include <ncursesw/ncurses.h>
4555 * config.in, configure: Regenerate.
4556
281c4447
RO
45572017-09-26 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
4558
4559 PR gdb/22185
4560 * configure.host <*-*-solaris2.[01], *-*-solaris2.[2-9]*>: Mark as
4561 obsolete.
4562 Use gdb_host sol2 for i[34567]86-*-solaris2*, x86_64-*-solaris2*.
4563 Remove i386sol2 support.
4564 * configure.nat <i386sol2>: Remove.
4565 <sol2-64>: Fold into ...
4566 <sol2>: ... this.
4567 Move common settings to default section.
4568 Add sol-thread.o.
4569 * configure.tgt <i[34567]86-*-solaris2.1[0-9]*,
4570 x86_64-*-solaris2.1[0-9]*>: Rename to ...
4571 <i[34567]86-*-solaris2*, x86_64-*-solaris2*>: ... this.
4572 <i[34567]86-*-solaris*>: Remove.
4573 <sparc-*-solaris2.[0-6], sparc-*-solaris2.[0-6].*>: Remove.
4574
4575 * configure.ac: Remove wctype in libw check.
4576 (_MSE_INT_H): Don't define on Solaris 7-9.
4577 <solaris*>: Remove libthread_db.so.1 check.
4578 * configure: Regenerate.
4579 * config.in: Regenerate.
4580
4581 * proc-service.c: Remove PROC_SERVICE_IS_OLD handling.
4582 (gdb_ps_prochandle_t, gdb_ps_read_buf_t, gdb_ps_write_buf_t)
4583 (gdb_ps_size_t): Remove.
4584 Use base types in users.
4585 * sol-thread.c: Likewise, also for gdb_ps_addr_t.
4586
4587 * NEWS (Changes since GDB 8.0): Document Solaris 2.0-9 removal.
4588
39b06c20
RO
45892017-09-26 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
4590
4591 PR build/22206
4592 * sparc64-tdep.c (adi_tag_fd): Print pid as long.
4593 (adi_is_addr_mapped): Likewise.
4594 (PSR_ICC): Don't redefine.
4595 (PSR_IMPL): Likewise.
4596
6c3e20f1
TT
45972017-09-25 Tom Tromey <tom@tromey.com>
4598
4599 * regcache.c (regcache::dump): Use string_printf.
4600
b292235f
TT
46012017-09-25 Tom Tromey <tom@tromey.com>
4602
4603 * regcache.c (class regcache_invalidator): New.
4604 (struct register_to_invalidate): Remove.
4605 (make_cleanup_regcache_invalidate): Remove.
4606 (regcache::raw_write): Use regcache_invalidator.
4607
9ac86b52
TT
46082017-09-25 Tom Tromey <tom@tromey.com>
4609
4610 * spu-tdep.c (spu2ppu_sniffer): Update.
4611 * regcache.h (make_cleanup_regcache_xfree): Don't declare.
4612 * regcache.c (do_regcache_xfree, make_cleanup_regcache_xfree):
4613 Remove.
4614 * ppc-linux-tdep.c (ppu2spu_sniffer): Update.
4615 * mi/mi-main.c (mi_cmd_data_list_changed_registers): Update.
4616 * frame.h (frame_save_as_regcache): Return std::unique_ptr.
4617 * frame.c (frame_save_as_regcache): Return std::unique_ptr.
4618 (frame_pop): Update.
4619
c0e383c6
TT
46202017-09-25 Tom Tromey <tom@tromey.com>
4621
4622 * spu-tdep.c (spu2ppu_dealloc_cache): Use delete.
4623 * regcache.h (regcache_xfree): Don't declare.
4624 * regcache.c (regcache_xfree): Remove.
4625 (do_regcache_xfree): Use delete.
4626 * ppc-linux-tdep.c (ppu2spu_dealloc_cache): Use delete.
4627 * linux-fork.c (free_fork): Use delete.
4628 (fork_save_infrun_state): Likewise.
4629 * jit.c (jit_dealloc_cache): Use delete.
4630 * infrun.c (discard_infcall_suspend_state): Use delete.
4631
791199cc
TT
46322017-09-25 Tom Tromey <tom@tromey.com>
4633
4634 * regcache.h (regcache_xmalloc): Don't declare.
4635 (regcache_raw_set_cached_value): Update comment.
4636 * regcache.c (regcache_xmalloc): Remove.
4637 * ppc-linux-tdep.c (ppu2spu_sniffer): Use new.
4638 * jit.c (jit_frame_sniffer): Use new.
4639 * frame.c (frame_save_as_regcache): Use new.
4640
289e23aa
AA
46412017-09-25 Andreas Arnez <arnez@linux.vnet.ibm.com>
4642
4643 * NEWS: Advertise support for guarded-storage registers on IBM z.
4644
1b63490c
AA
46452017-09-25 Andreas Arnez <arnez@linux.vnet.ibm.com>
4646
4647 * s390-linux-nat.c (have_regset_gs): New static variable.
4648 (s390_linux_fetch_inferior_registers): Handle guarded-storage
4649 control block and guarded-storage broadcast control regsets.
4650 (s390_read_description): Detect whether the target has
4651 guarded-storage support, return appropriate tdesc.
4652 * s390-linux-tdep.c (features/s390-gs-linux64.c): New include.
4653 (features/s390x-gs-linux64.c): Likewise.
4654 (struct gdbarch_tdep) <have_gs>: New field.
4655 (s390_regmap_gs, s390_regmap_gsbc, s390_gs_regset)
4656 (s390_gsbc_regset): New variables.
4657 (s390_iterate_over_regset_sections): Iterate over s390_gs_regset
4658 and s390_gsbc_regset, if applicable.
4659 (s390_core_read_description): Check whether core file was from a
4660 target with guarded-storage support; include appropriate regsets.
4661 (s390_gdbarch_init): Add registers for guarded-storage support.
4662 (_initialize_s390_tdep): Initialize new target descriptions that
4663 include registers for guarded-storage support.
4664 * s390-linux-tdep.h (HWCAP_S390_GS, S390_GSD_REGNUM)
4665 (S390_GSSM_REGNUM, S390_GSEPLA_REGNUM)
4666 (S390_BC_GSD_REGNUM, S390_BC_GSSM_REGNUM): New defines.
4667 (S390_NUM_REGS): Adjust macro definition.
4668 (s390_gs_regset, s390_gsbc_regset, tdesc_s390_gs_linux64)
4669 (tdesc_s390x_gs_linux64): New declarations.
4670
96235dc1
AA
46712017-09-25 Andreas Arnez <arnez@linux.vnet.ibm.com>
4672
4673 * features/s390-gs-linux64.xml: New file.
4674 * features/s390-gs.xml: New file.
4675 * features/s390-gsbc.xml: New file.
4676 * features/s390x-gs-linux64.xml: New file.
4677 * features/Makefile (WHICH): Add s390-gs-linux64 and
4678 s390x-gs-linux64.
4679 (s390-gs-linux64-expedite, s390x-gs-linux64-expedite): New macros.
4680 (XMLTOC): Add s390-gs-linux64.xml and s390x-linux64.xml.
4681 * features/s390-gs-linux64.c: New generated file.
4682 * features/s390x-gs-linux64.c: New file.
4683 * regformats/s390-gs-linux64.dat: New file.
4684 * regformats/s390x-gs-linux64.dat: New file.
4685
b4a7c699
TT
46862017-09-23 Tom Tromey <tom@tromey.com>
4687
4688 * defs.h (make_cleanup_override_quit_handler): Don't declare.
4689
c2f97536
TT
46902017-09-22 Tom Tromey <tom@tromey.com>
4691
4692 * utils.c (class scoped_input_handler) <m_quit_handler>: Change
4693 type to scoped_restore_tmpl.
4694 <scoped_input_handler>: Initialize m_quit_handler directly.
4695
43573013
SDJ
46962017-09-22 Sergio Durigan Junior <sergiodj@redhat.com>
4697
4698 * cli/cli-cmds.c (pwd_command): Use "getcwd (NULL, 0)".
4699 (cd_command): Likewise. Free "current_directory" before
4700 assigning to it.
4701 * main.c (captured_main_1): Use "getcwd (NULL, 0)".
4702 * mi/mi-cmd-env.c (mi_cmd_env_pwd): Likewise.
4703 * top.c (gdb_dirbuf): Remove global declaration.
4704 * top.h (gdb_dirbuf): Likewise.
4705
6ec2e0f5
SDJ
47062017-09-22 Sergio Durigan Junior <sergiodj@redhat.com>
4707
4708 * gnulib/aclocal.m4: Regenerate.
4709 * gnulib/config.in: Regenerate.
4710 * gnulib/configure: Regenerate.
4711 * gnulib/import/Makefile.am: Regenerate.
4712 * gnulib/import/Makefile.in: Regenerate.
4713 * gnulib/import/assure.h: New file.
4714 * gnulib/import/at-func.c: Likewise
4715 * gnulib/import/chdir-long.c: New file.
4716 * gnulib/import/chdir-long.h: New file.
4717 * gnulib/import/cloexec.c: New file.
4718 * gnulib/import/cloexec.h: New file.
4719 * gnulib/import/close.c: New file.
4720 * gnulib/import/closedir.c: New file.
4721 * gnulib/import/dirent-private.h: New file.
4722 * gnulib/import/dup-safer.c: New file.
4723 * gnulib/import/dup.c: New file.
4724 * gnulib/import/dup2.c: New file.
4725 * gnulib/import/error.c: New file.
4726 * gnulib/import/error.h: New file.
4727 * gnulib/import/exitfail.c: New file.
4728 * gnulib/import/exitfail.h: New file.
4729 * gnulib/import/fchdir.c: New file.
4730 * gnulib/import/fcntl.c: New file.
4731 * gnulib/import/fcntl.in.h: New file.
4732 * gnulib/import/fd-hook.c: New file.
4733 * gnulib/import/fd-hook.h: New file.
4734 * gnulib/import/fd-safer.c: New file.
4735 * gnulib/import/fdopendir.c: New file.
4736 * gnulib/import/filename.h: New file.
4737 * gnulib/import/filenamecat-lgpl.c: New file.
4738 * gnulib/import/filenamecat.h: New file.
4739 * gnulib/import/fstat.c: New file.
4740 * gnulib/import/fstatat.c: New file.
4741 * gnulib/import/getcwd-lgpl.c: New file.
4742 * gnulib/import/getcwd.c: New file.
4743 * gnulib/import/getdtablesize.c: New file.
4744 * gnulib/import/getlogin_r.c: New file.
4745 * gnulib/import/getprogname.c: New file.
4746 * gnulib/import/getprogname.h: New file.
4747 * gnulib/import/gettext.h: New file.
4748 * gnulib/import/glob-libc.h: New file.
4749 * gnulib/import/glob.c: New file.
4750 * gnulib/import/glob.in.h: New file.
4751 * gnulib/import/intprops.h: New file.
4752 * gnulib/import/m4/chdir-long.m4: New file.
4753 * gnulib/import/m4/close.m4: New file.
4754 * gnulib/import/m4/closedir.m4: New file.
4755 * gnulib/import/m4/d-ino.m4: New file.
4756 * gnulib/import/m4/d-type.m4: New file.
4757 * gnulib/import/m4/dup.m4: New file.
4758 * gnulib/import/m4/dup2.m4: New file.
4759 * gnulib/import/m4/error.m4: New file.
4760 * gnulib/import/m4/fchdir.m4: New file.
4761 * gnulib/import/m4/fcntl.m4: New file.
4762 * gnulib/import/m4/fcntl_h.m4: New file.
4763 * gnulib/import/m4/fdopendir.m4: New file.
4764 * gnulib/import/m4/filenamecat.m4: New file.
4765 * gnulib/import/m4/fstat.m4: New file.
4766 * gnulib/import/m4/fstatat.m4: New file.
4767 * gnulib/import/m4/getcwd-abort-bug.m4: New file.
4768 * gnulib/import/m4/getcwd-path-max.m4: New file.
4769 * gnulib/import/m4/getcwd.m4: New file.
4770 * gnulib/import/m4/getdtablesize.m4: New file.
4771 * gnulib/import/m4/getlogin_r.m4: New file.
4772 * gnulib/import/m4/getprogname.m4: New file.
4773 * gnulib/import/m4/glob.m4: New file.
4774 * gnulib/import/m4/gnulib-cache.m4: Regenerate.
4775 * gnulib/import/m4/gnulib-comp.m4: Regenerate.
4776 * gnulib/import/m4/mempcpy.m4: New file.
4777 * gnulib/import/m4/memrchr.m4: New file.
4778 * gnulib/import/m4/mode_t.m4: New file.
4779 * gnulib/import/m4/msvc-inval.m4: New file.
4780 * gnulib/import/m4/msvc-nothrow.m4: New file.
4781 * gnulib/import/m4/open.m4: New file.
4782 * gnulib/import/m4/openat.m4: New file.
4783 * gnulib/import/m4/opendir.m4: New file.
4784 * gnulib/import/m4/readdir.m4: New file.
4785 * gnulib/import/m4/realloc.m4: New file.
4786 * gnulib/import/m4/rewinddir.m4: New file.
4787 * gnulib/import/m4/save-cwd.m4: New file.
4788 * gnulib/import/m4/strdup.m4: New file.
4789 * gnulib/import/m4/strerror.m4: New file.
4790 * gnulib/import/m4/unistd-safer.m4: New file.
4791 * gnulib/import/mempcpy.c: New file.
4792 * gnulib/import/memrchr.c: New file.
4793 * gnulib/import/msvc-inval.c: New file.
4794 * gnulib/import/msvc-inval.h: New file.
4795 * gnulib/import/msvc-nothrow.c: New file.
4796 * gnulib/import/msvc-nothrow.h: New file.
4797 * gnulib/import/open.c: New file.
4798 * gnulib/import/openat-die.c: New file.
4799 * gnulib/import/openat-priv.h: New file.
4800 * gnulib/import/openat-proc.c: New file.
4801 * gnulib/import/openat.c: New file.
4802 * gnulib/import/openat.h: New file.
4803 * gnulib/import/opendir.c: New file.
4804 * gnulib/import/pipe-safer.c: New file.
4805 * gnulib/import/readdir.c: New file.
4806 * gnulib/import/realloc.c: New file.
4807 * gnulib/import/rewinddir.c: New file.
4808 * gnulib/import/save-cwd.c: New file.
4809 * gnulib/import/save-cwd.h: New file.
4810 * gnulib/import/strdup.c: New file.
4811 * gnulib/import/strerror-override.c: New file.
4812 * gnulib/import/strerror-override.h: New file.
4813 * gnulib/import/strerror.c: New file.
4814 * gnulib/import/unistd--.h: New file.
4815 * gnulib/import/unistd-safer.h: New file.
4816 * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add
4817 "getcwd" and "glob".
4818 * ser-tcp.c: Undefine "close" before redefining it.
4819
432ae719
SM
48202017-09-21 Simon Marchi <simon.marchi@ericsson.com>
4821
4822 * guile/scm-value.c (gdbscm_value_address): Initialize address,
4823 get rid of res_val.
4824
4fa7574e
RO
48252017-09-22 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
4826
4827 * configure.nat <i386sol2,i386>: Add fork-inferior.o to NATDEPFILES.
4828 <sol2,sparc>: Likewise.
4829 <sol2-64,i386>: Likewise.
4830
4831 * warning.m4 (AM_GDB_WARNINGS): Disable -Wunknown-pragmas,
4832 -Wdeprecated-declarations on *-*-solaris*.
4833 * configure: Regenerate.
4834
4835 * procfs.c: Include "nat/inferior.h".
4836 (procfs_info_proc): Fix typo.
4837
f6327dcb
KB
48382017-09-21 Kevin Buettner <kevinb@redhat.com>
4839
4840 * remote.c (vector): Include.
4841 (struct private_thread_info): Add field, thread_handle.
4842 (free_private_thread_info): Deallocate storage associated with
4843 thread handle.
4844 (get_private_info_thread): Initialize `thread_handle' field.
4845 (struct thread_item): Add field, thread_handle.
4846 (clear_threads_listing_context): Deallocate storage associated
4847 with thread handle.
4848 (start_thread): Add support for "handle" attribute.
4849 (thread_attributes): Add "handle".
4850 (remote_get_threads_with_qthreadinfo): Initialize thread_handle
4851 field.
4852 (remote_update_thread_list): Update thread_handle.
4853 (remote_thread_handle_to_thread_info): New function.
4854 (init_remote_ops): Initialize to_thread_handle_to_thread_info.
4855
fbbe5337
KB
48562017-09-21 Kevin Buettner <kevinb@redhat.com>
4857
4858 * python/py-inferior.c (gdbpy_thread_from_thread_handle): New
4859 function.
4860 (inferior_object_methods): Add gdbpy_thread_from_thread_handle.
4861 * python/python-internal.h (thread_object_type): Declare.
4862
e04ee09e
KB
48632017-09-21 Kevin Buettner <kevinb@redhat.com>
4864
4865 * target.h (struct target_ops): Add to_thread_handle_to_thread_info.
4866 (target_thread_handle_to_thread_info): Declare.
4867 * target.c (target_thread_handle_to_thread_info): New function.
4868 * target-delegates.c: Regenerate.
4869 * gdbthread.h (find_thread_by_handle): Declare.
4870 * thread.c (find_thread_by_handle): New function.
4871 * linux-thread-db.c (thread_db_thread_handle_to_thread_info): New
4872 function.
4873 (init_thread_db_ops): Register thread_db_thread_handle_to_thread_info.
4874
1e5b66ed
SM
48752017-09-21 Simon Marchi <simon.marchi@ericsson.com>
4876
4877 * nat/linux-waitpid.c (linux_debug): Add ATTRIBUTE_PRINTF.
4878
ebe48ba0
SM
48792017-09-21 Simon Marchi <simon.marchi@ericsson.com>
4880
4881 * microblaze-tdep.c (microblaze_debug): Add ATTRIBUTE_PRINTF.
4882
0a0bf5dc
YQ
48832017-09-21 Yao Qi <yao.qi@linaro.org>
4884
4885 * configure.tgt (aarch64*-*-freebsd*): Add fbsd-tdep.o solib-svr4.o
4886 to gdb_target_obs.
4887
d1b0a7bf
TT
48882017-09-20 Tom Tromey <tom@tromey.com>
4889
4890 * breakpoint.c (struct counted_command_line): Remove.
4891 (breakpoint_commands): Update.
4892 (alloc_counted_command_line, incref_counted_command_line)
4893 (decref_counted_command_line, do_cleanup_counted_command_line)
4894 (make_cleanup_decref_counted_command_line): Remove.
4895 (breakpoint_set_commands, commands_command_1, ~bpstats, bpstats)
4896 (bpstat_clear_actions, bpstat_do_actions_1, watchpoint_check)
4897 (bpstat_stop_status, print_one_breakpoint_location, ~breakpoint)
4898 (save_breakpoints): Update.
4899 * breakpoint.h (counted_command_line): Now a typedef to
4900 shared_ptr.
4901 (struct breakpoint) <commands>: Now a counted_command_line.
4902 (struct bpstats) <command>: Likewise.
4903
48649e1b
TT
49042017-09-20 Tom Tromey <tom@tromey.com>
4905
4906 * breakpoint.c (struct commands_info, do_map_commands_command):
4907 Remove.
4908 (commands_command_1): Update.
4909 (iterate_over_related_breakpoints): Take a function_view.
4910 (do_delete_breakpoint, do_map_delete_breakpoint): Remove.
4911 (delete_command): Update.
4912 (map_breakpoint_numbers): Take a function_view.
4913 (do_disable_breakpoint, do_map_delete_breakpoint): Remove.
4914 (disable_command): Update.
4915 (do_enable_breakpoint, do_map_enable_breakpoint): Remove.
4916 (enable_command): Update.
4917 (struct disp_data, do_enable_breakpoint_disp)
4918 (do_map_enable_once_breakpoint, do_map_enable_count_breakpoint)
4919 (do_map_enable_delete_breakpoint): Remove.
4920 (enable_once_command, enable_count_command, enable_delete_command)
4921 (delete_trace_variable_command): Update.
4922
04afa70c
TT
49232017-09-20 Tom Tromey <tom@tromey.com>
4924
4925 * breakpoint.c (~bpstats): Rename from bpstat_free. Update.
4926 (bpstat_clear): Use delete.
4927 (bpstats): New constructors.
4928 (bpstat_copy, bpstat_stop_status): Use new.
4929 (dprintf_after_condition_true): Update.
4930 * breakpoint.h (bpstats::bpstats): Add constructors.
4931 (bpstats::~bpstats): Add destructor.
4932
c83833f4
PA
49332017-09-20 Pedro Alves <palves@redhat.com>
4934
4935 * eval.c (make_params): Delete, refactored as ...
4936 (class fake_method): ... this new type's ctor.
4937 (fake_method::~fake_method): New.
4938 (evaluate_subexp_standard): Use 'fake_method'.
4939
223ffa71
TT
49402017-09-20 Tom Tromey <tom@tromey.com>
4941
4942 * windows-nat.c (get_windows_debug_event, windows_wait)
4943 (do_initial_windows_stuff, windows_attach): Update.
4944 * utils.c (vwarning, internal_vproblem): Update.
4945 (ui_unregister_input_event_handler_cleanup)
4946 (prepare_to_handle_input): Remove.
4947 (class scoped_input_handler): New.
4948 (defaulted_query, prompt_for_continue): Update.
4949 * tui/tui-hooks.c (tui_refresh_frame_and_register_information):
4950 Update.
4951 * top.c (undo_terminal_modifications_before_exit): Update.
4952 * target/target.h (target_terminal_init, target_terminal_inferior)
4953 (target_terminal_ours): Don't declare.
4954 (class target_terminal): New.
4955 * target.h (target_terminal_is_inferior, target_terminal_is_ours)
4956 (target_terminal_ours_for_output)
4957 (make_cleanup_restore_target_terminal): Don't declare.
4958 (target_terminal_info): Remove.
4959 * target.c (enum terminal_state, terminal_state): Remove.
4960 (target_terminal::terminal_state): Define.
4961 (target_terminal::init): Rename from target_terminal_init.
4962 (target_terminal::inferior): Rename from
4963 target_terminal_inferior.
4964 (target_terminal::ours): Rename from target_terminal_ours.
4965 (target_terminal::ours_for_output): Rename from
4966 target_terminal_ours_for_output.
4967 (target_terminal::info): New method.
4968 (cleanup_restore_target_terminal)
4969 (make_cleanup_restore_target_terminal): Remove.
4970 * solib.c (handle_solib_event): Update.
4971 * remote.c (remote_serial_quit_handler): Update.
4972 (remote_terminal_inferior, remote_wait_as): Update.
4973 * record-full.c (record_full_wait_1): Update.
4974 * nto-procfs.c (procfs_create_inferior): Update.
4975 * nat/fork-inferior.c (startup_inferior): Update.
4976 * mi/mi-interp.c (mi_new_thread, mi_thread_exit)
4977 (mi_record_changed, mi_inferior_added, mi_inferior_appeared)
4978 (mi_inferior_exit, mi_inferior_removed, mi_traceframe_changed)
4979 (mi_tsv_created, mi_tsv_deleted, mi_tsv_modified)
4980 (mi_breakpoint_created, mi_breakpoint_deleted)
4981 (mi_breakpoint_modified, mi_on_resume, mi_solib_loaded)
4982 (mi_solib_unloaded, mi_command_param_changed, mi_memory_changed)
4983 (mi_user_selected_context_changed, report_initial_inferior):
4984 Update.
4985 * linux-nat.c (linux_nat_attach, linux_nat_terminal_ours)
4986 (linux_nat_terminal_inferior): Update.
4987 * infrun.c (follow_fork_inferior)
4988 (handle_vfork_child_exec_or_exit, do_target_resume)
4989 (check_curr_ui_sync_execution_done, handle_inferior_event_1)
4990 (handle_signal_stop, maybe_remove_breakpoints, normal_stop):
4991 Update.
4992 * inflow.c (child_terminal_init, info_terminal_command): Update.
4993 * infcmd.c (post_create_inferior, continue_1, prepare_one_step)
4994 (attach_command): Update.
4995 * infcall.c (call_thread_fsm_should_stop): Update.
4996 * gnu-nat.c (gnu_attach): Update.
4997 * extension.c (struct active_ext_lang_state)
4998 (restore_active_ext_lang): Update.
4999 * exceptions.c (print_flush): Update.
5000 * event-top.c (async_enable_stdin, default_quit_handler): Update.
5001 (struct quit_handler_cleanup_data, restore_quit_handler)
5002 (restore_quit_handler_dtor, make_cleanup_override_quit_handler):
5003 Remove.
5004 * cp-support.c (gdb_demangle): Update.
5005 * breakpoint.c (update_inserted_breakpoint_locations)
5006 (insert_breakpoint_locations, handle_jit_event)
5007 (disable_breakpoints_in_unloaded_shlib): Update.
5008 * annotate.c (annotate_breakpoints_invalid)
5009 (annotate_frames_invalid): Update.
5010
013af3fc
TT
50112017-09-20 Tom Tromey <tom@tromey.com>
5012
5013 * main.c (catch_command_errors): Rename from
5014 catch_command_errors_const.
5015 (captured_main_1): Update.
5016
06871ae8
PA
50172017-09-20 Pedro Alves <palves@redhat.com>
5018
5019 * cli/cli-cmds.c (list_command): Use print_sal_location.
5020 (print_sal_location): New function.
5021 (ambiguous_line_spec): Use print_sal_location.
5022 * linespec.c (symbol_to_sal): Record the symbol in the sal.
5023 * symtab.c (find_function_start_sal): Likewise.
5024 * symtab.h (symtab_and_line::symbol): New field.
5025
e5f25bc5
PA
50262017-09-20 Pedro Alves <palves@redhat.com>
5027
5028 * linespec.c (minsym_found): Handle non-text minsyms.
5029 (symbol_to_sal): Record a sal.pc for non-block, non-label symbols.
5030
1b7fa39e
WT
50312017-09-20 Walfred Tedeschi <walfred.tedeschi@intel.com>
5032
5033 * features/Makefile (i386-avx-mpx-avx512-pku.dat): Add missing
5034 backslash.
5035
37dd0825
WT
50362017-09-20 Walfred Tedeschi <walfred.tedeschi@intel.com>
5037
5038 * gdb.arch/i386-avx512.c (move_zmm_data_to_reg): Use
5039 vmovups instead vmovaps.
5040 (move_zmm_data_to_memory): Use vmovups instead vmovaps.
5041
4e5a4f58
JB
50422017-09-19 John Baldwin <jhb@FreeBSD.org>
5043
5044 * NEWS (Changes since GDB 8.0): Add starti.
5045 * infcmd.c (enum run_break): New.
5046 (run_command_1): Queue pending event for RUN_STOP_AT_FIRST_INSN
5047 case.
5048 (run_command): Use enum run_how.
5049 (start_command): Likewise.
5050 (starti_command): New function.
5051 (RUN_ARGS_HELP): New macro.
5052 (_initialize_infcmd): Use RUN_ARGS_HELP for run and start
5053 commands. Add starti command.
5054
aa70c9f1
YQ
50552017-09-19 Yao Qi <yao.qi@linaro.org>
5056
5057 * Makefile.in (monitor.o): Remove the rule.
5058
d6541620
YQ
50592017-09-19 Yao Qi <yao.qi@linaro.org>
5060
5061 * annotate.h (struct annotate_arg_emitter): Use
5062 DISABLE_COPY_AND_ASSIGN.
5063 * common/refcounted-object.h (refcounted_object): Likewise.
5064 * completer.h (struct completion_result): Likewise.
5065 * dwarf2read.c (struct dwarf2_per_objfile): Likewise.
5066 * filename-seen-cache.h (filename_seen_cache): Likewise.
5067 * gdbcore.h (thread_section_name): Likewise.
5068 * gdb_regex.h (compiled_regex): Likewise.
5069 * gdbthread.h (scoped_restore_current_thread): Likewise.
5070 * inferior.h (scoped_restore_current_inferior): Likewise.
5071 * jit.c (jit_reader): Likewise.
5072 * linespec.h (struct linespec_result): Likewise.
5073 * mi/mi-parse.h (struct mi_parse): Likewise.
5074 * nat/fork-inferior.c (execv_argv): Likewise.
5075 * progspace.h (scoped_restore_current_program_space): Likewise.
5076 * python/python-internal.h (class gdbpy_enter): Likewise.
5077 * regcache.h (regcache): Likewise.
5078 * target-descriptions.c (struct tdesc_reg): Likewise.
5079 (struct tdesc_type): Likewise.
5080 (struct tdesc_feature): Likewise.
5081 * ui-out.h (ui_out_emit_type): Likewise.
5082
0615127c
SM
50832017-09-18 Simon Marchi <simon.marchi@ericsson.com>
5084
5085 * dwarf2expr.c (dwarf_expr_context::execute_stack_op): Remove
5086 label abort_expression.
5087
5e187554
SM
50882017-09-16 Simon Marchi <simon.marchi@ericsson.com>
5089
5090 * common/buffer.c (buffer_xml_printf): Adjust.
5091 * common/xml-utils.c (xml_escape_text): Change return type to
5092 std::string, update code accordingly.
5093 * common/xml-utils.h (xml_escape_text): Change return type to
5094 std::string.
5095 * rs6000-aix-tdep.c (rs6000_aix_shared_library_to_xml): Adjust.
5096 * windows-tdep.c (windows_xfer_shared_library): Adjust.
5097 * unittests/xml-utils-selftests.c (test_xml_escape_text):
5098 Adjust.
5099
c3d7b541
SM
51002017-09-16 Simon Marchi <simon.marchi@ericsson.com>
5101
5102 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add new source file.
5103 (SUBDIR_UNITTESTS_OBS): Add new object file.
5104 * unittests/xml-utils-selftests.c: New file.
5105
1526853e
SM
51062017-09-16 Simon Marchi <simon.marchi@ericsson.com>
5107
5108 * common/selftest.h (selftest): New struct/interface.
5109 (register_test): Add name parameter, add new overload.
5110 (run_tests): Add filter parameter.
5111 (for_each_selftest_ftype): New typedef.
5112 (for_each_selftest): New declaration.
5113 * common/selftest.c (tests): Change type to
5114 map<string, unique_ptr<selftest>>.
5115 (simple_selftest): New struct.
5116 (register_test): New function.
5117 (register_test): Add name parameter and use it.
5118 (run_tests): Add filter parameter and use it. Add prints.
5119 Adjust to vector -> map change.
5120 * aarch64-tdep.c (_initialize_aarch64_tdep): Add names when
5121 registering selftests.
5122 * arm-tdep.c (_initialize_arm_tdep): Likewise.
5123 * disasm-selftests.c (_initialize_disasm_selftests): Likewise.
5124 * dwarf2-frame.c (_initialize_dwarf2_frame): Likewise.
5125 * dwarf2loc.c (_initialize_dwarf2loc): Likewise.
5126 * findvar.c (_initialize_findvar): Likewise.
5127 * gdbarch-selftests.c (_initialize_gdbarch_selftests): Likewise.
5128 * maint.c (maintenance_selftest): Update call to run_tests.
5129 (maintenance_info_selftests): New function.
5130 (_initialize_maint_cmds): Register "maintenance info selftests"
5131 command. Update "maintenance selftest" doc.
5132 * regcache.c (_initialize_regcache): Add names when registering
5133 selftests.
5134 * rust-exp.y (_initialize_rust_exp): Likewise.
5135 * selftest-arch.c (gdbarch_selftest): New struct.
5136 (gdbarch_tests): Remove.
5137 (register_test_foreach_arch): Add name parameter. Call
5138 register_test.
5139 (tests_with_arch): Remove, move most content to
5140 gdbarch_selftest::operator().
5141 (_initialize_selftests_foreach_arch): Remove.
5142 * selftest-arch.h (register_test_foreach_arch): Add name
5143 parameter.
5144 (run_tests_with_arch): New declaration.
5145 * utils-selftests.c (_initialize_utils_selftests): Add names
5146 when registering selftests.
5147 * utils.c (_initialize_utils): Likewise.
5148 * unittests/array-view-selftests.c
5149 (_initialize_array_view_selftests): Likewise.
5150 * unittests/environ-selftests.c (_initialize_environ_selftests):
5151 Likewise.
5152 * unittests/function-view-selftests.c
5153 (_initialize_function_view_selftests): Likewise.
5154 * unittests/offset-type-selftests.c
5155 (_initialize_offset_type_selftests): Likewise.
5156 * unittests/optional-selftests.c
5157 (_initialize_optional_selftests): Likewise.
5158 * unittests/scoped_restore-selftests.c
5159 (_initialize_scoped_restore_selftests): Likewise.
5160 * NEWS: Document "maintenance selftest" and "maint info
5161 selftests".
5162
5846367a
SM
51632017-09-16 Simon Marchi <simon.marchi@ericsson.com>
5164
5165 * mi/mi-main.c (mi_load_progress): Restore current_uiout using a
5166 scoped_restore.
5167
bd77e8ff
SM
51682017-09-16 Simon Marchi <simon.marchi@ericsson.com>
5169
5170 * mi/mi-main.c (mi_load_progress): Make uiout variable
5171 a unique_ptr.
5172
26a67918
PA
51732017-09-15 Pedro Alves <palves@redhat.com>
5174
5175 * compile/compile-c-types.c (convert_enum, convert_int)
5176 (convert_float): Adjust to refer to int_type_v0 and float_type_v0.
5177
3f8a7804
SM
51782017-09-15 Simon Marchi <simon.marchi@ericsson.com>
5179
5180 * dwarf2read.c (copy_string): Remove.
5181 (parse_macro_definition): Replace copy_string with savestring.
5182
8d200706
YQ
51832017-09-15 Yao Qi <yao.qi@linaro.org>
5184
5185 * configure.tgt (i[34567]86-*-darwin*): Append amd64.o to
5186 gdb_target_obs.
5187 (i[34567]86-*-solaris2.1[0-9]* | x86_64-*-solaris2.1[0-9]*):
5188 Likewise.
5189 (i[34567]86-*-linux*): Likewise.
5190
d185219d
SM
51912017-09-14 Simon Marchi <simon.marchi@ericsson.com>
5192
5193 * dwarf2expr.h (dwarf_stack_value): Add constructor.
5194 (dwarf_expr_context) <~dwarf_expr_context>: Define as default.
5195 <stack>: Change type to std::vector.
5196 <stack_len, stack_allocated>: Remove.
5197 <grow_stack>: Remove.
5198 * dwarf2expr.c (dwarf_expr_context::dwarf_expr_context): Adjust.
5199 (dwarf_expr_context::~dwarf_expr_context): Remove.
5200 (dwarf_expr_context::grow_stack): Remove.
5201 (dwarf_expr_context::push): Adjust.
5202 (dwarf_expr_context::pop): Adjust.
5203 (dwarf_expr_context::fetch): Adjust.
5204 (dwarf_expr_context::fetch_in_stack_memory): Adjust.
5205 (dwarf_expr_context::stack_empty_p): Adjust.
5206 (dwarf_expr_context::execute_stack_op): Adjust.
5207
eccd80d6
SM
52082017-09-14 Simon Marchi <simon.marchi@ericsson.com>
5209
5210 * dwarf2expr.h (dwarf_expr_context) <stack_empty_p>: Change
5211 return type to bool.
5212 * dwarf2expr.c (dwarf_expr_context::stack_empty_p): Likewise.
5213
69009882
SM
52142017-09-14 Simon Marchi <simon.marchi@ericsson.com>
5215
5216 * dwarf2expr.h (dwarf_expr_piece) <v.mem.in_stack_memory>:
5217 Change type to bool.
5218 (dwarf_stack_value) <in_stack_memory>: Likewise.
5219 (dwarf_expr_context) <push_address>: Change parameter type to
5220 bool.
5221 <fetch_in_stack_memory>: Change return type to bool.
5222 <push>: Change parameter type to bool.
5223 * dwarf2expr.c (dwarf_expr_context::push): Change parameter type
5224 to bool.
5225 (dwarf_expr_context::push_address): Likewise.
5226 (dwarf_expr_context::fetch_in_stack_memory): Change return type
5227 to bool.
5228 (dwarf_expr_context::execute_stack_op): Adjust.
5229 * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Adjust.
5230
1e467161
SM
52312017-09-14 Simon Marchi <simon.marchi@ericsson.com>
5232
5233 * dwarf2expr.h (struct dwarf_expr_piece): Move up.
5234 (struct dwarf_expr_context) <n_pieces>: Remove.
5235 <pieces>: Change type to std::vector.
5236 * dwarf2expr.c (dwarf_expr_context::dwarf_expr_context): Adjust.
5237 (dwarf_expr_context::~dwarf_expr_context): Don't manually free
5238 pieces.
5239 (dwarf_expr_context::add_piece): Adjust.
5240 * dwarf2loc.c (struct piece_closure): Initialize fields.
5241 <n_pieces>: Remove.
5242 <pieces>: Change type to std::vector.
5243 (allocate_piece_closure): Adjust, change parameter to
5244 std::vector rvalue and std::move it to piece_closure.
5245 (rw_pieced_value): Adjust.
5246 (check_pieced_synthetic_pointer): Adjust.
5247 (indirect_synthetic_pointer): Adjust.
5248 (coerce_pieced_ref): Adjust.
5249 (free_pieced_value_closure): Adjust. Use delete to free
5250 piece_closure.
5251 (dwarf2_evaluate_loc_desc_full): Adjust. std::move ctx.pieces
5252 to allocate_piece_closure.
5253 (dwarf2_loc_desc_get_symbol_read_needs): Adjust.
5254
0782db84
SM
52552017-09-12 Simon Marchi <simon.marchi@ericsson.com>
5256
5257 * probe.h (probe_ops_cp): Remove typedef.
5258 (DEF_VEC_P (probe_ops_cp)): Remove.
5259 (all_probe_ops): Change type to std::vector.
5260 * probe.c (info_probes_for_ops): Adjust to vector change.
5261 (probe_linespec_to_ops): Likewise.
5262 (all_probe_ops): Change type to std::vector.
5263 (_initialize_probe): Adjust to vector change.
5264 * dtrace-probe.c (_initialize_dtrace_probe): Likewise.
5265 * elfread.c (elf_get_probes): Likewise.
5266 * stap-probe.c (_initialize_stap_probe): Likewise.
5267
1eac6bea
SM
52682017-09-12 Simon Marchi <simon.marchi@ericsson.com>
5269
5270 * probe.h (struct bound_probe): Define constructors.
5271 * probe.c (bound_probe_s): Remove typedef.
5272 (DEF_VEC_O (bound_probe_s)): Remove VEC.
5273 (collect_probes): Change return type to std::vector, remove
5274 cleanup.
5275 (compare_probes): Return bool, change parameter type. Change
5276 semantic to "less than".
5277 (gen_ui_out_table_header_info): Change parameter to std::vector
5278 and update.
5279 (exists_probe_with_pops): Likewise.
5280 (info_probes_for_ops): Update to std::vector change.
5281 (enable_probes_command): Likewise.
5282 (disable_probes_command): Likewise.
5283
aaa63a31
SM
52842017-09-12 Simon Marchi <simon.marchi@ericsson.com>
5285
5286 * probe.h (struct probe_ops) <get_probes>: Change parameter from
5287 vec to std::vector.
5288 * probe.c (parse_probes_in_pspace): Update.
5289 (find_probes_in_objfile): Update.
5290 (find_probe_by_pc): Update.
5291 (collect_probes): Update.
5292 (probe_any_get_probes): Update.
5293 * symfile.h (struct sym_probe_fns) <sym_get_probes> Change
5294 return type to reference to std::vector.
5295 * dtrace-probe.c (dtrace_process_dof_probe): Change parameter to
5296 std::vector and update.
5297 (dtrace_process_dof): Likewise.
5298 (dtrace_get_probes): Likewise.
5299 * elfread.c (elf_get_probes): Change return type to std::vector,
5300 store an std::vector in bfd_data.
5301 (probe_key_free): Update to std::vector.
5302 * stap-probe.c (handle_stap_probe): Change parameter to
5303 std::vector and update.
5304 (stap_get_probes): Likewise.
5305 * symfile-debug.c (debug_sym_get_probes): Change return type to
5306 std::vector and update.
5307
cb85b21b
TT
53082017-09-11 Tom Tromey <tom@tromey.com>
5309
5310 * breakpoint.c (program_breakpoint_here_p): Update.
5311 * target.c (make_scoped_restore_show_memory_breakpoints): Rename
5312 from make_show_memory_breakpoints_cleanup. Return a
5313 scoped_restore_tmpl<int>.
5314 (restore_show_memory_breakpoints): Remove.
5315 * ppc-linux-tdep.c (ppc_linux_memory_remove_breakpoint): Update.
5316 * mem-break.c (memory_validate_breakpoint): Update.
5317 * ia64-tdep.c (ia64_memory_insert_breakpoint): Update.
5318 (ia64_memory_remove_breakpoint): Update.
5319 (ia64_breakpoint_from_pc): Update.
5320 * target.h (make_scoped_restore_show_memory_breakpoints): Rename
5321 from make_show_memory_breakpoints_cleanup.
5322
8fbc99ef
TT
53232017-09-11 Tom Tromey <tom@tromey.com>
5324
5325 * d-namespace.c (d_lookup_symbol): Use std::string.
5326 (find_symbol_in_baseclass): Likewise.
5327
50feb4bd
TT
53282017-09-11 Tom Tromey <tom@tromey.com>
5329
5330 * ctf.c (ctf_start): Use std::string.
5331
c6dc63a1
TT
53322017-09-11 Tom Tromey <tom@tromey.com>
5333
5334 * ada-lang.c (is_known_support_routine): Update.
5335 (ada_unhandled_exception_name_addr_from_raise): Update.
5336 * guile/scm-frame.c (gdbscm_frame_name): Update.
5337 * python/py-frame.c (frapy_name): Update.
5338 (frapy_function): Update.
5339 * stack.h (find_frame_funname): Update.
5340 * stack.c (find_frame_funname): Return unique_xmalloc_ptr.
5341 (print_frame): Update.
5342
d6b9b80f
TT
53432017-09-11 Tom Tromey <tom@tromey.com>
5344
5345 * findcmd.c (put_bits): Take a gdb::byte_vector.
5346 (parse_find_args): Return gdb::byte_vector. "args" now const.
5347 Remove "pattern_bufp" and "pattern_lenp" parameters. Remove
5348 cleanups.
5349 (find_command): Update.
5350
a9921622
TT
53512017-09-11 Tom Tromey <tom@tromey.com>
5352
5353 * cli/cli-script.c (class scoped_restore_hook_in): New.
5354 (clear_hook_in_cleanup): Remove.
5355 (execute_cmd_pre_hook, execute_cmd_post_hook): Use
5356 scoped_restore_hook_in.
5357
be0d7abb
TT
53582017-09-11 Tom Tromey <tom@tromey.com>
5359
5360 * cli/cli-script.c (restore_interp): Remove.
5361 (read_command_lines): Use scoped_restore_interp.
5362 * interps.c (scoped_restore_interp::set_temp): Rename from
5363 interp_set_temp.
5364 * interps.h (class scoped_restore_interp): New.
5365 (interp_set_temp): Remove.
5366
00f675ff
TT
53672017-09-11 Tom Tromey <tom@tromey.com>
5368
5369 * mi/mi-cmd-catch.c (mi_cmd_catch_assert)
5370 (mi_cmd_catch_exception, mi_catch_load_unload): Update.
5371 * mi/mi-cmd-break.c (setup_breakpoint_reporting): Return a
5372 scoped_restore.
5373 (mi_cmd_break_insert_1): Update.
5374 * mi/mi-cmd-break.h (setup_breakpoint_reporting): Return a
5375 scoped_restore.
5376
cb791d59
TT
53772017-09-11 Tom Tromey <tom@tromey.com>
5378
5379 * demangle.c (demangle_command): Update.
5380 * breakpoint.c (disable_command): Update.
5381 (enable_command): Update.
5382 (find_location_by_number): Make "number" const. Use
5383 get_number_trailer.
5384 * cli/cli-utils.c (extract_arg): Return std::string.
5385 * probe.c (parse_probe_linespec): Update. Change types.
5386 (collect_probes): Take string arguments.
5387 (parse_probe_linespec): Likewise.
5388 (info_probes_for_ops): Update.
5389 (enable_probes_command): Update.
5390 (disable_probes_command): Update.
5391 * break-catch-sig.c (catch_signal_split_args): Update.
5392 * mi/mi-parse.c (mi_parse): Update.
5393
2039bd9f
TT
53942017-09-11 Tom Tromey <tom@tromey.com>
5395
5396 * language.h (language_enum): Make argument const.
5397 * language.c (language_enum): Make argument const.
5398
f1735a53
TT
53992017-09-11 Tom Tromey <tom@tromey.com>
5400
5401 * common/common-utils.h (skip_to_space): Remove macro, redeclare
5402 as function.
5403 (skip_to_space): Rename from skip_to_space_const.
5404 * common/common-utils.c (skip_to_space): New function.
5405 (skip_to_space): Rename from skip_to_space_const.
5406 * cli/cli-utils.h (get_number): Rename from get_number_const.
5407 (extract_arg): Rename from extract_arg_const.
5408 * cli/cli-utils.c (get_number): Rename from get_number_const.
5409 (extract_arg): Rename from extract_arg_const.
5410 (number_or_range_parser::get_number): Use ::get_number.
5411 * aarch64-linux-tdep.c, ada-lang.c, arm-linux-tdep.c, ax-gdb.c,
5412 break-catch-throw.c, breakpoint.c, cli/cli-cmds.c, cli/cli-dump.c,
5413 cli/cli-script.c, cli/cli-setshow.c, compile/compile.c,
5414 completer.c, demangle.c, disasm.c, findcmd.c, linespec.c,
5415 linux-tdep.c, linux-thread-db.c, location.c, mi/mi-parse.c,
5416 minsyms.c, nat/linux-procfs.c, printcmd.c, probe.c,
5417 python/py-breakpoint.c, record.c, rust-exp.y, serial.c, stack.c,
5418 stap-probe.c, tid-parse.c, tracepoint.c: Update all callers.
5419
7d221d74
TT
54202017-09-11 Tom Tromey <tom@tromey.com>
5421
5422 * python/python.c (do_start_initialization): Use
5423 py-event-types.def to initialize types.
5424 Define all object type structures.
5425 * python/python-internal.h: Don't declare event initialization
5426 functions.
5427 * python/py-threadevent.c (thread_event_object_type): Don't
5428 define.
5429 * python/py-stopevent.c (stop_event_object_type): Don't define.
5430 * python/py-signalevent.c (signal_event_object_type): Don't
5431 declare or define.
5432 * python/py-newobjfileevent.c (new_objfile_event_object_type)
5433 (clear_objfiles_event_object_type): Don't declare or define.
5434 * python/py-infevents.c (inferior_call_pre_event_object_type)
5435 (inferior_call_post_event_object_type)
5436 (register_changed_event_object_type)
5437 (memory_changed_event_object_type): Don't declare or define.
5438 * python/py-inferior.c (new_thread_event_object_type)
5439 (new_inferior_event_object_type)
5440 (inferior_deleted_event_object_type): Don't declare or define.
5441 * python/py-exitedevent.c (exited_event_object_type): Don't
5442 declare or define.
5443 * python/py-evts.c (gdbpy_initialize_py_events): Use
5444 py-all-events.def.
5445 * python/py-events.h (thread_event_object_type): Don't declare.
5446 (events_object): Use py-all-events.def.
5447 * python/py-event.h (GDBPY_NEW_EVENT_TYPE): Remove. Use
5448 py-event-types.def.
5449 * python/py-event-types.def: New file.
5450 * python/py-continueevent.c (create_continue_event_object): Don't
5451 declare or define.
5452 * python/py-bpevent.c (breakpoint_event_object_type): Don't
5453 declare or define.
5454 * python/py-all-events.def: New file.
5455
35c61a1d
TT
54562017-09-11 Tom Tromey <tom@tromey.com>
5457
5458 * python/py-threadevent.c (create_thread_event_object): Return
5459 gdbpy_ref.
5460 * python/py-stopevent.h (create_stop_event_object)
5461 (create_breakpoint_event_object, create_signal_event_object):
5462 Update.
5463 * python/py-stopevent.c (create_stop_event_object): Return
5464 gdbpy_ref.
5465 (emit_stop_event): Update.
5466 * python/py-signalevent.c (create_signal_event_object): Return
5467 gdbpy_ref.
5468 * python/py-infevents.c (create_inferior_call_event_object):
5469 Update.
5470 * python/py-event.h (create_event_object)
5471 (create_thread_event_object): Update.
5472 * python/py-event.c (create_event_object): Return gdbpy_ref.
5473 * python/py-continueevent.c: Return gdbpy_ref.
5474 * python/py-bpevent.c (create_breakpoint_event_object): Return
5475 gdbpy_ref.
5476
7c96f8c1
TT
54772017-09-11 Tom Tromey <tom@tromey.com>
5478
5479 PR python/15622:
5480 * NEWS: Add entry.
5481 * python/python.c (do_start_initialization): Initialize new event
5482 types.
5483 * python/python-internal.h (gdbpy_initialize_new_inferior_event)
5484 (gdbpy_initialize_inferior_deleted_event)
5485 (gdbpy_initialize_new_thread_event): Declare.
5486 * python/py-threadevent.c (create_thread_event_object): Add option
5487 "thread" parameter.
5488 * python/py-inferior.c (new_thread_event_object_type)
5489 (new_inferior_event_object_type)
5490 (inferior_deleted_event_object_type): Declare.
5491 (python_new_inferior, python_inferior_deleted): New functions.
5492 (add_thread_object): Emit new_thread event.
5493 (gdbpy_initialize_inferior): Attach new functions to corresponding
5494 observers.
5495 (new_thread, new_inferior, inferior_deleted): Define new event
5496 types.
5497 * python/py-evts.c (gdbpy_initialize_py_events): Add new
5498 registries.
5499 * python/py-events.h (events_object) <new_inferior,
5500 inferior_deleted, new_thread>: New fields.
5501 * python/py-event.h (create_thread_event_breakpoint): Add optional
5502 "thread" parameter.
5503
72542b8e
AB
55042017-09-10 Andrew Burgess <andrew.burgess@embecosm.com>
5505
5506 * utils.c (abort_with_message): Don't compare gdb_stderr to NULL,
5507 check current_ui instead.
5508 (internal_vproblem): Likewise.
5509
0d64823e
SM
55102017-09-09 Simon Marchi <simon.marchi@ericsson.com>
5511
5512 * thread.c (print_thread_info_1): Remove unnecessary calls to
5513 uiout->is_mi_like_p.
5514
eb1e02fd
TT
55152017-09-09 Tom Tromey <tom@tromey.com>
5516
5517 * namespace.h (add_using_directive): Update.
5518 * namespace.c (add_using_directive): Change type of excludes to
5519 std::vector.
5520 * dwarf2read.c (read_import_statement): Use std::vector.
5521 (read_namespace): Update.
5522 * cp-namespace.c (cp_scan_for_anonymous_namespaces): Update.
5523
0fc21fd8
TT
55242017-09-09 Tom Tromey <tom@tromey.com>
5525
5526 * linespec.c (create_sals_line_offset): Use gdb::def_vector.
5527
49663d05
TT
55282017-09-09 Tom Tromey <tom@tromey.com>
5529
5530 * p-valprint.c (pascal_object_print_value): Use gdb::byte_vector.
5531
0b868b60
TT
55322017-09-09 Tom Tromey <tom@tromey.com>
5533
5534 * stack.c (func_command): Use gdb::def_vector.
5535
c0470d48
TT
55362017-09-09 Tom Tromey <tom@tromey.com>
5537
5538 * mi/mi-cmd-var.c (mi_cmd_var_list_children): Use gdb::optional,
5539 ui_out_emit_list, ui_out_emit_tuple.
5540 (mi_cmd_var_update): Likewise.
5541
ca5909c7
TT
55422017-09-09 Tom Tromey <tom@tromey.com>
5543
5544 * mi/mi-interp.c (mi_user_selected_context_changed): Use
5545 ui_out_redirect_pop.
5546 * guile/scm-ports.c (ioscm_with_output_to_port_worker): Use
5547 ui_out_redirect_pop.
5548 * utils.c (do_ui_out_redirect_pop)
5549 (make_cleanup_ui_out_redirect_pop): Remove.
5550 * top.c (execute_command_to_string): Use ui_out_redirect_pop.
5551 * utils.h (make_cleanup_ui_out_redirect_pop): Remove.
5552 * ui-out.h (ui_out_redirect_pop): New class.
5553
e6a2252a
TT
55542017-09-09 Tom Tromey <tom@tromey.com>
5555
5556 * mi/mi-main.c (output_cores): Use ui_out_emit_list.
5557 (list_available_thread_groups, mi_cmd_list_thread_groups)
5558 (mi_cmd_data_list_changed_registers, mi_cmd_data_read_memory)
5559 (mi_cmd_data_read_memory_bytes, mi_cmd_trace_frame_collected):
5560 Likewise.
5561
393702cd
TT
55622017-09-09 Tom Tromey <tom@tromey.com>
5563
5564 * disasm.c (gdb_pretty_print_disassembler::pretty_print_insn): Use
5565 ui_out_emit_tuple.
5566
76f9c9cf
TT
55672017-09-09 Tom Tromey <tom@tromey.com>
5568
5569 * target.c (flash_erase_command): Use ui_out_emit_tuple.
5570 * stack.c (print_frame): Use ui_out_emit_tuple.
5571 * spu-tdep.c (info_spu_event_command): Use ui_out_emit_tuple.
5572 (info_spu_mailbox_command, info_spu_dma_command)
5573 (info_spu_proxydma_command): Likewise.
5574 * mi/mi-main.c (mi_cmd_trace_frame_collected): Use
5575 ui_out_emit_tuple, gdb::byte_vector, bin2hex.
5576 * mi/mi-cmd-file.c (mi_cmd_file_list_shared_libraries): Use
5577 ui_out_emit_tuple.
5578 * breakpoint.c (print_it_watchpoint): Use ui_out_emit_tuple.
5579
dc9fe180
TT
55802017-09-09 Tom Tromey <tom@tromey.com>
5581
5582 * ui-out.h (make_cleanup_ui_out_table_begin_end): Remove.
5583 (class ui_out_emit_table): Update comment.
5584 * ui-out.c (do_cleanup_table_end)
5585 (make_cleanup_ui_out_table_begin_end): Remove.
5586 * spu-tdep.c (info_spu_mailbox_list): Use ui_out_emit_table.
5587 (info_spu_dma_cmdlist): Likewise.
5588 * probe.c (info_probes_for_ops): Use ui_out_emit_table.
5589 * darwin-nat-info.c (darwin_debug_regions_recurse): Use
5590 ui_out_emit_table.
5591
f8cc3da6
TT
55922017-09-09 Tom Tromey <tom@tromey.com>
5593
5594 * thread.c (print_thread_info_1): Use ui_out_emit_table,
5595 ui_out_emit_list, gdb::optional.
5596
481695ed
JB
55972017-09-09 John Baldwin <jhb@FreeBSD.org>
5598
5599 * aarch64-linux-nat.c: Remove _initialize_aarch64_linux_nat
5600 prototype.
5601 * aarch64-linux-tdep.c: Remove _initialize_aarch64_linux_tdep
5602 prototype.
5603 * aarch64-newlib-tdep.c: Remove _initialize_aarch64_newlib_tdep
5604 prototype.
5605 * aarch64-tdep.c: Remove _initialize_aarch64_tdep prototype.
5606 * ada-exp.y: Remove _initialize_ada_exp prototype.
5607 * ada-lang.c: Remove _initialize_ada_language prototype.
5608 * ada-tasks.c: Remove _initialize_tasks prototype.
5609 * addrmap.c: Remove _initialize_addrmap prototype.
5610 * agent.c: Remove _initialize_agent prototype.
5611 * aix-thread.c: Remove _initialize_aix_thread prototype.
5612 * alpha-bsd-nat.c: Remove _initialize_alphabsd_nat prototype.
5613 * alpha-linux-nat.c: Remove _initialize_alpha_linux_nat prototype.
5614 * alpha-linux-tdep.c: Remove _initialize_alpha_linux_tdep
5615 prototype.
5616 * alpha-nbsd-tdep.c: Remove _initialize_alphanbsd_tdep prototype.
5617 * alpha-obsd-tdep.c: Remove _initialize_alphaobsd_tdep prototype.
5618 * alpha-tdep.c: Remove _initialize_alpha_tdep prototype.
5619 * amd64-darwin-tdep.c: Remove _initialize_amd64_darwin_tdep
5620 prototype.
5621 * amd64-dicos-tdep.c: Remove _initialize_amd64_dicos_tdep
5622 prototype.
5623 * amd64-fbsd-nat.c: Remove _initialize_amd64fbsd_nat prototype.
5624 * amd64-fbsd-tdep.c: Remove _initialize_amd64fbsd_tdep prototype.
5625 * amd64-linux-nat.c: Remove _initialize_amd64_linux_nat prototype.
5626 * amd64-linux-tdep.c: Remove _initialize_amd64_linux_tdep
5627 prototype.
5628 * amd64-nbsd-nat.c: Remove _initialize_amd64nbsd_nat prototype.
5629 * amd64-nbsd-tdep.c: Remove _initialize_amd64nbsd_tdep prototype.
5630 * amd64-obsd-nat.c: Remove _initialize_amd64obsd_nat prototype.
5631 * amd64-obsd-tdep.c: Remove _initialize_amd64obsd_tdep prototype.
5632 * amd64-sol2-tdep.c: Remove _initialize_amd64_sol2_tdep prototype.
5633 * amd64-tdep.c: Remove _initialize_amd64_tdep prototype.
5634 * amd64-windows-nat.c: Remove _initialize_amd64_windows_nat
5635 prototype.
5636 * amd64-windows-tdep.c: Remove _initialize_amd64_windows_tdep
5637 prototype.
5638 * annotate.c: Remove _initialize_annotate prototype.
5639 * arc-newlib-tdep.c: Remove _initialize_arc_newlib_tdep prototype.
5640 * arc-tdep.c: Remove _initialize_arc_tdep prototype.
5641 * arch-utils.c: Remove _initialize_gdbarch_utils prototype.
5642 * arm-linux-nat.c: Remove _initialize_arm_linux_nat prototype.
5643 * arm-linux-tdep.c: Remove _initialize_arm_linux_tdep prototype.
5644 * arm-nbsd-tdep.c: Remove _initialize_arm_netbsd_tdep prototype.
5645 * arm-obsd-tdep.c: Remove _initialize_armobsd_tdep prototype.
5646 * arm-symbian-tdep.c: Remove _initialize_arm_symbian_tdep
5647 prototype.
5648 * arm-tdep.c: Remove _initialize_arm_tdep prototype.
5649 * arm-wince-tdep.c: Remove _initialize_arm_wince_tdep prototype.
5650 * auto-load.c: Remove _initialize_auto_load prototype.
5651 * auxv.c: Remove _initialize_auxv prototype.
5652 * avr-tdep.c: Remove _initialize_avr_tdep prototype.
5653 * ax-gdb.c: Remove _initialize_ax_gdb prototype.
5654 * bfin-linux-tdep.c: Remove _initialize_bfin_linux_tdep prototype.
5655 * bfin-tdep.c: Remove _initialize_bfin_tdep prototype.
5656 * break-catch-sig.c: Remove _initialize_break_catch_sig prototype.
5657 * break-catch-syscall.c: Remove _initialize_break_catch_syscall
5658 prototype.
5659 * break-catch-throw.c: Remove _initialize_break_catch_throw
5660 prototype.
5661 * breakpoint.c: Remove _initialize_breakpoint prototype.
5662 * bsd-uthread.c: Remove _initialize_bsd_uthread prototype.
5663 * btrace.c: Remove _initialize_btrace prototype.
5664 * charset.c: Remove _initialize_charset prototype.
5665 * cli/cli-cmds.c: Remove _initialize_cli_cmds prototype.
5666 * cli/cli-dump.c: Remove _initialize_cli_dump prototype.
5667 * cli/cli-interp.c: Remove _initialize_cli_interp prototype.
5668 * cli/cli-logging.c: Remove _initialize_cli_logging prototype.
5669 * cli/cli-script.c: Remove _initialize_cli_script prototype.
5670 * coff-pe-read.c: Remove _initialize_coff_pe_read prototype.
5671 * coffread.c: Remove _initialize_coffread prototype.
5672 * compile/compile.c: Remove _initialize_compile prototype.
5673 * complaints.c: Remove _initialize_complaints prototype.
5674 * completer.c: Remove _initialize_completer prototype.
5675 * copying.awk: Remove _initialize_copying prototype.
5676 * copying.c: Regenerate.
5677 * core-regset.c: Remove _initialize_core_regset prototype.
5678 * corefile.c: Remove _initialize_core prototype.
5679 * corelow.c: Remove _initialize_corelow prototype.
5680 * cp-abi.c: Remove _initialize_cp_abi prototype.
5681 * cp-namespace.c: Remove _initialize_cp_namespace prototype.
5682 * cp-support.c: Remove _initialize_cp_support prototype.
5683 * cp-valprint.c: Remove _initialize_cp_valprint prototype.
5684 * cris-linux-tdep.c: Remove _initialize_cris_linux_tdep prototype.
5685 * cris-tdep.c: Remove _initialize_cris_tdep prototype.
5686 * ctf.c: Remove _initialize_ctf prototype.
5687 * d-lang.c: Remove _initialize_d_language prototype.
5688 * darwin-nat-info.c: Remove _initialize_darwin_info_commands
5689 prototype.
5690 * darwin-nat.c: Remove _initialize_darwin_inferior prototype.
5691 * dbxread.c: Remove _initialize_dbxread prototype.
5692 * dcache.c: Remove _initialize_dcache prototype.
5693 * demangle.c: Remove _initialize_demangler prototype.
5694 * disasm-selftests.c: Remove _initialize_disasm_selftests
5695 prototype.
5696 * disasm.c: Remove _initialize_disasm prototype.
5697 * dtrace-probe.c: Remove _initialize_dtrace_probe prototype.
5698 * dummy-frame.c: Remove _initialize_dummy_frame prototype.
5699 * dwarf2-frame-tailcall.c: Remove _initialize_tailcall_frame
5700 prototype.
5701 * dwarf2-frame.c: Remove _initialize_dwarf2_frame prototype.
5702 * dwarf2expr.c: Remove _initialize_dwarf2expr prototype.
5703 * dwarf2loc.c: Remove _initialize_dwarf2loc prototype.
5704 * dwarf2read.c: Remove _initialize_dwarf2_read prototype.
5705 * elfread.c: Remove _initialize_elfread prototype.
5706 * exec.c: Remove _initialize_exec prototype.
5707 * extension.c: Remove _initialize_extension prototype.
5708 * f-lang.c: Remove _initialize_f_language prototype.
5709 * f-valprint.c: Remove _initialize_f_valprint prototype.
5710 * fbsd-nat.c: Remove _initialize_fbsd_nat prototype.
5711 * fbsd-tdep.c: Remove _initialize_fbsd_tdep prototype.
5712 * filesystem.c: Remove _initialize_filesystem prototype.
5713 * findcmd.c: Remove _initialize_mem_search prototype.
5714 * fork-child.c: Remove _initialize_fork_child prototype.
5715 * frame-base.c: Remove _initialize_frame_base prototype.
5716 * frame-unwind.c: Remove _initialize_frame_unwind prototype.
5717 * frame.c: Remove _initialize_frame prototype.
5718 * frv-linux-tdep.c: Remove _initialize_frv_linux_tdep prototype.
5719 * frv-tdep.c: Remove _initialize_frv_tdep prototype.
5720 * ft32-tdep.c: Remove _initialize_ft32_tdep prototype.
5721 * gcore.c: Remove _initialize_gcore prototype.
5722 * gdb_bfd.c: Remove _initialize_gdb_bfd prototype.
5723 * gdbarch.c: Regenerate.
5724 * gdbarch.sh: Remove _initialize_gdbarch prototype.
5725 * gdbtypes.c: Remove _initialize_gdbtypes prototype.
5726 * gnu-nat.c: Remove _initialize_gnu_nat prototype.
5727 * gnu-v2-abi.c: Remove _initialize_gnu_v2_abi prototype.
5728 * gnu-v3-abi.c: Remove _initialize_gnu_v3_abi prototype.
5729 * go-lang.c: Remove _initialize_go_language prototype.
5730 * go32-nat.c: Remove _initialize_go32_nat prototype.
5731 * guile/guile.c: Remove _initialize_guile prototype.
5732 * h8300-tdep.c: Remove _initialize_h8300_tdep prototype.
5733 * hppa-linux-nat.c: Remove _initialize_hppa_linux_nat prototype.
5734 * hppa-linux-tdep.c: Remove _initialize_hppa_linux_tdep prototype.
5735 * hppa-nbsd-nat.c: Remove _initialize_hppanbsd_nat prototype.
5736 * hppa-nbsd-tdep.c: Remove _initialize_hppanbsd_tdep prototype.
5737 * hppa-obsd-nat.c: Remove _initialize_hppaobsd_nat prototype.
5738 * hppa-obsd-tdep.c: Remove _initialize_hppaobsd_tdep prototype.
5739 * hppa-tdep.c: Remove _initialize_hppa_tdep prototype.
5740 * i386-bsd-nat.c: Remove _initialize_i386bsd_nat prototype.
5741 * i386-cygwin-tdep.c: Remove _initialize_i386_cygwin_tdep
5742 prototype.
5743 * i386-darwin-tdep.c: Remove _initialize_i386_darwin_tdep
5744 prototype.
5745 * i386-dicos-tdep.c: Remove _initialize_i386_dicos_tdep prototype.
5746 * i386-fbsd-nat.c: Remove _initialize_i386fbsd_nat prototype.
5747 * i386-fbsd-tdep.c: Remove _initialize_i386fbsd_tdep prototype.
5748 * i386-gnu-nat.c: Remove _initialize_i386gnu_nat prototype.
5749 * i386-gnu-tdep.c: Remove _initialize_i386gnu_tdep prototype.
5750 * i386-linux-nat.c: Remove _initialize_i386_linux_nat prototype.
5751 * i386-linux-tdep.c: Remove _initialize_i386_linux_tdep prototype.
5752 * i386-nbsd-nat.c: Remove _initialize_i386nbsd_nat prototype.
5753 * i386-nbsd-tdep.c: Remove _initialize_i386nbsd_tdep prototype.
5754 * i386-nto-tdep.c: Remove _initialize_i386nto_tdep prototype.
5755 * i386-obsd-nat.c: Remove _initialize_i386obsd_nat prototype.
5756 * i386-obsd-tdep.c: Remove _initialize_i386obsd_tdep prototype.
5757 * i386-sol2-nat.c: Remove _initialize_amd64_sol2_nat prototype.
5758 * i386-sol2-tdep.c: Remove _initialize_amd64_sol2_tdep prototype.
5759 * i386-tdep.c: Remove _initialize_i386_tdep prototype.
5760 * i386-windows-nat.c: Remove _initialize_i386_windows_nat
5761 prototype.
5762 * ia64-libunwind-tdep.c: Remove _initialize_libunwind_frame
5763 prototype.
5764 * ia64-linux-nat.c: Remove _initialize_ia64_linux_nat prototype.
5765 * ia64-linux-tdep.c: Remove _initialize_ia64_linux_tdep prototype.
5766 * ia64-tdep.c: Remove _initialize_ia64_tdep prototype.
5767 * ia64-vms-tdep.c: Remove _initialize_ia64_vms_tdep prototype.
5768 * infcall.c: Remove _initialize_infcall prototype.
5769 * infcmd.c: Remove _initialize_infcmd prototype.
5770 * inferior.c: Remove _initialize_inferiors prototype.
5771 * inflow.c: Remove _initialize_inflow prototype.
5772 * infrun.c: Remove _initialize_infrun prototype.
5773 * interps.c: Remove _initialize_interpreter prototype.
5774 * iq2000-tdep.c: Remove _initialize_iq2000_tdep prototype.
5775 * jit.c: Remove _initialize_jit prototype.
5776 * language.c: Remove _initialize_language prototype.
5777 * linux-fork.c: Remove _initialize_linux_fork prototype.
5778 * linux-nat.c: Remove _initialize_linux_nat prototype.
5779 * linux-tdep.c: Remove _initialize_linux_tdep prototype.
5780 * linux-thread-db.c: Remove _initialize_thread_db prototype.
5781 * lm32-tdep.c: Remove _initialize_lm32_tdep prototype.
5782 * m2-lang.c: Remove _initialize_m2_language prototype.
5783 * m32c-tdep.c: Remove _initialize_m32c_tdep prototype.
5784 * m32r-linux-nat.c: Remove _initialize_m32r_linux_nat prototype.
5785 * m32r-linux-tdep.c: Remove _initialize_m32r_linux_tdep prototype.
5786 * m32r-tdep.c: Remove _initialize_m32r_tdep prototype.
5787 * m68hc11-tdep.c: Remove _initialize_m68hc11_tdep prototype.
5788 * m68k-bsd-nat.c: Remove _initialize_m68kbsd_nat prototype.
5789 * m68k-bsd-tdep.c: Remove _initialize_m68kbsd_tdep prototype.
5790 * m68k-linux-nat.c: Remove _initialize_m68k_linux_tdep prototype.
5791 * m68k-linux-tdep.c: Remove _initialize_m68k_linux_tdep prototype.
5792 * m68k-tdep.c: Remove _initialize_m68k_tdep prototype.
5793 * m88k-bsd-nat.c: Remove _initialize_m68kbsd_nat prototype.
5794 * m88k-tdep.c: Remove _initialize_m68kbsd_tdep prototype.
5795 * machoread.c: Remove _initialize_machoread prototype.
5796 * macrocmd.c: Remove _initialize_macrocmd prototype.
5797 * macroscope.c: Remove _initialize_macroscope prototype.
5798 * maint.c: Remove _initialize_maint_cmds prototype.
5799 * mdebugread.c: Remove _initialize_mdebugread prototype.
5800 * memattr.c: Remove _initialize_mem prototype.
5801 * mep-tdep.c: Remove _initialize_mep_tdep prototype.
5802 * mi/mi-cmd-env.c: Remove _initialize_mi_cmd_env prototype.
5803 * mi/mi-cmds.c: Remove _initialize_mi_cmds prototype.
5804 * mi/mi-interp.c: Remove _initialize_mi_interp prototype.
5805 * mi/mi-main.c: Remove _initialize_mi_main prototype.
5806 * microblaze-linux-tdep.c: Remove
5807 _initialize_microblaze_linux_tdep prototype.
5808 * microblaze-tdep.c: Remove _initialize_microblaze_tdep prototype.
5809 * mips-fbsd-nat.c: Remove _initialize_mips_fbsd_nat prototype.
5810 * mips-fbsd-tdep.c: Remove _initialize_mips_fbsd_tdep prototype.
5811 * mips-linux-nat.c: Remove _initialize_mips_linux_nat prototype.
5812 * mips-linux-tdep.c: Remove _initialize_mips_linux_tdep prototype.
5813 * mips-nbsd-nat.c: Remove _initialize_mipsnbsd_nat prototype.
5814 * mips-nbsd-tdep.c: Remove _initialize_mipsnbsd_tdep prototype.
5815 * mips-sde-tdep.c: Remove _initialize_mips_sde_tdep prototype.
5816 * mips-tdep.c: Remove _initialize_mips_tdep prototype.
5817 * mips64-obsd-nat.c: Remove _initialize_mips64obsd_nat prototype.
5818 * mips64-obsd-tdep.c: Remove _initialize_mips64obsd_tdep
5819 prototype.
5820 * mipsread.c: Remove _initialize_mipsread prototype.
5821 * mn10300-linux-tdep.c: Remove _initialize_mn10300_linux_tdep
5822 prototype.
5823 * mn10300-tdep.c: Remove _initialize_mn10300_tdep prototype.
5824 * moxie-tdep.c: Remove _initialize_moxie_tdep prototype.
5825 * msp430-tdep.c: Remove _initialize_msp430_tdep prototype.
5826 * mt-tdep.c: Remove _initialize_mt_tdep prototype.
5827 * nds32-tdep.c: Remove _initialize_nds32_tdep prototype.
5828 * nios2-linux-tdep.c: Remove _initialize_nios2_linux_tdep
5829 prototype.
5830 * nios2-tdep.c: Remove _initialize_nios2_tdep prototype.
5831 * nto-procfs.c: Remove _initialize_procfs prototype.
5832 * nto-tdep.c: Remove _initialize_nto_tdep prototype.
5833 * objc-lang.c: Remove _initialize_objc_language prototype.
5834 * objfiles.c: Remove _initialize_objfiles prototype.
5835 * observer.c: Remove observer_test_first_notification_function,
5836 observer_test_second_notification_function,
5837 observer_test_third_notification_function, and
5838 _initialize_observer prototypes.
5839 * opencl-lang.c: Remove _initialize_opencl_language prototypes.
5840 * osabi.c: Remove _initialize_gdb_osabi prototype.
5841 * osdata.c: Remove _initialize_osdata prototype.
5842 * p-valprint.c: Remove _initialize_pascal_valprint prototype.
5843 * parse.c: Remove _initialize_parse prototype.
5844 * ppc-fbsd-nat.c: Remove _initialize_ppcfbsd_nat prototype.
5845 * ppc-fbsd-tdep.c: Remove _initialize_ppcfbsd_tdep prototype.
5846 * ppc-linux-nat.c: Remove _initialize_ppc_linux_nat prototype.
5847 * ppc-linux-tdep.c: Remove _initialize_ppc_linux_tdep prototype.
5848 * ppc-nbsd-nat.c: Remove _initialize_ppcnbsd_nat prototype.
5849 * ppc-nbsd-tdep.c: Remove _initialize_ppcnbsd_tdep prototype.
5850 * ppc-obsd-nat.c: Remove _initialize_ppcobsd_nat prototype.
5851 * ppc-obsd-tdep.c: Remove _initialize_ppcobsd_tdep prototype.
5852 * printcmd.c: Remove _initialize_printcmd prototype.
5853 * probe.c: Remove _initialize_probe prototype.
5854 * proc-api.c: Remove _initialize_proc_api prototype.
5855 * proc-events.c: Remove _initialize_proc_events prototype.
5856 * proc-service.c: Remove _initialize_proc_service prototype.
5857 * procfs.c: Remove _initialize_procfs prototype.
5858 * psymtab.c: Remove _initialize_psymtab prototype.
5859 * python/python.c: Remove _initialize_python prototype.
5860 * ravenscar-thread.c: Remove _initialize_ravenscar prototype.
5861 * record-btrace.c: Remove _initialize_record_btrace prototype.
5862 * record-full.c: Remove _initialize_record_full prototype.
5863 * record.c: Remove _initialize_record prototype.
5864 * regcache.c: Remove _initialize_regcache prototype.
5865 * reggroups.c: Remove _initialize_reggroup prototype.
5866 * remote-notif.c: Remove _initialize_notif prototype.
5867 * remote-sim.c: Remove _initialize_remote_sim prototype.
5868 * remote.c: Remove _initialize_remote prototype.
5869 * reverse.c: Remove _initialize_reverse prototype.
5870 * rl78-tdep.c: Remove _initialize_rl78_tdep prototype.
5871 * rs6000-aix-tdep.c: Remove _initialize_rs6000_aix_tdep prototype.
5872 * rs6000-lynx178-tdep.c: Remove _initialize_rs6000_lynx178_tdep
5873 prototype.
5874 * rs6000-nat.c: Remove _initialize_rs6000_nat prototype.
5875 * rs6000-tdep.c: Remove _initialize_rs6000_tdep prototype.
5876 * rust-exp.y: Remove _initialize_rust_exp prototype.
5877 * rx-tdep.c: Remove _initialize_rx_tdep prototype.
5878 * s390-linux-nat.c: Remove _initialize_s390_nat prototype.
5879 * s390-linux-tdep.c: Remove _initialize_s390_tdep prototype.
5880 * score-tdep.c: Remove _initialize_score_tdep prototype.
5881 * selftest-arch.c: Remove _initialize_selftests_foreach_arch
5882 prototype.
5883 * ser-go32.c: Remove _initialize_ser_dos prototype.
5884 * ser-mingw.c: Remove _initialize_ser_windows prototype.
5885 * ser-pipe.c: Remove _initialize_ser_pipe prototype.
5886 * ser-tcp.c: Remove _initialize_ser_tcp prototype.
5887 * ser-unix.c: Remove _initialize_ser_hardwire prototype.
5888 * serial.c: Remove _initialize_serial prototype.
5889 * sh-linux-tdep.c: Remove _initialize_sh_linux_tdep prototype.
5890 * sh-nbsd-nat.c: Remove _initialize_shnbsd_nat prototype.
5891 * sh-nbsd-tdep.c: Remove _initialize_shnbsd_tdep prototype.
5892 * sh-tdep.c: Remove _initialize_sh_tdep prototype.
5893 * skip.c: Remove _initialize_step_skip prototype.
5894 * sol-thread.c: Remove _initialize_sol_thread prototype.
5895 * solib-aix.c: Remove _initialize_solib_aix prototype.
5896 * solib-darwin.c: Remove _initialize_darwin_solib prototype.
5897 * solib-dsbt.c: Remove _initialize_dsbt_solib prototype.
5898 * solib-frv.c: Remove _initialize_frv_solib prototype.
5899 * solib-spu.c: Remove _initialize_spu_solib prototype.
5900 * solib-svr4.c: Remove _initialize_svr4_solib prototype.
5901 * solib-target.c: Remove _initialize_solib_target prototype.
5902 * solib.c: Remove _initialize_solib prototype.
5903 * source.c: Remove _initialize_source prototype.
5904 * sparc-linux-nat.c: Remove _initialize_sparc_linux_nat prototype.
5905 * sparc-linux-tdep.c: Remove _initialize_sparc_linux_tdep
5906 prototype.
5907 * sparc-nat.c: Remove _initialize_sparc_nat prototype.
5908 * sparc-nbsd-nat.c: Remove _initialize_sparcnbsd_nat prototype.
5909 * sparc-nbsd-tdep.c: Remove _initialize_sparcnbsd_tdep prototype.
5910 * sparc-obsd-tdep.c: Remove _initialize_sparc32obsd_tdep
5911 prototype.
5912 * sparc-sol2-nat.c: Remove _initialize_sparc_sol2_nat prototype.
5913 * sparc-sol2-tdep.c: Remove _initialize_sparc_sol2_tdep prototype.
5914 * sparc-tdep.c: Remove _initialize_sparc_tdep prototype.
5915 * sparc64-fbsd-nat.c: Remove _initialize_sparc64fbsd_nat
5916 prototype.
5917 * sparc64-fbsd-tdep.c: Remove _initialize_sparc64fbsd_tdep
5918 prototype.
5919 * sparc64-linux-nat.c: Remove _initialize_sparc64_linux_nat
5920 prototype.
5921 * sparc64-linux-tdep.c: Remove _initialize_sparc64_linux_tdep
5922 prototype.
5923 * sparc64-nat.c: Remove _initialize_sparc64_nat prototype.
5924 * sparc64-nbsd-nat.c: Remove _initialize_sparc64nbsd_nat
5925 prototype.
5926 * sparc64-nbsd-tdep.c: Remove _initialize_sparc64nbsd_tdep
5927 prototype.
5928 * sparc64-obsd-nat.c: Remove _initialize_sparc64obsd_nat
5929 prototype.
5930 * sparc64-obsd-tdep.c: Remove _initialize_sparc64obsd_tdep
5931 prototype.
5932 * sparc64-sol2-tdep.c: Remove _initialize_sparc64_sol2_tdep
5933 prototype.
5934 * spu-linux-nat.c: Remove _initialize_spu_nat prototype.
5935 * spu-multiarch.c: Remove _initialize_spu_multiarch prototype.
5936 * spu-tdep.c: Remove _initialize_spu_tdep prototype.
5937 * stabsread.c: Remove _initialize_stabsread prototype.
5938 * stack.c: Remove _initialize_stack prototype.
5939 * stap-probe.c: Remove _initialize_stap_probe prototype.
5940 * std-regs.c: Remove _initialize_frame_reg prototype.
5941 * symfile-debug.c: Remove _initialize_symfile_debug prototype.
5942 * symfile-mem.c: Remove _initialize_symfile_mem prototype.
5943 * symfile.c: Remove _initialize_symfile prototype.
5944 * symmisc.c: Remove _initialize_symmisc prototype.
5945 * symtab.c: Remove _initialize_symtab prototype.
5946 * target-dcache.c: Remove _initialize_target_dcache prototype.
5947 * target-descriptions.c: Remove _initialize_target_descriptions
5948 prototype.
5949 * thread.c: Remove _initialize_thread prototype.
5950 * tic6x-linux-tdep.c: Remove _initialize_tic6x_linux_tdep
5951 prototype.
5952 * tic6x-tdep.c: Remove _initialize_tic6x_tdep prototype.
5953 * tilegx-linux-nat.c: Remove _initialize_tile_linux_nat prototype.
5954 * tilegx-linux-tdep.c: Remove _initialize_tilegx_linux_tdep
5955 prototype.
5956 * tilegx-tdep.c: Remove _initialize_tilegx_tdep prototype.
5957 * tracefile-tfile.c: Remove _initialize_tracefile_tfile prototype.
5958 * tracefile.c: Remove _initialize_tracefile prototype.
5959 * tracepoint.c: Remove _initialize_tracepoint prototype.
5960 * tui/tui-hooks.c: Remove _initialize_tui_hooks prototype.
5961 * tui/tui-interp.c: Remove _initialize_tui_interp prototype.
5962 * tui/tui-layout.c: Remove _initialize_tui_layout prototype.
5963 * tui/tui-regs.c: Remove _initialize_tui_regs prototype.
5964 * tui/tui-stack.c: Remove _initialize_tui_stack prototype.
5965 * tui/tui-win.c: Remove _initialize_tui_win prototype.
5966 * tui/tui.c: Remove _initialize_tui prototype.
5967 * typeprint.c: Remove _initialize_typeprint prototype.
5968 * user-regs.c: Remove _initialize_user_regs prototype.
5969 * utils.c: Remove _initialize_utils prototype.
5970 * v850-tdep.c: Remove _initialize_v850_tdep prototype.
5971 * valarith.c: Remove _initialize_valarith prototype.
5972 * valops.c: Remove _initialize_valops prototype.
5973 * valprint.c: Remove _initialize_valprint prototype.
5974 * value.c: Remove _initialize_values prototype.
5975 * varobj.c: Remove _initialize_varobj prototype.
5976 * vax-bsd-nat.c: Remove _initialize_vaxbsd_nat prototype.
5977 * vax-nbsd-tdep.c: Remove _initialize_vaxnbsd_tdep prototype.
5978 * vax-tdep.c: Remove _initialize_vax_tdep prototype.
5979 * windows-nat.c: Remove _initialize_windows_nat,
5980 _initialize_check_for_gdb_ini, and _initialize_loadable
5981 prototypes.
5982 * windows-tdep.c: Remove _initialize_windows_tdep prototype.
5983 * xcoffread.c: Remove _initialize_xcoffread prototype.
5984 * xml-support.c: Remove _initialize_xml_support prototype.
5985 * xstormy16-tdep.c: Remove _initialize_xstormy16_tdep prototype.
5986 * xtensa-linux-nat.c: Remove _initialize_xtensa_linux_nat
5987 prototype.
5988 * xtensa-linux-tdep.c: Remove _initialize_xtensa_linux_tdep
5989 prototype.
5990 * xtensa-tdep.c: Remove _initialize_xtensa_tdep prototype.
5991
a611b5cb
KS
59922017-09-08 Keith Seitz <keiths@redhat.com>
5993
5994 * dwarf2read.c (struct field_info) <fnfields>: Remove unused
5995 field.
5996
469412dd
CW
59972017-09-08 Christoph Weinmann <christoph.t.weinmann@intel.com>
5998
5999 * f-valprint.c (f_val_print): Remove check for one byte
6000 sized integers. Remove printing of character type.
6001
a5ad232b
FP
60022017-09-08 Frank Penczek <frank.penczek@intel.com>
6003 Christoph Weinmann <christoph.t.weinmann@intel.com>
6004 Bernhard Heckel <bernhard.heckel@intel.com>
6005
6006 * f-typeprint.c (f_type_print_base): Use fprintfi_filtered
6007 to maintain proper indentation when printing pointers/refs.
6008
e5014227
JB
60092017-09-07 Joel Brobecker <brobecker@adacore.com>
6010
6011 GDB 8.0.1 released.
6012
63c99141
JB
60132017-09-07 Joel Brobecker <brobecker@adacore.com>
6014
6015 * NEWS (Changes in GDB 7.11): Remove entry for QStartupWithShell.
6016
69c1e056
TT
60172017-09-05 Tom Tromey <tom@tromey.com>
6018
6019 * parse.c (funcall_chain): Now a std::vector.
6020 (start_arglist, end_arglist): Simplify.
6021 (free_funcalls): Remove.
6022 (parse_exp_in_context_1): Remove cleanup.
6023
fef704bf
TT
60242017-09-05 Tom Tromey <tom@tromey.com>
6025
6026 * go-exp.y (go_parse): Don't create a cleanup.
6027
5613c585
TT
60282017-09-05 Tom Tromey <tom@tromey.com>
6029
6030 * d-exp.y (PrimaryExpression): Use std::string.
6031 (d_parse): Don't create a cleanup.
6032
eae49211
TT
60332017-09-05 Tom Tromey <tom@tromey.com>
6034
6035 * utils.c (do_clear_parser_state): Remove.
6036 (make_cleanup_clear_parser_state): Remove.
6037 * p-exp.y (pascal_parse): Use scoped_restore.
6038 * m2-exp.y (m2_parse): Use scoped_restore.
6039 * f-exp.y (f_parse): Use scoped_restore.
6040 * d-exp.y (d_parse): Use scoped_restore.
6041 * c-exp.y (c_parse): Use scoped_restore.
6042 * ada-exp.y (ada_parse): Use scoped_restore.
6043 * utils.h (make_cleanup_clear_parser_state): Remove.
6044
73b9be8b
KS
60452017-09-06 Keith Seitz <keiths@redhat.com>
6046
6047 * dwarf2read.c (dw2_linkage_name_attr): New function.
6048 (dw2_linkage_name): New function.
6049 (dwarf2_compute_name, dwarf2_physname, read_call_site_scope)
6050 (guess_full_die_structure_name, dwarf2_name): Use dw2_linkage_name.
6051 (anonymous_struct_prefix, dwarf2_name): Use dw2_linkage_name_attr.
6052
a102602b
KR
60532017-09-06 Kamil Rytarowski <n54@gmx.com>
6054
6055 * config/djgpp/djconfig.sh: Correct shell portability issue.
6056
28ad437d
KR
60572017-09-06 Kamil Rytarowski <n54@gmx.com>
6058
6059 * configure.nat: Define HAVE_NATIVE_GCORE_HOST on NetBSD.
6060
351787dd
JB
60612017-09-06 John Baldwin <jhb@FreeBSD.org>
6062
6063 * Makefile.in (ALLDEPFILES): Add mips-fbsd-nat.c.
6064 * NEWS: Mention new FreeBSD/mips native configuration.
6065 * configure.host: Add aarch64*-*-freebsd*.
6066 * configure.nat: Likewise.
6067 * aarch64-fbsd-nat.c: New file.
6068
c0f84956
JB
60692017-09-06 John Baldwin <jhb@FreeBSD.org>
6070
6071 * Makefile.in (ALL_64_TARGET_OBS): Add aarch64-fbsd-tdep.o.
6072 (ALLDEPFILES): Add aarch64-fbsd-tdep.c.
6073 * NEWS: Mention new FreeBSD/aarch64 target.
6074 * configure.tgt: Add aarch64*-*-freebsd*.
6075 * aarch64-fbsd-tdep.c: New file.
6076 * aarch64-fbsd-tdep.h: New file.
6077
7610297a
KR
60782017-09-06 Kamil Rytarowski <n54@gmx.com>
6079
6080 * MAINTAINERS (Write After Approval): Add Kamil Rytarowski.
6081
fbd1b771
JK
60822017-09-06 Jan Kratochvil <jan.kratochvil@redhat.com>
6083
6084 * parse.c (find_minsym_type_and_address): Don't relocate addresses
6085 of TLS symbols.
6086
5ca79eae
PW
60872017-09-05 Philippe Waroquiers <philippe.waroquiers@skynet.be>
6088
6089 * objfiles.c (get_objfile_bfd_data): Remove useless obstack_init
6090 call.
6091
bf93d7ba
SM
60922017-09-05 Simon Marchi <simon.marchi@ericsson.com>
6093
6094 * infrun.c (follow_exec): Call add_thread after
6095 target_find_description.
6096
1bb7c059
SM
60972017-09-05 Simon Marchi <simon.marchi@ericsson.com>
6098
6099 * infrun.c (handle_inferior_event_1): When exec'ing, read
6100 stop_pc after follow_exec.
6101
fc809827
SM
61022017-09-05 Simon Marchi <simon.marchi@ericsson.com>
6103
6104 * remote.c (process_g_packet): Update error message.
6105
d2fcdd85
YQ
61062017-09-05 Yao Qi <yao.qi@linaro.org>
6107
6108 * configure.tgt (gdb_target_obs): Add i386.o for x86_64-*
6109 targets.
6110
e69570ee
PA
61112017-09-05 Pedro Alves <palves@redhat.com>
6112
6113 * eval.c (eval_call, evaluate_funcall): New functions, factored
6114 out from ...
6115 (evaluate_subexp_standard): ... this.
6116
22916b07
YQ
61172017-09-05 Yao Qi <yao.qi@linaro.org>
6118
6119 * amd64-tdep.c (amd64_target_description): Create target
6120 descriptions.
6121 (_initialize_amd64_tdep): Don't call functions
6122 initialize_tdesc_amd64_*. Add self tests.
6123 * arch/amd64.c (amd64_create_target_description): Add parameter
6124 is_linux. Call set_tdesc_osabi if is_linux is true.
6125 * arch/amd64.h (amd64_create_target_description): Update the
6126 declaration.
6127 * arch/i386.c (i386_create_target_description): Add parameter
6128 is_linux. Call set_tdesc_osabi if is_linux is true.
6129 * arch/i386.h (i386_create_target_description): Update
6130 declaration.
6131 * configure.tgt: Add i386.o to gdb_target_obs.
6132 * features/Makefile (XMLTOC): Remove i386/*.xml.
6133 * features/i386/amd64-avx-avx512.c: Remove.
6134 * features/i386/amd64-avx-mpx-avx512-pku.c: Remove.
6135 * features/i386/amd64-avx-mpx.c: Remove.
6136 * features/i386/amd64-avx.c: Remove.
6137 * features/i386/amd64-mpx.c: Remove.
6138 * features/i386/amd64.c: Remove.
6139 * features/i386/i386-avx-avx512.c: Remove.
6140 * features/i386/i386-avx-mpx-avx512-pku.c: Remove.
6141 * features/i386/i386-avx-mpx.c: Remove.
6142 * features/i386/i386-avx.c: Remove.
6143 * features/i386/i386-mmx.c: Remove.
6144 * features/i386/i386-mpx.c: Remove.
6145 * features/i386/i386.c: Remove.
6146 * i386-tdep.c: Don't include features/i386/i386*.c., include
6147 target-descriptions.h and arch/i386.h.
6148 (i386_target_description): Create target descriptions.
6149 (i386_gdbarch_init): Don't call initialize_tdesc_i386_*
6150 functions. Do self tests.
6151
0854b7b1
YQ
61522017-09-05 Yao Qi <yao.qi@linaro.org>
6153
6154 * features/Makefile (XMLTOC): Remove i386/amd64XXX-linux.xml.
6155 * features/i386/amd64-avx-avx512-linux.c: Removed.
6156 * features/i386/amd64-avx-linux.c: Removed.
6157 * features/i386/amd64-avx-mpx-avx512-pku-linux.c: Removed.
6158 * features/i386/amd64-avx-mpx-linux.c: Removed.
6159 * features/i386/amd64-linux.c: Removed.
6160 * features/i386/amd64-mpx-linux.c: Removed.
6161 * features/i386/x32-avx-avx512-linux.c: Removed.
6162 * features/i386/x32-avx-linux.c: Removed.
6163 * features/i386/x32-linux.c: Removed.
6164
b4570e4b
YQ
61652017-09-05 Yao Qi <yao.qi@linaro.org>
6166
6167 * amd64-linux-tdep.c: Include arch/amd64.h. Don't include
6168 features/i386/*.c.
6169 (amd64_linux_read_description): Call
6170 amd64_create_target_description.
6171 * arch/amd64.c: New file.
6172 * arch/amd64.h: New file.
6173 * configure.tgt (x86_64-*-linux*): Append amd64.o.
6174 * Makefile.in (ALL_64_TARGET_OBS): Append amd64.o.
6175
6c73f67f
YQ
61762017-09-05 Yao Qi <yao.qi@linaro.org>
6177
6178 * amd64-linux-tdep.c: Don't include amd64-XXX-linux and
6179 x32-XXX-linux.c. Include 64bit-XX.c and x32-XX.c.
6180 (amd64_linux_read_description): Create target descriptions.
6181 (_initialize_amd64_linux_tdep): Don't call initialize_tdesc_XXX
6182 functions. Add unit tests.
6183 * features/Makefile (FEATURE_XMLFILES): Append 64bit-XXX.xml and
6184 x32-core.xml.
6185 * features/i386/64bit-avx.c: Generated.
6186 * features/i386/64bit-avx512.c: Generated.
6187 * features/i386/64bit-core.c: Generated.
6188 * features/i386/64bit-linux.c: Generated.
6189 * features/i386/64bit-mpx.c: Generated.
6190 * features/i386/64bit-pkeys.c: Generated.
6191 * features/i386/64bit-segments.c: Generated.
6192 * features/i386/64bit-sse.c: Generated.
6193 * features/i386/x32-core.c: Generated.
6194 * target-descriptions.c (maint_print_c_tdesc_cmd): Print feature
6195 c files for amd64-linux and x32-linux.
6196
9d3d478b
YQ
61972017-09-05 Yao Qi <yao.qi@linaro.org>
6198
6199 * amd64-linux-tdep.c (amd64_linux_read_description): New
6200 function.
6201 (amd64_linux_core_read_description): Call
6202 amd64_linux_read_description.
6203 (amd64_linux_init_abi): Likewise.
6204 (amd64_x32_linux_init_abi): Likewise.
6205 * amd64-linux-tdep.h (amd64_linux_read_description): Declare.
6206 * x86-linux-nat.c (x86_linux_read_description): Call
6207 amd64_linux_read_description.
6208
b9f1d50f
YQ
62092017-09-05 Yao Qi <yao.qi@linaro.org>
6210
6211 * amd64-linux-tdep.c (amd64_linux_core_read_description): Update
6212 comments.
6213
188c9e6d
YQ
62142017-09-05 Yao Qi <yao.qi@linaro.org>
6215
6216 * features/Makefile (XMLTOC): Remove i386/i386-XX-linux.xml.
6217 * features/i386/i386-avx-avx512-linux.c: Remove.
6218 * features/i386/i386-avx-linux.c: Remove.
6219 * features/i386/i386-avx-mpx-avx512-pku-linux.c: Remove.
6220 * features/i386/i386-avx-mpx-linux.c: Remove.
6221 * features/i386/i386-linux.c: Remove.
6222 * features/i386/i386-mmx-linux.c: Remove.
6223 * features/i386/i386-mpx-linux.c: Remove.
6224
5f035c07
YQ
62252017-09-05 Yao Qi <yao.qi@linaro.org>
6226
6227 * Makefile.in (ALL_TARGET_OBS): Add i386.o.
6228 (SFILES): Add arch/i386.c.
6229 (HFILES_NO_SRCDIR): Add arch/i386.h.
6230 * arch/i386.c: New file.
6231 * arch/i386.h: New file.
6232 * arch/tdesc.h (allocate_target_description): Declare.
6233 (set_tdesc_architecture): Declare.
6234 (set_tdesc_osabi): Declare.
6235 * configure.tgt (i[34567]86-*-linux*): Add i386.o.
6236 * i386-linux-tdep.c: Don't include ../features/i386/32bit-XXX.c.
6237 include arch/i386.h.
6238 (i386_linux_read_description): Remove code and call
6239 i386_create_target_description.
6240 (set_tdesc_architecture): New function.
6241 (set_tdesc_osabi): New function.
6242 * target-descriptions.h (allocate_target_description): Remove.
6243
0abe8a89
YQ
62442017-09-05 Yao Qi <yao.qi@linaro.org>
6245
6246 * arch/tdesc.h (tdesc_create_feature): Add an argument xml.
6247 * target-descriptions.c (tdesc_create_feature): Likewise, and
6248 adjust code.
6249 * features/i386/32bit-avx.c: Re-generated.
6250 * features/i386/32bit-avx512.c: Re-generated.
6251 * features/i386/32bit-core.c: Re-generated.
6252 * features/i386/32bit-linux.c: Re-generated.
6253 * features/i386/32bit-mpx.c: Re-generated.
6254 * features/i386/32bit-pkeys.c: Re-generated.
6255 * features/i386/32bit-sse.c: Re-generated.
6256
0a188386
YQ
62572017-09-05 Yao Qi <yao.qi@linaro.org>
6258
6259 * regformats/regdef.h (struct reg): Override operator == and !=.
6260
f49ff000
YQ
62612017-09-05 Yao Qi <yao.qi@linaro.org>
6262
6263 * arch/tdesc.h: New file.
6264 * regformats/regdat.sh: Generate code using tdesc_create_reg.
6265 * target-descriptions.c: Update comments.
6266 * target-descriptions.h: Include "arch/tdesc.h". Remove the
6267 declarations.
6268 * features/i386/32bit-avx.c: Re-generated.
6269 * features/i386/32bit-avx512.c: Re-generated.
6270 * features/i386/32bit-core.c: Re-generated.
6271 * features/i386/32bit-linux.c: Re-generated.
6272 * features/i386/32bit-mpx.c: Re-generated.
6273 * features/i386/32bit-pkeys.c: Re-generated.
6274 * features/i386/32bit-sse.c: Re-generated.
6275
f7000548
YQ
62762017-09-05 Yao Qi <yao.qi@linaro.org>
6277
6278 * regformats/regdat.sh: Update generated code.
6279
c9a5e2a5
YQ
62802017-09-05 Yao Qi <yao.qi@linaro.org>
6281
6282 * regformats/regdat.sh: Adjust code order.
6283
d6b687ac
SM
62842017-09-05 Simon Marchi <simon.marchi@ericsson.com>
6285
6286 * expprint.c (dump_subexp_body_standard): Use constant format
6287 string in fprintf_filtered call.
6288
a379bfd0
JB
62892017-09-04 John Baldwin <jhb@FreeBSD.org>
6290
6291 * configure.nat: Add "x86-nat.o x86-dregs.o" for NetBSD/amd64 and
6292 NetBSD/i386.
6293 * x86-bsd-nat.c [!DBREG_DRX && __NetBSD__]: Define DBREG_DRX.
6294
f7efc967
JB
62952017-09-04 John Baldwin <jhb@FreeBSD.org>
6296
6297 * bsd-kvm.o: Make <sys/user.h> conditional on HAVE_SYS_USER_H.
6298
c49fbc6c
JB
62992017-09-04 John Baldwin <jhb@FreeBSD.org>
6300
6301 * bsd-kvm.o: Define _KMEMUSER.
6302 * configure.ac: Define _KMEMUSER when checking for "struct lwp".
6303 * configure: Regenerate.
6304
26562e73
JB
63052017-09-04 John Baldwin <jhb@FreeBSD.org>
6306
6307 * amd64-fbsd-nat.c: Add include of "x86-xstate.h".
6308 * i386-fbsd-nat.c: Likewise.
6309
31cf1487
JB
63102017-09-04 John Baldwin <jhb@FreeBSD.org>
6311
6312 * unittests/array-view-selftests.c: Add include of <array>.
6313
5b9f8a7c
JB
63142017-09-04 John Baldwin <jhb@FreeBSD.org>
6315
6316 * spu-tdep.c (flush_ea_cache): Add missing argument to
6317 call_function_by_hand.
6318
d69cf9b2
PA
63192017-09-04 Pedro Alves <palves@redhat.com>
6320
6321 * NEWS (Safer support for debugging with no debug info): New.
6322
3693fdb3
PA
63232017-09-04 Pedro Alves <palves@redhat.com>
6324
6325 * c-exp.y (function_method, function_method_void): Add current
6326 instance flags to TYPE_INSTANCE.
6327 * dwarf2read.c (check_modifier): New.
6328 (compute_delayed_physnames): Assert that only C++ adds delayed
6329 physnames. Mark fn_fields as const/volatile depending on
6330 physname.
6331 * eval.c (make_params): New type_instance_flags parameter. Use
6332 it as the new type's instance flags.
6333 (evaluate_subexp_standard) <TYPE_INSTANCE>: Extract the instance
6334 flags element and pass it to make_params.
6335 * expprint.c (print_subexp_standard) <TYPE_INSTANCE>: Handle
6336 instance flags element.
6337 (dump_subexp_body_standard) <TYPE_INSTANCE>: Likewise.
6338 * gdbtypes.h: Include "enum-flags.h".
6339 (type_instance_flags): New enum-flags type.
6340 (TYPE_CONST, TYPE_VOLATILE, TYPE_RESTRICT, TYPE_ATOMIC)
6341 (TYPE_CODE_SPACE, TYPE_DATA_SPACE): Return boolean.
6342 * parse.c (operator_length_standard) <TYPE_INSTANCE>: Adjust.
6343 (follow_type_instance_flags): New function.
6344 (operator_check_standard) <TYPE_INSTANCE>: Adjust.
6345 * parser-defs.h (follow_type_instance_flags): Declare.
6346 * valops.c (value_struct_elt_for_reference): const/volatile must
6347 match too.
6348
e68cb8e0
PA
63492017-09-04 Pedro Alves <palves@redhat.com>
6350
6351 * cp-namespace.c (cp_search_static_and_baseclasses): Handle
6352 function/method scopes; lookup the nested name as a function local
6353 static variable.
6354
858be34c
PA
63552017-09-04 Pedro Alves <palves@redhat.com>
6356
6357 (%type <voidval>): Add function_method.
6358 * c-exp.y (exp): New production for calls with no arguments.
6359 (function_method, function_method_void_or_typelist): New
6360 productions.
6361 (exp): New production for "method()::static_var".
6362 * eval.c (evaluate_subexp_standard): Handle OP_FUNC_STATIC_VAR.
6363 * expprint.c (print_subexp_standard, dump_subexp_body_standard):
6364 Handle OP_FUNC_STATIC_VAR.
6365 * parse.c (operator_length_standard):
6366 Handle OP_FUNC_STATIC_VAR.
6367
dd5901a6
PA
63682017-09-04 Pedro Alves <palves@redhat.com>
6369
6370 * eval.c (evaluate_subexp_standard): Remove UNOP_MEMVAL_TLS
6371 handling.
6372 * expprint.c (print_subexp_standard, dump_subexp_body_standard):
6373 Ditto.
6374 * parse.c (operator_length_standard, operator_check_standard):
6375 Ditto.
6376 * std-operator.def (UNOP_MEMVAL_TLS): Delete.
6377
46a4882b
PA
63782017-09-04 Pedro Alves <palves@redhat.com>
6379
6380 * ax-gdb.c: Include "typeprint.h".
6381 (gen_expr_for_cast): New function.
6382 (gen_expr) <OP_CAST, OP_CAST_TYPE>: Use it.
6383 <OP_VAR_VALUE, OP_MSYM_VAR_VALUE>: Error out if the variable's
6384 type is unknown.
6385 * dwarf2read.c (new_symbol_full): Fallback to int instead of
6386 nodebug_data_symbol.
6387 * eval.c: Include "typeprint.h".
6388 (evaluate_subexp_standard) <OP_VAR_VALUE, OP_VAR_MSYM_VALUE>:
6389 Error out if symbol has unknown type.
6390 <UNOP_CAST, UNOP_CAST_TYPE>: Common bits factored out to
6391 evaluate_subexp_for_cast.
6392 (evaluate_subexp_for_address, evaluate_subexp_for_sizeof): Handle
6393 OP_VAR_MSYM_VALUE.
6394 (evaluate_subexp_for_cast): New function.
6395 * gdbtypes.c (init_nodebug_var_type): New function.
6396 (objfile_type): Use it to initialize types of variables with no
6397 debug info.
6398 * typeprint.c (error_unknown_type): New.
6399 * typeprint.h (error_unknown_type): New declaration.
6400 * compile/compile-c-types.c (convert_type_basic): Handle
6401 TYPE_CODE_ERROR; warn and fallback to int for variables with
6402 unknown type.
6403
fe13dfec
PA
64042017-09-04 Pedro Alves <palves@redhat.com>
6405
6406 * eval.c (evaluate_var_value): New function, factored out from ...
6407 (evaluate_subexp_standard): ... here.
6408
d008ee21
PA
64092017-09-04 Pedro Alves <palves@redhat.com>
6410
6411 * eval.c (evaluate_subexp_standard) <UNOP_COMPLEMENT, UNOP_ADDR>:
6412 Remove useless assignments to 'op'.
6413
827d0c51
PA
64142017-09-04 Pedro Alves <palves@redhat.com>
6415
6416 * eval.c (eval_skip_value): New function.
6417 (evaluate_subexp_standard): Use it.
6418
2c5a2be1
PA
64192017-09-04 Pedro Alves <palves@redhat.com>
6420
6421 * eval.c (evaluate_subexp_standard): <OP_FUNCALL>: Extract
6422 function name from symbol/minsym and pass it to
6423 error_call_unknown_return_type.
6424
74ea4be4
PA
64252017-09-04 Pedro Alves <palves@redhat.com>
6426
6427 * ada-lang.c (resolve_subexp): Handle OP_VAR_MSYM_VALUE.
6428 * ax-gdb.c (gen_msym_var_ref): New function.
6429 (gen_expr): Handle OP_VAR_MSYM_VALUE.
6430 * eval.c (evaluate_var_msym_value): New function.
6431 * eval.c (evaluate_subexp_standard): Handle OP_VAR_MSYM_VALUE.
6432 <OP_FUNCALL>: Extract function name from symbol/minsym and pass it
6433 to call_function_by_hand.
6434 * expprint.c (print_subexp_standard, dump_subexp_body_standard):
6435 Handle OP_VAR_MSYM_VALUE.
6436 (union exp_element) <msymbol>: New field.
6437 * minsyms.h (struct type): Forward declare.
6438 (find_minsym_type_and_address): Declare.
6439 * parse.c (write_exp_elt_msym): New function.
6440 (write_exp_msymbol): Delete, refactored as ...
6441 (find_minsym_type_and_address): ... this new function.
6442 (write_exp_msymbol): Reimplement using OP_VAR_MSYM_VALUE.
6443 (operator_length_standard, operator_check_standard): Handle
6444 OP_VAR_MSYM_VALUE.
6445 * std-operator.def (OP_VAR_MSYM_VALUE): New.
6446
7022349d
PA
64472017-09-04 Pedro Alves <palves@redhat.com>
6448
6449 * ada-lang.c (ada_evaluate_subexp) <TYPE_CODE_FUNC>: Don't handle
6450 TYPE_GNU_IFUNC specially here. Throw error if return type is
6451 unknown.
6452 * ada-typeprint.c (print_func_type): Handle functions with unknown
6453 return type.
6454 * c-typeprint.c (c_type_print_base): Handle functions and methods
6455 with unknown return type.
6456 * compile/compile-c-symbols.c (convert_symbol_bmsym)
6457 <mst_text_gnu_ifunc>: Use nodebug_text_gnu_ifunc_symbol.
6458 * compile/compile-c-types.c: Include "objfiles.h".
6459 (convert_func): For functions with unknown return type, warn and
6460 default to int.
6461 * compile/compile-object-run.c (compile_object_run): Adjust call
6462 to call_function_by_hand_dummy.
6463 * elfread.c (elf_gnu_ifunc_resolve_addr): Adjust call to
6464 call_function_by_hand.
6465 * eval.c (evaluate_subexp_standard): Adjust calls to
6466 call_function_by_hand. Handle functions and methods with unknown
6467 return type. Pass expect_type to call_function_by_hand.
6468 * f-typeprint.c (f_type_print_base): Handle functions with unknown
6469 return type.
6470 * gcore.c (call_target_sbrk): Adjust call to
6471 call_function_by_hand.
6472 * gdbtypes.c (objfile_type): Leave nodebug text symbol with NULL
6473 return type instead of int. Make nodebug_text_gnu_ifunc_symbol be
6474 an integer address type instead of nodebug.
6475 * guile/scm-value.c (gdbscm_value_call): Adjust call to
6476 call_function_by_hand.
6477 * infcall.c (error_call_unknown_return_type): New function.
6478 (call_function_by_hand): New "default_return_type" parameter.
6479 Pass it down.
6480 (call_function_by_hand_dummy): New "default_return_type"
6481 parameter. Use it instead of defaulting to int. If there's no
6482 default and the return type is unknown, throw an error. If
6483 there's a default return type, and the called function has no
6484 debug info, then assume the function is prototyped.
6485 * infcall.h (call_function_by_hand, call_function_by_hand_dummy):
6486 New "default_return_type" parameter.
6487 (error_call_unknown_return_type): New declaration.
6488 * linux-fork.c (call_lseek): Cast return type of lseek.
6489 (inferior_call_waitpid, checkpoint_command): Adjust calls to
6490 call_function_by_hand.
6491 * linux-tdep.c (linux_infcall_mmap, linux_infcall_munmap): Adjust
6492 calls to call_function_by_hand.
6493 * m2-typeprint.c (m2_procedure): Handle functions with unknown
6494 return type.
6495 * objc-lang.c (lookup_objc_class, lookup_child_selector)
6496 (value_nsstring, print_object_command): Adjust calls to
6497 call_function_by_hand.
6498 * p-typeprint.c (pascal_type_print_varspec_prefix): Handle
6499 functions with unknown return type.
6500 (pascal_type_print_func_varspec_suffix): New function.
6501 (pascal_type_print_varspec_suffix) <TYPE_CODE_FUNC,
6502 TYPE_CODE_METHOD>: Use it.
6503 * python/py-value.c (valpy_call): Adjust call to
6504 call_function_by_hand.
6505 * rust-lang.c (rust_evaluate_funcall): Adjust call to
6506 call_function_by_hand.
6507 * valarith.c (value_x_binop, value_x_unop): Adjust calls to
6508 call_function_by_hand.
6509 * valops.c (value_allocate_space_in_inferior): Adjust call to
6510 call_function_by_hand.
6511 * typeprint.c (type_print_unknown_return_type): New function.
6512 * typeprint.h (type_print_unknown_return_type): New declaration.
6513
54990598
PA
65142017-09-04 Pedro Alves <palves@redhat.com>
6515
6516 * gdbtypes.c (lookup_function_type_with_arguments): Mark function
6517 types with more than one parameter as prototyped.
6518
9a24775b
PA
65192017-09-04 Pedro Alves <palves@redhat.com>
6520
6521 * cli/cli-cmds.c (print_disassembly, disassemble_current_function)
6522 (disassemble_command): Use gdb_disassembly_flags instead of bare
6523 int.
6524 * disasm.c (gdb_pretty_print_disassembler::pretty_print_insn)
6525 (dump_insns, do_mixed_source_and_assembly_deprecated)
6526 (do_mixed_source_and_assembly, do_assembly_only, gdb_disassembly):
6527 Use gdb_disassembly_flags instead of bare int.
6528 * disasm.h (DISASSEMBLY_SOURCE_DEPRECATED, DISASSEMBLY_RAW_INSN)
6529 (DISASSEMBLY_OMIT_FNAME, DISASSEMBLY_FILENAME)
6530 (DISASSEMBLY_OMIT_PC, DISASSEMBLY_SOURCE)
6531 (DISASSEMBLY_SPECULATIVE): No longer macros. Instead they're...
6532 (enum gdb_disassembly_flag): ... values of this new enumeration.
6533 (gdb_disassembly_flags): Define.
6534 (gdb_disassembly)
6535 (gdb_pretty_print_disassembler::pretty_print_insn): Use it.
6536 * mi/mi-cmd-disas.c (mi_cmd_disassemble): Use
6537 gdb_disassembly_flags instead of bare int.
6538 * record-btrace.c (btrace_insn_history)
6539 (record_btrace_insn_history, record_btrace_insn_history_range)
6540 (record_btrace_insn_history_from): Use gdb_disassembly_flags
6541 instead of bare int.
6542 * record.c (get_insn_history_modifiers, cmd_record_insn_history):
6543 Use gdb_disassembly_flags instead of bare int.
6544 * target-debug.h (target_debug_print_gdb_disassembly_flags):
6545 Define.
6546 * target-delegates.c: Regenerate.
6547 * target.c (target_insn_history, target_insn_history_from)
6548 (target_insn_history_range): Use gdb_disassembly_flags instead of
6549 bare int.
6550 * target.h: Include "disasm.h".
6551 (struct target_ops) <to_insn_history, to_insn_history_from,
6552 to_insn_history_range>: Use gdb_disassembly_flags instead of bare
6553 int.
6554 (target_insn_history, target_insn_history_from)
6555 (target_insn_history_range): Use gdb_disassembly_flags instead of
6556 bare int.
6557
80a65e9b
SM
65582017-09-04 Simon Marchi <simon.marchi@ericsson.com>
6559
6560 * cli/cli-script.c (build_command_line): For if/while commands,
6561 check whether args is empty.
6562
6b66338c
SM
65632017-09-04 Simon Marchi <simon.marchi@ericsson.com>
6564
6565 * cli/cli-script.h (enum misc_command_type): Move from defs.h.
6566 (enum command_control_type): Likewise.
6567 (struct command_line): Likewise.
6568 (free_command_lines): Likewise.
6569 (struct command_lines_deleter): Likewise.
6570 (command_line_up): Likewise.
6571 (read_command_lines): Likewise.
6572 (read_command_lines_1): Likewise.
6573 * defs.h (enum misc_command_type): Move to cli/cli-script.h.
6574 (enum command_control_type): Likewise.
6575 (struct command_line): Likewise.
6576 (free_command_lines): Likewise.
6577 (struct command_lines_deleter): Likewise.
6578 (command_line_up): Likewise.
6579 (read_command_lines): Likewise.
6580 (read_command_lines_1): Likewise.
6581 * breakpoint.h: Include cli/cli-script.h.
6582 * extension-priv.h: Likewise.
6583 * gdbcmd.h: Likewise.
6584
51abb421
PA
65852017-09-04 Pedro Alves <palves@redhat.com>
6586
6587 * ada-lang.c (is_known_support_routine): Move sal declaration to
6588 where it is initialized.
6589 * breakpoint.c (create_internal_breakpoint, init_catchpoint)
6590 (parse_breakpoint_sals, decode_static_tracepoint_spec)
6591 (clear_command, update_static_tracepoint): Remove init_sal
6592 references. Move declarations closer to initializations.
6593 * cli/cli-cmds.c (list_command): Move sal declarations closer to
6594 initializations.
6595 * elfread.c (elf_gnu_ifunc_resolver_stop): Remove init_sal
6596 references. Move sal declarations closer to initializations.
6597 * frame.c (find_frame_sal): Return a symtab_and_line via function
6598 return instead of output parameter. Remove init_sal references.
6599 * frame.h (find_frame_sal): Return a symtab_and_line via function
6600 return instead of output parameter.
6601 * guile/scm-frame.c (gdbscm_frame_sal): Adjust.
6602 * guile/scm-symtab.c (stscm_make_sal_smob): Use in-place new
6603 instead of memset.
6604 (gdbscm_find_pc_line): Remove init_sal reference.
6605 * infcall.c (call_function_by_hand_dummy): Remove init_sal
6606 references. Move declarations closer to initializations.
6607 * infcmd.c (set_step_frame): Update. Move declarations closer to
6608 initializations.
6609 (finish_backward): Remove init_sal references. Move declarations
6610 closer to initializations.
6611 * infrun.c (process_event_stop_test, handle_step_into_function)
6612 (insert_hp_step_resume_breakpoint_at_frame)
6613 (insert_step_resume_breakpoint_at_caller): Likewise.
6614 * linespec.c (create_sals_line_offset, decode_digits_ordinary)
6615 (symbol_to_sal): Likewise.
6616 * probe.c (parse_probes_in_pspace): Remove init_sal reference.
6617 * python/py-frame.c (frapy_find_sal): Move sal declaration closer
6618 to its initialization.
6619 * reverse.c (save_bookmark_command): Use new/delete. Remove
6620 init_sal references. Move declarations closer to initializations.
6621 * source.c (get_current_source_symtab_and_line): Remove brace
6622 initialization.
6623 (set_current_source_symtab_and_line): Now takes the sal by const
6624 reference. Remove brace initialization.
6625 (line_info): Remove init_sal reference.
6626 * source.h (set_current_source_symtab_and_line): Now takes a
6627 symtab_and_line via const reference.
6628 * stack.c (set_current_sal_from_frame): Adjust.
6629 (print_frame_info): Adjust.
6630 (get_last_displayed_sal): Return the sal via function return
6631 instead of via output parameter. Simplify.
6632 (frame_info): Adjust.
6633 * stack.h (get_last_displayed_sal): Return the sal via function
6634 return instead of via output parameter.
6635 * symtab.c (init_sal): Delete.
6636 (find_pc_sect_line): Remove init_sal references. Move
6637 declarations closer to initializations.
6638 (find_function_start_sal): Remove init_sal references. Move
6639 declarations closer to initializations.
6640 * symtab.h (struct symtab_and_line): In-class initialize all
6641 fields.
6642 * tracepoint.c (set_traceframe_context)
6643 (print_one_static_tracepoint_marker): Remove init_sal references.
6644 Move declarations closer to initializations.
6645 * tui/tui-disasm.c (tui_show_disassem_and_update_source): Adjust.
6646 * tui/tui-stack.c (tui_show_frame_info): Adjust. Move
6647 declarations closer to initializations.
6648 * tui/tui-winsource.c (tui_update_source_window_as_is): Remove
6649 init_sal references. Adjust.
6650
6c5b2ebe
PA
66512017-09-04 Pedro Alves <palves@redhat.com>
6652
6653 * ax-gdb.c (agent_command_1): Use range-for.
6654 * break-catch-throw.c (re_set_exception_catchpoint): Update.
6655 * breakpoint.c: Include "common/array-view.h".
6656 (init_breakpoint_sal, create_breakpoint_sal): Change sals
6657 parameter from struct symtabs_and_lines to
6658 array_view<symtab_and_line>. Adjust. Use range-for. Update.
6659 (breakpoint_sals_to_pc): Change sals parameter from struct
6660 symtabs_and_lines to std::vector reference.
6661 (check_fast_tracepoint_sals): Change sals parameter from struct
6662 symtabs_and_lines to std::array_view. Use range-for.
6663 (decode_static_tracepoint_spec): Return a std::vector instead of
6664 symtabs_and_lines. Update.
6665 (create_breakpoint): Update.
6666 (break_range_command, until_break_command, clear_command): Update.
6667 (base_breakpoint_decode_location, bkpt_decode_location)
6668 (bkpt_probe_create_sals_from_location)
6669 (bkpt_probe_decode_location, tracepoint_decode_location)
6670 (tracepoint_probe_decode_location)
6671 (strace_marker_create_sals_from_location): Return a std::vector
6672 instead of symtabs_and_lines.
6673 (strace_marker_create_breakpoints_sal): Update.
6674 (strace_marker_decode_location): Return a std::vector instead of
6675 symtabs_and_lines. Update.
6676 (update_breakpoint_locations): Change struct symtabs_and_lines
6677 parameters to gdb::array_view. Adjust.
6678 (location_to_sals): Return a std::vector instead of
6679 symtabs_and_lines. Update.
6680 (breakpoint_re_set_default): Use std::vector instead of struct
6681 symtabs_and_lines.
6682 (decode_location_default): Return a std::vector instead of
6683 symtabs_and_lines. Update.
6684 * breakpoint.h: Include "common/array-view.h".
6685 (struct breakpoint_ops) <decode_location>: Now returns a
6686 std::vector instead of returning a symtabs_and_lines via output
6687 parameter.
6688 (update_breakpoint_locations): Change sals parameters to use
6689 gdb::array_view.
6690 * cli/cli-cmds.c (edit_command, list_command): Update to use
6691 std::vector and gdb::array_view.
6692 (ambiguous_line_spec): Adjust to use gdb::array_view and
6693 range-for.
6694 (compare_symtabs): Rename to ...
6695 (cmp_symtabs): ... this. Change parameters to symtab_and_line
6696 const reference and adjust.
6697 (filter_sals): Rewrite using std::vector and standard algorithms.
6698 * elfread.c (elf_gnu_ifunc_resolver_return_stop): Simplify.
6699 (jump_command): Update to use std::vector.
6700 * linespec.c (struct linespec_state) <canonical_names>: Update
6701 comment.
6702 (add_sal_to_sals_basic): Delete.
6703 (add_sal_to_sals, filter_results, convert_results_to_lsals)
6704 (decode_line_2, create_sals_line_offset)
6705 (convert_address_location_to_sals, convert_linespec_to_sals)
6706 (convert_explicit_location_to_sals, parse_linespec)
6707 (event_location_to_sals, decode_line_full, decode_line_1)
6708 (decode_line_with_current_source)
6709 (decode_line_with_last_displayed, decode_objc)
6710 (decode_digits_list_mode, decode_digits_ordinary, minsym_found)
6711 (linespec_result::~linespec_result): Adjust to use std::vector
6712 instead of symtabs_and_lines.
6713 * linespec.h (linespec_sals::sals): Now a std::vector.
6714 (struct linespec_result): Use std::vector, bool, and in-class
6715 initialization.
6716 (decode_line_1, decode_line_with_current_source)
6717 (decode_line_with_last_displayed): Return std::vector.
6718 * macrocmd.c (info_macros_command): Use std::vector.
6719 * mi/mi-main.c (mi_cmd_trace_find): Use std::vector.
6720 * probe.c (parse_probes_in_pspace, parse_probes): Adjust to use
6721 std::vector.
6722 * probe.h (parse_probes): Return a std::vector.
6723 * python/python.c (gdbpy_decode_line): Use std::vector and
6724 gdb::array_view.
6725 * source.c (select_source_symtab, line_info): Use std::vector.
6726 * stack.c (func_command): Use std::vector.
6727 * symtab.h (struct symtabs_and_lines): Delete.
6728 * tracepoint.c (tfind_line_command, scope_info): Use std::vector.
6729
7c44b49c
PA
67302017-09-04 Pedro Alves <palves@redhat.com>
6731
6732 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
6733 unittests/array-view-selftests.c.
6734 (SUBDIR_UNITTESTS_OBS): Add array-view-selftests.o.
6735 * common/array-view.h: New file.
6736 * unittests/array-view-selftests.c: New file.
6737
e439fa14
PA
67382017-09-04 Pedro Alves <palves@redhat.com>
6739
6740 * cli/cli-cmds.c (edit_command): Pass message to
6741 ambiguous_line_spec.
6742 (list_command): Pass message to ambiguous_line_spec. Say
6743 "first"/"last" instead of "start" and "end" to be consistent with
6744 the manual.
6745 (ambiguous_line_spec): Add 'format' and vararg parameters. Use
6746 them to print formatted message.
6747
7525b645
PA
67482017-09-04 Pedro Alves <palves@redhat.com>
6749
6750 * btrace.c (ftrace_add_pt): Pass btrace_insn to
6751 ftrace_update_insns by reference instead of pointer.
6752
badc0020
YQ
67532017-09-04 Yao Qi <yao.qi@linaro.org>
6754
6755 * i386-go32-tdep.c: Include x86-xstate.h.
6756 (i386_go32_init_abi): Call i386_target_description.
6757 * i386-tdep.c (i386_target_description): Return tdesc_i386_mmx
6758 if xcr0 is X86_XSTATE_X87_MASK.
6759 * i386-tdep.h (tdesc_i386): Remove the declaration.
6760 (tdesc_i386_mmx): Likewise.
6761
d78bdb54
YQ
67622017-09-04 Yao Qi <yao.qi@linaro.org>
6763
6764 * i386-fbsd-tdep.c (i386fbsd_core_read_xcr0): Return
6765 X86_XSTATE_SSE_MASK instead of 0.
6766
ca1fa5ee
YQ
67672017-09-04 Yao Qi <yao.qi@linaro.org>
6768
6769 * amd64-fbsd-nat.c (amd64fbsd_read_description): Call
6770 i386_target_description.
6771 * i386-fbsd-nat.c (i386fbsd_read_description): Call
6772 i386_target_description.
6773 * i386-tdep.c (i386_gdbarch_init): Likewise.
6774
2434b019
YQ
67752017-09-04 Yao Qi <yao.qi@linaro.org>
6776
6777 * amd64-darwin-tdep.c: Include "x86-xstate.h".
6778 (x86_darwin_init_abi_64): Call amd64_target_description.
6779 * amd64-dicos-tdep.c: Likewise.
6780 * amd64-fbsd-nat.c: Likewise.
6781 * amd64-fbsd-tdep.c: Likewise.
6782 * amd64-nbsd-tdep.c: Likewise.
6783 * amd64-obsd-tdep.c: Likewise.
6784 * amd64-sol2-tdep.c: Likewise.
6785 * amd64-windows-tdep.c: Likewise.
6786 * amd64-tdep.h (tdesc_amd64): Remove the declaration.
6787
0860c437
SM
67882017-09-04 Simon Marchi <simon.marchi@ericsson.com>
6789
6790 * btrace.h (btrace_insn_s, DEF_VEC_O (btrace_insn_s)): Remove.
6791 (btrace_function) <insn>: Change type to use std::vector.
6792 * btrace.c (ftrace_debug, ftrace_call_num_insn,
6793 ftrace_find_call, ftrace_new_gap, ftrace_update_function,
6794 ftrace_update_insns, ftrace_compute_global_level_offset,
6795 btrace_stitch_bts, btrace_clear, btrace_insn_get,
6796 btrace_insn_end, btrace_insn_next, btrace_insn_prev): Adjust to
6797 change to std::vector.
6798 (ftrace_update_insns): Adjust to change to std::vector, change
6799 type of INSN parameter.
6800 (btrace_compute_ftrace_bts): Adjust call to ftrace_update_insns.
6801 * record-btrace.c (btrace_call_history_insn_range,
6802 btrace_compute_src_line_range,
6803 record_btrace_frame_prev_register): Adjust to change to
6804 std::vector.
6805 * python/py-record-btrace.c (recpy_bt_func_instructions): Adjust
6806 to change to std::vector.
6807
0638b7f9
TT
68082017-09-03 Tom Tromey <tom@tromey.com>
6809
6810 * corefile.c (reopen_exec_file): Use std::string.
6811
8f84fb0e
TT
68122017-09-03 Tom Tromey <tom@tromey.com>
6813
6814 * compile/compile.c (compile_register_name_mangled): Return
6815 std::string.
6816 * compile/compile-loc2c.c (pushf_register_address): Update.
6817 (pushf_register): Update.
6818 * compile/compile-c-types.c (convert_array): Update.
6819 * compile/compile-c-symbols.c (generate_vla_size): Update.
6820 (error_symbol_once): Use a gdb::unique_xmalloc_ptr.
6821 (symbol_substitution_name): Return a gdb::unique_xmalloc_ptr.
6822 (convert_one_symbol): Update.
6823 (generate_c_for_for_one_variable): Update.
6824 * compile/compile-c-support.c (c_get_range_decl_name): Return a
6825 std::string.
6826 (generate_register_struct): Update.
6827 * compile/compile-internal.h (c_get_range_decl_name): Return a
6828 std::string.
6829 (compile_register_name_mangled): Return std::string.
6830
18e9961f
TT
68312017-09-03 Tom Tromey <tom@tromey.com>
6832
6833 * utils.c (perror_string): Return a std::string.
6834 (throw_perror_with_name, perror_warning_with_name): Update.
6835
45343786
TT
68362017-09-03 Tom Tromey <tom@tromey.com>
6837
6838 * demangle.c (demangle_command): Use std::string,
6839 unique_xmalloc_ptr.
6840
b57af503
TT
68412017-09-03 Tom Tromey <tom@tromey.com>
6842
6843 * cli/cli-setshow.c (do_set_command): Use std::string.
6844
6eecf35f
TT
68452017-09-03 Tom Tromey <tom@tromey.com>
6846
6847 * cli/cli-cmds.c (cd_command): Use gdb::unique_xmalloc_ptr.
6848
56496dd4
TT
68492017-09-03 Tom Tromey <tom@tromey.com>
6850
6851 * mi/mi-interp.c (mi_cmd_interpreter_exec): Use std::string.
6852
e91a1fa7
TT
68532017-09-03 Tom Tromey <tom@tromey.com>
6854
6855 * mi/mi-cmd-env.c (env_execute_cli_command): Use
6856 gdb::unique_xmalloc_ptr.
6857
7ffd83d7
TT
68582017-09-03 Tom Tromey <tom@tromey.com>
6859
6860 * thread.c (print_thread_info_1): Use string_printf.
6861 (thread_apply_command, thread_apply_all_command): Use
6862 std::string.
6863
1ccbe998
TT
68642017-09-03 Tom Tromey <tom@tromey.com>
6865
6866 * valprint.c (val_print_string): Update.
6867 * gdbcore.h (memory_error_message): Return std::string.
6868 * corefile.c (memory_error_message): Return std::string.
6869 (memory_error): Update.
6870 * breakpoint.c (insert_bp_location): Update.
6871
23fdd69e
SM
68722017-09-03 Simon Marchi <simon.marchi@ericsson.com>
6873
6874 * target/waitstatus.h (target_waitstatus_to_string): Change
6875 return type to std::string.
6876 * target/waitstatus.c (target_waitstatus_to_string): Return
6877 std::string.
6878 * target.h (target_waitstatus_to_string): Remove declaration.
6879 * infrun.c (resume, clear_proceed_status_thread,
6880 print_target_wait_results, do_target_wait, save_waitstatus,
6881 stop_all_threads): Adjust.
6882 * record-btrace.c (record_btrace_wait): Adjust.
6883 * target-debug.h
6884 (target_debug_print_struct_target_waitstatus_p): Adjust.
6885
5c811d30
JK
68862017-09-01 Jan Kratochvil <jan.kratochvil@redhat.com>
6887
6888 PR gdb/22046
6889 * nat/linux-procfs.c (parse_proc_status_state): Fix PROC_STATE_STOPPED
6890 detection.
6891
0a2dde4a
SDJ
68922017-08-31 Sergio Durigan Junior <sergiodj@redhat.com>
6893
6894 * NEWS (Changes since GDB 8.0): Add entry mentioning new support
6895 for setting/unsetting environment variables on the remote target.
6896 (New remote packets): Add entries for QEnvironmentHexEncoded,
6897 QEnvironmentUnset and QEnvironmentReset.
6898 * common/environ.c (gdb_environ::operator=): Extend method to
6899 handle m_user_set_env_list and m_user_unset_env_list.
6900 (gdb_environ::clear): Likewise.
6901 (match_var_in_string): Change type of first parameter from 'char
6902 *' to 'const char *'.
6903 (gdb_environ::set): Extend method to handle
6904 m_user_set_env_list and m_user_unset_env_list.
6905 (gdb_environ::unset): Likewise.
6906 (gdb_environ::clear_user_set_env): New method.
6907 (gdb_environ::user_set_envp): Likewise.
6908 (gdb_environ::user_unset_envp): Likewise.
6909 * common/environ.h (gdb_environ): Handle m_user_set_env_list and
6910 m_user_unset_env_list on move constructor/assignment.
6911 (unset): Add new default parameter 'update_unset_list = true'.
6912 (clear_user_set_env): New method.
6913 (user_set_envp): Likewise.
6914 (user_unset_envp): Likewise.
6915 (m_user_set_env_list): New std::set.
6916 (m_user_unset_env_list): Likewise.
6917 * common/rsp-low.c (hex2str): New function.
6918 (bin2hex): New overload for bin2hex function.
6919 * common/rsp-low.c (hex2str): New prototype.
6920 (str2hex): New overload prototype.
6921 * remote.c: Include "environ.h". Add QEnvironmentHexEncoded,
6922 QEnvironmentUnset and QEnvironmentReset.
6923 (remote_protocol_features): Add QEnvironmentHexEncoded,
6924 QEnvironmentUnset and QEnvironmentReset packets.
6925 (send_environment_packet): New function.
6926 (extended_remote_environment_support): Likewise.
6927 (extended_remote_create_inferior): Call
6928 extended_remote_environment_support.
6929 (_initialize_remote): Add QEnvironmentHexEncoded,
6930 QEnvironmentUnset and QEnvironmentReset packet configs.
6931 * unittests/environ-selftests.c (gdb_selftest_env_var):
6932 New variable.
6933 (test_vector_initialization): New function.
6934 (test_init_from_host_environ): Likewise.
6935 (test_reinit_from_host_environ): Likewise.
6936 (test_set_A_unset_B_unset_A_cannot_find_A_can_find_B):
6937 Likewise.
6938 (test_unset_set_empty_vector): Likewise.
6939 (test_vector_clear): Likewise.
6940 (test_std_move): Likewise.
6941 (test_move_constructor):
6942 (test_self_move): Likewise.
6943 (test_set_unset_reset): Likewise.
6944 (run_tests): Rewrite in terms of the functions above.
6945
654670a4
WP
69462017-08-31 Weimin Pan <weimin.pan@oracle.com>
6947
6948 * sparc64-tdep.c (adi_stat_t): Fix comment formatting.
6949 (adi_available): Use a temp variable of type CORE_ADDR as argument
6950 3 when calling target_auxv_search.
6951 (adi_normalize_address): Use masks and xor operators to calculate
6952 normalized address.
6953 (adi_read_versions, adi_write_versions, adi_print_versions)
6954 (do_examine, do_assign): Use paddress.
6955
7755ddb7
JB
69562017-08-29 John Baldwin <jhb@FreeBSD.org>
6957
6958 * mips-fbsd-nat.c (getfpregs_supplies): Return true for FIR.
6959 * mips-fbsd-tdep.c (mips_fbsd_supply_fpregs): Split supply of FSR
6960 out of loop and add supply of FIR.
6961 (mips_fbsd_collect_fpregs): Split collect of FSR out of loop and
6962 add collect of FIR.
6963
fd437cbc
SM
69642017-08-28 Simon Marchi <simon.marchi@ericsson.com>
6965
3804a343 6966 PR gdb/21827
fd437cbc
SM
6967 * cli/cli-script.c (define_command): Don't convert command name
6968 to lower case.
6969
988f6b3d
JB
69702017-08-25 Joel Brobecker <brobecker@adacore.com>
6971
6972 * ada-lang.c (ada_lookup_struct_elt_type): Remove parameter "dispp".
6973 Update all callers accordingly. Remove all code blocks handling
6974 the case where DISPP is not NULL.
6975
663c44ac
JK
69762017-08-24 Jan Kratochvil <jan.kratochvil@redhat.com>
6977
6978 PR symtab/22003
6979 * dwarf2read.c (dwarf2_const_value_attr, dump_die_shallow)
6980 (dwarf2_get_attr_constant_value, dwarf2_fetch_constant_bytes)
6981 (skip_form_bytes, attr_form_is_constant): Handle DW_FORM_implicit_const.
6982
f1902523
JK
69832017-08-24 Jan Kratochvil <jan.kratochvil@redhat.com>
6984
6985 * dwarf2read.c (build_type_psymtabs_reader): New prototype.
6986 (process_psymtab_comp_unit): Accept IS_DEBUG_TYPES.
6987 (read_comp_units_from_section): New parameter abbrev_section, use
6988 read_and_check_comp_unit_head, allocate signatured_type if needed.
6989 (create_all_comp_units): Update read_comp_units_from_section caller.
6990
87215ad1
SDJ
69912017-08-23 Pedro Alves <palves@redhat.com>
6992
6993 PR remote/21852
6994 * remote.c (add_current_inferior_and_thread): Set inferior_ptid
6995 to null_ptid and switch to thread without reading the registers
6996 after adding the inferior.
6997
6e41ddec
JK
69982017-08-23 Jan Kratochvil <jan.kratochvil@redhat.com>
6999
7000 * NEWS (Changes since GDB 8.0): Add set compile-gcc and show
7001 compile-gcc.
7002 * compile/compile.c (compile_gcc, show_compile_gcc): New.
7003 (compile_to_object): Implement compile_gcc.
7004 (_initialize_compile): Install "set compile-gcc". Initialize
7005 compile_gcc.
7006
e68c32d5
JK
70072017-08-23 Jan Kratochvil <jan.kratochvil@redhat.com>
7008
7009 * compile/compile.c (compile_to_object): Conditionally call
7010 set_verbose. Conditionally call compile or compile_v0.
7011
58afddc6
WP
70122017-08-07 Weimin Pan <weimin.pan@oracle.com>
7013
7014 * sparc64-tdep.h: (adi_normalize_address): New export.
7015 * sparc-nat.h: (open_adi_tag_fd): New export.
7016 * sparc64-linux-nat.c: (open_adi_tag_fd): New function.
7017 * sparc64-linux-tdep.c:
7018 (SEGV_ACCADI, SEGV_ADIDERR, SEGV_ADIPERR) New defines.
7019 (sparc64_linux_handle_segmentation_fault): New function.
7020 (sparc64_linux_init_abi): Register
7021 sparc64_linux_handle_segmentation_fault
7022 * sparc64-tdep.c: Include cli-utils.h,gdbcmd.h,auxv.h.
7023 (sparc64_addr_bits_remove): New function.
7024 (sparc64_init_abi): Register sparc64_addr_bits_remove.
7025 (MAX_PROC_NAME_SIZE): New macro.
7026 (AT_ADI_BLKSZ, AT_ADI_NBITS, AT_ADI_UEONADI) New defines.
7027 (sparc64adilist): New variable.
7028 (adi_proc_list): New variable.
7029 (find_adi_info): New function.
7030 (add_adi_info): New function.
7031 (get_adi_info_proc): New function.
7032 (get_adi_info): New function.
7033 (info_adi_command): New function.
7034 (read_maps_entry): New function.
7035 (adi_available): New function.
7036 (adi_normalize_address): New function.
7037 (adi_align_address): New function.
7038 (adi_convert_byte_count): New function.
7039 (adi_tag_fd): New function.
7040 (adi_is_addr_mapped): New function.
7041 (adi_read_versions): New function.
7042 (adi_write_versions): New function.
7043 (adi_print_versions): New function.
7044 (do_examine): New function.
7045 (do_assign): New function.
7046 (adi_examine_command): New function.
7047 (adi_assign_command): New function.
7048 (_initialize_sparc64_adi_tdep): New function.
7049
11db9430
SM
70502017-08-22 Simon Marchi <simon.marchi@ericsson.com>
7051
7052 * breakpoint.c (breakpoints_info): Rename to ...
7053 (info_breakpoints_command): ... this.
7054 (watchpoints_info): Rename to ...
7055 (info_watchpoints_command): ... this.
7056 (tracepoints_info): Rename to ...
7057 (info_tracepoints_command): ... this.
7058 (_initialize_breakpoint): Adjust.
7059 * dcache.c (dcache_info): Rename to ...
7060 (info_display_command): ... this.
7061 (_initialize_dcache): Adjust.
7062 * frame.h (args_info): Rename to ...
7063 (info_args_command): ... this.
7064 (locals_info): Rename to ...
7065 (info_locals_command): ... this.
7066 * infcmd.c (nofp_registers_info): Rename to ...
7067 (info_registers_command): ... this.
7068 (float_info): Rename to ...
7069 (info_float_command): ... this.
7070 (program_info): Rename to ...
7071 (info_program_command): ... this.
7072 (all_registers_info): Rename to ...
7073 (info_all_registers_command): ... this.
7074 (vector_info): Rename to ...
7075 (info_vector_command): ... this.
7076 (float_info): Rename to ...
7077 (info_float_command): ... this.
7078 (_initialize_infcmd): Adjust.
7079 * inferior.h (term_info): Rename to ...
7080 (info_terminal_command): ... this.
7081 * inflow.c (term_info): Rename to ...
7082 (info_terminal_command): ... this.
7083 (_initialize_inflow): Adjust.
7084 * infrun.c (signals_info): Rename to ...
7085 (info_signals_command): ... this.
7086 (_initialize_infrun): Adjust.
7087 * objc-lang.c (classes_info): Rename to ...
7088 (info_classes_command): ... this.
7089 (selectors_info): Rename to ...
7090 (info_selectors_command): ... this.
7091 (_initialize_objc_language): Adjust.
7092 * printcmd.c (sym_info): Rename to ...
7093 (info_symbol_command): ... this.
7094 (address_info): Rename to ...
7095 (info_address_command): ... this.
7096 (display_info): Rename to ...
7097 (info_display_command): ... this.
7098 (_initialize_printcmd): Adjust.
7099 * reverse.c (bookmarks_info): Rename to ...
7100 (info_breakpoints_command): ... this.
7101 (_initialize_reverse): Adjust.
7102 * ser-go32.c (dos_info): Rename to ...
7103 (info_serial_command): ... this.
7104 (_initialize_ser_dos): Adjust.
7105 * skip.c (skip_info): Rename to ...
7106 (info_skip_command): ... this.
7107 (_initialize_step_skip): Adjust.
7108 * source.c (line_info): Rename to ...
7109 (info_line_command): ... this.
7110 (source_info): Rename to ...
7111 (info_source_command)
7112 * stack.c (frame_info): Rename to ...
7113 (info_frame_command): ... this.
7114 (locals_info): Rename to ...
7115 (info_locals_command): ... this.
7116 (args_info): Rename to ...
7117 (info_args_command): ... this.
7118 (_initialize_stack): Adjust.
7119 * symtab.c (sources_info): Rename to ...
7120 (info_sources_command): ... this.
7121 (variables_info): Rename to ...
7122 (info_variables_command): ... this.
7123 (functions_info): Rename to ...
7124 (info_functions_command): ... this.
7125 (types_info): Rename to ...
7126 (info_types_command): ... this.
7127 (_initialize_symtab): Adjust.
7128 * target.c (target_info): Rename to ...
7129 (info_target_command): ... this.
7130 (initialize_targets): Adjust.
7131 * tracepoint.c (tvariables_info): Rename to ...
7132 (info_tvariables_command): ... this.
7133 (scope_info): Rename to ...
7134 (info_scope_command): ... this.
7135 (trace_dump_actions): Adjust.
7136 (_initialize_tracepoint): Adjust.
7137
b270e6f9
TT
71382017-08-22 Tom Tromey <tom@tromey.com>
7139
7140 * breakpoint.h (install_breakpoint): Update.
7141 * breakpoint.c (add_solib_catchpoint): Update.
7142 (install_breakpoint): Change argument to a std::unique_ptr.
7143 (create_fork_vfork_event_catchpoint): Use std::unique_ptr.
7144 (create_breakpoint_sal, create_breakpoint): Update.
7145 (watch_command_1, catch_exec_command_1)
7146 (strace_marker_create_breakpoints_sal): Use std::unique_ptr.
7147 (add_to_breakpoint_chain): Change argument to a std::unique_ptr.
7148 Return the breakpoint.
7149 (set_raw_breakpoint_without_location, set_raw_breakpoint)
7150 (new_single_step_breakpoint): Update.
7151 * break-catch-throw.c (handle_gnu_v3_exceptions): Use
7152 std::unique_ptr.
7153 * break-catch-syscall.c (create_syscall_event_catchpoint): Use
7154 std::unique_ptr.
7155 * break-catch-sig.c (create_signal_catchpoint): Use
7156 std::unique_ptr.
7157 * ada-lang.c (create_ada_exception_catchpoint): Use
7158 std::unique_ptr.
7159
36bd8eaa
TT
71602017-08-22 Tom Tromey <tom@tromey.com>
7161
7162 * breakpoint.c (add_solib_catchpoint): Use std::unique_ptr.
7163
56f37645
TT
71642017-08-22 Tom Tromey <tom@tromey.com>
7165
7166 * psymtab.c (psymtab_search_name): Return a unique_xmalloc_ptr.
7167 (lookup_partial_symbol): Update.
7168
0b581c69
TT
71692017-08-22 Tom Tromey <tom@tromey.com>
7170
7171 * source.h (rewrite_source_path): Return a unique_xmalloc_ptr.
7172 * source.c (rewrite_source_path): Return a unique_xmalloc_ptr.
7173 (find_and_open_source, symtab_to_fullname): Update.
7174 * psymtab.c (psymtab_to_fullname): Update.
7175
14278e1f
TT
71762017-08-22 Tom Tromey <tom@tromey.com>
7177
7178 * exec.c (exec_file_attach): Update.
7179 * linux-thread-db.c (try_thread_db_load): Update.
7180 * guile/scm-safe-call.c (gdbscm_safe_source_script): Update.
7181 * utils.c (gdb_realpath): Change return type.
7182 (gdb_realpath_keepfile): Update.
7183 (gdb_realpath_check_trailer, gdb_realpath_tests): New functions.
7184 (_initialize_utils): Register the new self test.
7185 * source.c (openp): Update.
7186 (find_and_open_source): Update.
7187 * nto-tdep.c (nto_find_and_open_solib): Update.
7188 * main.c (set_gdb_data_directory): Update.
7189 (captured_main_1): Update.
7190 * dwarf2read.c (dwarf2_get_dwz_file): Update
7191 (dw2_map_symbol_filenames): Update.
7192 * auto-load.c (auto_load_safe_path_vec_update): Update.
7193 (filename_is_in_auto_load_safe_path_vec): Change type of
7194 "filename_realp".
7195 (auto_load_objfile_script): Update.
7196 (file_is_auto_load_safe): Update. Use std::string.
7197 * utils.h (gdb_realpath): Return a gdb::unique_xmalloc_ptr.
7198
4971c9a7
TT
71992017-08-22 Tom Tromey <tom@tromey.com>
7200
7201 * utils.c (gdb_realpath_keepfile): Return a
7202 gdb::unique_xmalloc_ptr.
7203 * exec.c (exec_file_attach): Update.
7204 * utils.h (gdb_realpath_keepfile): Return a
7205 gdb::unique_xmalloc_ptr.
7206
e3e41d58
TT
72072017-08-22 Tom Tromey <tom@tromey.com>
7208
7209 * compile/compile.c (compile_file_command): Use
7210 gdb::unique_xmalloc_ptr, std::string.
7211 * utils.c (gdb_abspath): Change return type.
7212 * source.c (openp): Update.
7213 * objfiles.c (allocate_objfile): Update.
7214 * main.c (set_gdb_data_directory): Update.
7215 * utils.h (gdb_abspath): Return a gdb::unique_xmalloc_ptr.
7216
0d999a6e
ZZ
72172017-08-22 Zhouyi Zhou <zhouzhouyi@gmail.com>
7218
7219 * cli-cmds.c (list_commands): List actual code around more than
7220 one location.
7221
329d5e7e
JB
72222017-08-21 John Baldwin <jhb@FreeBSD.org>
7223
7224 * fbsd-nat.c (fbsd_add_threads): Use array type for `lwps'.
7225
bf223d3e
PA
72262017-08-21 Pedro Alves <palves@redhat.com>
7227
7228 PR gdb/19487
7229 * c-exp.y (variable production): Handle function aliases.
7230 * minsyms.c (msymbol_is_text): New function.
7231 * minsyms.h (msymbol_is_text): Declare.
7232 * symtab.c (find_function_alias_target): New function.
7233 * symtab.h (find_function_alias_target): Declare.
7234
c973d0aa
PA
72352017-08-21 Pedro Alves <palves@redhat.com>
7236
7237 * eval.c (evaluate_subexp_standard) <OP_TYPE>: Don't dig past
7238 typedefs.
7239 * typeprint.c (whatis_exp): If handling "whatis", and expression
7240 is OP_TYPE, strip one typedef level. Otherwise don't strip
7241 typedefs here.
7242 * valops.c (value_cast): Save "to" type before resolving
7243 stubs/typedefs. Use that type as resulting value's type.
7244
2989a365
TT
72452017-08-18 Tom Tromey <tom@tromey.com>
7246 Pedro Alves <palves@redhat.com>
7247
7248 * spu-multiarch.c (parse_spufs_run): Use scoped_restore.
7249 * sol-thread.c (sol_thread_resume, sol_thread_wait)
7250 (sol_thread_xfer_partial, rw_common): Use scoped_restore.
7251 * procfs.c (procfs_do_thread_registers): Use scoped_restore.
7252 * proc-service.c (ps_xfer_memory): Use scoped_restore.
7253 * linux-tdep.c (linux_corefile_thread): Remove a cleanup.
7254 (linux_get_siginfo_data): Add "thread" argument. Use
7255 scoped_restore.
7256 * linux-nat.c (linux_child_follow_fork)
7257 (check_stopped_by_watchpoint): Use scoped_restore.
7258 * infrun.c (displaced_step_prepare_throw, write_memory_ptid)
7259 (THREAD_STOPPED_BY, handle_signal_stop): Use scoped_restore.
7260 (restore_inferior_ptid, save_inferior_ptid): Remove.
7261 * btrace.c (btrace_fetch): Use scoped_restore.
7262 * bsd-uthread.c (bsd_uthread_fetch_registers)
7263 (bsd_uthread_store_registers): Use scoped_restore.
7264 * breakpoint.c (reattach_breakpoints, detach_breakpoints): Use
7265 scoped_restore.
7266 * aix-thread.c (aix_thread_resume, aix_thread_wait)
7267 (aix_thread_xfer_partial): Use scoped_restore.
7268 * inferior.h (save_inferior_ptid): Remove.
7269
e60eb288
YQ
72702017-08-18 Yao Qi <yao.qi@linaro.org>
7271
7272 PR tdep/21818
7273 * arm-tdep.c (gdb_print_insn_arm): Mark
7274 USER_SPECIFIED_MACHINE_TYPE if exec_bfd isn't NULL.
7275
6d580b63
YQ
72762017-08-18 Yao Qi <yao.qi@linaro.org>
7277
7278 * NEWS: Mention GDBserver's new option "--selftest".
7279 * Makefile.in (SFILES): Remove selftest.c, add common/selftest.c.
7280 * selftest.c: Move it to common/selftest.c.
7281 * selftest.h: Move it to common/selftest.h.
7282 * selftest-arch.c (reset): New function.
7283 (tests_with_arch): Call reset.
7284
86dcbf50
YQ
72852017-08-18 Yao Qi <yao.qi@linaro.org>
7286
7287 * selftest.c (run_tests): Don't call QUIT. Call debug_printf
7288 instead of exception_fprintf and printf_filtered.
7289
7649770c
YQ
72902017-08-18 Yao Qi <yao.qi@linaro.org>
7291
7292 * selftest.c (register_self_test): Rename it to
7293 selftests::register_test.
7294 (run_self_tests): selftest::run_tests.
7295 * selftest.h: Update declarations.
7296 * selftest-arch.c (register_self_test_foreach_arch): Rename it to
7297 selftests::register_test_foreach_arch.
7298 * selftest-arch.h: Update declaration.
7299 * aarch64-tdep.c: Update.
7300 * arm-tdep.c: Likewise.
7301 * disasm-selftests.c: Likewise.
7302 * dwarf2loc.c: Likewise.
7303 * dwarf2-frame.c: Likewise.
7304 * findvar.c: Likewise.
7305 * gdbarch-selftests.c: Likewise.
7306 * maint.c (maintenance_selftest): Likewise.
7307 * regcache.c: Likewise.
7308 * rust-exp.y: Likewise.
7309 * selftest-arch.c: Likewise.
7310 * unittests/environ-selftests.c: Likewise.
7311 * unittests/function-view-selftests.c: Likewise.
7312 * unittests/offset-type-selftests.c: Likewise.
7313 * unittests/optional-selftests.c: Likewise.
7314 * unittests/scoped_restore-selftests.c: Likewise.
7315 * utils-selftests.c: Likewise.
7316
b0cba12e
PA
73172017-08-17 Pedro Alves <palves@redhat.com>
7318
7319 * cli/cli-cmds.c (source_command): Delete 'old_source_verbose'
7320 local.
7321
4c8aa72d
PA
73222017-08-17 Pedro Alves <palves@redhat.com>
7323
7324 * dwarf2read.c (struct dwarf2_cu) <line_header_die_owner>: New
7325 field.
7326 (reset_die_in_process): Delete, replaced by ...
7327 (process_die_scope): ... this new class. Make it responsible for
7328 freeing cu->line_header too.
7329 (process_die): Use process_die_scope.
7330 (handle_DW_AT_stmt_list): Record the line header's owner CU/DIE in
7331 cu->line_header_die_owner. Don't release the line header if it's
7332 owned by the CU.
7333 (setup_type_unit_groups): Make the CU/DIE own the line header.
7334 Don't release the line header here.
7335
ba713918
AL
73362017-08-17 Alex Lindsay <alexlindsay239@gmail.com> (tiny change)
7337
7338 * elfread.c (elf_read_minimal_symbols): xfree synthsyms.
7339
44d0fb3a
RK
73402017-08-17 Ruslan Kabatsayev <b7.10110111@gmail.com>
7341
7342 * NEWS: Mention new shortcuts for nexti and stepi in TUI
7343 Single-Key mode
7344
a5afdb16
RK
73452017-08-16 Ruslan Kabatsayev <b7.10110111@gmail.com>
7346
7347 * tui/tui.c (tui_commands): Add "nexti" and "stepi" to the Single-Key
7348 mode command list.
7349
47613aeb
SH
73502017-08-15 Stafford Horne <shorne@gmail.com>
7351
7352 * MAINTAINERS (Write After Approval): Add Stafford Horne.
7353
9c3cc999
SH
73542017-08-15 Stafford Horne <shorne@gmail.com>
7355
7356 * xtensa-tdep.c (xtensa_init_reggroups): Use xstrdup for cpname.
7357
206726fb
SDJ
73582017-08-15 Sergio Durigan Junior <sergiodj@redhat.com>
7359
7360 PR gdb/21954
7361 * infcmd.c (unset_environment_command): Use the 'clear' method on
7362 the environment instead of resetting it.
7363
0335ac6d
JB
73642017-08-15 John Baldwin <jhb@FreeBSD.org>
7365
7366 * fbsd-nat.c (fbsd_convert_siginfo): Fix compile on big-endian
7367 platforms.
7368
d3abe1c8
TT
73692017-08-14 Tom Tromey <tom@tromey.com>
7370
7371 * valprint.c (print_octal_chars): Use HOST_CHAR_BIT.
7372 (print_binary_chars): Likewise.
7373 (BITS_IN_BYTES): Remove.
7374
d6382fff
TT
73752017-08-14 Tom Tromey <tom@tromey.com>
7376
7377 PR gdb/21675
7378 * valprint.c (LOW_ZERO): Change value to 034.
7379 (print_octal_chars): Add static_asserts for octal constants.
7380 * printcmd.c (print_scalar_formatted): Add 'd' case.
7381
f978cb06
TT
73822017-08-11 Tom Tromey <tom@tromey.com>
7383
7384 * symfile.c (add_symbol_file_command): Use std::vector.
7385
2f5404b3
TT
73862017-08-14 Tom Tromey <tom@tromey.com>
7387
7388 * break-catch-throw.c (handle_gnu_v3_exceptions): Use std::move.
7389 * break-catch-syscall.c (create_syscall_event_catchpoint): Use
7390 std::move.
7391 * break-catch-sig.c (create_signal_catchpoint): Use std::move.
7392
de7985c3
PA
73932017-08-11 Pedro Alves <palves@redhat.com>
7394
7395 * infrun.c (process_event_stop_test): Adjust
7396 function_name_is_marked_for_skip call.
7397 * skip.c: Include <list>.
7398 (skiplist_entry): Make it a class with private fields, and
7399 getters/setters.
7400 (skiplist_entry_chain): Delete.
7401 (skiplist_entries): New.
7402 (skiplist_entry_count): Delete.
7403 (highest_skiplist_entry_num): New.
7404 (ALL_SKIPLIST_ENTRIES, ALL_SKIPLIST_ENTRIES_SAFE): Delete.
7405 (add_skiplist_entry): Delete.
7406 (skiplist_entry::skiplist_entry): New.
7407 (skiplist_entry::add_entry): New.
7408 (skip_file_command, skip_function): Adjust.
7409 (compile_skip_regexp): Delete.
7410 (skip_command): Don't compile regexp here. Adjust to use
7411 skiplist_entry::add_entry.
7412 (skip_info): Adjust to use range-for and getters.
7413 (skip_enable_command, skip_disable_command): Adjust to use
7414 range-for and setters.
7415 (skip_delete_command): Adjust to use std::list.
7416 (add_skiplist_entry): Delete.
7417 (skip_file_p): Delete, refactored as ...
7418 (skiplist_entry::do_skip_file_p): ... this new method.
7419 (skip_gfile_p): Delete, refactored as ...
7420 (skiplist_entry::do_gskip_file_p): ... this new method.
7421 (skip_function_p, skip_rfunction_p): Delete, refactored as ...
7422 (skiplist_entry::skip_function_p): ... this new method.
7423 (function_name_is_marked_for_skip): Now returns bool, and takes
7424 the function sal by const reference. Adjust to use range-for and
7425 skiplist_entry methods.
7426 (_initialize_step_skip): Remove references to
7427 skiplist_entry_chain, skiplist_entry_count.
7428 * skip.h (function_name_is_marked_for_skip): Now returns bool, and
7429 takes the function sal by const reference.
7430
be7d3cd5
YQ
74312017-08-11 Yao Qi <yao.qi@linaro.org>
7432
7433 * dwarf2-frame.c (clear_pointer_cleanup): Remove.
7434 (dwarf2_frame_cache): Remove reset_cache_cleanup.
7435 (dwarf2_frame_cache):
7436 * frame-unwind.c (frame_unwind_try_unwinder): Catch
7437 RETURN_MASK_ALL and set *this_case to NULL.
7438 * frame-unwind.h: Update comments.
7439
1c90d9f0
YQ
74402017-08-11 Yao Qi <yao.qi@linaro.org>
7441
7442 * dwarf2-frame.c (dwarf2_frame_state_alloc_regs): Remove.
7443 (dwarf2_frame_state_copy_regs): Remove.
7444 (dwarf2_frame_state_free_regs): Remove.
7445 (dwarf2_frame_state::~dwarf2_frame_state): Remove.
7446 (dwarf2_restore_rule): Call method .alloc_regs instead of
7447 dwarf2_frame_state_alloc_regs.
7448 (execute_cfa_program): Likewise. Call dwarf2_frame_state_reg_info
7449 constructor. Call std::move.
7450 (dwarf2_fetch_cfa_info): Don't call dwarf2_frame_state_copy_regs.
7451 (dwarf2_frame_cache): Likewise.
7452
7453 [GDB_SELF_TEST]: Include selftest.h and
7454 selftest-arch.h.
7455 [GDB_SELF_TEST] (execute_cfa_program_test): New function.
7456 (_initialize_dwarf2_frame) [GDB_SELF_TEST]: Register
7457 execute_cfa_program_test.
7458
7459 * dwarf2-frame.h (dwarf2_frame_state_reg_info): Add ctor, dtor,
7460 copy ctor, assignment operator, move assignment.
7461 <alloc_regs>: New method.
7462 <swap>: New method.
7463 (struct dwarf2_frame_state): Delete dtor.
7464 (dwarf2_frame_state_alloc_regs): Remove declaration.
7465 * sparc-tdep.c (sparc_execute_dwarf_cfa_vendor_op): Don't call
7466 dwarf2_frame_state_alloc_regs, use .alloc_regs instead.
7467
afe37d6b
YQ
74682017-08-11 Yao Qi <yao.qi@linaro.org>
7469
7470 * dwarf2-frame.c (dwarf2_frame_state_free): Remove.
7471 (dwarf2_frame_state::dwarf2_frame_state): New.
7472 (dwarf2_frame_state::~dwarf2_frame_state): New.
7473 (dwarf2_fetch_cfa_info): Update.
7474 (dwarf2_frame_cache): Remove old_chain. Change 'fs' to an object
7475 rather than a pointer. Update code.
7476 * dwarf2-frame.h (struct dwarf2_frame_state): Declare ctor and
7477 dtor.
7478 <data_align, code_align, retaddr_column>: Change them to const.
7479 <armcc_cfa_offsets_sf, armcc_cfa_offsets_reversed>: Change them
7480 to bool.
7481
b348037f
YQ
74822017-08-11 Yao Qi <yao.qi@linaro.org>
7483
7484 * dwarf2-frame.h (struct dwarf2_frame_state_reg) <exp_len>: Remove.
7485 <loc.exp>: New field.
7486 * dwarf2-frame.c (execute_cfa_program): Update.
7487 (dwarf2_frame_prev_register): Update.
7488
e7c9de26
PA
74892017-08-10 Pedro Alves <palves@redhat.com>
7490
7491 * common/gdb_unique_ptr.h (xfree_deleter<T[]>): Define.
7492
e8c6b620
JB
74932017-08-09 John Baldwin <jhb@FreeBSD.org>
7494
7495 * fbsd-nat.c (struct fbsd_fork_info): Remove.
7496 (fbsd_pending_children): Use std::list.
7497 (fbsd_remember_child): Likewise.
7498 (fbsd_is_child_pending): Likewise.
7499 (fbsd_pending_vfork_done): Use std::forward_list.
7500 (fbsd_add_vfork_done): Likewise.
7501 (fbsd_is_vfork_done_pending): Likewise.
7502 (fbsd_next_vfork_done): Likewise.
7503
e4a26669
JB
75042017-08-09 John Baldwin <jhb@FreeBSD.org>
7505
7506 * fbsd-nat.c [HAVE_KINFO_GETVMMAP] (struct free_deleter): New.
7507 (fbsd_find_memory_regions): Use free_deleter with std::unique_ptr.
7508 [!HAVE_KINFO_GETVMMAP] (fbsd_find_memory_regions): Use std::string
7509 for `mapfilename'.
7510 (fbsd_xfer_partial): Use gdb::byte_vector.
af3881e6 7511 (fbsd_add_threads): Use gdb::unique_xmalloc_ptr.
e4a26669 7512
142311d3
JB
75132017-08-09 John Baldwin <jhb@FreeBSD.org>
7514
7515 * fbsd-nat.c: [!HAVE_KINFO_GETVMMAP]: Include <sys/user.h> and
7516 "filestuff.h".
7517 (fbsd_find_memory_regions): Fix `mapfile' initialization.
7518
42fa2e0e
TT
75192017-08-09 Tom Tromey <tom@tromey.com>
7520
7521 * skip.c (skiplist_entry): New constructor.
7522 (skiplist_entry::enabled, skiplist_entry::function_is_regexp)
7523 (skiplist_entry::file_is_glob): Now bool.
7524 (skiplist_entry::file, skiplist_entry::function): Now
7525 std::string.
7526 (make_skip_entry): Return a unique_ptr. Use new.
7527 (free_skiplist_entry, free_skiplist_entry_cleanup)
7528 (make_free_skiplist_entry_cleanup): Remove.
7529 (skip_command, skip_disable_command, add_skiplist_entry)
7530 (skip_form_bytes, compile_skip_regexp, skip_command, skip_info)
7531 (skip_file_p, skip_gfile_p, skip_function_p, skip_rfunction_p)
7532 (function_name_is_marked_for_skip): Update.
7533 (skip_delete_command): Update. Use delete.
7534
cd3af38d
JW
75352017-08-09 Jiong Wang <jiong.wang@arm.com>
7536
7537 * aarch64-linux-tdep.c: Include "auxv.h" and "elf/common.h".
7538 (aarch64_linux_core_read_description): New function.
7539 (aarch64_linux_init_abi): Register gdbarch_core_read_description.
7540
29592bde
PA
75412017-08-09 Pedro Alves <palves@redhat.com>
7542
7543 * cp-name-parser.y (cp_comp_to_string): Return a
7544 gdb::unique_xmalloc_ptr<char>.
7545 * cp-support.c (replace_typedefs_qualified_name)
7546 (replace_typedefs): Adjust to use gdb::unique_xmalloc_ptr<char>.
7547 (cp_canonicalize_string_full): Use op= instead of explicit
7548 convertion.
7549 (cp_class_name_from_physname, method_name_from_physname)
7550 (cp_func_name, cp_remove_params): Adjust to use
7551 gdb::unique_xmalloc_ptr<char>.
7552 * cp-support.h (cp_comp_to_string): Return a
7553 gdb::unique_xmalloc_ptr<char>.
7554 * python/py-type.c (typy_lookup_type): Adjust to use
7555 gdb::unique_xmalloc_ptr<char>.
7556
b3340438
L
75572017-08-09 H.J. Lu <hongjiu.lu@intel.com>
7558
7559 * dwarf2read.c (dwarf2_string_attr): Fix a typo.
7560
e88e8651
YQ
75612017-08-09 Alex Lindsay <alexlindsay239@gmail.com>
7562 Yao Qi <yao.qi@linaro.org>
7563
7564 * cp-support.c (cp_canonicalize_string_full): Use
7565 gdb::unique_xmalloc_ptr<char>.
7566 (cp_canonicalize_string): Likewise.
7567
f5a29eb0
YQ
75682017-08-09 Yao Qi <yao.qi@linaro.org>
7569
7570 * features/Makefile (WHICH): Remove i386/ non-linux stuff.
7571 * regformats/i386/amd64-avx-avx512.dat: Remove.
7572 * regformats/i386/amd64-avx-mpx-avx512-pku.dat: Remove.
7573 * regformats/i386/amd64-avx-mpx.dat:Remove.
7574 * regformats/i386/amd64-avx.dat: Remove.
7575 * regformats/i386/amd64-mpx.dat: Remove.
7576 * regformats/i386/i386-avx-avx512.dat: Remove.
7577 * regformats/i386/i386-avx-mpx-avx512-pku.dat: Remove.
7578 * regformats/i386/i386-avx-mpx.dat: Remove.
7579 * regformats/i386/i386-mmx.dat: Remove.
7580 * regformats/i386/i386-mpx.dat: Remove.
7581
57757c2f
YQ
75822017-08-09 Yao Qi <yao.qi@linaro.org>
7583
7584 * amd64-tdep.h (tdesc_x32): Remove the declaration.
7585 * amd64-tdep.c: Don't include features/i386/x32*.c.
7586 (_initialize_amd64_tdep): Don't call initialize_tdesc_x32*
7587 functions.
7588 * features/Makefile (WHICH): Remove i386/x32, i386/x32-avx,
7589 and i386/x32-avx-avx512.
7590 (XMLTOC): Remove i386/x32-avx.xml, i386/x32-avx-avx512.xml,
7591 and i386/x32.xml.
7592 * features/i386/x32-avx-avx512.c: Removed.
7593 * features/i386/x32-avx-avx512.xml: Removed.
7594 * features/i386/x32-avx.c: Removed.
7595 * features/i386/x32-avx.xml: Removed.
7596 * features/i386/x32.c: Removed.
7597 * features/i386/x32.xml: Removed.
7598 * regformats/i386/x32-avx-avx512.dat: Removed.
7599 * regformats/i386/x32-avx.dat: Removed.
7600 * regformats/i386/x32.dat: Removed.
7601
ba7b109b
MR
76022017-08-07 Maciej W. Rozycki <macro@imgtec.com>
7603
7604 PR breakpoints/21886
7605 * mem-break.c (default_memory_insert_breakpoint): Use
7606 `->placed_address' rather than `->reqstd_address' for the
7607 breakpoint location.
7608
e347efc3
MR
76092017-08-07 Maciej W. Rozycki <macro@imgtec.com>
7610
7611 * arch-utils.c (default_print_insn): Remove arch/mach/endian
7612 assertions.
7613
0dba2a6c
MR
76142017-08-07 Maciej W. Rozycki <macro@imgtec.com>
7615
7616 * gdbarch.sh (gdbarch_info): Replace the `tdep_info' member with
7617 a union of `tdep_info', `tdesc_data' and `id'.
7618 * aarch64-tdep.c (aarch64_gdbarch_init): Use `info.tdesc_data'
7619 rather than `info.tdep_info'.
7620 * amd64-linux-tdep.c (amd64_linux_init_abi): Likewise.
7621 * i386-linux-tdep.c (i386_linux_init_abi): Likewise.
7622 * i386-tdep.c (i386_gdbarch_init): Likewise.
7623 * mips-linux-tdep.c (mips_linux_init_abi): Likewise.
7624 * mips-tdep.c (mips_gdbarch_init): Likewise.
7625 * nds32-tdep.c (nds32_gdbarch_init): Likewise.
7626 * rs6000-tdep.c (rs6000_gdbarch_init): Likewise.
7627 * ppc-linux-tdep.c (ppu2spu_sniffer): Use `info.id' rather than
7628 `info.tdep_info'.
7629 (ppc_linux_init_abi): Use `info.tdesc_data' rather than
7630 `info.tdep_info'.
7631 * sparc-tdep.c (sparc32_gdbarch_init): Likewise.
7632 * spu-multiarch.c (spu_gdbarch): Use `info.id' rather than
7633 `info.tdep_info'.
7634 * spu-tdep.c (spu_gdbarch_init): Likewise.
7635 * gdbarch.h: Regenerate.
7636
16eb6b2d
LS
76372017-08-07 Leszek Swirski <leszeks@google.com>
7638
7b005726 7639 PR symtab/20899
16eb6b2d
LS
7640 * dwarf2read.c (dwarf2_string_attr): Allow DW_FORM_GNU_strp_alt.
7641
74cbb09e
SM
76422017-08-07 Simon Marchi <simon.marchi@ericsson.com>
7643
7644 * remote-sim.c (gdbsim_load): Remove char **argv local variable.
7645 (gdbsim_open): Rename gdb_argv args object to argv.
7646
ee0c3293
TT
76472017-08-05 Tom Tromey <tom@tromey.com>
7648
7649 * compile/compile-object-load.c (compile_object_load): Use
7650 gdb::unique_xmalloc_ptr.
7651 * cli/cli-dump.c (scan_filename): Rename from
7652 scan_filename_with_cleanup. Change return type.
7653 (scan_expression): Rename from scan_expression_with_cleanup.
7654 Change return type.
7655 (dump_memory_to_file, dump_value_to_file, restore_command):
7656 Use gdb::unique_xmalloc_ptr. Update.
7657 * cli/cli-cmds.c (find_and_open_script): Use
7658 gdb::unique_xmalloc_ptr.
7659 * tracefile-tfile.c (tfile_open): Use gdb::unique_xmalloc_ptr.
7660 * symmisc.c (maintenance_print_symbols)
7661 (maintenance_print_msymbols): Use gdb::unique_xmalloc_ptr.
7662 * symfile.c (symfile_bfd_open, generic_load)
7663 (add_symbol_file_command, remove_symbol_file_command): Use
7664 gdb::unique_xmalloc_ptr.
7665 * source.c (openp): Use gdb::unique_xmalloc_ptr.
7666 * psymtab.c (maintenance_print_psymbols): Use
7667 gdb::unique_xmalloc_ptr.
7668 * corelow.c (core_open): Use gdb::unique_xmalloc_ptr.
7669 * breakpoint.c (save_breakpoints): Use gdb::unique_xmalloc_ptr.
7670 * solib.c (solib_map_sections): Use gdb::unique_xmalloc_ptr.
7671 (reload_shared_libraries_1): Likewise.
7672
3232fabd
TT
76732017-08-05 Tom Tromey <tom@tromey.com>
7674
7675 * rust-exp.y (rust_op_ptr, set_field): Remove typedefs.
7676 (rust_op_vector, rust_set_vector): New typedefs.
7677 (current_parser): New global.
7678 (work_obstack): Change to pointer type. Update all users.
7679 (rust_ast, pstate): Remove globals.
7680 (struct rust_parser): New.
7681 (%union) <params, field_inits>: Change type.
7682 (start, tuple_expr, unit_expr, struct_expr_list, literal)
7683 (field_expr, expr_list, maybe_expr_list, type_list): Update.
7684 (ast_call_ish, ast_path, ast_function_type, ast_tuple_type)
7685 (convert_params_to_types, convert_params_to_expression): Change
7686 type of "params".
7687 (ast_string): Change type of "fields".
7688 (rust_parse): Make a rust_parser. Remove cleanups.
7689 (rust_lex_tests): Make and install an auto_obstack.
7690
f02fd774
YQ
76912017-08-04 Yao Qi <yao.qi@linaro.org>
7692
7693 * configure.srv (ipa_x32_linux_regobj): New.
7694 * linux-amd64-ipa.c (get_ipa_tdesc): Use X86_TDESC_AVX_AVX512
7695 instead of X86_TDESC_AVX512.
7696 (initialize_low_tracepoint): Call
7697 init_registers_x32_avx_avx512_linux.
7698
91975afd
YQ
76992017-08-04 Yao Qi <yao.qi@linaro.org>
7700
7701 * utils.h (gdb_argv): Add namespace std for nullptr_t.
7702
2331fa3a
RK
77032017-08-03 Ruslan Kabatsayev <b7.10110111@gmail.com>
7704
7705 * MAINTAINERS (Write After Approval): Add Ruslan Kabatsayev.
7706
744e4fe1
TT
77072017-08-03 Tom Tromey <tom@tromey.com>
7708
7709 * utils.c (make_cleanup_freeargv, do_freeargv, gdb_buildargv):
7710 Remove.
7711 * utils.h (make_cleanup_freeargv, gdb_buildargv): Remove.
7712
1c034b67
TT
77132017-08-03 Tom Tromey <tom@tromey.com>
7714
7715 * python/py-param.c (compute_enum_values): Use gdb_argv.
7716
773a1edc
TT
77172017-08-03 Tom Tromey <tom@tromey.com>
7718
7719 * utils.h (struct gdb_argv_deleter): New.
7720 (gdb_argv): New class.
7721 * utils.c (gdb_argv::reset): New method.
7722 * tracepoint.c (delete_trace_variable_command): Use gdb_argv.
7723 * tracefile.c (tsave_command): Use gdb_argv.
7724 * top.c (new_ui_command): Use gdb_argv.
7725 * symmisc.c (maintenance_print_symbols)
7726 (maintenance_print_msymbols, maintenance_expand_symtabs): Use gdb_argv.
7727 * symfile.c (symbol_file_command, generic_load)
7728 (remove_symbol_file_command): Use gdb_argv.
7729 * stack.c (backtrace_command): Use gdb_argv.
7730 * source.c (add_path, show_substitute_path_command)
7731 (unset_substitute_path_command, set_substitute_path_command):
7732 Use gdb_argv.
7733 * skip.c (skip_command): Use gdb_argv. Use gdb_buildargv.
7734 * ser-mingw.c (pipe_windows_open): Use gdb_argv.
7735 * remote.c (extended_remote_run, remote_put_command)
7736 (remote_get_command, remote_delete_command): Use gdb_argv.
7737 * remote-sim.c (gdbsim_load, gdbsim_create_inferior)
7738 (gdbsim_open): Use gdb_argv.
7739 * python/py-cmd.c (gdbpy_string_to_argv): Use gdb_argv.
7740 * psymtab.c (maintenance_print_psymbols): Use gdb_argv.
7741 * procfs.c (procfs_info_proc): Use gdb_argv.
7742 * interps.c (interpreter_exec_cmd): Use gdb_argv.
7743 * infrun.c (handle_command): Use gdb_argv.
7744 * inferior.c (add_inferior_command, clone_inferior_command):
7745 Use gdb_argv.
7746 * guile/scm-string.c (gdbscm_string_to_argv): Use gdb_argv.
7747 * exec.c (exec_file_command): Use gdb_argv.
7748 * cli/cli-cmds.c (alias_command): Use gdb_argv.
7749 * compile/compile.c (build_argc_argv): Use gdb_argv.
7750
0d50bde3
TT
77512017-08-03 Tom Tromey <tom@tromey.com>
7752
7753 * python/python.c (gdbpy_decode_line): Use unique_xmalloc_ptr.
7754
7f968c89
TT
77552017-08-03 Tom Tromey <tom@tromey.com>
7756
7757 * python/python.c (compute_python_string): Return std::string.
7758 (gdbpy_eval_from_control_command): Update.
7759 (do_start_initialization): Use std::string.
7760 * python/py-varobj.c (py_varobj_iter_next): Use string_printf, not
7761 xstrprintf.
7762 * python/py-breakpoint.c (local_setattro): Use string_printf, not
7763 xstrprintf.
7764
3c9ebddd
TT
77652017-08-03 Tom Tromey <tom@tromey.com>
7766
7767 * top.h (do_restore_instream_cleanup): Remove.
7768 * top.c (do_restore_instream_cleanup): Remove.
7769 (read_command_file): Use scoped_restore.
7770 * cli/cli-script.c (execute_user_command): Use scoped_restore.
7771
b51b225e
TT
77722017-08-03 Tom Tromey <tom@tromey.com>
7773
7774 * cli/cli-script.c (execute_user_command)
7775 (execute_control_command): Use scoped_restore.
7776
ac991630
TT
77772017-08-03 Tom Tromey <tom@tromey.com>
7778
7779 * cli/cli-script.c (do_restore_user_call_depth): Remove.
7780 (execute_user_command): Remove user_call_depth; use
7781 user_args_stack's size instead.
7782
898e0c8e
TT
77832017-08-03 Tom Tromey <tom@tromey.com>
7784
7785 * top.h (in_user_command): Remove.
7786 * top.c (in_user_command): Remove.
7787 * cli/cli-script.c (do_restore_user_call_depth)
7788 (execute_user_command): Update.
7789
26fcd5d7
TT
77902017-08-03 Tom Tromey <tom@tromey.com>
7791
7792 * valops.c (search_struct_method): Use gdb::byte_vector.
7793 * valarith.c (value_concat): Use std::vector.
7794 * target.c (memory_xfer_partial): Use gdb::byte_vector.
7795 (simple_search_memory): Likewise.
7796 * printcmd.c (find_string_backward): Use gdb::byte_vector.
7797 * mi/mi-main.c (mi_cmd_data_write_memory): Use gdb::byte_vector.
7798 * gcore.c (gcore_copy_callback): Use gdb::byte_vector.
7799 * elfread.c (elf_rel_plt_read): Use std::string.
7800 * cp-valprint.c (cp_print_value): Use gdb::byte_vector.
7801 * cli/cli-dump.c (restore_section_callback): Use
7802 gdb::byte_vector.
7803
7c218e6c
TT
78042017-08-03 Tom Tromey <tom@tromey.com>
7805
7806 * jit.c (jit_reader_load_command): Use unique_xmalloc_ptr.
7807
31b68d4a
TT
78082017-08-03 Tom Tromey <tom@tromey.com>
7809
7810 * tui/tui-regs.c (tui_restore_gdbout): Remove.
7811 (tui_register_format): Use scoped_restore.
7812
2ec845e7
TT
78132017-08-03 Tom Tromey <tom@tromey.com>
7814
7815 * reverse.c (exec_direction_default): Remove.
7816 (exec_reverse_once): Use scoped_restore.
7817 * remote.c (restore_remote_timeout): Remove.
7818 (remote_flash_erase, remote_flash_write, remote_flash_done)
7819 (readchar, remote_serial_write): Use scoped_restore.
7820 * cli/cli-script.c (struct source_cleanup_lines_args)
7821 (source_cleanup_lines): Remove.
7822 (script_from_file): Use scoped_restore.
7823 * cli/cli-cmds.c (source_verbose_cleanup): Remove.
7824 (source_command): Use scoped_restore.
7825
b3bc8453
TT
78262017-08-03 Tom Tromey <tom@tromey.com>
7827
7828 * utils.h (make_cleanup_free_so): Remove.
7829 * utils.c (do_free_so, make_cleanup_free_so): Remove.
7830 * solist.h (struct so_deleter): New.
7831 (so_list_up): New typedef.
7832 * solib-svr4.c (svr4_read_so_list): Use so_list_up.
7833
e3ad2841
TT
78342017-08-03 Tom Tromey <tom@tromey.com>
7835
7836 * utils.h (make_cleanup_restore_current_language): Remove.
7837 * utils.c (do_restore_current_language)
7838 (make_cleanup_restore_current_language): Remove.
7839 * parse.c (parse_exp_in_context_1)
7840 (parse_expression_with_language): Use
7841 scoped_restore_current_language.
7842 * mi/mi-main.c (mi_cmd_execute): Use
7843 scoped_restore_current_language.
7844 * language.h (scoped_restore_current_language): New class.
7845
b80cf838
TT
78462017-08-03 Tom Tromey <tom@tromey.com>
7847
7848 * compile/compile.c (cleanup_unlink_file): Remove.
7849 (compile_to_object): Use gdb::unlinker.
7850 (eval_compile_command): Likewise.
7851
fad0444a
TT
78522017-08-03 Tom Tromey <tom@tromey.com>
7853
7854 * utils.h (make_cleanup_fclose): Remove.
7855 * utils.c (do_fclose_cleanup, make_cleanup_fclose): Remove.
7856
6e7bc05c
TT
78572017-08-03 Tom Tromey <tom@tromey.com>
7858
7859 * top.c (open_terminal_stream): Return gdb_file_up.
7860 (new_ui_command): Update.
7861
4a45905b
TT
78622017-08-03 Tom Tromey <tom@tromey.com>
7863
7864 * source.c (print_source_lines_base, forward_search_command)
7865 (reverse_search_command): Use gdb_file_up.
7866
7cd06d6e
TT
78672017-08-03 Tom Tromey <tom@tromey.com>
7868
7869 * fbsd-nat.c (fbsd_find_memory_regions): Update.
7870
ed166945
TT
78712017-08-03 Tom Tromey <tom@tromey.com>
7872
7873 * cli/cli-cmds.c (find_and_open_script): Change return type.
7874 Remove "streamp" and "full_path" parameters.
7875 (source_script_with_search): Update.
7876 * auto-load.c (source_script_file): Update.
7877 * cli/cli-cmds.h (find_and_open_script): Change type.
7878 (open_script): New struct.
7879
d419f42d
TT
78802017-08-03 Tom Tromey <tom@tromey.com>
7881
7882 * xml-support.c (xml_fetch_content_from_file): Update.
7883 * ui-file.c (stdio_file::open): Update.
7884 * tracefile-tfile.c (tfile_start): Update.
7885 * remote.c (remote_file_put, remote_file_get): Update.
7886 * nat/linux-procfs.c (linux_proc_get_int)
7887 (linux_proc_pid_get_state, linux_proc_tid_get_name): Update.
7888 * nat/linux-osdata.c (linux_common_core_of_thread): Update.
7889 (command_from_pid, commandline_from_pid, linux_xfer_osdata_cpus)
7890 (print_sockets, linux_xfer_osdata_shm, linux_xfer_osdata_sem)
7891 (linux_xfer_osdata_msg, linux_xfer_osdata_modules): Update.
7892 * nat/linux-btrace.c (linux_determine_kernel_start): Update.
7893 * linux-nat.c (linux_proc_pending_signals): Update.
7894 * dwarf2read.c (write_psymtabs_to_index): Use gdb_file_up.
7895 (file_closer): Remove.
7896 * compile/compile.c (compile_to_object): Update.
7897 * common/filestuff.h (struct gdb_file_deleter): New.
7898 (gdb_file_up): New typedef.
7899 (gdb_fopen_cloexec): Change return type.
7900 * common/filestuff.c (gdb_fopen_cloexec): Return gdb_file_up.
7901 * cli/cli-dump.c (fopen_with_cleanup): Remove.
7902 (dump_binary_file, restore_binary_file): Update.
7903 * auto-load.c (auto_load_objfile_script_1): Update.
7904
4a2b031d
TT
79052017-08-03 Tom Tromey <tom@tromey.com>
7906
7907 * tracepoint.c (tvariables_info_1): Use ui_out_emit_table.
7908 (info_static_tracepoint_markers_command): Likewise.
7909 * solib.c (info_sharedlibrary_command): Use ui_out_emit_table.
7910 * skip.c (skip_info): Use ui_out_emit_table.
7911 * progspace.c (print_program_space): Use ui_out_emit_table.
7912 * osdata.c (info_osdata): Use ui_out_emit_table.
7913 * mi/mi-cmd-info.c (mi_cmd_info_ada_exceptions): Use
7914 ui_out_emit_table.
7915 * linux-thread-db.c (info_auto_load_libthread_db): Use
7916 ui_out_emit_table.
7917 * inferior.c (print_inferior): Use ui_out_emit_table.
7918 * gdb_bfd.c (maintenance_info_bfds): Use ui_out_emit_table.
7919 * breakpoint.c (breakpoint_1): Use ui_out_emit_table.
7920 * auto-load.c (auto_load_info_scripts): Use ui_out_emit_table.
7921 * ada-tasks.c (print_ada_task_info): Use ui_out_emit_table.
7922 * ui-out.h (class ui_out_emit_table): New.
7923
a4f320fd
MR
79242017-08-02 Maciej W. Rozycki <macro@imgtec.com>
7925
7926 * mips-tdep.c (mips_fpu_type_str): New function.
7927 (mips_dump_tdep): Call it.
7928
a2f1f308
MR
79292017-08-01 Maciej W. Rozycki <macro@imgtec.com>
7930
7931 * mips-tdep.c (mips_gdbarch_init): Use MIPS_FPU_TYPE to access
7932 `->mips_fpu_type'.
7933
7e5ed83b
XR
79342017-07-31 Xavier Roirand <roirand@adacore.com>
7935
7936 * solib-darwin.c (DYLD_VERSION_MAX): Increase value.
7937
4c9dc811
XR
79382017-07-27 Xavier Roirand <roirand@adacore.com>
7939
7940 * MAINTAINERS (Write After Approval): Add Xavier Roirand.
7941
27d41eac
YQ
79422017-07-26 Yao Qi <yao.qi@linaro.org>
7943
7944 * cli/cli-cmds.c (maintenancechecklist): New variable.
7945 * gdbcmd.h (maintenancechecklist): Declare it.
7946 * i386-linux-tdep.c (_initialize_i386_linux_tdep) [GDB_SELF_TEST]:
7947 Call i386_linux_read_description with different masks.
7948 * maint.c (maintenance_check_command): New function.
7949 (_initialize_maint_cmds): Call add_prefix_cmd.
7950 * target-descriptions.c (tdesc_reg): override operator != and ==.
7951 (tdesc_type): Likewise.
7952 (tdesc_feature): Likewise.
7953 (target_desc): Likewise.
7954 [GDB_SELF_TEST] (selftests::record_xml_tdesc): New function.
7955 (maintenance_check_xml_descriptions): New function.
7956 (_initialize_target_descriptions) Add command "xml-descriptions".
7957 * target-descriptions.h (selftests::record_xml_tdesc): Declare.
7958
ea03d0d3
YQ
79592017-07-26 Yao Qi <yao.qi@linaro.org>
7960
7961 * i386-linux-tdep.c: Don't include features/i386/i386-*linux.c.
7962 Include features/i386/32bit-*.c.
7963 (i386_linux_read_description): Generate target description if it
7964 doesn't exist.
7965 (_initialize_i386_linux_tdep): Don't call _initialize_tdesc_i386
7966 functions.
7967 * features/i386/32bit-linux.c: Re-generated.
7968 * features/i386/32bit-sse.c: Likewise.
7969 * target-descriptions.c (print_c_feature::visit): Print code to
7970 set register number if needed.
7971 (print_c_feature) <m_next_regnum>: New field.
7972
25aa13e5
YQ
79732017-07-26 Yao Qi <yao.qi@linaro.org>
7974
7975 * features/Makefile (CFILES): Rename with TDESC_CFILES.
7976 (FEATURE_XMLFILES): New.
7977 (FEATURE_CFILES): New.
7978 New rules.
7979 (clean-cfiles): Remove generated c files.
7980 * features/i386/32bit-avx.c: Generated.
7981 * features/i386/32bit-avx512.c: Generated.
7982 * features/i386/32bit-core.c: Generated.
7983 * features/i386/32bit-linux.c: Generated.
7984 * features/i386/32bit-mpx.c: Generated.
7985 * features/i386/32bit-pkeys.c: Generated.
7986 * features/i386/32bit-sse.c: Generated.
7987 * target-descriptions.c: Include algorithm.
7988 (tdesc_element_visitor): Add method visit_end.
7989 (print_c_tdesc): Implement visit_end.
7990 (print_c_tdesc:: m_filename_after_features): Move it to
7991 protected.
7992 (print_c_feature): New class.
7993 (maint_print_c_tdesc_cmd): Use print_c_feature if XML file
7994 name starts with "i386/32bit-".
7995
6eb1e6a8
YQ
79962017-07-26 Yao Qi <yao.qi@linaro.org>
7997
7998 * target-descriptions.c (tdesc_element_visitor): New class.
7999 (tdesc_element): New class.
8000 (tdesc_reg): Inherit from tdesc_element.
8001 (tdesc_reg::accept): New function.
8002 (tdesc_type): Inherit from tdesc_element.
8003 (tdesc_type::accept): New function.
8004 (tdesc_feature): Inherit from tdesc_element.
8005 (tdesc_feature::accept): New function.
8006 (target_desc): Inherit from tdesc_element.
8007 (target_desc::target_desc): New.
8008 (target_desc::~target_desc): New.
8009 (target_desc::accept): New.
8010 (allocate_target_description): Use new.
8011 (free_target_description): Use delete.
8012 (print_c_tdesc): New class.
8013 (maint_print_c_tdesc_cmd): Adjust.
8014
8015 * features/aarch64.c: Re-generated.
8016 * features/arc-arcompact.c: Re-generated.
8017 * features/arc-v2.c: Re-generated.
8018 * features/arm/arm-with-iwmmxt.c: Re-generated.
8019 * features/arm/arm-with-m.c: Re-generated.
8020 * features/arm/arm-with-m-fpa-layout.c: Re-generated.
8021 * features/arm/arm-with-m-vfp-d16.c: Re-generated.
8022 * features/arm/arm-with-neon.c: Re-generated.
8023 * features/arm/arm-with-vfpv2.c: Re-generated.
8024 * features/arm/arm-with-vfpv3.c: Re-generated.
8025 * features/i386/amd64-avx-avx512.c: Re-generated.
8026 * features/i386/amd64-avx-avx512-linux.c: Re-generated.
8027 * features/i386/amd64-avx.c: Re-generated.
8028 * features/i386/amd64-avx-linux.c: Re-generated.
8029 * features/i386/amd64-avx-mpx-avx512-pku.c: Re-generated.
8030 * features/i386/amd64-avx-mpx-avx512-pku-linux.c: Re-generated.
8031 * features/i386/amd64-avx-mpx.c: Re-generated.
8032 * features/i386/amd64-avx-mpx-linux.c: Re-generated.
8033 * features/i386/amd64.c: Re-generated.
8034 * features/i386/amd64-linux.c: Re-generated.
8035 * features/i386/amd64-mpx.c: Re-generated.
8036 * features/i386/amd64-mpx-linux.c: Re-generated.
8037 * features/i386/i386-avx-avx512.c: Re-generated.
8038 * features/i386/i386-avx-avx512-linux.c: Re-generated.
8039 * features/i386/i386-avx.c: Re-generated.
8040 * features/i386/i386-avx-linux.c: Re-generated.
8041 * features/i386/i386-avx-mpx-avx512-pku.c: Re-generated.
8042 * features/i386/i386-avx-mpx-avx512-pku-linux.c: Re-generated.
8043 * features/i386/i386-avx-mpx.c: Re-generated.
8044 * features/i386/i386-avx-mpx-linux.c: Re-generated.
8045 * features/i386/i386.c: Re-generated.
8046 * features/i386/i386-linux.c: Re-generated.
8047 * features/i386/i386-mmx.c: Re-generated.
8048 * features/i386/i386-mmx-linux.c: Re-generated.
8049 * features/i386/i386-mpx.c: Re-generated.
8050 * features/i386/i386-mpx-linux.c: Re-generated.
8051 * features/i386/x32-avx-avx512.c: Re-generated.
8052 * features/i386/x32-avx-avx512-linux.c: Re-generated.
8053 * features/i386/x32-avx.c: Re-generated.
8054 * features/i386/x32-avx-linux.c: Re-generated.
8055 * features/i386/x32.c: Re-generated.
8056 * features/i386/x32-linux.c: Re-generated.
8057 * features/microblaze.c: Re-generated.
8058 * features/microblaze-with-stack-protect.c: Re-generated.
8059 * features/mips64-dsp-linux.c: Re-generated.
8060 * features/mips64-linux.c: Re-generated.
8061 * features/mips-dsp-linux.c: Re-generated.
8062 * features/mips-linux.c: Re-generated.
8063 * features/nds32.c: Re-generated.
8064 * features/nios2.c: Re-generated.
8065 * features/nios2-linux.c: Re-generated.
8066 * features/rs6000/powerpc-32.c: Re-generated.
8067 * features/rs6000/powerpc-32l.c: Re-generated.
8068 * features/rs6000/powerpc-403.c: Re-generated.
8069 * features/rs6000/powerpc-403gc.c : Re-generated.
8070 * features/rs6000/powerpc-405.c: Re-generated.
8071 * features/rs6000/powerpc-505.c: Re-generated.
8072 * features/rs6000/powerpc-601.c: Re-generated.
8073 * features/rs6000/powerpc-602.c: Re-generated.
8074 * features/rs6000/powerpc-603.c: Re-generated.
8075 * features/rs6000/powerpc-604.c: Re-generated.
8076 * features/rs6000/powerpc-64.c: Re-generated.
8077 * features/rs6000/powerpc-64l.c: Re-generated.
8078 * features/rs6000/powerpc-7400.c: Re-generated.
8079 * features/rs6000/powerpc-750.c: Re-generated.
8080 * features/rs6000/powerpc-860.c: Re-generated.
8081 * features/rs6000/powerpc-altivec32.c: Re-generated.
8082 * features/rs6000/powerpc-altivec32l.c: Re-generated.
8083 * features/rs6000/powerpc-altivec64.c: Re-generated.
8084 * features/rs6000/powerpc-altivec64l.c: Re-generated.
8085 * features/rs6000/powerpc-cell32l.c: Re-generated.
8086 * features/rs6000/powerpc-cell64l.c: Re-generated.
8087 * features/rs6000/powerpc-e500.c: Re-generated.
8088 * features/rs6000/powerpc-e500l.c: Re-generated.
8089 * features/rs6000/powerpc-isa205-32l.c: Re-generated.
8090 * features/rs6000/powerpc-isa205-64l.c: Re-generated.
8091 * features/rs6000/powerpc-isa205-altivec32l.c: Re-generated.
8092 * features/rs6000/powerpc-isa205-altivec64l.c: Re-generated.
8093 * features/rs6000/powerpc-isa205-vsx32l.c: Re-generated.
8094 * features/rs6000/powerpc-isa205-vsx64l.c: Re-generated.
8095 * features/rs6000/powerpc-vsx32.c: Re-generated.
8096 * features/rs6000/powerpc-vsx32l.c: Re-generated.
8097 * features/rs6000/powerpc-vsx64.c: Re-generated.
8098 * features/rs6000/powerpc-vsx64l.c: Re-generated.
8099 * features/rs6000/rs6000.c: Re-generated.
8100 * features/s390-linux32.c: Re-generated.
8101 * features/s390-linux32v1.c: Re-generated.
8102 * features/s390-linux32v2.c: Re-generated.
8103 * features/s390-linux64.c: Re-generated.
8104 * features/s390-linux64v1.c: Re-generated.
8105 * features/s390-linux64v2.c: Re-generated.
8106 * features/s390-te-linux64.c: Re-generated.
8107 * features/s390-tevx-linux64.c: Re-generated.
8108 * features/s390-vx-linux64.c: Re-generated.
8109 * features/s390x-linux64.c: Re-generated.
8110 * features/s390x-linux64v1.c: Re-generated.
8111 * features/s390x-linux64v2.c: Re-generated.
8112 * features/s390x-te-linux64.c: Re-generated.
8113 * features/s390x-tevx-linux64.c: Re-generated.
8114 * features/s390x-vx-linux64.c: Re-generated.
8115 * features/sparc/sparc32-solaris.c: Re-generated.
8116 * features/sparc/sparc64-solaris.c: Re-generated.
8117 * features/tic6x-c62x.c: Re-generated.
8118 * features/tic6x-c62x-linux.c: Re-generated.
8119 * features/tic6x-c64x.c: Re-generated.
8120 * features/tic6x-c64x-linux.c: Re-generated.
8121 * features/tic6x-c64xp.c: Re-generated.
8122 * features/tic6x-c64xp-linux.c: Re-generated.
8123
35b4818d
YQ
81242017-07-26 Yao Qi <yao.qi@linaro.org>
8125
8126 * i386-linux-tdep.c (i386_linux_read_description): New function.
8127 (i386_linux_core_read_description): Call
8128 i386_linux_read_description.
8129 * i386-linux-tdep.h (i386_linux_read_description): Declare.
8130 (tdesc_i386_linux, tdesc_i386_mmx_linux): Remove declarations.
8131 (tdesc_i386_avx_linux, tdesc_i386_mpx_linux): Likewise
8132 (tdesc_i386_avx_mpx_linux, tdesc_i386_avx_avx512_linux): Likewise.
8133 (tdesc_i386_avx_mpx_avx512_pku_linux): Likewise.
8134 * x86-linux-nat.c (x86_linux_read_description): Call
8135 i386_linux_read_description.
8136
8e2141c6
YQ
81372017-07-26 Yao Qi <yao.qi@linaro.org>
8138
8139 * NEWS: Mention it.
8140 * features/Makefile (%.c: %.xml): Pass the xml file name to
8141 command "maint print c-tdesc".
8142 * target-descriptions.c (maint_print_c_tdesc_cmd): Get file
8143 name from 'arg'.
8144
b468ff4c
YQ
81452017-07-26 Yao Qi <yao.qi@linaro.org>
8146
8147 * target-descriptions.c (target_desc): Add ctor and dtor. Do
8148 in-class initialization.
8149 (tdesc_create_feature): Call new instead of XCNEW.
8150 (free_target_description): Ue delete.
8151
b9c0e1b4
JB
81522017-07-25 John Baldwin <jhb@FreeBSD.org>
8153
8154 * configure.nat: Add "-lkvm" for NetBSD/sparc64 and fix typo.
8155
a04b5337
YQ
81562017-07-25 Yao Qi <yao.qi@linaro.org>
8157
8158 * amd64-tdep.c (amd64_init_abi): Make argument default_tdesc
8159 constant.
8160 (amd64_x32_init_abi): Likewise.
8161 * amd64-tdep.h (amd64_init_abi): Update declaration.
8162 (amd64_x32_init_abi): Likewise.
8163
02ad7fc2
YQ
81642017-07-25 Yao Qi <yao.qi@linaro.org>
8165
8166 PR tdep/21717
8167 * arm-linux-nat.c (arm_linux_fetch_inferior_registers): Update
8168 condition for FPSCR.
8169 (arm_linux_store_inferior_registers): Likewise.
8170
b6f48cb0
TT
81712017-07-22 Tom Tromey <tom@tromey.com>
8172
8173 * break-catch-syscall.c (struct catch_syscall_inferior_data)
8174 <syscalls_counts>: Now a std::vector.
8175 (get_catch_syscall_inferior_data): Use "new".
8176 (catch_syscall_inferior_data_cleanup): Use "delete".
8177 (insert_catch_syscall, remove_catch_syscall)
8178 (clear_syscall_counts): Update.
8179
e12c9b7a
TT
81802017-07-22 Tom Tromey <tom@tromey.com>
8181
8182 * break-catch-syscall.c (syscall_catchpoint)
8183 <syscalls_to_be_caught>: Now a std::vector<int>
8184 (~syscall_catchpoint): Remove.
8185 (insert_catch_syscall, remove_catch_syscall)
8186 (breakpoint_hit_catch_syscall, print_one_catch_syscall)
8187 (print_mention_catch_syscall, print_recreate_catch_syscall):
8188 Update.
8189 (create_syscall_event_catchpoint): Change type of "filter"
8190 parameter.
8191 (catch_syscall_split_args): Return a std::vector.
8192 (catch_syscall_command_1, catching_syscall_number_1): Update.
8193
4fa8aeac
TT
81942017-07-22 Tom Tromey <tom@tromey.com>
8195
8196 * break-catch-throw.c (struct exception_catchpoint)
8197 <exception_rx>: Now a std::string.
8198 (~exception_catchpoint): Remove.
8199 (print_one_detail_exception_catchpoint): Update.
8200 (handle_gnu_v3_exceptions): Change type of except_rx.
8201 (extract_exception_regexp): Return a std::string.
8202 (catch_exception_command_1): Update.
8203
f746a154
TT
82042017-07-22 Tom Tromey <tom@tromey.com>
8205
8206 * break-catch-sig.c (gdb_signal_type): Remove typedef.
8207 (struct signal_catchpoint) <signals_to_be_caught>: Now a
8208 std::vector.
8209 <catch_all>: Now a bool.
8210 (~signal_catchpoint): Remove.
8211 (signal_catchpoint_insert_location)
8212 (signal_catchpoint_remove_location)
8213 (signal_catchpoint_breakpoint_hit, signal_catchpoint_print_one)
8214 (signal_catchpoint_print_mention)
8215 (signal_catchpoint_print_recreate)
8216 (signal_catchpoint_explains_signal): Update.
8217 (create_signal_catchpoint): Change type of "filter" and
8218 "catch_all".
8219 (catch_signal_split_args): Return a std::vector. Change type of
8220 "catch_all".
8221 (catch_signal_command): Update.
8222
47e77640
PA
82232017-07-20 Pedro Alves <palves@redhat.com>
8224
8225 * ada-lang.c (ada_language_defn): Make extern.
8226 (_initialize_ada_language): Remove add_language call.
8227 * c-lang.c (c_language_defn, cplus_language_defn)
8228 (asm_language_defn, minimal_language_defn): Make extern.
8229 (_initialize_c_language): Delete.
8230 * completer.c (compare_cstrings): Delete, moved to utils.h.
8231 * d-lang.c (d_language_defn): Make extern.
8232 (_initialize_d_language): Remove add_language calls.
8233 * defs.h (enum language): Add comment.
8234 * f-lang.c (f_language_defn): Make extern.
8235 (_initialize_f_language): Remove add_language call.
8236 * go-lang.c (go_language_defn): Make extern.
8237 (_initialize_go_language): Remove add_language call.
8238 * language.c: Include <algorithm>.
8239 (languages): Redefine as const array.
8240 (languages_size, languages_allocsize, DEFAULT_ALLOCSIZE): Delete.
8241 (set_language_command): Handle "local". Use for-range loop.
8242 (set_language): Remove loop.
8243 (language_enum): Rewrite.
8244 (language_def, language_str): Remove loops.
8245 (add_language): Delete.
8246 (add_set_language_command): New, based on add_languages.
8247 (skip_language_trampoline): Adjust.
8248 (local_language_defn): Delete.
8249 (language_gdbarch_post_init): Adjust.
8250 (_initialize_language): Remove add_language calls. Call
8251 add_set_language_command.
8252 * language.h (add_language): Delete.
8253 (auto_language_defn)
8254 (unknown_language_defn, minimal_language_defn, ada_language_defn)
8255 (asm_language_defn, c_language_defn, cplus_language_defn)
8256 (d_language_defn, f_language_defn, go_language_defn)
8257 (m2_language_defn, objc_language_defn, opencl_language_defn)
8258 (pascal_language_defn, rust_language_defn): Declare.
8259 * m2-lang.c (m2_language_defn): Make extern.
8260 (_initialize_m2_language): Remove add_language call.
8261 * objc-lang.c (objc_language_defn): Make extern.
8262 (_initialize_objc_language): Remove add_language call.
8263 * opencl-lang.c (opencl_language_defn): Make extern.
8264 (_initialize_opencl_language): Remove add_language call.
8265 * p-lang.c (pascal_language_defn): Make extern.
8266 (_initialize_pascal_language): Delete.
8267 * rust-lang.c (rust_language_defn): Make extern.
8268 (_initialize_rust_language): Delete.
8269 * utils.h (compare_cstrings): New static inline function.
8270
edb0c9cb
PA
82712017-07-20 Pedro Alves <palves@redhat.com>
8272
8273 * ada-lang.c (ada_to_fixed_type_1): Adjust.
8274 (get_var_value): Constify parameters.
8275 (get_int_var_value): Change prototype.
8276 (to_fixed_range_type): Adjust.
8277 * ada-lang.h (get_int_var_value): Change prototype.
8278
a778f165
PA
82792017-07-20 Pedro Alves <palves@redhat.com>
8280
8281 * dwarf2read.c (dw2_lookup_symbol): Use
8282 SYMBOL_MATCHES_SEARCH_NAME.
8283 * psymtab.c (psym_lookup_symbol): Use SYMBOL_MATCHES_SEARCH_NAME.
8284
42edd901
PA
82852017-07-20 Pedro Alves <palves@redhat.com>
8286
8287 * block.c (block_iter_name_step, block_iter_name_first)
8288 (block_iter_name_next): Delete.
8289 (block_lookup_symbol_primary): Adjust to use
8290 dict_iter_match_first/dict_iter_match_next.
8291 * block.h (block_iter_name_first, block_iter_name_next): Delete
8292 declarations.
8293 (ALL_BLOCK_SYMBOLS_WITH_NAME): Adjust to use
8294 dict_iter_match_first/dict_iter_match_next.
8295
cf325299
PA
82962017-07-20 Pedro Alves <palves@redhat.com>
8297
8298 * cp-support.c (cp_find_first_component_aux): Add missing case for
8299 end of string.
8300
c5ed0576
DB
83012017-07-18 David Blaikie <dblaikie@gmail.com>
8302
8303 * dwarf2read.c (create_cus_hash_table): Re-add lost initialization
8304 of dwo_cu's dwo_file.
8305
27841e76
YQ
83062017-07-18 Yao Qi <yao.qi@linaro.org>
8307
8308 * remote.c (store_registers_using_G): Remove one line comment.
8309
cfb7e58b
YQ
83102017-07-18 Yao Qi <yao.qi@linaro.org>
8311
8312 * regcache.c (regcache_cpy): Simplify it.
8313 (regcache::cpy_no_passthrough): Remove it.
8314 * regcache.h (cpy_no_passthrough): Remove it.
8315 (regcache_dup, regcache_cpy): Update comments.
8316
386535dd
PA
83172017-07-18 Pedro Alves <palves@redhat.com>
8318
8319 * remote-sim.c (sim_command_completer): Adjust to work with a
8320 completion_tracker instead of a VEC.
8321
c45ec17c
PA
83222017-07-17 Pedro Alves <palves@redhat.com>
8323
8324 * completer.c (complete_source_filenames): New function.
8325 (complete_address_and_linespec_locations): New function.
8326 (location_completer): Use complete_address_and_linespec_locations.
8327 (completion_tracker::build_completion_result): Honor the tracker's
8328 request to suppress append.
8329 * completer.h (completion_tracker::suppress_append_ws)
8330 (completion_tracker::set_suppress_append_ws): New methods.
8331 (completion_tracker::m_suppress_append_ws): New field.
8332 (complete_source_filenames): New declaration.
8333 * linespec.c (linespec_complete_what): New.
8334 (struct ls_parser) <complete_what, completion_word,
8335 completion_quote_char, completion_quote_end, completion_tracker>:
8336 New fields.
8337 (string_find_incomplete_keyword_at_end): New.
8338 (linespec_lexer_lex_string): Record quote char. If in completion
8339 mode, don't throw.
8340 (linespec_lexer_consume_token): Advance the completion word point.
8341 (linespec_lexer_peek_token): Save/restore completion info.
8342 (save_stream_and_consume_token): New.
8343 (set_completion_after_number): New.
8344 (linespec_parse_basic): Set what to complete next depending on
8345 token. Handle function and label completions specially.
8346 (parse_linespec): Disable objc shortcut in completion mode. Set
8347 what to complete next depending on token type. Skip keyword if in
8348 completion mode.
8349 (complete_linespec_component, linespec_complete): New.
8350 * linespec.h (linespec_complete): Declare.
8351
be966d42
PA
83522017-07-17 Pedro Alves <palves@redhat.com>
8353
8354 * linespec.c (linespec_lexer_lex_string, find_toplevel_char):
8355 Handle 'operator<' / 'operator<<'.
8356
a2459270
PA
83572017-07-17 Pedro Alves <palves@redhat.com>
8358
8359 * completer.c (collect_explicit_location_matches): Handle
8360 MATCH_LABEL.
8361 (convert_explicit_location_to_linespec): New, factored out from
8362 ...
8363 (convert_explicit_location_to_sals): ... this.
8364 (complete_label): New.
8365 (linespec_complete_label, find_label_symbols_in_block): New.
8366 (find_label_symbols): Add completion_mode parameter and adjust to
8367 call find_label_symbols_in_block.
8368 * linespec.h (linespec_complete_label): Declare.
8369
c6756f62
PA
83702017-07-17 Pedro Alves <palves@redhat.com>
8371
8372 * ada-lang.c (ada_collect_symbol_completion_matches): Add
8373 complete_symbol_mode parameter.
8374 * cli/cli-cmds.c (complete_command): Get the completion result out
8375 of the handle_brkchars tracker if used a custom word point.
8376 * completer.c: Include "linespec.h".
8377 (enum explicit_location_match_type) <MATCH_LINE>: New enumerator.
8378 (advance_to_expression_complete_word_point): New.
8379 (completion_tracker::completes_to_completion_word): New.
8380 (complete_files_symbols): Pass down
8381 complete_symbol_mode::EXPRESSION.
8382 (explicit_options, probe_options): New.
8383 (collect_explicit_location_matches): Complete on the
8384 explictit_loc->foo instead of word. Use
8385 linespec_complete_function. Handle MATCH_LINE. Handle offering
8386 keyword and options completions.
8387 (backup_text_ptr): Delete.
8388 (skip_keyword): New.
8389 (complete_explicit_location): Remove 'word' parameter. Add
8390 language, quoted_arg_start and quoted_arg_end parameters.
8391 Rewrite, parsing left to right.
8392 (location_completer): Rewrite.
8393 (location_completer_handle_brkchars): New function.
8394 (symbol_completer): Pass down complete_symbol_mode::EXPRESSION.
8395 (enum complete_line_internal_reason): Adjust comments.
8396 (completion_tracker::discard_completions): New.
8397 (completer_handle_brkchars_func_for_completer): Handle
8398 location_completer.
8399 (gdb_custom_word_point_brkchars)
8400 (gdb_org_rl_basic_quote_characters): New.
8401 (gdb_completion_word_break_characters_throw)
8402 (completion_find_completion_word): Handle trackers that use a
8403 custom word point.
8404 (completion_tracker::advance_custom_word_point_by): New.
8405 (completion_tracker::build_completion_result): Don't rely on
8406 readline appending the quote char.
8407 (gdb_rl_attempted_completion_function_throw): Handle trackers that
8408 use a custom word point.
8409 (gdb_rl_attempted_completion_function): Restore
8410 rl_basic_quote_characters.
8411 * completer.h (class completion_tracker): Extend intro comment.
8412 (completion_tracker::set_quote_char)
8413 (completion_tracker::quote_char)
8414 (completion_tracker::set_use_custom_word_point)
8415 (completion_tracker::use_custom_word_point)
8416 (completion_tracker::custom_word_point)
8417 (completion_tracker::set_custom_word_point)
8418 (completion_tracker::advance_custom_word_point_by)
8419 (completion_tracker::completes_to_completion_word)
8420 (completion_tracker::discard_completions): New methods.
8421 (completion_tracker::m_quote_char)
8422 (completion_tracker::m_use_custom_word_point)
8423 (completion_tracker::m_custom_word_point): New fields.
8424 (advance_to_expression_complete_word_point): Declare.
8425 * f-lang.c (f_collect_symbol_completion_matches): Add
8426 complete_symbol_mode parameter.
8427 * language.h (struct language_defn)
8428 <la_collect_symbol_completion_matches>: Add complete_symbol_mode
8429 parameter.
8430 * linespec.c (linespec_keywords): Add NULL terminator. Make extern.
8431 (linespec_complete_function): New function.
8432 (linespec_lexer_lex_keyword): Adjust.
8433 * linespec.h (linespec_keywords, linespec_complete_function): New
8434 declarations.
8435 * location.c (find_end_quote): New function.
8436 (explicit_location_lex_one): Add explicit_completion_info
8437 parameter. Save quoting info. Don't throw if being called for
8438 completion. Don't handle Ada operators here.
8439 (is_cp_operator, skip_op_false_positives, first_of)
8440 (explicit_location_lex_one_function): New function.
8441 (string_to_explicit_location): Replace 'dont_throw' parameter with
8442 an explicit_completion_info pointer parameter. Handle it. Don't
8443 use explicit_location_lex_one to lex function names. Use
8444 explicit_location_lex_one_function instead.
8445 * location.h (struct explicit_completion_info): New.
8446 (string_to_explicit_location): Replace 'dont_throw' parameter with
8447 an explicit_completion_info pointer parameter.
8448 * symtab.c (default_collect_symbol_completion_matches_break_on):
8449 Add complete_symbol_mode parameter. Handle LINESPEC mode.
8450 (default_collect_symbol_completion_matches)
8451 (collect_symbol_completion_matches): Add complete_symbol_mode
8452 parameter.
8453 (collect_symbol_completion_matches_type): Pass down
8454 complete_symbol_mode::EXPRESSION.
8455 (collect_file_symbol_completion_matches): Add complete_symbol_mode
8456 parameter. Handle LINESPEC mode.
8457 * symtab.h (complete_symbol_mode): New.
8458 (default_collect_symbol_completion_matches_break_on)
8459 (default_collect_symbol_completion_matches)
8460 (collect_symbol_completion_matches)
8461 (collect_file_symbol_completion_matches): Add complete_symbol_mode
8462 parameter.
8463
1d550c82
PA
84642017-07-17 Pedro Alves <palves@redhat.com>
8465
8466 * utils.c (enum class strncmp_iw_mode): New.
8467 (strcmp_iw): Rename to ...
8468 (strncmp_iw_with_mode): ... this. Add string2_len and mode
8469 parameters. Handle them.
8470 (strncmp_iw): New.
8471 (strcmp_iw): Reimplement as wrapper around strncmp_iw_with_mode.
8472 * utils.h (strncmp_iw): Declare.
8473 (strcmp_iw): Move describing comments here.
8474
8090b426
PA
84752017-07-17 Pedro Alves <palves@redhat.com>
8476
8477 * c-exp.y (operator_stoken): Use CP_OPERATOR_LEN and
8478 CP_OPERATOR_STR.
8479 * c-typeprint.c (is_type_conversion_operator): Use
8480 CP_OPERATOR_STR.
8481 * cp-support.c (LENGTH_OF_OPERATOR): Delete.
8482 (cp_find_first_component_aux): Use CP_OPERATOR_STR and
8483 CP_OPERATOR_LEN.
8484 * cp-support.h (CP_OPERATOR_STR, CP_OPERATOR_LEN): New.
8485 * gnu-v2-abi.c (gnuv2_is_operator_name): Use CP_OPERATOR_STR.
8486 * gnu-v3-abi.c (gnuv3_is_operator_name): Use CP_OPERATOR_STR.
8487 * linespec.c (linespec_lexer_lex_string): Use CP_OPERATOR_LEN and
8488 CP_OPERATOR_STR.
8489 * location.c: Include "cp-support.h".
8490 (explicit_location_lex_one): Use CP_OPERATOR_LEN and
8491 CP_OPERATOR_STR.
8492 * symtab.c (operator_chars): Use CP_OPERATOR_STR and
8493 CP_OPERATOR_LEN.
8494
6a2c1b87
PA
84952017-07-17 Pedro Alves <palves@redhat.com>
8496
8497 * cli/cli-cmds.c (complete_command): Use a completion tracker
8498 along with completion_find_completion_word for handle_brkchars
8499 phase.
8500 * completer.c (RL_QF_SINGLE_QUOTE, RL_QF_DOUBLE_QUOTE)
8501 (RL_QF_BACKSLASH, RL_QF_OTHER_QUOTE): New.
8502 (struct gdb_rl_completion_word_info): New.
8503 (gdb_rl_find_completion_word): New.
8504 (completion_find_completion_word): New.
8505 * completer.h (completion_find_completion_word): Declare.
8506
eb3ff9a5
PA
85072017-07-17 Pedro Alves <palves@redhat.com>
8508
8509 * ada-lang.c (symbol_completion_match): Adjust comments.
8510 (symbol_completion_add): Replace vector parameter with
8511 completion_tracker parameter. Use it.
8512 (ada_make_symbol_completion_list): Rename to...
8513 (ada_collect_symbol_completion_matches): ... this. Add
8514 completion_tracker parameter and use it.
8515 (ada_language_defn): Adjust.
8516 * break-catch-syscall.c (catch_syscall_completer): Adjust
8517 prototype and work with completion_tracker instead of VEC.
8518 * breakpoint.c (condition_completer): Adjust prototype and work
8519 with completion_tracker instead of VEC.
8520 * c-lang.c (c_language_defn, cplus_language_defn)
8521 (asm_language_defn, minimal_language_defn): Adjust to renames.
8522 * cli/cli-cmds.c (complete_command): Rework using
8523 completion_tracker. Catch exceptions when completing.
8524 * cli/cli-decode.c (integer_unlimited_completer)
8525 (complete_on_cmdlist, complete_on_enum): Adjust prototype and work
8526 with completion_tracker instead of VEC.
8527 * command.h (struct completion_tracker): Forward declare.
8528 (completer_ftype, completer_handle_brkchars_ftype): Change
8529 types.
8530 (complete_on_cmdlist, complete_on_enum): Adjust.
8531 * completer.c: Include <algorithm>.
8532 (struct gdb_completer_state): New.
8533 (current_completion): New global.
8534 (readline_line_completion_function): Delete.
8535 (noop_completer, filename_completer)
8536 (filename_completer_handle_brkchars, complete_files_symbols)
8537 (linespec_location_completer): Adjust to work with a
8538 completion_tracker instead of a VEC.
8539 (string_or_empty): New.
8540 (collect_explicit_location_matches): Adjust to work with a
8541 completion_tracker instead of a VEC.
8542 (explicit_location_completer): Rename to ...
8543 (complete_explicit_location): ... this and adjust to work with a
8544 completion_tracker instead of a VEC.
8545 (location_completer): Adjust to work with a completion_tracker
8546 instead of a VEC.
8547 (add_struct_fields): Adjust to work with a completion_list instead
8548 of VEC.
8549 (expression_completer): Rename to ...
8550 (complete_expression): ... this and adjust to work with a
8551 completion_tracker instead of a VEC. Use complete_files_symbols.
8552 (expression_completer): Reimplement on top of complete_expression.
8553 (symbol_completer): Adjust to work with a completion_tracker
8554 instead of a VEC.
8555 (enum complete_line_internal_reason): Add describing comments.
8556 (complete_line_internal_normal_command): Adjust to work with a
8557 completion_tracker instead of a VEC.
8558 (complete_line_internal): Rename to ...
8559 (complete_line_internal_1): ... this and adjust to work with a
8560 completion_tracker instead of a VEC. Assert TEXT is NULL in the
8561 handle_brkchars phase.
8562 (new_completion_tracker): Delete.
8563 (complete_line_internal): Reimplement as TRY/CATCH wrapper around
8564 complete_line_internal_1.
8565 (free_completion_tracker): Delete.
8566 (INITIAL_COMPLETION_HTAB_SIZE): New.
8567 (completion_tracker::completion_tracker)
8568 (completion_tracker::~completion_tracker): New.
8569 (maybe_add_completion): Delete.
8570 (completion_tracker::maybe_add_completion)
8571 (completion_tracker::add_completion)
8572 (completion_tracker::add_completions): New.
8573 (throw_max_completions_reached_error): Delete.
8574 (complete_line): Adjust to work with a completion_tracker instead
8575 of a VEC. Don't create a completion_tracker_t or check for max
8576 completions here.
8577 (command_completer, command_completer_handle_brkchars)
8578 (signal_completer, reg_or_group_completer_1)
8579 (reg_or_group_completer, default_completer_handle_brkchars):
8580 Adjust to work with a completion_tracker.
8581 (gdb_completion_word_break_characters_throw): New.
8582 (gdb_completion_word_break_characters): Reimplement.
8583 (line_completion_function): Delete.
8584 (completion_tracker::recompute_lowest_common_denominator)
8585 (expand_preserving_ws)
8586 (completion_tracker::build_completion_result)
8587 (completion_result::completion_result)
8588 (completion_result::completion_result)
8589 (completion_result::~completion_result)
8590 (completion_result::completion_result)
8591 (completion_result::release_match_list, compare_cstrings)
8592 (completion_result::sort_match_list)
8593 (completion_result::reset_match_list)
8594 (gdb_rl_attempted_completion_function_throw)
8595 (gdb_rl_attempted_completion_function): New.
8596 * completer.h (completion_list, struct completion_result)
8597 (class completion_tracker): New.
8598 (complete_line): Add completion_tracker parameter.
8599 (readline_line_completion_function): Delete.
8600 (gdb_rl_attempted_completion_function): New.
8601 (noop_completer, filename_completer, expression_completer)
8602 (location_completer, symbol_completer, command_completer)
8603 (signal_completer, reg_or_group_completer): Update prototypes.
8604 (completion_tracker_t, new_completion_tracker)
8605 (make_cleanup_free_completion_tracker): Delete.
8606 (enum maybe_add_completion_enum): Delete.
8607 (maybe_add_completion): Delete.
8608 (throw_max_completions_reached_error): Delete.
8609 * corefile.c (complete_set_gnutarget): Adjust to work with a
8610 completion_tracker instead of a VEC.
8611 * cp-abi.c (cp_abi_completer): Adjust to work with a
8612 completion_tracker instead of a VEC.
8613 * d-lang.c (d_language_defn): Adjust.
8614 * disasm.c (disassembler_options_completer): Adjust to work with a
8615 completion_tracker instead of a VEC.
8616 * f-lang.c (f_make_symbol_completion_list): Rename to ...
8617 (f_collect_symbol_completion_matches): ... this. Adjust to work
8618 with a completion_tracker instead of a VEC.
8619 (f_language_defn): Adjust.
8620 * go-lang.c (go_language_defn): Adjust.
8621 * guile/scm-cmd.c (cmdscm_add_completion, cmdscm_completer):
8622 Adjust to work with a completion_tracker instead of a VEC.
8623 * infrun.c (handle_completer): Likewise.
8624 * interps.c (interpreter_completer): Likewise.
8625 * interps.h (interpreter_completer): Likewise.
8626 * language.c (unknown_language_defn, auto_language_defn)
8627 (local_language_defn): Adjust.
8628 * language.h (language_defn::la_make_symbol_completion_list):
8629 Rename to ...
8630 (language_defn::la_collect_symbol_completion_matches): ... this
8631 and adjust to work with a completion_tracker instead of a VEC.
8632 * m2-lang.c (m2_language_defn): Adjust.
8633 * objc-lang.c (objc_language_defn): Adjust.
8634 * opencl-lang.c (opencl_language_defn): Adjust.
8635 * p-lang.c (pascal_language_defn): Adjust.
8636 * python/py-cmd.c (cmdpy_completer_helper): Handle NULL word.
8637 (cmdpy_completer_handle_brkchars, cmdpy_completer): Adjust to work
8638 with a completion_tracker.
8639 * rust-lang.c (rust_language_defn): Adjust.
8640 * symtab.c (free_completion_list, do_free_completion_list)
8641 (return_val, completion_tracker): Delete.
8642 (completion_list_add_name, completion_list_add_symbol)
8643 (completion_list_add_msymbol, completion_list_objc_symbol)
8644 (completion_list_add_fields, add_symtab_completions): Add
8645 completion_tracker parameter and use it.
8646 (default_make_symbol_completion_list_break_on_1): Rename to...
8647 (default_collect_symbol_completion_matches_break_on): ... this.
8648 Add completion_tracker parameter and use it instead of allocating
8649 a completion tracker here.
8650 (default_make_symbol_completion_list_break_on): Delete old
8651 implementation.
8652 (default_make_symbol_completion_list): Delete.
8653 (default_collect_symbol_completion_matches): New.
8654 (make_symbol_completion_list): Delete.
8655 (collect_symbol_completion_matches): New.
8656 (make_symbol_completion_type): Rename to ...
8657 (collect_symbol_completion_matches_type): ... this. Add
8658 completion_tracker parameter and use it instead of VEC.
8659 (make_file_symbol_completion_list_1): Rename to...
8660 (collect_file_symbol_completion_matches): ... this. Add
8661 completion_tracker parameter and use it instead of VEC.
8662 (make_file_symbol_completion_list): Delete.
8663 (add_filename_to_list): Use completion_list instead of a VEC.
8664 (add_partial_filename_data::list): Now a completion_list.
8665 (make_source_files_completion_list): Work with a completion_list
8666 instead of a VEC.
8667 * symtab.h: Include "completer.h".
8668 (default_make_symbol_completion_list_break_on)
8669 (default_make_symbol_completion_list, make_symbol_completion_list)
8670 (make_symbol_completion_type, make_file_symbol_completion_list)
8671 (make_source_files_completion_list): Delete.
8672 (default_collect_symbol_completion_matches_break_on)
8673 (default_collect_symbol_completion_matches)
8674 (collect_symbol_completion_matches)
8675 (collect_symbol_completion_matches_type)
8676 (collect_file_symbol_completion_matches)
8677 (make_source_files_completion_list): New.
8678 * top.c (init_main): Don't install a rl_completion_entry_function
8679 hook. Install a rl_attempted_completion_function hook instead.
8680 * tui/tui-layout.c (layout_completer): Adjust to work with a
8681 completion_tracker.
8682 * tui/tui-regs.c (tui_reggroup_completer):
8683 * tui/tui-win.c (window_name_completer, focus_completer)
8684 (winheight_completer): Adjust to work with a completion_tracker.
8685 * value.c: Include "completer.h".
8686 (complete_internalvar): Adjust to work with a completion_tracker.
8687 * value.h (complete_internalvar): Likewise.
8688
6e1dbf8c
PA
86892017-07-17 Pedro Alves <palves@redhat.com>
8690
8691 * cli/cli-decode.c (set_cmd_completer_handle_brkchars): Adjust to
8692 renames.
8693 * cli/cli-decode.h (struct cmd_list_element) <completer>: Move
8694 comments to completer_ftype's declaration.
8695 <completer_handle_brkchars>: Change type to
8696 completer_handle_brkchars_ftype.
8697 * command.h (completer_ftype): Add describing comment and give
8698 names to parameters.
8699 (completer_ftype_void): Rename to ...
8700 (completer_handle_brkchars_ftype) ... this. Add describing comment.
8701 (set_cmd_completer_handle_brkchars): Adjust.
8702 * completer.c (filename_completer_handle_brkchars): New function.
8703 (complete_line_internal_normal_command): New function, factored
8704 out from ...
8705 (complete_line_internal): ... here.
8706 (command_completer_handle_brkchars)
8707 (default_completer_handle_brkchars)
8708 (completer_handle_brkchars_func_for_completer): New functions.
8709 * completer.h (set_gdb_completion_word_break_characters): Delete
8710 declaration.
8711 (completer_handle_brkchars_func_for_completer): New declaration.
8712 * python/py-cmd.c (cmdpy_completer_handle_brkchars): Adjust to use
8713 completer_handle_brkchars_func_for_completer.
8714
78b13106
PA
87152017-07-17 Pedro Alves <palves@redhat.com>
8716
8717 * completer.c (symbol_completer): New function, based on
8718 make_symbol_completion_list_fn.
8719 * completer.h (symbol_completer): New declaration.
8720 * guile/scm-cmd.c (cmdscm_completers): Adjust.
8721 * python/py-cmd.c (completers): Adjust.
8722 * symtab.c (make_symbol_completion_list_fn): Delete.
8723 * symtab.h (make_symbol_completion_list_fn): Delete.
8724 * cli/cli-decode.c (add_cmd): Adjust.
8725
bbf2f4df
PA
87262017-07-17 Pedro Alves <palves@redhat.com>
8727
8728 * Makefile.in (COMMON_OBS): Add filename-seen-cache.o.
8729 * dwarf2read.c: Include "filename-seen-cache.h".
8730 * dwarf2read.c (dwarf2_per_objfile) <filenames_cache>: New field.
8731 (dw2_map_symbol_filenames): Build and use a filenames_seen_cache.
8732 * filename-seen-cache.c: New file.
8733 * filename-seen-cache.h: New file.
8734 * symtab.c: Include "filename-seen-cache.h".
8735 (struct filename_seen_cache, INITIAL_FILENAME_SEEN_CACHE_SIZE)
8736 (create_filename_seen_cache, clear_filename_seen_cache)
8737 (delete_filename_seen_cache, filename_seen): Delete, parts moved
8738 to filename-seen-cache.h/filename-seen-cache.c.
8739 (output_source_filename, sources_info)
8740 (maybe_add_partial_symtab_filename)
8741 (make_source_files_completion_list): Adjust to use
8742 filename_seen_cache.
8743
330cdd98
PA
87442017-07-17 Pedro Alves <palves@redhat.com>
8745
8746 * dwarf2read.c (dwarf2_per_objfile): In-class initialize all
8747 fields.
8748 (dwarf2_per_objfile::dwarf2_per_objfile(objfile*, const
8749 dwarf2_debug_sections*)): New.
8750 (dwarf2_per_objfile::dwarf2_per_objfile(const
8751 dwarf2_per_objfile&)): Declare as deleted.
8752 (dwarf2_per_objfile::operator=): Declare as deleted.
8753 (dwarf2_per_objfile::dwarf2_per_objfile)
8754 (dwarf2_per_objfile::~dwarf2_per_objfile)
8755 (dwarf2_per_objfile::free_cached_comp_units): New.
8756 (dwarf2_has_info): dwarf2_per_objfile initialization code moved to
8757 ctor. Call dwarf2_per_objfile's ctor manually.
8758 (dwarf2_locate_sections): Deleted/refactored as ...
8759 (dwarf2_per_objfile::locate_sections): ... this new method.
8760 (free_cached_comp_units): Defer to
8761 dwarf2_per_objfile::free_cached_comp_units.
8762 (dwarf2_free_objfile): Call dwarf2_per_objfile's dtor manually.
8763
8880f2a9
TT
87642017-07-14 Tom Tromey <tom@tromey.com>
8765
8766 PR rust/21764:
8767 * rust-exp.y (convert_ast_to_expression): Add "want_type"
8768 parameter.
8769 <UNOP_SIZEOF>: Split into separate case.
8770 <UNOP_VAR_VALUE>: Handle want_type. Add error case.
8771
65547233
TT
87722017-07-14 Tom Tromey <tom@tromey.com>
8773
8774 PR rust/21763:
8775 * symtab.c (symbol_matches_domain): Add language_rust to special
8776 case.
8777 * rust-exp.y (convert_ast_to_expression) <OP_VAR_VALUE>: Don't
8778 treat LOC_TYPEDEF symbols as variables.
8779
8f14146e
PA
87802017-07-14 Pedro Alves <palves@redhat.com>
8781
8782 * symtab.c (make_file_symbol_completion_list_1): Iterate over
8783 symtabs matching all symtabs with SRCFILE as file name instead of
8784 only considering the first hit, with lookup_symtab.
8785
2347965c
SM
87862017-07-14 Simon Marchi <simon.marchi@ericsson.com>
8787
8788 * ax-gdb.c (gen_aggregate_elt_ref): Remove operand_name and
8789 operator_name parameters.
8790 (gen_expr): Update function call.
8791
40f4af28
SM
87922017-07-14 Simon Marchi <simon.marchi@ericsson.com>
8793
8794 * dwarf2loc.h (dwarf2_compile_expr_to_ax): Remove gdbarch
8795 parameter.
8796 * symtab.h (struct symbol_computed_ops::tracepoint_var_ref):
8797 Likewise.
8798 * dwarf2loc.c (dwarf2_compile_expr_to_ax): Remove gdbarch
8799 parameter, use agent_expr::gdbarch instead, update function
8800 calls.
8801 (locexpr_tracepoint_var_ref): Likewise.
8802 (loclist_tracepoint_var_ref): Likewise.
8803 * ax-gdb.c (gen_trace_static_fields): Likewise.
8804 (gen_traced_pop): Likewise.
8805 (gen_frame_args_address): Likewise.
8806 (gen_frame_locals_address): Likewise.
8807 (gen_var_ref): Likewise.
8808 (gen_struct_ref_recursive): Likewise.
8809 (gen_static_field): Likewise.
8810 (gen_maybe_namespace_elt): Likewise.
8811 (gen_expr): Likewise.
8812 (gen_trace_for_var): Likewise.
8813 (gen_trace_for_expr): Likewise.
8814 (gen_trace_for_return_address): Likewise.
8815
053f8057
SM
88162017-07-14 Simon Marchi <simon.marchi@ericsson.com>
8817
8818 * ax-gdb.c (gen_deref, gen_address_of): Remove unused ax
8819 parameter.
8820 (gen_struct_ref, gen_expr, gen_expr_binop_rest): Update call.
8821
6661ad48
SM
88222017-07-14 Simon Marchi <simon.marchi@ericsson.com>
8823
8824 * ax-gdb.c (gen_usual_unary): Remove exp parameter, get gdbarch
8825 from ax, update calls.
8826 (gen_usual_arithmetic): Likewise.
8827 (gen_integral_promotions): Likewise.
8828 (gen_bitfield_ref): Likewise.
8829 (gen_primitive_field): Likewise.
8830 (gen_struct_ref_recursive): Likewise.
8831 (gen_struct_ref): Likewise.
8832 (gen_maybe_namespace_elt): Likewise.
8833 (gen_struct_elt_for_reference): Likewise.
8834 (gen_namespace_elt): Likewise.
8835 (gen_aggregate_elt_ref): Likewise.
8836 (gen_expr): Get gdbarch from ax, update calls.
8837 (gen_expr_binop_rest): Likewise.
8838
c55a47e7
PA
88392017-07-13 Pedro Alves <palves@redhat.com>
8840
8841 * amd64-darwin-tdep.c (x86_darwin_init_abi_64): Pass tdesc_amd64
8842 as default tdesc.
8843 * amd64-dicos-tdep.c (amd64_dicos_init_abi):
8844 * amd64-fbsd-tdep.c (amd64fbsd_init_abi):
8845 * amd64-linux-tdep.c (amd64_linux_init_abi): Pass
8846 tdesc_amd64_linux as default tdesc. Get final tdesc from the
8847 tdep.
8848 (amd64_x32_linux_init_abi): Pass tdesc_x32_linux as default tdesc.
8849 Get final tdesc from the tdep.
8850 * amd64-nbsd-tdep.c (amd64nbsd_init_abi): Pass tdesc_amd64 as
8851 default tdesc.
8852 * amd64-obsd-tdep.c (amd64obsd_init_abi): Likewise.
8853 * amd64-sol2-tdep.c (amd64_sol2_init_abi): Likewise.
8854 * amd64-tdep.c (amd64_init_abi): Add 'default_tdesc' parameter.
8855 Use it as default tdesc.
8856 (amd64_x32_init_abi): Add 'default_tdesc' parameter, and pass it
8857 down to amd_init_abi. No longer handle fallback tdesc here.
8858 * amd64-tdep.h (tdesc_x32): Declare.
8859 (amd64_init_abi, amd64_x32_init_abi): Add 'default_tdesc'
8860 parameter.
8861 * amd64-windows-tdep.c (amd64_windows_init_abi): Pass tdesc_amd64
8862 as default tdesc.
8863
55efceab
AA
88642017-07-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
8865
8866 * s390-linux-tdep.c (s390_process_record): Add support for
8867 instructions new in arch12.
8868
0aa37b65
JB
88692017-07-11 John Baldwin <jhb@FreeBSD.org>
8870
8871 * amd64-bsd-nat.c (amd64bsd_fetch_inferior_registers): Use
8872 PT_GETFSBASE and PT_GETGSBASE.
8873 (amd64bsd_store_inferior_registers): Use PT_SETFSBASE and
8874 PT_SETGSBASE.
8875
48aeef91
JB
88762017-07-11 John Baldwin <jhb@FreeBSD.org>
8877
8878 * features/Makefile (amd64.dat, amd64-avx.dat, amd64-mpx.dat)
8879 (amd64-avx-mpx.dat, amd64-avx-avx512.dat)
8880 (amd64-avx-mpx-avx512-pku.dat): Add i386/64bit-segments.xml in
8881 those rules.
8882 * features/i386/amd64-avx-avx512.xml: Add 64bit-segments.xml.
8883 * features/i386/amd64-avx-mpx-avx512-pku.xml: Add 64bit-segments.xml.
8884 * features/i386/amd64-avx-mpx.xml: Add 64bit-segments.xml.
8885 * features/i386/amd64-avx.xml: Add 64bit-segments.xml.
8886 * features/i386/amd64-mpx.xml: Add 64bit-segments.xml.
8887 * features/i386/amd64.xml: Add 64bit-segments.xml.
8888 * features/i386/amd64-avx-avx512.c: Regenerated.
8889 * features/i386/amd64-avx-mpx-avx512-pku.c: Regenerated.
8890 * features/i386/amd64-avx-mpx.c: Regenerated.
8891 * features/i386/amd64-avx.c: Regenerated.
8892 * features/i386/amd64-mpx.c: Regenerated.
8893 * features/i386/amd64.c: Regenerated.
8894 * regformats/i386/amd64-avx-avx512.dat: Regenerated.
8895 * regformats/i386/amd64-avx-mpx-avx512-pku.dat: Regenerated.
8896 * regformats/i386/amd64-avx-mpx.dat: Regenerated.
8897 * regformats/i386/amd64-avx.dat: Regenerated.
8898 * regformats/i386/amd64-mpx.dat: Regenerated.
8899 * regformats/i386/amd64.dat: Regenerated.
8900
77c501bc
YQ
89012017-07-10 Yao Qi <yao.qi@linaro.org>
8902
8903 * features/i386/amd64-avx-avx512-linux.c: Re-generated.
8904 * features/i386/amd64-avx-mpx-avx512-pku-linux.c: Re-generated.
8905
6dc8d757
AK
89062017-07-10 Anton Kolesov <Anton.Kolesov@synopsys.com>
8907
8908 * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add setenv and
8909 unsetenv.
8910 * gnulib/aclocal.m4: Regenerate.
8911 * gnulib/config.in: Regenerate.
8912 * gnulib/configure: Regenerate.
8913 * gnulib/import/Makefile.am: Regenerate.
8914 * gnulib/import/Makefile.in: Regenerate.
8915 * gnulib/import/m4/gnulib-cache.m4: Regenerate.
8916 * gnulib/import/m4/gnulib-comp.m4: Regenerate.
8917 * gnulib/import/m4/environ.m4: New file.
8918 * gnulib/import/m4/setenv.m4: New file.
8919 * gnulib/import/setenv.c: New file.
8920 * gnulib/import/unsetenv.c: New file.
8921
266934d1
SM
89222017-07-09 Simon Marchi <simon.marchi@ericsson.com>
8923
8924 * compile/compile-loc2c.c (do_compile_dwarf_expr_to_c): Read
8925 address when op is DW_OP_addr.
8926
03278692
TT
89272017-07-09 Tom Tromey <tom@tromey.com>
8928
8929 * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Reverse size
8930 check and apply to outer type.
8931
4b654465
JB
89322017-07-07 John Baldwin <jhb@FreeBSD.org>
8933
8934 * fbsd-tdep.c (LWPINFO_OFFSET, LWPINFO_PL_FLAGS)
8935 (LWPINFO64_PL_SIGINFO, LWPINFO32_PL_SIGINFO, PL_FLAG_SI)
8936 (SIZE64_SIGINFO_T, SIZE32_SIGINFO_T, fbsd_core_xfer_siginfo): New.
8937 (fbsd_init_abi): Install gdbarch "core_xfer_siginfo" method.
8938
2af9fc44
JB
89392017-07-07 John Baldwin <jhb@FreeBSD.org>
8940
8941 * fbsd-tdep.c (fbsd_core_thread_name): Use thread_section_name.
8942
382b69bb
JB
89432017-07-07 John Baldwin <jhb@FreeBSD.org>
8944
8945 * corelow.c (get_core_siginfo): Remove.
8946 (core_xfer_partial): Use the gdbarch "core_xfer_siginfo" method
8947 instead of get_core_siginfo.
8948 * gdbarch.sh (core_xfer_siginfo): New gdbarch callback.
8949 * gdbarch.h: Re-generate.
8950 * gdbarch.c: Re-generate.
8951 * linux-tdep.c (linux_core_xfer_siginfo): New.
8952 (linux_init_abi): Install gdbarch "core_xfer_siginfo" method.
8953
6e5eab33
JB
89542017-07-07 John Baldwin <jhb@FreeBSD.org>
8955
8956 * corelow.c (thread_section_name): Move to ...
8957 * gdbcore.h (thread_section_name): ... here.
8958
929edea9
JB
89592017-07-07 John Baldwin <jhb@FreeBSD.org>
8960
8961 * fbsd-nat.c [PT_LWPINFO && __LP64__] (union sigval32)
8962 (struct siginfo32): New.
8963 [PT_LWPINFO] (fbsd_siginfo_size, fbsd_convert_siginfo): New.
8964 (fbsd_xfer_partial) [PT_LWPINFO]: Handle TARGET_OBJECT_SIGNAL_INFO
8965 via ptrace(PT_LWPINFO).
8966
762c974a
JB
89672017-07-07 John Baldwin <jhb@FreeBSD.org>
8968
8969 * fbsd-tdep.c (fbsd_gdbarch_data_handle, struct fbsd_gdbarch_data)
8970 (init_fbsd_gdbarch_data, get_fbsd_gdbarch_data)
8971 (fbsd_get_siginfo_type): New.
8972 (fbsd_init_abi): Install gdbarch "get_siginfo_type" method.
8973 (_initialize_fbsd_tdep): New.
8974
33c5cd75
DB
89752017-07-06 David Blaikie <dblaikie@gmail.com>
8976
8977 * dwarf2read.c (struct dwo_file): Use a htab of dwo_unit* (rather than
8978 a singular dwo_unit*) to support multiple CUs in the same way that
8979 multiple TUs are supported.
8980 (create_cus_hash_table): Replace create_dwo_cu with a function for
8981 parsing multiple CUs from a DWO file.
8982 (open_and_init_dwo_file): Use create_cus_hash_table rather than
8983 create_dwo_cu.
8984 (lookup_dwo_cutu): Lookup CU in the hash table in the dwo_file with
8985 htab_find, rather than comparing the signature to a singleton CU in
8986 the dwo_file.
8987
8455d262
PA
89882017-07-06 Pedro Alves <palves@redhat.com>
8989
8990 * python/py-unwind.c (pyuw_dealloc_cache): Fix for loop condition.
8991
4da3eb35
PA
89922017-07-04 Pedro Alves <palves@redhat.com>
8993
8994 * gdbtypes.c (recursive_dump_type): Don't reference TYPE_STATIC.
8995 * gdbtypes.h (TYPE_STATIC): Delete.
8996 (struct fn_field) <is_public, is_abstract, is_static, is_final,
8997 is_synchronized, is_native>: Delete.
8998 <dummy>: Bump.
8999 (TYPE_FN_FIELD_PUBLIC, TYPE_FN_FIELD_STATIC, TYPE_FN_FIELD_FINAL)
9000 (TYPE_FN_FIELD_SYNCHRONIZED, TYPE_FN_FIELD_NATIVE)
9001 (TYPE_FN_FIELD_ABSTRACT): Delete.
9002
5bfd255c
SM
90032017-07-03 Simon Marchi <simon.marchi@ericsson.com>
9004
9005 * buffer.h (buffer_finish): Fix spelling mistakes.
9006
25c54127
EZ
90072017-07-01 Eli Zaretskii <eliz@gnu.org>
9008
9009 * .dir-locals.el: Automatically switch to C-style comments in
9010 versions of Emacs that support the feature.
9011
dc4bde35
SDJ
90122017-06-30 Sergio Durigan Junior <sergiodj@redhat.com>
9013 Pedro Alves <palves@redhat.com>
9014
9015 PR cli/21688
9016 * cli/cli-script.c (command_name_equals_not_inline): Remove function.
9017 (process_next_line): New variable 'inline_cmd'.
9018 Adjust 'if' clauses for "python", "compile" and "guile" to use
9019 'command_name_equals' and check for '!inline_cmd'.
9020
51ed89aa
SDJ
90212017-06-30 Sergio Durigan Junior <sergiodj@redhat.com>
9022
9023 PR cli/21688
9024 * cli/cli-script.c (command_name_equals_not_inline): New function.
9025 (process_next_line): Adjust 'if' clauses for "python", "compile"
9026 and "guile" to use command_name_equals_not_inline.
9027
eb17d413
PA
90282017-06-29 Pedro Alves <palves@redhat.com>
9029
9030 * completer.c (expression_completer): Call
9031 linespec_location_completer instead of location_completer.
9032
195bcdd5
PA
90332017-06-29 Pedro Alves <palves@redhat.com>
9034
9035 * completer.c (expression_completer): Remove code that recomputes
9036 'text' from 'word'.
9037
adc764e7
YQ
90382017-06-29 Yao Qi <yao.qi@linaro.org>
9039
9040 * regformats/regdat.sh: Generate code with
9041 "ifndef IN_PROCESS_AGENT".
9042
6e75794e
PA
90432017-06-28 Pedro Alves <palves@redhat.com>
9044
9045 * command.h: Include "common/scoped_restore.h".
9046
bc491f2e
YQ
90472017-06-28 Yao Qi <yao.qi@linaro.org>
9048
9049 * mi/mi-cmd-break.c (mi_argv_to_format): Use obstack_grow_str
9050 instead of obstack_grow.
9051
41664b45
DG
90522017-06-28 Doug Gilmore <Doug.Gilmore@imgtec.com>
9053
9054 PR gdb/21337
9055 * symfile.c (reread_symbols): Call objfiles_changed just before
9056 read_symbols.
9057
6da67eb1
PA
90582017-06-27 Pedro Alves <palves@redhat.com>
9059
9060 * symtab.c (COMPLETION_LIST_ADD_SYMBOL)
9061 (MCOMPLETION_LIST_ADD_SYMBOL): Delete macros, replace with ...
9062 (completion_list_add_symbol, completion_list_add_msymbol):
9063 ... these new functions.
9064 (add_symtab_completions)
9065 (default_make_symbol_completion_list_break_on_1): Adjust.
9066
23732b1e
PA
90672017-06-27 Pedro Alves <palves@redhat.com>
9068
9069 * objfiles.c (get_objfile_bfd_data): Call bfd_alloc instead of
9070 bfd_zalloc. Call objfile_per_bfd_storage's ctor.
9071 (free_objfile_per_bfd_storage): Call objfile_per_bfd_storage's
9072 dtor.
9073 * objfiles.h (objfile_per_bfd_storage): Add ctor. Make
9074 'storage_obstack' field an auto_obstack. In-class initialize all
9075 non-bitfield fields. Make minsyms_read bool.
9076 * symfile.c (read_symbols): Adjust.
9077
a4d1e79a
AH
90782017-06-27 Alan Hayward <alan.hayward@arm.com>
9079
9080 * remote-sim.c (gdbsim_fetch_register): Use byte_vector.
9081 (gdbsim_store_register): Likewise.
9082
8268c778
PA
90832017-06-27 Pedro Alves <palves@redhat.com>
9084
9085 * c-exp.y (name_obstack): Now an auto_obstack.
9086 (yylex): Use auto_obstack::clear.
9087 (c_parse): Use auto_obstack::clear instead of reinitializing and
9088 freeing the obstack.
9089 * c-lang.c (evaluate_subexp_c): Use auto_obstack.
9090 * d-exp.y (name_obstack): Now an auto_obstack.
9091 (yylex): Use auto_obstack::clear.
9092 (d_parse): Use auto_obstack::clear instead of reinitializing and
9093 freeing the obstack.
9094 * dwarf2loc.c (fetch_const_value_from_synthetic_pointer): Use
9095 auto_obstack.
9096 * dwarf2read.c (create_addrmap_from_index)
9097 (dwarf2_build_psymtabs_hard)
9098 (update_enumeration_type_from_children): Likewise.
9099 * gdb_obstack.h (auto_obstack): New type.
9100 * go-exp.y (name_obstack): Now an auto_obstack.
9101 (build_packaged_name): Use auto_obstack::clear.
9102 (go_parse): Use auto_obstack::clear instead of reinitializing and
9103 freeing the obstack.
9104 * linux-tdep.c (linux_make_mappings_corefile_notes): Use
9105 auto_obstack.
9106 * printcmd.c (printf_wide_c_string, ui_printf): Use auto_obstack.
9107 * rust-exp.y (work_obstack): Now an auto_obstack.
9108 (rust_parse, rust_lex_tests): Use auto_obstack::clear instead of
9109 reinitializing and freeing the obstack.
9110 * utils.c (do_obstack_free, make_cleanup_obstack_free): Delete.
9111 (host_char_to_target): Use auto_obstack.
9112 * utils.h (make_cleanup_obstack_free): Delete declaration.
9113 * valprint.c (generic_emit_char, generic_printstr): Use
9114 auto_obstack.
9115
db665f42
SM
91162017-06-27 Simon Marchi <simon.marchi@ericsson.com>
9117
9118 * darwin-nat.c (darwin_check_new_threads): Don't handle dummy
9119 thread.
9120 (darwin_init_thread_list): Don't update dummy thread.
9121 (darwin_create_inferior, darwin_attach): Don't add a dummy thread.
9122
873c0814
SM
91232017-06-26 Simon Marchi <simon.marchi@ericsson.com>
9124
9125 * record-full.c (netorder16): Remove.
9126
8b5a7a6e
SM
91272017-06-26 Simon Marchi <simon.marchi@ericsson.com>
9128
9129 * common/diagnostics.h: Define macros for GCC.
9130 (DIAGNOSTIC_IGNORE_UNUSED_FUNCTION): New macro.
9131 * common/vec.h: Include diagnostics.h.
9132 (DIAGNOSTIC_IGNORE_UNUSED_VEC_FUNCTION): New macro.
9133 (DEF_VEC_I, DEF_VEC_P, DEF_VEC_O): Ignore -Wunused-function
9134 warning.
9135
d1435379
SM
91362017-06-26 Simon Marchi <simon.marchi@ericsson.com>
9137
9138 * common/diagnostics.h (DIAGNOSTIC_IGNORE_DEPRECATED_REGISTER):
9139 New macro.
9140 * ada-lex.l: Ignore deprecated register warnings.
9141
cc75e0fd
SM
91422017-06-25 Simon Marchi <simon.marchi@ericsson.com>
9143
9144 * main.c (get_init_files): Replace "SYSTEM_GDBINIT +
9145 datadir_len" with "&SYSTEM_GDBINIT[datadir_len]".
9146
07809eaf
SM
91472017-06-25 Simon Marchi <simon.marchi@ericsson.com>
9148
9149 * dtrace-probe.c (dtrace_process_dof_probe): Put semi-colon on
9150 its own line.
9151
f076f034
SM
91522017-06-25 Simon Marchi <simon.marchi@ericsson.com>
9153
9154 * nat/x86-dregs.c (x86_show_dr): Print registers one per line.
9155
0dd5cbc5
AH
91562017-06-23 Alan Hayward <alan.hayward@arm.com>
9157
9158 * xtensa-tdep.c (XTENSA_MAX_REGISTER_SIZE): Add.
9159 (xtensa_register_write_masked): Use XTENSA_MAX_REGISTER_SIZE.
9160 (xtensa_register_read_masked): Likewise.
9161
d4c6ce5b
SDJ
91622017-06-22 Sergio Durigan Junior <sergiodj@redhat.com>
9163
9164 * common/environ.c (gdb_environ::unset): Update comment.
9165
16892a03
AH
91662017-06-22 Alan Hayward <alan.hayward@arm.com>
9167
9168 * python/py-unwind.c (pyuw_sniffer): Allocate space for
9169 registers.
9170
d7dcbefc
AH
91712017-06-22 Alan Hayward <alan.hayward@arm.com>
9172
9173 * record-full.c (record_full_exec_insn): Use byte_vector.
9174
b30ff123
YQ
91752017-06-22 Yao Qi <yao.qi@linaro.org>
9176
9177 * regformats/i386/amd64-avx-mpx-avx512-pku-linux.dat: Regenerated.
9178 * regformats/i386/amd64-avx-mpx-avx512-pku.dat: Regenerated.
9179
4fa847d7
AH
91802017-06-22 Alan Hayward <alan.hayward@arm.com>
9181
9182 * remote.c (cached_reg): Move from here...
9183 * regcache.h (cached_reg): ...to here.
9184 * python/py-unwind.c (struct reg_info): Remove.
9185 (cached_frame_info): Use cached_reg_t.
9186 (pyuw_prev_register): Likewise.
9187 (pyuw_sniffer): Use cached_reg_t and allocate registers.
9188 (pyuw_dealloc_cache): Free all registers.
9189
f4906a9a
PA
91902017-06-22 Pedro Alves <palves@redhat.com>
9191 Simon Marchi <simon.marchi@ericsson.com>
9192
9193 * unittests/environ-selftests.c (run_tests): Ignore -Wself-move
9194 warning.
9195 * common/diagnostics.h: New file.
9196
b45a1208
PA
91972017-06-22 Pedro Alves <palves@redhat.com>
9198
9199 * common/agent.h: Add include guards.
9200
e4da2c61
SM
92012017-06-21 Simon Marchi <simon.marchi@ericsson.com>
9202
9203 * target.h (struct target_ops) <to_xfer_partial>: Update doc to
9204 talk about addressable units instead of bytes.
9205
96160d60
SDJ
92062017-06-20 Sergio Durigan Junior <sergiodj@redhat.com>
9207
9208 * common/environ.c (gdb_environ::unset): Use '::iterator' instead
9209 of '::const_iterator'.
9210
9a6c7d9c
SDJ
92112017-06-20 Sergio Durigan Junior <sergiodj@redhat.com>
9212
9213 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
9214 'unittests/environ-selftests.c'.
9215 (SUBDIR_UNITTESTS_OBS): Add 'environ-selftests.o'.
9216 * charset.c (find_charset_names): Declare object 'iconv_env'.
9217 Update code to use 'iconv_env' object. Remove call to
9218 'free_environ'.
9219 * common/environ.c: Include <utility>.
9220 (make_environ): Delete function.
9221 (free_environ): Delete function.
9222 (gdb_environ::clear): New function.
9223 (gdb_environ::operator=): New function.
9224 (gdb_environ::get): Likewise.
9225 (environ_vector): Delete function.
9226 (set_in_environ): Delete function.
9227 (gdb_environ::set): New function.
9228 (unset_in_environ): Delete function.
9229 (gdb_environ::unset): New function.
9230 (gdb_environ::envp): Likewise.
9231 * common/environ.h: Include <vector>.
9232 (struct gdb_environ): Delete; transform into...
9233 (class gdb_environ): ... this class.
9234 (free_environ): Delete prototype.
9235 (init_environ, get_in_environ, set_in_environ, unset_in_environ,
9236 environ_vector): Likewise.
9237 * infcmd.c (run_command_1): Update code to call
9238 'envp' from 'gdb_environ' class.
9239 (environment_info): Update code to call methods from 'gdb_environ'
9240 class.
9241 (unset_environment_command): Likewise.
9242 (path_info): Likewise.
9243 (path_command): Likewise.
9244 * inferior.c (inferior::~inferior): Delete call to 'free_environ'.
9245 (inferior::inferior): Initialize 'environment' using the host's
9246 information.
9247 * inferior.h: Remove forward declaration of 'struct gdb_environ'.
9248 Include "environ.h".
9249 (class inferior) <environment>: Change type from 'struct
9250 gdb_environ' to 'gdb_environ'.
9251 * mi/mi-cmd-env.c (mi_cmd_env_path): Update code to call
9252 methods from 'gdb_environ' class.
9253 * solib.c (solib_find_1): Likewise
9254 * unittests/environ-selftests.c: New file.
9255
75c554cf
YQ
92562017-06-20 Yao Qi <yao.qi@linaro.org>
9257
9258 * features/i386/i386-linux.xml: Exchange the order of including
9259 32bit-linux.xml and 32bit-sse.xml.
9260 * features/i386/i386-linux.c: Regenerated.
9261
72ddacb7
YQ
92622017-06-20 Yao Qi <yao.qi@linaro.org>
9263
9264 * target-descriptions.c (tdesc_reg): Add ctor, dtor.
9265 Delete copy ctor and assignment operator.
9266 (tdesc_type): Likewise.
9267 (tdesc_feature): Likewise.
9268 (tdesc_free_reg): Remove.
9269 (tdesc_create_reg): Use new.
9270 (tdesc_free_type): Remove.
9271 (tdesc_create_vector): Use new.
9272 (tdesc_create_union): Likewise.
9273 (tdesc_create_flags): Likewise.
9274 (tdesc_create_enum): Likewise.
9275 (tdesc_free_feature): Delete.
9276 (free_target_description): Use delete.
9277
325c9fd4
JB
92782017-06-19 John Baldwin <jhb@FreeBSD.org>
9279
9280 * mips-tdep.c (print_gp_register_row): Don't error for unavailable
9281 registers.
9282
16b7a719
PA
92832017-06-19 Pedro Alves <palves@redhat.com>
9284
9285 * dwarf2read.c (write_psymtabs_to_index): Construct file_closer
9286 after gdb::unlinker.
9287
1c8e01c9
SDJ
92882017-06-19 Sergio Durigan Junior <sergiodj@redhat.com>
9289
9290 * mi/mi-cm-env.c (_initialize_mi_cmd_env): Use getenv instead of
9291 gdb_environ to access an environment variable.
9292
ffce45d2
TP
92932017-06-18 Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
9294
9295 * nat/linux-ptrace.c (linux_fork_to_function): Add cast to
9296 gdb_byte*.
9297
1d4fbac9
SM
92982017-06-17 Simon Marchi <simon.marchi@ericsson.com>
9299
9300 * nat/fork-inferior.h (trace_start_error): Add ATTRIBUTE_PRINTF.
9301
8465943a
SM
93022017-06-17 Simon Marchi <simon.marchi@ericsson.com>
9303
9304 * configure: Re-generate.
9305 * warning.m4 (build_warnings): Add -Wno-mismatched-tags.
9306
3e019bdc
SM
93072017-06-17 Simon Marchi <simon.marchi@ericsson.com>
9308
9309 * configure: Re-generate.
9310 * warning.m4: Pass -Werror to compiler when checking for
9311 supported warning flags.
9312
cf0dd6f0
SM
93132017-06-17 Simon Marchi <simon.marchi@ericsson.com>
9314
9315 * Makefile.in (COMPILE.pre): Add "-x c++".
9316
6f98355c
YQ
93172017-06-16 Alan Hayward <alan.hayward@arm.com>
9318 Pedro Alves <palves@redhat.com>
9319 Yao Qi <yao.qi@linaro.org>
9320
9321 * defs.h (RequireLongest): New.
9322 (extract_integer): Declare function template.
9323 (extract_signed_integer): Remove the declaration, but define it
9324 static inline.
9325 (extract_unsigned_integer): Likewise.
9326 (store_integer): Declare function template.
9327 (store_signed_integer): Remove the declaration, but define it
9328 static inline.
9329 (store_unsigned_integer): Likewise.
9330 * findvar.c (extract_integer): New function template.
9331 (extract_signed_integer): Remove.
9332 (extract_unsigned_integer): Remove.
9333 (extract_integer<LONGEST>, extract_integer<ULONGEST>): Explicit
9334 instantiations.
9335 (store_integer): New function template.
9336 (store_signed_integer): Remove.
9337 (store_unsigned_integer): Remove.
9338 (store_integer): Explicit instantiations.
9339 * regcache.c (regcache_raw_read_signed): Update.
9340 (regcache::raw_read): New function.
9341 (regcache::raw_read_signed): Remove.
9342 (regcache::raw_read_unsigned): Remove.
9343 (regcache_raw_read_unsigned): Update.
9344 (regcache_raw_write_unsigned): Update.
9345 (regcache::raw_write_signed): Remove.
9346 (regcache::raw_write): New function.
9347 (regcache_cooked_read_signed): Update.
9348 (regcache::raw_write_unsigned): Remove.
9349 (regcache::cooked_read_signed): Remove.
9350 (regcache_cooked_read_unsigned): Update.
9351 (regcache::cooked_read_unsigned): Remove.
9352 (regcache_cooked_write_signed): Update.
9353 (regcache_cooked_write_unsigned): Update.
9354 * regcache.h (regcache) <raw_read_signed>: Remove.
9355 <raw_write_signed, raw_read_unsigned, raw_write_unsigned>: Remove.
9356 <raw_read, raw_write>: New.
9357 <cooked_read_signed, cooked_write_signed>: Remove.
9358 <cooked_write_unsigned, cooked_read_unsigned>: Remove.
9359 <cooked_read, cooked_write>: New.
9360 * sh64-tdep.c (sh64_pseudo_register_read): Update.
9361 (sh64_pseudo_register_write): Update.
9362
a87dc45a
AK
93632017-06-16 Anton Kolesov <anton.kolesov@synopsys.com>
9364
9365 * arc-tdep.c (arc_disassembler_options): New variable.
9366 (arc_gdbarch_init): Set and use it. Use arc_delayed_print_insn instead
9367 of default_print_insn.
9368 (arc_delayed_print_insn): Set info->section when needed,
9369 use default_print_insn to retrieve a disassembler.
9370
45159d6a
SDJ
93712017-06-14 Sergio Durigan Junior <sergiodj@redhat.com>
9372
9373 PR gdb/21574
9374 * infcmd.c (_initialize_infcmd): Expand "help run" documentation
9375 to mention $SHELL and startup-with-shell.
9376
b46c4cf0
MF
93772017-06-14 Max Filippov <jcmvbkbc@gmail.com>
9378
9379 * MAINTAINERS: Move Maxim Grigoriev to the Past Maintainers.
9380
6394c606
YQ
93812017-06-14 Yao Qi <yao.qi@linaro.org>
9382
9383 * aarch64-tdep.c (aarch64_gdb_print_insn): Call
9384 default_print_insn instead of print_insn_aarch64.
9385 * arm-tdep.c (gdb_print_insn_arm): Call
9386 default_print_insn instead of print_insn_big_arm
9387 and print_insn_little_arm.
9388 * i386-tdep.c (i386_print_insn): Call default_print_insn
9389 instead of print_insn_i386.
9390 * ia64-tdep.c (ia64_print_insn): Call
9391 default_print_insn instead of print_insn_ia64.
9392 * mips-tdep.c (gdb_print_insn_mips): Call
9393 default_print_insn instead of print_insn_big_mips
9394 and print_insn_little_mips.
9395 * spu-tdep.c (gdb_print_insn_spu): Call default_print_insn
9396 instead of print_insn_spu.
9397
d5722aa2
PA
93982017-06-14 Pedro Alves <palves@redhat.com>
9399
9400 * ada-lang.c: Include "common/byte-vector.h".
9401 (ada_value_primitive_packed_val): Use gdb::byte_vector.
9402 * charset.c (wchar_iterator::iterate): Resize the vector instead
9403 of reserving it.
9404 * common/byte-vector.h: Include "common/def-vector.h".
9405 (wchar_iterator::m_out): Now a gdb::def_vector<gdb_wchar_t>.
9406 * cli/cli-dump.c: Include "common/byte-vector.h".
9407 (dump_memory_to_file, restore_binary_file): Use gdb::byte_vector.
9408 * common/byte-vector.h: New file.
9409 * common/def-vector.h: New file.
9410 * common/default-init-alloc.h: New file.
9411 * dwarf2loc.c: Include "common/byte-vector.h".
9412 (rw_pieced_value): Use gdb::byte_vector, and resize the vector
9413 instead of reserving it.
9414 * dwarf2read.c: Include "common/byte-vector.h".
9415 (data_buf::m_vec): Now a gdb::byte_vector.
9416 * gdb_regex.c: Include "common/def-vector.h".
9417 (compiled_regex::compiled_regex): Use gdb::def_vector<char>.
9418 * mi/mi-main.c: Include "common/byte-vector.h".
9419 (mi_cmd_data_read_memory): Use gdb::byte_vector.
9420 * printcmd.c: Include "common/byte-vector.h".
9421 (print_scalar_formatted): Use gdb::byte_vector.
9422 * valprint.c: Include "common/byte-vector.h".
9423 (maybe_negate_by_bytes, print_decimal_chars): Use
9424 gdb::byte_vector.
9425
01ec7a27
SM
94262017-06-13 Simon Marchi <simon.marchi@ericsson.com>
9427
9428 * darwin-nat.c: Include "nat/fork-inferior.h".
9429
848d9074
SM
94302017-06-13 Simon Marchi <simon.marchi@ericsson.com>
9431
9432 * configure.nat: Factor out Darwin bits that are not
9433 architecture-specific. Add fork-inferior.o.
9434
3b912944
SM
94352017-06-13 Simon Marchi <simon.marchi@ericsson.com>
9436
9437 * configure.nat: Factor out AIX bits that are not
9438 architecture-specific. Add fork-inferior.o.
9439
55acdf22
AA
94402017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
9441
9442 * dwarf2loc.c (rw_pieced_value): New. Merge logic from...
9443 (read_pieced_value, write_pieced_value): ...here. Reduce to
9444 wrappers that just call rw_pieced_value.
9445
f65e2044
AA
94462017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
9447
9448 * dwarf2loc.c (write_pieced_value): When writing the data for a
9449 memory piece, use write_memory_with_notification instead of
9450 write_memory.
9451
23f945bf
AA
94522017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
9453
9454 * valops.c (read_value_memory): Change embedded_offset to
9455 represent a bit offset instead of a byte offset.
9456 * value.h (read_value_memory): Adjust comment.
9457
f236533e
AA
94582017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
9459
9460 * dwarf2loc.c (read_pieced_value): Remove unnecessary variables
9461 dest_offset_bits and source_offset_bits.
9462 (write_pieced_value): Likewise.
9463
65d84b76
AA
94642017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
9465
9466 * dwarf2loc.c (read_pieced_value): Respect the piece offset, as
9467 given by DW_OP_bit_piece.
9468 (write_pieced_value): Likewise.
9469
242d31ab
AA
94702017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
9471
9472 * dwarf2loc.c (read_pieced_value): Move the buffer allocation and
9473 some other preparations to the places where sufficient information
9474 is available.
9475 (write_pieced_value): Likewise.
9476
03c8af18
AA
94772017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
9478
9479 * dwarf2loc.c (bits_to_bytes): New function.
9480 (read_pieced_value): Fix offset calculations for register pieces
9481 on big-endian targets.
9482 (write_pieced_value): Likewise.
9483
840989c1
AA
94842017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
9485
9486 * dwarf2loc.c (read_pieced_value): Remove buffer_size variable.
9487 (write_pieced_value): Likewise.
9488
359b19bb
AA
94892017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
9490
9491 * dwarf2loc.c (write_pieced_value): When writing to a bit-field,
9492 transfer the source value's least significant bits, instead of its
9493 lowest-addressed ones. Rename type_len to max_offset.
9494 (read_pieced_value): Mirror above changes to write_pieced_value as
9495 applicable.
9496
07c9ca3b
AA
94972017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
9498
9499 * dwarf2loc.c (write_pieced_value): In DWARF_VALUE_MEMORY,
9500 truncate full bytes from dest_offset_bits before using it as an
9501 offset into the buffer.
9502
f1cc9874
AA
95032017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
9504
9505 * dwarf2loc.c (write_pieced_value): Include transfer size in
9506 byte-wise check.
9507
cdaac320
AA
95082017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
9509
9510 * dwarf2loc.c (write_pieced_value): Fix copy/paste error in the
9511 calculation of this_size.
9512
af547a96
AA
95132017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
9514
9515 * dwarf2loc.c (read_pieced_value): Respect parent value's offset
9516 when targeting a bit-field.
9517 (write_pieced_value): Likewise.
9518
ddd7882a
AA
95192017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
9520
9521 * dwarf2loc.c (struct piece_closure) <addr_size>: Remove field.
9522 (allocate_piece_closure): Drop addr_size parameter.
9523 (dwarf2_evaluate_loc_desc_full): Adjust call to
9524 allocate_piece_closure.
9525
e9352324
AA
95262017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
9527
9528 PR gdb/21226
9529 * dwarf2loc.c (read_pieced_value): Anchor stack value pieces at
9530 the LSB end, independent of endianness.
9531
d5d1163e
AA
95322017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
9533
9534 * dwarf2loc.c (write_pieced_value): Fix order of calculations for
9535 size capping.
9536
032bb6ea
YQ
95372017-06-13 Yao Qi <yao.qi@linaro.org>
9538
9539 * mips-linux-nat.c: Move include features/mips*-linux.c to
9540 mips-linux-tdep.c.
9541 (_initialize_mips_linux_nat): Move initialize_tdesc_mips* calls
9542 to mips-linux-tdep.c.
9543 * mips-linux-tdep.c: Include features/mips*-linux.c
9544 (_initialize_mips_linux_tdep): Call initialize_tdesc_mips*
9545 functions.
9546 * mips-linux-tdep.h (tdesc_mips_linux): Declare.
9547 (tdesc_mips_dsp_linux, tdesc_mips64_linux): Declare.
9548 (tdesc_mips64_dsp_linux): Declare.
9549
f12f6bad
TT
95502017-06-12 Tom Tromey <tom@tromey.com>
9551
9552 * valprint.h (val_print_type_code_int): Remove.
9553 * valprint.c (generic_val_print_int): Always call
9554 val_print_scalar_formatted.
9555 (val_print_type_code_int): Remove.
9556 * printcmd.c (print_scalar_formatted): Handle options->format==0.
9557 * f-valprint.c (f_val_print): Use val_print_scalar_formatted.
9558 * c-valprint.c (c_val_print_int): Use val_print_scalar_formatted.
9559 * ada-valprint.c (ada_val_print_num): Use
9560 val_print_scalar_formatted.
9561
d9109c80
TT
95622017-06-12 Tom Tromey <tom@tromey.com>
9563
9564 * printcmd.c (print_scalar_formatted): Unify the two switches.
9565 Don't convert scalars to LONGEST.
9566
4ac0cb1c
TT
95672017-06-12 Tom Tromey <tom@tromey.com>
9568
9569 PR exp/16225:
9570 * valprint.h (print_decimal_chars): Update.
9571 * valprint.c (maybe_negate_by_bytes): New function.
9572 (print_decimal_chars): Add "is_signed" argument.
9573 * printcmd.c (print_scalar_formatted): Update.
9574
30a25466
TT
95752017-06-12 Tom Tromey <tom@tromey.com>
9576
9577 PR exp/16225:
9578 * valprint.h (print_binary_chars, print_hex_chars): Update.
9579 * valprint.c (val_print_type_code_int): Update.
9580 (print_binary_chars): Add "zero_pad" argument.
9581 (emit_octal_digit): New function.
9582 (print_octal_chars): Don't zero-pad.
9583 (print_decimal_chars): Likewise.
9584 (print_hex_chars): Add "zero_pad" argument.
9585 * sh64-tdep.c (sh64_do_fp_register): Update.
9586 * regcache.c (regcache::dump): Update.
9587 * printcmd.c (print_scalar_formatted): Update.
9588 * infcmd.c (default_print_one_register_info): Update.
9589
b3464d03
PA
95902017-06-12 Pedro Alves <palves@redhat.com>
9591 Alan Hayward <alan.hayward@arm.com>
9592
9593 * mips-tdep.c (MAX_MIPS_ABI_REGSIZE): New.
9594 (mips_eabi_push_dummy_call): Rename local 'regsize' to
9595 'abi_regsize'. Rename local array 'valbuf' to 'ref_valbuf', and
9596 use MAX_MIPS_ABI_REGSIZE instead of MAX_REGISTER_SIZE to size it.
9597 Assert that abi_regsize bytes fit in 'ref_valbuf'.
9598
4b76cda9
PA
95992017-06-12 Pedro Alves <palves@redhat.com>
9600
9601 * dwarf2read.c (mapped_symtab::data): Now a vector of
9602 symtab_index_entry instead of vector of
9603 std::unique_ptr<symtab_index_entry>. All users adjusted to check
9604 whether an element's name is NULL instead of checking whether the
9605 element itself is NULL.
9606 (find_slot): Change return type. Adjust.
9607 (hash_expand, , add_index_entry, uniquify_cu_indices)
9608 (write_hash_table): Adjust.
9609
e8f8bcb3
PA
96102017-06-12 Pedro Alves <palves@redhat.com>
9611
9612 * dwarf2read.c (recursively_count_psymbols): New function.
9613 (write_psymtabs_to_index): Call it to compute number of psyms and
9614 pass estimate size of psyms_seen to unordered_set's ctor.
9615
70a1152b
PA
96162017-06-12 Pedro Alves <palves@redhat.com>
9617
9618 * dwarf2read.c (write_hash_table): Check if key already exists
9619 before emplacing.
9620
c2f134ac
PA
96212017-06-12 Pedro Alves <palves@redhat.com>
9622
9623 * dwarf2read.c (data_buf::append_space): Rename to...
9624 (data_buf::grow): ... this, and make private. Adjust all callers.
9625 (data_buf::append_uint): New method.
9626 (add_address_entry, write_one_signatured_type)
9627 (write_psymtabs_to_index): Use it.
9628
a81e6d4d
PA
96292017-06-12 Pedro Alves <palves@redhat.com>
9630
9631 * dwarf2read.c (file_write(FILE *, const void *, size_t)): Delete.
9632 (file_write (FILE *, const std::vector<Elem>&)): Delete.
9633 (data_buf::file_write): Call ::fwrite directly.
9634
6fd931f2
PA
96352017-06-12 Pedro Alves <palves@redhat.com>
9636
9637 * dwarf2read.c (uniquify_cu_indices): Use std::unique and
9638 std::vector::erase.
9639
bc8f2430
JK
96402017-06-12 Jan Kratochvil <jan.kratochvil@redhat.com>
9641
9642 Code cleanup: C++ify .gdb_index producer.
9643 * dwarf2read.c: Include <unordered_set> and <unordered_map>.
9644 (MAYBE_SWAP) [WORDS_BIGENDIAN]: Cast to offset_type.
9645 (struct strtab_entry, hash_strtab_entry, eq_strtab_entry)
9646 (create_strtab, add_string): Remove.
9647 (file_write, data_buf): New.
9648 (struct symtab_index_entry): Use std::vector for cu_indices.
9649 (struct mapped_symtab): Use std::vector for data.
9650 (hash_symtab_entry, eq_symtab_entry, delete_symtab_entry)
9651 (create_symbol_hash_table, create_mapped_symtab, cleanup_mapped_symtab):
9652 Remove.
9653 (find_slot): Change return type. Update it to the new data structures.
9654 (hash_expand, add_index_entry): Update it to the new data structures.
9655 (offset_type_compare): Remove.
9656 (uniquify_cu_indices): Update it to the new data structures.
9657 (c_str_view, c_str_view_hasher, vector_hasher): New.
9658 (add_indices_to_cpool): Remove.
9659 (write_hash_table): Update it to the new data structures.
9660 (struct psymtab_cu_index_map, hash_psymtab_cu_index)
9661 (eq_psymtab_cu_index): Remove.
9662 (psym_index_map): New typedef.
9663 (struct addrmap_index_data): Change addr_obstack pointer to data_buf
9664 reference and std::unordered_map for cu_index_htab.
9665 (add_address_entry, add_address_entry_worker, write_address_map)
9666 (write_psymbols): Update it to the new data structures.
9667 (write_obstack): Remove.
9668 (struct signatured_type_index_data): Change types_list to a data_buf
9669 reference and psyms_seen to a std::unordered_set reference.
9670 (write_one_signatured_type, recursively_write_psymbols)
9671 (write_psymtabs_to_index): Update it to the new data structures.
9672
c4dcb155
SM
96732017-06-11 Simon Marchi <simon.marchi@ericsson.com>
9674
9675 * NEWS (Changes since GDB 8.0): Announce {set,show} debug
9676 separate-debug-file commands.
9677 * symfile.h (separate_debug_file_debug): New global.
9678 * symfile.c (separate_debug_file_debug): New global.
9679 (separate_debug_file_exists, find_separate_debug_file): Add
9680 debug output.
9681 (_initialize_symfile): Add "set debug separate-debug-file"
9682 command.
9683 * build-id.c (build_id_to_debug_bfd,
9684 find_separate_debug_file_by_buildid): Add debug output.
9685
6d45d4b4
SM
96862017-06-10 Simon Marchi <simon.marchi@polymtl.ca>
9687
9688 * gdbarch.sh (displaced_step_free_closure): Remove.
9689 * gdbarch.h, gdbarch.c: Re-generate.
9690 * aarch64-linux-tdep.c (aarch64_linux_init_abi): Don't set
9691 displaced_step_free_closure.
9692 * amd64-linux-tdep.c (amd64_linux_init_abi_common): Likewise.
9693 * arm-linux-tdep.c (arm_linux_init_abi): Likewise.
9694 * i386-linux-tdep.c (i386_linux_init_abi): Likewise.
9695 * rs6000-aix-tdep.c (rs6000_aix_init_osabi): Likewise.
9696 * rs6000-tdep.c (rs6000_gdbarch_init): Likewise.
9697 * s390-linux-tdep.c (s390_gdbarch_init): Likewise.
9698 * arch-utils.h (simple_displaced_step_free_closure): Remove.
9699 * arch-utils.c (simple_displaced_step_free_closure): Remove.
9700 * infrun.c (displaced_step_clear): Call xfree instead of
9701 gdbarch_displaced_step_free_closure.
9702
2f91880f
SDJ
97032017-06-08 Sergio Durigan Junior <sergiodj@redhat.com>
9704
9705 * common/common-utils.c (stringify_argv): Check for "arg[0] !=
9706 NULL".
9707
b8b6e72f
AH
97082017-06-08 Alan Hayward <alan.hayward@arm.com>
9709
9710 * mn10300-tdep.c (MN10300_MAX_REGISTER_SIZE): Add.
9711 (mn10300_extract_return_value): Use MN10300_MAX_REGISTER_SIZE.
9712 (mn10300_push_dummy_call): Likewise.
9713
5369082e
AH
97142017-06-08 Alan Hayward <alan.hayward@arm.com>
9715
9716 * mi/mi-main.c (register_changed_p): Use value_contents_eq.
9717
ff4ca5ac
AH
97182017-06-08 Alan Hayward <alan.hayward@arm.com>
9719
9720 * mi/mi-main.c (register_changed_p): Use cooked_read_value.
9721
aefd8b33
SDJ
97222017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
9723
9724 * NEWS (Changes since GDB 8.0): Announce that GDBserver is now
9725 able to start inferiors using a shell.
9726 (New remote packets): Announce new packet "QStartupWithShell".
9727 * remote.c: Add PACKET_QStartupWithShell.
9728 (extended_remote_create_inferior): Handle new
9729 PACKET_QStartupWithShell.
9730 (remote_protocol_features) <QStartupWithShell>: New entry for
9731 PACKET_QStartupWithShell.
9732 (_initialize_remote): Call "add_packet_config_cmd" for
9733 QStartupShell.
9734
2090129c
SDJ
97352017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
9736 Pedro Alves <palves@redhat.com>
9737
9738 * Makefile.in (HFILES_NO_SRCDIR): Add "common/common-inferior.h"
9739 and "nat/fork-inferior.h".
9740 * common/common-inferior.h: New file, with contents from
9741 "gdb/inferior.h".
9742 * commom/common-utils.c: Include "common-utils.h".
9743 (stringify_argv): New function.
9744 * common/common-utils.h (stringify_argv): New prototype.
9745 * configure.nat: Add "fork-inferior.o" as a dependency for
9746 "*linux*", "fbsd*" and "nbsd*" hosts.
9747 * corefile.c (get_exec_file): Update comment.
9748 * darwin-nat.c (darwin_ptrace_him): Call "gdb_startup_inferior"
9749 instead of "startup_inferior".
9750 (darwin_create_inferior): Call "add_thread_silent" after
9751 "fork_inferior".
9752 * fork-child.c: Cleanup unnecessary includes.
9753 (SHELL_FILE): Move to "common/common-fork-child.c".
9754 (environ): Likewise.
9755 (exec_wrapper): Initialize.
9756 (get_exec_wrapper): New function.
9757 (breakup_args): Move to "common/common-fork-child.c"; rename to
9758 "breakup_args_for_exec".
9759 (escape_bang_in_quoted_argument): Move to
9760 "common/common-fork-child.c".
9761 (saved_ui): New variable.
9762 (prefork_hook): New function.
9763 (postfork_hook): Likewise.
9764 (postfork_child_hook): Likewise.
9765 (gdb_startup_inferior): Likewise.
9766 (fork_inferior): Move to "common/common-fork-child.c". Update
9767 function to support gdbserver.
9768 (startup_inferior): Likewise.
9769 * gdbcore.h (get_exec_file): Remove declaration.
9770 * gnu-nat.c (gnu_create_inferior): Call "gdb_startup_inferior"
9771 instead of "startup_inferior". Call "add_thread_silent" after
9772 "fork_inferior".
9773 * inf-ptrace.c: Include "nat/fork-inferior.h" and "utils.h".
9774 (inf_ptrace_create_inferior): Call "gdb_startup_inferior"
9775 instead of "startup_inferior". Call "add_thread_silent" after
9776 "fork_inferior".
9777 * inferior.h: Include "common-inferior.h".
9778 (trace_start_error): Move to "common/common-utils.h".
9779 (trace_start_error_with_name): Likewise.
9780 (fork_inferior): Move prototype to "nat/fork-inferior.h".
9781 (startup_inferior): Likewise.
9782 (gdb_startup_inferior): New prototype.
9783 * nat/fork-inferior.c: New file, with contents from "fork-child.c".
9784 * nat/fork-inferior.h: New file.
9785 * procfs.c (procfs_init_inferior): Call "gdb_startup_inferior"
9786 instead of "startup_inferior". Call "add_thread_silent" after
9787 "fork_inferior".
9788 * target.h (target_terminal_init): Move prototype to
9789 "target/target.h".
9790 (target_terminal_inferior): Likewise.
9791 (target_terminal_ours): Likewise.
9792 * target/target.h (target_terminal_init): New prototype, moved
9793 from "target.h".
9794 (target_terminal_inferior): Likewise.
9795 (target_terminal_ours): Likewise.
9796 * utils.c (gdb_flush_out_err): New function.
9797
043a4934
SDJ
97982017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
9799
9800 * Makefile.in (HFILES_NO_SRCDIR): Add "common/common-gdbthread.h".
9801 * common/common-gdbthread.h: New file, with parts from
9802 "gdb/gdbthread.h".
9803 * gdbthread.h: Include "common-gdbthread.h".
9804 (switch_to_thread): Moved to "common/common-gdbthread.h".
9805
15652511
SDJ
98062017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
9807
9808 * Makefile.in (SFILES): Add "common/job-control.c".
9809 (HFILES_NO_SRCDIR): Add "common/job-control.h".
9810 (COMMON_OBS): Add "job-control.o".
9811 * common/job-control.c: New file, with contents from
9812 "gdb/inflow.c".
9813 * common/job-control.h: New file, with contents from "terminal.h".
9814 * fork-child.c: Include "job-control.h".
9815 * inflow.c: Include "job-control.h".
9816 (gdb_setpgid): Move to "common/common-inflow.c".
9817 (_initialize_inflow): Move setting of "job_control" to
9818 "handle_job_control".
9819 * terminal.h (job_control): Moved to "common/common-terminal.h".
9820 (gdb_setpgid): Likewise.
9821 * top.c: Include "job_control.h".
9822 * utils.c: Likewise.
9823 (job_control): Moved to "job-control.c".
9824
2d7cc5c7
PA
98252017-06-07 Pedro Alves <palves@redhat.com>
9826
9827 * Makefile.in (SFILES): Add gdb_regex.c.
9828 (COMMON_OBS): Add gdb_regex.o.
9829 * ada-lang.c (ada_add_standard_exceptions)
9830 (ada_add_exceptions_from_frame, name_matches_regex)
9831 (ada_add_global_exceptions, ada_exceptions_list_1): Change regex
9832 parameter type to compiled_regex. Adjust.
9833 (ada_exceptions_list): Use compiled_regex.
9834 * break-catch-throw.c (exception_catchpoint::pattern): Now a
9835 std::unique_ptr<compiled_regex>.
9836 (exception_catchpoint::~exception_catchpoint): Remove regfree
9837 call.
9838 (check_status_exception_catchpoint): Adjust to use compiled_regex.
9839 (handle_gnu_v3_exceptions): Adjust to use compiled_regex.
9840 * breakpoint.c (solib_catchpoint::compiled): Now a
9841 std::unique_ptr<compiled_regex>.
9842 (solib_catchpoint::~solib_catchpoint): Remove regfree call.
9843 (check_status_catch_solib): Adjust to use compiled_regex.
9844 (add_solib_catchpoint): Adjust to use compiled_regex.
9845 * cli/cli-cmds.c (apropos_command): Use compiled_regex.
9846 * cli/cli-decode.c (apropos_cmd): Change regex parameter to
9847 compiled_regex reference. Adjust to use it.
9848 * cli/cli-decode.h: Remove struct re_pattern_buffer forward
9849 declaration. Include "gdb_regex.h".
9850 (apropos_cmd): Change regex parameter to compiled_regex reference.
9851 * gdb_regex.c: New file.
9852 * gdb_regex.h (make_regfree_cleanup, get_regcomp_error): Delete
9853 declarations.
9854 (class compiled_regex): New.
9855 * linux-tdep.c: Include "common/gdb_optional.h".
9856 (struct mapping_regexes): New, factored out from
9857 mapping_is_anonymous_p, and adjusted to use compiled_regex.
9858 (mapping_is_anonymous_p): Use mapping_regexes wrapped in a
9859 gdb::optional and remove cleanups. Adjust to compiled_regex.
9860 * probe.c: Include "common/gdb_optional.h".
9861 (collect_probes): Use compiled_regex and gdb::optional and remove
9862 cleanups.
9863 * skip.c: Include "common/gdb_optional.h".
9864 (skiplist_entry::compiled_function_regexp): Now a
9865 gdb::optional<compiled_regex>.
9866 (skiplist_entry::compiled_function_regexp_is_valid): Delete field.
9867 (free_skiplist_entry): Remove regfree call.
9868 (compile_skip_regexp, skip_rfunction_p): Adjust to use
9869 compiled_regex and gdb::optional.
9870 * symtab.c: Include "common/gdb_optional.h".
9871 (search_symbols): Use compiled_regex and gdb::optional.
9872 * utils.c (do_regfree_cleanup, make_regfree_cleanup)
9873 (get_regcomp_error, compile_rx_or_error): Delete. Some bits moved
9874 to gdb_regex.c.
9875
50d6adef
AH
98762017-06-07 Alan Hayward <alan.hayward@arm.com>
9877
9878 * regcache.c (regcache::save): Avoid buffer use.
9879 (regcache::dump): Likewise.
9880
4a8a33c8
AH
98812017-06-07 Alan Hayward <alan.hayward@arm.com>
9882
9883 * sh-tdep.c (sh_pseudo_register_read): Remove
9884 MAX_REGISTER_SIZE.
9885 (sh_pseudo_register_write): Likewise.
9886 * sh64-tdep.c (sh64_pseudo_register_read): Likewise.
9887 (sh64_pseudo_register_write): Likewise
9888
d1be909e
AH
98892017-06-07 Alan Hayward <alan.hayward@arm.com>
9890
9891 * aarch64-tdep.c (aarch64_store_return_value): Use
9892 V_REGISTER_SIZE.
9893 (aarch64_pseudo_read_value): Likewise.
9894 (aarch64_pseudo_write): Likewise.
9895
f4a65042
YQ
98962017-06-06 Yao Qi <yao.qi@linaro.org>
9897
9898 * regformats/regdef.h (set_register_cache): Remove the
9899 declaration.
9900
9f7fb0aa
AH
99012017-06-06 Alan Hayward <alan.hayward@arm.com>
9902
9903 * frame.c (frame_unwind_register_signed): Use
9904 frame_unwind_register_value.
9905
e1e01040
PA
99062017-06-06 Pedro Alves <palves@redhat.com>
9907
9908 PR breakpoints/21553
9909 * breakpoint.c (create_breakpoints_sal_default)
9910 (init_breakpoint_sal, create_breakpoint_sal): Use
9911 gdb::unique_xmalloc_ptr for string parameters.
9912 (create_breakpoint): Constify 'extra_string' and 'cond_string'
9913 parameters. Replace cleanups with gdb::unique_xmalloc_ptr.
9914 (base_breakpoint_create_breakpoints_sal)
9915 (bkpt_create_breakpoints_sal, tracepoint_create_breakpoints_sal)
9916 (strace_marker_create_breakpoints_sal)
9917 (create_breakpoints_sal_default): Use gdb::unique_xmalloc_ptr for
9918 string parameters.
9919 * breakpoint.h (breakpoint_ops::create_breakpoints_sal): Use
9920 gdb::unique_xmalloc_ptr for string parameters.
9921 (create_breakpoint): Constify 'extra_string' and 'cond_string'
9922 parameters.
9923
fbe654c8
AH
99242017-06-06 Alan Hayward <alan.hayward@arm.com>
9925
9926 * alpha-tdep.c (alpha_register_to_value): Use
9927 get_frame_register_value.
9928 (alpha_value_to_register): Use ALPHA_REGISTER_SIZE.
9929
ae0d01d6
AH
99302017-06-06 Alan Hayward <alan.hayward@arm.com>
9931
9932 * ia64-tdep.c (IA64_MAX_FP_REGISTER_SIZE) Add.
9933 (ia64_register_to_value): Use IA64_MAX_FP_REGISTER_SIZE.
9934 (ia64_value_to_register): Likewise.
9935 (ia64_extract_return_value): Likewise.
9936 (ia64_store_return_value): Likewise.
9937 (ia64_push_dummy_call): Likewise.
9938
49cf576c
JB
99392017-06-04 Joel Brobecker <brobecker@adacore.com>
9940
9941 GDB 8.0 released.
9942
26b6a6ab
SM
99432017-06-03 Simon Marchi <simon.marchi@ericsson.com>
9944
9945 * x86-linux-nat.c (struct arch_lwp_info): Remove.
9946
22827c51
SM
99472017-06-03 Simon Marchi <simon.marchi@polymtl.ca>
9948
9949 * linux-nat.c (linux_nat_post_attach_wait): Remove FIRST
9950 parameter.
9951 (linux_nat_attach): Adjust call to linux_nat_post_attach_wait.
9952
0e05cf3a
SM
99532017-06-02 Simon Marchi <simon.marchi@ericsson.com>
9954
9955 * event-loop.c (poll_timers): Unallocate timer using delete
9956 instead of xfree.
9957
c1fc2657
SM
99582017-06-02 Simon Marchi <simon.marchi@polymtl.ca>
9959
9960 * breakpoint.h (struct breakpoint_ops) <dtor>: Remove.
9961 (struct breakpoint) <~breakpoint>: New.
9962 (struct watchpoint): Inherit from breakpoint.
9963 <~watchpoint>: New.
9964 <base>: Remove.
9965 (struct tracepoint): Inherit from breakpoint.
9966 <base>: Remove.
9967 * breakpoint.c (longjmp_breakpoint_ops): Remove.
9968 (struct longjmp_breakpoint): Inherit from breakpoint.
9969 <~longjmp_breakpoint>: New.
9970 <base>: Remove.
9971 (new_breakpoint_from_type): Remove casts.
9972 (watchpoint_in_thread_scope): Remove reference to base field.
9973 (watchpoint_del_at_next_stop): Likewise.
9974 (update_watchpoint): Likewise.
9975 (watchpoint_check): Likewise.
9976 (bpstat_check_watchpoint): Likewise.
9977 (set_longjmp_breakpoint): Likewise.
9978 (struct fork_catchpoint): Inherit from breakpoint.
9979 <base>: Remove.
9980 (struct solib_catchpoint): Inherit from breakpoint.
9981 <~solib_catchpoint>: New.
9982 <base>: Remove.
9983 (dtor_catch_solib): Change to ...
9984 (solib_catchpoint::~solib_catchpoint): ... this.
9985 (breakpoint_hit_catch_solib): Remove reference to base field.
9986 (add_solib_catchpoint): Likewise.
9987 (create_fork_vfork_event_catchpoint): Likewise.
9988 (struct exec_catchpoint): Inherit from breakpoint.
9989 <~exec_catchpoint>: New.
9990 <base>: Remove.
9991 (dtor_catch_exec): Change to ...
9992 (exec_catchpoint::~exec_catchpoint): ... this.
9993 (dtor_watchpoint): Change to ...
9994 (watchpoint::~watchpoint): ... this.
9995 (watch_command_1): Remove reference to base field.
9996 (catch_exec_command_1): Likewise.
9997 (base_breakpoint_dtor): Change to ...
9998 (breakpoint::~breakpoint): ... this.
9999 (base_breakpoint_ops): Remove dtor field value.
10000 (longjmp_bkpt_dtor): Change to ...
10001 (longjmp_breakpoint::~longjmp_breakpoint): ... this.
10002 (strace_marker_create_breakpoints_sal): Remove reference to base
10003 field.
10004 (delete_breakpoint): Don't manually call breakpoint destructor.
10005 (create_tracepoint_from_upload): Remove reference to base field.
10006 (trace_pass_set_count): Likewise.
10007 (initialize_breakpoint_ops): Don't initialize
10008 momentary_breakpoint_ops, don't set dtors.
10009 * ada-lang.c (struct ada_catchpoint): Inherit from breakpoint.
10010 <~ada_catchpoint>: New.
10011 <base>: Remove.
10012 (create_excep_cond_exprs): Remove reference to base field.
10013 (dtor_exception): Change to ...
10014 (ada_catchpoint::~ada_catchpoint): ... this.
10015 (dtor_catch_exception): Remove.
10016 (dtor_catch_exception_unhandled): Remove.
10017 (dtor_catch_assert): Remove.
10018 (create_ada_exception_catchpoint): Remove reference to base
10019 field.
10020 (initialize_ada_catchpoint_ops): Don't set dtors.
10021 * break-catch-sig.c (struct signal_catchpoint): Inherit from
10022 breakpoint.
10023 <~signal_catchpoint>: New.
10024 <base>: Remove.
10025 (signal_catchpoint_dtor): Change to ...
10026 (signal_catchpoint::~signal_catchpoint): ... this.
10027 (create_signal_catchpoint): Remove reference to base field.
10028 (initialize_signal_catchpoint_ops): Don't set dtor.
10029 * break-catch-syscall.c (struct syscall_catchpoint): Inherit
10030 from breakpoint.
10031 <~syscall_catchpoint>: New.
10032 <base>: Remove.
10033 (dtor_catch_syscall): Change to ...
10034 (syscall_catchpoint::~syscall_catchpoint): ... this.
10035 (create_syscall_event_catchpoint): Remove reference to base
10036 field.
10037 (initialize_syscall_catchpoint_ops): Don't set dtor.
10038 * break-catch-throw.c (struct exception_catchpoint): Inherit
10039 from breakpoint.
10040 <~exception_catchpoint>: New.
10041 <base>: Remove.
10042 (dtor_exception_catchpoint): Change to ...
10043 (exception_catchpoint::~exception_catchpoint): ... this.
10044 (handle_gnu_v3_exceptions): Remove reference to base field.
10045 (initialize_throw_catchpoint_ops): Don't set dtor.
10046 * ctf.c (ctf_get_traceframe_address): Remove reference to base
10047 field.
10048 * remote.c (remote_get_tracepoint_status): Likewise.
10049 * tracefile-tfile.c (tfile_get_traceframe_address): Likewise.
10050 * tracefile.c (tracefile_fetch_registers): Likewise.
10051 * tracepoint.c (actions_command): Likewise.
10052 (validate_actionline): Likewise.
10053 (tfind_1): Likewise.
10054 (get_traceframe_location): Likewise.
10055 (find_matching_tracepoint_location): Likewise.
10056 (parse_tracepoint_status): Likewise.
10057 * mi/mi-cmd-break.c (mi_cmd_break_passcount): Likewise.
10058
3b0871f4
SM
100592017-06-02 Simon Marchi <simon.marchi@polymtl.ca>
10060
10061 * breakpoint.c (struct longjmp_breakpoint): New struct.
10062 (is_tracepoint_type): Change return type to bool.
10063 (is_longjmp_type): New function.
10064 (new_breakpoint_from_type): Handle longjmp kinds of breakpoints.
10065 (set_raw_breakpoint_without_location): Use
10066 new_breakpoint_from_type.
10067 (set_raw_breakpoint): Likewise.
10068
a5e364af
SM
100692017-06-02 Simon Marchi <simon.marchi@polymtl.ca>
10070
10071 * breakpoint.c (new_breakpoint_from_type): New function.
10072 (create_breakpoint_sal): Use new_breakpoint_from_type and
10073 unique_ptr.
10074 (create_breakpoint): Likewise.
10075
ae3b3f34
SM
100762017-05-31 Simon Marchi <simon.marchi@ericsson.com>
10077
10078 * memattr.c (mem_info_command): Rename to ...
10079 (info_mem_command): ... this.
10080 (mem_enable_command): Rename to ...
10081 (enable_mem_command): ... this.
10082 (mem_disable_command): Rename to ...
10083 (disable_mem_command): ... this.
10084 (mem_delete_command): Rename to ...
10085 (delete_mem_command): ... this.
10086 (_initialize_mem): Adjust function names.
10087
13ace077
MM
100882017-05-31 Markus Metzger <markus.t.metzger@intel.com>
10089
10090 * btrace.c (handle_pt_insn_events): New.
10091 (ftrace_add_pt): Call handle_pt_insn_events. Rename ERRCODE into
10092 STATUS. Split into this and ...
10093 (handle_pt_insn_event_flags): ... this.
10094
c56ccc05
MM
100952017-05-31 Markus Metzger <markus.t.metzger@intel.com>
10096
10097 * configure.ac: Check for pt_insn_event, struct pt_insn.enabled,
10098 and struct pt_insn.resynced.
10099 * configure: Regenerated.
10100 * config.in: Regenerated.
10101
08c3f6d2
TW
101022017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
10103
10104 * btrace.c (ftrace_find_call_by_number): New function.
10105 (ftrace_new_function): Store objects, not pointers.
10106 (ftrace_find_call_by_number, ftrace_new_return, ftrace_new_switch,
10107 ftrace_new_gap, ftrace_update_function,
10108 ftrace_compute_global_level_offset, btrace_stich_bts, btrace_clear,
10109 btrace_insn_get, btrace_insn_get_error, btrace_insn_end,
10110 btrace_insn_next, btrace_insn_prev, ptrace_find_insn_by_number,
10111 btrace_ends_with_single_insn, btrace_call_get): Account for
10112 btrace_thread_info::functions now storing objects.
10113 * btrace.h (struct btrace_thread_info): Add constructor.
10114 (struct btrace_thread_info) <functions>: Make std::vector.
10115 (struct btrace_thread_info) <prev, next, up, insn, errcode, flags):
10116 Initialize with default values.
10117 * record-btrace.c (record_btrace_frame_sniffer): Account for
10118 btrace_thread_info::functions now storing objects.
10119
8ffd39f2
TW
101202017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
10121
10122 * btrace.c: Remove typedef bfun_s.
10123 (ftrace_new_gap): Directly add gaps to the list of gaps.
10124 (btrace_bridge_gaps, btrace_compute_ftrace_bts, pt_btrace_insn_flags,
10125 ftrace_add_pt, btrace_compute_ftrace_pt, btrace_compute_ftrace_1,
10126 btrace_finalize_ftrace, btrace_compute_ftrace): Use std::vector
10127 instead of gdb VEC.
10128
4aeb0dfc
TW
101292017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
10130
10131 * btrace.c (ftrace_fixup_caller, ftrace_new_return, ftrace_connect_bfun,
10132 ftrace_bridge_gap): Replace references to btrace_thread_info::segment
10133 with btrace_thread_info::next_segment and
10134 btrace_thread_info::prev_segment.
10135 * btrace.h: Remove struct btrace_func_link.
10136 (struct btrace_function): Replace pair of function segment pointers
10137 with pair of indices.
10138 * python/py-record-btrace.c (btpy_call_prev_sibling,
10139 btpy_call_next_sibling): Replace references to
10140 btrace_thread_info::segment with btrace_thread_info::next_segment and
10141 btrace_thread_info::prev_segment.
10142 * record-btrace.c (record_btrace_frame_this_id): Use
10143 btrace_find_call_by_number.
10144
eb8f2b9c
TW
101452017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
10146
10147 * btrace.c (ftrace_new_function, ftrace_fixup_level,
10148 ftrace_connect_bfun, ftrace_bridge_gap, btrace_bridge_gaps,
10149 btrace_insn_next, btrace_insn_prev): Remove references to
10150 btrace_thread_info::flow.
10151 * btrace.h (struct btrace_function): Remove FLOW.
10152
42bfe59e
TW
101532017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
10154
10155 * btrace.c (ftrace_find_call_by_number): New function.
10156 (ftrace_update_caller, ftrace_new_call, ftrace_new_tailcall,
10157 ftrace_get_caller, ftrace_find_call, ftrace_new_return,
10158 ftrace_match_backtrace, ftrace_connect_bfun, ftrace_connect_backtrace,
10159 ftrace_bridge_gap, btrace_bridge_gaps): Use btrace_function::up as an
10160 index.
10161 * btrace.h (struct btrace_function): Turn UP into an index.
10162 * python/py-record-btrace.c (btpy_call_up): Use btrace_function::up
10163 as an index.
10164 * record-btrace.c (record_btrace_frame_unwind_stop_reason,
10165 record_btrace_frame_prev_register, record_btrace_frame_sniffer,
10166 record_btrace_tailcall_frame_sniffe): Use btrace_find_call_by_number.
10167
b54b03bd
TW
101682017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
10169
10170 * btrace.c (ftrace_new_function, ftrace_new_call, ftrace_new_tailcall,
10171 ftrace_new_return, ftrace_new_switch, ftrace_new_gap,
10172 ftrace_update_function, ftrace_compute_global_level_offset,
10173 btrace_compute_ftrace_bts, ftrace_add_pt, btrace_compute_ftrace_pt,
10174 btrace_stitch_bts, btrace_fetch, btrace_clear, btrace_insn_number,
10175 btrace_insn_end, btrace_is_empty): Remove references to
10176 btrace_thread_info::begin and btrace_thread_info::end.
10177 * btrace.h (struct btrace_thread_info): Remove BEGIN and END.
10178 (struct btrace_thread_info) <functions>: Adjust comment.
10179 * record-btrace.c (record_btrace_start_replaying): Remove reference to
10180 btrace_thread_info::begin.
10181
8286623c
TW
101822017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
10183
10184 * btrace.c (ftrace_new_function, ftrace_new_call, ftrace_new_tailcall,
10185 ftrace_new_return, ftrace_new_switch, ftrace_new_gap,
10186 ftrace_update_function): Remove arguments that implicitly were always
10187 BTINFO->END.
10188 (btrace_compute_ftrace_bts, ftrace_add_pt, btrace_compute_ftrace_pt):
10189 Don't pass BTINFO->END.
10190
a0f1b963
TW
101912017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
10192
10193 * btrace.c: (btrace_insn_get, btrace_insn_get_error, btrace_insn_number,
10194 btrace_insn_begin, btrace_insn_end, btrace_insn_next, btrace_insn_prev,
10195 btrace_find_insn_by_number): Replace function segment pointer with
10196 index.
10197 (btrace_insn_cmp): Simplify.
10198 * btrace.h: (struct btrace_insn_iterator) Rename index to
10199 insn_index. Replace function segment pointer with index into function
10200 segment vector.
10201 * record-btrace.c (record_btrace_call_history): Replace function
10202 segment pointer use with index.
10203 (record_btrace_frame_sniffer): Retrieve function call segment through
10204 vector.
10205 (record_btrace_set_replay): Remove defunc't safety check.
10206
f158f208
TW
102072017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
10208
10209 * btrace.c (btrace_ends_with_single_insn): New function.
10210 (btrace_call_get, btrace_call_number, btrace_call_begin,
10211 btrace_call_end, btrace_call_next, btrace_call_prev,
10212 btrace_find_call_by_number): Use index into call segment vector
10213 instead of pointer.
10214 (btrace_call_cmp): Simplify.
10215 * btrace.h (struct btrace_call_iterator): Replace function call segment
10216 pointer with index into vector.
10217 * record-btrace.c (record_btrace_call_history): Use index instead of
10218 pointer.
10219
521103fd
TW
102202017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
10221
10222 * btrace.c (btrace_insn_begin, btrace_insn_end,
10223 btrace_find_insn_by_number): Add btinfo to iterator.
10224 * btrace.h (struct btrace_insn_iterator): Add btinfo.
10225
17b89b34
TW
102262017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
10227
10228 * btrace.c (ftrace_new_function): Add btrace_thread_info to arguments
10229 and save pointers directly.
10230 (ftrace_new_call, ftrace_new_tailcall, ftrace_new_return,
10231 ftrace_new_switch, ftrace_new_gap, ftrace_update_function,
10232 ftrace_add_pt): Add btrace_thread_info to arguments. Adjust for
10233 changed signature of functions.
10234 (btrace_compute_ftrace_pt): Adjust for changed signature of functions.
10235 (btrace_fetch): Remove code that adds btrace_function pointers to
10236 vector of btrace_functions.
10237 (btrace_clear): Simplify freeing vector of btrace_functions.
10238
2b51eddc
TW
102392017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
10240
10241 * btrace.c (btrace_fetch, btrace_clear, btrace_find_insn_by_number):
10242 Replace VEC_* with std::vector functions.
10243 * btrace.h: Add include: vector. Remove typedef for DEF_VEC_P.
10244 (struct btrace_thread_info)<functions>: Change type to std::vector.
10245
db6be0d5
SM
102462017-05-30 Simon Marchi <simon.marchi@ericsson.com>
10247
10248 * NEWS (Changes in GDB 8.0): Remove extra empty line. Move
10249 "Removed targets and native configurations" up. Merge duplicate
10250 "New commands" sub-sections. Add "New options" sub-sections.
10251
b057297a
AH
102522017-05-26 Alan Hayward <alan.hayward@arm.com>
10253
10254 * defs.h (copy_integer_to_size): New declaration.
10255 * findvar.c (copy_integer_to_size): New function.
10256 (do_cint_test): New selftest function.
10257 (copy_integer_to_size_test): Likewise.
10258 (_initialize_findvar): Likewise.
10259 * mips-fbsd-tdep.c (mips_fbsd_supply_reg): Use raw_supply_integer.
10260 (mips_fbsd_collect_reg): Use raw_collect_integer.
10261 * mips-linux-tdep.c (supply_32bit_reg): Use raw_supply_integer.
10262 (mips64_fill_gregset): Use raw_collect_integer
10263 (mips64_fill_fpregset): Use raw_supply_integer.
10264 * regcache.c (regcache::raw_supply_integer): New function.
10265 (regcache::raw_collect_integer): Likewise.
10266 * regcache.h: (regcache::raw_supply_integer): New declaration.
10267 (regcache::raw_collect_integer): Likewise.
10268
b77b02a5
YQ
102692017-05-24 Yao Qi <yao.qi@linaro.org>
10270
10271 * Makefile.in (SFILES): Add gdbarch-selftests.c.
10272 (COMMON_OBS): Add gdbarch-selftests.o.
10273 * frame.c [GDB_SELF_TESTS] (create_new_frame): New function.
10274 * frame.h [GDB_SELF_TESTS] (create_new_frame): Declare.
10275 * gdbarch-selftests.c: New file.
10276 * regcache.h (regcache) <~regcache>: Mark it virtual if
10277 GDB_SELF_TEST.
10278 <raw_write>: Likewise.
10279
e521e87e
YQ
102802017-05-24 Yao Qi <yao.qi@linaro.org>
10281
10282 * regcache.c (current_regcache): Change it to
10283 regcache::current_regcache.
10284 (regcache_observer_target_changed): Update.
10285 (regcache_thread_ptid_changed): Make it a regcache static
10286 method.
10287 (regcache_thread_ptid_changed): Update.
10288 (class regcache_access): New.
10289 (current_regcache_test): Update.
10290 (_initialize_regcache): Update.
10291 * regcache.h: Include forward_list.
10292 (regcache): Declare regcache_thread_ptid_changed and declare
10293 registers_changed_ptid as friend.
10294
d8e07dda
YQ
102952017-05-24 Yao Qi <yao.qi@linaro.org>
10296
10297 * i387-tdep.c (i387_register_to_value): Use register_size
10298 instead of TYPE_LENGTH.
10299 * m68k-tdep.c (m68k_register_to_value): Likewise.
10300
8c8f9122
YQ
103012017-05-24 Yao Qi <yao.qi@linaro.org>
10302
10303 * i387-tdep.c (i387_convert_register_p): Return false if type
10304 code isn't TYPE_CODE_FLT.
10305
68fce50f
YQ
103062017-05-24 Yao Qi <yao.qi@linaro.org>
10307
10308 * alpha-tdep.c (alpha_convert_register_p): Return true if type
10309 length is 4.
10310 (alpha_register_to_value): Remove type length check.
10311 (alpha_value_to_register): Likewise.
10312
88954b49
YQ
103132017-05-24 Yao Qi <yao.qi@linaro.org>
10314
10315 * ia64-tdep.c (ia64_convert_register_p): Check type's code is
10316 TYPE_CODE_FLT.
10317
e3ec9b69
YQ
103182017-05-24 Yao Qi <yao.qi@linaro.org>
10319
10320 * m68k-tdep.c (m68k_convert_register_p): Check type's code is
10321 TYPE_CODE_FLT or not.
10322
cdd238da
YQ
103232017-05-24 Yao Qi <yao.qi@linaro.org>
10324
10325 * alpha-tdep.c (alpha_gdbarch_init): Use XCNEW instead of XNEW.
10326 * avr-tdep.c (avr_gdbarch_init): Likewise.
10327 * bfin-tdep.c (bfin_gdbarch_init): Likewise.
10328 * cris-tdep.c (cris_gdbarch_init): Likewise.
10329 * ft32-tdep.c (ft32_gdbarch_init): Likewise.
10330 * lm32-tdep.c (lm32_gdbarch_init): Likewise.
10331 * m32r-tdep.c (m32r_gdbarch_init): Likewise.
10332 * m68hc11-tdep.c (m68hc11_gdbarch_init): Likewise.
10333 * mep-tdep.c (mep_gdbarch_init): Likewise.
10334 * microblaze-tdep.c (microblaze_gdbarch_init): Likewise.
10335 * mips-tdep.c (mips_gdbarch_init): Likewise.
10336 * mn10300-tdep.c (mn10300_gdbarch_init): Likewise.
10337 * moxie-tdep.c (moxie_gdbarch_init): Likewise.
10338 * msp430-tdep.c (msp430_gdbarch_init): Likewise.
10339 * sh64-tdep.c (sh64_gdbarch_init): Likewise.
10340 * v850-tdep.c (v850_gdbarch_init): Likewise.
10341
7a3929c4
YQ
103422017-05-24 Yao Qi <yao.qi@linaro.org>
10343
10344 * selftest-arch.c (tests_with_arch): Call registers_changed
10345 and reinit_frame_cache.
10346 * selftest.c (run_self_tests): Likewise.
10347
f4985dba
YQ
103482017-05-24 Yao Qi <yao.qi@linaro.org>
10349
10350 * rs6000-tdep.c (gdb_print_insn_powerpc): Remove.
10351 (rs6000_gdbarch_init): Don't call set_gdbarch_print_insn.
10352
ab20fa4a
YQ
103532017-05-24 Yao Qi <yao.qi@linaro.org>
10354
10355 * rl78-tdep.c (rl78_gdbarch_init): Don't call
10356 set_gdbarch_print_insn.
10357
f532ab94
YQ
103582017-05-24 Yao Qi <yao.qi@linaro.org>
10359
10360 * h8300-tdep.c (h8300_gdbarch_init): Don't call
10361 set_gdbarch_print_insn.
10362
39503f82
YQ
103632017-05-24 Yao Qi <yao.qi@linaro.org>
10364
10365 * alpha-tdep.c (alpha_gdbarch_init): Don't call
10366 set_gdbarch_print_insn.
10367 * arc-tdep.c (arc_gdbarch_init): Likewise.
10368 * arch-utils.c: include dis-asm.h.
10369 (default_print_insn): New function.
10370 * arch-utils.h (default_print_insn): Declare.
10371 * avr-tdep.c (avr_gdbarch_init): Don't call set_gdbarch_print_insn.
10372 * bfin-tdep.c (bfin_gdbarch_init): Likewise.
10373 * cris-tdep.c (cris_delayed_get_disassembler): Remove.
10374 (cris_gdbarch_init): Don't call set_gdbarch_print_insn.
10375 * frv-tdep.c (frv_gdbarch_init): Likewise.
10376 * ft32-tdep.c (ft32_gdbarch_init): Likewise.
10377 * gdbarch.sh (print_insn): Use default_print_insn.
10378 * gdbarch.c: Regenerated.
10379 * hppa-tdep.c (hppa_gdbarch_init): Likewise.
10380 * iq2000-tdep.c (iq2000_gdbarch_init): Likewise.
10381 * lm32-tdep.c (lm32_gdbarch_init): Likewise.
10382 * m32c-tdep.c (m32c_gdbarch_init): Likewise.
10383 * m32r-tdep.c (m32r_gdbarch_init): Likewise.
10384 * m68hc11-tdep.c (gdb_print_insn_m68hc11): Remove.
10385 (m68hc11_gdbarch_init): Don't call set_gdbarch_print_insn.
10386 * m68k-tdep.c (m68k_gdbarch_init): Likewise.
10387 * m88k-tdep.c (m88k_gdbarch_init): Likewise.
10388 * microblaze-tdep.c (microblaze_gdbarch_init): Likewise.
10389 * mn10300-tdep.c (mn10300_gdbarch_init): Likewise.
10390 * moxie-tdep.c (moxie_gdbarch_init): Likewise.
10391 * msp430-tdep.c (msp430_gdbarch_init): Likewise.
10392 * mt-tdep.c (mt_gdbarch_init): Likewise.
10393 * nds32-tdep.c (nds32_gdbarch_init): Likewise.
10394 * nios2-tdep.c (nios2_print_insn): Remove.
10395 (nios2_gdbarch_init): Don't call set_gdbarch_print_insn.
10396 * rx-tdep.c (rx_gdbarch_init): Likewise.
10397 * s390-linux-tdep.c (s390_gdbarch_init): Likewise.
10398 * score-tdep.c (score_print_insn): Remove.
10399 (score_gdbarch_init): Don't call set_gdbarch_print_insn.
10400 * sh-tdep.c (sh_gdbarch_init): Likewise.
10401 * sh64-tdep.c (sh64_gdbarch_init): Likewise.
10402 * sparc-tdep.c (sparc32_gdbarch_init): Likewise.
10403 * tic6x-tdep.c (tic6x_print_insn): Remove.
10404 (tic6x_gdbarch_init): Don't call set_gdbarch_print_insn.
10405 * tilegx-tdep.c (tilegx_gdbarch_init): Likewise.
10406 * v850-tdep.c (v850_gdbarch_init): Likewise.
10407 * vax-tdep.c (vax_gdbarch_init): Likewise.
10408 * xstormy16-tdep.c (xstormy16_gdbarch_init): Likewise.
10409 * xtensa-tdep.c (xtensa_gdbarch_init): Likewise.
10410
f7241d4f
JB
104112017-05-23 John Baldwin <jhb@FreeBSD.org>
10412
10413 * mips-fbsd-tdep.c (MIPS_PC_REGNUM): Remove.
10414 (MIPS_FP0_REGNUM): Remove.
10415 (MIPS_FSR_REGNUM): Remove.
10416 (mips_fbsd_supply_fpregs): Use mips_regnum.
10417 (mips_fbsd_supply_gregs): Likewise.
10418 (mips_fbsd_collect_fpregs): Likewise.
10419 (mips_fbsd_collect_gregs): Likewise.
10420
d489d81d
JB
104212017-05-23 John Baldwin <jhb@FreeBSD.org>
10422
10423 * mips-fbsd-nat.c (getregs_supplies): Fix upper bound comparison.
10424 (getpfpregs_supplies): New function.
10425 (mips_fbsd_fetch_inferior_registers): Remove early exit and use
10426 getfpregs_supplies.
10427 (mips_fbsd_store_inferior_registers): Likewise.
10428
e11b3cdc
PA
104292017-05-22 Pedro Alves <palves@redhat.com>
10430
10431 * MAINTAINERS (Host/Native): Add John Baldwin as FreeBSD
10432 maintainer.
10433
0f068fb5
AH
104342017-05-22 Alan Hayward <alan.hayward@arm.com>
10435
10436 * ppc-linux-nat.c (fetch_register): Use PPC_MAX_REGISTER_SIZE.
10437 (store_register): Likewise.
10438 * ppc-sysv-tdep.c (ppc_sysv_abi_push_dummy_call): Likewise.
10439 (get_decimal_float_return_value): Likewise.
10440 (do_ppc_sysv_return_value): Likewise.
10441 (ppc64_sysv_abi_push_integer): Likewise.
10442 (ppc64_sysv_abi_push_freg): Likewise.
10443 (ppc64_sysv_abi_return_value_base): Likewise.
10444 (ppc64_sysv_abi_return_value): Likewise.
10445 * rs6000-aix-tdep.c (rs6000_push_dummy_call): Likewise.
10446 * rs6000-lynx178-tdep.c (rs6000_lynx178_push_dummy_call): Likewise.
10447 * rs6000-nat.c: Likewise.
10448 * rs6000-tdep.c (rs6000_register_to_value): Likewise.
10449 (rs6000_value_to_register): Likewise.
10450 * ppc-tdep.h (PPC_MAX_REGISTER_SIZE): Add.
10451
e6cf65f2
TT
104522017-05-21 Tom Tromey <tom@tromey.com>
10453
10454 PR rust/21466:
10455 * rust-lang.c (rust_print_type) <TYPE_CODE_ARRAY>: Print unsized
10456 arrays as "[T]", not "[T; ]".
10457
43cc5389
TT
104582017-05-19 Tom Tromey <tom@tromey.com>
10459
10460 PR rust/21484:
10461 * rust-lang.c (exp_descriptor_rust): New function.
10462 (rust_language_defn): Use it.
10463 * p-lang.c (pascal_language_defn): Update.
10464 * opencl-lang.c (opencl_language_defn): Update.
10465 * objc-lang.c (objc_language_defn): Update.
10466 * m2-lang.c (m2_language_defn): Update.
10467 * language.h (struct language_defn)
10468 <la_watch_location_expression>: New member.
10469 * language.c (unknown_language_defn, auto_language_defn)
10470 (local_language_defn): Update.
10471 * go-lang.c (go_language_defn): Update.
10472 * f-lang.c (f_language_defn): Update.
10473 * d-lang.c (d_language_defn): Update.
10474 * c-lang.h (c_watch_location_expression): Declare.
10475 * c-lang.c (c_watch_location_expression): New function.
10476 (c_language_defn, cplus_language_defn, asm_language_defn)
10477 (minimal_language_defn): Use it.
10478 * breakpoint.c (watch_command_1): Call
10479 la_watch_location_expression.
10480 * ada-lang.c (ada_language_defn): Update.
10481
7a6e7fcc
RO
104822017-05-19 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
10483
6e7e1744
RO
10484 PR tui/21482
10485 * gdb_curses.h (NOMACROS): Define.
10486 (NCURSES_NOMACROS): Define.
10487
104882017-05-19 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
10489
10490 PR tui/21482
7a6e7fcc
RO
10491 * tui/tui-windata.c (tui_erase_data_content): Cast last mvwaddstr
10492 arg to char *.
10493 * tui/tui-wingeneral.c (box_win): Likewise.
10494 * tui/tui-winsource.c (tui_erase_source_content): Likewise.
10495 (tui_show_source_line): Likewise.
10496 (tui_show_exec_info_content): Likewise.
10497
1933fd8e
VM
104982017-05-19 Vladimir Mezentsev <vladimir.mezentsev@oracle.com>
10499
10500 * sparc-tdep.c (sparc_structure_return_p)
10501 (sparc_arg_on_registers_p): New functions.
10502 (sparc32_store_arguments): Use them.
10503 * sparc64-tdep.c (sparc64_16_byte_align_p)
10504 (sparc64_store_floating_fields, sparc64_extract_floating_fields):
10505 Handle TYPE_CODE_ARRAY.
10506
21873064
YQ
105072017-05-17 Yao Qi <yao.qi@linaro.org>
10508
10509 * cli/cli-decode.c (add_alias_cmd): New function.
10510 * command.h (add_alias_cmd): Declare.
10511 * infcmd.c (_initialize_infcmd): Don't call add_com_alias,
10512 instead call add_alias_cmd.
10513
2b351b19
PA
105142017-05-17 Pedro Alves <palves@redhat.com>
10515
10516 * Makefile.in (nat_extra_makefile_frag): Rename to ...
10517 (nat_makefile_frag): ... this. All references updated.
10518 * configure.ac: Likewise.
10519 * configure.nat: Likewise. Enhance comments.
10520 * configure: Regenerate.
10521
5f2ad7a3
RO
105222017-05-15 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
10523
10524 * procfs.c (procfs_create_inferior): Change prototype to match
10525 definition.
10526
adf3dde5
EZ
105272017-05-13 Eli Zaretskii <eliz@gnu.org>
10528
10529 * tui/tui.c (tui_enable): Cast "unknown" to 'char *' to avoid a
10530 C++ compiler warning.
10531
6830f270
TT
105322017-05-12 Tom Tromey <tom@tromey.com>
10533
10534 PR rust/21483:
10535 * rust-lang.c (rust_evaluate_subexp) <STRUCTOP_STRUCT>: Don't
10536 recurse, just call value_struct_elt directly.
10537
68f2f2e3
TT
105382017-05-12 Tom Tromey <tom@tromey.com>
10539
10540 * rust-lang.c (rust_dump_subexp_body) <STRUCTOP_ANONYMOUS,
10541 OP_RUST_ARRAY>: Fix.
10542
256afbc2
TT
105432017-05-12 Tom Tromey <tom@tromey.com>
10544
10545 * rust-lang.c (rust_print_subexp): Replace "return" with "break".
10546
94bb8dfe
YQ
105472017-05-09 Yao Qi <yao.qi@linaro.org>
10548
10549 * regcache.c: Include <forward_list>.
10550 (struct regcache_list): Remove.
10551 (current_regcache): Update.
10552 (get_thread_arch_aspace_regcache): Update for std::forward_list.
10553 (regcache_thread_ptid_changed): Likewise.
10554 (registers_changed_ptid): Likewise.
10555 (current_regcache_size): Likewise.
10556
8248946c
YQ
105572017-05-09 Yao Qi <yao.qi@linaro.org>
10558
10559 * regcache.c [GDB_SELF_TEST]: Include selftest.h.
10560 (current_regcache_size): New function.
10561 (current_regcache_test): New function.
10562 (_initialize_regcache) [GDB_SELF_TEST]: Register the unit test.
10563
313c5961
AH
105642017-05-08 Alan Hayward <alan.hayward@arm.com>
10565
10566 * mips-tdep.c (mips_o32_return_value): Remove unused buffer.
10567 (print_gp_register_row): Use get_frame_register_value.
10568
27bfc1d1
AH
105692017-05-08 Alan Hayward <alan.hayward@arm.com>
10570
10571 * mips-linux-tdep.c (mips_supply_gregset): Use raw_supply_zeroed.
10572 (mips_supply_fpregset): Likewise.
10573 (mips64_supply_gregset): Likewise.
10574
146e6c5c
AH
105752017-05-08 Alan Hayward <alan.hayward@arm.com>
10576
10577 * mn10300-linux-tdep.c (am33_supply_gregset_method): Use
10578 regcache->raw_supply_zeroed.
10579
e50f25ec
SDJ
105802017-05-06 Sergio Durigan Junior <sergiodj@redhat.com>
10581
10582 * configure.nat: Rearrange 'case' statements to match
10583 host before cpu.
10584
21ea5acd
SDJ
105852017-05-06 Sergio Durigan Junior <sergiodj@redhat.com>
10586
10587 * Makefile.in: Remove "@host_makefile_frag@". Add variables
10588 NAT_FILE, NATDEPFILES, NAT_CDEPS, LOADLIBES, MH_CFLAGS, XM_CLIBS,
10589 NAT_GENERATED_FILES, HAVE_NATIVE_GCORE_HOST. Add
10590 "@nat_extra_makefile_frag@".
10591 (Makefile): Remove dependency on "@frags@".
10592 ($(GNULIB_BUILDDIR)/Makefile): Likewise.
10593 (data-directory/Makefile): Likewise.
10594 * config/aarch64/linux.mh: Deleted; moved contents to
10595 "gdb/configure.nat".
10596 * config/alpha/alpha-linux.mh: Likewise.
10597 * config/alpha/nbsd.mh: Likewise.
10598 * config/arm/linux.mh: Likewise.
10599 * config/arm/nbsdelf.mh: Likewise.
10600 * config/i386/cygwin.mh: Likewise.
10601 * config/i386/cygwin64.mh: Likewise.
10602 * config/i386/darwin.mh: Likewise.
10603 * config/i386/fbsd.mh: Likewise.
10604 * config/i386/fbsd64.mh: Likewise.
10605 * config/i386/go32.mh: Likewise.
10606 * config/i386/i386gnu.mh: Likewise.
10607 * config/i386/i386sol2.mh: Likewise.
10608 * config/i386/linux.mh: Likewise.
10609 * config/i386/linux64.mh: Likewise.
10610 * config/i386/mingw.mh: Likewise.
10611 * config/i386/mingw64.mh: Likewise.
10612 * config/i386/nbsd64.mh: Likewise.
10613 * config/i386/nbsdelf.mh: Likewise.
10614 * config/i386/nto.mh: Likewise.
10615 * config/i386/obsd.mh: Likewise.
10616 * config/i386/obsd64.mh: Likewise.
10617 * config/i386/sol2-64.mh: Likewise.
10618 * config/ia64/linux.mh: Likewise.
10619 * config/m32r/linux.mh: Likewise.
10620 * config/m68k/linux.mh: Likewise.
10621 * config/m68k/nbsdelf.mh: Likewise.
10622 * config/m68k/obsd.mh: Likewise.
10623 * config/m88k/obsd.mh: Likewise.
10624 * config/mips/fbsd.mh: Likewise.
10625 * config/mips/linux.mh: Likewise.
10626 * config/mips/nbsd.mh: Likewise.
10627 * config/mips/obsd64.mh: Likewise.
10628 * config/pa/linux.mh: Likewise.
10629 * config/pa/nbsd.mh: Likewise.
10630 * config/pa/obsd.mh: Likewise.
10631 * config/powerpc/aix.mh: Likewise.
10632 * config/powerpc/fbsd.mh: Likewise.
10633 * config/powerpc/linux.mh: Likewise.
10634 * config/powerpc/nbsd.mh: Likewise.
10635 * config/powerpc/obsd.mh: Likewise.
10636 * config/powerpc/ppc64-linux.mh: Likewise.
10637 * config/powerpc/spu-linux.mh: Likewise.
10638 * config/s390/linux.mh: Likewise.
10639 * config/sh/nbsd.mh: Likewise.
10640 * config/sparc/fbsd.mh: Likewise.
10641 * config/sparc/linux.mh: Likewise.
10642 * config/sparc/linux64.mh: Likewise.
10643 * config/sparc/nbsd64.mh: Likewise.
10644 * config/sparc/nbsdelf.mh: Likewise.
10645 * config/sparc/obsd64.mh: Likewise.
10646 * config/sparc/sol2.mh: Likewise.
10647 * config/tilegx/linux.mh: Likewise.
10648 * config/vax/nbsdelf.mh: Likewise.
10649 * config/vax/obsd.mh: Likewise.
10650 * config/xtensa/linux.mh: Likewise.
10651 * config/i386/i386gnu.mn: New file, with excerpts from
10652 "config/i386/i386gnu.mh".
10653 * configure: Regenerate.
10654 * configure.ac: Rewrite code to use "gdb/configure.nat" instead of
10655 *.mh files under "gdb/config".
10656 * configure.nat: New file, with contents from the
10657 "gdb/config/*/*.mh" files.
10658
7ed1acaf
TW
106592017-05-05 Tim Wiederhake <tim.wiederhake@intel.com>
10660
10661 * btrace.c (btrace_clear): Free insn vector.
10662
e13cb306
PA
106632017-05-05 Pedro Alves <palves@redhat.com>
10664
10665 * warning.m4 (build_warnings): Add -Wno-error=maybe-uninitialized.
10666 * configure: Regenerate.
10667
5ed8105e
PA
106682017-05-04 Pedro Alves <palves@redhat.com>
10669
10670 * Makefile.in (SFILES): Add progspace-and-thread.c.
10671 (HFILES_NO_SRCDIR): Add progspace-and-thread.h.
10672 (COMMON_OBS): Add progspace-and-thread.o.
10673 * breakpoint.c: Include "progspace-and-thread.h".
10674 (update_inserted_breakpoint_locations)
10675 (insert_breakpoint_locations, create_longjmp_master_breakpoint):
10676 Use scoped_restore_current_pspace_and_thread.
10677 (create_std_terminate_master_breakpoint): Use
10678 scoped_restore_current_program_space.
10679 (remove_breakpoint): Use scoped_restore_current_pspace_and_thread.
10680 (print_breakpoint_location): Use
10681 scoped_restore_current_program_space.
10682 (bp_loc_is_permanent): Use
10683 scoped_restore_current_pspace_and_thread.
10684 (resolve_sal_pc): Use scoped_restore_current_pspace_and_thread.
10685 (download_tracepoint_locations): Use
10686 scoped_restore_current_pspace_and_thread.
10687 (breakpoint_re_set): Use scoped_restore_current_pspace_and_thread.
10688 * exec.c (exec_close_1): Use scoped_restore_current_program_space.
10689 (enum step_over_calls_kind): Moved from inferior.h.
10690 (class scoped_restore_current_thread): New class.
10691 * gdbthread.h (make_cleanup_restore_current_thread): Delete
10692 declaration.
10693 (scoped_restore_current_thread): New class.
10694 * infcmd.c: Include "common/gdb_optional.h".
10695 (continue_1, proceed_after_attach): Use
10696 scoped_restore_current_thread.
10697 (notice_new_inferior): Use scoped_restore_current_thread.
10698 * inferior.c: Include "progspace-and-thread.h".
10699 (restore_inferior, save_current_inferior): Delete.
10700 (add_inferior_command, clone_inferior_command): Use
10701 scoped_restore_current_pspace_and_thread.
10702 * inferior.h (scoped_restore_current_inferior): New class.
10703 * infrun.c: Include "progspace-and-thread.h" and
10704 "common/gdb_optional.h".
10705 (follow_fork_inferior): Use
10706 scoped_restore_current_pspace_and_thread.
10707 (scoped_restore_exited_inferior): New class.
10708 (handle_vfork_child_exec_or_exit): Use
10709 scoped_restore_exited_inferior,
10710 scoped_restore_current_pspace_and_thread,
10711 scoped_restore_current_thread and scoped_restore.
10712 (fetch_inferior_event): Use scoped_restore_current_thread.
10713 * linespec.c (decode_line_full, decode_line_1): Use
10714 scoped_restore_current_program_space.
10715 * mi/mi-main.c: Include "progspace-and-thread.h".
10716 (exec_continue): Use scoped_restore_current_thread.
10717 (mi_cmd_exec_run): Use scoped_restore_current_pspace_and_thread.
10718 (mi_cmd_trace_frame_collected): Use scoped_restore_current_thread.
10719 * proc-service.c (ps_pglobal_lookup): Use
10720 scoped_restore_current_program_space.
10721 * progspace-and-thread.c: New file.
10722 * progspace-and-thread.h: New file.
10723 * progspace.c (release_program_space, clone_program_space): Use
10724 scoped_restore_current_program_space.
10725 (restore_program_space, save_current_program_space)
10726 (save_current_space_and_thread): Delete.
10727 (switch_to_program_space_and_thread): Moved to
10728 progspace-and-thread.c.
10729 * progspace.h (save_current_program_space)
10730 (save_current_space_and_thread): Delete declarations.
10731 (scoped_restore_current_program_space): New class.
10732 * remote.c (remote_btrace_maybe_reopen): Use
10733 scoped_restore_current_thread.
10734 * symtab.c: Include "progspace-and-thread.h".
10735 (skip_prologue_sal): Use scoped_restore_current_pspace_and_thread.
10736 * thread.c (print_thread_info_1): Use
10737 scoped_restore_current_thread.
10738 (struct current_thread_cleanup): Delete.
10739 (do_restore_current_thread_cleanup)
10740 (restore_current_thread_cleanup_dtor): Rename/convert both to ...
10741 (scoped_restore_current_thread::~scoped_restore_current_thread):
10742 ... this new dtor.
10743 (make_cleanup_restore_current_thread): Rename/convert to ...
10744 (scoped_restore_current_thread::scoped_restore_current_thread):
10745 ... this new ctor.
10746 (thread_apply_all_command): Use scoped_restore_current_thread.
10747 (thread_apply_command): Use scoped_restore_current_thread.
10748 * tracepoint.c (tdump_command): Use scoped_restore_current_thread.
10749 * varobj.c (value_of_root_1): Use scoped_restore_current_thread.
10750
f6223dbb
PA
107512017-05-04 Pedro Alves <palves@redhat.com>
10752
10753 * thread.c (make_cleanup_restore_current_thread): Move
10754 find_thread_ptid call before the is_stopped call. Assert that the
10755 thread is found. Replace is_stopped call by checking the thread's
10756 state directly. Remove unnecessary NULL-thread check.
10757
3c3ae77e
PA
107582017-05-04 Pedro Alves <palves@redhat.com>
10759
10760 * corelow.c (thread_section_name): New class.
10761 (get_core_register_section, get_core_siginfo): Use it.
10762
45eba0ab
AA
107632017-05-04 Andreas Arnez <arnez@linux.vnet.ibm.com>
10764
10765 * corelow.c (sniff_core_bfd): Remove extra semicolon.
10766 (get_core_register_section): Remove xfree of NULL pointer.
10767
f81fdd35
AH
107682017-05-03 Alan Hayward <alan.hayward@arm.com>
10769
10770 * frv-linux-tdep.c (frv_linux_supply_gregset): Use raw_supply_zeroed.
10771 * regcache.c (regcache::raw_supply_zeroed): New function.
10772 * regcache.h (regcache::raw_supply_zeroed): New declaration.
10773
35837774
SM
107742017-05-03 Simon Marchi <simon.marchi@ericsson.com>
10775
10776 * gdbarch.sh: Remove commented out definition of
10777 TARGET_CHAR_BIT.
10778 * gdbarch.h: Re-generate.
10779
c94fee56
SDJ
107802017-05-03 Sergio Durigan Junior <sergiodj@redhat.com>
10781
10782 * configure: Regenerate.
10783
d17f7b36
SM
107842017-05-02 Simon Marchi <simon.marchi@ericsson.com>
10785
10786 * solib-target.c (solib_target_relocate_section_addresses):
10787 Remove num_section_bases, num_bases, segment_bases variables.
10788
b560ebd6
SM
107892017-05-02 Simon Marchi <simon.marchi@polymtl.ca>
10790
10791 * common/gdb_vecs.h (DEF_VEC_I (CORE_ADDR)): Remove.
10792
f2f46dfc
SM
107932017-05-02 Simon Marchi <simon.marchi@polymtl.ca>
10794
10795 * solib-target.c: Include <vector>
10796 (struct lm_info_target) <~lm_info_target>: Remove.
10797 <segment_bases, section_bases>: Change type to
10798 std::vector<CORE_ADDR>.
10799 (library_list_start_segment, library_list_start_section,
10800 library_list_end_library,
10801 solib_target_relocate_section_addresses): Adjust.
10802
a0ff9e1a
SM
108032017-05-02 Simon Marchi <simon.marchi@polymtl.ca>
10804
10805 * gdbarch.sh (software_single_step): Change return type to
10806 std::vector<CORE_ADDR>.
10807 * gdbarch.c, gdbarch.h: Re-generate.
10808 * arch/arm-get-next-pcs.c (thumb_deal_with_atomic_sequence_raw):
10809 Adjust.
10810 (arm_deal_with_atomic_sequence_raw): Adjust.
10811 (thumb_get_next_pcs_raw): Adjust.
10812 (arm_get_next_pcs_raw): Adjust.
10813 (arm_get_next_pcs): Adjust.
10814 * arch/arm-get-next-pcs.h (arm_get_next_pcs): Adjust.
10815 * aarch64-tdep.c (aarch64_software_single_step): Adjust.
10816 * alpha-tdep.c (alpha_deal_with_atomic_sequence): Adjust.
10817 (alpha_software_single_step): Adjust.
10818 * alpha-tdep.h (alpha_software_single_step): Adjust.
10819 * arm-linux-tdep.c (arm_linux_software_single_step): Adjust.
10820 * arm-tdep.c (arm_software_single_step): Adjust.
10821 (arm_breakpoint_kind_from_current_state): Adjust.
10822 * arm-tdep.h (arm_software_single_step): Adjust.
10823 * breakpoint.c (insert_single_step_breakpoint): Adjust.
10824 * cris-tdep.c (cris_software_single_step): Adjust.
10825 * mips-tdep.c (mips_deal_with_atomic_sequence): Adjust.
10826 (micromips_deal_with_atomic_sequence): Adjust.
10827 (deal_with_atomic_sequence): Adjust.
10828 (mips_software_single_step): Adjust.
10829 * mips-tdep.h (mips_software_single_step): Adjust.
10830 * moxie-tdep.c (moxie_software_single_step): Adjust.
10831 * nios2-tdep.c (nios2_software_single_step): Adjust.
10832 * ppc-tdep.h (ppc_deal_with_atomic_sequence): Adjust.
10833 * rs6000-aix-tdep.c (rs6000_software_single_step): Adjust.
10834 * rs6000-tdep.c (ppc_deal_with_atomic_sequence): Adjust.
10835 * s390-linux-tdep.c (s390_software_single_step): Adjust.
10836 * sparc-tdep.c (sparc_software_single_step): Adjust.
10837 * spu-tdep.c (spu_software_single_step): Adjust.
10838 * tic6x-tdep.c (tic6x_software_single_step): Adjust.
10839
ea480a30
SM
108402017-05-02 Simon Marchi <simon.marchi@polymtl.ca>
10841
10842 * gdbarch.sh: Use semi-colon as field separator instead of colon.
10843 * gdbarch.h: Re-generate.
10844
d050f7d7
TW
108452017-05-01 Tim Wiederhake <tim.wiederhake@intel.com>
10846
10847 * Makefile.in (SUBDIR_PYTHON_OBS): Add py-instruction.o.
10848 (SUBDIR_PYTHON_SRCS): Add py-instruction.c.
10849 * python/py-instruction.c, python/py-instruction.h: New file.
10850 * python/py-record.c: Add py-instruction.h include.
10851 (gdbpy_initialize_record): Make gdb.Instruction a super class of
10852 gdb.RecordInstruction.
10853 * python/python-internal.h: Add gdbpy_initialize_instruction
10854 declaration.
10855 * python/python.c (do_start_initialization): Add
10856 gdbpy_initialize_instruction.
10857
14f819c8
TW
108582017-05-01 Tim Wiederhake <tim.wiederhake@intel.com>
10859
10860 * python/py-record-btrace.c (BTPY_REQUIRE_VALID_CALL, btpy_call_type):
10861 Remove.
10862 (btrace_func_from_recpy_func): New function.
10863 (btpy_call_new, btpy_number, btpy_hash, btpy_richcompare): Remove.
10864 (btpy_call_level, btpy_call_symbol, btpy_call_instructions,
10865 btpy_call_up, btpy_call_prev_sibling, btpy_call_next_sibling): Rename to ...
10866 (recpy_bt_func_level, recpy_bt_func_symbol, recpy_bt_func_instructions,
10867 recpy_bt_func_up, recpy_bt_func_prev, recpy_bt_func_next): This.
10868 Also, use new helper functions.
10869 (btpy_list_item): Use new helper functions.
10870 (recpy_bt_function_call_history): Use new type name.
10871 (btpy_call_getset): Remove.
10872 (gdbpy_initialize_btrace): Remove code to initialize
10873 gdb.BtraceFunctionCall.
10874 * python/py-record-btrace.h (recpy_bt_func_number, recpy_btb_func_level,
10875 recpy_btb_func_symbol, recpy_bt_func_instructions, recpy_bt_func_up,
10876 recpy_bt_func_prev, recpy_bt_func_next): New export.
10877 * python/py-record.c (recpy_func_type): New static object.
10878 (recpy_func_new, recpy_func_level, recpy_func_symbol,
10879 recpy_func_instructions, recpy_func_up, recpy_func_prev,
10880 recpy_func_next): New function.
10881 (recpy_element_hash, recpy_element_richcompare): Updated comment.
10882 (recpy_func_getset): New static object.
10883 (gdbpy_initialize_record): Add code to initialize gdb.RecordInstruction.
10884 * python/py-record.h (recpy_func_type, recpy_func_new): New export.
10885
0ed5da75
TW
108862017-05-01 Tim Wiederhake <tim.wiederhake@intel.com>
10887
10888 * python/py-record-btrace.c (BTPY_REQUIRE_VALID_INSN): Remove.
10889 (btpy_object, btpy_insn_type, btpy_new): Remove.
10890 (btpy_list_object): Use gdb.RecordInstruction type instead of
10891 gdb.BtraceInstruction type.
10892 (btrace_insn_from_recpy_insn): New function.
10893 (btpy_insn_or_gap_new): Adjust comment. Use recpy_insn_new instead of
10894 btpy_new.
10895 (btpy_call_new, btpy_list_item): Do not use btpy_new anymore.
10896 (btpy_number, btpy_hash, btpy_call_level, btpy_call_symbol,
10897 btpy_call_instructions, btpy_call_up, btpy_call_prev_sibling,
10898 btpy_call_next_sibling, btpy_richcompare): Use recpy_element_object
10899 instead of btpy_object.
10900 (btpy_insn_sal, btpy_insn_pc, btpy_insn_size, btpy_insn_is_speculative,
10901 btpy_insn_data, btpy_insn_decode): Rename to ...
10902 (recpy_bt_insn_sal, recpy_bt_insn_pc, recpy_bt_insn_size,
10903 recpy_bt_insn_is_speculative, recpy_bt_insn_data,
10904 recpy_bt_insn_decode): This. Also, use new helper functions.
10905 (btpy_list_position, recpy_bt_goto): Use recpy_element_object and
10906 recpy_insn_type.
10907 (btpy_insn_getset): Remove.
10908 (gdbpy_initialize_btrace): Remove code to initialize
10909 gdb.BtraceInstruction. Use recpy_element_object.
10910 * python/py-record-btrace.h (recpy_bt_insn_number, recpy_bt_insn_sal,
10911 recpy_bt_insn_pc, recpy_bt_insn_data, recpy_bt_insn_decoded,
10912 recpy_bt_insn_size, recpy_bt_insn_is_speculative): New export.
10913 * python/py-record.c (recpy_insn_type): New static object.
10914 (recpy_insn_new, recpy_insn_sal, recpy_insn_pc, recpy_insn_data,
10915 recpy_insn_decoded, recpy_insn_size, recpy_insn_is_speculative,
10916 recpy_element_number, recpy_element_hash, recpy_element_richcompare):
10917 New function.
10918 (recpy_insn_getset): New static object.
10919 (gdbpy_initialize_record): Initialize gdb.RecordInstruction.
10920 * python/py-record.h (recpy_element_object): New typedef.
10921 (recpy_insn_type, recpy_insn_new): New export.
10922
913aeadd
TW
109232017-05-01 Tim Wiederhake <tim.wiederhake@intel.com>
10924
10925 * py-record-btrace.c (btpy_insn_new): Removed.
10926 (btpy_insn_or_gap_new): New function.
10927 (btpy_insn_error): Removed.
10928 (btpy_insn_sal, btpy_insn_pc, btpy_insn_size, btpy_insn_is_speculative,
10929 btpy_insn_data, btpy_insn_decode): Remove code path for gaps.
10930 (recpy_bt_replay_position, recpy_bt_begin, recpy_bt_end): Call
10931 btpy_insn_or_gap_new instead of btpy_insn_new.
10932 (btpy_insn_getset): Remove btpy_insn_error.
10933 * py-record.c (recpy_gap_type): New static object.
10934 (recpy_gap_object): New typedef.
10935 (recpy_gap_new, recpy_gap_number, recpy_gap_reason_code,
10936 recpy_gap_reason_string): New function.
10937 (recpy_gap_getset): New static object.
10938 (gdbpy_initialize_record): Initialize gdb.RecordGap type.
10939 * py-record.h (recpy_gap_new): New export.
10940
a3be24ad
TW
109412017-05-01 Tim Wiederhake <tim.wiederhake@intel.com>
10942
10943 * python/py-record.c (recpy_ptid): Remove.
10944 (recpy_record_getset): Remove recpy_ptid.
10945
ae20e79a
TW
109462017-05-01 Tim Wiederhake <tim.wiederhake@intel.com>
10947
10948 * btrace.c (btrace_fetch): Set inferior_ptid.
10949 * python/py-record-btrace.c: Add "py-record.h" include.
10950 (recpy_bt_format, recpy_bt_replay_position, recpy_bt_begin,
10951 recpy_bt_end, recpy_bt_instruction_history,
10952 recpy_bt_function_call_history, recpy_bt_goto): Use ptid stored
10953 in gdb.Record object instead of current ptid.
10954 * python/py-record.c: Include new "py-record.h" file.
10955 (recpy_record_object): Moved to py-record.h.
10956 * python/py-record.h: New file.
10957
8d0050ea
TW
109582017-05-01 Tim Wiederhake <tim.wiederhake@intel.com>
10959
10960 * python/py-record-btrace.c (BTPY_REQUIRE_VALID_INSN,
10961 BTPY_REQUIRE_VALID_CALL, recpy_bt_function_call_history): Fix
10962 indentation.
10963
3f380b50
JB
109642017-05-01 Joel Brobecker <brobecker@adacore.com>
10965
10966 * MAINTAINERS: Move Daniel Jacobowitz and Mark Kettenis to
10967 the past maintainers section.
10968
07495424
YQ
109692017-04-28 Yao Qi <yao.qi@linaro.org>
10970
10971 * infcmd.c (get_return_value): Use regcache ctor, and remove
10972 cleanup.
10973
deb1fa3e
YQ
109742017-04-28 Yao Qi <yao.qi@linaro.org>
10975 Pedro Alves <palves@redhat.com>
10976
10977 * regcache.c (regcache::regcache): New tag dispatch ctor.
10978 (do_cooked_read): Moved above.
10979 (regcache_dup): Use the tag dispatch ctor..
10980 * regcache.h (regcache): Declare ctor, delete copy ctor and
10981 assignment operator, remove friend regcache_dup.
10982
b421c83c
YQ
109832017-04-28 Yao Qi <yao.qi@linaro.org>
10984
10985 * regcache.c (regcache_dup): Assert !src->m_readonly_p and
10986 call method save instead of regcache_cpy.
10987 * regcache.h (struct regcache): Make regcache_dup a friend.
10988
ef79d9a3
YQ
109892017-04-28 Yao Qi <yao.qi@linaro.org>
10990
10991 * regcache.c (struct regcache): Move to regcache.h
10992 (regcache::arch): New method.
10993 (regcache_get_ptid): Update.
10994 (get_regcache_arch): Call arch method.
10995 (get_regcache_aspace): Call method aspace.
10996 (register_buffer): Change it to method.
10997 (regcache_save): Change it to regcache::save.
10998 (regcache_restore): Likewise.
10999 (regcache_cpy_no_passthrough): Remove the declaration.
11000 (regcache_cpy): Call methods restore and cpy_no_passthrough.
11001 (regcache_cpy_no_passthrough): Change it to method
11002 cpy_no_passthrough.
11003 (regcache_register_status): Change it to method
11004 get_register_status.
11005 (regcache_invalidate): Change it to method invalidate.
11006 (regcache_thread_ptid_changed): Use methods ptid and set_ptid.
11007 (regcache_raw_update): Change it to method raw_update.
11008 (regcache_raw_read): Likewise.
11009 (regcache_raw_read_signed): Likewise.
11010 (regcache_raw_read_unsigned): Likewise.
11011 (regcache_raw_write_signed): Likewise.
11012 (regcache_raw_write_unsigned): Likewise.
11013 (regcache_cooked_read): Likewise.
11014 (regcache_cooked_read_value): Likewise.
11015 (regcache_cooked_read_signed): Likewise.
11016 (regcache_cooked_read_unsigned): Likewise.
11017 (regcache_cooked_write_signed): Likewise.
11018 (regcache_cooked_write_unsigned): Likewise.
11019 (regcache_raw_set_cached_value): Likewise.
11020 (regcache_raw_write): Likewise.
11021 (regcache_cooked_write): Likewise.
11022 (regcache_xfer_part): Likewise.
11023 (regcache_raw_read_part): Likewise.
11024 (regcache_raw_write_part): Likewise.
11025 (regcache_cooked_read_part): Likewise.
11026 (regcache_cooked_write_part): Likewise.
11027 (regcache_raw_supply): Likewise.
11028 (regcache_raw_collect): Likewise.
11029 (regcache_transfer_regset): Likewise.
11030 (regcache_supply_regset): Likewise.
11031 (regcache_collect_regset): Likewise.
11032 (regcache_debug_print_register): Likewise.
11033 (enum regcache_dump_what): Move it to regcache.h.
11034 (regcache_dump): Change it to method dump.
11035 * regcache.h (enum regcache_dump_what): New.
11036 (class regcache): New.
11037 * target.c (target_fetch_registers): Call method
11038 debug_print_register.
11039 (target_store_registers): Likewise.
11040
f8fdb78e
SM
110412017-04-28 Simon Marchi <simon.marchi@ericsson.com>
11042
11043 * windows-nat.c (struct lm_info_windows): Initialize field.
11044 (windows_make_so): Allocate lm_info_windows with new.
11045 (windows_free_so): Free lm_info_windows with delete.
11046
9ccbfd7b
SM
110472017-04-28 Simon Marchi <simon.marchi@ericsson.com>
11048
11049 * solib-darwin.c (struct lm_info_darwin): Initialize field.
11050 (darwin_current_sos): Allocate lm_info_darwin with new, remove
11051 cleanup.
11052 (darwin_free_so): Free lm_info_darwin with delete.
11053
76e75227
SM
110542017-04-28 Simon Marchi <simon.marchi@ericsson.com>
11055
11056 * solib-svr4.h (struct lm_info_svr4): Initialize fields.
11057 <l_addr_p>: Change type to bool.
11058 * solib-svr4.c (lm_info_read): Allocate lm_info_svr4 with new.
11059 (svr4_free_so): Free lm_info_svr4 with delete.
11060 (svr4_copy_library_list): Replace memcpy with call to copy
11061 constructor.
11062 (library_list_start_library, svr4_default_sos): Allocate
11063 lm_info_svr4 with new.
11064
51046d9e
SM
110652017-04-28 Simon Marchi <simon.marchi@ericsson.com>
11066
11067 * solib-target.c (struct lm_info_target): Add destructor,
11068 initialize fields.
11069 <name>: Change type to std::string.
11070 (library_list_start_library): Allocate lm_info_target with new.
11071 (solib_target_free_library_list): Free lm_info_target with
11072 delete.
11073 (solib_target_current_sos): Adapt to std::string.
11074 (solib_target_free_so): Free lm_info_target with delete.
11075
4023ae76
SM
110762017-04-28 Simon Marchi <simon.marchi@ericsson.com>
11077
11078 * solib-frv.c (struct lm_info_frv): Add destructor, initialize
11079 fields.
11080 (frv_current_sos): Allocate lm_info_frv with new.
11081 (frv_relocate_main_executable): Free lm_info_frv with delete,
11082 allocate with new.
11083 (frv_clear_solib, frv_free_so): Free lm_info_frv with delete.
11084
af43057b
SM
110852017-04-28 Simon Marchi <simon.marchi@ericsson.com>
11086
11087 * solib-frv.c (struct lm_info_frv): Fix indentation.
11088
b0911207
SM
110892017-04-28 Simon Marchi <simon.marchi@ericsson.com>
11090
11091 * solib-dsbt.c (struct lm_info_dsbt): Add destructor, initialize
11092 map field.
11093 (dsbt_current_sos): Allocate lm_info_dsbt with new.
11094 (dsbt_relocate_main_executable): Free lm_info_dsbt with delete
11095 and allocate with new.
11096 (dsbt_clear_solib, dsbt_free_so): Free lm_info_dsbt with delete.
11097
6c401f72
SM
110982017-04-28 Simon Marchi <simon.marchi@ericsson.com>
11099
11100 * solib-aix.c (struct lm_info_aix): Initialize fields in-class.
11101 <filename, member_name>: Change type to std::string.
11102 (solib_aix_new_lm_info, solib_aix_xfree_lm_info): Remove.
11103 (library_list_start_library): Allocate lm_info_aix with new.
11104 (solib_aix_free_library_list, solib_aix_free_so): Free with delete.
11105 (solib_aix_current_sos): Adapt to std::string, copy lm_info_aix
11106 with copy constructor.
11107
d0e449a1
SM
111082017-04-28 Simon Marchi <simon.marchi@ericsson.com>
11109
11110 * solist.h (struct lm_info): Remove.
11111 (struct lm_info_base): New class.
11112 (struct so_list) <lm_info>: Change type to lm_info_base *.
11113 * nto-tdep.c (struct lm_info): Remove.
11114 (lm_addr): Adjust.
11115 * solib-aix.c (struct lm_info): Rename to ...
11116 (struct lm_info_aix): ... this. Extend lm_info_base.
11117 (lm_info_p): Rename to ...
11118 (lm_info_aix_p): ... this, and adjust.
11119 (solib_aix_new_lm_info, solib_aix_xfree_lm_info,
11120 solib_aix_parse_libraries, library_list_start_library,
11121 solib_aix_free_library_list, solib_aix_parse_libraries,
11122 solib_aix_get_library_list,
11123 solib_aix_relocate_section_addresses, solib_aix_free_so,
11124 solib_aix_get_section_offsets,
11125 solib_aix_solib_create_inferior_hook, solib_aix_current_sos):
11126 Adjust.
11127 (struct solib_aix_inferior_data) <library_list>: Adjust.
11128 * solib-darwin.c (struct lm_info): Rename to ...
11129 (struct lm_info_darwin): ... this. Extend lm_info_base.
11130 (darwin_current_sos, darwin_relocate_section_addresses): Adjust.
11131 * solib-dsbt.c (struct lm_info): Rename to ...
11132 (struct lm_info_dsbt): ... this. Extend lm_info_base.
11133 (struct dsbt_info) <main_executable_lm_info): Adjust.
11134 (dsbt_current_sos, dsbt_relocate_main_executable, dsbt_free_so,
11135 dsbt_relocate_section_addresses): Adjust.
11136 * solib-frv.c (struct lm_info): Rename to ...
11137 (struct lm_info_frv): ... this. Extend lm_info_base.
11138 (main_executable_lm_info): Adjust.
11139 (frv_current_sos, frv_relocate_main_executable, frv_free_so,
11140 frv_relocate_section_addresses, frv_fdpic_find_global_pointer,
11141 find_canonical_descriptor_in_load_object,
11142 frv_fdpic_find_canonical_descriptor): Adjust.
11143 * solib-svr4.c (struct lm_info): Move to solib-svr4.h, renamed
11144 to lm_info_svr4.
11145 (lm_info_read, lm_addr_check, svr4_keep_data_in_core,
11146 svr4_clear_so, svr4_copy_library_list,
11147 library_list_start_library, svr4_default_sos, svr4_read_so_list,
11148 svr4_current_sos, svr4_fetch_objfile_link_map,
11149 solist_update_incremental): Adjust.
11150 * solib-svr4.h (struct lm_info_svr4): Move here from
11151 solib-svr4.c.
11152 * solib-target.c (struct lm_info): Rename to ...
11153 (struct lm_info_target): ... this. Extend lm_info_base.
11154 (lm_info_p): Rename to ...
11155 (lm_info_target_p): ... this.
11156 (solib_target_parse_libraries, library_list_start_segment,
11157 library_list_start_section, library_list_start_library,
11158 library_list_end_library, solib_target_free_library_list,
11159 solib_target_current_sos, solib_target_free_so,
11160 solib_target_relocate_section_addresses): Adjust.
11161 * windows-nat.c (struct lm_info): Rename to ...
11162 (struct lm_info_windows): ... this. Extend lm_info_base.
11163 (windows_make_so, handle_load_dll, handle_unload_dll,
11164 windows_xfer_shared_libraries): Adjust.
11165
434a4023
SM
111662017-04-28 Simon Marchi <simon.marchi@ericsson.com>
11167
11168 * solib-darwin.c (struct darwin_so_list): Remove.
11169 (darwin_current_sos): Allocate an so_list object instead of a
11170 darwin_so_list, separately allocate an lm_info object.
11171 (darwin_free_so): Free lm_info.
11172
428544e8
JB
111732017-04-28 John Baldwin <jhb@FreeBSD.org>
11174
11175 * mips-tdep.c (print_gp_register_row): Replace printf_filtered
11176 with fprintf_filtered.
11177
4621115f
YQ
111782017-04-28 Yao Qi <yao.qi@linaro.org>
11179
11180 * regcache.c (regcache::regcache): New function.
11181 (regcache::~regcache): New function.
11182 (regcache_xmalloc_1): Remove.
11183 (regcache_xmalloc): Call new regcache.
11184 (regcache_xfree): Call delete regcache.
11185 (get_thread_arch_aspace_regcache): Call new regcache.
11186
339053c2
YQ
111872017-04-28 Yao Qi <yao.qi@linaro.org>
11188
11189 * mips-linux-nat.c (mips_linux_new_thread): Use ptid method
11190 lwp instead of ptid_get_lwp.
11191
7974a605
YQ
111922017-04-28 Yao Qi <yao.qi@linaro.org>
11193
11194 * mips-linux-nat.c (mips_linux_new_thread): Get lwpid from
11195 lwp_info instead of getting from inferior_ptid.
11196
e15c3eb4
KS
111972017-04-27 Keith Seitz <keiths@redhat.com>
11198
11199 * gdbtypes.c (LVALUE_REFERENCE_TO_RVALUE_BINDING_BADNESS)
11200 DIFFERENT_REFERENCE_TYPE_BADNESS): Remove.
11201 (CV_CONVERSION_BADNESS): Define.
11202 (rank_one_type): Remove overly restrictive rvalue reference
11203 rank checks.
11204 Add cv-qualifier checks and subranks for type equality.
11205 * gdbtypes.h (REFERENCE_CONVERSION_RVALUE,
11206 REFERENCE_CONVERSION_CONST_LVALUE, CV_CONVERSION_BADNESS,
11207 CV_CONVERSION_CONST, CV_CONVERSION_VOLATILE): Declare.
11208
72bc1d24
SM
112092017-04-27 Simon Marchi <simon.marchi@ericsson.com>
11210
11211 * python/py-inferior.c (inferior_to_inferior_object): Increment reference
11212 count when creating the object.
11213
55bcecda
UW
112142017-04-27 Sangamesh Mallayya <sangamesh.swamy@in.ibm.com>
11215 Ulrich Weigand <uweigand@de.ibm.com>
11216
11217 * xcoffread.c (read_xcoff_symtab): Read correct function auxiliary
11218 entry if xlc -qfuncsect or gcc -ffunction-sections compiler option
11219 is used in AIX.
11220 (read_xcoff_symtab): Handle C_WEAKEXT storage class.
11221 (process_xcoff_symbol): Likewise.
11222 (scan_xcoff_symtab): Likewise.
11223
5c99fcf8
AH
112242017-04-26 Alan Hayward <alan.hayward@arm.com>
11225
11226 * ia64-tdep.c (examine_prologue): Use get_frame_register_unsigned.
11227 (ia64_sigtramp_frame_prev_register): Use read_memory_unsigned_integer.
11228 (ia64_access_reg): Use get_frame_register_unsigned.
11229 (ia64_access_rse_reg): Likewise.
11230 (ia64_libunwind_frame_prev_register): Likewise.
11231
b41c5a85
JW
112322017-04-26 Jiong Wang <jiong.wang@arm.com>
11233
11234 * gdbarch.sh: New gdbarch method execute_dwarf_cfa_vendor_op.
11235 * gdbarch.c: Regenerated.
11236 * gdbarch.h: Regenerated.
11237 * dwarf2-frame.c (dwarf2_frame_state_alloc_regs): Made the
11238 visibility external.
11239 (execute_cfa_program): Call execute_dwarf_cfa_vendor_op for CFI
11240 between DW_CFA_lo_user and DW_CFA_high_user inclusive.
11241 (enum cfa_how_kind): Move to ...
11242 (struct dwarf2_frame_state_reg_info): Likewise.
11243 (struct dwarf2_frame_state): Likewise.
11244 * dwarf2-frame.h: ... here.
11245 (dwarf2_frame_state_alloc_regs): New declaration.
11246 * sparc-tdep.c (sparc_execute_dwarf_cfa_vendor_op): New function.
11247 (sparc32_gdbarch_init): Register execute_dwarf_cfa_vendor_op hook.
11248
c185f580
AH
112492017-04-26 Alan Hayward <alan.hayward@arm.com>
11250
11251 * xtensa-tdep.c (xtensa_pseudo_register_read): Use
11252 regcache_raw_read_unsigned.
11253 (xtensa_pseudo_register_write): Likewise.
11254
19c45594
AH
112552017-04-26 Alan Hayward <alan.hayward@arm.com>
11256
11257 * nds32-tdep.c (nds32_pseudo_register_read): Abort on errors.
11258 (nds32_pseudo_register_write): Likewise.
11259
4658f12e
YQ
112602017-04-25 Yao Qi <yao.qi@linaro.org>
11261
11262 * regcache.c (struct regcache) <readonly_p>: Change its type
11263 to bool.
11264 (regcache_xmalloc_1): Update parameter type and callers update.
11265
d581dda8
YQ
112662017-04-25 Yao Qi <yao.qi@linaro.org>
11267
11268 * aarch64-tdep.c (aarch64_gdbarch_init): Don't call
11269 set_gdbarch_wchar_bit.
11270 * arm-tdep.c (arm_gdbarch_init): Likewise.
11271
debed3db
PA
112722017-04-25 Pedro Alves <palves@redhat.com>
11273
11274 * common/poison.h [!HAVE_IS_TRIVIALLY_COPYABLE] (IsRelocatable)
11275 (BothAreRelocatable, memcopy, memmove): Don't define.
11276 * common/traits.h (__has_feature, HAVE_IS_TRIVIALLY_COPYABLE): New
11277 macros.
11278
b0b92aeb
PA
112792017-04-25 Pedro Alves <palves@redhat.com>
11280
11281 * common/common-defs.h: Include "common/poison.h".
11282 * common/function-view.h: (Not, Or, Requires): Move to traits.h
11283 and adjust.
11284 * common/poison.h: New file.
11285 * common/traits.h: Include <type_traits>.
11286 (Not, Or, Requires): New, moved from common/function-view.h.
11287
16c4d54a
PA
112882017-04-25 Pedro Alves <palves@redhat.com>
11289
11290 * breakpoint.h (struct breakpoint): In-class initialize all
11291 fields. Make boolean fields "bool".
11292 * breakpoint.c (init_raw_breakpoint_without_location): Remove
11293 memset call and initializations no longer necessary.
11294
b5c36682
PA
112952017-04-25 Pedro Alves <palves@redhat.com>
11296
11297 * btrace.c (pt_btrace_insn_flags): Change parameter type to
11298 reference.
11299 (pt_btrace_insn): New function.
11300 (ftrace_add_pt): Remove memset call and use pt_btrace_insn.
11301
5625a286
PA
113022017-04-25 Pedro Alves <palves@redhat.com>
11303
11304 * ada-lang.c (ada_catchpoint_location): Now a "class". Remove
11305 "base" field and inherit from "bp_location" instead. Add
11306 non-default ctor.
11307 (allocate_location_exception): Use new non-default ctor.
11308 * breakpoint.c (get_first_locp_gte_addr): Remove memset call.
11309 (init_bp_location): Convert to ...
11310 (bp_location::bp_location): ... this new ctor, and remove memset
11311 call.
11312 (base_breakpoint_allocate_location): Use the new non-default ctor.
11313 * breakpoint.h (bp_location): Now a class. Declare default and
11314 non-default ctors. In-class initialize all members.
11315 (init_bp_location): Remove declaration.
11316
23bcc18f
PA
113172017-04-25 Pedro Alves <palves@redhat.com>
11318
11319 * common/enum-flags.h (enum_flags): Don't implement copy ctor and
11320 assignment operator.
11321
e1ba3053
YQ
113222017-04-24 Yao Qi <yao.qi@linaro.org>
11323
11324 * doublest.c (convert_doublest_to_floatformat): Call
11325 floatformat_totalsize_bytes.
11326
10f489e5
TT
113272017-04-22 Tom Tromey <tom@tromey.com>
11328
11329 * mi/mi-cmd-file.c (mi_cmd_file_list_shared_libraries): Use
11330 ui_out_emit_list.
11331 * stack.c (print_frame): Use ui_out_emit_list.
11332 * mi/mi-symbol-cmds.c (mi_cmd_symbol_list_lines): Use
11333 ui_out_emit_list.
11334 * mi/mi-main.c (print_one_inferior)
11335 (mi_cmd_data_list_register_names)
11336 (mi_cmd_data_list_register_values, mi_cmd_list_features)
11337 (mi_cmd_list_target_features, mi_cmd_trace_frame_collected): Use
11338 ui_out_emit_list.
11339 * mi/mi-interp.c (mi_on_normal_stop_1): Use ui_out_emit_list.
11340 (mi_output_solib_attribs): Use ui_out_emit_list,
11341 ui_out_emit_tuple.
11342 * mi/mi-cmd-var.c (varobj_update_one): Use ui_out_emit_list.
11343 * mi/mi-cmd-stack.c (mi_cmd_stack_list_frames)
11344 (mi_cmd_stack_list_args, list_args_or_locals): Use
11345 ui_out_emit_list.
11346 * disasm.c (do_assembly_only): Use ui_out_emit_list.
11347 * breakpoint.c (print_solib_event, output_thread_groups): Use
11348 ui_out_emit_list.
11349
0092b74d
TT
113502017-04-22 Tom Tromey <tom@tromey.com>
11351
11352 * mi/mi-main.c (print_variable_or_computed): Use ui_out_emit_tuple.
11353 * mi/mi-cmd-var.c (varobj_update_one): Use ui_out_emit_tuple.
11354 * mi/mi-cmd-stack.c (list_arg_or_local): Use ui_out_emit_tuple.
11355
a14a62dd
TT
113562017-04-22 Tom Tromey <tom@tromey.com>
11357
11358 * tracepoint.c (tvariables_info_1)
11359 (print_one_static_tracepoint_marker): Use ui_out_emit_tuple.
11360
46b9c129
TT
113612017-04-22 Tom Tromey <tom@tromey.com>
11362
11363 * stack.c (print_frame_arg): Use ui_out_emit_tuple,
11364 annotate_arg_emitter.
11365 * breakpoint.c (print_mention_watchpoint)
11366 (print_mention_masked_watchpoint): Use ui_out_emit_tuple.
11367 * annotate.h (struct annotate_arg_emitter): New.
11368
2e783024
TT
113692017-04-22 Tom Tromey <tom@tromey.com>
11370
11371 * record-btrace.c (record_btrace_insn_history)
11372 (record_btrace_insn_history_range, record_btrace_call_history)
11373 (record_btrace_call_history_range): Use ui_out_emit_tuple.
11374 * thread.c (do_captured_list_thread_ids, print_thread_info_1): Use
11375 ui_out_emit_tuple.
11376 * stack.c (print_frame_info): Use ui_out_emit_tuple.
11377 * solib.c (info_sharedlibrary_command): Use ui_out_emit_tuple.
11378 * skip.c (skip_info): Use ui_out_emit_tuple.
11379 * remote.c (show_remote_cmd): Use ui_out_emit_tuple.
11380 * progspace.c (print_program_space): Use ui_out_emit_tuple.
11381 * probe.c (info_probes_for_ops): Use ui_out_emit_tuple.
11382 * osdata.c (info_osdata): Use ui_out_emit_tuple.
11383 * mi/mi-symbol-cmds.c (mi_cmd_symbol_list_lines): Use
11384 ui_out_emit_tuple.
11385 * mi/mi-main.c (print_one_inferior, list_available_thread_groups)
11386 (output_register, mi_cmd_data_read_memory)
11387 (mi_cmd_data_read_memory_bytes, mi_load_progress)
11388 (mi_cmd_trace_frame_collected): Use ui_out_emit_tuple.
11389 * mi/mi-cmd-var.c (mi_cmd_var_list_children, varobj_update_one):
11390 Use ui_out_emit_tuple.
11391 * mi/mi-cmd-stack.c (mi_cmd_stack_list_args): Use
11392 ui_out_emit_tuple.
11393 * mi/mi-cmd-info.c (mi_cmd_info_ada_exceptions)
11394 (mi_cmd_info_gdb_mi_command): Use ui_out_emit_tuple.
11395 * linux-thread-db.c (info_auto_load_libthread_db): Use
11396 ui_out_emit_tuple.
11397 * inferior.c (print_inferior): Use ui_out_emit_tuple.
11398 * gdb_bfd.c (print_one_bfd): Use ui_out_emit_tuple.
11399 * disasm.c (do_mixed_source_and_assembly_deprecated)
11400 (do_mixed_source_and_assembly): Use ui_out_emit_tuple.
11401 * cp-abi.c (list_cp_abis): Use ui_out_emit_tuple.
11402 * cli/cli-setshow.c (cmd_show_list): Use ui_out_emit_tuple.
11403 * breakpoint.c (print_one_breakpoint_location)
11404 (print_one_breakpoint): Use ui_out_emit_tuple.
11405 * auto-load.c (print_script, info_auto_load_cmd): Use
11406 ui_out_emit_tuple.
11407 * ada-tasks.c (print_ada_task_info): Use ui_out_emit_tuple.
11408
9be21bb4
SM
114092017-04-21 Simon Marchi <simon.marchi@ericsson.com>
11410
11411 * thread.c (print_thread_info_1): Remove dead code.
11412
0d4c07af
JK
114132017-04-21 Jan Kratochvil <jan.kratochvil@redhat.com>
11414
11415 * aarch64-tdep.c (selftests::aarch64_process_record_test): Make it #if
11416 GDB_SELF_TEST.
11417 * arm-tdep.c (selftests::arm_record_test): Likewise.
11418
4daf993d
YQ
114192017-04-21 Yao Qi <yao.qi@linaro.org>
11420
11421 * regcache.c (regcache_restore): Remove argument 2. Replace
11422 argument 3 with regcache. Get register status from
11423 src->register_status and get register contents from
11424 register_buffer (src, regnum).
11425 (regcache_cpy): Update.
11426
a6c21d4a
PA
114272017-04-19 Pedro Alves <palves@redhat.com>
11428
11429 * gdbthread.h (thread): Add missing closing parenthesis in
11430 comment.
11431
3a3fd0fd
PA
114322017-04-19 Pedro Alves <palves@redhat.com>
11433
11434 * common/refcounted-object.h: New file.
11435 * gdbthread.h: Include "common/refcounted-object.h".
11436 (thread_info): Inherit from refcounted_object and add comments.
11437 (thread_info::incref, thread_info::decref)
11438 (thread_info::m_refcount): Delete.
11439 (thread_info::deletable): Use the refcounted_object::refcount()
11440 method.
11441 * inferior.c (current_inferior_): Add comment.
11442 (set_current_inferior): Increment/decrement refcounts.
11443 (prune_inferiors, remove_inferior_command): Skip inferiors marked
11444 not-deletable instead of comparing with the current inferior.
11445 (initialize_inferiors): Increment the initial inferior's refcount.
11446 * inferior.h (struct inferior): Forward declare.
11447 Include "common/refcounted-object.h".
11448 (current_inferior, set_current_inferior): Move declaration to
11449 before struct inferior's definition, and fix comment.
11450 (inferior): Inherit from refcounted_object. Add comments.
11451 * thread.c (switch_to_thread_no_regs): Reference the thread's
11452 inferior pointer directly instead of doing a ptid lookup.
11453 (switch_to_no_thread): New function.
11454 (switch_to_thread(thread_info *)): New function, factored out
11455 from ...
11456 (switch_to_thread(ptid_t)): ... this.
11457 (restore_current_thread): Delete.
11458 (current_thread_cleanup): Remove 'inf_id' and 'was_removable'
11459 fields, and add 'inf' field.
11460 (do_restore_current_thread_cleanup): Check whether old->inf is
11461 alive instead of looking up an inferior by ptid. Use
11462 switch_to_thread and switch_to_no_thread.
11463 (restore_current_thread_cleanup_dtor): Use old->inf directly
11464 instead of lookup up an inferior by id. Decref the inferior.
11465 Don't restore 'removable'.
11466 (make_cleanup_restore_current_thread): Same the inferior pointer
11467 in old, instead of the inferior number. Incref the inferior.
11468 Don't save/clear 'removable'.
11469
9bcb1f16
PA
114702017-04-19 Pedro Alves <palves@redhat.com>
11471
11472 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
11473 unittests/scoped_restore-selftests.c.
11474 (SUBDIR_UNITTESTS_OBS): Add scoped_restore-selftests.o.
11475 * common/scoped_restore.h (scoped_restore_base): Make "class".
11476 (scoped_restore_base::release): New public method.
11477 (scoped_restore_base::scoped_restore_base): New protected ctor.
11478 (scoped_restore_base::m_saved_var): New protected field.
11479 (scoped_restore_tmpl::scoped_restore_tmpl(T*)): Initialize the
11480 scoped_restore_base base class instead of m_saved_var directly.
11481 (scoped_restore_tmpl::scoped_restore_tmpl(T*, T2)): Likewise.
11482 (scoped_restore_tmpl::scoped_restore_tmpl(const
11483 scoped_restore_tmpl<T>&)): Likewise.
11484 (scoped_restore_tmpl::~scoped_restore_tmpl): Use the saved_var
11485 method.
11486 (scoped_restore_tmpl::saved_var): New method.
11487 (scoped_restore_tmpl::m_saved_var): Delete.
11488 * inferior.h (inferior::detaching): Now a bool.
11489 * infrun.c (prepare_for_detach): Use a scoped_restore instead of a
11490 cleanup.
11491 * unittests/scoped_restore-selftests.c: New file.
11492
26fcd539
PA
114932017-04-19 Pedro Alves <palves@redhat.com>
11494
11495 * Makefile.in (SUBDIR_UNITTESTS_SRCS, SUBDIR_UNITTESTS_OBS):
11496 Re-sort in alphabetic order.
11497
fdd243b0
PA
114982017-04-18 Pedro Alves <palves@redhat.com>
11499
11500 * xml-support.c (obstack_xml_printf): Delete.
11501 * xml-support.h (obstack_xml_printf): Delete.
11502
4895cde2
PA
115032017-04-18 Pedro Alves <palves@redhat.com>
11504
11505 * xml-support.c (gdb_xml_parser) <use_dtd, dtd_name, parse,
11506 vdebug, verror, body_text, start_element, end_element, name,
11507 user_data, set_is_xinclude, set_error, expat_parser>: New methods.
11508 <name, user_data, expat_parser, scopes, error, last_line, dtd_name,
11509 is_xinclude>: Make private and add m_ prefix.
11510 (gdb_xml_parser::body_text): New method, based on ...
11511 (gdb_xml_body_text): ... this. Adjust.
11512 (gdb_xml_parser::vdebug): New method, based on ...
11513 (gdb_xml_debug): ... this. Adjust.
11514 (gdb_xml_parser::verror): New method, based on ...
11515 (gdb_xml_error): ... this. Adjust.
11516 (gdb_xml_parser::start_element): New method, based on ...
11517 (gdb_xml_start_element): ... this. Adjust.
11518 (gdb_xml_start_element_wrapper): Defer to
11519 gdb_xml_parser::start_element and gdb_xml_parser::set_error.
11520 (gdb_xml_parser::end_element): New method, based on ...
11521 (gdb_xml_end_element_wrapper): ... this. Adjust.
11522 (gdb_xml_parser::~gdb_xml_parser): Adjust.
11523 (gdb_xml_parser::gdb_xml_parser): Adjust to field renames.
11524 (gdb_xml_parser::use_dtd): New method, based on ...
11525 (gdb_xml_use_dtd): ... this. Adjust.
11526 (gdb_xml_parser::parse): New method, based on ...
11527 (gdb_xml_parse): ... this. Adjust.
11528 (gdb_xml_parse_quick): Adjust to call the parser's parse method.
11529 (xinclude_start_include): Adjust to call the parser's name method.
11530 (xml_xinclude_default, xml_xinclude_start_doctype)
11531 (xml_xinclude_end_doctype): Adjust to call the parser's user_data
11532 method.
11533 (xml_process_xincludes): Adjust to call parser methods.
11534 * xml-support.h (gdb_xml_use_dtd, gdb_xml_parse): Delete
11535 declarations.
11536
bd8a901f
PA
115372017-04-18 Pedro Alves <palves@redhat.com>
11538
11539 * tracefile-tfile.c (tfile_write_tdesc): Adjust to use
11540 gdb::optional<std::string>.
11541 * xml-support.c: Include <string>.
11542 (scope_level::scope_level(scope_level &&))
11543 (scope_level::~scope_level): Delete.
11544 (scope_level::body): Now a std::string.
11545 (gdb_xml_body_text, gdb_xml_end_element): Adjust.
11546 (xinclude_parsing_data::xinclude_parsing_data): Add 'output'
11547 parameter.
11548 (xinclude_parsing_data::~xinclude_parsing_data): Delete.
11549 (xinclude_parsing_data::output): Now a std::string reference.
11550 (xinclude_start_include): Adjust.
11551 (xml_xinclude_default): Adjust.
11552 (xml_process_xincludes): Add 'output' parameter, and return bool.
11553 * xml-support.h (xml_process_xincludes): Add 'output' parameter,
11554 and return bool.
11555 * xml-tdesc.c: Include <unordered_map> and <string>.
11556 (tdesc_xml_cache): Delete.
11557 (tdesc_xml_cache_s): Delete.
11558 (xml_cache): Now an std::unordered_map.
11559 (tdesc_parse_xml): Adjust to use std::string and unordered_map.
11560 (target_fetch_description_xml): Change return type to
11561 gdb::optional<std::string>, and adjust.
11562 * xml-tdesc.h: Include "common/gdb_optional.h" and <string>.
11563 (target_fetch_description_xml): Change return type to
11564 gdb::optional<std::string>.
11565
d35d1958
PA
115662017-04-18 Pedro Alves <palves@redhat.com>
11567
11568 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
11569 unittests/optional-selftests.c.
11570 (SUBDIR_UNITTESTS_OBS): Add optional-selftests.o.
11571 * unittests/optional-selftests.c: New file.
11572 * unittests/optional/assignment/1.cc: New file.
11573 * unittests/optional/assignment/2.cc: New file.
11574 * unittests/optional/assignment/3.cc: New file.
11575 * unittests/optional/assignment/4.cc: New file.
11576 * unittests/optional/assignment/5.cc: New file.
11577 * unittests/optional/assignment/6.cc: New file.
11578 * unittests/optional/assignment/7.cc: New file.
11579 * unittests/optional/cons/copy.cc: New file.
11580 * unittests/optional/cons/default.cc: New file.
11581 * unittests/optional/cons/move.cc: New file.
11582 * unittests/optional/cons/value.cc: New file.
11583 * unittests/optional/in_place.cc: New file.
11584 * unittests/optional/observers/1.cc: New file.
11585 * unittests/optional/observers/2.cc: New file.
11586
22796e97
PA
115872017-04-18 Pedro Alves <palves@redhat.com>
11588
11589 * common/gdb_optional.h: Include common/traits.h.
11590 (in_place_t): New type.
11591 (in_place): New constexpr variable.
11592 (optional::optional): Remove member initialization of
11593 m_instantiated.
11594 (optional::optional(in_place_t...)): New constructor.
11595 (optional::~optional): Use reset.
11596 (optional::optional(const optional&)): New.
11597 (optional::optional(const optional&&)): New.
11598 (optional::optional(T &)): New.
11599 (optional::optional(T &&)): New.
11600 (operator::operator=(const optional &)): New.
11601 (operator::operator=(optional &&)): New.
11602 (operator::operator= (const T &))
11603 (operator::operator= (T &&))
11604 (operator::emplace (Args &&... args)): Return a T&. Use reset.
11605 (operator::reset): New.
11606 (operator::m_instantiated):: Add in-class initializer.
11607 * common/traits.h: Include <type_traits>.
11608 (struct And): New types.
11609
a7fc9b61
PA
116102017-04-18 Pedro Alves <palves@redhat.com>
11611
11612 * xml-support.c: Include <vector>.
11613 (scope_level::scope_level(const gdb_xml_element *))
11614 (scope_level::scope_level(scope_level&&)): New.
11615 (scope_level::~scope_level): New.
11616 (scope_level_s): Delete.
11617 (gdb_xml_parser::scopes): Now a std::vector.
11618 (gdb_xml_body_text, gdb_xml_start_element, gdb_xml_end_element):
11619 Use std::vector.
11620 (gdb_xml_parser::~gdb_xml_parser): Remove now unnecessary
11621 scope cleanup code.
11622 (gdb_xml_parser::gdb_xml_parser): Remove explicit initialization
11623 of the scopes member. Use std::vector::emplace_back.
11624
010151c9
PA
116252017-04-18 Pedro Alves <palves@redhat.com>
11626
11627 * xml-support.c (gdb_xml_parser): Add ctor/dtor. Make is_xinclude
11628 a bool.
11629 (gdb_xml_end_element): Change type of first parameter.
11630 (gdb_xml_cleanup): Rename to ...
11631 (gdb_xml_parser::~gdb_xml_parser): ... this.
11632 (gdb_xml_create_parser_and_cleanup): Delete with ...
11633 (gdb_xml_parser::gdb_xml_parser): ... creation parts factored out
11634 to this new ctor.
11635 (gdb_xml_parse_quick): Create a local gdb_xml_parser instead of
11636 using gdb_xml_create_parser_and_cleanup.
11637 (xinclude_parsing_data): Add ctor/dtor.
11638 (xml_xinclude_cleanup): Delete.
11639 (xml_process_xincludes): Create a local xinclude_parsing_data
11640 instead of heap-allocating one. Create a local gdb_xml_parser
11641 instead of heap-allocating one with
11642 gdb_xml_create_parser_and_cleanup.
11643
d56060f0
JB
116442017-04-18 John Baldwin <jhb@FreeBSD.org>
11645
11646 PR threads/20743
11647 * fbsd-nat.c (resume_one_thread_cb): Remove.
11648 (resume_all_threads_cb): Remove.
11649 (fbsd_resume): Use ALL_NON_EXITED_THREADS instead of
11650 iterate_over_threads.
11651
305d16a9
JB
116522017-04-17 Joel Brobecker <brobecker@adacore.com>
11653
11654 * NEWS: Create a new section for the next release branch.
11655 Rename the section of the current branch, now that it has
11656 been cut.
11657
8bb57231
JB
116582017-04-17 Joel Brobecker <brobecker@adacore.com>
11659
11660 GDB 8.0 branch created (725bf5cf125783c2a7ca4ab63d3768e220bab2db):
11661 * version.in: Bump version to 8.0.50.DATE-git.
11662
096c92dd
SDJ
116632017-04-13 Sergio Durigan Junior <sergiodj@redhat.com>
11664
11665 PR gdb/21385
11666 * windows-nat.c (windows_create_inferior): Declare 'allargs'
11667 independently of the host, and fix build breakage on Cygwin.
11668
0550c955
PA
116692017-04-13 Pedro Alves <palves@redhat.com>
11670
11671 * inferior.c (free_inferior): Convert to ...
11672 (inferior::~inferior): ... this dtor.
11673 (inferior::inferior): New ctor, factored out from ...
11674 (add_inferior_silent): ... here. Allocate the inferior with a new
11675 expression.
11676 (delete_inferior): Call delete instead of free_inferior.
11677 * inferior.h (gdb_environ, continuation): Forward declare.
11678 (inferior): Now a class. Add in-class initialization to all
11679 members. Make boolean fields bool, except 'detaching'.
11680 (inferior::inferior): New explicit ctor.
11681 (inferior::~inferior): New.
11682
e3d60dfc
PA
116832017-04-13 Pedro Alves <palves@redhat.com>
11684
11685 * inferior.c (init_inferior_list): Delete.
11686 * inferior.h (init_inferior_list): Delete.
11687
5fd69d0a
PA
116882017-04-13 Pedro Alves <palves@redhat.com>
11689
11690 PR threads/13217
11691 * gdb.threads/threadapply.exp (thr_apply_detach): New procedure.
11692 (top level): Call it twice, with different thread sets.
11693
c6609450
PA
116942017-04-13 Pedro Alves <palves@redhat.com>
11695
11696 * thread.c: Include <algorithm>.
11697 (thread_array_cleanup): Delete.
11698 (scoped_inc_dec_ref): New class.
11699 (live_threads_count): New function.
11700 (set_thread_refcount): Delete.
11701 (tp_array_compar_ascending): Now a bool.
11702 (tp_array_compar): Convert to a std::sort comparison function.
11703 (thread_apply_all_command): Use std::vector and scoped_inc_dec_ref
11704 and live_threads_count.
11705
2a00d7ce
PA
117062017-04-13 Pedro Alves <palves@redhat.com>
11707
11708 * infrun.c (follow_fork_inferior): Also switch the current
11709 inferior.
11710
441d7c93
PA
117112017-04-13 Pedro Alves <palves@redhat.com>
11712
11713 * breakpoint.c (watch_command_1): Save watchpoint-frame info
11714 before calling create_internal_breakpoint.
11715
808480f6
PA
117162017-04-13 Pedro Alves <palves@redhat.com>
11717
11718 * fork-child.c (execv_argv): New class.
11719 (breakup_args): Refactored as ...
11720 (execv_argv::init_for_no_shell): .. this method of execv_argv.
11721 Copy arguments to storage and replace separators with NULL
11722 terminators in place.
11723 (escape_bang_in_quoted_argument): Adjust to return bool.
11724 (execv_argv::execv_argv): New ctor.
11725 (execv_argv::init_for_shell): New method, factored out from
11726 fork_inferior. Don't strdup strings into the vector.
11727 (fork_inferior): Eliminate "shell" local and use execv_argv. Use
11728 Remove free_vector_argv call.
11729
ad3d022a
YQ
117302017-04-13 Yao Qi <yao.qi@linaro.org>
11731
11732 * rx-tdep.c (rx_fpsw_type): Check tdep->rx_fpsw_type instead of
11733 tdep->rx_psw_type.
11734
e6ddc3bf
YQ
117352017-04-13 Yao Qi <yao.qi@linaro.org>
11736
11737 * rl78-tdep.c (rl78_gdbarch_init): Use XCNEW instead of XNEW.
11738 * rx-tdep.c (rx_gdbarch_init): Likewise.
11739
bfb8cf90
PA
117402017-04-13 Pedro Alves <palves@redhat.com>
11741
11742 * breakpoint.h (struct breakpoint): Reindent.
11743
f5336ca5
PA
117442017-04-13 Pedro Alves <palves@redhat.com>
11745
11746 * breakpoint.c (bp_location): Rename to ...
11747 (bp_locations): ... this. All references updated.
11748 (bp_location_count): Rename to ...
11749 (bp_locations_count): ... this. All references updated.
11750 (bp_location_placed_address_before_address_max): Rename to ...
11751 (bp_locations_placed_address_before_address_max): ... this. All
11752 references updated.
11753 (bp_location_shadow_len_after_address_max): Rename to ...
11754 (bp_locations_shadow_len_after_address_max): ... this. All
11755 references updated.
11756 (bp_location_compare_addrs): Rename to ...
11757 (bp_locations_compare_addrs): ... this. All references updated.
11758 (bp_location_compare):Rename to ...
11759 (bp_locations_compare): ... this. All references updated.
11760 (bp_location_target_extensions_update): Rename to ...
11761 (bp_locations_target_extensions_update): ... this. All references
11762 updated.
11763
be628ab8
SDJ
117642017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
11765
11766 * Makefile.in (HFILES_NO_SRCDIR): Add "common/gdb_termios.h".
11767 * common/common.m4: Check headers 'termios.h', 'termio.h' and
11768 'sgtty.h'.
11769 * common/gdb_termios.h: New file, with parts of "terminal.h".
11770 * inflow.c: Include "gdb_termios.h".
11771 * ser-unix.c: Include "gdb_termios.h".
11772 * terminal.h: Move terminal-related defines to
11773 "common/gdb_termios.h".
11774
8e9e35b1
TT
117752017-04-12 Tom Tromey <tom@tromey.com>
11776
11777 * probe.c (parse_probes): Update.
11778 * location.h (delete_event_location): Don't declare.
11779 (event_location_deleter::operator()): Update.
11780 * location.c (event_location_deleter::operator()): Rename from
11781 delete_event_location.
11782 * linespec.h (linespec_result) <location>: Change type to
11783 event_location_up.
11784 * linespec.c (canonicalize_linespec, event_location_to_sals)
11785 (decode_objc): Update.
11786 (linespec_result): Don't call delete_event_location.
11787 * breakpoint.c (create_breakpoints_sal)
11788 (bkpt_probe_create_sals_from_location)
11789 (strace_marker_create_sals_from_location): Update.
11790
16e802b9
TT
117912017-04-12 Tom Tromey <tom@tromey.com>
11792
11793 * linespec.h (struct linespec_result): Add constructor and
11794 destructor.
11795 (init_linespec_result, destroy_linespec_result)
11796 (make_cleanup_destroy_linespec_result): Don't declare.
11797 * linespec.c (init_linespec_result): Remove.
11798 (linespec_result::~linespec_result): Rename from
11799 destroy_linespec_result. Update.
11800 (cleanup_linespec_result, make_cleanup_destroy_linespec_result):
11801 Remove.
11802 * breakpoint.c (create_breakpoint, break_range_command)
11803 (decode_location_default): Update.
11804 * ax-gdb.c (agent_command_1): Update.
11805
d28cd78a
TT
118062017-04-12 Tom Tromey <tom@tromey.com>
11807
11808 * remote.c (remote_download_tracepoint): Update.
11809 * python/py-breakpoint.c (bppy_get_location): Update.
11810 * guile/scm-breakpoint.c (bpscm_print_breakpoint_smob)
11811 (gdbscm_breakpoint_location): Update.
11812 * elfread.c (elf_gnu_ifunc_resolver_return_stop): Update.
11813 * breakpoint.h (struct breakpoint) <location, location_range_end>:
11814 Change type to event_location_up.
11815 * breakpoint.c (create_overlay_event_breakpoint)
11816 (create_longjmp_master_breakpoint)
11817 (create_std_terminate_master_breakpoint)
11818 (create_exception_master_breakpoint)
11819 (breakpoint_event_location_empty_p, print_breakpoint_location)
11820 (print_one_breakpoint_location, create_thread_event_breakpoint)
11821 (init_breakpoint_sal, create_breakpoint)
11822 (print_recreate_ranged_breakpoint, break_range_command)
11823 (init_ada_exception_breakpoint, say_where): Update.
11824 (base_breakpoint_dtor): Don't call delete_event_location.
11825 (bkpt_print_recreate, tracepoint_print_recreate)
11826 (dprintf_print_recreate, update_static_tracepoint)
11827 (breakpoint_re_set_default): Update.
11828
711799d5
TT
118292017-04-12 Tom Tromey <tom@tromey.com>
11830
11831 * compile/compile-loc2c.c (compute_stack_depth_worker): Change
11832 type of "to_do". Update.
11833 (compute_stack_depth): Use std::vector.
11834
52d214d3
TT
118352017-04-12 Tom Tromey <tom@tromey.com>
11836
11837 * printcmd.c (find_instruction_backward): Use std::vector.
11838
4c404b8b
TT
118392017-04-12 Tom Tromey <tom@tromey.com>
11840
11841 * symfile.c (objfilep): Remove typedef.
11842 (reread_symbols): Use a std::vector.
11843
156d9eab
TT
118442017-04-12 Tom Tromey <tom@tromey.com>
11845
11846 * mi/mi-main.c (exec_direction_forward): Remove.
11847 (exec_reverse_continue, mi_execute_command): Use scoped_restore.
11848 * guile/scm-ports.c (ioscm_with_output_to_port_worker): Use
11849 scoped_restore.
11850 * guile/guile.c (guile_repl_command, guile_command)
11851 (gdbscm_execute_gdb_command): Use scoped_restore.
11852 * go-exp.y (go_parse): Use scoped_restore.
11853 * d-exp.y (d_parse): Use scoped_restore.
11854 * cli/cli-decode.c (cmd_func): Use scoped_restore.
11855 * c-exp.y (c_parse): Use scoped_restore.
11856
4d89769a
TT
118572017-04-12 Tom Tromey <tom@tromey.com>
11858
11859 * mi/mi-parse.h (struct mi_parse): Add constructor, destructor.
11860 (mi_parse): Update return type.
11861 (mi_parse_free): Remove.
11862 * mi/mi-parse.c (mi_parse::mi_parse): New constructor.
11863 (mi_parse::~mi_parse): Rename from mi_parse_free.
11864 (mi_parse_cleanup): Remove.
11865 (mi_parse): Return a unique_ptr. Use new.
11866 * mi/mi-main.c (mi_execute_command): Update.
11867
4b217cc7
TT
118682017-04-12 Tom Tromey <tom@tromey.com>
11869
11870 * location.c (explicit_location_lex_one): Return a
11871 unique_xmalloc_ptr.
11872 (string_to_explicit_location): Update. Remove cleanups.
11873
59d3651b
TT
118742017-04-12 Tom Tromey <tom@tromey.com>
11875
11876 * gnu-v3-abi.c (value_and_voffset_p): Remove typedef.
11877 (compare_value_and_voffset): Change type. Update.
11878 (compute_vtable_size): Change type of "offset_vec".
11879 (gnuv3_print_vtable): Use std::vector. Remove cleanups.
11880 (gnuv3_get_typeid): Remove extraneous declaration.
11881
b24b0d6c
TT
118822017-04-12 Tom Tromey <tom@tromey.com>
11883
11884 * charset.h (wchar_iterator): Fix comment.
11885
80a3b8c5
TT
118862017-04-12 Tom Tromey <tom@tromey.com>
11887
11888 * charset.c (iconv_wrapper): New class.
11889 (cleanup_iconv): Remove.
11890 (convert_between_encodings): Use it.
11891
c83dd867
TT
118922017-04-12 Tom Tromey <tom@tromey.com>
11893
11894 * symfile.h (increment_reading_symtab): Update type.
11895 * symfile.c (decrement_reading_symtab): Remove.
11896 (increment_reading_symtab): Return a scoped_restore_tmpl<int>.
11897 * psymtab.c (psymtab_to_symtab): Update.
11898 * dwarf2read.c (dw2_instantiate_symtab): Update.
11899
0e8621a0
TT
119002017-04-12 Tom Tromey <tom@tromey.com>
11901
11902 * jit.c (struct jit_reader): Declare separately. Add constructor
11903 and destructor. Change type of "handle".
11904 (loaded_jit_reader): Define separately.
11905 (jit_reader_load): Update. New "new".
11906 (jit_reader_unload_command): Use "delete".
11907 * gdb-dlfcn.h (struct dlclose_deleter): New.
11908 (gdb_dlhandle_up): New typedef.
11909 (gdb_dlopen, gdb_dlsym): Update types.
11910 (gdb_dlclose): Remove.
11911 * gdb-dlfcn.c (gdb_dlopen): Return a gdb_dlhandle_up.
11912 (gdb_dlsym): Change type of "handle".
11913 (make_cleanup_dlclose): Remove.
11914 (dlclose_deleter::operator()): Rename from gdb_dlclose.
11915 * compile/compile-c-support.c (load_libcc): Update.
11916
67d89901
TT
119172017-04-12 Tom Tromey <tom@tromey.com>
11918
11919 * symtab.h (find_pcs_for_symtab_line): Change return type.
11920 * symtab.c (find_pcs_for_symtab_line): Change return type.
11921 * python/py-linetable.c (build_line_table_tuple_from_pcs): Change
11922 type of "vec". Update.
11923 (ltpy_get_pcs_for_line): Update.
11924 * linespec.c (decode_digits_ordinary): Update.
11925
93921405
TT
119262017-04-12 Tom Tromey <tom@tromey.com>
11927
11928 * tracepoint.c (actions_command): Update.
11929 * python/python.c (python_command, python_interactive_command):
11930 Update.
11931 * mi/mi-cmd-break.c (mi_cmd_break_commands): Update.
11932 * guile/guile.c (guile_command): Update.
11933 * defs.h (read_command_lines, read_command_lines_1): Return
11934 command_line_up.
11935 (command_lines_deleter): New struct.
11936 (command_line_up): New typedef.
11937 * compile/compile.c (compile_code_command)
11938 (compile_print_command): Update.
11939 * cli/cli-script.h (get_command_line, copy_command_lines): Return
11940 command_line_up.
11941 (make_cleanup_free_command_lines): Remove.
11942 * cli/cli-script.c (get_command_line, read_command_lines_1)
11943 (copy_command_lines): Return command_line_up.
11944 (while_command, if_command, read_command_lines, define_command)
11945 (document_command): Update.
11946 (do_free_command_lines_cleanup, make_cleanup_free_command_lines):
11947 Remove.
11948 * breakpoint.h (breakpoint_set_commands): Change type of
11949 "commands".
11950 * breakpoint.c (breakpoint_set_commands): Change type of
11951 "commands". Update.
11952 (do_map_commands_command, update_dprintf_command_list)
11953 (create_tracepoint_from_upload): Update.
11954
ffc2605c
TT
119552017-04-12 Tom Tromey <tom@tromey.com>
11956
11957 * tracepoint.c (scope_info): Update.
11958 * spu-tdep.c (spu_catch_start): Update.
11959 * python/python.c (gdbpy_decode_line): Update.
11960 * python/py-finishbreakpoint.c (bpfinishpy_init): Update.
11961 * python/py-breakpoint.c (bppy_init): Update.
11962 * probe.c (parse_probes): Update.
11963 * mi/mi-cmd-break.c (mi_cmd_break_insert_1): Update.
11964 * location.h (event_location_deleter): New struct.
11965 (event_location_up): New typedef.
11966 (new_linespec_location, new_address_location, new_probe_location)
11967 (new_explicit_location, copy_event_location)
11968 (string_to_event_location, string_to_event_location_basic)
11969 (string_to_explicit_location): Update return type.
11970 (make_cleanup_delete_event_location): Remove.
11971 * location.c (new_linespec_location, new_address_location)
11972 (new_probe_location, new_explicit_location, copy_event_location):
11973 Return event_location_up.
11974 (delete_event_location_cleanup)
11975 (make_cleanup_delete_event_location): Remove.
11976 (string_to_explicit_location, string_to_event_location_basic)
11977 (string_to_event_location): Return event_location_up.
11978 * linespec.c (canonicalize_linespec, event_location_to_sals)
11979 (decode_line_with_current_source)
11980 (decode_line_with_last_displayed, decode_objc): Update.
11981 * guile/scm-breakpoint.c (gdbscm_register_breakpoint_x): Update.
11982 * completer.c (location_completer): Update.
11983 * cli/cli-cmds.c (edit_command, list_command): Update.
11984 * breakpoint.c (create_overlay_event_breakpoint)
11985 (create_longjmp_master_breakpoint)
11986 (create_std_terminate_master_breakpoint)
11987 (create_exception_master_breakpoint)
11988 (create_thread_event_breakpoint): Update.
11989 (init_breakpoint_sal): Update. Remove some dead code.
11990 (create_breakpoint_sal): Change type of "location". Update.
11991 (create_breakpoints_sal, create_breakpoint, break_command_1)
11992 (dprintf_command, break_range_command, until_break_command)
11993 (init_ada_exception_breakpoint)
11994 (strace_marker_create_sals_from_location)
11995 (update_static_tracepoint, trace_command, ftrace_command)
11996 (strace_command, create_tracepoint_from_upload): Update.
11997 * break-catch-throw.c (re_set_exception_catchpoint): Update.
11998 * ax-gdb.c (agent_command_1): Update.
11999
8f10c932
PA
120002017-04-12 Pedro Alves <palves@redhat.com>
12001
12002 * Makefile.in (ALL_TARGET_OBS): Add i386-go32-tdep.o.
12003 * configure.tgt: Handle i[34567]86-*-go32* and
12004 i[34567]86-*-msdosdjgpp*.
12005 * i386-tdep.c (i386_svr4_reg_to_regnum):
12006 Make extern.
12007 (i386_go32_init_abi, i386_coff_osabi_sniffer): Moved to
12008 i386-go32-tdep.c.
12009 (_initialize_i386_tdep): DJGPP bits moved to i386-go32-tdep.c.
12010 * i386-go32-tdep.c: New file.
12011 * i386-tdep.h (tdesc_i386_mmx, i386_svr4_reg_to_regnum): New
12012 declarations.
12013
0a31ccfb
SM
120142017-04-12 Simon Marchi <simon.marchi@ericsson.com>
12015
12016 * aix-thread.c (pd_status2str): Change return type to const char *.
12017
e9bb3fbb
PA
120182017-04-12 Pedro Alves <palves@redhat.com>
12019
12020 * i386-tdep.c (i386_elf_init_abi, i386_go32_init_abi): Remove
12021 calls to set_gdbarch_gnu_triplet_regexp.
12022
53375380
PA
120232017-04-12 Pedro Alves <palves@redhat.com>
12024
12025 PR gdb/21323
12026 * c-lang.c (cplus_primitive_types) <cplus_primitive_type_wchar_t>:
12027 New enum value.
12028 (cplus_language_arch_info): Register cplus_primitive_type_wchar_t.
12029 * gdbtypes.h (struct builtin_type) <builtin_wchar>: New field.
12030 * gdbtypes.c (gdbtypes_post_init): Create the "wchar_t" type.
12031 * gdbarch.sh (wchar_bit, wchar_signed): New per-arch values.
12032 * gdbarch.h, gdbarch.c: Regenerate.
12033 * aarch64-tdep.c (aarch64_gdbarch_init): Override
12034 gdbarch_wchar_bit and gdbarch_wchar_signed.
12035 * alpha-tdep.c (alpha_gdbarch_init): Likewise.
12036 * arm-tdep.c (arm_gdbarch_init): Likewise.
12037 * avr-tdep.c (avr_gdbarch_init): Likewise.
12038 * h8300-tdep.c (h8300_gdbarch_init): Likewise.
12039 * i386-nto-tdep.c (i386nto_init_abi): Likewise.
12040 * i386-tdep.c (i386_go32_init_abi): Likewise.
12041 * m32r-tdep.c (m32r_gdbarch_init): Likewise.
12042 * moxie-tdep.c (moxie_gdbarch_init): Likewise.
12043 * nds32-tdep.c (nds32_gdbarch_init): Likewise.
12044 * rs6000-aix-tdep.c (rs6000_aix_init_osabi): Likewise.
12045 * sh-tdep.c (sh_gdbarch_init): Likewise.
12046 * sparc-tdep.c (sparc32_gdbarch_init): Likewise.
12047 * sparc64-tdep.c (sparc64_init_abi): Likewise.
12048 * windows-tdep.c (windows_init_abi): Likewise.
12049 * xstormy16-tdep.c (xstormy16_gdbarch_init): Likewise.
12050
53e710ac
PA
120512017-04-12 Pedro Alves <palves@redhat.com>
12052
12053 PR c++/21323
12054 * c-lang.c (cplus_primitive_types) <cplus_primitive_type_char16_t,
12055 cplus_primitive_type_char32_t>: New enum values.
12056 (cplus_language_arch_info): Register cplus_primitive_type_char16_t
12057 and cplus_primitive_type_char32_t.
12058 * dwarf2read.c (read_base_type) <DW_ATE_UTF>: If bit size is 16 or
12059 32, use the archtecture's built-in type for char16_t and char32_t,
12060 respectively. Otherwise, fallback to init_integer_type as before,
12061 but make the type unsigned, and issue a complaint.
12062 * gdbtypes.c (gdbtypes_post_init): Make char16_t and char32_t unsigned.
12063
ab0538b8
AH
120642017-04-12 Alan Hayward <alan.hayward@arm.com>
12065
5e0e0422 12066 * m32r-tdep.c (M32R_ARG_REGISTER_SIZE): Added.
ab0538b8
AH
12067 (m32r_push_dummy_call): Use M32R_ARG_REGISTER_SIZE.
12068
5430098f
SDJ
120692017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
12070
12071 * windows-nat.c (windows_create_inferior): Declare 'toexec' as
12072 'const char *'.
12073
7c5ded6a
SDJ
120742017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
12075
12076 * common/common-utils.c (free_vector_argv): New function.
12077 * common/common-utils.h: Include <vector>.
12078 (free_vector_argv): New prototype.
12079 * darwin-nat.c (darwin_create_inferior): Rewrite function
12080 prototype in order to constify "exec_file" and accept a
12081 "std::string" for "allargs".
12082 * fork-child.c: Include <vector>.
12083 (breakup_args): Rewrite function, using C++.
12084 (fork_inferior): Rewrite function header, constify "exec_file_arg"
12085 and accept "std::string" for "allargs". Update the code to
12086 calculate "argv" based on "allargs". Update calls to "exec_fun"
12087 and "execvp".
12088 * gnu-nat.c (gnu_create_inferior): Rewrite function prototype in
12089 order to constify "exec_file" and accept a "std::string" for
12090 "allargs".
12091 * go32-nat.c (go32_create_inferior): Likewise.
12092 * inf-ptrace.c (inf_ptrace_create_inferior): Likewise.
12093 * infcmd.c (run_command_1): Constify "exec_file". Use
12094 "std::string" for inferior arguments.
12095 * inferior.h (fork_inferior): Update prototype.
12096 * linux-nat.c (linux_nat_create_inferior): Rewrite function
12097 prototype in order to constify "exec_file" and accept a
12098 "std::string" for "allargs".
12099 * nto-procfs.c (procfs_create_inferior): Likewise.
12100 * procfs.c (procfs_create_inferior): Likewise.
12101 * remote-sim.c (gdbsim_create_inferior): Likewise.
12102 * remote.c (extended_remote_run): Update code to accept
12103 "std::string" as argument.
12104 (extended_remote_create_inferior): Rewrite function prototype in
12105 order to constify "exec_file" and accept a "std::string" for
12106 "allargs".
12107 * rs6000-nat.c (super_create_inferior): Likewise.
12108 (rs6000_create_inferior): Likewise.
12109 * target.h (struct target_ops) <to_create_inferior>: Likewise.
12110 * windows-nat.c (windows_create_inferior): Likewise.
12111
ae0eee42
PA
121122017-04-11 Pedro Alves <palves@redhat.com>
12113
12114 * thread.c: Fix whitespace throughout.
12115
a6acac06
PR
121162017-04-11 Philipp Rudo <prudo@linux.vnet.ibm.com>
12117
12118 * linux-nat.c (linux_nat_detach): Remove delete_lwp call.
12119
64403bd1
AH
121202017-04-11 Alan Hayward <alan.hayward@arm.com>
12121
12122 * arm-tdep.c (arm_store_return_value): Use FP_REGISTER_SIZE
12123
a5bef50f
SDJ
121242017-04-10 Sergio Durigan Junior <sergiodj@redhat.com>
12125
12126 PR gdb/21364
12127 * osdata.c (info_osdata): Check if 'type' is an empty string
12128 instead of NULL.
12129
9295a5a9
PA
121302017-04-10 Pedro Alves <palves@redhat.com>
12131
12132 * thread.c (add_thread_silent, delete_thread_1, find_thread_ptid)
12133 (ptid_to_global_thread_id, in_thread_list)
12134 (do_captured_list_thread_ids, set_resumed, set_running)
12135 (set_executing, set_stop_requested, finish_thread_state)
12136 (validate_registers_access, can_access_registers_ptid)
12137 (print_thread_info_1, switch_to_thread)
12138 (do_restore_current_thread_cleanup)
12139 (make_cleanup_restore_current_thread, thread_command)
12140 (thread_name_command): Use operator== instead of ptid_equal.
12141
996812e3
PA
121422017-04-10 Pedro Alves <palves@redhat.com>
12143
12144 * thread.c (struct current_thread_cleanup) <next>: Delete field.
12145 (current_thread_cleanup_chain): Delete.
12146 (restore_current_thread_cleanup_dtor)
12147 (make_cleanup_restore_current_thread): Remove references to
12148 current_thread_cleanup_chain.
12149
845b344f
AH
121502017-04-10 Alan Hayward <alan.hayward@arm.com>
12151
12152 * msp430-tdep.c (msp430_pseudo_register_read): Never return
12153 REG_UNKNOWN.
12154
803bdfe4
YQ
121552017-04-10 Yao Qi <yao.qi@linaro.org>
12156
12157 PR gdb/19942
12158 * gdbthread.h (thread_info::deletable): New method.
12159 (thread_info::incref): New method.
12160 (thread_info::decref): New method.
12161 (thread_info::refcount): Move it to private.
12162 * infrun.c (save_stop_context): Call inc_refcount.
12163 (release_stop_context_cleanup): Likewise.
12164 * thread.c (set_thread_exited): New function.
12165 (init_thread_list): Delete "tp" only it is deletable, otherwise
12166 call set_thread_exited.
12167 (delete_thread_1): Call set_thread_exited.
12168 (current_thread_cleanup) <inferior_pid>: Remove.
12169 <thread>: New field.
12170 (restore_current_thread_ptid_changed): Removed.
12171 (do_restore_current_thread_cleanup): Adjust.
12172 (restore_current_thread_cleanup_dtor): Don't call
12173 find_thread_ptid.
12174 (set_thread_refcount): Use dec_refcount.
12175 (make_cleanup_restore_current_thread): Adjust.
12176 (thread_apply_all_command): Call inc_refcount.
12177 (_initialize_thread): Don't call
12178 observer_attach_thread_ptid_changed.
12179
8c25b497
YQ
121802017-04-10 Yao Qi <yao.qi@linaro.org>
12181
12182 * thread.c (delete_thread_1): Hoist code on marking thread as
12183 exited.
12184
8473b447
SM
121852017-04-09 Simon Marchi <simon.marchi@polymtl.ca>
12186
12187 * windows-nat.c (windows_detach): Initialize ptid with
12188 minus_one_ptid.
12189
6670ec13
SM
121902017-04-07 Simon Marchi <simon.marchi@ericsson.com>
12191
12192 * unittests/ptid-selftests.c: Fix erroneous assert messages.
12193
ba2f91bb
AH
121942017-04-07 Alan Hayward <alan.hayward@arm.com>
12195
12196 * bfin-tdep.c (BFIN_MAX_REGISTER_SIZE): Add.
12197 (bfin_pseudo_register_read): Use BFIN_MAX_REGISTER_SIZE.
12198 (bfin_pseudo_register_write): Likewise
12199
436252de
SM
122002017-04-06 Simon Marchi <simon.marchi@ericsson.com>
12201
12202 * common/ptid.h (struct ptid): Change to...
12203 (class ptid_t): ... this.
12204 <ptid_t>: New constructors.
12205 <pid, lwp_p, lwp, tid_p, tid, is_pid, operator==, operator!=,
12206 matches>: New methods.
12207 <make_null, make_minus_one>: New static methods.
12208 <pid>: Rename to...
12209 <m_pid>: ...this.
12210 <lwp>: Rename to...
12211 <m_lwp>: ...this.
12212 <tid>: Rename to...
12213 <m_tid>: ...this.
12214 (ptid_build, ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal,
12215 ptid_is_pid, ptid_lwp_p, ptid_tid_p, ptid_match): Take ptid arguments
12216 as references, move comment to class ptid_t.
12217 * common/ptid.c (null_ptid, minus_one_ptid): Initialize with
12218 ptid_t static methods.
12219 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_tid,
12220 ptid_equal, ptid_is_pid, ptid_lwp_p, ptid_tid_p, ptid_match):
12221 Take ptid arguments as references, implement using ptid_t methods.
12222 * unittests/ptid-selftests.c: New file.
12223 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
12224 unittests/ptid-selftests.c.
12225 (SUBDIR_UNITTESTS_OBS): Add unittests/ptid-selftests.o.
12226
0dedf377
TP
122272017-04-06 Thomas Preud'homme <thomas.preudhomme@arm.com>
12228
12229 * python/python.c (python_run_simple_file): Cast mode literal to
12230 non-const char pointer as expected by PyFile_FromString.
12231
4e9868d4
SM
122322017-04-05 Simon Marchi <simon.marchi@ericsson.com>
12233
12234 * common/ptid.c (ptid_lwp_p, ptid_tid_p): Remove comparison with
12235 minus_one_ptid and null_ptid.
12236
9bf2a700
PA
122372017-04-05 Pedro Alves <palves@redhat.com>
12238
12239 * warning.m4 (build_warnings): Remove -Wno-write-strings.
12240 * configure: Regenerate.
12241
a121b7c1
PA
122422017-04-05 Pedro Alves <palves@redhat.com>
12243
12244 * ada-exp.y (yyerror): Constify.
12245 * ada-lang.c (bound_name, get_selections)
12246 (ada_variant_discrim_type)
12247 (ada_variant_discrim_name, ada_value_struct_elt)
12248 (ada_lookup_struct_elt_type, is_unchecked_variant)
12249 (ada_which_variant_applies, standard_exc, ada_get_next_arg)
12250 (catch_ada_exception_command_split)
12251 (catch_ada_assert_command_split, catch_assert_command)
12252 (ada_op_name): Constify.
12253 * ada-lang.h (ada_yyerror, get_selections)
12254 (ada_variant_discrim_name, ada_value_struct_elt): Constify.
12255 * arc-tdep.c (arc_print_frame_cache): Constify.
12256 * arm-tdep.c (arm_skip_stub): Constify.
12257 * ax-gdb.c (gen_binop, gen_struct_ref_recursive, gen_struct_ref)
12258 (gen_aggregate_elt_ref): Constify.
12259 * bcache.c (print_bcache_statistics): Constify.
12260 * bcache.h (print_bcache_statistics): Constify.
12261 * break-catch-throw.c (catch_exception_command_1):
12262 * breakpoint.c (struct ep_type_description::description):
12263 Constify.
12264 (add_solib_catchpoint): Constify.
12265 (catch_fork_command_1): Add cast.
12266 (add_catch_command): Constify.
12267 * breakpoint.h (add_catch_command, add_solib_catchpoint):
12268 Constify.
12269 * bsd-uthread.c (bsd_uthread_state): Constify.
12270 * buildsym.c (patch_subfile_names): Constify.
12271 * buildsym.h (next_symbol_text_func, patch_subfile_names):
12272 Constify.
12273 * c-exp.y (yyerror): Constify.
12274 (token::oper): Constify.
12275 * c-lang.h (c_yyerror, cp_print_class_member): Constify.
12276 * c-varobj.c (cplus_describe_child): Constify.
12277 * charset.c (find_charset_names): Add cast.
12278 (find_charset_names): Constify array and add const_cast.
12279 * cli/cli-cmds.c (complete_command, cd_command): Constify.
12280 (edit_command): Constify.
12281 * cli/cli-decode.c (lookup_cmd): Constify.
12282 * cli/cli-dump.c (dump_memory_command, dump_value_command):
12283 Constify.
12284 (struct dump_context): Constify.
12285 (add_dump_command, restore_command): Constify.
12286 * cli/cli-script.c (get_command_line): Constify.
12287 * cli/cli-script.h (get_command_line): Constify.
12288 * cli/cli-utils.c (check_for_argument): Constify.
12289 * cli/cli-utils.h (check_for_argument): Constify.
12290 * coff-pe-read.c (struct read_pe_section_data): Constify.
12291 * command.h (lookup_cmd): Constify.
12292 * common/print-utils.c (decimal2str): Constify.
12293 * completer.c (gdb_print_filename): Constify.
12294 * corefile.c (set_gnutarget): Constify.
12295 * cp-name-parser.y (yyerror): Constify.
12296 * cp-valprint.c (cp_print_class_member): Constify.
12297 * cris-tdep.c (cris_register_name, crisv32_register_name):
12298 Constify.
12299 * d-exp.y (yyerror): Constify.
12300 (struct token::oper): Constify.
12301 * d-lang.h (d_yyerror): Constify.
12302 * dbxread.c (struct header_file_location::name): Constify.
12303 (add_old_header_file, add_new_header_file, last_function_name)
12304 (dbx_next_symbol_text, add_bincl_to_list)
12305 (find_corresponding_bincl_psymtab, set_namestring)
12306 (find_stab_function_addr, read_dbx_symtab, start_psymtab)
12307 (dbx_end_psymtab, read_ofile_symtab, process_one_symbol):
12308 * defs.h (command_line_input, print_address_symbolic)
12309 (deprecated_readline_begin_hook): Constify.
12310 * dwarf2read.c (anonymous_struct_prefix, dwarf_bool_name):
12311 Constify.
12312 * event-top.c (handle_line_of_input): Constify and add cast.
12313 * exceptions.c (catch_errors): Constify.
12314 * exceptions.h (catch_errors): Constify.
12315 * expprint.c (print_subexp_standard, op_string, op_name)
12316 (op_name_standard, dump_raw_expression, dump_raw_expression):
12317 * expression.h (op_name, op_string, dump_raw_expression):
12318 Constify.
12319 * f-exp.y (yyerror): Constify.
12320 (struct token::oper): Constify.
12321 (struct f77_boolean_val::name): Constify.
12322 * f-lang.c (f_word_break_characters): Constify.
12323 * f-lang.h (f_yyerror): Constify.
12324 * fork-child.c (fork_inferior): Add cast.
12325 * frv-tdep.c (struct gdbarch_tdep::register_names): Constify.
12326 (new_variant): Constify.
12327 * gdbarch.sh (pstring_ptr, pstring_list): Constify.
12328 * gdbarch.c: Regenerate.
12329 * gdbcore.h (set_gnutarget): Constify.
12330 * go-exp.y (yyerror): Constify.
12331 (token::oper): Constify.
12332 * go-lang.h (go_yyerror): Constify.
12333 * go32-nat.c (go32_sysinfo): Constify.
12334 * guile/scm-breakpoint.c (gdbscm_breakpoint_expression): Constify.
12335 * guile/scm-cmd.c (cmdscm_function): Constify.
12336 * guile/scm-param.c (pascm_param_value): Constify.
12337 * h8300-tdep.c (h8300_register_name, h8300s_register_name)
12338 (h8300sx_register_name): Constify.
12339 * hppa-tdep.c (hppa32_register_name, hppa64_register_name):
12340 Constify.
12341 * ia64-tdep.c (ia64_register_names): Constify.
12342 * infcmd.c (construct_inferior_arguments): Constify.
12343 (path_command, attach_post_wait): Constify.
12344 * language.c (show_range_command, show_case_command)
12345 (unk_lang_error): Constify.
12346 * language.h (language_defn::la_error)
12347 (language_defn::la_name_of_this): Constify.
12348 * linespec.c (decode_line_2): Constify.
12349 * linux-thread-db.c (thread_db_err_str): Constify.
12350 * lm32-tdep.c (lm32_register_name): Constify.
12351 * m2-exp.y (yyerror): Constify.
12352 * m2-lang.h (m2_yyerror): Constify.
12353 * m32r-tdep.c (m32r_register_names): Constify and make static.
12354 * m68hc11-tdep.c (m68hc11_register_names): Constify.
12355 * m88k-tdep.c (m88k_register_name): Constify.
12356 * macroexp.c (appendmem): Constify.
12357 * mdebugread.c (fdr_name, add_data_symbol, parse_type)
12358 (upgrade_type, parse_external, parse_partial_symbols)
12359 (mdebug_next_symbol_text, cross_ref, mylookup_symbol, new_psymtab)
12360 (new_symbol): Constify.
12361 * memattr.c (mem_info_command): Constify.
12362 * mep-tdep.c (register_name_from_keyword): Constify.
12363 * mi/mi-cmd-env.c (mi_cmd_env_path, _initialize_mi_cmd_env):
12364 Constify.
12365 * mi/mi-cmd-stack.c (list_args_or_locals): Constify.
12366 * mi/mi-cmd-var.c (mi_cmd_var_show_attributes): Constify.
12367 * mi/mi-main.c (captured_mi_execute_command): Constify and add
12368 cast.
12369 (mi_execute_async_cli_command): Constify.
12370 * mips-tdep.c (mips_register_name): Constify.
12371 * mn10300-tdep.c (register_name, mn10300_generic_register_name)
12372 (am33_register_name, am33_2_register_name)
12373 * moxie-tdep.c (moxie_register_names): Constify.
12374 * nat/linux-osdata.c (osdata_type): Constify fields.
12375 * nto-tdep.c (nto_parse_redirection): Constify.
12376 * objc-lang.c (lookup_struct_typedef, lookup_objc_class)
12377 (lookup_child_selector): Constify.
12378 (objc_methcall::name): Constify.
12379 * objc-lang.h (lookup_objc_class, lookup_child_selector)
12380 (lookup_struct_typedef): Constify.
12381 * objfiles.c (pc_in_section): Constify.
12382 * objfiles.h (pc_in_section): Constify.
12383 * p-exp.y (struct token::oper): Constify.
12384 (yyerror): Constify.
12385 * p-lang.h (pascal_yyerror): Constify.
12386 * parser-defs.h (op_name_standard): Constify.
12387 (op_print::string): Constify.
12388 (exp_descriptor::op_name): Constify.
12389 * printcmd.c (print_address_symbolic): Constify.
12390 * psymtab.c (print_partial_symbols): Constify.
12391 * python/py-breakpoint.c (stop_func): Constify.
12392 (bppy_get_expression): Constify.
12393 * python/py-cmd.c (cmdpy_completer::name): Constify.
12394 (cmdpy_function): Constify.
12395 * python/py-event.c (evpy_add_attribute)
12396 (gdbpy_initialize_event_generic): Constify.
12397 * python/py-event.h (evpy_add_attribute)
12398 (gdbpy_initialize_event_generic): Constify.
12399 * python/py-evts.c (add_new_registry): Constify.
12400 * python/py-finishbreakpoint.c (outofscope_func): Constify.
12401 * python/py-framefilter.c (get_py_iter_from_func): Constify.
12402 * python/py-inferior.c (get_buffer): Add cast.
12403 * python/py-param.c (parm_constant::name): Constify.
12404 * python/py-unwind.c (fprint_frame_id): Constify.
12405 * python/python.c (gdbpy_parameter_value): Constify.
12406 * remote-fileio.c (remote_fio_func_map): Make 'name' const.
12407 * remote.c (memory_packet_config::name): Constify.
12408 (show_packet_config_cmd, remote_write_bytes)
12409 (remote_buffer_add_string):
12410 * reverse.c (exec_reverse_once): Constify.
12411 * rs6000-tdep.c (variant::name, variant::description): Constify.
12412 * rust-exp.y (rustyyerror): Constify.
12413 * rust-lang.c (rust_op_name): Constify.
12414 * rust-lang.h (rustyyerror): Constify.
12415 * serial.h (serial_ops::name): Constify.
12416 * sh-tdep.c (sh_sh_register_name, sh_sh3_register_name)
12417 (sh_sh3e_register_name, sh_sh2e_register_name)
12418 (sh_sh2a_register_name, sh_sh2a_nofpu_register_name)
12419 (sh_sh_dsp_register_name, sh_sh3_dsp_register_name)
12420 (sh_sh4_register_name, sh_sh4_nofpu_register_name)
12421 (sh_sh4al_dsp_register_name): Constify.
12422 * sh64-tdep.c (sh64_register_name): Constify.
12423 * solib-darwin.c (lookup_symbol_from_bfd): Constify.
12424 * spu-tdep.c (spu_register_name, info_spu_dma_cmdlist): Constify.
12425 * stabsread.c (patch_block_stabs, read_type_number)
12426 (ref_map::stabs, ref_add, process_reference)
12427 (symbol_reference_defined, define_symbol, define_symbol)
12428 (error_type, read_type, read_member_functions, read_cpp_abbrev)
12429 (read_one_struct_field, read_struct_fields, read_baseclasses)
12430 (read_tilde_fields, read_struct_type, read_array_type)
12431 (read_enum_type, read_sun_builtin_type, read_sun_floating_type)
12432 (read_huge_number, read_range_type, read_args, common_block_start)
12433 (find_name_end): Constify.
12434 * stabsread.h (common_block_start, define_symbol)
12435 (process_one_symbol, symbol_reference_defined, ref_add):
12436 * symfile.c (get_section_index, add_symbol_file_command):
12437 * symfile.h (get_section_index): Constify.
12438 * target-descriptions.c (tdesc_type::name): Constify.
12439 (tdesc_free_type): Add cast.
12440 * target.c (find_default_run_target):
12441 (add_deprecated_target_alias, find_default_run_target)
12442 (target_announce_detach): Constify.
12443 (do_option): Constify.
12444 * target.h (add_deprecated_target_alias): Constify.
12445 * thread.c (print_thread_info_1): Constify.
12446 * top.c (deprecated_readline_begin_hook, command_line_input):
12447 Constify.
12448 (init_main): Add casts.
12449 * top.h (handle_line_of_input): Constify.
12450 * tracefile-tfile.c (tfile_write_uploaded_tsv): Constify.
12451 * tracepoint.c (tvariables_info_1, trace_status_mi): Constify.
12452 (tfind_command): Rename to ...
12453 (tfind_command_1): ... this and constify.
12454 (tfind_command): New function.
12455 (tfind_end_command, tfind_start_command): Adjust.
12456 (encode_source_string): Constify.
12457 * tracepoint.h (encode_source_string): Constify.
12458 * tui/tui-data.c (tui_partial_win_by_name): Constify.
12459 * tui/tui-data.h (tui_partial_win_by_name): Constify.
12460 * tui/tui-source.c (tui_set_source_content_nil): Constify.
12461 * tui/tui-source.h (tui_set_source_content_nil): Constify.
12462 * tui/tui-win.c (parse_scrolling_args): Constify.
12463 * tui/tui-windata.c (tui_erase_data_content): Constify.
12464 * tui/tui-windata.h (tui_erase_data_content): Constify.
12465 * tui/tui-winsource.c (tui_erase_source_content): Constify.
12466 * tui/tui.c (tui_enable): Add cast.
12467 * utils.c (defaulted_query): Constify.
12468 (init_page_info): Add cast.
12469 (puts_debug, subset_compare): Constify.
12470 * utils.h (subset_compare): Constify.
12471 * varobj.c (varobj_format_string): Constify.
12472 * varobj.h (varobj_format_string): Constify.
12473 * vax-tdep.c (vax_register_name): Constify.
12474 * windows-nat.c (windows_detach): Constify.
12475 * xcoffread.c (process_linenos, xcoff_next_symbol_text): Constify.
12476 * xml-support.c (gdb_xml_end_element): Constify.
12477 * xml-tdesc.c (tdesc_start_reg): Constify.
12478 * xstormy16-tdep.c (xstormy16_register_name): Constify.
12479 * xtensa-tdep.c (xtensa_find_register_by_name): Constify.
12480 * xtensa-tdep.h (xtensa_register_t::name): Constify.
12481
995816ba
PA
124822017-04-05 Pedro Alves <palves@redhat.com>
12483
12484 * proc-api.c (struct trans): Constify.
12485 (procfs_note): Constify.
12486 * proc-events.c (struct trans, syscall_table):
12487 * proc-flags.c (struct trans): Constify.
12488 * proc-utils.h (procfs_note): Constify.
12489 * proc-why.c (struct trans): Constify.
12490 * procfs.c (dead_procinfo, find_syscall, proc_warn, proc_error)
12491 (procfs_detach): Constify.
12492 * sol-thread.c (struct string_map): Constify.
12493 (td_err_string, td_state_string): Constify.
12494
3e83a920
PA
124952017-04-05 Pedro Alves <palves@redhat.com>
12496
12497 * proc-api.c (procfs_filename): Don't initialize
12498 procfs_filename.
12499 (prepare_to_trace): Assume procfs_filename is non-NULL.
12500 (_initialize_proc_api): Give procfs_filename a default value here.
12501
63160a43
PA
125022017-04-05 Pedro Alves <palves@redhat.com>
12503
12504 * break-catch-throw.c (handle_gnu_v3_exceptions): Constify
12505 'cond_string' parameter.
12506 (extract_exception_regexp): Constify 'string' parameter.
12507 (catch_exception_command_1): Constify.
12508 * breakpoint.c (init_catchpoint)
12509 (create_fork_vfork_event_catchpoint): Constify 'cond_string'
12510 parameter.
12511 (ep_parse_optional_if_clause, catch_fork_command_1)
12512 (catch_exec_command_1): Constify.
12513 * breakpoint.h (init_catchpoint): Constify 'cond_string'
12514 parameter.
12515 (ep_parse_optional_if_clause): Constify.
12516 * cli/cli-utils.c (remove_trailing_whitespace)
12517 (check_for_argument): Constify.
12518 * cli/cli-utils.h (remove_trailing_whitespace): Constify and add
12519 non-const overload.
12520 (check_for_argument): Likewise.
12521
9b2eba3d
PA
125222017-04-05 Pedro Alves <palves@redhat.com>
12523
12524 * event-top.c (command_line_handler): Add cast to execute_command
12525 call.
12526 * record-btrace.c (cmd_record_btrace_bts_start)
12527 (cmd_record_btrace_pt_start, cmd_record_btrace_start)
12528 (cmd_record_btrace_start): Add cast to execute_command call.
12529 * record-full.c (record_full_goto_insn):
12530 * record.c (record_start, record_stop): Add cast to
12531 execute_command_to_string calls.
12532 (cmd_record_start): Add cast to execute_command calls.
12533
2adadf51
PA
125342017-04-05 Pedro Alves <palves@redhat.com>
12535
12536 * python/python-internal.h (gdb_PyArg_ParseTupleAndKeywords): New
12537 static inline function.
12538 * python/py-arch.c (archpy_disassemble): Constify 'keywords'
12539 array and use gdb_PyArg_ParseTupleAndKeywords.
12540 * python/py-cmd.c (cmdpy_init): Likewise.
12541 * python/py-finishbreakpoint.c (bpfinishpy_init): Likewise.
12542 * python/py-inferior.c (infpy_read_memory, infpy_write_memory)
12543 (infpy_search_memory): Likewise.
12544 * python/py-objfile.c (objfpy_add_separate_debug_file)
12545 (gdbpy_lookup_objfile): Likewise.
12546 * python/py-symbol.c (gdbpy_lookup_symbol)
12547 (gdbpy_lookup_global_symbol): Likewise.
12548 * python/py-type.c (gdbpy_lookup_type): Likewise.
12549 * python/py-value.c (valpy_lazy_string, valpy_string): Likewise.
12550 * python/python.c (execute_gdb_command, gdbpy_write, gdbpy_flush):
12551 Likewise.
12552
0d1f4ceb
PA
125532017-04-05 Pedro Alves <palves@redhat.com>
12554
12555 * python/python-internal.h (gdb_PyGetSetDef): New type.
12556 * python/py-block.c (block_object_getset)
12557 (breakpoint_object_getset): Now a gdb_PyGetSetDef array.
12558 * python/py-event.c (event_object_getset)
12559 (finish_breakpoint_object_getset): Likewise.
12560 * python/py-inferior.c (inferior_object_getset): Likewise.
12561 * python/py-infthread.c (thread_object_getset): Likewise.
12562 * python/py-lazy-string.c (lazy_string_object_getset): Likewise.
12563 * python/py-linetable.c (linetable_entry_object_getset): Likewise.
12564 * python/py-objfile.c (objfile_getset): Likewise.
12565 * python/py-progspace.c (pspace_getset): Likewise.
12566 * python/py-record-btrace.c (btpy_insn_getset, btpy_call_getset):
12567 Likewise.
12568 * python/py-record.c (recpy_record_getset): Likewise.
12569 * python/py-symbol.c (symbol_object_getset): Likewise.
12570 * python/py-symtab.c (symtab_object_getset, sal_object_getset):
12571 Likewise.
12572 * python/py-type.c (type_object_getset, field_object_getset):
12573 Likewise.
12574 * python/py-value.c (value_object_getset): Likewise.
12575
4d759979
PA
125762017-04-05 Pedro Alves <palves@redhat.com>
12577
12578 * python/python-internal.h (gdb_PyObject_CallMethod)
12579 (gdb_PyErr_NewException, gdb_PySys_GetObject, gdb_PySys_SetPath):
12580 New functions.
12581 (GDB_PYSYS_SETPATH_CHAR, PyObject_CallMethod, PyErr_NewException)
12582 (PySys_GetObject, PySys_SetPath): New macros.
12583
fdf9e36f
PA
125842017-04-05 Pedro Alves <palves@redhat.com>
12585
12586 * mi/mi-cmd-info.c (mi_cmd_info_os): Call info_osdata instead of
12587 info_osdata_command.
12588 * osdata.c (info_osdata_command): Rename to ...
12589 (info_osdata): ... this. Constify 'type' parameter, and remove
12590 the 'from_tty' parameter. Accept NULL TYPE.
12591 (info_osdata_command): New function.
12592 * osdata.h (info_osdata_command): Remove declaration.
12593 (info_osdata): New declaration.
12594
9f33b8b7
PA
125952017-04-05 Pedro Alves <palves@redhat.com>
12596
12597 * mi/mi-cmd-break.c (mi_cmd_break_insert_1, mi_cmd_break_insert)
12598 (mi_cmd_dprintf_insert, mi_cmd_break_passcount)
12599 (mi_cmd_break_watch, mi_cmd_break_commands): Constify 'command'
12600 parameter.
12601 * mi/mi-cmd-catch.c (mi_cmd_catch_assert, mi_cmd_catch_exception)
12602 (mi_cmd_catch_load, mi_cmd_catch_unload): Constify cmd' parameter.
12603 * mi/mi-cmd-disas.c (mi_cmd_disassemble): Constify 'command'
12604 parameter.
12605 * mi/mi-cmd-env.c (mi_cmd_env_pwd, mi_cmd_env_cd, mi_cmd_env_path)
12606 (mi_cmd_env_dir, mi_cmd_inferior_tty_set, _cmd_inferior_tty_show)
12607 * mi/mi-cmd-file.c (mi_cmd_file_list_exec_source_file)
12608 (mi_cmd_file_list_exec_source_files)
12609 (mi_cmd_file_list_shared_libraries): Constify 'command' parameter.
12610 * mi/mi-cmd-info.c (mi_cmd_info_ada_exceptions)
12611 (mi_cmd_info_gdb_mi_command, mi_cmd_info_os): Constify 'command'
12612 parameter.
12613 * mi/mi-cmd-stack.c (mi_cmd_enable_frame_filters)
12614 (mi_cmd_stack_list_frames, mi_cmd_stack_info_depth)
12615 (mi_cmd_stack_list_locals, mi_cmd_stack_list_args)
12616 (mi_cmd_stack_list_variables, mi_cmd_stack_select_frame)
12617 (mi_cmd_stack_info_frame): Constify 'command' parameter.
12618 * mi/mi-cmd-target.c (mi_cmd_target_file_get)
12619 (mi_cmd_target_file_put, mi_cmd_target_file_delete): Constify
12620 'command' parameter.
12621 * mi/mi-cmd-var.c (mi_cmd_var_create, mi_cmd_var_delete)
12622 (mi_cmd_var_set_format, mi_cmd_var_set_visualizer)
12623 (mi_cmd_var_set_frozen, mi_cmd_var_show_format)
12624 (mi_cmd_var_info_num_children, mi_cmd_var_list_children)
12625 (mi_cmd_var_info_type, mi_cmd_var_info_path_expression)
12626 (mi_cmd_var_info_expression, mi_cmd_var_show_attributes)
12627 (mi_cmd_var_evaluate_expression, mi_cmd_var_assign)
12628 (mi_cmd_var_update, mi_cmd_enable_pretty_printing)
12629 (mi_cmd_var_set_update_range): Constify 'command' parameter.
12630 * mi/mi-cmds.h (mi_cmd_argv_ftype): Constify 'command' parameter.
12631 * mi/mi-interp.c (mi_cmd_interpreter_exec): Constify 'command'
12632 parameter.
12633 * mi/mi-main.c (mi_cmd_gdb_exit, mi_cmd_exec_next)
12634 (mi_cmd_exec_next_instruction, mi_cmd_exec_step)
12635 (mi_cmd_exec_step_instruction, mi_cmd_exec_finish)
12636 (mi_cmd_exec_return ,mi_cmd_exec_jump, mi_cmd_exec_continue)
12637 (mi_cmd_exec_interrupt, mi_cmd_exec_run, mi_cmd_target_detach)
12638 (mi_cmd_target_flash_erase, mi_cmd_thread_select)
12639 (mi_cmd_thread_list_ids, mi_cmd_thread_info)
12640 (mi_cmd_list_thread_groups, mi_cmd_data_list_register_names)
12641 (mi_cmd_data_list_changed_registers)
12642 (mi_cmd_data_write_register_values)
12643 (mi_cmd_data_evaluate_expression, mi_cmd_data_read_memory)
12644 (mi_cmd_data_read_memory_bytes, mi_cmd_data_write_memory)
12645 (mi_cmd_data_write_memory_bytes, mi_cmd_enable_timings)
12646 (mi_cmd_list_features, mi_cmd_list_target_features)
12647 (mi_cmd_add_inferior, mi_cmd_remove_inferior)
12648 (mi_cmd_trace_define_variable, mi_cmd_trace_list_variables)
12649 (mi_cmd_trace_find, mi_cmd_trace_save, mi_cmd_trace_start)
12650 (mi_cmd_trace_status, mi_cmd_trace_stop, mi_cmd_ada_task_info)
12651 (mi_cmd_trace_frame_collected): Constify 'command'
12652 parameter.
12653 * mi/mi-symbol-cmds.c (mi_cmd_symbol_list_lines): Constify
12654 'command' parameter.
12655
67cb5b2d
PA
126562017-04-05 Pedro Alves <palves@redhat.com>
12657
12658 * ada-lang.c (ada_completer_word_break_characters): Now a const
12659 array.
12660 (ada_get_gdb_completer_word_break_characters): Constify.
12661 * completer.c (gdb_completer_command_word_break_characters)
12662 (gdb_completer_file_name_break_characters)
12663 (gdb_completer_quote_characters): Now const arrays.
12664 (get_gdb_completer_quote_characters): Constify.
12665 (set_rl_completer_word_break_characters): New function.
12666 (set_gdb_completion_word_break_characters)
12667 (complete_line_internal): Use it.
12668 * completer.h (get_gdb_completer_quote_characters): Constify.
12669 (set_rl_completer_word_break_characters): Declare.
12670 * f-lang.c (f_word_break_characters): Constify.
12671 * language.c (default_word_break_characters): Constify.
12672 * language.h (language_defn::la_word_break_characters): Constify.
12673 (default_word_break_characters): Constify.
12674 * top.c (init_main): Use set_rl_completer_word_break_characters.
12675
7a114964
PA
126762017-04-05 Pedro Alves <palves@redhat.com>
12677
12678 * aix-thread.c (aix_thread_pid_to_str)
12679 (aix_thread_extra_thread_info): Constify.
12680 * bsd-kvm.c (bsd_kvm_pid_to_str): Constify.
12681 * bsd-uthread.c (bsd_uthread_extra_thread_info)
12682 (bsd_uthread_pid_to_str): Constify.
12683 * corelow.c (core_pid_to_str): Constify.
12684 * darwin-nat.c (darwin_pid_to_str): Constify.
12685 * fbsd-nat.c (fbsd_pid_to_str): Constify.
12686 * fbsd-tdep.c (fbsd_core_pid_to_str, gdbarch_core_pid_to_str):
12687 Constify.
12688 * gnu-nat.c (gnu_pid_to_str): Constify.
12689 * go32-nat.c (go32_pid_to_str): Constify.
12690 * i386-cygwin-tdep.c (i386_windows_core_pid_to_str): Constify.
12691 * inf-ptrace.c (inf_ptrace_pid_to_str): Constify.
12692 * inferior.c (inferior_pid_to_str): Constify.
12693 * linux-nat.c (linux_nat_pid_to_str): Constify.
12694 * linux-tdep.c (linux_core_pid_to_str): Constify.
12695 * linux-thread-db.c (thread_db_pid_to_str)
12696 (thread_db_extra_thread_info): Constify.
12697 * nto-tdep.c (nto_extra_thread_info): Constify.
12698 * nto-tdep.h (nto_extra_thread_info): Constify.
12699 * obsd-nat.c (obsd_pid_to_str): Constify.
12700 * procfs.c (procfs_pid_to_str): Constify.
12701 * ravenscar-thread.c (ravenscar_extra_thread_info)
12702 (ravenscar_pid_to_str): Constify.
12703 * remote-sim.c (gdbsim_pid_to_str): Constify.
12704 * remote.c (remote_threads_extra_info, remote_pid_to_str):
12705 Constify.
12706 * sol-thread.c (solaris_pid_to_str): Constify.
12707 * sol2-tdep.c (sol2_core_pid_to_str): Constify.
12708 * sol2-tdep.h (sol2_core_pid_to_str): Constify.
12709 * target.c (default_pid_to_str, target_pid_to_str)
12710 (normal_pid_to_str, default_pid_to_str): Constify.
12711 * target.h (target_ops::to_pid_to_str)
12712 (target_ops::to_extra_thread_info): Constify.
12713 (target_pid_to_str, normal_pid_to_str): Constify.
12714 * windows-nat.c (windows_pid_to_str): Constify.
12715 * gdbarch.sh (core_pid_to_str): Constify.
12716 * target-delegates.c: Regenerate.
12717 * gdbarch.h, gdbarch.c: Regenerate.
12718
69bbf465
PA
127192017-04-05 Pedro Alves <palves@redhat.com>
12720
12721 * main.c (captured_main_1): Use gdb::unique_xmalloc_ptr to manage
12722 the memory of the temporary warning_pre_print override.
12723 * utils.c (warning_pre_print): Constify.
12724 * utils.h (warning_pre_print): Constify.
12725
be47f9e8
PA
127262017-04-05 Pedro Alves <palves@redhat.com>
12727
12728 * cli/cli-cmds.c (shell_escape): Constify 'arg' parameter.
12729 (shell_command): New function.
12730 (make_command): Use std::string.
12731 (init_cli_cmds): Register shell_command instead of shell_escape.
12732
bde6261a
PA
127332017-04-05 Pedro Alves <palves@redhat.com>
12734
12735 * breakpoint.c (dprintf_function, dprintf_channel): Don't initialize.
12736 * tracepoint.c (default_collect): Don't initialize.
12737
b38ef47f
PA
127382017-04-05 Pedro Alves <palves@redhat.com>
12739
12740 * macroexp.c (macro_buffer::shared): Now a bool.
12741 (init_buffer): Update.
12742 (init_shared_buffer): Constify 'addr' parameter.
12743 (substitute_args, expand, macro_expand, macro_expand_next): Remove
12744 casts.
12745
f995bbe8
PA
127462017-04-05 Pedro Alves <palves@redhat.com>
12747
12748 * arm-tdep.c (show_disassembly_style_sfunc): Constify local.
12749 * disasm.c (set_disassembler_options): Constify local.
12750 * i386-tdep.c (i386_print_insn): Remove cast and FIXME comment.
12751
4a596fe2
SDJ
127522017-04-05 Sergio Durigan Junior <sergiodj@redhat.com>
12753
12754 PR gdb/21352
12755 * tracefile.c (tsave_command): Fix argument parsing for '-r'
12756 option.
12757
2cad08ea
YQ
127582017-04-05 Yao Qi <yao.qi@linaro.org>
12759
12760 * frame.c (frame_unwind_register_unsigned): Call
12761 frame_unwind_register_value.
12762
55a98976
YQ
127632017-04-05 Yao Qi <yao.qi@linaro.org>
12764
12765 * gdb.threads/thread-specific-bp.exp (check_thread_specific_breakpoint):
12766 Use gdb_test_multiple, and don't match anchor.
12767
4ac40124
PA
127682017-04-05 Pedro Alves <palves@redhat.com>
12769
12770 * MAINTAINERS (Global Maintainers): Add Simon Marchi.
12771 (Write After Approval): Remove Simon Marchi.
12772
c053b654
PA
127732017-04-05 Pedro Alves <palves@redhat.com>
12774
12775 * common/gdb_optional.h (optional::optional): Make constexpr and
12776 initialize m_dummy.
12777
4c7bf4f9
JB
127782017-04-04 John Baldwin <jhb@FreeBSD.org>
12779
12780 * amd64-fbsd-tdep.c: Remove "bsd-uthread.h" include.
12781 (amd64fbsd_jmp_buf_reg_offset): Remove.
12782 (amd64fbsd_supply_uthread): Remove function.
12783 (amd64fbsd_collect_uthread): Remove function.
12784 (amd64fbsd_init_abi): Don't set bsd-uthread callbacks.
12785 * configure.tgt (i[34567]86-*-freebsd*): Remove bsd-uthread.o.
12786 (x86_64-*-freebsd*): Remove bsd-uthread.o.
12787 (fbsd-nat.c): Update comment.
12788 * i386-fbsd-tdep.c: Remove "bsd-uthread.h" include.
12789 (i386fbsd_jmp_buf_reg_offset): Remove.
12790 (i386fbsd_supply_uthread): Remove function.
12791 (i386fbsd_collect_uthread): Remove function.
12792 (i386fbsd_init_abi): Don't set bsd-uthread callbacks.
12793
1e1a8bef
JB
127942017-04-04 John Baldwin <jhb@FreeBSD.org>
12795
12796 * Makefile.in (ALL_64_TARGET_OBS): Remove alpha-fbsd-tdep.o.
12797 (ALLDEPFILES): Remove alpha-fbsd-tdep.c
12798 * NEWS: Mention that support for FreeBSD/alpha was removed.
12799 * alpha-fbsd-tdep.c: Delete file.
12800 * config/alpha/fbsd.mh: Delete file.
12801 * configure.host: Delete alpha*-*-freebsd* and
12802 alpha*-*-kfreebsd*-gnu.
12803 * configure.tgt: Delete alpha*-*-freebsd* and
12804 alpha*-*-kfreebsd*-gnu.
12805
49907934
JB
128062017-04-04 John Baldwin <jhb@FreeBSD.org>
12807
12808 * amd64-bsd-nat.c (amd64bsd_fetch_inferior_registers,
12809 amd64bsd_store_inferior_registers): Use ptid from regcache.
12810
6f77053d
PA
128112017-04-04 Pedro Alves <palves@redhat.com>
12812
12813 * dwarf2read.c (lnp_state_machine): Now a class. Initialize all
12814 data fields, make them private and add "m_" prefixes.
12815 (lnp_state_machine::lnp_state_machine): New ctor.
12816 (record_line, check_line_address, handle_set_discriminator)
12817 (handle_set_address, handle_advance_pc, handle_special_opcode)
12818 (handle_advance_line, handle_set_file, handle_negate_stmt)
12819 (handle_const_add_pc, handle_fixed_advance_pc, handle_copy)
12820 (end_sequence, advance_line): New methods.
12821 (m_gdbarch, m_record_lines_p): New fields.
12822 (lnp_reader_state): Delete.
12823 (dwarf_record_line): Rename to ...
12824 (lnp_state_machine::record_line): ... adjust.
12825 (init_lnp_state_machine): Delete.
12826 (lnp_state_machine::lnp_state_machine): New.
12827 (check_line_address): Rename to ...
12828 (lnp_state_machine::check_line_address): This.
12829 (dwarf_decode_lines_1): Remove reference to "reader_state".
12830 Adjust lnp_state_machine having a non-default ctor. Use bool.
12831 State machine internal state manipulation moved to
12832 lnp_state_machine methods.
12833
9c541725
PA
128342017-04-04 Pedro Alves <palves@redhat.com>
12835
12836 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
12837 unittests/offset-type-selftests.c.
12838 (SUBDIR_UNITTESTS_OBS): Add offset-type-selftests.o.
12839 * common/offset-type.h: New file.
12840 * common/preprocessor.h: New file.
12841 * common/traits.h: New file.
12842 * common/valid-expr.h: New file.
12843 * dwarf2expr.c: Include "common/underlying.h". Adjust to use
12844 sect_offset and cu_offset strong typedefs throughout.
12845 * dwarf2expr.h: Adjust to use sect_offset and cu_offset strong
12846 typedefs throughout.
12847 * dwarf2loc.c: Include "common/underlying.h". Adjust to use
12848 sect_offset and cu_offset strong typedefs throughout.
12849 * dwarf2read.c: Adjust to use sect_offset and cu_offset strong
12850 typedefs throughout.
12851 * gdbtypes.h: Include "common/offset-type.h".
12852 (cu_offset): Now an offset type (strong typedef) instead of a
12853 struct.
12854 (sect_offset): Likewise.
12855 (union call_site_parameter_u): Rename "param_offset" field to
12856 "param_cu_off".
12857 * unittests/offset-type-selftests.c: New file.
12858
ecfb656c
PA
128592017-04-04 Pedro Alves <palves@redhat.com>
12860
12861 * common/underlying.h: New file.
12862 * dwarf2read.c: Include "common/gdb_optional.h" and
12863 "common/underlying.h".
12864 (dir_index, file_name_index): New types.
12865 (file_entry): Use them.
12866 (file_entry::include): Use to_underlying.
12867 (line_header::add_file_name): Use dir_index.
12868 (read_formatted_entries): Use gdb::optional. Read form before
12869 writting to file_entry.
12870 (dwarf_decode_line_header): Use dir_index.
12871 (lnp_state_machine::current_file): Use to_underlying.
12872 (lnp_state_machine::file): Change type to file_name_index.
12873 (dwarf_record_line): Use to_underlying.
12874 (init_lnp_state_machine): Use file_name_index.
12875 (dwarf_decode_lines_1): Use dir_index and file_name_index.
12876
d194f1fe
PA
128772017-04-04 Pedro Alves <palves@redhat.com>
12878
12879 * common/gdb_optional.h (gdb::optiona): Add operator->, operator*,
12880 operator bool, has_value and get methods.
12881
fff8551c
PA
128822017-04-04 Pedro Alves <palves@redhat.com>
12883
12884 * dwarf2read.c (struct file_entry): Add ctors, and initialize all
12885 fields.
12886 (line_header): Initialize all data fields. Change type of
12887 standard_opcode_lengths to std::unique_ptr<unsigned char[]>.
12888 Change type of include_dirs to std::vector<const char *>. Remove
12889 num_include_dirs, include_dirs_size. Change type of file_names to
12890 std::vector<file_entry>. Remove num_file_names, file_names_size.
12891 (line_header::line_header): New.
12892 (line_header::add_include_dir, line_header::add_file_name): New
12893 methods.
12894 (line_header::include_dir_at): Remove NULL check.
12895 (line_header::file_name_at): Add const overload.
12896 (line_header_up): New unique_ptr typedef.
12897 (dw2_get_file_names_reader): Use line_header_up. Adjust to use
12898 std::vector. Remove free_line_header call.
12899 (dwarf2_build_include_psymtabs): Use line_header_up. Remove
12900 free_line_header call.
12901 (free_cu_line_header): Delete.
12902 (handle_DW_AT_stmt_list, handle_DW_AT_stmt_list)
12903 (setup_type_unit_groups): Use line_header_up instead of cleanups.
12904 Adjust to use std::vector.
12905 (free_line_header): Delete.
12906 (free_line_header_voidp): Use delete.
12907 (add_include_dir): Replace with ...
12908 (line_header::add_include_dir): ... this method. Use std::vector.
12909 (add_file_name): Replace with ...
12910 (line_header::add_file_name): ... this method. Use std::vector.
12911 (add_include_dir_stub): Delete.
12912 (read_formatted_entries): Remove memset.
12913 (dwarf_decode_line_header): Return a line_header_up instead of a
12914 raw pointer. Remove cleanup handling. Pass lambdas to
12915 read_formatted_entries. Adjust to use line_header methods.
12916 (dwarf_decode_lines_1): Adjust to use line_header methods.
12917 (dwarf_decode_lines, file_file_name, file_full_name): Adjust to
12918 use std::vector.
12919
d62a8ae2
SM
129202017-04-04 Simon Marchi <simon.marchi@polymtl.ca>
12921
12922 * remote.c (set_general_thread, set_continue_thread): Use ptid_t
12923 instead of struct ptid.
12924
db3a1dc7
AH
129252017-05-04 Alan Hayward <alan.hayward@arm.com>
12926
12927 * frame.c (get_frame_register_bytes): Unwind using value.
12928 (put_frame_register_bytes): Likewise.
12929
b1b45502
IB
129302017-03-30 Iain Buclaw <ibuclaw@gdcproject.org>
12931
12932 * d-exp.y (type_aggregate_p): Treat TYPE_CODE_MODULE as being
12933 aggregate-like.
12934
ec13808e
JK
129352017-03-29 Jan Kratochvil <jan.kratochvil@redhat.com>
12936
12937 * auto-load.c (auto_load_section_scripts): Check SEC_HAS_CONTENTS.
12938
12316564
YQ
129392017-03-29 Yao Qi <yao.qi@linaro.org>
12940
12941 * gdbthread.h (struct thread_info): Declare constructor and
12942 destructor. Add some in-class member initializers.
12943 * thread.c (free_thread): Remove.
12944 (init_thread_list): Call delete instead of free_thread.
12945 (new_thread): Call thread_info constructor.
12946 (thread_info::thread_info): New function.
12947 (thread_info::~thread_info): New function.
12948 (delete_thread_1): Call delete instead of free_thread.
12949 (make_cleanup_restore_current_thread): Move tp and frame to
12950 inner block.
12951
fe5f7374
AK
129522017-03-28 Anton Kolesov <anton.kolesov@synopsys.com>
12953
12954 * arc-tdep.c (arc_frame_cache): Add support for prologue analysis.
12955 (arc_skip_prologue): Likewise.
12956 (arc_make_frame_cache): Likewise.
12957 (arc_pv_get_operand): New function.
12958 (arc_is_in_prologue): Likewise.
12959 (arc_analyze_prologue): Likewise.
12960 (arc_print_frame_cache): Likewise.
12961 (MAX_PROLOGUE_LENGTH): New constant.
12962
eea78757
AK
129632017-03-28 Anton Kolesov <anton.kolesov@synopsys.com>
12964
12965 * configure.tgt: Add arc-insn.o.
12966 * arc-tdep.c (arc_delayed_print_insn): Make non-static.
12967 (dump_arc_instruction_command): New function.
12968 (arc_fprintf_disasm): Likewise.
12969 (arc_disassemble_info): Likewise.
12970 (arc_insn_get_operand_value): Likewise.
12971 (arc_insn_get_operand_value_signed): Likewise.
12972 (arc_insn_get_memory_base_reg): Likewise.
12973 (arc_insn_get_memory_offset): Likewise.
12974 (arc_insn_get_branch_target): Likewise.
12975 (arc_insn_dump): Likewise.
12976 (arc_insn_get_linear_next_pc): Likewise.
12977 * arc-tdep.h (arc_delayed_print_insn): Add function declaration.
12978 (arc_disassemble_info): Likewise.
12979 (arc_insn_get_branch_target): Likewise.
12980 (arc_insn_get_linear_next_pc): Likewise.
12981 * NEWS: Mention new "maint print arc arc-instruction".
12982
3be78afd
AK
129832017-03-28 Anton Kolesov <anton.kolesov@synopsys.com>
12984
12985 * arc-tdep (maintenance_print_arc_list): New variable.
12986 (maintenance_print_arc_command): New function.
12987
296ec4fa
AK
129882017-03-28 Anton Kolesov <anton.kolesov@synopsys.com>
12989
12990 * arc-tdep.c (core_v2_register_names, core_arcompact_register_names)
12991 Add "limm" and "reserved".
12992 (arc_cannot_fetch_register, arc_cannot_store_register): Add
12993 ARC_RESERVED_REGNUM and ARC_LIMM_REGNUM.
12994 * arc-tdep.h (arc_regnum): Likewise.
12995
f74f865e
MF
129962017-03-27 Max Filippov <jcmvbkbc@gmail.com>
12997
12998 * xtensa-linux-nat.c (fill_gregset): Call regcache_raw_collect
12999 for THREADPTR register.
13000 (supply_gregset_reg): Call regcache_raw_supply for THREADPTR
13001 register.
13002 * xtensa-tdep.c (XTENSA_DBREGN_UREG): New definition.
13003 (xtensa_derive_tdep): Initialize tdep->threadptr_regnum.
13004 * xtensa-tdep.h (gdbarch_tdep::threadptr_regnum): New field.
13005
0d0bf81a
MF
130062017-03-27 Max Filippov <jcmvbkbc@gmail.com>
13007
13008 * xtensa-tdep.c (xtensa_pseudo_register_read): Treat all
13009 registers above gdbarch_num_regs (gdbarch) as privileged in
13010 call0 ABI.
13011
0ce4291e
MF
130122017-03-27 Max Filippov <jcmvbkbc@gmail.com>
13013
13014 * xtensa-linux-nat.c (fill_gregset): Call regcache_raw_collect
13015 for a single specified register or for all registers in
13016 a0_base..a0_base + C0_NREGS range.
13017 (supply_gregset_reg): Call regcache_raw_supply for a single
13018 specified register or for all registers in a0_base..a0_base +
13019 C0_NREGS range.
13020
c56054f9
MF
130212017-03-27 Max Filippov <jcmvbkbc@gmail.com>
13022
13023 * arch/xtensa.h (C0_NREGS): Add definition.
13024 * xtensa-tdep.c (C0_NREGS): Remove definition.
13025
a4398628
MF
130262017-03-27 Max Filippov <jcmvbkbc@gmail.com>
13027
13028 * xtensa-tdep.c (xtensa_scan_prologue, call0_analyze_prologue):
13029 Drop xtensa_default_isa initialization.
13030 (xtensa_gdbarch_init): Initialize xtensa_default_isa.
13031
8c43009f
PA
130322017-03-27 Pedro Alves <palves@redhat.com>
13033
13034 * dwarf2read.c (file_entry) <dir_index>: Add comment.
13035 (file_entry::include_dir): New method.
13036 (line_header::include_dir_at, line_header::file_name_at): New
13037 methods.
13038 (setup_type_unit_groups, setup_type_unit_groups)
13039 (psymtab_include_file_name): Simplify using the new methods.
13040 (lnp_state_machine) <the_line_header>: New field.
13041 <file>: Add comment.
13042 (lnp_state_machine::current_file): New method.
13043 (dwarf_record_line): Simplify using the new methods.
13044 (init_lnp_state_machine): Initialize the "the_line_header" field.
13045 (dwarf_decode_lines_1, dwarf_decode_lines, file_file_name):
13046 Simplify using the new methods.
13047
a7e80b9e
PA
130482017-03-27 Pedro Alves <palves@redhat.com>
13049
13050 * cp-name-parser.y (make_empty): Delete.
13051 (demangler_special, nested_name, ptr_operator, array_indicator)
13052 (direct_declarator, declarator_1): Use fill_comp instead of
13053 make_empty.
13054
21047726
PA
130552017-03-27 Pedro Alves <palves@redhat.com>
13056
13057 * xml-support.h (gdb_xml_debug): Pass a "first-to-check" argument
13058 to ATTRIBUTE_PRINTF.
13059 * solib-target.c (library_list_start_list): Print "string" not
13060 "version".
13061 * xml-tdesc.c (tdesc_start_field): Pass "field_name" to
13062 gdb_xml_error call.
13063
d721ba37
PA
130642017-03-27 Pedro Alves <palves@redhat.com>
13065
13066 * dwarf2read.c (struct file_and_directory): New.
13067 (dwarf2_get_dwz_file): Adjust to use std::string.
13068 (dw2_get_file_names_reader): Adjust to use file_and_directory.
13069 (find_file_and_directory): Adjust to return a file_and_directory
13070 object.
13071 (read_file_scope): Adjust to use file_and_directory. Remove
13072 make_cleanup/do_cleanups calls.
13073 (open_and_init_dwp_file): Adjust to use std::string. Remove
13074 make_cleanup/do_cleanups calls.
13075 * python/python.c (do_start_initialization): Adjust to ldirname
13076 returning a std::string.
13077 * utils.c (ldirname): Now returns a std::string.
13078 * utils.h (ldirname): Change return type to std::string.
13079 * xml-syscall.c (xml_init_syscalls_info): Adjust to ldirname
13080 returning a std::string.
13081 * xml-tdesc.c (file_read_description_xml): Likewise.
13082
ed771251
AH
130832017-03-24 Alan Hayward <alan.hayward@arm.com>
13084
13085 * regcache.c (regcache_debug_print_register): New function.
13086 * regcache.h (regcache_debug_print_register): New declaration.
13087 * target.c (debug_print_register): Remove.
13088 (target_fetch_registers): Call regcache_debug_print_register.
13089 (target_store_registers): Likewise.
13090
568c1b9f
PB
130912017-03-24 Pádraig Brady <pbrady@fb.com>
13092
13093 * dwarf2read.c (setup_type_unit_groups): Ensure dir_index doesn't
13094 reference beyond the 'lh->include_dirs' array before accessing to
13095 it.
13096 (psymtab_include_file_name): Likewise.
13097 (dwarf_decode_lines_1): Likewise.
13098 (dwarf_decode_lines): Likewise.
13099 (file_file_name): Likewise.
13100
3e00d44f
SM
131012017-03-23 Simon Marchi <simon.marchi@ericsson.com>
13102
13103 * fbsd-tdep.c (fbsd_corefile_thread): Don't set/restore
13104 inferior_ptid.
13105 * proc-service.c (ps_lgetregs, ps_lsetregs, ps_lgetfpregs,
13106 ps_lsetfpregs): Likewise.
13107 * regcache.c (regcache_raw_update, regcache_raw_write): Likewise.
13108 * sol-thread.c (ps_lgetregs, ps_lsetregs, ps_lgetfpregs,
13109 ps_lsetfpregs): Likewise.
13110 * target.c (target_fetch_registers, target_store_registers):
13111 Remove asserts.
13112
077ae656
AH
131132017-03-23 Alan Hayward <alan.hayward@arm.com>
13114
13115 * sol-thread.c (sol_thread_store_registers): Remove regcache calls.
13116
1e2b521d
YQ
131172017-03-23 Yao Qi <yao.qi@linaro.org>
13118
13119 * aarch64-tdep.c (aarch64_process_record_test): Declare.
13120 (_initialize_aarch64_tdep): Register it.
13121 (aarch64_record_load_store): Handle PRFM instruction.
13122 (aarch64_process_record_test): New function.
13123
33877125
YQ
131242017-03-23 Yao Qi <yao.qi@linaro.org>
13125
13126 * aarch64-tdep.c (aarch64_record_load_store): Fix code
13127 indentation.
13128
a0eef940
YQ
131292017-03-23 Yao Qi <yao.qi@linaro.org>
13130
13131 * aarch64-tdep.c: Remove AARCH64_RECORD_FAILURE.
13132
3f2a3564
PR
131332017-03-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
13134
13135 python/python.c (do_start_initialization): Fix memory leak.
13136
b67aeab0
SM
131372017-03-22 Simon Marchi <simon.marchi@polymtl.ca>
13138
13139 * inf-ptrace.c (inf_ptrace_xfer_partial): Get pid from ptid
13140 using get_ptrace_pid.
13141 * linux-nat.c (linux_nat_xfer_partial): Don't set/restore
13142 inferior_ptid.
13143 (linux_proc_xfer_partial, linux_proc_xfer_spu): Use lwp of
13144 inferior_ptid instead of pid.
13145
ffdbe864
YQ
131462017-03-22 Yao Qi <yao.qi@linaro.org>
13147
13148 * aarch64-tdep.c: Wrap locally used classes in anonymous
13149 namespace.
13150 * arm-tdep.c: Likewise.
13151 * linespec.c: Likewise.
13152 * ui-out.c: Likewise.
13153
9d736fbf
JG
131542017-03-22 Jonah Graham <jonah@kichwacoders.com>
13155
13156 PR gdb/19637
13157 * python/lib/gdb/printer/bound_registers.py: Import sys.
13158
3de88e9a
SM
131592017-03-21 Simon Marchi <simon.marchi@ericsson.com>
13160
13161 * windows-nat.c (do_windows_fetch_inferior_registers): Add
13162 windows_thread_info parameter and use it instead of
13163 current_thread.
13164 (windows_fetch_inferior_registers): Don't set current_thread,
13165 pass the thread to do_windows_fetch_inferior_registers. Use
13166 ptid from regcache instead of inferior_ptid.
13167 (do_windows_store_inferior_registers): Add windows_thread_info
13168 parameter and use it instead of current_thread.
13169 (windows_store_inferior_registers): Don't set current_thread,
13170 pass the thread to do_windows_store_inferior_registers. Use
13171 ptid from regcache instead of inferior_ptid.
13172
0e7b8f61
SM
131732017-03-21 Simon Marchi <simon.marchi@ericsson.com>
13174
13175 * ser-mingw.c (ser_windows_raw): Remove reference to
13176 struct serial::current_timeout.
13177
5badf10a
IR
131782017-03-21 Ivo Raisr <ivo.raisr@oracle.com>
13179
13180 PR tdep/20928
13181 * gdb/sparc-tdep.h (gdbarch_tdep) <sparc64_ccr_type>: New field.
13182 * gdb/sparc64-tdep.c (sparc64_ccr_type): New function.
13183 (sparc64_fsr_type): Fix %fsr decoding.
13184
cee59b3f
TW
131852017-03-21 Tim Wiederhake <tim.wiederhake@intel.com>
13186
13187 * python/py-record-btrace.c (btpy_insn_data): Change return type
13188 for Python 2.
13189
639a9038
SM
131902017-03-20 Simon Marchi <simon.marchi@polymtl.ca>
13191
13192 * spu-linux-nat.c (spu_fetch_inferior_registers,
13193 spu_store_inferior_registers): Use ptid from regcache, set and
13194 restore inferior_ptid.
13195 * spu-multiarch.c (spu_fetch_registers, spu_store_registers):
13196 Likewise.
13197
bcc0c096
SM
131982017-03-20 Simon Marchi <simon.marchi@polymtl.ca>
13199
13200 * i386-linux-nat.c (fetch_register, store_register,
13201 i386_linux_fetch_inferior_registers,
13202 i386_linux_store_inferior_registers): Use ptid from regcache.
13203 * ia64-linux-nat.c (ia64_linux_fetch_register,
13204 ia64_linux_store_register): Likewise.
13205 * inf-ptrace.c (inf_ptrace_fetch_register,
13206 inf_ptrace_store_register): Likewise.
13207 * m32r-linux-nat.c (m32r_linux_fetch_inferior_registers,
13208 m32r_linux_store_inferior_registers): Likewise.
13209 * m68k-bsd-nat.c (m68kbsd_fetch_inferior_registers,
13210 m68kbsd_store_inferior_registers): Likewise.
13211 * m68k-linux-nat.c (fetch_register, store_register,
13212 m68k_linux_fetch_inferior_registers,
13213 m68k_linux_store_inferior_registers): Likewise.
13214 * m88k-bsd-nat.c (m88kbsd_fetch_inferior_registers,
13215 m88kbsd_store_inferior_registers): Likewise.
13216 * mips-fbsd-nat.c (mips_fbsd_fetch_inferior_registers,
13217 mips_fbsd_store_inferior_registers): Likewise.
13218 * mips-linux-nat.c (mips64_linux_regsets_fetch_registers,
13219 mips64_linux_regsets_store_registers): Likewise.
13220 * mips-nbsd-nat.c (mipsnbsd_fetch_inferior_registers,
13221 mipsnbsd_store_inferior_registers): Likewise.
13222 * mips-obsd-nat.c (mips64obsd_fetch_inferior_registers,
13223 mips64obsd_store_inferior_registers): Likewise.
13224 * nto-procfs.c (procfs_fetch_registers, procfs_store_registers):
13225 Likewise.
13226 * ppc-fbsd-nat.c (ppcfbsd_fetch_inferior_registers,
13227 ppcfbsd_store_inferior_registers): Likewise.
13228 * ppc-linux-nat.c (ppc_linux_fetch_inferior_registers,
13229 ppc_linux_store_inferior_registers): Likewise.
13230 * ppc-nbsd-nat.c (ppcnbsd_fetch_inferior_registers,
13231 ppcnbsd_store_inferior_registers): Likewise.
13232 * ppc-obsd-nat.c (ppcobsd_fetch_registers,
13233 ppcobsd_store_registers): Likewise.
13234 * procfs.c (procfs_fetch_registers, procfs_store_registers):
13235 Likewise.
13236 * ravenscar-thread.c (ravenscar_fetch_registers,
13237 ravenscar_store_registers, ravenscar_prepare_to_store):
13238 Likewise.
13239 * record-btrace.c (record_btrace_fetch_registers,
13240 record_btrace_store_registers, record_btrace_prepare_to_store):
13241 Likewise.
13242 * remote-sim.c (gdbsim_fetch_register, gdbsim_store_register):
13243 Lookup inferior using ptid from regcache, instead of
13244 current_inferior.
13245 * remote.c (remote_fetch_registers, remote_store_registers): Use
13246 ptid from regcache.
13247 * rs6000-nat.c (fetch_register, store_register): Likewise.
13248 * s390-linux-nat.c (s390_linux_fetch_inferior_registers,
13249 s390_linux_store_inferior_registers): Likewise.
13250 * sh-nbsd-nat.c (shnbsd_fetch_inferior_registers,
13251 shnbsd_store_inferior_registers): Likewise.
13252 * sol-thread.c (sol_thread_fetch_registers,
13253 sol_thread_store_registers): Likewise.
13254 * sparc-nat.c (sparc_fetch_inferior_registers,
13255 sparc_store_inferior_registers): Likewise.
13256 * tilegx-linux-nat.c (fetch_inferior_registers,
13257 store_inferior_registers): Likewise.
13258 * vax-bsd-nat.c (vaxbsd_fetch_inferior_registers,
13259 vaxbsd_store_inferior_registers): Likewise.
13260 * xtensa-linux-nat.c (fetch_gregs, store_gregs, fetch_xtregs,
13261 store_xtregs): Likewise.
13262
c0f55cc6
AV
132632017-03-20 Artemiy Volkov <artemiyv@acm.org>
13264
13265 PR gdb/14441
13266 * NEWS: Mention support for rvalue references in GDB and python.
13267 * doc/gdb.texinfo (C Plus Plus Expressions): Mention that GDB
13268 supports both lvalue and rvalue references.
13269
15c0a2a9
AV
132702017-03-20 Artemiy Volkov <artemiyv@acm.org>
13271
13272 PR gdb/14441
13273 * gdbtypes.c (rank_one_type): Implement overloading
13274 resolution rules regarding rvalue references.
13275
aa006118
AV
132762017-03-20 Artemiy Volkov <artemiyv@acm.org>
13277
13278 PR gdb/14441
13279 * aarch64-tdep.c (aarch64_type_align)
13280 (aarch64_extract_return_value, aarch64_store_return_value): Change
13281 lvalue reference type checks to general reference type checks.
13282 * amd64-tdep.c (amd64_classify): Likewise.
13283 * amd64-windows-tdep.c (amd64_windows_passed_by_integer_register):
13284 Likewise.
13285 * arm-tdep.c (arm_type_align, arm_extract_return_value)
13286 (arm_store_return_value): Likewise.
13287 * ax-gdb.c (gen_fetch, gen_cast): Likewise.
13288 * c-typeprint.c (c_print_type): Likewise.
13289 * c-varobj.c (adjust_value_for_child_access, c_value_of_variable)
13290 (cplus_number_of_children, cplus_describe_child): Likewise.
13291 * compile/compile-c-symbols.c (generate_vla_size): Likewise.
13292 * completer.c (expression_completer): Likewise.
13293 * cp-support.c (make_symbol_overload_list_adl_namespace):
13294 Likewise.
13295 * darwin-nat-info.c (info_mach_region_command): Likewise.
13296 * dwarf2loc.c (entry_data_value_coerce_ref)
13297 (value_of_dwarf_reg_entry): Likewise.
13298 * eval.c (ptrmath_type_p, evaluate_subexp_standard)
13299 (evaluate_subexp_for_address, evaluate_subexp_for_sizeof):
13300 Likewise.
13301 * findvar.c (extract_typed_address, store_typed_address):
13302 Likewise.
13303 * gdbtypes.c (rank_one_type): Likewise.
13304 * hppa-tdep.c (hppa64_integral_or_pointer_p): Likewise.
13305 * infcall.c (value_arg_coerce): Likewise.
13306 * language.c (pointer_type): Likewise.
13307 * m32c-tdep.c (m32c_reg_arg_type, m32c_m16c_address_to_pointer):
13308 Likewise.
13309 * m88k-tdep.c (m88k_integral_or_pointer_p): Likewise.
13310 * mn10300-tdep.c (mn10300_type_align): Likewise.
13311 * msp430-tdep.c (msp430_push_dummy_call): Likewise.
13312 * ppc-sysv-tdep.c (do_ppc_sysv_return_value)
13313 (ppc64_sysv_abi_push_param, ppc64_sysv_abi_return_value):
13314 Likewise.
13315 * printcmd.c (print_formatted, x_command): Likewise.
13316 * python/py-type.c (typy_get_composite, typy_template_argument):
13317 Likewise.
13318 * python/py-value.c (valpy_referenced_value)
13319 (valpy_get_dynamic_type, value_has_field): Likewise.
13320 * s390-linux-tdep.c (s390_function_arg_integer): Likewise.
13321 * sparc-tdep.c (sparc_integral_or_pointer_p): Likewise.
13322 * sparc64-tdep.c (sparc64_integral_or_pointer_p): Likewise.
13323 * spu-tdep.c (spu_scalar_value_p): Likewise.
13324 * symtab.c (lookup_symbol_aux): Likewise.
13325 * typeprint.c (whatis_exp, print_type_scalar): Likewise.
13326 * valarith.c (binop_types_user_defined_p, unop_user_defined_p):
13327 Likewise.
13328 * valops.c (value_cast_pointers, value_cast)
13329 (value_reinterpret_cast, value_dynamic_cast, value_addr, typecmp)
13330 (value_struct_elt, value_struct_elt_bitpos)
13331 (value_find_oload_method_list, find_overload_match)
13332 (value_rtti_indirect_type): Likewise.
13333 * valprint.c (val_print_scalar_type_p, generic_val_print):
13334 Likewise.
13335 * value.c (value_actual_type, value_as_address, unpack_long)
13336 (pack_long, pack_unsigned_long, coerce_ref_if_computed)
13337 (coerce_ref): Likewise.
13338 * varobj.c (varobj_get_value_type): Likewise.
13339
3fcf899d
AV
133402017-03-20 Artemiy Volkov <artemiyv@acm.org>
13341
13342 PR gdb/14441
13343 * doc/python.texi (Types in Python): Add TYPE_CODE_RVALUE_REF to
13344 table of constants.
13345 * python/lib/gdb/command/explore.py: Support exploring values
13346 of rvalue reference types.
13347 * python/lib/gdb/types.py: Implement get_basic_type() for
13348 rvalue reference types.
13349 * python/py-type.c (pyty_codes) <TYPE_CODE_RVALUE_REF>: New
13350 constant.
13351 * python/py-value.c (valpy_getitem): Add an rvalue reference
13352 check.
13353 (valpy_reference_value): Add new parameter "refcode".
13354 (valpy_lvalue_reference_value, valpy_rvalue_reference_value):
13355 New wrappers for valpy_reference_value().
13356 * python/py-xmethods.c (gdbpy_get_xmethod_result_type)
13357 (gdbpy_invoke_xmethod): Likewise.
13358
4297a3f0
AV
133592017-03-20 Artemiy Volkov <artemiyv@acm.org>
13360
13361 PR gdb/14441
13362 * dwarf2read.c (process_die, read_type_die_1): Handle the
13363 DW_TAG_rvalue_reference_type DIE.
13364 (read_tag_reference_type): Add new parameter "refcode".
13365
e1cb3213
AV
133662017-03-20 Artemiy Volkov <artemiyv@acm.org>
13367
13368 PR gdb/14441
13369 * c-typeprint.c (c_print_type, c_type_print_varspec_prefix)
13370 (c_type_print_modifier, c_type_print_varspec_suffix)
13371 (c_type_print_base): Support printing rvalue reference types.
13372 * c-valprint.c (c_val_print, c_value_print): Support printing
13373 rvalue reference values.
13374
e4347c89
AV
133752017-03-20 Artemiy Volkov <artemiyv@acm.org>
13376
13377 PR gdb/14441
13378 * cp-name-parser.y (ptr_operator): Handle the '&&' token in
13379 typename.
13380 * cp-support.c (replace_typedefs): Handle
13381 DEMANGLE_COMPONENT_RVALUE_REFERENCE.
13382 * python/py-type.c (typy_lookup_type): Likewise.
13383
53cc15f5
AV
133842017-03-20 Artemiy Volkov <artemiyv@acm.org>
13385
13386 PR gdb/14441
13387 * c-exp.y (ptr_operator): Handle the '&&' token in the typename.
13388 * parse.c (insert_type): Change assert statement.
13389 (follow_types): Handle rvalue reference types.
13390 * parser-defs.h (enum type_pieces) <tp_rvalue_reference>: New
13391 constant.
13392
a65cfae5
AV
133932017-03-20 Artemiy Volkov <artemiyv@acm.org>
13394
13395 PR gdb/14441
13396 * ada-lang.c (ada_evaluate_subexp): Adhere to the new
13397 value_ref() interface.
13398 * c-valprint.c (c_value_print): Likewise.
13399 * infcall.c (value_arg_coerce): Likewise.
13400 * python/py-value.c (valpy_reference_value): Likewise.
13401 * valops.c (value_cast, value_reinterpret_cast)
13402 (value_dynamic_cast, typecmp): Likewise.
13403 (value_ref): Parameterize by kind of return value reference type.
13404 * value.h (value_ref): Add new parameter "refcode".
13405
3b224330
AV
134062017-03-20 Artemiy Volkov <artemiyv@acm.org>
13407
13408 PR gdb/14441
13409 * dwarf2read.c (read_tag_reference_type): Use
13410 lookup_lvalue_reference_type() instead of lookup_reference_type().
13411 * eval.c (evaluate_subexp_standard): Likewise.
13412 * f-exp.y: Likewise.
13413 * gdbtypes.c (make_reference_type, lookup_reference_type):
13414 Generalize with rvalue reference types.
13415 (lookup_lvalue_reference_type, lookup_rvalue_reference_type): New
13416 convenience wrappers for lookup_reference_type().
13417 * gdbtypes.h (make_reference_type, lookup_reference_type): Add a
13418 reference kind parameter.
13419 (lookup_lvalue_reference_type, lookup_rvalue_reference_type): Add
13420 wrappers for lookup_reference_type().
13421 * guile/scm-type.c (gdbscm_type_reference): Use
13422 lookup_lvalue_reference_type() instead of lookup_reference_type().
13423 * guile/scm-value.c (gdbscm_value_dynamic_type): Likewise.
13424 * parse.c (follow_types): Likewise.
13425 * python/py-type.c (typy_reference, typy_lookup_type): Likewise.
13426 * python/py-value.c (valpy_get_dynamic_type, valpy_getitem):
13427 Likewise.
13428 * python/py-xmethods.c (gdbpy_get_xmethod_result_type)
13429 (gdbpy_invoke_xmethod): Likewise.
13430 * stabsread.c: Provide extra argument to make_reference_type()
13431 call.
13432 * valops.c (value_ref, value_rtti_indirect_type): Use
13433 lookup_lvalue_reference_type() instead of lookup_reference_type().
13434
f9aeb8d4
AV
134352017-03-20 Artemiy Volkov <artemiyv@acm.org>
13436
13437 PR gdb/14441
13438 * gdbtypes.h (enum type_code) <TYPE_CODE_RVALUE_REF>: New constant.
13439 (TYPE_IS_REFERENCE): New macro.
13440 (struct type): Add rvalue_reference_type field.
13441 (TYPE_RVALUE_REFERENCE_TYPE): New macro.
13442
51457a05
MAL
134432017-03-20 Marc-Andre Laperle <marc-andre.laperle@ericsson.com>
13444
13445 * NEWS: Add an entry about new '-file-list-shared-libraries' command.
13446 * mi/mi-cmd-file.c (mi_cmd_file_list_shared_libraries):
13447 New function definition.
13448 * mi/mi-cmds.c (mi_cmds): Add -file-list-shared-libraries command.
13449 * mi/mi-cmds.h (mi_cmd_file_list_shared_libraries):
13450 New function declaration.
13451 * mi/mi-interp.c (mi_output_solib_attribs): New Function.
13452 * mi/mi-interp.h: New file.
13453 * solib.c (info_sharedlibrary_command): Replace for loop with
13454 ALL_SO_LIBS macro
13455 * solib.h (update_solib_list): New function declaration.
13456 (so_list_head): Move macro.
13457 * solist.h (ALL_SO_LIBS): New macro.
13458
e696b3ad
MAL
134592017-03-20 Marc-Andre Laperle <marc-andre.laperle@ericsson.com>
13460
13461 * infcmd.c (post_create_inferior): Remove unused argument in
13462 call to solib_add.
13463 * remote.c (remote_start_remote): Likewise.
13464 * solib-frv.c (frv_fetch_objfile_link_map): Likewise.
13465 * solib-svr4.c: (svr4_fetch_objfile_link_map): Likewise.
13466 (enable_break): Likewise.
13467 * solib.c (update_solib_list): Remove unused target argument
13468 and its documentation.
13469 (solib_add): Remove unused target argument. Remove unused
13470 argument in call to update_solib_list.
13471 (info_sharedlibrary_command): Remove unused argument in call
13472 to update_solib_list.
13473 (sharedlibrary_command): Remove unused argument in call to
13474 solib_add.
13475 (handle_solib_event): Likewise.
13476 (reload_shared_libraries): Likewise.
13477 * solib.h (solib_add): Remove unused target argument.
13478
dcb84eda
AA
134792017-03-20 Andreas Arnez <arnez@linux.vnet.ibm.com>
13480
13481 * s390-linux-tdep.c (is_rsi, is_rie): Remove functions.
13482 (s390_displaced_step_fixup): Cover relative branches with the
13483 default fixup handling. This fixes lack of support for some
13484 relative branch instructions.
13485
d9cb6cdc
SM
134862017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
13487
13488 * i386-gnu-nat.c (gnu_fetch_registers, gnu_store_registers): Use
13489 ptid from regcache.
13490
1afaf9f4
SM
134912017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
13492
13493 * i386-darwin-nat.c (i386_darwin_fetch_inferior_registers,
13494 i386_darwin_store_inferior_registers): Use ptid from regcache.
13495
aac12e24
SM
134962017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
13497
13498 * i386-bsd-nat.c (i386bsd_fetch_inferior_registers,
13499 i386bsd_store_inferior_registers): Use ptid from regcache.
13500
bbe1eef1
SM
135012017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
13502
13503 * hppa-obsd-nat.c (hppaobsd_fetch_registers,
13504 hppaobsd_store_registers): Use ptid from regcache.
13505
10799020
SM
135062017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
13507
13508 * hppa-nbsd-nat.c (hppanbsd_fetch_registers,
13509 hppanbsd_store_registers): Use ptid from regcache.
13510
00204cf7
SM
135112017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
13512
13513 * hppa-linux-nat.c (fetch_register, store_register): Use ptid
13514 from regcache. Use get_ptrace_pid.
13515
11a33714
SM
135162017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
13517
13518 * corelow.c (get_core_register_section): Use ptid from regcache,
13519 update doc.
13520
317cd492
SM
135212017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
13522
13523 * bsd-uthread.c (bsd_uthread_fetch_registers,
13524 bsd_uthread_store_registers): Use ptid from regcache, set and
13525 restore inferior_ptid.
13526
9ac8a7c2
SM
135272017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
13528
13529 * arm-nbsd-nat.c (fetch_register, fetch_regs, fetch_fp_register,
13530 fetch_fp_regs, store_register, store_regs, store_fp_register,
13531 store_fp_regs): Use ptid from regcache.
13532
4ac4bb6a
SM
135332017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
13534
13535 * arm-linux-nat.c (fetch_fpregs, store_fpregs, fetch_regs,
13536 store_regs, fetch_wmmx_regs, store_wmmx_regs, fetch_vfp_regs,
13537 store_vfp_regs): Use ptid from regcache.
13538
9bcbdca8
PA
135392017-03-17 Pedro Alves <palves@redhat.com>
13540
13541 PR remote/21188
13542 * ser-base.c (ser_base_wait_for): Add comment.
13543 (do_ser_base_readchar): Improve comment based on the ser-unix.c's
13544 version.
13545 * ser-unix.c (hardwire_raw): Remove reference to
13546 scb->current_timeout.
13547 (wait_for, do_hardwire_readchar, hardwire_readchar): Delete.
13548 (hardwire_ops): Install ser_base_readchar instead of
13549 hardwire_readchar.
13550 * serial.h (struct serial) <current_timeout, timeout_remaining>:
13551 Remove fields.
13552
7503099f
JG
135532017-03-17 Jonah Graham <jonah@kichwacoders.com>
13554
13555 PR gdb/19637
13556 * python/lib/gdb/printer/bound_registers.py: Add support for
13557 Python 3.
13558
7942e96e
AA
135592017-03-16 Andreas Arnez <arnez@linux.vnet.ibm.com>
13560
13561 * dwarf2loc.c (indirect_synthetic_pointer): Get data type of
13562 pointed-to DIE and pass it to dwarf2_evaluate_loc_desc_full.
13563 (dwarf2_evaluate_loc_desc_full): New parameter subobj_type; rename
13564 byte_offset to subobj_byte_offset. Fix the handling of
13565 DWARF_VALUE_STACK on big-endian targets when coming via an
13566 implicit pointer.
13567 (dwarf2_evaluate_loc_desc): Adjust call to
13568 dwarf2_evaluate_loc_desc_full.
13569 * dwarf2loc.h (dwarf2_fetch_die_type_sect_off): New declaration.
13570 * dwarf2read.c (dwarf2_fetch_die_type_sect_off): New function.
13571
ba14f379
YQ
135722017-03-16 Yao Qi <yao.qi@linaro.org>
13573
13574 * arm-tdep.c (thumb_record_misc): Decode CBNZ, CBZ, REV16,
13575 and REVSH instructions.
13576
b121eeb9
YQ
135772017-03-16 Yao Qi <yao.qi@linaro.org>
13578
13579 * arm-tdep.c [GDB_SELF_TEST]: include "selftests.h".
13580 (arm_record_test): Declare.
13581 (_initialize_arm_tdep) [GDB_SELF_TEST]: call register_self_test.
13582 (thumb_record_ld_st_reg_offset): Rewrite the opcode matching to
13583 align with the manual.
13584 (thumb_record_misc): Adjust the code order to align with the
13585 manual.
13586 (thumb2_record_decode_insn_handler): Fix instruction matching.
13587 (instruction_reader_thumb): New class.
13588 (arm_record_test): New function.
13589
728a7913
YQ
135902017-03-16 Yao Qi <yao.qi@linaro.org>
13591
13592 * arm-tdep.c (abstract_memory_reader): New class.
13593 (instruction_reader): New class.
13594 (extract_arm_insn): Add argument 'reader'. Callers updated.
13595 (decode_insn): Likewise.
13596
34b43320
DE
135972017-03-16 Doug Evans <dje@google.com>
13598
a7c0469f
DE
13599 * guile/scm-lazy-string.c (lazy_string_smob): Clarify use of LENGTH
13600 member. Change type of TYPE member to SCM. All uses updated.
13601 (lsscm_make_lazy_string_smob): Add assert.
13602 (lsscm_make_lazy_string): Flag bad length values.
13603 (lsscm_elt_type): New function.
13604 (gdbscm_lazy_string_to_value): Rewrite to use
13605 lsscm_safe_lazy_string_to_value.
13606 (lsscm_safe_lazy_string_to_value): Fix handling of TYPE_CODE_PTR.
13607 * guile/scm-value.c (gdbscm_value_to_lazy_string): Flag bad length
13608 values. Fix TYPE_CODE_PTR. Handle TYPE_CODE_ARRAY. Handle typedefs
13609 in incoming type.
13610 * guile/guile-internal.h (tyscm_scm_to_type): Declare.
13611 * guile/scm-type.c (tyscm_scm_to_type): New function.
13612
136132017-03-15 Doug Evans <dje@google.com>
13614
34b43320
DE
13615 PR python/17728, python/18439, python/18779
13616 * python/py-lazy-string.c (lazy_string_object): Clarify use of LENGTH
13617 member. Change type of TYPE member to PyObject *. All uses updated.
13618 (stpy_convert_to_value): Fix handling of TYPE_CODE_PTR.
13619 (gdbpy_create_lazy_string_object): Flag bad length values.
13620 Handle TYPE_CODE_ARRAY with possibly different user-provided length.
13621 Handle typedefs in incoming type.
13622 (stpy_lazy_string_elt_type): New function.
13623 (gdbpy_extract_lazy_string): Call it.
13624 * python/py-value.c (valpy_lazy_string): Flag bad length values.
13625 Fix handling of TYPE_CODE_PTR. Handle TYPE_CODE_ARRAY. Handle
13626 typedefs in incoming type.
13627
a3a5fecc
DE
136282017-03-16 Doug Evans <dje@google.com>
13629
13630 * guile/guile-internal.h (tyscm_scm_to_type): Declare.
13631 * guile/scm-type.c (tyscm_scm_to_type): New function.
13632
28f1c605
JW
136332017-03-16 Jiong Wang <jiong.wang@arm.com>
13634
13635 * inf-ptrace.c (inf_ptrace_peek_poke): Change the type to
13636 "ULONGEST" for "skip".
13637
87c336f6
AA
136382017-03-14 Andreas Arnez <arnez@linux.vnet.ibm.com>
13639
13640 PR gdb/21220
13641 * inf-ptrace.c (inf_ptrace_xfer_partial): In "case
13642 TARGET_OBJECT_MEMORY", extract the logic for ptrace peek/poke...
13643 (inf_ptrace_peek_poke): ...here. New function. Now also loop
13644 over ptrace peek/poke until end of buffer or error.
13645
cf81cf60
SM
136462017-03-14 Simon Marchi <simon.marchi@ericsson.com>
13647
13648 * parse.c (length_of_subexp): Make static.
13649 * parser-defs.h (length_of_subexp): Remove.
13650
a379284a
AA
136512017-03-14 Andreas Arnez <arnez@linux.vnet.ibm.com>
13652
13653 * linux-nat.c (linux_proc_xfer_partial): Handle write operations
13654 as well.
13655
8a6200ba
PA
136562017-03-14 Pedro Alves <palves@redhat.com>
13657
13658 * cp-name-parser.y (cp_demangled_name_to_comp): Update comment.
13659 (main): Use std::unique_ptr. Remove calls to
13660 cp_demangled_name_parse_free.
13661
f79ec206
SM
136622017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
13663
13664 * alpha-bsd-nat.c (alphabsd_fetch_inferior_registers,
13665 alphabsd_store_inferior_registers): Use regcache->ptid instead
13666 of inferior_ptid.
13667
edb5fb00
SM
136682017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
13669
13670 * aix-thread.c (aix_thread_fetch_registers,
13671 aix_thread_store_registers): Use regcache->ptid instead of
13672 inferior_ptid.
13673
55119686
SM
136742017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
13675
13676 * aarch64-linux-nat.c (fetch_gregs_from_thread,
13677 store_gregs_to_thread, fetch_fpregs_from_thread,
13678 store_fpregs_to_thread): Use regcache->ptid instead of
13679 inferior_ptid.
13680
6a06fbb7
SM
136812017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
13682
13683 * amd64-linux-nat.c (amd64_linux_fetch_inferior_registers,
13684 amd64_linux_fetch_inferior_registers): Use regcache->ptid
13685 instead of inferior_ptid.
13686
c6386875
SM
136872017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
13688
13689 * target.c (target_fetch_registers, target_store_registers): Add
13690 assert.
13691
ddaaf0fb
SM
136922017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
13693
13694 * regcache.h (regcache_get_ptid): New function.
13695 * regcache.c (regcache_get_ptid): New function.
13696
b9da89d1 136972017-03-13 Mark Wielaard <mark@klomp.org>
13698
13699 * cp-name-parser.y (make_empty): Initialize d_printing to zero.
13700
5f4d1085
KS
137012017-03-10 Keith Seitz <keiths@redhat.com>
13702
13703 PR c++/8218
13704 * c-typeprint.c (cp_type_print_method_args): Skip artificial arguments.
13705
c65d6b55
PA
137062017-03-08 Pedro Alves <palves@redhat.com>
13707
13708 PR gdb/18360
13709 * infrun.c (start_step_over, do_target_resume, resume)
13710 (restart_threads): Assert we're not resuming a thread that is
13711 meant to be stopped.
13712 (infrun_thread_stop_requested_callback): Delete.
13713 (infrun_thread_stop_requested): If the thread is internally
13714 stopped, queue a pending stop event and clear the thread's
13715 inline-frame state.
13716 (handle_stop_requested): New function.
13717 (handle_syscall_event, handle_inferior_event_1): Use
13718 handle_stop_requested.
13719 (handle_stop_requested): New function.
13720 (handle_signal_stop): Set the thread's stop_signal here instead of
13721 at caller.
13722 (finish_step_over): Clear step over info unconditionally.
13723 (handle_signal_stop): If the user had interrupted the event
13724 thread, consider the stop a random signal.
13725 (handle_signal_stop) <signal arrived while stepping over
13726 breakpoint>: Don't restart threads here.
13727 (stop_waiting): Don't clear step-over info here.
13728
15c22686
PA
137292017-03-08 Pedro Alves <palves@redhat.com>
13730
13731 PR 21206
13732 * common/gdb_unlinker.h (unlinker::unlinker): Attribute nonnull
13733 goes to argument 2, not 1.
13734
6e5d74e7
PA
137352017-03-08 Pedro Alves <palves@redhat.com>
13736
13737 PR cli/21218
13738 * top.c (gdb_readline_wrapper): Avoid passing NULL to
13739 display_gdb_prompt.
13740 (command_line_input): Add comment.
13741
9753a2f6
PA
137422017-03-08 Pedro Alves <palves@redhat.com>
13743
13744 PR tui/21216
13745 * tui/tui-file.c (tui_file::write): New.
13746 * tui/tui-file.h (tui_file): Override "write".
13747 * tui/tui-io.c (do_tui_putc, update_start_line): New functions,
13748 factored out from ...
13749 (tui_puts): ... here.
13750 (tui_putc): Use them.
13751 (tui_write): New function.
13752 * tui/tui-io.h (tui_write): Declare.
13753
1672e0d9
SDJ
137542017-03-07 Sergio Durigan Junior <sergiodj@redhat.com>
13755
13756 * Makefile.in (SFILES): Replace "environ.c" with
13757 "common/environ.c".
13758 (HFILES_NO_SRCDIR): Likewise, for "environ.h".
13759 * environ.c: Include "common-defs.h" instead of "defs.h. Moved
13760 to...
13761 * common/environ.c: ... here.
13762 * environ.h: Moved to...
13763 * common/environ.h: ... here.
13764
f7bb4e3a
PB
137652017-03-07 Peter Bergner <bergner@vnet.ibm.com>
13766
13767 * gdbarch.sh (pstring_ptr): New static function.
13768 (gdbarch_disassembler_options): Use it.
13769 (gdbarch_verify_disassembler_options): Print valid_disassembler_options,
13770 not valid_disassembler_option->name.
13771 * gdbarch.c: Regenerate.
13772
e45ced6c
PB
137732017-03-07 Peter Bergner <bergner@vnet.ibm.com>
13774
13775 * config/powerpc/ppc64-linux.mh (MH_CFLAGS): Delete.
13776
5f6fd321
PA
137772017-03-07 Pedro Alves <palves@redhat.com>
13778
13779 * tui/tui-regs.c (tui_restore_gdbout): Don't delete gdb_stdout.
13780
6dbb839a 137812017-03-07 Walfred Tedeschi <walfred.tedeschi@intel.com>
4a612d6f
WT
13782
13783 * i387-tdep.h (i387_reset_bnd_regs): Add function definition.
13784 * i387-tdep.c (i387_reset_bnd_regs): Add function implementation.
13785 * i386-tdep.c (i386_push_dummy_call): Call i387_reset_bnd_regs.
6dbb839a 13786 * amd64-tdep.c (amd64_push_dummy_call): Call i387_reset_bnd_regs.
4a612d6f 13787
d274ecf4
SM
137882017-03-06 Simon Marchi <simon.marchi@ericsson.com>
13789
13790 * xtensa-linux-nat.c (fetch_gregs): Remove const.
13791
df97be55
SM
137922017-03-03 Simon Marchi <simon.marchi@ericsson.com>
13793
13794 * remote.c (remote_add_target_side_commands): Use range-based
13795 for loop.
13796
7d45f3df
YQ
137972017-03-03 Yao Qi <yao.qi@linaro.org>
13798
13799 PR gdb/21165
13800 * ada-valprint.c (ada_val_print_ref): Call value_fetch_lazy if
13801 value is lazy.
13802 * valprint.c (common_val_print): Likewise.
13803
65b48a81
PB
138042017-02-28 Peter Bergner <bergner@vnet.ibm.com>
13805
13806 * NEWS: Mention new set/show disassembler-options commands.
13807 * doc/gdb.texinfo: Document new set/show disassembler-options commands.
13808 * disasm.c: Include "arch-utils.h", "gdbcmd.h" and "safe-ctype.h".
13809 (prospective_options): New static variable.
13810 (gdb_disassembler::gdb_disassembler): Initialize
13811 m_di.disassembler_options.
13812 (gdb_buffered_insn_length_init_dis): Initilize di->disassembler_options.
13813 (get_disassembler_options): New function.
13814 (set_disassembler_options): Likewise.
13815 (set_disassembler_options_sfunc): Likewise.
13816 (show_disassembler_options_sfunc): Likewise.
13817 (disassembler_options_completer): Likewise.
13818 (_initialize_disasm): Likewise.
13819 * disasm.h (get_disassembler_options): New prototype.
13820 (set_disassembler_options): Likewise.
13821 * gdbarch.sh (gdbarch_disassembler_options): New variable.
13822 (gdbarch_verify_disassembler_options): Likewise.
13823 * gdbarch.c: Regenerate.
13824 * gdbarch.h: Likewise.
13825 * arm-tdep.c (num_disassembly_options): Delete.
13826 (set_disassembly_style): Likewise.
13827 (arm_disassembler_options): New static variable.
13828 (set_disassembly_style_sfunc): Convert short style name into long
13829 option name. Call set_disassembler_options.
13830 (show_disassembly_style_sfunc): New function.
13831 (arm_gdbarch_init): Call set_gdbarch_disassembler_options and
13832 set_gdbarch_verify_disassembler_options.
13833 (_initialize_arm_tdep): Delete regnames variable and update callers.
13834 (arm_disassembler_options): Initialize.
13835 (disasm_options): New variable.
13836 (num_disassembly_options): Rename from this...
13837 (num_disassembly_styles): ...to this. Compute by scanning through
13838 disasm_options.
13839 (valid_disassembly_styles): Initialize using disasm_options.
13840 Remove calls to parse_arm_disassembler_option, get_arm_regnames and
13841 set_arm_regname_option.
13842 Pass show_disassembly_style_sfunc to the "disassembler" setshow command.
13843 * rs6000-tdep.c (powerpc_disassembler_options): New static variable.
13844 (rs6000_gdbarch_init): Call set_gdbarch_disassembler_options and
13845 set_gdbarch_verify_disassembler_options.
13846 * s390-tdep.c (s390_disassembler_options): New static variable.
13847 (s390_gdbarch_init):all set_gdbarch_disassembler_options and
13848 set_gdbarch_verify_disassembler_options.
13849
d538e36d
SM
138502017-02-27 Simon Marchi <simon.marchi@ericsson.com>
13851
13852 * remote.c (remote_add_target_side_condition): Remove "struct"
13853 keyword from range-based for loop.
13854
83621223
SM
138552017-02-27 Simon Marchi <simon.marchi@ericsson.com>
13856
13857 * remote.c (remote_add_target_side_condition): Use range-based
13858 for loop. Update comment.
13859
2123df0e
YQ
138602017-02-27 Yao Qi <yao.qi@linaro.org>
13861
13862 * f-typeprint.c (f_print_type): Check "varstring" is empty first.
13863
8e368124
AH
138642017-02-26 Alan Hayward <alan.hayward@arm.com>
13865
13866 * regcache.c (regcache_raw_update): New function.
13867 (regcache_raw_read): Move code to regcache_raw_update.
13868 * regcache.h (regcache_raw_update): New declaration.
13869 * remote.c (remote_prepare_to_store): Call regcache_raw_update.
13870
a49dd8dd
JK
138712017-02-26 Jan Kratochvil <jan.kratochvil@redhat.com>
13872
13873 * dwarf2read.c (create_debug_type_hash_table): Initialize
13874 header.signature and header.type_offset_in_tu.
13875
34e4bae9
PA
138762017-02-24 Pedro Alves <palves@redhat.com>
13877
13878 * symtab.c (make_file_symbol_completion_list_1): Use
13879 add_symtab_completions.
13880
b0e4b369
AH
138812017-02-24 Alan Hayward <alan.hayward@arm.com>
13882
13883 * stack.c (frame_info): Use frame_unwind_register_value to avoid buf.
13884
975c21ab
AH
138852017-02-24 Alan Hayward <alan.hayward@arm.com>
13886
13887 * i386-tdep.c (i386_pseudo_register_read_into_value): Use
13888 I386_MAX_REGISTER_SIZE.
13889 (i386_pseudo_register_write): Likewise.
13890 (i386_process_record): Likewise.
13891 * i387-tdep.c (i387_supply_xsave): Likewise.
13892 * m68k-linux-nat.c (fetch_register): Use M68K_MAX_REGISTER_SIZE.
13893 (store_register): Likewise.
13894
14bc53a8
PA
138952017-02-23 Pedro Alves <palves@redhat.com>
13896
13897 * ada-lang.c: Include "common/function-view.h".
13898 (ada_iterate_over_symbols): Adjust to use function_view as
13899 callback type.
13900 (struct add_partial_datum, ada_complete_symbol_matcher): Delete.
13901 (ada_make_symbol_completion_list): Use a lambda.
13902 (ada_exc_search_name_matches): Delete.
13903 (name_matches_regex): New.
13904 (ada_add_global_exceptions): Use a lambda and name_matches_regex.
13905 * compile/compile-c-support.c: Include "common/function-view.h".
13906 (print_one_macro): Change prototype to accept a ui_file pointer.
13907 (write_macro_definitions): Use a lambda.
13908 * dwarf2read.c: Include "common/function-view.h".
13909 (dw2_map_expand_apply, dw2_map_symtabs_matching_filename)
13910 (dw2_expand_symtabs_matching): Adjust to use function_view as
13911 callback type.
13912 * language.h: Include "common/function-view.h".
13913 (struct language_defn) <la_iterate_over_symbols>: Adjust to use
13914 function_view as callback type.
13915 (LA_ITERATE_OVER_SYMBOLS): Remove DATA parameter.
13916 * linespec.c: Include "common/function-view.h".
13917 (collect_info::add_symbol): New method.
13918 (struct symbol_and_data_callback, iterate_inline_only, struct
13919 symbol_matcher_data, iterate_name_matcher): Delete.
13920 (iterate_over_all_matching_symtabs): Adjust to use function_view
13921 as callback type and lambdas.
13922 (iterate_over_file_blocks): Adjust to use function_view as
13923 callback type.
13924 (decode_compound_collector): Now a class with private fields.
13925 (decode_compound_collector::release_symbols): New method.
13926 (collect_one_symbol): Rename to...
13927 (decode_compound_collector::operator()): ... this and adjust.
13928 (lookup_prefix_sym): decode_compound_collector construction bits
13929 move to decode_compound_collector ctor. Pass the
13930 decode_compound_collector object directly as callback. Remove
13931 cleanups and use decode_compound_collector::release_symbols
13932 instead.
13933 (symtab_collector): Now a class with private fields.
13934 (symtab_collector::release_symtabs): New method.
13935 (add_symtabs_to_list): Rename to...
13936 (symtab_collector::operator()): ... this and adjust.
13937 (collect_symtabs_from_filename): symtab_collector construction
13938 bits move to symtab_collector ctor. Pass the symtab_collector
13939 object directly as callback. Remove cleanups and use
13940 symtab_collector::release_symtabs instead.
13941 (collect_symbols): Delete.
13942 (add_matching_symbols_to_info): Use lambdas.
13943 * macrocmd.c (print_macro_callback): Delete.
13944 (info_macro_command): Use a lambda.
13945 (info_macros_command): Pass print_macro_definition as callable
13946 directly.
13947 (print_one_macro): Remove 'ignore' parameter.
13948 (macro_list_command): Adjust.
13949 * macrotab.c (macro_for_each_data::fn): Now a function_view.
13950 (macro_for_each_data::user_data): Delete field.
13951 (foreach_macro): Adjust to call the function_view.
13952 (macro_for_each): Adjust to use function_view as callback type.
13953 (foreach_macro_in_scope): Adjust to call the function_view.
13954 (macro_for_each_in_scope): Adjust to use function_view as callback
13955 type.
13956 * macrotab.h: Include "common/function-view.h".
13957 (macro_callback_fn): Declare a prototype instead of a pointer.
13958 Remove "user_data" parameter.
13959 (macro_for_each, macro_for_each_in_scope): Adjust to use
13960 function_view as callback type.
13961 * psymtab.c (partial_map_expand_apply)
13962 (psym_map_symtabs_matching_filename, recursively_search_psymtabs):
13963 Adjust to use function_view as callback type and to return bool.
13964 (psym_expand_symtabs_matching): Adjust to use function_view as
13965 callback types.
13966 * symfile-debug.c (debug_qf_map_symtabs_matching_filename): Adjust
13967 to use function_view as callback type and to return bool.
13968 (debug_qf_expand_symtabs_matching): Adjust to use function_view as
13969 callback types.
13970 * symfile.c (expand_symtabs_matching): Adjust to use function_view
13971 as callback types.
13972 * symfile.h: Include "common/function-view.h".
13973 (expand_symtabs_file_matcher_ftype)
13974 (expand_symtabs_symbol_matcher_ftype)
13975 (expand_symtabs_exp_notify_ftype): Remove "data" parameter and
13976 return bool.
13977 (quick_symbol_functions::map_symtabs_matching_filename)
13978 (quick_symbol_functions::expand_symtabs_matching): Adjust to use
13979 function_view as callback type and return bool.
13980 (expand_symtabs_matching): Adjust to use function_view as callback
13981 type.
13982 (maintenance_expand_name_matcher)
13983 (maintenance_expand_file_matcher): Delete.
13984 (maintenance_expand_symtabs): Use lambdas.
13985 * symtab.c (iterate_over_some_symtabs): Adjust to use
13986 function_view as callback types and return bool.
13987 (iterate_over_symtabs): Likewise. Use unique_xmalloc_ptr instead
13988 of a cleanup.
13989 (lookup_symtab_callback): Delete.
13990 (lookup_symtab): Use a lambda.
13991 (iterate_over_symbols): Adjust to use function_view as callback
13992 type.
13993 (struct search_symbols_data, search_symbols_file_matches)
13994 (search_symbols_name_matches): Delete.
13995 (search_symbols): Use a pair of lambdas.
13996 (struct add_name_data, add_macro_name, symbol_completion_matcher)
13997 (symtab_expansion_callback): Delete.
13998 (default_make_symbol_completion_list_break_on_1): Use lambdas.
13999 * symtab.h: Include "common/function-view.h".
14000 (iterate_over_some_symtabs): Adjust to use function_view as
14001 callback type and return bool.
14002 (iterate_over_symtabs): Adjust to use function_view as callback
14003 type.
14004 (symbol_found_callback_ftype): Remove 'data' parameter and return
14005 bool.
14006 (iterate_over_symbols): Adjust to use function_view as callback
14007 type.
14008
07e253aa
PA
140092017-02-23 Pedro Alves <palves@redhat.com>
14010
14011 * Makefile.in (SUBDIR_UNITTESTS_SRCS, SUBDIR_UNITTESTS_OBS): New.
14012 (%.o) <unittests/%.c>: New pattern.
14013 * configure.ac ($development): Add $(SUBDIR_UNITTESTS_OBS) to
14014 CONFIG_OBS, and $(SUBDIR_UNITTESTS_SRCS) to CONFIG_SRCS.
14015 * common/function-view.h: New file.
14016 * unittests/function-view-selftests.c: New file.
14017 * configure: Regenerate.
14018
8eaf5320
SM
140192017-02-23 Simon Marchi <simon.marchi@ericsson.com>
14020
14021 * bsd-uthread.c (bsd_uthread_thread_alive): Use ptid instead of
14022 inferior_ptid.
14023 * go32-nat.c (go32_thread_alive): Likewise.
14024
38768751
YQ
140252017-02-23 Yao Qi <yao.qi@linaro.org>
14026
14027 * varobj-iter.h (varobj_iter_delete): Call xfree instead of
14028 delete.
14029
0a8beaba
YQ
140302017-02-23 Yao Qi <yao.qi@linaro.org>
14031
14032 * varobj.c (varobj_clear_saved_item): Use delete instead of
14033 xfree.
14034 (update_dynamic_varobj_children): Likewise.
14035
58fdfd2c
JK
140362017-02-21 Jan Kratochvil <jan.kratochvil@redhat.com>
14037
14038 * dwarf2read.c (dwarf2_record_block_ranges): Add forgotten BASEADDR.
14039
1b90b139
SM
140402017-02-21 Simon Marchi <simon.marchi@ericsson.com>
14041
14042 * common/enum-flags.h (enum_flags::enum_flags): Initialize
14043 m_enum_value to 0 in default constructor.
14044
2039d74e
EBM
140452017-02-21 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
14046
14047 * rs6000-tdep.c (LOAD_AND_RESERVE_MASK): Rename from LWARX_MASK.
14048 (STORE_CONDITIONAL_MASK): Rename from STWCX_MASK.
14049 (LBARX_INSTRUCTION, LHARX_INSTRUCTION, LQARX_INSTRUCTION,
14050 STBCX_INSTRUCTION, STHCX_INSTRUCTION, STQCX_INSTRUCTION): New defines.
14051 (IS_LOAD_AND_RESERVE_INSN, IS_STORE_CONDITIONAL_INSN): New macros.
14052 (ppc_displaced_step_copy_insn): Use IS_LOAD_AND_RESERVE_INSN.
14053 (ppc_deal_with_atomic_sequence): Use IS_LOAD_AND_RESERVE_INSN and
14054 IS_STORE_CONDITIONAL_INSN.
14055
7814882a
JK
140562017-02-21 Jan Kratochvil <jan.kratochvil@redhat.com>
14057
14058 * dwarf2_rnglists_process: Initialize range_beginning and range_end.
14059
0ae60b63
JK
140602017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
14061
14062 * NEWS (Changes since GDB 7.12): Add DWARF-5.
14063
0224619f
JK
140642017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
14065
14066 * dwarf2read.c (skip_one_die, read_attribute_value)
14067 (dwarf2_const_value_attr, dump_die_shallow)
14068 (dwarf2_get_attr_constant_value, dwarf2_fetch_constant_bytes)
14069 (skip_form_bytes, attr_form_is_constant): Handle DW_FORM_data16.
14070
0af92d60
JK
140712017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
14072
14073 * dwarf2read.c (read_file_scope): Rename DW_MACRO_GNU_*.
14074 (dwarf_parse_macro_header): Accept DWARF version 5.
14075 (dwarf_decode_macro_bytes, dwarf_decode_macros): Rename DW_MACRO_GNU_*.
14076
216f72a1
JK
140772017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
14078
14079 * block.c (call_site_for_pc): Rename DW_OP_GNU_*, DW_TAG_GNU_* and
14080 DW_AT_GNU_*.
14081 * common/common-exceptions.h (enum errors): Likewise.
14082 * dwarf2-frame.c (class dwarf_expr_executor): Likewise.
14083 * dwarf2expr.c (dwarf_block_to_dwarf_reg)
14084 (dwarf_expr_context::execute_stack_op): Likewise.
14085 * dwarf2expr.h (struct dwarf_expr_context, struct dwarf_expr_piece):
14086 Likewise.
14087 * dwarf2loc.c (dwarf_evaluate_loc_desc::get_base_type)
14088 (dwarf_evaluate_loc_desc::push_dwarf_reg_entry_value)
14089 (show_entry_values_debug, call_site_to_target_addr)
14090 (func_addr_to_tail_call_list, func_verify_no_selftailcall)
14091 (dwarf_expr_reg_to_entry_parameter, dwarf_entry_parameter_to_value)
14092 (entry_data_value_free_closure, value_of_dwarf_reg_entry)
14093 (value_of_dwarf_block_entry, indirect_pieced_value)
14094 (symbol_needs_eval_context::push_dwarf_reg_entry_value):
14095 (disassemble_dwarf_expression): Likewise.
14096 * dwarf2read.c (process_die, inherit_abstract_dies)
14097 (read_call_site_scope): Likewise.
14098 * gdbtypes.h (struct func_type, struct call_site_parameter)
14099 (struct call_site): Likewise.
14100 * stack.c (read_frame_arg): Likewise.
14101 * std-operator.def (OP_VAR_ENTRY_VALUE): Likewise.
14102
43988095
JK
141032017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
14104
14105 * defs.h (read_unsigned_leb128): New declaration.
14106 * dwarf2loc.c (decode_debug_loclists_addresses): New function.
14107 (decode_debug_loc_dwo_addresses): Update DEBUG_LOC_* to DW_LLE_*.
14108 (dwarf2_find_location_expression): Call also
14109 decode_debug_loclists_addresses. Handle DWARF-5 ULEB128 length.
14110 * dwarf2loc.h (dwarf2_version): New declaration.
14111 * dwarf2read.c (struct dwarf2_per_objfile): Add loclists, line_str,
14112 rnglists.
14113 (dwarf2_elf_names): Add .debug_loclists, .debug_line_str,
14114 .debug_rnglists.
14115 (struct dwop_section_names): Add loclists_dwo.
14116 (dwop_section_names): Add .debug_loclists.dwo.
14117 (struct comp_unit_head): Add unit_type, signature, type_offset_in_tu.
14118 (struct dwarf2_per_cu_data): Add dwarf_version.
14119 (struct dwo_sections): Add loclists.
14120 (struct attr_abbrev): Add implicit_const.
14121 (read_indirect_line_string): New declaration.
14122 (read_unsigned_leb128): Delete declaration.
14123 (rcuh_kind): New definition.
14124 (read_and_check_comp_unit_head): Change parameter
14125 is_debug_types_section to section_kind.
14126 (dwarf2_locate_sections): Handle loclists, line_str and rnglists.
14127 (read_comp_unit_head): Change parameter abfd to section, add parameter
14128 section_kind. Handle DWARF-5.
14129 (error_check_comp_unit_head): Accept also DWARF version 5.
14130 (read_and_check_comp_unit_head): Change parameter
14131 is_debug_types_section to section_kind.
14132 (read_and_check_type_unit_head): Delete function.
14133 (read_abbrev_offset): Handle DWARF-5.
14134 (create_debug_type_hash_table): Add parameter section_kind. Process
14135 only DW_UT_type. Use signature and type_offset_in_tu from struct
14136 comp_unit_head.
14137 (create_debug_types_hash_table): Update create_debug_type_hash_table
14138 caller.
14139 (create_all_type_units): Call create_debug_type_hash_table.
14140 (read_cutu_die_from_dwo, init_cutu_and_read_dies): Change
14141 read_and_check_type_unit_head caller to read_and_check_comp_unit_head
14142 caller.
14143 (skip_one_die): Handle DW_FORM_implicit_const.
14144 (dwarf2_rnglists_process): New function.
14145 (dwarf2_ranges_process): Call dwarf2_rnglists_process for DWARF-5.
14146 (abbrev_table_read_table): Handle DW_FORM_implicit_const.
14147 (read_attribute_value): Handle DW_FORM_implicit_const,
14148 DW_FORM_line_strp.
14149 (read_attribute): Handle DW_FORM_implicit_const.
14150 (read_indirect_string_at_offset_from): New function from
14151 read_indirect_string_at_offset.
14152 (read_indirect_string_at_offset): Call
14153 read_indirect_string_at_offset_from.
14154 (read_indirect_line_string_at_offset): New function.
14155 (read_indirect_string): New function comment.
14156 (read_indirect_line_string): New function.
14157 (read_unsigned_leb128): Make it global.
14158 (dwarf2_string_attr): Handle DWARF-5.
14159 (add_include_dir_stub, read_formatted_entries): New functions.
14160 (dwarf_decode_line_header, dump_die_shallow, cu_debug_loc_section):
14161 Handle DWARF-5.
14162 (per_cu_header_read_in): Update read_comp_unit_head caller.
14163 (dwarf2_version): New function.
14164 * symfile.h (struct dwarf2_debug_sections): Add loclists, line_str and
14165 rnglists.
14166 * xcoffread.c (dwarf2_xcoff_names): Update struct dwarf2_debug_sections
14167 fields.
14168
22d2f3ab
JK
141692017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
14170
14171 * dwarf2read.c (abbrev_table_read_table): Read the data only once.
14172
5f46c5a5
JK
141732017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
14174
14175 * dwarf2read.c (dwarf2_ranges_process): New function from
14176 dwarf2_ranges_read.
14177 (dwarf2_ranges_read, dwarf2_record_block_ranges): Use
14178 dwarf2_ranges_process.
14179
78d4d2c5
JK
141802017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
14181
14182 * dwarf2read.c (create_debug_type_hash_table): New function from
14183 create_debug_types_hash_table.
14184 (create_debug_types_hash_table): Call create_debug_type_hash_table.
14185 (create_all_type_units, open_and_init_dwo_file): Update
14186 create_debug_types_hash_table callers.
14187
1b076f25
SDJ
141882017-02-20 Sergio Durigan Junior <sergiodj@redhat.com>
14189
14190 PR gdb/16188
14191 * fork-child.c (trace_start_error): Fix thinko. va_end should
14192 refer to 'ap', not 'args'.
14193
0db8980c
SDJ
141942017-02-20 Sergio Durigan Junior <sergiodj@redhat.com>
14195 Pedro Alves <palves@redhat.com>
14196
14197 PR gdb/16188
14198 * darwin-nat.c (darwin_ptrace_me): Check if calls to system
14199 calls succeeded.
14200 * fork-child.c (trace_start_error): New function.
14201 (trace_start_error_with_name): Likewise.
14202 * gnu-nat.c (gnu_ptrace_me): Check if call to PTRACE succeeded.
14203 * inf-ptrace.c (inf_ptrace_me): Likewise.
14204 * inferior.h (trace_start_error): New prototype.
14205 (trace_start_error_with_name): Likewise.
14206
99e8a4f9
SDJ
142072017-02-15 Sergio Durigan Junior <sergiodj@redhat.com>
14208
14209 PR gdb/21164
14210 * psymtab.c (maintenance_print_psymbols): Verify if 'argv' is not
14211 NULL before using it.
14212 * symmisc.c (maintenance_print_symbols): Likewise.
14213 (maintenance_print_msymbols): Likewise.
14214
4e746bb6
TW
142152017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
14216
14217 * NEWS: Add record Python bindings entry.
14218
142192017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
14220
14221 * Makefile.in (SUBDIR_PYTHON_OBS): Add py-record-btrace.o,
14222 py-record-full.o.
14223 (SUBDIR_PYTHON_SRCS): Add py-record-btrace.c, py-record-full.c.
14224 * python/py-record-btrace.c, python/py-record-btrace.h,
14225 python/py-record-full.c, python/py-record-full.h: New file.
14226 * python/py-record.c: Add include for py-record-btrace.h and
14227 py-record-full.h.
14228 (recpy_method, recpy_format, recpy_goto, recpy_replay_position,
14229 recpy_instruction_history, recpy_function_call_history, recpy_begin,
14230 recpy_end): Use functions from py-record-btrace.c and py-record-full.c.
14231 * python/python-internal.h (PyInt_FromSsize_t, PyInt_AsSsize_t):
14232 New definition.
14233 (gdbpy_initialize_btrace): New export.
14234 * python/python.c (_initialize_python): Add gdbpy_initialize_btrace.
14235
142362017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
14237
14238 * Makefile.in (SUBDIR_PYTHON_OBS): Add python/py-record.o.
14239 (SUBDIR_PYTHON_SRCS): Add python/py-record.c.
14240 * python/py-record.c: New file.
14241 * python/python-internal.h (gdbpy_start_recording,
14242 gdbpy_current_recording, gdpy_stop_recording,
14243 gdbpy_initialize_record): New export.
14244 * python/python.c (_initialize_python): Add gdbpy_initialize_record.
14245 (python_GdbMethods): Add gdbpy_start_recording,
14246 gdbpy_current_recording and gdbpy_stop_recording.
14247
142482017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
14249
14250 * record-btrace.c (record_btrace_record_method): New function.
14251 (init_record_btrace_ops): Initialize to_record_method.
14252 * record-full.c (record_full_record_method): New function.
14253 (init_record_full_ops, init_record_full_core_ops): Add
14254 record_full_record_method.
14255 * record.h (enum record_method): New enum.
14256 * target-debug.h (target_debug_print_enum_record_method: New define.
14257 * target-delegates.c: Regenerate.
14258 * target.c (target_record_method): New function.
14259 * target.h: Include record.h.
14260 (struct target_ops) <to_record_method>: New field.
14261 (target_record_method): New export.
14262
142632017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
14264
14265 * record.h (record_start, record_stop): New export.
14266 * record.c (record_start, record_stop): New function.
14267
142682017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
14269
14270 * btrace.c (btrace_fetch): Copy function call segments pointer
14271 into a vector.
14272 (btrace_clear): Clear the vector.
14273 (btrace_find_insn_by_number): Use binary search to find the correct
14274 function call segment.
14275 * btrace.h (brace_fun_p): New typedef.
14276 (struct btrace_thread_info) <functions>: New field.
14277
142782017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
14279
14280 * record-btrace.c (btrace_ui_out_decode_error): Move most of it ...
14281 * btrace.c (btrace_decode_error): ... here. New function.
14282 * btrace.h (btrace_decode_error): New export.
14283
142842017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
14285
14286 * btrace.c (ftrace_call_num_insn, btrace_insn_get_error): New function.
14287 (ftrace_new_function, btrace_insn_number, btrace_insn_cmp,
14288 btrace_find_insn_by_number): Remove special case for gaps.
14289 * btrace.h (btrace_insn_get_error): New export.
14290 (btrace_insn_number, btrace_find_insn_by_number): Adjust comment.
14291 * record-btrace.c (btrace_insn_history): Print number for gaps.
14292 (record_btrace_info, record_btrace_goto): Handle gaps.
14293
3f77c769
TT
142942017-02-14 Tom Tromey <tom@tromey.com>
14295
14296 PR python/13598:
14297 * python/python.c (gdbpy_before_prompt_hook): Emit before_prompt
14298 event.
14299 * python/py-evts.c (gdbpy_initialize_py_events): Add
14300 before_prompt registry.
14301 * python/py-events.h (events_object) <before_prompt>: New field.
14302
4c2c7ac6
MM
143032017-02-14 Markus Metzger <markus.t.metzger@intel.com>
14304
14305 * btrace.c (ftrace_new_switch): Preserve up link and flags.
14306
5cf30ebf
LM
143072017-02-13 Luis Machado <lgustavo@codesourcery.com>
14308
14309 * symfile (_initialize_symfile): Add usage text to the load command's
14310 help text.
14311
26a06916
SM
143122017-02-10 Simon Marchi <simon.marchi@ericsson.com>
14313
14314 * utils.c (defaulted_query): Don't query on secondary UIs.
14315
0b145e37
TT
143162017-02-10 Tom Tromey <tom@tromey.com>
14317
14318 * rust-lang.c (rust_get_disr_info): Remove unused variable.
14319
2d8365c4
TT
143202017-02-10 Tom Tromey <tom@tromey.com>
14321
14322 * python/py-value.c (valpy_richcompare_throw): Remove unnecessary
14323 "cleanup" local.
14324 * python/py-type.c (typy_legacy_template_argument): Remove
14325 unnecessary "cleanup" local.
14326
2bb8f231
TT
143272017-02-10 Tom Tromey <tom@tromey.com>
14328
14329 * python/python.c (do_start_initialization): New function, from
14330 _initialize_python.
14331 (_initialize_python): Call do_start_initialization.
14332 * python/py-linetable.c (ltpy_iternext): Use explicit returns, not
14333 goto.
14334
1bdfaf42
TT
143352017-02-10 Tom Tromey <tom@tromey.com>
14336
14337 * python/py-prettyprint.c (pretty_print_one_value): Use
14338 gdbpy_ref.
14339
88b6faea
TT
143402017-02-10 Tom Tromey <tom@tromey.com>
14341
14342 * python/py-cmd.c (cmdpy_destroyer): Use gdbpy_ref.
14343 * python/py-breakpoint.c (gdbpy_breakpoint_deleted): Use
14344 gdbpy_ref.
14345 * python/py-type.c (field_new): Use gdbpy_ref.
14346 * python/py-symtab.c (symtab_and_line_to_sal_object): Use
14347 gdbpy_ref.
14348 * python/py-progspace.c (pspy_new): Use gdbpy_ref.
14349 (py_free_pspace): Likewise.
14350 (pspace_to_pspace_object): Likewise.
14351 * python/py-objfile.c (objfpy_new): Use gdbpy_ref.
14352 (py_free_objfile): Likewise.
14353 (objfile_to_objfile_object): Likewise.
14354 * python/py-inferior.c (delete_thread_object): Use
14355 gdbpy_ref.
14356 (infpy_read_memory): Likewise.
14357 (py_free_inferior): Likewise.
14358 * python/py-evtregistry.c (create_eventregistry_object): Use
14359 gdbpy_ref.
14360 * python/py-event.c (create_event_object): Use gdbpy_ref.
14361
7780f186
TT
143622017-02-10 Tom Tromey <tom@tromey.com>
14363
14364 * python/py-ref.h (gdbpy_ref_policy): Now a template.
14365 (gdbpy_ref): Now a template; allow subclasses of PyObject to be
14366 used.
14367 * python/py-arch.c, python/py-bpevent.c, python/py-breakpoint.c,
14368 python/py-cmd.c, python/py-continueevent.c, python/py-event.c,
14369 python/py-exitedevent.c, python/py-finishbreakpoint.c,
14370 python/py-framefilter.c, python/py-function.c,
14371 python/py-inferior.c, python/py-infevents.c,
14372 python/py-linetable.c, python/py-newobjfileevent.c,
14373 python/py-param.c, python/py-prettyprint.c, python/py-ref.h,
14374 python/py-signalevent.c, python/py-stopevent.c,
14375 python/py-symbol.c, python/py-threadevent.c, python/py-type.c,
14376 python/py-unwind.c, python/py-utils.c, python/py-value.c,
14377 python/py-varobj.c, python/py-xmethods.c, python/python.c,
14378 varobj.c: Change gdbpy_ref to gdbpy_ref<>.
14379
d4b0bb18
TT
143802017-02-10 Tom Tromey <tom@tromey.com>
14381
14382 * ui-out.h (ui_out_emit_type): New class.
14383 (ui_out_emit_tuple, ui_out_emit_list): New typedefs.
14384 * python/py-framefilter.c (py_print_single_arg): Use gdb::optional
14385 and ui_out_emit_tuple.
14386 (enumerate_locals): Likewise.
14387 (py_mi_print_variables, py_print_locals, py_print_args): Use
14388 ui_out_emit_list.
14389 (py_print_frame): Use gdb::optional, ui_out_emit_tuple,
14390 ui_out_emit_list.
14391 * common/gdb_optional.h: New file.
14392
f67f945c
MG
143932017-02-10 Martin Galvan <martingalvan@sourceware.org>
14394
14395 * MAINTAINERS (Write After Approval): Update my e-mail address.
14396
18da0c51
MG
143972017-02-10 Martin Galvan <martingalvan@sourceware.org>
14398
14399 PR gdb/21122
14400 * breakpoint.c (_initialize_breakpoint): Update the help description
14401 of the 'commands' command to indicate that it takes a list argument.
14402
62c14536
SM
144032017-02-09 Simon Marchi <simon.marchi@ericsson.com>
14404
14405 * interps.c (current_interp_set_logging): Remove "return".
14406
ff6fa247
GB
144072017-02-09 Gary Benson <gbenson@redhat.com>
14408
14409 * symtab.c (add_symtab_completions): Prevent NULL pointer
14410 dereference.
14411
a474bd8e
PA
144122017-02-08 Pedro Alves <palves@redhat.com>
14413
14414 * interps.c (interp::interp): Remove reference to quiet_p.
14415 (interp_set): Make static. Remove dead "Switching to" output
14416 code.
14417 (interp_quiet_p, interp_set_quiet): Delete.
14418 (interpreter_exec_cmd): Don't set the interpreter quiet.
14419 * interps.h (interp_quiet_p): Make static.
14420 (class interp) <quiet_p>: Remove field
14421
3d7b173c
JG
144222017-02-08 Jerome Guitton <guitton@adacore.com>
14423
604c4576
JG
14424 * cli/cli-decode.c (find_command_name_length): Make it extern.
14425 * cli/cli-decode.h (find_command_name_length): Declare.
14426 * cli/cli-script.c (command_name_equals, line_first_arg):
14427 New functions.
14428 (process_next_line): Use cli-decode to parse command names.
14429 (build_command_line): Make args a constant pointer.
14430
144312017-02-08 Jerome Guitton <guitton@adacore.com>
6dbb839a 14432
3d7b173c
JG
14433 * cli-decode.c (lookup_cmd_1, lookup_cmd_composition):
14434 Remove case-insensitive search.
14435
1291063d
JM
144362017-02-07 Jose E. Marchesi <jose.marchesi@oracle.com>
14437
14438 * sparc-tdep.c (sparc32_gdbarch_init): Do not place a + operator
14439 at the end of the line. Avoids an ARI warning.
14440
20b477a7
LM
144412017-02-06 Luis Machado <lgustavo@codesourcery.com>
14442
14443 * NEWS: Mention support for record/replay of Intel 64 rdrand and
14444 rdseed instructions.
14445 i386-tdep.c (i386_process_record): Handle Intel 64 rdrand and rseed.
14446
3f7b46f2
IR
144472017-02-06 Ivo Raisr <ivo.raisr@oracle.com>
14448
14449 PR tdep/20936
14450 Provide and use sparc32 and sparc64 target description XML files.
14451 * features/sparc/sparc32-cp0.xml, features/sparc/sparc32-cpu.xml,
14452 features/sparc/sparc32-fpu.xml: New files for sparc 32-bit.
14453 * features/sparc/sparc64-cp0.xml, features/sparc/sparc64-cpu.xml,
14454 features/sparc/sparc64-fpu.xml: New files for sparc 64-bit.
14455 * features/sparc/sparc32-solaris.xml: New file.
14456 * features/sparc/sparc64-solaris.xml: New file.
14457 * features/sparc/sparc32-solaris.c: Generated.
14458 * features/sparc/sparc64-solaris.c: Generated.
14459 * sparc-tdep.h: Account for differences in target descriptions.
14460 * sparc-tdep.c (sparc32_register_name): Use target provided registers.
14461 (sparc32_register_type): Use target provided registers.
14462 (validate_tdesc_registers): New function.
14463 (sparc32_gdbarch_init): Use tdesc_has_registers.
14464 Set pseudoregister functions.
14465 * sparc64-tdep.c (sparc64_register_name): Use target provided registers.
14466 (sparc64_register_type): Use target provided registers.
14467 (sparc64_init_abi): Set pseudoregister functions.
14468
f0fd41c1
TT
144692017-02-03 Tom Tromey <tom@tromey.com>
14470
14471 PR rust/21097:
14472 * rust-lang.c (rust_print_type) <TYPE_CODE_UNION>: Handle enums
14473 with a single member.
14474
d6f9b0fb
PA
144752017-02-03 Pedro Alves <palves@redhat.com>
14476
14477 * cli/cli-interp.c (cli_interp_base::cli_interp_base)
14478 (cli_interp_base::~cli_interp_base): New.
14479 (cli_interp): New struct.
14480 (as_cli_interp): Cast the interp itself to cli_interp.
14481 (cli_interpreter_pre_command_loop): Rename to ...
14482 (cli_interp_base::pre_command_loop): ... this. Remove 'self'
14483 parameter.
14484 (cli_interpreter_init): Rename to ...
14485 (cli_interp::init): ... this. Remove 'self' parameter. Use
14486 boolean. Make extern.
14487 (cli_interpreter_resume): Rename to ...
14488 (cli_interp::resume): ... this. Remove 'data' parameter. Make
14489 extern.
14490 (cli_interpreter_suspend): Rename to ...
14491 (cli_interp::suspend): ... this. Remove 'data' parameter. Make
14492 extern.
14493 (cli_interpreter_exec): Rename to ...
14494 (cli_interp::exec): ... this. Remove 'data' parameter. Make
14495 extern.
14496 (cli_interpreter_supports_command_editing): Rename to ...
14497 (cli_interp_base::supports_command_editing): ... this. Remove
14498 'interp' parameter. Make extern.
14499 (cli_ui_out): Rename to ...
14500 (cli_interp::interp_ui_out): ... this. Remove 'interp' parameter.
14501 Make extern.
14502 (cli_set_logging): Rename to ...
14503 (cli_interp_base::set_logging): ... this. Remove 'interp'
14504 parameter. Make extern.
14505 (cli_interp_procs): Delete.
14506 (cli_interp_factory): Adjust to use "new".
14507 * cli/cli-interp.h: Include "interps.h".
14508 (struct cli_interp_base): New struct.
14509 * interps.c (struct interp): Delete. Fields moved to interps.h.
14510 (interp_new): Delete.
14511 (interp::interp, interp::~interp): New.
14512 (interp_set): Use bool, and return void. Assume the interpreter
14513 has suspend, init and resume methods, and that the all return
14514 void.
14515 (set_top_level_interpreter): interp_set returns void.
14516 (interp_ui_out): Adapt.
14517 (current_interp_set_logging): Adapt.
14518 (interp_data): Delete.
14519 (interp_pre_command_loop, interp_supports_command_editing): Adapt.
14520 (interp_exec): Adapt.
14521 (top_level_interpreter_data): Delete.
14522 * interps.h (interp_init_ftype, interp_resume_ftype)
14523 (interp_suspend_ftype, interp_exec_ftype)
14524 (interp_pre_command_loop_ftype, interp_ui_out_ftype): Delete.
14525 (class interp): New.
14526 (interp_new): Delete.
14527 (interp_set): Now returns void. Use bool.
14528 (interp_data, top_level_interpreter_data): Delete.
14529 * mi/mi-common.h: Include interps.h.
14530 (class mi_interp): Inherit from interp. Define a ctor. Declare
14531 init, resume, suspect, exec, interp_ui_out, set_logging and
14532 pre_command_loop methods.
14533 * mi/mi-interp.c (as_mi_interp): Cast the interp itself.
14534 (mi_interpreter_init): Rename to ...
14535 (mi_interp::init): ... this. Remove the 'interp' parameter, use
14536 bool, return void and make extern. Adjust.
14537 (mi_interpreter_resume): ... Rename to ...
14538 (mi_interp::resume): ... this. Remove the 'data' parameter,
14539 return void and make extern. Adjust.
14540 (mi_interpreter_suspend): ... Rename to ...
14541 (mi_interp::suspend): ... this. Remove the 'data' parameter,
14542 return void and make extern. Adjust.
14543 (mi_interpreter_exec): ... Rename to ...
14544 (mi_interp::exec): ... this. Remove the 'data' parameter and make
14545 extern. Adjust.
14546 (mi_interpreter_pre_command_loop): ... Rename to ...
14547 (mi_interp::pre_command_loop): ... this. Remove the 'self'
14548 parameter and make extern.
14549 (mi_on_normal_stop_1): Adjust.
14550 (mi_ui_out): Rename to ...
14551 (mi_interp::interp_ui_out): ... this. Remove the 'interp'
14552 parameter and make extern. Adjust.
14553 (mi_set_logging): Rename to ...
14554 (mi_interp::set_logging): ... this. Remove the 'interp'
14555 parameter and make extern. Adjust.
14556 (mi_interp_procs): Delete.
14557 (mi_interp_factory): Adjust to use 'new'.
14558 * mi/mi-main.c (mi_cmd_gdb_exit, captured_mi_execute_command)
14559 (mi_print_exception, mi_execute_command, mi_load_progress):
14560 Adjust.
14561 * tui/tui-interp.c (tui_interp): New class.
14562 (as_tui_interp): Return a tui_interp pointer.
14563 (tui_on_normal_stop, tui_on_signal_received)
14564 (tui_on_end_stepping_range, tui_on_signal_exited, tui_on_exited)
14565 (tui_on_no_history, tui_on_user_selected_context_changed): Adjust
14566 to use interp::interp_ui_out.
14567 (tui_init): Rename to ...
14568 (tui_interp::init): ... this. Remove the 'self' parameter, use
14569 bool, return void and make extern. Adjust.
14570 (tui_resume): Rename to ...
14571 (tui_interp::resume): ... this. Remove the 'data' parameter,
14572 return void and make extern. Adjust.
14573 (tui_suspend): Rename to ...
14574 (tui_interp::suspend): ... this. Remove the 'data' parameter,
14575 return void and make extern. Adjust.
14576 (tui_ui_out): Rename to ...
14577 (tui_interp::interp_ui_out): ... this. Remove the 'self'
14578 parameter, and make extern. Adjust.
14579 (tui_exec): Rename to ...
14580 (tui_interp::exec): ... this. Remove the 'data' parameter and
14581 make extern.
14582 (tui_interp_procs): Delete.
14583 (tui_interp_factory): Use "new".
14584
65c40c95
TT
145852017-02-02 Tom Tromey <tom@tromey.com>
14586
14587 * rust-exp.y (ends_raw_string, space_then_number)
14588 (rust_identifier_start_p): Return bool.
14589 * rust-lang.c (rust_tuple_type_p, rust_underscore_fields)
14590 (rust_tuple_struct_type_p, rust_tuple_variant_type_p)
14591 (rust_slice_type_p, rust_range_type_p, rust_u8_type_p)
14592 (rust_chartype_p): Return bool.
14593 (val_print_struct, rust_print_struct_def, rust_print_type):
14594 Update.
14595 * rust-lang.h (rust_tuple_type_p, rust_tuple_struct_type_p):
14596 Return bool.
14597
b50f188d
TT
145982017-02-02 Tom Tromey <tom@tromey.com>
14599
14600 * rust-lang.c: Reindent.
14601
03c85b11
TT
146022017-02-02 Tom Tromey <tom@tromey.com>
14603
14604 * rust-lang.h (rust_crate_for_block): Update.
14605 * rust-lang.c (rust_crate_for_block): Return std::string.
14606 (rust_get_disr_info): Use std:;string, not
14607 gdb::unique_xmalloc_ptr.
14608 * rust-exp.y (crate_name): Update.
14609
9b6da501
PA
146102017-02-02 Pedro Alves <palves@redhat.com>
14611
14612 * disasm-selftests.c (print_one_insn_test): Move the "verbose"
14613 field out of gdb_disassembler_test and make it static.
14614
ec4cb20b
PA
146152017-02-02 Pedro Alves <palves@redhat.com>
14616
14617 * mi/mi-common.h (struct mi_interp): Delete the mi2_interp,
14618 mi1_interp and mi_interp fields.
14619
5be5dbf0
PA
146202017-02-02 Pedro Alves <palves@redhat.com>
14621
616268b6
PA
14622 * cli/cli-interp.c (struct saved_output_files, saved_output):
14623 Moved from cli/cli-logging.c.
14624 (cli_set_logging): New function.
14625 (cli_interp_procs): Install cli_set_logging.
14626 * cli/cli-interp.h (make_logging_output, cli_set_logging):
14627 Declare.
14628 * cli/cli-logging.c (struct saved_output_files, saved_output):
14629 Moved to cli/cli-interp.c.
14630 (pop_output_files): Don't save outputs here.
14631 (make_logging_output): New function.
14632 (handle_redirections): Don't build tee nor save previous outputs
14633 here.
14634 * interps.c (current_interp_set_logging): Change prototype.
14635 Assume there's always a set_logging_proc method installed.
14636 * interps.h (interp_set_logging_ftype): Change prototype.
14637 (current_interp_set_logging): Change prototype and adjust comment.
14638 * mi/mi-interp.c (mi_set_logging): Change protototype. Adjust to
14639 use make_logging_output.
14640 * tui/tui-interp.c (tui_interp_procs): Install cli_set_logging.
146412017-02-02 Pedro Alves <palves@redhat.com>
14642
5be5dbf0
PA
14643 * cli/cli-logging.c (maybe_warn_already_logging): New factored out
14644 from ...
14645 (set_logging_overwrite): ... here.
14646 (logging_no_redirect_file): Delete.
14647 (set_logging_redirect): Don't handle redirection on the fly.
14648 Instead warn that "logging off" / "logging on" is necessary.
14649 (pop_output_files): Delete references to logging_no_redirect_file.
14650 (show_logging_command): Always speak in terms of what will happen
14651 once logging is reenabled.
14652
c99cc448
PA
146532017-02-02 Pedro Alves <palves@redhat.com>
14654
14655 * disasm.h (gdb_pretty_print_disassembler): Tweak intro comment.
14656
8b172ce7
PA
146572017-02-02 Pedro Alves <palves@redhat.com>
14658
14659 * disasm.c (gdb_pretty_print_insn): Rename to ...
14660 (gdb_pretty_print_disassembler::pretty_print_insn): ... this.
14661 Remove gdbarch parameter. Adapt to clear the object's buffers
14662 instead of allocating new buffers, and to print using the object's
14663 gdb_disassembler instead of calling gdb_print_insn.
14664 (dump_insns): Use gdb_pretty_print_disassembler.
14665 * disasm.h (gdb_pretty_print_insn): Delete declaration.
14666 (gdb_pretty_print_disassembler): New class.
14667 * record-btrace.c (btrace_insn_history): Use
14668 gdb_pretty_print_disassembler.
14669
d7e74731
PA
146702017-02-02 Pedro Alves <palves@redhat.com>
14671
14672 * ada-lang.c (type_as_string): Use string_file.
14673 * ada-valprint.c (ada_print_floating): Use string_file.
14674 * ada-varobj.c (ada_varobj_scalar_image)
14675 (ada_varobj_get_value_image): Use string_file.
14676 * aix-thread.c (aix_thread_extra_thread_info): Use string_file.
14677 * arm-tdep.c (_initialize_arm_tdep): Use string_printf.
14678 * breakpoint.c (update_inserted_breakpoint_locations)
14679 (insert_breakpoint_locations, reattach_breakpoints)
14680 (print_breakpoint_location, print_one_detail_ranged_breakpoint)
14681 (print_it_watchpoint): Use string_file.
14682 (save_breakpoints): Use stdio_file.
14683 * c-exp.y (oper): Use string_file.
14684 * cli/cli-logging.c (set_logging_redirect): Use ui_file_up and
14685 tee_file.
14686 (pop_output_files): Use delete.
14687 (handle_redirections): Use stdio_file and tee_file.
14688 * cli/cli-setshow.c (do_show_command): Use string_file.
14689 * compile/compile-c-support.c (c_compute_program): Use
14690 string_file.
14691 * compile/compile-c-symbols.c (generate_vla_size): Take a
14692 'string_file &' instead of a 'ui_file *'.
14693 (generate_c_for_for_one_variable): Take a 'string_file &' instead
14694 of a 'ui_file *'. Use string_file.
14695 (generate_c_for_variable_locations): Take a 'string_file &'
14696 instead of a 'ui_file *'.
14697 * compile/compile-internal.h (generate_c_for_for_one_variable):
14698 Take a 'string_file &' instead of a 'ui_file *'.
14699 * compile/compile-loc2c.c (push, pushf, unary, binary)
14700 (print_label, pushf_register_address, pushf_register)
14701 (do_compile_dwarf_expr_to_c): Take a 'string_file &' instead of a
14702 'ui_file *'. Adjust.
14703 * compile/compile.c (compile_to_object): Use string_file.
14704 * compile/compile.h (compile_dwarf_expr_to_c)
14705 (compile_dwarf_bounds_to_c): Take a 'string_file &' instead of a
14706 'ui_file *'.
14707 * cp-support.c (inspect_type): Use string_file and obstack_copy0.
14708 (replace_typedefs_qualified_name): Use string_file and
14709 obstack_copy0.
14710 * disasm.c (gdb_pretty_print_insn): Use string_file.
14711 (gdb_disassembly): Adjust reference the null_stream global.
14712 (do_ui_file_delete): Delete.
14713 (gdb_insn_length): Use null_stream.
14714 * dummy-frame.c (maintenance_print_dummy_frames): Use stdio_file.
14715 * dwarf2loc.c (dwarf2_compile_property_to_c)
14716 (locexpr_generate_c_location, loclist_generate_c_location): Take a
14717 'string_file &' instead of a 'ui_file *'.
14718 * dwarf2loc.h (dwarf2_compile_property_to_c): Likewise.
14719 * dwarf2read.c (do_ui_file_peek_last): Delete.
14720 (dwarf2_compute_name): Use string_file.
14721 * event-top.c (gdb_setup_readline): Use stdio_file.
14722 * gdbarch.sh (verify_gdbarch): Use string_file.
14723 * gdbtypes.c (safe_parse_type): Use null_stream.
14724 * guile/scm-breakpoint.c (gdbscm_breakpoint_commands): Use
14725 string_file.
14726 * guile/scm-disasm.c (gdbscm_print_insn_from_port): Take a
14727 'string_file *' instead of a 'ui_file *'.
14728 (gdbscm_arch_disassemble): Use string_file.
14729 * guile/scm-frame.c (frscm_print_frame_smob): Use string_file.
14730 * guile/scm-ports.c (class ioscm_file_port): Now a class that
14731 inherits from ui_file.
14732 (ioscm_file_port_delete, ioscm_file_port_rewind)
14733 (ioscm_file_port_put): Delete.
14734 (ioscm_file_port_write): Rename to ...
14735 (ioscm_file_port::write): ... this. Remove file_port_magic
14736 checks.
14737 (ioscm_file_port_new): Delete.
14738 (ioscm_with_output_to_port_worker): Use ioscm_file_port and
14739 ui_file_up.
14740 * guile/scm-type.c (tyscm_type_name): Use string_file.
14741 * guile/scm-value.c (vlscm_print_value_smob, gdbscm_value_print):
14742 Use string_file.
14743 * infcmd.c (print_return_value_1): Use string_file.
14744 * infrun.c (print_target_wait_results): Use string_file.
14745 * language.c (add_language): Use string_file.
14746 * location.c (explicit_to_string_internal): Use string_file.
14747 * main.c (captured_main_1): Use null_file.
14748 * maint.c (maintenance_print_architecture): Use stdio_file.
14749 * mi/mi-cmd-stack.c (list_arg_or_local): Use string_file.
14750 * mi/mi-common.h (struct mi_interp) <out, err, log, targ,
14751 event_channel>: Change type to mi_console_file pointer.
14752 * mi/mi-console.c (mi_console_file_fputs, mi_console_file_flush)
14753 (mi_console_file_delete): Delete.
14754 (struct mi_console_file): Delete.
14755 (mi_console_file_magic): Delete.
14756 (mi_console_file_new): Delete.
14757 (mi_console_file::mi_console_file): New.
14758 (mi_console_file_delete): Delete.
14759 (mi_console_file_fputs): Delete.
14760 (mi_console_file::write): New.
14761 (mi_console_raw_packet): Delete.
14762 (mi_console_file::flush): New.
14763 (mi_console_file_flush): Delete.
14764 (mi_console_set_raw): Rename to ...
14765 (mi_console_file::set_raw): ... this.
14766 * mi/mi-console.h (class mi_console_file): New class.
14767 (mi_console_file_new, mi_console_set_raw): Delete.
14768 * mi/mi-interp.c (mi_interpreter_init): Use mi_console_file.
14769 (mi_set_logging): Use delete and tee_file. Adjust.
14770 * mi/mi-main.c (output_register): Use string_file.
14771 (mi_cmd_data_evaluate_expression): Use string_file.
14772 (mi_cmd_data_read_memory): Use string_file.
14773 (mi_cmd_execute, print_variable_or_computed): Use string_file.
14774 * mi/mi-out.c (mi_ui_out::main_stream): New.
14775 (mi_ui_out::rewind): Use main_stream and
14776 string_file.
14777 (mi_ui_out::put): Use main_stream and string_file.
14778 (mi_ui_out::mi_ui_out): Remove 'stream' parameter.
14779 Allocate a 'string_file' instead.
14780 (mi_out_new): Don't allocate a mem_fileopen stream here.
14781 * mi/mi-out.h (mi_ui_out::mi_ui_out): Remove 'stream' parameter.
14782 (mi_ui_out::main_stream): Declare method.
14783 * printcmd.c (eval_command): Use string_file.
14784 * psymtab.c (maintenance_print_psymbols): Use stdio_file.
14785 * python/py-arch.c (archpy_disassemble): Use string_file.
14786 * python/py-breakpoint.c (bppy_get_commands): Use string_file.
14787 * python/py-frame.c (frapy_str): Use string_file.
14788 * python/py-framefilter.c (py_print_type, py_print_single_arg):
14789 Use string_file.
14790 * python/py-type.c (typy_str): Use string_file.
14791 * python/py-unwind.c (unwind_infopy_str): Use string_file.
14792 * python/py-value.c (valpy_str): Use string_file.
14793 * record-btrace.c (btrace_insn_history): Use string_file.
14794 * regcache.c (regcache_print): Use stdio_file.
14795 * reggroups.c (maintenance_print_reggroups): Use stdio_file.
14796 * remote.c (escape_buffer): Use string_file.
14797 * rust-lang.c (rust_get_disr_info): Use string_file.
14798 * serial.c (serial_open_ops_1): Use stdio_file.
14799 (do_serial_close): Use delete.
14800 * stack.c (print_frame_arg): Use string_file.
14801 (print_frame_args): Remove local mem_fileopen stream, not used.
14802 (print_frame): Use string_file.
14803 * symmisc.c (maintenance_print_symbols): Use stdio_file.
14804 * symtab.h (struct symbol_computed_ops) <generate_c_location>:
14805 Take a 'string_file *' instead of a 'ui_file *'.
14806 * top.c (new_ui): Use stdio_file and stderr_file.
14807 (free_ui): Use delete.
14808 (execute_command_to_string): Use string_file.
14809 (quit_confirm): Use string_file.
14810 * tracepoint.c (collection_list::append_exp): Use string_file.
14811 * tui/tui-disasm.c (tui_disassemble): Use string_file.
14812 * tui/tui-file.c: Don't include "ui-file.h".
14813 (enum streamtype, struct tui_stream): Delete.
14814 (tui_file_new, tui_file_delete, tui_fileopen, tui_sfileopen)
14815 (tui_file_isatty, tui_file_rewind, tui_file_put): Delete.
14816 (tui_file::tui_file): New method.
14817 (tui_file_fputs): Delete.
14818 (tui_file_get_strbuf): Delete.
14819 (tui_file::puts): New method.
14820 (tui_file_adjust_strbuf): Delete.
14821 (tui_file_flush): Delete.
14822 (tui_file::flush): New method.
14823 * tui/tui-file.h: Tweak intro comment.
14824 Include ui-file.h.
14825 (tui_fileopen, tui_sfileopen, tui_file_get_strbuf)
14826 (tui_file_adjust_strbuf): Delete declarations.
14827 (class tui_file): New class.
14828 * tui/tui-io.c (tui_initialize_io): Use tui_file.
14829 * tui/tui-regs.c (tui_restore_gdbout): Use delete.
14830 (tui_register_format): Use string_stream.
14831 * tui/tui-stack.c (tui_make_status_line): Use string_file.
14832 (tui_get_function_from_frame): Use string_file.
14833 * typeprint.c (type_to_string): Use string_file.
14834 * ui-file.c (struct ui_file, ui_file_magic, ui_file_new): Delete.
14835 (null_stream): New global.
14836 (ui_file_delete): Delete.
14837 (ui_file::ui_file): New.
14838 (null_file_isatty): Delete.
14839 (ui_file::~ui_file): New.
14840 (null_file_rewind): Delete.
14841 (ui_file::printf): New.
14842 (null_file_put): Delete.
14843 (null_file_flush): Delete.
14844 (ui_file::putstr): New.
14845 (null_file_write): Delete.
14846 (ui_file::putstrn): New.
14847 (null_file_read): Delete.
14848 (ui_file::putc): New.
14849 (null_file_fputs): Delete.
14850 (null_file_write_async_safe): Delete.
14851 (ui_file::vprintf): New.
14852 (null_file_delete): Delete.
14853 (null_file::write): New.
14854 (null_file_fseek): Delete.
14855 (null_file::puts): New.
14856 (ui_file_data): Delete.
14857 (null_file::write_async_safe): New.
14858 (gdb_flush, ui_file_isatty): Adjust.
14859 (ui_file_put, ui_file_rewind): Delete.
14860 (ui_file_write): Adjust.
14861 (ui_file_write_for_put): Delete.
14862 (ui_file_write_async_safe, ui_file_read): Adjust.
14863 (ui_file_fseek): Delete.
14864 (fputs_unfiltered): Adjust.
14865 (set_ui_file_flush, set_ui_file_isatty, set_ui_file_rewind)
14866 (set_ui_file_put, set_ui_file_write, set_ui_file_write_async_safe)
14867 (set_ui_file_read, set_ui_file_fputs, set_ui_file_fseek)
14868 (set_ui_file_data): Delete.
14869 (string_file::~string_file, string_file::write)
14870 (struct accumulated_ui_file, do_ui_file_xstrdup, ui_file_xstrdup)
14871 (do_ui_file_as_string, ui_file_as_string): Delete.
14872 (do_ui_file_obsavestring, ui_file_obsavestring): Delete.
14873 (struct mem_file): Delete.
14874 (mem_file_new): Delete.
14875 (stdio_file::stdio_file): New.
14876 (mem_file_delete): Delete.
14877 (stdio_file::stdio_file): New.
14878 (mem_fileopen): Delete.
14879 (stdio_file::~stdio_file): New.
14880 (mem_file_rewind): Delete.
14881 (stdio_file::set_stream): New.
14882 (mem_file_put): Delete.
14883 (stdio_file::open): New.
14884 (mem_file_write): Delete.
14885 (stdio_file_magic, struct stdio_file): Delete.
14886 (stdio_file_new, stdio_file_delete, stdio_file_flush): Delete.
14887 (stdio_file::flush): New.
14888 (stdio_file_read): Rename to ...
14889 (stdio_file::read): ... this. Adjust.
14890 (stdio_file_write): Rename to ...
14891 (stdio_file::write): ... this. Adjust.
14892 (stdio_file_write_async_safe): Rename to ...
14893 (stdio_file::write_async_safe) ... this. Adjust.
14894 (stdio_file_fputs): Rename to ...
14895 (stdio_file::puts) ... this. Adjust.
14896 (stdio_file_isatty): Delete.
14897 (stdio_file_fseek): Delete.
14898 (stdio_file::isatty): New.
14899 (stderr_file_write): Rename to ...
14900 (stderr_file::write) ... this. Adjust.
14901 (stderr_file_fputs): Rename to ...
14902 (stderr_file::puts) ... this. Adjust.
14903 (stderr_fileopen, stdio_fileopen, gdb_fopen): Delete.
14904 (stderr_file::stderr_file): New.
14905 (tee_file_magic): Delete.
14906 (struct tee_file): Delete.
14907 (tee_file::tee_file): New.
14908 (tee_file_new): Delete.
14909 (tee_file::~tee_file): New.
14910 (tee_file_delete): Delete.
14911 (tee_file_flush): Rename to ...
14912 (tee_file::flush): ... this. Adjust.
14913 (tee_file_write): Rename to ...
14914 (tee_file::write): ... this. Adjust.
14915 (tee_file::write_async_safe): New.
14916 (tee_file_fputs): Rename to ...
14917 (tee_file::puts): ... this. Adjust.
14918 (tee_file_isatty): Rename to ...
14919 (tee_file::isatty): ... this. Adjust.
14920 * ui-file.h (struct obstack, struct ui_file): Don't
14921 forward-declare.
14922 (ui_file_new, ui_file_flush_ftype, set_ui_file_flush)
14923 (ui_file_write_ftype)
14924 (set_ui_file_write, ui_file_fputs_ftype, set_ui_file_fputs)
14925 (ui_file_write_async_safe_ftype, set_ui_file_write_async_safe)
14926 (ui_file_read_ftype, set_ui_file_read, ui_file_isatty_ftype)
14927 (set_ui_file_isatty, ui_file_rewind_ftype, set_ui_file_rewind)
14928 (ui_file_put_method_ftype, ui_file_put_ftype, set_ui_file_put)
14929 (ui_file_delete_ftype, set_ui_file_data, ui_file_fseek_ftype)
14930 (set_ui_file_fseek): Delete.
14931 (ui_file_data, ui_file_delete, ui_file_rewind)
14932 (struct ui_file): New.
14933 (ui_file_up): New.
14934 (class null_file): New.
14935 (null_stream): Declare.
14936 (ui_file_write_for_put, ui_file_put): Delete.
14937 (ui_file_xstrdup, ui_file_as_string, ui_file_obsavestring):
14938 Delete.
14939 (ui_file_fseek, mem_fileopen, stdio_fileopen, stderr_fileopen)
14940 (gdb_fopen, tee_file_new): Delete.
14941 (struct string_file): New.
14942 (struct stdio_file): New.
14943 (stdio_file_up): New.
14944 (struct stderr_file): New.
14945 (class tee_file): New.
14946 * ui-out.c (ui_out::field_stream): Take a 'string_file &' instead
14947 of a 'ui_file *'. Adjust.
14948 * ui-out.h (class ui_out) <field_stream>: Likewise.
14949 * utils.c (do_ui_file_delete, make_cleanup_ui_file_delete)
14950 (null_stream): Delete.
14951 (error_stream): Take a 'string_file &' instead of a 'ui_file *'.
14952 Adjust.
14953 * utils.h (struct ui_file): Delete forward declaration..
14954 (make_cleanup_ui_file_delete, null_stream): Delete declarations.
14955 (error_stream): Take a 'string_file &' instead of a
14956 'ui_file *'.
14957 * varobj.c (varobj_value_get_print_value): Use string_file.
14958 * xtensa-tdep.c (xtensa_verify_config): Use string_file.
14959 * gdbarch.c: Regenerate.
14960
187808b0
PA
149612017-02-02 Pedro Alves <palves@redhat.com>
14962
14963 * disasm.c (gdb_disassembler::pretty_print_insn): Rename to...
14964 (gdb_pretty_print_insn): ... this. Now a free function. Add back
14965 a 'gdbarch' parameter. Allocate a mem_fileopen stream here.
14966 Adjust to call gdb_print_insn instead of
14967 gdb_disassembler::print_insn.
14968 (dump_insns, do_mixed_source_and_assembly_deprecated)
14969 (do_mixed_source_and_assembly, do_assembly_only): Add back a
14970 'gdbarch' parameter. Remove gdb_disassembler parameter.
14971 (gdb_disassembly): Don't allocate a gdb_disassembler here.
14972 * disasm.h (gdb_disassembler::pretty_print_insn): Delete
14973 declaration.
14974 (gdb_pretty_print_insn): Re-add declaration.
14975 * record-btrace.c (btrace_insn_history): Don't allocate a
14976 gdb_disassembler here. Adjust to call gdb_pretty_print_insn.
14977
7a8eb317
SM
149782017-02-01 Simon Marchi <simon.marchi@polymtl.ca>
14979
14980 * disasm.h (gdb_disassembly): Remove file_string parameter.
14981 * disasm.c (gdb_disassembly): Likewise.
14982 * cli/cli-cmds.c (print_disassembly): Adapt.
14983 * mi/mi-cmd-disas.c (mi_cmd_disassemble): Likewise.
14984 * stack.c (do_gdb_disassembly): Likewise.
14985
7346ef59
AA
149862017-02-01 Andreas Arnez <arnez@linux.vnet.ibm.com>
14987
14988 * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): For
14989 DWARF_VALUE_LITERAL, no longer ignore the offset on big-endian
14990 targets. And if the implicit value is longer than needed, extract
14991 the first bytes instead of the "least significant" ones.
14992
cd4007e4
MM
149932017-02-01 Markus Metzger <markus.t.metzger@intel.com>
14994
14995 * btrace.c (btrace_enable): Do not call btrace_add_pc for
14996 BTRACE_FORMAT_PT or if can_access_registers_ptid returns false.
14997 (btrace_fetch): Assert can_access_registers_ptid.
14998 * record-btrace.c (require_btrace_thread, record_btrace_info): Call
14999 validate_registers_access.
15000
cf77c34e
MM
150012017-02-01 Markus Metzger <markus.t.metzger@intel.com>
15002
15003 * gdbthread.h (can_access_registers_ptid): New.
15004 * thread.c (can_access_registers_ptid): New.
15005
be85ce7d
PA
150062017-02-01 Pedro Alves <palves@redhat.com>
15007
15008 * i386-tdep.c (i386_fast_tracepoint_valid_at): Use gdb_insn_length.
15009
29b0b251
PA
150102017-01-31 Pedro Alves <palves@redhat.com>
15011
15012 * mi/mi-interp.c (mi_breakpoint_created, mi_breakpoint_modified):
15013 Fix typos.
15014
289b5b24
PA
150152017-01-31 Pedro Alves <palves@redhat.com>
15016
15017 * stack.c (print_frame_args): Remove local mem_fileopen stream,
15018 not used.
15019
b47413b4
PA
150202017-01-31 Pedro Alves <palves@redhat.com>
15021
15022 * varobj.c (varobj_value_get_print_value): Remove xstrdup call.
15023
60adb36c
PA
150242017-01-31 Pedro Alves <palves@redhat.com>
15025
15026 * common/scoped_restore.h
15027 (scoped_restore_tmpl::scoped_restore_tmpl): Template on T2, and
15028 change the value's parameter type to T2.
15029 (make_scoped_restore): Likewise.
15030
2735833d
WT
150312017-01-27 Walfred Tedeschi <walfred.tedeschi@intel.com>
15032 Richard Henderson <rth@redhat.com>
15033
15034 * amd64-linux-nat.c (PTRACE_ARCH_PRCTL): New define.
15035 (amd64_linux_fetch_inferior_registers): Add case to fetch FS_BASE
15036 GS_BASE for older kernels.
15037 (amd64_linux_store_inferior_registers): Add case to store FS_BASE
15038 GS_BASE for older kernels.
15039 * amd64-linux-tdep.c (amd64_linux_gregset_reg_offset): Add FS_BASE
15040 and GS_BASE to the offset table.
15041 (amd64_linux_register_reggroup_p): Add FS_BASE and GS_BASE to the
15042 system register group.
15043 * amd64-nat.c (amd64_native_gregset_reg_offset): Implements case
15044 for older kernels.
15045 * amd64-tdep.c (amd64_init_abi): Add segment registers for the
15046 amd64 ABI.
15047 * amd64-tdep.h (amd64_regnum): Add AMD64_FSBASE_REGNUM and
15048 AMD64_GSBASE_REGNUM.
15049 (AMD64_NUM_REGS): Set to AMD64_GSBASE_REGNUM + 1.
15050 * features/Makefile (amd64-linux.dat, amd64-avx-linux.dat)
15051 (amd64-mpx-linux.dat, amd64-avx512-linux.dat, x32-linux.dat)
15052 (x32-avx-linux.dat, x32-avx512-linux.dat): Add
15053 i386/64bit-segments.xml in those rules.
15054 * features/i386/64bit-segments.xml: New file.
15055 * features/i386/amd64-avx-mpx-linux.xml: Add 64bit-segments.xml.
15056 * features/i386/amd64-avx-linux.xml: Add 64bit-segments.xml.
15057 * features/i386/amd64-avx512-linux.xml: Add 64bit-segments.xml.
15058 * features/i386/amd64-mpx-linux.xml: Add 64bit-segments.xml.
15059 * features/i386/x32-avx512-linux.xml: Add 64bit-segments.xml.
15060 * features/i386/x32-avx-linux.xml: Add 64bit-segments.xml.
15061 * features/i386/amd64-linux.xml: Add 64bit-segments.xml.
15062 * features/i386/amd64-avx-linux.c: Regenerated.
15063 * features/i386/amd64-avx-mpx-linux.c: Regenerated.
15064 * features/i386/amd64-avx-mpx.c: Regenerated.
15065 * features/i386/amd64-avx512-linux.c: Regenerated.
15066 * features/i386/amd64-linux.c: Regenerated.
15067 * features/i386/amd64-mpx-linux.c: Regenerated.
15068 * features/i386/i386-avx-mpx-linux.c: Regenerated.
15069 * features/i386/i386-avx-mpx.c: Regenerated.
15070 * features/i386/x32-avx-linux.c: Regenerated.
15071 * features/i386/x32-avx512-linux.c: Regenerated.
15072 * regformats/i386/amd64-avx-linux.dat: Regenerated.
15073 * regformats/i386/amd64-avx-mpx-linux.dat: Regenerated.
15074 * regformats/i386/amd64-avx512-linux.dat: Regenerated.
15075 * regformats/i386/amd64-linux.dat: Regenerated.
15076 * regformats/i386/amd64-mpx-linux.dat: Regenerated.
15077 * regformats/i386/x32-avx-linux.dat: Regenerated.
15078 * regformats/i386/x32-avx512-linux.dat: Regenerated.
15079 * regformats/i386/x32-linux.dat: Regenerated.
15080
8884e97e
WT
150812017-01-27 Walfred Tedeschi <walfred.tedeschi@intel.com>
15082
15083 * amd64-linux-tdep.h (AMD64_LINUX_ORIG_RAX_REGNUM):
15084 Set to AMD64_NUM_REGS.
15085
7005d26a
WT
150862017-01-27 Walfred Tedeschi <walfred.tedeschi@intel.com>
15087
15088 * amd64-nat.c (amd64_native_gregset_reg_offset): Simplify logic
15089 that checks validity of a register number.
15090
4bd2e1b2
KC
150912017-01-27 Kees Cook <keescook@google.com>
15092
15093 * gdb/arm-linux-nat.c (arm_linux_fetch_inferior_registers): Call
15094 fetch_fpregs if target has fpa registers.
15095 (arm_linux_store_inferior_registers): Call store_fpregs if target
15096 has fpa registers.
15097
7cf1de6c
AA
150982017-01-26 Andreas Arnez <arnez@linux.vnet.ibm.com>
15099
15100 * cris-tdep.c (cris_gdbarch_init): Remove check for
15101 info.byte_order and force it to BFD_ENDIAN_LITTLE.
15102
874a1c8c
AT
151032017-01-26 Antoine Tremblay <antoine.tremblay@ericsson.com>
15104
15105 * corelow.c (get_core_register_section): Check for regset
15106 existence before checking for REGSET_VARIABLE_SIZE.
15107
d8b49cf0
YQ
151082017-01-26 Yao Qi <yao.qi@linaro.org>
15109 Pedro Alves <palves@redhat.com>
15110
15111 PR gdb/20939
15112 * disasm.c (gdb_disassembler::dis_asm_memory_error): Don't
15113 call memory_error, save memaddr instead.
15114 (gdb_disassembler::print_insn): If gdbarch_print_insn returns
15115 negative, cal memory_error.
15116 * disasm.h (gdb_disassembler) <m_err_memaddr>: New field.
15117
658ca58c
YQ
151182017-01-26 Yao Qi <yao.qi@linaro.org>
15119
15120 * disasm-selftests.c (memory_error_test): New function.
15121 (_initialize_disasm_selftests): Register memory_error_test.
15122
79843d45
YQ
151232017-01-26 Yao Qi <yao.qi@linaro.org>
15124
15125 * Makefile.in (SFILES): Add disasm-selftests.c and
15126 selftest-arch.c.
15127 (COMMON_OBS): Add disasm-selftests.o and selftest-arch.o.
15128 * disasm-selftests.c: New file.
15129 * selftest-arch.c: New file.
15130 * selftest-arch.h: New file.
15131
8cafda32
YQ
151322017-01-26 Yao Qi <yao.qi@linaro.org>
15133
15134 * mep-tdep.c (mep_gdb_print_insn): Set info->arch
15135 to bfd_arch_mep. Don't return 0 if section is not
15136 found. Call print_insn_mep.
15137
e47ad6c0
YQ
151382017-01-26 Pedro Alves <palves@redhat.com>
15139 Yao Qi <yao.qi@linaro.org>
15140
15141 * arm-tdep.c: Include "disasm.h".
15142 (gdb_print_insn_arm): Update code to get gdbarch.
15143 * disasm.c (dis_asm_read_memory): Change it to
15144 gdb_disassembler::dis_asm_read_memory.
15145 (dis_asm_memory_error): Likewise.
15146 (dis_asm_print_address): Likewise.
15147 (gdb_pretty_print_insn): Change it to
15148 gdb_disassembler::pretty_print_insn.
15149 (dump_insns): Add one argument gdb_disassemlber. All
15150 callers updated.
15151 (do_mixed_source_and_assembly_deprecated): Likewise.
15152 (do_mixed_source_and_assembly): Likewise.
15153 (do_assembly_only): Likewise.
15154 (gdb_disassembler::gdb_disassembler): New.
15155 (gdb_disassembler::print_insn): New.
15156 * disasm.h (class gdb_disassembler): New.
15157 (gdb_pretty_print_insn): Remove declaration.
15158 (gdb_disassemble_info): Likewise.
15159 * guile/scm-disasm.c (class gdbscm_disassembler): New.
15160 (gdbscm_disasm_read_memory_worker): Update.
15161 (gdbscm_disasm_read_memory): Update.
15162 (gdbscm_disasm_memory_error): Remove.
15163 (gdbscm_disasm_print_address): Remove.
15164 (gdbscm_disassembler::gdbscm_disassembler): New.
15165 (gdbscm_print_insn_from_port): Update.
15166 * mips-tdep.c: Include disasm.h.
15167 (gdb_print_insn_mips): Update code to get gdbarch.
15168 * record-btrace.c (btrace_insn_history): Update.
15169 * spu-tdep.c: Include disasm.h.
15170 (struct spu_dis_asm_data): Remove.
15171 (struct spu_dis_asm_info): New.
15172 (spu_dis_asm_print_address): Use spu_dis_asm_info to get
15173 SPU id.
15174 (gdb_print_insn_spu): Cast disassemble_info to
15175 spu_dis_asm_info.
15176
80d75874
YQ
151772017-01-26 Yao Qi <yao.qi@linaro.org>
15178
15179 * disasm.c (do_ui_file_delete): Delete.
15180 (gdb_insn_length): Move code creating stream to ...
15181 * utils.c (null_stream): ... here. New function.
15182 * utils.h (null_stream): Declare.
15183
60685cd0
SM
151842017-01-23 Simon Marchi <simon.marchi@polymtl.ca>
15185
15186 * python/py-inferior.c (find_thread_object): Return directly
15187 from the loop. Remove "found" variable.
15188
eb1cdb62
JB
151892017-01-21 Joel Brobecker <brobecker@adacore.com>
15190
15191 GDB 7.12.1 released.
15192
b1ce6568
SM
151932017-01-20 Simon Marchi <simon.marchi@ericsson.com>
15194
15195 * python/py-function.c (fnpy_call): Reorder declarations to have
15196 the gdbpy_enter object declared first.
15197 * python/py-xmethods.c (gdbpy_get_xmethod_arg_types): Likewise.
15198
6f8b0407
SM
151992017-01-20 Simon Marchi <simon.marchi@ericsson.com>
15200
fec93fb1 15201 PR python/21068
6f8b0407
SM
15202 * python/python-internal.h (PyMem_RawMalloc): Define for
15203 Python < 3.4.
15204 * python/py-gdb-readline.c (gdbpy_readline_wrapper): Use
15205 PyMem_RawMalloc instead of PyMem_Malloc.
15206
78cbbba8
LM
152072017-01-20 Mike Wrighton <mike_wrighton@codesourcery.com>
15208 Luis Machado <lgustavo@codesourcery.com>
15209
15210 * NEWS (New commands): Mention flash-erase.
15211 (New MI commands): Mention target-flash-erase.
15212 * mi/mi-cmds.c (mi_cmd_target_flash_erase): Add target-flash-erase MI
15213 command.
15214 * mi/mi-cmds.h (mi_cmd_target_flash_erase): New declaration.
15215 * mi/mi-main.c (mi_cmd_target_flash_erase): New function.
15216 * target.c (flash_erase_command): New function.
15217 (initialize_targets): Add new flash-erase command.
15218 * target.h (flash_erase_command): New declaration.
15219
2132fe85
JB
152202017-01-20 Joel Brobecker <brobecker@adacore.com>
15221
15222 * nat/linux-ptrace.c: Only include <sys/procfs.h> if
15223 HAVE_SYS_PROCFS_H is defined.
15224
d1dff226
AH
152252017-01-18 Alan Hayward <alan.hayward@arm.com>
15226
15227 * remote.c (struct cached_reg): Change data into a pointer.
15228 * (stop_reply_dtr): Free data pointers before deleting vector.
15229 (process_stop_reply): Likewise.
15230 (remote_parse_stop_reply): Allocate space for data
15231
9890e433
AH
152322017-01-18 Alan Hayward <alan.hayward@arm.com>
15233
15234 * amd64-tdep.c (amd64_pseudo_register_read_value): remove
15235 MAX_REGISTER_SIZE.
15236 (amd64_pseudo_register_read_value): Likewise.
15237 * remote.c (fetch_register_using_p): Remove MAX_REGISTER_SIZE.
15238 (store_register_using_P): Likewise.
15239 * regcache.c (regcache_xfer_part): Likewise.
15240
7a36499a
IR
152412017-01-16 Ivo Raisr <ivo.raisr@oracle.com>
15242
15243 Split real and pseudo registers.
15244 * sparc-tdep.h (SPARC_CORE_REGISTERS): New macro.
15245 (sparc32_pseudo_regnum): New enum.
15246 * sparc64-tdep.h (sparc64_pseudo_regnum): New enum.
15247 * sparc-tdep.c (SPARC32_FPU_REGISTERS): New macro.
15248 (SPARC32_CP0_REGISTERS): New macro.
15249 (sparc32_pseudo_register_name): New function.
15250 (sparc32_register_name): Use sparc32_pseudo_register_name.
15251 (sparc32_pseudo_register_type): New function.
15252 (sparc32_register_type): Use sparc32_pseudo_register_type.
15253 (sparc32_pseudo_register_read, sparc32_pseudo_register_write): Handle
15254 pseudo register numbers.
15255 * sparc64-tdep.c SPARC64_FPU_REGISTERS): New macro.
15256 (SPARC64_CP0_REGISTERS): New macro.
15257 (sparc64_pseudo_register_name): New function.
15258 (sparc64_register_name): Use sparc64_pseudo_register_name.
15259 (sparc64_pseudo_register_type): New function.
15260 (sparc64_register_type): Use sparc64_pseudo_register_type.
15261 (sparc64_pseudo_register_read, sparc64_pseudo_register_write): Handle
15262 pseudo register numbers.
15263 (sparc64_store_floating_fields, sparc64_extract_floating_fields,
15264 sparc64_store_arguments): Handle pseudo register numbers.
15265
6f8976bf
YQ
152662017-01-13 Yao Qi <yao.qi@linaro.org>
15267
15268 * remote.c (REMOTE_DEBUG_MAX_CHAR): New macro.
15269 (putpkt_binary): Print only REMOTE_DEBUG_MAX_CHAR chars in debug
15270 output.
15271 (getpkt_or_notif_sane_1): Likewise.
15272
e4241ace
YQ
152732017-01-13 Yao Qi <yao.qi@linaro.org>
15274
15275 * Makefile.in (checker-headers): Use CXX and CXX_DIALET instead
15276 of CC. Pass "-x c++-header" instead of "-x c".
15277
3015c064
SM
152782017-01-12 Simon Marchi <simon.marchi@ericsson.com>
15279
15280 * remote.c (remote_can_async_p): Update comment.
15281
fde1b17d
SM
152822017-01-12 Simon Marchi <simon.marchi@ericsson.com>
15283
15284 * linux-nat.c (linux_nat_can_async_p): Update comment.
15285
ca1ca08b
SM
152862017-01-12 Simon Marchi <simon.marchi@ericsson.com>
15287
15288 * serial.c (serial_open): Forget about "pc" and "lpt" serial interface.
15289
4ad2da73
SM
152902017-01-11 Simon Marchi <simon.marchi@ericsson.com>
15291
15292 * cli/cli-decode.c (lookup_cmd_1): Fix typo in comment.
15293
c8b23b3f
TT
152942017-01-10 Tom Tromey <tom@tromey.com>
15295
15296 * python/py-type.c (typy_legacy_template_argument): Update.
15297 * cp-support.h (struct demangle_parse_info) (demangle_parse_info,
15298 ~demangle_parse_info): Declare new members.
15299 (cp_demangled_name_to_comp): Return unique_ptr.
15300 (cp_demangled_name_parse_free)
15301 (make_cleanup_cp_demangled_name_parse_free)
15302 (cp_new_demangle_parse_info): Remove.
15303 * cp-support.c (do_demangled_name_parse_free_cleanup)
15304 (make_cleanup_cp_demangled_name_parse_free): Remove.
15305 (inspect_type, cp_canonicalize_string_full)
15306 (cp_canonicalize_string): Update.
15307 (mangled_name_to_comp): Change return type.
15308 (cp_class_name_from_physname, method_name_from_physname)
15309 (cp_func_name, cp_remove_params): Update.
15310 * cp-name-parser.y (demangle_parse_info): New constructor, from
15311 cp_new_demangle_parse_info.
15312 (~demangle_parse_info): New destructor, from
15313 cp_demangled_name_parse_free.
15314 (cp_merge_demangle_parse_infos): Update.
15315 (cp_demangled_name_to_comp): Change return type.
15316
1ac32117
TT
153172017-01-10 Tom Tromey <tom@tromey.com>
15318
15319 * top.c (prevent_dont_repeat): Change return type.
15320 * python/python.c (execute_gdb_command): Use std::string.
15321 Update.
15322 * guile/guile.c (gdbscm_execute_gdb_command): Update.
15323 * command.h (prevent_dont_repeat): Change return type.
15324 * breakpoint.c (bpstat_do_actions_1): Update.
15325
0cf08227
TT
153262017-01-10 Tom Tromey <tom@tromey.com>
15327
15328 * value.h (scoped_value_mark::~scoped_value_mark): Call
15329 free_to_mark.
15330 (scoped_value_mark::free_to_mark): New method.
15331 * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Use
15332 scoped_value_mark.
15333
eb115069
TT
153342017-01-10 Tom Tromey <tom@tromey.com>
15335
15336 * python/py-value.c (valpy_dereference, valpy_referenced_value)
15337 (valpy_reference_value, valpy_const_value, valpy_get_address)
15338 (valpy_get_dynamic_type, valpy_lazy_string, valpy_do_cast)
15339 (valpy_getitem, valpy_call, valpy_binop_throw, valpy_negative)
15340 (valpy_absolute, valpy_richcompare_throw): Use scoped_value_mark.
15341 * dwarf2loc.c (dwarf2_loc_desc_get_symbol_read_needs): Use
15342 scoped_value_mark.
15343 * dwarf2-frame.c (execute_stack_op): Use scoped_value_mark.
15344 * value.h (scoped_value_mark): New class.
15345
906768f9
TT
153462017-01-10 Tom Tromey <tom@tromey.com>
15347
15348 * dwarf2read.c (dwarf2_build_psymtabs): Use psymtab_discarder.
15349 * psympriv.h (make_cleanup_discard_psymtabs): Don't declare.
15350 * psymtab.c (discard_psymtabs_upto): Remove.
15351 (make_cleanup_discard_psymtabs): Remove.
15352 (struct psymtab_state): Remove.
15353
bef155c3
TT
153542017-01-10 Tom Tromey <tom@tromey.com>
15355
15356 * record-full.c (record_full_save_cleanups): Remove.
15357 (record_full_save): Use gdb::unlinker.
15358 * gcore.c (do_bfd_delete_cleanup): Remove.
15359 (gcore_command): Use gdb::unlinker, unique_xmalloc_ptr. Remove
15360 cleanups.
15361 * dwarf2read.c (unlink_if_set): Remove.
15362 (write_psymtabs_to_index): Use gdb::unlinker.
15363 * common/gdb_unlinker.h: New file.
15364
192b62ce
TT
153652017-01-10 Tom Tromey <tom@tromey.com>
15366
15367 * windows-tdep.c (windows_xfer_shared_library): Update.
15368 * windows-nat.c (windows_make_so): Update.
15369 * utils.h (make_cleanup_bfd_unref): Remove.
15370 * utils.c (do_bfd_close_cleanup, make_cleanup_bfd_unref): Remove.
15371 * symfile.h (symfile_bfd_open)
15372 (find_separate_debug_file_in_section): Return gdb_bfd_ref_ptr.
15373 * symfile.c (read_symbols, symbol_file_add)
15374 (separate_debug_file_exists): Update.
15375 (symfile_bfd_open): Return gdb_bfd_ref_ptr.
15376 (generic_load, reread_symbols): Update.
15377 * symfile-mem.c (symbol_file_add_from_memory): Update.
15378 * spu-linux-nat.c (spu_bfd_open): Return gdb_bfd_ref_ptr.
15379 (spu_symbol_file_add_from_memory): Update.
15380 * solist.h (struct target_so_ops) <bfd_open>: Return
15381 gdb_bfd_ref_ptr.
15382 (solib_bfd_fopen, solib_bfd_open): Return gdb_bfd_ref_ptr.
15383 * solib.c (solib_bfd_fopen, solib_bfd_open): Return
15384 gdb_bfd_ref_ptr.
15385 (solib_map_sections, reload_shared_libraries_1): Update.
15386 * solib-svr4.c (enable_break): Update.
15387 * solib-spu.c (spu_bfd_fopen): Return gdb_bfd_ref_ptr.
15388 * solib-frv.c (enable_break2): Update.
15389 * solib-dsbt.c (enable_break): Update.
15390 * solib-darwin.c (gdb_bfd_mach_o_fat_extract): Return
15391 gdb_bfd_ref_ptr.
15392 (darwin_solib_get_all_image_info_addr_at_init): Update.
15393 (darwin_bfd_open): Return gdb_bfd_ref_ptr.
15394 * solib-aix.c (solib_aix_bfd_open): Return gdb_bfd_ref_ptr.
15395 * record-full.c (record_full_save): Update.
15396 * python/py-objfile.c (objfpy_add_separate_debug_file): Update.
15397 * procfs.c (insert_dbx_link_bpt_in_file): Update.
15398 * minidebug.c (find_separate_debug_file_in_section): Return
15399 gdb_bfd_ref_ptr.
15400 * machoread.c (macho_add_oso_symfile): Change abfd to
15401 gdb_bfd_ref_ptr.
15402 (macho_symfile_read_all_oso): Update.
15403 (macho_check_dsym): Return gdb_bfd_ref_ptr.
15404 (macho_symfile_read): Update.
15405 * jit.c (bfd_open_from_target_memory): Return gdb_bfd_ref_ptr.
15406 (jit_bfd_try_read_symtab): Update.
15407 * gdb_bfd.h (gdb_bfd_open, gdb_bfd_fopen, gdb_bfd_openr)
15408 (gdb_bfd_openw, gdb_bfd_openr_iovec)
15409 (gdb_bfd_openr_next_archived_file, gdb_bfd_fdopenr): Return
15410 gdb_bfd_ref_ptr.
15411 (gdb_bfd_ref_policy): New struct.
15412 (gdb_bfd_ref_ptr): New typedef.
15413 * gdb_bfd.c (gdb_bfd_open, gdb_bfd_fopen, gdb_bfd_openr)
15414 (gdb_bfd_openw, gdb_bfd_openr_iovec)
15415 (gdb_bfd_openr_next_archived_file, gdb_bfd_fdopenr): Return
15416 gdb_bfd_ref_ptr.
15417 * gcore.h (create_gcore_bfd): Return gdb_bfd_ref_ptr.
15418 * gcore.c (create_gcore_bfd): Return gdb_bfd_ref_ptr.
15419 (gcore_command): Update.
15420 * exec.c (exec_file_attach): Update.
15421 * elfread.c (elf_symfile_read): Update.
15422 * dwarf2read.c (dwarf2_get_dwz_file): Update.
15423 (try_open_dwop_file, open_dwo_file): Return gdb_bfd_ref_ptr.
15424 (open_and_init_dwo_file): Update.
15425 (open_dwp_file): Return gdb_bfd_ref_ptr.
15426 (open_and_init_dwp_file): Update.
15427 * corelow.c (core_open): Update.
15428 * compile/compile-object-load.c (compile_object_load): Update.
15429 * common/gdb_ref_ptr.h (ref_ptr::operator->): New operator.
15430 * coffread.c (coff_symfile_read): Update.
15431 * cli/cli-dump.c (bfd_openr_or_error, bfd_openw_or_error): Return
15432 gdb_bfd_ref_ptr. Rename.
15433 (dump_bfd_file, restore_command): Update.
15434 * build-id.h (build_id_to_debug_bfd): Return gdb_bfd_ref_ptr.
15435 * build-id.c (build_id_to_debug_bfd): Return gdb_bfd_ref_ptr.
15436 (find_separate_debug_file_by_buildid): Update.
15437
50315b21
TT
154382017-01-10 Tom Tromey <tom@tromey.com>
15439
15440 * common/gdb_ref_ptr.h: New file.
15441 * python/py-ref.h (struct gdbpy_ref_policy): New.
15442 (gdbpy_ref): Now a typedef.
15443
fc4007c9
TT
154442017-01-10 Tom Tromey <tom@tromey.com>
15445
15446 * utils.h (make_cleanup_htab_delete): Don't declare.
15447 * utils.c (do_htab_delete_cleanup, make_cleanup_htab_delete):
15448 Remove.
15449 * linespec.c (decode_compound_collector): Add constructor,
15450 destructor.
15451 (lookup_prefix_sym): Remove cleanup.
15452 (symtab_collector): Add constructor, destructor.
15453 (collect_symtabs_from_filename): Remove cleanup.
15454 * disasm.c (do_mixed_source_and_assembly): Use htab_up.
15455 * compile/compile-c-symbols.c (generate_c_for_variable_locations):
15456 Use htab_up.
15457 * gnu-v3-abi.c (gnuv3_print_vtable): Use htab_up.
15458 * dwarf2read.c (dw2_expand_symtabs_matching)
15459 (dw2_map_symbol_filenames, dwarf_decode_macros)
15460 (write_psymtabs_to_index): Use htab_up.
15461 * dwarf2loc.c (func_verify_no_selftailcall)
15462 (call_site_find_chain_1, func_verify_no_selftailcall)
15463 (chain_candidate, call_site_find_chain_1): Use std::unordered_set,
15464 std::vector, gdb::unique_xmalloc_ptr.
15465 (call_sitep): Remove typedef.
15466 (dwarf2_locexpr_baton_eval): Remove unused variable.
15467
8dbcee67
TT
154682017-01-10 Tom Tromey <tom@tromey.com>
15469
15470 * python/python-internal.h (make_cleanup_py_decref)
15471 (make_cleanup_py_xdecref): Don't declare.
15472 * python/py-utils.c (py_decref, make_cleanup_py_decref)
15473 (py_xdecref, make_cleanup_py_xdecref): Remove.
15474
13df46cc
TT
154752017-01-10 Tom Tromey <tom@tromey.com>
15476
15477 * python/py-framefilter.c (py_mi_print_variables): Use gdbpy_ref.
15478 (py_print_locals, enumerate_locals, py_print_args): Use gdbpy_ref.
15479
06fc9bf7
TT
154802017-01-10 Tom Tromey <tom@tromey.com>
15481
15482 * python/py-framefilter.c (enumerate_args): Use gdbpy_ref.
15483
830a4934
TT
154842017-01-10 Tom Tromey <tom@tromey.com>
15485
15486 * python/py-utils.c (unicode_to_encoded_string)
15487 (python_string_to_target_string)
15488 (python_string_to_target_python_string)
15489 (python_string_to_host_string, gdbpy_obj_to_string)
15490 (get_addr_from_python): Use gdbpy_ref.
15491
4586d543
TT
154922017-01-10 Tom Tromey <tom@tromey.com>
15493
15494 * python/py-unwind.c (pyuw_object_attribute_to_pointer): Use
15495 gdbpy_ref.
15496
59876f8f
TT
154972017-01-10 Tom Tromey <tom@tromey.com>
15498
15499 * python/python.c (eval_python_command, gdbpy_decode_line)
15500 (gdbpy_run_events, gdbpy_start_type_printers)
15501 (gdbpy_apply_type_printers): Use gdbpy_ref.
15502
97d83487
TT
155032017-01-10 Tom Tromey <tom@tromey.com>
15504
15505 * python/py-param.c (get_doc_string, compute_enum_values): Use
15506 gdbpy_ref.
15507
9205649a
TT
155082017-01-10 Tom Tromey <tom@tromey.com>
15509
15510 * python/py-inferior.c (find_thread_object, build_inferior_list):
15511 Use gdbpy_ref.
15512
74c49d45
TT
155132017-01-10 Tom Tromey <tom@tromey.com>
15514
15515 * python/py-framefilter.c (py_print_frame): Use gdbpy_ref.
15516
16361ffb
TT
155172017-01-10 Tom Tromey <tom@tromey.com>
15518
15519 * python/py-finishbreakpoint.c (bpfinishpy_out_of_scope): Use
15520 gdbpy_ref.
15521
905f2cca
TT
155222017-01-10 Tom Tromey <tom@tromey.com>
15523
15524 * python/py-cmd.c (cmdpy_completer_helper): Use gdbpy_ref. Remove
15525 extra incref.
15526 (cmdpy_completer_handle_brkchars, cmdpy_completer, cmdpy_init):
15527 Use gdbpy_ref.
15528
64081434
TT
155292017-01-10 Tom Tromey <tom@tromey.com>
15530
15531 * python/py-breakpoint.c (gdbpy_breakpoint_cond_says_stop): Use
15532 gdbpy_ref.
15533
59e9e831
TT
155342017-01-10 Tom Tromey <tom@tromey.com>
15535
15536 * python/py-arch.c (archpy_disassemble): Use gdbpy_ref. Don't
15537 decref results of PyArg_ParseTupleAndKeywords.
15538
9de10f6d
TT
155392017-01-10 Tom Tromey <tom@tromey.com>
15540
15541 * python/python.c (python_run_simple_file): Use
15542 unique_xmalloc_ptr, gdbpy_ref.
15543
2bd5759d
TT
155442017-01-10 Tom Tromey <tom@tromey.com>
15545
15546 * python/py-prettyprint.c (print_stack_unless_memory_error)
15547 (print_string_repr, print_children): Use gdbpy_ref.
15548 (dummy_python_frame): New class.
15549 (dummy_python_frame::dummy_python_frame): Rename from
15550 push_dummy_python_frame.
15551 (py_restore_tstate): Remove.
15552
3b4e0e01
TT
155532017-01-10 Tom Tromey <tom@tromey.com>
15554
15555 * python/py-framefilter.c (py_print_frame): Use gdbpy_ref.
15556
17a22718
TT
155572017-01-10 Tom Tromey <tom@tromey.com>
15558
15559 * python/python.c (ensure_python_env, restore_python_env):
15560 Remove.
15561 * python/python-internal.h (ensure_python_env): Don't declare.
15562 * varobj.h (varobj_ensure_python_env): Don't declare.
15563 * varobj.c (varobj_ensure_python_env): Remove.
15564
68cdc557
TT
155652017-01-10 Tom Tromey <tom@tromey.com>
15566
15567 * varobj.c (varobj_value_get_print_value): Use
15568 gdbpy_enter_varobj.
15569
1eba6383
TT
155702017-01-10 Tom Tromey <tom@tromey.com>
15571
15572 * python/py-prettyprint.c (print_string_repr, print_children):
15573 Update.
15574 * python/py-lazy-string.c (gdbpy_extract_lazy_string): Change type
15575 of "encoding".
15576 * varobj.c (varobj_value_get_print_value): Update.
15577 * python/python-internal.h (gdbpy_extract_lazy_string): Update.
15578
bde7b3e3
TT
155792017-01-10 Tom Tromey <tom@tromey.com>
15580
15581 * varobj.c (varobj_get_display_hint)
15582 (dynamic_varobj_has_child_method, install_new_value_visualizer)
15583 (varobj_set_visualizer, free_variable): Use
15584 gdbpy_enter_varobj.
15585
a7785f8c
TT
155862017-01-10 Tom Tromey <tom@tromey.com>
15587
15588 * python/python.c (python_command): Use gdbpy_enter, gdbpy_ref.
15589 (do_finish_initialization): New function. Use gdbpy_ref.
15590 (gdbpy_finish_initialization): Use gdbpy_enter. Call
15591 do_finish_initialization.
15592
2865bfce
TT
155932017-01-10 Tom Tromey <tom@tromey.com>
15594
15595 * python/py-param.c (get_set_value, get_show_value): Use
15596 gdbpy_enter, gdbpy_ref.
15597
0e9dcc75
TT
155982017-01-10 Tom Tromey <tom@tromey.com>
15599
15600 * python/py-function.c (fnpy_call): Use gdbpy_enter, gdbpy_ref.
15601
12a5cedd
TT
156022017-01-10 Tom Tromey <tom@tromey.com>
15603
15604 * python/py-cmd.c (cmdpy_function): Use gdbpy_enter, gdbpy_ref.
15605
788f2586
TT
156062017-01-10 Tom Tromey <tom@tromey.com>
15607
15608 * python/py-varobj.c (py_varobj_iter_dtor, py_varobj_iter_next):
15609 Use gdbpy_enter_varobj.
15610
6cd67bea
TT
156112017-01-10 Tom Tromey <tom@tromey.com>
15612
15613 * varobj.c (gdbpy_enter_varobj): New constructor.
15614 * python/python-internal.h (gdbpy_enter_varobj): New class.
15615 * python/py-varobj.c (py_varobj_get_iterator): Use
15616 gdbpy_enter_varobj.
15617
14b122bf
TT
156182017-01-10 Tom Tromey <tom@tromey.com>
15619
15620 * python/py-xmethods.c (gdbpy_get_xmethod_result_type): Use
15621 gdbpy_enter, gdbpy_ref, unique_xmalloc_ptr.
15622 (gdbpy_invoke_xmethod): Use gdbpy_ref, gdbpy_enter.
15623 (gdbpy_get_xmethod_arg_types): Use gdbpy_ref,
15624 unique_xmalloc_ptr.
15625 (gdbpy_get_xmethod_arg_types): Use gdbpy_ref, gdbpy_enter.
15626
bf1ca3b9
TT
156272017-01-10 Tom Tromey <tom@tromey.com>
15628
15629 * python/py-xmethods.c (invoke_match_method): Use
15630 gdbpy_ref.
15631
572a5524
TT
156322017-01-10 Tom Tromey <tom@tromey.com>
15633
15634 * python/py-xmethods.c (gdbpy_get_matching_xmethod_workers): use
15635 gdbpy_enter, gdbpy_ref.
15636
396a78b6
TT
156372017-01-10 Tom Tromey <tom@tromey.com>
15638
15639 * python/python.c (python_interactive_command): Use gdbpy_enter.
15640
a88b13c7
TT
156412017-01-10 Tom Tromey <tom@tromey.com>
15642
15643 * python/python.c (gdbpy_before_prompt_hook): Use gdbpy_enter,
15644 gdbpy_ref.
15645
e9f0c363
TT
156462017-01-10 Tom Tromey <tom@tromey.com>
15647
15648 * python/py-prettyprint.c (gdbpy_apply_val_pretty_printer): Use
15649 gdbpy_enter, gdbpy_ref, unique_xmalloc_ptr.
15650
6349f452
TT
156512017-01-10 Tom Tromey <tom@tromey.com>
15652
15653 * utils.h (htab_deleter): New struct.
15654 (htab_up): New typedef.
15655 * python/py-framefilter.c (gdbpy_apply_frame_filter): Use
15656 gdbpy_enter, gdbpy_ref, htab_up.
15657
c0171de6
TT
156582017-01-10 Tom Tromey <tom@tromey.com>
15659
15660 * python/py-unwind.c (pending_frame_invalidate): Remove.
15661 (pyuw_sniffer): Use gdbpy_enter and gdbpy_ref.
15662
f18e226f
TT
156632017-01-10 Tom Tromey <tom@tromey.com>
15664
15665 * python/py-xmethods.c (gdbpy_free_xmethod_worker_data)
15666 (gdbpy_clone_xmethod_worker_data): Use gdbpy_enter.
15667
c57af3f1
TT
156682017-01-10 Tom Tromey <tom@tromey.com>
15669
15670 * python/py-type.c (save_objfile_types): Use gdbpy_enter.
15671
60e600ec
TT
156722017-01-10 Tom Tromey <tom@tromey.com>
15673
15674 * python/python.c (gdbpy_eval_from_control_command)
15675 (gdbpy_source_script, gdbpy_run_events)
15676 (gdbpy_source_objfile_script, gdbpy_execute_objfile_script)
15677 (gdbpy_free_type_printers, gdbpy_finish_initialization): Use
15678 gdbpy_enter.
15679
bf7da5b0
TT
156802017-01-10 Tom Tromey <tom@tromey.com>
15681
15682 * python/py-progspace.c (py_free_pspace): Use gdbpy_enter.
15683
2d38bced
TT
156842017-01-10 Tom Tromey <tom@tromey.com>
15685
15686 * python/py-objfile.c (py_free_objfile): Use gdbpy_enter.
15687
07bc7329
TT
156882017-01-10 Tom Tromey <tom@tromey.com>
15689
15690 * python/py-inferior.c (python_on_normal_stop, python_on_resume)
15691 (python_on_inferior_call_pre, python_on_inferior_call_post)
15692 (python_on_memory_change, python_on_register_change)
15693 (python_inferior_exit, python_new_objfile, add_thread_object)
15694 (delete_thread_object, py_free_inferior): Use gdbpy_enter.
15695
6e7c365e
TT
156962017-01-10 Tom Tromey <tom@tromey.com>
15697
15698 * python/py-finishbreakpoint.c (bpfinishpy_handle_stop)
15699 (bpfinishpy_handle_exit): Use gdbpy_enter.
15700
6ba0cd40
TT
157012017-01-10 Tom Tromey <tom@tromey.com>
15702
15703 * python/py-cmd.c (cmdpy_destroyer)
15704 (cmdpy_completer_handle_brkchars, cmdpy_completer): Use
15705 gdbpy_enter.
15706
de2dc875
TT
157072017-01-10 Tom Tromey <tom@tromey.com>
15708
15709 * python/py-breakpoint.c (gdbpy_breakpoint_cond_says_stop): Use
15710 gdbpy_enter.
15711 (gdbpy_breakpoint_has_cond): Likewise.
15712
4ecee2c4
TT
157132017-01-10 Tom Tromey <tom@tromey.com>
15714
15715 * python/python.c (gdbpy_enter): New constructor.
15716 (~gdbpy_enter): New destructor.
15717 (restore_python_env, ensure_python_env): Rewrite.
15718 * python/python-internal.h (gdbpy_enter): New class.
15719
37fce74f
TT
157202017-01-10 Tom Tromey <tom@tromey.com>
15721
15722 * python/py-symbol.c (gdbpy_lookup_symbol): Use gdbpy_ref.
15723
53a0cca3
TT
157242017-01-10 Tom Tromey <tom@tromey.com>
15725
15726 * python/py-value.c (value_has_field, get_field_flag)
15727 (get_field_type, valpy_getitem, convert_value_from_python): Use
15728 gdbpy_ref.
15729
ff3724f5
TT
157302017-01-10 Tom Tromey <tom@tromey.com>
15731
15732 * python/python.c (gdbpy_progspaces, gdbpy_objfiles): Use
15733 gdbpy_ref.
15734
0700aea5
TT
157352017-01-10 Tom Tromey <tom@tromey.com>
15736
15737 * python/py-prettyprint.c (search_pp_list)
15738 (find_pretty_printer_from_objfiles)
15739 (find_pretty_printer_from_progspace)
15740 (find_pretty_printer_from_gdb, find_pretty_printer)
15741 (gdbpy_get_display_hint, gdbpy_get_varobj_pretty_printer): Use
15742 gdbpy_ref.
15743
1bb44c9f
TT
157442017-01-10 Tom Tromey <tom@tromey.com>
15745
15746 * python/py-param.c (call_doc_function): Use gdbpy_ref.
15747
87ce03fd
TT
157482017-01-10 Tom Tromey <tom@tromey.com>
15749
15750 * python/py-linetable.c (build_line_table_tuple_from_pcs)
15751 (ltpy_get_all_source_lines): Use gdbpy_ref.
15752
ee0a3fb8
TT
157532017-01-10 Tom Tromey <tom@tromey.com>
15754
15755 * python/py-framefilter.c (extract_sym, extract_value)
15756 (get_py_iter_from_func, bootstrap_python_frame_filters): Use
15757 gdbpy_ref.
15758
bf2a52fa
TT
157592017-01-10 Tom Tromey <tom@tromey.com>
15760
15761 * python/py-breakpoint.c (gdbpy_breakpoints): Use gdbpy_ref.
15762
f59fe7f8
TT
157632017-01-10 Tom Tromey <tom@tromey.com>
15764
15765 * python/py-inferior.c (gdbpy_inferiors): Use gdbpy_ref.
15766
80bd970a
TT
157672017-01-10 Tom Tromey <tom@tromey.com>
15768
15769 * python/py-function.c (convert_values_to_python, fnpy_init): Use
15770 gdbpy_ref.
15771
d1b3de2e
TT
157722017-01-10 Tom Tromey <tom@tromey.com>
15773
15774 * python/py-cmd.c (gdbpy_string_to_argv): Use gdbpy_ref.
15775
3bb43384
TT
157762017-01-10 Tom Tromey <tom@tromey.com>
15777
15778 * python/py-type.c (convert_field, make_fielditem, typy_fields)
15779 (typy_range): Use gdbpy_ref.
15780
abf5651e
TT
157812017-01-10 Tom Tromey <tom@tromey.com>
15782
15783 * python/py-threadevent.c (create_thread_event_object): Use
15784 gdbpy_ref.
15785 * python/py-stopevent.c (create_stop_event_object): Simplify.
15786 (emit_stop_event): Use gdbpy_ref.
15787 * python/py-signalevent.c (create_signal_event_object): Use
15788 gdbpy_ref.
15789 * python/py-newobjfileevent.c (create_new_objfile_event_object)
15790 (emit_new_objfile_event, create_clear_objfiles_event_object)
15791 (emit_clear_objfiles_event): Use gdbpy_ref.
15792 * python/py-infevents.c (create_inferior_call_event_object)
15793 (create_register_changed_event_object)
15794 (create_memory_changed_event_object, emit_inferior_call_event)
15795 (emit_memory_changed_event, emit_register_changed_event): Use
15796 gdbpy_ref.
15797 * python/py-exitedevent.c (create_exited_event_object)
15798 (emit_exited_event): Use gdbpy_ref.
15799 * python/py-event.h (evpy_emit_event): Remove
15800 CPYCHECKER_STEALS_REFERENCE_TO_ARG annotation.
15801 * python/py-event.c (evpy_emit_event): Use gdbpy_ref.
15802 * python/py-continueevent.c (emit_continue_event): Use
15803 gdbpy_ref.
15804 * python/py-breakpoint.c (gdbpy_breakpoint_created)
15805 (gdbpy_breakpoint_deleted, gdbpy_breakpoint_modified): Use
15806 gdbpy_ref.
15807 * python/py-bpevent.c (create_breakpoint_event_object): Use
15808 gdbpy_ref.
15809
a68ff33e
TT
158102017-01-10 Tom Tromey <tom@tromey.com>
15811
15812 * python/py-ref.h: New file.
15813
7becfd03
SM
158142017-01-10 Simon Marchi <simon.marchi@ericsson.com>
15815
15816 * cli-out.c (cli_ui_out::do_redirect): Change return type to
15817 void.
15818 * cli-out.h (cli_ui_out::do_redirect): Likewise.
15819 * mi/mi-out.c (mi_ui_out::do_redirect): Likewise.
15820 * mi/mi-out.h (mi_ui_out::do_redirect): Likewise.
15821 * ui-out.c (ui_out::redirect): Likewise.
15822 * ui-out.h (ui_out::redirect, ui_out::do_redirect): Likewise.
15823 * cli/cli-logging.c (set_logging_redirect): Update call site of
15824 ui_out::redirect.
15825 (handle_redirections): Likewise.
15826 * scm-ports.c (ioscm_with_output_to_port_worker): Likewise.
15827 * top.c (execute_command_to_string): Likewise.
15828 * utils.c (do_ui_out_redirect_pop): Likewise.
15829
df294654
SM
158302017-01-10 Simon Marchi <simon.marchi@ericsson.com>
15831
15832 * stack.c (_initialize_stack): Update "frame" command help message.
15833
f5e6296e
IB
158342017-01-08 Iain Buclaw <ibuclaw@gdcproject.org>
15835
15836 * d-exp.y (CastExpression): Emit UNOP_CAST_TYPE.
15837
0e2d6fa6
YQ
158382017-01-06 Yao Qi <yao.qi@linaro.org>
15839
15840 * x86-linux-nat.h: Include gdb_proc_service.h.
15841
44d6d3f9
YQ
158422017-01-06 Yao Qi <yao.qi@linaro.org>
15843
15844 * ser-base.h: Include serial.h.
15845
656731fe
YQ
158462017-01-06 Yao Qi <yao.qi@linaro.org>
15847
15848 * ppc-linux-tdep.h: Include ppc-tdep.h.
15849
1ca8f924
YQ
158502017-01-06 Yao Qi <yao.qi@linaro.org>
15851
15852 * nat/amd64-linux-siginfo.h: Include signal.h.
15853
bc3008c4
YQ
158542017-01-06 Yao Qi <yao.qi@linaro.org>
15855
15856 * nat/aarch64-linux-hw-point.h: Include break-common.h.
15857
66c80d03
YQ
158582017-01-06 Yao Qi <yao.qi@linaro.org>
15859
15860 * mi/mi-parse.h: Include mi-cmds.h.
15861
051d2dda
YQ
158622017-01-06 Yao Qi <yao.qi@linaro.org>
15863
15864 * inf-loop.c: Don't include "target.h".
15865 * inf-loop.h: Include it here.
15866
8018d34f
YQ
158672017-01-06 Yao Qi <yao.qi@linaro.org>
15868
15869 * dfp.h: Include "dboulest.h" and "expression.h".
15870
c0b8369c
YQ
158712017-01-06 Yao Qi <yao.qi@linaro.org>
15872
15873 * ax-gdb.h: Include "ax.h".
15874
ad5cba2a
YQ
158752017-01-06 Yao Qi <yao.qi@linaro.org>
15876
15877 * Makefile.in (HFILES_NO_SRCDIR): Replace gdb_ptrace.h
15878 with nat/gdb_ptrace.h.
15879
1c33cd7f
YQ
158802017-01-05 Yao Qi <yao.qi@linaro.org>
15881
15882 * mips-fbsd-tdep.c (mips_fbsd_sigframe_init): Move && to
15883 new line.
15884 (mips64_fbsd_sigframe_init): Likewise.
15885
c988ac1d
JB
158862017-01-04 John Baldwin <jhb@FreeBSD.org>
15887
15888 * mips-fbsd-tdep.c (_initialize_mips_fbsd_tdep): Use
15889 GDB_OSABI_FREEBSD instead of GDB_OSABI_FREEBSD_ELF.
15890
b268007c
JB
158912017-01-04 John Baldwin <jhb@FreeBSD.org>
15892
15893 * Makefile.in (ALLDEPFILES): Add mips-fbsd-nat.c.
15894 * NEWS: Mention new FreeBSD/mips native configuration.
15895 * config/mips/fbsd.mh: New file.
15896 * configure.host: Add mips*-*-freebsd*.
15897 * mips-fbsd-nat.c: New file.
15898
387360da
JB
158992017-01-04 John Baldwin <jhb@FreeBSD.org>
15900
15901 * Makefile.in (ALL_TARGET_OBS): Add mips-fbsd-tdep.o.
15902 (ALLDEPFILES): Add mips-fbsd-tdep.c.
15903 * NEWS: Mention new FreeBSD/mips target.
15904 * configure.tgt: Add mips*-*-freebsd*.
15905 * mips-fbsd-tdep.c: New file.
15906 * mips-fbsd-tdep.h: New file.
15907
2aaaf250
YQ
159082017-01-04 Yao Qi <yao.qi@linaro.org>
15909
15910 * dwarf2loc.c (write_pieced_value): Don't use VALUE_FRAME_ID (to),
15911 use c->frame_id when the piece location is DWARF_VALUE_REGISTER.
15912
61baf725
JB
159132017-01-01 Joel Brobecker <brobecker@adacore.com>
15914
6dbb839a 15915 Update copyright year range in all GDB files.
61baf725 15916
c113e7ff 159172017-01-01 Joel Brobecker <brobecker@adacore.com>
ce0db137 15918
c113e7ff 15919 * config/djgpp/fnchange.lst: Add entry for gdb/ChangeLog-2016.
ce0db137 15920
c113e7ff 15921For older changes see ChangeLog-2016.
c906108c
SS
15922\f
15923Local Variables:
15924mode: change-log
15925left-margin: 8
15926fill-column: 74
15927version-control: never
57da7796 15928coding: utf-8
c906108c 15929End: